From 478ee23d10b73a0578012b6ce9187c7400d1cc14 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:19:18 -0400 Subject: [PATCH 1/8] chore(deps): bump vitest, oxlint, router, query, lucide, astro, wrangler to latest patch/minor --- apps/marketing/package.json | 2 +- apps/relay-worker/package.json | 2 +- apps/server/package.json | 2 +- apps/web/package.json | 12 +- oxlint-plugin-threadlines/package.json | 4 +- package.json | 2 +- pnpm-lock.yaml | 497 ++++++++++++------------- 7 files changed, 257 insertions(+), 264 deletions(-) diff --git a/apps/marketing/package.json b/apps/marketing/package.json index f1a38c7d..aa23053f 100644 --- a/apps/marketing/package.json +++ b/apps/marketing/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@vercel/analytics": "^2.0.1", - "astro": "^7.2.4" + "astro": "^7.2.9" }, "devDependencies": { "@astrojs/check": "^0.9.10", diff --git a/apps/relay-worker/package.json b/apps/relay-worker/package.json index ec863048..262e84c8 100644 --- a/apps/relay-worker/package.json +++ b/apps/relay-worker/package.json @@ -19,6 +19,6 @@ "vite": "catalog:", "vite-plus": "catalog:", "vitest": "catalog:", - "wrangler": "^4.125.0" + "wrangler": "^4.127.0" } } diff --git a/apps/server/package.json b/apps/server/package.json index c58a4ad2..63523442 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -49,7 +49,7 @@ "@effect/platform-node": "catalog:", "@effect/platform-node-shared": "catalog:", "@effect/sql-sqlite-bun": "catalog:", - "@opencode-ai/sdk": "^1.18.20", + "@opencode-ai/sdk": "^1.18.23", "@pierre/diffs": "catalog:", "effect": "catalog:", "node-pty": "^1.1.0" diff --git a/apps/web/package.json b/apps/web/package.json index 5a664e18..2281f82e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -20,12 +20,12 @@ "@effect/atom-react": "catalog:", "@fontsource-variable/cascadia-mono": "^5.3.0", "@fontsource-variable/schibsted-grotesk": "^5.3.0", - "@legendapp/list": "^3.3.8", + "@legendapp/list": "^3.3.9", "@lexical/react": "^0.47.0", "@pierre/diffs": "catalog:", "@tanstack/react-pacer": "^0.23.0", - "@tanstack/react-query": "^5.101.4", - "@tanstack/react-router": "^1.170.31", + "@tanstack/react-query": "^5.102.8", + "@tanstack/react-router": "^1.170.32", "@threadlines/client-runtime": "workspace:*", "@threadlines/contracts": "workspace:*", "@threadlines/shared": "workspace:*", @@ -34,7 +34,7 @@ "class-variance-authority": "^0.7.1", "effect": "catalog:", "lexical": "^0.47.0", - "lucide-react": "^1.33.0", + "lucide-react": "^1.34.0", "react": "19.2.8", "react-dom": "19.2.8", "react-markdown": "^10.1.0", @@ -45,10 +45,10 @@ "devDependencies": { "@rolldown/plugin-babel": "^0.2.0", "@tailwindcss/vite": "^4.3.3", - "@tanstack/router-plugin": "^1.168.34", + "@tanstack/router-plugin": "^1.168.35", "@types/babel__core": "^7.20.5", "@types/react": "~19.2.18", - "@types/react-dom": "~19.2.4", + "@types/react-dom": "~19.2.5", "@vitejs/plugin-react": "^6.1.0", "@vitest/browser-playwright": "catalog:", "babel-plugin-react-compiler": "1.0.0", diff --git a/oxlint-plugin-threadlines/package.json b/oxlint-plugin-threadlines/package.json index a3b30509..87e36528 100644 --- a/oxlint-plugin-threadlines/package.json +++ b/oxlint-plugin-threadlines/package.json @@ -8,12 +8,12 @@ }, "dependencies": { "@effect/platform-node": "catalog:", - "@oxlint/plugins": "^1.79.0", + "@oxlint/plugins": "^1.80.0", "effect": "catalog:" }, "devDependencies": { "@effect/vitest": "catalog:", - "oxlint": "^1.79.0", + "oxlint": "^1.80.0", "typescript": "catalog:", "vite": "catalog:", "vite-plus": "catalog:", diff --git a/package.json b/package.json index f438b88b..2424097b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@effect/tsgo": "catalog:", - "@oxlint/plugins": "^1.79.0", + "@oxlint/plugins": "^1.80.0", "@types/node": "catalog:", "@typescript/native-preview": "catalog:", "vite": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bf27996..82edb0ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,8 +92,8 @@ importers: specifier: 'catalog:' version: 0.13.2 '@oxlint/plugins': - specifier: ^1.79.0 - version: 1.79.0 + specifier: ^1.80.0 + version: 1.80.0 '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -165,8 +165,8 @@ importers: specifier: ^2.0.1 version: 2.0.1(react@19.2.8) astro: - specifier: ^7.2.4 - version: 7.2.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@types/node@24.13.3)(ioredis@5.11.1)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0) + specifier: ^7.2.9 + version: 7.2.9(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@types/node@24.13.3)(ioredis@5.11.1)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0) devDependencies: '@astrojs/check': specifier: ^0.9.10 @@ -203,8 +203,8 @@ importers: specifier: 4.1.11 version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) wrangler: - specifier: ^4.125.0 - version: 4.125.0(@types/node@24.13.3) + specifier: ^4.127.0 + version: 4.127.0(@types/node@24.13.3) apps/server: dependencies: @@ -227,8 +227,8 @@ importers: specifier: 4.0.0-beta.97 version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)) '@opencode-ai/sdk': - specifier: ^1.18.20 - version: 1.18.20 + specifier: ^1.18.23 + version: 1.18.23 '@pierre/diffs': specifier: 'catalog:' version: 1.3.0-beta.9(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -306,8 +306,8 @@ importers: specifier: ^5.3.0 version: 5.3.0 '@legendapp/list': - specifier: ^3.3.8 - version: 3.3.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + specifier: ^3.3.9 + version: 3.3.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@lexical/react': specifier: ^0.47.0 version: 0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31) @@ -318,11 +318,11 @@ importers: specifier: ^0.23.0 version: 0.23.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@tanstack/react-query': - specifier: ^5.101.4 - version: 5.101.4(react@19.2.8) + specifier: ^5.102.8 + version: 5.102.8(react@19.2.8) '@tanstack/react-router': - specifier: ^1.170.31 - version: 1.170.31(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + specifier: ^1.170.32 + version: 1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@threadlines/client-runtime': specifier: workspace:* version: link:../../packages/client-runtime @@ -348,8 +348,8 @@ importers: specifier: ^0.47.0 version: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) lucide-react: - specifier: ^1.33.0 - version: 1.33.0(react@19.2.8) + specifier: ^1.34.0 + version: 1.34.0(react@19.2.8) react: specifier: 19.2.8 version: 19.2.8 @@ -376,8 +376,8 @@ importers: specifier: ^4.3.3 version: 4.3.3(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)) '@tanstack/router-plugin': - specifier: ^1.168.34 - version: 1.168.35(@tanstack/react-router@1.170.31(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) + specifier: ^1.168.35 + version: 1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -385,8 +385,8 @@ importers: specifier: ~19.2.18 version: 19.2.18 '@types/react-dom': - specifier: ~19.2.4 - version: 19.2.4(@types/react@19.2.18) + specifier: ~19.2.5 + version: 19.2.5(@types/react@19.2.18) '@vitejs/plugin-react': specifier: ^6.1.0 version: 6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(babel-plugin-react-compiler@1.0.0) @@ -419,7 +419,7 @@ importers: version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) vitest-browser-react: specifier: ^2.0.5 - version: 2.2.0(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11) + version: 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11) oxlint-plugin-threadlines: dependencies: @@ -427,8 +427,8 @@ importers: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@oxlint/plugins': - specifier: ^1.79.0 - version: 1.79.0 + specifier: ^1.80.0 + version: 1.80.0 effect: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) @@ -437,7 +437,7 @@ importers: specifier: 4.0.0-beta.97 version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) oxlint: - specifier: ^1.79.0 + specifier: ^1.80.0 version: 1.80.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) typescript: specifier: 'catalog:' @@ -765,65 +765,65 @@ packages: peerDependencies: typescript: ^5.0.0 || ^6.0.0 - '@astrojs/compiler-binding-darwin-arm64@0.3.2': - resolution: {integrity: sha512-MM8tn8CSimcfytaOla4b6acN8mKWiL/rlAA1fpT3/Wl7dNGSE4y8FjTN/zJVNnb63CsLWG5zZwCt01TXtDKh9g==} + '@astrojs/compiler-binding-darwin-arm64@0.4.0': + resolution: {integrity: sha512-ZVUwHundaQyFNjE6uoa0usaC0WOCitDCLS/4mdb4rOiJXwVUuKJBMxI5WMzXLWmamsXtK/Z//ifLXvV5Yeh4Hw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@astrojs/compiler-binding-darwin-x64@0.3.2': - resolution: {integrity: sha512-2lXOlzf8xb7jLomRsf/aswh61/NnGusynB2OwFkK6k4pmOtpfXMYnG0PLfXrEvxXYj69NdCnmUYXtHDd+JOOag==} + '@astrojs/compiler-binding-darwin-x64@0.4.0': + resolution: {integrity: sha512-FI6G8AY8u6fR1SI/QRR5yGMwtvZwP34CDmZpZ5HwJGa50UM1VISTLhqkhV4a476pmgd25X1Aur2dqw6hUnrlKA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': - resolution: {integrity: sha512-BmU3kWj7qnLrd4vzm49zFEPJ5oFnn1tCT4Vt9hZbqdU5Cmb8GZl7fn6VFsnNfe7B18a2gIFtVzbLINtYl5kBjQ==} + '@astrojs/compiler-binding-linux-arm64-gnu@0.4.0': + resolution: {integrity: sha512-lB9gLFJK7m82EnjaU8nlRBEfcwGNeHidW3sSjODTUjMNaoewVuUz9fwwdY5M4jiSXIqWLH3yl6TX8FTDKA74Sw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': - resolution: {integrity: sha512-f0heT9ZZEseSu5bHCeb80eL2DH07ArE6U9xi1WT/PEusNjzPmEr3GJsjG1tRLo5VYUUYX7h3ScaqGmGrMOVGmw==} + '@astrojs/compiler-binding-linux-arm64-musl@0.4.0': + resolution: {integrity: sha512-HPbvWqbxFxyaoQJhLxCaSjtYBx9KBo7JGVzEFZCmMl968a2PsSH0UfiODYgYPXofTOIsIH2aoCcrHXML0IA3ig==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': - resolution: {integrity: sha512-M8fOUt0itRpqiGyoEA/ij184s8O+hqbCz3+YozRusOOM3osgGljpDThhbKAJjqh82wOo6FioQ4w8PBvU1XMD5Q==} + '@astrojs/compiler-binding-linux-x64-gnu@0.4.0': + resolution: {integrity: sha512-tQKolMxoJ/+0AmLWm1PmJ/i+z3i10ZU1bNuVjEDulCf48azEMtUNjTZgHJ5MPtpYRNc7dlETr8QujUfduzoC7Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@astrojs/compiler-binding-linux-x64-musl@0.3.2': - resolution: {integrity: sha512-/Kebk8sO6HnLeSd691JkaAPfN7CqR9/KEXmWvyNPkaKNGmj8rTZ/lf2uXtnPu92Lan84UrKdIKVPy1fSo2encQ==} + '@astrojs/compiler-binding-linux-x64-musl@0.4.0': + resolution: {integrity: sha512-5v5YymudsxMHp3NBLCS8BUlu5CRqeLtWD9cKS/4nIhIEHCbpz9okmVV6I0HWqmBAPhWYcDa3vw/vltYPrOQCTA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@astrojs/compiler-binding-wasm32-wasi@0.3.2': - resolution: {integrity: sha512-pUA6xbcOSB7DhfzIArB8BCAkFfAIqriiR7zl5zOStd6oU2G0kIKj+GUdGnyXyhfiv881Hffyk5tC0mR18sDjDw==} + '@astrojs/compiler-binding-wasm32-wasi@0.4.0': + resolution: {integrity: sha512-m/phuH3x3PREvv1OnkM44NoPh4MatUadix1fB1u5SvMLCyDTUZykDJbKnWf1cjnYmHdlB8HcjTjl6JrCqAIXcw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': - resolution: {integrity: sha512-ESruf+6Qkl1trHUFxI6GSf6t52j8yN2kCNSzMWdzt7V/T09tFHrYzrVaJQohb2C9bJUH76pNvX6Zb51+xCQc9Q==} + '@astrojs/compiler-binding-win32-arm64-msvc@0.4.0': + resolution: {integrity: sha512-B9zYf3okEY83kM8gydlpH2BHP00w4ifxPqlYlWrgTwuD6wnkrJDCwBlgy1q31cERjCJRXN1lrE2VmkLvFjv/6g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': - resolution: {integrity: sha512-wzzVrEbOwbsLWOdEbocskjMRx2aZPxJ7ZbmL+jnpBamFwmigm+2M/wzuM6JWncocgYwLic1csSpalBh96kQKXA==} + '@astrojs/compiler-binding-win32-x64-msvc@0.4.0': + resolution: {integrity: sha512-zB0Nrv0dGc0zZWPGDRmmETTPhDRqyZjAjk+gWMlVrJX5U89obpB3VUUE1ZiHxOCN5LQojeLK6O8L/dnoHolvNQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@astrojs/compiler-binding@0.3.2': - resolution: {integrity: sha512-8w/9CWmYrAJJ8N0SY3O43ws2BgxoW6u3QsD8u2mE140lMYAlwh+tlNoUeSBq22wVheFuiBbR212l6ixZ2IIgCQ==} + '@astrojs/compiler-binding@0.4.0': + resolution: {integrity: sha512-x2RjDUuWfwLNtc3mjAdSRInwqh/rqbLar9cm/5FOMbHvmYZB7yfKewzSclAxWjIZsypJDXv1lhaP2WG+P8TK3g==} engines: {node: ^20.19.0 || >=22.12.0} - '@astrojs/compiler-rs@0.3.2': - resolution: {integrity: sha512-xlx/T7JovIKduu4ucbTQUxQ5+Q8wxkHxhLjnZk3VlJbhbQ9RLvvuDk1p2YYFYFQ5y14dVm3FGGO4isQXa4F+Tg==} + '@astrojs/compiler-rs@0.4.0': + resolution: {integrity: sha512-koVikeon1kreEy+/JzLQRy3vzHHQVOjycs4degg4vFufKApZOwMZvSSAEztYNhmcQVfNVsVZZI4cEge3cexAbQ==} engines: {node: '>=22.12.0'} '@astrojs/compiler@2.13.1': @@ -844,8 +844,8 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdown-satteri@0.3.7': - resolution: {integrity: sha512-NHcHbrKW/opbZnTZQ5nH293BdcK2VV0tjuzI88CLnvy2njiEJVwUQ5KFnYd4NoWgHJCY/I1CyjGWCR4Vv3khXQ==} + '@astrojs/markdown-satteri@0.3.8': + resolution: {integrity: sha512-n8ItpFTCmlDsVR5+rwDmehSf+jFCYLWmZiisZNGuF7xILqYhsVeBfcha4qgS2Seq3fAc9Tm58ZVrvqFQ6RQgRQ==} '@astrojs/prism@4.0.2': resolution: {integrity: sha512-KTivpmnz6lDsC6o9H4+DNm2SrE/GHzw8cNAvEJwAvUT+eoaEnn/4NtbDNfRRaxaJHdp15gf+tfHAWiXR4wB3BA==} @@ -1038,32 +1038,32 @@ packages: workerd: optional: true - '@cloudflare/workerd-darwin-64@1.20260820.1': - resolution: {integrity: sha512-5F2/t7SVnugG3rscSe9da1LoHst+GiuVGPaE9BP6j5AonlFpiYi0eoJrl3wof9zDBIIgJZ87NjRj9TKjbbYgHg==} + '@cloudflare/workerd-darwin-64@1.20260826.1': + resolution: {integrity: sha512-8UsGGY8ZUiYHOWdsxBlNsGmaHBGArVwJ3CM4nWpfBhthjjYe4M/OqrTpqKF7NNWb63qQiv1d8Z+Z6/hmUqNKIQ==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20260820.1': - resolution: {integrity: sha512-jFnG7715+r9FXRZPpuWWe5Ayd9v/IJKDODARg56ffFJWWtte6bFNi5VY3GazBM04hEmxny6OjXQBh3j2E/wNZw==} + '@cloudflare/workerd-darwin-arm64@1.20260826.1': + resolution: {integrity: sha512-0bLqVQYsQ3v3FdYGmzh23vi9fJeYTBx19o4LUySIsRcgBggGSlR39ml162vTXvZzUISOjVW2qfL7Y+SMrrfXmQ==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20260820.1': - resolution: {integrity: sha512-TbTYaCBht0OaOWmnVpg43hXVYtIti/Kg6lvO819H2DwbxPpK1BH0z2C+Y7ySrVJLlxZQeic5eN7/noqbP80hJg==} + '@cloudflare/workerd-linux-64@1.20260826.1': + resolution: {integrity: sha512-DTC0yWzybX4gUH5Q1pJo3UwEQjp0Gmz0Q71I+39xT9SXBesX5QndOIQv45yHQ86Z84EzK2WwaENdlpmDSvJKmw==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20260820.1': - resolution: {integrity: sha512-FQmri1UF7hBnnpeyC5SZJCAnsSRs3+Ykn9wlO5zxmE2qIgKfbJZ+toJ6qrQyugWlxE65juT33HU6aYLtutLJHw==} + '@cloudflare/workerd-linux-arm64@1.20260826.1': + resolution: {integrity: sha512-PFerWi+DP2Ckc6eATAS4dhotBt8IeXJjTzIgy18H+uqsswlXc7A8HsnAunHL9v/7/BjCgq46iMo2g4iUAsEpDw==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20260820.1': - resolution: {integrity: sha512-BPvCuMxIQfA47wtYsGbBG6Bcar57Qs7yHqU2jWkT1+sRnL/741/ZbQGP9kVRMQ5fwBMuqNFmQRzAu8gSm7ri/w==} + '@cloudflare/workerd-windows-64@1.20260826.1': + resolution: {integrity: sha512-X26hulrG2MSSfpRmjZbCq98LNaZnrRqbmGcgo7g1U/U0nJ5npYruPm3fAyZ2y6VDr5CmQo9BLCahxP8VB/QR6A==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -1945,8 +1945,8 @@ packages: cpu: [x64] os: [win32] - '@legendapp/list@3.3.8': - resolution: {integrity: sha512-GM4Hca/6WDvcY33XXCieR9MaG9CoZmACzwqQwRhKFSaNKfQV1lTLiTOpWuA9wnE8n8+6WeA52DwNKC9yrnPPeg==} + '@legendapp/list@3.3.9': + resolution: {integrity: sha512-ETxJPA5m59+AF65r9Ko25WMtV1KAWEebYeG0sIOTBtuZxfNpX8rBsLhFDQ8qY1tbPhJsr+U025u0u6irE9z8zw==} peerDependencies: react: '*' react-dom: '*' @@ -2228,8 +2228,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opencode-ai/sdk@1.18.20': - resolution: {integrity: sha512-07PeB/aHS//CaByGXbeHqQXuuIaKCUnZt7zUf1lbobR34fURtmAH9Wzks37vqnbZo0RUUJx3JsfIWT9hUH1EgA==} + '@opencode-ai/sdk@1.18.23': + resolution: {integrity: sha512-VouYbL8O2ynLq0atr5fjzCv8YLtFi/zKLQ/uYkCvTJ4CmUdA01XwPn8om+u3TvxnGEfQsBfmThGU141vt3sg5w==} '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -2620,8 +2620,8 @@ packages: resolution: {integrity: sha512-titLmukUt/h8ho7Svlf0xSBjoy2ccZKrXjpXpZCj+v6V4CJccC2KyP45BLSCMx8YIpifMyiDyUptM4+5sruKbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@oxlint/plugins@1.79.0': - resolution: {integrity: sha512-S0uyoxakDINJ4DPgqxGlEEvrdSMeQb7Z2lKVjxoY2gwsbZbfg2Xr8Klfeo5ZeraHmmdBCELFUHkSe6KEmBpMvg==} + '@oxlint/plugins@1.80.0': + resolution: {integrity: sha512-QRgH1XqQEYNHa4f1vvPQ5fAdNdncHGIUG1ZWLlGIZHky3qwCEeAKYitZNbZMtaXtAQAAFFTOwqUfzESvimqZNA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@peculiar/asn1-schema@2.8.0': @@ -2984,8 +2984,8 @@ packages: resolution: {integrity: sha512-Zq23KOn30tFiA6ZYWihs5x++ttHkOIcnIIjRrJq05tGrYx9+iHsmVaj8jb7UJVemEI+JRWGzJ9C+50YV4nRz0w==} engines: {node: '>=18'} - '@tanstack/query-core@5.101.4': - resolution: {integrity: sha512-gNwcvOJcRbLWPOLG/2OBm+zM+Yv+MKsXKEOWC57USuZDEsI71hEErQsiEGx5wX9rzWWkfwM0fVSPoiIFSsxfiw==} + '@tanstack/query-core@5.102.8': + resolution: {integrity: sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg==} '@tanstack/react-pacer@0.23.0': resolution: {integrity: sha512-Ec3h+kT8kYlpGb1M8F7836q+udE/M2RmE8KLr1rhs+UDBgvxjfmyR2bIUeaDEe9Zn1YXNI986RbErXyr5fEJIg==} @@ -2994,13 +2994,13 @@ packages: react: '>=16.8' react-dom: '>=16.8' - '@tanstack/react-query@5.101.4': - resolution: {integrity: sha512-yRg2pfOCxIs4ZJW3XYYHU/WgtD04FHSnfHlpRT7h7pR77hwkdRG4wxbKe4aq6P0RvXUTBSQpQeadS1SUYUe+KA==} + '@tanstack/react-query@5.102.8': + resolution: {integrity: sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A==} peerDependencies: react: ^18 || ^19 - '@tanstack/react-router@1.170.31': - resolution: {integrity: sha512-jqITLcf9Y+es9Wm7fD7XfXFGKk1Fujm+okGqHtr+UhISnQuyLQ8d3frsJlIN0Np1doYoeb5weozSkv72+EZ5bw==} + '@tanstack/react-router@1.170.32': + resolution: {integrity: sha512-SIpxvaTKco100a5ZR3ePmArbhtm3XOx+w1dpGYY9gxHDta4iXSKDdQuhLonwJbIMkVJsU1rwXf0UDHMrF/1snw==} engines: {node: '>=20.19'} peerDependencies: react: '>=18.0.0 || >=19.0.0' @@ -3018,10 +3018,6 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@tanstack/router-core@1.171.26': - resolution: {integrity: sha512-VymmPSs/93szHur/7PBygT6tRbmfcNO1xR46Wn/JVHeBqVduLPCuxBeJEgfVmVq8E4hSklPEh8i6qGXQd6WRqA==} - engines: {node: '>=20.19'} - '@tanstack/router-core@1.171.27': resolution: {integrity: sha512-wDwSLvoLwIaNcnx9UNcN9Mb7Y8QwCYq1U1RQZwyN186gnkIoIYI2SOxy8VqH1vFigbkHkk4FmwMAQlghPgDK2g==} engines: {node: '>=20.19'} @@ -3141,8 +3137,8 @@ packages: '@types/node@24.13.3': resolution: {integrity: sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==} - '@types/react-dom@19.2.4': - resolution: {integrity: sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==} + '@types/react-dom@19.2.5': + resolution: {integrity: sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==} peerDependencies: '@types/react': ^19.2.0 @@ -3699,8 +3695,8 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - astro@7.2.4: - resolution: {integrity: sha512-+cuLsBns2wwUHI9a10xZMbjrF91m7+QNwqTVeljTx0B8Lf+8h0LgVGjdVIL2FALDKD2I565lczeeS3BFC+KdZg==} + astro@7.2.9: + resolution: {integrity: sha512-o5nZFo/bieF6rp4x9sQSLhI7GO7Bahpld38Y4LvX27nFoxNiuttjI+Hea81w5ksORLHgdPUlQpU9obPz5QRa8g==} engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true peerDependencies: @@ -3746,8 +3742,8 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - baseline-browser-mapping@2.11.14: - resolution: {integrity: sha512-JyJ954WzuIR8/FFzX0o5krdSTrBAkcCSRfWSleRsIHSWV+cZe2FI1PKggVkFke1hBldRs+LRxUczzE9iPmgZww==} + baseline-browser-mapping@2.11.19: + resolution: {integrity: sha512-Grytf1xOxOEMTGRwx6rLGKkTabd4vMg3VrKdj/7joCmV0qgh4QwMMO6xh34YEXQqirAuUdgQGa5orJQQ+69RBw==} engines: {node: '>=6.0.0'} hasBin: true @@ -3818,8 +3814,8 @@ packages: call-me-maybe@1.0.2: resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - caniuse-lite@1.0.30001809: - resolution: {integrity: sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==} + caniuse-lite@1.0.30001810: + resolution: {integrity: sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -3911,10 +3907,6 @@ packages: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} - commander@14.0.3: - resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} - engines: {node: '>=20'} - commander@5.1.0: resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} engines: {node: '>= 6'} @@ -3985,8 +3977,8 @@ packages: crossws@0.3.5: resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} - css-select@5.2.2: - resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} + css-select@6.0.0: + resolution: {integrity: sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==} css-tree@2.2.1: resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} @@ -3996,8 +3988,8 @@ packages: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - css-what@6.2.2: - resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} + css-what@7.0.0: + resolution: {integrity: sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==} engines: {node: '>= 6'} csso@5.0.5: @@ -4064,8 +4056,8 @@ packages: detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} - devalue@5.9.1: - resolution: {integrity: sha512-+17vil3EVQRzvtDJSFuTWEb8XJRvXqAiV3qZyQWD398QeXUa6CxsUyMdD1fxzEhUrd4FojitFz7lhIHBTlV4fw==} + devalue@5.9.2: + resolution: {integrity: sha512-po4PAY5c53tw5XMocSnf8A/5OHhbbUftpr93aEN6BBoAdntUmK7vu7wOATqvt7cXO7m1Cl4gMVn6p7n6n4mj0w==} devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} @@ -4141,8 +4133,8 @@ packages: electron-publish@26.15.3: resolution: {integrity: sha512-g/2bn8YTavY4cuS5F+jOS7zmZbXXBV8KZ8yHKfJjFPoKtzBqrpCdNPxBd3tqdBwP7BVd0lGzf7Bk2s0KesWZ4Q==} - electron-to-chromium@1.5.406: - resolution: {integrity: sha512-hWH5ORBi3d0IipnMh7BN5GDTaAmrSSSWmznwt2zltdiRNEWoEQyTwF0FFSBxzHO7hLSRT6loQu3IQGV0wg/Tvg==} + electron-to-chromium@1.5.415: + resolution: {integrity: sha512-958V+Kbhtgz+SxXeEVKBjrlKRBIDAYvUJfwhjxMZ5S6ut9jAl7l9ZKBkBrvjyjZE36PabLUo2L8kEeV5O4vgJg==} electron-updater@6.8.9: resolution: {integrity: sha512-ZhVxM9iGONUpZGI1FxdMRgJjUFXi7AYGVa5PwKlO1tV1/4zDxQmfKpXOHVztKrd6L9rLcFjERvi1Mf2vxyTkig==} @@ -4329,9 +4321,9 @@ packages: find-my-way-ts@0.1.6: resolution: {integrity: sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==} - find-process@2.1.1: - resolution: {integrity: sha512-SrQDx3QhlmHM90iqn9rdjCQcw/T+WlpOkHFsjoRgB+zTpDfltNA1VSNYeYELwhUTJy12UFxqjWhmhOrJc+o4sA==} - hasBin: true + find-proc@0.1.0: + resolution: {integrity: sha512-OaOpEYv2PiQ7SQ5LIrl+deA1XaWcxEjnpM6VuWXTUvn+teIXxeFTLDmu18/zDQpFmHN4o3oDBX+BT0AGwEhemg==} + engines: {node: ^20.19.0 || >=22.12.0} flattie@1.1.1: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} @@ -4488,8 +4480,8 @@ packages: headers-polyfill@5.0.1: resolution: {integrity: sha512-1TJ6Fih/b8h5TIcv+1+Hw0PDQWJTKDKzFZzcKOiW1wJza3XoAQlkCuXLbymPYB8+ZQyw8mHvdw560e8zVFIWyA==} - hono@4.13.3: - resolution: {integrity: sha512-r8AO2mYHoLxSHkgafNeC/BXyb2vWRxD3jem4Ts+ptav8oTG5FIRifAjuJEmZI4bSvvc2ns0GxmIYiZnHqN3mMw==} + hono@4.13.5: + resolution: {integrity: sha512-O6+/eCYRkzzzy0rPWwKLiGBR1nFuUPZynnwjxN1MBA62NNqbT0wQEzQyK2gSO5yDIDB336sXQleAhOHrzlYyKw==} engines: {node: '>=16.9.0'} hosted-git-info@4.1.0: @@ -4602,8 +4594,8 @@ packages: resolution: {integrity: sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==} engines: {node: '>= 18.0.0'} - isbot@5.2.1: - resolution: {integrity: sha512-dJ+LpKyClQZ7NG+j3OensC/mAZkGpukE9YUrgPYvAZj2doVL0edfDgywTUh5CXa0o+nW9a1V9e5+CJTX8+SxRw==} + isbot@5.2.2: + resolution: {integrity: sha512-iQcBXcd+Rv/pkubRyGh2utW2j1oPG5hZY6TUhVPpqK4G+o3IbxpJNx04hgksjc/N7GK5pEorUxDeg31cFgEk/w==} engines: {node: '>=18'} isexe@2.0.0: @@ -4629,8 +4621,8 @@ packages: resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true - jose@6.2.9: - resolution: {integrity: sha512-XrchZOFZUl/T3vTwRe8XK+cJrGtMF4th1ARnDfwbBXFKThGhlsxEE4Zu03AD/bjJSt/9jT/mxrOCkJWOg77aPA==} + jose@6.2.10: + resolution: {integrity: sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g==} js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -4787,10 +4779,6 @@ packages: lodash@4.18.1: resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - loglevel@1.9.2: - resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} - engines: {node: '>= 0.6.0'} - longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -4812,8 +4800,8 @@ packages: lru_map@0.4.1: resolution: {integrity: sha512-I+lBvqMMFfqaV8CJCISjI3wbjmwVu/VyOoU7+qtu9d7ioW5klMgsTTiUOUp+DJvfTTzKXoPbyC6YfgkNcyPSOg==} - lucide-react@1.33.0: - resolution: {integrity: sha512-MTRwMy0ZlL8Ur/vOAiJ9XGHE+kFPC7brq6MxAm0GiGXEBj0qy0jA/pG4N675oSzciO/UCdX8T+5yUQdmDeTLxg==} + lucide-react@1.34.0: + resolution: {integrity: sha512-vnjGJNI7Htk5+oWW8gXGuaLgwgAb0T6/iZbBrp9JCfRFwdNWZ0YTm3eyxjOLgwN6r8iyAf3UA70zNmBRBNv7yg==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 @@ -4824,8 +4812,8 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} - magic-string@1.2.2: - resolution: {integrity: sha512-veT/+7iXrXzT39XnEN4lOxtNl72dMgJ8Lp+5Bd6YcMSWpb0n0MjBM8Uuooi6jgJr8dhUW2swQgBmoZVMni5SVg==} + magic-string@1.2.3: + resolution: {integrity: sha512-Bpb0W2TbLKOZ7vJnOUnVRGq3WL2p+ISV29M6hYPL1AFCpyKZpdr5ytiXoTSSxRVhg8YW7f65+6gbG8WG6PCa/g==} magicast@0.5.4: resolution: {integrity: sha512-llBEhWm1SacoRwgHUoQJYtwp4PBLF4faQi5TCpIGyGs9n4y5+juI0tDgyKIfpqxckRHaHzouUEph3THklWh03w==} @@ -5018,8 +5006,8 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - miniflare@5.20260820.0-alpha: - resolution: {integrity: sha512-Bv1j2kcKKNwXLWuCx+j0xGt7z318mqQkJmEN6ellM9sCESbPBDTM9ofZMbKqx47jSnoGA3CiaUkAmzGVXUa/wQ==} + miniflare@5.20260826.0-alpha: + resolution: {integrity: sha512-ZXR3Bieg+B5MK0T/zYIWaZiCGCb9Z3en4+/TleYKhIGPLx/e0cRcG/ZvvTviUapVBBK2zODB+aiypdIojU3x6Q==} engines: {node: '>=22.0.0'} minimatch@10.2.5: @@ -5149,8 +5137,8 @@ packages: node-readfiles@0.2.0: resolution: {integrity: sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==} - node-releases@2.0.53: - resolution: {integrity: sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==} + node-releases@2.0.54: + resolution: {integrity: sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==} engines: {node: '>=18'} nopt@9.0.0: @@ -5334,6 +5322,10 @@ packages: resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} engines: {node: '>=12'} + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + pkce-challenge@5.0.1: resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==} engines: {node: '>=16.20.0'} @@ -5618,14 +5610,14 @@ packages: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} - seroval-plugins@1.6.2: - resolution: {integrity: sha512-TfxuUjlbBESzUOWdTkTKqvSmav0ABym+itetDXLK6mDz8SmrpdI30aF8RTXE8Bvq+tH/1yIDkvy3W0lfQb1ipQ==} + seroval-plugins@1.6.4: + resolution: {integrity: sha512-R0f1U9hmn38+dFMz6b6ab8lwucmw4AtiY7St+JPWudy1dm+Bs3g884nyrsH9Cy6rKpZKLYayXuMda9GZ/fl8JQ==} engines: {node: '>=10'} peerDependencies: seroval: ^1.0 - seroval@1.6.2: - resolution: {integrity: sha512-mPT+SD2TrlB6wvte1KkYOYUkubaTbd6pZ/6Kk3C9nxzrHmCZyhxOO7XGAeL7f+yLKZglzGtM9odUVvg/EhO+vQ==} + seroval@1.6.4: + resolution: {integrity: sha512-LErWMNS2RRFdu2RMA5u/PA59/IWs0XsikyEXGQ2/36iEWFrdG0ABmg17E17cikrv76891kOAMq3TkTFXpwAHXw==} engines: {node: '>=10'} serve-static@2.2.1: @@ -5806,8 +5798,8 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - svgo@4.0.2: - resolution: {integrity: sha512-ekx94z1rRc5LDi6oSUaeRnYhd0UOJxdtQCL2rF8xpWxD3TPAsISWOrxezqGovqS38GRZOdpDfvQe3ts6F7nsng==} + svgo@4.1.0: + resolution: {integrity: sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==} engines: {node: '>=16'} hasBin: true @@ -6116,8 +6108,8 @@ packages: unzipper@0.12.3: resolution: {integrity: sha512-PZ8hTS+AqcGxsaQntl3IRBw65QrBI6lxzqDEL7IAo/XCEqRTKGfOX56Vea5TH9SZczRVxuzk1re04z/YjuYCJA==} - update-browserslist-db@1.3.1: - resolution: {integrity: sha512-ZZ61DsRsOnakl74HAmp3oSN4aXUmEWXf+i/yv0h7tIBfICc3VdrFErQKUUKPgu3AMsTUMbcongALEN4l6GSUrQ==} + update-browserslist-db@1.3.2: + resolution: {integrity: sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -6361,17 +6353,17 @@ packages: engines: {node: '>=8'} hasBin: true - workerd@1.20260820.1: - resolution: {integrity: sha512-/wk4rFNHH6IVMXFe6aPEZsT5YWpWtfKTUMt7+rFkyeGbXcGCy4yxODmJatbqYj0jmqHETdz0+m2mT+vNjXnF7w==} + workerd@1.20260826.1: + resolution: {integrity: sha512-oTG9ot5zxO9OjjKCskt86+nVrBL0kiUqExHnYaTg4OCkHf/K4zr+9hYvgwmG8DdCWG0TQGErHzD+1h50TM5b+w==} engines: {node: '>=16'} hasBin: true - wrangler@4.125.0: - resolution: {integrity: sha512-yFpvggu+xk1Hdm/Uxwaqa19bb7GArME4CrCS3Vov68a2TZq2MPO+wLocKbbnIC9K0oLowcdau7/ycxbbNHKCEg==} + wrangler@4.127.0: + resolution: {integrity: sha512-4dPqcBEMJfGeZeNnjHT7ThNJs+EiNYxUTg4ywqIdQubcXHBhFeVMQyHV4A9AOhZRFr83cckqdds034KGcr/dtw==} engines: {node: '>=22.0.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^5.20260820.1 + '@cloudflare/workers-types': ^5.20260826.1 peerDependenciesMeta: '@cloudflare/workers-types': optional: true @@ -6399,6 +6391,18 @@ packages: utf-8-validate: optional: true + ws@8.21.3: + resolution: {integrity: sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xmlbuilder@15.1.1: resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==} engines: {node: '>=8.0'} @@ -6551,25 +6555,25 @@ snapshots: - prettier - prettier-plugin-astro - '@astrojs/compiler-binding-darwin-arm64@0.3.2': + '@astrojs/compiler-binding-darwin-arm64@0.4.0': optional: true - '@astrojs/compiler-binding-darwin-x64@0.3.2': + '@astrojs/compiler-binding-darwin-x64@0.4.0': optional: true - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': + '@astrojs/compiler-binding-linux-arm64-gnu@0.4.0': optional: true - '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': + '@astrojs/compiler-binding-linux-arm64-musl@0.4.0': optional: true - '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': + '@astrojs/compiler-binding-linux-x64-gnu@0.4.0': optional: true - '@astrojs/compiler-binding-linux-x64-musl@0.3.2': + '@astrojs/compiler-binding-linux-x64-musl@0.4.0': optional: true - '@astrojs/compiler-binding-wasm32-wasi@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': + '@astrojs/compiler-binding-wasm32-wasi@0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': dependencies: '@napi-rs/wasm-runtime': 1.2.3(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) transitivePeerDependencies: @@ -6577,30 +6581,30 @@ snapshots: - '@emnapi/runtime' optional: true - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': + '@astrojs/compiler-binding-win32-arm64-msvc@0.4.0': optional: true - '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': + '@astrojs/compiler-binding-win32-x64-msvc@0.4.0': optional: true - '@astrojs/compiler-binding@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': + '@astrojs/compiler-binding@0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': optionalDependencies: - '@astrojs/compiler-binding-darwin-arm64': 0.3.2 - '@astrojs/compiler-binding-darwin-x64': 0.3.2 - '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.2 - '@astrojs/compiler-binding-linux-arm64-musl': 0.3.2 - '@astrojs/compiler-binding-linux-x64-gnu': 0.3.2 - '@astrojs/compiler-binding-linux-x64-musl': 0.3.2 - '@astrojs/compiler-binding-wasm32-wasi': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) - '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.2 - '@astrojs/compiler-binding-win32-x64-msvc': 0.3.2 + '@astrojs/compiler-binding-darwin-arm64': 0.4.0 + '@astrojs/compiler-binding-darwin-x64': 0.4.0 + '@astrojs/compiler-binding-linux-arm64-gnu': 0.4.0 + '@astrojs/compiler-binding-linux-arm64-musl': 0.4.0 + '@astrojs/compiler-binding-linux-x64-gnu': 0.4.0 + '@astrojs/compiler-binding-linux-x64-musl': 0.4.0 + '@astrojs/compiler-binding-wasm32-wasi': 0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) + '@astrojs/compiler-binding-win32-arm64-msvc': 0.4.0 + '@astrojs/compiler-binding-win32-x64-msvc': 0.4.0 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' - '@astrojs/compiler-rs@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': + '@astrojs/compiler-rs@0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)': dependencies: - '@astrojs/compiler-binding': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) + '@astrojs/compiler-binding': 0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -6612,7 +6616,7 @@ snapshots: '@types/hast': 3.0.5 '@types/mdast': 4.0.4 js-yaml: 4.3.1 - picomatch: 4.0.5 + picomatch: 4.0.7 retext-smartypants: 6.2.0 shiki: 4.4.3 smol-toml: 1.8.0 @@ -6643,7 +6647,7 @@ snapshots: transitivePeerDependencies: - typescript - '@astrojs/markdown-satteri@0.3.7': + '@astrojs/markdown-satteri@0.3.8': dependencies: '@astrojs/internal-helpers': 0.10.4 '@astrojs/prism': 4.0.2 @@ -6850,25 +6854,25 @@ snapshots: '@cloudflare/kv-asset-handler@0.5.0': {} - '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260820.1)': + '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260826.1)': dependencies: unenv: 2.0.0-rc.24 optionalDependencies: - workerd: 1.20260820.1 + workerd: 1.20260826.1 - '@cloudflare/workerd-darwin-64@1.20260820.1': + '@cloudflare/workerd-darwin-64@1.20260826.1': optional: true - '@cloudflare/workerd-darwin-arm64@1.20260820.1': + '@cloudflare/workerd-darwin-arm64@1.20260826.1': optional: true - '@cloudflare/workerd-linux-64@1.20260820.1': + '@cloudflare/workerd-linux-64@1.20260826.1': optional: true - '@cloudflare/workerd-linux-arm64@1.20260820.1': + '@cloudflare/workerd-linux-arm64@1.20260826.1': optional: true - '@cloudflare/workerd-windows-64@1.20260820.1': + '@cloudflare/workerd-windows-64@1.20260826.1': optional: true '@cspotcode/source-map-support@0.8.1': @@ -7358,9 +7362,9 @@ snapshots: '@github/copilot-win32-arm64': 1.0.80 '@github/copilot-win32-x64': 1.0.80 - '@hono/node-server@2.0.11(hono@4.13.3)': + '@hono/node-server@2.0.11(hono@4.13.5)': dependencies: - hono: 4.13.3 + hono: 4.13.5 '@img/colour@1.1.0': {} @@ -7570,7 +7574,7 @@ snapshots: '@koromix/koffi-win32-x64@3.1.4': optional: true - '@legendapp/list@3.3.8(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': + '@legendapp/list@3.3.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: react: 19.2.8 use-sync-external-store: 1.6.0(react@19.2.8) @@ -7822,7 +7826,7 @@ snapshots: '@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)': dependencies: - '@hono/node-server': 2.0.11(hono@4.13.3) + '@hono/node-server': 2.0.11(hono@4.13.5) ajv: 8.20.0 ajv-formats: 3.0.1(ajv@8.20.0) content-type: 1.0.5 @@ -7832,8 +7836,8 @@ snapshots: eventsource-parser: 3.1.1 express: 5.2.1 express-rate-limit: 8.6.2(express@5.2.1) - hono: 4.13.3 - jose: 6.2.9 + hono: 4.13.5 + jose: 6.2.10 json-schema-typed: 8.0.2 pkce-challenge: 5.0.1 raw-body: 3.0.2 @@ -7898,7 +7902,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opencode-ai/sdk@1.18.20': + '@opencode-ai/sdk@1.18.23': dependencies: cross-spawn: 7.0.6 @@ -8101,7 +8105,7 @@ snapshots: '@oxlint/plugins@1.68.0': {} - '@oxlint/plugins@1.79.0': {} + '@oxlint/plugins@1.80.0': {} '@peculiar/asn1-schema@2.8.0': dependencies: @@ -8237,7 +8241,7 @@ snapshots: '@shikijs/primitive': 4.2.0 '@shikijs/types': 4.2.0 '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 + '@types/hast': 3.0.4 hast-util-to-html: 9.0.5 '@shikijs/core@4.4.3': @@ -8282,7 +8286,7 @@ snapshots: dependencies: '@shikijs/types': 4.2.0 '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 + '@types/hast': 3.0.4 '@shikijs/primitive@4.4.3': dependencies: @@ -8311,7 +8315,7 @@ snapshots: '@shikijs/types@4.2.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.5 + '@types/hast': 3.0.4 '@shikijs/types@4.4.3': dependencies: @@ -8411,7 +8415,7 @@ snapshots: '@tanstack/devtools-event-client': 0.5.0 '@tanstack/store': 0.11.1 - '@tanstack/query-core@5.101.4': {} + '@tanstack/query-core@5.102.8': {} '@tanstack/react-pacer@0.23.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: @@ -8420,17 +8424,17 @@ snapshots: react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - '@tanstack/react-query@5.101.4(react@19.2.8)': + '@tanstack/react-query@5.102.8(react@19.2.8)': dependencies: - '@tanstack/query-core': 5.101.4 + '@tanstack/query-core': 5.102.8 react: 19.2.8 - '@tanstack/react-router@1.170.31(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': + '@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: '@tanstack/history': 1.162.1 '@tanstack/react-store': 0.9.3(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - '@tanstack/router-core': 1.171.26 - isbot: 5.2.1 + '@tanstack/router-core': 1.171.27 + isbot: 5.2.2 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) @@ -8448,19 +8452,12 @@ snapshots: react-dom: 19.2.8(react@19.2.8) use-sync-external-store: 1.6.0(react@19.2.8) - '@tanstack/router-core@1.171.26': - dependencies: - '@tanstack/history': 1.162.1 - cookie-es: 3.1.1 - seroval: 1.6.2 - seroval-plugins: 1.6.2(seroval@1.6.2) - '@tanstack/router-core@1.171.27': dependencies: '@tanstack/history': 1.162.1 cookie-es: 3.1.1 - seroval: 1.6.2 - seroval-plugins: 1.6.2(seroval@1.6.2) + seroval: 1.6.4 + seroval-plugins: 1.6.4(seroval@1.6.4) '@tanstack/router-generator@1.167.33': dependencies: @@ -8475,7 +8472,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.168.35(@tanstack/react-router@1.170.31(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2)': + '@tanstack/router-plugin@1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2)': dependencies: '@babel/core': 7.29.7 '@babel/template': 7.29.7 @@ -8487,7 +8484,7 @@ snapshots: unplugin: 3.3.0(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) zod: 4.4.3 optionalDependencies: - '@tanstack/react-router': 1.170.31(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + '@tanstack/react-router': 1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8) vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' transitivePeerDependencies: - '@farmfe/core' @@ -8621,7 +8618,7 @@ snapshots: dependencies: undici-types: 7.18.2 - '@types/react-dom@19.2.4(@types/react@19.2.18)': + '@types/react-dom@19.2.5(@types/react@19.2.18)': dependencies: '@types/react': 19.2.18 @@ -8835,7 +8832,7 @@ snapshots: sirv: 3.0.2 tinyrainbow: 3.1.1 vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) - ws: 8.21.0 + ws: 8.21.3 transitivePeerDependencies: - bufferutil - msw @@ -9167,11 +9164,11 @@ snapshots: assertion-error@2.0.1: {} - astro@7.2.4(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@types/node@24.13.3)(ioredis@5.11.1)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0): + astro@7.2.9(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3)(@types/node@24.13.3)(ioredis@5.11.1)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0): dependencies: - '@astrojs/compiler-rs': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) + '@astrojs/compiler-rs': 0.4.0(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.3) '@astrojs/internal-helpers': 0.10.4 - '@astrojs/markdown-satteri': 0.3.7 + '@astrojs/markdown-satteri': 0.3.8 '@astrojs/telemetry': 3.3.3 '@capsizecss/unpack': 4.0.1 '@clack/prompts': 1.7.0 @@ -9183,12 +9180,12 @@ snapshots: clsx: 2.1.1 common-ancestor-path: 2.0.0 cookie: 2.0.1 - devalue: 5.9.1 - diff: 8.0.4 + devalue: 5.9.2 + diff: 9.0.0 dset: 3.1.4 es-module-lexer: 2.3.2 esbuild: 0.28.2 - find-process: 2.1.1 + find-proc: 0.1.0 flattie: 1.1.1 fontace: 0.4.1 get-tsconfig: 5.0.0-beta.4 @@ -9197,7 +9194,7 @@ snapshots: http-cache-semantics: 4.2.0 js-yaml: 4.3.1 jsonc-parser: 3.3.1 - magic-string: 1.2.2 + magic-string: 1.2.3 magicast: 0.5.4 mrmime: 2.0.1 neotraverse: 1.0.1 @@ -9206,11 +9203,11 @@ snapshots: p-queue: 9.3.3 package-manager-detector: 1.8.0 piccolore: 0.1.3 - picomatch: 4.0.5 + picomatch: 4.0.7 semver: 7.8.5 shiki: 4.4.3 smol-toml: 1.8.0 - svgo: 4.0.2 + svgo: 4.1.0 tinyclip: 0.1.15 tinyexec: 1.3.0 tinyglobby: 0.2.17 @@ -9294,7 +9291,7 @@ snapshots: base64-js@1.5.1: {} - baseline-browser-mapping@2.11.14: {} + baseline-browser-mapping@2.11.19: {} blake3-wasm@2.1.5: {} @@ -9325,11 +9322,11 @@ snapshots: browserslist@4.28.8: dependencies: - baseline-browser-mapping: 2.11.14 - caniuse-lite: 1.0.30001809 - electron-to-chromium: 1.5.406 - node-releases: 2.0.53 - update-browserslist-db: 1.3.1(browserslist@4.28.8) + baseline-browser-mapping: 2.11.19 + caniuse-lite: 1.0.30001810 + electron-to-chromium: 1.5.415 + node-releases: 2.0.54 + update-browserslist-db: 1.3.2(browserslist@4.28.8) buffer-from@1.1.2: {} @@ -9391,7 +9388,7 @@ snapshots: call-me-maybe@1.0.2: {} - caniuse-lite@1.0.30001809: {} + caniuse-lite@1.0.30001810: {} ccount@2.0.1: {} @@ -9466,8 +9463,6 @@ snapshots: commander@11.1.0: {} - commander@14.0.3: {} - commander@5.1.0: {} commander@9.5.0: @@ -9517,10 +9512,10 @@ snapshots: dependencies: uncrypto: 0.1.3 - css-select@5.2.2: + css-select@6.0.0: dependencies: boolbase: 1.0.0 - css-what: 6.2.2 + css-what: 7.0.0 domhandler: 5.0.3 domutils: 3.2.2 nth-check: 2.1.1 @@ -9535,7 +9530,7 @@ snapshots: mdn-data: 2.27.1 source-map-js: 1.2.1 - css-what@6.2.2: {} + css-what@7.0.0: {} csso@5.0.5: dependencies: @@ -9588,7 +9583,7 @@ snapshots: detect-node@2.1.0: optional: true - devalue@5.9.1: {} + devalue@5.9.2: {} devlop@1.1.0: dependencies: @@ -9709,7 +9704,7 @@ snapshots: transitivePeerDependencies: - supports-color - electron-to-chromium@1.5.406: {} + electron-to-chromium@1.5.415: {} electron-updater@6.8.9: dependencies: @@ -9948,9 +9943,9 @@ snapshots: dependencies: fast-string-width: 3.0.2 - fdir@6.5.0(picomatch@4.0.5): + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: - picomatch: 4.0.5 + picomatch: 4.0.7 filelist@1.0.6: dependencies: @@ -9969,11 +9964,7 @@ snapshots: find-my-way-ts@0.1.6: {} - find-process@2.1.1: - dependencies: - chalk: 4.1.2 - commander: 14.0.3 - loglevel: 1.9.2 + find-proc@0.1.0: {} flattie@1.1.1: {} @@ -10196,7 +10187,7 @@ snapshots: '@types/set-cookie-parser': 2.4.10 set-cookie-parser: 3.1.2 - hono@4.13.3: {} + hono@4.13.5: {} hosted-git-info@4.1.0: dependencies: @@ -10299,7 +10290,7 @@ snapshots: isbinaryfile@5.0.7: {} - isbot@5.2.1: {} + isbot@5.2.2: {} isexe@2.0.0: {} @@ -10317,7 +10308,7 @@ snapshots: jiti@2.7.0: {} - jose@6.2.9: {} + jose@6.2.10: {} js-tokens@4.0.0: {} @@ -10450,8 +10441,6 @@ snapshots: lodash@4.18.1: {} - loglevel@1.9.2: {} - longest-streak@3.1.0: {} lowercase-keys@2.0.0: {} @@ -10468,7 +10457,7 @@ snapshots: lru_map@0.4.1: {} - lucide-react@1.33.0(react@19.2.8): + lucide-react@1.34.0(react@19.2.8): dependencies: react: 19.2.8 @@ -10478,7 +10467,7 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 - magic-string@1.2.2: + magic-string@1.2.3: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -10869,12 +10858,12 @@ snapshots: mimic-response@3.1.0: {} - miniflare@5.20260820.0-alpha(@types/node@24.13.3): + miniflare@5.20260826.0-alpha(@types/node@24.13.3): dependencies: '@cspotcode/source-map-support': 0.8.1 sharp: 0.35.3(@types/node@24.13.3) undici: 7.29.0 - workerd: 1.20260820.1 + workerd: 1.20260826.1 ws: 8.21.0 youch: 4.1.0-beta.10 transitivePeerDependencies: @@ -11049,7 +11038,7 @@ snapshots: dependencies: es6-promise: 3.3.1 - node-releases@2.0.53: {} + node-releases@2.0.54: {} nopt@9.0.0: dependencies: @@ -11362,6 +11351,8 @@ snapshots: picomatch@4.0.5: {} + picomatch@4.0.7: {} + pkce-challenge@5.0.1: {} pkijs@3.4.0: @@ -11706,11 +11697,11 @@ snapshots: type-fest: 0.13.1 optional: true - seroval-plugins@1.6.2(seroval@1.6.2): + seroval-plugins@1.6.4(seroval@1.6.4): dependencies: - seroval: 1.6.2 + seroval: 1.6.4 - seroval@1.6.2: {} + seroval@1.6.4: {} serve-static@2.2.1: dependencies: @@ -11945,12 +11936,12 @@ snapshots: dependencies: has-flag: 4.0.0 - svgo@4.0.2: + svgo@4.1.0: dependencies: commander: 11.1.0 - css-select: 5.2.2 + css-select: 6.0.0 css-tree: 3.2.1 - css-what: 6.2.2 + css-what: 7.0.0 csso: 5.0.5 picocolors: 1.1.1 sax: 1.6.1 @@ -12015,8 +12006,8 @@ snapshots: tinyglobby@0.2.17: dependencies: - fdir: 6.5.0(picomatch@4.0.5) - picomatch: 4.0.5 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 tinypool@2.1.0: {} @@ -12170,7 +12161,7 @@ snapshots: unplugin@3.3.0(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2): dependencies: '@jridgewell/remapping': 2.3.5 - picomatch: 4.0.5 + picomatch: 4.0.7 webpack-virtual-modules: 0.6.2 optionalDependencies: esbuild: 0.28.2 @@ -12200,7 +12191,7 @@ snapshots: graceful-fs: 4.2.11 node-int64: 0.4.0 - update-browserslist-db@1.3.1(browserslist@4.28.8): + update-browserslist-db@1.3.2(browserslist@4.28.8): dependencies: browserslist: 4.28.8 escalade: 3.2.0 @@ -12407,14 +12398,14 @@ snapshots: optionalDependencies: vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' - vitest-browser-react@2.2.0(@types/react-dom@19.2.4(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11): + vitest-browser-react@2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11): dependencies: react: 19.2.8 react-dom: 19.2.8(react@19.2.8) vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) optionalDependencies: '@types/react': 19.2.18 - '@types/react-dom': 19.2.4(@types/react@19.2.18) + '@types/react-dom': 19.2.5(@types/react@19.2.18) vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)): dependencies: @@ -12430,7 +12421,7 @@ snapshots: magic-string: 0.30.21 obug: 2.1.4 pathe: 2.0.3 - picomatch: 4.0.5 + picomatch: 4.0.7 std-env: 4.2.0 tinybench: 2.9.0 tinyexec: 1.3.0 @@ -12459,7 +12450,7 @@ snapshots: magic-string: 0.30.21 obug: 2.1.4 pathe: 2.0.3 - picomatch: 4.0.5 + picomatch: 4.0.7 std-env: 4.2.0 tinybench: 2.9.0 tinyexec: 1.3.0 @@ -12615,24 +12606,24 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - workerd@1.20260820.1: + workerd@1.20260826.1: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20260820.1 - '@cloudflare/workerd-darwin-arm64': 1.20260820.1 - '@cloudflare/workerd-linux-64': 1.20260820.1 - '@cloudflare/workerd-linux-arm64': 1.20260820.1 - '@cloudflare/workerd-windows-64': 1.20260820.1 + '@cloudflare/workerd-darwin-64': 1.20260826.1 + '@cloudflare/workerd-darwin-arm64': 1.20260826.1 + '@cloudflare/workerd-linux-64': 1.20260826.1 + '@cloudflare/workerd-linux-arm64': 1.20260826.1 + '@cloudflare/workerd-windows-64': 1.20260826.1 - wrangler@4.125.0(@types/node@24.13.3): + wrangler@4.127.0(@types/node@24.13.3): dependencies: '@cloudflare/kv-asset-handler': 0.5.0 - '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260820.1) + '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260826.1) blake3-wasm: 2.1.5 esbuild: 0.28.1 - miniflare: 5.20260820.0-alpha(@types/node@24.13.3) + miniflare: 5.20260826.0-alpha(@types/node@24.13.3) path-to-regexp: 6.3.0 unenv: 2.0.0-rc.24 - workerd: 1.20260820.1 + workerd: 1.20260826.1 optionalDependencies: fsevents: 2.3.3 transitivePeerDependencies: @@ -12656,6 +12647,8 @@ snapshots: ws@8.21.0: {} + ws@8.21.3: {} + xmlbuilder@15.1.1: {} xxhash-wasm@1.1.0: {} From 485c467072ed00c6514c327c630625af88b8dcdb Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:33:46 -0400 Subject: [PATCH 2/8] chore(deps): move @pierre/diffs to 1.3.6 stable The editor entry point moved from @pierre/diffs/editor to @pierre/diffs/edit, EditorProvider became EditProvider with a createEditor factory, and File's contentEditable prop became edit. The file editor pane keeps owning a single Editor instance and hands it back from the factory so undo history and the deferred StrictMode attach are unchanged. --- .../components/file-viewer/FileEditorPane.tsx | 15 ++- .../file-viewer/FileViewerPierre.browser.tsx | 40 +++--- apps/web/vite.config.ts | 2 +- pnpm-lock.yaml | 121 +++--------------- pnpm-workspace.yaml | 2 +- 5 files changed, 50 insertions(+), 130 deletions(-) diff --git a/apps/web/src/components/file-viewer/FileEditorPane.tsx b/apps/web/src/components/file-viewer/FileEditorPane.tsx index ae8136a2..c8632468 100644 --- a/apps/web/src/components/file-viewer/FileEditorPane.tsx +++ b/apps/web/src/components/file-viewer/FileEditorPane.tsx @@ -1,12 +1,13 @@ /** * Editable surface for the file viewer's edit mode. * - * Wraps a `contentEditable` pierre File in an `EditorProvider`. The attach is + * Wraps an `edit` pierre File in an `EditProvider` whose factory hands back + * the single Editor this pane owns. The attach is * deferred to a post-mount effect: attaching during mount is unsafe under * StrictMode (the doubled mount effect runs edit → cleanUp → edit and * pierre's re-attach render sync short-circuits on cached content, leaving * the editor without a document). The dep-change effect run that flips - * `contentEditable` on is not doubled, so the editor attaches exactly once — + * `edit` on is not doubled, so the editor attaches exactly once — * see FileViewerPierre.browser.tsx for the regression test. * * The pierre editor owns the document after mount: React never feeds edited @@ -17,8 +18,8 @@ */ import { useEffect, useMemo, useRef, useState } from "react"; import { useQueryClient } from "@tanstack/react-query"; -import { Editor } from "@pierre/diffs/editor"; -import { EditorProvider, File as PierreFile } from "@pierre/diffs/react"; +import { Editor } from "@pierre/diffs/edit"; +import { EditProvider, File as PierreFile } from "@pierre/diffs/react"; import { useFileViewerStore, type FileViewerContext } from "../../fileViewerStore"; import { useTheme } from "../../hooks/useTheme"; @@ -134,7 +135,7 @@ export function FileEditorPane({ ); return ( - + editor}> - + ); } diff --git a/apps/web/src/components/file-viewer/FileViewerPierre.browser.tsx b/apps/web/src/components/file-viewer/FileViewerPierre.browser.tsx index 400b68c3..05ac6154 100644 --- a/apps/web/src/components/file-viewer/FileViewerPierre.browser.tsx +++ b/apps/web/src/components/file-viewer/FileViewerPierre.browser.tsx @@ -6,8 +6,8 @@ import { userEvent } from "vite-plus/test/browser"; import { render } from "vitest-browser-react"; import type { SelectedLineRange } from "@pierre/diffs"; import { getFiletypeFromFileName, preloadHighlighter } from "@pierre/diffs"; -import { Editor } from "@pierre/diffs/editor"; -import { EditorProvider, File as PierreFile } from "@pierre/diffs/react"; +import { Editor } from "@pierre/diffs/edit"; +import { EditProvider, File as PierreFile } from "@pierre/diffs/react"; import { DIFF_PANEL_UNSAFE_CSS } from "../DiffPanel.styles"; import { DiffWorkerPoolProvider } from "../DiffWorkerPoolProvider"; @@ -218,7 +218,7 @@ describe("FileViewer pierre integration", () => { }); }); -// Mirrors the editable-file wiring (EditorProvider + contentEditable File) so +// Mirrors the editable-file wiring (EditProvider + edit File) so // editor attachment regressions surface here instead of in the app. function EditableHarness({ path, @@ -231,12 +231,12 @@ function EditableHarness({ }) { return ( - + editor}>
-
+
); } @@ -260,7 +260,7 @@ async function waitForEditorDocument(editor: Editor, timeoutMs = 25_0 const deadline = performance.now() + timeoutMs; const ready = () => { try { - return editor.getState().file != null; + return editor.getFile() != null; } catch { return false; } @@ -312,7 +312,7 @@ describe("FileViewer pierre editing", () => { screen.unmount(); }); - it("accepts typed input through the contentEditable surface", async () => { + it("accepts typed input through the editable surface", async () => { const changes: string[] = []; const editor = new Editor({ onChange: (file) => { @@ -355,11 +355,11 @@ describe("FileViewer pierre editing", () => { function WrapHarness({ wrap }: { wrap: boolean }) { return ( - + editor}>
{ }} />
-
+
); } @@ -386,12 +386,12 @@ describe("FileViewer pierre editing", () => { true, ); await settle(100); - expect(editor.getState().file.contents).toContain("const w = 7;"); + expect(editor.getText()).toContain("const w = 7;"); screen.rerender(); await settle(); - expect(editor.getState().file.contents).toContain("const w = 7;"); + expect(editor.getText()).toContain("const w = 7;"); expect(editor.canUndo).toBe(true); screen.unmount(); @@ -418,11 +418,11 @@ describe("FileViewer pierre editing", () => { await waitForEditorDocument(editor); const deadline = performance.now() + 15_000; - while (!editor.getState().file.contents.includes("start!") && performance.now() < deadline) { + while (!editor.getText().includes("start!") && performance.now() < deadline) { await settle(150); } - expect(editor.getState().file.contents).toContain("start!\nnext"); + expect(editor.getText()).toContain("start!\nnext"); expect(editor.getState().selections?.[0]).toMatchObject({ start: { line: 0, character: 6 }, end: { line: 0, character: 6 }, @@ -436,7 +436,7 @@ describe("FileViewer pierre editing", () => { // Attaching during mount is unsafe under StrictMode: the doubled mount // effect runs edit → cleanUp → edit, and pierre's re-attach render sync // short-circuits on cached content, leaving the editor without a - // document. Deferring `contentEditable` to a post-mount effect makes the + // document. Deferring `edit` to a post-mount effect makes the // attach a dep-change effect run, which StrictMode does not double. let editorRef: Editor | null = null; function DeferredEditableHarness({ path, contents }: { path: string; contents: string }) { @@ -448,16 +448,16 @@ describe("FileViewer pierre editing", () => { editorRef = editor; return ( - + editor}>
-
+
); } @@ -482,7 +482,7 @@ describe("FileViewer pierre editing", () => { true, ); await settle(100); - expect(editor.getState().file.contents).toContain("const s = 9;"); + expect(editor.getText()).toContain("const s = 9;"); screen.unmount(); }); diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 27bc6e21..80ec4f47 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -118,7 +118,7 @@ export default defineConfig({ optimizeDeps: { include: [ "@pierre/diffs", - "@pierre/diffs/editor", + "@pierre/diffs/edit", "@pierre/diffs/react", "@pierre/diffs/worker/worker.js", "effect/Array", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82edb0ce..220a3e3f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ catalogs: specifier: 1.0.11 version: 1.0.11 '@pierre/diffs': - specifier: 1.3.0-beta.9 - version: 1.3.0-beta.9 + specifier: 1.3.6 + version: 1.3.6 '@types/bun': specifier: ^1.4.0 version: 1.4.0 @@ -231,7 +231,7 @@ importers: version: 1.18.23 '@pierre/diffs': specifier: 'catalog:' - version: 1.3.0-beta.9(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + version: 1.3.6(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) effect: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) @@ -313,7 +313,7 @@ importers: version: 0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31) '@pierre/diffs': specifier: 'catalog:' - version: 1.3.0-beta.9(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) + version: 1.3.6(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@tanstack/react-pacer': specifier: ^0.23.0 version: 0.23.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -2638,20 +2638,20 @@ packages: resolution: {integrity: sha512-ODOov0sGMJMf3jPonOkgGqPknTsu+DdQ7kD++gz8aI+aFMOMHFbWAA2taqXXVTdP+OTOQR/znGvSpmkeI0WTYQ==} engines: {node: '>=14.18.0'} - '@pierre/diffs@1.3.0-beta.9': - resolution: {integrity: sha512-XoSLsyHA9UjNb/5UGQoKN1Bqma+ecHHaaM2T2edYdeJ67iS27qivWNoKq+uWjKhRzZEB4JQQRzlXxKy79UvY9A==} + '@pierre/diffs@1.3.6': + resolution: {integrity: sha512-a3woaW2QHy78JDxPJK0OJzwZUN4xoQLLIS/pceO8X6+L8gA5D682mP7/w3YxxEVRPXOaoe/p/RJ5Oj/3nrEzew==} peerDependencies: react: ^18.3.1 || ^19.0.0 react-dom: ^18.3.1 || ^19.0.0 - '@pierre/theme@1.1.0': - resolution: {integrity: sha512-GC2OWTAfTIIWWYhPCygwG8t2EtePQkRfON4MI2rwIkJylmiyqIttJID2dCL8sUD8cNdEvYkEyfEHHKMeCiDLoQ==} + '@pierre/theme@2.0.0': + resolution: {integrity: sha512-yNDd9GYLQl1mEUJR8AneJ5e4ohLIHQd/wZLWr4fagt78vS2RwwZNW530vVgHqXFAyFVcFlRmGUD5ramXH46OXw==} engines: {vscode: ^1.0.0} - '@pierre/theming@0.0.2': - resolution: {integrity: sha512-QM1M4stXfnzfaE8I8YbjXSApV8c+2dBsXJj8eYg9WTpBR/cTmCZIcfGnN4p13iRrYu2Br/R/OJfEL7uR8Qjctw==} + '@pierre/theming@1.0.1': + resolution: {integrity: sha512-WCI5Qd7iprDpISL9fBYOLe8RV53+b7mFNA3bPzl60/2CKCSrsKN8zEcep6Y3BAzvARlmca50zGjDodqPGiTUKA==} peerDependencies: - '@pierre/theme': ^1.1.0 + '@pierre/theme': ^1.1.0 || ^2.0.0 '@shikijs/themes': ^3.0.0 || ^4.0.0 react: ^18.3.1 || ^19.0.0 react-dom: ^18.3.1 || ^19.0.0 @@ -2795,50 +2795,26 @@ packages: '@shikijs/core@3.23.0': resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==} - '@shikijs/core@4.2.0': - resolution: {integrity: sha512-Hc87Ab1Ld/vEbZRCbwx344I5v+4RU8CVToUTRkqXL1+TjbuOp9U5Xa0M23V4GEWHxVn+yO5otb+HkQVm3ptWQQ==} - engines: {node: '>=20'} - '@shikijs/core@4.4.3': resolution: {integrity: sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==} engines: {node: '>=20'} - '@shikijs/engine-javascript@4.2.0': - resolution: {integrity: sha512-fjETeq1k5ffyXqRgS6+3hpvqseLalp1kjNfRbXpUgWR8FpZ1CmQfiNHovc5lncYjt/Vg5JK/WJEmLahjwMa0og==} - engines: {node: '>=20'} - '@shikijs/engine-javascript@4.4.3': resolution: {integrity: sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==} engines: {node: '>=20'} - '@shikijs/engine-oniguruma@4.2.0': - resolution: {integrity: sha512-hTorK1dffPkpbMUk6Z+828PgRo7d07HbnizoP0hNPFjhxMHctj0Px/qoHeGMYafc6ju+u9iMldN4JbVzNQM++g==} - engines: {node: '>=20'} - '@shikijs/engine-oniguruma@4.4.3': resolution: {integrity: sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==} engines: {node: '>=20'} - '@shikijs/langs@4.2.0': - resolution: {integrity: sha512-bwrVRlJ0wUhZxAbVdvBbv2TTC9yLsh4C/IO5Ofz0T8MQntgDvyVnkbjw9vi50r1kx7RCIJdnJnjZAwmAsXFLZQ==} - engines: {node: '>=20'} - '@shikijs/langs@4.4.3': resolution: {integrity: sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==} engines: {node: '>=20'} - '@shikijs/primitive@4.2.0': - resolution: {integrity: sha512-NOq+DtUkVBJtZMVXL5A0vI0Xk8nvDYaXetFHSJFlOqjDZIVhIPRYFdGkSoElDqNuegikcc3A76SNUa8dTqtAYA==} - engines: {node: '>=20'} - '@shikijs/primitive@4.4.3': resolution: {integrity: sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==} engines: {node: '>=20'} - '@shikijs/themes@4.2.0': - resolution: {integrity: sha512-RX8IHYeLv8Cu2W6ruc3RxUqWn0IYCqSrMBzi/uRGAmfyDNOnNO5BF/Px7o97n4XTpmFTo5GbRaazuOWj+2ak2w==} - engines: {node: '>=20'} - '@shikijs/themes@4.4.3': resolution: {integrity: sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==} engines: {node: '>=20'} @@ -2849,10 +2825,6 @@ packages: '@shikijs/types@3.23.0': resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} - '@shikijs/types@4.2.0': - resolution: {integrity: sha512-VT/MKtlpOhEPZloSH3Pb9WCZEBDoQVMa9jedp5UAwmJOar1DVc9DRODAxmYPW9M93IK4ryuqRejFfmlvlVDemw==} - engines: {node: '>=20'} - '@shikijs/types@4.4.3': resolution: {integrity: sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==} engines: {node: '>=20'} @@ -5647,10 +5619,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@4.2.0: - resolution: {integrity: sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ==} - engines: {node: '>=20'} - shiki@4.4.3: resolution: {integrity: sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==} engines: {node: '>=20'} @@ -8129,29 +8097,29 @@ snapshots: tslib: 2.8.1 webcrypto-core: 1.9.2 - '@pierre/diffs@1.3.0-beta.9(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': + '@pierre/diffs@1.3.6(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)': dependencies: - '@pierre/theme': 1.1.0 - '@pierre/theming': 0.0.2(@pierre/theme@1.1.0)(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(shiki@4.2.0) + '@pierre/theme': 2.0.0 + '@pierre/theming': 1.0.1(@pierre/theme@2.0.0)(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(shiki@4.4.3) '@shikijs/transformers': 3.23.0 diff: 9.0.0 hast-util-to-html: 9.0.5 lru_map: 0.4.1 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - shiki: 4.2.0 + shiki: 4.4.3 transitivePeerDependencies: - '@shikijs/themes' - '@pierre/theme@1.1.0': {} + '@pierre/theme@2.0.0': {} - '@pierre/theming@0.0.2(@pierre/theme@1.1.0)(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(shiki@4.2.0)': + '@pierre/theming@1.0.1(@pierre/theme@2.0.0)(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(shiki@4.4.3)': optionalDependencies: - '@pierre/theme': 1.1.0 + '@pierre/theme': 2.0.0 '@shikijs/themes': 4.4.3 react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - shiki: 4.2.0 + shiki: 4.4.3 '@polka/url@1.0.0-next.29': {} @@ -8236,14 +8204,6 @@ snapshots: '@types/hast': 3.0.5 hast-util-to-html: 9.0.5 - '@shikijs/core@4.2.0': - dependencies: - '@shikijs/primitive': 4.2.0 - '@shikijs/types': 4.2.0 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - hast-util-to-html: 9.0.5 - '@shikijs/core@4.4.3': dependencies: '@shikijs/primitive': 4.4.3 @@ -8252,52 +8212,27 @@ snapshots: '@types/hast': 3.0.5 hast-util-to-html: 9.0.5 - '@shikijs/engine-javascript@4.2.0': - dependencies: - '@shikijs/types': 4.2.0 - '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 4.3.6 - '@shikijs/engine-javascript@4.4.3': dependencies: '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.3.6 - '@shikijs/engine-oniguruma@4.2.0': - dependencies: - '@shikijs/types': 4.2.0 - '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/engine-oniguruma@4.4.3': dependencies: '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@4.2.0': - dependencies: - '@shikijs/types': 4.2.0 - '@shikijs/langs@4.4.3': dependencies: '@shikijs/types': 4.4.3 - '@shikijs/primitive@4.2.0': - dependencies: - '@shikijs/types': 4.2.0 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - '@shikijs/primitive@4.4.3': dependencies: '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 - '@shikijs/themes@4.2.0': - dependencies: - '@shikijs/types': 4.2.0 - '@shikijs/themes@4.4.3': dependencies: '@shikijs/types': 4.4.3 @@ -8312,11 +8247,6 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 - '@shikijs/types@4.2.0': - dependencies: - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - '@shikijs/types@4.4.3': dependencies: '@shikijs/vscode-textmate': 10.0.2 @@ -10146,7 +10076,7 @@ snapshots: hast-util-to-html@9.0.5: dependencies: - '@types/hast': 3.0.4 + '@types/hast': 3.0.5 '@types/unist': 3.0.3 ccount: 2.0.1 comma-separated-tokens: 2.0.3 @@ -11755,17 +11685,6 @@ snapshots: shebang-regex@3.0.0: {} - shiki@4.2.0: - dependencies: - '@shikijs/core': 4.2.0 - '@shikijs/engine-javascript': 4.2.0 - '@shikijs/engine-oniguruma': 4.2.0 - '@shikijs/langs': 4.2.0 - '@shikijs/themes': 4.2.0 - '@shikijs/types': 4.2.0 - '@shikijs/vscode-textmate': 10.0.2 - '@types/hast': 3.0.4 - shiki@4.4.3: dependencies: '@shikijs/core': 4.4.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8cc4de02..9030f20f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -16,7 +16,7 @@ catalog: "@effect/tsgo": 0.13.2 "@effect/vitest": 4.0.0-beta.97 "@github/copilot-sdk": 1.0.11 - "@pierre/diffs": 1.3.0-beta.9 + "@pierre/diffs": 1.3.6 "@types/bun": ^1.4.0 "@types/node": ^24.10.13 "@typescript/native-preview": 7.0.0-dev.20260707.2 From 1e5e7b9d6c657a65b1a63691c0fa345c9b8dacef Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:35:40 -0400 Subject: [PATCH 3/8] chore(deps): bump claude-agent-sdk to 0.3.247 and anthropic sdk to 0.121 --- pnpm-lock.yaml | 96 ++++++++++++++++++++++----------------------- pnpm-workspace.yaml | 4 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 220a3e3f..b746e5fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,11 +7,11 @@ settings: catalogs: default: '@anthropic-ai/claude-agent-sdk': - specifier: ^0.3.238 - version: 0.3.238 + specifier: ^0.3.247 + version: 0.3.247 '@anthropic-ai/sdk': - specifier: ^0.120.0 - version: 0.120.0 + specifier: ^0.121.0 + version: 0.121.0 '@effect/openapi-generator': specifier: 4.0.0-beta.98 version: 4.0.0-beta.98 @@ -210,10 +210,10 @@ importers: dependencies: '@anthropic-ai/claude-agent-sdk': specifier: 'catalog:' - version: 0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + version: 0.3.247(@anthropic-ai/sdk@0.121.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) '@anthropic-ai/sdk': specifier: 'catalog:' - version: 0.120.0(zod@4.4.3) + version: 0.121.0(zod@4.4.3) '@effect/platform-bun': specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=9fc1610289fc4eec0a69d930d8a359b7a4b1055920b831ba4bf91223be7a0e04)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)) @@ -661,10 +661,10 @@ importers: dependencies: '@anthropic-ai/claude-agent-sdk': specifier: 'catalog:' - version: 0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + version: 0.3.247(@anthropic-ai/sdk@0.121.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) '@anthropic-ai/sdk': specifier: 'catalog:' - version: 0.120.0(zod@4.4.3) + version: 0.121.0(zod@4.4.3) '@effect/platform-node': specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) @@ -702,56 +702,56 @@ importers: packages: - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.238': - resolution: {integrity: sha512-7KctNItTzHRiDg+jFxTM46o+Y/YS52V6HSopaWPggO6BbR+3MV/rKMmq+zP93If7eVwadW9Yg9vHLjXDKIw9OQ==} + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.247': + resolution: {integrity: sha512-vvCMAXy2KmiGHbJuThv+W6a+49qjofMR6S71FM8FTbkAAKg62cYcEyzVMVM3pNpBM5PtkMe8lRCqKnT9NUo6ng==} cpu: [arm64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.238': - resolution: {integrity: sha512-aDt8LXjWISwLzqeCBHxJC5AR1iVYlY5UYIm2VLztjI1U0PCb1BiH/IfyyjjizqRhhEwyQp9YAJeZZq8n/2vQEA==} + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.247': + resolution: {integrity: sha512-742ZXrdAxHvw+vzMFJMMvfbH8mWWCBajQH27BT+3fQU3Frjqu9gXKvA63dvQgxwjqO1gYU9TSy/A6PKq7zujaQ==} cpu: [x64] os: [darwin] - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.238': - resolution: {integrity: sha512-ankSEMAMTVulKYg0NT8fZ7a5+q+aIzfiqhcrLe9zYPeuhE+lpNeq0JPMcHyOtUAENxVI0/2J2q5OXGl9O0qWcg==} + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.247': + resolution: {integrity: sha512-8UNRQcSy9lpLhknXryid5cTfxHxBZft4oK5R0XIIZUXY/tXvsNP3+kVYAHQUNyc1J8IDa15sd19iKkMJMqFodA==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.238': - resolution: {integrity: sha512-P7V9TFokcNRdIJPUzDQ0GLBfMuoewWEH4rh6U3e7RaEAxzdeUcdS9P0N4arXqK2YAOtK1o93QSEtiGUF1fTfWw==} + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.247': + resolution: {integrity: sha512-5/3ZQ9vOwrLv6w0CFjdbaTxPFyabHNLAEojkeiYmKzqlZ/taXG58/kVKgjqgx2qQhjcHCzy9JXDw5kp3RKJoGw==} cpu: [arm64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.238': - resolution: {integrity: sha512-buo3IBSd7EmYcQsH+OKARgNNbSF1+l/+z1hDXSXGKzwD1LFioJZ/k9FWWWC166SoQ93jPmN+G/ksTzEUB3zRGQ==} + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.247': + resolution: {integrity: sha512-iMLjkVHbcxQ5WY2WwieOJK57kD4c8Cc2tpHwpEmdTDsnWLfmNt3XFuJdmeROwyra+tcVA52oHL0dWr51+V50Pg==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.238': - resolution: {integrity: sha512-/arAOSqtIAWDu7Z4Uf2Un3n+/5Zg3NpxZKzMQEDnYNkbJRhr44sM59TFaEOiWq1FqlUJKi6wHjgm+TW5B8DWWg==} + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.247': + resolution: {integrity: sha512-+tEIHgblLvBF+datSZb9WwnODXsFI7JxSFvm++oliH0eQO5zGDq0LD0hbY6h/A3nqODnBbIwVVBykwXMn68GPg==} cpu: [x64] os: [linux] - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.238': - resolution: {integrity: sha512-yW8lhV7QgYiNu3NatjgmkhUspgJsG2N2N6lmm/7B99sWFobKTbVLMLsXxj6A46R6qE2C4Zzm6PjxgGaMYOMn0g==} + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.247': + resolution: {integrity: sha512-Sni6U2xR55bUEJRv7Eikm6oC27IOn3rlVJZAzXRFCAgkf9+aBqq/dEUJiIcRT2xbXOIe5QdPGUmpnYfU1BsHMw==} cpu: [arm64] os: [win32] - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.238': - resolution: {integrity: sha512-6Fb2JRrBci282fBfhCGB0Tpq7N8V5HMMqsO3YGFkc9hhbn/y9G7glNKSNgRtxD5Ujjxj8rhiaYstXW2DJzanzw==} + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.247': + resolution: {integrity: sha512-yWfZo2ER3EIS/3pv6EX1M/VrZXu+zFzKhgWJjGgFSlcupbaCAxrVBRTdCyfv5UYBKWH9kl5HjgV2HhLHq67LSw==} cpu: [x64] os: [win32] - '@anthropic-ai/claude-agent-sdk@0.3.238': - resolution: {integrity: sha512-ppRfbAflZuV7HPqr8BkHPEk8c7gih3PK+GHnZq6zP0Uo7bJHXAJwc4Za8LJRm4hXMixBNMjK1cU/VWfQ9fE2sg==} + '@anthropic-ai/claude-agent-sdk@0.3.247': + resolution: {integrity: sha512-T9BDPloZxABkGREDRbWA7TVa9SLBMWI5GQXw39+XotQLCIX3McRic9OJdUnAdXa7sutwQ4nNrXwTSazN4IphjA==} engines: {node: '>=18.0.0'} peerDependencies: '@anthropic-ai/sdk': '>=0.93.0' '@modelcontextprotocol/sdk': ^1.29.0 zod: ^4.0.0 - '@anthropic-ai/sdk@0.120.0': - resolution: {integrity: sha512-ZlvmNFT/iIF6JD13rxbbMWD8nvGR0RaUp6yMQnoc+4Af0YjVVe/bIdW1XSQQsoxXAtg1NaT6Vak0LKFlJ4d37Q==} + '@anthropic-ai/sdk@0.121.0': + resolution: {integrity: sha512-WFzwcH8l49CZHv0vQ9QQT51VJ1/DLDQfNSs9awpGlnKBdaSnqtdZa+tw/3cxxosTPIgK8uw1GqsJ2dSbCBD1Lg==} hasBin: true peerDependencies: zod: ^3.25.0 || ^4.0.0 @@ -6466,46 +6466,46 @@ packages: snapshots: - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.238': + '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.238': + '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.247': optional: true - '@anthropic-ai/claude-agent-sdk@0.3.238(@anthropic-ai/sdk@0.120.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': + '@anthropic-ai/claude-agent-sdk@0.3.247(@anthropic-ai/sdk@0.121.0(zod@4.4.3))(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': dependencies: - '@anthropic-ai/sdk': 0.120.0(zod@4.4.3) + '@anthropic-ai/sdk': 0.121.0(zod@4.4.3) '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) zod: 4.4.3 optionalDependencies: - '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.238 - '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.238 - '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.238 - - '@anthropic-ai/sdk@0.120.0(zod@4.4.3)': + '@anthropic-ai/claude-agent-sdk-darwin-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-darwin-x64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-arm64-musl': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-x64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-linux-x64-musl': 0.3.247 + '@anthropic-ai/claude-agent-sdk-win32-arm64': 0.3.247 + '@anthropic-ai/claude-agent-sdk-win32-x64': 0.3.247 + + '@anthropic-ai/sdk@0.121.0(zod@4.4.3)': dependencies: json-schema-to-ts: 3.1.1 standardwebhooks: 1.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9030f20f..fba5cb6b 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,8 +5,8 @@ packages: - scripts catalog: - "@anthropic-ai/claude-agent-sdk": ^0.3.238 - "@anthropic-ai/sdk": ^0.120.0 + "@anthropic-ai/claude-agent-sdk": ^0.3.247 + "@anthropic-ai/sdk": ^0.121.0 "@effect/atom-react": 4.0.0-beta.98 "@effect/openapi-generator": 4.0.0-beta.98 "@effect/platform-bun": 4.0.0-beta.98 From b5d753cce2d6bf406e8d9e2a456aa6d6e51db633 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:38:47 -0400 Subject: [PATCH 4/8] chore(deps): upgrade lexical to 0.49 Regenerates the Chromium spellcheck patch (force the diffComposedText path in setTextContent) against 0.49's dist bundles; the fix is still not upstream. The composer uses only plain-text plugins, so none of the 0.47-0.49 changes apply. --- apps/web/package.json | 4 +- patches/lexical@0.47.0.patch | 46 ----- patches/lexical@0.49.0.patch | 46 +++++ pnpm-lock.yaml | 376 +++++++++++++++++------------------ pnpm-workspace.yaml | 2 +- 5 files changed, 237 insertions(+), 237 deletions(-) delete mode 100644 patches/lexical@0.47.0.patch create mode 100644 patches/lexical@0.49.0.patch diff --git a/apps/web/package.json b/apps/web/package.json index 2281f82e..6d8b26ef 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -21,7 +21,7 @@ "@fontsource-variable/cascadia-mono": "^5.3.0", "@fontsource-variable/schibsted-grotesk": "^5.3.0", "@legendapp/list": "^3.3.9", - "@lexical/react": "^0.47.0", + "@lexical/react": "^0.49.0", "@pierre/diffs": "catalog:", "@tanstack/react-pacer": "^0.23.0", "@tanstack/react-query": "^5.102.8", @@ -33,7 +33,7 @@ "@xterm/xterm": "^6.0.0", "class-variance-authority": "^0.7.1", "effect": "catalog:", - "lexical": "^0.47.0", + "lexical": "^0.49.0", "lucide-react": "^1.34.0", "react": "19.2.8", "react-dom": "19.2.8", diff --git a/patches/lexical@0.47.0.patch b/patches/lexical@0.47.0.patch deleted file mode 100644 index c02d608f..00000000 --- a/patches/lexical@0.47.0.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/dist/Lexical.dev.js b/dist/Lexical.dev.js -index 5b18799f5e167dde82f5737667748958ebff2fc1..f65ce01a1c6651ac318535c1b79b4b4afe186769 100644 ---- a/dist/Lexical.dev.js -+++ b/dist/Lexical.dev.js -@@ -7436,7 +7436,7 @@ function $setTextContent(nextText, dom, node) { - if (nodeValue === text) { - return; - } -- if (isComposing || IS_FIREFOX) { -+ if (true || isComposing || IS_FIREFOX) { - // We also use the diff composed text for general text in FF to avoid - // the spellcheck red line from flickering. - const [index, remove, insert] = diffComposedText(nodeValue, text); -diff --git a/dist/Lexical.dev.mjs b/dist/Lexical.dev.mjs -index 83ffb914705f1bb3ba635ad355f284272ed0470f..80f6892322bafa3ca91213ce2271da5d9171df54 100644 ---- a/dist/Lexical.dev.mjs -+++ b/dist/Lexical.dev.mjs -@@ -7434,7 +7434,7 @@ function $setTextContent(nextText, dom, node) { - if (nodeValue === text) { - return; - } -- if (isComposing || IS_FIREFOX) { -+ if (true || isComposing || IS_FIREFOX) { - // We also use the diff composed text for general text in FF to avoid - // the spellcheck red line from flickering. - const [index, remove, insert] = diffComposedText(nodeValue, text); -diff --git a/dist/Lexical.prod.js b/dist/Lexical.prod.js -index 99454d2a8caededb75966629bc00fe5f1309823e..fdd32cd925f06c3d94f682e67764e1ca72ab5a70 100644 ---- a/dist/Lexical.prod.js -+++ b/dist/Lexical.prod.js -@@ -7,4 +7,4 @@ - */ - - "use strict";function t(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);n.search=o.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=n&&"documentMode"in document?document.documentMode:null,r=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),s=n&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),i=!(!n||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),l=n&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=n&&/Android/.test(navigator.userAgent),a=n&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,u=n&&/^(?=.*Chrome).*/i.test(navigator.userAgent),f=n&&c&&u,d=n&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&r&&!u,h=0,g=1,_=2,p=128,m=1,y=2,x=3,C=4,S=5,T=6,N=a||l||d?"\xa0":"\u200b",v="\n\n",k=s?"\xa0":N,E="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",O="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",b=new RegExp("^[^"+O+"]*["+E+"]"),M=new RegExp("^[^"+E+"]*["+O+"]"),A={bold:1,capitalize:1024,code:16,highlight:p,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},w={directionless:1,unmergeable:2},D={center:2,end:6,justify:4,left:1,right:3,start:5},I={[y]:"center",[T]:"end",[C]:"justify",[m]:"left",[x]:"right",[S]:"start"},P={normal:0,segmented:2,token:1},F={[h]:"normal",[_]:"segmented",[g]:"token"},R="$config";function L(){return Ol()._blockCursorElement}function K(t){return null!==t&&1===t.nodeType&&t.hasAttribute("data-lexical-slot")}class B{element;before;after;constructor(t,e,n){this.element=t,this.before=e||null,this.after=n||null}withBefore(t){return new B(this.element,t,this.after)}withAfter(t){return new B(this.element,this.before,t)}withElement(t){return this.element===t?this:new B(t,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return null!==n&&n.parentElement!==this.element&&t(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&t(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&t(359),this.element.replaceChild(e,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;return e===this.getInsertionAnchor()?null:e}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,e,n){if(this.element===t)return e===t&&0===n?"before":"after";const o=z(t,this.element);if(null===o)return"after";const r=Array.prototype.indexOf.call(t.childNodes,o);if(r<0)return"after";if(e===t)return n<=r?"before":"after";const s=z(t,e);if(null===s)return"after";const i=Array.prototype.indexOf.call(t.childNodes,s);return i>=0&&i<=r?"before":"after"}getInsertionAnchor(){return this.before}}function z(t,e){let n=e;for(;null!==n&&n.parentNode!==t;)n=n.parentNode;return n}class $ extends B{withBefore(t){return new $(this.element,t,this.after)}withAfter(t){return new $(this.element,this.before,t)}withElement(t){return this.element===t?this:new $(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;for(;K(e);)t=e,e=e.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return null!==n&&n===L()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,null===t)this.removeManagedLineBreak();else{const e="decorator"===t&&(d||l||a);this.insertManagedLineBreak(e)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,n="IMG"===t.nodeName?t.nextSibling:null;n&&e.removeChild(n),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===("IMG"===e.nodeName))return;this.removeManagedLineBreak()}const n=this.element,o=this.before,r=al().createElement("br");if(r.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(r,o),t){const t=al().createElement("img");t.setAttribute("data-lexical-managed-linebreak","true"),t.style.setProperty("display","inline","important"),t.style.setProperty("border","0px","important"),t.style.setProperty("margin","0px","important"),t.alt="",n.insertBefore(t,r),n.__lexicalLineBreak=t}else n.__lexicalLineBreak=r}getFirstChildOffset(){const t=this.getFirstChild(),e=this.getInsertionAnchor();let n=0;for(let o=this.element.firstChild;null!==o&&o!==t&&o!==e;o=o.nextSibling)n++;return n}resolveChildIndex(t,e,n,o){if(n===this.element){const e=this.getFirstChildOffset(),n=L(),r=this.element.childNodes,s=Math.min(o,r.length);let i=0;for(let t=e;tn){i+=1;break}}return[t.getParentOrThrow(),i]}}function W(e,n){const o=[];let r=n;for(;r!==e&&null!==r;r=r.parentNode){let t=0;for(let e=r.previousSibling;null!==e;e=e.previousSibling)t++;o.push(t)}return r!==e&&t(225),o.reverse()}let U;try{U="0.47.0+prod.cjs"}catch(t){}const H=U??'"+source"';class j{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const e of this._back)t.push(e);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}const Y=null;function J(t,e=1e3){return t instanceof G?t.clone():t.sizethis._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const t=new Map(this._old);for(const[e,n]of this._nursery)n!==Y?t.set(e,n):t.delete(e);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(t,e){const n=this.getWithTombstone(t);if(n===e)return this;const o=this.getNursery();return n!==Y&&void 0!==n||(this._size++,n===Y&&o.delete(t)),o.set(t,e),this}delete(t){const e=this.has(t);return e&&(this.getNursery().set(t,Y),this._size--),e}getOrInsert(t,e){const n=this.get(t);return void 0!==n?n:(this.set(t,e),e)}getOrInsertComputed(t,e){const n=this.get(t);if(void 0!==n)return n;const o=e(t);return this.set(t,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,e=this._old;if(e)for(const n of e){const e=n[0],o=t?t.get(e):void 0;o!==Y&&(void 0!==o&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===Y||e&&e.has(n[0])||(yield n)}forEach(t,e){void 0!==e&&(t=t.bind(e));for(const[e,n]of this.entries())t(n,e,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function V(t,e,n,o,r,s){if(cs(t)){let i=t.getFirstChild();for(;null!==i;){const t=i.__key;i.__parent===e&&((cs(i)||Xl(i)&&null!==i.__slots)&&V(i,t,n,o,r,s),n.has(t)||s.delete(t),r.push(t)),i=i.getNextSibling()}}for(const i of Xl(t)&&null!==t.__slots?t.__slots.values():[]){const t=o.get(i);void 0!==t&&Ql(t)&&t.__slotHost===e&&((cs(t)||Xl(t)&&null!==t.__slots)&&V(t,i,n,o,r,s),n.has(i)||s.delete(i),r.push(i))}}let q=!1,X=0;function Q(t){X=t.timeStamp}function Z(t,e,n){const o="BR"===t.nodeName,r=e.__lexicalLineBreak;return r&&(t===r||o&&t.previousSibling===r)||o&&void 0!==fi(t,n)}function tt(t,e,n){const o=nl(ji(n)),r=o&&dl(o,n._rootElement);let s=null,i=null;null!==r&&r.anchorNode===t&&(s=r.anchorOffset,i=r.focusOffset);const l=t.nodeValue;null!==l&&vi(e,l,s,i,!1)}function et(t,e,n){if(Uo(t)){const e=t.anchor.getNode();if(e.is(n)&&t.format!==e.getFormat())return!1}return Qs(e)&&n.isAttached()}function nt(t,e,n){for(let o=t;o&&!zl(o);o=Bi(o)){const t=fi(o,e);if(void 0!==t){const e=ci(t,n);if(e)return fs(e)||!xl(o)?void 0:[o,e]}}}function ot(t,e,n){q=!0;const o=performance.now()-X>100;try{ss(t,()=>{const r=_r()||function(t){return t.read("latest",()=>{const t=_r();return null!==t?t.clone():null})}(t),i=new Map,l=t._editorState,c=t._blockCursorElement;let a=!1,u="";for(let n=0;n0){let e=0;for(let r=0;r0)for(const[e,n]of i)n.reconcileObservedMutation(e,t);const f=n.takeRecords();if(f.length>0){for(let e=0;e{ot(t,e,n)})}const it="direct",lt="latest";class ct{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,e){this.key=t,this.parse=e.parse.bind(e),this.unparse=(e.unparse||pt).bind(e),this.isEqual=(e.isEqual||Object.is).bind(e),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=e.resetOnCopyNode||!1}}function at(t,e,n=lt){const o=(n===lt?t.getLatest():t).__state;return o?o.getValue(e):e.defaultValue}function ut(t){const e=new Map,n=new Set;for(const{ownNodeConfig:o}of Yl("function"==typeof t?t:t.replace))if(o&&o.stateConfigs)for(const t of o.stateConfigs){let o;"stateConfig"in t?(o=t.stateConfig,t.flat&&n.add(o.key)):o=t,e.set(o.key,o)}return{flatKeys:n,sharedConfigMap:e}}const ft=new Set(["__proto__","constructor","prototype"]);class dt{node;knownState;unknownState;sharedNodeState;size;constructor(t,e,n=void 0,o=new Map,r=void 0){this.node=t,this.sharedNodeState=e,this.unknownState=n,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,i=void 0!==r?r:function(t,e,n){let o=n.size;if(e)for(const r in e){const e=t.get(r);e&&n.has(e)||o++}return o}(s,n,o);this.size=i}getValue(t){const e=this.knownState.get(t);if(void 0!==e)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const e=this.unknownState[t.key];void 0!==e&&(n=t.parse(e)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[e,n]of this.knownState)e.isEqual(n,e.defaultValue)?delete t[e.key]:t[e.key]=e.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in t&&(e[n]=t[n],delete t[n]);return _t(t)&&(e.$=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:n}=this,o=new Map(this.knownState);return new dt(t,e,function(t,e,n){let o;if(n)for(const[r,s]of Object.entries(n)){if(ft.has(r))continue;const n=t.get(r);n?e.has(n)||e.set(n,n.parse(s)):(o=o||{},o[r]=s)}return o}(e.sharedConfigMap,o,n),o,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,e){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:o,unknownState:r}=this;o.has(t)||r&&n in r||(r&&(delete r[n],this.unknownState=_t(r)),this.size++),o.set(t,e)}updateFromUnknown(t,e){if(ft.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const t of e.keys())e.set(t,t.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[e,n]of Object.entries(t))this.updateFromUnknown(e,n)}}function ht(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new dt(e,gt(e));return e.__state=n,n}function gt(t){return t.__state?t.__state.sharedNodeState:$s(Ol(),t.getType()).sharedNodeState}function _t(t){if(t)for(const e in t)return t}function pt(t){return t}function mt(t,e,n){for(const[o,r]of e.knownState){if(t.has(o.key))continue;t.add(o.key);const e=n?n.getValue(o):o.defaultValue;if(e!==r&&!o.isEqual(e,r))return!0}return!1}function yt(t,e,n){const{unknownState:o}=e,r=n?n.unknownState:void 0;if(o)for(const[e,n]of Object.entries(o)){if(t.has(e))continue;t.add(e);if(n!==(r?r[e]:void 0))return!0}return!1}function xt(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function Ct(t,e){const n=t.__mode,o=t.__format,r=t.__style,s=e.__mode,i=e.__format,l=e.__style,c=t.__state,a=e.__state;return(null===n||n===s)&&(null===o||o===i)&&(null===r||r===l)&&(null===t.__state||c===a||function(t,e){if(t===e)return!0;const n=new Set;return!(t&&mt(n,t,e)||e&&mt(n,e,t)||t&&yt(n,t,e)||e&&yt(n,e,t))}(c,a))}function St(t,e){const n=t.mergeWithSibling(e),o=Hr()._normalizedNodes;return o.add(t.__key),o.add(e.__key),n}function Tt(t){let e,n,o=t;if(""!==o.__text||!o.isSimpleText()||o.isUnmergeable()){for(;null!==(e=o.getPreviousSibling())&&Do(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(""!==e.__text){if(Ct(e,o)){o=St(e,o);break}break}e.remove()}for(;null!==(n=o.getNextSibling())&&Do(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Ct(o,n)){o=St(o,n);break}break}n.remove()}}else o.remove()}function Nt(t){return vt(t.anchor),vt(t.focus),t}function vt(t){for(;"element"===t.type;){const e=t.getNode(),n=t.offset;let o,r;if(n===e.getChildrenSize()?(o=e.getChildAtIndex(n-1),r=!0):(o=e.getChildAtIndex(n),r=!1),Do(o)){t.set(o.__key,r?o.getTextContentSize():0,"text",!0);break}if(!cs(o))break;t.set(o.__key,r?o.getChildrenSize():0,"element",!0)}}const kt=Symbol.for("@lexical/CachedTextSize");function Et(e,n){return Ut.read(()=>{let o=0,r=e;for(let e=0;e0&&!o?t.classList.add(n):e<1&&o&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",0===e?"":`calc(${e} * var(--lexical-indent-base-value, ${te}))`)}function ne(t,e){const n=t.style;0===e?Zt(n,""):1===e?Zt(n,"left"):2===e?Zt(n,"center"):3===e?Zt(n,"right"):4===e?Zt(n,"justify"):5===e?Zt(n,"start"):6===e&&Zt(n,"end")}function oe(t,e){const n=function(t){const e=t.__dir;if(null!==e)return e;if(hs(t))return null;const n=t.getParent();return null===n||Vi(n)&&null===n.__dir?"auto":null}(e);null!==n?t.dir=n:t.removeAttribute("dir")}function re(t){const e=al().createElement("div");return e.setAttribute("data-lexical-slot",t),e.style.display="none",e}function se(t,e,n){e||"false"===t.contentEditable?$l(n,At):n.removeAttribute("contenteditable")}function ie(t,e,n){const o=Dt,r=Rt();Dt="";let s="";const i=fs(t);for(const[o,r]of n){const n=re(o);se(e,i,n),e.appendChild(n),Dt="";const l=Rt();fe(r,Ml(t,n,At)),Lt(l),ce(t,o,e,n),s+=Dt}return Lt(r),Dt=o,s}function le(t){return Xl(t)&&null!==t.__slots?t.__slots:ql}function ce(t,e,n,o){const r=Gt.$getSlotTargetElement(t,e,n,At);null!==r&&(o.parentElement!==r&&r.appendChild(o),o.style.display="")}function ae(t){const e=jt.get(t);return void 0!==e?e.parentElement:null}function ue(t,e,n){const o=le(t),r=le(e);for(const[t,e]of o)if(!r.has(t)){const t=ae(e);Xt(e,null),null!==t&&t.remove()}const s=Dt,i=Rt();let l="",c=null;const a=fs(e);for(const[t,s]of r){const r=o.get(t);let i=void 0!==r?ae(r):null;Dt="";const u=Rt();if(null===i){i=re(t);let o=null;for(const t of n.children)if(!t.hasAttribute("data-lexical-slot")){o=t;break}n.insertBefore(i,o),fe(s,Ml(e,i,At))}else r===s?pe(s,i):(void 0!==r&&Xt(r,i),fe(s,Ml(e,i,At)));if(Lt(u),se(n,a,i),ce(e,t,n,i),l+=Dt,i.parentElement===n){const t=null===c?n.firstChild:c.nextSibling;t!==i&&n.insertBefore(i,t),c=i}}return Lt(i),Dt=s,l}function fe(e,n){const o=Ht.get(e);if(void 0===o&&t(60),null!==n){const t=Wt.get(e);if(void 0!==t){const r=jt.get(e);if(void 0!==r){const s=Ql(t)?t.__slotHost:null,i=Ql(o)?o.__slotHost:null,l=t.__parent!==o.__parent||s!==i,c=null!==i&&r.parentElement!==n.element;if(l||c)return n.insertChild(r),pe(e,n.element)}}}const r=Gt.$createDOM(o,At);if(function(t,e,n){const o=n._keyToDOMMap;ui(e,n,t),o.set(t,e)}(e,r,At),Do(o)?r.setAttribute("data-lexical-text","true"):fs(o)&&(r.setAttribute("data-lexical-decorator","true"),Bl(r,{captureSelection:!0})),cs(o)){const t=o.__indent,e=o.__size;oe(r,o),0!==t&&ee(r,t);const n=le(o),s=n.size>0?ie(o,r,n):"";if(0===e)r.__lexicalTextContent=s,r.__lexicalFirstTextKey=null,Dt+=s,n.size>0&&(r.__lexicalSlotTextLength=s.length);else{const t=Dt,i=e-1;if(de(Gl(o,Ht),o,0,i,Ml(o,r,At)),""!==s){const e=r.__lexicalTextContent||"";r.__lexicalTextContent=s+e,Dt=t+s+e}n.size>0&&(r.__lexicalSlotTextLength=s.length)}const i=o.__format;0!==i&&ne(r,i),o.isInline()||he(null,o,r)}else{const t=o.getTextContent();if(fs(o)){const t=o.decorate(At,Mt);null!==t&&me(e,t),r.contentEditable="false";const n=le(o);n.size>0&&ie(o,r,n)}Dt+=t}return null!==n&&n.insertChild(r),Gt.$decorateDOM(o,null,r,At),Ot(o),Ii(Jt,wt,Bt,o,"created"),r}function de(e,n,o,r,s){const i=Dt,l=Rt();Dt="",It=null,Pt=null,Ft=null;let c=o;for(;c<=r;++c){const t=Rt();fe(e[c],s);const n=Ht.get(e[c]);null!==n&&Do(n)?null===It&&(It=n.getFormat(),Pt=n.getStyle(),Ft=n.__key):cs(n)&&c0?null:"empty"}return null}(e,Ht);r!==s&&o.setManagedLineBreak(s)}function ge(e,n,o){var r;It=null,Pt=null,Ft=null,function(e,n,o){const r=Dt,s=e.__size,i=n.__size;Dt="";const l=o.element,c=At._keyToDOMMap.get(n.__key);void 0===c&&t(351,n.__key);const a=i-s;if(!Vt&&Math.abs(a)<=1&&s>=bt&&e.__first===n.__first&&(0!==a||!At._cloneNotNeeded.has(e.__key))){const s=c.__lexicalTextContent,u=Yt.get(e.__key);if(!Vt&&"string"==typeof s&&void 0!==u){const i=function(t,e){const n=e.size;if(0===n||n>=t.__size)return null;let o=t.__last,r=null,s=0;for(;null!==o&&s0?s.slice(h):s,_=g.slice(0,g.length-e)+d;return c.__lexicalTextContent=_,Dt=r+_,void _e(n,c,u)}if(function(e,n,o,r,s,i,l,c){if(1!==c&&-1!==c)return!1;const a=1===c?2:1;if(l!==a)return!1;const u=l-c;let f=e.__last;for(let t=0;t0?s.slice(k):s;return r.__lexicalTextContent=E.slice(0,E.length-T)+N,!0}(e,0,o,c,s,i,f,a)){const e=c.__lexicalTextContent;return"string"!=typeof e&&t(353),Dt=r+e,void _e(n,c,u)}}}if(0===a){let n=e.__first,o=0;for(;null!==n;){const e=Ht.get(n);if(void 0===e)break;const r=Vt||$t.has(n)||zt.has(n),s=Rt();if(r)pe(n,l);else{let o,r;if(cs(e)){r=jt.get(n);const s=r&&r.__lexicalTextContent;"string"!=typeof s&&t(354,e.getType()),o=s}else o=e.getTextContent();Dt+=o,void 0!==r&&Kt(r)}Do(e)?null===It&&(It=e.getFormat(),Pt=e.getStyle(),Ft=e.__key):cs(e)&&oi,g=d>l;if(h&&!g){const e=n[l+1],o=void 0===e?null:At.getElementByKey(e);de(n,t,d,l,s.withBefore(o??s.before))}else g&&!h&&Qt(e,f,i,s.element)}(n,r,c,s,i,o)}c.__lexicalTextContent=Dt,c.__lexicalFirstTextKey=Ft,Dt=r+Dt}(e,n,Ml(n,o,At)),Vi(n)||(r=n,null==It||It===r.__textFormat||qt||r.setTextFormat(It),function(t){null==Pt||Pt===t.__textStyle||qt||t.setTextStyle(Pt)}(n))}function _e(t,e,n){const o=e.__lexicalFirstTextKey;if(null!=o){const e=t.__key;let r=o;for(;null!==r;){const t=Ht.get(r);if(void 0===t){r=null;break}if(t.__parent===e)break;r=t.__parent}if(null!==r&&!n.has(r)){const t=Ht.get(o);if(Do(t))return It=t.getFormat(),void(Pt=t.getStyle())}}e.__lexicalFirstTextKey=Ft}function pe(e,n){const o=Wt.get(e);let r=Ht.get(e);void 0!==o&&void 0!==r||t(61);const s=Vt||$t.has(e)||zt.has(e),i=Ki(At,e);if(o===r&&!s){let e;if(cs(o)){const n=i.__lexicalTextContent;"string"!=typeof n&&t(355,o.getType()),e=n,Kt(i)}else e=o.getTextContent();return Dt+=e,i}if(o!==r&&s&&Ii(Jt,wt,Bt,r,"updated"),Gt.$updateDOM(r,o,i,At)){const o=fe(e,null);return null===n&&t(62),n.replaceChild(o,i),Xt(e,null),o}if(cs(o)){cs(r)||t(334,e);const n=r.__indent;(Vt||n!==o.__indent)&&ee(i,n);const l=r.__format;(Vt||l!==o.__format)&&ne(i,l);const c=s&&(le(r).size>0||le(o).size>0)?ue(o,r,i):"";if(s){const t=Dt;if(ge(o,r,i),hs(r)||r.isInline()||he(0,r,i),""!==c){const e=i.__lexicalTextContent||"";i.__lexicalTextContent=c+e,Dt=t+c+e,i.__lexicalSlotTextLength=c.length}else(le(r).size>0||le(o).size>0)&&(i.__lexicalSlotTextLength=0)}else{const e=i.__lexicalTextContent;"string"!=typeof e&&t(356,o.getType()),Dt+=e,Kt(i)}if((Vt||r.__dir!==o.__dir||r.__parent!==o.__parent)&&(oe(i,r),hs(r)&&!Vt))for(const t of r.getChildren())if(cs(t)){oe(Ki(At,t.getKey()),t)}}else{const t=r.getTextContent();if(fs(r)){const t=r.decorate(At,Mt);null!==t&&me(e,t),s&&(le(r).size>0||le(o).size>0)&&ue(o,r,i)}Dt+=t}if(!qt&&hs(r)){const t=r.getLatest();if(t.__cachedText!==Dt){const e=t.getWritable();e.__cachedText=Dt,r=e}}return Gt.$decorateDOM(r,o,i,At),Ot(r),i}function me(t,e){let n=At._pendingDecorators;const o=At._decorators;if(null===n){if(o[t]===e)return;n=hi(At)}n[t]=e}function ye(t){let e=t.nextSibling;return null!==e&&e===At._blockCursorElement&&(e=e.nextSibling),e}function xe(t,e){const n=new Set;for(let o=e;o{for(const n of e){const e=Ht.get(n);if(void 0===e)continue;const o=e.__parent;if(null===o)continue;let r=t.get(o);void 0===r&&(r=new Set,t.set(o,r)),r.add(n)}};return e(zt.keys()),e($t),t}();const i=new Map;return Jt=i,pe("root",null),At=void 0,wt=void 0,zt=void 0,$t=void 0,Wt=void 0,Ut=void 0,Ht=void 0,Mt=void 0,jt=void 0,Yt=void 0,Jt=void 0,Gt=Ps,i}function Se(e){const n=jt.get(e);return void 0===n&&t(75,e),n} --/*@__INLINE__*/function Te(t){return{type:t}}const Ne=/* @__PURE__ */Te("SELECTION_CHANGE_COMMAND"),ve=/* @__PURE__ */Te("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),ke=/* @__PURE__ */Te("CLICK_COMMAND"),Ee=/* @__PURE__ */Te("BEFORE_INPUT_COMMAND"),Oe=/* @__PURE__ */Te("INPUT_COMMAND"),be=/* @__PURE__ */Te("COMPOSITION_START_COMMAND"),Me=/* @__PURE__ */Te("COMPOSITION_END_COMMAND"),Ae=/* @__PURE__ */Te("DELETE_CHARACTER_COMMAND"),we=/* @__PURE__ */Te("INSERT_LINE_BREAK_COMMAND"),De=/* @__PURE__ */Te("INSERT_PARAGRAPH_COMMAND"),Ie=/* @__PURE__ */Te("CONTROLLED_TEXT_INSERTION_COMMAND"),Pe=/* @__PURE__ */Te("PASTE_COMMAND"),Fe=/* @__PURE__ */Te("REMOVE_TEXT_COMMAND"),Re=/* @__PURE__ */Te("DELETE_WORD_COMMAND"),Le=/* @__PURE__ */Te("DELETE_LINE_COMMAND"),Ke=/* @__PURE__ */Te("FORMAT_TEXT_COMMAND"),Be=/* @__PURE__ */Te("SET_TEXT_FORMAT_COMMAND"),ze=/* @__PURE__ */Te("UNDO_COMMAND"),$e=/* @__PURE__ */Te("REDO_COMMAND"),We=/* @__PURE__ */Te("KEYDOWN_COMMAND"),Ue=/* @__PURE__ */Te("KEY_ARROW_RIGHT_COMMAND"),He=/* @__PURE__ */Te("MOVE_TO_END"),je=/* @__PURE__ */Te("KEY_ARROW_LEFT_COMMAND"),Ye=/* @__PURE__ */Te("MOVE_TO_START"),Je=/* @__PURE__ */Te("KEY_ARROW_UP_COMMAND"),Ge=/* @__PURE__ */Te("KEY_ARROW_DOWN_COMMAND"),Ve=/* @__PURE__ */Te("KEY_ENTER_COMMAND"),qe=/* @__PURE__ */Te("KEY_SPACE_COMMAND"),Xe=/* @__PURE__ */Te("KEY_BACKSPACE_COMMAND"),Qe=/* @__PURE__ */Te("KEY_ESCAPE_COMMAND"),Ze=/* @__PURE__ */Te("KEY_DELETE_COMMAND"),tn=/* @__PURE__ */Te("KEY_TAB_COMMAND"),en=/* @__PURE__ */Te("INSERT_TAB_COMMAND"),nn=/* @__PURE__ */Te("INDENT_CONTENT_COMMAND"),on=/* @__PURE__ */Te("OUTDENT_CONTENT_COMMAND"),rn=/* @__PURE__ */Te("DROP_COMMAND"),sn=/* @__PURE__ */Te("FORMAT_ELEMENT_COMMAND"),ln=/* @__PURE__ */Te("DRAGSTART_COMMAND"),cn=/* @__PURE__ */Te("DRAGOVER_COMMAND"),an=/* @__PURE__ */Te("DRAGEND_COMMAND"),un=/* @__PURE__ */Te("COPY_COMMAND"),fn=/* @__PURE__ */Te("CUT_COMMAND"),dn=/* @__PURE__ */Te("SELECT_ALL_COMMAND"),hn=/* @__PURE__ */Te("CLEAR_EDITOR_COMMAND"),gn=/* @__PURE__ */Te("CLEAR_HISTORY_COMMAND"),_n=/* @__PURE__ */Te("CAN_REDO_COMMAND"),pn=/* @__PURE__ */Te("CAN_UNDO_COMMAND"),mn=/* @__PURE__ */Te("FOCUS_COMMAND"),yn=/* @__PURE__ */Te("BLUR_COMMAND"),xn=/* @__PURE__ */Te("KEY_MODIFIER_COMMAND");function Cn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const s=()=>{const t=e.get(n);t&&t.holders.delete(s)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(s),s}}}function Sn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Tn=Object.freeze({}),Nn=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Pn(n);if(e.isComposing())return;Li(e,We,t)}],["pointerdown",function(t,e){const n=yl(t),o=t.pointerType;Cl(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&ss(e,()=>{Wl(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Li(e,be,t)}],["compositionend",function(t,e){const n=e._inputState;s?n.compositionPhase="ending-firefox":l||!a&&!d?Li(e,Me,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Pn(n),ss(e,()=>{Rn(t,e)||e.dispatchCommand(Oe,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){ss(e,()=>{const n=_r(),o=nl(ji(e)),r=pr();if(o)if(Uo(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!hs(e)&&1===_i().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=dl(o,e._rootElement).anchorNode;if(xl(n)||Qs(n)){pi(gr(r,o,e,t))}}Li(e,ke,t)})}],["cut",Tn],["copy",Tn],["dragstart",Tn],["dragover",Tn],["dragend",Tn],["paste",Tn],["focus",Tn],["blur",Tn],["drop",Tn]];i&&Nn.push(["beforeinput",(t,e)=>function(t,e){const n=t.inputType;if("deleteCompositionText"===n||s&&Ri(e))return;if("insertCompositionText"===n)return;ss(e,()=>{Rn(t,e)||Li(e,Ee,t)},{event:t})}(t,e)]);const vn=new WeakMap,kn=new WeakMap,En=Cn(t=>(t.addEventListener("selectionchange",Yn),()=>t.removeEventListener("selectionchange",Yn)));function On(t,e,n,o,r,s){const l=t.anchor,c=t.focus,a=l.getNode(),u=Hr();let f;if(void 0!==s)f=s;else{const t=nl(ji(u));f=null!==t?dl(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Do(a)||(!r&&(!i||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!i)&&null!==g&&!a.isComposing()&&d!==wl(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=qs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Do(e)||cs(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function bn(t,e){return Qs(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Mn(e,n,o){const{anchorNode:r,anchorOffset:s,focusNode:i,focusOffset:l}=dl(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,bn(r,s)&&bn(i,l)&&!c.postDeleteSelectionToRestore)||ss(n,()=>{if(!o)return void pi(null);if(!Ys(n,r,i))return;let a=_r();if(c.postDeleteSelectionToRestore&&Uo(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),pi(a))}if(c.postDeleteSelectionToRestore=null,Uo(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===i&&(a.dirty=!0);const s=ji(n).event,l=s?s.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=_i(),m=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)An(a,f,d);else if("text"===o.type)Do(u)||t(141),wn(a,u);else if("element"===o.type&&!m){cs(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();An(t,n,o)}(a,e):An(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,i=a.isBackward(),c=i?l:s,u=i?s:l,f=i?e:t,d=i?t:e;let h=2047,g=!1;for(let t=0;tPn(t),0)}function Rn(t,e){const n=yl(t);if(xl(n)&&Wl(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=ml(o.ownerDocument);return null!==r&&o.contains(r)&&Wl(r,e)}function Ln(e){const n=e.inputType,o=Dn(e),r=Hr(),s=r._inputState,i=_r();if("insertText"===n&&e.data&&s.isInsertTextAfterHandledSelectionCommand){if(Pn(s),e.preventDefault(),Uo(i)&&!i.isCollapsed()){const t=i.isBackward()?i.anchor:i.focus;i.anchor.set(t.key,t.offset,t.type),i.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===i){const t=pr();if(!Uo(t))return!0;pi(t.clone())}if(Uo(i)){const n=i.anchor.key===i.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{ss(r,()=>{ii(null)})},30),Uo(i)){const e=i.anchor.getNode();e.markDirty(),Do(e)||t(142),wn(i,e)}}else{if(ii(null),l&&null!==o&&!o.collapsed&&(i.applyDOMRange(o),!i.isCollapsed()))return e.preventDefault(),i.removeText(),!0;e.preventDefault();const t=i.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===i.anchor.offset&&i.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&i.isCollapsed()&&(d=!fs(Fi(i.anchor,!0))),!d){Li(r,Ae,!0);const t=_r();f&&Uo(t)&&t.isCollapsed()&&(s.postDeleteSelectionToRestore=t,setTimeout(()=>s.postDeleteSelectionToRestore=null))}}return!0}}if(!Uo(i))return!0;const c=e.data;null!==s.unprocessedBeforeInputData&&Ni(!1,r,s.unprocessedBeforeInputData),i.dirty&&null===s.unprocessedBeforeInputData||!i.isCollapsed()||hs(i.anchor.getNode())||null===o||i.applyDOMRange(o),s.unprocessedBeforeInputData=null;const a=i.anchor,u=i.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Li(r,we,!1);else if(c===v)e.preventDefault(),Li(r,De,void 0);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(t)}else null!=c&&On(i,o,c,e.timeStamp,!0)?(e.preventDefault(),Li(r,Ie,c),In(c)):s.unprocessedBeforeInputData=c;return s.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Li(r,Ie,e);In((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=s.hadOrphanedCompositionEvents;s.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;ii(null),t||Li(r,Ie,e),$n(n);break}case"insertLineBreak":ii(null),Li(r,we,!1);break;case"insertParagraph":ii(null),s.isInsertLineBreak&&!l?(s.isInsertLineBreak=!1,Li(r,we,!1)):Li(r,De,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Li(r,Pe,e);break;case"deleteByComposition":(function(t,e){return t!==e||cs(t)||cs(e)||!qs(t)||!qs(e)})(d,h)&&Li(r,Fe,e);break;case"deleteByDrag":$i(lo),Li(r,Fe,e);break;case"deleteByCut":Li(r,Fe,e);break;case"deleteContent":Li(r,Ae,!1);break;case"deleteWordBackward":Li(r,Re,!0);break;case"deleteWordForward":Li(r,Re,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Li(r,Le,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Li(r,Le,!1);break;case"formatStrikeThrough":Li(r,Ke,"strikethrough");break;case"formatBold":Li(r,Ke,"bold");break;case"formatItalic":Li(r,Ke,"italic");break;case"formatUnderline":Li(r,Ke,"underline");break;case"historyUndo":Li(r,ze,void 0);break;case"historyRedo":Li(r,$e,void 0)}return!0}function Kn(t){const e=Hr(),n=e._inputState,o=_r(),r=t.data,l=Dn(t);let c=!1;if(null!=r&&Uo(o)){const a=nl(ji(e)),u=null!==a?dl(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Do(h)&&Xs(h);if(!d&&!g&&On(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=Wn(e,r);if(n.compositionPhase="idle",t)return $i(ao),mi(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;i&&!o.isCollapsed()&&Do(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===Ti(u.anchorNode)||Li(e,Ie,r);const _=r.length;s&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,ii(null))}}if(!c){Ni(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(Wn(e,r||void 0),$i(ao),n.compositionPhase="idle")}return mi(),!0}function Bn(t){const e=Hr(),n=e._inputState,o=_r();if(Uo(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,s=o.anchor.getNode();if(ii(r.key),$i(co),t.timeStamp{Wn(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return bi(t,"ArrowRight",{shiftKey:"any"})}(t))Li(e,Ue,t);else if(function(t){return bi(t,"ArrowRight",{...Mi,shiftKey:"any"})}(t))Li(e,He,t);else if(function(t){return bi(t,"ArrowLeft",{shiftKey:"any"})}(t))Li(e,je,t);else if(function(t){return bi(t,"ArrowLeft",{...Mi,shiftKey:"any"})}(t))Li(e,Ye,t);else if(function(t){return bi(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Li(e,Je,t);else if(function(t){return bi(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Li(e,Ge,t);else if(function(t){return bi(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Li(e,Ve,t);else if(function(t){return" "===t.key}(t))Li(e,qe,t);else if(function(t){return r&&bi(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Li(e,we,!0);else if(function(t){return bi(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Li(e,Ve,t);else if(function(t){return bi(t,"Backspace",{shiftKey:"any"})||r&&bi(t,"h",{ctrlKey:!0})}(t))wi(t)?Li(e,Xe,t)&&Fn(n):(t.preventDefault(),Li(e,Ae,!0));else if(function(t){return"Escape"===t.key}(t))Li(e,Qe,t);else if(function(t){return bi(t,"Delete",{})||r&&bi(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Li(e,Ae,!1)):Li(e,Ze,t);else if(function(t){return bi(t,"Backspace",Ai)}(t))t.preventDefault(),Li(e,Re,!0);else if(function(t){return bi(t,"Delete",Ai)}(t))t.preventDefault(),Li(e,Re,!1);else if(function(t){return r&&bi(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Li(e,Le,!0);else if(function(t){return r&&(bi(t,"Delete",{metaKey:!0})||bi(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Li(e,Le,!1);else if(function(t){return bi(t,"b",Mi)}(t))t.preventDefault(),Li(e,Ke,"bold");else if(function(t){return bi(t,"u",Mi)}(t))t.preventDefault(),Li(e,Ke,"underline");else if(function(t){return bi(t,"i",Mi)}(t))t.preventDefault(),Li(e,Ke,"italic");else if(function(t){return bi(t,"Tab",{shiftKey:"any"})}(t))Li(e,tn,t);else if(function(t){return bi(t,"z",Mi)}(t))t.preventDefault(),Li(e,ze,void 0);else if(function(t){if(r)return bi(t,"z",{metaKey:!0,shiftKey:!0});return bi(t,"y",{ctrlKey:!0})||bi(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Li(e,$e,void 0);else{const o=e._editorState._selection;!function(t){return bi(t,"a",Mi)}(t)?null===o||Uo(o)||(!function(t){return bi(t,"c",Mi)}(t)?function(t){return bi(t,"x",Mi)}(t)&&(t.preventDefault(),Li(e,fn,t)):(t.preventDefault(),Li(e,un,t))):(t.preventDefault(),Li(e,dn,t)&&Fn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(xn,t),!0}function Hn(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const jn=new Map;function Yn(t){const e=ol(t.target);if(null===e)return;const n=zi(t.target);let o=null,r=null;const s=null!==n?kn.get(n):void 0;if(null!==n){if(void 0!==s){const t=s.editors;let n=s.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&rl(e._rootElement.getRootNode())){n=!0;break}s.hasShadowEditor=n}if(n){let n=null,s=null;for(const i of t){const t=i._rootElement;if(null===t)continue;const l=dl(e,t).anchorNode;if(null!==l&&Gs(l)===i){if(rl(t.getRootNode())){o=i,r=l;break}null===n&&(n=i,s=l)}}null===o&&null!==n&&(o=n,r=s)}else{const t=e.anchorNode;null===t||xl(t)&&null!==t.shadowRoot||(o=Gs(t),null!==o&&(r=t))}}if(null===o){const t=ml(n);o=null!==t?Gs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==s)for(const t of s.editors)t._inputState.isSelectionChangeFromMouseDown=!1;ss(o,()=>{const n=pr(),s=r??dl(e,o._rootElement).anchorNode;if(xl(s)||Qs(s)){pi(gr(n,e,o,t))}})}const i=Ci(o),l=i[i.length-1],c=l._key,a=jn.get(c),u=a||l;u!==o&&Mn(e,u,!1),Mn(e,o,!0),o!==l?jn.set(c,o):a&&jn.delete(c)}function Jn(t){t._lexicalHandled=!0}function Gn(t){return!0===t._lexicalHandled}const Vn=()=>{};function qn(e){const n=vn.get(e);if(void 0===n)return void Vn();const o=kn.get(n);if(void 0===o)return void Vn();vn.delete(e);const r=Vs(e);Js(r)?(!function(t){if(null!==t._parentEditor){const e=Ci(t),n=e[e.length-1]._key;jn.get(n)===t&&jn.delete(n)}else jn.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const s=Hn(e);for(let t=0;tt.__key===this.__key);if(Do(this))return n;if(Uo(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(fs(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:ci(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Vi(n)||null!==Zl(e))return cs(e)||e===this&&fs(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:ci(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:ci(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=cs(this)?this:this.getParent(),n=cs(t)?t:t.getParent(),o=e&&n?qc(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=qc(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Jc(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Ui(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let s=this;for(;null!==s;){const i=s.__key;if(r.has(i)||(r.add(i),o.push(s)),s===e)break;const l=cs(s)?n?s.getFirstChild():s.getLastChild():null;if(null!==l){s=l;continue}const c=n?s.getNextSibling():s.getPreviousSibling();if(null!==c){s=c;continue}const a=s.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);s=u}return n||o.reverse(),o}isDirty(){const t=Hr()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(Zn(this))return this;const e=ci(this.__key);return null===e&&t(113),e}getWritable(){if(Zn(this))return this;$r();const t=Ur(),e=Hr(),n=t._nodeMap,o=this.__key,r=this.getLatest(),s=e._cloneNotNeeded,i=_r();if(null!==i&&i.setCachedNodes(null),s.has(o))return si(r),r;const l=Fl(r);return s.add(o),si(l),n.set(o,l),l}getTextContent(){return dc(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new B(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of gt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&ht(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){Xn(this,!0,t)}replace(e,n){$r();let o=_r();null!==o&&(o=o.clone()),Qi(this,e);const r=this.getLatest(),s=this.__key,i=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;oi(l),null!==u&&Uo(o)&&mr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(Xn(r,!1,!0),null===d)c.__first=i;else{d.getWritable().__next=i}if(l.__prev=g,null===h)c.__last=i;else{h.getWritable().__prev=i}l.__next=_,l.__parent=p,c.__size=a;let m=0;n&&(cs(this)&&cs(l)||t(139),m=l.getChildrenSize(),l.splice(m,0,this.getChildren()));const y=rc(this);if(y.length>0){Xl(this)&&Xl(l)||t(368,this.__key,l.__key);for(const t of y){const e=sc(this,t);null!==e&&(pc(this,t),_c(l,t,e))}}if(Uo(o)){pi(o);const t=o.anchor,e=o.focus;t.key===s&&(n&&"element"===t.type?t.set(l.__key,m+t.offset,"element"):zo(t,l)),e.key===s&&(n&&"element"===e.type?e.set(l.__key,m+e.offset,"element"):zo(e,l))}return li()===s&&ii(i),l}insertAfter(t,e=!0){$r(),Qi(this,t);const n=this.getWritable(),o=t.getWritable();mc(this.getParentOrThrow());const r=o.getParent(),s=_r();let i=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(Uo(s)){const t=r.__key,e=s.anchor,o=s.focus;i="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}oi(o),e&&Uo(s)&&mr(s,r,n,-1)}else oi(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&Uo(s)){const t=this.getIndexWithinParent();mr(s,a,t+1);const e=a.__key;i&&s.anchor.set(e,t+2,"element"),l&&s.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){$r(),Qi(this,t);const n=this.getWritable(),o=t.getWritable();mc(this.getParentOrThrow());const r=o.__key,s=_r(),i=o.getParent(),l=null!==i?o.getIndexWithinParent():-1;oi(o),null!==i&&e&&Uo(s)&&mr(s,i,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&Uo(s)){mr(s,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return bs()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){$r();const n=tc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(cs(o))return o.select();if(!Do(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){$r();const n=tc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(cs(o))return o.select(0,0);if(!Do(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function no(t){return t instanceof eo}const oo="history-merge",ro="collaboration",so="skip-scroll-into-view",io="skip-dom-selection",lo="skip-selection-focus",co="composition-start",ao="composition-end",uo="!important";function fo(t){const e={};if(!t)return e;let n="",o="",r=null,s=!1,i=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===uo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function go(t,e,n=""){if(e===n)return;const o=fo(n),r=fo(e);for(const e in r)delete o[e],ho(t,e,r[e]);for(const e in o)t.removeProperty(e)}function _o(t,e){return 16&e?"code":e&p?"mark":32&e?"sub":64&e?"sup":null}function po(t,e){return 1&e?"strong":2&e?"em":"span"}function mo(t,e,n,o,r){const s=o.classList;let i=Di(r,"base");void 0!==i&&s.add(...i),i=Di(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==i&&(8&n&&4&n?(l=!0,c||s.add(...i)):c&&s.remove(...i));for(const t in A){const o=A[t];if(i=Di(r,t),void 0!==i)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&s.remove(...i);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&s.add(...i)}else e&o&&s.remove(...i)}}function yo(t,e,n){const o=n.isComposing(),r=t+(o?N:""),i=Ol(),l=bl(i).$getDOMSlot(n,e,i),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(al().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(o||s){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,s=0;for(;r({conversion:Oo,priority:0}),b:()=>({conversion:vo,priority:0}),code:()=>({conversion:Ao,priority:0}),em:()=>({conversion:Ao,priority:0}),i:()=>({conversion:Ao,priority:0}),mark:()=>({conversion:Ao,priority:0}),s:()=>({conversion:Ao,priority:0}),span:()=>({conversion:No,priority:0}),strong:()=>({conversion:Ao,priority:0}),sub:()=>({conversion:Ao,priority:0}),sup:()=>({conversion:Ao,priority:0}),u:()=>({conversion:Ao,priority:0})}}static importJSON(t){return wo().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return xl(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Co(n,"b")),this.hasFormat("italic")&&(n=Co(n,"i")),this.hasFormat("strikethrough")&&(n=Co(n,"s")),this.hasFormat("underline")&&(n=Co(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?A[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?w[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=ei(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=P[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){$r();let n=t,o=e;const r=_r(),s=this.getTextContent(),i=this.__key;if("string"==typeof s){const t=s.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!Uo(r))return fr(i,n,i,o,"text","text");{const t=li();t!==r.anchor.key&&t!==r.focus.key||ii(i),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),s=r.__text,i=n.length;let l=t;l<0&&(l=i+l,l<0&&(l=0));const c=_r();if(o&&Uo(c)){const e=t+i;c.setTextNodeRange(r,e,r,e)}const a=s.slice(0,l)+n+s.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){$r();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=li(),s=n.length;t.sort((t,e)=>t-e),t.push(s);const i=[],l=t.length;for(let e=0,o=0;ee&&(i.push(n.slice(e,r)),e=r)}const c=i.length;if(1===c)return[e];const a=i[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,m=null;const y=_r();if(Uo(y)){const[t,e]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(m=e)}e.isSegmented()?(f=wo(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=xt(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=T&&(p.set(t.getKey(),C-T,"text"),C=T){m.set(t.getKey(),S-T,"text");break}T=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&si(e);null!==n&&si(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),Uo(y)&&mr(y,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,s=this.__text,i=s.length;li()===r&&ii(o);const l=_r();if(Uo(l)){const t=l.anchor,s=l.focus;null!==t&&t.key===r&&Cr(t,n,o,e,i),null!==s&&s.key===r&&Cr(s,n,o,e,i)}const c=e.__text,a=n?c+s:s+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function No(t){return{forChild:Io(t.style),node:null}}function vo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Io(e.style,n?void 0:"bold"),node:null}}const ko=new WeakMap;function Eo(t){if(!xl(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Oo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=ko.get(n))&&!Eo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=bo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:wo(o)}}function bo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,xl(n)){const t=n.style.display;if(""===t&&!Nl(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(Qs(n))return n;if("BR"===n.nodeName)return null}}const Mo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ao(t){const e=Mo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Io(t.style,e),node:null}}function wo(t=""){return Xi(new To(t))}function Do(t){return t instanceof To}function Io(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,s=o.includes("line-through"),i="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Do(t)||So(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),s&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),i&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Po extends To{static getType(){return"tab"}static clone(t){return new Po(t.__key)}constructor(t){super("\t",t),this.__detail=2}static importDOM(){return null}createDOM(t){const e=super.createDOM(t),n=Di(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}static importJSON(t){return Fo().updateFromJSON(t)}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fo(){return Xi(new Po)}function Ro(t){return t instanceof Po}class Lo{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!cs(e)){const t=e.getNextSibling();if(Do(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function zo(t,e){if(cs(e)){const n=e.getLastDescendant();cs(n)||Do(n)?Bo(t,n):Bo(t,e)}else Bo(t,e)}class $o{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!jo(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new $o(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===Zl(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Do(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===Zl(t));if((_r()||pr())===this&&t[0]){const e=Ic(t[0],"next");Zc(Hc(e,e))}for(const e of t)e.remove();Wo()}}function Wo(){const t=_i();if(t.isEmpty()){const e=bs();t.append(e),e.select()}}function Uo(t){return t instanceof Ho}class Ho{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!Uo(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,s=new Set;for(const n of t)if(Mc(n)){const{origin:t}=n;0===e.length?r.add(t):(s.add(t),e.push(t))}else{const{origin:t}=n;cs(t)&&s.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(bc(t.focus)&&cs(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=Lc(t.focus.origin,"previous");Mc(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Bc(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!cs(t)||s.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=ia(t.anchor),o=ia(t.anchor.getFlipped()),r=t=>Oc(t)?t.origin:t.getNodeAtCaret(),s=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(s)}return e}(aa(ea(this),"next"));return zr()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,s=o.isBefore(r),[i,l]=Vo(this);let c="",a=!0;for(let u=0;u=0;t--){const e=i[t];if(e.is(d)||cs(e)&&e.isParentOf(d))break;e.isAttached()&&(!g.has(e)||e.is(s)?p||m.insertAfter(e,!1):e.remove())}if(!p){let t=r,e=null;for(;null!==t;){const o=t.getChildren(),r=o.length;(0===r||o[r-1].is(e))&&(n.delete(t.__key),e=t),t=t.getParent()}}if(qs(d))if(c===h)d.select();else{const t=wo(e);t.select(),d.replace(t)}else d=d.spliceText(c,h-c,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let t=1;t(cs(t)||fs(t))&&!t.isInline())){cs(r)||t(211,o.constructor.name,o.getType());const n=Or(this);return r.splice(n,0,e),void s.selectEnd()}if(cs(r)&&null!==Zl(r)){const t=Or(this),n=Er(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Ar(e),n=t.getLastDescendant();let o=Xc(this.anchor,"next");for(const e of t.getChildren())o=ga(e,o);return void(null!==n&&n.selectEnd())}if(cs(r)&&!r.isParentRequired()&&!Vi(r.getParentOrThrow())){const t=Or(this),n=Er(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const i=Ar(e),l=i.getLastDescendant(),c=i.getChildren(),a=!cs(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=Jl(o,El));const u=c[c.length-1];let f=c[0];var d;cs(d=f)&&El(d)&&!d.isEmpty()&&cs(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(cs(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const s=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),s.push(r);let i=e;for(const t of s)i=i.insertAfter(t)}(r,f));const h=Jl(l,El);a&&cs(h)&&(a.canMergeWhenEmpty()||El(u))&&(h.append(...a.getChildren()),a.remove()),cs(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=cs(r)?r.getLastChild():null;Ts(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Vi(e)){const t=bs();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Or(this),o=Jl(this.anchor.getNode(),El);if(null!==o&&null!==Zl(o))return null;cs(o)||t(213);const r=o.getChildAtIndex(n),s=r?[r,...r.getNextSiblings()]:[],i=o.insertNewAfter(this,!1);return i?(i.append(...s),i.selectStart(),i):null}insertLineBreak(t){const e=Ss();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,s]=Vo(this),i=this.isBackward(),[l,c]=i?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=i?[s,r]:[r,s];if(0===e)return[];if(1===e){if(Do(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Do(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Do(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(wr(this,t,e,n))return;const o="move"===t,r=Hr(),s=nl(ji(r));if(!s)return;const i=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===i||!cs(c)||c.isInline()||c.canBeEmpty()||el(i,r,l);const a=Ki(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Do(c)?wl(c,a,r):null),this.dirty){const t=Ki(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Do(n)?wl(n,t,r):null}e&&u&&Sr(s,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Do(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Ic(c,e?"previous":"next").getNodeAtCaret();if(Do(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?wl(t,n,r):null;if(o){const t=e?o.length:0;Sr(s,o,t,o,t)}}}}}if(Qo(s,t,e?"backward":"forward",n),s.rangeCount>0){const t=ul(s,r._rootElement),n=t||s.getRangeAt(0),i=this.anchor.getNode(),l=hs(i)?i:Ji(i);if(this.applyDOMRange(n),this.dirty=!0,!o){Zo(this,e,l);(t?"backward"!==s.direction:s.anchorNode===n.startContainer&&s.anchorOffset===n.startOffset)||Xo(this)}}"lineboundary"===n&&wr(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&cs(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(cs(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=Wc(Xc(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Mc(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=ia(e);ta(this,Hc(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(bc(e)){if(cs(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(fs(e.origin)){if(e.origin.isIsolated());else if(rc(e.origin).length>0){if(cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=hr();t.add(e.origin.getKey()),pi(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=hr();t.add(e.origin.getKey()),pi(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(rc(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(ta(this,Hc(!e.origin.isEmpty()&&n.isEmpty()?na(Ic(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==Zl(t))return;if(cs(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(tr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&qo(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,s=o.getTextContentSize();if(o.is(n)||t&&e!==s||!t&&0!==e)return void nr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,s=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==s)return void nr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),s=o.getNode();if(r===s&&"text"===n.type&&"text"===o.type){const t=n.offset,s=o.offset,i=t0&&(g===h.getTextContentSize()||Xs(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;tei(t,e,o))}function Go(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Vo(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[Go(n),Go(o)]}function qo(t,e){for(let n=e;n;n=n.getParent()){if(cs(n)){if(n.collapseAtStart(t))return!0;if(Vi(n))break}if(n.getPreviousSibling())break}return!1}function Xo(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,s=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,s,!0)}function Qo(t,e,n,o){t.modify(e,n,o)}function Zo(t,e,n){const o=t.getNodes(),r=o.filter(t=>Ui(t,n));if(0===r.length||r.length===o.length)return!1;const s=e?r[0]:r[r.length-1],i=cs(s)?s:s.getParentOrThrow();return e?i.selectStart():i.selectEnd(),!0}function tr(t,e,n){if(wr(t,"extend",e,n))return;const o=Hr(),r=nl(ji(o));if(!r||"function"!=typeof r.modify)return;const s=o._blockCursorElement,i=o._rootElement,l=t.anchor,c=t.focus.getNode();null===i||null===s||!cs(c)||c.isInline()||c.canBeEmpty()||el(s,o,i);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Do(e)?wl(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Sr(r,_,p,_,p),Qo(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const m=ul(r,i)||r.getRangeAt(0),y=m.startContainer,x=m.startOffset;if(h&&"character"===n&&"text"===l.type&&Do(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Ic(u,e?"previous":"next").getNodeAtCaret();if(Do(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=y===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,T,N]=e?[y,x,f,d]:[f,d,y,x],v=hs(u)?u:Ji(u);t.applyDOMRange({collapsed:!1,endContainer:T,endOffset:N,startContainer:C,startOffset:S}),t.dirty=!0,!Zo(t,e,v)&&e&&Xo(t),"lineboundary"===n&&wr(t,"extend",e,n,"decorators")}const er=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function nr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),s=r.length;let i=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function or(e,n,o,r){let s,i=n,l=!1;if(xl(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;i===u&&u>0&&(c=!0,i=u-1),void 0!==fi(e,r)||Wl(e,r)||(l=!0);let d=a[i],h=!1;if(d===f)d=a[i+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&i--}}if(s=yi(d),Do(s))i=Fc(s,c?"next":"previous");else{let a=yi(e);if(null===a)return null;if(cs(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=Ml(a,l,r);[a,i]=u.resolveChildIndex(a,l,e,n),cs(a)||t(215),c&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(i);if(cs(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=cs(f)?f:f.getParentOrThrow()),i=0}Do(f)?(s=f,a=null,i=Fc(f,c?"next":"previous")):f!==a&&c&&!h&&(cs(a)||t(216),i=Math.min(a.getChildrenSize(),i+1))}else{const t=tc(a),o=null!==t?t:a,s=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&yi(e)===a){const t=Ml(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&fs(a)&&(c="before")}i="before"===c?s:s+1,a=o.getParentOrThrow()}if(cs(a))return[Ko(a.__key,i,"element"),l]}}else s=yi(e);return Do(s)?[Ko(s.__key,Fc(s,i,"clamp"),"text"),l]:null}function rr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),s=r.getParent();if(e){if((n||!e)&&null===o&&cs(s)&&s.isInline()){const e=s.getPreviousSibling();Do(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else cs(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Do(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&cs(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&cs(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const e=s.getNextSibling();Do(e)&&t.set(e.__key,0,"text")}}}function sr(t,e,n){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);rr(t,n,o),rr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}function ir(t){const e=ci(t.key);return null===e?null:nc(e)}function lr(t,e,n){const o=ir(t),r=ir(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const s=n(o,r);if(null!==o)return cs(o)?e.set(o.getKey(),s?o.getChildrenSize():0,"element"):e.set(o.getKey(),s?o.getTextContentSize():0,"text"),!0;const i=tc(r);if(null===i)return!1;const l=i.getParent();if(null===l)return!1;const c=i.getIndexWithinParent();return e.set(l.getKey(),s?c+1:c,"element"),!0}function cr(t){const e=lr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=tc(n),e=tc(o);if(null!==t&&t.is(e)){for(const e of oc(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=tc(n),o=ci(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=tc(o),s=ci(t.key);return null!==r&&null!==s&&!r.is(s)&&!r.isParentOf(s)&&s.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function ar(t,e,n,o,r,s){if(null===t||null===n||!Ys(r,t,n))return null;const i=or(t,e,Uo(s)?s.anchor:null,r);if(null===i)return null;const l=or(n,o,Uo(s)?s.focus:null,r);if(null===l)return null;const[c,a]=i,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=yi(t),o=yi(n);if(fs(e)&&fs(o))return null}const d=r._slotsUsed&&lr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return sr(c,u),[c,u,a||f||d]}function ur(t){return cs(t)&&!t.isInline()}function fr(t,e,n,o,r,s){const i=Ur(),l=new Ho(Ko(t,e,r),Ko(n,o,s),0,"");return l.dirty=!0,i._selection=l,l}function dr(){const t=Ko("root",0,"element"),e=Ko("root",0,"element");return new Ho(t,e,0,"")}function hr(){return new $o(new Set)}function gr(t,e,n,o){const r=n._window;if(null===r)return null;const s=o||r.event,i=s?s.type:void 0,l="selectionchange"===i,c=!q&&(l||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&s&&3===s.detail||"drop"===i||void 0===i);let a,u,f,d;if(Uo(t)&&!c)return t.clone();{if(null===e)return null;const o=dl(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===i)&&Uo(t)&&!Ys(n,a,u))return t.clone()}const h=ar(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let m=0,y="";if(Uo(t)){const e=t.anchor;if(g.key===e.key)m=t.format,y=t.style;else{const t=g.getNode();Do(t)?(m=t.getFormat(),y=t.getStyle()):cs(t)&&(m=t.getTextFormat(),y=t.getTextStyle())}}const x=new Ho(g,_,m,y);return p&&(x.dirty=!0),x}function _r(){return Ur()._selection}function pr(){return Hr()._editorState._selection}function mr(t,e,n,o=1){const r=t.anchor,s=t.focus,i=r.getNode(),l=s.getNode();if(!e.is(i)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,i=r?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(Do(i)){let t=0;r&&(t=i.getTextContentSize()),e.set(i.__key,t,"text"),o.set(i.__key,t,"text")}return}if(cs(s)){const t=s.getChildrenSize(),o=n>=t,r=o?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(Do(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(cs(i)){const t=i.getChildrenSize(),e=r>=t,n=e?i.getChildAtIndex(t-1):i.getChildAtIndex(r);if(Do(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function xr(t,e,n,o,r){let s=null,i=0,l=null;null!==o?(s=o.__key,Do(o)?(i=o.getTextContentSize(),l="text"):cs(o)&&(i=o.getChildrenSize(),l="element")):null!==r&&(s=r.__key,Do(r)?l="text":cs(r)&&(l="element")),null!==s&&null!==l?t.set(s,i,l):(i=e.getIndexWithinParent(),-1===i&&(i=n.getChildrenSize()),t.set(n.__key,i,"element"))}function Cr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Sr(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Tr(t,e,n){const o=Ki(t,e.getKey());if(cs(e)){const r=Ml(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function Nr(t,e,n,o,r,i){const l=i.getRootNode(),c=Zs(l)||rl(l)?ml(l):null;if(r.has(ro)&&c!==i||null!==c&&Hs(c,c))return;const a=dl(o,i);let u;if(!Uo(e))return void(null!==t&&Ys(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Tr(n,h,f.offset),[m,y]=Tr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let T=_,N=m,v=!1;if("text"===f.type?(T=Do(h)?wl(h,_,n):null,v=h.getFormat()!==x||h.getStyle()!==C):Uo(t)&&"text"===t.anchor.type&&(v=!0),"text"===d.type&&(N=Do(g)?wl(g,m,n):null),null!==T&&null!==N){if(S&&(null===t||v||Uo(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,s){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:s}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===y&&a.anchorNode===T&&a.focusNode===N){if(null===c||!i.contains(c)){const t=null!==c?Gs(c):null;null!==t&&t!==n||r.has(lo)||i.focus({preventScroll:!0})}if("element"!==f.type)return}if(Sr(o,T,p,N,y),s&&e.isCollapsed()&&null!==i&&!r.has(lo)){const t=pl(i);if(null===t||!i.contains(t)){const t=ml(i.ownerDocument),e=null!==t?Gs(t):null;null!==e&&e!==n||i.focus({preventScroll:!0})}}if(!r.has(so)&&e.isCollapsed()&&null!==i&&i===pl(i)){const t=Uo(e)&&"element"===e.anchor.type?T.childNodes[p]||null:(void 0===u&&(u=fl(o,i)),u);if(null!==t){let e;if(Qs(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=zi(n),r=Hi(o);if(null===o||null===r)return;let{top:s,bottom:i}=e,l=0,c=0,a=n;for(;null!==a;){const e=a===o.body;if(e){const e=r.visualViewport;if(e){const t=e.offsetTop;l=t,c=t+e.height}else l=0,c=ji(t).innerHeight;const n=r.getComputedStyle(o.documentElement),s=parseFloat(n.scrollPaddingTop),i=parseFloat(n.scrollPaddingBottom);isFinite(s)&&(l+=s),isFinite(i)&&(c-=i)}else{const t=a.getBoundingClientRect();l=t.top,c=t.bottom}let n=0;if(sc&&(n=i-c),0!==n)if(e)r.scrollBy(0,n);else{const t=a.scrollTop;a.scrollTop+=n;const e=a.scrollTop-t;s-=e,i-=e}if(e)break;a=Bi(a)}}(n,e,i)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function vr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function kr(t){const e=[];return vr(t,{linebreak:()=>e.push(Ss()),tab:()=>e.push(Fo()),text:t=>e.push(wo(t))}),e}function Er(t){const e=[];for(const n of t)Ts(n)||(!cs(n)&&!fs(n)||n.isInline()?e.push(n):cs(n)&&e.push(...Er(n.getChildren())));return e}function Or(e){let n=e;e.isCollapsed()||n.removeText();const o=_r();Uo(o)&&(n=o),Uo(n)||t(161);const r=n.anchor;let s=r.getNode(),i=r.offset;for(;!El(s)&&null===Zl(s);){const t=s;if([s,i]=br(s,i),t.is(s))break}return i}function br(t,e){const n=t.getParent();if(!n){const t=bs();return _i().append(t),t.select(),[_i(),0]}if(Do(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!cs(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new Ho(Ko(t.__key,e,"element"),Ko(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Mr(t){return Ts(t)||Yi(t)||Do(t)||t.isParentRequired()}function Ar(t){const e=bs();let n=null;for(let o=0;o99&&t(14)}function Ur(){return null===Dr&&t(195,Yr()),Dr}function Hr(){return null===Ir&&t(337,Yr()),Ir}function jr(){Hr()._dirtyType=2}function Yr(){let t=0;const e=new Set,n=Ls.version;if("undefined"!=typeof window)for(const o of ll(document)){const r=Vs(o);if(Js(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function Jr(){return Ir}function Gr(t,e,n){const o=e.__type,r=$s(t,o);let s=n.get(o);void 0===s&&(s=Array.from(r.transforms),n.set(o,s));const i=s.length;for(let t=0;t0&&ns(t,t._deferred));const s=t._editorState,i=s._selection,l=n._selection,c=0!==t._dirtyType,a=Dr,u=Pr,f=Ir,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){Ir=t,Dr=n,Pr=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=Ce(s,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),Fr)throw e;return Ds(t,null,o,n),st(t),t._dirtyType=2,Fr=!0,Zr(t,s),void(Fr=!1)}finally{h.observe(o,Br),t._updating=d,Dr=a,Pr=u,Ir=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,m=t._normalizedNodes,y=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let s;for(s in o)r.has(s)||(o===n&&(o=hi(t)),delete o[s])}(t,n);const x=r?null:nl(ji(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(i))&&null!==o&&!y.has(io)){Ir=t,Dr=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&el(e,t,o),Nr(i,l,t,x,y,o)}!function(t,e,n){let o=t._blockCursorElement;if(Uo(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(pl(e))){const r=n.anchor,s=r.getNode(),i=r.offset;let l=!1,c=null;if(i===s.getChildrenSize()){tl(s.getChildAtIndex(i-1))&&(l=!0)}else{const e=s.getChildAtIndex(i);if(null!==e&&tl(e)){const n=e.getPreviousSibling();(null===n||tl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=Ml(s,t.getElementByKey(s.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=al().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=_a(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&el(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,Br),Ir=f,Dr=a}}null!==g&&function(t,e,n,o,r){const s=Array.from(t._listeners.mutation),i=s.length;for(let t=0;t{Lr.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;rs(t,e,o)}}(t)}(t,e)}finally{Rr=n}}function ts(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function es(t,e,n,o){const r=Ci(t);let s;if(!Rr)for(let t=0;t=0;t--)for(let i=0;i0&&l._updating){s=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(ss(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return s&&s.update(()=>{es(s,e,n,o)}),!1}function ns(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Do(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Tt(o),void 0!==o&&Vr(o,s)&&Gr(e,o,i),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){Kr++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&Vr(c,s)&&Gr(e,c,i)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,Kr++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),os(e),function(t,e,n,o){const r=t._nodeMap,s=e._nodeMap,i=[];for(const[t]of o){const e=s.get(t);void 0!==e&&(e.isAttached()||(cs(e)&&V(e,t,r,s,i,o),r.has(t)||o.delete(t),i.push(t)))}for(const t of n){const e=s.get(t);void 0===e||e.isAttached()||(Xl(e)&&null!==e.__slots&&V(e,t,r,s,i,n),r.has(t)||n.delete(t),i.push(t))}for(const t of i)s.delete(t);const l=Hr(),c=l._compositionKey;null===c||s.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const s=a._selection;if(Uo(s)){e._slotsUsed&&cr(s);const n=a._nodeMap,o=s.anchor.key,r=s.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else jo(s)&&0===s._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Zr(e)}finally{Dr=f,Pr=d,Ir=h,e._updating=g,Kr=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,Zr(e)):u&&Us(()=>{Zr(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function ss(t,e,n){Ir===t&&void 0===n?e():rs(t,e,n)}function is(t){if(Vi(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class ls extends eo{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:is,extends:eo})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return I[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===rc(this).length}isDirty(){const t=Hr()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of rc(this)){const n=sc(this,e);cs(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Do(e)&&t.push(e),cs(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;cs(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;cs(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return cs(t)&&t.getLastDescendant()||t||null}const o=e[t];return cs(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:ci(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:ci(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=dc(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&D[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){Zn(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),s=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const i=s.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Vi(this)||this.getChildren().some(Do)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=Ml(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function cs(t){return t instanceof ls}function as(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class us extends eo{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function fs(t){return t instanceof us}class ds extends ls{__cachedText;static getType(){return"root"}static clone(){return new ds}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!zr()&&0!==Hr()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)cs(e)||fs(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return _i().updateFromJSON(t)}collapseAtStart(){return!0}}function hs(t){return t instanceof ds}function gs(t){return new ms(J(t._nodeMap),null,t._slotsUsed)}function _s(){return new ms(new Map([["root",new ds]]),null,!1)}function ps(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),cs(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const s=e.getChildren();for(let t=0;t0){const s={};for(const n of r){const r=sc(e,n);null===r&&t(366,o.name,n),s[n]=ps(r)}n.$slots=s}return n}class ms{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Qr(e&&e.editor||null,this,t)}clone(t){const e=new ms(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Qr(null,this,()=>({root:ps(_i())}))}}class ys extends ls{static getType(){return"artificial"}createDOM(t){return al().createElement("div")}}class xs extends eo{static getType(){return"linebreak"}static clone(t){return new xs(t.__key)}constructor(t){super(t)}getTextContent(){return"\n"}createDOM(){return al().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>Ns(t)||vs(t)?null:{conversion:Cs,priority:0}}}static importJSON(t){return Ss().updateFromJSON(t)}}function Cs(t){return{node:Ss()}}function Ss(){return Xi(new xs)}function Ts(t){return t instanceof xs}function Ns(t){const e=t.parentElement;if(null!==e&&kl(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&ks(n))return!0}}return!1}function vs(t){const e=t.parentElement;if(null!==e&&kl(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&ks(o))return!0}return!1}function ks(t){return Qs(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Es extends ls{static getType(){return"paragraph"}static clone(t){return new Es(t.__key)}createDOM(t){const e=al().createElement("p"),n=Di(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}static importDOM(){return{p:t=>({conversion:Os,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(xl(e)){this.isEmpty()&&e.append(al().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}static importJSON(t){return bs().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Do);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=bs();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Do(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Os(t){const e=bs();if(Kl(e,t),Rl(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in D&&e.setFormat(n)}return Ll(e,t),{node:e}}function bs(){return Xi(new Es)}function Ms(t){return t instanceof Es}function As(t){console.warn(t)}const ws=0;function Ds(t,e,n,o,r){const s=t._keyToDOMMap;s.clear(),t._editorState=_s(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const i=t._observer;null!==i&&(i.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",s.set("root",n),ui(n,t,"root"))}function Is(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Yl(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const Ps={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Ws(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>cs(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>cs(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function Fs(t,e){const n=t.get(e);t.delete(e),n&&n()}function Rs(t,e,n){return t.set(e,n),Fs.bind(null,t,e)}class Ls{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,s,i,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new G,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Si(),this._onError=r,this._onWarn=s,this._htmlConversions=i,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return Rs(this._listeners.update,t)}registerEditableListener(t){return Rs(this._listeners.editable,t)}registerDecoratorListener(t){return Rs(this._listeners.decorator,t)}registerTextContentListener(t){return Rs(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return pa(Rs(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new j,new j,new j,new j,new j]);const s=r.get(e);void 0===s&&t(36,String(e));const i=function(t){return 7&t}(o),l=s[i];return i!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),s.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let s=r.get(e);void 0===s&&(s=new Set,r.set(e,s)),s.add(o);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(e,o),()=>{s.delete(o),0===s.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Pl(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Pl(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=ci(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:oo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return Li(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Di(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,Ds(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||qn(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Hi(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,st(this),this._updateTags.add(oo),Zr(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;vn.set(t,n);let o=kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=Hn(t);r.push(En.register(n));for(let n=0;n{Gn(t)||(Jn(t),(e.isEditable()||"click"===o)&&s(t,e))}:t=>{if(Gn(t))return;Jn(t);const n=e.isEditable();switch(o){case"cut":return n&&Li(e,fn,t);case"copy":return Li(e,un,t);case"paste":return n&&Li(e,Pe,t);case"dragstart":return n&&Li(e,ln,t);case"dragover":return n&&Li(e,cn,t);case"dragend":return n&&Li(e,an,t);case"focus":return n&&Li(e,mn,t);case"blur":return n&&Li(e,yn,t);case"drop":return n&&Li(e,rn,t)}};r.push(Sn(t,o,i))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(oo),Zr(this);ts("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=gs(e),o._selection=e._selection?e._selection.clone():null),rt(this);const r=this._pendingEditorState,s=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=s&&this._updateTags.add(s),Zr(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,ss(this,()=>{if(s&&this._updateTags.add(s),e._parsed)for(const[t,e]of o._nodeMap.entries())cs(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=_s(),r=Dr,s=Pr,i=Ir,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,Dr=o,Pr=!1,Ir=e,Bs(null);try{const r=e._nodes;Xr(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,Dr=r,Pr=s,Ir=i}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&Zr(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):rs(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),ss(this,()=>{const o=_r(),r=_i();null!==o?o.dirty||pi(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),$i("focus"),Wi(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=nl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,ts("editable",this,!0,t),this._slotsUsed&&this.update(()=>jr()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ls.version=H;let Ks=null;function Bs(t){Ks=t}let zs=1;function $s(e,n){const o=Ws(e,n);return void 0===o&&t(30,n),o}function Ws(t,e){return t._nodes.get(e)}const Us="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Hs(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Zs(e)||rl(e)?ml(e):null})();if(!xl(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=di(n),r=n.nodeName;return no(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Vs(n))}const js=Hs;function Ys(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return Gs(e)===t&&t.read("latest",()=>!Hs(e))}function Js(t){return t instanceof Ls}function Gs(t){let e=t;for(;null!=e;){const t=Vs(e);if(Js(t))return t;e=Bi(e)}return null}function Vs(t){return t?t.__lexicalEditor:null}function qs(t){return Ro(t)||t.isToken()}function Xs(t){return qs(t)||t.isSegmented()}function Qs(t){return Cl(t)&&3===t.nodeType}function Zs(t){return Cl(t)&&9===t.nodeType}function ti(t){let e=t;for(;null!=e;){if(Qs(e))return e;e=e.firstChild}return null}function ei(t,e,n){const o=A[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~A.superscript:"superscript"===e?r&=~A.subscript:"lowercase"===e?(r&=~A.uppercase,r&=~A.capitalize):"uppercase"===e?(r&=~A.lowercase,r&=~A.capitalize):"capitalize"===e&&(r&=~A.lowercase,r&=~A.uppercase),r}function ni(t,e){const n=function(){const t=Ks;return Ks=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);$r(),Wr();const o=Hr(),r=Ur(),s=""+zs++;r._nodeMap.set(s,t),cs(t)?o._dirtyElements.set(s,!0):o._dirtyLeaves.add(s),o._cloneNotNeeded.add(s),0===o._dirtyType&&(o._dirtyType=1),t.__key=s}function oi(e){null!==Zl(e)&&t(380,e.__key,String(Zl(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),s=e.getNextSibling(),i=null!==s?s.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==s?s.getWritable():null;null===r&&(o.__first=i),null===s&&(o.__last=l),null!==c&&(c.__next=i),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const ri=oi;function si(e){Wr(),Zn(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Ql(n)?n.__slotHost:null,r=Ur(),s=Hr(),i=r._nodeMap,l=s._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Ql(t)?t.__slotHost:null}}(o,i,l);const c=n.__key;0===s._dirtyType&&(s._dirtyType=1),cs(e)?l.set(c,!0):s._dirtyLeaves.add(c)}function ii(t){$r();const e=Hr(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=ci(n);null!==t&&t.getWritable()}if(null!==t){const e=ci(t);null!==e&&e.getWritable()}}}function li(){if(zr())return null;return Hr()._compositionKey}function ci(t,e){const n=(e||Ur())._nodeMap.get(t);return void 0===n?null:n}function ai(t,e){const n=fi(t,Hr());return void 0!==n?ci(n,e):null}function ui(t,e,n){t[`__lexicalKey_${e._key}`]=n}function fi(t,e){return t[`__lexicalKey_${e._key}`]}function di(t,e){let n=t;for(;null!=n;){const t=ai(n,e);if(null!==t)return t;n=Bi(n)}return null}function hi(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function gi(t){return t.read(()=>_i().getTextContent())}function _i(){return Ur()._nodeMap.get("root")}function pi(t){$r();const e=Ur();null!==t&&(t.dirty=!0,t.setCachedNodes(null),Uo(t)&&Hr()._slotsUsed&&cr(t)),e._selection=t}function mi(){$r();rt(Hr())}function yi(t){const e=function(t,e){let n=t;for(;null!=n;){const t=fi(n,e);if(void 0!==t)return t;n=Bi(n)}return null}(t,Hr());return null===e?null:ci(e)}function xi(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Ci(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function Si(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Ti(t){return Qs(t)?t.nodeValue:null}function Ni(t,e,n){const o=nl(ji(e));if(null===o)return;const r=dl(o,e._rootElement),s=r.anchorNode;let{anchorOffset:i,focusOffset:l}=r;if(null!==s){let e=Ti(s);const o=di(s);if(null!==e&&Do(o)){if((e===N||e===k)&&n){const t=n.length;e=n,i=t,l=t}null!==e&&vi(o,e,i,l,t)}}}function vi(t,e,n,o,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const i=s.isComposing();if(s.isToken()&&i)return;let c=e;if((i||r)&&(e.endsWith(N)&&(c=e.slice(0,-N.length)),r)){const t=k;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=s.getTextContent();if(r||c!==u){const e=_r();if(""===c){if(ii(null),a||l||d)s.remove();else{const t=Hr();ki(s,"",e),setTimeout(()=>{t.update(()=>{s.isAttached()&&""===s.getTextContent()&&s.remove()})},20)}return}const r=s.getParent(),u=pr(),f=s.getTextContentSize(),h=li(),g=s.getKey();if(s.isToken()&&!i||null!==h&&g===h&&!i||Uo(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!s.canInsertTextBefore()&&!i||u.focus.key===t.__key&&u.focus.offset===f&&!s.canInsertTextAfter()&&!i))return void s.markDirty();if(!Uo(e)||null===n||null===o)return void ki(s,c,e);if(e.setTextNodeRange(s,n,s,o),s.isSegmented()){const t=wo(s.getTextContent());s.replace(t),s=t}ki(s,c,e)}}}function ki(t,e,n){if(t.setTextContent(e),Uo(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const s=n[r];"text"===s.type&&s.key===e&&(s.offset=Fc(t,s.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Ei(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function Oi(t,e){return Ei(t,e,"altKey")&&Ei(t,e,"ctrlKey")&&Ei(t,e,"shiftKey")&&Ei(t,e,"metaKey")}function bi(t,e,n){if(!Oi(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const Mi={ctrlKey:!r,metaKey:r},Ai={altKey:r,ctrlKey:!r};function wi(t){return"Backspace"===t.key}function Di(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=_a(r);return n[e]=t,t}return r}function Ii(e,n,o,r,s){if(0===o.size)return;const i=r.__type,l=r.__key,c=n.get(i);void 0===c&&t(33,i);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===s;(void 0===f||d)&&u.set(l,d?"updated":s)}function Pi(t,e,n){const o=t.getParent();let r=n,s=t;return null!==o&&(e&&0===n?(r=s.getIndexWithinParent(),s=o):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=o)),s.getChildAtIndex(e?r-1:r)}function Fi(t,e){const n=t.offset;if("element"===t.type){return Pi(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Pi(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Ri(t){const e=ji(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Li(t,e,n){return es(t,e,n,t)}function Ki(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function Bi(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return rl(n)?n.host:null}function zi(t){return Zs(t)?t:xl(t)?t.ownerDocument:null}function $i(t){$r();Hr()._updateTags.add(t)}function Wi(t){$r();Hr()._deferred.push(t)}function Ui(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Hi(t){const e=zi(t);return e?e.defaultView:null}function ji(e){const n=e._window;return null===n&&t(78),n}function Yi(t){return cs(t)&&t.isInline()||fs(t)&&t.isInline()}function Ji(t){let e=t.getLatest();for(;null!==e;){if(null!==Zl(e)&&cs(e))return e;const t=e.getParentOrThrow();if(Vi(t))return t;e=t}return e}function Gi(t){return cs(t)&&t.isShadowRoot()}function Vi(t){return hs(t)||Gi(t)}function qi(t,e=!1){const n=t.constructor.clone(t);return ni(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Xi(e){const n=Hr(),o=e.getType(),r=Ws(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:s,replaceWithKlass:i}=r;if(null!==s){const n=s(e),r=n.constructor;return null!==i?n instanceof i||t(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function Qi(e,n){!hs(e.getParent())||cs(n)||fs(n)||t(99)}function Zi(e){const n=ci(e);return null===n&&t(63,e),n}function tl(t){if(!t||t.isInline())return!1;if(fs(t))return!0;if(cs(t)){if(t.isShadowRoot()){const e=t.getParent();return!(cs(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function el(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function nl(t){return n?(t||window).getSelection():null}function ol(t){const e=Hi(t);return e?e.getSelection():null}function rl(t){return Sl(t)&&"host"in t}const sl=[];function il(t){const e=t.getRootNode();if(e===t||!rl(e))return sl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!rl(t))break;n.push(t),o=t.host}return n}function*ll(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Zs(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function cl(t){return null!==t?t.ownerDocument:document}function al(){const t=Jr();return cl(null!==t?t._rootElement:null)}function ul(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=il(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function fl(t,e){const n=ul(t,e);if(null!==n){const t=hl(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function dl(t,e){const n=ul(t,e);return null===n?t:gl(n,_l(t))}function hl(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function gl(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:s}=t;return"backward"===e?{anchorNode:r,anchorOffset:s,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:s}}function _l(t){return t.direction}function pl(t){const e=t.getRootNode();return Zs(e)||rl(e)?e.activeElement:null}function ml(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function yl(t){const e=t.target;if(null!==e&&xl(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function xl(t){return Cl(t)&&1===t.nodeType}function Cl(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function Sl(t){return Cl(t)&&11===t.nodeType}const Tl=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Nl(t){return!(!xl(t)||!t.style.display.startsWith("inline"))||Tl.test(t.nodeName)}const vl=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function kl(t){return(!xl(t)||!t.style.display.startsWith("inline"))&&vl.test(t.nodeName)}function El(t){if(fs(t)&&!t.isInline())return!0;if(!cs(t)||Vi(t))return!1;const e=t.getFirstChild(),n=null===e||Ts(e)||Do(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Ol(){return Hr()}function bl(t=Ol()){return t._config.dom||Ps}function Ml(e,n,o=Ol()){const r=bl(o).$getDOMSlot(e,n,o);return cs(e)&&(Al(r)||t(344,e.getKey(),e.getType())),r}function Al(t){return t instanceof $}function wl(t,e,n=Ol()){return ti(Ml(t,e,n).element)}const Dl=new WeakMap,Il=new Map;function Pl(e){if(!e._readOnly&&e.isEmpty())return Il;e._readOnly||t(192);let n=Dl.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Dl.set(e,n)),n}function Fl(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function Rl(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Ll(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Kl(t,e){const n=e.style.textAlign;return n&&n in D?t.setFormat(n):t}function Bl(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function zl(t){return!0===t.__lexicalUnmanaged}function $l(t,e=Ol()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Wl(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(xl(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==fi(n,e))return!1;n=Bi(n)}return!1}function Ul(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==eo[e]}const Hl=new WeakMap;function jl(e){const n=Hl.get(e);if(n)return n;const o=null!=e.prototype&&R in e.prototype?e.prototype[R]():void 0,r=function(e){if(!(e===eo||e.prototype instanceof eo)){let n="",o="";try{n=e.getType()}catch(t){}try{Ls.version&&(o=JSON.parse(Ls.version))}catch(t){}t(290,e.name,n,o)}return e===us||e===ls||e===eo}(e),s=!r&&Ul(e,"getType")?e.getType():void 0;let i,l=s;if(o)if(s)i=o[s];else{for(const[t,e]of Object.entries(o))l=t,i=e;if(!i)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){i=e;break}}}if(!r&&l&&(Ul(e,"getType")||(e.getType=()=>l),Ul(e,"clone")||(e.clone=t=>(Bs(t),new e)),Ul(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(t=>(new e).updateFromJSON(t))),!Ul(e,"importDOM")&&i)){const{importDOM:t}=i;t&&(e.importDOM=()=>t)}const c={klass:e,ownNodeConfig:i,ownNodeType:l};return Hl.set(e,c),c}function*Yl(t){for(let e=t;e&&(e===eo||no(e.prototype));){const t=jl(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Vl(e)}}const Jl=(t,e)=>{let n=t;for(;null!=n&&!hs(n);){if(e(n))return n;n=n.getParent()}return null};function Gl(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?ci(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Vl(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const ql=new Map;function Xl(t){return cs(t)||fs(t)}function Ql(t){return cs(t)||fs(t)}function Zl(t){const e=t.getLatest();return Ql(e)?e.__slotHost:null}function tc(e){const n=Zl(e);if(null===n)return null;const o=ci(n);return cs(o)||fs(o)||t(370),o}function ec(t){const e=tc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of oc(e))if(o===n)return t;return null}function nc(t){let e=t.getLatest();for(;null!==e;){if(null!==Zl(e))return e;e=e.getParent()}return null}function oc(t){const e=t.getLatest();return Xl(e)&&null!==e.__slots?e.__slots:ql}function rc(t){return Array.from(oc(t).keys())}function sc(t,e){const n=oc(t).get(e);return void 0===n?null:ci(n)}const ic=["__proto__","constructor","prototype"],lc=Symbol("slotMapOwner");function cc(t){let e=t.__slots;return null!==e&&e[lc]===t||(e=new Map(e),e[lc]=t,t.__slots=e),e}const ac=new WeakMap,uc=[];function fc(t){for(const{ownNodeConfig:e}of Yl(t)){const t=e&&e.slots;if(t)return t}return uc}function dc(t){let e="";for(const n of rc(t)){const o=sc(t,n);null!==o&&(e+=o.getTextContent())}return e}function hc(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function gc(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=ac.get(e);if(void 0===n){const o=fc(e),r=new Map;for(const n of o)ic.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,ac.set(e,n)}return n}(e.constructor);let r=null,s=!0;for(const t of n.keys()){if(null!==r&&hc(r,t,o)>0){s=!1;break}r=t}if(s)return;const i=Array.from(n).sort(([t],[e])=>hc(t,e,o));n.clear();for(const[t,e]of i)n.set(t,e)}function _c(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!cs(o)&&!fs(o)||o.isInline())&&t(374,o.__key);const s=e.getWritable(),i=cc(s),l=i.get(n);void 0!==l&&yc(l);const c=o.getWritable(),a=tc(c);if(null!==a){const t=ec(c);null!==t&&cc(a.getWritable()).delete(t),c.__slotHost=null}return oi(c),c.__slotHost=s.__key,i.set(n,c.__key),gc(s),function(){const t=Ol();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),s}function pc(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(yc(o),cc(n).delete(e)),n}function mc(t,e){}function yc(e){const n=ci(e);if(null===n)return;const o=n.getWritable();Ql(o)||t(377,e),o.__slotHost=null,o.remove()}const xc={next:"previous",previous:"next"};class Cc{origin;constructor(t){this.origin=t}[Symbol.iterator](){return jc({hasNext:bc,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ic(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ic(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let s=this;const i=this.getParentAtCaret(),l=new Map;for(let t=s.getAdjacentCaret();null!==t&&l.size0){const n=s.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||s.origin.is(e));else{const t=e.getParent();t&&t.is(i)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else s.insert(e);s=Ic(e,this.direction)}for(const t of l.values())t.remove();return this}}class Sc extends Cc{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lc(t,this.direction)}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Nc(this.direction);return Ic(this.getNodeAtCaret(),t)||Lc(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof Sc&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Tc={root:hs,shadowRoot:Vi};function Nc(t){return xc[t]}function vc(t,e="root"){return null===t||Tc[e](t)?null:null===Zl(t)?t:null}class kc extends Cc{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ic(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return cs(this.origin)?Lc(this.origin,this.direction):null}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Nc(this.direction);return Ic(this.getNodeAtCaret(),t)||Lc(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof kc&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof kc||t instanceof Ec)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Ec extends Cc{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Pc(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Pc(this.origin,Nc(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Ec&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof kc||t instanceof Ec)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ic(this.origin,this.direction)}}function Oc(t){return t instanceof Ec}function bc(t){return t instanceof kc}function Mc(t){return t instanceof Sc}const Ac={next:class extends Ec{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ec{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},wc={next:class extends kc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends kc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Dc={next:class extends Sc{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends Sc{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Ic(t,e){return t?new wc[e](t):null}function Pc(t,e,n){return t?new Ac[e](t,Fc(t,n)):null}function Fc(t,n,o="error"){const r=t.getTextContentSize();let s="next"===n?r:"previous"===n?0:n;return(s<0||s>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),s=s<0?0:r),s}function Rc(t,e){return new $c(t,e)}function Lc(t,e){return cs(t)?new Dc[e](t):null}function Kc(t){return t&&t.getChildCaret()||t}function Bc(t){return t&&Kc(t.getAdjacentCaret())}class zc{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new zc(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return Oc(e)?function(t,e){const{direction:n,origin:o}=t,r=Fc(o,"focus"===e?Nc(n):n);return Rc(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Rc(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=Oc(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=Oc(n),r=e=>e.isSameNodeCaret(n)?null:Bc(e)||e.getParentCaret(t);return jc({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class $c{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&El(t));if(f&&rc(f).length>0)return null;return u&&f?[u,f]:null}(f,d,a);if(h){const[t,e]=h;Lc(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(d){const t=function(t){if(Mc(t)){const e=t.origin;if(El(e))return e}else{const e=t.getParentAtCaret();if(e&&El(e))return e}return null}(d),e=t&&t.getParent(),n=t&&t.getParents().findLast(Gi);if(t&&e&&!hs(e)&&t.isEmpty()&&a.has(t.getKey())&&0===rc(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!hs(n)&&n.isEmpty();){const t=n.getParent();if(t&&hs(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const g=[f,d,...l,...c].find(ra);if(g){return Uc(ca(ia(g),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function ia(t){const e=function(t){let e=t;for(;Mc(e);){const t=Bc(e);if(!Mc(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Do(e.origin))return Oc(e)?e:Pc(e.origin,n,n);const o=e.getAdjacentCaret();return bc(o)&&Do(o.origin)?Pc(o.origin,n,Nc(n)):e}function la(t){return Oc(t)&&t.offset!==Fc(t.origin,t.direction)}function ca(t,e){return t.direction===e?t:t.getFlipped()}function aa(t,e){return t.direction===e?t:Hc(ca(t.focus,e),ca(t.anchor,e))}function ua(t,e,n){let o=Lc(t,"next");for(let t=0;t0||!s&&n.canBeEmpty()&&r(n,"last"))&&i.insert(e(n).splice(0,0,o))}return i}function ga(e,n,o){let r=ca(n,"next");Oc(r)&&(0===r.offset?r=Ic(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Ic(r.origin,"next"))),r.origin.is(e)&&(bc(r)||t(342,e.getKey(),e.getType()),r=na(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=ha(t,o))r=t;return Oc(r)&&t(283),r.insert(e.isInline()?bs().append(e):e),ca(Ic(e.getLatest(),"next"),n.direction)}function _a(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function pa(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}exports.$addUpdateTag=$i,exports.$applyNodeReplacement=Xi,exports.$assumeActiveEditor=function(t){null!==Ur()&&null===Ir&&(Ir=t),Ir!==t&&e(378)},exports.$caretFromPoint=Xc,exports.$caretRangeFromSelection=ea,exports.$cloneWithProperties=Fl,exports.$cloneWithPropertiesEphemeral=function(t){return(e=Fl(t))[Qn]=!0,e;var e},exports.$comparePointCaretNext=Yc,exports.$copyNode=qi,exports.$create=function(t){const e=Ol();return $r(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)},exports.$createChildrenArray=Gl,exports.$createLineBreakNode=Ss,exports.$createNodeSelection=hr,exports.$createParagraphNode=bs,exports.$createPoint=Ko,exports.$createRangeSelection=dr,exports.$createRangeSelectionFromDom=function(t,e){return gr(null,t,e,null)},exports.$createTabNode=Fo,exports.$createTextNode=wo,exports.$extendCaretToRange=Wc,exports.$findMatchingParent=Jl,exports.$formatText=Jo,exports.$fullReconcile=jr,exports.$generateNodesFromRawText=kr,exports.$getAdjacentChildCaret=Bc,exports.$getAdjacentNode=Fi,exports.$getAdjacentSiblingOrParentSiblingCaret=function(t,e="root"){let n=0,o=t,r=Bc(o);for(;null===r;){if(n--,r=o.getParentCaret(e),!r)return null;o=r,r=Bc(o)}return r&&[r,n]},exports.$getCaretInDirection=ca,exports.$getCaretRange=Hc,exports.$getCaretRangeInDirection=aa,exports.$getCharacterOffsets=Vo,exports.$getChildCaret=Lc,exports.$getChildCaretAtIndex=ua,exports.$getChildCaretOrSelf=Kc,exports.$getCollapsedCaretRange=Uc,exports.$getCommonAncestor=qc,exports.$getCommonAncestorResultBranchOrder=Jc,exports.$getDOMSlot=Ml,exports.$getDOMTextNode=wl,exports.$getDocument=al,exports.$getEditor=Ol,exports.$getEditorDOMRenderConfig=bl,exports.$getNearestNodeFromDOMNode=di,exports.$getNearestRootOrShadowRoot=Ji,exports.$getNodeByKey=ci,exports.$getNodeByKeyOrThrow=Zi,exports.$getNodeFromDOMNode=ai,exports.$getPreviousSelection=pr,exports.$getRoot=_i,exports.$getSelection=_r,exports.$getSiblingCaret=Ic,exports.$getSlot=sc,exports.$getSlotFrame=nc,exports.$getSlotHost=tc,exports.$getSlotNameWithinHost=ec,exports.$getSlotNames=rc,exports.$getState=at,exports.$getStateChange=function(t,e,n){const o=at(t,n,it),r=at(e,n,it);return n.isEqual(o,r)?null:[o,r]},exports.$getTextContent=function(){const t=_r();return null===t?"":t.getTextContent()},exports.$getTextNodeOffset=Fc,exports.$getTextPointCaret=Pc,exports.$getTextPointCaretSlice=Rc,exports.$getWritableNodeState=ht,exports.$hasAncestor=Ui,exports.$hasUpdateTag=function(t){return Hr()._updateTags.has(t)},exports.$insertNodeToNearestRootAtCaret=ga,exports.$insertNodes=function(t){let e=_r()||pr();null===e&&(e=_i().selectEnd()),e.insertNodes(t)},exports.$isBlockElementNode=ur,exports.$isChildCaret=Mc,exports.$isDecoratorNode=fs,exports.$isEditorState=function(t){return t instanceof ms},exports.$isElementDOMSlot=Al,exports.$isElementNode=cs,exports.$isExtendableTextPointCaret=la,exports.$isInlineElementOrDecoratorNode=Yi,exports.$isInlineFormattable=So,exports.$isLeafNode=function(t){return Do(t)||Ts(t)||fs(t)},exports.$isLexicalNode=no,exports.$isLineBreakNode=Ts,exports.$isNodeCaret=function(t){return t instanceof Cc},exports.$isNodeSelection=jo,exports.$isParagraphNode=Ms,exports.$isRangeSelection=Uo,exports.$isRootNode=hs,exports.$isRootOrShadowRoot=Vi,exports.$isSelectionCapturedInDecoratorInput=Hs,exports.$isShadowRootNode=Gi,exports.$isSiblingCaret=bc,exports.$isSlotChild=Ql,exports.$isSlotHost=Xl,exports.$isTabNode=Ro,exports.$isTextNode=Do,exports.$isTextPointCaret=Oc,exports.$isTextPointCaretSlice=function(t){return t instanceof $c},exports.$isTokenOrSegmented=Xs,exports.$isTokenOrTab=qs,exports.$markSlotEditable=$l,exports.$needsBlockCursorBeside=tl,exports.$nodesOfType=function(t){const e=t.getType(),n=Ur();if(n._readOnly){const t=Pl(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r},exports.$normalizeCaret=ia,exports.$normalizeSelection__EXPERIMENTAL=Nt,exports.$onUpdate=Wi,exports.$parseSerializedNode=function(t){return Xr(t,Hr()._nodes)},exports.$removeFromParent=oi,exports.$removeSlot=pc,exports.$removeTextFromCaretRange=sa,exports.$rewindSiblingCaret=na,exports.$selectAll=function(t){const e=_i();if(Uo(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(hs(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Nt(t),t;const r=o.getTopLevelElementOrThrow(),s=r.getParent();if(null===s)return cs(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),Nt(t)),t;const i=s;return e.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Nt(t),t}{const t=e.select(0,e.getChildrenSize());return pi(Nt(t)),t}},exports.$setCompositionKey=ii,exports.$setDirectionFromDOM=Ll,exports.$setFormatFromDOM=Kl,exports.$setPointFromCaret=Qc,exports.$setSelection=pi,exports.$setSelectionFromCaretRange=Zc,exports.$setSlot=_c,exports.$setState=function(t,e,n){let o;if($r(),"function"==typeof n){const r=t.getLatest(),s=at(r,e);if(o=n(s),e.isEqual(s,o))return r}else o=n;const r=t.getWritable();return ht(r).updateFromKnown(e,o),r},exports.$setTextFormat=function(t,e){const n=[];for(const[t,o]of Object.entries(e))"boolean"==typeof o&&n.push([t,o]);0!==n.length&&Yo(t,t=>{for(const[e,o]of n)t=ei(t,e,o?A[e]:0);return t})},exports.$splitAtPointCaretNext=ha,exports.$splitNode=function(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Vi(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),s=Vi(n),i=e!==o||s?qi(e):e;if(s)return cs(e)&&cs(i)||t(133),e.insertAfter(i),[e,i,i];{const[t,o,s]=r(n),l=e.getNextSiblings();return s.append(i,...l),[t,o,i]}},[s,i]=r(o);return[s,i]},exports.$updateDOMSelection=Nr,exports.$updateRangeSelectionFromCaretRange=ta,exports.ArtificialNode__DO_NOT_USE=ys,exports.BEFORE_INPUT_COMMAND=Ee,exports.BLUR_COMMAND=yn,exports.CAN_REDO_COMMAND=_n,exports.CAN_UNDO_COMMAND=pn,exports.CAN_USE_BEFORE_INPUT=i,exports.CAN_USE_DOM=n,exports.CLEAR_EDITOR_COMMAND=hn,exports.CLEAR_HISTORY_COMMAND=gn,exports.CLICK_COMMAND=ke,exports.COLLABORATION_TAG=ro,exports.COMMAND_PRIORITY_BEFORE_CRITICAL=-4,exports.COMMAND_PRIORITY_BEFORE_EDITOR=-8,exports.COMMAND_PRIORITY_BEFORE_HIGH=-5,exports.COMMAND_PRIORITY_BEFORE_LOW=-7,exports.COMMAND_PRIORITY_BEFORE_NORMAL=-6,exports.COMMAND_PRIORITY_CRITICAL=4,exports.COMMAND_PRIORITY_EDITOR=ws,exports.COMMAND_PRIORITY_HIGH=3,exports.COMMAND_PRIORITY_LOW=1,exports.COMMAND_PRIORITY_NORMAL=2,exports.COMPOSITION_END_COMMAND=Me,exports.COMPOSITION_END_TAG=ao,exports.COMPOSITION_START_COMMAND=be,exports.COMPOSITION_START_TAG=co,exports.CONTROLLED_TEXT_INSERTION_COMMAND=Ie,exports.COPY_COMMAND=un,exports.CUT_COMMAND=fn,exports.CUT_TAG="cut",exports.DEFAULT_EDITOR_DOM_CONFIG=Ps,exports.DELETE_CHARACTER_COMMAND=Ae,exports.DELETE_LINE_COMMAND=Le,exports.DELETE_WORD_COMMAND=Re,exports.DRAGEND_COMMAND=an,exports.DRAGOVER_COMMAND=cn,exports.DRAGSTART_COMMAND=ln,exports.DROP_COMMAND=rn,exports.DecoratorNode=us,exports.ElementNode=ls,exports.FOCUS_COMMAND=mn,exports.FORMAT_ELEMENT_COMMAND=sn,exports.FORMAT_TEXT_COMMAND=Ke,exports.HISTORIC_TAG="historic",exports.HISTORY_MERGE_TAG=oo,exports.HISTORY_PUSH_TAG="history-push",exports.INDENT_CONTENT_COMMAND=nn,exports.INPUT_COMMAND=Oe,exports.INSERT_LINE_BREAK_COMMAND=we,exports.INSERT_PARAGRAPH_COMMAND=De,exports.INSERT_TAB_COMMAND=en,exports.INTERNAL_$isBlock=El,exports.IS_ALL_FORMATTING=2047,exports.IS_ANDROID=c,exports.IS_ANDROID_CHROME=f,exports.IS_APPLE=r,exports.IS_APPLE_WEBKIT=d,exports.IS_BOLD=1,exports.IS_CHROME=u,exports.IS_CODE=16,exports.IS_FIREFOX=s,exports.IS_HIGHLIGHT=p,exports.IS_IOS=l,exports.IS_ITALIC=2,exports.IS_SAFARI=a,exports.IS_STRIKETHROUGH=4,exports.IS_SUBSCRIPT=32,exports.IS_SUPERSCRIPT=64,exports.IS_UNDERLINE=8,exports.KEY_ARROW_DOWN_COMMAND=Ge,exports.KEY_ARROW_LEFT_COMMAND=je,exports.KEY_ARROW_RIGHT_COMMAND=Ue,exports.KEY_ARROW_UP_COMMAND=Je,exports.KEY_BACKSPACE_COMMAND=Xe,exports.KEY_DELETE_COMMAND=Ze,exports.KEY_DOWN_COMMAND=We,exports.KEY_ENTER_COMMAND=Ve,exports.KEY_ESCAPE_COMMAND=Qe,exports.KEY_MODIFIER_COMMAND=xn,exports.KEY_SPACE_COMMAND=qe,exports.KEY_TAB_COMMAND=tn,exports.LineBreakNode=xs,exports.MOVE_TO_END=He,exports.MOVE_TO_START=Ye,exports.NODE_STATE_DIRECT=it,exports.NODE_STATE_KEY="$",exports.NODE_STATE_LATEST=lt,exports.OUTDENT_CONTENT_COMMAND=on,exports.PASTE_COMMAND=Pe,exports.PASTE_TAG="paste",exports.ParagraphNode=Es,exports.REDO_COMMAND=$e,exports.REMOVE_TEXT_COMMAND=Fe,exports.RootNode=ds,exports.SELECTION_CHANGE_COMMAND=Ne,exports.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=ve,exports.SELECT_ALL_COMMAND=dn,exports.SET_TEXT_FORMAT_COMMAND=Be,exports.SKIP_COLLAB_TAG="skip-collab",exports.SKIP_DOM_SELECTION_TAG=io,exports.SKIP_SCROLL_INTO_VIEW_TAG=so,exports.SKIP_SELECTION_FOCUS_TAG=lo,exports.TEXT_TYPE_TO_FORMAT=A,exports.TabNode=Po,exports.TextNode=To,exports.UNDO_COMMAND=ze,exports.addClassNamesToElement=function(t,...e){const n=_a(...e);n.length>0&&t.classList.add(...n)},exports.buildImportMap=function(t){return t},exports.configExtension=function(...t){return t},exports.createCommand=Te,exports.createEditor=function(e){const n=e||{},o=Jr(),r=n.theme||{},s=void 0===e?o:n.parentEditor||null,i=n.disableEvents||!1,l=_s(),c=n.namespace||(null!==s?s._config.namespace:Si()),a=n.editorState,u=[ds,To,xs,Po,Es,ys,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(Ee,Ln,ws),t.registerCommand(Oe,Kn,ws),t.registerCommand(be,Bn,ws),t.registerCommand(Me,zn,ws),t.registerCommand(We,Un,ws)}(p),p},exports.createRefCountedRegistry=Cn,exports.createSharedNodeState=ut,exports.createState=function(t,e){return new ct(t,e)},exports.declarePeerDependency=function(t,e){return[t,e]},exports.defineExtension=function(t){return t},exports.findAllLexicalElementsDeep=ll,exports.flipDirection=Nc,exports.getActiveElement=pl,exports.getActiveElementDeep=ml,exports.getComposedEventTarget=yl,exports.getComposedStaticRange=ul,exports.getDOMOwnerDocument=zi,exports.getDOMSelection=nl,exports.getDOMSelectionFromTarget=ol,exports.getDOMSelectionPoints=dl,exports.getDOMSelectionRange=fl,exports.getDOMSelectionRangeAndPoints=function(t,e){const n=ul(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=hl(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:gl(n,_l(t)),range:o}},exports.getDOMShadowRoots=il,exports.getDOMTextNode=ti,exports.getDeclaredSlots=fc,exports.getEditorPropertyFromDOMNode=Vs,exports.getNearestEditorFromDOMNode=Gs,exports.getParentElement=Bi,exports.getRegisteredNode=Ws,exports.getRegisteredNodeOrThrow=$s,exports.getRegisteredSubtypeMap=function(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=jl(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Yl(o)){const o=n&&e.get(n);o&&o.add(t)}return e},exports.getRootOwnerDocument=cl,exports.getStaticNodeConfig=jl,exports.getStyleObjectFromCSS=fo,exports.getTextDirection=function(t){return b.test(t)?"rtl":M.test(t)?"ltr":null},exports.getTransformSetFromKlass=Is,exports.isBlockDomNode=kl,exports.isCurrentlyReadOnlyMode=zr,exports.isDOMCapturingSelection=Wl,exports.isDOMDocumentNode=Zs,exports.isDOMNode=Cl,exports.isDOMShadowRoot=rl,exports.isDOMTextNode=Qs,exports.isDOMUnmanaged=zl,exports.isDocumentFragment=Sl,exports.isExactShortcutMatch=bi,exports.isHTMLAnchorElement=function(t){return xl(t)&&"A"===t.tagName},exports.isHTMLElement=xl,exports.isHTMLTableCellElement=function(t){return xl(t)&&("TD"===t.tagName||"TH"===t.tagName)},exports.isHTMLTableRowElement=function(t){return xl(t)&&"TR"===t.tagName},exports.isInlineDomNode=Nl,exports.isLastChildInBlockNode=vs,exports.isLexicalEditor=Js,exports.isModifierMatch=Oi,exports.isOnlyChildInBlockNode=Ns,exports.isSelectionCapturedInDecoratorInput=js,exports.isSelectionWithinEditor=Ys,exports.iterStaticNodeConfigChain=Yl,exports.makeStepwiseIterator=jc,exports.mergeRegister=pa,exports.mountSlotContainer=function(t,e,n,o){const r=t.read("latest",()=>{const o=ci(e);return null!==o?function(t,e,n=Ol()){const o=sc(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r},exports.normalizeClassNames=_a,exports.registerEventListener=Sn,exports.registerEventListeners=function(t,e,n){return pa(...Object.entries(e).map(([e,o])=>Sn(t,e,o,n)))},exports.removeClassNamesFromElement=function(t,...e){const n=_a(...e);n.length>0&&t.classList.remove(...n)},exports.removeFromParent=ri,exports.resetRandomKey=function(){zs=1},exports.safeCast=function(t){return t},exports.setDOMStyleFromCSS=go,exports.setDOMStyleObject=function(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):ho(t,n,o)}},exports.setDOMUnmanaged=Bl,exports.setNodeIndentFromDOM=Rl,exports.shallowMergeConfig=function(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t},exports.stopLexicalPropagation=Jn,exports.toggleTextFormatType=ei,exports.tokenizeRawText=vr,exports.unmountSlotContainer=function(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}; -+/*@__INLINE__*/function Te(t){return{type:t}}const Ne=/* @__PURE__ */Te("SELECTION_CHANGE_COMMAND"),ve=/* @__PURE__ */Te("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),ke=/* @__PURE__ */Te("CLICK_COMMAND"),Ee=/* @__PURE__ */Te("BEFORE_INPUT_COMMAND"),Oe=/* @__PURE__ */Te("INPUT_COMMAND"),be=/* @__PURE__ */Te("COMPOSITION_START_COMMAND"),Me=/* @__PURE__ */Te("COMPOSITION_END_COMMAND"),Ae=/* @__PURE__ */Te("DELETE_CHARACTER_COMMAND"),we=/* @__PURE__ */Te("INSERT_LINE_BREAK_COMMAND"),De=/* @__PURE__ */Te("INSERT_PARAGRAPH_COMMAND"),Ie=/* @__PURE__ */Te("CONTROLLED_TEXT_INSERTION_COMMAND"),Pe=/* @__PURE__ */Te("PASTE_COMMAND"),Fe=/* @__PURE__ */Te("REMOVE_TEXT_COMMAND"),Re=/* @__PURE__ */Te("DELETE_WORD_COMMAND"),Le=/* @__PURE__ */Te("DELETE_LINE_COMMAND"),Ke=/* @__PURE__ */Te("FORMAT_TEXT_COMMAND"),Be=/* @__PURE__ */Te("SET_TEXT_FORMAT_COMMAND"),ze=/* @__PURE__ */Te("UNDO_COMMAND"),$e=/* @__PURE__ */Te("REDO_COMMAND"),We=/* @__PURE__ */Te("KEYDOWN_COMMAND"),Ue=/* @__PURE__ */Te("KEY_ARROW_RIGHT_COMMAND"),He=/* @__PURE__ */Te("MOVE_TO_END"),je=/* @__PURE__ */Te("KEY_ARROW_LEFT_COMMAND"),Ye=/* @__PURE__ */Te("MOVE_TO_START"),Je=/* @__PURE__ */Te("KEY_ARROW_UP_COMMAND"),Ge=/* @__PURE__ */Te("KEY_ARROW_DOWN_COMMAND"),Ve=/* @__PURE__ */Te("KEY_ENTER_COMMAND"),qe=/* @__PURE__ */Te("KEY_SPACE_COMMAND"),Xe=/* @__PURE__ */Te("KEY_BACKSPACE_COMMAND"),Qe=/* @__PURE__ */Te("KEY_ESCAPE_COMMAND"),Ze=/* @__PURE__ */Te("KEY_DELETE_COMMAND"),tn=/* @__PURE__ */Te("KEY_TAB_COMMAND"),en=/* @__PURE__ */Te("INSERT_TAB_COMMAND"),nn=/* @__PURE__ */Te("INDENT_CONTENT_COMMAND"),on=/* @__PURE__ */Te("OUTDENT_CONTENT_COMMAND"),rn=/* @__PURE__ */Te("DROP_COMMAND"),sn=/* @__PURE__ */Te("FORMAT_ELEMENT_COMMAND"),ln=/* @__PURE__ */Te("DRAGSTART_COMMAND"),cn=/* @__PURE__ */Te("DRAGOVER_COMMAND"),an=/* @__PURE__ */Te("DRAGEND_COMMAND"),un=/* @__PURE__ */Te("COPY_COMMAND"),fn=/* @__PURE__ */Te("CUT_COMMAND"),dn=/* @__PURE__ */Te("SELECT_ALL_COMMAND"),hn=/* @__PURE__ */Te("CLEAR_EDITOR_COMMAND"),gn=/* @__PURE__ */Te("CLEAR_HISTORY_COMMAND"),_n=/* @__PURE__ */Te("CAN_REDO_COMMAND"),pn=/* @__PURE__ */Te("CAN_UNDO_COMMAND"),mn=/* @__PURE__ */Te("FOCUS_COMMAND"),yn=/* @__PURE__ */Te("BLUR_COMMAND"),xn=/* @__PURE__ */Te("KEY_MODIFIER_COMMAND");function Cn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const s=()=>{const t=e.get(n);t&&t.holders.delete(s)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(s),s}}}function Sn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Tn=Object.freeze({}),Nn=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Pn(n);if(e.isComposing())return;Li(e,We,t)}],["pointerdown",function(t,e){const n=yl(t),o=t.pointerType;Cl(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&ss(e,()=>{Wl(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Li(e,be,t)}],["compositionend",function(t,e){const n=e._inputState;s?n.compositionPhase="ending-firefox":l||!a&&!d?Li(e,Me,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Pn(n),ss(e,()=>{Rn(t,e)||e.dispatchCommand(Oe,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){ss(e,()=>{const n=_r(),o=nl(ji(e)),r=pr();if(o)if(Uo(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!hs(e)&&1===_i().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=dl(o,e._rootElement).anchorNode;if(xl(n)||Qs(n)){pi(gr(r,o,e,t))}}Li(e,ke,t)})}],["cut",Tn],["copy",Tn],["dragstart",Tn],["dragover",Tn],["dragend",Tn],["paste",Tn],["focus",Tn],["blur",Tn],["drop",Tn]];i&&Nn.push(["beforeinput",(t,e)=>function(t,e){const n=t.inputType;if("deleteCompositionText"===n||s&&Ri(e))return;if("insertCompositionText"===n)return;ss(e,()=>{Rn(t,e)||Li(e,Ee,t)},{event:t})}(t,e)]);const vn=new WeakMap,kn=new WeakMap,En=Cn(t=>(t.addEventListener("selectionchange",Yn),()=>t.removeEventListener("selectionchange",Yn)));function On(t,e,n,o,r,s){const l=t.anchor,c=t.focus,a=l.getNode(),u=Hr();let f;if(void 0!==s)f=s;else{const t=nl(ji(u));f=null!==t?dl(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Do(a)||(!r&&(!i||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!i)&&null!==g&&!a.isComposing()&&d!==wl(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=qs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Do(e)||cs(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function bn(t,e){return Qs(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Mn(e,n,o){const{anchorNode:r,anchorOffset:s,focusNode:i,focusOffset:l}=dl(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,bn(r,s)&&bn(i,l)&&!c.postDeleteSelectionToRestore)||ss(n,()=>{if(!o)return void pi(null);if(!Ys(n,r,i))return;let a=_r();if(c.postDeleteSelectionToRestore&&Uo(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),pi(a))}if(c.postDeleteSelectionToRestore=null,Uo(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===i&&(a.dirty=!0);const s=ji(n).event,l=s?s.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=_i(),m=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)An(a,f,d);else if("text"===o.type)Do(u)||t(141),wn(a,u);else if("element"===o.type&&!m){cs(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();An(t,n,o)}(a,e):An(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,i=a.isBackward(),c=i?l:s,u=i?s:l,f=i?e:t,d=i?t:e;let h=2047,g=!1;for(let t=0;tPn(t),0)}function Rn(t,e){const n=yl(t);if(xl(n)&&Wl(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=ml(o.ownerDocument);return null!==r&&o.contains(r)&&Wl(r,e)}function Ln(e){const n=e.inputType,o=Dn(e),r=Hr(),s=r._inputState,i=_r();if("insertText"===n&&e.data&&s.isInsertTextAfterHandledSelectionCommand){if(Pn(s),e.preventDefault(),Uo(i)&&!i.isCollapsed()){const t=i.isBackward()?i.anchor:i.focus;i.anchor.set(t.key,t.offset,t.type),i.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===i){const t=pr();if(!Uo(t))return!0;pi(t.clone())}if(Uo(i)){const n=i.anchor.key===i.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{ss(r,()=>{ii(null)})},30),Uo(i)){const e=i.anchor.getNode();e.markDirty(),Do(e)||t(142),wn(i,e)}}else{if(ii(null),l&&null!==o&&!o.collapsed&&(i.applyDOMRange(o),!i.isCollapsed()))return e.preventDefault(),i.removeText(),!0;e.preventDefault();const t=i.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===i.anchor.offset&&i.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&i.isCollapsed()&&(d=!fs(Fi(i.anchor,!0))),!d){Li(r,Ae,!0);const t=_r();f&&Uo(t)&&t.isCollapsed()&&(s.postDeleteSelectionToRestore=t,setTimeout(()=>s.postDeleteSelectionToRestore=null))}}return!0}}if(!Uo(i))return!0;const c=e.data;null!==s.unprocessedBeforeInputData&&Ni(!1,r,s.unprocessedBeforeInputData),i.dirty&&null===s.unprocessedBeforeInputData||!i.isCollapsed()||hs(i.anchor.getNode())||null===o||i.applyDOMRange(o),s.unprocessedBeforeInputData=null;const a=i.anchor,u=i.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Li(r,we,!1);else if(c===v)e.preventDefault(),Li(r,De,void 0);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(t)}else null!=c&&On(i,o,c,e.timeStamp,!0)?(e.preventDefault(),Li(r,Ie,c),In(c)):s.unprocessedBeforeInputData=c;return s.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Li(r,Ie,e);In((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=s.hadOrphanedCompositionEvents;s.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;ii(null),t||Li(r,Ie,e),$n(n);break}case"insertLineBreak":ii(null),Li(r,we,!1);break;case"insertParagraph":ii(null),s.isInsertLineBreak&&!l?(s.isInsertLineBreak=!1,Li(r,we,!1)):Li(r,De,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Li(r,Pe,e);break;case"deleteByComposition":(function(t,e){return t!==e||cs(t)||cs(e)||!qs(t)||!qs(e)})(d,h)&&Li(r,Fe,e);break;case"deleteByDrag":$i(lo),Li(r,Fe,e);break;case"deleteByCut":Li(r,Fe,e);break;case"deleteContent":Li(r,Ae,!1);break;case"deleteWordBackward":Li(r,Re,!0);break;case"deleteWordForward":Li(r,Re,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Li(r,Le,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Li(r,Le,!1);break;case"formatStrikeThrough":Li(r,Ke,"strikethrough");break;case"formatBold":Li(r,Ke,"bold");break;case"formatItalic":Li(r,Ke,"italic");break;case"formatUnderline":Li(r,Ke,"underline");break;case"historyUndo":Li(r,ze,void 0);break;case"historyRedo":Li(r,$e,void 0)}return!0}function Kn(t){const e=Hr(),n=e._inputState,o=_r(),r=t.data,l=Dn(t);let c=!1;if(null!=r&&Uo(o)){const a=nl(ji(e)),u=null!==a?dl(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Do(h)&&Xs(h);if(!d&&!g&&On(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=Wn(e,r);if(n.compositionPhase="idle",t)return $i(ao),mi(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;i&&!o.isCollapsed()&&Do(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===Ti(u.anchorNode)||Li(e,Ie,r);const _=r.length;s&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,ii(null))}}if(!c){Ni(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(Wn(e,r||void 0),$i(ao),n.compositionPhase="idle")}return mi(),!0}function Bn(t){const e=Hr(),n=e._inputState,o=_r();if(Uo(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,s=o.anchor.getNode();if(ii(r.key),$i(co),t.timeStamp{Wn(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return bi(t,"ArrowRight",{shiftKey:"any"})}(t))Li(e,Ue,t);else if(function(t){return bi(t,"ArrowRight",{...Mi,shiftKey:"any"})}(t))Li(e,He,t);else if(function(t){return bi(t,"ArrowLeft",{shiftKey:"any"})}(t))Li(e,je,t);else if(function(t){return bi(t,"ArrowLeft",{...Mi,shiftKey:"any"})}(t))Li(e,Ye,t);else if(function(t){return bi(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Li(e,Je,t);else if(function(t){return bi(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Li(e,Ge,t);else if(function(t){return bi(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Li(e,Ve,t);else if(function(t){return" "===t.key}(t))Li(e,qe,t);else if(function(t){return r&&bi(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Li(e,we,!0);else if(function(t){return bi(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Li(e,Ve,t);else if(function(t){return bi(t,"Backspace",{shiftKey:"any"})||r&&bi(t,"h",{ctrlKey:!0})}(t))wi(t)?Li(e,Xe,t)&&Fn(n):(t.preventDefault(),Li(e,Ae,!0));else if(function(t){return"Escape"===t.key}(t))Li(e,Qe,t);else if(function(t){return bi(t,"Delete",{})||r&&bi(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Li(e,Ae,!1)):Li(e,Ze,t);else if(function(t){return bi(t,"Backspace",Ai)}(t))t.preventDefault(),Li(e,Re,!0);else if(function(t){return bi(t,"Delete",Ai)}(t))t.preventDefault(),Li(e,Re,!1);else if(function(t){return r&&bi(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Li(e,Le,!0);else if(function(t){return r&&(bi(t,"Delete",{metaKey:!0})||bi(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Li(e,Le,!1);else if(function(t){return bi(t,"b",Mi)}(t))t.preventDefault(),Li(e,Ke,"bold");else if(function(t){return bi(t,"u",Mi)}(t))t.preventDefault(),Li(e,Ke,"underline");else if(function(t){return bi(t,"i",Mi)}(t))t.preventDefault(),Li(e,Ke,"italic");else if(function(t){return bi(t,"Tab",{shiftKey:"any"})}(t))Li(e,tn,t);else if(function(t){return bi(t,"z",Mi)}(t))t.preventDefault(),Li(e,ze,void 0);else if(function(t){if(r)return bi(t,"z",{metaKey:!0,shiftKey:!0});return bi(t,"y",{ctrlKey:!0})||bi(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Li(e,$e,void 0);else{const o=e._editorState._selection;!function(t){return bi(t,"a",Mi)}(t)?null===o||Uo(o)||(!function(t){return bi(t,"c",Mi)}(t)?function(t){return bi(t,"x",Mi)}(t)&&(t.preventDefault(),Li(e,fn,t)):(t.preventDefault(),Li(e,un,t))):(t.preventDefault(),Li(e,dn,t)&&Fn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(xn,t),!0}function Hn(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const jn=new Map;function Yn(t){const e=ol(t.target);if(null===e)return;const n=zi(t.target);let o=null,r=null;const s=null!==n?kn.get(n):void 0;if(null!==n){if(void 0!==s){const t=s.editors;let n=s.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&rl(e._rootElement.getRootNode())){n=!0;break}s.hasShadowEditor=n}if(n){let n=null,s=null;for(const i of t){const t=i._rootElement;if(null===t)continue;const l=dl(e,t).anchorNode;if(null!==l&&Gs(l)===i){if(rl(t.getRootNode())){o=i,r=l;break}null===n&&(n=i,s=l)}}null===o&&null!==n&&(o=n,r=s)}else{const t=e.anchorNode;null===t||xl(t)&&null!==t.shadowRoot||(o=Gs(t),null!==o&&(r=t))}}if(null===o){const t=ml(n);o=null!==t?Gs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==s)for(const t of s.editors)t._inputState.isSelectionChangeFromMouseDown=!1;ss(o,()=>{const n=pr(),s=r??dl(e,o._rootElement).anchorNode;if(xl(s)||Qs(s)){pi(gr(n,e,o,t))}})}const i=Ci(o),l=i[i.length-1],c=l._key,a=jn.get(c),u=a||l;u!==o&&Mn(e,u,!1),Mn(e,o,!0),o!==l?jn.set(c,o):a&&jn.delete(c)}function Jn(t){t._lexicalHandled=!0}function Gn(t){return!0===t._lexicalHandled}const Vn=()=>{};function qn(e){const n=vn.get(e);if(void 0===n)return void Vn();const o=kn.get(n);if(void 0===o)return void Vn();vn.delete(e);const r=Vs(e);Js(r)?(!function(t){if(null!==t._parentEditor){const e=Ci(t),n=e[e.length-1]._key;jn.get(n)===t&&jn.delete(n)}else jn.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const s=Hn(e);for(let t=0;tt.__key===this.__key);if(Do(this))return n;if(Uo(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(fs(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:ci(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Vi(n)||null!==Zl(e))return cs(e)||e===this&&fs(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:ci(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:ci(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=cs(this)?this:this.getParent(),n=cs(t)?t:t.getParent(),o=e&&n?qc(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=qc(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Jc(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Ui(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let s=this;for(;null!==s;){const i=s.__key;if(r.has(i)||(r.add(i),o.push(s)),s===e)break;const l=cs(s)?n?s.getFirstChild():s.getLastChild():null;if(null!==l){s=l;continue}const c=n?s.getNextSibling():s.getPreviousSibling();if(null!==c){s=c;continue}const a=s.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);s=u}return n||o.reverse(),o}isDirty(){const t=Hr()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(Zn(this))return this;const e=ci(this.__key);return null===e&&t(113),e}getWritable(){if(Zn(this))return this;$r();const t=Ur(),e=Hr(),n=t._nodeMap,o=this.__key,r=this.getLatest(),s=e._cloneNotNeeded,i=_r();if(null!==i&&i.setCachedNodes(null),s.has(o))return si(r),r;const l=Fl(r);return s.add(o),si(l),n.set(o,l),l}getTextContent(){return dc(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new B(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of gt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&ht(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){Xn(this,!0,t)}replace(e,n){$r();let o=_r();null!==o&&(o=o.clone()),Qi(this,e);const r=this.getLatest(),s=this.__key,i=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;oi(l),null!==u&&Uo(o)&&mr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(Xn(r,!1,!0),null===d)c.__first=i;else{d.getWritable().__next=i}if(l.__prev=g,null===h)c.__last=i;else{h.getWritable().__prev=i}l.__next=_,l.__parent=p,c.__size=a;let m=0;n&&(cs(this)&&cs(l)||t(139),m=l.getChildrenSize(),l.splice(m,0,this.getChildren()));const y=rc(this);if(y.length>0){Xl(this)&&Xl(l)||t(368,this.__key,l.__key);for(const t of y){const e=sc(this,t);null!==e&&(pc(this,t),_c(l,t,e))}}if(Uo(o)){pi(o);const t=o.anchor,e=o.focus;t.key===s&&(n&&"element"===t.type?t.set(l.__key,m+t.offset,"element"):zo(t,l)),e.key===s&&(n&&"element"===e.type?e.set(l.__key,m+e.offset,"element"):zo(e,l))}return li()===s&&ii(i),l}insertAfter(t,e=!0){$r(),Qi(this,t);const n=this.getWritable(),o=t.getWritable();mc(this.getParentOrThrow());const r=o.getParent(),s=_r();let i=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(Uo(s)){const t=r.__key,e=s.anchor,o=s.focus;i="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}oi(o),e&&Uo(s)&&mr(s,r,n,-1)}else oi(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&Uo(s)){const t=this.getIndexWithinParent();mr(s,a,t+1);const e=a.__key;i&&s.anchor.set(e,t+2,"element"),l&&s.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){$r(),Qi(this,t);const n=this.getWritable(),o=t.getWritable();mc(this.getParentOrThrow());const r=o.__key,s=_r(),i=o.getParent(),l=null!==i?o.getIndexWithinParent():-1;oi(o),null!==i&&e&&Uo(s)&&mr(s,i,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&Uo(s)){mr(s,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return bs()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){$r();const n=tc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(cs(o))return o.select();if(!Do(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){$r();const n=tc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(cs(o))return o.select(0,0);if(!Do(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function no(t){return t instanceof eo}const oo="history-merge",ro="collaboration",so="skip-scroll-into-view",io="skip-dom-selection",lo="skip-selection-focus",co="composition-start",ao="composition-end",uo="!important";function fo(t){const e={};if(!t)return e;let n="",o="",r=null,s=!1,i=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===uo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function go(t,e,n=""){if(e===n)return;const o=fo(n),r=fo(e);for(const e in r)delete o[e],ho(t,e,r[e]);for(const e in o)t.removeProperty(e)}function _o(t,e){return 16&e?"code":e&p?"mark":32&e?"sub":64&e?"sup":null}function po(t,e){return 1&e?"strong":2&e?"em":"span"}function mo(t,e,n,o,r){const s=o.classList;let i=Di(r,"base");void 0!==i&&s.add(...i),i=Di(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==i&&(8&n&&4&n?(l=!0,c||s.add(...i)):c&&s.remove(...i));for(const t in A){const o=A[t];if(i=Di(r,t),void 0!==i)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&s.remove(...i);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&s.add(...i)}else e&o&&s.remove(...i)}}function yo(t,e,n){const o=n.isComposing(),r=t+(o?N:""),i=Ol(),l=bl(i).$getDOMSlot(n,e,i),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(al().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(!0||o||s){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,s=0;for(;r({conversion:Oo,priority:0}),b:()=>({conversion:vo,priority:0}),code:()=>({conversion:Ao,priority:0}),em:()=>({conversion:Ao,priority:0}),i:()=>({conversion:Ao,priority:0}),mark:()=>({conversion:Ao,priority:0}),s:()=>({conversion:Ao,priority:0}),span:()=>({conversion:No,priority:0}),strong:()=>({conversion:Ao,priority:0}),sub:()=>({conversion:Ao,priority:0}),sup:()=>({conversion:Ao,priority:0}),u:()=>({conversion:Ao,priority:0})}}static importJSON(t){return wo().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return xl(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Co(n,"b")),this.hasFormat("italic")&&(n=Co(n,"i")),this.hasFormat("strikethrough")&&(n=Co(n,"s")),this.hasFormat("underline")&&(n=Co(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?A[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?w[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=ei(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=P[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){$r();let n=t,o=e;const r=_r(),s=this.getTextContent(),i=this.__key;if("string"==typeof s){const t=s.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!Uo(r))return fr(i,n,i,o,"text","text");{const t=li();t!==r.anchor.key&&t!==r.focus.key||ii(i),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),s=r.__text,i=n.length;let l=t;l<0&&(l=i+l,l<0&&(l=0));const c=_r();if(o&&Uo(c)){const e=t+i;c.setTextNodeRange(r,e,r,e)}const a=s.slice(0,l)+n+s.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){$r();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=li(),s=n.length;t.sort((t,e)=>t-e),t.push(s);const i=[],l=t.length;for(let e=0,o=0;ee&&(i.push(n.slice(e,r)),e=r)}const c=i.length;if(1===c)return[e];const a=i[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,m=null;const y=_r();if(Uo(y)){const[t,e]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(m=e)}e.isSegmented()?(f=wo(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=xt(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=T&&(p.set(t.getKey(),C-T,"text"),C=T){m.set(t.getKey(),S-T,"text");break}T=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&si(e);null!==n&&si(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),Uo(y)&&mr(y,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,s=this.__text,i=s.length;li()===r&&ii(o);const l=_r();if(Uo(l)){const t=l.anchor,s=l.focus;null!==t&&t.key===r&&Cr(t,n,o,e,i),null!==s&&s.key===r&&Cr(s,n,o,e,i)}const c=e.__text,a=n?c+s:s+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function No(t){return{forChild:Io(t.style),node:null}}function vo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Io(e.style,n?void 0:"bold"),node:null}}const ko=new WeakMap;function Eo(t){if(!xl(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Oo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=ko.get(n))&&!Eo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=bo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:wo(o)}}function bo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,xl(n)){const t=n.style.display;if(""===t&&!Nl(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(Qs(n))return n;if("BR"===n.nodeName)return null}}const Mo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ao(t){const e=Mo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Io(t.style,e),node:null}}function wo(t=""){return Xi(new To(t))}function Do(t){return t instanceof To}function Io(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,s=o.includes("line-through"),i="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Do(t)||So(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),s&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),i&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Po extends To{static getType(){return"tab"}static clone(t){return new Po(t.__key)}constructor(t){super("\t",t),this.__detail=2}static importDOM(){return null}createDOM(t){const e=super.createDOM(t),n=Di(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}static importJSON(t){return Fo().updateFromJSON(t)}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fo(){return Xi(new Po)}function Ro(t){return t instanceof Po}class Lo{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!cs(e)){const t=e.getNextSibling();if(Do(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function zo(t,e){if(cs(e)){const n=e.getLastDescendant();cs(n)||Do(n)?Bo(t,n):Bo(t,e)}else Bo(t,e)}class $o{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!jo(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new $o(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===Zl(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Do(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===Zl(t));if((_r()||pr())===this&&t[0]){const e=Ic(t[0],"next");Zc(Hc(e,e))}for(const e of t)e.remove();Wo()}}function Wo(){const t=_i();if(t.isEmpty()){const e=bs();t.append(e),e.select()}}function Uo(t){return t instanceof Ho}class Ho{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!Uo(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,s=new Set;for(const n of t)if(Mc(n)){const{origin:t}=n;0===e.length?r.add(t):(s.add(t),e.push(t))}else{const{origin:t}=n;cs(t)&&s.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(bc(t.focus)&&cs(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=Lc(t.focus.origin,"previous");Mc(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Bc(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!cs(t)||s.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=ia(t.anchor),o=ia(t.anchor.getFlipped()),r=t=>Oc(t)?t.origin:t.getNodeAtCaret(),s=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(s)}return e}(aa(ea(this),"next"));return zr()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,s=o.isBefore(r),[i,l]=Vo(this);let c="",a=!0;for(let u=0;u=0;t--){const e=i[t];if(e.is(d)||cs(e)&&e.isParentOf(d))break;e.isAttached()&&(!g.has(e)||e.is(s)?p||m.insertAfter(e,!1):e.remove())}if(!p){let t=r,e=null;for(;null!==t;){const o=t.getChildren(),r=o.length;(0===r||o[r-1].is(e))&&(n.delete(t.__key),e=t),t=t.getParent()}}if(qs(d))if(c===h)d.select();else{const t=wo(e);t.select(),d.replace(t)}else d=d.spliceText(c,h-c,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let t=1;t(cs(t)||fs(t))&&!t.isInline())){cs(r)||t(211,o.constructor.name,o.getType());const n=Or(this);return r.splice(n,0,e),void s.selectEnd()}if(cs(r)&&null!==Zl(r)){const t=Or(this),n=Er(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Ar(e),n=t.getLastDescendant();let o=Xc(this.anchor,"next");for(const e of t.getChildren())o=ga(e,o);return void(null!==n&&n.selectEnd())}if(cs(r)&&!r.isParentRequired()&&!Vi(r.getParentOrThrow())){const t=Or(this),n=Er(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const i=Ar(e),l=i.getLastDescendant(),c=i.getChildren(),a=!cs(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=Jl(o,El));const u=c[c.length-1];let f=c[0];var d;cs(d=f)&&El(d)&&!d.isEmpty()&&cs(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(cs(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const s=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),s.push(r);let i=e;for(const t of s)i=i.insertAfter(t)}(r,f));const h=Jl(l,El);a&&cs(h)&&(a.canMergeWhenEmpty()||El(u))&&(h.append(...a.getChildren()),a.remove()),cs(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=cs(r)?r.getLastChild():null;Ts(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Vi(e)){const t=bs();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Or(this),o=Jl(this.anchor.getNode(),El);if(null!==o&&null!==Zl(o))return null;cs(o)||t(213);const r=o.getChildAtIndex(n),s=r?[r,...r.getNextSiblings()]:[],i=o.insertNewAfter(this,!1);return i?(i.append(...s),i.selectStart(),i):null}insertLineBreak(t){const e=Ss();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,s]=Vo(this),i=this.isBackward(),[l,c]=i?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=i?[s,r]:[r,s];if(0===e)return[];if(1===e){if(Do(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Do(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Do(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(wr(this,t,e,n))return;const o="move"===t,r=Hr(),s=nl(ji(r));if(!s)return;const i=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===i||!cs(c)||c.isInline()||c.canBeEmpty()||el(i,r,l);const a=Ki(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Do(c)?wl(c,a,r):null),this.dirty){const t=Ki(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Do(n)?wl(n,t,r):null}e&&u&&Sr(s,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Do(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Ic(c,e?"previous":"next").getNodeAtCaret();if(Do(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?wl(t,n,r):null;if(o){const t=e?o.length:0;Sr(s,o,t,o,t)}}}}}if(Qo(s,t,e?"backward":"forward",n),s.rangeCount>0){const t=ul(s,r._rootElement),n=t||s.getRangeAt(0),i=this.anchor.getNode(),l=hs(i)?i:Ji(i);if(this.applyDOMRange(n),this.dirty=!0,!o){Zo(this,e,l);(t?"backward"!==s.direction:s.anchorNode===n.startContainer&&s.anchorOffset===n.startOffset)||Xo(this)}}"lineboundary"===n&&wr(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&cs(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(cs(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=Wc(Xc(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Mc(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=ia(e);ta(this,Hc(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(bc(e)){if(cs(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(fs(e.origin)){if(e.origin.isIsolated());else if(rc(e.origin).length>0){if(cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=hr();t.add(e.origin.getKey()),pi(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&cs(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=hr();t.add(e.origin.getKey()),pi(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(rc(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(ta(this,Hc(!e.origin.isEmpty()&&n.isEmpty()?na(Ic(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==Zl(t))return;if(cs(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(tr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&qo(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,s=o.getTextContentSize();if(o.is(n)||t&&e!==s||!t&&0!==e)return void nr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,s=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==s)return void nr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),s=o.getNode();if(r===s&&"text"===n.type&&"text"===o.type){const t=n.offset,s=o.offset,i=t0&&(g===h.getTextContentSize()||Xs(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;tei(t,e,o))}function Go(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Vo(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[Go(n),Go(o)]}function qo(t,e){for(let n=e;n;n=n.getParent()){if(cs(n)){if(n.collapseAtStart(t))return!0;if(Vi(n))break}if(n.getPreviousSibling())break}return!1}function Xo(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,s=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,s,!0)}function Qo(t,e,n,o){t.modify(e,n,o)}function Zo(t,e,n){const o=t.getNodes(),r=o.filter(t=>Ui(t,n));if(0===r.length||r.length===o.length)return!1;const s=e?r[0]:r[r.length-1],i=cs(s)?s:s.getParentOrThrow();return e?i.selectStart():i.selectEnd(),!0}function tr(t,e,n){if(wr(t,"extend",e,n))return;const o=Hr(),r=nl(ji(o));if(!r||"function"!=typeof r.modify)return;const s=o._blockCursorElement,i=o._rootElement,l=t.anchor,c=t.focus.getNode();null===i||null===s||!cs(c)||c.isInline()||c.canBeEmpty()||el(s,o,i);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Do(e)?wl(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Sr(r,_,p,_,p),Qo(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const m=ul(r,i)||r.getRangeAt(0),y=m.startContainer,x=m.startOffset;if(h&&"character"===n&&"text"===l.type&&Do(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Ic(u,e?"previous":"next").getNodeAtCaret();if(Do(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=y===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,T,N]=e?[y,x,f,d]:[f,d,y,x],v=hs(u)?u:Ji(u);t.applyDOMRange({collapsed:!1,endContainer:T,endOffset:N,startContainer:C,startOffset:S}),t.dirty=!0,!Zo(t,e,v)&&e&&Xo(t),"lineboundary"===n&&wr(t,"extend",e,n,"decorators")}const er=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function nr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),s=r.length;let i=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function or(e,n,o,r){let s,i=n,l=!1;if(xl(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;i===u&&u>0&&(c=!0,i=u-1),void 0!==fi(e,r)||Wl(e,r)||(l=!0);let d=a[i],h=!1;if(d===f)d=a[i+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&i--}}if(s=yi(d),Do(s))i=Fc(s,c?"next":"previous");else{let a=yi(e);if(null===a)return null;if(cs(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=Ml(a,l,r);[a,i]=u.resolveChildIndex(a,l,e,n),cs(a)||t(215),c&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(i);if(cs(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=cs(f)?f:f.getParentOrThrow()),i=0}Do(f)?(s=f,a=null,i=Fc(f,c?"next":"previous")):f!==a&&c&&!h&&(cs(a)||t(216),i=Math.min(a.getChildrenSize(),i+1))}else{const t=tc(a),o=null!==t?t:a,s=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&yi(e)===a){const t=Ml(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&fs(a)&&(c="before")}i="before"===c?s:s+1,a=o.getParentOrThrow()}if(cs(a))return[Ko(a.__key,i,"element"),l]}}else s=yi(e);return Do(s)?[Ko(s.__key,Fc(s,i,"clamp"),"text"),l]:null}function rr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),s=r.getParent();if(e){if((n||!e)&&null===o&&cs(s)&&s.isInline()){const e=s.getPreviousSibling();Do(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else cs(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Do(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&cs(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&cs(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const e=s.getNextSibling();Do(e)&&t.set(e.__key,0,"text")}}}function sr(t,e,n){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);rr(t,n,o),rr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}function ir(t){const e=ci(t.key);return null===e?null:nc(e)}function lr(t,e,n){const o=ir(t),r=ir(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const s=n(o,r);if(null!==o)return cs(o)?e.set(o.getKey(),s?o.getChildrenSize():0,"element"):e.set(o.getKey(),s?o.getTextContentSize():0,"text"),!0;const i=tc(r);if(null===i)return!1;const l=i.getParent();if(null===l)return!1;const c=i.getIndexWithinParent();return e.set(l.getKey(),s?c+1:c,"element"),!0}function cr(t){const e=lr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=tc(n),e=tc(o);if(null!==t&&t.is(e)){for(const e of oc(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=tc(n),o=ci(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=tc(o),s=ci(t.key);return null!==r&&null!==s&&!r.is(s)&&!r.isParentOf(s)&&s.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function ar(t,e,n,o,r,s){if(null===t||null===n||!Ys(r,t,n))return null;const i=or(t,e,Uo(s)?s.anchor:null,r);if(null===i)return null;const l=or(n,o,Uo(s)?s.focus:null,r);if(null===l)return null;const[c,a]=i,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=yi(t),o=yi(n);if(fs(e)&&fs(o))return null}const d=r._slotsUsed&&lr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return sr(c,u),[c,u,a||f||d]}function ur(t){return cs(t)&&!t.isInline()}function fr(t,e,n,o,r,s){const i=Ur(),l=new Ho(Ko(t,e,r),Ko(n,o,s),0,"");return l.dirty=!0,i._selection=l,l}function dr(){const t=Ko("root",0,"element"),e=Ko("root",0,"element");return new Ho(t,e,0,"")}function hr(){return new $o(new Set)}function gr(t,e,n,o){const r=n._window;if(null===r)return null;const s=o||r.event,i=s?s.type:void 0,l="selectionchange"===i,c=!q&&(l||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&s&&3===s.detail||"drop"===i||void 0===i);let a,u,f,d;if(Uo(t)&&!c)return t.clone();{if(null===e)return null;const o=dl(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===i)&&Uo(t)&&!Ys(n,a,u))return t.clone()}const h=ar(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let m=0,y="";if(Uo(t)){const e=t.anchor;if(g.key===e.key)m=t.format,y=t.style;else{const t=g.getNode();Do(t)?(m=t.getFormat(),y=t.getStyle()):cs(t)&&(m=t.getTextFormat(),y=t.getTextStyle())}}const x=new Ho(g,_,m,y);return p&&(x.dirty=!0),x}function _r(){return Ur()._selection}function pr(){return Hr()._editorState._selection}function mr(t,e,n,o=1){const r=t.anchor,s=t.focus,i=r.getNode(),l=s.getNode();if(!e.is(i)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,i=r?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(Do(i)){let t=0;r&&(t=i.getTextContentSize()),e.set(i.__key,t,"text"),o.set(i.__key,t,"text")}return}if(cs(s)){const t=s.getChildrenSize(),o=n>=t,r=o?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(Do(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(cs(i)){const t=i.getChildrenSize(),e=r>=t,n=e?i.getChildAtIndex(t-1):i.getChildAtIndex(r);if(Do(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function xr(t,e,n,o,r){let s=null,i=0,l=null;null!==o?(s=o.__key,Do(o)?(i=o.getTextContentSize(),l="text"):cs(o)&&(i=o.getChildrenSize(),l="element")):null!==r&&(s=r.__key,Do(r)?l="text":cs(r)&&(l="element")),null!==s&&null!==l?t.set(s,i,l):(i=e.getIndexWithinParent(),-1===i&&(i=n.getChildrenSize()),t.set(n.__key,i,"element"))}function Cr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Sr(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Tr(t,e,n){const o=Ki(t,e.getKey());if(cs(e)){const r=Ml(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function Nr(t,e,n,o,r,i){const l=i.getRootNode(),c=Zs(l)||rl(l)?ml(l):null;if(r.has(ro)&&c!==i||null!==c&&Hs(c,c))return;const a=dl(o,i);let u;if(!Uo(e))return void(null!==t&&Ys(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Tr(n,h,f.offset),[m,y]=Tr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let T=_,N=m,v=!1;if("text"===f.type?(T=Do(h)?wl(h,_,n):null,v=h.getFormat()!==x||h.getStyle()!==C):Uo(t)&&"text"===t.anchor.type&&(v=!0),"text"===d.type&&(N=Do(g)?wl(g,m,n):null),null!==T&&null!==N){if(S&&(null===t||v||Uo(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,s){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:s}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===y&&a.anchorNode===T&&a.focusNode===N){if(null===c||!i.contains(c)){const t=null!==c?Gs(c):null;null!==t&&t!==n||r.has(lo)||i.focus({preventScroll:!0})}if("element"!==f.type)return}if(Sr(o,T,p,N,y),s&&e.isCollapsed()&&null!==i&&!r.has(lo)){const t=pl(i);if(null===t||!i.contains(t)){const t=ml(i.ownerDocument),e=null!==t?Gs(t):null;null!==e&&e!==n||i.focus({preventScroll:!0})}}if(!r.has(so)&&e.isCollapsed()&&null!==i&&i===pl(i)){const t=Uo(e)&&"element"===e.anchor.type?T.childNodes[p]||null:(void 0===u&&(u=fl(o,i)),u);if(null!==t){let e;if(Qs(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=zi(n),r=Hi(o);if(null===o||null===r)return;let{top:s,bottom:i}=e,l=0,c=0,a=n;for(;null!==a;){const e=a===o.body;if(e){const e=r.visualViewport;if(e){const t=e.offsetTop;l=t,c=t+e.height}else l=0,c=ji(t).innerHeight;const n=r.getComputedStyle(o.documentElement),s=parseFloat(n.scrollPaddingTop),i=parseFloat(n.scrollPaddingBottom);isFinite(s)&&(l+=s),isFinite(i)&&(c-=i)}else{const t=a.getBoundingClientRect();l=t.top,c=t.bottom}let n=0;if(sc&&(n=i-c),0!==n)if(e)r.scrollBy(0,n);else{const t=a.scrollTop;a.scrollTop+=n;const e=a.scrollTop-t;s-=e,i-=e}if(e)break;a=Bi(a)}}(n,e,i)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function vr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function kr(t){const e=[];return vr(t,{linebreak:()=>e.push(Ss()),tab:()=>e.push(Fo()),text:t=>e.push(wo(t))}),e}function Er(t){const e=[];for(const n of t)Ts(n)||(!cs(n)&&!fs(n)||n.isInline()?e.push(n):cs(n)&&e.push(...Er(n.getChildren())));return e}function Or(e){let n=e;e.isCollapsed()||n.removeText();const o=_r();Uo(o)&&(n=o),Uo(n)||t(161);const r=n.anchor;let s=r.getNode(),i=r.offset;for(;!El(s)&&null===Zl(s);){const t=s;if([s,i]=br(s,i),t.is(s))break}return i}function br(t,e){const n=t.getParent();if(!n){const t=bs();return _i().append(t),t.select(),[_i(),0]}if(Do(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!cs(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new Ho(Ko(t.__key,e,"element"),Ko(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Mr(t){return Ts(t)||Yi(t)||Do(t)||t.isParentRequired()}function Ar(t){const e=bs();let n=null;for(let o=0;o99&&t(14)}function Ur(){return null===Dr&&t(195,Yr()),Dr}function Hr(){return null===Ir&&t(337,Yr()),Ir}function jr(){Hr()._dirtyType=2}function Yr(){let t=0;const e=new Set,n=Ls.version;if("undefined"!=typeof window)for(const o of ll(document)){const r=Vs(o);if(Js(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function Jr(){return Ir}function Gr(t,e,n){const o=e.__type,r=$s(t,o);let s=n.get(o);void 0===s&&(s=Array.from(r.transforms),n.set(o,s));const i=s.length;for(let t=0;t0&&ns(t,t._deferred));const s=t._editorState,i=s._selection,l=n._selection,c=0!==t._dirtyType,a=Dr,u=Pr,f=Ir,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){Ir=t,Dr=n,Pr=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=Ce(s,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),Fr)throw e;return Ds(t,null,o,n),st(t),t._dirtyType=2,Fr=!0,Zr(t,s),void(Fr=!1)}finally{h.observe(o,Br),t._updating=d,Dr=a,Pr=u,Ir=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,m=t._normalizedNodes,y=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let s;for(s in o)r.has(s)||(o===n&&(o=hi(t)),delete o[s])}(t,n);const x=r?null:nl(ji(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(i))&&null!==o&&!y.has(io)){Ir=t,Dr=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&el(e,t,o),Nr(i,l,t,x,y,o)}!function(t,e,n){let o=t._blockCursorElement;if(Uo(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(pl(e))){const r=n.anchor,s=r.getNode(),i=r.offset;let l=!1,c=null;if(i===s.getChildrenSize()){tl(s.getChildAtIndex(i-1))&&(l=!0)}else{const e=s.getChildAtIndex(i);if(null!==e&&tl(e)){const n=e.getPreviousSibling();(null===n||tl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=Ml(s,t.getElementByKey(s.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=al().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=_a(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&el(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,Br),Ir=f,Dr=a}}null!==g&&function(t,e,n,o,r){const s=Array.from(t._listeners.mutation),i=s.length;for(let t=0;t{Lr.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;rs(t,e,o)}}(t)}(t,e)}finally{Rr=n}}function ts(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function es(t,e,n,o){const r=Ci(t);let s;if(!Rr)for(let t=0;t=0;t--)for(let i=0;i0&&l._updating){s=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(ss(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return s&&s.update(()=>{es(s,e,n,o)}),!1}function ns(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Do(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Tt(o),void 0!==o&&Vr(o,s)&&Gr(e,o,i),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){Kr++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&Vr(c,s)&&Gr(e,c,i)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,Kr++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),os(e),function(t,e,n,o){const r=t._nodeMap,s=e._nodeMap,i=[];for(const[t]of o){const e=s.get(t);void 0!==e&&(e.isAttached()||(cs(e)&&V(e,t,r,s,i,o),r.has(t)||o.delete(t),i.push(t)))}for(const t of n){const e=s.get(t);void 0===e||e.isAttached()||(Xl(e)&&null!==e.__slots&&V(e,t,r,s,i,n),r.has(t)||n.delete(t),i.push(t))}for(const t of i)s.delete(t);const l=Hr(),c=l._compositionKey;null===c||s.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const s=a._selection;if(Uo(s)){e._slotsUsed&&cr(s);const n=a._nodeMap,o=s.anchor.key,r=s.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else jo(s)&&0===s._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Zr(e)}finally{Dr=f,Pr=d,Ir=h,e._updating=g,Kr=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,Zr(e)):u&&Us(()=>{Zr(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function ss(t,e,n){Ir===t&&void 0===n?e():rs(t,e,n)}function is(t){if(Vi(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class ls extends eo{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:is,extends:eo})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return I[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===rc(this).length}isDirty(){const t=Hr()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of rc(this)){const n=sc(this,e);cs(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Do(e)&&t.push(e),cs(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;cs(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;cs(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return cs(t)&&t.getLastDescendant()||t||null}const o=e[t];return cs(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:ci(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:ci(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=dc(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&D[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){Zn(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),s=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const i=s.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Vi(this)||this.getChildren().some(Do)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=Ml(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function cs(t){return t instanceof ls}function as(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class us extends eo{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function fs(t){return t instanceof us}class ds extends ls{__cachedText;static getType(){return"root"}static clone(){return new ds}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!zr()&&0!==Hr()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)cs(e)||fs(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return _i().updateFromJSON(t)}collapseAtStart(){return!0}}function hs(t){return t instanceof ds}function gs(t){return new ms(J(t._nodeMap),null,t._slotsUsed)}function _s(){return new ms(new Map([["root",new ds]]),null,!1)}function ps(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),cs(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const s=e.getChildren();for(let t=0;t0){const s={};for(const n of r){const r=sc(e,n);null===r&&t(366,o.name,n),s[n]=ps(r)}n.$slots=s}return n}class ms{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Qr(e&&e.editor||null,this,t)}clone(t){const e=new ms(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Qr(null,this,()=>({root:ps(_i())}))}}class ys extends ls{static getType(){return"artificial"}createDOM(t){return al().createElement("div")}}class xs extends eo{static getType(){return"linebreak"}static clone(t){return new xs(t.__key)}constructor(t){super(t)}getTextContent(){return"\n"}createDOM(){return al().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>Ns(t)||vs(t)?null:{conversion:Cs,priority:0}}}static importJSON(t){return Ss().updateFromJSON(t)}}function Cs(t){return{node:Ss()}}function Ss(){return Xi(new xs)}function Ts(t){return t instanceof xs}function Ns(t){const e=t.parentElement;if(null!==e&&kl(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&ks(n))return!0}}return!1}function vs(t){const e=t.parentElement;if(null!==e&&kl(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&ks(o))return!0}return!1}function ks(t){return Qs(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Es extends ls{static getType(){return"paragraph"}static clone(t){return new Es(t.__key)}createDOM(t){const e=al().createElement("p"),n=Di(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}static importDOM(){return{p:t=>({conversion:Os,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(xl(e)){this.isEmpty()&&e.append(al().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}static importJSON(t){return bs().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Do);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=bs();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Do(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Os(t){const e=bs();if(Kl(e,t),Rl(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in D&&e.setFormat(n)}return Ll(e,t),{node:e}}function bs(){return Xi(new Es)}function Ms(t){return t instanceof Es}function As(t){console.warn(t)}const ws=0;function Ds(t,e,n,o,r){const s=t._keyToDOMMap;s.clear(),t._editorState=_s(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const i=t._observer;null!==i&&(i.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",s.set("root",n),ui(n,t,"root"))}function Is(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Yl(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const Ps={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Ws(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>cs(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>cs(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function Fs(t,e){const n=t.get(e);t.delete(e),n&&n()}function Rs(t,e,n){return t.set(e,n),Fs.bind(null,t,e)}class Ls{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,s,i,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new G,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Si(),this._onError=r,this._onWarn=s,this._htmlConversions=i,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return Rs(this._listeners.update,t)}registerEditableListener(t){return Rs(this._listeners.editable,t)}registerDecoratorListener(t){return Rs(this._listeners.decorator,t)}registerTextContentListener(t){return Rs(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return pa(Rs(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new j,new j,new j,new j,new j]);const s=r.get(e);void 0===s&&t(36,String(e));const i=function(t){return 7&t}(o),l=s[i];return i!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),s.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let s=r.get(e);void 0===s&&(s=new Set,r.set(e,s)),s.add(o);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(e,o),()=>{s.delete(o),0===s.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Pl(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Pl(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=ci(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:oo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return Li(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Di(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,Ds(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||qn(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Hi(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,st(this),this._updateTags.add(oo),Zr(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;vn.set(t,n);let o=kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=Hn(t);r.push(En.register(n));for(let n=0;n{Gn(t)||(Jn(t),(e.isEditable()||"click"===o)&&s(t,e))}:t=>{if(Gn(t))return;Jn(t);const n=e.isEditable();switch(o){case"cut":return n&&Li(e,fn,t);case"copy":return Li(e,un,t);case"paste":return n&&Li(e,Pe,t);case"dragstart":return n&&Li(e,ln,t);case"dragover":return n&&Li(e,cn,t);case"dragend":return n&&Li(e,an,t);case"focus":return n&&Li(e,mn,t);case"blur":return n&&Li(e,yn,t);case"drop":return n&&Li(e,rn,t)}};r.push(Sn(t,o,i))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(oo),Zr(this);ts("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=gs(e),o._selection=e._selection?e._selection.clone():null),rt(this);const r=this._pendingEditorState,s=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=s&&this._updateTags.add(s),Zr(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,ss(this,()=>{if(s&&this._updateTags.add(s),e._parsed)for(const[t,e]of o._nodeMap.entries())cs(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=_s(),r=Dr,s=Pr,i=Ir,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,Dr=o,Pr=!1,Ir=e,Bs(null);try{const r=e._nodes;Xr(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,Dr=r,Pr=s,Ir=i}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&Zr(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):rs(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),ss(this,()=>{const o=_r(),r=_i();null!==o?o.dirty||pi(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),$i("focus"),Wi(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=nl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,ts("editable",this,!0,t),this._slotsUsed&&this.update(()=>jr()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ls.version=H;let Ks=null;function Bs(t){Ks=t}let zs=1;function $s(e,n){const o=Ws(e,n);return void 0===o&&t(30,n),o}function Ws(t,e){return t._nodes.get(e)}const Us="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Hs(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Zs(e)||rl(e)?ml(e):null})();if(!xl(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=di(n),r=n.nodeName;return no(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Vs(n))}const js=Hs;function Ys(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return Gs(e)===t&&t.read("latest",()=>!Hs(e))}function Js(t){return t instanceof Ls}function Gs(t){let e=t;for(;null!=e;){const t=Vs(e);if(Js(t))return t;e=Bi(e)}return null}function Vs(t){return t?t.__lexicalEditor:null}function qs(t){return Ro(t)||t.isToken()}function Xs(t){return qs(t)||t.isSegmented()}function Qs(t){return Cl(t)&&3===t.nodeType}function Zs(t){return Cl(t)&&9===t.nodeType}function ti(t){let e=t;for(;null!=e;){if(Qs(e))return e;e=e.firstChild}return null}function ei(t,e,n){const o=A[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~A.superscript:"superscript"===e?r&=~A.subscript:"lowercase"===e?(r&=~A.uppercase,r&=~A.capitalize):"uppercase"===e?(r&=~A.lowercase,r&=~A.capitalize):"capitalize"===e&&(r&=~A.lowercase,r&=~A.uppercase),r}function ni(t,e){const n=function(){const t=Ks;return Ks=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);$r(),Wr();const o=Hr(),r=Ur(),s=""+zs++;r._nodeMap.set(s,t),cs(t)?o._dirtyElements.set(s,!0):o._dirtyLeaves.add(s),o._cloneNotNeeded.add(s),0===o._dirtyType&&(o._dirtyType=1),t.__key=s}function oi(e){null!==Zl(e)&&t(380,e.__key,String(Zl(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),s=e.getNextSibling(),i=null!==s?s.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==s?s.getWritable():null;null===r&&(o.__first=i),null===s&&(o.__last=l),null!==c&&(c.__next=i),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const ri=oi;function si(e){Wr(),Zn(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Ql(n)?n.__slotHost:null,r=Ur(),s=Hr(),i=r._nodeMap,l=s._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Ql(t)?t.__slotHost:null}}(o,i,l);const c=n.__key;0===s._dirtyType&&(s._dirtyType=1),cs(e)?l.set(c,!0):s._dirtyLeaves.add(c)}function ii(t){$r();const e=Hr(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=ci(n);null!==t&&t.getWritable()}if(null!==t){const e=ci(t);null!==e&&e.getWritable()}}}function li(){if(zr())return null;return Hr()._compositionKey}function ci(t,e){const n=(e||Ur())._nodeMap.get(t);return void 0===n?null:n}function ai(t,e){const n=fi(t,Hr());return void 0!==n?ci(n,e):null}function ui(t,e,n){t[`__lexicalKey_${e._key}`]=n}function fi(t,e){return t[`__lexicalKey_${e._key}`]}function di(t,e){let n=t;for(;null!=n;){const t=ai(n,e);if(null!==t)return t;n=Bi(n)}return null}function hi(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function gi(t){return t.read(()=>_i().getTextContent())}function _i(){return Ur()._nodeMap.get("root")}function pi(t){$r();const e=Ur();null!==t&&(t.dirty=!0,t.setCachedNodes(null),Uo(t)&&Hr()._slotsUsed&&cr(t)),e._selection=t}function mi(){$r();rt(Hr())}function yi(t){const e=function(t,e){let n=t;for(;null!=n;){const t=fi(n,e);if(void 0!==t)return t;n=Bi(n)}return null}(t,Hr());return null===e?null:ci(e)}function xi(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Ci(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function Si(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function Ti(t){return Qs(t)?t.nodeValue:null}function Ni(t,e,n){const o=nl(ji(e));if(null===o)return;const r=dl(o,e._rootElement),s=r.anchorNode;let{anchorOffset:i,focusOffset:l}=r;if(null!==s){let e=Ti(s);const o=di(s);if(null!==e&&Do(o)){if((e===N||e===k)&&n){const t=n.length;e=n,i=t,l=t}null!==e&&vi(o,e,i,l,t)}}}function vi(t,e,n,o,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const i=s.isComposing();if(s.isToken()&&i)return;let c=e;if((i||r)&&(e.endsWith(N)&&(c=e.slice(0,-N.length)),r)){const t=k;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=s.getTextContent();if(r||c!==u){const e=_r();if(""===c){if(ii(null),a||l||d)s.remove();else{const t=Hr();ki(s,"",e),setTimeout(()=>{t.update(()=>{s.isAttached()&&""===s.getTextContent()&&s.remove()})},20)}return}const r=s.getParent(),u=pr(),f=s.getTextContentSize(),h=li(),g=s.getKey();if(s.isToken()&&!i||null!==h&&g===h&&!i||Uo(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!s.canInsertTextBefore()&&!i||u.focus.key===t.__key&&u.focus.offset===f&&!s.canInsertTextAfter()&&!i))return void s.markDirty();if(!Uo(e)||null===n||null===o)return void ki(s,c,e);if(e.setTextNodeRange(s,n,s,o),s.isSegmented()){const t=wo(s.getTextContent());s.replace(t),s=t}ki(s,c,e)}}}function ki(t,e,n){if(t.setTextContent(e),Uo(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const s=n[r];"text"===s.type&&s.key===e&&(s.offset=Fc(t,s.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function Ei(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function Oi(t,e){return Ei(t,e,"altKey")&&Ei(t,e,"ctrlKey")&&Ei(t,e,"shiftKey")&&Ei(t,e,"metaKey")}function bi(t,e,n){if(!Oi(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const Mi={ctrlKey:!r,metaKey:r},Ai={altKey:r,ctrlKey:!r};function wi(t){return"Backspace"===t.key}function Di(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=_a(r);return n[e]=t,t}return r}function Ii(e,n,o,r,s){if(0===o.size)return;const i=r.__type,l=r.__key,c=n.get(i);void 0===c&&t(33,i);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===s;(void 0===f||d)&&u.set(l,d?"updated":s)}function Pi(t,e,n){const o=t.getParent();let r=n,s=t;return null!==o&&(e&&0===n?(r=s.getIndexWithinParent(),s=o):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=o)),s.getChildAtIndex(e?r-1:r)}function Fi(t,e){const n=t.offset;if("element"===t.type){return Pi(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Pi(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Ri(t){const e=ji(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Li(t,e,n){return es(t,e,n,t)}function Ki(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function Bi(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return rl(n)?n.host:null}function zi(t){return Zs(t)?t:xl(t)?t.ownerDocument:null}function $i(t){$r();Hr()._updateTags.add(t)}function Wi(t){$r();Hr()._deferred.push(t)}function Ui(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Hi(t){const e=zi(t);return e?e.defaultView:null}function ji(e){const n=e._window;return null===n&&t(78),n}function Yi(t){return cs(t)&&t.isInline()||fs(t)&&t.isInline()}function Ji(t){let e=t.getLatest();for(;null!==e;){if(null!==Zl(e)&&cs(e))return e;const t=e.getParentOrThrow();if(Vi(t))return t;e=t}return e}function Gi(t){return cs(t)&&t.isShadowRoot()}function Vi(t){return hs(t)||Gi(t)}function qi(t,e=!1){const n=t.constructor.clone(t);return ni(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Xi(e){const n=Hr(),o=e.getType(),r=Ws(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:s,replaceWithKlass:i}=r;if(null!==s){const n=s(e),r=n.constructor;return null!==i?n instanceof i||t(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function Qi(e,n){!hs(e.getParent())||cs(n)||fs(n)||t(99)}function Zi(e){const n=ci(e);return null===n&&t(63,e),n}function tl(t){if(!t||t.isInline())return!1;if(fs(t))return!0;if(cs(t)){if(t.isShadowRoot()){const e=t.getParent();return!(cs(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function el(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function nl(t){return n?(t||window).getSelection():null}function ol(t){const e=Hi(t);return e?e.getSelection():null}function rl(t){return Sl(t)&&"host"in t}const sl=[];function il(t){const e=t.getRootNode();if(e===t||!rl(e))return sl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!rl(t))break;n.push(t),o=t.host}return n}function*ll(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Zs(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function cl(t){return null!==t?t.ownerDocument:document}function al(){const t=Jr();return cl(null!==t?t._rootElement:null)}function ul(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=il(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function fl(t,e){const n=ul(t,e);if(null!==n){const t=hl(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function dl(t,e){const n=ul(t,e);return null===n?t:gl(n,_l(t))}function hl(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function gl(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:s}=t;return"backward"===e?{anchorNode:r,anchorOffset:s,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:s}}function _l(t){return t.direction}function pl(t){const e=t.getRootNode();return Zs(e)||rl(e)?e.activeElement:null}function ml(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function yl(t){const e=t.target;if(null!==e&&xl(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function xl(t){return Cl(t)&&1===t.nodeType}function Cl(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function Sl(t){return Cl(t)&&11===t.nodeType}const Tl=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function Nl(t){return!(!xl(t)||!t.style.display.startsWith("inline"))||Tl.test(t.nodeName)}const vl=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function kl(t){return(!xl(t)||!t.style.display.startsWith("inline"))&&vl.test(t.nodeName)}function El(t){if(fs(t)&&!t.isInline())return!0;if(!cs(t)||Vi(t))return!1;const e=t.getFirstChild(),n=null===e||Ts(e)||Do(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Ol(){return Hr()}function bl(t=Ol()){return t._config.dom||Ps}function Ml(e,n,o=Ol()){const r=bl(o).$getDOMSlot(e,n,o);return cs(e)&&(Al(r)||t(344,e.getKey(),e.getType())),r}function Al(t){return t instanceof $}function wl(t,e,n=Ol()){return ti(Ml(t,e,n).element)}const Dl=new WeakMap,Il=new Map;function Pl(e){if(!e._readOnly&&e.isEmpty())return Il;e._readOnly||t(192);let n=Dl.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Dl.set(e,n)),n}function Fl(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function Rl(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Ll(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Kl(t,e){const n=e.style.textAlign;return n&&n in D?t.setFormat(n):t}function Bl(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function zl(t){return!0===t.__lexicalUnmanaged}function $l(t,e=Ol()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Wl(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(xl(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==fi(n,e))return!1;n=Bi(n)}return!1}function Ul(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==eo[e]}const Hl=new WeakMap;function jl(e){const n=Hl.get(e);if(n)return n;const o=null!=e.prototype&&R in e.prototype?e.prototype[R]():void 0,r=function(e){if(!(e===eo||e.prototype instanceof eo)){let n="",o="";try{n=e.getType()}catch(t){}try{Ls.version&&(o=JSON.parse(Ls.version))}catch(t){}t(290,e.name,n,o)}return e===us||e===ls||e===eo}(e),s=!r&&Ul(e,"getType")?e.getType():void 0;let i,l=s;if(o)if(s)i=o[s];else{for(const[t,e]of Object.entries(o))l=t,i=e;if(!i)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){i=e;break}}}if(!r&&l&&(Ul(e,"getType")||(e.getType=()=>l),Ul(e,"clone")||(e.clone=t=>(Bs(t),new e)),Ul(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(t=>(new e).updateFromJSON(t))),!Ul(e,"importDOM")&&i)){const{importDOM:t}=i;t&&(e.importDOM=()=>t)}const c={klass:e,ownNodeConfig:i,ownNodeType:l};return Hl.set(e,c),c}function*Yl(t){for(let e=t;e&&(e===eo||no(e.prototype));){const t=jl(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Vl(e)}}const Jl=(t,e)=>{let n=t;for(;null!=n&&!hs(n);){if(e(n))return n;n=n.getParent()}return null};function Gl(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?ci(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Vl(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const ql=new Map;function Xl(t){return cs(t)||fs(t)}function Ql(t){return cs(t)||fs(t)}function Zl(t){const e=t.getLatest();return Ql(e)?e.__slotHost:null}function tc(e){const n=Zl(e);if(null===n)return null;const o=ci(n);return cs(o)||fs(o)||t(370),o}function ec(t){const e=tc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of oc(e))if(o===n)return t;return null}function nc(t){let e=t.getLatest();for(;null!==e;){if(null!==Zl(e))return e;e=e.getParent()}return null}function oc(t){const e=t.getLatest();return Xl(e)&&null!==e.__slots?e.__slots:ql}function rc(t){return Array.from(oc(t).keys())}function sc(t,e){const n=oc(t).get(e);return void 0===n?null:ci(n)}const ic=["__proto__","constructor","prototype"],lc=Symbol("slotMapOwner");function cc(t){let e=t.__slots;return null!==e&&e[lc]===t||(e=new Map(e),e[lc]=t,t.__slots=e),e}const ac=new WeakMap,uc=[];function fc(t){for(const{ownNodeConfig:e}of Yl(t)){const t=e&&e.slots;if(t)return t}return uc}function dc(t){let e="";for(const n of rc(t)){const o=sc(t,n);null!==o&&(e+=o.getTextContent())}return e}function hc(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function gc(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=ac.get(e);if(void 0===n){const o=fc(e),r=new Map;for(const n of o)ic.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,ac.set(e,n)}return n}(e.constructor);let r=null,s=!0;for(const t of n.keys()){if(null!==r&&hc(r,t,o)>0){s=!1;break}r=t}if(s)return;const i=Array.from(n).sort(([t],[e])=>hc(t,e,o));n.clear();for(const[t,e]of i)n.set(t,e)}function _c(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!cs(o)&&!fs(o)||o.isInline())&&t(374,o.__key);const s=e.getWritable(),i=cc(s),l=i.get(n);void 0!==l&&yc(l);const c=o.getWritable(),a=tc(c);if(null!==a){const t=ec(c);null!==t&&cc(a.getWritable()).delete(t),c.__slotHost=null}return oi(c),c.__slotHost=s.__key,i.set(n,c.__key),gc(s),function(){const t=Ol();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),s}function pc(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(yc(o),cc(n).delete(e)),n}function mc(t,e){}function yc(e){const n=ci(e);if(null===n)return;const o=n.getWritable();Ql(o)||t(377,e),o.__slotHost=null,o.remove()}const xc={next:"previous",previous:"next"};class Cc{origin;constructor(t){this.origin=t}[Symbol.iterator](){return jc({hasNext:bc,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ic(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ic(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let s=this;const i=this.getParentAtCaret(),l=new Map;for(let t=s.getAdjacentCaret();null!==t&&l.size0){const n=s.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||s.origin.is(e));else{const t=e.getParent();t&&t.is(i)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else s.insert(e);s=Ic(e,this.direction)}for(const t of l.values())t.remove();return this}}class Sc extends Cc{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lc(t,this.direction)}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Nc(this.direction);return Ic(this.getNodeAtCaret(),t)||Lc(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof Sc&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Tc={root:hs,shadowRoot:Vi};function Nc(t){return xc[t]}function vc(t,e="root"){return null===t||Tc[e](t)?null:null===Zl(t)?t:null}class kc extends Cc{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ic(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return cs(this.origin)?Lc(this.origin,this.direction):null}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Nc(this.direction);return Ic(this.getNodeAtCaret(),t)||Lc(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof kc&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof kc||t instanceof Ec)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Ec extends Cc{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Pc(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ic(vc(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Pc(this.origin,Nc(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Ec&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof kc||t instanceof Ec)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ic(this.origin,this.direction)}}function Oc(t){return t instanceof Ec}function bc(t){return t instanceof kc}function Mc(t){return t instanceof Sc}const Ac={next:class extends Ec{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ec{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},wc={next:class extends kc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends kc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Dc={next:class extends Sc{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends Sc{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Ic(t,e){return t?new wc[e](t):null}function Pc(t,e,n){return t?new Ac[e](t,Fc(t,n)):null}function Fc(t,n,o="error"){const r=t.getTextContentSize();let s="next"===n?r:"previous"===n?0:n;return(s<0||s>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),s=s<0?0:r),s}function Rc(t,e){return new $c(t,e)}function Lc(t,e){return cs(t)?new Dc[e](t):null}function Kc(t){return t&&t.getChildCaret()||t}function Bc(t){return t&&Kc(t.getAdjacentCaret())}class zc{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new zc(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return Oc(e)?function(t,e){const{direction:n,origin:o}=t,r=Fc(o,"focus"===e?Nc(n):n);return Rc(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Rc(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=Oc(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=Oc(n),r=e=>e.isSameNodeCaret(n)?null:Bc(e)||e.getParentCaret(t);return jc({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class $c{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&El(t));if(f&&rc(f).length>0)return null;return u&&f?[u,f]:null}(f,d,a);if(h){const[t,e]=h;Lc(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(d){const t=function(t){if(Mc(t)){const e=t.origin;if(El(e))return e}else{const e=t.getParentAtCaret();if(e&&El(e))return e}return null}(d),e=t&&t.getParent(),n=t&&t.getParents().findLast(Gi);if(t&&e&&!hs(e)&&t.isEmpty()&&a.has(t.getKey())&&0===rc(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!hs(n)&&n.isEmpty();){const t=n.getParent();if(t&&hs(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const g=[f,d,...l,...c].find(ra);if(g){return Uc(ca(ia(g),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function ia(t){const e=function(t){let e=t;for(;Mc(e);){const t=Bc(e);if(!Mc(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Do(e.origin))return Oc(e)?e:Pc(e.origin,n,n);const o=e.getAdjacentCaret();return bc(o)&&Do(o.origin)?Pc(o.origin,n,Nc(n)):e}function la(t){return Oc(t)&&t.offset!==Fc(t.origin,t.direction)}function ca(t,e){return t.direction===e?t:t.getFlipped()}function aa(t,e){return t.direction===e?t:Hc(ca(t.focus,e),ca(t.anchor,e))}function ua(t,e,n){let o=Lc(t,"next");for(let t=0;t0||!s&&n.canBeEmpty()&&r(n,"last"))&&i.insert(e(n).splice(0,0,o))}return i}function ga(e,n,o){let r=ca(n,"next");Oc(r)&&(0===r.offset?r=Ic(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Ic(r.origin,"next"))),r.origin.is(e)&&(bc(r)||t(342,e.getKey(),e.getType()),r=na(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=ha(t,o))r=t;return Oc(r)&&t(283),r.insert(e.isInline()?bs().append(e):e),ca(Ic(e.getLatest(),"next"),n.direction)}function _a(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function pa(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}exports.$addUpdateTag=$i,exports.$applyNodeReplacement=Xi,exports.$assumeActiveEditor=function(t){null!==Ur()&&null===Ir&&(Ir=t),Ir!==t&&e(378)},exports.$caretFromPoint=Xc,exports.$caretRangeFromSelection=ea,exports.$cloneWithProperties=Fl,exports.$cloneWithPropertiesEphemeral=function(t){return(e=Fl(t))[Qn]=!0,e;var e},exports.$comparePointCaretNext=Yc,exports.$copyNode=qi,exports.$create=function(t){const e=Ol();return $r(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)},exports.$createChildrenArray=Gl,exports.$createLineBreakNode=Ss,exports.$createNodeSelection=hr,exports.$createParagraphNode=bs,exports.$createPoint=Ko,exports.$createRangeSelection=dr,exports.$createRangeSelectionFromDom=function(t,e){return gr(null,t,e,null)},exports.$createTabNode=Fo,exports.$createTextNode=wo,exports.$extendCaretToRange=Wc,exports.$findMatchingParent=Jl,exports.$formatText=Jo,exports.$fullReconcile=jr,exports.$generateNodesFromRawText=kr,exports.$getAdjacentChildCaret=Bc,exports.$getAdjacentNode=Fi,exports.$getAdjacentSiblingOrParentSiblingCaret=function(t,e="root"){let n=0,o=t,r=Bc(o);for(;null===r;){if(n--,r=o.getParentCaret(e),!r)return null;o=r,r=Bc(o)}return r&&[r,n]},exports.$getCaretInDirection=ca,exports.$getCaretRange=Hc,exports.$getCaretRangeInDirection=aa,exports.$getCharacterOffsets=Vo,exports.$getChildCaret=Lc,exports.$getChildCaretAtIndex=ua,exports.$getChildCaretOrSelf=Kc,exports.$getCollapsedCaretRange=Uc,exports.$getCommonAncestor=qc,exports.$getCommonAncestorResultBranchOrder=Jc,exports.$getDOMSlot=Ml,exports.$getDOMTextNode=wl,exports.$getDocument=al,exports.$getEditor=Ol,exports.$getEditorDOMRenderConfig=bl,exports.$getNearestNodeFromDOMNode=di,exports.$getNearestRootOrShadowRoot=Ji,exports.$getNodeByKey=ci,exports.$getNodeByKeyOrThrow=Zi,exports.$getNodeFromDOMNode=ai,exports.$getPreviousSelection=pr,exports.$getRoot=_i,exports.$getSelection=_r,exports.$getSiblingCaret=Ic,exports.$getSlot=sc,exports.$getSlotFrame=nc,exports.$getSlotHost=tc,exports.$getSlotNameWithinHost=ec,exports.$getSlotNames=rc,exports.$getState=at,exports.$getStateChange=function(t,e,n){const o=at(t,n,it),r=at(e,n,it);return n.isEqual(o,r)?null:[o,r]},exports.$getTextContent=function(){const t=_r();return null===t?"":t.getTextContent()},exports.$getTextNodeOffset=Fc,exports.$getTextPointCaret=Pc,exports.$getTextPointCaretSlice=Rc,exports.$getWritableNodeState=ht,exports.$hasAncestor=Ui,exports.$hasUpdateTag=function(t){return Hr()._updateTags.has(t)},exports.$insertNodeToNearestRootAtCaret=ga,exports.$insertNodes=function(t){let e=_r()||pr();null===e&&(e=_i().selectEnd()),e.insertNodes(t)},exports.$isBlockElementNode=ur,exports.$isChildCaret=Mc,exports.$isDecoratorNode=fs,exports.$isEditorState=function(t){return t instanceof ms},exports.$isElementDOMSlot=Al,exports.$isElementNode=cs,exports.$isExtendableTextPointCaret=la,exports.$isInlineElementOrDecoratorNode=Yi,exports.$isInlineFormattable=So,exports.$isLeafNode=function(t){return Do(t)||Ts(t)||fs(t)},exports.$isLexicalNode=no,exports.$isLineBreakNode=Ts,exports.$isNodeCaret=function(t){return t instanceof Cc},exports.$isNodeSelection=jo,exports.$isParagraphNode=Ms,exports.$isRangeSelection=Uo,exports.$isRootNode=hs,exports.$isRootOrShadowRoot=Vi,exports.$isSelectionCapturedInDecoratorInput=Hs,exports.$isShadowRootNode=Gi,exports.$isSiblingCaret=bc,exports.$isSlotChild=Ql,exports.$isSlotHost=Xl,exports.$isTabNode=Ro,exports.$isTextNode=Do,exports.$isTextPointCaret=Oc,exports.$isTextPointCaretSlice=function(t){return t instanceof $c},exports.$isTokenOrSegmented=Xs,exports.$isTokenOrTab=qs,exports.$markSlotEditable=$l,exports.$needsBlockCursorBeside=tl,exports.$nodesOfType=function(t){const e=t.getType(),n=Ur();if(n._readOnly){const t=Pl(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r},exports.$normalizeCaret=ia,exports.$normalizeSelection__EXPERIMENTAL=Nt,exports.$onUpdate=Wi,exports.$parseSerializedNode=function(t){return Xr(t,Hr()._nodes)},exports.$removeFromParent=oi,exports.$removeSlot=pc,exports.$removeTextFromCaretRange=sa,exports.$rewindSiblingCaret=na,exports.$selectAll=function(t){const e=_i();if(Uo(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(hs(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Nt(t),t;const r=o.getTopLevelElementOrThrow(),s=r.getParent();if(null===s)return cs(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),Nt(t)),t;const i=s;return e.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Nt(t),t}{const t=e.select(0,e.getChildrenSize());return pi(Nt(t)),t}},exports.$setCompositionKey=ii,exports.$setDirectionFromDOM=Ll,exports.$setFormatFromDOM=Kl,exports.$setPointFromCaret=Qc,exports.$setSelection=pi,exports.$setSelectionFromCaretRange=Zc,exports.$setSlot=_c,exports.$setState=function(t,e,n){let o;if($r(),"function"==typeof n){const r=t.getLatest(),s=at(r,e);if(o=n(s),e.isEqual(s,o))return r}else o=n;const r=t.getWritable();return ht(r).updateFromKnown(e,o),r},exports.$setTextFormat=function(t,e){const n=[];for(const[t,o]of Object.entries(e))"boolean"==typeof o&&n.push([t,o]);0!==n.length&&Yo(t,t=>{for(const[e,o]of n)t=ei(t,e,o?A[e]:0);return t})},exports.$splitAtPointCaretNext=ha,exports.$splitNode=function(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Vi(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),s=Vi(n),i=e!==o||s?qi(e):e;if(s)return cs(e)&&cs(i)||t(133),e.insertAfter(i),[e,i,i];{const[t,o,s]=r(n),l=e.getNextSiblings();return s.append(i,...l),[t,o,i]}},[s,i]=r(o);return[s,i]},exports.$updateDOMSelection=Nr,exports.$updateRangeSelectionFromCaretRange=ta,exports.ArtificialNode__DO_NOT_USE=ys,exports.BEFORE_INPUT_COMMAND=Ee,exports.BLUR_COMMAND=yn,exports.CAN_REDO_COMMAND=_n,exports.CAN_UNDO_COMMAND=pn,exports.CAN_USE_BEFORE_INPUT=i,exports.CAN_USE_DOM=n,exports.CLEAR_EDITOR_COMMAND=hn,exports.CLEAR_HISTORY_COMMAND=gn,exports.CLICK_COMMAND=ke,exports.COLLABORATION_TAG=ro,exports.COMMAND_PRIORITY_BEFORE_CRITICAL=-4,exports.COMMAND_PRIORITY_BEFORE_EDITOR=-8,exports.COMMAND_PRIORITY_BEFORE_HIGH=-5,exports.COMMAND_PRIORITY_BEFORE_LOW=-7,exports.COMMAND_PRIORITY_BEFORE_NORMAL=-6,exports.COMMAND_PRIORITY_CRITICAL=4,exports.COMMAND_PRIORITY_EDITOR=ws,exports.COMMAND_PRIORITY_HIGH=3,exports.COMMAND_PRIORITY_LOW=1,exports.COMMAND_PRIORITY_NORMAL=2,exports.COMPOSITION_END_COMMAND=Me,exports.COMPOSITION_END_TAG=ao,exports.COMPOSITION_START_COMMAND=be,exports.COMPOSITION_START_TAG=co,exports.CONTROLLED_TEXT_INSERTION_COMMAND=Ie,exports.COPY_COMMAND=un,exports.CUT_COMMAND=fn,exports.CUT_TAG="cut",exports.DEFAULT_EDITOR_DOM_CONFIG=Ps,exports.DELETE_CHARACTER_COMMAND=Ae,exports.DELETE_LINE_COMMAND=Le,exports.DELETE_WORD_COMMAND=Re,exports.DRAGEND_COMMAND=an,exports.DRAGOVER_COMMAND=cn,exports.DRAGSTART_COMMAND=ln,exports.DROP_COMMAND=rn,exports.DecoratorNode=us,exports.ElementNode=ls,exports.FOCUS_COMMAND=mn,exports.FORMAT_ELEMENT_COMMAND=sn,exports.FORMAT_TEXT_COMMAND=Ke,exports.HISTORIC_TAG="historic",exports.HISTORY_MERGE_TAG=oo,exports.HISTORY_PUSH_TAG="history-push",exports.INDENT_CONTENT_COMMAND=nn,exports.INPUT_COMMAND=Oe,exports.INSERT_LINE_BREAK_COMMAND=we,exports.INSERT_PARAGRAPH_COMMAND=De,exports.INSERT_TAB_COMMAND=en,exports.INTERNAL_$isBlock=El,exports.IS_ALL_FORMATTING=2047,exports.IS_ANDROID=c,exports.IS_ANDROID_CHROME=f,exports.IS_APPLE=r,exports.IS_APPLE_WEBKIT=d,exports.IS_BOLD=1,exports.IS_CHROME=u,exports.IS_CODE=16,exports.IS_FIREFOX=s,exports.IS_HIGHLIGHT=p,exports.IS_IOS=l,exports.IS_ITALIC=2,exports.IS_SAFARI=a,exports.IS_STRIKETHROUGH=4,exports.IS_SUBSCRIPT=32,exports.IS_SUPERSCRIPT=64,exports.IS_UNDERLINE=8,exports.KEY_ARROW_DOWN_COMMAND=Ge,exports.KEY_ARROW_LEFT_COMMAND=je,exports.KEY_ARROW_RIGHT_COMMAND=Ue,exports.KEY_ARROW_UP_COMMAND=Je,exports.KEY_BACKSPACE_COMMAND=Xe,exports.KEY_DELETE_COMMAND=Ze,exports.KEY_DOWN_COMMAND=We,exports.KEY_ENTER_COMMAND=Ve,exports.KEY_ESCAPE_COMMAND=Qe,exports.KEY_MODIFIER_COMMAND=xn,exports.KEY_SPACE_COMMAND=qe,exports.KEY_TAB_COMMAND=tn,exports.LineBreakNode=xs,exports.MOVE_TO_END=He,exports.MOVE_TO_START=Ye,exports.NODE_STATE_DIRECT=it,exports.NODE_STATE_KEY="$",exports.NODE_STATE_LATEST=lt,exports.OUTDENT_CONTENT_COMMAND=on,exports.PASTE_COMMAND=Pe,exports.PASTE_TAG="paste",exports.ParagraphNode=Es,exports.REDO_COMMAND=$e,exports.REMOVE_TEXT_COMMAND=Fe,exports.RootNode=ds,exports.SELECTION_CHANGE_COMMAND=Ne,exports.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=ve,exports.SELECT_ALL_COMMAND=dn,exports.SET_TEXT_FORMAT_COMMAND=Be,exports.SKIP_COLLAB_TAG="skip-collab",exports.SKIP_DOM_SELECTION_TAG=io,exports.SKIP_SCROLL_INTO_VIEW_TAG=so,exports.SKIP_SELECTION_FOCUS_TAG=lo,exports.TEXT_TYPE_TO_FORMAT=A,exports.TabNode=Po,exports.TextNode=To,exports.UNDO_COMMAND=ze,exports.addClassNamesToElement=function(t,...e){const n=_a(...e);n.length>0&&t.classList.add(...n)},exports.buildImportMap=function(t){return t},exports.configExtension=function(...t){return t},exports.createCommand=Te,exports.createEditor=function(e){const n=e||{},o=Jr(),r=n.theme||{},s=void 0===e?o:n.parentEditor||null,i=n.disableEvents||!1,l=_s(),c=n.namespace||(null!==s?s._config.namespace:Si()),a=n.editorState,u=[ds,To,xs,Po,Es,ys,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(Ee,Ln,ws),t.registerCommand(Oe,Kn,ws),t.registerCommand(be,Bn,ws),t.registerCommand(Me,zn,ws),t.registerCommand(We,Un,ws)}(p),p},exports.createRefCountedRegistry=Cn,exports.createSharedNodeState=ut,exports.createState=function(t,e){return new ct(t,e)},exports.declarePeerDependency=function(t,e){return[t,e]},exports.defineExtension=function(t){return t},exports.findAllLexicalElementsDeep=ll,exports.flipDirection=Nc,exports.getActiveElement=pl,exports.getActiveElementDeep=ml,exports.getComposedEventTarget=yl,exports.getComposedStaticRange=ul,exports.getDOMOwnerDocument=zi,exports.getDOMSelection=nl,exports.getDOMSelectionFromTarget=ol,exports.getDOMSelectionPoints=dl,exports.getDOMSelectionRange=fl,exports.getDOMSelectionRangeAndPoints=function(t,e){const n=ul(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=hl(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:gl(n,_l(t)),range:o}},exports.getDOMShadowRoots=il,exports.getDOMTextNode=ti,exports.getDeclaredSlots=fc,exports.getEditorPropertyFromDOMNode=Vs,exports.getNearestEditorFromDOMNode=Gs,exports.getParentElement=Bi,exports.getRegisteredNode=Ws,exports.getRegisteredNodeOrThrow=$s,exports.getRegisteredSubtypeMap=function(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=jl(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Yl(o)){const o=n&&e.get(n);o&&o.add(t)}return e},exports.getRootOwnerDocument=cl,exports.getStaticNodeConfig=jl,exports.getStyleObjectFromCSS=fo,exports.getTextDirection=function(t){return b.test(t)?"rtl":M.test(t)?"ltr":null},exports.getTransformSetFromKlass=Is,exports.isBlockDomNode=kl,exports.isCurrentlyReadOnlyMode=zr,exports.isDOMCapturingSelection=Wl,exports.isDOMDocumentNode=Zs,exports.isDOMNode=Cl,exports.isDOMShadowRoot=rl,exports.isDOMTextNode=Qs,exports.isDOMUnmanaged=zl,exports.isDocumentFragment=Sl,exports.isExactShortcutMatch=bi,exports.isHTMLAnchorElement=function(t){return xl(t)&&"A"===t.tagName},exports.isHTMLElement=xl,exports.isHTMLTableCellElement=function(t){return xl(t)&&("TD"===t.tagName||"TH"===t.tagName)},exports.isHTMLTableRowElement=function(t){return xl(t)&&"TR"===t.tagName},exports.isInlineDomNode=Nl,exports.isLastChildInBlockNode=vs,exports.isLexicalEditor=Js,exports.isModifierMatch=Oi,exports.isOnlyChildInBlockNode=Ns,exports.isSelectionCapturedInDecoratorInput=js,exports.isSelectionWithinEditor=Ys,exports.iterStaticNodeConfigChain=Yl,exports.makeStepwiseIterator=jc,exports.mergeRegister=pa,exports.mountSlotContainer=function(t,e,n,o){const r=t.read("latest",()=>{const o=ci(e);return null!==o?function(t,e,n=Ol()){const o=sc(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r},exports.normalizeClassNames=_a,exports.registerEventListener=Sn,exports.registerEventListeners=function(t,e,n){return pa(...Object.entries(e).map(([e,o])=>Sn(t,e,o,n)))},exports.removeClassNamesFromElement=function(t,...e){const n=_a(...e);n.length>0&&t.classList.remove(...n)},exports.removeFromParent=ri,exports.resetRandomKey=function(){zs=1},exports.safeCast=function(t){return t},exports.setDOMStyleFromCSS=go,exports.setDOMStyleObject=function(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):ho(t,n,o)}},exports.setDOMUnmanaged=Bl,exports.setNodeIndentFromDOM=Rl,exports.shallowMergeConfig=function(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t},exports.stopLexicalPropagation=Jn,exports.toggleTextFormatType=ei,exports.tokenizeRawText=vr,exports.unmountSlotContainer=function(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}; -diff --git a/dist/Lexical.prod.mjs b/dist/Lexical.prod.mjs -index f31c59a7d0fac8a48723e60abcc40d3369795158..137b2d6fe7571c2993b63e94da08eeda0d4794ff 100644 ---- a/dist/Lexical.prod.mjs -+++ b/dist/Lexical.prod.mjs -@@ -7,4 +7,4 @@ - */ - - function t(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);n.search=o.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=n&&"documentMode"in document?document.documentMode:null,r=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),i=n&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),s=!(!n||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),l=n&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=n&&/Android/.test(navigator.userAgent),a=n&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,u=n&&/^(?=.*Chrome).*/i.test(navigator.userAgent),f=n&&c&&u,d=n&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&r&&!u,h=0,g=1,_=2,p=1,y=2,m=4,x=8,C=16,S=32,v=64,T=128,k=2047,b=1,N=2,w=3,E=4,O=5,M=6,A=a||l||d?"\xa0":"\u200b",D="\n\n",P=i?"\xa0":A,F="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",I="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",L=new RegExp("^[^"+I+"]*["+F+"]"),K=new RegExp("^[^"+F+"]*["+I+"]"),z={bold:1,capitalize:1024,code:16,highlight:T,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},B={directionless:1,unmergeable:2},R={center:2,end:6,justify:4,left:1,right:3,start:5},W={[N]:"center",[M]:"end",[E]:"justify",[b]:"left",[w]:"right",[O]:"start"},U={normal:0,segmented:2,token:1},$={[h]:"normal",[_]:"segmented",[g]:"token"},H="$",J="$config";function j(){return Cc()._blockCursorElement}function V(t){return null!==t&&1===t.nodeType&&t.hasAttribute("data-lexical-slot")}class q{element;before;after;constructor(t,e,n){this.element=t,this.before=e||null,this.after=n||null}withBefore(t){return new q(this.element,t,this.after)}withAfter(t){return new q(this.element,this.before,t)}withElement(t){return this.element===t?this:new q(t,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return null!==n&&n.parentElement!==this.element&&t(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&t(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&t(359),this.element.replaceChild(e,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;return e===this.getInsertionAnchor()?null:e}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,e,n){if(this.element===t)return e===t&&0===n?"before":"after";const o=Y(t,this.element);if(null===o)return"after";const r=Array.prototype.indexOf.call(t.childNodes,o);if(r<0)return"after";if(e===t)return n<=r?"before":"after";const i=Y(t,e);if(null===i)return"after";const s=Array.prototype.indexOf.call(t.childNodes,i);return s>=0&&s<=r?"before":"after"}getInsertionAnchor(){return this.before}}function Y(t,e){let n=e;for(;null!==n&&n.parentNode!==t;)n=n.parentNode;return n}class G extends q{withBefore(t){return new G(this.element,t,this.after)}withAfter(t){return new G(this.element,this.before,t)}withElement(t){return this.element===t?this:new G(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;for(;V(e);)t=e,e=e.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return null!==n&&n===j()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,null===t)this.removeManagedLineBreak();else{const e="decorator"===t&&(d||l||a);this.insertManagedLineBreak(e)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,n="IMG"===t.nodeName?t.nextSibling:null;n&&e.removeChild(n),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===("IMG"===e.nodeName))return;this.removeManagedLineBreak()}const n=this.element,o=this.before,r=Xl().createElement("br");if(r.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(r,o),t){const t=Xl().createElement("img");t.setAttribute("data-lexical-managed-linebreak","true"),t.style.setProperty("display","inline","important"),t.style.setProperty("border","0px","important"),t.style.setProperty("margin","0px","important"),t.alt="",n.insertBefore(t,r),n.__lexicalLineBreak=t}else n.__lexicalLineBreak=r}getFirstChildOffset(){const t=this.getFirstChild(),e=this.getInsertionAnchor();let n=0;for(let o=this.element.firstChild;null!==o&&o!==t&&o!==e;o=o.nextSibling)n++;return n}resolveChildIndex(t,e,n,o){if(n===this.element){const e=this.getFirstChildOffset(),n=j(),r=this.element.childNodes,i=Math.min(o,r.length);let s=0;for(let t=e;tn){s+=1;break}}return[t.getParentOrThrow(),s]}}function X(e,n){const o=[];let r=n;for(;r!==e&&null!==r;r=r.parentNode){let t=0;for(let e=r.previousSibling;null!==e;e=e.previousSibling)t++;o.push(t)}return r!==e&&t(225),o.reverse()}let Q;try{Q="0.47.0+prod.esm"}catch(t){}const Z=Q??'"+source"';class tt{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const e of this._back)t.push(e);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}const et=null;function nt(t,e=1e3){return t instanceof ot?t.clone():t.sizethis._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const t=new Map(this._old);for(const[e,n]of this._nursery)n!==et?t.set(e,n):t.delete(e);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(t,e){const n=this.getWithTombstone(t);if(n===e)return this;const o=this.getNursery();return n!==et&&void 0!==n||(this._size++,n===et&&o.delete(t)),o.set(t,e),this}delete(t){const e=this.has(t);return e&&(this.getNursery().set(t,et),this._size--),e}getOrInsert(t,e){const n=this.get(t);return void 0!==n?n:(this.set(t,e),e)}getOrInsertComputed(t,e){const n=this.get(t);if(void 0!==n)return n;const o=e(t);return this.set(t,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,e=this._old;if(e)for(const n of e){const e=n[0],o=t?t.get(e):void 0;o!==et&&(void 0!==o&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===et||e&&e.has(n[0])||(yield n)}forEach(t,e){void 0!==e&&(t=t.bind(e));for(const[e,n]of this.entries())t(n,e,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function rt(t,e,n,o,r,i){if(Pi(t)){let s=t.getFirstChild();for(;null!==s;){const t=s.__key;s.__parent===e&&((Pi(s)||Yc(s)&&null!==s.__slots)&&rt(s,t,n,o,r,i),n.has(t)||i.delete(t),r.push(t)),s=s.getNextSibling()}}for(const s of Yc(t)&&null!==t.__slots?t.__slots.values():[]){const t=o.get(s);void 0!==t&&Gc(t)&&t.__slotHost===e&&((Pi(t)||Yc(t)&&null!==t.__slots)&&rt(t,s,n,o,r,i),n.has(s)||i.delete(s),r.push(s))}}let it=!1,st=0;function lt(t){st=t.timeStamp}function ct(t,e,n){const o="BR"===t.nodeName,r=e.__lexicalLineBreak;return r&&(t===r||o&&t.previousSibling===r)||o&&void 0!==Gs(t,n)}function at(t,e,n){const o=Hl(Pl(n)),r=o&&tc(o,n._rootElement);let i=null,s=null;null!==r&&r.anchorNode===t&&(i=r.anchorOffset,s=r.focusOffset);const l=t.nodeValue;null!==l&&al(e,l,i,s,!1)}function ut(t,e,n){if(cr(t)){const e=t.anchor.getNode();if(e.is(n)&&t.format!==e.getFormat())return!1}return Ls(e)&&n.isAttached()}function ft(t,e,n){for(let o=t;o&&!Lc(o);o=Nl(o)){const t=Gs(o,e);if(void 0!==t){const e=Vs(t,n);if(e)return Li(e)||!dc(o)?void 0:[o,e]}}}function dt(t,e,n){it=!0;const o=performance.now()-st>100;try{Mi(t,()=>{const r=Lr()||function(t){return t.read("latest",()=>{const t=Lr();return null!==t?t.clone():null})}(t),s=new Map,l=t._editorState,c=t._blockCursorElement;let a=!1,u="";for(let n=0;n0){let e=0;for(let r=0;r0)for(const[e,n]of s)n.reconcileObservedMutation(e,t);const f=n.takeRecords();if(f.length>0){for(let e=0;e{dt(t,e,n)})}const _t="direct",pt="latest";class yt{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,e){this.key=t,this.parse=e.parse.bind(e),this.unparse=(e.unparse||Et).bind(e),this.isEqual=(e.isEqual||Object.is).bind(e),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=e.resetOnCopyNode||!1}}function mt(t,e){return new yt(t,e)}function xt(t,e,n=pt){const o=(n===pt?t.getLatest():t).__state;return o?o.getValue(e):e.defaultValue}function Ct(t,e,n){const o=xt(t,n,_t),r=xt(e,n,_t);return n.isEqual(o,r)?null:[o,r]}function St(t,e,n){let o;if(ui(),"function"==typeof n){const r=t.getLatest(),i=xt(r,e);if(o=n(i),e.isEqual(i,o))return r}else o=n;const r=t.getWritable();return bt(r).updateFromKnown(e,o),r}function vt(t){const e=new Map,n=new Set;for(const{ownNodeConfig:o}of Uc("function"==typeof t?t:t.replace))if(o&&o.stateConfigs)for(const t of o.stateConfigs){let o;"stateConfig"in t?(o=t.stateConfig,t.flat&&n.add(o.key)):o=t,e.set(o.key,o)}return{flatKeys:n,sharedConfigMap:e}}const Tt=new Set(["__proto__","constructor","prototype"]);class kt{node;knownState;unknownState;sharedNodeState;size;constructor(t,e,n=void 0,o=new Map,r=void 0){this.node=t,this.sharedNodeState=e,this.unknownState=n,this.knownState=o;const{sharedConfigMap:i}=this.sharedNodeState,s=void 0!==r?r:function(t,e,n){let o=n.size;if(e)for(const r in e){const e=t.get(r);e&&n.has(e)||o++}return o}(i,n,o);this.size=s}getValue(t){const e=this.knownState.get(t);if(void 0!==e)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const e=this.unknownState[t.key];void 0!==e&&(n=t.parse(e)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[e,n]of this.knownState)e.isEqual(n,e.defaultValue)?delete t[e.key]:t[e.key]=e.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in t&&(e[n]=t[n],delete t[n]);return wt(t)&&(e.$=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:n}=this,o=new Map(this.knownState);return new kt(t,e,function(t,e,n){let o;if(n)for(const[r,i]of Object.entries(n)){if(Tt.has(r))continue;const n=t.get(r);n?e.has(n)||e.set(n,n.parse(i)):(o=o||{},o[r]=i)}return o}(e.sharedConfigMap,o,n),o,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,e){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:o,unknownState:r}=this;o.has(t)||r&&n in r||(r&&(delete r[n],this.unknownState=wt(r)),this.size++),o.set(t,e)}updateFromUnknown(t,e){if(Tt.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const t of e.keys())e.set(t,t.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[e,n]of Object.entries(t))this.updateFromUnknown(e,n)}}function bt(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new kt(e,Nt(e));return e.__state=n,n}function Nt(t){return t.__state?t.__state.sharedNodeState:ks(Cc(),t.getType()).sharedNodeState}function wt(t){if(t)for(const e in t)return t}function Et(t){return t}function Ot(t,e,n){for(const[o,r]of e.knownState){if(t.has(o.key))continue;t.add(o.key);const e=n?n.getValue(o):o.defaultValue;if(e!==r&&!o.isEqual(e,r))return!0}return!1}function Mt(t,e,n){const{unknownState:o}=e,r=n?n.unknownState:void 0;if(o)for(const[e,n]of Object.entries(o)){if(t.has(e))continue;t.add(e);if(n!==(r?r[e]:void 0))return!0}return!1}function At(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function Dt(t,e){const n=t.__mode,o=t.__format,r=t.__style,i=e.__mode,s=e.__format,l=e.__style,c=t.__state,a=e.__state;return(null===n||n===i)&&(null===o||o===s)&&(null===r||r===l)&&(null===t.__state||c===a||function(t,e){if(t===e)return!0;const n=new Set;return!(t&&Ot(n,t,e)||e&&Ot(n,e,t)||t&&Mt(n,t,e)||e&&Mt(n,e,t))}(c,a))}function Pt(t,e){const n=t.mergeWithSibling(e),o=gi()._normalizedNodes;return o.add(t.__key),o.add(e.__key),n}function Ft(t){let e,n,o=t;if(""!==o.__text||!o.isSimpleText()||o.isUnmergeable()){for(;null!==(e=o.getPreviousSibling())&&Xo(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(""!==e.__text){if(Dt(e,o)){o=Pt(e,o);break}break}e.remove()}for(;null!==(n=o.getNextSibling())&&Xo(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Dt(o,n)){o=Pt(o,n);break}break}n.remove()}}else o.remove()}function It(t){return Lt(t.anchor),Lt(t.focus),t}function Lt(t){for(;"element"===t.type;){const e=t.getNode(),n=t.offset;let o,r;if(n===e.getChildrenSize()?(o=e.getChildAtIndex(n-1),r=!0):(o=e.getChildAtIndex(n),r=!1),Xo(o)){t.set(o.__key,r?o.getTextContentSize():0,"text",!0);break}if(!Pi(o))break;t.set(o.__key,r?o.getChildrenSize():0,"element",!0)}}const Kt=Symbol.for("@lexical/CachedTextSize");function zt(e,n){return ee.read(()=>{let o=0,r=e;for(let e=0;e0&&!o?t.classList.add(n):e<1&&o&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",0===e?"":`calc(${e} * var(--lexical-indent-base-value, ${de}))`)}function ge(t,e){const n=t.style;0===e?fe(n,""):1===e?fe(n,"left"):2===e?fe(n,"center"):3===e?fe(n,"right"):4===e?fe(n,"justify"):5===e?fe(n,"start"):6===e&&fe(n,"end")}function _e(t,e){const n=function(t){const e=t.__dir;if(null!==e)return e;if(zi(t))return null;const n=t.getParent();return null===n||Kl(n)&&null===n.__dir?"auto":null}(e);null!==n?t.dir=n:t.removeAttribute("dir")}function pe(t){const e=Xl().createElement("div");return e.setAttribute("data-lexical-slot",t),e.style.display="none",e}function ye(t,e,n){e||"false"===t.contentEditable?Kc(n,Ut):n.removeAttribute("contenteditable")}function me(t,e,n){const o=Ht,r=qt();Ht="";let i="";const s=Li(t);for(const[o,r]of n){const n=pe(o);ye(e,s,n),e.appendChild(n),Ht="";const l=qt();Te(r,vc(t,n,Ut)),Yt(l),Ce(t,o,e,n),i+=Ht}return Yt(r),Ht=o,i}function xe(t){return Yc(t)&&null!==t.__slots?t.__slots:qc}function Ce(t,e,n,o){const r=se.$getSlotTargetElement(t,e,n,Ut);null!==r&&(o.parentElement!==r&&r.appendChild(o),o.style.display="")}function Se(t){const e=oe.get(t);return void 0!==e?e.parentElement:null}function ve(t,e,n){const o=xe(t),r=xe(e);for(const[t,e]of o)if(!r.has(t)){const t=Se(e);ae(e,null),null!==t&&t.remove()}const i=Ht,s=qt();let l="",c=null;const a=Li(e);for(const[t,i]of r){const r=o.get(t);let s=void 0!==r?Se(r):null;Ht="";const u=qt();if(null===s){s=pe(t);let o=null;for(const t of n.children)if(!t.hasAttribute("data-lexical-slot")){o=t;break}n.insertBefore(s,o),Te(i,vc(e,s,Ut))}else r===i?Ee(i,s):(void 0!==r&&ae(r,s),Te(i,vc(e,s,Ut)));if(Yt(u),ye(n,a,s),Ce(e,t,n,s),l+=Ht,s.parentElement===n){const t=null===c?n.firstChild:c.nextSibling;t!==s&&n.insertBefore(s,t),c=s}}return Yt(s),Ht=i,l}function Te(e,n){const o=ne.get(e);if(void 0===o&&t(60),null!==n){const t=te.get(e);if(void 0!==t){const r=oe.get(e);if(void 0!==r){const i=Gc(t)?t.__slotHost:null,s=Gc(o)?o.__slotHost:null,l=t.__parent!==o.__parent||i!==s,c=null!==s&&r.parentElement!==n.element;if(l||c)return n.insertChild(r),Ee(e,n.element)}}}const r=se.$createDOM(o,Ut);if(function(t,e,n){const o=n._keyToDOMMap;Ys(e,n,t),o.set(t,e)}(e,r,Ut),Xo(o)?r.setAttribute("data-lexical-text","true"):Li(o)&&(r.setAttribute("data-lexical-decorator","true"),Ic(r,{captureSelection:!0})),Pi(o)){const t=o.__indent,e=o.__size;_e(r,o),0!==t&&he(r,t);const n=xe(o),i=n.size>0?me(o,r,n):"";if(0===e)r.__lexicalTextContent=i,r.__lexicalFirstTextKey=null,Ht+=i,n.size>0&&(r.__lexicalSlotTextLength=i.length);else{const t=Ht,s=e-1;if(ke(jc(o,ne),o,0,s,vc(o,r,Ut)),""!==i){const e=r.__lexicalTextContent||"";r.__lexicalTextContent=i+e,Ht=t+i+e}n.size>0&&(r.__lexicalSlotTextLength=i.length)}const s=o.__format;0!==s&&ge(r,s),o.isInline()||be(null,o,r)}else{const t=o.getTextContent();if(Li(o)){const t=o.decorate(Ut,Wt);null!==t&&Oe(e,t),r.contentEditable="false";const n=xe(o);n.size>0&&me(o,r,n)}Ht+=t}return null!==n&&n.insertChild(r),se.$decorateDOM(o,null,r,Ut),Bt(o),xl(ie,$t,Xt,o,"created"),r}function ke(e,n,o,r,i){const s=Ht,l=qt();Ht="",Jt=null,jt=null,Vt=null;let c=o;for(;c<=r;++c){const t=qt();Te(e[c],i);const n=ne.get(e[c]);null!==n&&Xo(n)?null===Jt&&(Jt=n.getFormat(),jt=n.getStyle(),Vt=n.__key):Pi(n)&&c0?null:"empty"}return null}(e,ne);r!==i&&o.setManagedLineBreak(i)}function Ne(e,n,o){var r;Jt=null,jt=null,Vt=null,function(e,n,o){const r=Ht,i=e.__size,s=n.__size;Ht="";const l=o.element,c=Ut._keyToDOMMap.get(n.__key);void 0===c&&t(351,n.__key);const a=s-i;if(!le&&Math.abs(a)<=1&&i>=Rt&&e.__first===n.__first&&(0!==a||!Ut._cloneNotNeeded.has(e.__key))){const i=c.__lexicalTextContent,u=re.get(e.__key);if(!le&&"string"==typeof i&&void 0!==u){const s=function(t,e){const n=e.size;if(0===n||n>=t.__size)return null;let o=t.__last,r=null,i=0;for(;null!==o&&i0?i.slice(h):i,_=g.slice(0,g.length-e)+d;return c.__lexicalTextContent=_,Ht=r+_,void we(n,c,u)}if(function(e,n,o,r,i,s,l,c){if(1!==c&&-1!==c)return!1;const a=1===c?2:1;if(l!==a)return!1;const u=l-c;let f=e.__last;for(let t=0;t0?i.slice(k):i;return r.__lexicalTextContent=b.slice(0,b.length-v)+T,!0}(e,0,o,c,i,s,f,a)){const e=c.__lexicalTextContent;return"string"!=typeof e&&t(353),Ht=r+e,void we(n,c,u)}}}if(0===a){let n=e.__first,o=0;for(;null!==n;){const e=ne.get(n);if(void 0===e)break;const r=le||Zt.has(n)||Qt.has(n),i=qt();if(r)Ee(n,l);else{let o,r;if(Pi(e)){r=oe.get(n);const i=r&&r.__lexicalTextContent;"string"!=typeof i&&t(354,e.getType()),o=i}else o=e.getTextContent();Ht+=o,void 0!==r&&Gt(r)}Xo(e)?null===Jt&&(Jt=e.getFormat(),jt=e.getStyle(),Vt=e.__key):Pi(e)&&os,g=d>l;if(h&&!g){const e=n[l+1],o=void 0===e?null:Ut.getElementByKey(e);ke(n,t,d,l,i.withBefore(o??i.before))}else g&&!h&&ue(e,f,s,i.element)}(n,r,c,i,s,o)}c.__lexicalTextContent=Ht,c.__lexicalFirstTextKey=Vt,Ht=r+Ht}(e,n,vc(n,o,Ut)),Kl(n)||(r=n,null==Jt||Jt===r.__textFormat||ce||r.setTextFormat(Jt),function(t){null==jt||jt===t.__textStyle||ce||t.setTextStyle(jt)}(n))}function we(t,e,n){const o=e.__lexicalFirstTextKey;if(null!=o){const e=t.__key;let r=o;for(;null!==r;){const t=ne.get(r);if(void 0===t){r=null;break}if(t.__parent===e)break;r=t.__parent}if(null!==r&&!n.has(r)){const t=ne.get(o);if(Xo(t))return Jt=t.getFormat(),void(jt=t.getStyle())}}e.__lexicalFirstTextKey=Vt}function Ee(e,n){const o=te.get(e);let r=ne.get(e);void 0!==o&&void 0!==r||t(61);const i=le||Zt.has(e)||Qt.has(e),s=bl(Ut,e);if(o===r&&!i){let e;if(Pi(o)){const n=s.__lexicalTextContent;"string"!=typeof n&&t(355,o.getType()),e=n,Gt(s)}else e=o.getTextContent();return Ht+=e,s}if(o!==r&&i&&xl(ie,$t,Xt,r,"updated"),se.$updateDOM(r,o,s,Ut)){const o=Te(e,null);return null===n&&t(62),n.replaceChild(o,s),ae(e,null),o}if(Pi(o)){Pi(r)||t(334,e);const n=r.__indent;(le||n!==o.__indent)&&he(s,n);const l=r.__format;(le||l!==o.__format)&&ge(s,l);const c=i&&(xe(r).size>0||xe(o).size>0)?ve(o,r,s):"";if(i){const t=Ht;if(Ne(o,r,s),zi(r)||r.isInline()||be(0,r,s),""!==c){const e=s.__lexicalTextContent||"";s.__lexicalTextContent=c+e,Ht=t+c+e,s.__lexicalSlotTextLength=c.length}else(xe(r).size>0||xe(o).size>0)&&(s.__lexicalSlotTextLength=0)}else{const e=s.__lexicalTextContent;"string"!=typeof e&&t(356,o.getType()),Ht+=e,Gt(s)}if((le||r.__dir!==o.__dir||r.__parent!==o.__parent)&&(_e(s,r),zi(r)&&!le))for(const t of r.getChildren())if(Pi(t)){_e(bl(Ut,t.getKey()),t)}}else{const t=r.getTextContent();if(Li(r)){const t=r.decorate(Ut,Wt);null!==t&&Oe(e,t),i&&(xe(r).size>0||xe(o).size>0)&&ve(o,r,s)}Ht+=t}if(!ce&&zi(r)){const t=r.getLatest();if(t.__cachedText!==Ht){const e=t.getWritable();e.__cachedText=Ht,r=e}}return se.$decorateDOM(r,o,s,Ut),Bt(r),s}function Oe(t,e){let n=Ut._pendingDecorators;const o=Ut._decorators;if(null===n){if(o[t]===e)return;n=Qs(Ut)}n[t]=e}function Me(t){let e=t.nextSibling;return null!==e&&e===Ut._blockCursorElement&&(e=e.nextSibling),e}function Ae(t,e){const n=new Set;for(let o=e;o{for(const n of e){const e=ne.get(n);if(void 0===e)continue;const o=e.__parent;if(null===o)continue;let r=t.get(o);void 0===r&&(r=new Set,t.set(o,r)),r.add(n)}};return e(Qt.keys()),e(Zt),t}();const s=new Map;return ie=s,Ee("root",null),Ut=void 0,$t=void 0,Qt=void 0,Zt=void 0,te=void 0,ee=void 0,ne=void 0,Wt=void 0,oe=void 0,re=void 0,ie=void 0,se=_s,s}function Pe(e){const n=oe.get(e);return void 0===n&&t(75,e),n} --/*@__INLINE__*/function Fe(t){return{type:t}}const Ie=/* @__PURE__ */Fe("SELECTION_CHANGE_COMMAND"),Le=/* @__PURE__ */Fe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ke=/* @__PURE__ */Fe("CLICK_COMMAND"),ze=/* @__PURE__ */Fe("BEFORE_INPUT_COMMAND"),Be=/* @__PURE__ */Fe("INPUT_COMMAND"),Re=/* @__PURE__ */Fe("COMPOSITION_START_COMMAND"),We=/* @__PURE__ */Fe("COMPOSITION_END_COMMAND"),Ue=/* @__PURE__ */Fe("DELETE_CHARACTER_COMMAND"),$e=/* @__PURE__ */Fe("INSERT_LINE_BREAK_COMMAND"),He=/* @__PURE__ */Fe("INSERT_PARAGRAPH_COMMAND"),Je=/* @__PURE__ */Fe("CONTROLLED_TEXT_INSERTION_COMMAND"),je=/* @__PURE__ */Fe("PASTE_COMMAND"),Ve=/* @__PURE__ */Fe("REMOVE_TEXT_COMMAND"),qe=/* @__PURE__ */Fe("DELETE_WORD_COMMAND"),Ye=/* @__PURE__ */Fe("DELETE_LINE_COMMAND"),Ge=/* @__PURE__ */Fe("FORMAT_TEXT_COMMAND"),Xe=/* @__PURE__ */Fe("SET_TEXT_FORMAT_COMMAND"),Qe=/* @__PURE__ */Fe("UNDO_COMMAND"),Ze=/* @__PURE__ */Fe("REDO_COMMAND"),tn=/* @__PURE__ */Fe("KEYDOWN_COMMAND"),en=/* @__PURE__ */Fe("KEY_ARROW_RIGHT_COMMAND"),nn=/* @__PURE__ */Fe("MOVE_TO_END"),on=/* @__PURE__ */Fe("KEY_ARROW_LEFT_COMMAND"),rn=/* @__PURE__ */Fe("MOVE_TO_START"),sn=/* @__PURE__ */Fe("KEY_ARROW_UP_COMMAND"),ln=/* @__PURE__ */Fe("KEY_ARROW_DOWN_COMMAND"),cn=/* @__PURE__ */Fe("KEY_ENTER_COMMAND"),an=/* @__PURE__ */Fe("KEY_SPACE_COMMAND"),un=/* @__PURE__ */Fe("KEY_BACKSPACE_COMMAND"),fn=/* @__PURE__ */Fe("KEY_ESCAPE_COMMAND"),dn=/* @__PURE__ */Fe("KEY_DELETE_COMMAND"),hn=/* @__PURE__ */Fe("KEY_TAB_COMMAND"),gn=/* @__PURE__ */Fe("INSERT_TAB_COMMAND"),_n=/* @__PURE__ */Fe("INDENT_CONTENT_COMMAND"),pn=/* @__PURE__ */Fe("OUTDENT_CONTENT_COMMAND"),yn=/* @__PURE__ */Fe("DROP_COMMAND"),mn=/* @__PURE__ */Fe("FORMAT_ELEMENT_COMMAND"),xn=/* @__PURE__ */Fe("DRAGSTART_COMMAND"),Cn=/* @__PURE__ */Fe("DRAGOVER_COMMAND"),Sn=/* @__PURE__ */Fe("DRAGEND_COMMAND"),vn=/* @__PURE__ */Fe("COPY_COMMAND"),Tn=/* @__PURE__ */Fe("CUT_COMMAND"),kn=/* @__PURE__ */Fe("SELECT_ALL_COMMAND"),bn=/* @__PURE__ */Fe("CLEAR_EDITOR_COMMAND"),Nn=/* @__PURE__ */Fe("CLEAR_HISTORY_COMMAND"),wn=/* @__PURE__ */Fe("CAN_REDO_COMMAND"),En=/* @__PURE__ */Fe("CAN_UNDO_COMMAND"),On=/* @__PURE__ */Fe("FOCUS_COMMAND"),Mn=/* @__PURE__ */Fe("BLUR_COMMAND"),An=/* @__PURE__ */Fe("KEY_MODIFIER_COMMAND");function Dn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const i=()=>{const t=e.get(n);t&&t.holders.delete(i)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(i),i}}}function Pn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Fn=Object.freeze({}),In=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&jn(n);if(e.isComposing())return;kl(e,tn,t)}],["pointerdown",function(t,e){const n=lc(t),o=t.pointerType;hc(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&Mi(e,()=>{zc(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){kl(e,Re,t)}],["compositionend",function(t,e){const n=e._inputState;i?n.compositionPhase="ending-firefox":l||!a&&!d?kl(e,We,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;jn(n),Mi(e,()=>{qn(t,e)||e.dispatchCommand(Be,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){Mi(e,()=>{const n=Lr(),o=Hl(Pl(e)),r=Kr();if(o)if(cr(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!zi(e)&&1===tl().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=tc(o,e._rootElement).anchorNode;if(dc(n)||Ls(n)){el(Ir(r,o,e,t))}}kl(e,Ke,t)})}],["cut",Fn],["copy",Fn],["dragstart",Fn],["dragover",Fn],["dragend",Fn],["paste",Fn],["focus",Fn],["blur",Fn],["drop",Fn]];s&&In.push(["beforeinput",(t,e)=>function(t,e){const n=t.inputType;if("deleteCompositionText"===n||i&&Tl(e))return;if("insertCompositionText"===n)return;Mi(e,()=>{qn(t,e)||kl(e,ze,t)},{event:t})}(t,e)]);const Ln=new WeakMap,Kn=new WeakMap,zn=Dn(t=>(t.addEventListener("selectionchange",ro),()=>t.removeEventListener("selectionchange",ro)));function Bn(t,e,n,o,r,i){const l=t.anchor,c=t.focus,a=l.getNode(),u=gi();let f;if(void 0!==i)f=i;else{const t=Hl(Pl(u));f=null!==t?tc(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Xo(a)||(!r&&(!s||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!s)&&null!==g&&!a.isComposing()&&d!==Nc(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Fs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Xo(e)||Pi(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function Rn(t,e){return Ls(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Wn(e,n,o){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:l}=tc(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,Rn(r,i)&&Rn(s,l)&&!c.postDeleteSelectionToRestore)||Mi(n,()=>{if(!o)return void el(null);if(!Os(n,r,s))return;let a=Lr();if(c.postDeleteSelectionToRestore&&cr(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),el(a))}if(c.postDeleteSelectionToRestore=null,cr(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===s&&(a.dirty=!0);const i=Pl(n).event,l=i?i.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=tl(),y=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)Un(a,f,d);else if("text"===o.type)Xo(u)||t(141),$n(a,u);else if("element"===o.type&&!y){Pi(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();Un(t,n,o)}(a,e):Un(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,s=a.isBackward(),c=s?l:i,u=s?i:l,f=s?e:t,d=s?t:e;let h=2047,g=!1;for(let t=0;tjn(t),0)}function qn(t,e){const n=lc(t);if(dc(n)&&zc(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=sc(o.ownerDocument);return null!==r&&o.contains(r)&&zc(r,e)}function Yn(e){const n=e.inputType,o=Hn(e),r=gi(),i=r._inputState,s=Lr();if("insertText"===n&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(jn(i),e.preventDefault(),cr(s)&&!s.isCollapsed()){const t=s.isBackward()?s.anchor:s.focus;s.anchor.set(t.key,t.offset,t.type),s.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===s){const t=Kr();if(!cr(t))return!0;el(t.clone())}if(cr(s)){const n=s.anchor.key===s.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{Mi(r,()=>{Js(null)})},30),cr(s)){const e=s.anchor.getNode();e.markDirty(),Xo(e)||t(142),$n(s,e)}}else{if(Js(null),l&&null!==o&&!o.collapsed&&(s.applyDOMRange(o),!s.isCollapsed()))return e.preventDefault(),s.removeText(),!0;e.preventDefault();const t=s.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===s.anchor.offset&&s.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&s.isCollapsed()&&(d=!Li(vl(s.anchor,!0))),!d){kl(r,Ue,!0);const t=Lr();f&&cr(t)&&t.isCollapsed()&&(i.postDeleteSelectionToRestore=t,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!cr(s))return!0;const c=e.data;null!==i.unprocessedBeforeInputData&&cl(!1,r,i.unprocessedBeforeInputData),s.dirty&&null===i.unprocessedBeforeInputData||!s.isCollapsed()||zi(s.anchor.getNode())||null===o||s.applyDOMRange(o),i.unprocessedBeforeInputData=null;const a=s.anchor,u=s.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),kl(r,$e,!1);else if(c===D)e.preventDefault(),kl(r,He,void 0);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=c&&Bn(s,o,c,e.timeStamp,!0)?(e.preventDefault(),kl(r,Je,c),Jn(c)):i.unprocessedBeforeInputData=c;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":kl(r,Je,e);Jn((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;Js(null),t||kl(r,Je,e),Zn(n);break}case"insertLineBreak":Js(null),kl(r,$e,!1);break;case"insertParagraph":Js(null),i.isInsertLineBreak&&!l?(i.isInsertLineBreak=!1,kl(r,$e,!1)):kl(r,He,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":kl(r,je,e);break;case"deleteByComposition":(function(t,e){return t!==e||Pi(t)||Pi(e)||!Fs(t)||!Fs(e)})(d,h)&&kl(r,Ve,e);break;case"deleteByDrag":Ol(No),kl(r,Ve,e);break;case"deleteByCut":kl(r,Ve,e);break;case"deleteContent":kl(r,Ue,!1);break;case"deleteWordBackward":kl(r,qe,!0);break;case"deleteWordForward":kl(r,qe,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":kl(r,Ye,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":kl(r,Ye,!1);break;case"formatStrikeThrough":kl(r,Ge,"strikethrough");break;case"formatBold":kl(r,Ge,"bold");break;case"formatItalic":kl(r,Ge,"italic");break;case"formatUnderline":kl(r,Ge,"underline");break;case"historyUndo":kl(r,Qe,void 0);break;case"historyRedo":kl(r,Ze,void 0)}return!0}function Gn(t){const e=gi(),n=e._inputState,o=Lr(),r=t.data,l=Hn(t);let c=!1;if(null!=r&&cr(o)){const a=Hl(Pl(e)),u=null!==a?tc(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Xo(h)&&Is(h);if(!d&&!g&&Bn(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=to(e,r);if(n.compositionPhase="idle",t)return Ol(Eo),nl(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;s&&!o.isCollapsed()&&Xo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===ll(u.anchorNode)||kl(e,Je,r);const _=r.length;i&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,Js(null))}}if(!c){cl(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(to(e,r||void 0),Ol(Eo),n.compositionPhase="idle")}return nl(),!0}function Xn(t){const e=gi(),n=e._inputState,o=Lr();if(cr(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,i=o.anchor.getNode();if(Js(r.key),Ol(wo),t.timeStamp{to(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return hl(t,"ArrowRight",{shiftKey:"any"})}(t))kl(e,en,t);else if(function(t){return hl(t,"ArrowRight",{...gl,shiftKey:"any"})}(t))kl(e,nn,t);else if(function(t){return hl(t,"ArrowLeft",{shiftKey:"any"})}(t))kl(e,on,t);else if(function(t){return hl(t,"ArrowLeft",{...gl,shiftKey:"any"})}(t))kl(e,rn,t);else if(function(t){return hl(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))kl(e,sn,t);else if(function(t){return hl(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))kl(e,ln,t);else if(function(t){return hl(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,kl(e,cn,t);else if(function(t){return" "===t.key}(t))kl(e,an,t);else if(function(t){return r&&hl(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,kl(e,$e,!0);else if(function(t){return hl(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,kl(e,cn,t);else if(function(t){return hl(t,"Backspace",{shiftKey:"any"})||r&&hl(t,"h",{ctrlKey:!0})}(t))pl(t)?kl(e,un,t)&&Vn(n):(t.preventDefault(),kl(e,Ue,!0));else if(function(t){return"Escape"===t.key}(t))kl(e,fn,t);else if(function(t){return hl(t,"Delete",{})||r&&hl(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),kl(e,Ue,!1)):kl(e,dn,t);else if(function(t){return hl(t,"Backspace",_l)}(t))t.preventDefault(),kl(e,qe,!0);else if(function(t){return hl(t,"Delete",_l)}(t))t.preventDefault(),kl(e,qe,!1);else if(function(t){return r&&hl(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),kl(e,Ye,!0);else if(function(t){return r&&(hl(t,"Delete",{metaKey:!0})||hl(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),kl(e,Ye,!1);else if(function(t){return hl(t,"b",gl)}(t))t.preventDefault(),kl(e,Ge,"bold");else if(function(t){return hl(t,"u",gl)}(t))t.preventDefault(),kl(e,Ge,"underline");else if(function(t){return hl(t,"i",gl)}(t))t.preventDefault(),kl(e,Ge,"italic");else if(function(t){return hl(t,"Tab",{shiftKey:"any"})}(t))kl(e,hn,t);else if(function(t){return hl(t,"z",gl)}(t))t.preventDefault(),kl(e,Qe,void 0);else if(function(t){if(r)return hl(t,"z",{metaKey:!0,shiftKey:!0});return hl(t,"y",{ctrlKey:!0})||hl(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),kl(e,Ze,void 0);else{const o=e._editorState._selection;!function(t){return hl(t,"a",gl)}(t)?null===o||cr(o)||(!function(t){return hl(t,"c",gl)}(t)?function(t){return hl(t,"x",gl)}(t)&&(t.preventDefault(),kl(e,Tn,t)):(t.preventDefault(),kl(e,vn,t))):(t.preventDefault(),kl(e,kn,t)&&Vn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(An,t),!0}function no(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const oo=new Map;function ro(t){const e=Jl(t.target);if(null===e)return;const n=wl(t.target);let o=null,r=null;const i=null!==n?Kn.get(n):void 0;if(null!==n){if(void 0!==i){const t=i.editors;let n=i.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&jl(e._rootElement.getRootNode())){n=!0;break}i.hasShadowEditor=n}if(n){let n=null,i=null;for(const s of t){const t=s._rootElement;if(null===t)continue;const l=tc(e,t).anchorNode;if(null!==l&&As(l)===s){if(jl(t.getRootNode())){o=s,r=l;break}null===n&&(n=s,i=l)}}null===o&&null!==n&&(o=n,r=i)}else{const t=e.anchorNode;null===t||dc(t)&&null!==t.shadowRoot||(o=As(t),null!==o&&(r=t))}}if(null===o){const t=sc(n);o=null!==t?As(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==i)for(const t of i.editors)t._inputState.isSelectionChangeFromMouseDown=!1;Mi(o,()=>{const n=Kr(),i=r??tc(e,o._rootElement).anchorNode;if(dc(i)||Ls(i)){el(Ir(n,e,o,t))}})}const s=il(o),l=s[s.length-1],c=l._key,a=oo.get(c),u=a||l;u!==o&&Wn(e,u,!1),Wn(e,o,!0),o!==l?oo.set(c,o):a&&oo.delete(c)}function io(t){t._lexicalHandled=!0}function so(t){return!0===t._lexicalHandled}const lo=()=>{};function co(e){const n=Ln.get(e);if(void 0===n)return void lo();const o=Kn.get(n);if(void 0===o)return void lo();Ln.delete(e);const r=Ds(e);Ms(r)?(!function(t){if(null!==t._parentEditor){const e=il(t),n=e[e.length-1]._key;oo.get(n)===t&&oo.delete(n)}else oo.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const i=no(e);for(let t=0;tt.__key===this.__key);if(Xo(this))return n;if(cr(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(Li(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:Vs(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Kl(n)||null!==Xc(e))return Pi(e)||e===this&&Li(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:Vs(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:Vs(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=Pi(this)?this:this.getParent(),n=Pi(t)?t:t.getParent(),o=e&&n?Ga(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Ga(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Va(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Al(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let i=this;for(;null!==i;){const s=i.__key;if(r.has(s)||(r.add(s),o.push(i)),i===e)break;const l=Pi(i)?n?i.getFirstChild():i.getLastChild():null;if(null!==l){i=l;continue}const c=n?i.getNextSibling():i.getPreviousSibling();if(null!==c){i=c;continue}const a=i.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);i=u}return n||o.reverse(),o}isDirty(){const t=gi()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(ho(this))return this;const e=Vs(this.__key);return null===e&&t(113),e}getWritable(){if(ho(this))return this;ui();const t=di(),e=gi(),n=t._nodeMap,o=this.__key,r=this.getLatest(),i=e._cloneNotNeeded,s=Lr();if(null!==s&&s.setCachedNodes(null),i.has(o))return Hs(r),r;const l=Mc(r);return i.add(o),Hs(l),n.set(o,l),l}getTextContent(){return ua(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new q(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of Nt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&bt(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){ao(this,!0,t)}replace(e,n){ui();let o=Lr();null!==o&&(o=o.clone()),Rl(this,e);const r=this.getLatest(),i=this.__key,s=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;Us(l),null!==u&&cr(o)&&zr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(ao(r,!1,!0),null===d)c.__first=s;else{d.getWritable().__next=s}if(l.__prev=g,null===h)c.__last=s;else{h.getWritable().__prev=s}l.__next=_,l.__parent=p,c.__size=a;let y=0;n&&(Pi(this)&&Pi(l)||t(139),y=l.getChildrenSize(),l.splice(y,0,this.getChildren()));const m=na(this);if(m.length>0){Yc(this)&&Yc(l)||t(368,this.__key,l.__key);for(const t of m){const e=oa(this,t);null!==e&&(ga(this,t),ha(l,t,e))}}if(cr(o)){el(o);const t=o.anchor,e=o.focus;t.key===i&&(n&&"element"===t.type?t.set(l.__key,y+t.offset,"element"):ir(t,l)),e.key===i&&(n&&"element"===e.type?e.set(l.__key,y+e.offset,"element"):ir(e,l))}return js()===i&&Js(s),l}insertAfter(t,e=!0){ui(),Rl(this,t);const n=this.getWritable(),o=t.getWritable();_a(this.getParentOrThrow());const r=o.getParent(),i=Lr();let s=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(cr(i)){const t=r.__key,e=i.anchor,o=i.focus;s="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}Us(o),e&&cr(i)&&zr(i,r,n,-1)}else Us(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&cr(i)){const t=this.getIndexWithinParent();zr(i,a,t+1);const e=a.__key;s&&i.anchor.set(e,t+2,"element"),l&&i.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){ui(),Rl(this,t);const n=this.getWritable(),o=t.getWritable();_a(this.getParentOrThrow());const r=o.__key,i=Lr(),s=o.getParent(),l=null!==s?o.getIndexWithinParent():-1;Us(o),null!==s&&e&&cr(i)&&zr(i,s,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&cr(i)){zr(i,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return ts()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){ui();const n=Qc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(Pi(o))return o.select();if(!Xo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){ui();const n=Qc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(Pi(o))return o.select(0,0);if(!Xo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function po(t){return t instanceof _o}const yo="historic",mo="history-push",xo="history-merge",Co="paste",So="cut",vo="collaboration",To="skip-collab",ko="skip-scroll-into-view",bo="skip-dom-selection",No="skip-selection-focus",wo="composition-start",Eo="composition-end",Oo="!important";function Mo(t){const e={};if(!t)return e;let n="",o="",r=null,i=!1,s=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===Oo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function Do(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):Ao(t,n,o)}}function Po(t,e,n=""){if(e===n)return;const o=Mo(n),r=Mo(e);for(const e in r)delete o[e],Ao(t,e,r[e]);for(const e in o)t.removeProperty(e)}function Fo(t,e){return 16&e?"code":e&T?"mark":32&e?"sub":64&e?"sup":null}function Io(t,e){return 1&e?"strong":2&e?"em":"span"}function Lo(t,e,n,o,r){const i=o.classList;let s=ml(r,"base");void 0!==s&&i.add(...s),s=ml(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==s&&(8&n&&4&n?(l=!0,c||i.add(...s)):c&&i.remove(...s));for(const t in z){const o=z[t];if(s=ml(r,t),void 0!==s)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&i.remove(...s);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&i.add(...s)}else e&o&&i.remove(...s)}}function Ko(t,e,n){const o=n.isComposing(),r=t+(o?A:""),s=Cc(),l=Sc(s).$getDOMSlot(n,e,s),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(Xl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(o||i){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,i=0;for(;r({conversion:jo,priority:0}),b:()=>({conversion:$o,priority:0}),code:()=>({conversion:Yo,priority:0}),em:()=>({conversion:Yo,priority:0}),i:()=>({conversion:Yo,priority:0}),mark:()=>({conversion:Yo,priority:0}),s:()=>({conversion:Yo,priority:0}),span:()=>({conversion:Uo,priority:0}),strong:()=>({conversion:Yo,priority:0}),sub:()=>({conversion:Yo,priority:0}),sup:()=>({conversion:Yo,priority:0}),u:()=>({conversion:Yo,priority:0})}}static importJSON(t){return Go().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return dc(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Bo(n,"b")),this.hasFormat("italic")&&(n=Bo(n,"i")),this.hasFormat("strikethrough")&&(n=Bo(n,"s")),this.hasFormat("underline")&&(n=Bo(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?z[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?B[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=Bs(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=U[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){ui();let n=t,o=e;const r=Lr(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const t=i.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!cr(r))return Ar(s,n,s,o,"text","text");{const t=js();t!==r.anchor.key&&t!==r.focus.key||Js(s),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),i=r.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=Lr();if(o&&cr(c)){const e=t+s;c.setTextNodeRange(r,e,r,e)}const a=i.slice(0,l)+n+i.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){ui();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=js(),i=n.length;t.sort((t,e)=>t-e),t.push(i);const s=[],l=t.length;for(let e=0,o=0;ee&&(s.push(n.slice(e,r)),e=r)}const c=s.length;if(1===c)return[e];const a=s[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,y=null;const m=Lr();if(cr(m)){const[t,e]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(y=e)}e.isSegmented()?(f=Go(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=At(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=v&&(p.set(t.getKey(),C-v,"text"),C=v){y.set(t.getKey(),S-v,"text");break}v=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&Hs(e);null!==n&&Hs(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),cr(m)&&zr(m,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,i=this.__text,s=i.length;js()===r&&Js(o);const l=Lr();if(cr(l)){const t=l.anchor,i=l.focus;null!==t&&t.key===r&&Wr(t,n,o,e,s),null!==i&&i.key===r&&Wr(i,n,o,e,s)}const c=e.__text,a=n?c+i:i+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function Uo(t){return{forChild:Qo(t.style),node:null}}function $o(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Qo(e.style,n?void 0:"bold"),node:null}}const Ho=new WeakMap;function Jo(t){if(!dc(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function jo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Ho.get(n))&&!Jo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=Vo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Go(o)}}function Vo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,dc(n)){const t=n.style.display;if(""===t&&!pc(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(Ls(n))return n;if("BR"===n.nodeName)return null}}const qo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yo(t){const e=qo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Qo(t.style,e),node:null}}function Go(t=""){return Bl(new Wo(t))}function Xo(t){return t instanceof Wo}function Qo(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,i=o.includes("line-through"),s="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Xo(t)||Ro(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),i&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),s&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Zo extends Wo{static getType(){return"tab"}static clone(t){return new Zo(t.__key)}constructor(t){super("\t",t),this.__detail=2}static importDOM(){return null}createDOM(t){const e=super.createDOM(t),n=ml(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}static importJSON(t){return tr().updateFromJSON(t)}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function tr(){return Bl(new Zo)}function er(t){return t instanceof Zo}class nr{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!Pi(e)){const t=e.getNextSibling();if(Xo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function ir(t,e){if(Pi(e)){const n=e.getLastDescendant();Pi(n)||Xo(n)?rr(t,n):rr(t,e)}else rr(t,e)}class sr{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ur(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new sr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===Xc(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Xo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===Xc(t));if((Lr()||Kr())===this&&t[0]){const e=Da(t[0],"next");Za(Ha(e,e))}for(const e of t)e.remove();lr()}}function lr(){const t=tl();if(t.isEmpty()){const e=ts();t.append(e),e.select()}}function cr(t){return t instanceof ar}class ar{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!cr(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,i=new Set;for(const n of t)if(Ea(n)){const{origin:t}=n;0===e.length?r.add(t):(i.add(t),e.push(t))}else{const{origin:t}=n;Pi(t)&&i.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(wa(t.focus)&&Pi(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=La(t.focus.origin,"previous");Ea(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=za(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!Pi(t)||i.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=su(t.anchor),o=su(t.anchor.getFlipped()),r=t=>ba(t)?t.origin:t.getNodeAtCaret(),i=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(i)}return e}(au(eu(this),"next"));return ai()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,i=o.isBefore(r),[s,l]=_r(this);let c="",a=!0;for(let u=0;u=0;t--){const e=s[t];if(e.is(d)||Pi(e)&&e.isParentOf(d))break;e.isAttached()&&(!g.has(e)||e.is(i)?p||y.insertAfter(e,!1):e.remove())}if(!p){let t=r,e=null;for(;null!==t;){const o=t.getChildren(),r=o.length;(0===r||o[r-1].is(e))&&(n.delete(t.__key),e=t),t=t.getParent()}}if(Fs(d))if(c===h)d.select();else{const t=Go(e);t.select(),d.replace(t)}else d=d.spliceText(c,h-c,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let t=1;t(Pi(t)||Li(t))&&!t.isInline())){Pi(r)||t(211,o.constructor.name,o.getType());const n=Gr(this);return r.splice(n,0,e),void i.selectEnd()}if(Pi(r)&&null!==Xc(r)){const t=Gr(this),n=Yr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Zr(e),n=t.getLastDescendant();let o=Xa(this.anchor,"next");for(const e of t.getChildren())o=_u(e,o);return void(null!==n&&n.selectEnd())}if(Pi(r)&&!r.isParentRequired()&&!Kl(r.getParentOrThrow())){const t=Gr(this),n=Yr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const s=Zr(e),l=s.getLastDescendant(),c=s.getChildren(),a=!Pi(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=Jc(o,xc));const u=c[c.length-1];let f=c[0];var d;Pi(d=f)&&xc(d)&&!d.isEmpty()&&Pi(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Pi(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const i=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),i.push(r);let s=e;for(const t of i)s=s.insertAfter(t)}(r,f));const h=Jc(l,xc);a&&Pi(h)&&(a.canMergeWhenEmpty()||xc(u))&&(h.append(...a.getChildren()),a.remove()),Pi(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=Pi(r)?r.getLastChild():null;qi(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Kl(e)){const t=ts();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Gr(this),o=Jc(this.anchor.getNode(),xc);if(null!==o&&null!==Xc(o))return null;Pi(o)||t(213);const r=o.getChildAtIndex(n),i=r?[r,...r.getNextSiblings()]:[],s=o.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const e=Vi();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,i]=_r(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=s?[i,r]:[r,i];if(0===e)return[];if(1===e){if(Xo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Xo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Xo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(ti(this,t,e,n))return;const o="move"===t,r=gi(),i=Hl(Pl(r));if(!i)return;const s=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===s||!Pi(c)||c.isInline()||c.canBeEmpty()||$l(s,r,l);const a=bl(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Xo(c)?Nc(c,a,r):null),this.dirty){const t=bl(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Xo(n)?Nc(n,t,r):null}e&&u&&Ur(i,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Xo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Da(c,e?"previous":"next").getNodeAtCaret();if(Xo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?Nc(t,n,r):null;if(o){const t=e?o.length:0;Ur(i,o,t,o,t)}}}}}if(mr(i,t,e?"backward":"forward",n),i.rangeCount>0){const t=Ql(i,r._rootElement),n=t||i.getRangeAt(0),s=this.anchor.getNode(),l=zi(s)?s:Il(s);if(this.applyDOMRange(n),this.dirty=!0,!o){xr(this,e,l);(t?"backward"!==i.direction:i.anchorNode===n.startContainer&&i.anchorOffset===n.startOffset)||yr(this)}}"lineboundary"===n&&ti(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&Pi(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(Pi(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=Ua(Xa(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Ea(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=su(e);tu(this,Ha(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(wa(e)){if(Pi(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(Li(e.origin)){if(e.origin.isIsolated());else if(na(e.origin).length>0){if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),el(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),el(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(na(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(tu(this,Ha(!e.origin.isEmpty()&&n.isEmpty()?nu(Da(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==Xc(t))return;if(Pi(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(Cr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&pr(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,i=o.getTextContentSize();if(o.is(n)||t&&e!==i||!t&&0!==e)return void vr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,i=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==i)return void vr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),i=o.getNode();if(r===i&&"text"===n.type&&"text"===o.type){const t=n.offset,i=o.offset,s=t0&&(g===h.getTextContentSize()||Is(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;t{for(const[e,o]of n)t=Bs(t,e,o?z[e]:0);return t})}function hr(t,e,n=null){const o=null===n&&cr(t)?Bs(t.format,e,null):n;fr(t,t=>Bs(t,e,o))}function gr(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function _r(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[gr(n),gr(o)]}function pr(t,e){for(let n=e;n;n=n.getParent()){if(Pi(n)){if(n.collapseAtStart(t))return!0;if(Kl(n))break}if(n.getPreviousSibling())break}return!1}function yr(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,i=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,i,!0)}function mr(t,e,n,o){t.modify(e,n,o)}function xr(t,e,n){const o=t.getNodes(),r=o.filter(t=>Al(t,n));if(0===r.length||r.length===o.length)return!1;const i=e?r[0]:r[r.length-1],s=Pi(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function Cr(t,e,n){if(ti(t,"extend",e,n))return;const o=gi(),r=Hl(Pl(o));if(!r||"function"!=typeof r.modify)return;const i=o._blockCursorElement,s=o._rootElement,l=t.anchor,c=t.focus.getNode();null===s||null===i||!Pi(c)||c.isInline()||c.canBeEmpty()||$l(i,o,s);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Xo(e)?Nc(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Ur(r,_,p,_,p),mr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const y=Ql(r,s)||r.getRangeAt(0),m=y.startContainer,x=y.startOffset;if(h&&"character"===n&&"text"===l.type&&Xo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Da(u,e?"previous":"next").getNodeAtCaret();if(Xo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=m===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,v,T]=e?[m,x,f,d]:[f,d,m,x],k=zi(u)?u:Il(u);t.applyDOMRange({collapsed:!1,endContainer:v,endOffset:T,startContainer:C,startOffset:S}),t.dirty=!0,!xr(t,e,k)&&e&&yr(t),"lineboundary"===n&&ti(t,"extend",e,n,"decorators")}const Sr=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function vr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),i=r.length;let s=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function Tr(e,n,o,r){let i,s=n,l=!1;if(dc(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;s===u&&u>0&&(c=!0,s=u-1),void 0!==Gs(e,r)||zc(e,r)||(l=!0);let d=a[s],h=!1;if(d===f)d=a[s+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&s--}}if(i=ol(d),Xo(i))s=Fa(i,c?"next":"previous");else{let a=ol(e);if(null===a)return null;if(Pi(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=vc(a,l,r);[a,s]=u.resolveChildIndex(a,l,e,n),Pi(a)||t(215),c&&s>=a.getChildrenSize()&&(s=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(s);if(Pi(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=Pi(f)?f:f.getParentOrThrow()),s=0}Xo(f)?(i=f,a=null,s=Fa(f,c?"next":"previous")):f!==a&&c&&!h&&(Pi(a)||t(216),s=Math.min(a.getChildrenSize(),s+1))}else{const t=Qc(a),o=null!==t?t:a,i=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&ol(e)===a){const t=vc(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&Li(a)&&(c="before")}s="before"===c?i:i+1,a=o.getParentOrThrow()}if(Pi(a))return[or(a.__key,s,"element"),l]}}else i=ol(e);return Xo(i)?[or(i.__key,Fa(i,s,"clamp"),"text"),l]:null}function kr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),i=r.getParent();if(e){if((n||!e)&&null===o&&Pi(i)&&i.isInline()){const e=i.getPreviousSibling();Xo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else Pi(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Xo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),i=r.getParent();if(e&&Pi(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&Pi(i)&&i.isInline()&&!i.canInsertTextAfter()&&i.getTextContentSize()>1){const e=i.getNextSibling();Xo(e)&&t.set(e.__key,0,"text")}}}function br(t,e,n){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);kr(t,n,o),kr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}function Nr(t){const e=Vs(t.key);return null===e?null:ta(e)}function wr(t,e,n){const o=Nr(t),r=Nr(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const i=n(o,r);if(null!==o)return Pi(o)?e.set(o.getKey(),i?o.getChildrenSize():0,"element"):e.set(o.getKey(),i?o.getTextContentSize():0,"text"),!0;const s=Qc(r);if(null===s)return!1;const l=s.getParent();if(null===l)return!1;const c=s.getIndexWithinParent();return e.set(l.getKey(),i?c+1:c,"element"),!0}function Er(t){const e=wr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=Qc(n),e=Qc(o);if(null!==t&&t.is(e)){for(const e of ea(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=Qc(n),o=Vs(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=Qc(o),i=Vs(t.key);return null!==r&&null!==i&&!r.is(i)&&!r.isParentOf(i)&&i.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function Or(t,e,n,o,r,i){if(null===t||null===n||!Os(r,t,n))return null;const s=Tr(t,e,cr(i)?i.anchor:null,r);if(null===s)return null;const l=Tr(n,o,cr(i)?i.focus:null,r);if(null===l)return null;const[c,a]=s,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=ol(t),o=ol(n);if(Li(e)&&Li(o))return null}const d=r._slotsUsed&&wr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return br(c,u),[c,u,a||f||d]}function Mr(t){return Pi(t)&&!t.isInline()}function Ar(t,e,n,o,r,i){const s=di(),l=new ar(or(t,e,r),or(n,o,i),0,"");return l.dirty=!0,s._selection=l,l}function Dr(){const t=or("root",0,"element"),e=or("root",0,"element");return new ar(t,e,0,"")}function Pr(){return new sr(new Set)}function Fr(t,e){return Ir(null,t,e,null)}function Ir(t,e,n,o){const r=n._window;if(null===r)return null;const i=o||r.event,s=i?i.type:void 0,l="selectionchange"===s,c=!it&&(l||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let a,u,f,d;if(cr(t)&&!c)return t.clone();{if(null===e)return null;const o=tc(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===s)&&cr(t)&&!Os(n,a,u))return t.clone()}const h=Or(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let y=0,m="";if(cr(t)){const e=t.anchor;if(g.key===e.key)y=t.format,m=t.style;else{const t=g.getNode();Xo(t)?(y=t.getFormat(),m=t.getStyle()):Pi(t)&&(y=t.getTextFormat(),m=t.getTextStyle())}}const x=new ar(g,_,y,m);return p&&(x.dirty=!0),x}function Lr(){return di()._selection}function Kr(){return gi()._editorState._selection}function zr(t,e,n,o=1){const r=t.anchor,i=t.focus,s=r.getNode(),l=i.getNode();if(!e.is(s)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,s=r?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(s)){let t=0;r&&(t=s.getTextContentSize()),e.set(s.__key,t,"text"),o.set(s.__key,t,"text")}return}if(Pi(i)){const t=i.getChildrenSize(),o=n>=t,r=o?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(Pi(s)){const t=s.getChildrenSize(),e=r>=t,n=e?s.getChildAtIndex(t-1):s.getChildAtIndex(r);if(Xo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Rr(t,e,n,o,r){let i=null,s=0,l=null;null!==o?(i=o.__key,Xo(o)?(s=o.getTextContentSize(),l="text"):Pi(o)&&(s=o.getChildrenSize(),l="element")):null!==r&&(i=r.__key,Xo(r)?l="text":Pi(r)&&(l="element")),null!==i&&null!==l?t.set(i,s,l):(s=e.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function Wr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Ur(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function $r(t,e,n){const o=bl(t,e.getKey());if(Pi(e)){const r=vc(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function Hr(t,e,n,o,r,s){const l=s.getRootNode(),c=Ks(l)||jl(l)?sc(l):null;if(r.has(vo)&&c!==s||null!==c&&ws(c,c))return;const a=tc(o,s);let u;if(!cr(e))return void(null!==t&&Os(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=$r(n,h,f.offset),[y,m]=$r(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let v=_,T=y,k=!1;if("text"===f.type?(v=Xo(h)?Nc(h,_,n):null,k=h.getFormat()!==x||h.getStyle()!==C):cr(t)&&"text"===t.anchor.type&&(k=!0),"text"===d.type&&(T=Xo(g)?Nc(g,y,n):null),null!==v&&null!==T){if(S&&(null===t||k||cr(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,i){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:i}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===m&&a.anchorNode===v&&a.focusNode===T){if(null===c||!s.contains(c)){const t=null!==c?As(c):null;null!==t&&t!==n||r.has(No)||s.focus({preventScroll:!0})}if("element"!==f.type)return}if(Ur(o,v,p,T,m),i&&e.isCollapsed()&&null!==s&&!r.has(No)){const t=ic(s);if(null===t||!s.contains(t)){const t=sc(s.ownerDocument),e=null!==t?As(t):null;null!==e&&e!==n||s.focus({preventScroll:!0})}}if(!r.has(ko)&&e.isCollapsed()&&null!==s&&s===ic(s)){const t=cr(e)&&"element"===e.anchor.type?v.childNodes[p]||null:(void 0===u&&(u=Zl(o,s)),u);if(null!==t){let e;if(Ls(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=wl(n),r=Dl(o);if(null===o||null===r)return;let{top:i,bottom:s}=e,l=0,c=0,a=n;for(;null!==a;){const e=a===o.body;if(e){const e=r.visualViewport;if(e){const t=e.offsetTop;l=t,c=t+e.height}else l=0,c=Pl(t).innerHeight;const n=r.getComputedStyle(o.documentElement),i=parseFloat(n.scrollPaddingTop),s=parseFloat(n.scrollPaddingBottom);isFinite(i)&&(l+=i),isFinite(s)&&(c-=s)}else{const t=a.getBoundingClientRect();l=t.top,c=t.bottom}let n=0;if(ic&&(n=s-c),0!==n)if(e)r.scrollBy(0,n);else{const t=a.scrollTop;a.scrollTop+=n;const e=a.scrollTop-t;i-=e,s-=e}if(e)break;a=Nl(a)}}(n,e,s)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Jr(t){let e=Lr()||Kr();null===e&&(e=tl().selectEnd()),e.insertNodes(t)}function jr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function Vr(t){const e=[];return jr(t,{linebreak:()=>e.push(Vi()),tab:()=>e.push(tr()),text:t=>e.push(Go(t))}),e}function qr(){const t=Lr();return null===t?"":t.getTextContent()}function Yr(t){const e=[];for(const n of t)qi(n)||(!Pi(n)&&!Li(n)||n.isInline()?e.push(n):Pi(n)&&e.push(...Yr(n.getChildren())));return e}function Gr(e){let n=e;e.isCollapsed()||n.removeText();const o=Lr();cr(o)&&(n=o),cr(n)||t(161);const r=n.anchor;let i=r.getNode(),s=r.offset;for(;!xc(i)&&null===Xc(i);){const t=i;if([i,s]=Xr(i,s),t.is(i))break}return s}function Xr(t,e){const n=t.getParent();if(!n){const t=ts();return tl().append(t),t.select(),[tl(),0]}if(Xo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!Pi(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new ar(or(t.__key,e,"element"),or(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Qr(t){return qi(t)||Fl(t)||Xo(t)||t.isParentRequired()}function Zr(t){const e=ts();let n=null;for(let o=0;o99&&t(14)}function di(){return null===ei&&t(195,pi()),ei}function hi(t){null!==di()&&null===ni&&(ni=t),ni!==t&&e(378)}function gi(){return null===ni&&t(337,pi()),ni}function _i(){gi()._dirtyType=2}function pi(){let t=0;const e=new Set,n=xs.version;if("undefined"!=typeof window)for(const o of Yl(document)){const r=Ds(o);if(Ms(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function yi(){return ni}function mi(t,e,n){const o=e.__type,r=ks(t,o);let i=n.get(o);void 0===i&&(i=Array.from(r.transforms),n.set(o,i));const s=i.length;for(let t=0;t0&&wi(t,t._deferred));const i=t._editorState,s=i._selection,l=n._selection,c=0!==t._dirtyType,a=ei,u=oi,f=ni,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){ni=t,ei=n,oi=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=De(i,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),ri)throw e;return hs(t,null,o,n),gt(t),t._dirtyType=2,ri=!0,ki(t,i),void(ri=!1)}finally{h.observe(o,ci),t._updating=d,ei=a,oi=u,ni=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,y=t._normalizedNodes,m=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let i;for(i in o)r.has(i)||(o===n&&(o=Qs(t)),delete o[i])}(t,n);const x=r?null:Hl(Pl(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(s))&&null!==o&&!m.has(bo)){ni=t,ei=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&$l(e,t,o),Hr(s,l,t,x,m,o)}!function(t,e,n){let o=t._blockCursorElement;if(cr(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(ic(e))){const r=n.anchor,i=r.getNode(),s=r.offset;let l=!1,c=null;if(s===i.getChildrenSize()){Ul(i.getChildAtIndex(s-1))&&(l=!0)}else{const e=i.getChildAtIndex(s);if(null!==e&&Ul(e)){const n=e.getPreviousSibling();(null===n||Ul(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=vc(i,t.getElementByKey(i.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=Xl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=Su(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&$l(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,ci),ni=f,ei=a}}null!==g&&function(t,e,n,o,r){const i=Array.from(t._listeners.mutation),s=i.length;for(let t=0;t{si.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;Oi(t,e,o)}}(t)}(t,e)}finally{ii=n}}function bi(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function Ni(t,e,n,o){const r=il(t);let i;if(!ii)for(let t=0;t=0;t--)for(let s=0;s0&&l._updating){i=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(Mi(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return i&&i.update(()=>{Ni(i,e,n,o)}),!1}function wi(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Xo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Ft(o),void 0!==o&&xi(o,i)&&mi(e,o,s),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){li++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&xi(c,i)&&mi(e,c,s)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,li++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),Ei(e),function(t,e,n,o){const r=t._nodeMap,i=e._nodeMap,s=[];for(const[t]of o){const e=i.get(t);void 0!==e&&(e.isAttached()||(Pi(e)&&rt(e,t,r,i,s,o),r.has(t)||o.delete(t),s.push(t)))}for(const t of n){const e=i.get(t);void 0===e||e.isAttached()||(Yc(e)&&null!==e.__slots&&rt(e,t,r,i,s,n),r.has(t)||n.delete(t),s.push(t))}for(const t of s)i.delete(t);const l=gi(),c=l._compositionKey;null===c||i.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const i=a._selection;if(cr(i)){e._slotsUsed&&Er(i);const n=a._nodeMap,o=i.anchor.key,r=i.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else ur(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ki(e)}finally{ei=f,oi=d,ni=h,e._updating=g,li=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,ki(e)):u&&Ns(()=>{ki(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Mi(t,e,n){ni===t&&void 0===n?e():Oi(t,e,n)}function Ai(t){if(Kl(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class Di extends _o{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:Ai,extends:_o})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return W[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===na(this).length}isDirty(){const t=gi()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of na(this)){const n=oa(this,e);Pi(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Xo(e)&&t.push(e),Pi(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;Pi(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;Pi(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return Pi(t)&&t.getLastDescendant()||t||null}const o=e[t];return Pi(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:Vs(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:Vs(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=ua(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&R[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){ho(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const s=i.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Kl(this)||this.getChildren().some(Xo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=vc(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function Pi(t){return t instanceof Di}function Fi(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class Ii extends _o{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Li(t){return t instanceof Ii}class Ki extends Di{__cachedText;static getType(){return"root"}static clone(){return new Ki}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!ai()&&0!==gi()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)Pi(e)||Li(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return tl().updateFromJSON(t)}collapseAtStart(){return!0}}function zi(t){return t instanceof Ki}function Bi(t){return new $i(nt(t._nodeMap),null,t._slotsUsed)}function Ri(){return new $i(new Map([["root",new Ki]]),null,!1)}function Wi(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),Pi(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const i=e.getChildren();for(let t=0;t0){const i={};for(const n of r){const r=oa(e,n);null===r&&t(366,o.name,n),i[n]=Wi(r)}n.$slots=i}return n}function Ui(t){return t instanceof $i}class $i{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Ti(e&&e.editor||null,this,t)}clone(t){const e=new $i(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Ti(null,this,()=>({root:Wi(tl())}))}}class Hi extends Di{static getType(){return"artificial"}createDOM(t){return Xl().createElement("div")}}class Ji extends _o{static getType(){return"linebreak"}static clone(t){return new Ji(t.__key)}constructor(t){super(t)}getTextContent(){return"\n"}createDOM(){return Xl().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>Yi(t)||Gi(t)?null:{conversion:ji,priority:0}}}static importJSON(t){return Vi().updateFromJSON(t)}}function ji(t){return{node:Vi()}}function Vi(){return Bl(new Ji)}function qi(t){return t instanceof Ji}function Yi(t){const e=t.parentElement;if(null!==e&&mc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Xi(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&Xi(n))return!0}}return!1}function Gi(t){const e=t.parentElement;if(null!==e&&mc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Xi(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&Xi(o))return!0}return!1}function Xi(t){return Ls(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Qi extends Di{static getType(){return"paragraph"}static clone(t){return new Qi(t.__key)}createDOM(t){const e=Xl().createElement("p"),n=ml(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}static importDOM(){return{p:t=>({conversion:Zi,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(dc(e)){this.isEmpty()&&e.append(Xl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}static importJSON(t){return ts().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Xo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=ts();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Xo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Zi(t){const e=ts();if(Fc(e,t),Dc(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in R&&e.setFormat(n)}return Pc(e,t),{node:e}}function ts(){return Bl(new Qi)}function es(t){return t instanceof Qi}function ns(t){console.warn(t)}const os=0,rs=1,is=2,ss=3,ls=4,cs=-8,as=-7,us=-6,fs=-5,ds=-4;function hs(t,e,n,o,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Ri(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const s=t._observer;null!==s&&(s.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",i.set("root",n),Ys(n,t,"root"))}function gs(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Uc(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const _s={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=bs(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>Pi(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>Pi(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function ps(e){const n=e||{},o=yi(),r=n.theme||{},i=void 0===e?o:n.parentEditor||null,s=n.disableEvents||!1,l=Ri(),c=n.namespace||(null!==i?i._config.namespace:sl()),a=n.editorState,u=[Ki,Wo,Ji,Zo,Qi,Hi,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ze,Yn,os),t.registerCommand(Be,Gn,os),t.registerCommand(Re,Xn,os),t.registerCommand(We,Qn,os),t.registerCommand(tn,eo,os)}(p),p}function ys(t,e){const n=t.get(e);t.delete(e),n&&n()}function ms(t,e,n){return t.set(e,n),ys.bind(null,t,e)}class xs{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,i,s,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new ot,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=sl(),this._onError=r,this._onWarn=i,this._htmlConversions=s,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return ms(this._listeners.update,t)}registerEditableListener(t){return ms(this._listeners.editable,t)}registerDecoratorListener(t){return ms(this._listeners.decorator,t)}registerTextContentListener(t){return ms(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return ku(ms(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new tt,new tt,new tt,new tt,new tt]);const i=r.get(e);void 0===i&&t(36,String(e));const s=function(t){return 7&t}(o),l=i[s];return s!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),i.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let i=r.get(e);void 0===i&&(i=new Set,r.set(e,i)),i.add(o);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(e,o),()=>{i.delete(o),0===i.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Oc(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Oc(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=Vs(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:xo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return kl(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=ml(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,hs(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||co(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Dl(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,gt(this),this._updateTags.add(xo),ki(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;Ln.set(t,n);let o=Kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},Kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=no(t);r.push(zn.register(n));for(let n=0;n{so(t)||(io(t),(e.isEditable()||"click"===o)&&i(t,e))}:t=>{if(so(t))return;io(t);const n=e.isEditable();switch(o){case"cut":return n&&kl(e,Tn,t);case"copy":return kl(e,vn,t);case"paste":return n&&kl(e,je,t);case"dragstart":return n&&kl(e,xn,t);case"dragover":return n&&kl(e,Cn,t);case"dragend":return n&&kl(e,Sn,t);case"focus":return n&&kl(e,On,t);case"blur":return n&&kl(e,Mn,t);case"drop":return n&&kl(e,yn,t)}};r.push(Pn(t,o,s))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(xo),ki(this);bi("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=Bi(e),o._selection=e._selection?e._selection.clone():null),ht(this);const r=this._pendingEditorState,i=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=i&&this._updateTags.add(i),ki(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Mi(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[t,e]of o._nodeMap.entries())Pi(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=Ri(),r=ei,i=oi,s=ni,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,ei=o,oi=!1,ni=e,Ss(null);try{const r=e._nodes;vi(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,ei=r,oi=i,ni=s}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&ki(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):Oi(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Mi(this,()=>{const o=Lr(),r=tl();null!==o?o.dirty||el(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Ol("focus"),Ml(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=Hl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,bi("editable",this,!0,t),this._slotsUsed&&this.update(()=>_i()))}toJSON(){return{editorState:this._editorState.toJSON()}}}xs.version=Z;let Cs=null;function Ss(t){Cs=t}let vs=1;function Ts(){vs=1}function ks(e,n){const o=bs(e,n);return void 0===o&&t(30,n),o}function bs(t,e){return t._nodes.get(e)}const Ns="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function ws(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Ks(e)||jl(e)?sc(e):null})();if(!dc(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=Xs(n),r=n.nodeName;return po(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Ds(n))}const Es=ws;function Os(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return As(e)===t&&t.read("latest",()=>!ws(e))}function Ms(t){return t instanceof xs}function As(t){let e=t;for(;null!=e;){const t=Ds(e);if(Ms(t))return t;e=Nl(e)}return null}function Ds(t){return t?t.__lexicalEditor:null}function Ps(t){return L.test(t)?"rtl":K.test(t)?"ltr":null}function Fs(t){return er(t)||t.isToken()}function Is(t){return Fs(t)||t.isSegmented()}function Ls(t){return hc(t)&&3===t.nodeType}function Ks(t){return hc(t)&&9===t.nodeType}function zs(t){let e=t;for(;null!=e;){if(Ls(e))return e;e=e.firstChild}return null}function Bs(t,e,n){const o=z[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~z.superscript:"superscript"===e?r&=~z.subscript:"lowercase"===e?(r&=~z.uppercase,r&=~z.capitalize):"uppercase"===e?(r&=~z.lowercase,r&=~z.capitalize):"capitalize"===e&&(r&=~z.lowercase,r&=~z.uppercase),r}function Rs(t){return Xo(t)||qi(t)||Li(t)}function Ws(t,e){const n=function(){const t=Cs;return Cs=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);ui(),fi();const o=gi(),r=di(),i=""+vs++;r._nodeMap.set(i,t),Pi(t)?o._dirtyElements.set(i,!0):o._dirtyLeaves.add(i),o._cloneNotNeeded.add(i),0===o._dirtyType&&(o._dirtyType=1),t.__key=i}function Us(e){null!==Xc(e)&&t(380,e.__key,String(Xc(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==i?i.getWritable():null;null===r&&(o.__first=s),null===i&&(o.__last=l),null!==c&&(c.__next=s),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const $s=Us;function Hs(e){fi(),ho(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Gc(n)?n.__slotHost:null,r=di(),i=gi(),s=r._nodeMap,l=i._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Gc(t)?t.__slotHost:null}}(o,s,l);const c=n.__key;0===i._dirtyType&&(i._dirtyType=1),Pi(e)?l.set(c,!0):i._dirtyLeaves.add(c)}function Js(t){ui();const e=gi(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=Vs(n);null!==t&&t.getWritable()}if(null!==t){const e=Vs(t);null!==e&&e.getWritable()}}}function js(){if(ai())return null;return gi()._compositionKey}function Vs(t,e){const n=(e||di())._nodeMap.get(t);return void 0===n?null:n}function qs(t,e){const n=Gs(t,gi());return void 0!==n?Vs(n,e):null}function Ys(t,e,n){t[`__lexicalKey_${e._key}`]=n}function Gs(t,e){return t[`__lexicalKey_${e._key}`]}function Xs(t,e){let n=t;for(;null!=n;){const t=qs(n,e);if(null!==t)return t;n=Nl(n)}return null}function Qs(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function Zs(t){return t.read(()=>tl().getTextContent())}function tl(){return di()._nodeMap.get("root")}function el(t){ui();const e=di();null!==t&&(t.dirty=!0,t.setCachedNodes(null),cr(t)&&gi()._slotsUsed&&Er(t)),e._selection=t}function nl(){ui();ht(gi())}function ol(t){const e=function(t,e){let n=t;for(;null!=n;){const t=Gs(n,e);if(void 0!==t)return t;n=Nl(n)}return null}(t,gi());return null===e?null:Vs(e)}function rl(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function il(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function sl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function ll(t){return Ls(t)?t.nodeValue:null}function cl(t,e,n){const o=Hl(Pl(e));if(null===o)return;const r=tc(o,e._rootElement),i=r.anchorNode;let{anchorOffset:s,focusOffset:l}=r;if(null!==i){let e=ll(i);const o=Xs(i);if(null!==e&&Xo(o)){if((e===A||e===P)&&n){const t=n.length;e=n,s=t,l=t}null!==e&&al(o,e,s,l,t)}}}function al(t,e,n,o,r){let i=t;if(i.isAttached()&&(r||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let c=e;if((s||r)&&(e.endsWith(A)&&(c=e.slice(0,-A.length)),r)){const t=P;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=i.getTextContent();if(r||c!==u){const e=Lr();if(""===c){if(Js(null),a||l||d)i.remove();else{const t=gi();ul(i,"",e),setTimeout(()=>{t.update(()=>{i.isAttached()&&""===i.getTextContent()&&i.remove()})},20)}return}const r=i.getParent(),u=Kr(),f=i.getTextContentSize(),h=js(),g=i.getKey();if(i.isToken()&&!s||null!==h&&g===h&&!s||cr(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!i.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!cr(e)||null===n||null===o)return void ul(i,c,e);if(e.setTextNodeRange(i,n,i,o),i.isSegmented()){const t=Go(i.getTextContent());i.replace(t),i=t}ul(i,c,e)}}}function ul(t,e,n){if(t.setTextContent(e),cr(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const i=n[r];"text"===i.type&&i.key===e&&(i.offset=Fa(t,i.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function fl(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function dl(t,e){return fl(t,e,"altKey")&&fl(t,e,"ctrlKey")&&fl(t,e,"shiftKey")&&fl(t,e,"metaKey")}function hl(t,e,n){if(!dl(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const gl={ctrlKey:!r,metaKey:r},_l={altKey:r,ctrlKey:!r};function pl(t){return"Backspace"===t.key}function yl(t){const e=tl();if(cr(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(zi(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),It(t),t;const r=o.getTopLevelElementOrThrow(),i=r.getParent();if(null===i)return Pi(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),It(t)),t;const s=i;return e.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),It(t),t}{const t=e.select(0,e.getChildrenSize());return el(It(t)),t}}function ml(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=Su(r);return n[e]=t,t}return r}function xl(e,n,o,r,i){if(0===o.size)return;const s=r.__type,l=r.__key,c=n.get(s);void 0===c&&t(33,s);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===i;(void 0===f||d)&&u.set(l,d?"updated":i)}function Cl(t){const e=t.getType(),n=di();if(n._readOnly){const t=Oc(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r}function Sl(t,e,n){const o=t.getParent();let r=n,i=t;return null!==o&&(e&&0===n?(r=i.getIndexWithinParent(),i=o):e||n!==i.getChildrenSize()||(r=i.getIndexWithinParent()+1,i=o)),i.getChildAtIndex(e?r-1:r)}function vl(t,e){const n=t.offset;if("element"===t.type){return Sl(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Sl(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Tl(t){const e=Pl(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function kl(t,e,n){return Ni(t,e,n,t)}function bl(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function Nl(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return jl(n)?n.host:null}function wl(t){return Ks(t)?t:dc(t)?t.ownerDocument:null}function El(t){return gi()._updateTags.has(t)}function Ol(t){ui();gi()._updateTags.add(t)}function Ml(t){ui();gi()._deferred.push(t)}function Al(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Dl(t){const e=wl(t);return e?e.defaultView:null}function Pl(e){const n=e._window;return null===n&&t(78),n}function Fl(t){return Pi(t)&&t.isInline()||Li(t)&&t.isInline()}function Il(t){let e=t.getLatest();for(;null!==e;){if(null!==Xc(e)&&Pi(e))return e;const t=e.getParentOrThrow();if(Kl(t))return t;e=t}return e}function Ll(t){return Pi(t)&&t.isShadowRoot()}function Kl(t){return zi(t)||Ll(t)}function zl(t,e=!1){const n=t.constructor.clone(t);return Ws(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Bl(e){const n=gi(),o=e.getType(),r=bs(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:i,replaceWithKlass:s}=r;if(null!==i){const n=i(e),r=n.constructor;return null!==s?n instanceof s||t(201,s.name,s.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function Rl(e,n){!zi(e.getParent())||Pi(n)||Li(n)||t(99)}function Wl(e){const n=Vs(e);return null===n&&t(63,e),n}function Ul(t){if(!t||t.isInline())return!1;if(Li(t))return!0;if(Pi(t)){if(t.isShadowRoot()){const e=t.getParent();return!(Pi(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function $l(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function Hl(t){return n?(t||window).getSelection():null}function Jl(t){const e=Dl(t);return e?e.getSelection():null}function jl(t){return gc(t)&&"host"in t}const Vl=[];function ql(t){const e=t.getRootNode();if(e===t||!jl(e))return Vl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!jl(t))break;n.push(t),o=t.host}return n}function*Yl(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Ks(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Gl(t){return null!==t?t.ownerDocument:document}function Xl(){const t=yi();return Gl(null!==t?t._rootElement:null)}function Ql(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=ql(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function Zl(t,e){const n=Ql(t,e);if(null!==n){const t=nc(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function tc(t,e){const n=Ql(t,e);return null===n?t:oc(n,rc(t))}function ec(t,e){const n=Ql(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=nc(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:oc(n,rc(t)),range:o}}function nc(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function oc(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:i}=t;return"backward"===e?{anchorNode:r,anchorOffset:i,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:i}}function rc(t){return t.direction}function ic(t){const e=t.getRootNode();return Ks(e)||jl(e)?e.activeElement:null}function sc(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function lc(t){const e=t.target;if(null!==e&&dc(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function cc(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Kl(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),i=Kl(n),s=e!==o||i?zl(e):e;if(i)return Pi(e)&&Pi(s)||t(133),e.insertAfter(s),[e,s,s];{const[t,o,i]=r(n),l=e.getNextSiblings();return i.append(s,...l),[t,o,s]}},[i,s]=r(o);return[i,s]}function ac(t){return dc(t)&&"A"===t.tagName}function uc(t){return dc(t)&&"TR"===t.tagName}function fc(t){return dc(t)&&("TD"===t.tagName||"TH"===t.tagName)}function dc(t){return hc(t)&&1===t.nodeType}function hc(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function gc(t){return hc(t)&&11===t.nodeType}const _c=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function pc(t){return!(!dc(t)||!t.style.display.startsWith("inline"))||_c.test(t.nodeName)}const yc=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function mc(t){return(!dc(t)||!t.style.display.startsWith("inline"))&&yc.test(t.nodeName)}function xc(t){if(Li(t)&&!t.isInline())return!0;if(!Pi(t)||Kl(t))return!1;const e=t.getFirstChild(),n=null===e||qi(e)||Xo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Cc(){return gi()}function Sc(t=Cc()){return t._config.dom||_s}function vc(e,n,o=Cc()){const r=Sc(o).$getDOMSlot(e,n,o);return Pi(e)&&(bc(r)||t(344,e.getKey(),e.getType())),r}function Tc(t,e,n,o){const r=t.read("latest",()=>{const o=Vs(e);return null!==o?function(t,e,n=Cc()){const o=oa(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r}function kc(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}function bc(t){return t instanceof G}function Nc(t,e,n=Cc()){return zs(vc(t,e,n).element)}const wc=new WeakMap,Ec=new Map;function Oc(e){if(!e._readOnly&&e.isEmpty())return Ec;e._readOnly||t(192);let n=wc.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),wc.set(e,n)),n}function Mc(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function Ac(t){return(e=Mc(t))[fo]=!0,e;var e}function Dc(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Pc(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Fc(t,e){const n=e.style.textAlign;return n&&n in R?t.setFormat(n):t}function Ic(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function Lc(t){return!0===t.__lexicalUnmanaged}function Kc(t,e=Cc()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function zc(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(dc(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==Gs(n,e))return!1;n=Nl(n)}return!1}function Bc(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==_o[e]}const Rc=new WeakMap;function Wc(e){const n=Rc.get(e);if(n)return n;const o=null!=e.prototype&&J in e.prototype?e.prototype[J]():void 0,r=function(e){if(!(e===_o||e.prototype instanceof _o)){let n="",o="";try{n=e.getType()}catch(t){}try{xs.version&&(o=JSON.parse(xs.version))}catch(t){}t(290,e.name,n,o)}return e===Ii||e===Di||e===_o}(e),i=!r&&Bc(e,"getType")?e.getType():void 0;let s,l=i;if(o)if(i)s=o[i];else{for(const[t,e]of Object.entries(o))l=t,s=e;if(!s)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){s=e;break}}}if(!r&&l&&(Bc(e,"getType")||(e.getType=()=>l),Bc(e,"clone")||(e.clone=t=>(Ss(t),new e)),Bc(e,"importJSON")||(e.importJSON=s&&s.$importJSON||(t=>(new e).updateFromJSON(t))),!Bc(e,"importDOM")&&s)){const{importDOM:t}=s;t&&(e.importDOM=()=>t)}const c={klass:e,ownNodeConfig:s,ownNodeType:l};return Rc.set(e,c),c}function*Uc(t){for(let e=t;e&&(e===_o||po(e.prototype));){const t=Wc(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Vc(e)}}function $c(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Wc(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Uc(o)){const o=n&&e.get(n);o&&o.add(t)}return e}function Hc(t){const e=Cc();ui();return new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)}const Jc=(t,e)=>{let n=t;for(;null!=n&&!zi(n);){if(e(n))return n;n=n.getParent()}return null};function jc(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?Vs(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Vc(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const qc=new Map;function Yc(t){return Pi(t)||Li(t)}function Gc(t){return Pi(t)||Li(t)}function Xc(t){const e=t.getLatest();return Gc(e)?e.__slotHost:null}function Qc(e){const n=Xc(e);if(null===n)return null;const o=Vs(n);return Pi(o)||Li(o)||t(370),o}function Zc(t){const e=Qc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ea(e))if(o===n)return t;return null}function ta(t){let e=t.getLatest();for(;null!==e;){if(null!==Xc(e))return e;e=e.getParent()}return null}function ea(t){const e=t.getLatest();return Yc(e)&&null!==e.__slots?e.__slots:qc}function na(t){return Array.from(ea(t).keys())}function oa(t,e){const n=ea(t).get(e);return void 0===n?null:Vs(n)}const ra=["__proto__","constructor","prototype"],ia=Symbol("slotMapOwner");function sa(t){let e=t.__slots;return null!==e&&e[ia]===t||(e=new Map(e),e[ia]=t,t.__slots=e),e}const la=new WeakMap,ca=[];function aa(t){for(const{ownNodeConfig:e}of Uc(t)){const t=e&&e.slots;if(t)return t}return ca}function ua(t){let e="";for(const n of na(t)){const o=oa(t,n);null!==o&&(e+=o.getTextContent())}return e}function fa(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function da(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=la.get(e);if(void 0===n){const o=aa(e),r=new Map;for(const n of o)ra.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,la.set(e,n)}return n}(e.constructor);let r=null,i=!0;for(const t of n.keys()){if(null!==r&&fa(r,t,o)>0){i=!1;break}r=t}if(i)return;const s=Array.from(n).sort(([t],[e])=>fa(t,e,o));n.clear();for(const[t,e]of s)n.set(t,e)}function ha(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!Pi(o)&&!Li(o)||o.isInline())&&t(374,o.__key);const i=e.getWritable(),s=sa(i),l=s.get(n);void 0!==l&&pa(l);const c=o.getWritable(),a=Qc(c);if(null!==a){const t=Zc(c);null!==t&&sa(a.getWritable()).delete(t),c.__slotHost=null}return Us(c),c.__slotHost=i.__key,s.set(n,c.__key),da(i),function(){const t=Cc();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),i}function ga(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(pa(o),sa(n).delete(e)),n}function _a(t,e){}function pa(e){const n=Vs(e);if(null===n)return;const o=n.getWritable();Gc(o)||t(377,e),o.__slotHost=null,o.remove()}const ya={next:"previous",previous:"next"};class ma{origin;constructor(t){this.origin=t}[Symbol.iterator](){return Ja({hasNext:wa,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Da(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Da(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),l=new Map;for(let t=i.getAdjacentCaret();null!==t&&l.size0){const n=i.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||i.origin.is(e));else{const t=e.getParent();t&&t.is(s)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else i.insert(e);i=Da(e,this.direction)}for(const t of l.values())t.remove();return this}}class xa extends ma{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:La(t,this.direction)}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sa(this.direction);return Da(this.getNodeAtCaret(),t)||La(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof xa&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ca={root:zi,shadowRoot:Kl};function Sa(t){return ya[t]}function va(t,e="root"){return null===t||Ca[e](t)?null:null===Xc(t)?t:null}class Ta extends ma{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Da(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Pi(this.origin)?La(this.origin,this.direction):null}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sa(this.direction);return Da(this.getNodeAtCaret(),t)||La(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Ta&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Ta||t instanceof ka)&&this.direction===t.direction&&this.origin.is(t.origin)}}class ka extends ma{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Pa(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Pa(this.origin,Sa(this.direction),this.offset)}isSamePointCaret(t){return t instanceof ka&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Ta||t instanceof ka)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Da(this.origin,this.direction)}}function ba(t){return t instanceof ka}function Na(t){return t instanceof ma}function wa(t){return t instanceof Ta}function Ea(t){return t instanceof xa}const Oa={next:class extends ka{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ka{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Ma={next:class extends Ta{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ta{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Aa={next:class extends xa{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends xa{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Da(t,e){return t?new Ma[e](t):null}function Pa(t,e,n){return t?new Oa[e](t,Fa(t,n)):null}function Fa(t,n,o="error"){const r=t.getTextContentSize();let i="next"===n?r:"previous"===n?0:n;return(i<0||i>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),i=i<0?0:r),i}function Ia(t,e){return new Ra(t,e)}function La(t,e){return Pi(t)?new Aa[e](t):null}function Ka(t){return t&&t.getChildCaret()||t}function za(t){return t&&Ka(t.getAdjacentCaret())}class Ba{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new Ba(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return ba(e)?function(t,e){const{direction:n,origin:o}=t,r=Fa(o,"focus"===e?Sa(n):n);return Ia(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Ia(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=ba(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=ba(n),r=e=>e.isSameNodeCaret(n)?null:za(e)||e.getParentCaret(t);return Ja({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Ra{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&xc(t));if(f&&na(f).length>0)return null;return u&&f?[u,f]:null}(f,d,a);if(h){const[t,e]=h;La(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(d){const t=function(t){if(Ea(t)){const e=t.origin;if(xc(e))return e}else{const e=t.getParentAtCaret();if(e&&xc(e))return e}return null}(d),e=t&&t.getParent(),n=t&&t.getParents().findLast(Ll);if(t&&e&&!zi(e)&&t.isEmpty()&&a.has(t.getKey())&&0===na(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!zi(n)&&n.isEmpty();){const t=n.getParent();if(t&&zi(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const g=[f,d,...l,...c].find(ru);if(g){return $a(cu(su(g),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function su(t){const e=function(t){let e=t;for(;Ea(e);){const t=za(e);if(!Ea(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Xo(e.origin))return ba(e)?e:Pa(e.origin,n,n);const o=e.getAdjacentCaret();return wa(o)&&Xo(o.origin)?Pa(o.origin,n,Sa(n)):e}function lu(t){return ba(t)&&t.offset!==Fa(t.origin,t.direction)}function cu(t,e){return t.direction===e?t:t.getFlipped()}function au(t,e){return t.direction===e?t:Ha(cu(t.focus,e),cu(t.anchor,e))}function uu(t,e,n){let o=La(t,"next");for(let t=0;t0||!i&&n.canBeEmpty()&&r(n,"last"))&&s.insert(e(n).splice(0,0,o))}return s}function _u(e,n,o){let r=cu(n,"next");ba(r)&&(0===r.offset?r=Da(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Da(r.origin,"next"))),r.origin.is(e)&&(wa(r)||t(342,e.getKey(),e.getType()),r=nu(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=gu(t,o))r=t;return ba(r)&&t(283),r.insert(e.isInline()?ts().append(e):e),cu(Da(e.getLatest(),"next"),n.direction)}function pu(t){return t}function yu(...t){return t}function mu(t,e){return[t,e]}function xu(t){return t}function Cu(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function Su(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function vu(t,...e){const n=Su(...e);n.length>0&&t.classList.add(...n)}function Tu(t,...e){const n=Su(...e);n.length>0&&t.classList.remove(...n)}function ku(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function bu(t,e,n){return ku(...Object.entries(e).map(([e,o])=>Pn(t,e,o,n)))}export{Ol as $addUpdateTag,Bl as $applyNodeReplacement,hi as $assumeActiveEditor,Xa as $caretFromPoint,eu as $caretRangeFromSelection,Mc as $cloneWithProperties,Ac as $cloneWithPropertiesEphemeral,ja as $comparePointCaretNext,zl as $copyNode,Hc as $create,jc as $createChildrenArray,Vi as $createLineBreakNode,Pr as $createNodeSelection,ts as $createParagraphNode,or as $createPoint,Dr as $createRangeSelection,Fr as $createRangeSelectionFromDom,tr as $createTabNode,Go as $createTextNode,Ua as $extendCaretToRange,Jc as $findMatchingParent,hr as $formatText,_i as $fullReconcile,Vr as $generateNodesFromRawText,za as $getAdjacentChildCaret,vl as $getAdjacentNode,fu as $getAdjacentSiblingOrParentSiblingCaret,cu as $getCaretInDirection,Ha as $getCaretRange,au as $getCaretRangeInDirection,_r as $getCharacterOffsets,La as $getChildCaret,uu as $getChildCaretAtIndex,Ka as $getChildCaretOrSelf,$a as $getCollapsedCaretRange,Ga as $getCommonAncestor,Va as $getCommonAncestorResultBranchOrder,vc as $getDOMSlot,Nc as $getDOMTextNode,Xl as $getDocument,Cc as $getEditor,Sc as $getEditorDOMRenderConfig,Xs as $getNearestNodeFromDOMNode,Il as $getNearestRootOrShadowRoot,Vs as $getNodeByKey,Wl as $getNodeByKeyOrThrow,qs as $getNodeFromDOMNode,Kr as $getPreviousSelection,tl as $getRoot,Lr as $getSelection,Da as $getSiblingCaret,oa as $getSlot,ta as $getSlotFrame,Qc as $getSlotHost,Zc as $getSlotNameWithinHost,na as $getSlotNames,xt as $getState,Ct as $getStateChange,qr as $getTextContent,Fa as $getTextNodeOffset,Pa as $getTextPointCaret,Ia as $getTextPointCaretSlice,bt as $getWritableNodeState,Al as $hasAncestor,El as $hasUpdateTag,_u as $insertNodeToNearestRootAtCaret,Jr as $insertNodes,Mr as $isBlockElementNode,Ea as $isChildCaret,Li as $isDecoratorNode,Ui as $isEditorState,bc as $isElementDOMSlot,Pi as $isElementNode,lu as $isExtendableTextPointCaret,Fl as $isInlineElementOrDecoratorNode,Ro as $isInlineFormattable,Rs as $isLeafNode,po as $isLexicalNode,qi as $isLineBreakNode,Na as $isNodeCaret,ur as $isNodeSelection,es as $isParagraphNode,cr as $isRangeSelection,zi as $isRootNode,Kl as $isRootOrShadowRoot,ws as $isSelectionCapturedInDecoratorInput,Ll as $isShadowRootNode,wa as $isSiblingCaret,Gc as $isSlotChild,Yc as $isSlotHost,er as $isTabNode,Xo as $isTextNode,ba as $isTextPointCaret,Wa as $isTextPointCaretSlice,Is as $isTokenOrSegmented,Fs as $isTokenOrTab,Kc as $markSlotEditable,Ul as $needsBlockCursorBeside,Cl as $nodesOfType,su as $normalizeCaret,It as $normalizeSelection__EXPERIMENTAL,Ml as $onUpdate,Si as $parseSerializedNode,Us as $removeFromParent,ga as $removeSlot,iu as $removeTextFromCaretRange,nu as $rewindSiblingCaret,yl as $selectAll,Js as $setCompositionKey,Pc as $setDirectionFromDOM,Fc as $setFormatFromDOM,Qa as $setPointFromCaret,el as $setSelection,Za as $setSelectionFromCaretRange,ha as $setSlot,St as $setState,dr as $setTextFormat,gu as $splitAtPointCaretNext,cc as $splitNode,Hr as $updateDOMSelection,tu as $updateRangeSelectionFromCaretRange,Hi as ArtificialNode__DO_NOT_USE,ze as BEFORE_INPUT_COMMAND,Mn as BLUR_COMMAND,wn as CAN_REDO_COMMAND,En as CAN_UNDO_COMMAND,s as CAN_USE_BEFORE_INPUT,n as CAN_USE_DOM,bn as CLEAR_EDITOR_COMMAND,Nn as CLEAR_HISTORY_COMMAND,Ke as CLICK_COMMAND,vo as COLLABORATION_TAG,ds as COMMAND_PRIORITY_BEFORE_CRITICAL,cs as COMMAND_PRIORITY_BEFORE_EDITOR,fs as COMMAND_PRIORITY_BEFORE_HIGH,as as COMMAND_PRIORITY_BEFORE_LOW,us as COMMAND_PRIORITY_BEFORE_NORMAL,ls as COMMAND_PRIORITY_CRITICAL,os as COMMAND_PRIORITY_EDITOR,ss as COMMAND_PRIORITY_HIGH,rs as COMMAND_PRIORITY_LOW,is as COMMAND_PRIORITY_NORMAL,We as COMPOSITION_END_COMMAND,Eo as COMPOSITION_END_TAG,Re as COMPOSITION_START_COMMAND,wo as COMPOSITION_START_TAG,Je as CONTROLLED_TEXT_INSERTION_COMMAND,vn as COPY_COMMAND,Tn as CUT_COMMAND,So as CUT_TAG,_s as DEFAULT_EDITOR_DOM_CONFIG,Ue as DELETE_CHARACTER_COMMAND,Ye as DELETE_LINE_COMMAND,qe as DELETE_WORD_COMMAND,Sn as DRAGEND_COMMAND,Cn as DRAGOVER_COMMAND,xn as DRAGSTART_COMMAND,yn as DROP_COMMAND,Ii as DecoratorNode,Di as ElementNode,On as FOCUS_COMMAND,mn as FORMAT_ELEMENT_COMMAND,Ge as FORMAT_TEXT_COMMAND,yo as HISTORIC_TAG,xo as HISTORY_MERGE_TAG,mo as HISTORY_PUSH_TAG,_n as INDENT_CONTENT_COMMAND,Be as INPUT_COMMAND,$e as INSERT_LINE_BREAK_COMMAND,He as INSERT_PARAGRAPH_COMMAND,gn as INSERT_TAB_COMMAND,xc as INTERNAL_$isBlock,k as IS_ALL_FORMATTING,c as IS_ANDROID,f as IS_ANDROID_CHROME,r as IS_APPLE,d as IS_APPLE_WEBKIT,p as IS_BOLD,u as IS_CHROME,C as IS_CODE,i as IS_FIREFOX,T as IS_HIGHLIGHT,l as IS_IOS,y as IS_ITALIC,a as IS_SAFARI,m as IS_STRIKETHROUGH,S as IS_SUBSCRIPT,v as IS_SUPERSCRIPT,x as IS_UNDERLINE,ln as KEY_ARROW_DOWN_COMMAND,on as KEY_ARROW_LEFT_COMMAND,en as KEY_ARROW_RIGHT_COMMAND,sn as KEY_ARROW_UP_COMMAND,un as KEY_BACKSPACE_COMMAND,dn as KEY_DELETE_COMMAND,tn as KEY_DOWN_COMMAND,cn as KEY_ENTER_COMMAND,fn as KEY_ESCAPE_COMMAND,An as KEY_MODIFIER_COMMAND,an as KEY_SPACE_COMMAND,hn as KEY_TAB_COMMAND,Ji as LineBreakNode,nn as MOVE_TO_END,rn as MOVE_TO_START,_t as NODE_STATE_DIRECT,H as NODE_STATE_KEY,pt as NODE_STATE_LATEST,pn as OUTDENT_CONTENT_COMMAND,je as PASTE_COMMAND,Co as PASTE_TAG,Qi as ParagraphNode,Ze as REDO_COMMAND,Ve as REMOVE_TEXT_COMMAND,Ki as RootNode,Ie as SELECTION_CHANGE_COMMAND,Le as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,kn as SELECT_ALL_COMMAND,Xe as SET_TEXT_FORMAT_COMMAND,To as SKIP_COLLAB_TAG,bo as SKIP_DOM_SELECTION_TAG,ko as SKIP_SCROLL_INTO_VIEW_TAG,No as SKIP_SELECTION_FOCUS_TAG,z as TEXT_TYPE_TO_FORMAT,Zo as TabNode,Wo as TextNode,Qe as UNDO_COMMAND,vu as addClassNamesToElement,uo as buildImportMap,yu as configExtension,Fe as createCommand,ps as createEditor,Dn as createRefCountedRegistry,vt as createSharedNodeState,mt as createState,mu as declarePeerDependency,pu as defineExtension,Yl as findAllLexicalElementsDeep,Sa as flipDirection,ic as getActiveElement,sc as getActiveElementDeep,lc as getComposedEventTarget,Ql as getComposedStaticRange,wl as getDOMOwnerDocument,Hl as getDOMSelection,Jl as getDOMSelectionFromTarget,tc as getDOMSelectionPoints,Zl as getDOMSelectionRange,ec as getDOMSelectionRangeAndPoints,ql as getDOMShadowRoots,zs as getDOMTextNode,aa as getDeclaredSlots,Ds as getEditorPropertyFromDOMNode,As as getNearestEditorFromDOMNode,Nl as getParentElement,bs as getRegisteredNode,ks as getRegisteredNodeOrThrow,$c as getRegisteredSubtypeMap,Gl as getRootOwnerDocument,Wc as getStaticNodeConfig,Mo as getStyleObjectFromCSS,Ps as getTextDirection,gs as getTransformSetFromKlass,mc as isBlockDomNode,ai as isCurrentlyReadOnlyMode,zc as isDOMCapturingSelection,Ks as isDOMDocumentNode,hc as isDOMNode,jl as isDOMShadowRoot,Ls as isDOMTextNode,Lc as isDOMUnmanaged,gc as isDocumentFragment,hl as isExactShortcutMatch,ac as isHTMLAnchorElement,dc as isHTMLElement,fc as isHTMLTableCellElement,uc as isHTMLTableRowElement,pc as isInlineDomNode,Gi as isLastChildInBlockNode,Ms as isLexicalEditor,dl as isModifierMatch,Yi as isOnlyChildInBlockNode,Es as isSelectionCapturedInDecoratorInput,Os as isSelectionWithinEditor,Uc as iterStaticNodeConfigChain,Ja as makeStepwiseIterator,ku as mergeRegister,Tc as mountSlotContainer,Su as normalizeClassNames,Pn as registerEventListener,bu as registerEventListeners,Tu as removeClassNamesFromElement,$s as removeFromParent,Ts as resetRandomKey,xu as safeCast,Po as setDOMStyleFromCSS,Do as setDOMStyleObject,Ic as setDOMUnmanaged,Dc as setNodeIndentFromDOM,Cu as shallowMergeConfig,io as stopLexicalPropagation,Bs as toggleTextFormatType,jr as tokenizeRawText,kc as unmountSlotContainer}; -+/*@__INLINE__*/function Fe(t){return{type:t}}const Ie=/* @__PURE__ */Fe("SELECTION_CHANGE_COMMAND"),Le=/* @__PURE__ */Fe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ke=/* @__PURE__ */Fe("CLICK_COMMAND"),ze=/* @__PURE__ */Fe("BEFORE_INPUT_COMMAND"),Be=/* @__PURE__ */Fe("INPUT_COMMAND"),Re=/* @__PURE__ */Fe("COMPOSITION_START_COMMAND"),We=/* @__PURE__ */Fe("COMPOSITION_END_COMMAND"),Ue=/* @__PURE__ */Fe("DELETE_CHARACTER_COMMAND"),$e=/* @__PURE__ */Fe("INSERT_LINE_BREAK_COMMAND"),He=/* @__PURE__ */Fe("INSERT_PARAGRAPH_COMMAND"),Je=/* @__PURE__ */Fe("CONTROLLED_TEXT_INSERTION_COMMAND"),je=/* @__PURE__ */Fe("PASTE_COMMAND"),Ve=/* @__PURE__ */Fe("REMOVE_TEXT_COMMAND"),qe=/* @__PURE__ */Fe("DELETE_WORD_COMMAND"),Ye=/* @__PURE__ */Fe("DELETE_LINE_COMMAND"),Ge=/* @__PURE__ */Fe("FORMAT_TEXT_COMMAND"),Xe=/* @__PURE__ */Fe("SET_TEXT_FORMAT_COMMAND"),Qe=/* @__PURE__ */Fe("UNDO_COMMAND"),Ze=/* @__PURE__ */Fe("REDO_COMMAND"),tn=/* @__PURE__ */Fe("KEYDOWN_COMMAND"),en=/* @__PURE__ */Fe("KEY_ARROW_RIGHT_COMMAND"),nn=/* @__PURE__ */Fe("MOVE_TO_END"),on=/* @__PURE__ */Fe("KEY_ARROW_LEFT_COMMAND"),rn=/* @__PURE__ */Fe("MOVE_TO_START"),sn=/* @__PURE__ */Fe("KEY_ARROW_UP_COMMAND"),ln=/* @__PURE__ */Fe("KEY_ARROW_DOWN_COMMAND"),cn=/* @__PURE__ */Fe("KEY_ENTER_COMMAND"),an=/* @__PURE__ */Fe("KEY_SPACE_COMMAND"),un=/* @__PURE__ */Fe("KEY_BACKSPACE_COMMAND"),fn=/* @__PURE__ */Fe("KEY_ESCAPE_COMMAND"),dn=/* @__PURE__ */Fe("KEY_DELETE_COMMAND"),hn=/* @__PURE__ */Fe("KEY_TAB_COMMAND"),gn=/* @__PURE__ */Fe("INSERT_TAB_COMMAND"),_n=/* @__PURE__ */Fe("INDENT_CONTENT_COMMAND"),pn=/* @__PURE__ */Fe("OUTDENT_CONTENT_COMMAND"),yn=/* @__PURE__ */Fe("DROP_COMMAND"),mn=/* @__PURE__ */Fe("FORMAT_ELEMENT_COMMAND"),xn=/* @__PURE__ */Fe("DRAGSTART_COMMAND"),Cn=/* @__PURE__ */Fe("DRAGOVER_COMMAND"),Sn=/* @__PURE__ */Fe("DRAGEND_COMMAND"),vn=/* @__PURE__ */Fe("COPY_COMMAND"),Tn=/* @__PURE__ */Fe("CUT_COMMAND"),kn=/* @__PURE__ */Fe("SELECT_ALL_COMMAND"),bn=/* @__PURE__ */Fe("CLEAR_EDITOR_COMMAND"),Nn=/* @__PURE__ */Fe("CLEAR_HISTORY_COMMAND"),wn=/* @__PURE__ */Fe("CAN_REDO_COMMAND"),En=/* @__PURE__ */Fe("CAN_UNDO_COMMAND"),On=/* @__PURE__ */Fe("FOCUS_COMMAND"),Mn=/* @__PURE__ */Fe("BLUR_COMMAND"),An=/* @__PURE__ */Fe("KEY_MODIFIER_COMMAND");function Dn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const i=()=>{const t=e.get(n);t&&t.holders.delete(i)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(i),i}}}function Pn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Fn=Object.freeze({}),In=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&jn(n);if(e.isComposing())return;kl(e,tn,t)}],["pointerdown",function(t,e){const n=lc(t),o=t.pointerType;hc(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&Mi(e,()=>{zc(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){kl(e,Re,t)}],["compositionend",function(t,e){const n=e._inputState;i?n.compositionPhase="ending-firefox":l||!a&&!d?kl(e,We,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;jn(n),Mi(e,()=>{qn(t,e)||e.dispatchCommand(Be,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){Mi(e,()=>{const n=Lr(),o=Hl(Pl(e)),r=Kr();if(o)if(cr(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!zi(e)&&1===tl().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=tc(o,e._rootElement).anchorNode;if(dc(n)||Ls(n)){el(Ir(r,o,e,t))}}kl(e,Ke,t)})}],["cut",Fn],["copy",Fn],["dragstart",Fn],["dragover",Fn],["dragend",Fn],["paste",Fn],["focus",Fn],["blur",Fn],["drop",Fn]];s&&In.push(["beforeinput",(t,e)=>function(t,e){const n=t.inputType;if("deleteCompositionText"===n||i&&Tl(e))return;if("insertCompositionText"===n)return;Mi(e,()=>{qn(t,e)||kl(e,ze,t)},{event:t})}(t,e)]);const Ln=new WeakMap,Kn=new WeakMap,zn=Dn(t=>(t.addEventListener("selectionchange",ro),()=>t.removeEventListener("selectionchange",ro)));function Bn(t,e,n,o,r,i){const l=t.anchor,c=t.focus,a=l.getNode(),u=gi();let f;if(void 0!==i)f=i;else{const t=Hl(Pl(u));f=null!==t?tc(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Xo(a)||(!r&&(!s||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!s)&&null!==g&&!a.isComposing()&&d!==Nc(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Fs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Xo(e)||Pi(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function Rn(t,e){return Ls(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Wn(e,n,o){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:l}=tc(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,Rn(r,i)&&Rn(s,l)&&!c.postDeleteSelectionToRestore)||Mi(n,()=>{if(!o)return void el(null);if(!Os(n,r,s))return;let a=Lr();if(c.postDeleteSelectionToRestore&&cr(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),el(a))}if(c.postDeleteSelectionToRestore=null,cr(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===s&&(a.dirty=!0);const i=Pl(n).event,l=i?i.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=tl(),y=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)Un(a,f,d);else if("text"===o.type)Xo(u)||t(141),$n(a,u);else if("element"===o.type&&!y){Pi(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();Un(t,n,o)}(a,e):Un(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,s=a.isBackward(),c=s?l:i,u=s?i:l,f=s?e:t,d=s?t:e;let h=2047,g=!1;for(let t=0;tjn(t),0)}function qn(t,e){const n=lc(t);if(dc(n)&&zc(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=sc(o.ownerDocument);return null!==r&&o.contains(r)&&zc(r,e)}function Yn(e){const n=e.inputType,o=Hn(e),r=gi(),i=r._inputState,s=Lr();if("insertText"===n&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(jn(i),e.preventDefault(),cr(s)&&!s.isCollapsed()){const t=s.isBackward()?s.anchor:s.focus;s.anchor.set(t.key,t.offset,t.type),s.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===s){const t=Kr();if(!cr(t))return!0;el(t.clone())}if(cr(s)){const n=s.anchor.key===s.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{Mi(r,()=>{Js(null)})},30),cr(s)){const e=s.anchor.getNode();e.markDirty(),Xo(e)||t(142),$n(s,e)}}else{if(Js(null),l&&null!==o&&!o.collapsed&&(s.applyDOMRange(o),!s.isCollapsed()))return e.preventDefault(),s.removeText(),!0;e.preventDefault();const t=s.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===s.anchor.offset&&s.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&s.isCollapsed()&&(d=!Li(vl(s.anchor,!0))),!d){kl(r,Ue,!0);const t=Lr();f&&cr(t)&&t.isCollapsed()&&(i.postDeleteSelectionToRestore=t,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!cr(s))return!0;const c=e.data;null!==i.unprocessedBeforeInputData&&cl(!1,r,i.unprocessedBeforeInputData),s.dirty&&null===i.unprocessedBeforeInputData||!s.isCollapsed()||zi(s.anchor.getNode())||null===o||s.applyDOMRange(o),i.unprocessedBeforeInputData=null;const a=s.anchor,u=s.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),kl(r,$e,!1);else if(c===D)e.preventDefault(),kl(r,He,void 0);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=c&&Bn(s,o,c,e.timeStamp,!0)?(e.preventDefault(),kl(r,Je,c),Jn(c)):i.unprocessedBeforeInputData=c;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":kl(r,Je,e);Jn((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;Js(null),t||kl(r,Je,e),Zn(n);break}case"insertLineBreak":Js(null),kl(r,$e,!1);break;case"insertParagraph":Js(null),i.isInsertLineBreak&&!l?(i.isInsertLineBreak=!1,kl(r,$e,!1)):kl(r,He,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":kl(r,je,e);break;case"deleteByComposition":(function(t,e){return t!==e||Pi(t)||Pi(e)||!Fs(t)||!Fs(e)})(d,h)&&kl(r,Ve,e);break;case"deleteByDrag":Ol(No),kl(r,Ve,e);break;case"deleteByCut":kl(r,Ve,e);break;case"deleteContent":kl(r,Ue,!1);break;case"deleteWordBackward":kl(r,qe,!0);break;case"deleteWordForward":kl(r,qe,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":kl(r,Ye,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":kl(r,Ye,!1);break;case"formatStrikeThrough":kl(r,Ge,"strikethrough");break;case"formatBold":kl(r,Ge,"bold");break;case"formatItalic":kl(r,Ge,"italic");break;case"formatUnderline":kl(r,Ge,"underline");break;case"historyUndo":kl(r,Qe,void 0);break;case"historyRedo":kl(r,Ze,void 0)}return!0}function Gn(t){const e=gi(),n=e._inputState,o=Lr(),r=t.data,l=Hn(t);let c=!1;if(null!=r&&cr(o)){const a=Hl(Pl(e)),u=null!==a?tc(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Xo(h)&&Is(h);if(!d&&!g&&Bn(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=to(e,r);if(n.compositionPhase="idle",t)return Ol(Eo),nl(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;s&&!o.isCollapsed()&&Xo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===ll(u.anchorNode)||kl(e,Je,r);const _=r.length;i&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,Js(null))}}if(!c){cl(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(to(e,r||void 0),Ol(Eo),n.compositionPhase="idle")}return nl(),!0}function Xn(t){const e=gi(),n=e._inputState,o=Lr();if(cr(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,i=o.anchor.getNode();if(Js(r.key),Ol(wo),t.timeStamp{to(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return hl(t,"ArrowRight",{shiftKey:"any"})}(t))kl(e,en,t);else if(function(t){return hl(t,"ArrowRight",{...gl,shiftKey:"any"})}(t))kl(e,nn,t);else if(function(t){return hl(t,"ArrowLeft",{shiftKey:"any"})}(t))kl(e,on,t);else if(function(t){return hl(t,"ArrowLeft",{...gl,shiftKey:"any"})}(t))kl(e,rn,t);else if(function(t){return hl(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))kl(e,sn,t);else if(function(t){return hl(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))kl(e,ln,t);else if(function(t){return hl(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,kl(e,cn,t);else if(function(t){return" "===t.key}(t))kl(e,an,t);else if(function(t){return r&&hl(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,kl(e,$e,!0);else if(function(t){return hl(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,kl(e,cn,t);else if(function(t){return hl(t,"Backspace",{shiftKey:"any"})||r&&hl(t,"h",{ctrlKey:!0})}(t))pl(t)?kl(e,un,t)&&Vn(n):(t.preventDefault(),kl(e,Ue,!0));else if(function(t){return"Escape"===t.key}(t))kl(e,fn,t);else if(function(t){return hl(t,"Delete",{})||r&&hl(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),kl(e,Ue,!1)):kl(e,dn,t);else if(function(t){return hl(t,"Backspace",_l)}(t))t.preventDefault(),kl(e,qe,!0);else if(function(t){return hl(t,"Delete",_l)}(t))t.preventDefault(),kl(e,qe,!1);else if(function(t){return r&&hl(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),kl(e,Ye,!0);else if(function(t){return r&&(hl(t,"Delete",{metaKey:!0})||hl(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),kl(e,Ye,!1);else if(function(t){return hl(t,"b",gl)}(t))t.preventDefault(),kl(e,Ge,"bold");else if(function(t){return hl(t,"u",gl)}(t))t.preventDefault(),kl(e,Ge,"underline");else if(function(t){return hl(t,"i",gl)}(t))t.preventDefault(),kl(e,Ge,"italic");else if(function(t){return hl(t,"Tab",{shiftKey:"any"})}(t))kl(e,hn,t);else if(function(t){return hl(t,"z",gl)}(t))t.preventDefault(),kl(e,Qe,void 0);else if(function(t){if(r)return hl(t,"z",{metaKey:!0,shiftKey:!0});return hl(t,"y",{ctrlKey:!0})||hl(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),kl(e,Ze,void 0);else{const o=e._editorState._selection;!function(t){return hl(t,"a",gl)}(t)?null===o||cr(o)||(!function(t){return hl(t,"c",gl)}(t)?function(t){return hl(t,"x",gl)}(t)&&(t.preventDefault(),kl(e,Tn,t)):(t.preventDefault(),kl(e,vn,t))):(t.preventDefault(),kl(e,kn,t)&&Vn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(An,t),!0}function no(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const oo=new Map;function ro(t){const e=Jl(t.target);if(null===e)return;const n=wl(t.target);let o=null,r=null;const i=null!==n?Kn.get(n):void 0;if(null!==n){if(void 0!==i){const t=i.editors;let n=i.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&jl(e._rootElement.getRootNode())){n=!0;break}i.hasShadowEditor=n}if(n){let n=null,i=null;for(const s of t){const t=s._rootElement;if(null===t)continue;const l=tc(e,t).anchorNode;if(null!==l&&As(l)===s){if(jl(t.getRootNode())){o=s,r=l;break}null===n&&(n=s,i=l)}}null===o&&null!==n&&(o=n,r=i)}else{const t=e.anchorNode;null===t||dc(t)&&null!==t.shadowRoot||(o=As(t),null!==o&&(r=t))}}if(null===o){const t=sc(n);o=null!==t?As(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==i)for(const t of i.editors)t._inputState.isSelectionChangeFromMouseDown=!1;Mi(o,()=>{const n=Kr(),i=r??tc(e,o._rootElement).anchorNode;if(dc(i)||Ls(i)){el(Ir(n,e,o,t))}})}const s=il(o),l=s[s.length-1],c=l._key,a=oo.get(c),u=a||l;u!==o&&Wn(e,u,!1),Wn(e,o,!0),o!==l?oo.set(c,o):a&&oo.delete(c)}function io(t){t._lexicalHandled=!0}function so(t){return!0===t._lexicalHandled}const lo=()=>{};function co(e){const n=Ln.get(e);if(void 0===n)return void lo();const o=Kn.get(n);if(void 0===o)return void lo();Ln.delete(e);const r=Ds(e);Ms(r)?(!function(t){if(null!==t._parentEditor){const e=il(t),n=e[e.length-1]._key;oo.get(n)===t&&oo.delete(n)}else oo.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const i=no(e);for(let t=0;tt.__key===this.__key);if(Xo(this))return n;if(cr(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(Li(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:Vs(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Kl(n)||null!==Xc(e))return Pi(e)||e===this&&Li(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:Vs(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:Vs(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=Pi(this)?this:this.getParent(),n=Pi(t)?t:t.getParent(),o=e&&n?Ga(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Ga(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Va(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Al(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let i=this;for(;null!==i;){const s=i.__key;if(r.has(s)||(r.add(s),o.push(i)),i===e)break;const l=Pi(i)?n?i.getFirstChild():i.getLastChild():null;if(null!==l){i=l;continue}const c=n?i.getNextSibling():i.getPreviousSibling();if(null!==c){i=c;continue}const a=i.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);i=u}return n||o.reverse(),o}isDirty(){const t=gi()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(ho(this))return this;const e=Vs(this.__key);return null===e&&t(113),e}getWritable(){if(ho(this))return this;ui();const t=di(),e=gi(),n=t._nodeMap,o=this.__key,r=this.getLatest(),i=e._cloneNotNeeded,s=Lr();if(null!==s&&s.setCachedNodes(null),i.has(o))return Hs(r),r;const l=Mc(r);return i.add(o),Hs(l),n.set(o,l),l}getTextContent(){return ua(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new q(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of Nt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&bt(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){ao(this,!0,t)}replace(e,n){ui();let o=Lr();null!==o&&(o=o.clone()),Rl(this,e);const r=this.getLatest(),i=this.__key,s=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;Us(l),null!==u&&cr(o)&&zr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(ao(r,!1,!0),null===d)c.__first=s;else{d.getWritable().__next=s}if(l.__prev=g,null===h)c.__last=s;else{h.getWritable().__prev=s}l.__next=_,l.__parent=p,c.__size=a;let y=0;n&&(Pi(this)&&Pi(l)||t(139),y=l.getChildrenSize(),l.splice(y,0,this.getChildren()));const m=na(this);if(m.length>0){Yc(this)&&Yc(l)||t(368,this.__key,l.__key);for(const t of m){const e=oa(this,t);null!==e&&(ga(this,t),ha(l,t,e))}}if(cr(o)){el(o);const t=o.anchor,e=o.focus;t.key===i&&(n&&"element"===t.type?t.set(l.__key,y+t.offset,"element"):ir(t,l)),e.key===i&&(n&&"element"===e.type?e.set(l.__key,y+e.offset,"element"):ir(e,l))}return js()===i&&Js(s),l}insertAfter(t,e=!0){ui(),Rl(this,t);const n=this.getWritable(),o=t.getWritable();_a(this.getParentOrThrow());const r=o.getParent(),i=Lr();let s=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(cr(i)){const t=r.__key,e=i.anchor,o=i.focus;s="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}Us(o),e&&cr(i)&&zr(i,r,n,-1)}else Us(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&cr(i)){const t=this.getIndexWithinParent();zr(i,a,t+1);const e=a.__key;s&&i.anchor.set(e,t+2,"element"),l&&i.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){ui(),Rl(this,t);const n=this.getWritable(),o=t.getWritable();_a(this.getParentOrThrow());const r=o.__key,i=Lr(),s=o.getParent(),l=null!==s?o.getIndexWithinParent():-1;Us(o),null!==s&&e&&cr(i)&&zr(i,s,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&cr(i)){zr(i,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return ts()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){ui();const n=Qc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(Pi(o))return o.select();if(!Xo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){ui();const n=Qc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(Pi(o))return o.select(0,0);if(!Xo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function po(t){return t instanceof _o}const yo="historic",mo="history-push",xo="history-merge",Co="paste",So="cut",vo="collaboration",To="skip-collab",ko="skip-scroll-into-view",bo="skip-dom-selection",No="skip-selection-focus",wo="composition-start",Eo="composition-end",Oo="!important";function Mo(t){const e={};if(!t)return e;let n="",o="",r=null,i=!1,s=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===Oo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function Do(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):Ao(t,n,o)}}function Po(t,e,n=""){if(e===n)return;const o=Mo(n),r=Mo(e);for(const e in r)delete o[e],Ao(t,e,r[e]);for(const e in o)t.removeProperty(e)}function Fo(t,e){return 16&e?"code":e&T?"mark":32&e?"sub":64&e?"sup":null}function Io(t,e){return 1&e?"strong":2&e?"em":"span"}function Lo(t,e,n,o,r){const i=o.classList;let s=ml(r,"base");void 0!==s&&i.add(...s),s=ml(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==s&&(8&n&&4&n?(l=!0,c||i.add(...s)):c&&i.remove(...s));for(const t in z){const o=z[t];if(s=ml(r,t),void 0!==s)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&i.remove(...s);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&i.add(...s)}else e&o&&i.remove(...s)}}function Ko(t,e,n){const o=n.isComposing(),r=t+(o?A:""),s=Cc(),l=Sc(s).$getDOMSlot(n,e,s),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(Xl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(!0||o||i){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,i=0;for(;r({conversion:jo,priority:0}),b:()=>({conversion:$o,priority:0}),code:()=>({conversion:Yo,priority:0}),em:()=>({conversion:Yo,priority:0}),i:()=>({conversion:Yo,priority:0}),mark:()=>({conversion:Yo,priority:0}),s:()=>({conversion:Yo,priority:0}),span:()=>({conversion:Uo,priority:0}),strong:()=>({conversion:Yo,priority:0}),sub:()=>({conversion:Yo,priority:0}),sup:()=>({conversion:Yo,priority:0}),u:()=>({conversion:Yo,priority:0})}}static importJSON(t){return Go().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return dc(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Bo(n,"b")),this.hasFormat("italic")&&(n=Bo(n,"i")),this.hasFormat("strikethrough")&&(n=Bo(n,"s")),this.hasFormat("underline")&&(n=Bo(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?z[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?B[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=Bs(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=U[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){ui();let n=t,o=e;const r=Lr(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const t=i.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!cr(r))return Ar(s,n,s,o,"text","text");{const t=js();t!==r.anchor.key&&t!==r.focus.key||Js(s),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),i=r.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=Lr();if(o&&cr(c)){const e=t+s;c.setTextNodeRange(r,e,r,e)}const a=i.slice(0,l)+n+i.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){ui();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=js(),i=n.length;t.sort((t,e)=>t-e),t.push(i);const s=[],l=t.length;for(let e=0,o=0;ee&&(s.push(n.slice(e,r)),e=r)}const c=s.length;if(1===c)return[e];const a=s[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,y=null;const m=Lr();if(cr(m)){const[t,e]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(y=e)}e.isSegmented()?(f=Go(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=At(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=v&&(p.set(t.getKey(),C-v,"text"),C=v){y.set(t.getKey(),S-v,"text");break}v=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&Hs(e);null!==n&&Hs(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),cr(m)&&zr(m,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,i=this.__text,s=i.length;js()===r&&Js(o);const l=Lr();if(cr(l)){const t=l.anchor,i=l.focus;null!==t&&t.key===r&&Wr(t,n,o,e,s),null!==i&&i.key===r&&Wr(i,n,o,e,s)}const c=e.__text,a=n?c+i:i+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function Uo(t){return{forChild:Qo(t.style),node:null}}function $o(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Qo(e.style,n?void 0:"bold"),node:null}}const Ho=new WeakMap;function Jo(t){if(!dc(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function jo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Ho.get(n))&&!Jo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=Vo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Go(o)}}function Vo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,dc(n)){const t=n.style.display;if(""===t&&!pc(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(Ls(n))return n;if("BR"===n.nodeName)return null}}const qo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yo(t){const e=qo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Qo(t.style,e),node:null}}function Go(t=""){return Bl(new Wo(t))}function Xo(t){return t instanceof Wo}function Qo(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,i=o.includes("line-through"),s="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Xo(t)||Ro(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),i&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),s&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Zo extends Wo{static getType(){return"tab"}static clone(t){return new Zo(t.__key)}constructor(t){super("\t",t),this.__detail=2}static importDOM(){return null}createDOM(t){const e=super.createDOM(t),n=ml(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}static importJSON(t){return tr().updateFromJSON(t)}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function tr(){return Bl(new Zo)}function er(t){return t instanceof Zo}class nr{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!Pi(e)){const t=e.getNextSibling();if(Xo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function ir(t,e){if(Pi(e)){const n=e.getLastDescendant();Pi(n)||Xo(n)?rr(t,n):rr(t,e)}else rr(t,e)}class sr{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!ur(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new sr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===Xc(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Xo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===Xc(t));if((Lr()||Kr())===this&&t[0]){const e=Da(t[0],"next");Za(Ha(e,e))}for(const e of t)e.remove();lr()}}function lr(){const t=tl();if(t.isEmpty()){const e=ts();t.append(e),e.select()}}function cr(t){return t instanceof ar}class ar{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!cr(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,i=new Set;for(const n of t)if(Ea(n)){const{origin:t}=n;0===e.length?r.add(t):(i.add(t),e.push(t))}else{const{origin:t}=n;Pi(t)&&i.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(wa(t.focus)&&Pi(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=La(t.focus.origin,"previous");Ea(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=za(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!Pi(t)||i.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=su(t.anchor),o=su(t.anchor.getFlipped()),r=t=>ba(t)?t.origin:t.getNodeAtCaret(),i=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(i)}return e}(au(eu(this),"next"));return ai()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,i=o.isBefore(r),[s,l]=_r(this);let c="",a=!0;for(let u=0;u=0;t--){const e=s[t];if(e.is(d)||Pi(e)&&e.isParentOf(d))break;e.isAttached()&&(!g.has(e)||e.is(i)?p||y.insertAfter(e,!1):e.remove())}if(!p){let t=r,e=null;for(;null!==t;){const o=t.getChildren(),r=o.length;(0===r||o[r-1].is(e))&&(n.delete(t.__key),e=t),t=t.getParent()}}if(Fs(d))if(c===h)d.select();else{const t=Go(e);t.select(),d.replace(t)}else d=d.spliceText(c,h-c,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(this.format=d.getFormat(),this.style=d.getStyle(),d.isComposing()&&(this.anchor.offset-=e.length,this._cachedNodes=null,this._cachedIsBackward=null));for(let t=1;t(Pi(t)||Li(t))&&!t.isInline())){Pi(r)||t(211,o.constructor.name,o.getType());const n=Gr(this);return r.splice(n,0,e),void i.selectEnd()}if(Pi(r)&&null!==Xc(r)){const t=Gr(this),n=Yr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Zr(e),n=t.getLastDescendant();let o=Xa(this.anchor,"next");for(const e of t.getChildren())o=_u(e,o);return void(null!==n&&n.selectEnd())}if(Pi(r)&&!r.isParentRequired()&&!Kl(r.getParentOrThrow())){const t=Gr(this),n=Yr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const s=Zr(e),l=s.getLastDescendant(),c=s.getChildren(),a=!Pi(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=Jc(o,xc));const u=c[c.length-1];let f=c[0];var d;Pi(d=f)&&xc(d)&&!d.isEmpty()&&Pi(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Pi(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const i=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),i.push(r);let s=e;for(const t of i)s=s.insertAfter(t)}(r,f));const h=Jc(l,xc);a&&Pi(h)&&(a.canMergeWhenEmpty()||xc(u))&&(h.append(...a.getChildren()),a.remove()),Pi(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=Pi(r)?r.getLastChild():null;qi(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Kl(e)){const t=ts();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Gr(this),o=Jc(this.anchor.getNode(),xc);if(null!==o&&null!==Xc(o))return null;Pi(o)||t(213);const r=o.getChildAtIndex(n),i=r?[r,...r.getNextSiblings()]:[],s=o.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const e=Vi();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,i]=_r(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=s?[i,r]:[r,i];if(0===e)return[];if(1===e){if(Xo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Xo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Xo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(ti(this,t,e,n))return;const o="move"===t,r=gi(),i=Hl(Pl(r));if(!i)return;const s=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===s||!Pi(c)||c.isInline()||c.canBeEmpty()||$l(s,r,l);const a=bl(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Xo(c)?Nc(c,a,r):null),this.dirty){const t=bl(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Xo(n)?Nc(n,t,r):null}e&&u&&Ur(i,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Xo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Da(c,e?"previous":"next").getNodeAtCaret();if(Xo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?Nc(t,n,r):null;if(o){const t=e?o.length:0;Ur(i,o,t,o,t)}}}}}if(mr(i,t,e?"backward":"forward",n),i.rangeCount>0){const t=Ql(i,r._rootElement),n=t||i.getRangeAt(0),s=this.anchor.getNode(),l=zi(s)?s:Il(s);if(this.applyDOMRange(n),this.dirty=!0,!o){xr(this,e,l);(t?"backward"!==i.direction:i.anchorNode===n.startContainer&&i.anchorOffset===n.startOffset)||yr(this)}}"lineboundary"===n&&ti(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&Pi(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(Pi(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=Ua(Xa(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Ea(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=su(e);tu(this,Ha(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(wa(e)){if(Pi(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(Li(e.origin)){if(e.origin.isIsolated());else if(na(e.origin).length>0){if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),el(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),el(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(na(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(tu(this,Ha(!e.origin.isEmpty()&&n.isEmpty()?nu(Da(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==Xc(t))return;if(Pi(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(Cr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&pr(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,i=o.getTextContentSize();if(o.is(n)||t&&e!==i||!t&&0!==e)return void vr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,i=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==i)return void vr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),i=o.getNode();if(r===i&&"text"===n.type&&"text"===o.type){const t=n.offset,i=o.offset,s=t0&&(g===h.getTextContentSize()||Is(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;t{for(const[e,o]of n)t=Bs(t,e,o?z[e]:0);return t})}function hr(t,e,n=null){const o=null===n&&cr(t)?Bs(t.format,e,null):n;fr(t,t=>Bs(t,e,o))}function gr(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function _r(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[gr(n),gr(o)]}function pr(t,e){for(let n=e;n;n=n.getParent()){if(Pi(n)){if(n.collapseAtStart(t))return!0;if(Kl(n))break}if(n.getPreviousSibling())break}return!1}function yr(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,i=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,i,!0)}function mr(t,e,n,o){t.modify(e,n,o)}function xr(t,e,n){const o=t.getNodes(),r=o.filter(t=>Al(t,n));if(0===r.length||r.length===o.length)return!1;const i=e?r[0]:r[r.length-1],s=Pi(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function Cr(t,e,n){if(ti(t,"extend",e,n))return;const o=gi(),r=Hl(Pl(o));if(!r||"function"!=typeof r.modify)return;const i=o._blockCursorElement,s=o._rootElement,l=t.anchor,c=t.focus.getNode();null===s||null===i||!Pi(c)||c.isInline()||c.canBeEmpty()||$l(i,o,s);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Xo(e)?Nc(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Ur(r,_,p,_,p),mr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const y=Ql(r,s)||r.getRangeAt(0),m=y.startContainer,x=y.startOffset;if(h&&"character"===n&&"text"===l.type&&Xo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Da(u,e?"previous":"next").getNodeAtCaret();if(Xo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=m===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,v,T]=e?[m,x,f,d]:[f,d,m,x],k=zi(u)?u:Il(u);t.applyDOMRange({collapsed:!1,endContainer:v,endOffset:T,startContainer:C,startOffset:S}),t.dirty=!0,!xr(t,e,k)&&e&&yr(t),"lineboundary"===n&&ti(t,"extend",e,n,"decorators")}const Sr=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function vr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),i=r.length;let s=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function Tr(e,n,o,r){let i,s=n,l=!1;if(dc(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;s===u&&u>0&&(c=!0,s=u-1),void 0!==Gs(e,r)||zc(e,r)||(l=!0);let d=a[s],h=!1;if(d===f)d=a[s+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&s--}}if(i=ol(d),Xo(i))s=Fa(i,c?"next":"previous");else{let a=ol(e);if(null===a)return null;if(Pi(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=vc(a,l,r);[a,s]=u.resolveChildIndex(a,l,e,n),Pi(a)||t(215),c&&s>=a.getChildrenSize()&&(s=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(s);if(Pi(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=Pi(f)?f:f.getParentOrThrow()),s=0}Xo(f)?(i=f,a=null,s=Fa(f,c?"next":"previous")):f!==a&&c&&!h&&(Pi(a)||t(216),s=Math.min(a.getChildrenSize(),s+1))}else{const t=Qc(a),o=null!==t?t:a,i=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&ol(e)===a){const t=vc(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&Li(a)&&(c="before")}s="before"===c?i:i+1,a=o.getParentOrThrow()}if(Pi(a))return[or(a.__key,s,"element"),l]}}else i=ol(e);return Xo(i)?[or(i.__key,Fa(i,s,"clamp"),"text"),l]:null}function kr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),i=r.getParent();if(e){if((n||!e)&&null===o&&Pi(i)&&i.isInline()){const e=i.getPreviousSibling();Xo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else Pi(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Xo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),i=r.getParent();if(e&&Pi(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&Pi(i)&&i.isInline()&&!i.canInsertTextAfter()&&i.getTextContentSize()>1){const e=i.getNextSibling();Xo(e)&&t.set(e.__key,0,"text")}}}function br(t,e,n){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);kr(t,n,o),kr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}function Nr(t){const e=Vs(t.key);return null===e?null:ta(e)}function wr(t,e,n){const o=Nr(t),r=Nr(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const i=n(o,r);if(null!==o)return Pi(o)?e.set(o.getKey(),i?o.getChildrenSize():0,"element"):e.set(o.getKey(),i?o.getTextContentSize():0,"text"),!0;const s=Qc(r);if(null===s)return!1;const l=s.getParent();if(null===l)return!1;const c=s.getIndexWithinParent();return e.set(l.getKey(),i?c+1:c,"element"),!0}function Er(t){const e=wr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=Qc(n),e=Qc(o);if(null!==t&&t.is(e)){for(const e of ea(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=Qc(n),o=Vs(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=Qc(o),i=Vs(t.key);return null!==r&&null!==i&&!r.is(i)&&!r.isParentOf(i)&&i.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function Or(t,e,n,o,r,i){if(null===t||null===n||!Os(r,t,n))return null;const s=Tr(t,e,cr(i)?i.anchor:null,r);if(null===s)return null;const l=Tr(n,o,cr(i)?i.focus:null,r);if(null===l)return null;const[c,a]=s,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=ol(t),o=ol(n);if(Li(e)&&Li(o))return null}const d=r._slotsUsed&&wr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return br(c,u),[c,u,a||f||d]}function Mr(t){return Pi(t)&&!t.isInline()}function Ar(t,e,n,o,r,i){const s=di(),l=new ar(or(t,e,r),or(n,o,i),0,"");return l.dirty=!0,s._selection=l,l}function Dr(){const t=or("root",0,"element"),e=or("root",0,"element");return new ar(t,e,0,"")}function Pr(){return new sr(new Set)}function Fr(t,e){return Ir(null,t,e,null)}function Ir(t,e,n,o){const r=n._window;if(null===r)return null;const i=o||r.event,s=i?i.type:void 0,l="selectionchange"===s,c=!it&&(l||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let a,u,f,d;if(cr(t)&&!c)return t.clone();{if(null===e)return null;const o=tc(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===s)&&cr(t)&&!Os(n,a,u))return t.clone()}const h=Or(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let y=0,m="";if(cr(t)){const e=t.anchor;if(g.key===e.key)y=t.format,m=t.style;else{const t=g.getNode();Xo(t)?(y=t.getFormat(),m=t.getStyle()):Pi(t)&&(y=t.getTextFormat(),m=t.getTextStyle())}}const x=new ar(g,_,y,m);return p&&(x.dirty=!0),x}function Lr(){return di()._selection}function Kr(){return gi()._editorState._selection}function zr(t,e,n,o=1){const r=t.anchor,i=t.focus,s=r.getNode(),l=i.getNode();if(!e.is(s)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,s=r?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(s)){let t=0;r&&(t=s.getTextContentSize()),e.set(s.__key,t,"text"),o.set(s.__key,t,"text")}return}if(Pi(i)){const t=i.getChildrenSize(),o=n>=t,r=o?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(Pi(s)){const t=s.getChildrenSize(),e=r>=t,n=e?s.getChildAtIndex(t-1):s.getChildAtIndex(r);if(Xo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Rr(t,e,n,o,r){let i=null,s=0,l=null;null!==o?(i=o.__key,Xo(o)?(s=o.getTextContentSize(),l="text"):Pi(o)&&(s=o.getChildrenSize(),l="element")):null!==r&&(i=r.__key,Xo(r)?l="text":Pi(r)&&(l="element")),null!==i&&null!==l?t.set(i,s,l):(s=e.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function Wr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Ur(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function $r(t,e,n){const o=bl(t,e.getKey());if(Pi(e)){const r=vc(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function Hr(t,e,n,o,r,s){const l=s.getRootNode(),c=Ks(l)||jl(l)?sc(l):null;if(r.has(vo)&&c!==s||null!==c&&ws(c,c))return;const a=tc(o,s);let u;if(!cr(e))return void(null!==t&&Os(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=$r(n,h,f.offset),[y,m]=$r(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let v=_,T=y,k=!1;if("text"===f.type?(v=Xo(h)?Nc(h,_,n):null,k=h.getFormat()!==x||h.getStyle()!==C):cr(t)&&"text"===t.anchor.type&&(k=!0),"text"===d.type&&(T=Xo(g)?Nc(g,y,n):null),null!==v&&null!==T){if(S&&(null===t||k||cr(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,i){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:i}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===m&&a.anchorNode===v&&a.focusNode===T){if(null===c||!s.contains(c)){const t=null!==c?As(c):null;null!==t&&t!==n||r.has(No)||s.focus({preventScroll:!0})}if("element"!==f.type)return}if(Ur(o,v,p,T,m),i&&e.isCollapsed()&&null!==s&&!r.has(No)){const t=ic(s);if(null===t||!s.contains(t)){const t=sc(s.ownerDocument),e=null!==t?As(t):null;null!==e&&e!==n||s.focus({preventScroll:!0})}}if(!r.has(ko)&&e.isCollapsed()&&null!==s&&s===ic(s)){const t=cr(e)&&"element"===e.anchor.type?v.childNodes[p]||null:(void 0===u&&(u=Zl(o,s)),u);if(null!==t){let e;if(Ls(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=wl(n),r=Dl(o);if(null===o||null===r)return;let{top:i,bottom:s}=e,l=0,c=0,a=n;for(;null!==a;){const e=a===o.body;if(e){const e=r.visualViewport;if(e){const t=e.offsetTop;l=t,c=t+e.height}else l=0,c=Pl(t).innerHeight;const n=r.getComputedStyle(o.documentElement),i=parseFloat(n.scrollPaddingTop),s=parseFloat(n.scrollPaddingBottom);isFinite(i)&&(l+=i),isFinite(s)&&(c-=s)}else{const t=a.getBoundingClientRect();l=t.top,c=t.bottom}let n=0;if(ic&&(n=s-c),0!==n)if(e)r.scrollBy(0,n);else{const t=a.scrollTop;a.scrollTop+=n;const e=a.scrollTop-t;i-=e,s-=e}if(e)break;a=Nl(a)}}(n,e,s)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Jr(t){let e=Lr()||Kr();null===e&&(e=tl().selectEnd()),e.insertNodes(t)}function jr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function Vr(t){const e=[];return jr(t,{linebreak:()=>e.push(Vi()),tab:()=>e.push(tr()),text:t=>e.push(Go(t))}),e}function qr(){const t=Lr();return null===t?"":t.getTextContent()}function Yr(t){const e=[];for(const n of t)qi(n)||(!Pi(n)&&!Li(n)||n.isInline()?e.push(n):Pi(n)&&e.push(...Yr(n.getChildren())));return e}function Gr(e){let n=e;e.isCollapsed()||n.removeText();const o=Lr();cr(o)&&(n=o),cr(n)||t(161);const r=n.anchor;let i=r.getNode(),s=r.offset;for(;!xc(i)&&null===Xc(i);){const t=i;if([i,s]=Xr(i,s),t.is(i))break}return s}function Xr(t,e){const n=t.getParent();if(!n){const t=ts();return tl().append(t),t.select(),[tl(),0]}if(Xo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!Pi(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new ar(or(t.__key,e,"element"),or(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Qr(t){return qi(t)||Fl(t)||Xo(t)||t.isParentRequired()}function Zr(t){const e=ts();let n=null;for(let o=0;o99&&t(14)}function di(){return null===ei&&t(195,pi()),ei}function hi(t){null!==di()&&null===ni&&(ni=t),ni!==t&&e(378)}function gi(){return null===ni&&t(337,pi()),ni}function _i(){gi()._dirtyType=2}function pi(){let t=0;const e=new Set,n=xs.version;if("undefined"!=typeof window)for(const o of Yl(document)){const r=Ds(o);if(Ms(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function yi(){return ni}function mi(t,e,n){const o=e.__type,r=ks(t,o);let i=n.get(o);void 0===i&&(i=Array.from(r.transforms),n.set(o,i));const s=i.length;for(let t=0;t0&&wi(t,t._deferred));const i=t._editorState,s=i._selection,l=n._selection,c=0!==t._dirtyType,a=ei,u=oi,f=ni,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){ni=t,ei=n,oi=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=De(i,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),ri)throw e;return hs(t,null,o,n),gt(t),t._dirtyType=2,ri=!0,ki(t,i),void(ri=!1)}finally{h.observe(o,ci),t._updating=d,ei=a,oi=u,ni=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,y=t._normalizedNodes,m=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let i;for(i in o)r.has(i)||(o===n&&(o=Qs(t)),delete o[i])}(t,n);const x=r?null:Hl(Pl(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(s))&&null!==o&&!m.has(bo)){ni=t,ei=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&$l(e,t,o),Hr(s,l,t,x,m,o)}!function(t,e,n){let o=t._blockCursorElement;if(cr(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(ic(e))){const r=n.anchor,i=r.getNode(),s=r.offset;let l=!1,c=null;if(s===i.getChildrenSize()){Ul(i.getChildAtIndex(s-1))&&(l=!0)}else{const e=i.getChildAtIndex(s);if(null!==e&&Ul(e)){const n=e.getPreviousSibling();(null===n||Ul(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=vc(i,t.getElementByKey(i.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=Xl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=Su(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&$l(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,ci),ni=f,ei=a}}null!==g&&function(t,e,n,o,r){const i=Array.from(t._listeners.mutation),s=i.length;for(let t=0;t{si.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;Oi(t,e,o)}}(t)}(t,e)}finally{ii=n}}function bi(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function Ni(t,e,n,o){const r=il(t);let i;if(!ii)for(let t=0;t=0;t--)for(let s=0;s0&&l._updating){i=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(Mi(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return i&&i.update(()=>{Ni(i,e,n,o)}),!1}function wi(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Xo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Ft(o),void 0!==o&&xi(o,i)&&mi(e,o,s),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){li++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&xi(c,i)&&mi(e,c,s)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,li++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),Ei(e),function(t,e,n,o){const r=t._nodeMap,i=e._nodeMap,s=[];for(const[t]of o){const e=i.get(t);void 0!==e&&(e.isAttached()||(Pi(e)&&rt(e,t,r,i,s,o),r.has(t)||o.delete(t),s.push(t)))}for(const t of n){const e=i.get(t);void 0===e||e.isAttached()||(Yc(e)&&null!==e.__slots&&rt(e,t,r,i,s,n),r.has(t)||n.delete(t),s.push(t))}for(const t of s)i.delete(t);const l=gi(),c=l._compositionKey;null===c||i.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const i=a._selection;if(cr(i)){e._slotsUsed&&Er(i);const n=a._nodeMap,o=i.anchor.key,r=i.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else ur(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ki(e)}finally{ei=f,oi=d,ni=h,e._updating=g,li=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,ki(e)):u&&Ns(()=>{ki(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Mi(t,e,n){ni===t&&void 0===n?e():Oi(t,e,n)}function Ai(t){if(Kl(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class Di extends _o{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:Ai,extends:_o})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return W[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===na(this).length}isDirty(){const t=gi()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of na(this)){const n=oa(this,e);Pi(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Xo(e)&&t.push(e),Pi(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;Pi(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;Pi(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return Pi(t)&&t.getLastDescendant()||t||null}const o=e[t];return Pi(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:Vs(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:Vs(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=ua(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&R[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){ho(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const s=i.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Kl(this)||this.getChildren().some(Xo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=vc(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function Pi(t){return t instanceof Di}function Fi(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class Ii extends _o{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Li(t){return t instanceof Ii}class Ki extends Di{__cachedText;static getType(){return"root"}static clone(){return new Ki}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!ai()&&0!==gi()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)Pi(e)||Li(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return tl().updateFromJSON(t)}collapseAtStart(){return!0}}function zi(t){return t instanceof Ki}function Bi(t){return new $i(nt(t._nodeMap),null,t._slotsUsed)}function Ri(){return new $i(new Map([["root",new Ki]]),null,!1)}function Wi(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),Pi(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const i=e.getChildren();for(let t=0;t0){const i={};for(const n of r){const r=oa(e,n);null===r&&t(366,o.name,n),i[n]=Wi(r)}n.$slots=i}return n}function Ui(t){return t instanceof $i}class $i{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Ti(e&&e.editor||null,this,t)}clone(t){const e=new $i(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Ti(null,this,()=>({root:Wi(tl())}))}}class Hi extends Di{static getType(){return"artificial"}createDOM(t){return Xl().createElement("div")}}class Ji extends _o{static getType(){return"linebreak"}static clone(t){return new Ji(t.__key)}constructor(t){super(t)}getTextContent(){return"\n"}createDOM(){return Xl().createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>Yi(t)||Gi(t)?null:{conversion:ji,priority:0}}}static importJSON(t){return Vi().updateFromJSON(t)}}function ji(t){return{node:Vi()}}function Vi(){return Bl(new Ji)}function qi(t){return t instanceof Ji}function Yi(t){const e=t.parentElement;if(null!==e&&mc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Xi(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&Xi(n))return!0}}return!1}function Gi(t){const e=t.parentElement;if(null!==e&&mc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Xi(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&Xi(o))return!0}return!1}function Xi(t){return Ls(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Qi extends Di{static getType(){return"paragraph"}static clone(t){return new Qi(t.__key)}createDOM(t){const e=Xl().createElement("p"),n=ml(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}static importDOM(){return{p:t=>({conversion:Zi,priority:0})}}exportDOM(t){const{element:e}=super.exportDOM(t);if(dc(e)){this.isEmpty()&&e.append(Xl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}static importJSON(t){return ts().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Xo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=ts();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Xo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Zi(t){const e=ts();if(Fc(e,t),Dc(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in R&&e.setFormat(n)}return Pc(e,t),{node:e}}function ts(){return Bl(new Qi)}function es(t){return t instanceof Qi}function ns(t){console.warn(t)}const os=0,rs=1,is=2,ss=3,ls=4,cs=-8,as=-7,us=-6,fs=-5,ds=-4;function hs(t,e,n,o,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Ri(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const s=t._observer;null!==s&&(s.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",i.set("root",n),Ys(n,t,"root"))}function gs(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Uc(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const _s={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=bs(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>Pi(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>Pi(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function ps(e){const n=e||{},o=yi(),r=n.theme||{},i=void 0===e?o:n.parentEditor||null,s=n.disableEvents||!1,l=Ri(),c=n.namespace||(null!==i?i._config.namespace:sl()),a=n.editorState,u=[Ki,Wo,Ji,Zo,Qi,Hi,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ze,Yn,os),t.registerCommand(Be,Gn,os),t.registerCommand(Re,Xn,os),t.registerCommand(We,Qn,os),t.registerCommand(tn,eo,os)}(p),p}function ys(t,e){const n=t.get(e);t.delete(e),n&&n()}function ms(t,e,n){return t.set(e,n),ys.bind(null,t,e)}class xs{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,i,s,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new ot,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=sl(),this._onError=r,this._onWarn=i,this._htmlConversions=s,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return ms(this._listeners.update,t)}registerEditableListener(t){return ms(this._listeners.editable,t)}registerDecoratorListener(t){return ms(this._listeners.decorator,t)}registerTextContentListener(t){return ms(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return ku(ms(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new tt,new tt,new tt,new tt,new tt]);const i=r.get(e);void 0===i&&t(36,String(e));const s=function(t){return 7&t}(o),l=i[s];return s!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),i.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let i=r.get(e);void 0===i&&(i=new Set,r.set(e,i)),i.add(o);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(e,o),()=>{i.delete(o),0===i.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Oc(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Oc(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=Vs(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:xo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,e){return kl(this,t,e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=ml(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,hs(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||co(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Dl(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,gt(this),this._updateTags.add(xo),ki(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;Ln.set(t,n);let o=Kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},Kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=no(t);r.push(zn.register(n));for(let n=0;n{so(t)||(io(t),(e.isEditable()||"click"===o)&&i(t,e))}:t=>{if(so(t))return;io(t);const n=e.isEditable();switch(o){case"cut":return n&&kl(e,Tn,t);case"copy":return kl(e,vn,t);case"paste":return n&&kl(e,je,t);case"dragstart":return n&&kl(e,xn,t);case"dragover":return n&&kl(e,Cn,t);case"dragend":return n&&kl(e,Sn,t);case"focus":return n&&kl(e,On,t);case"blur":return n&&kl(e,Mn,t);case"drop":return n&&kl(e,yn,t)}};r.push(Pn(t,o,s))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(xo),ki(this);bi("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=Bi(e),o._selection=e._selection?e._selection.clone():null),ht(this);const r=this._pendingEditorState,i=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=i&&this._updateTags.add(i),ki(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Mi(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[t,e]of o._nodeMap.entries())Pi(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=Ri(),r=ei,i=oi,s=ni,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,ei=o,oi=!1,ni=e,Ss(null);try{const r=e._nodes;vi(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,ei=r,oi=i,ni=s}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&ki(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):Oi(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Mi(this,()=>{const o=Lr(),r=tl();null!==o?o.dirty||el(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Ol("focus"),Ml(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=Hl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,bi("editable",this,!0,t),this._slotsUsed&&this.update(()=>_i()))}toJSON(){return{editorState:this._editorState.toJSON()}}}xs.version=Z;let Cs=null;function Ss(t){Cs=t}let vs=1;function Ts(){vs=1}function ks(e,n){const o=bs(e,n);return void 0===o&&t(30,n),o}function bs(t,e){return t._nodes.get(e)}const Ns="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function ws(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Ks(e)||jl(e)?sc(e):null})();if(!dc(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=Xs(n),r=n.nodeName;return po(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Ds(n))}const Es=ws;function Os(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return As(e)===t&&t.read("latest",()=>!ws(e))}function Ms(t){return t instanceof xs}function As(t){let e=t;for(;null!=e;){const t=Ds(e);if(Ms(t))return t;e=Nl(e)}return null}function Ds(t){return t?t.__lexicalEditor:null}function Ps(t){return L.test(t)?"rtl":K.test(t)?"ltr":null}function Fs(t){return er(t)||t.isToken()}function Is(t){return Fs(t)||t.isSegmented()}function Ls(t){return hc(t)&&3===t.nodeType}function Ks(t){return hc(t)&&9===t.nodeType}function zs(t){let e=t;for(;null!=e;){if(Ls(e))return e;e=e.firstChild}return null}function Bs(t,e,n){const o=z[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~z.superscript:"superscript"===e?r&=~z.subscript:"lowercase"===e?(r&=~z.uppercase,r&=~z.capitalize):"uppercase"===e?(r&=~z.lowercase,r&=~z.capitalize):"capitalize"===e&&(r&=~z.lowercase,r&=~z.uppercase),r}function Rs(t){return Xo(t)||qi(t)||Li(t)}function Ws(t,e){const n=function(){const t=Cs;return Cs=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);ui(),fi();const o=gi(),r=di(),i=""+vs++;r._nodeMap.set(i,t),Pi(t)?o._dirtyElements.set(i,!0):o._dirtyLeaves.add(i),o._cloneNotNeeded.add(i),0===o._dirtyType&&(o._dirtyType=1),t.__key=i}function Us(e){null!==Xc(e)&&t(380,e.__key,String(Xc(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==i?i.getWritable():null;null===r&&(o.__first=s),null===i&&(o.__last=l),null!==c&&(c.__next=s),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const $s=Us;function Hs(e){fi(),ho(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Gc(n)?n.__slotHost:null,r=di(),i=gi(),s=r._nodeMap,l=i._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Gc(t)?t.__slotHost:null}}(o,s,l);const c=n.__key;0===i._dirtyType&&(i._dirtyType=1),Pi(e)?l.set(c,!0):i._dirtyLeaves.add(c)}function Js(t){ui();const e=gi(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=Vs(n);null!==t&&t.getWritable()}if(null!==t){const e=Vs(t);null!==e&&e.getWritable()}}}function js(){if(ai())return null;return gi()._compositionKey}function Vs(t,e){const n=(e||di())._nodeMap.get(t);return void 0===n?null:n}function qs(t,e){const n=Gs(t,gi());return void 0!==n?Vs(n,e):null}function Ys(t,e,n){t[`__lexicalKey_${e._key}`]=n}function Gs(t,e){return t[`__lexicalKey_${e._key}`]}function Xs(t,e){let n=t;for(;null!=n;){const t=qs(n,e);if(null!==t)return t;n=Nl(n)}return null}function Qs(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function Zs(t){return t.read(()=>tl().getTextContent())}function tl(){return di()._nodeMap.get("root")}function el(t){ui();const e=di();null!==t&&(t.dirty=!0,t.setCachedNodes(null),cr(t)&&gi()._slotsUsed&&Er(t)),e._selection=t}function nl(){ui();ht(gi())}function ol(t){const e=function(t,e){let n=t;for(;null!=n;){const t=Gs(n,e);if(void 0!==t)return t;n=Nl(n)}return null}(t,gi());return null===e?null:Vs(e)}function rl(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function il(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function sl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function ll(t){return Ls(t)?t.nodeValue:null}function cl(t,e,n){const o=Hl(Pl(e));if(null===o)return;const r=tc(o,e._rootElement),i=r.anchorNode;let{anchorOffset:s,focusOffset:l}=r;if(null!==i){let e=ll(i);const o=Xs(i);if(null!==e&&Xo(o)){if((e===A||e===P)&&n){const t=n.length;e=n,s=t,l=t}null!==e&&al(o,e,s,l,t)}}}function al(t,e,n,o,r){let i=t;if(i.isAttached()&&(r||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let c=e;if((s||r)&&(e.endsWith(A)&&(c=e.slice(0,-A.length)),r)){const t=P;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=i.getTextContent();if(r||c!==u){const e=Lr();if(""===c){if(Js(null),a||l||d)i.remove();else{const t=gi();ul(i,"",e),setTimeout(()=>{t.update(()=>{i.isAttached()&&""===i.getTextContent()&&i.remove()})},20)}return}const r=i.getParent(),u=Kr(),f=i.getTextContentSize(),h=js(),g=i.getKey();if(i.isToken()&&!s||null!==h&&g===h&&!s||cr(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!i.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!cr(e)||null===n||null===o)return void ul(i,c,e);if(e.setTextNodeRange(i,n,i,o),i.isSegmented()){const t=Go(i.getTextContent());i.replace(t),i=t}ul(i,c,e)}}}function ul(t,e,n){if(t.setTextContent(e),cr(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const i=n[r];"text"===i.type&&i.key===e&&(i.offset=Fa(t,i.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function fl(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function dl(t,e){return fl(t,e,"altKey")&&fl(t,e,"ctrlKey")&&fl(t,e,"shiftKey")&&fl(t,e,"metaKey")}function hl(t,e,n){if(!dl(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const gl={ctrlKey:!r,metaKey:r},_l={altKey:r,ctrlKey:!r};function pl(t){return"Backspace"===t.key}function yl(t){const e=tl();if(cr(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(zi(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),It(t),t;const r=o.getTopLevelElementOrThrow(),i=r.getParent();if(null===i)return Pi(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),It(t)),t;const s=i;return e.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),It(t),t}{const t=e.select(0,e.getChildrenSize());return el(It(t)),t}}function ml(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=Su(r);return n[e]=t,t}return r}function xl(e,n,o,r,i){if(0===o.size)return;const s=r.__type,l=r.__key,c=n.get(s);void 0===c&&t(33,s);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===i;(void 0===f||d)&&u.set(l,d?"updated":i)}function Cl(t){const e=t.getType(),n=di();if(n._readOnly){const t=Oc(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r}function Sl(t,e,n){const o=t.getParent();let r=n,i=t;return null!==o&&(e&&0===n?(r=i.getIndexWithinParent(),i=o):e||n!==i.getChildrenSize()||(r=i.getIndexWithinParent()+1,i=o)),i.getChildAtIndex(e?r-1:r)}function vl(t,e){const n=t.offset;if("element"===t.type){return Sl(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Sl(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Tl(t){const e=Pl(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function kl(t,e,n){return Ni(t,e,n,t)}function bl(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function Nl(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return jl(n)?n.host:null}function wl(t){return Ks(t)?t:dc(t)?t.ownerDocument:null}function El(t){return gi()._updateTags.has(t)}function Ol(t){ui();gi()._updateTags.add(t)}function Ml(t){ui();gi()._deferred.push(t)}function Al(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Dl(t){const e=wl(t);return e?e.defaultView:null}function Pl(e){const n=e._window;return null===n&&t(78),n}function Fl(t){return Pi(t)&&t.isInline()||Li(t)&&t.isInline()}function Il(t){let e=t.getLatest();for(;null!==e;){if(null!==Xc(e)&&Pi(e))return e;const t=e.getParentOrThrow();if(Kl(t))return t;e=t}return e}function Ll(t){return Pi(t)&&t.isShadowRoot()}function Kl(t){return zi(t)||Ll(t)}function zl(t,e=!1){const n=t.constructor.clone(t);return Ws(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Bl(e){const n=gi(),o=e.getType(),r=bs(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:i,replaceWithKlass:s}=r;if(null!==i){const n=i(e),r=n.constructor;return null!==s?n instanceof s||t(201,s.name,s.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function Rl(e,n){!zi(e.getParent())||Pi(n)||Li(n)||t(99)}function Wl(e){const n=Vs(e);return null===n&&t(63,e),n}function Ul(t){if(!t||t.isInline())return!1;if(Li(t))return!0;if(Pi(t)){if(t.isShadowRoot()){const e=t.getParent();return!(Pi(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function $l(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function Hl(t){return n?(t||window).getSelection():null}function Jl(t){const e=Dl(t);return e?e.getSelection():null}function jl(t){return gc(t)&&"host"in t}const Vl=[];function ql(t){const e=t.getRootNode();if(e===t||!jl(e))return Vl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!jl(t))break;n.push(t),o=t.host}return n}function*Yl(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Ks(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Gl(t){return null!==t?t.ownerDocument:document}function Xl(){const t=yi();return Gl(null!==t?t._rootElement:null)}function Ql(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=ql(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function Zl(t,e){const n=Ql(t,e);if(null!==n){const t=nc(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function tc(t,e){const n=Ql(t,e);return null===n?t:oc(n,rc(t))}function ec(t,e){const n=Ql(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=nc(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:oc(n,rc(t)),range:o}}function nc(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function oc(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:i}=t;return"backward"===e?{anchorNode:r,anchorOffset:i,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:i}}function rc(t){return t.direction}function ic(t){const e=t.getRootNode();return Ks(e)||jl(e)?e.activeElement:null}function sc(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function lc(t){const e=t.target;if(null!==e&&dc(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function cc(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Kl(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),i=Kl(n),s=e!==o||i?zl(e):e;if(i)return Pi(e)&&Pi(s)||t(133),e.insertAfter(s),[e,s,s];{const[t,o,i]=r(n),l=e.getNextSiblings();return i.append(s,...l),[t,o,s]}},[i,s]=r(o);return[i,s]}function ac(t){return dc(t)&&"A"===t.tagName}function uc(t){return dc(t)&&"TR"===t.tagName}function fc(t){return dc(t)&&("TD"===t.tagName||"TH"===t.tagName)}function dc(t){return hc(t)&&1===t.nodeType}function hc(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function gc(t){return hc(t)&&11===t.nodeType}const _c=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function pc(t){return!(!dc(t)||!t.style.display.startsWith("inline"))||_c.test(t.nodeName)}const yc=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function mc(t){return(!dc(t)||!t.style.display.startsWith("inline"))&&yc.test(t.nodeName)}function xc(t){if(Li(t)&&!t.isInline())return!0;if(!Pi(t)||Kl(t))return!1;const e=t.getFirstChild(),n=null===e||qi(e)||Xo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Cc(){return gi()}function Sc(t=Cc()){return t._config.dom||_s}function vc(e,n,o=Cc()){const r=Sc(o).$getDOMSlot(e,n,o);return Pi(e)&&(bc(r)||t(344,e.getKey(),e.getType())),r}function Tc(t,e,n,o){const r=t.read("latest",()=>{const o=Vs(e);return null!==o?function(t,e,n=Cc()){const o=oa(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r}function kc(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}function bc(t){return t instanceof G}function Nc(t,e,n=Cc()){return zs(vc(t,e,n).element)}const wc=new WeakMap,Ec=new Map;function Oc(e){if(!e._readOnly&&e.isEmpty())return Ec;e._readOnly||t(192);let n=wc.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),wc.set(e,n)),n}function Mc(t){const e=t.constructor.clone(t);return e.afterCloneFrom(t),e}function Ac(t){return(e=Mc(t))[fo]=!0,e;var e}function Dc(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Pc(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Fc(t,e){const n=e.style.textAlign;return n&&n in R?t.setFormat(n):t}function Ic(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function Lc(t){return!0===t.__lexicalUnmanaged}function Kc(t,e=Cc()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function zc(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(dc(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==Gs(n,e))return!1;n=Nl(n)}return!1}function Bc(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==_o[e]}const Rc=new WeakMap;function Wc(e){const n=Rc.get(e);if(n)return n;const o=null!=e.prototype&&J in e.prototype?e.prototype[J]():void 0,r=function(e){if(!(e===_o||e.prototype instanceof _o)){let n="",o="";try{n=e.getType()}catch(t){}try{xs.version&&(o=JSON.parse(xs.version))}catch(t){}t(290,e.name,n,o)}return e===Ii||e===Di||e===_o}(e),i=!r&&Bc(e,"getType")?e.getType():void 0;let s,l=i;if(o)if(i)s=o[i];else{for(const[t,e]of Object.entries(o))l=t,s=e;if(!s)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){s=e;break}}}if(!r&&l&&(Bc(e,"getType")||(e.getType=()=>l),Bc(e,"clone")||(e.clone=t=>(Ss(t),new e)),Bc(e,"importJSON")||(e.importJSON=s&&s.$importJSON||(t=>(new e).updateFromJSON(t))),!Bc(e,"importDOM")&&s)){const{importDOM:t}=s;t&&(e.importDOM=()=>t)}const c={klass:e,ownNodeConfig:s,ownNodeType:l};return Rc.set(e,c),c}function*Uc(t){for(let e=t;e&&(e===_o||po(e.prototype));){const t=Wc(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Vc(e)}}function $c(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Wc(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Uc(o)){const o=n&&e.get(n);o&&o.add(t)}return e}function Hc(t){const e=Cc();ui();return new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)}const Jc=(t,e)=>{let n=t;for(;null!=n&&!zi(n);){if(e(n))return n;n=n.getParent()}return null};function jc(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?Vs(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Vc(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const qc=new Map;function Yc(t){return Pi(t)||Li(t)}function Gc(t){return Pi(t)||Li(t)}function Xc(t){const e=t.getLatest();return Gc(e)?e.__slotHost:null}function Qc(e){const n=Xc(e);if(null===n)return null;const o=Vs(n);return Pi(o)||Li(o)||t(370),o}function Zc(t){const e=Qc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ea(e))if(o===n)return t;return null}function ta(t){let e=t.getLatest();for(;null!==e;){if(null!==Xc(e))return e;e=e.getParent()}return null}function ea(t){const e=t.getLatest();return Yc(e)&&null!==e.__slots?e.__slots:qc}function na(t){return Array.from(ea(t).keys())}function oa(t,e){const n=ea(t).get(e);return void 0===n?null:Vs(n)}const ra=["__proto__","constructor","prototype"],ia=Symbol("slotMapOwner");function sa(t){let e=t.__slots;return null!==e&&e[ia]===t||(e=new Map(e),e[ia]=t,t.__slots=e),e}const la=new WeakMap,ca=[];function aa(t){for(const{ownNodeConfig:e}of Uc(t)){const t=e&&e.slots;if(t)return t}return ca}function ua(t){let e="";for(const n of na(t)){const o=oa(t,n);null!==o&&(e+=o.getTextContent())}return e}function fa(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function da(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=la.get(e);if(void 0===n){const o=aa(e),r=new Map;for(const n of o)ra.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,la.set(e,n)}return n}(e.constructor);let r=null,i=!0;for(const t of n.keys()){if(null!==r&&fa(r,t,o)>0){i=!1;break}r=t}if(i)return;const s=Array.from(n).sort(([t],[e])=>fa(t,e,o));n.clear();for(const[t,e]of s)n.set(t,e)}function ha(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!Pi(o)&&!Li(o)||o.isInline())&&t(374,o.__key);const i=e.getWritable(),s=sa(i),l=s.get(n);void 0!==l&&pa(l);const c=o.getWritable(),a=Qc(c);if(null!==a){const t=Zc(c);null!==t&&sa(a.getWritable()).delete(t),c.__slotHost=null}return Us(c),c.__slotHost=i.__key,s.set(n,c.__key),da(i),function(){const t=Cc();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),i}function ga(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(pa(o),sa(n).delete(e)),n}function _a(t,e){}function pa(e){const n=Vs(e);if(null===n)return;const o=n.getWritable();Gc(o)||t(377,e),o.__slotHost=null,o.remove()}const ya={next:"previous",previous:"next"};class ma{origin;constructor(t){this.origin=t}[Symbol.iterator](){return Ja({hasNext:wa,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Da(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Da(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),l=new Map;for(let t=i.getAdjacentCaret();null!==t&&l.size0){const n=i.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||i.origin.is(e));else{const t=e.getParent();t&&t.is(s)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else i.insert(e);i=Da(e,this.direction)}for(const t of l.values())t.remove();return this}}class xa extends ma{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:La(t,this.direction)}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sa(this.direction);return Da(this.getNodeAtCaret(),t)||La(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof xa&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ca={root:zi,shadowRoot:Kl};function Sa(t){return ya[t]}function va(t,e="root"){return null===t||Ca[e](t)?null:null===Xc(t)?t:null}class Ta extends ma{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Da(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Pi(this.origin)?La(this.origin,this.direction):null}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=Sa(this.direction);return Da(this.getNodeAtCaret(),t)||La(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Ta&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Ta||t instanceof ka)&&this.direction===t.direction&&this.origin.is(t.origin)}}class ka extends ma{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Pa(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Da(va(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Pa(this.origin,Sa(this.direction),this.offset)}isSamePointCaret(t){return t instanceof ka&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Ta||t instanceof ka)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Da(this.origin,this.direction)}}function ba(t){return t instanceof ka}function Na(t){return t instanceof ma}function wa(t){return t instanceof Ta}function Ea(t){return t instanceof xa}const Oa={next:class extends ka{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ka{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Ma={next:class extends Ta{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ta{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Aa={next:class extends xa{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends xa{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Da(t,e){return t?new Ma[e](t):null}function Pa(t,e,n){return t?new Oa[e](t,Fa(t,n)):null}function Fa(t,n,o="error"){const r=t.getTextContentSize();let i="next"===n?r:"previous"===n?0:n;return(i<0||i>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),i=i<0?0:r),i}function Ia(t,e){return new Ra(t,e)}function La(t,e){return Pi(t)?new Aa[e](t):null}function Ka(t){return t&&t.getChildCaret()||t}function za(t){return t&&Ka(t.getAdjacentCaret())}class Ba{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new Ba(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return ba(e)?function(t,e){const{direction:n,origin:o}=t,r=Fa(o,"focus"===e?Sa(n):n);return Ia(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Ia(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=ba(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=ba(n),r=e=>e.isSameNodeCaret(n)?null:za(e)||e.getParentCaret(t);return Ja({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Ra{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&xc(t));if(f&&na(f).length>0)return null;return u&&f?[u,f]:null}(f,d,a);if(h){const[t,e]=h;La(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(d){const t=function(t){if(Ea(t)){const e=t.origin;if(xc(e))return e}else{const e=t.getParentAtCaret();if(e&&xc(e))return e}return null}(d),e=t&&t.getParent(),n=t&&t.getParents().findLast(Ll);if(t&&e&&!zi(e)&&t.isEmpty()&&a.has(t.getKey())&&0===na(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!zi(n)&&n.isEmpty();){const t=n.getParent();if(t&&zi(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const g=[f,d,...l,...c].find(ru);if(g){return $a(cu(su(g),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function su(t){const e=function(t){let e=t;for(;Ea(e);){const t=za(e);if(!Ea(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Xo(e.origin))return ba(e)?e:Pa(e.origin,n,n);const o=e.getAdjacentCaret();return wa(o)&&Xo(o.origin)?Pa(o.origin,n,Sa(n)):e}function lu(t){return ba(t)&&t.offset!==Fa(t.origin,t.direction)}function cu(t,e){return t.direction===e?t:t.getFlipped()}function au(t,e){return t.direction===e?t:Ha(cu(t.focus,e),cu(t.anchor,e))}function uu(t,e,n){let o=La(t,"next");for(let t=0;t0||!i&&n.canBeEmpty()&&r(n,"last"))&&s.insert(e(n).splice(0,0,o))}return s}function _u(e,n,o){let r=cu(n,"next");ba(r)&&(0===r.offset?r=Da(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Da(r.origin,"next"))),r.origin.is(e)&&(wa(r)||t(342,e.getKey(),e.getType()),r=nu(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=gu(t,o))r=t;return ba(r)&&t(283),r.insert(e.isInline()?ts().append(e):e),cu(Da(e.getLatest(),"next"),n.direction)}function pu(t){return t}function yu(...t){return t}function mu(t,e){return[t,e]}function xu(t){return t}function Cu(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function Su(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function vu(t,...e){const n=Su(...e);n.length>0&&t.classList.add(...n)}function Tu(t,...e){const n=Su(...e);n.length>0&&t.classList.remove(...n)}function ku(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function bu(t,e,n){return ku(...Object.entries(e).map(([e,o])=>Pn(t,e,o,n)))}export{Ol as $addUpdateTag,Bl as $applyNodeReplacement,hi as $assumeActiveEditor,Xa as $caretFromPoint,eu as $caretRangeFromSelection,Mc as $cloneWithProperties,Ac as $cloneWithPropertiesEphemeral,ja as $comparePointCaretNext,zl as $copyNode,Hc as $create,jc as $createChildrenArray,Vi as $createLineBreakNode,Pr as $createNodeSelection,ts as $createParagraphNode,or as $createPoint,Dr as $createRangeSelection,Fr as $createRangeSelectionFromDom,tr as $createTabNode,Go as $createTextNode,Ua as $extendCaretToRange,Jc as $findMatchingParent,hr as $formatText,_i as $fullReconcile,Vr as $generateNodesFromRawText,za as $getAdjacentChildCaret,vl as $getAdjacentNode,fu as $getAdjacentSiblingOrParentSiblingCaret,cu as $getCaretInDirection,Ha as $getCaretRange,au as $getCaretRangeInDirection,_r as $getCharacterOffsets,La as $getChildCaret,uu as $getChildCaretAtIndex,Ka as $getChildCaretOrSelf,$a as $getCollapsedCaretRange,Ga as $getCommonAncestor,Va as $getCommonAncestorResultBranchOrder,vc as $getDOMSlot,Nc as $getDOMTextNode,Xl as $getDocument,Cc as $getEditor,Sc as $getEditorDOMRenderConfig,Xs as $getNearestNodeFromDOMNode,Il as $getNearestRootOrShadowRoot,Vs as $getNodeByKey,Wl as $getNodeByKeyOrThrow,qs as $getNodeFromDOMNode,Kr as $getPreviousSelection,tl as $getRoot,Lr as $getSelection,Da as $getSiblingCaret,oa as $getSlot,ta as $getSlotFrame,Qc as $getSlotHost,Zc as $getSlotNameWithinHost,na as $getSlotNames,xt as $getState,Ct as $getStateChange,qr as $getTextContent,Fa as $getTextNodeOffset,Pa as $getTextPointCaret,Ia as $getTextPointCaretSlice,bt as $getWritableNodeState,Al as $hasAncestor,El as $hasUpdateTag,_u as $insertNodeToNearestRootAtCaret,Jr as $insertNodes,Mr as $isBlockElementNode,Ea as $isChildCaret,Li as $isDecoratorNode,Ui as $isEditorState,bc as $isElementDOMSlot,Pi as $isElementNode,lu as $isExtendableTextPointCaret,Fl as $isInlineElementOrDecoratorNode,Ro as $isInlineFormattable,Rs as $isLeafNode,po as $isLexicalNode,qi as $isLineBreakNode,Na as $isNodeCaret,ur as $isNodeSelection,es as $isParagraphNode,cr as $isRangeSelection,zi as $isRootNode,Kl as $isRootOrShadowRoot,ws as $isSelectionCapturedInDecoratorInput,Ll as $isShadowRootNode,wa as $isSiblingCaret,Gc as $isSlotChild,Yc as $isSlotHost,er as $isTabNode,Xo as $isTextNode,ba as $isTextPointCaret,Wa as $isTextPointCaretSlice,Is as $isTokenOrSegmented,Fs as $isTokenOrTab,Kc as $markSlotEditable,Ul as $needsBlockCursorBeside,Cl as $nodesOfType,su as $normalizeCaret,It as $normalizeSelection__EXPERIMENTAL,Ml as $onUpdate,Si as $parseSerializedNode,Us as $removeFromParent,ga as $removeSlot,iu as $removeTextFromCaretRange,nu as $rewindSiblingCaret,yl as $selectAll,Js as $setCompositionKey,Pc as $setDirectionFromDOM,Fc as $setFormatFromDOM,Qa as $setPointFromCaret,el as $setSelection,Za as $setSelectionFromCaretRange,ha as $setSlot,St as $setState,dr as $setTextFormat,gu as $splitAtPointCaretNext,cc as $splitNode,Hr as $updateDOMSelection,tu as $updateRangeSelectionFromCaretRange,Hi as ArtificialNode__DO_NOT_USE,ze as BEFORE_INPUT_COMMAND,Mn as BLUR_COMMAND,wn as CAN_REDO_COMMAND,En as CAN_UNDO_COMMAND,s as CAN_USE_BEFORE_INPUT,n as CAN_USE_DOM,bn as CLEAR_EDITOR_COMMAND,Nn as CLEAR_HISTORY_COMMAND,Ke as CLICK_COMMAND,vo as COLLABORATION_TAG,ds as COMMAND_PRIORITY_BEFORE_CRITICAL,cs as COMMAND_PRIORITY_BEFORE_EDITOR,fs as COMMAND_PRIORITY_BEFORE_HIGH,as as COMMAND_PRIORITY_BEFORE_LOW,us as COMMAND_PRIORITY_BEFORE_NORMAL,ls as COMMAND_PRIORITY_CRITICAL,os as COMMAND_PRIORITY_EDITOR,ss as COMMAND_PRIORITY_HIGH,rs as COMMAND_PRIORITY_LOW,is as COMMAND_PRIORITY_NORMAL,We as COMPOSITION_END_COMMAND,Eo as COMPOSITION_END_TAG,Re as COMPOSITION_START_COMMAND,wo as COMPOSITION_START_TAG,Je as CONTROLLED_TEXT_INSERTION_COMMAND,vn as COPY_COMMAND,Tn as CUT_COMMAND,So as CUT_TAG,_s as DEFAULT_EDITOR_DOM_CONFIG,Ue as DELETE_CHARACTER_COMMAND,Ye as DELETE_LINE_COMMAND,qe as DELETE_WORD_COMMAND,Sn as DRAGEND_COMMAND,Cn as DRAGOVER_COMMAND,xn as DRAGSTART_COMMAND,yn as DROP_COMMAND,Ii as DecoratorNode,Di as ElementNode,On as FOCUS_COMMAND,mn as FORMAT_ELEMENT_COMMAND,Ge as FORMAT_TEXT_COMMAND,yo as HISTORIC_TAG,xo as HISTORY_MERGE_TAG,mo as HISTORY_PUSH_TAG,_n as INDENT_CONTENT_COMMAND,Be as INPUT_COMMAND,$e as INSERT_LINE_BREAK_COMMAND,He as INSERT_PARAGRAPH_COMMAND,gn as INSERT_TAB_COMMAND,xc as INTERNAL_$isBlock,k as IS_ALL_FORMATTING,c as IS_ANDROID,f as IS_ANDROID_CHROME,r as IS_APPLE,d as IS_APPLE_WEBKIT,p as IS_BOLD,u as IS_CHROME,C as IS_CODE,i as IS_FIREFOX,T as IS_HIGHLIGHT,l as IS_IOS,y as IS_ITALIC,a as IS_SAFARI,m as IS_STRIKETHROUGH,S as IS_SUBSCRIPT,v as IS_SUPERSCRIPT,x as IS_UNDERLINE,ln as KEY_ARROW_DOWN_COMMAND,on as KEY_ARROW_LEFT_COMMAND,en as KEY_ARROW_RIGHT_COMMAND,sn as KEY_ARROW_UP_COMMAND,un as KEY_BACKSPACE_COMMAND,dn as KEY_DELETE_COMMAND,tn as KEY_DOWN_COMMAND,cn as KEY_ENTER_COMMAND,fn as KEY_ESCAPE_COMMAND,An as KEY_MODIFIER_COMMAND,an as KEY_SPACE_COMMAND,hn as KEY_TAB_COMMAND,Ji as LineBreakNode,nn as MOVE_TO_END,rn as MOVE_TO_START,_t as NODE_STATE_DIRECT,H as NODE_STATE_KEY,pt as NODE_STATE_LATEST,pn as OUTDENT_CONTENT_COMMAND,je as PASTE_COMMAND,Co as PASTE_TAG,Qi as ParagraphNode,Ze as REDO_COMMAND,Ve as REMOVE_TEXT_COMMAND,Ki as RootNode,Ie as SELECTION_CHANGE_COMMAND,Le as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,kn as SELECT_ALL_COMMAND,Xe as SET_TEXT_FORMAT_COMMAND,To as SKIP_COLLAB_TAG,bo as SKIP_DOM_SELECTION_TAG,ko as SKIP_SCROLL_INTO_VIEW_TAG,No as SKIP_SELECTION_FOCUS_TAG,z as TEXT_TYPE_TO_FORMAT,Zo as TabNode,Wo as TextNode,Qe as UNDO_COMMAND,vu as addClassNamesToElement,uo as buildImportMap,yu as configExtension,Fe as createCommand,ps as createEditor,Dn as createRefCountedRegistry,vt as createSharedNodeState,mt as createState,mu as declarePeerDependency,pu as defineExtension,Yl as findAllLexicalElementsDeep,Sa as flipDirection,ic as getActiveElement,sc as getActiveElementDeep,lc as getComposedEventTarget,Ql as getComposedStaticRange,wl as getDOMOwnerDocument,Hl as getDOMSelection,Jl as getDOMSelectionFromTarget,tc as getDOMSelectionPoints,Zl as getDOMSelectionRange,ec as getDOMSelectionRangeAndPoints,ql as getDOMShadowRoots,zs as getDOMTextNode,aa as getDeclaredSlots,Ds as getEditorPropertyFromDOMNode,As as getNearestEditorFromDOMNode,Nl as getParentElement,bs as getRegisteredNode,ks as getRegisteredNodeOrThrow,$c as getRegisteredSubtypeMap,Gl as getRootOwnerDocument,Wc as getStaticNodeConfig,Mo as getStyleObjectFromCSS,Ps as getTextDirection,gs as getTransformSetFromKlass,mc as isBlockDomNode,ai as isCurrentlyReadOnlyMode,zc as isDOMCapturingSelection,Ks as isDOMDocumentNode,hc as isDOMNode,jl as isDOMShadowRoot,Ls as isDOMTextNode,Lc as isDOMUnmanaged,gc as isDocumentFragment,hl as isExactShortcutMatch,ac as isHTMLAnchorElement,dc as isHTMLElement,fc as isHTMLTableCellElement,uc as isHTMLTableRowElement,pc as isInlineDomNode,Gi as isLastChildInBlockNode,Ms as isLexicalEditor,dl as isModifierMatch,Yi as isOnlyChildInBlockNode,Es as isSelectionCapturedInDecoratorInput,Os as isSelectionWithinEditor,Uc as iterStaticNodeConfigChain,Ja as makeStepwiseIterator,ku as mergeRegister,Tc as mountSlotContainer,Su as normalizeClassNames,Pn as registerEventListener,bu as registerEventListeners,Tu as removeClassNamesFromElement,$s as removeFromParent,Ts as resetRandomKey,xu as safeCast,Po as setDOMStyleFromCSS,Do as setDOMStyleObject,Ic as setDOMUnmanaged,Dc as setNodeIndentFromDOM,Cu as shallowMergeConfig,io as stopLexicalPropagation,Bs as toggleTextFormatType,jr as tokenizeRawText,kc as unmountSlotContainer}; diff --git a/patches/lexical@0.49.0.patch b/patches/lexical@0.49.0.patch new file mode 100644 index 00000000..f345614d --- /dev/null +++ b/patches/lexical@0.49.0.patch @@ -0,0 +1,46 @@ +diff --git a/dist/Lexical.dev.js b/dist/Lexical.dev.js +index 7c6fbcfbbfdda3f79d3b41bec1640e60e1df479c..be20404e2a9a96d04c07ca9d3e37b3f732597b8b 100644 +--- a/dist/Lexical.dev.js ++++ b/dist/Lexical.dev.js +@@ -7467,7 +7467,7 @@ function $setTextContent(nextText, dom, node) { + if (nodeValue === text) { + return; + } +- if (isComposing || IS_FIREFOX) { ++ if (true || isComposing || IS_FIREFOX) { + // We also use the diff composed text for general text in FF to avoid + // the spellcheck red line from flickering. + const [index, remove, insert] = diffComposedText(nodeValue, text); +diff --git a/dist/Lexical.dev.mjs b/dist/Lexical.dev.mjs +index 32aeb4eb929ac82d05988992e97ab3204bf698b4..4379adaee67a265d1f9af79b05d3823681fcac41 100644 +--- a/dist/Lexical.dev.mjs ++++ b/dist/Lexical.dev.mjs +@@ -7465,7 +7465,7 @@ function $setTextContent(nextText, dom, node) { + if (nodeValue === text) { + return; + } +- if (isComposing || IS_FIREFOX) { ++ if (true || isComposing || IS_FIREFOX) { + // We also use the diff composed text for general text in FF to avoid + // the spellcheck red line from flickering. + const [index, remove, insert] = diffComposedText(nodeValue, text); +diff --git a/dist/Lexical.prod.js b/dist/Lexical.prod.js +index ab333382f19e0e5dd6a8b0529f565f1731f275a0..28f0ab73ab5b8c2f77841011cfb9c5579e186291 100644 +--- a/dist/Lexical.prod.js ++++ b/dist/Lexical.prod.js +@@ -7,4 +7,4 @@ + */ + + "use strict";function t(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);n.search=o.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=n&&"documentMode"in document?document.documentMode:null,r=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),s=n&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),i=!(!n||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),l=n&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=n&&/Android/.test(navigator.userAgent),a=n&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,u=n&&/^(?=.*Chrome).*/i.test(navigator.userAgent),f=n&&c&&u,d=n&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&r&&!u,h=0,g=1,_=2,p=128,m=1,y=2,x=3,C=4,S=5,T=6,N=a||l||d?"\xa0":"\u200b",v="\n\n",E=s?"\xa0":N,k="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",O="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",b=new RegExp("^[^"+O+"]*["+k+"]"),M=new RegExp("^[^"+k+"]*["+O+"]"),A={bold:1,capitalize:1024,code:16,highlight:p,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},D={directionless:1,unmergeable:2},w={center:2,end:6,justify:4,left:1,right:3,start:5},I={[y]:"center",[T]:"end",[C]:"justify",[m]:"left",[x]:"right",[S]:"start"},P={normal:0,segmented:2,token:1},F={[h]:"normal",[_]:"segmented",[g]:"token"},R="$config";function L(){return Ml()._blockCursorElement}function K(t){return null!==t&&1===t.nodeType&&t.hasAttribute("data-lexical-slot")}class B{element;before;after;constructor(t,e,n){this.element=t,this.before=e||null,this.after=n||null}withBefore(t){return new B(this.element,t,this.after)}withAfter(t){return new B(this.element,this.before,t)}withElement(t){return this.element===t?this:new B(t,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return null!==n&&n.parentElement!==this.element&&t(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&t(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&t(359),this.element.replaceChild(e,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;return e===this.getInsertionAnchor()?null:e}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,e,n){if(this.element===t)return e===t&&0===n?"before":"after";const o=$(t,this.element);if(null===o)return"after";const r=Array.prototype.indexOf.call(t.childNodes,o);if(r<0)return"after";if(e===t)return n<=r?"before":"after";const s=$(t,e);if(null===s)return"after";const i=Array.prototype.indexOf.call(t.childNodes,s);return i>=0&&i<=r?"before":"after"}getInsertionAnchor(){return this.before}}function $(t,e){let n=e;for(;null!==n&&n.parentNode!==t;)n=n.parentNode;return n}class z extends B{withBefore(t){return new z(this.element,t,this.after)}withAfter(t){return new z(this.element,this.before,t)}withElement(t){return this.element===t?this:new z(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;for(;K(e);)t=e,e=e.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return null!==n&&n===L()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,null===t)this.removeManagedLineBreak();else{const e="decorator"===t&&(d||l||a);this.insertManagedLineBreak(e)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,n="IMG"===t.nodeName?t.nextSibling:null;n&&e.removeChild(n),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===("IMG"===e.nodeName))return;this.removeManagedLineBreak()}const n=this.element,o=this.before,r=fl().createElement("br");if(r.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(r,o),t){const t=fl().createElement("img");t.setAttribute("data-lexical-managed-linebreak","true"),t.style.setProperty("display","inline","important"),t.style.setProperty("border","0px","important"),t.style.setProperty("margin","0px","important"),t.alt="",n.insertBefore(t,r),n.__lexicalLineBreak=t}else n.__lexicalLineBreak=r}getFirstChildOffset(){const t=this.getFirstChild(),e=this.getInsertionAnchor();let n=0;for(let o=this.element.firstChild;null!==o&&o!==t&&o!==e;o=o.nextSibling)n++;return n}resolveChildIndex(t,e,n,o){if(n===this.element){const e=this.getFirstChildOffset(),n=L(),r=this.element.childNodes,s=Math.min(o,r.length);let i=0;for(let t=e;tn){i+=1;break}}return[t.getParentOrThrow(),i]}}function W(e,n){const o=[];let r=n;for(;r!==e&&null!==r;r=r.parentNode){let t=0;for(let e=r.previousSibling;null!==e;e=e.previousSibling)t++;o.push(t)}return r!==e&&t(225),o.reverse()}let U;try{U="0.49.0+prod.cjs"}catch(t){}const H=U??'"+source"';class j{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const e of this._back)t.push(e);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}const Y=null;function G(t,e=1e3){return t instanceof J?t.clone():t.sizethis._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const t=new Map(this._old);for(const[e,n]of this._nursery)n!==Y?t.set(e,n):t.delete(e);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(t,e){const n=this.getWithTombstone(t);if(n===e)return this;const o=this.getNursery();return n!==Y&&void 0!==n||(this._size++,n===Y&&o.delete(t)),o.set(t,e),this}delete(t){const e=this.has(t);return e&&(this.getNursery().set(t,Y),this._size--),e}getOrInsert(t,e){const n=this.get(t);return void 0!==n?n:(this.set(t,e),e)}getOrInsertComputed(t,e){const n=this.get(t);if(void 0!==n)return n;const o=e(t);return this.set(t,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,e=this._old;if(e)for(const n of e){const e=n[0],o=t?t.get(e):void 0;o!==Y&&(void 0!==o&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===Y||e&&e.has(n[0])||(yield n)}forEach(t,e){void 0!==e&&(t=t.bind(e));for(const[e,n]of this.entries())t(n,e,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function V(t,e,n,o,r,s){if(as(t)){let i=t.getFirstChild();for(;null!==i;){const t=i.__key;i.__parent===e&&((as(i)||tc(i)&&null!==i.__slots)&&V(i,t,n,o,r,s),n.has(t)||s.delete(t),r.push(t)),i=i.getNextSibling()}}for(const i of tc(t)&&null!==t.__slots?t.__slots.values():[]){const t=o.get(i);void 0!==t&&ec(t)&&t.__slotHost===e&&((as(t)||tc(t)&&null!==t.__slots)&&V(t,i,n,o,r,s),n.has(i)||s.delete(i),r.push(i))}}let q=!1,X=0;function Q(t){X=t.timeStamp}function Z(t,e,n){const o="BR"===t.nodeName,r=e.__lexicalLineBreak;return r&&(t===r||o&&t.previousSibling===r)||o&&void 0!==hi(t,n)}function tt(t,e,n){const o=rl(Gi(n)),r=o&&gl(o,n._rootElement);let s=null,i=null;null!==r&&r.anchorNode===t&&(s=r.anchorOffset,i=r.focusOffset);const l=t.nodeValue;null!==l&&ki(e,l,s,i,!1)}function et(t,e,n){if(jo(t)){const e=t.anchor.getNode();if(e.is(n)&&t.format!==e.getFormat())return!1}return ti(e)&&n.isAttached()}function nt(t,e,n){for(let o=t;o&&!Wl(o);o=zi(o)){const t=hi(o,e);if(void 0!==t){const e=ui(t,n);if(e)return ds(e)||!Sl(o)?void 0:[o,e]}}}function ot(t,e,n){q=!0;const o=performance.now()-X>100;try{is(t,()=>{const r=pr()||function(t){return t.read("latest",()=>{const t=pr();return null!==t?t.clone():null})}(t),i=new Map,l=t._editorState,c=t._blockCursorElement;let a=!1,u="";for(let n=0;n0){let e=0;for(let r=0;r0)for(const[e,n]of i)n.reconcileObservedMutation(e,t);const f=n.takeRecords();if(f.length>0){for(let e=0;e{ot(t,e,n)})}const it="direct",lt="latest";class ct{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,e){this.key=t,this.parse=e.parse.bind(e),this.unparse=(e.unparse||pt).bind(e),this.isEqual=(e.isEqual||Object.is).bind(e),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=e.resetOnCopyNode||!1}}function at(t,e,n=lt){const o=(n===lt?t.getLatest():t).__state;return o?o.getValue(e):e.defaultValue}function ut(t){const e=new Map,n=new Set;for(const{ownNodeConfig:o}of Vl("function"==typeof t?t:t.replace))if(o&&o.stateConfigs)for(const t of o.stateConfigs){let o;"stateConfig"in t?(o=t.stateConfig,t.flat&&n.add(o.key)):o=t,e.set(o.key,o)}return{flatKeys:n,sharedConfigMap:e}}const ft=new Set(["__proto__","constructor","prototype"]);class dt{node;knownState;unknownState;sharedNodeState;size;constructor(t,e,n=void 0,o=new Map,r=void 0){this.node=t,this.sharedNodeState=e,this.unknownState=n,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,i=void 0!==r?r:function(t,e,n){let o=n.size;if(e)for(const r in e){const e=t.get(r);e&&n.has(e)||o++}return o}(s,n,o);this.size=i}getValue(t){const e=this.knownState.get(t);if(void 0!==e)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const e=this.unknownState[t.key];void 0!==e&&(n=t.parse(e)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[e,n]of this.knownState)e.isEqual(n,e.defaultValue)?delete t[e.key]:t[e.key]=e.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in t&&(e[n]=t[n],delete t[n]);return _t(t)&&(e.$=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:n}=this,o=new Map(this.knownState);return new dt(t,e,function(t,e,n){let o;if(n)for(const[r,s]of Object.entries(n)){if(ft.has(r))continue;const n=t.get(r);n?e.has(n)||e.set(n,n.parse(s)):(o=o||{},o[r]=s)}return o}(e.sharedConfigMap,o,n),o,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,e){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:o,unknownState:r}=this;o.has(t)||r&&n in r||(r&&(delete r[n],this.unknownState=_t(r)),this.size++),o.set(t,e)}updateFromUnknown(t,e){if(ft.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const t of e.keys())e.set(t,t.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[e,n]of Object.entries(t))this.updateFromUnknown(e,n)}}function ht(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new dt(e,gt(e));return e.__state=n,n}function gt(t){return t.__state?t.__state.sharedNodeState:Us(Ml(),t.getType()).sharedNodeState}function _t(t){if(t)for(const e in t)return t}function pt(t){return t}function mt(t,e,n){for(const[o,r]of e.knownState){if(t.has(o.key))continue;t.add(o.key);const e=n?n.getValue(o):o.defaultValue;if(e!==r&&!o.isEqual(e,r))return!0}return!1}function yt(t,e,n){const{unknownState:o}=e,r=n?n.unknownState:void 0;if(o)for(const[e,n]of Object.entries(o)){if(t.has(e))continue;t.add(e);if(n!==(r?r[e]:void 0))return!0}return!1}function xt(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function Ct(t,e){const n=t.__mode,o=t.__format,r=t.__style,s=e.__mode,i=e.__format,l=e.__style,c=t.__state,a=e.__state;return(null===n||n===s)&&(null===o||o===i)&&(null===r||r===l)&&(null===t.__state||c===a||function(t,e){if(t===e)return!0;const n=new Set;return!(t&&mt(n,t,e)||e&&mt(n,e,t)||t&&yt(n,t,e)||e&&yt(n,e,t))}(c,a))}function St(t,e){const n=t.mergeWithSibling(e),o=jr()._normalizedNodes;return o.add(t.__key),o.add(e.__key),n}function Tt(t){let e,n,o=t;if(""!==o.__text||!o.isSimpleText()||o.isUnmergeable()){for(;null!==(e=o.getPreviousSibling())&&wo(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(""!==e.__text){if(Ct(e,o)){o=St(e,o);break}break}e.remove()}for(;null!==(n=o.getNextSibling())&&wo(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Ct(o,n)){o=St(o,n);break}break}n.remove()}}else o.remove()}function Nt(t){return vt(t.anchor),vt(t.focus),t}function vt(t){for(;"element"===t.type;){const e=t.getNode(),n=t.offset;let o,r;if(n===e.getChildrenSize()?(o=e.getChildAtIndex(n-1),r=!0):(o=e.getChildAtIndex(n),r=!1),wo(o)){t.set(o.__key,r?o.getTextContentSize():0,"text",!0);break}if(!as(o))break;t.set(o.__key,r?o.getChildrenSize():0,"element",!0)}}const Et=Symbol.for("@lexical/CachedTextSize");function kt(e,n){return Ut.read(()=>{let o=0,r=e;for(let e=0;e0&&!o?t.classList.add(n):e<1&&o&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",0===e?"":`calc(${e} * var(--lexical-indent-base-value, ${te}))`)}function ne(t,e){const n=t.style;0===e?Zt(n,""):1===e?Zt(n,"left"):2===e?Zt(n,"center"):3===e?Zt(n,"right"):4===e?Zt(n,"justify"):5===e?Zt(n,"start"):6===e&&Zt(n,"end")}function oe(t,e){const n=function(t){const e=t.__dir;if(null!==e)return e;if(gs(t))return null;const n=t.getParent();return null===n||Xi(n)&&null===n.__dir?"auto":null}(e);null!==n?t.dir=n:t.removeAttribute("dir")}function re(t){const e=fl().createElement("div");return e.setAttribute("data-lexical-slot",t),e.style.display="none",e}function se(t,e,n){e||"false"===t.contentEditable?Ul(n,At):n.removeAttribute("contenteditable")}function ie(t,e,n){const o=wt,r=Rt();wt="";let s="";const i=ds(t);for(const[o,r]of n){const n=re(o);se(e,i,n),e.appendChild(n),wt="";const l=Rt();fe(r,Dl(t,n,At)),Lt(l),ce(t,o,e,n),s+=wt}return Lt(r),wt=o,s}function le(t){return tc(t)&&null!==t.__slots?t.__slots:Zl}function ce(t,e,n,o){const r=Jt.$getSlotTargetElement(t,e,n,At);null!==r&&(o.parentElement!==r&&r.appendChild(o),o.style.display="")}function ae(t){const e=jt.get(t);return void 0!==e?e.parentElement:null}function ue(t,e,n){const o=le(t),r=le(e);for(const[t,e]of o)if(!r.has(t)){const t=ae(e);Xt(e,null),null!==t&&t.remove()}const s=wt,i=Rt();let l="",c=null;const a=ds(e);for(const[t,s]of r){const r=o.get(t);let i=void 0!==r?ae(r):null;wt="";const u=Rt();if(null===i){i=re(t);let o=null;for(const t of n.children)if(!t.hasAttribute("data-lexical-slot")){o=t;break}n.insertBefore(i,o),fe(s,Dl(e,i,At))}else r===s?pe(s,i):(void 0!==r&&Xt(r,i),fe(s,Dl(e,i,At)));if(Lt(u),se(n,a,i),ce(e,t,n,i),l+=wt,i.parentElement===n){const t=null===c?n.firstChild:c.nextSibling;t!==i&&n.insertBefore(i,t),c=i}}return Lt(i),wt=s,l}function fe(e,n){const o=Ht.get(e);if(void 0===o&&t(60),null!==n){const t=Wt.get(e);if(void 0!==t){const r=jt.get(e);if(void 0!==r){const s=ec(t)?t.__slotHost:null,i=ec(o)?o.__slotHost:null,l=t.__parent!==o.__parent||s!==i,c=null!==i&&r.parentElement!==n.element;if(l||c)return n.insertChild(r),pe(e,n.element)}}}const r=Jt.$createDOM(o,At);if(function(t,e,n){const o=n._keyToDOMMap;di(e,n,t),o.set(t,e)}(e,r,At),wo(o)?r.setAttribute("data-lexical-text","true"):ds(o)&&(r.setAttribute("data-lexical-decorator","true"),zl(r,{captureSelection:!0})),as(o)){const t=o.__indent,e=o.__size;oe(r,o),0!==t&&ee(r,t);const n=le(o),s=n.size>0?ie(o,r,n):"";if(0===e)r.__lexicalTextContent=s,r.__lexicalFirstTextKey=null,wt+=s,n.size>0&&(r.__lexicalSlotTextLength=s.length);else{const t=wt,i=e-1;if(de(Xl(o,Ht),o,0,i,Dl(o,r,At)),""!==s){const e=r.__lexicalTextContent||"";r.__lexicalTextContent=s+e,wt=t+s+e}n.size>0&&(r.__lexicalSlotTextLength=s.length)}const i=o.__format;0!==i&&ne(r,i),o.isInline()||he(null,o,r)}else{const t=o.getTextContent();if(ds(o)){const t=o.decorate(At,Mt);null!==t&&me(e,t),r.contentEditable="false";const n=le(o);n.size>0&&ie(o,r,n)}wt+=t}return null!==n&&n.insertChild(r),Jt.$decorateDOM(o,null,r,At),Ot(o),Fi(Gt,Dt,Bt,o,"created"),r}function de(e,n,o,r,s){const i=wt,l=Rt();wt="",It=null,Pt=null,Ft=null;let c=o;for(;c<=r;++c){const t=Rt();fe(e[c],s);const n=Ht.get(e[c]);null!==n&&wo(n)?null===It&&(It=n.getFormat(),Pt=n.getStyle(),Ft=n.__key):as(n)&&c0?null:"empty"}return null}(e,Ht);r!==s&&o.setManagedLineBreak(s)}function ge(e,n,o){var r;It=null,Pt=null,Ft=null,function(e,n,o){const r=wt,s=e.__size,i=n.__size;wt="";const l=o.element,c=At._keyToDOMMap.get(n.__key);void 0===c&&t(351,n.__key);const a=i-s;if(!Vt&&Math.abs(a)<=1&&s>=bt&&e.__first===n.__first&&(0!==a||!At._cloneNotNeeded.has(e.__key))){const s=c.__lexicalTextContent,u=Yt.get(e.__key);if(!Vt&&"string"==typeof s&&void 0!==u){const i=function(t,e){const n=e.size;if(0===n||n>=t.__size)return null;let o=t.__last,r=null,s=0;for(;null!==o&&s0?s.slice(h):s,_=g.slice(0,g.length-e)+d;return c.__lexicalTextContent=_,wt=r+_,void _e(n,c,u)}if(function(e,n,o,r,s,i,l,c){if(1!==c&&-1!==c)return!1;const a=1===c?2:1;if(l!==a)return!1;const u=l-c;let f=e.__last;for(let t=0;t0?s.slice(E):s;return r.__lexicalTextContent=k.slice(0,k.length-T)+N,!0}(e,0,o,c,s,i,f,a)){const e=c.__lexicalTextContent;return"string"!=typeof e&&t(353),wt=r+e,void _e(n,c,u)}}}if(0===a){let n=e.__first,o=0;for(;null!==n;){const e=Ht.get(n);if(void 0===e)break;const r=Vt||zt.has(n)||$t.has(n),s=Rt();if(r)pe(n,l);else{let o,r;if(as(e)){r=jt.get(n);const s=r&&r.__lexicalTextContent;"string"!=typeof s&&t(354,e.getType()),o=s}else o=e.getTextContent();wt+=o,void 0!==r&&Kt(r)}wo(e)?null===It&&(It=e.getFormat(),Pt=e.getStyle(),Ft=e.__key):as(e)&&oi,g=d>l;if(h&&!g){const e=n[l+1],o=void 0===e?null:At.getElementByKey(e);de(n,t,d,l,s.withBefore(o??s.before))}else g&&!h&&Qt(e,f,i,s.element)}(n,r,c,s,i,o)}c.__lexicalTextContent=wt,c.__lexicalFirstTextKey=Ft,wt=r+wt}(e,n,Dl(n,o,At)),Xi(n)||(r=n,null==It||It===r.__textFormat||qt||r.setTextFormat(It),function(t){null==Pt||Pt===t.__textStyle||qt||t.setTextStyle(Pt)}(n))}function _e(t,e,n){const o=e.__lexicalFirstTextKey;if(null!=o){const e=t.__key;let r=o;for(;null!==r;){const t=Ht.get(r);if(void 0===t){r=null;break}if(t.__parent===e)break;r=t.__parent}if(null!==r&&!n.has(r)){const t=Ht.get(o);if(wo(t))return It=t.getFormat(),void(Pt=t.getStyle())}}e.__lexicalFirstTextKey=Ft}function pe(e,n){const o=Wt.get(e);let r=Ht.get(e);void 0!==o&&void 0!==r||t(61);const s=Vt||zt.has(e)||$t.has(e),i=$i(At,e);if(o===r&&!s){let e;if(as(o)){const n=i.__lexicalTextContent;"string"!=typeof n&&t(355,o.getType()),e=n,Kt(i)}else e=o.getTextContent();return wt+=e,i}if(o!==r&&s&&Fi(Gt,Dt,Bt,r,"updated"),Jt.$updateDOM(r,o,i,At)){const o=fe(e,null);return null===n&&t(62),n.replaceChild(o,i),Xt(e,null),o}if(as(o)){as(r)||t(334,e);const n=r.__indent;(Vt||n!==o.__indent)&&ee(i,n);const l=r.__format;(Vt||l!==o.__format)&&ne(i,l);const c=s&&(le(r).size>0||le(o).size>0)?ue(o,r,i):"";if(s){const t=wt;if(ge(o,r,i),gs(r)||r.isInline()||he(0,r,i),""!==c){const e=i.__lexicalTextContent||"";i.__lexicalTextContent=c+e,wt=t+c+e,i.__lexicalSlotTextLength=c.length}else(le(r).size>0||le(o).size>0)&&(i.__lexicalSlotTextLength=0)}else{const e=i.__lexicalTextContent;"string"!=typeof e&&t(356,o.getType()),wt+=e,Kt(i)}if((Vt||r.__dir!==o.__dir||r.__parent!==o.__parent)&&(oe(i,r),gs(r)&&!Vt))for(const t of r.getChildren())if(as(t)){oe($i(At,t.getKey()),t)}}else{const t=r.getTextContent();if(ds(r)){const t=r.decorate(At,Mt);null!==t&&me(e,t),s&&(le(r).size>0||le(o).size>0)&&ue(o,r,i)}wt+=t}if(!qt&&gs(r)){const t=r.getLatest();if(t.__cachedText!==wt){const e=t.getWritable();e.__cachedText=wt,r=e}}return Jt.$decorateDOM(r,o,i,At),Ot(r),i}function me(t,e){let n=At._pendingDecorators;const o=At._decorators;if(null===n){if(o[t]===e)return;n=_i(At)}n[t]=e}function ye(t){let e=t.nextSibling;return null!==e&&e===At._blockCursorElement&&(e=e.nextSibling),e}function xe(t,e){const n=new Set;for(let o=e;o{for(const n of e){const e=Ht.get(n);if(void 0===e)continue;const o=e.__parent;if(null===o)continue;let r=t.get(o);void 0===r&&(r=new Set,t.set(o,r)),r.add(n)}};return e($t.keys()),e(zt),t}();const i=new Map;return Gt=i,pe("root",null),At=void 0,Dt=void 0,$t=void 0,zt=void 0,Wt=void 0,Ut=void 0,Ht=void 0,Mt=void 0,jt=void 0,Yt=void 0,Gt=void 0,Jt=Fs,i}function Se(e){const n=jt.get(e);return void 0===n&&t(75,e),n} +-/*@__INLINE__*/function Te(t){return{type:t}}const Ne=/* @__PURE__ */Te("SELECTION_CHANGE_COMMAND"),ve=/* @__PURE__ */Te("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ee=/* @__PURE__ */Te("CLICK_COMMAND"),ke=/* @__PURE__ */Te("BEFORE_INPUT_COMMAND"),Oe=/* @__PURE__ */Te("INPUT_COMMAND"),be=/* @__PURE__ */Te("COMPOSITION_START_COMMAND"),Me=/* @__PURE__ */Te("COMPOSITION_END_COMMAND"),Ae=/* @__PURE__ */Te("DELETE_CHARACTER_COMMAND"),De=/* @__PURE__ */Te("INSERT_LINE_BREAK_COMMAND"),we=/* @__PURE__ */Te("INSERT_PARAGRAPH_COMMAND"),Ie=/* @__PURE__ */Te("CONTROLLED_TEXT_INSERTION_COMMAND"),Pe=/* @__PURE__ */Te("PASTE_COMMAND"),Fe=/* @__PURE__ */Te("REMOVE_TEXT_COMMAND"),Re=/* @__PURE__ */Te("DELETE_WORD_COMMAND"),Le=/* @__PURE__ */Te("DELETE_LINE_COMMAND"),Ke=/* @__PURE__ */Te("FORMAT_TEXT_COMMAND"),Be=/* @__PURE__ */Te("SET_TEXT_FORMAT_COMMAND"),$e=/* @__PURE__ */Te("UNDO_COMMAND"),ze=/* @__PURE__ */Te("REDO_COMMAND"),We=/* @__PURE__ */Te("KEYDOWN_COMMAND"),Ue=/* @__PURE__ */Te("KEY_ARROW_RIGHT_COMMAND"),He=/* @__PURE__ */Te("MOVE_TO_END"),je=/* @__PURE__ */Te("KEY_ARROW_LEFT_COMMAND"),Ye=/* @__PURE__ */Te("MOVE_TO_START"),Ge=/* @__PURE__ */Te("KEY_ARROW_UP_COMMAND"),Je=/* @__PURE__ */Te("KEY_ARROW_DOWN_COMMAND"),Ve=/* @__PURE__ */Te("KEY_ENTER_COMMAND"),qe=/* @__PURE__ */Te("KEY_SPACE_COMMAND"),Xe=/* @__PURE__ */Te("KEY_BACKSPACE_COMMAND"),Qe=/* @__PURE__ */Te("KEY_ESCAPE_COMMAND"),Ze=/* @__PURE__ */Te("KEY_DELETE_COMMAND"),tn=/* @__PURE__ */Te("KEY_TAB_COMMAND"),en=/* @__PURE__ */Te("INSERT_TAB_COMMAND"),nn=/* @__PURE__ */Te("INDENT_CONTENT_COMMAND"),on=/* @__PURE__ */Te("OUTDENT_CONTENT_COMMAND"),rn=/* @__PURE__ */Te("DROP_COMMAND"),sn=/* @__PURE__ */Te("FORMAT_ELEMENT_COMMAND"),ln=/* @__PURE__ */Te("DRAGSTART_COMMAND"),cn=/* @__PURE__ */Te("DRAGOVER_COMMAND"),an=/* @__PURE__ */Te("DRAGEND_COMMAND"),un=/* @__PURE__ */Te("COPY_COMMAND"),fn=/* @__PURE__ */Te("CUT_COMMAND"),dn=/* @__PURE__ */Te("SELECT_ALL_COMMAND"),hn=/* @__PURE__ */Te("CLEAR_EDITOR_COMMAND"),gn=/* @__PURE__ */Te("CLEAR_HISTORY_COMMAND"),_n=/* @__PURE__ */Te("CAN_REDO_COMMAND"),pn=/* @__PURE__ */Te("CAN_UNDO_COMMAND"),mn=/* @__PURE__ */Te("FOCUS_COMMAND"),yn=/* @__PURE__ */Te("BLUR_COMMAND"),xn=/* @__PURE__ */Te("KEY_MODIFIER_COMMAND");function Cn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const s=()=>{const t=e.get(n);t&&t.holders.delete(s)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(s),s}}}function Sn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Tn=Object.freeze({}),Nn=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Pn(n);if(e.isComposing())return;Bi(e,We,t)}],["pointerdown",function(t,e){const n=Cl(t),o=t.pointerType;Tl(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&is(e,()=>{Hl(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Bi(e,be,t)}],["compositionend",function(t,e){const n=e._inputState;s?n.compositionPhase="ending-firefox":l||!a&&!d?Bi(e,Me,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Pn(n),is(e,()=>{Rn(t,e)||e.dispatchCommand(Oe,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){is(e,()=>{const n=pr(),o=rl(Gi(e)),r=mr();if(o)if(jo(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!gs(e)&&1===mi().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=gl(o,e._rootElement).anchorNode;if(Sl(n)||ti(n)){yi(_r(r,o,e,t))}}if(s&&null!==o&&0===o.rangeCount){const n=e._rootElement;if(null!==n&&t.target===n){const s=t.clientY;let i=n.childNodes.length;for(let t=0;tfunction(t,e){const n=t.inputType;if("deleteCompositionText"===n||s&&Ki(e))return;if("insertCompositionText"===n)return;is(e,()=>{Rn(t,e)||Bi(e,ke,t)},{event:t})}(t,e)]);const vn=new WeakMap,En=new WeakMap,kn=Cn(t=>(t.addEventListener("selectionchange",Yn),()=>t.removeEventListener("selectionchange",Yn)));function On(t,e,n,o,r,s){const l=t.anchor,c=t.focus,a=l.getNode(),u=jr();let f;if(void 0!==s)f=s;else{const t=rl(Gi(u));f=null!==t?gl(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!wo(a)||(!r&&(!i||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!i)&&null!==g&&!a.isComposing()&&d!==Il(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Qs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(wo(e)||as(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function bn(t,e){return ti(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Mn(e,n,o){const{anchorNode:r,anchorOffset:s,focusNode:i,focusOffset:l}=gl(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,bn(r,s)&&bn(i,l)&&!c.postDeleteSelectionToRestore)||is(n,()=>{if(!o)return void yi(null);if(!Js(n,r,i))return;let a=pr();if(c.postDeleteSelectionToRestore&&jo(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),yi(a))}if(c.postDeleteSelectionToRestore=null,jo(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===i&&(a.dirty=!0);const s=Gi(n).event,l=s?s.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=mi(),m=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)An(a,f,d);else if("text"===o.type)wo(u)||t(141),Dn(a,u);else if("element"===o.type&&!m){as(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();An(t,n,o)}(a,e):An(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,i=a.isBackward(),c=i?l:s,u=i?s:l,f=i?e:t,d=i?t:e;let h=2047,g=!1;for(let t=0;tPn(t),0)}function Rn(t,e){const n=Cl(t);if(Sl(n)&&Hl(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=xl(o.ownerDocument);return null!==r&&o.contains(r)&&Hl(r,e)}function Ln(e){const n=e.inputType,o=wn(e),r=jr(),s=r._inputState,i=pr();if("insertText"===n&&e.data&&s.isInsertTextAfterHandledSelectionCommand){if(Pn(s),e.preventDefault(),jo(i)&&!i.isCollapsed()){const t=i.isBackward()?i.anchor:i.focus;i.anchor.set(t.key,t.offset,t.type),i.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===i){const t=mr();if(!jo(t))return!0;yi(t.clone())}if(jo(i)){const n=i.anchor.key===i.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{is(r,()=>{ci(null)})},30),jo(i)){const e=i.anchor.getNode();e.markDirty(),wo(e)||t(142),Dn(i,e)}}else{if(ci(null),l&&null!==o&&!o.collapsed&&(i.applyDOMRange(o),!i.isCollapsed()))return e.preventDefault(),i.removeText(),!0;e.preventDefault();const t=i.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===i.anchor.offset&&i.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&i.isCollapsed()&&(d=!ds(Li(i.anchor,!0))),!d){Bi(r,Ae,!0);const t=pr();f&&jo(t)&&t.isCollapsed()&&(s.postDeleteSelectionToRestore=t,setTimeout(()=>s.postDeleteSelectionToRestore=null))}}return!0}}if(!jo(i))return!0;const c=e.data;null!==s.unprocessedBeforeInputData&&Ei(!1,r,s.unprocessedBeforeInputData),i.dirty&&null===s.unprocessedBeforeInputData||!i.isCollapsed()||gs(i.anchor.getNode())||null===o||i.applyDOMRange(o),s.unprocessedBeforeInputData=null;const a=i.anchor,u=i.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Bi(r,De,!1);else if(c===v)e.preventDefault(),Bi(r,we);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(t)}else null!=c&&On(i,o,c,e.timeStamp,!0)?(e.preventDefault(),Bi(r,Ie,c),In(c)):s.unprocessedBeforeInputData=c;return s.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bi(r,Ie,e);In((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=s.hadOrphanedCompositionEvents;s.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;ci(null),t||Bi(r,Ie,e),zn(n);break}case"insertLineBreak":ci(null),Bi(r,De,!1);break;case"insertParagraph":ci(null),s.isInsertLineBreak&&!l?(s.isInsertLineBreak=!1,Bi(r,De,!1)):Bi(r,we);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bi(r,Pe,e);break;case"deleteByComposition":(function(t,e){return t!==e||as(t)||as(e)||!Qs(t)||!Qs(e)})(d,h)&&Bi(r,Fe,e);break;case"deleteByDrag":Ui(lo),Bi(r,Fe,e);break;case"deleteByCut":Bi(r,Fe,e);break;case"deleteContent":Bi(r,Ae,!1);break;case"deleteWordBackward":Bi(r,Re,!0);break;case"deleteWordForward":Bi(r,Re,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bi(r,Le,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bi(r,Le,!1);break;case"formatStrikeThrough":Bi(r,Ke,"strikethrough");break;case"formatBold":Bi(r,Ke,"bold");break;case"formatItalic":Bi(r,Ke,"italic");break;case"formatUnderline":Bi(r,Ke,"underline");break;case"historyUndo":Bi(r,$e);break;case"historyRedo":Bi(r,ze)}return!0}function Kn(t){const e=jr(),n=e._inputState,o=pr(),r=t.data,l=wn(t);let c=!1;if(null!=r&&jo(o)){const a=rl(Gi(e)),u=null!==a?gl(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&wo(h)&&Zs(h);if(!d&&!g&&On(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=Wn(e,r);if(n.compositionPhase="idle",t)return Ui(ao),xi(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;i&&!o.isCollapsed()&&wo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===vi(u.anchorNode)||Bi(e,Ie,r);const _=r.length;s&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,ci(null))}}if(!c){Ei(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(Wn(e,r||void 0),Ui(ao),n.compositionPhase="idle")}return xi(),!0}function Bn(t){const e=jr(),n=e._inputState,o=pr();if(jo(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,s=o.anchor.getNode();if(ci(r.key),Ui(co),t.timeStamp{Wn(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return Ai(t,"ArrowRight",{shiftKey:"any"})}(t))Bi(e,Ue,t);else if(function(t){return Ai(t,"ArrowRight",{...Di,shiftKey:"any"})}(t))Bi(e,He,t);else if(function(t){return Ai(t,"ArrowLeft",{shiftKey:"any"})}(t))Bi(e,je,t);else if(function(t){return Ai(t,"ArrowLeft",{...Di,shiftKey:"any"})}(t))Bi(e,Ye,t);else if(function(t){return Ai(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Bi(e,Ge,t);else if(function(t){return Ai(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Bi(e,Je,t);else if(function(t){return Ai(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Bi(e,Ve,t);else if(function(t){return" "===t.key}(t))Bi(e,qe,t);else if(function(t){return r&&Ai(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Bi(e,De,!0);else if(function(t){return Ai(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Bi(e,Ve,t);else if(function(t){return Ai(t,"Backspace",{shiftKey:"any"})||r&&Ai(t,"h",{ctrlKey:!0})}(t))Ii(t)?Bi(e,Xe,t)&&Fn(n):(t.preventDefault(),Bi(e,Ae,!0));else if(function(t){return"Escape"===t.key}(t))Bi(e,Qe,t);else if(function(t){return Ai(t,"Delete",{})||r&&Ai(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Bi(e,Ae,!1)):Bi(e,Ze,t);else if(function(t){return Ai(t,"Backspace",wi)}(t))t.preventDefault(),Bi(e,Re,!0);else if(function(t){return Ai(t,"Delete",wi)}(t))t.preventDefault(),Bi(e,Re,!1);else if(function(t){return r&&Ai(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Bi(e,Le,!0);else if(function(t){return r&&(Ai(t,"Delete",{metaKey:!0})||Ai(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Bi(e,Le,!1);else if(function(t){return Ai(t,"b",Di)}(t))t.preventDefault(),Bi(e,Ke,"bold");else if(function(t){return Ai(t,"u",Di)}(t))t.preventDefault(),Bi(e,Ke,"underline");else if(function(t){return Ai(t,"i",Di)}(t))t.preventDefault(),Bi(e,Ke,"italic");else if(function(t){return Ai(t,"Tab",{shiftKey:"any"})}(t))Bi(e,tn,t);else if(function(t){return Ai(t,"z",Di)}(t))t.preventDefault(),Bi(e,$e);else if(function(t){if(r)return Ai(t,"z",{metaKey:!0,shiftKey:!0});return Ai(t,"y",{ctrlKey:!0})||Ai(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Bi(e,ze);else{const o=e._editorState._selection;!function(t){return Ai(t,"a",Di)}(t)?null===o||jo(o)||(!function(t){return Ai(t,"c",Di)}(t)?function(t){return Ai(t,"x",Di)}(t)&&(t.preventDefault(),Bi(e,fn,t)):(t.preventDefault(),Bi(e,un,t))):(t.preventDefault(),Bi(e,dn,t)&&Fn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(xn,t),!0}function Hn(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const jn=new Map;function Yn(t){const e=sl(t.target);if(null===e)return;const n=Wi(t.target);let o=null,r=null;const s=null!==n?En.get(n):void 0;if(null!==n){if(void 0!==s){const t=s.editors;let n=s.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&il(e._rootElement.getRootNode())){n=!0;break}s.hasShadowEditor=n}if(n){let n=null,s=null;for(const i of t){const t=i._rootElement;if(null===t)continue;const l=gl(e,t).anchorNode;if(null!==l&&qs(l)===i){if(il(t.getRootNode())){o=i,r=l;break}null===n&&(n=i,s=l)}}null===o&&null!==n&&(o=n,r=s)}else{const t=e.anchorNode;null===t||Sl(t)&&null!==t.shadowRoot||(o=qs(t),null!==o&&(r=t))}}if(null===o){const t=xl(n);o=null!==t?qs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==s)for(const t of s.editors)t._inputState.isSelectionChangeFromMouseDown=!1;is(o,()=>{const n=mr(),s=r??gl(e,o._rootElement).anchorNode;if(Sl(s)||ti(s)){yi(_r(n,e,o,t))}})}const i=Ti(o),l=i[i.length-1],c=l._key,a=jn.get(c),u=a||l;u!==o&&Mn(e,u,!1),Mn(e,o,!0),o!==l?jn.set(c,o):a&&jn.delete(c)}function Gn(t){t._lexicalHandled=!0}function Jn(t){return!0===t._lexicalHandled}const Vn=()=>{};function qn(e){const n=vn.get(e);if(void 0===n)return void Vn();const o=En.get(n);if(void 0===o)return void Vn();vn.delete(e);const r=Xs(e);Vs(r)?(!function(t){if(null!==t._parentEditor){const e=Ti(t),n=e[e.length-1]._key;jn.get(n)===t&&jn.delete(n)}else jn.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const s=Hn(e);for(let t=0;tt.__key===this.__key);if(wo(this))return n;if(jo(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(ds(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:ui(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Xi(n)||null!==nc(e))return as(e)||e===this&&ds(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:ui(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:ui(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=as(this)?this:this.getParent(),n=as(t)?t:t.getParent(),o=e&&n?Zc(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Zc(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===qc(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return ji(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let s=this;for(;null!==s;){const i=s.__key;if(r.has(i)||(r.add(i),o.push(s)),s===e)break;const l=as(s)?n?s.getFirstChild():s.getLastChild():null;if(null!==l){s=l;continue}const c=n?s.getNextSibling():s.getPreviousSibling();if(null!==c){s=c;continue}const a=s.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);s=u}return n||o.reverse(),o}isDirty(){const t=jr()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(Zn(this))return this;const e=ui(this.__key);return null===e&&t(113),e}getWritable(){if(Zn(this))return this;Wr();const t=Hr(),e=jr(),n=t._nodeMap,o=this.__key,r=this.getLatest(),s=e._cloneNotNeeded,i=pr();if(null!==i&&i.setCachedNodes(null),s.has(o))return li(r),r;const l=Ll(r);return s.add(o),li(l),n.set(o,l),l}getTextContent(){return _c(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new B(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of gt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&ht(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){Xn(this,!0,t)}replace(e,n){Wr();let o=pr();null!==o&&(o=o.clone()),tl(this,e);const r=this.getLatest(),s=this.__key,i=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;si(l),null!==u&&jo(o)&&yr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(Xn(r,!1,!0),null===d)c.__first=i;else{d.getWritable().__next=i}if(l.__prev=g,null===h)c.__last=i;else{h.getWritable().__prev=i}l.__next=_,l.__parent=p,c.__size=a;let m=0;n&&(as(this)&&as(l)||t(139),m=l.getChildrenSize(),l.splice(m,0,this.getChildren()));const y=lc(this);if(y.length>0){tc(this)&&tc(l)||t(368,this.__key,l.__key);for(const t of y){const e=cc(this,t);null!==e&&(xc(this,t),yc(l,t,e))}}if(jo(o)){yi(o);const t=o.anchor,e=o.focus;t.key===s&&(n&&"element"===t.type?t.set(l.__key,m+t.offset,"element"):$o(t,l)),e.key===s&&(n&&"element"===e.type?e.set(l.__key,m+e.offset,"element"):$o(e,l))}return ai()===s&&ci(i),l}insertAfter(t,e=!0){Wr(),tl(this,t);const n=this.getWritable(),o=t.getWritable();Cc(this.getParentOrThrow());const r=o.getParent(),s=pr();let i=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(jo(s)){const t=r.__key,e=s.anchor,o=s.focus;i="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}si(o),e&&jo(s)&&yr(s,r,n,-1)}else si(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&jo(s)){const t=this.getIndexWithinParent();yr(s,a,t+1);const e=a.__key;i&&s.anchor.set(e,t+2,"element"),l&&s.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){Wr(),tl(this,t);const n=this.getWritable(),o=t.getWritable();Cc(this.getParentOrThrow());const r=o.__key,s=pr(),i=o.getParent(),l=null!==i?o.getIndexWithinParent():-1;si(o),null!==i&&e&&jo(s)&&yr(s,i,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&jo(s)){yr(s,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return Ms()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){Wr();const n=oc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(as(o))return o.select();if(!wo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){Wr();const n=oc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(as(o))return o.select(0,0);if(!wo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function no(t){return t instanceof eo}const oo="history-merge",ro="collaboration",so="skip-scroll-into-view",io="skip-dom-selection",lo="skip-selection-focus",co="composition-start",ao="composition-end",uo="!important";function fo(t){const e={};if(!t)return e;let n="",o="",r=null,s=!1,i=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===uo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function go(t,e,n=""){if(e===n)return;const o=fo(n),r=fo(e);for(const e in r)delete o[e],ho(t,e,r[e]);for(const e in o)t.removeProperty(e)}function _o(t,e){return 16&e?"code":e&p?"mark":32&e?"sub":64&e?"sup":null}function po(t,e){return 1&e?"strong":2&e?"em":"span"}function mo(t,e,n,o,r){const s=o.classList;let i=Pi(r,"base");void 0!==i&&s.add(...i),i=Pi(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==i&&(8&n&&4&n?(l=!0,c||s.add(...i)):c&&s.remove(...i));for(const t in A){const o=A[t];if(i=Pi(r,t),void 0!==i)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&s.remove(...i);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&s.add(...i)}else e&o&&s.remove(...i)}}function yo(t,e,n){const o=n.isComposing(),r=t+(o?N:""),i=Ml(),l=Al(i).$getDOMSlot(n,e,i),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(fl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(o||s){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,s=0;for(;r({conversion:Oo,priority:0}),b:()=>({conversion:vo,priority:0}),code:()=>({conversion:Ao,priority:0}),em:()=>({conversion:Ao,priority:0}),i:()=>({conversion:Ao,priority:0}),mark:()=>({conversion:Ao,priority:0}),s:()=>({conversion:Ao,priority:0}),span:()=>({conversion:No,priority:0}),strong:()=>({conversion:Ao,priority:0}),sub:()=>({conversion:Ao,priority:0}),sup:()=>({conversion:Ao,priority:0}),u:()=>({conversion:Ao,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",e){super(e),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return F[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===ai()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const e=A[t];return 0!==(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(t,e){return oi(this.getLatest().__format,t,e)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,e){const n=this.__format,o=_o(0,n),r=po(0,n),s=null===o?r:o,i=fl().createElement(s);let l=i;this.hasFormat("code")&&i.setAttribute("spellcheck","false"),null!==o&&(l=fl().createElement(r),i.appendChild(l));xo(l,this,0,n,this.__text,t);const c=this.__style;return""!==c&&go(i.style,c),i}updateDOM(e,n,o){const r=this.__text,s=e.__format,i=this.__format,l=_o(0,s),c=_o(0,i),a=po(0,s),u=po(0,i);if((null===l?a:l)!==(null===c?u:c))return!0;if(l===c&&a!==u){const e=n.firstChild;null==e&&t(48);const s=fl().createElement(u);return xo(s,this,0,i,r,o),n.replaceChild(s,e),!1}let f=n;null!==c&&null!==l&&(f=n.firstChild,null==f&&t(49)),yo(r,f,this);const d=o.theme.text;void 0!==d&&s!==i&&mo(0,s,i,f,d);const h=e.__style,g=this.__style;return h!==g&&go(n.style,g,h),!1}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return Sl(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Co(n,"b")),this.hasFormat("italic")&&(n=Co(n,"i")),this.hasFormat("strikethrough")&&(n=Co(n,"s")),this.hasFormat("underline")&&(n=Co(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?A[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?D[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=oi(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=P[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){Wr();let n=t,o=e;const r=pr(),s=this.getTextContent(),i=this.__key;if("string"==typeof s){const t=s.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!jo(r))return dr(i,n,i,o,"text","text");{const t=ai();t!==r.anchor.key&&t!==r.focus.key||ci(i),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),s=r.__text,i=n.length;let l=t;l<0&&(l=i+l,l<0&&(l=0));const c=pr();if(o&&jo(c)){const e=t+i;c.setTextNodeRange(r,e,r,e)}const a=s.slice(0,l)+n+s.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Wr();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=ai(),s=n.length;t.sort((t,e)=>t-e),t.push(s);const i=[],l=t.length;for(let e=0,o=0;ee&&(i.push(n.slice(e,r)),e=r)}const c=i.length;if(1===c)return[e];const a=i[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,m=null;const y=pr();if(jo(y)){const[t,e]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(m=e)}e.isSegmented()?(f=Do(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=xt(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=T&&(p.set(t.getKey(),C-T,"text"),C=T){m.set(t.getKey(),S-T,"text");break}T=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&li(e);null!==n&&li(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),jo(y)&&yr(y,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,s=this.__text,i=s.length;ai()===r&&ci(o);const l=pr();if(jo(l)){const t=l.anchor,s=l.focus;null!==t&&t.key===r&&Sr(t,n,o,e,i),null!==s&&s.key===r&&Sr(s,n,o,e,i)}const c=e.__text,a=n?c+s:s+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function No(t){return{forChild:Io(t.style),node:null}}function vo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Io(e.style,n?void 0:"bold"),node:null}}const Eo=new WeakMap;function ko(t){if(!Sl(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Oo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Eo.get(n))&&!ko(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=bo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Do(o)}}function bo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,Sl(n)){const t=n.style.display;if(""===t&&!El(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(ti(n))return n;if("BR"===n.nodeName)return null}}const Mo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ao(t){const e=Mo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Io(t.style,e),node:null}}function Do(t=""){return Zi(new To(t))}function wo(t){return t instanceof To}function Io(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,s=o.includes("line-through"),i="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>wo(t)||So(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),s&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),i&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Po extends To{$config(){return this.config("tab",{extends:To})}constructor(t=void 0){super("\t",t),this.__detail=2}createDOM(t){const e=super.createDOM(t),n=Pi(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fo(){return Zi(new Po)}function Ro(t){return t instanceof Po}class Lo{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!as(e)){const t=e.getNextSibling();if(wo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function $o(t,e){if(as(e)){const n=e.getLastDescendant();as(n)||wo(n)?Bo(t,n):Bo(t,e)}else Bo(t,e)}function zo(t,e,n,o){const r=t.getNode(),s=r.getChildAtIndex(t.offset),i=Do();if(i.setFormat(n),i.setStyle(o),As(s))s.splice(0,0,[i]);else if(null!==s){const t=Xi(r)?Ms().append(i):i;s.insertBefore(t)}else if(Xi(r)){const t=r.getLastChild();as(t)&&!t.isInline()&&t.isEmpty()?t.append(i):r.append(Ms().append(i))}else r.append(i);t.is(e)&&e.set(i.__key,0,"text"),t.set(i.__key,0,"text")}function Wo(e,n,o,r){const s=e.anchor.getNode();wo(s)||t(398);const i=e.anchor.offset,l=Do(n);l.setFormat(o),l.setStyle(r);const c=s.getParentOrThrow();if(0===i)c.isInline()&&!s.__prev?c.insertBefore(l):s.insertBefore(l,!1);else if(i===s.getTextContentSize())c.isInline()&&!s.__next?c.insertAfter(l):s.insertAfter(l,!1);else{const[t]=s.splitText(i);t.insertAfter(l,!1)}""===s.getTextContent()&&s.isAttached()&&s.remove(),l.selectEnd(),l.isComposing()&&"text"===e.anchor.type&&e.anchor.set(e.anchor.key,e.anchor.offset-n.length,e.anchor.type)}class Uo{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Go(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Uo(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===nc(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(wo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===nc(t));if((pr()||mr())===this&&t[0]){const e=Rc(t[0],"next");na(Gc(e,e))}for(const e of t)e.remove();Ho()}}function Ho(){const t=mi();if(t.isEmpty()){const e=Ms();t.append(e),e.select()}}function jo(t){return t instanceof Yo}class Yo{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!jo(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,s=new Set;for(const n of t)if(wc(n)){const{origin:t}=n;0===e.length?r.add(t):(s.add(t),e.push(t))}else{const{origin:t}=n;as(t)&&s.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(Dc(t.focus)&&as(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=$c(t.focus.origin,"previous");wc(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Wc(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!as(t)||s.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=aa(t.anchor),o=aa(t.anchor.getFlipped()),r=t=>Ac(t)?t.origin:t.getNodeAtCaret(),s=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(s)}return e}(da(ra(this),"next"));return zr()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,s=o.isBefore(r),[i,l]=Xo(this);let c="",a=!0;for(let u=0;u(as(t)||ds(t))&&!t.isInline())){as(r)||t(211,o.constructor.name,o.getType());const n=br(this);return r.splice(n,0,e),void s.selectEnd()}if(as(r)&&null!==nc(r)){const t=br(this),n=Or(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Dr(e),n=t.getLastDescendant();let o=ta(this.anchor,"next");for(const e of t.getChildren())o=ma(e,o);return void(null!==n&&n.selectEnd())}if(as(r)&&!r.isParentRequired()&&!Xi(r.getParentOrThrow())){const t=br(this),n=Or(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const i=Dr(e),l=i.getLastDescendant(),c=i.getChildren(),a=!as(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=ql(o,bl));const u=c[c.length-1];let f=c[0];var d;as(d=f)&&bl(d)&&!d.isEmpty()&&as(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(as(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const s=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),s.push(r);let i=e;for(const t of s)i=i.insertAfter(t)}(r,f));const h=ql(l,bl);a&&as(h)&&(a.canMergeWhenEmpty()||bl(u))&&(h.append(...a.getChildren()),a.remove()),as(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=as(r)?r.getLastChild():null;Ns(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Xi(e)){const t=Ms();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=br(this),o=ql(this.anchor.getNode(),bl);if(null!==o&&null!==nc(o))return null;as(o)||t(213);const r=o.getChildAtIndex(n),s=r?[r,...r.getNextSiblings()]:[],i=o.insertNewAfter(this,!1);return i?(i.append(...s),i.selectStart(),i):null}insertLineBreak(t){const e=Ts();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,s]=Xo(this),i=this.isBackward(),[l,c]=i?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=i?[s,r]:[r,s];if(0===e)return[];if(1===e){if(wo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(wo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),wo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(wr(this,t,e,n))return;const o="move"===t,r=jr(),s=rl(Gi(r));if(!s)return;const i=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===i||!as(c)||c.isInline()||c.canBeEmpty()||ol(i,r,l);const a=$i(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=wo(c)?Il(c,a,r):null),this.dirty){const t=$i(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=wo(n)?Il(n,t,r):null}e&&u&&Tr(s,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&wo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Rc(c,e?"previous":"next").getNodeAtCaret();if(wo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?Il(t,n,r):null;if(o){const t=e?o.length:0;Tr(s,o,t,o,t)}}}}}if(tr(s,t,e?"backward":"forward",n),s.rangeCount>0){const t=dl(s,r._rootElement),n=t||s.getRangeAt(0),i=this.anchor.getNode(),l=gs(i)?i:Vi(i);if(this.applyDOMRange(n),this.dirty=!0,!o){er(this,e,l);(t?"backward"!==s.direction:s.anchorNode===n.startContainer&&s.anchorOffset===n.startOffset)||Zo(this)}}"lineboundary"===n&&wr(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&as(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(as(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=jc(ta(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(wc(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(as(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=aa(e);oa(this,Gc(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(Dc(e)){if(as(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(ds(e.origin)){if(e.origin.isIsolated());else if(lc(e.origin).length>0){if(as(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=gr();t.add(e.origin.getKey()),yi(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&as(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=gr();t.add(e.origin.getKey()),yi(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(lc(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(oa(this,Gc(!e.origin.isEmpty()&&n.isEmpty()?sa(Rc(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==nc(t))return;if(as(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(nr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&Qo(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,s=o.getTextContentSize();if(o.is(n)||t&&e!==s||!t&&0!==e)return void rr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,s=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==s)return void rr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),s=o.getNode();if(r===s&&"text"===n.type&&"text"===o.type){const t=n.offset,s=o.offset,i=t0&&(g===h.getTextContentSize()||Zs(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;toi(t,e,o))}function qo(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Xo(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[qo(n),qo(o)]}function Qo(t,e){for(let n=e;n;n=n.getParent()){if(as(n)){if(n.collapseAtStart(t))return!0;if(Xi(n))break}if(n.getPreviousSibling())break}return!1}function Zo(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,s=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,s,!0)}function tr(t,e,n,o){t.modify(e,n,o)}function er(t,e,n){const o=t.getNodes(),r=o.filter(t=>ji(t,n));if(0===r.length||r.length===o.length)return!1;const s=e?r[0]:r[r.length-1],i=as(s)?s:s.getParentOrThrow();return e?i.selectStart():i.selectEnd(),!0}function nr(t,e,n){if(wr(t,"extend",e,n))return;const o=jr(),r=rl(Gi(o));if(!r||"function"!=typeof r.modify)return;const s=o._blockCursorElement,i=o._rootElement,l=t.anchor,c=t.focus.getNode();null===i||null===s||!as(c)||c.isInline()||c.canBeEmpty()||ol(s,o,i);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&wo(e)?Il(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Tr(r,_,p,_,p),tr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const m=dl(r,i)||r.getRangeAt(0),y=m.startContainer,x=m.startOffset;if(h&&"character"===n&&"text"===l.type&&wo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Rc(u,e?"previous":"next").getNodeAtCaret();if(wo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=y===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,T,N]=e?[y,x,f,d]:[f,d,y,x],v=gs(u)?u:Vi(u);t.applyDOMRange({collapsed:!1,endContainer:T,endOffset:N,startContainer:C,startOffset:S}),t.dirty=!0,!er(t,e,v)&&e&&Zo(t),"lineboundary"===n&&wr(t,"extend",e,n,"decorators")}const or=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function rr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),s=r.length;let i=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function sr(e,n,o,r){let s,i=n,l=!1;if(Sl(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;i===u&&u>0&&(c=!0,i=u-1),void 0!==hi(e,r)||Hl(e,r)||(l=!0);let d=a[i],h=!1;if(d===f)d=a[i+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&i--}}if(s=Ci(d),wo(s))i=Kc(s,c?"next":"previous");else{let a=Ci(e);if(null===a)return null;if(as(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=Dl(a,l,r);[a,i]=u.resolveChildIndex(a,l,e,n),as(a)||t(215),c&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(i);if(as(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=as(f)?f:f.getParentOrThrow()),i=0}wo(f)?(s=f,a=null,i=Kc(f,c?"next":"previous")):f!==a&&c&&!h&&(as(a)||t(216),i=Math.min(a.getChildrenSize(),i+1))}else{const t=oc(a),o=null!==t?t:a,s=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&Ci(e)===a){const t=Dl(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&ds(a)&&(c="before")}i="before"===c?s:s+1,a=o.getParentOrThrow()}if(as(a))return[Ko(a.__key,i,"element"),l]}}else s=Ci(e);return wo(s)?[Ko(s.__key,Kc(s,i,"clamp"),"text"),l]:null}function ir(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),s=r.getParent();if(e){if((n||!e)&&null===o&&as(s)&&s.isInline()){const e=s.getPreviousSibling();wo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else as(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):wo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&as(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&as(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const e=s.getNextSibling();wo(e)&&t.set(e.__key,0,"text")}}}function lr(t){const e=ui(t.key);return null===e?null:sc(e)}function cr(t,e,n){const o=lr(t),r=lr(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const s=n(o,r);if(null!==o)return as(o)?e.set(o.getKey(),s?o.getChildrenSize():0,"element"):e.set(o.getKey(),s?o.getTextContentSize():0,"text"),!0;const i=oc(r);if(null===i)return!1;const l=i.getParent();if(null===l)return!1;const c=i.getIndexWithinParent();return e.set(l.getKey(),s?c+1:c,"element"),!0}function ar(t){const e=cr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=oc(n),e=oc(o);if(null!==t&&t.is(e)){for(const e of ic(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=oc(n),o=ui(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=oc(o),s=ui(t.key);return null!==r&&null!==s&&!r.is(s)&&!r.isParentOf(s)&&s.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function ur(t,e,n,o,r,s){if(null===t||null===n||!Js(r,t,n))return null;const i=sr(t,e,jo(s)?s.anchor:null,r);if(null===i)return null;const l=sr(n,o,jo(s)?s.focus:null,r);if(null===l)return null;const[c,a]=i,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=Ci(t),o=Ci(n);if(ds(e)&&ds(o))return null}const d=r._slotsUsed&&cr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return function(t,e){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);ir(t,n,o),ir(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}(c,u),[c,u,a||f||d]}function fr(t){return as(t)&&!t.isInline()}function dr(t,e,n,o,r,s){const i=Hr(),l=new Yo(Ko(t,e,r),Ko(n,o,s),0,"");return l.dirty=!0,i._selection=l,l}function hr(){const t=Ko("root",0,"element"),e=Ko("root",0,"element");return new Yo(t,e,0,"")}function gr(){return new Uo(new Set)}function _r(t,e,n,o){const r=n._window;if(null===r)return null;const s=o||r.event,i=s?s.type:void 0,l="selectionchange"===i,c=!q&&(l||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&s&&3===s.detail||"drop"===i||void 0===i);let a,u,f,d;if(jo(t)&&!c)return t.clone();{if(null===e)return null;const o=gl(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===i)&&jo(t)&&!Js(n,a,u))return t.clone()}const h=ur(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let m=0,y="";if(jo(t)){const e=t.anchor;if(g.key===e.key)m=t.format,y=t.style;else{const t=g.getNode();wo(t)?(m=t.getFormat(),y=t.getStyle()):as(t)&&(m=t.getTextFormat(),y=t.getTextStyle())}}const x=new Yo(g,_,m,y);return p&&(x.dirty=!0),x}function pr(){return Hr()._selection}function mr(){return jr()._editorState._selection}function yr(t,e,n,o=1){const r=t.anchor,s=t.focus,i=r.getNode(),l=s.getNode();if(!e.is(i)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,i=r?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(wo(i)){let t=0;r&&(t=i.getTextContentSize()),e.set(i.__key,t,"text"),o.set(i.__key,t,"text")}return}if(as(s)){const t=s.getChildrenSize(),o=n>=t,r=o?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(wo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(as(i)){const t=i.getChildrenSize(),e=r>=t,n=e?i.getChildAtIndex(t-1):i.getChildAtIndex(r);if(wo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Cr(t,e,n,o,r){let s=null,i=0,l=null;null!==o?(s=o.__key,wo(o)?(i=o.getTextContentSize(),l="text"):as(o)&&(i=o.getChildrenSize(),l="element")):null!==r&&(s=r.__key,wo(r)?l="text":as(r)&&(l="element")),null!==s&&null!==l?t.set(s,i,l):(i=e.getIndexWithinParent(),-1===i&&(i=n.getChildrenSize()),t.set(n.__key,i,"element"))}function Sr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Tr(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Nr(t,e,n){const o=$i(t,e.getKey());if(as(e)){const r=Dl(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function vr(t,e,n,o,r,i){const l=i.getRootNode(),c=ei(l)||il(l)?xl(l):null;if(r.has(ro)&&c!==i||null!==c&&Ys(c,c))return;const a=gl(o,i);let u;if(!jo(e))return void(null!==t&&Js(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Nr(n,h,f.offset),[m,y]=Nr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let T=_,N=m,v=!1;if("text"===f.type?(T=wo(h)?Il(h,_,n):null,v=h.getFormat()!==x||h.getStyle()!==C):jo(t)&&"text"===t.anchor.type&&(v=!0),"text"===d.type&&(N=wo(g)?Il(g,m,n):null),null!==T&&null!==N){if(S&&(null===t||v||jo(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,s){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:s}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===y&&a.anchorNode===T&&a.focusNode===N){if(null===c||!i.contains(c)){const t=null!==c?qs(c):null;null!==t&&t!==n||r.has(lo)||i.focus({preventScroll:!0})}if("element"!==f.type)return}if(Tr(o,T,p,N,y),s&&e.isCollapsed()&&null!==i&&!r.has(lo)){const t=yl(i);if(null===t||!i.contains(t)){const t=xl(i.ownerDocument),e=null!==t?qs(t):null;null!==e&&e!==n||i.focus({preventScroll:!0})}}if(!r.has(so)&&e.isCollapsed()&&null!==i&&i===yl(i)){const t=jo(e)&&"element"===e.anchor.type?T.childNodes[p]||null:(void 0===u&&(u=hl(o,i)),u);if(null!==t){let e;if(ti(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=Wi(n),r=Yi(o);if(null===o||null===r)return;const s=n.getBoundingClientRect();if(e.bottoma&&(f=l-a),0!==f)if(e)r.scrollBy(0,f);else{const t=u.scrollTop;u.scrollTop+=f;const e=u.scrollTop-t;i-=e,l-=e}if(e)break;u=zi(u)}}(n,e,i)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Er(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function kr(t){const e=[];return Er(t,{linebreak:()=>e.push(Ts()),tab:()=>e.push(Fo()),text:t=>e.push(Do(t))}),e}function Or(t){const e=[];for(const n of t)Ns(n)||(!as(n)&&!ds(n)||n.isInline()?e.push(n):as(n)&&e.push(...Or(n.getChildren())));return e}function br(e){let n=e;e.isCollapsed()||n.removeText();const o=pr();jo(o)&&(n=o),jo(n)||t(161);const r=n.anchor;let s=r.getNode(),i=r.offset;for(;!bl(s)&&null===nc(s);){const t=s;if([s,i]=Mr(s,i),t.is(s))break}return i}function Mr(t,e){const n=t.getParent();if(!n){const t=Ms();return mi().append(t),t.select(),[mi(),0]}if(wo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!as(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new Yo(Ko(t.__key,e,"element"),Ko(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Ar(t){return Ns(t)||Ji(t)||wo(t)||t.isParentRequired()}function Dr(t){const e=Ms();let n=null;for(let o=0;o99&&t(14)}function Hr(){return null===Ir&&t(195,Gr()),Ir}function jr(){return null===Pr&&t(337,Gr()),Pr}function Yr(){jr()._dirtyType=2}function Gr(){let t=0;const e=new Set,n=Ks.version;if("undefined"!=typeof window)for(const o of al(document)){const r=Xs(o);if(Vs(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function Jr(){return Pr}function Vr(t,e,n){const o=e.__type,r=Us(t,o);let s=n.get(o);void 0===s&&(s=Array.from(r.transforms),n.set(o,s));const i=s.length;for(let t=0;t0&&os(t,t._deferred));const s=t._editorState,i=s._selection,l=n._selection,c=0!==t._dirtyType,a=Ir,u=Fr,f=Pr,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){Pr=t,Ir=n,Fr=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=Ce(s,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),Rr)throw e;return Is(t,null,o,n),st(t),t._dirtyType=2,Rr=!0,ts(t,s),void(Rr=!1)}finally{h.observe(o,$r),t._updating=d,Ir=a,Fr=u,Pr=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,m=t._normalizedNodes,y=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let s;for(s in o)r.has(s)||(o===n&&(o=_i(t)),delete o[s])}(t,n);const x=r?null:rl(Gi(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(i))&&null!==o&&!y.has(io)){Pr=t,Ir=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&ol(e,t,o),vr(i,l,t,x,y,o)}!function(t,e,n){let o=t._blockCursorElement;if(jo(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(yl(e))){const r=n.anchor,s=r.getNode(),i=r.offset;let l=!1,c=null;if(i===s.getChildrenSize()){nl(s.getChildAtIndex(i-1))&&(l=!0)}else{const e=s.getChildAtIndex(i);if(null!==e&&nl(e)){const n=e.getPreviousSibling();(null===n||nl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=Dl(s,t.getElementByKey(s.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=fl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=ya(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&ol(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,$r),Pr=f,Ir=a}}null!==g&&function(t,e,n,o,r){const s=Array.from(t._listeners.mutation),i=s.length;for(let t=0;t{Kr.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;ss(t,e,o)}}(t)}(t,e)}finally{Lr=n}}function es(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function ns(t,e,n,o){const r=Ti(t);let s;if(!Lr)for(let t=0;t=0;t--)for(let i=0;i0&&l._updating){s=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(is(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return s&&s.update(()=>{ns(s,e,n,o)}),!1}function os(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);wo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Tt(o),void 0!==o&&qr(o,s)&&Vr(e,o,i),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){Br++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&qr(c,s)&&Vr(e,c,i)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,Br++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),rs(e),function(t,e,n,o){const r=t._nodeMap,s=e._nodeMap,i=[];for(const[t]of o){const e=s.get(t);void 0!==e&&(e.isAttached()||(as(e)&&V(e,t,r,s,i,o),r.has(t)||o.delete(t),i.push(t)))}for(const t of n){const e=s.get(t);void 0===e||e.isAttached()||(tc(e)&&null!==e.__slots&&V(e,t,r,s,i,n),r.has(t)||n.delete(t),i.push(t))}for(const t of i)s.delete(t);const l=jr(),c=l._compositionKey;null===c||s.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const s=a._selection;if(jo(s)){e._slotsUsed&&ar(s);const n=a._nodeMap,o=s.anchor.key,r=s.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else Go(s)&&0===s._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ts(e)}finally{Ir=f,Fr=d,Pr=h,e._updating=g,Br=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,ts(e)):u&&js(()=>{ts(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function is(t,e,n){Pr===t&&void 0===n?zr()?ss(t,e,n):e():ss(t,e,n)}function ls(t){if(Xi(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class cs extends eo{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:ls,extends:eo})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return I[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===lc(this).length}isDirty(){const t=jr()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of lc(this)){const n=cc(this,e);as(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(wo(e)&&t.push(e),as(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;as(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;as(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return as(t)&&t.getLastDescendant()||t||null}const o=e[t];return as(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:ui(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:ui(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=_c(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&w[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){Zn(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),s=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const i=s.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Xi(this)||this.getChildren().some(wo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=Dl(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function as(t){return t instanceof cs}function us(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class fs extends eo{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ds(t){return t instanceof fs}class hs extends cs{__cachedText;$config(){return this.config("root",{extends:cs})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!zr()&&0!==jr()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)as(e)||ds(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return mi().updateFromJSON(t)}collapseAtStart(){return!0}}function gs(t){return t instanceof hs}function _s(t){return new ys(G(t._nodeMap),null,t._slotsUsed)}function ps(){return new ys(new Map([["root",new hs]]),null,!1)}function ms(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),as(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const s=e.getChildren();for(let t=0;t0){const s={};for(const n of r){const r=cc(e,n);null===r&&t(366,o.name,n),s[n]=ms(r)}n.$slots=s}return n}class ys{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Zr(e&&e.editor||null,this,t)}clone(t){const e=new ys(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Zr(null,this,()=>({root:ms(mi())}))}}class xs extends cs{$config(){return this.config("artificial",{extends:cs})}createDOM(t){return fl().createElement("div")}}class Cs extends eo{$config(){return this.config("linebreak",{importDOM:{br:t=>vs(t)||Es(t)?null:{conversion:Ss,priority:0}}})}getTextContent(){return"\n"}createDOM(){return fl().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function Ss(t){return{node:Ts()}}function Ts(){return Zi(new Cs)}function Ns(t){return t instanceof Cs}function vs(t){const e=t.parentElement;if(null!==e&&Ol(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&ks(n))return!0}}return!1}function Es(t){const e=t.parentElement;if(null!==e&&Ol(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&ks(o))return!0}return!1}function ks(t){return ti(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Os extends cs{$config(){return this.config("paragraph",{extends:cs,importDOM:{p:()=>({conversion:bs,priority:0})}})}createDOM(t){const e=fl().createElement("p"),n=Pi(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}exportDOM(t){const{element:e}=super.exportDOM(t);if(Sl(e)){this.isEmpty()&&e.append(fl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(wo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=Ms();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||wo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function bs(t){const e=Ms();if($l(e,t),Kl(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in w&&e.setFormat(n)}return Bl(e,t),{node:e}}function Ms(){return Zi(new Os)}function As(t){return t instanceof Os}function Ds(t){console.warn(t)}const ws=0;function Is(t,e,n,o,r){const s=t._keyToDOMMap;s.clear(),t._editorState=ps(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const i=t._observer;null!==i&&(i.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",s.set("root",n),di(n,t,"root"))}function Ps(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Vl(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const Fs={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Hs(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>as(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>as(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function Rs(t,e){const n=t.get(e);t.delete(e),n&&n()}function Ls(t,e,n){return t.set(e,n),Rs.bind(null,t,e)}class Ks{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,s,i,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new J,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Ni(),this._onError=r,this._onWarn=s,this._htmlConversions=i,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return Ls(this._listeners.update,t)}registerEditableListener(t){return Ls(this._listeners.editable,t)}registerDecoratorListener(t){return Ls(this._listeners.decorator,t)}registerTextContentListener(t){return Ls(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return xa(Ls(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new j,new j,new j,new j,new j]);const s=r.get(e);void 0===s&&t(36,String(e));const i=function(t){return 7&t}(o),l=s[i];return i!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),s.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let s=r.get(e);void 0===s&&(s=new Set,r.set(e,s)),s.add(o);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(e,o),()=>{s.delete(o),0===s.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Rl(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Rl(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=ui(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:oo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,...e){return Bi(this,t,...e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Pi(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,Is(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||qn(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Yi(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,st(this),this._updateTags.add(oo),ts(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;vn.set(t,n);let o=En.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},En.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=Hn(t);r.push(kn.register(n));for(let n=0;n{Jn(t)||(Gn(t),(e.isEditable()||"click"===o)&&s(t,e))}:t=>{if(Jn(t))return;Gn(t);const n=e.isEditable();switch(o){case"cut":return n&&Bi(e,fn,t);case"copy":return Bi(e,un,t);case"paste":return n&&Bi(e,Pe,t);case"dragstart":return n&&Bi(e,ln,t);case"dragover":return n&&Bi(e,cn,t);case"dragend":return n&&Bi(e,an,t);case"focus":return n&&Bi(e,mn,t);case"blur":return n&&Bi(e,yn,t);case"drop":return n&&Bi(e,rn,t)}};r.push(Sn(t,o,i))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(oo),ts(this);es("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=_s(e),o._selection=e._selection?e._selection.clone():null),rt(this);const r=this._pendingEditorState,s=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=s&&this._updateTags.add(s),ts(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,is(this,()=>{if(s&&this._updateTags.add(s),e._parsed)for(const[t,e]of o._nodeMap.entries())as(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=ps(),r=Ir,s=Fr,i=Pr,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,Ir=o,Fr=!1,Pr=e,$s(null);try{const r=e._nodes;Qr(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,Ir=r,Fr=s,Pr=i}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&ts(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):ss(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),is(this,()=>{const o=pr(),r=mi();null!==o?o.dirty||yi(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Ui("focus"),Hi(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=rl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,es("editable",this,!0,t),this._slotsUsed&&this.update(()=>Yr()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ks.version=H;let Bs=null;function $s(t){Bs=t}const zs=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let Ws=1;function Us(e,n){const o=Hs(e,n);return void 0===o&&t(30,n),o}function Hs(t,e){return t._nodes.get(e)}const js="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Ys(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return ei(e)||il(e)?xl(e):null})();if(!Sl(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=gi(n),r=n.nodeName;return no(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Xs(n))}const Gs=Ys;function Js(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return qs(e)===t&&t.read("latest",()=>!Ys(e))}function Vs(t){return t instanceof Ks}function qs(t){let e=t;for(;null!=e;){const t=Xs(e);if(Vs(t))return t;e=zi(e)}return null}function Xs(t){return t?t.__lexicalEditor:null}function Qs(t){return Ro(t)||t.isToken()}function Zs(t){return Qs(t)||t.isSegmented()}function ti(t){return Tl(t)&&3===t.nodeType}function ei(t){return Tl(t)&&9===t.nodeType}function ni(t){let e=t;for(;null!=e;){if(ti(e))return e;e=e.firstChild}return null}function oi(t,e,n){const o=A[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~A.superscript:"superscript"===e?r&=~A.subscript:"lowercase"===e?(r&=~A.uppercase,r&=~A.capitalize):"uppercase"===e?(r&=~A.lowercase,r&=~A.capitalize):"capitalize"===e&&(r&=~A.lowercase,r&=~A.uppercase),r}function ri(t,e){const n=function(){const t=Bs;return Bs=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);Wr(),Ur();const o=jr(),r=Hr(),s=""+Ws++;r._nodeMap.set(s,t),as(t)?o._dirtyElements.set(s,!0):o._dirtyLeaves.add(s),o._cloneNotNeeded.add(s),0===o._dirtyType&&(o._dirtyType=1),t.__key=s}function si(e){null!==nc(e)&&t(380,e.__key,String(nc(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),s=e.getNextSibling(),i=null!==s?s.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==s?s.getWritable():null;null===r&&(o.__first=i),null===s&&(o.__last=l),null!==c&&(c.__next=i),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const ii=si;function li(e){Ur(),Zn(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:ec(n)?n.__slotHost:null,r=Hr(),s=jr(),i=r._nodeMap,l=s._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:ec(t)?t.__slotHost:null}}(o,i,l);const c=n.__key;0===s._dirtyType&&(s._dirtyType=1),as(e)?l.set(c,!0):s._dirtyLeaves.add(c)}function ci(t){Wr();const e=jr(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=ui(n);null!==t&&t.getWritable()}if(null!==t){const e=ui(t);null!==e&&e.getWritable()}}}function ai(){if(zr())return null;return jr()._compositionKey}function ui(t,e){const n=(e||Hr())._nodeMap.get(t);return void 0===n?null:n}function fi(t,e){const n=hi(t,jr());return void 0!==n?ui(n,e):null}function di(t,e,n){t[`__lexicalKey_${e._key}`]=n}function hi(t,e){return t[`__lexicalKey_${e._key}`]}function gi(t,e){let n=t;for(;null!=n;){const t=fi(n,e);if(null!==t)return t;n=zi(n)}return null}function _i(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function pi(t){return t.read(()=>mi().getTextContent())}function mi(){return Hr()._nodeMap.get("root")}function yi(t){Wr();const e=Hr();null!==t&&(t.dirty=!0,t.setCachedNodes(null),jo(t)&&jr()._slotsUsed&&ar(t)),e._selection=t}function xi(){Wr();rt(jr())}function Ci(t){const e=function(t,e){let n=t;for(;null!=n;){const t=hi(n,e);if(void 0!==t)return t;n=zi(n)}return null}(t,jr());return null===e?null:ui(e)}function Si(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Ti(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function Ni(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function vi(t){return ti(t)?t.nodeValue:null}function Ei(t,e,n){const o=rl(Gi(e));if(null===o)return;const r=gl(o,e._rootElement),s=r.anchorNode;let{anchorOffset:i,focusOffset:l}=r;if(null!==s){let e=vi(s);const o=gi(s);if(null!==e&&wo(o)){if((e===N||e===E)&&n){const t=n.length;e=n,i=t,l=t}null!==e&&ki(o,e,i,l,t)}}}function ki(t,e,n,o,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const i=s.isComposing();if(s.isToken()&&i)return;let c=e;if((i||r)&&(e.endsWith(N)&&(c=e.slice(0,-N.length)),r)){const t=E;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=s.getTextContent();if(r||c!==u){const e=pr();if(""===c){if(ci(null),a||l||d)s.remove();else{const t=jr();Oi(s,"",e),setTimeout(()=>{t.update(()=>{s.isAttached()&&""===s.getTextContent()&&s.remove()})},20)}return}const r=s.getParent(),u=mr(),f=s.getTextContentSize(),h=ai(),g=s.getKey();if(s.isToken()&&!i||null!==h&&g===h&&!i||jo(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!s.canInsertTextBefore()&&!i||u.focus.key===t.__key&&u.focus.offset===f&&!s.canInsertTextAfter()&&!i))return void s.markDirty();if(!jo(e)||null===n||null===o)return void Oi(s,c,e);if(e.setTextNodeRange(s,n,s,o),s.isSegmented()){const t=Do(s.getTextContent());s.replace(t),s=t}Oi(s,c,e)}}}function Oi(t,e,n){if(t.setTextContent(e),jo(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const s=n[r];"text"===s.type&&s.key===e&&(s.offset=Kc(t,s.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function bi(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function Mi(t,e){return bi(t,e,"altKey")&&bi(t,e,"ctrlKey")&&bi(t,e,"shiftKey")&&bi(t,e,"metaKey")}function Ai(t,e,n){if(!Mi(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const Di={ctrlKey:!r,metaKey:r},wi={altKey:r,ctrlKey:!r};function Ii(t){return"Backspace"===t.key}function Pi(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=ya(r);return n[e]=t,t}return r}function Fi(e,n,o,r,s){if(0===o.size)return;const i=r.__type,l=r.__key,c=n.get(i);void 0===c&&t(33,i);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===s;(void 0===f||d)&&u.set(l,d?"updated":s)}function Ri(t,e,n){const o=t.getParent();let r=n,s=t;return null!==o&&(e&&0===n?(r=s.getIndexWithinParent(),s=o):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=o)),s.getChildAtIndex(e?r-1:r)}function Li(t,e){const n=t.offset;if("element"===t.type){return Ri(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Ri(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Ki(t){const e=Gi(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Bi(t,e,...n){return ns(t,e,n[0],t)}function $i(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function zi(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return il(n)?n.host:null}function Wi(t){return ei(t)?t:Sl(t)?t.ownerDocument:null}function Ui(t){Wr();jr()._updateTags.add(t)}function Hi(t){Wr();jr()._deferred.push(t)}function ji(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Yi(t){const e=Wi(t);return e?e.defaultView:null}function Gi(e){const n=e._window;return null===n&&t(78),n}function Ji(t){return as(t)&&t.isInline()||ds(t)&&t.isInline()}function Vi(t){let e=t.getLatest();for(;null!==e;){if(null!==nc(e)&&as(e))return e;const t=e.getParentOrThrow();if(Xi(t))return t;e=t}return e}function qi(t){return as(t)&&t.isShadowRoot()}function Xi(t){return gs(t)||qi(t)}function Qi(t,e=!1){const n=t.constructor.clone(t,zs);return ri(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Zi(e){const n=jr(),o=e.getType(),r=Hs(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:s,replaceWithKlass:i}=r;if(null!==s){const n=s(e),r=n.constructor;return null!==i?n instanceof i||t(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function tl(e,n){!gs(e.getParent())||as(n)||ds(n)||t(99)}function el(e){const n=ui(e);return null===n&&t(63,e),n}function nl(t){if(!t||t.isInline())return!1;if(ds(t))return!0;if(as(t)){if(t.isShadowRoot()){const e=t.getParent();return!(as(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function ol(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function rl(t){return n?(t||window).getSelection():null}function sl(t){const e=Yi(t);return e?e.getSelection():null}function il(t){return Nl(t)&&"host"in t}const ll=[];function cl(t){const e=t.getRootNode();if(e===t||!il(e))return ll;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!il(t))break;n.push(t),o=t.host}return n}function*al(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(ei(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function ul(t){return null!==t?t.ownerDocument:document}function fl(){const t=Jr();return ul(null!==t?t._rootElement:null)}function dl(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=cl(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function hl(t,e){const n=dl(t,e);if(null!==n){const t=_l(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function gl(t,e){const n=dl(t,e);return null===n?t:pl(n,ml(t))}function _l(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function pl(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:s}=t;return"backward"===e?{anchorNode:r,anchorOffset:s,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:s}}function ml(t){return t.direction}function yl(t){const e=t.getRootNode();return ei(e)||il(e)?e.activeElement:null}function xl(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function Cl(t){const e=t.target;if(null!==e&&Sl(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function Sl(t){return Tl(t)&&1===t.nodeType}function Tl(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function Nl(t){return Tl(t)&&11===t.nodeType}const vl=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function El(t){return!(!Sl(t)||!t.style.display.startsWith("inline"))||vl.test(t.nodeName)}const kl=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Ol(t){return(!Sl(t)||!t.style.display.startsWith("inline"))&&kl.test(t.nodeName)}function bl(t){if(ds(t)&&!t.isInline())return!0;if(!as(t)||Xi(t))return!1;const e=t.getFirstChild(),n=null===e||Ns(e)||wo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Ml(){return jr()}function Al(t=Ml()){return t._config.dom||Fs}function Dl(e,n,o=Ml()){const r=Al(o).$getDOMSlot(e,n,o);return as(e)&&(wl(r)||t(344,e.getKey(),e.getType())),r}function wl(t){return t instanceof z}function Il(t,e,n=Ml()){return ni(Dl(t,e,n).element)}const Pl=new WeakMap,Fl=new Map;function Rl(e){if(!e._readOnly&&e.isEmpty())return Fl;e._readOnly||t(192);let n=Pl.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Pl.set(e,n)),n}function Ll(t){const e=t.constructor.clone(t,zs);return e.afterCloneFrom(t),e}function Kl(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Bl(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function $l(t,e){const n=e.style.textAlign;return n&&n in w?t.setFormat(n):t}function zl(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function Wl(t){return!0===t.__lexicalUnmanaged}function Ul(t,e=Ml()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Hl(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(Sl(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==hi(n,e))return!1;n=zi(n)}return!1}function jl(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==eo[e]}const Yl=new WeakMap,Gl=Symbol("lexical.synthesizedGetType");function Jl(e){const n=Yl.get(e);if(n)return n;const o=null!=e.prototype&&R in e.prototype?e.prototype[R]():void 0,r=function(e){if(!(e===eo||e.prototype instanceof eo)){let n="",o="";try{n=e.getType()}catch(t){}try{Ks.version&&(o=JSON.parse(Ks.version))}catch(t){}t(290,e.name,n,o)}return e===fs||e===cs||e===eo}(e),s=!r&&jl(e,"getType")?e.getType:void 0,i=s&&!(Gl in s)?s.call(e):void 0;let l,c=i;if(o)if(i)l=o[i];else{for(const[t,e]of Object.entries(o))c=t,l=e;if(!l)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){l=e;break}}}if(!r&&c){if(!jl(e,"getType")){const t=e,n=function(){return this!==t?eo.getType.call(this):c};n[Gl]=!0,e.getType=n}if(jl(e,"clone")||(e.clone=(t,n)=>{$s(t);const o=new e;return n!==zs&&o.afterCloneFrom(t),o}),jl(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!jl(e,"importDOM")&&l){const{importDOM:t}=l;t&&(e.importDOM=()=>t)}}const a={klass:e,ownNodeConfig:l,ownNodeType:c};return Yl.set(e,a),a}function*Vl(t){for(let e=t;e&&(e===eo||no(e.prototype));){const t=Jl(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Ql(e)}}const ql=(t,e)=>{let n=t;for(;null!=n&&!gs(n);){if(e(n))return n;n=n.getParent()}return null};function Xl(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?ui(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Ql(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const Zl=new Map;function tc(t){return as(t)||ds(t)}function ec(t){return as(t)||ds(t)}function nc(t){const e=t.getLatest();return ec(e)?e.__slotHost:null}function oc(e){const n=nc(e);if(null===n)return null;const o=ui(n);return as(o)||ds(o)||t(370),o}function rc(t){const e=oc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ic(e))if(o===n)return t;return null}function sc(t){let e=t.getLatest();for(;null!==e;){if(null!==nc(e))return e;e=e.getParent()}return null}function ic(t){const e=t.getLatest();return tc(e)&&null!==e.__slots?e.__slots:Zl}function lc(t){return Array.from(ic(t).keys())}function cc(t,e){const n=ic(t).get(e);return void 0===n?null:ui(n)}const ac=["__proto__","constructor","prototype"],uc=Symbol("slotMapOwner");function fc(t){let e=t.__slots;return null!==e&&e[uc]===t||(e=new Map(e),e[uc]=t,t.__slots=e),e}const dc=new WeakMap,hc=[];function gc(t){for(const{ownNodeConfig:e}of Vl(t)){const t=e&&e.slots;if(t)return t}return hc}function _c(t){let e="";for(const n of lc(t)){const o=cc(t,n);null!==o&&(e+=o.getTextContent())}return e}function pc(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function mc(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=dc.get(e);if(void 0===n){const o=gc(e),r=new Map;for(const n of o)ac.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,dc.set(e,n)}return n}(e.constructor);let r=null,s=!0;for(const t of n.keys()){if(null!==r&&pc(r,t,o)>0){s=!1;break}r=t}if(s)return;const i=Array.from(n).sort(([t],[e])=>pc(t,e,o));n.clear();for(const[t,e]of i)n.set(t,e)}function yc(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!as(o)&&!ds(o)||o.isInline())&&t(374,o.__key);const s=e.getWritable(),i=fc(s),l=i.get(n);void 0!==l&&Sc(l);const c=o.getWritable(),a=oc(c);if(null!==a){const t=rc(c);null!==t&&fc(a.getWritable()).delete(t),c.__slotHost=null}return si(c),c.__slotHost=s.__key,i.set(n,c.__key),mc(s),function(){const t=Ml();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),s}function xc(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(Sc(o),fc(n).delete(e)),n}function Cc(t,e){}function Sc(e){const n=ui(e);if(null===n)return;const o=n.getWritable();ec(o)||t(377,e),o.__slotHost=null,o.remove()}const Tc={next:"previous",previous:"next"};class Nc{origin;constructor(t){this.origin=t}[Symbol.iterator](){return Jc({hasNext:Dc,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Rc(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Rc(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let s=this;const i=this.getParentAtCaret(),l=new Map;for(let t=s.getAdjacentCaret();null!==t&&l.size0){const n=s.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||s.origin.is(e));else{const t=e.getParent();t&&t.is(i)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else s.insert(e);s=Rc(e,this.direction)}for(const t of l.values())t.remove();return this}}class vc extends Nc{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:$c(t,this.direction)}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=kc(this.direction);return Rc(this.getNodeAtCaret(),t)||$c(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof vc&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ec={root:gs,shadowRoot:Xi};function kc(t){return Tc[t]}function Oc(t,e="root"){return null===t||Ec[e](t)?null:null===nc(t)?t:null}class bc extends Nc{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Rc(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return as(this.origin)?$c(this.origin,this.direction):null}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=kc(this.direction);return Rc(this.getNodeAtCaret(),t)||$c(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof bc&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof bc||t instanceof Mc)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Mc extends Nc{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lc(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Lc(this.origin,kc(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Mc&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof bc||t instanceof Mc)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Rc(this.origin,this.direction)}}function Ac(t){return t instanceof Mc}function Dc(t){return t instanceof bc}function wc(t){return t instanceof vc}const Ic={next:class extends Mc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Mc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Pc={next:class extends bc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends bc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Fc={next:class extends vc{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends vc{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Rc(t,e){return t?new Pc[e](t):null}function Lc(t,e,n){return t?new Ic[e](t,Kc(t,n)):null}function Kc(t,n,o="error"){const r=t.getTextContentSize();let s="next"===n?r:"previous"===n?0:n;return(s<0||s>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),s=s<0?0:r),s}function Bc(t,e){return new Hc(t,e)}function $c(t,e){return as(t)?new Fc[e](t):null}function zc(t){return t&&t.getChildCaret()||t}function Wc(t){return t&&zc(t.getAdjacentCaret())}class Uc{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new Uc(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return Ac(e)?function(t,e){const{direction:n,origin:o}=t,r=Kc(o,"focus"===e?kc(n):n);return Bc(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Bc(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=Ac(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=Ac(n),r=e=>e.isSameNodeCaret(n)?null:Wc(e)||e.getParentCaret(t);return Jc({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Hc{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&bl(t));if(f&&lc(f).length>0)return null;return u&&f?[u,f]:null}(d,h,a);if(g){const[t,e]=g;$c(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(h){const t=function(t){if(wc(t)){const e=t.origin;if(bl(e))return e}else{const e=t.getParentAtCaret();if(e&&bl(e))return e}return null}(h),e=t&&t.getParent(),n=t&&t.getParents().findLast(qi);if(t&&e&&!gs(e)&&t.isEmpty()&&a.has(t.getKey())&&0===lc(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!gs(n)&&n.isEmpty();){const t=n.getParent();if(t&&gs(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const _=[d,h,...l,...c].find(la);if(_){return Yc(fa(aa(_),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function aa(t){const e=function(t){let e=t;for(;wc(e);){const t=Wc(e);if(!wc(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(wo(e.origin))return Ac(e)?e:Lc(e.origin,n,n);const o=e.getAdjacentCaret();return Dc(o)&&wo(o.origin)?Lc(o.origin,n,kc(n)):e}function ua(t){return Ac(t)&&t.offset!==Kc(t.origin,t.direction)}function fa(t,e){return t.direction===e?t:t.getFlipped()}function da(t,e){return t.direction===e?t:Gc(fa(t.focus,e),fa(t.anchor,e))}function ha(t,e,n){let o=$c(t,"next");for(let t=0;t0||!s&&n.canBeEmpty()&&r(n,"last"))&&i.insert(e(n).splice(0,0,o))}return i}function ma(e,n,o){let r=fa(n,"next");Ac(r)&&(0===r.offset?r=Rc(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Rc(r.origin,"next"))),r.origin.is(e)&&(Dc(r)||t(342,e.getKey(),e.getType()),r=sa(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=pa(t,o))r=t;return Ac(r)&&t(283),r.insert(e.isInline()?Ms().append(e):e),fa(Rc(e.getLatest(),"next"),n.direction)}function ya(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function xa(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}exports.$addUpdateTag=Ui,exports.$applyNodeReplacement=Zi,exports.$assumeActiveEditor=function(t){null!==Hr()&&null===Pr&&(Pr=t),Pr!==t&&e(378)},exports.$caretFromPoint=ta,exports.$caretRangeFromSelection=ra,exports.$cloneWithProperties=Ll,exports.$cloneWithPropertiesEphemeral=function(t){return(e=Ll(t))[Qn]=!0,e;var e},exports.$comparePointCaretNext=Vc,exports.$copyNode=Qi,exports.$create=function(t){const e=Ml();return Wr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)},exports.$createChildrenArray=Xl,exports.$createLineBreakNode=Ts,exports.$createNodeSelection=gr,exports.$createParagraphNode=Ms,exports.$createPoint=Ko,exports.$createRangeSelection=hr,exports.$createRangeSelectionFromDom=function(t,e){return _r(null,t,e,null)},exports.$createTabNode=Fo,exports.$createTextNode=Do,exports.$extendCaretToRange=jc,exports.$findMatchingParent=ql,exports.$formatText=Vo,exports.$fullReconcile=Yr,exports.$generateNodesFromRawText=kr,exports.$getAdjacentChildCaret=Wc,exports.$getAdjacentNode=Li,exports.$getAdjacentSiblingOrParentSiblingCaret=function(t,e="root"){let n=0,o=t,r=Wc(o);for(;null===r;){if(n--,r=o.getParentCaret(e),!r)return null;o=r,r=Wc(o)}return r&&[r,n]},exports.$getCaretInDirection=fa,exports.$getCaretRange=Gc,exports.$getCaretRangeInDirection=da,exports.$getCharacterOffsets=Xo,exports.$getChildCaret=$c,exports.$getChildCaretAtIndex=ha,exports.$getChildCaretOrSelf=zc,exports.$getCollapsedCaretRange=Yc,exports.$getCommonAncestor=Zc,exports.$getCommonAncestorResultBranchOrder=qc,exports.$getDOMSlot=Dl,exports.$getDOMTextNode=Il,exports.$getDocument=fl,exports.$getEditor=Ml,exports.$getEditorDOMRenderConfig=Al,exports.$getNearestNodeFromDOMNode=gi,exports.$getNearestRootOrShadowRoot=Vi,exports.$getNodeByKey=ui,exports.$getNodeByKeyOrThrow=el,exports.$getNodeFromDOMNode=fi,exports.$getPreviousSelection=mr,exports.$getRoot=mi,exports.$getSelection=pr,exports.$getSiblingCaret=Rc,exports.$getSlot=cc,exports.$getSlotFrame=sc,exports.$getSlotHost=oc,exports.$getSlotNameWithinHost=rc,exports.$getSlotNames=lc,exports.$getState=at,exports.$getStateChange=function(t,e,n){const o=at(t,n,it),r=at(e,n,it);return n.isEqual(o,r)?null:[o,r]},exports.$getTextContent=function(){const t=pr();return null===t?"":t.getTextContent()},exports.$getTextNodeOffset=Kc,exports.$getTextPointCaret=Lc,exports.$getTextPointCaretSlice=Bc,exports.$getWritableNodeState=ht,exports.$hasAncestor=ji,exports.$hasUpdateTag=function(t){return jr()._updateTags.has(t)},exports.$insertNodeToNearestRootAtCaret=ma,exports.$insertNodes=function(t){let e=pr()||mr();null===e&&(e=mi().selectEnd()),e.insertNodes(t)},exports.$isBlockElementNode=fr,exports.$isChildCaret=wc,exports.$isDecoratorNode=ds,exports.$isEditorState=function(t){return t instanceof ys},exports.$isElementDOMSlot=wl,exports.$isElementNode=as,exports.$isExtendableTextPointCaret=ua,exports.$isInlineElementOrDecoratorNode=Ji,exports.$isInlineFormattable=So,exports.$isLeafNode=function(t){return wo(t)||Ns(t)||ds(t)},exports.$isLexicalNode=no,exports.$isLineBreakNode=Ns,exports.$isNodeCaret=function(t){return t instanceof Nc},exports.$isNodeSelection=Go,exports.$isParagraphNode=As,exports.$isRangeSelection=jo,exports.$isRootNode=gs,exports.$isRootOrShadowRoot=Xi,exports.$isSelectionCapturedInDecoratorInput=Ys,exports.$isShadowRootNode=qi,exports.$isSiblingCaret=Dc,exports.$isSlotChild=ec,exports.$isSlotHost=tc,exports.$isTabNode=Ro,exports.$isTextNode=wo,exports.$isTextPointCaret=Ac,exports.$isTextPointCaretSlice=function(t){return t instanceof Hc},exports.$isTokenOrSegmented=Zs,exports.$isTokenOrTab=Qs,exports.$markSlotEditable=Ul,exports.$needsBlockCursorBeside=nl,exports.$nodesOfType=function(t){const e=t.getType(),n=Hr();if(n._readOnly){const t=Rl(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r},exports.$normalizeCaret=aa,exports.$normalizeSelection__EXPERIMENTAL=Nt,exports.$onUpdate=Hi,exports.$parseSerializedNode=function(t){return Qr(t,jr()._nodes)},exports.$removeFromParent=si,exports.$removeSlot=xc,exports.$removeTextFromCaretRange=ca,exports.$rewindSiblingCaret=sa,exports.$selectAll=function(t){const e=mi();if(jo(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(gs(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Nt(t),t;const r=o.getTopLevelElementOrThrow(),s=r.getParent();if(null===s)return as(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),Nt(t)),t;const i=s;return e.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Nt(t),t}{const t=e.select(0,e.getChildrenSize());return yi(Nt(t)),t}},exports.$setCompositionKey=ci,exports.$setDirectionFromDOM=Bl,exports.$setFormatFromDOM=$l,exports.$setPointFromCaret=ea,exports.$setSelection=yi,exports.$setSelectionFromCaretRange=na,exports.$setSlot=yc,exports.$setState=function(t,e,n){let o;if(Wr(),"function"==typeof n){const r=t.getLatest(),s=at(r,e);if(o=n(s),e.isEqual(s,o))return r}else o=n;const r=t.getWritable();return ht(r).updateFromKnown(e,o),r},exports.$setTextFormat=function(t,e){const n=[];for(const[t,o]of Object.entries(e))"boolean"==typeof o&&n.push([t,o]);0!==n.length&&Jo(t,t=>{for(const[e,o]of n)t=oi(t,e,o?A[e]:0);return t})},exports.$splitAtPointCaretNext=pa,exports.$splitNode=function(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Xi(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),s=Xi(n),i=e!==o||s?Qi(e):e;if(s)return as(e)&&as(i)||t(133),e.insertAfter(i),[e,i,i];{const[t,o,s]=r(n),l=e.getNextSiblings();return s.append(i,...l),[t,o,i]}},[s,i]=r(o);return[s,i]},exports.$updateDOMSelection=vr,exports.$updateRangeSelectionFromCaretRange=oa,exports.ArtificialNode__DO_NOT_USE=xs,exports.BEFORE_INPUT_COMMAND=ke,exports.BLUR_COMMAND=yn,exports.CAN_REDO_COMMAND=_n,exports.CAN_UNDO_COMMAND=pn,exports.CAN_USE_BEFORE_INPUT=i,exports.CAN_USE_DOM=n,exports.CLEAR_EDITOR_COMMAND=hn,exports.CLEAR_HISTORY_COMMAND=gn,exports.CLICK_COMMAND=Ee,exports.COLLABORATION_TAG=ro,exports.COMMAND_PRIORITY_BEFORE_CRITICAL=-4,exports.COMMAND_PRIORITY_BEFORE_EDITOR=-8,exports.COMMAND_PRIORITY_BEFORE_HIGH=-5,exports.COMMAND_PRIORITY_BEFORE_LOW=-7,exports.COMMAND_PRIORITY_BEFORE_NORMAL=-6,exports.COMMAND_PRIORITY_CRITICAL=4,exports.COMMAND_PRIORITY_EDITOR=ws,exports.COMMAND_PRIORITY_HIGH=3,exports.COMMAND_PRIORITY_LOW=1,exports.COMMAND_PRIORITY_NORMAL=2,exports.COMPOSITION_END_COMMAND=Me,exports.COMPOSITION_END_TAG=ao,exports.COMPOSITION_START_COMMAND=be,exports.COMPOSITION_START_TAG=co,exports.CONTROLLED_TEXT_INSERTION_COMMAND=Ie,exports.COPY_COMMAND=un,exports.CUT_COMMAND=fn,exports.CUT_TAG="cut",exports.DEFAULT_EDITOR_DOM_CONFIG=Fs,exports.DELETE_CHARACTER_COMMAND=Ae,exports.DELETE_LINE_COMMAND=Le,exports.DELETE_WORD_COMMAND=Re,exports.DRAGEND_COMMAND=an,exports.DRAGOVER_COMMAND=cn,exports.DRAGSTART_COMMAND=ln,exports.DROP_COMMAND=rn,exports.DecoratorNode=fs,exports.ElementNode=cs,exports.FOCUS_COMMAND=mn,exports.FORMAT_ELEMENT_COMMAND=sn,exports.FORMAT_TEXT_COMMAND=Ke,exports.HISTORIC_TAG="historic",exports.HISTORY_MERGE_TAG=oo,exports.HISTORY_PUSH_TAG="history-push",exports.INDENT_CONTENT_COMMAND=nn,exports.INPUT_COMMAND=Oe,exports.INSERT_LINE_BREAK_COMMAND=De,exports.INSERT_PARAGRAPH_COMMAND=we,exports.INSERT_TAB_COMMAND=en,exports.INTERNAL_$isBlock=bl,exports.IS_ALL_FORMATTING=2047,exports.IS_ANDROID=c,exports.IS_ANDROID_CHROME=f,exports.IS_APPLE=r,exports.IS_APPLE_WEBKIT=d,exports.IS_BOLD=1,exports.IS_CHROME=u,exports.IS_CODE=16,exports.IS_FIREFOX=s,exports.IS_HIGHLIGHT=p,exports.IS_IOS=l,exports.IS_ITALIC=2,exports.IS_SAFARI=a,exports.IS_STRIKETHROUGH=4,exports.IS_SUBSCRIPT=32,exports.IS_SUPERSCRIPT=64,exports.IS_UNDERLINE=8,exports.KEY_ARROW_DOWN_COMMAND=Je,exports.KEY_ARROW_LEFT_COMMAND=je,exports.KEY_ARROW_RIGHT_COMMAND=Ue,exports.KEY_ARROW_UP_COMMAND=Ge,exports.KEY_BACKSPACE_COMMAND=Xe,exports.KEY_DELETE_COMMAND=Ze,exports.KEY_DOWN_COMMAND=We,exports.KEY_ENTER_COMMAND=Ve,exports.KEY_ESCAPE_COMMAND=Qe,exports.KEY_MODIFIER_COMMAND=xn,exports.KEY_SPACE_COMMAND=qe,exports.KEY_TAB_COMMAND=tn,exports.LineBreakNode=Cs,exports.MOVE_TO_END=He,exports.MOVE_TO_START=Ye,exports.NODE_STATE_DIRECT=it,exports.NODE_STATE_KEY="$",exports.NODE_STATE_LATEST=lt,exports.OUTDENT_CONTENT_COMMAND=on,exports.PASTE_COMMAND=Pe,exports.PASTE_TAG="paste",exports.ParagraphNode=Os,exports.REDO_COMMAND=ze,exports.REMOVE_TEXT_COMMAND=Fe,exports.RootNode=hs,exports.SELECTION_CHANGE_COMMAND=Ne,exports.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=ve,exports.SELECT_ALL_COMMAND=dn,exports.SET_TEXT_FORMAT_COMMAND=Be,exports.SKIP_COLLAB_TAG="skip-collab",exports.SKIP_DOM_SELECTION_TAG=io,exports.SKIP_SCROLL_INTO_VIEW_TAG=so,exports.SKIP_SELECTION_FOCUS_TAG=lo,exports.TEXT_TYPE_TO_FORMAT=A,exports.TabNode=Po,exports.TextNode=To,exports.UNDO_COMMAND=$e,exports.addClassNamesToElement=function(t,...e){const n=ya(...e);n.length>0&&t.classList.add(...n)},exports.buildImportMap=function(t){return t},exports.configExtension=function(...t){return t},exports.createCommand=Te,exports.createEditor=function(e){const n=e||{},o=Jr(),r=n.theme||{},s=void 0===e?o:n.parentEditor||null,i=n.disableEvents||!1,l=ps(),c=n.namespace||(null!==s?s._config.namespace:Ni()),a=n.editorState,u=[hs,To,Cs,Po,Os,xs,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ke,Ln,ws),t.registerCommand(Oe,Kn,ws),t.registerCommand(be,Bn,ws),t.registerCommand(Me,$n,ws),t.registerCommand(We,Un,ws)}(p),p},exports.createRefCountedRegistry=Cn,exports.createSharedNodeState=ut,exports.createState=function(t,e){return new ct(t,e)},exports.declarePeerDependency=function(t,e){return[t,e]},exports.defineExtension=function(t){return t},exports.findAllLexicalElementsDeep=al,exports.flipDirection=kc,exports.getActiveElement=yl,exports.getActiveElementDeep=xl,exports.getComposedEventTarget=Cl,exports.getComposedStaticRange=dl,exports.getDOMOwnerDocument=Wi,exports.getDOMSelection=rl,exports.getDOMSelectionFromTarget=sl,exports.getDOMSelectionPoints=gl,exports.getDOMSelectionRange=hl,exports.getDOMSelectionRangeAndPoints=function(t,e){const n=dl(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=_l(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:pl(n,ml(t)),range:o}},exports.getDOMShadowRoots=cl,exports.getDOMTextNode=ni,exports.getDeclaredSlots=gc,exports.getEditorPropertyFromDOMNode=Xs,exports.getNearestEditorFromDOMNode=qs,exports.getParentElement=zi,exports.getRegisteredNode=Hs,exports.getRegisteredNodeOrThrow=Us,exports.getRegisteredSubtypeMap=function(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Jl(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Vl(o)){const o=n&&e.get(n);o&&o.add(t)}return e},exports.getRootOwnerDocument=ul,exports.getStaticNodeConfig=Jl,exports.getStyleObjectFromCSS=fo,exports.getTextDirection=function(t){return b.test(t)?"rtl":M.test(t)?"ltr":null},exports.getTransformSetFromKlass=Ps,exports.isBlockDomNode=Ol,exports.isCurrentlyReadOnlyMode=zr,exports.isDOMCapturingSelection=Hl,exports.isDOMDocumentNode=ei,exports.isDOMNode=Tl,exports.isDOMShadowRoot=il,exports.isDOMTextNode=ti,exports.isDOMUnmanaged=Wl,exports.isDocumentFragment=Nl,exports.isExactShortcutMatch=Ai,exports.isHTMLAnchorElement=function(t){return Sl(t)&&"A"===t.tagName},exports.isHTMLElement=Sl,exports.isHTMLTableCellElement=function(t){return Sl(t)&&("TD"===t.tagName||"TH"===t.tagName)},exports.isHTMLTableRowElement=function(t){return Sl(t)&&"TR"===t.tagName},exports.isInlineDomNode=El,exports.isLastChildInBlockNode=Es,exports.isLexicalEditor=Vs,exports.isModifierMatch=Mi,exports.isOnlyChildInBlockNode=vs,exports.isSelectionCapturedInDecoratorInput=Gs,exports.isSelectionWithinEditor=Js,exports.iterStaticNodeConfigChain=Vl,exports.makeStepwiseIterator=Jc,exports.mergeRegister=xa,exports.mountSlotContainer=function(t,e,n,o){const r=t.read("latest",()=>{const o=ui(e);return null!==o?function(t,e,n=Ml()){const o=cc(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r},exports.normalizeClassNames=ya,exports.registerEventListener=Sn,exports.registerEventListeners=function(t,e,n){return xa(...Object.entries(e).map(([e,o])=>Sn(t,e,o,n)))},exports.removeClassNamesFromElement=function(t,...e){const n=ya(...e);n.length>0&&t.classList.remove(...n)},exports.removeFromParent=ii,exports.resetRandomKey=function(){Ws=1},exports.safeCast=function(t){return t},exports.setDOMStyleFromCSS=go,exports.setDOMStyleObject=function(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):ho(t,n,o)}},exports.setDOMUnmanaged=zl,exports.setNodeIndentFromDOM=Kl,exports.shallowMergeConfig=function(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t},exports.stopLexicalPropagation=Gn,exports.toggleTextFormatType=oi,exports.tokenizeRawText=Er,exports.unmountSlotContainer=function(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}; ++/*@__INLINE__*/function Te(t){return{type:t}}const Ne=/* @__PURE__ */Te("SELECTION_CHANGE_COMMAND"),ve=/* @__PURE__ */Te("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ee=/* @__PURE__ */Te("CLICK_COMMAND"),ke=/* @__PURE__ */Te("BEFORE_INPUT_COMMAND"),Oe=/* @__PURE__ */Te("INPUT_COMMAND"),be=/* @__PURE__ */Te("COMPOSITION_START_COMMAND"),Me=/* @__PURE__ */Te("COMPOSITION_END_COMMAND"),Ae=/* @__PURE__ */Te("DELETE_CHARACTER_COMMAND"),De=/* @__PURE__ */Te("INSERT_LINE_BREAK_COMMAND"),we=/* @__PURE__ */Te("INSERT_PARAGRAPH_COMMAND"),Ie=/* @__PURE__ */Te("CONTROLLED_TEXT_INSERTION_COMMAND"),Pe=/* @__PURE__ */Te("PASTE_COMMAND"),Fe=/* @__PURE__ */Te("REMOVE_TEXT_COMMAND"),Re=/* @__PURE__ */Te("DELETE_WORD_COMMAND"),Le=/* @__PURE__ */Te("DELETE_LINE_COMMAND"),Ke=/* @__PURE__ */Te("FORMAT_TEXT_COMMAND"),Be=/* @__PURE__ */Te("SET_TEXT_FORMAT_COMMAND"),$e=/* @__PURE__ */Te("UNDO_COMMAND"),ze=/* @__PURE__ */Te("REDO_COMMAND"),We=/* @__PURE__ */Te("KEYDOWN_COMMAND"),Ue=/* @__PURE__ */Te("KEY_ARROW_RIGHT_COMMAND"),He=/* @__PURE__ */Te("MOVE_TO_END"),je=/* @__PURE__ */Te("KEY_ARROW_LEFT_COMMAND"),Ye=/* @__PURE__ */Te("MOVE_TO_START"),Ge=/* @__PURE__ */Te("KEY_ARROW_UP_COMMAND"),Je=/* @__PURE__ */Te("KEY_ARROW_DOWN_COMMAND"),Ve=/* @__PURE__ */Te("KEY_ENTER_COMMAND"),qe=/* @__PURE__ */Te("KEY_SPACE_COMMAND"),Xe=/* @__PURE__ */Te("KEY_BACKSPACE_COMMAND"),Qe=/* @__PURE__ */Te("KEY_ESCAPE_COMMAND"),Ze=/* @__PURE__ */Te("KEY_DELETE_COMMAND"),tn=/* @__PURE__ */Te("KEY_TAB_COMMAND"),en=/* @__PURE__ */Te("INSERT_TAB_COMMAND"),nn=/* @__PURE__ */Te("INDENT_CONTENT_COMMAND"),on=/* @__PURE__ */Te("OUTDENT_CONTENT_COMMAND"),rn=/* @__PURE__ */Te("DROP_COMMAND"),sn=/* @__PURE__ */Te("FORMAT_ELEMENT_COMMAND"),ln=/* @__PURE__ */Te("DRAGSTART_COMMAND"),cn=/* @__PURE__ */Te("DRAGOVER_COMMAND"),an=/* @__PURE__ */Te("DRAGEND_COMMAND"),un=/* @__PURE__ */Te("COPY_COMMAND"),fn=/* @__PURE__ */Te("CUT_COMMAND"),dn=/* @__PURE__ */Te("SELECT_ALL_COMMAND"),hn=/* @__PURE__ */Te("CLEAR_EDITOR_COMMAND"),gn=/* @__PURE__ */Te("CLEAR_HISTORY_COMMAND"),_n=/* @__PURE__ */Te("CAN_REDO_COMMAND"),pn=/* @__PURE__ */Te("CAN_UNDO_COMMAND"),mn=/* @__PURE__ */Te("FOCUS_COMMAND"),yn=/* @__PURE__ */Te("BLUR_COMMAND"),xn=/* @__PURE__ */Te("KEY_MODIFIER_COMMAND");function Cn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const s=()=>{const t=e.get(n);t&&t.holders.delete(s)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(s),s}}}function Sn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Tn=Object.freeze({}),Nn=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Pn(n);if(e.isComposing())return;Bi(e,We,t)}],["pointerdown",function(t,e){const n=Cl(t),o=t.pointerType;Tl(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&is(e,()=>{Hl(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Bi(e,be,t)}],["compositionend",function(t,e){const n=e._inputState;s?n.compositionPhase="ending-firefox":l||!a&&!d?Bi(e,Me,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Pn(n),is(e,()=>{Rn(t,e)||e.dispatchCommand(Oe,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){is(e,()=>{const n=pr(),o=rl(Gi(e)),r=mr();if(o)if(jo(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!gs(e)&&1===mi().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=gl(o,e._rootElement).anchorNode;if(Sl(n)||ti(n)){yi(_r(r,o,e,t))}}if(s&&null!==o&&0===o.rangeCount){const n=e._rootElement;if(null!==n&&t.target===n){const s=t.clientY;let i=n.childNodes.length;for(let t=0;tfunction(t,e){const n=t.inputType;if("deleteCompositionText"===n||s&&Ki(e))return;if("insertCompositionText"===n)return;is(e,()=>{Rn(t,e)||Bi(e,ke,t)},{event:t})}(t,e)]);const vn=new WeakMap,En=new WeakMap,kn=Cn(t=>(t.addEventListener("selectionchange",Yn),()=>t.removeEventListener("selectionchange",Yn)));function On(t,e,n,o,r,s){const l=t.anchor,c=t.focus,a=l.getNode(),u=jr();let f;if(void 0!==s)f=s;else{const t=rl(Gi(u));f=null!==t?gl(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!wo(a)||(!r&&(!i||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!i)&&null!==g&&!a.isComposing()&&d!==Il(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Qs(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(wo(e)||as(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function bn(t,e){return ti(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Mn(e,n,o){const{anchorNode:r,anchorOffset:s,focusNode:i,focusOffset:l}=gl(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,bn(r,s)&&bn(i,l)&&!c.postDeleteSelectionToRestore)||is(n,()=>{if(!o)return void yi(null);if(!Js(n,r,i))return;let a=pr();if(c.postDeleteSelectionToRestore&&jo(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),yi(a))}if(c.postDeleteSelectionToRestore=null,jo(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===i&&(a.dirty=!0);const s=Gi(n).event,l=s?s.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=mi(),m=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)An(a,f,d);else if("text"===o.type)wo(u)||t(141),Dn(a,u);else if("element"===o.type&&!m){as(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();An(t,n,o)}(a,e):An(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,i=a.isBackward(),c=i?l:s,u=i?s:l,f=i?e:t,d=i?t:e;let h=2047,g=!1;for(let t=0;tPn(t),0)}function Rn(t,e){const n=Cl(t);if(Sl(n)&&Hl(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=xl(o.ownerDocument);return null!==r&&o.contains(r)&&Hl(r,e)}function Ln(e){const n=e.inputType,o=wn(e),r=jr(),s=r._inputState,i=pr();if("insertText"===n&&e.data&&s.isInsertTextAfterHandledSelectionCommand){if(Pn(s),e.preventDefault(),jo(i)&&!i.isCollapsed()){const t=i.isBackward()?i.anchor:i.focus;i.anchor.set(t.key,t.offset,t.type),i.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===i){const t=mr();if(!jo(t))return!0;yi(t.clone())}if(jo(i)){const n=i.anchor.key===i.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{is(r,()=>{ci(null)})},30),jo(i)){const e=i.anchor.getNode();e.markDirty(),wo(e)||t(142),Dn(i,e)}}else{if(ci(null),l&&null!==o&&!o.collapsed&&(i.applyDOMRange(o),!i.isCollapsed()))return e.preventDefault(),i.removeText(),!0;e.preventDefault();const t=i.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===i.anchor.offset&&i.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&i.isCollapsed()&&(d=!ds(Li(i.anchor,!0))),!d){Bi(r,Ae,!0);const t=pr();f&&jo(t)&&t.isCollapsed()&&(s.postDeleteSelectionToRestore=t,setTimeout(()=>s.postDeleteSelectionToRestore=null))}}return!0}}if(!jo(i))return!0;const c=e.data;null!==s.unprocessedBeforeInputData&&Ei(!1,r,s.unprocessedBeforeInputData),i.dirty&&null===s.unprocessedBeforeInputData||!i.isCollapsed()||gs(i.anchor.getNode())||null===o||i.applyDOMRange(o),s.unprocessedBeforeInputData=null;const a=i.anchor,u=i.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Bi(r,De,!1);else if(c===v)e.preventDefault(),Bi(r,we);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(t)}else null!=c&&On(i,o,c,e.timeStamp,!0)?(e.preventDefault(),Bi(r,Ie,c),In(c)):s.unprocessedBeforeInputData=c;return s.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bi(r,Ie,e);In((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=s.hadOrphanedCompositionEvents;s.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;ci(null),t||Bi(r,Ie,e),zn(n);break}case"insertLineBreak":ci(null),Bi(r,De,!1);break;case"insertParagraph":ci(null),s.isInsertLineBreak&&!l?(s.isInsertLineBreak=!1,Bi(r,De,!1)):Bi(r,we);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bi(r,Pe,e);break;case"deleteByComposition":(function(t,e){return t!==e||as(t)||as(e)||!Qs(t)||!Qs(e)})(d,h)&&Bi(r,Fe,e);break;case"deleteByDrag":Ui(lo),Bi(r,Fe,e);break;case"deleteByCut":Bi(r,Fe,e);break;case"deleteContent":Bi(r,Ae,!1);break;case"deleteWordBackward":Bi(r,Re,!0);break;case"deleteWordForward":Bi(r,Re,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bi(r,Le,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bi(r,Le,!1);break;case"formatStrikeThrough":Bi(r,Ke,"strikethrough");break;case"formatBold":Bi(r,Ke,"bold");break;case"formatItalic":Bi(r,Ke,"italic");break;case"formatUnderline":Bi(r,Ke,"underline");break;case"historyUndo":Bi(r,$e);break;case"historyRedo":Bi(r,ze)}return!0}function Kn(t){const e=jr(),n=e._inputState,o=pr(),r=t.data,l=wn(t);let c=!1;if(null!=r&&jo(o)){const a=rl(Gi(e)),u=null!==a?gl(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&wo(h)&&Zs(h);if(!d&&!g&&On(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=Wn(e,r);if(n.compositionPhase="idle",t)return Ui(ao),xi(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;i&&!o.isCollapsed()&&wo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===vi(u.anchorNode)||Bi(e,Ie,r);const _=r.length;s&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,ci(null))}}if(!c){Ei(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(Wn(e,r||void 0),Ui(ao),n.compositionPhase="idle")}return xi(),!0}function Bn(t){const e=jr(),n=e._inputState,o=pr();if(jo(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,s=o.anchor.getNode();if(ci(r.key),Ui(co),t.timeStamp{Wn(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return Ai(t,"ArrowRight",{shiftKey:"any"})}(t))Bi(e,Ue,t);else if(function(t){return Ai(t,"ArrowRight",{...Di,shiftKey:"any"})}(t))Bi(e,He,t);else if(function(t){return Ai(t,"ArrowLeft",{shiftKey:"any"})}(t))Bi(e,je,t);else if(function(t){return Ai(t,"ArrowLeft",{...Di,shiftKey:"any"})}(t))Bi(e,Ye,t);else if(function(t){return Ai(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Bi(e,Ge,t);else if(function(t){return Ai(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Bi(e,Je,t);else if(function(t){return Ai(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Bi(e,Ve,t);else if(function(t){return" "===t.key}(t))Bi(e,qe,t);else if(function(t){return r&&Ai(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Bi(e,De,!0);else if(function(t){return Ai(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Bi(e,Ve,t);else if(function(t){return Ai(t,"Backspace",{shiftKey:"any"})||r&&Ai(t,"h",{ctrlKey:!0})}(t))Ii(t)?Bi(e,Xe,t)&&Fn(n):(t.preventDefault(),Bi(e,Ae,!0));else if(function(t){return"Escape"===t.key}(t))Bi(e,Qe,t);else if(function(t){return Ai(t,"Delete",{})||r&&Ai(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Bi(e,Ae,!1)):Bi(e,Ze,t);else if(function(t){return Ai(t,"Backspace",wi)}(t))t.preventDefault(),Bi(e,Re,!0);else if(function(t){return Ai(t,"Delete",wi)}(t))t.preventDefault(),Bi(e,Re,!1);else if(function(t){return r&&Ai(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Bi(e,Le,!0);else if(function(t){return r&&(Ai(t,"Delete",{metaKey:!0})||Ai(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Bi(e,Le,!1);else if(function(t){return Ai(t,"b",Di)}(t))t.preventDefault(),Bi(e,Ke,"bold");else if(function(t){return Ai(t,"u",Di)}(t))t.preventDefault(),Bi(e,Ke,"underline");else if(function(t){return Ai(t,"i",Di)}(t))t.preventDefault(),Bi(e,Ke,"italic");else if(function(t){return Ai(t,"Tab",{shiftKey:"any"})}(t))Bi(e,tn,t);else if(function(t){return Ai(t,"z",Di)}(t))t.preventDefault(),Bi(e,$e);else if(function(t){if(r)return Ai(t,"z",{metaKey:!0,shiftKey:!0});return Ai(t,"y",{ctrlKey:!0})||Ai(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Bi(e,ze);else{const o=e._editorState._selection;!function(t){return Ai(t,"a",Di)}(t)?null===o||jo(o)||(!function(t){return Ai(t,"c",Di)}(t)?function(t){return Ai(t,"x",Di)}(t)&&(t.preventDefault(),Bi(e,fn,t)):(t.preventDefault(),Bi(e,un,t))):(t.preventDefault(),Bi(e,dn,t)&&Fn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(xn,t),!0}function Hn(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const jn=new Map;function Yn(t){const e=sl(t.target);if(null===e)return;const n=Wi(t.target);let o=null,r=null;const s=null!==n?En.get(n):void 0;if(null!==n){if(void 0!==s){const t=s.editors;let n=s.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&il(e._rootElement.getRootNode())){n=!0;break}s.hasShadowEditor=n}if(n){let n=null,s=null;for(const i of t){const t=i._rootElement;if(null===t)continue;const l=gl(e,t).anchorNode;if(null!==l&&qs(l)===i){if(il(t.getRootNode())){o=i,r=l;break}null===n&&(n=i,s=l)}}null===o&&null!==n&&(o=n,r=s)}else{const t=e.anchorNode;null===t||Sl(t)&&null!==t.shadowRoot||(o=qs(t),null!==o&&(r=t))}}if(null===o){const t=xl(n);o=null!==t?qs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==s)for(const t of s.editors)t._inputState.isSelectionChangeFromMouseDown=!1;is(o,()=>{const n=mr(),s=r??gl(e,o._rootElement).anchorNode;if(Sl(s)||ti(s)){yi(_r(n,e,o,t))}})}const i=Ti(o),l=i[i.length-1],c=l._key,a=jn.get(c),u=a||l;u!==o&&Mn(e,u,!1),Mn(e,o,!0),o!==l?jn.set(c,o):a&&jn.delete(c)}function Gn(t){t._lexicalHandled=!0}function Jn(t){return!0===t._lexicalHandled}const Vn=()=>{};function qn(e){const n=vn.get(e);if(void 0===n)return void Vn();const o=En.get(n);if(void 0===o)return void Vn();vn.delete(e);const r=Xs(e);Vs(r)?(!function(t){if(null!==t._parentEditor){const e=Ti(t),n=e[e.length-1]._key;jn.get(n)===t&&jn.delete(n)}else jn.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const s=Hn(e);for(let t=0;tt.__key===this.__key);if(wo(this))return n;if(jo(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(ds(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:ui(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Xi(n)||null!==nc(e))return as(e)||e===this&&ds(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:ui(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:ui(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=as(this)?this:this.getParent(),n=as(t)?t:t.getParent(),o=e&&n?Zc(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Zc(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===qc(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return ji(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let s=this;for(;null!==s;){const i=s.__key;if(r.has(i)||(r.add(i),o.push(s)),s===e)break;const l=as(s)?n?s.getFirstChild():s.getLastChild():null;if(null!==l){s=l;continue}const c=n?s.getNextSibling():s.getPreviousSibling();if(null!==c){s=c;continue}const a=s.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);s=u}return n||o.reverse(),o}isDirty(){const t=jr()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(Zn(this))return this;const e=ui(this.__key);return null===e&&t(113),e}getWritable(){if(Zn(this))return this;Wr();const t=Hr(),e=jr(),n=t._nodeMap,o=this.__key,r=this.getLatest(),s=e._cloneNotNeeded,i=pr();if(null!==i&&i.setCachedNodes(null),s.has(o))return li(r),r;const l=Ll(r);return s.add(o),li(l),n.set(o,l),l}getTextContent(){return _c(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new B(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of gt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&ht(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){Xn(this,!0,t)}replace(e,n){Wr();let o=pr();null!==o&&(o=o.clone()),tl(this,e);const r=this.getLatest(),s=this.__key,i=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;si(l),null!==u&&jo(o)&&yr(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(Xn(r,!1,!0),null===d)c.__first=i;else{d.getWritable().__next=i}if(l.__prev=g,null===h)c.__last=i;else{h.getWritable().__prev=i}l.__next=_,l.__parent=p,c.__size=a;let m=0;n&&(as(this)&&as(l)||t(139),m=l.getChildrenSize(),l.splice(m,0,this.getChildren()));const y=lc(this);if(y.length>0){tc(this)&&tc(l)||t(368,this.__key,l.__key);for(const t of y){const e=cc(this,t);null!==e&&(xc(this,t),yc(l,t,e))}}if(jo(o)){yi(o);const t=o.anchor,e=o.focus;t.key===s&&(n&&"element"===t.type?t.set(l.__key,m+t.offset,"element"):$o(t,l)),e.key===s&&(n&&"element"===e.type?e.set(l.__key,m+e.offset,"element"):$o(e,l))}return ai()===s&&ci(i),l}insertAfter(t,e=!0){Wr(),tl(this,t);const n=this.getWritable(),o=t.getWritable();Cc(this.getParentOrThrow());const r=o.getParent(),s=pr();let i=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(jo(s)){const t=r.__key,e=s.anchor,o=s.focus;i="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}si(o),e&&jo(s)&&yr(s,r,n,-1)}else si(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&jo(s)){const t=this.getIndexWithinParent();yr(s,a,t+1);const e=a.__key;i&&s.anchor.set(e,t+2,"element"),l&&s.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){Wr(),tl(this,t);const n=this.getWritable(),o=t.getWritable();Cc(this.getParentOrThrow());const r=o.__key,s=pr(),i=o.getParent(),l=null!==i?o.getIndexWithinParent():-1;si(o),null!==i&&e&&jo(s)&&yr(s,i,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&jo(s)){yr(s,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return Ms()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){Wr();const n=oc(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(as(o))return o.select();if(!wo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){Wr();const n=oc(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(as(o))return o.select(0,0);if(!wo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function no(t){return t instanceof eo}const oo="history-merge",ro="collaboration",so="skip-scroll-into-view",io="skip-dom-selection",lo="skip-selection-focus",co="composition-start",ao="composition-end",uo="!important";function fo(t){const e={};if(!t)return e;let n="",o="",r=null,s=!1,i=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===uo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function go(t,e,n=""){if(e===n)return;const o=fo(n),r=fo(e);for(const e in r)delete o[e],ho(t,e,r[e]);for(const e in o)t.removeProperty(e)}function _o(t,e){return 16&e?"code":e&p?"mark":32&e?"sub":64&e?"sup":null}function po(t,e){return 1&e?"strong":2&e?"em":"span"}function mo(t,e,n,o,r){const s=o.classList;let i=Pi(r,"base");void 0!==i&&s.add(...i),i=Pi(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==i&&(8&n&&4&n?(l=!0,c||s.add(...i)):c&&s.remove(...i));for(const t in A){const o=A[t];if(i=Pi(r,t),void 0!==i)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&s.remove(...i);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&s.add(...i)}else e&o&&s.remove(...i)}}function yo(t,e,n){const o=n.isComposing(),r=t+(o?N:""),i=Ml(),l=Al(i).$getDOMSlot(n,e,i),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(fl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(true||o||s){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,s=0;for(;r({conversion:Oo,priority:0}),b:()=>({conversion:vo,priority:0}),code:()=>({conversion:Ao,priority:0}),em:()=>({conversion:Ao,priority:0}),i:()=>({conversion:Ao,priority:0}),mark:()=>({conversion:Ao,priority:0}),s:()=>({conversion:Ao,priority:0}),span:()=>({conversion:No,priority:0}),strong:()=>({conversion:Ao,priority:0}),sub:()=>({conversion:Ao,priority:0}),sup:()=>({conversion:Ao,priority:0}),u:()=>({conversion:Ao,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",e){super(e),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return F[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===ai()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const e=A[t];return 0!==(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(t,e){return oi(this.getLatest().__format,t,e)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,e){const n=this.__format,o=_o(0,n),r=po(0,n),s=null===o?r:o,i=fl().createElement(s);let l=i;this.hasFormat("code")&&i.setAttribute("spellcheck","false"),null!==o&&(l=fl().createElement(r),i.appendChild(l));xo(l,this,0,n,this.__text,t);const c=this.__style;return""!==c&&go(i.style,c),i}updateDOM(e,n,o){const r=this.__text,s=e.__format,i=this.__format,l=_o(0,s),c=_o(0,i),a=po(0,s),u=po(0,i);if((null===l?a:l)!==(null===c?u:c))return!0;if(l===c&&a!==u){const e=n.firstChild;null==e&&t(48);const s=fl().createElement(u);return xo(s,this,0,i,r,o),n.replaceChild(s,e),!1}let f=n;null!==c&&null!==l&&(f=n.firstChild,null==f&&t(49)),yo(r,f,this);const d=o.theme.text;void 0!==d&&s!==i&&mo(0,s,i,f,d);const h=e.__style,g=this.__style;return h!==g&&go(n.style,g,h),!1}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return Sl(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Co(n,"b")),this.hasFormat("italic")&&(n=Co(n,"i")),this.hasFormat("strikethrough")&&(n=Co(n,"s")),this.hasFormat("underline")&&(n=Co(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?A[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?D[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=oi(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=P[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){Wr();let n=t,o=e;const r=pr(),s=this.getTextContent(),i=this.__key;if("string"==typeof s){const t=s.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!jo(r))return dr(i,n,i,o,"text","text");{const t=ai();t!==r.anchor.key&&t!==r.focus.key||ci(i),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),s=r.__text,i=n.length;let l=t;l<0&&(l=i+l,l<0&&(l=0));const c=pr();if(o&&jo(c)){const e=t+i;c.setTextNodeRange(r,e,r,e)}const a=s.slice(0,l)+n+s.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Wr();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=ai(),s=n.length;t.sort((t,e)=>t-e),t.push(s);const i=[],l=t.length;for(let e=0,o=0;ee&&(i.push(n.slice(e,r)),e=r)}const c=i.length;if(1===c)return[e];const a=i[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,m=null;const y=pr();if(jo(y)){const[t,e]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(m=e)}e.isSegmented()?(f=Do(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=xt(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=T&&(p.set(t.getKey(),C-T,"text"),C=T){m.set(t.getKey(),S-T,"text");break}T=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&li(e);null!==n&&li(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),jo(y)&&yr(y,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,s=this.__text,i=s.length;ai()===r&&ci(o);const l=pr();if(jo(l)){const t=l.anchor,s=l.focus;null!==t&&t.key===r&&Sr(t,n,o,e,i),null!==s&&s.key===r&&Sr(s,n,o,e,i)}const c=e.__text,a=n?c+s:s+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function No(t){return{forChild:Io(t.style),node:null}}function vo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Io(e.style,n?void 0:"bold"),node:null}}const Eo=new WeakMap;function ko(t){if(!Sl(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Oo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Eo.get(n))&&!ko(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=bo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Do(o)}}function bo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,Sl(n)){const t=n.style.display;if(""===t&&!El(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(ti(n))return n;if("BR"===n.nodeName)return null}}const Mo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ao(t){const e=Mo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Io(t.style,e),node:null}}function Do(t=""){return Zi(new To(t))}function wo(t){return t instanceof To}function Io(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,s=o.includes("line-through"),i="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>wo(t)||So(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),s&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),i&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Po extends To{$config(){return this.config("tab",{extends:To})}constructor(t=void 0){super("\t",t),this.__detail=2}createDOM(t){const e=super.createDOM(t),n=Pi(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Fo(){return Zi(new Po)}function Ro(t){return t instanceof Po}class Lo{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!as(e)){const t=e.getNextSibling();if(wo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function $o(t,e){if(as(e)){const n=e.getLastDescendant();as(n)||wo(n)?Bo(t,n):Bo(t,e)}else Bo(t,e)}function zo(t,e,n,o){const r=t.getNode(),s=r.getChildAtIndex(t.offset),i=Do();if(i.setFormat(n),i.setStyle(o),As(s))s.splice(0,0,[i]);else if(null!==s){const t=Xi(r)?Ms().append(i):i;s.insertBefore(t)}else if(Xi(r)){const t=r.getLastChild();as(t)&&!t.isInline()&&t.isEmpty()?t.append(i):r.append(Ms().append(i))}else r.append(i);t.is(e)&&e.set(i.__key,0,"text"),t.set(i.__key,0,"text")}function Wo(e,n,o,r){const s=e.anchor.getNode();wo(s)||t(398);const i=e.anchor.offset,l=Do(n);l.setFormat(o),l.setStyle(r);const c=s.getParentOrThrow();if(0===i)c.isInline()&&!s.__prev?c.insertBefore(l):s.insertBefore(l,!1);else if(i===s.getTextContentSize())c.isInline()&&!s.__next?c.insertAfter(l):s.insertAfter(l,!1);else{const[t]=s.splitText(i);t.insertAfter(l,!1)}""===s.getTextContent()&&s.isAttached()&&s.remove(),l.selectEnd(),l.isComposing()&&"text"===e.anchor.type&&e.anchor.set(e.anchor.key,e.anchor.offset-n.length,e.anchor.type)}class Uo{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Go(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Uo(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===nc(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(wo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===nc(t));if((pr()||mr())===this&&t[0]){const e=Rc(t[0],"next");na(Gc(e,e))}for(const e of t)e.remove();Ho()}}function Ho(){const t=mi();if(t.isEmpty()){const e=Ms();t.append(e),e.select()}}function jo(t){return t instanceof Yo}class Yo{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!jo(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,s=new Set;for(const n of t)if(wc(n)){const{origin:t}=n;0===e.length?r.add(t):(s.add(t),e.push(t))}else{const{origin:t}=n;as(t)&&s.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(Dc(t.focus)&&as(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=$c(t.focus.origin,"previous");wc(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Wc(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!as(t)||s.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=aa(t.anchor),o=aa(t.anchor.getFlipped()),r=t=>Ac(t)?t.origin:t.getNodeAtCaret(),s=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(s)}return e}(da(ra(this),"next"));return zr()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,s=o.isBefore(r),[i,l]=Xo(this);let c="",a=!0;for(let u=0;u(as(t)||ds(t))&&!t.isInline())){as(r)||t(211,o.constructor.name,o.getType());const n=br(this);return r.splice(n,0,e),void s.selectEnd()}if(as(r)&&null!==nc(r)){const t=br(this),n=Or(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=Dr(e),n=t.getLastDescendant();let o=ta(this.anchor,"next");for(const e of t.getChildren())o=ma(e,o);return void(null!==n&&n.selectEnd())}if(as(r)&&!r.isParentRequired()&&!Xi(r.getParentOrThrow())){const t=br(this),n=Or(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const i=Dr(e),l=i.getLastDescendant(),c=i.getChildren(),a=!as(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=ql(o,bl));const u=c[c.length-1];let f=c[0];var d;as(d=f)&&bl(d)&&!d.isEmpty()&&as(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(as(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const s=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),s.push(r);let i=e;for(const t of s)i=i.insertAfter(t)}(r,f));const h=ql(l,bl);a&&as(h)&&(a.canMergeWhenEmpty()||bl(u))&&(h.append(...a.getChildren()),a.remove()),as(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=as(r)?r.getLastChild():null;Ns(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Xi(e)){const t=Ms();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=br(this),o=ql(this.anchor.getNode(),bl);if(null!==o&&null!==nc(o))return null;as(o)||t(213);const r=o.getChildAtIndex(n),s=r?[r,...r.getNextSiblings()]:[],i=o.insertNewAfter(this,!1);return i?(i.append(...s),i.selectStart(),i):null}insertLineBreak(t){const e=Ts();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,s]=Xo(this),i=this.isBackward(),[l,c]=i?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=i?[s,r]:[r,s];if(0===e)return[];if(1===e){if(wo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(wo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),wo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(wr(this,t,e,n))return;const o="move"===t,r=jr(),s=rl(Gi(r));if(!s)return;const i=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===i||!as(c)||c.isInline()||c.canBeEmpty()||ol(i,r,l);const a=$i(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=wo(c)?Il(c,a,r):null),this.dirty){const t=$i(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=wo(n)?Il(n,t,r):null}e&&u&&Tr(s,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&wo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Rc(c,e?"previous":"next").getNodeAtCaret();if(wo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?Il(t,n,r):null;if(o){const t=e?o.length:0;Tr(s,o,t,o,t)}}}}}if(tr(s,t,e?"backward":"forward",n),s.rangeCount>0){const t=dl(s,r._rootElement),n=t||s.getRangeAt(0),i=this.anchor.getNode(),l=gs(i)?i:Vi(i);if(this.applyDOMRange(n),this.dirty=!0,!o){er(this,e,l);(t?"backward"!==s.direction:s.anchorNode===n.startContainer&&s.anchorOffset===n.startOffset)||Zo(this)}}"lineboundary"===n&&wr(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&as(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(as(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=jc(ta(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(wc(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(as(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=aa(e);oa(this,Gc(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(Dc(e)){if(as(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(ds(e.origin)){if(e.origin.isIsolated());else if(lc(e.origin).length>0){if(as(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=gr();t.add(e.origin.getKey()),yi(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&as(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=gr();t.add(e.origin.getKey()),yi(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(lc(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(oa(this,Gc(!e.origin.isEmpty()&&n.isEmpty()?sa(Rc(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==nc(t))return;if(as(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(nr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&Qo(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,s=o.getTextContentSize();if(o.is(n)||t&&e!==s||!t&&0!==e)return void rr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,s=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==s)return void rr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),s=o.getNode();if(r===s&&"text"===n.type&&"text"===o.type){const t=n.offset,s=o.offset,i=t0&&(g===h.getTextContentSize()||Zs(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;toi(t,e,o))}function qo(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function Xo(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[qo(n),qo(o)]}function Qo(t,e){for(let n=e;n;n=n.getParent()){if(as(n)){if(n.collapseAtStart(t))return!0;if(Xi(n))break}if(n.getPreviousSibling())break}return!1}function Zo(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,s=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,s,!0)}function tr(t,e,n,o){t.modify(e,n,o)}function er(t,e,n){const o=t.getNodes(),r=o.filter(t=>ji(t,n));if(0===r.length||r.length===o.length)return!1;const s=e?r[0]:r[r.length-1],i=as(s)?s:s.getParentOrThrow();return e?i.selectStart():i.selectEnd(),!0}function nr(t,e,n){if(wr(t,"extend",e,n))return;const o=jr(),r=rl(Gi(o));if(!r||"function"!=typeof r.modify)return;const s=o._blockCursorElement,i=o._rootElement,l=t.anchor,c=t.focus.getNode();null===i||null===s||!as(c)||c.isInline()||c.canBeEmpty()||ol(s,o,i);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&wo(e)?Il(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Tr(r,_,p,_,p),tr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const m=dl(r,i)||r.getRangeAt(0),y=m.startContainer,x=m.startOffset;if(h&&"character"===n&&"text"===l.type&&wo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Rc(u,e?"previous":"next").getNodeAtCaret();if(wo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=y===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,T,N]=e?[y,x,f,d]:[f,d,y,x],v=gs(u)?u:Vi(u);t.applyDOMRange({collapsed:!1,endContainer:T,endOffset:N,startContainer:C,startOffset:S}),t.dirty=!0,!er(t,e,v)&&e&&Zo(t),"lineboundary"===n&&wr(t,"extend",e,n,"decorators")}const or=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function rr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),s=r.length;let i=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function sr(e,n,o,r){let s,i=n,l=!1;if(Sl(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;i===u&&u>0&&(c=!0,i=u-1),void 0!==hi(e,r)||Hl(e,r)||(l=!0);let d=a[i],h=!1;if(d===f)d=a[i+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&i--}}if(s=Ci(d),wo(s))i=Kc(s,c?"next":"previous");else{let a=Ci(e);if(null===a)return null;if(as(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=Dl(a,l,r);[a,i]=u.resolveChildIndex(a,l,e,n),as(a)||t(215),c&&i>=a.getChildrenSize()&&(i=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(i);if(as(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=as(f)?f:f.getParentOrThrow()),i=0}wo(f)?(s=f,a=null,i=Kc(f,c?"next":"previous")):f!==a&&c&&!h&&(as(a)||t(216),i=Math.min(a.getChildrenSize(),i+1))}else{const t=oc(a),o=null!==t?t:a,s=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&Ci(e)===a){const t=Dl(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&ds(a)&&(c="before")}i="before"===c?s:s+1,a=o.getParentOrThrow()}if(as(a))return[Ko(a.__key,i,"element"),l]}}else s=Ci(e);return wo(s)?[Ko(s.__key,Kc(s,i,"clamp"),"text"),l]:null}function ir(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),s=r.getParent();if(e){if((n||!e)&&null===o&&as(s)&&s.isInline()){const e=s.getPreviousSibling();wo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else as(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):wo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),s=r.getParent();if(e&&as(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&as(s)&&s.isInline()&&!s.canInsertTextAfter()&&s.getTextContentSize()>1){const e=s.getNextSibling();wo(e)&&t.set(e.__key,0,"text")}}}function lr(t){const e=ui(t.key);return null===e?null:sc(e)}function cr(t,e,n){const o=lr(t),r=lr(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const s=n(o,r);if(null!==o)return as(o)?e.set(o.getKey(),s?o.getChildrenSize():0,"element"):e.set(o.getKey(),s?o.getTextContentSize():0,"text"),!0;const i=oc(r);if(null===i)return!1;const l=i.getParent();if(null===l)return!1;const c=i.getIndexWithinParent();return e.set(l.getKey(),s?c+1:c,"element"),!0}function ar(t){const e=cr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=oc(n),e=oc(o);if(null!==t&&t.is(e)){for(const e of ic(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=oc(n),o=ui(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=oc(o),s=ui(t.key);return null!==r&&null!==s&&!r.is(s)&&!r.isParentOf(s)&&s.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function ur(t,e,n,o,r,s){if(null===t||null===n||!Js(r,t,n))return null;const i=sr(t,e,jo(s)?s.anchor:null,r);if(null===i)return null;const l=sr(n,o,jo(s)?s.focus:null,r);if(null===l)return null;const[c,a]=i,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=Ci(t),o=Ci(n);if(ds(e)&&ds(o))return null}const d=r._slotsUsed&&cr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return function(t,e){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);ir(t,n,o),ir(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}(c,u),[c,u,a||f||d]}function fr(t){return as(t)&&!t.isInline()}function dr(t,e,n,o,r,s){const i=Hr(),l=new Yo(Ko(t,e,r),Ko(n,o,s),0,"");return l.dirty=!0,i._selection=l,l}function hr(){const t=Ko("root",0,"element"),e=Ko("root",0,"element");return new Yo(t,e,0,"")}function gr(){return new Uo(new Set)}function _r(t,e,n,o){const r=n._window;if(null===r)return null;const s=o||r.event,i=s?s.type:void 0,l="selectionchange"===i,c=!q&&(l||"beforeinput"===i||"compositionstart"===i||"compositionend"===i||"click"===i&&s&&3===s.detail||"drop"===i||void 0===i);let a,u,f,d;if(jo(t)&&!c)return t.clone();{if(null===e)return null;const o=gl(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===i)&&jo(t)&&!Js(n,a,u))return t.clone()}const h=ur(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let m=0,y="";if(jo(t)){const e=t.anchor;if(g.key===e.key)m=t.format,y=t.style;else{const t=g.getNode();wo(t)?(m=t.getFormat(),y=t.getStyle()):as(t)&&(m=t.getTextFormat(),y=t.getTextStyle())}}const x=new Yo(g,_,m,y);return p&&(x.dirty=!0),x}function pr(){return Hr()._selection}function mr(){return jr()._editorState._selection}function yr(t,e,n,o=1){const r=t.anchor,s=t.focus,i=r.getNode(),l=s.getNode();if(!e.is(i)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,i=r?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(wo(i)){let t=0;r&&(t=i.getTextContentSize()),e.set(i.__key,t,"text"),o.set(i.__key,t,"text")}return}if(as(s)){const t=s.getChildrenSize(),o=n>=t,r=o?s.getChildAtIndex(t-1):s.getChildAtIndex(n);if(wo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(as(i)){const t=i.getChildrenSize(),e=r>=t,n=e?i.getChildAtIndex(t-1):i.getChildAtIndex(r);if(wo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Cr(t,e,n,o,r){let s=null,i=0,l=null;null!==o?(s=o.__key,wo(o)?(i=o.getTextContentSize(),l="text"):as(o)&&(i=o.getChildrenSize(),l="element")):null!==r&&(s=r.__key,wo(r)?l="text":as(r)&&(l="element")),null!==s&&null!==l?t.set(s,i,l):(i=e.getIndexWithinParent(),-1===i&&(i=n.getChildrenSize()),t.set(n.__key,i,"element"))}function Sr(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Tr(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Nr(t,e,n){const o=$i(t,e.getKey());if(as(e)){const r=Dl(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function vr(t,e,n,o,r,i){const l=i.getRootNode(),c=ei(l)||il(l)?xl(l):null;if(r.has(ro)&&c!==i||null!==c&&Ys(c,c))return;const a=gl(o,i);let u;if(!jo(e))return void(null!==t&&Js(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Nr(n,h,f.offset),[m,y]=Nr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let T=_,N=m,v=!1;if("text"===f.type?(T=wo(h)?Il(h,_,n):null,v=h.getFormat()!==x||h.getStyle()!==C):jo(t)&&"text"===t.anchor.type&&(v=!0),"text"===d.type&&(N=wo(g)?Il(g,m,n):null),null!==T&&null!==N){if(S&&(null===t||v||jo(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,s){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:s}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===y&&a.anchorNode===T&&a.focusNode===N){if(null===c||!i.contains(c)){const t=null!==c?qs(c):null;null!==t&&t!==n||r.has(lo)||i.focus({preventScroll:!0})}if("element"!==f.type)return}if(Tr(o,T,p,N,y),s&&e.isCollapsed()&&null!==i&&!r.has(lo)){const t=yl(i);if(null===t||!i.contains(t)){const t=xl(i.ownerDocument),e=null!==t?qs(t):null;null!==e&&e!==n||i.focus({preventScroll:!0})}}if(!r.has(so)&&e.isCollapsed()&&null!==i&&i===yl(i)){const t=jo(e)&&"element"===e.anchor.type?T.childNodes[p]||null:(void 0===u&&(u=hl(o,i)),u);if(null!==t){let e;if(ti(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=Wi(n),r=Yi(o);if(null===o||null===r)return;const s=n.getBoundingClientRect();if(e.bottoma&&(f=l-a),0!==f)if(e)r.scrollBy(0,f);else{const t=u.scrollTop;u.scrollTop+=f;const e=u.scrollTop-t;i-=e,l-=e}if(e)break;u=zi(u)}}(n,e,i)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Er(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function kr(t){const e=[];return Er(t,{linebreak:()=>e.push(Ts()),tab:()=>e.push(Fo()),text:t=>e.push(Do(t))}),e}function Or(t){const e=[];for(const n of t)Ns(n)||(!as(n)&&!ds(n)||n.isInline()?e.push(n):as(n)&&e.push(...Or(n.getChildren())));return e}function br(e){let n=e;e.isCollapsed()||n.removeText();const o=pr();jo(o)&&(n=o),jo(n)||t(161);const r=n.anchor;let s=r.getNode(),i=r.offset;for(;!bl(s)&&null===nc(s);){const t=s;if([s,i]=Mr(s,i),t.is(s))break}return i}function Mr(t,e){const n=t.getParent();if(!n){const t=Ms();return mi().append(t),t.select(),[mi(),0]}if(wo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!as(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new Yo(Ko(t.__key,e,"element"),Ko(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Ar(t){return Ns(t)||Ji(t)||wo(t)||t.isParentRequired()}function Dr(t){const e=Ms();let n=null;for(let o=0;o99&&t(14)}function Hr(){return null===Ir&&t(195,Gr()),Ir}function jr(){return null===Pr&&t(337,Gr()),Pr}function Yr(){jr()._dirtyType=2}function Gr(){let t=0;const e=new Set,n=Ks.version;if("undefined"!=typeof window)for(const o of al(document)){const r=Xs(o);if(Vs(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function Jr(){return Pr}function Vr(t,e,n){const o=e.__type,r=Us(t,o);let s=n.get(o);void 0===s&&(s=Array.from(r.transforms),n.set(o,s));const i=s.length;for(let t=0;t0&&os(t,t._deferred));const s=t._editorState,i=s._selection,l=n._selection,c=0!==t._dirtyType,a=Ir,u=Fr,f=Pr,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){Pr=t,Ir=n,Fr=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=Ce(s,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),Rr)throw e;return Is(t,null,o,n),st(t),t._dirtyType=2,Rr=!0,ts(t,s),void(Rr=!1)}finally{h.observe(o,$r),t._updating=d,Ir=a,Fr=u,Pr=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,m=t._normalizedNodes,y=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let s;for(s in o)r.has(s)||(o===n&&(o=_i(t)),delete o[s])}(t,n);const x=r?null:rl(Gi(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(i))&&null!==o&&!y.has(io)){Pr=t,Ir=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&ol(e,t,o),vr(i,l,t,x,y,o)}!function(t,e,n){let o=t._blockCursorElement;if(jo(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(yl(e))){const r=n.anchor,s=r.getNode(),i=r.offset;let l=!1,c=null;if(i===s.getChildrenSize()){nl(s.getChildAtIndex(i-1))&&(l=!0)}else{const e=s.getChildAtIndex(i);if(null!==e&&nl(e)){const n=e.getPreviousSibling();(null===n||nl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=Dl(s,t.getElementByKey(s.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=fl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=ya(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&ol(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,$r),Pr=f,Ir=a}}null!==g&&function(t,e,n,o,r){const s=Array.from(t._listeners.mutation),i=s.length;for(let t=0;t{Kr.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;ss(t,e,o)}}(t)}(t,e)}finally{Lr=n}}function es(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function ns(t,e,n,o){const r=Ti(t);let s;if(!Lr)for(let t=0;t=0;t--)for(let i=0;i0&&l._updating){s=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(is(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return s&&s.update(()=>{ns(s,e,n,o)}),!1}function os(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);wo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Tt(o),void 0!==o&&qr(o,s)&&Vr(e,o,i),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){Br++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&qr(c,s)&&Vr(e,c,i)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,Br++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),rs(e),function(t,e,n,o){const r=t._nodeMap,s=e._nodeMap,i=[];for(const[t]of o){const e=s.get(t);void 0!==e&&(e.isAttached()||(as(e)&&V(e,t,r,s,i,o),r.has(t)||o.delete(t),i.push(t)))}for(const t of n){const e=s.get(t);void 0===e||e.isAttached()||(tc(e)&&null!==e.__slots&&V(e,t,r,s,i,n),r.has(t)||n.delete(t),i.push(t))}for(const t of i)s.delete(t);const l=jr(),c=l._compositionKey;null===c||s.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const s=a._selection;if(jo(s)){e._slotsUsed&&ar(s);const n=a._nodeMap,o=s.anchor.key,r=s.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else Go(s)&&0===s._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void ts(e)}finally{Ir=f,Fr=d,Pr=h,e._updating=g,Br=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,ts(e)):u&&js(()=>{ts(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function is(t,e,n){Pr===t&&void 0===n?zr()?ss(t,e,n):e():ss(t,e,n)}function ls(t){if(Xi(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class cs extends eo{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:ls,extends:eo})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return I[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===lc(this).length}isDirty(){const t=jr()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of lc(this)){const n=cc(this,e);as(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(wo(e)&&t.push(e),as(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;as(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;as(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return as(t)&&t.getLastDescendant()||t||null}const o=e[t];return as(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:ui(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:ui(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=_c(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&w[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){Zn(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),s=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const i=s.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Xi(this)||this.getChildren().some(wo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=Dl(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function as(t){return t instanceof cs}function us(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class fs extends eo{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ds(t){return t instanceof fs}class hs extends cs{__cachedText;$config(){return this.config("root",{extends:cs})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!zr()&&0!==jr()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)as(e)||ds(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return mi().updateFromJSON(t)}collapseAtStart(){return!0}}function gs(t){return t instanceof hs}function _s(t){return new ys(G(t._nodeMap),null,t._slotsUsed)}function ps(){return new ys(new Map([["root",new hs]]),null,!1)}function ms(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),as(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const s=e.getChildren();for(let t=0;t0){const s={};for(const n of r){const r=cc(e,n);null===r&&t(366,o.name,n),s[n]=ms(r)}n.$slots=s}return n}class ys{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return Zr(e&&e.editor||null,this,t)}clone(t){const e=new ys(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return Zr(null,this,()=>({root:ms(mi())}))}}class xs extends cs{$config(){return this.config("artificial",{extends:cs})}createDOM(t){return fl().createElement("div")}}class Cs extends eo{$config(){return this.config("linebreak",{importDOM:{br:t=>vs(t)||Es(t)?null:{conversion:Ss,priority:0}}})}getTextContent(){return"\n"}createDOM(){return fl().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function Ss(t){return{node:Ts()}}function Ts(){return Zi(new Cs)}function Ns(t){return t instanceof Cs}function vs(t){const e=t.parentElement;if(null!==e&&Ol(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&ks(n))return!0}}return!1}function Es(t){const e=t.parentElement;if(null!==e&&Ol(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&ks(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&ks(o))return!0}return!1}function ks(t){return ti(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Os extends cs{$config(){return this.config("paragraph",{extends:cs,importDOM:{p:()=>({conversion:bs,priority:0})}})}createDOM(t){const e=fl().createElement("p"),n=Pi(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}exportDOM(t){const{element:e}=super.exportDOM(t);if(Sl(e)){this.isEmpty()&&e.append(fl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(wo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=Ms();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||wo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function bs(t){const e=Ms();if($l(e,t),Kl(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in w&&e.setFormat(n)}return Bl(e,t),{node:e}}function Ms(){return Zi(new Os)}function As(t){return t instanceof Os}function Ds(t){console.warn(t)}const ws=0;function Is(t,e,n,o,r){const s=t._keyToDOMMap;s.clear(),t._editorState=ps(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const i=t._observer;null!==i&&(i.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",s.set("root",n),di(n,t,"root"))}function Ps(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of Vl(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const Fs={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Hs(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>as(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>as(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function Rs(t,e){const n=t.get(e);t.delete(e),n&&n()}function Ls(t,e,n){return t.set(e,n),Rs.bind(null,t,e)}class Ks{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,s,i,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new J,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Ni(),this._onError=r,this._onWarn=s,this._htmlConversions=i,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return Ls(this._listeners.update,t)}registerEditableListener(t){return Ls(this._listeners.editable,t)}registerDecoratorListener(t){return Ls(this._listeners.decorator,t)}registerTextContentListener(t){return Ls(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return xa(Ls(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new j,new j,new j,new j,new j]);const s=r.get(e);void 0===s&&t(36,String(e));const i=function(t){return 7&t}(o),l=s[i];return i!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),s.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let s=r.get(e);void 0===s&&(s=new Set,r.set(e,s)),s.add(o);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(e,o),()=>{s.delete(o),0===s.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Rl(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Rl(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=ui(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:oo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,...e){return Bi(this,t,...e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Pi(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,Is(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||qn(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Yi(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,st(this),this._updateTags.add(oo),ts(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;vn.set(t,n);let o=En.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},En.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=Hn(t);r.push(kn.register(n));for(let n=0;n{Jn(t)||(Gn(t),(e.isEditable()||"click"===o)&&s(t,e))}:t=>{if(Jn(t))return;Gn(t);const n=e.isEditable();switch(o){case"cut":return n&&Bi(e,fn,t);case"copy":return Bi(e,un,t);case"paste":return n&&Bi(e,Pe,t);case"dragstart":return n&&Bi(e,ln,t);case"dragover":return n&&Bi(e,cn,t);case"dragend":return n&&Bi(e,an,t);case"focus":return n&&Bi(e,mn,t);case"blur":return n&&Bi(e,yn,t);case"drop":return n&&Bi(e,rn,t)}};r.push(Sn(t,o,i))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(oo),ts(this);es("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=_s(e),o._selection=e._selection?e._selection.clone():null),rt(this);const r=this._pendingEditorState,s=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=s&&this._updateTags.add(s),ts(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,is(this,()=>{if(s&&this._updateTags.add(s),e._parsed)for(const[t,e]of o._nodeMap.entries())as(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=ps(),r=Ir,s=Fr,i=Pr,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,Ir=o,Fr=!1,Pr=e,$s(null);try{const r=e._nodes;Qr(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,Ir=r,Fr=s,Pr=i}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&ts(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):ss(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),is(this,()=>{const o=pr(),r=mi();null!==o?o.dirty||yi(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Ui("focus"),Hi(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=rl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,es("editable",this,!0,t),this._slotsUsed&&this.update(()=>Yr()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Ks.version=H;let Bs=null;function $s(t){Bs=t}const zs=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let Ws=1;function Us(e,n){const o=Hs(e,n);return void 0===o&&t(30,n),o}function Hs(t,e){return t._nodes.get(e)}const js="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Ys(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return ei(e)||il(e)?xl(e):null})();if(!Sl(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=gi(n),r=n.nodeName;return no(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Xs(n))}const Gs=Ys;function Js(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return qs(e)===t&&t.read("latest",()=>!Ys(e))}function Vs(t){return t instanceof Ks}function qs(t){let e=t;for(;null!=e;){const t=Xs(e);if(Vs(t))return t;e=zi(e)}return null}function Xs(t){return t?t.__lexicalEditor:null}function Qs(t){return Ro(t)||t.isToken()}function Zs(t){return Qs(t)||t.isSegmented()}function ti(t){return Tl(t)&&3===t.nodeType}function ei(t){return Tl(t)&&9===t.nodeType}function ni(t){let e=t;for(;null!=e;){if(ti(e))return e;e=e.firstChild}return null}function oi(t,e,n){const o=A[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~A.superscript:"superscript"===e?r&=~A.subscript:"lowercase"===e?(r&=~A.uppercase,r&=~A.capitalize):"uppercase"===e?(r&=~A.lowercase,r&=~A.capitalize):"capitalize"===e&&(r&=~A.lowercase,r&=~A.uppercase),r}function ri(t,e){const n=function(){const t=Bs;return Bs=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);Wr(),Ur();const o=jr(),r=Hr(),s=""+Ws++;r._nodeMap.set(s,t),as(t)?o._dirtyElements.set(s,!0):o._dirtyLeaves.add(s),o._cloneNotNeeded.add(s),0===o._dirtyType&&(o._dirtyType=1),t.__key=s}function si(e){null!==nc(e)&&t(380,e.__key,String(nc(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),s=e.getNextSibling(),i=null!==s?s.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==s?s.getWritable():null;null===r&&(o.__first=i),null===s&&(o.__last=l),null!==c&&(c.__next=i),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const ii=si;function li(e){Ur(),Zn(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:ec(n)?n.__slotHost:null,r=Hr(),s=jr(),i=r._nodeMap,l=s._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:ec(t)?t.__slotHost:null}}(o,i,l);const c=n.__key;0===s._dirtyType&&(s._dirtyType=1),as(e)?l.set(c,!0):s._dirtyLeaves.add(c)}function ci(t){Wr();const e=jr(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=ui(n);null!==t&&t.getWritable()}if(null!==t){const e=ui(t);null!==e&&e.getWritable()}}}function ai(){if(zr())return null;return jr()._compositionKey}function ui(t,e){const n=(e||Hr())._nodeMap.get(t);return void 0===n?null:n}function fi(t,e){const n=hi(t,jr());return void 0!==n?ui(n,e):null}function di(t,e,n){t[`__lexicalKey_${e._key}`]=n}function hi(t,e){return t[`__lexicalKey_${e._key}`]}function gi(t,e){let n=t;for(;null!=n;){const t=fi(n,e);if(null!==t)return t;n=zi(n)}return null}function _i(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function pi(t){return t.read(()=>mi().getTextContent())}function mi(){return Hr()._nodeMap.get("root")}function yi(t){Wr();const e=Hr();null!==t&&(t.dirty=!0,t.setCachedNodes(null),jo(t)&&jr()._slotsUsed&&ar(t)),e._selection=t}function xi(){Wr();rt(jr())}function Ci(t){const e=function(t,e){let n=t;for(;null!=n;){const t=hi(n,e);if(void 0!==t)return t;n=zi(n)}return null}(t,jr());return null===e?null:ui(e)}function Si(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function Ti(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function Ni(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function vi(t){return ti(t)?t.nodeValue:null}function Ei(t,e,n){const o=rl(Gi(e));if(null===o)return;const r=gl(o,e._rootElement),s=r.anchorNode;let{anchorOffset:i,focusOffset:l}=r;if(null!==s){let e=vi(s);const o=gi(s);if(null!==e&&wo(o)){if((e===N||e===E)&&n){const t=n.length;e=n,i=t,l=t}null!==e&&ki(o,e,i,l,t)}}}function ki(t,e,n,o,r){let s=t;if(s.isAttached()&&(r||!s.isDirty())){const i=s.isComposing();if(s.isToken()&&i)return;let c=e;if((i||r)&&(e.endsWith(N)&&(c=e.slice(0,-N.length)),r)){const t=E;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=s.getTextContent();if(r||c!==u){const e=pr();if(""===c){if(ci(null),a||l||d)s.remove();else{const t=jr();Oi(s,"",e),setTimeout(()=>{t.update(()=>{s.isAttached()&&""===s.getTextContent()&&s.remove()})},20)}return}const r=s.getParent(),u=mr(),f=s.getTextContentSize(),h=ai(),g=s.getKey();if(s.isToken()&&!i||null!==h&&g===h&&!i||jo(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!s.canInsertTextBefore()&&!i||u.focus.key===t.__key&&u.focus.offset===f&&!s.canInsertTextAfter()&&!i))return void s.markDirty();if(!jo(e)||null===n||null===o)return void Oi(s,c,e);if(e.setTextNodeRange(s,n,s,o),s.isSegmented()){const t=Do(s.getTextContent());s.replace(t),s=t}Oi(s,c,e)}}}function Oi(t,e,n){if(t.setTextContent(e),jo(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const s=n[r];"text"===s.type&&s.key===e&&(s.offset=Kc(t,s.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function bi(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function Mi(t,e){return bi(t,e,"altKey")&&bi(t,e,"ctrlKey")&&bi(t,e,"shiftKey")&&bi(t,e,"metaKey")}function Ai(t,e,n){if(!Mi(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const Di={ctrlKey:!r,metaKey:r},wi={altKey:r,ctrlKey:!r};function Ii(t){return"Backspace"===t.key}function Pi(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=ya(r);return n[e]=t,t}return r}function Fi(e,n,o,r,s){if(0===o.size)return;const i=r.__type,l=r.__key,c=n.get(i);void 0===c&&t(33,i);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===s;(void 0===f||d)&&u.set(l,d?"updated":s)}function Ri(t,e,n){const o=t.getParent();let r=n,s=t;return null!==o&&(e&&0===n?(r=s.getIndexWithinParent(),s=o):e||n!==s.getChildrenSize()||(r=s.getIndexWithinParent()+1,s=o)),s.getChildAtIndex(e?r-1:r)}function Li(t,e){const n=t.offset;if("element"===t.type){return Ri(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Ri(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function Ki(t){const e=Gi(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Bi(t,e,...n){return ns(t,e,n[0],t)}function $i(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function zi(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return il(n)?n.host:null}function Wi(t){return ei(t)?t:Sl(t)?t.ownerDocument:null}function Ui(t){Wr();jr()._updateTags.add(t)}function Hi(t){Wr();jr()._deferred.push(t)}function ji(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Yi(t){const e=Wi(t);return e?e.defaultView:null}function Gi(e){const n=e._window;return null===n&&t(78),n}function Ji(t){return as(t)&&t.isInline()||ds(t)&&t.isInline()}function Vi(t){let e=t.getLatest();for(;null!==e;){if(null!==nc(e)&&as(e))return e;const t=e.getParentOrThrow();if(Xi(t))return t;e=t}return e}function qi(t){return as(t)&&t.isShadowRoot()}function Xi(t){return gs(t)||qi(t)}function Qi(t,e=!1){const n=t.constructor.clone(t,zs);return ri(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Zi(e){const n=jr(),o=e.getType(),r=Hs(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:s,replaceWithKlass:i}=r;if(null!==s){const n=s(e),r=n.constructor;return null!==i?n instanceof i||t(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function tl(e,n){!gs(e.getParent())||as(n)||ds(n)||t(99)}function el(e){const n=ui(e);return null===n&&t(63,e),n}function nl(t){if(!t||t.isInline())return!1;if(ds(t))return!0;if(as(t)){if(t.isShadowRoot()){const e=t.getParent();return!(as(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function ol(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function rl(t){return n?(t||window).getSelection():null}function sl(t){const e=Yi(t);return e?e.getSelection():null}function il(t){return Nl(t)&&"host"in t}const ll=[];function cl(t){const e=t.getRootNode();if(e===t||!il(e))return ll;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!il(t))break;n.push(t),o=t.host}return n}function*al(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(ei(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function ul(t){return null!==t?t.ownerDocument:document}function fl(){const t=Jr();return ul(null!==t?t._rootElement:null)}function dl(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=cl(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function hl(t,e){const n=dl(t,e);if(null!==n){const t=_l(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function gl(t,e){const n=dl(t,e);return null===n?t:pl(n,ml(t))}function _l(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function pl(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:s}=t;return"backward"===e?{anchorNode:r,anchorOffset:s,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:s}}function ml(t){return t.direction}function yl(t){const e=t.getRootNode();return ei(e)||il(e)?e.activeElement:null}function xl(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function Cl(t){const e=t.target;if(null!==e&&Sl(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function Sl(t){return Tl(t)&&1===t.nodeType}function Tl(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function Nl(t){return Tl(t)&&11===t.nodeType}const vl=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function El(t){return!(!Sl(t)||!t.style.display.startsWith("inline"))||vl.test(t.nodeName)}const kl=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Ol(t){return(!Sl(t)||!t.style.display.startsWith("inline"))&&kl.test(t.nodeName)}function bl(t){if(ds(t)&&!t.isInline())return!0;if(!as(t)||Xi(t))return!1;const e=t.getFirstChild(),n=null===e||Ns(e)||wo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function Ml(){return jr()}function Al(t=Ml()){return t._config.dom||Fs}function Dl(e,n,o=Ml()){const r=Al(o).$getDOMSlot(e,n,o);return as(e)&&(wl(r)||t(344,e.getKey(),e.getType())),r}function wl(t){return t instanceof z}function Il(t,e,n=Ml()){return ni(Dl(t,e,n).element)}const Pl=new WeakMap,Fl=new Map;function Rl(e){if(!e._readOnly&&e.isEmpty())return Fl;e._readOnly||t(192);let n=Pl.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Pl.set(e,n)),n}function Ll(t){const e=t.constructor.clone(t,zs);return e.afterCloneFrom(t),e}function Kl(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Bl(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function $l(t,e){const n=e.style.textAlign;return n&&n in w?t.setFormat(n):t}function zl(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function Wl(t){return!0===t.__lexicalUnmanaged}function Ul(t,e=Ml()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Hl(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(Sl(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==hi(n,e))return!1;n=zi(n)}return!1}function jl(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==eo[e]}const Yl=new WeakMap,Gl=Symbol("lexical.synthesizedGetType");function Jl(e){const n=Yl.get(e);if(n)return n;const o=null!=e.prototype&&R in e.prototype?e.prototype[R]():void 0,r=function(e){if(!(e===eo||e.prototype instanceof eo)){let n="",o="";try{n=e.getType()}catch(t){}try{Ks.version&&(o=JSON.parse(Ks.version))}catch(t){}t(290,e.name,n,o)}return e===fs||e===cs||e===eo}(e),s=!r&&jl(e,"getType")?e.getType:void 0,i=s&&!(Gl in s)?s.call(e):void 0;let l,c=i;if(o)if(i)l=o[i];else{for(const[t,e]of Object.entries(o))c=t,l=e;if(!l)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){l=e;break}}}if(!r&&c){if(!jl(e,"getType")){const t=e,n=function(){return this!==t?eo.getType.call(this):c};n[Gl]=!0,e.getType=n}if(jl(e,"clone")||(e.clone=(t,n)=>{$s(t);const o=new e;return n!==zs&&o.afterCloneFrom(t),o}),jl(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!jl(e,"importDOM")&&l){const{importDOM:t}=l;t&&(e.importDOM=()=>t)}}const a={klass:e,ownNodeConfig:l,ownNodeType:c};return Yl.set(e,a),a}function*Vl(t){for(let e=t;e&&(e===eo||no(e.prototype));){const t=Jl(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Ql(e)}}const ql=(t,e)=>{let n=t;for(;null!=n&&!gs(n);){if(e(n))return n;n=n.getParent()}return null};function Xl(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?ui(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Ql(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const Zl=new Map;function tc(t){return as(t)||ds(t)}function ec(t){return as(t)||ds(t)}function nc(t){const e=t.getLatest();return ec(e)?e.__slotHost:null}function oc(e){const n=nc(e);if(null===n)return null;const o=ui(n);return as(o)||ds(o)||t(370),o}function rc(t){const e=oc(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ic(e))if(o===n)return t;return null}function sc(t){let e=t.getLatest();for(;null!==e;){if(null!==nc(e))return e;e=e.getParent()}return null}function ic(t){const e=t.getLatest();return tc(e)&&null!==e.__slots?e.__slots:Zl}function lc(t){return Array.from(ic(t).keys())}function cc(t,e){const n=ic(t).get(e);return void 0===n?null:ui(n)}const ac=["__proto__","constructor","prototype"],uc=Symbol("slotMapOwner");function fc(t){let e=t.__slots;return null!==e&&e[uc]===t||(e=new Map(e),e[uc]=t,t.__slots=e),e}const dc=new WeakMap,hc=[];function gc(t){for(const{ownNodeConfig:e}of Vl(t)){const t=e&&e.slots;if(t)return t}return hc}function _c(t){let e="";for(const n of lc(t)){const o=cc(t,n);null!==o&&(e+=o.getTextContent())}return e}function pc(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function mc(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=dc.get(e);if(void 0===n){const o=gc(e),r=new Map;for(const n of o)ac.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,dc.set(e,n)}return n}(e.constructor);let r=null,s=!0;for(const t of n.keys()){if(null!==r&&pc(r,t,o)>0){s=!1;break}r=t}if(s)return;const i=Array.from(n).sort(([t],[e])=>pc(t,e,o));n.clear();for(const[t,e]of i)n.set(t,e)}function yc(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!as(o)&&!ds(o)||o.isInline())&&t(374,o.__key);const s=e.getWritable(),i=fc(s),l=i.get(n);void 0!==l&&Sc(l);const c=o.getWritable(),a=oc(c);if(null!==a){const t=rc(c);null!==t&&fc(a.getWritable()).delete(t),c.__slotHost=null}return si(c),c.__slotHost=s.__key,i.set(n,c.__key),mc(s),function(){const t=Ml();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),s}function xc(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(Sc(o),fc(n).delete(e)),n}function Cc(t,e){}function Sc(e){const n=ui(e);if(null===n)return;const o=n.getWritable();ec(o)||t(377,e),o.__slotHost=null,o.remove()}const Tc={next:"previous",previous:"next"};class Nc{origin;constructor(t){this.origin=t}[Symbol.iterator](){return Jc({hasNext:Dc,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Rc(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Rc(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let s=this;const i=this.getParentAtCaret(),l=new Map;for(let t=s.getAdjacentCaret();null!==t&&l.size0){const n=s.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||s.origin.is(e));else{const t=e.getParent();t&&t.is(i)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else s.insert(e);s=Rc(e,this.direction)}for(const t of l.values())t.remove();return this}}class vc extends Nc{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:$c(t,this.direction)}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=kc(this.direction);return Rc(this.getNodeAtCaret(),t)||$c(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof vc&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ec={root:gs,shadowRoot:Xi};function kc(t){return Tc[t]}function Oc(t,e="root"){return null===t||Ec[e](t)?null:null===nc(t)?t:null}class bc extends Nc{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Rc(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return as(this.origin)?$c(this.origin,this.direction):null}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=kc(this.direction);return Rc(this.getNodeAtCaret(),t)||$c(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof bc&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof bc||t instanceof Mc)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Mc extends Nc{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Lc(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Rc(Oc(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Lc(this.origin,kc(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Mc&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof bc||t instanceof Mc)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Rc(this.origin,this.direction)}}function Ac(t){return t instanceof Mc}function Dc(t){return t instanceof bc}function wc(t){return t instanceof vc}const Ic={next:class extends Mc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Mc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Pc={next:class extends bc{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends bc{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Fc={next:class extends vc{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends vc{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Rc(t,e){return t?new Pc[e](t):null}function Lc(t,e,n){return t?new Ic[e](t,Kc(t,n)):null}function Kc(t,n,o="error"){const r=t.getTextContentSize();let s="next"===n?r:"previous"===n?0:n;return(s<0||s>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),s=s<0?0:r),s}function Bc(t,e){return new Hc(t,e)}function $c(t,e){return as(t)?new Fc[e](t):null}function zc(t){return t&&t.getChildCaret()||t}function Wc(t){return t&&zc(t.getAdjacentCaret())}class Uc{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new Uc(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return Ac(e)?function(t,e){const{direction:n,origin:o}=t,r=Kc(o,"focus"===e?kc(n):n);return Bc(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[Bc(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=Ac(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=Ac(n),r=e=>e.isSameNodeCaret(n)?null:Wc(e)||e.getParentCaret(t);return Jc({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Hc{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&bl(t));if(f&&lc(f).length>0)return null;return u&&f?[u,f]:null}(d,h,a);if(g){const[t,e]=g;$c(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(h){const t=function(t){if(wc(t)){const e=t.origin;if(bl(e))return e}else{const e=t.getParentAtCaret();if(e&&bl(e))return e}return null}(h),e=t&&t.getParent(),n=t&&t.getParents().findLast(qi);if(t&&e&&!gs(e)&&t.isEmpty()&&a.has(t.getKey())&&0===lc(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!gs(n)&&n.isEmpty();){const t=n.getParent();if(t&&gs(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const _=[d,h,...l,...c].find(la);if(_){return Yc(fa(aa(_),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function aa(t){const e=function(t){let e=t;for(;wc(e);){const t=Wc(e);if(!wc(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(wo(e.origin))return Ac(e)?e:Lc(e.origin,n,n);const o=e.getAdjacentCaret();return Dc(o)&&wo(o.origin)?Lc(o.origin,n,kc(n)):e}function ua(t){return Ac(t)&&t.offset!==Kc(t.origin,t.direction)}function fa(t,e){return t.direction===e?t:t.getFlipped()}function da(t,e){return t.direction===e?t:Gc(fa(t.focus,e),fa(t.anchor,e))}function ha(t,e,n){let o=$c(t,"next");for(let t=0;t0||!s&&n.canBeEmpty()&&r(n,"last"))&&i.insert(e(n).splice(0,0,o))}return i}function ma(e,n,o){let r=fa(n,"next");Ac(r)&&(0===r.offset?r=Rc(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Rc(r.origin,"next"))),r.origin.is(e)&&(Dc(r)||t(342,e.getKey(),e.getType()),r=sa(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=pa(t,o))r=t;return Ac(r)&&t(283),r.insert(e.isInline()?Ms().append(e):e),fa(Rc(e.getLatest(),"next"),n.direction)}function ya(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function xa(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}exports.$addUpdateTag=Ui,exports.$applyNodeReplacement=Zi,exports.$assumeActiveEditor=function(t){null!==Hr()&&null===Pr&&(Pr=t),Pr!==t&&e(378)},exports.$caretFromPoint=ta,exports.$caretRangeFromSelection=ra,exports.$cloneWithProperties=Ll,exports.$cloneWithPropertiesEphemeral=function(t){return(e=Ll(t))[Qn]=!0,e;var e},exports.$comparePointCaretNext=Vc,exports.$copyNode=Qi,exports.$create=function(t){const e=Ml();return Wr(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)},exports.$createChildrenArray=Xl,exports.$createLineBreakNode=Ts,exports.$createNodeSelection=gr,exports.$createParagraphNode=Ms,exports.$createPoint=Ko,exports.$createRangeSelection=hr,exports.$createRangeSelectionFromDom=function(t,e){return _r(null,t,e,null)},exports.$createTabNode=Fo,exports.$createTextNode=Do,exports.$extendCaretToRange=jc,exports.$findMatchingParent=ql,exports.$formatText=Vo,exports.$fullReconcile=Yr,exports.$generateNodesFromRawText=kr,exports.$getAdjacentChildCaret=Wc,exports.$getAdjacentNode=Li,exports.$getAdjacentSiblingOrParentSiblingCaret=function(t,e="root"){let n=0,o=t,r=Wc(o);for(;null===r;){if(n--,r=o.getParentCaret(e),!r)return null;o=r,r=Wc(o)}return r&&[r,n]},exports.$getCaretInDirection=fa,exports.$getCaretRange=Gc,exports.$getCaretRangeInDirection=da,exports.$getCharacterOffsets=Xo,exports.$getChildCaret=$c,exports.$getChildCaretAtIndex=ha,exports.$getChildCaretOrSelf=zc,exports.$getCollapsedCaretRange=Yc,exports.$getCommonAncestor=Zc,exports.$getCommonAncestorResultBranchOrder=qc,exports.$getDOMSlot=Dl,exports.$getDOMTextNode=Il,exports.$getDocument=fl,exports.$getEditor=Ml,exports.$getEditorDOMRenderConfig=Al,exports.$getNearestNodeFromDOMNode=gi,exports.$getNearestRootOrShadowRoot=Vi,exports.$getNodeByKey=ui,exports.$getNodeByKeyOrThrow=el,exports.$getNodeFromDOMNode=fi,exports.$getPreviousSelection=mr,exports.$getRoot=mi,exports.$getSelection=pr,exports.$getSiblingCaret=Rc,exports.$getSlot=cc,exports.$getSlotFrame=sc,exports.$getSlotHost=oc,exports.$getSlotNameWithinHost=rc,exports.$getSlotNames=lc,exports.$getState=at,exports.$getStateChange=function(t,e,n){const o=at(t,n,it),r=at(e,n,it);return n.isEqual(o,r)?null:[o,r]},exports.$getTextContent=function(){const t=pr();return null===t?"":t.getTextContent()},exports.$getTextNodeOffset=Kc,exports.$getTextPointCaret=Lc,exports.$getTextPointCaretSlice=Bc,exports.$getWritableNodeState=ht,exports.$hasAncestor=ji,exports.$hasUpdateTag=function(t){return jr()._updateTags.has(t)},exports.$insertNodeToNearestRootAtCaret=ma,exports.$insertNodes=function(t){let e=pr()||mr();null===e&&(e=mi().selectEnd()),e.insertNodes(t)},exports.$isBlockElementNode=fr,exports.$isChildCaret=wc,exports.$isDecoratorNode=ds,exports.$isEditorState=function(t){return t instanceof ys},exports.$isElementDOMSlot=wl,exports.$isElementNode=as,exports.$isExtendableTextPointCaret=ua,exports.$isInlineElementOrDecoratorNode=Ji,exports.$isInlineFormattable=So,exports.$isLeafNode=function(t){return wo(t)||Ns(t)||ds(t)},exports.$isLexicalNode=no,exports.$isLineBreakNode=Ns,exports.$isNodeCaret=function(t){return t instanceof Nc},exports.$isNodeSelection=Go,exports.$isParagraphNode=As,exports.$isRangeSelection=jo,exports.$isRootNode=gs,exports.$isRootOrShadowRoot=Xi,exports.$isSelectionCapturedInDecoratorInput=Ys,exports.$isShadowRootNode=qi,exports.$isSiblingCaret=Dc,exports.$isSlotChild=ec,exports.$isSlotHost=tc,exports.$isTabNode=Ro,exports.$isTextNode=wo,exports.$isTextPointCaret=Ac,exports.$isTextPointCaretSlice=function(t){return t instanceof Hc},exports.$isTokenOrSegmented=Zs,exports.$isTokenOrTab=Qs,exports.$markSlotEditable=Ul,exports.$needsBlockCursorBeside=nl,exports.$nodesOfType=function(t){const e=t.getType(),n=Hr();if(n._readOnly){const t=Rl(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r},exports.$normalizeCaret=aa,exports.$normalizeSelection__EXPERIMENTAL=Nt,exports.$onUpdate=Hi,exports.$parseSerializedNode=function(t){return Qr(t,jr()._nodes)},exports.$removeFromParent=si,exports.$removeSlot=xc,exports.$removeTextFromCaretRange=ca,exports.$rewindSiblingCaret=sa,exports.$selectAll=function(t){const e=mi();if(jo(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(gs(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),Nt(t),t;const r=o.getTopLevelElementOrThrow(),s=r.getParent();if(null===s)return as(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),Nt(t)),t;const i=s;return e.set(i.getKey(),0,"element"),n.set(i.getKey(),i.getChildrenSize(),"element"),Nt(t),t}{const t=e.select(0,e.getChildrenSize());return yi(Nt(t)),t}},exports.$setCompositionKey=ci,exports.$setDirectionFromDOM=Bl,exports.$setFormatFromDOM=$l,exports.$setPointFromCaret=ea,exports.$setSelection=yi,exports.$setSelectionFromCaretRange=na,exports.$setSlot=yc,exports.$setState=function(t,e,n){let o;if(Wr(),"function"==typeof n){const r=t.getLatest(),s=at(r,e);if(o=n(s),e.isEqual(s,o))return r}else o=n;const r=t.getWritable();return ht(r).updateFromKnown(e,o),r},exports.$setTextFormat=function(t,e){const n=[];for(const[t,o]of Object.entries(e))"boolean"==typeof o&&n.push([t,o]);0!==n.length&&Jo(t,t=>{for(const[e,o]of n)t=oi(t,e,o?A[e]:0);return t})},exports.$splitAtPointCaretNext=pa,exports.$splitNode=function(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Xi(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),s=Xi(n),i=e!==o||s?Qi(e):e;if(s)return as(e)&&as(i)||t(133),e.insertAfter(i),[e,i,i];{const[t,o,s]=r(n),l=e.getNextSiblings();return s.append(i,...l),[t,o,i]}},[s,i]=r(o);return[s,i]},exports.$updateDOMSelection=vr,exports.$updateRangeSelectionFromCaretRange=oa,exports.ArtificialNode__DO_NOT_USE=xs,exports.BEFORE_INPUT_COMMAND=ke,exports.BLUR_COMMAND=yn,exports.CAN_REDO_COMMAND=_n,exports.CAN_UNDO_COMMAND=pn,exports.CAN_USE_BEFORE_INPUT=i,exports.CAN_USE_DOM=n,exports.CLEAR_EDITOR_COMMAND=hn,exports.CLEAR_HISTORY_COMMAND=gn,exports.CLICK_COMMAND=Ee,exports.COLLABORATION_TAG=ro,exports.COMMAND_PRIORITY_BEFORE_CRITICAL=-4,exports.COMMAND_PRIORITY_BEFORE_EDITOR=-8,exports.COMMAND_PRIORITY_BEFORE_HIGH=-5,exports.COMMAND_PRIORITY_BEFORE_LOW=-7,exports.COMMAND_PRIORITY_BEFORE_NORMAL=-6,exports.COMMAND_PRIORITY_CRITICAL=4,exports.COMMAND_PRIORITY_EDITOR=ws,exports.COMMAND_PRIORITY_HIGH=3,exports.COMMAND_PRIORITY_LOW=1,exports.COMMAND_PRIORITY_NORMAL=2,exports.COMPOSITION_END_COMMAND=Me,exports.COMPOSITION_END_TAG=ao,exports.COMPOSITION_START_COMMAND=be,exports.COMPOSITION_START_TAG=co,exports.CONTROLLED_TEXT_INSERTION_COMMAND=Ie,exports.COPY_COMMAND=un,exports.CUT_COMMAND=fn,exports.CUT_TAG="cut",exports.DEFAULT_EDITOR_DOM_CONFIG=Fs,exports.DELETE_CHARACTER_COMMAND=Ae,exports.DELETE_LINE_COMMAND=Le,exports.DELETE_WORD_COMMAND=Re,exports.DRAGEND_COMMAND=an,exports.DRAGOVER_COMMAND=cn,exports.DRAGSTART_COMMAND=ln,exports.DROP_COMMAND=rn,exports.DecoratorNode=fs,exports.ElementNode=cs,exports.FOCUS_COMMAND=mn,exports.FORMAT_ELEMENT_COMMAND=sn,exports.FORMAT_TEXT_COMMAND=Ke,exports.HISTORIC_TAG="historic",exports.HISTORY_MERGE_TAG=oo,exports.HISTORY_PUSH_TAG="history-push",exports.INDENT_CONTENT_COMMAND=nn,exports.INPUT_COMMAND=Oe,exports.INSERT_LINE_BREAK_COMMAND=De,exports.INSERT_PARAGRAPH_COMMAND=we,exports.INSERT_TAB_COMMAND=en,exports.INTERNAL_$isBlock=bl,exports.IS_ALL_FORMATTING=2047,exports.IS_ANDROID=c,exports.IS_ANDROID_CHROME=f,exports.IS_APPLE=r,exports.IS_APPLE_WEBKIT=d,exports.IS_BOLD=1,exports.IS_CHROME=u,exports.IS_CODE=16,exports.IS_FIREFOX=s,exports.IS_HIGHLIGHT=p,exports.IS_IOS=l,exports.IS_ITALIC=2,exports.IS_SAFARI=a,exports.IS_STRIKETHROUGH=4,exports.IS_SUBSCRIPT=32,exports.IS_SUPERSCRIPT=64,exports.IS_UNDERLINE=8,exports.KEY_ARROW_DOWN_COMMAND=Je,exports.KEY_ARROW_LEFT_COMMAND=je,exports.KEY_ARROW_RIGHT_COMMAND=Ue,exports.KEY_ARROW_UP_COMMAND=Ge,exports.KEY_BACKSPACE_COMMAND=Xe,exports.KEY_DELETE_COMMAND=Ze,exports.KEY_DOWN_COMMAND=We,exports.KEY_ENTER_COMMAND=Ve,exports.KEY_ESCAPE_COMMAND=Qe,exports.KEY_MODIFIER_COMMAND=xn,exports.KEY_SPACE_COMMAND=qe,exports.KEY_TAB_COMMAND=tn,exports.LineBreakNode=Cs,exports.MOVE_TO_END=He,exports.MOVE_TO_START=Ye,exports.NODE_STATE_DIRECT=it,exports.NODE_STATE_KEY="$",exports.NODE_STATE_LATEST=lt,exports.OUTDENT_CONTENT_COMMAND=on,exports.PASTE_COMMAND=Pe,exports.PASTE_TAG="paste",exports.ParagraphNode=Os,exports.REDO_COMMAND=ze,exports.REMOVE_TEXT_COMMAND=Fe,exports.RootNode=hs,exports.SELECTION_CHANGE_COMMAND=Ne,exports.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=ve,exports.SELECT_ALL_COMMAND=dn,exports.SET_TEXT_FORMAT_COMMAND=Be,exports.SKIP_COLLAB_TAG="skip-collab",exports.SKIP_DOM_SELECTION_TAG=io,exports.SKIP_SCROLL_INTO_VIEW_TAG=so,exports.SKIP_SELECTION_FOCUS_TAG=lo,exports.TEXT_TYPE_TO_FORMAT=A,exports.TabNode=Po,exports.TextNode=To,exports.UNDO_COMMAND=$e,exports.addClassNamesToElement=function(t,...e){const n=ya(...e);n.length>0&&t.classList.add(...n)},exports.buildImportMap=function(t){return t},exports.configExtension=function(...t){return t},exports.createCommand=Te,exports.createEditor=function(e){const n=e||{},o=Jr(),r=n.theme||{},s=void 0===e?o:n.parentEditor||null,i=n.disableEvents||!1,l=ps(),c=n.namespace||(null!==s?s._config.namespace:Ni()),a=n.editorState,u=[hs,To,Cs,Po,Os,xs,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ke,Ln,ws),t.registerCommand(Oe,Kn,ws),t.registerCommand(be,Bn,ws),t.registerCommand(Me,$n,ws),t.registerCommand(We,Un,ws)}(p),p},exports.createRefCountedRegistry=Cn,exports.createSharedNodeState=ut,exports.createState=function(t,e){return new ct(t,e)},exports.declarePeerDependency=function(t,e){return[t,e]},exports.defineExtension=function(t){return t},exports.findAllLexicalElementsDeep=al,exports.flipDirection=kc,exports.getActiveElement=yl,exports.getActiveElementDeep=xl,exports.getComposedEventTarget=Cl,exports.getComposedStaticRange=dl,exports.getDOMOwnerDocument=Wi,exports.getDOMSelection=rl,exports.getDOMSelectionFromTarget=sl,exports.getDOMSelectionPoints=gl,exports.getDOMSelectionRange=hl,exports.getDOMSelectionRangeAndPoints=function(t,e){const n=dl(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=_l(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:pl(n,ml(t)),range:o}},exports.getDOMShadowRoots=cl,exports.getDOMTextNode=ni,exports.getDeclaredSlots=gc,exports.getEditorPropertyFromDOMNode=Xs,exports.getNearestEditorFromDOMNode=qs,exports.getParentElement=zi,exports.getRegisteredNode=Hs,exports.getRegisteredNodeOrThrow=Us,exports.getRegisteredSubtypeMap=function(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Jl(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of Vl(o)){const o=n&&e.get(n);o&&o.add(t)}return e},exports.getRootOwnerDocument=ul,exports.getStaticNodeConfig=Jl,exports.getStyleObjectFromCSS=fo,exports.getTextDirection=function(t){return b.test(t)?"rtl":M.test(t)?"ltr":null},exports.getTransformSetFromKlass=Ps,exports.isBlockDomNode=Ol,exports.isCurrentlyReadOnlyMode=zr,exports.isDOMCapturingSelection=Hl,exports.isDOMDocumentNode=ei,exports.isDOMNode=Tl,exports.isDOMShadowRoot=il,exports.isDOMTextNode=ti,exports.isDOMUnmanaged=Wl,exports.isDocumentFragment=Nl,exports.isExactShortcutMatch=Ai,exports.isHTMLAnchorElement=function(t){return Sl(t)&&"A"===t.tagName},exports.isHTMLElement=Sl,exports.isHTMLTableCellElement=function(t){return Sl(t)&&("TD"===t.tagName||"TH"===t.tagName)},exports.isHTMLTableRowElement=function(t){return Sl(t)&&"TR"===t.tagName},exports.isInlineDomNode=El,exports.isLastChildInBlockNode=Es,exports.isLexicalEditor=Vs,exports.isModifierMatch=Mi,exports.isOnlyChildInBlockNode=vs,exports.isSelectionCapturedInDecoratorInput=Gs,exports.isSelectionWithinEditor=Js,exports.iterStaticNodeConfigChain=Vl,exports.makeStepwiseIterator=Jc,exports.mergeRegister=xa,exports.mountSlotContainer=function(t,e,n,o){const r=t.read("latest",()=>{const o=ui(e);return null!==o?function(t,e,n=Ml()){const o=cc(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r},exports.normalizeClassNames=ya,exports.registerEventListener=Sn,exports.registerEventListeners=function(t,e,n){return xa(...Object.entries(e).map(([e,o])=>Sn(t,e,o,n)))},exports.removeClassNamesFromElement=function(t,...e){const n=ya(...e);n.length>0&&t.classList.remove(...n)},exports.removeFromParent=ii,exports.resetRandomKey=function(){Ws=1},exports.safeCast=function(t){return t},exports.setDOMStyleFromCSS=go,exports.setDOMStyleObject=function(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):ho(t,n,o)}},exports.setDOMUnmanaged=zl,exports.setNodeIndentFromDOM=Kl,exports.shallowMergeConfig=function(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t},exports.stopLexicalPropagation=Gn,exports.toggleTextFormatType=oi,exports.tokenizeRawText=Er,exports.unmountSlotContainer=function(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}; +diff --git a/dist/Lexical.prod.mjs b/dist/Lexical.prod.mjs +index e2ef2d833f8403e4288764ee109759431c236481..84ac11869ccdf53467825c61fe3121eb51d6dcd3 100644 +--- a/dist/Lexical.prod.mjs ++++ b/dist/Lexical.prod.mjs +@@ -7,4 +7,4 @@ + */ + + function t(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function e(t,...e){const n=new URL("https://lexical.dev/docs/error"),o=new URLSearchParams;o.append("code",t);for(const t of e)o.append("v",t);n.search=o.toString(),console.warn(`Minified Lexical warning #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const n="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=n&&"documentMode"in document?document.documentMode:null,r=n&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),i=n&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),s=!(!n||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),l=n&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,c=n&&/Android/.test(navigator.userAgent),a=n&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!c,u=n&&/^(?=.*Chrome).*/i.test(navigator.userAgent),f=n&&c&&u,d=n&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&r&&!u,h=0,g=1,_=2,p=1,y=2,m=4,x=8,C=16,S=32,v=64,T=128,k=2047,b=1,N=2,E=3,w=4,O=5,M=6,A=a||l||d?"\xa0":"\u200b",D="\n\n",F=i?"\xa0":A,P="\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc",I="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff",L=new RegExp("^[^"+I+"]*["+P+"]"),K=new RegExp("^[^"+P+"]*["+I+"]"),z={bold:1,capitalize:1024,code:16,highlight:T,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},B={directionless:1,unmergeable:2},R={center:2,end:6,justify:4,left:1,right:3,start:5},W={[N]:"center",[M]:"end",[w]:"justify",[b]:"left",[E]:"right",[O]:"start"},$={normal:0,segmented:2,token:1},U={[h]:"normal",[_]:"segmented",[g]:"token"},H="$",j="$config";function J(){return vc()._blockCursorElement}function V(t){return null!==t&&1===t.nodeType&&t.hasAttribute("data-lexical-slot")}class q{element;before;after;constructor(t,e,n){this.element=t,this.before=e||null,this.after=n||null}withBefore(t){return new q(this.element,t,this.after)}withAfter(t){return new q(this.element,this.before,t)}withElement(t){return this.element===t?this:new q(t,this.before,this.after)}insertChild(e){const n=this.getInsertionAnchor();return null!==n&&n.parentElement!==this.element&&t(357),this.element.insertBefore(e,n),this}removeChild(e){return e.parentElement!==this.element&&t(358),this.element.removeChild(e),this}replaceChild(e,n){return n.parentElement!==this.element&&t(359),this.element.replaceChild(e,n),this}getFirstChild(){const t=this.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;return e===this.getInsertionAnchor()?null:e}getFirstChildAnchor(){return this.after}resolveLeafPosition(t,e,n){if(this.element===t)return e===t&&0===n?"before":"after";const o=Y(t,this.element);if(null===o)return"after";const r=Array.prototype.indexOf.call(t.childNodes,o);if(r<0)return"after";if(e===t)return n<=r?"before":"after";const i=Y(t,e);if(null===i)return"after";const s=Array.prototype.indexOf.call(t.childNodes,i);return s>=0&&s<=r?"before":"after"}getInsertionAnchor(){return this.before}}function Y(t,e){let n=e;for(;null!==n&&n.parentNode!==t;)n=n.parentNode;return n}class G extends q{withBefore(t){return new G(this.element,t,this.after)}withAfter(t){return new G(this.element,this.before,t)}withElement(t){return this.element===t?this:new G(t,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let t=super.getFirstChildAnchor(),e=t?t.nextSibling:this.element.firstChild;for(;V(e);)t=e,e=e.nextSibling;const n=t?t.nextSibling:this.element.firstChild;return null!==n&&n===J()?n:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(this.element.__lexicalLastChildKind=t,null===t)this.removeManagedLineBreak();else{const e="decorator"===t&&(d||l||a);this.insertManagedLineBreak(e)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const e=this.element,n="IMG"===t.nodeName?t.nextSibling:null;n&&e.removeChild(n),e.removeChild(t),e.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const e=this.getManagedLineBreak();if(e){if(t===("IMG"===e.nodeName))return;this.removeManagedLineBreak()}const n=this.element,o=this.before,r=Zl().createElement("br");if(r.setAttribute("data-lexical-managed-linebreak","true"),n.insertBefore(r,o),t){const t=Zl().createElement("img");t.setAttribute("data-lexical-managed-linebreak","true"),t.style.setProperty("display","inline","important"),t.style.setProperty("border","0px","important"),t.style.setProperty("margin","0px","important"),t.alt="",n.insertBefore(t,r),n.__lexicalLineBreak=t}else n.__lexicalLineBreak=r}getFirstChildOffset(){const t=this.getFirstChild(),e=this.getInsertionAnchor();let n=0;for(let o=this.element.firstChild;null!==o&&o!==t&&o!==e;o=o.nextSibling)n++;return n}resolveChildIndex(t,e,n,o){if(n===this.element){const e=this.getFirstChildOffset(),n=J(),r=this.element.childNodes,i=Math.min(o,r.length);let s=0;for(let t=e;tn){s+=1;break}}return[t.getParentOrThrow(),s]}}function X(e,n){const o=[];let r=n;for(;r!==e&&null!==r;r=r.parentNode){let t=0;for(let e=r.previousSibling;null!==e;e=e.previousSibling)t++;o.push(t)}return r!==e&&t(225),o.reverse()}let Q;try{Q="0.49.0+prod.esm"}catch(t){}const Z=Q??'"+source"';class tt{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(t){return delete this._cache,this._front.has(t)||this._back.add(t),this}addFront(t){return delete this._cache,this._back.has(t)||this._front.add(t),this}delete(t){return delete this._cache,this._front.delete(t)||this._back.delete(t)}toArray(){const t=Array.from(this._front).reverse();for(const e of this._back)t.push(e);return t}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}}const et=null;function nt(t,e=1e3){return t instanceof ot?t.clone():t.sizethis._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(t=!1){if(this._nursery&&this._nursery.size>0&&(t||this.shouldCompact())){const t=new Map(this._old);for(const[e,n]of this._nursery)n!==et?t.set(e,n):t.delete(e);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(t,e){const n=this.getWithTombstone(t);if(n===e)return this;const o=this.getNursery();return n!==et&&void 0!==n||(this._size++,n===et&&o.delete(t)),o.set(t,e),this}delete(t){const e=this.has(t);return e&&(this.getNursery().set(t,et),this._size--),e}getOrInsert(t,e){const n=this.get(t);return void 0!==n?n:(this.set(t,e),e)}getOrInsertComputed(t,e){const n=this.get(t);if(void 0!==n)return n;const o=e(t);return this.set(t,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const t of this.entries())yield t[0]}*values(){for(const t of this.entries())yield t[1]}*entries(){const t=this._nursery,e=this._old;if(e)for(const n of e){const e=n[0],o=t?t.get(e):void 0;o!==et&&(void 0!==o&&(n[1]=o),yield n)}if(t)for(const n of t)n[1]===et||e&&e.has(n[0])||(yield n)}forEach(t,e){void 0!==e&&(t=t.bind(e));for(const[e,n]of this.entries())t(n,e,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}}function rt(t,e,n,o,r,i){if(Pi(t)){let s=t.getFirstChild();for(;null!==s;){const t=s.__key;s.__parent===e&&((Pi(s)||Qc(s)&&null!==s.__slots)&&rt(s,t,n,o,r,i),n.has(t)||i.delete(t),r.push(t)),s=s.getNextSibling()}}for(const s of Qc(t)&&null!==t.__slots?t.__slots.values():[]){const t=o.get(s);void 0!==t&&Zc(t)&&t.__slotHost===e&&((Pi(t)||Qc(t)&&null!==t.__slots)&&rt(t,s,n,o,r,i),n.has(s)||i.delete(s),r.push(s))}}let it=!1,st=0;function lt(t){st=t.timeStamp}function ct(t,e,n){const o="BR"===t.nodeName,r=e.__lexicalLineBreak;return r&&(t===r||o&&t.previousSibling===r)||o&&void 0!==Qs(t,n)}function at(t,e,n){const o=Jl(Il(n)),r=o&&nc(o,n._rootElement);let i=null,s=null;null!==r&&r.anchorNode===t&&(i=r.anchorOffset,s=r.focusOffset);const l=t.nodeValue;null!==l&&fl(e,l,i,s,!1)}function ut(t,e,n){if(ur(t)){const e=t.anchor.getNode();if(e.is(n)&&t.format!==e.getFormat())return!1}return zs(e)&&n.isAttached()}function ft(t,e,n){for(let o=t;o&&!zc(o);o=wl(o)){const t=Qs(o,e);if(void 0!==t){const e=Ys(t,n);if(e)return Ki(e)||!gc(o)?void 0:[o,e]}}}function dt(t,e,n){it=!0;const o=performance.now()-st>100;try{Ai(t,()=>{const r=Kr()||function(t){return t.read("latest",()=>{const t=Kr();return null!==t?t.clone():null})}(t),s=new Map,l=t._editorState,c=t._blockCursorElement;let a=!1,u="";for(let n=0;n0){let e=0;for(let r=0;r0)for(const[e,n]of s)n.reconcileObservedMutation(e,t);const f=n.takeRecords();if(f.length>0){for(let e=0;e{dt(t,e,n)})}const _t="direct",pt="latest";class yt{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(t,e){this.key=t,this.parse=e.parse.bind(e),this.unparse=(e.unparse||wt).bind(e),this.isEqual=(e.isEqual||Object.is).bind(e),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=e.resetOnCopyNode||!1}}function mt(t,e){return new yt(t,e)}function xt(t,e,n=pt){const o=(n===pt?t.getLatest():t).__state;return o?o.getValue(e):e.defaultValue}function Ct(t,e,n){const o=xt(t,n,_t),r=xt(e,n,_t);return n.isEqual(o,r)?null:[o,r]}function St(t,e,n){let o;if(fi(),"function"==typeof n){const r=t.getLatest(),i=xt(r,e);if(o=n(i),e.isEqual(i,o))return r}else o=n;const r=t.getWritable();return bt(r).updateFromKnown(e,o),r}function vt(t){const e=new Map,n=new Set;for(const{ownNodeConfig:o}of jc("function"==typeof t?t:t.replace))if(o&&o.stateConfigs)for(const t of o.stateConfigs){let o;"stateConfig"in t?(o=t.stateConfig,t.flat&&n.add(o.key)):o=t,e.set(o.key,o)}return{flatKeys:n,sharedConfigMap:e}}const Tt=new Set(["__proto__","constructor","prototype"]);class kt{node;knownState;unknownState;sharedNodeState;size;constructor(t,e,n=void 0,o=new Map,r=void 0){this.node=t,this.sharedNodeState=e,this.unknownState=n,this.knownState=o;const{sharedConfigMap:i}=this.sharedNodeState,s=void 0!==r?r:function(t,e,n){let o=n.size;if(e)for(const r in e){const e=t.get(r);e&&n.has(e)||o++}return o}(i,n,o);this.size=s}getValue(t){const e=this.knownState.get(t);if(void 0!==e)return e;this.sharedNodeState.sharedConfigMap.set(t.key,t);let n=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const e=this.unknownState[t.key];void 0!==e&&(n=t.parse(e)),this.updateFromKnown(t,n)}return n}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},e={};for(const[e,n]of this.knownState)e.isEqual(n,e.defaultValue)?delete t[e.key]:t[e.key]=e.unparse(n);for(const n of this.sharedNodeState.flatKeys)n in t&&(e[n]=t[n],delete t[n]);return Et(t)&&(e.$=t),e}getWritable(t){if(this.node===t)return this;const{sharedNodeState:e,unknownState:n}=this,o=new Map(this.knownState);return new kt(t,e,function(t,e,n){let o;if(n)for(const[r,i]of Object.entries(n)){if(Tt.has(r))continue;const n=t.get(r);n?e.has(n)||e.set(n,n.parse(i)):(o=o||{},o[r]=i)}return o}(e.sharedConfigMap,o,n),o,this.size)}resetOnCopyNode(){for(const t of this.knownState.keys())t.resetOnCopyNode&&this.knownState.set(t,t.defaultValue);return this}updateFromKnown(t,e){const n=t.key;this.sharedNodeState.sharedConfigMap.set(n,t);const{knownState:o,unknownState:r}=this;o.has(t)||r&&n in r||(r&&(delete r[n],this.unknownState=Et(r)),this.size++),o.set(t,e)}updateFromUnknown(t,e){if(Tt.has(t))return;const n=this.sharedNodeState.sharedConfigMap.get(t);n?this.updateFromKnown(n,n.parse(e)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=e)}updateFromJSON(t){const{knownState:e}=this;for(const t of e.keys())e.set(t,t.defaultValue);if(this.size=e.size,this.unknownState=void 0,t)for(const[e,n]of Object.entries(t))this.updateFromUnknown(e,n)}}function bt(t){const e=t.getWritable(),n=e.__state?e.__state.getWritable(e):new kt(e,Nt(e));return e.__state=n,n}function Nt(t){return t.__state?t.__state.sharedNodeState:Ns(vc(),t.getType()).sharedNodeState}function Et(t){if(t)for(const e in t)return t}function wt(t){return t}function Ot(t,e,n){for(const[o,r]of e.knownState){if(t.has(o.key))continue;t.add(o.key);const e=n?n.getValue(o):o.defaultValue;if(e!==r&&!o.isEqual(e,r))return!0}return!1}function Mt(t,e,n){const{unknownState:o}=e,r=n?n.unknownState:void 0;if(o)for(const[e,n]of Object.entries(o)){if(t.has(e))continue;t.add(e);if(n!==(r?r[e]:void 0))return!0}return!1}function At(t,e){const n=t.__state;return n&&n.node===t?n.getWritable(e):n}function Dt(t,e){const n=t.__mode,o=t.__format,r=t.__style,i=e.__mode,s=e.__format,l=e.__style,c=t.__state,a=e.__state;return(null===n||n===i)&&(null===o||o===s)&&(null===r||r===l)&&(null===t.__state||c===a||function(t,e){if(t===e)return!0;const n=new Set;return!(t&&Ot(n,t,e)||e&&Ot(n,e,t)||t&&Mt(n,t,e)||e&&Mt(n,e,t))}(c,a))}function Ft(t,e){const n=t.mergeWithSibling(e),o=_i()._normalizedNodes;return o.add(t.__key),o.add(e.__key),n}function Pt(t){let e,n,o=t;if(""!==o.__text||!o.isSimpleText()||o.isUnmergeable()){for(;null!==(e=o.getPreviousSibling())&&Xo(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(""!==e.__text){if(Dt(e,o)){o=Ft(e,o);break}break}e.remove()}for(;null!==(n=o.getNextSibling())&&Xo(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Dt(o,n)){o=Ft(o,n);break}break}n.remove()}}else o.remove()}function It(t){return Lt(t.anchor),Lt(t.focus),t}function Lt(t){for(;"element"===t.type;){const e=t.getNode(),n=t.offset;let o,r;if(n===e.getChildrenSize()?(o=e.getChildAtIndex(n-1),r=!0):(o=e.getChildAtIndex(n),r=!1),Xo(o)){t.set(o.__key,r?o.getTextContentSize():0,"text",!0);break}if(!Pi(o))break;t.set(o.__key,r?o.getChildrenSize():0,"element",!0)}}const Kt=Symbol.for("@lexical/CachedTextSize");function zt(e,n){return ee.read(()=>{let o=0,r=e;for(let e=0;e0&&!o?t.classList.add(n):e<1&&o&&t.classList.remove(n)}t.style.setProperty("padding-inline-start",0===e?"":`calc(${e} * var(--lexical-indent-base-value, ${de}))`)}function ge(t,e){const n=t.style;0===e?fe(n,""):1===e?fe(n,"left"):2===e?fe(n,"center"):3===e?fe(n,"right"):4===e?fe(n,"justify"):5===e?fe(n,"start"):6===e&&fe(n,"end")}function _e(t,e){const n=function(t){const e=t.__dir;if(null!==e)return e;if(Bi(t))return null;const n=t.getParent();return null===n||Bl(n)&&null===n.__dir?"auto":null}(e);null!==n?t.dir=n:t.removeAttribute("dir")}function pe(t){const e=Zl().createElement("div");return e.setAttribute("data-lexical-slot",t),e.style.display="none",e}function ye(t,e,n){e||"false"===t.contentEditable?Bc(n,$t):n.removeAttribute("contenteditable")}function me(t,e,n){const o=Ht,r=qt();Ht="";let i="";const s=Ki(t);for(const[o,r]of n){const n=pe(o);ye(e,s,n),e.appendChild(n),Ht="";const l=qt();Te(r,kc(t,n,$t)),Yt(l),Ce(t,o,e,n),i+=Ht}return Yt(r),Ht=o,i}function xe(t){return Qc(t)&&null!==t.__slots?t.__slots:Xc}function Ce(t,e,n,o){const r=se.$getSlotTargetElement(t,e,n,$t);null!==r&&(o.parentElement!==r&&r.appendChild(o),o.style.display="")}function Se(t){const e=oe.get(t);return void 0!==e?e.parentElement:null}function ve(t,e,n){const o=xe(t),r=xe(e);for(const[t,e]of o)if(!r.has(t)){const t=Se(e);ae(e,null),null!==t&&t.remove()}const i=Ht,s=qt();let l="",c=null;const a=Ki(e);for(const[t,i]of r){const r=o.get(t);let s=void 0!==r?Se(r):null;Ht="";const u=qt();if(null===s){s=pe(t);let o=null;for(const t of n.children)if(!t.hasAttribute("data-lexical-slot")){o=t;break}n.insertBefore(s,o),Te(i,kc(e,s,$t))}else r===i?we(i,s):(void 0!==r&&ae(r,s),Te(i,kc(e,s,$t)));if(Yt(u),ye(n,a,s),Ce(e,t,n,s),l+=Ht,s.parentElement===n){const t=null===c?n.firstChild:c.nextSibling;t!==s&&n.insertBefore(s,t),c=s}}return Yt(s),Ht=i,l}function Te(e,n){const o=ne.get(e);if(void 0===o&&t(60),null!==n){const t=te.get(e);if(void 0!==t){const r=oe.get(e);if(void 0!==r){const i=Zc(t)?t.__slotHost:null,s=Zc(o)?o.__slotHost:null,l=t.__parent!==o.__parent||i!==s,c=null!==s&&r.parentElement!==n.element;if(l||c)return n.insertChild(r),we(e,n.element)}}}const r=se.$createDOM(o,$t);if(function(t,e,n){const o=n._keyToDOMMap;Xs(e,n,t),o.set(t,e)}(e,r,$t),Xo(o)?r.setAttribute("data-lexical-text","true"):Ki(o)&&(r.setAttribute("data-lexical-decorator","true"),Kc(r,{captureSelection:!0})),Pi(o)){const t=o.__indent,e=o.__size;_e(r,o),0!==t&&he(r,t);const n=xe(o),i=n.size>0?me(o,r,n):"";if(0===e)r.__lexicalTextContent=i,r.__lexicalFirstTextKey=null,Ht+=i,n.size>0&&(r.__lexicalSlotTextLength=i.length);else{const t=Ht,s=e-1;if(ke(Yc(o,ne),o,0,s,kc(o,r,$t)),""!==i){const e=r.__lexicalTextContent||"";r.__lexicalTextContent=i+e,Ht=t+i+e}n.size>0&&(r.__lexicalSlotTextLength=i.length)}const s=o.__format;0!==s&&ge(r,s),o.isInline()||be(null,o,r)}else{const t=o.getTextContent();if(Ki(o)){const t=o.decorate($t,Wt);null!==t&&Oe(e,t),r.contentEditable="false";const n=xe(o);n.size>0&&me(o,r,n)}Ht+=t}return null!==n&&n.insertChild(r),se.$decorateDOM(o,null,r,$t),Bt(o),Sl(ie,Ut,Xt,o,"created"),r}function ke(e,n,o,r,i){const s=Ht,l=qt();Ht="",jt=null,Jt=null,Vt=null;let c=o;for(;c<=r;++c){const t=qt();Te(e[c],i);const n=ne.get(e[c]);null!==n&&Xo(n)?null===jt&&(jt=n.getFormat(),Jt=n.getStyle(),Vt=n.__key):Pi(n)&&c0?null:"empty"}return null}(e,ne);r!==i&&o.setManagedLineBreak(i)}function Ne(e,n,o){var r;jt=null,Jt=null,Vt=null,function(e,n,o){const r=Ht,i=e.__size,s=n.__size;Ht="";const l=o.element,c=$t._keyToDOMMap.get(n.__key);void 0===c&&t(351,n.__key);const a=s-i;if(!le&&Math.abs(a)<=1&&i>=Rt&&e.__first===n.__first&&(0!==a||!$t._cloneNotNeeded.has(e.__key))){const i=c.__lexicalTextContent,u=re.get(e.__key);if(!le&&"string"==typeof i&&void 0!==u){const s=function(t,e){const n=e.size;if(0===n||n>=t.__size)return null;let o=t.__last,r=null,i=0;for(;null!==o&&i0?i.slice(h):i,_=g.slice(0,g.length-e)+d;return c.__lexicalTextContent=_,Ht=r+_,void Ee(n,c,u)}if(function(e,n,o,r,i,s,l,c){if(1!==c&&-1!==c)return!1;const a=1===c?2:1;if(l!==a)return!1;const u=l-c;let f=e.__last;for(let t=0;t0?i.slice(k):i;return r.__lexicalTextContent=b.slice(0,b.length-v)+T,!0}(e,0,o,c,i,s,f,a)){const e=c.__lexicalTextContent;return"string"!=typeof e&&t(353),Ht=r+e,void Ee(n,c,u)}}}if(0===a){let n=e.__first,o=0;for(;null!==n;){const e=ne.get(n);if(void 0===e)break;const r=le||Zt.has(n)||Qt.has(n),i=qt();if(r)we(n,l);else{let o,r;if(Pi(e)){r=oe.get(n);const i=r&&r.__lexicalTextContent;"string"!=typeof i&&t(354,e.getType()),o=i}else o=e.getTextContent();Ht+=o,void 0!==r&&Gt(r)}Xo(e)?null===jt&&(jt=e.getFormat(),Jt=e.getStyle(),Vt=e.__key):Pi(e)&&os,g=d>l;if(h&&!g){const e=n[l+1],o=void 0===e?null:$t.getElementByKey(e);ke(n,t,d,l,i.withBefore(o??i.before))}else g&&!h&&ue(e,f,s,i.element)}(n,r,c,i,s,o)}c.__lexicalTextContent=Ht,c.__lexicalFirstTextKey=Vt,Ht=r+Ht}(e,n,kc(n,o,$t)),Bl(n)||(r=n,null==jt||jt===r.__textFormat||ce||r.setTextFormat(jt),function(t){null==Jt||Jt===t.__textStyle||ce||t.setTextStyle(Jt)}(n))}function Ee(t,e,n){const o=e.__lexicalFirstTextKey;if(null!=o){const e=t.__key;let r=o;for(;null!==r;){const t=ne.get(r);if(void 0===t){r=null;break}if(t.__parent===e)break;r=t.__parent}if(null!==r&&!n.has(r)){const t=ne.get(o);if(Xo(t))return jt=t.getFormat(),void(Jt=t.getStyle())}}e.__lexicalFirstTextKey=Vt}function we(e,n){const o=te.get(e);let r=ne.get(e);void 0!==o&&void 0!==r||t(61);const i=le||Zt.has(e)||Qt.has(e),s=El($t,e);if(o===r&&!i){let e;if(Pi(o)){const n=s.__lexicalTextContent;"string"!=typeof n&&t(355,o.getType()),e=n,Gt(s)}else e=o.getTextContent();return Ht+=e,s}if(o!==r&&i&&Sl(ie,Ut,Xt,r,"updated"),se.$updateDOM(r,o,s,$t)){const o=Te(e,null);return null===n&&t(62),n.replaceChild(o,s),ae(e,null),o}if(Pi(o)){Pi(r)||t(334,e);const n=r.__indent;(le||n!==o.__indent)&&he(s,n);const l=r.__format;(le||l!==o.__format)&&ge(s,l);const c=i&&(xe(r).size>0||xe(o).size>0)?ve(o,r,s):"";if(i){const t=Ht;if(Ne(o,r,s),Bi(r)||r.isInline()||be(0,r,s),""!==c){const e=s.__lexicalTextContent||"";s.__lexicalTextContent=c+e,Ht=t+c+e,s.__lexicalSlotTextLength=c.length}else(xe(r).size>0||xe(o).size>0)&&(s.__lexicalSlotTextLength=0)}else{const e=s.__lexicalTextContent;"string"!=typeof e&&t(356,o.getType()),Ht+=e,Gt(s)}if((le||r.__dir!==o.__dir||r.__parent!==o.__parent)&&(_e(s,r),Bi(r)&&!le))for(const t of r.getChildren())if(Pi(t)){_e(El($t,t.getKey()),t)}}else{const t=r.getTextContent();if(Ki(r)){const t=r.decorate($t,Wt);null!==t&&Oe(e,t),i&&(xe(r).size>0||xe(o).size>0)&&ve(o,r,s)}Ht+=t}if(!ce&&Bi(r)){const t=r.getLatest();if(t.__cachedText!==Ht){const e=t.getWritable();e.__cachedText=Ht,r=e}}return se.$decorateDOM(r,o,s,$t),Bt(r),s}function Oe(t,e){let n=$t._pendingDecorators;const o=$t._decorators;if(null===n){if(o[t]===e)return;n=tl($t)}n[t]=e}function Me(t){let e=t.nextSibling;return null!==e&&e===$t._blockCursorElement&&(e=e.nextSibling),e}function Ae(t,e){const n=new Set;for(let o=e;o{for(const n of e){const e=ne.get(n);if(void 0===e)continue;const o=e.__parent;if(null===o)continue;let r=t.get(o);void 0===r&&(r=new Set,t.set(o,r)),r.add(n)}};return e(Qt.keys()),e(Zt),t}();const s=new Map;return ie=s,we("root",null),$t=void 0,Ut=void 0,Qt=void 0,Zt=void 0,te=void 0,ee=void 0,ne=void 0,Wt=void 0,oe=void 0,re=void 0,ie=void 0,se=ps,s}function Fe(e){const n=oe.get(e);return void 0===n&&t(75,e),n} +-/*@__INLINE__*/function Pe(t){return{type:t}}const Ie=/* @__PURE__ */Pe("SELECTION_CHANGE_COMMAND"),Le=/* @__PURE__ */Pe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ke=/* @__PURE__ */Pe("CLICK_COMMAND"),ze=/* @__PURE__ */Pe("BEFORE_INPUT_COMMAND"),Be=/* @__PURE__ */Pe("INPUT_COMMAND"),Re=/* @__PURE__ */Pe("COMPOSITION_START_COMMAND"),We=/* @__PURE__ */Pe("COMPOSITION_END_COMMAND"),$e=/* @__PURE__ */Pe("DELETE_CHARACTER_COMMAND"),Ue=/* @__PURE__ */Pe("INSERT_LINE_BREAK_COMMAND"),He=/* @__PURE__ */Pe("INSERT_PARAGRAPH_COMMAND"),je=/* @__PURE__ */Pe("CONTROLLED_TEXT_INSERTION_COMMAND"),Je=/* @__PURE__ */Pe("PASTE_COMMAND"),Ve=/* @__PURE__ */Pe("REMOVE_TEXT_COMMAND"),qe=/* @__PURE__ */Pe("DELETE_WORD_COMMAND"),Ye=/* @__PURE__ */Pe("DELETE_LINE_COMMAND"),Ge=/* @__PURE__ */Pe("FORMAT_TEXT_COMMAND"),Xe=/* @__PURE__ */Pe("SET_TEXT_FORMAT_COMMAND"),Qe=/* @__PURE__ */Pe("UNDO_COMMAND"),Ze=/* @__PURE__ */Pe("REDO_COMMAND"),tn=/* @__PURE__ */Pe("KEYDOWN_COMMAND"),en=/* @__PURE__ */Pe("KEY_ARROW_RIGHT_COMMAND"),nn=/* @__PURE__ */Pe("MOVE_TO_END"),on=/* @__PURE__ */Pe("KEY_ARROW_LEFT_COMMAND"),rn=/* @__PURE__ */Pe("MOVE_TO_START"),sn=/* @__PURE__ */Pe("KEY_ARROW_UP_COMMAND"),ln=/* @__PURE__ */Pe("KEY_ARROW_DOWN_COMMAND"),cn=/* @__PURE__ */Pe("KEY_ENTER_COMMAND"),an=/* @__PURE__ */Pe("KEY_SPACE_COMMAND"),un=/* @__PURE__ */Pe("KEY_BACKSPACE_COMMAND"),fn=/* @__PURE__ */Pe("KEY_ESCAPE_COMMAND"),dn=/* @__PURE__ */Pe("KEY_DELETE_COMMAND"),hn=/* @__PURE__ */Pe("KEY_TAB_COMMAND"),gn=/* @__PURE__ */Pe("INSERT_TAB_COMMAND"),_n=/* @__PURE__ */Pe("INDENT_CONTENT_COMMAND"),pn=/* @__PURE__ */Pe("OUTDENT_CONTENT_COMMAND"),yn=/* @__PURE__ */Pe("DROP_COMMAND"),mn=/* @__PURE__ */Pe("FORMAT_ELEMENT_COMMAND"),xn=/* @__PURE__ */Pe("DRAGSTART_COMMAND"),Cn=/* @__PURE__ */Pe("DRAGOVER_COMMAND"),Sn=/* @__PURE__ */Pe("DRAGEND_COMMAND"),vn=/* @__PURE__ */Pe("COPY_COMMAND"),Tn=/* @__PURE__ */Pe("CUT_COMMAND"),kn=/* @__PURE__ */Pe("SELECT_ALL_COMMAND"),bn=/* @__PURE__ */Pe("CLEAR_EDITOR_COMMAND"),Nn=/* @__PURE__ */Pe("CLEAR_HISTORY_COMMAND"),En=/* @__PURE__ */Pe("CAN_REDO_COMMAND"),wn=/* @__PURE__ */Pe("CAN_UNDO_COMMAND"),On=/* @__PURE__ */Pe("FOCUS_COMMAND"),Mn=/* @__PURE__ */Pe("BLUR_COMMAND"),An=/* @__PURE__ */Pe("KEY_MODIFIER_COMMAND");function Dn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const i=()=>{const t=e.get(n);t&&t.holders.delete(i)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(i),i}}}function Fn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Pn=Object.freeze({}),In=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Jn(n);if(e.isComposing())return;Nl(e,tn,t)}],["pointerdown",function(t,e){const n=ac(t),o=t.pointerType;_c(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&Ai(e,()=>{Rc(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Nl(e,Re,t)}],["compositionend",function(t,e){const n=e._inputState;i?n.compositionPhase="ending-firefox":l||!a&&!d?Nl(e,We,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Jn(n),Ai(e,()=>{qn(t,e)||e.dispatchCommand(Be,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){Ai(e,()=>{const n=Kr(),o=Jl(Il(e)),r=zr();if(o)if(ur(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Bi(e)&&1===nl().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=nc(o,e._rootElement).anchorNode;if(gc(n)||zs(n)){ol(Lr(r,o,e,t))}}if(i&&null!==o&&0===o.rangeCount){const n=e._rootElement;if(null!==n&&t.target===n){const i=t.clientY;let s=n.childNodes.length;for(let t=0;tfunction(t,e){const n=t.inputType;if("deleteCompositionText"===n||i&&bl(e))return;if("insertCompositionText"===n)return;Ai(e,()=>{qn(t,e)||Nl(e,ze,t)},{event:t})}(t,e)]);const Ln=new WeakMap,Kn=new WeakMap,zn=Dn(t=>(t.addEventListener("selectionchange",ro),()=>t.removeEventListener("selectionchange",ro)));function Bn(t,e,n,o,r,i){const l=t.anchor,c=t.focus,a=l.getNode(),u=_i();let f;if(void 0!==i)f=i;else{const t=Jl(Il(u));f=null!==t?nc(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Xo(a)||(!r&&(!s||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!s)&&null!==g&&!a.isComposing()&&d!==wc(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Ls(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Xo(e)||Pi(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function Rn(t,e){return zs(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Wn(e,n,o){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:l}=nc(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,Rn(r,i)&&Rn(s,l)&&!c.postDeleteSelectionToRestore)||Ai(n,()=>{if(!o)return void ol(null);if(!As(n,r,s))return;let a=Kr();if(c.postDeleteSelectionToRestore&&ur(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),ol(a))}if(c.postDeleteSelectionToRestore=null,ur(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===s&&(a.dirty=!0);const i=Il(n).event,l=i?i.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=nl(),y=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)$n(a,f,d);else if("text"===o.type)Xo(u)||t(141),Un(a,u);else if("element"===o.type&&!y){Pi(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();$n(t,n,o)}(a,e):$n(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,s=a.isBackward(),c=s?l:i,u=s?i:l,f=s?e:t,d=s?t:e;let h=2047,g=!1;for(let t=0;tJn(t),0)}function qn(t,e){const n=ac(t);if(gc(n)&&Rc(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=cc(o.ownerDocument);return null!==r&&o.contains(r)&&Rc(r,e)}function Yn(e){const n=e.inputType,o=Hn(e),r=_i(),i=r._inputState,s=Kr();if("insertText"===n&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Jn(i),e.preventDefault(),ur(s)&&!s.isCollapsed()){const t=s.isBackward()?s.anchor:s.focus;s.anchor.set(t.key,t.offset,t.type),s.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===s){const t=zr();if(!ur(t))return!0;ol(t.clone())}if(ur(s)){const n=s.anchor.key===s.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{Ai(r,()=>{Vs(null)})},30),ur(s)){const e=s.anchor.getNode();e.markDirty(),Xo(e)||t(142),Un(s,e)}}else{if(Vs(null),l&&null!==o&&!o.collapsed&&(s.applyDOMRange(o),!s.isCollapsed()))return e.preventDefault(),s.removeText(),!0;e.preventDefault();const t=s.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===s.anchor.offset&&s.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&s.isCollapsed()&&(d=!Ki(kl(s.anchor,!0))),!d){Nl(r,$e,!0);const t=Kr();f&&ur(t)&&t.isCollapsed()&&(i.postDeleteSelectionToRestore=t,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ur(s))return!0;const c=e.data;null!==i.unprocessedBeforeInputData&&ul(!1,r,i.unprocessedBeforeInputData),s.dirty&&null===i.unprocessedBeforeInputData||!s.isCollapsed()||Bi(s.anchor.getNode())||null===o||s.applyDOMRange(o),i.unprocessedBeforeInputData=null;const a=s.anchor,u=s.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Nl(r,Ue,!1);else if(c===D)e.preventDefault(),Nl(r,He);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=c&&Bn(s,o,c,e.timeStamp,!0)?(e.preventDefault(),Nl(r,je,c),jn(c)):i.unprocessedBeforeInputData=c;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Nl(r,je,e);jn((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;Vs(null),t||Nl(r,je,e),Zn(n);break}case"insertLineBreak":Vs(null),Nl(r,Ue,!1);break;case"insertParagraph":Vs(null),i.isInsertLineBreak&&!l?(i.isInsertLineBreak=!1,Nl(r,Ue,!1)):Nl(r,He);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Nl(r,Je,e);break;case"deleteByComposition":(function(t,e){return t!==e||Pi(t)||Pi(e)||!Ls(t)||!Ls(e)})(d,h)&&Nl(r,Ve,e);break;case"deleteByDrag":Al(No),Nl(r,Ve,e);break;case"deleteByCut":Nl(r,Ve,e);break;case"deleteContent":Nl(r,$e,!1);break;case"deleteWordBackward":Nl(r,qe,!0);break;case"deleteWordForward":Nl(r,qe,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Nl(r,Ye,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Nl(r,Ye,!1);break;case"formatStrikeThrough":Nl(r,Ge,"strikethrough");break;case"formatBold":Nl(r,Ge,"bold");break;case"formatItalic":Nl(r,Ge,"italic");break;case"formatUnderline":Nl(r,Ge,"underline");break;case"historyUndo":Nl(r,Qe);break;case"historyRedo":Nl(r,Ze)}return!0}function Gn(t){const e=_i(),n=e._inputState,o=Kr(),r=t.data,l=Hn(t);let c=!1;if(null!=r&&ur(o)){const a=Jl(Il(e)),u=null!==a?nc(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Xo(h)&&Ks(h);if(!d&&!g&&Bn(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=to(e,r);if(n.compositionPhase="idle",t)return Al(wo),rl(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;s&&!o.isCollapsed()&&Xo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===al(u.anchorNode)||Nl(e,je,r);const _=r.length;i&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,Vs(null))}}if(!c){ul(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(to(e,r||void 0),Al(wo),n.compositionPhase="idle")}return rl(),!0}function Xn(t){const e=_i(),n=e._inputState,o=Kr();if(ur(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,i=o.anchor.getNode();if(Vs(r.key),Al(Eo),t.timeStamp{to(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return _l(t,"ArrowRight",{shiftKey:"any"})}(t))Nl(e,en,t);else if(function(t){return _l(t,"ArrowRight",{...pl,shiftKey:"any"})}(t))Nl(e,nn,t);else if(function(t){return _l(t,"ArrowLeft",{shiftKey:"any"})}(t))Nl(e,on,t);else if(function(t){return _l(t,"ArrowLeft",{...pl,shiftKey:"any"})}(t))Nl(e,rn,t);else if(function(t){return _l(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Nl(e,sn,t);else if(function(t){return _l(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Nl(e,ln,t);else if(function(t){return _l(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Nl(e,cn,t);else if(function(t){return" "===t.key}(t))Nl(e,an,t);else if(function(t){return r&&_l(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Nl(e,Ue,!0);else if(function(t){return _l(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Nl(e,cn,t);else if(function(t){return _l(t,"Backspace",{shiftKey:"any"})||r&&_l(t,"h",{ctrlKey:!0})}(t))ml(t)?Nl(e,un,t)&&Vn(n):(t.preventDefault(),Nl(e,$e,!0));else if(function(t){return"Escape"===t.key}(t))Nl(e,fn,t);else if(function(t){return _l(t,"Delete",{})||r&&_l(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Nl(e,$e,!1)):Nl(e,dn,t);else if(function(t){return _l(t,"Backspace",yl)}(t))t.preventDefault(),Nl(e,qe,!0);else if(function(t){return _l(t,"Delete",yl)}(t))t.preventDefault(),Nl(e,qe,!1);else if(function(t){return r&&_l(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Nl(e,Ye,!0);else if(function(t){return r&&(_l(t,"Delete",{metaKey:!0})||_l(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Nl(e,Ye,!1);else if(function(t){return _l(t,"b",pl)}(t))t.preventDefault(),Nl(e,Ge,"bold");else if(function(t){return _l(t,"u",pl)}(t))t.preventDefault(),Nl(e,Ge,"underline");else if(function(t){return _l(t,"i",pl)}(t))t.preventDefault(),Nl(e,Ge,"italic");else if(function(t){return _l(t,"Tab",{shiftKey:"any"})}(t))Nl(e,hn,t);else if(function(t){return _l(t,"z",pl)}(t))t.preventDefault(),Nl(e,Qe);else if(function(t){if(r)return _l(t,"z",{metaKey:!0,shiftKey:!0});return _l(t,"y",{ctrlKey:!0})||_l(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Nl(e,Ze);else{const o=e._editorState._selection;!function(t){return _l(t,"a",pl)}(t)?null===o||ur(o)||(!function(t){return _l(t,"c",pl)}(t)?function(t){return _l(t,"x",pl)}(t)&&(t.preventDefault(),Nl(e,Tn,t)):(t.preventDefault(),Nl(e,vn,t))):(t.preventDefault(),Nl(e,kn,t)&&Vn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(An,t),!0}function no(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const oo=new Map;function ro(t){const e=Vl(t.target);if(null===e)return;const n=Ol(t.target);let o=null,r=null;const i=null!==n?Kn.get(n):void 0;if(null!==n){if(void 0!==i){const t=i.editors;let n=i.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&ql(e._rootElement.getRootNode())){n=!0;break}i.hasShadowEditor=n}if(n){let n=null,i=null;for(const s of t){const t=s._rootElement;if(null===t)continue;const l=nc(e,t).anchorNode;if(null!==l&&Fs(l)===s){if(ql(t.getRootNode())){o=s,r=l;break}null===n&&(n=s,i=l)}}null===o&&null!==n&&(o=n,r=i)}else{const t=e.anchorNode;null===t||gc(t)&&null!==t.shadowRoot||(o=Fs(t),null!==o&&(r=t))}}if(null===o){const t=cc(n);o=null!==t?Fs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==i)for(const t of i.editors)t._inputState.isSelectionChangeFromMouseDown=!1;Ai(o,()=>{const n=zr(),i=r??nc(e,o._rootElement).anchorNode;if(gc(i)||zs(i)){ol(Lr(n,e,o,t))}})}const s=ll(o),l=s[s.length-1],c=l._key,a=oo.get(c),u=a||l;u!==o&&Wn(e,u,!1),Wn(e,o,!0),o!==l?oo.set(c,o):a&&oo.delete(c)}function io(t){t._lexicalHandled=!0}function so(t){return!0===t._lexicalHandled}const lo=()=>{};function co(e){const n=Ln.get(e);if(void 0===n)return void lo();const o=Kn.get(n);if(void 0===o)return void lo();Ln.delete(e);const r=Ps(e);Ds(r)?(!function(t){if(null!==t._parentEditor){const e=ll(t),n=e[e.length-1]._key;oo.get(n)===t&&oo.delete(n)}else oo.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const i=no(e);for(let t=0;tt.__key===this.__key);if(Xo(this))return n;if(ur(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(Ki(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:Ys(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Bl(n)||null!==ta(e))return Pi(e)||e===this&&Ki(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:Ys(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:Ys(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=Pi(this)?this:this.getParent(),n=Pi(t)?t:t.getParent(),o=e&&n?Za(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Za(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Ga(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Fl(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let i=this;for(;null!==i;){const s=i.__key;if(r.has(s)||(r.add(s),o.push(i)),i===e)break;const l=Pi(i)?n?i.getFirstChild():i.getLastChild():null;if(null!==l){i=l;continue}const c=n?i.getNextSibling():i.getPreviousSibling();if(null!==c){i=c;continue}const a=i.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);i=u}return n||o.reverse(),o}isDirty(){const t=_i()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(ho(this))return this;const e=Ys(this.__key);return null===e&&t(113),e}getWritable(){if(ho(this))return this;fi();const t=hi(),e=_i(),n=t._nodeMap,o=this.__key,r=this.getLatest(),i=e._cloneNotNeeded,s=Kr();if(null!==s&&s.setCachedNodes(null),i.has(o))return Js(r),r;const l=Dc(r);return i.add(o),Js(l),n.set(o,l),l}getTextContent(){return ha(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new q(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of Nt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&bt(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){ao(this,!0,t)}replace(e,n){fi();let o=Kr();null!==o&&(o=o.clone()),$l(this,e);const r=this.getLatest(),i=this.__key,s=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;Hs(l),null!==u&&ur(o)&&Br(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(ao(r,!1,!0),null===d)c.__first=s;else{d.getWritable().__next=s}if(l.__prev=g,null===h)c.__last=s;else{h.getWritable().__prev=s}l.__next=_,l.__parent=p,c.__size=a;let y=0;n&&(Pi(this)&&Pi(l)||t(139),y=l.getChildrenSize(),l.splice(y,0,this.getChildren()));const m=ia(this);if(m.length>0){Qc(this)&&Qc(l)||t(368,this.__key,l.__key);for(const t of m){const e=sa(this,t);null!==e&&(ya(this,t),pa(l,t,e))}}if(ur(o)){ol(o);const t=o.anchor,e=o.focus;t.key===i&&(n&&"element"===t.type?t.set(l.__key,y+t.offset,"element"):ir(t,l)),e.key===i&&(n&&"element"===e.type?e.set(l.__key,y+e.offset,"element"):ir(e,l))}return qs()===i&&Vs(s),l}insertAfter(t,e=!0){fi(),$l(this,t);const n=this.getWritable(),o=t.getWritable();ma(this.getParentOrThrow());const r=o.getParent(),i=Kr();let s=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(ur(i)){const t=r.__key,e=i.anchor,o=i.focus;s="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}Hs(o),e&&ur(i)&&Br(i,r,n,-1)}else Hs(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&ur(i)){const t=this.getIndexWithinParent();Br(i,a,t+1);const e=a.__key;s&&i.anchor.set(e,t+2,"element"),l&&i.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){fi(),$l(this,t);const n=this.getWritable(),o=t.getWritable();ma(this.getParentOrThrow());const r=o.__key,i=Kr(),s=o.getParent(),l=null!==s?o.getIndexWithinParent():-1;Hs(o),null!==s&&e&&ur(i)&&Br(i,s,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&ur(i)){Br(i,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return es()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){fi();const n=ea(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(Pi(o))return o.select();if(!Xo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){fi();const n=ea(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(Pi(o))return o.select(0,0);if(!Xo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function po(t){return t instanceof _o}const yo="historic",mo="history-push",xo="history-merge",Co="paste",So="cut",vo="collaboration",To="skip-collab",ko="skip-scroll-into-view",bo="skip-dom-selection",No="skip-selection-focus",Eo="composition-start",wo="composition-end",Oo="!important";function Mo(t){const e={};if(!t)return e;let n="",o="",r=null,i=!1,s=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===Oo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function Do(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):Ao(t,n,o)}}function Fo(t,e,n=""){if(e===n)return;const o=Mo(n),r=Mo(e);for(const e in r)delete o[e],Ao(t,e,r[e]);for(const e in o)t.removeProperty(e)}function Po(t,e){return 16&e?"code":e&T?"mark":32&e?"sub":64&e?"sup":null}function Io(t,e){return 1&e?"strong":2&e?"em":"span"}function Lo(t,e,n,o,r){const i=o.classList;let s=Cl(r,"base");void 0!==s&&i.add(...s),s=Cl(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==s&&(8&n&&4&n?(l=!0,c||i.add(...s)):c&&i.remove(...s));for(const t in z){const o=z[t];if(s=Cl(r,t),void 0!==s)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&i.remove(...s);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&i.add(...s)}else e&o&&i.remove(...s)}}function Ko(t,e,n){const o=n.isComposing(),r=t+(o?A:""),s=vc(),l=Tc(s).$getDOMSlot(n,e,s),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(Zl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(o||i){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,i=0;for(;r({conversion:Jo,priority:0}),b:()=>({conversion:Uo,priority:0}),code:()=>({conversion:Yo,priority:0}),em:()=>({conversion:Yo,priority:0}),i:()=>({conversion:Yo,priority:0}),mark:()=>({conversion:Yo,priority:0}),s:()=>({conversion:Yo,priority:0}),span:()=>({conversion:$o,priority:0}),strong:()=>({conversion:Yo,priority:0}),sub:()=>({conversion:Yo,priority:0}),sup:()=>({conversion:Yo,priority:0}),u:()=>({conversion:Yo,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",e){super(e),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return U[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===qs()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const e=z[t];return 0!==(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(t,e){return Ws(this.getLatest().__format,t,e)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,e){const n=this.__format,o=Po(0,n),r=Io(0,n),i=null===o?r:o,s=Zl().createElement(i);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),null!==o&&(l=Zl().createElement(r),s.appendChild(l));zo(l,this,0,n,this.__text,t);const c=this.__style;return""!==c&&Fo(s.style,c),s}updateDOM(e,n,o){const r=this.__text,i=e.__format,s=this.__format,l=Po(0,i),c=Po(0,s),a=Io(0,i),u=Io(0,s);if((null===l?a:l)!==(null===c?u:c))return!0;if(l===c&&a!==u){const e=n.firstChild;null==e&&t(48);const i=Zl().createElement(u);return zo(i,this,0,s,r,o),n.replaceChild(i,e),!1}let f=n;null!==c&&null!==l&&(f=n.firstChild,null==f&&t(49)),Ko(r,f,this);const d=o.theme.text;void 0!==d&&i!==s&&Lo(0,i,s,f,d);const h=e.__style,g=this.__style;return h!==g&&Fo(n.style,g,h),!1}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return gc(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Bo(n,"b")),this.hasFormat("italic")&&(n=Bo(n,"i")),this.hasFormat("strikethrough")&&(n=Bo(n,"s")),this.hasFormat("underline")&&(n=Bo(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?z[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?B[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=Ws(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=$[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){fi();let n=t,o=e;const r=Kr(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const t=i.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!ur(r))return Dr(s,n,s,o,"text","text");{const t=qs();t!==r.anchor.key&&t!==r.focus.key||Vs(s),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),i=r.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=Kr();if(o&&ur(c)){const e=t+s;c.setTextNodeRange(r,e,r,e)}const a=i.slice(0,l)+n+i.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){fi();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=qs(),i=n.length;t.sort((t,e)=>t-e),t.push(i);const s=[],l=t.length;for(let e=0,o=0;ee&&(s.push(n.slice(e,r)),e=r)}const c=s.length;if(1===c)return[e];const a=s[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,y=null;const m=Kr();if(ur(m)){const[t,e]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(y=e)}e.isSegmented()?(f=Go(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=At(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=v&&(p.set(t.getKey(),C-v,"text"),C=v){y.set(t.getKey(),S-v,"text");break}v=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&Js(e);null!==n&&Js(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),ur(m)&&Br(m,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,i=this.__text,s=i.length;qs()===r&&Vs(o);const l=Kr();if(ur(l)){const t=l.anchor,i=l.focus;null!==t&&t.key===r&&$r(t,n,o,e,s),null!==i&&i.key===r&&$r(i,n,o,e,s)}const c=e.__text,a=n?c+i:i+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function $o(t){return{forChild:Qo(t.style),node:null}}function Uo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Qo(e.style,n?void 0:"bold"),node:null}}const Ho=new WeakMap;function jo(t){if(!gc(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Jo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Ho.get(n))&&!jo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=Vo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Go(o)}}function Vo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,gc(n)){const t=n.style.display;if(""===t&&!mc(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(zs(n))return n;if("BR"===n.nodeName)return null}}const qo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yo(t){const e=qo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Qo(t.style,e),node:null}}function Go(t=""){return Wl(new Wo(t))}function Xo(t){return t instanceof Wo}function Qo(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,i=o.includes("line-through"),s="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Xo(t)||Ro(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),i&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),s&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Zo extends Wo{$config(){return this.config("tab",{extends:Wo})}constructor(t=void 0){super("\t",t),this.__detail=2}createDOM(t){const e=super.createDOM(t),n=Cl(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function tr(){return Wl(new Zo)}function er(t){return t instanceof Zo}class nr{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!Pi(e)){const t=e.getNextSibling();if(Xo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function ir(t,e){if(Pi(e)){const n=e.getLastDescendant();Pi(n)||Xo(n)?rr(t,n):rr(t,e)}else rr(t,e)}function sr(t,e,n,o){const r=t.getNode(),i=r.getChildAtIndex(t.offset),s=Go();if(s.setFormat(n),s.setStyle(o),ns(i))i.splice(0,0,[s]);else if(null!==i){const t=Bl(r)?es().append(s):s;i.insertBefore(t)}else if(Bl(r)){const t=r.getLastChild();Pi(t)&&!t.isInline()&&t.isEmpty()?t.append(s):r.append(es().append(s))}else r.append(s);t.is(e)&&e.set(s.__key,0,"text"),t.set(s.__key,0,"text")}function lr(e,n,o,r){const i=e.anchor.getNode();Xo(i)||t(398);const s=e.anchor.offset,l=Go(n);l.setFormat(o),l.setStyle(r);const c=i.getParentOrThrow();if(0===s)c.isInline()&&!i.__prev?c.insertBefore(l):i.insertBefore(l,!1);else if(s===i.getTextContentSize())c.isInline()&&!i.__next?c.insertAfter(l):i.insertAfter(l,!1);else{const[t]=i.splitText(s);t.insertAfter(l,!1)}""===i.getTextContent()&&i.isAttached()&&i.remove(),l.selectEnd(),l.isComposing()&&"text"===e.anchor.type&&e.anchor.set(e.anchor.key,e.anchor.offset-n.length,e.anchor.type)}class cr{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!dr(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new cr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===ta(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Xo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===ta(t));if((Kr()||zr())===this&&t[0]){const e=Ia(t[0],"next");nu(Va(e,e))}for(const e of t)e.remove();ar()}}function ar(){const t=nl();if(t.isEmpty()){const e=es();t.append(e),e.select()}}function ur(t){return t instanceof fr}class fr{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ur(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,i=new Set;for(const n of t)if(Aa(n)){const{origin:t}=n;0===e.length?r.add(t):(i.add(t),e.push(t))}else{const{origin:t}=n;Pi(t)&&i.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(Ma(t.focus)&&Pi(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=Ba(t.focus.origin,"previous");Aa(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Wa(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!Pi(t)||i.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=au(t.anchor),o=au(t.anchor.getFlipped()),r=t=>wa(t)?t.origin:t.getNodeAtCaret(),i=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(i)}return e}(du(ru(this),"next"));return ui()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,i=o.isBefore(r),[s,l]=yr(this);let c="",a=!0;for(let u=0;u(Pi(t)||Ki(t))&&!t.isInline())){Pi(r)||t(211,o.constructor.name,o.getType());const n=Xr(this);return r.splice(n,0,e),void i.selectEnd()}if(Pi(r)&&null!==ta(r)){const t=Xr(this),n=Gr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=ti(e),n=t.getLastDescendant();let o=tu(this.anchor,"next");for(const e of t.getChildren())o=mu(e,o);return void(null!==n&&n.selectEnd())}if(Pi(r)&&!r.isParentRequired()&&!Bl(r.getParentOrThrow())){const t=Xr(this),n=Gr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const s=ti(e),l=s.getLastDescendant(),c=s.getChildren(),a=!Pi(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=qc(o,Sc));const u=c[c.length-1];let f=c[0];var d;Pi(d=f)&&Sc(d)&&!d.isEmpty()&&Pi(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Pi(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const i=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),i.push(r);let s=e;for(const t of i)s=s.insertAfter(t)}(r,f));const h=qc(l,Sc);a&&Pi(h)&&(a.canMergeWhenEmpty()||Sc(u))&&(h.append(...a.getChildren()),a.remove()),Pi(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=Pi(r)?r.getLastChild():null;Yi(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Bl(e)){const t=es();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Xr(this),o=qc(this.anchor.getNode(),Sc);if(null!==o&&null!==ta(o))return null;Pi(o)||t(213);const r=o.getChildAtIndex(n),i=r?[r,...r.getNextSiblings()]:[],s=o.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const e=qi();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,i]=yr(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=s?[i,r]:[r,i];if(0===e)return[];if(1===e){if(Xo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Xo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Xo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(ei(this,t,e,n))return;const o="move"===t,r=_i(),i=Jl(Il(r));if(!i)return;const s=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===s||!Pi(c)||c.isInline()||c.canBeEmpty()||jl(s,r,l);const a=El(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Xo(c)?wc(c,a,r):null),this.dirty){const t=El(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Xo(n)?wc(n,t,r):null}e&&u&&Ur(i,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Xo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Ia(c,e?"previous":"next").getNodeAtCaret();if(Xo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?wc(t,n,r):null;if(o){const t=e?o.length:0;Ur(i,o,t,o,t)}}}}}if(Cr(i,t,e?"backward":"forward",n),i.rangeCount>0){const t=tc(i,r._rootElement),n=t||i.getRangeAt(0),s=this.anchor.getNode(),l=Bi(s)?s:Kl(s);if(this.applyDOMRange(n),this.dirty=!0,!o){Sr(this,e,l);(t?"backward"!==i.direction:i.anchorNode===n.startContainer&&i.anchorOffset===n.startOffset)||xr(this)}}"lineboundary"===n&&ei(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&Pi(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(Pi(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=ja(tu(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Aa(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=au(e);ou(this,Va(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(Ma(e)){if(Pi(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(Ki(e.origin)){if(e.origin.isIsolated());else if(ia(e.origin).length>0){if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),ol(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),ol(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(ia(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(ou(this,Va(!e.origin.isEmpty()&&n.isEmpty()?iu(Ia(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==ta(t))return;if(Pi(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(vr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&mr(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,i=o.getTextContentSize();if(o.is(n)||t&&e!==i||!t&&0!==e)return void kr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,i=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==i)return void kr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),i=o.getNode();if(r===i&&"text"===n.type&&"text"===o.type){const t=n.offset,i=o.offset,s=t0&&(g===h.getTextContentSize()||Ks(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;t{for(const[e,o]of n)t=Ws(t,e,o?z[e]:0);return t})}function _r(t,e,n=null){const o=null===n&&ur(t)?Ws(t.format,e,null):n;hr(t,t=>Ws(t,e,o))}function pr(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function yr(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[pr(n),pr(o)]}function mr(t,e){for(let n=e;n;n=n.getParent()){if(Pi(n)){if(n.collapseAtStart(t))return!0;if(Bl(n))break}if(n.getPreviousSibling())break}return!1}function xr(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,i=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,i,!0)}function Cr(t,e,n,o){t.modify(e,n,o)}function Sr(t,e,n){const o=t.getNodes(),r=o.filter(t=>Fl(t,n));if(0===r.length||r.length===o.length)return!1;const i=e?r[0]:r[r.length-1],s=Pi(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function vr(t,e,n){if(ei(t,"extend",e,n))return;const o=_i(),r=Jl(Il(o));if(!r||"function"!=typeof r.modify)return;const i=o._blockCursorElement,s=o._rootElement,l=t.anchor,c=t.focus.getNode();null===s||null===i||!Pi(c)||c.isInline()||c.canBeEmpty()||jl(i,o,s);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Xo(e)?wc(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Ur(r,_,p,_,p),Cr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const y=tc(r,s)||r.getRangeAt(0),m=y.startContainer,x=y.startOffset;if(h&&"character"===n&&"text"===l.type&&Xo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Ia(u,e?"previous":"next").getNodeAtCaret();if(Xo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=m===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,v,T]=e?[m,x,f,d]:[f,d,m,x],k=Bi(u)?u:Kl(u);t.applyDOMRange({collapsed:!1,endContainer:v,endOffset:T,startContainer:C,startOffset:S}),t.dirty=!0,!Sr(t,e,k)&&e&&xr(t),"lineboundary"===n&&ei(t,"extend",e,n,"decorators")}const Tr=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function kr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),i=r.length;let s=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function br(e,n,o,r){let i,s=n,l=!1;if(gc(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;s===u&&u>0&&(c=!0,s=u-1),void 0!==Qs(e,r)||Rc(e,r)||(l=!0);let d=a[s],h=!1;if(d===f)d=a[s+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&s--}}if(i=il(d),Xo(i))s=Ka(i,c?"next":"previous");else{let a=il(e);if(null===a)return null;if(Pi(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=kc(a,l,r);[a,s]=u.resolveChildIndex(a,l,e,n),Pi(a)||t(215),c&&s>=a.getChildrenSize()&&(s=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(s);if(Pi(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=Pi(f)?f:f.getParentOrThrow()),s=0}Xo(f)?(i=f,a=null,s=Ka(f,c?"next":"previous")):f!==a&&c&&!h&&(Pi(a)||t(216),s=Math.min(a.getChildrenSize(),s+1))}else{const t=ea(a),o=null!==t?t:a,i=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&il(e)===a){const t=kc(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&Ki(a)&&(c="before")}s="before"===c?i:i+1,a=o.getParentOrThrow()}if(Pi(a))return[or(a.__key,s,"element"),l]}}else i=il(e);return Xo(i)?[or(i.__key,Ka(i,s,"clamp"),"text"),l]:null}function Nr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),i=r.getParent();if(e){if((n||!e)&&null===o&&Pi(i)&&i.isInline()){const e=i.getPreviousSibling();Xo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else Pi(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Xo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),i=r.getParent();if(e&&Pi(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&Pi(i)&&i.isInline()&&!i.canInsertTextAfter()&&i.getTextContentSize()>1){const e=i.getNextSibling();Xo(e)&&t.set(e.__key,0,"text")}}}function Er(t){const e=Ys(t.key);return null===e?null:oa(e)}function wr(t,e,n){const o=Er(t),r=Er(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const i=n(o,r);if(null!==o)return Pi(o)?e.set(o.getKey(),i?o.getChildrenSize():0,"element"):e.set(o.getKey(),i?o.getTextContentSize():0,"text"),!0;const s=ea(r);if(null===s)return!1;const l=s.getParent();if(null===l)return!1;const c=s.getIndexWithinParent();return e.set(l.getKey(),i?c+1:c,"element"),!0}function Or(t){const e=wr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=ea(n),e=ea(o);if(null!==t&&t.is(e)){for(const e of ra(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=ea(n),o=Ys(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=ea(o),i=Ys(t.key);return null!==r&&null!==i&&!r.is(i)&&!r.isParentOf(i)&&i.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function Mr(t,e,n,o,r,i){if(null===t||null===n||!As(r,t,n))return null;const s=br(t,e,ur(i)?i.anchor:null,r);if(null===s)return null;const l=br(n,o,ur(i)?i.focus:null,r);if(null===l)return null;const[c,a]=s,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=il(t),o=il(n);if(Ki(e)&&Ki(o))return null}const d=r._slotsUsed&&wr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return function(t,e){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);Nr(t,n,o),Nr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}(c,u),[c,u,a||f||d]}function Ar(t){return Pi(t)&&!t.isInline()}function Dr(t,e,n,o,r,i){const s=hi(),l=new fr(or(t,e,r),or(n,o,i),0,"");return l.dirty=!0,s._selection=l,l}function Fr(){const t=or("root",0,"element"),e=or("root",0,"element");return new fr(t,e,0,"")}function Pr(){return new cr(new Set)}function Ir(t,e){return Lr(null,t,e,null)}function Lr(t,e,n,o){const r=n._window;if(null===r)return null;const i=o||r.event,s=i?i.type:void 0,l="selectionchange"===s,c=!it&&(l||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let a,u,f,d;if(ur(t)&&!c)return t.clone();{if(null===e)return null;const o=nc(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===s)&&ur(t)&&!As(n,a,u))return t.clone()}const h=Mr(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let y=0,m="";if(ur(t)){const e=t.anchor;if(g.key===e.key)y=t.format,m=t.style;else{const t=g.getNode();Xo(t)?(y=t.getFormat(),m=t.getStyle()):Pi(t)&&(y=t.getTextFormat(),m=t.getTextStyle())}}const x=new fr(g,_,y,m);return p&&(x.dirty=!0),x}function Kr(){return hi()._selection}function zr(){return _i()._editorState._selection}function Br(t,e,n,o=1){const r=t.anchor,i=t.focus,s=r.getNode(),l=i.getNode();if(!e.is(s)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,s=r?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(s)){let t=0;r&&(t=s.getTextContentSize()),e.set(s.__key,t,"text"),o.set(s.__key,t,"text")}return}if(Pi(i)){const t=i.getChildrenSize(),o=n>=t,r=o?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(Pi(s)){const t=s.getChildrenSize(),e=r>=t,n=e?s.getChildAtIndex(t-1):s.getChildAtIndex(r);if(Xo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Wr(t,e,n,o,r){let i=null,s=0,l=null;null!==o?(i=o.__key,Xo(o)?(s=o.getTextContentSize(),l="text"):Pi(o)&&(s=o.getChildrenSize(),l="element")):null!==r&&(i=r.__key,Xo(r)?l="text":Pi(r)&&(l="element")),null!==i&&null!==l?t.set(i,s,l):(s=e.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function $r(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Ur(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Hr(t,e,n){const o=El(t,e.getKey());if(Pi(e)){const r=kc(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function jr(t,e,n,o,r,s){const l=s.getRootNode(),c=Bs(l)||ql(l)?cc(l):null;if(r.has(vo)&&c!==s||null!==c&&Os(c,c))return;const a=nc(o,s);let u;if(!ur(e))return void(null!==t&&As(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Hr(n,h,f.offset),[y,m]=Hr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let v=_,T=y,k=!1;if("text"===f.type?(v=Xo(h)?wc(h,_,n):null,k=h.getFormat()!==x||h.getStyle()!==C):ur(t)&&"text"===t.anchor.type&&(k=!0),"text"===d.type&&(T=Xo(g)?wc(g,y,n):null),null!==v&&null!==T){if(S&&(null===t||k||ur(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,i){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:i}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===m&&a.anchorNode===v&&a.focusNode===T){if(null===c||!s.contains(c)){const t=null!==c?Fs(c):null;null!==t&&t!==n||r.has(No)||s.focus({preventScroll:!0})}if("element"!==f.type)return}if(Ur(o,v,p,T,m),i&&e.isCollapsed()&&null!==s&&!r.has(No)){const t=lc(s);if(null===t||!s.contains(t)){const t=cc(s.ownerDocument),e=null!==t?Fs(t):null;null!==e&&e!==n||s.focus({preventScroll:!0})}}if(!r.has(ko)&&e.isCollapsed()&&null!==s&&s===lc(s)){const t=ur(e)&&"element"===e.anchor.type?v.childNodes[p]||null:(void 0===u&&(u=ec(o,s)),u);if(null!==t){let e;if(zs(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=Ol(n),r=Pl(o);if(null===o||null===r)return;const i=n.getBoundingClientRect();if(e.bottoma&&(f=l-a),0!==f)if(e)r.scrollBy(0,f);else{const t=u.scrollTop;u.scrollTop+=f;const e=u.scrollTop-t;s-=e,l-=e}if(e)break;u=wl(u)}}(n,e,s)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Jr(t){let e=Kr()||zr();null===e&&(e=nl().selectEnd()),e.insertNodes(t)}function Vr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function qr(t){const e=[];return Vr(t,{linebreak:()=>e.push(qi()),tab:()=>e.push(tr()),text:t=>e.push(Go(t))}),e}function Yr(){const t=Kr();return null===t?"":t.getTextContent()}function Gr(t){const e=[];for(const n of t)Yi(n)||(!Pi(n)&&!Ki(n)||n.isInline()?e.push(n):Pi(n)&&e.push(...Gr(n.getChildren())));return e}function Xr(e){let n=e;e.isCollapsed()||n.removeText();const o=Kr();ur(o)&&(n=o),ur(n)||t(161);const r=n.anchor;let i=r.getNode(),s=r.offset;for(;!Sc(i)&&null===ta(i);){const t=i;if([i,s]=Qr(i,s),t.is(i))break}return s}function Qr(t,e){const n=t.getParent();if(!n){const t=es();return nl().append(t),t.select(),[nl(),0]}if(Xo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!Pi(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new fr(or(t.__key,e,"element"),or(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Zr(t){return Yi(t)||Ll(t)||Xo(t)||t.isParentRequired()}function ti(t){const e=es();let n=null;for(let o=0;o99&&t(14)}function hi(){return null===ni&&t(195,yi()),ni}function gi(t){null!==hi()&&null===oi&&(oi=t),oi!==t&&e(378)}function _i(){return null===oi&&t(337,yi()),oi}function pi(){_i()._dirtyType=2}function yi(){let t=0;const e=new Set,n=Cs.version;if("undefined"!=typeof window)for(const o of Xl(document)){const r=Ps(o);if(Ds(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function mi(){return oi}function xi(t,e,n){const o=e.__type,r=Ns(t,o);let i=n.get(o);void 0===i&&(i=Array.from(r.transforms),n.set(o,i));const s=i.length;for(let t=0;t0&&wi(t,t._deferred));const i=t._editorState,s=i._selection,l=n._selection,c=0!==t._dirtyType,a=ni,u=ri,f=oi,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){oi=t,ni=n,ri=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=De(i,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),ii)throw e;return gs(t,null,o,n),gt(t),t._dirtyType=2,ii=!0,bi(t,i),void(ii=!1)}finally{h.observe(o,ai),t._updating=d,ni=a,ri=u,oi=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,y=t._normalizedNodes,m=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let i;for(i in o)r.has(i)||(o===n&&(o=tl(t)),delete o[i])}(t,n);const x=r?null:Jl(Il(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(s))&&null!==o&&!m.has(bo)){oi=t,ni=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&jl(e,t,o),jr(s,l,t,x,m,o)}!function(t,e,n){let o=t._blockCursorElement;if(ur(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(lc(e))){const r=n.anchor,i=r.getNode(),s=r.offset;let l=!1,c=null;if(s===i.getChildrenSize()){Hl(i.getChildAtIndex(s-1))&&(l=!0)}else{const e=i.getChildAtIndex(s);if(null!==e&&Hl(e)){const n=e.getPreviousSibling();(null===n||Hl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=kc(i,t.getElementByKey(i.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=Zl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=ku(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&jl(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,ai),oi=f,ni=a}}null!==g&&function(t,e,n,o,r){const i=Array.from(t._listeners.mutation),s=i.length;for(let t=0;t{li.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;Mi(t,e,o)}}(t)}(t,e)}finally{si=n}}function Ni(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function Ei(t,e,n,o){const r=ll(t);let i;if(!si)for(let t=0;t=0;t--)for(let s=0;s0&&l._updating){i=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(Ai(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return i&&i.update(()=>{Ei(i,e,n,o)}),!1}function wi(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Xo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Pt(o),void 0!==o&&Ci(o,i)&&xi(e,o,s),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){ci++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&Ci(c,i)&&xi(e,c,s)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,ci++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),Oi(e),function(t,e,n,o){const r=t._nodeMap,i=e._nodeMap,s=[];for(const[t]of o){const e=i.get(t);void 0!==e&&(e.isAttached()||(Pi(e)&&rt(e,t,r,i,s,o),r.has(t)||o.delete(t),s.push(t)))}for(const t of n){const e=i.get(t);void 0===e||e.isAttached()||(Qc(e)&&null!==e.__slots&&rt(e,t,r,i,s,n),r.has(t)||n.delete(t),s.push(t))}for(const t of s)i.delete(t);const l=_i(),c=l._compositionKey;null===c||i.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const i=a._selection;if(ur(i)){e._slotsUsed&&Or(i);const n=a._nodeMap,o=i.anchor.key,r=i.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else dr(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void bi(e)}finally{ni=f,ri=d,oi=h,e._updating=g,ci=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,bi(e)):u&&ws(()=>{bi(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ai(t,e,n){oi===t&&void 0===n?ui()?Mi(t,e,n):e():Mi(t,e,n)}function Di(t){if(Bl(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class Fi extends _o{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:Di,extends:_o})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return W[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===ia(this).length}isDirty(){const t=_i()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of ia(this)){const n=sa(this,e);Pi(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Xo(e)&&t.push(e),Pi(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;Pi(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;Pi(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return Pi(t)&&t.getLastDescendant()||t||null}const o=e[t];return Pi(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:Ys(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:Ys(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=ha(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&R[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){ho(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const s=i.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Bl(this)||this.getChildren().some(Xo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=kc(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function Pi(t){return t instanceof Fi}function Ii(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class Li extends _o{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ki(t){return t instanceof Li}class zi extends Fi{__cachedText;$config(){return this.config("root",{extends:Fi})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!ui()&&0!==_i()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)Pi(e)||Ki(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return nl().updateFromJSON(t)}collapseAtStart(){return!0}}function Bi(t){return t instanceof zi}function Ri(t){return new Hi(nt(t._nodeMap),null,t._slotsUsed)}function Wi(){return new Hi(new Map([["root",new zi]]),null,!1)}function $i(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),Pi(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const i=e.getChildren();for(let t=0;t0){const i={};for(const n of r){const r=sa(e,n);null===r&&t(366,o.name,n),i[n]=$i(r)}n.$slots=i}return n}function Ui(t){return t instanceof Hi}class Hi{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return ki(e&&e.editor||null,this,t)}clone(t){const e=new Hi(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return ki(null,this,()=>({root:$i(nl())}))}}class ji extends Fi{$config(){return this.config("artificial",{extends:Fi})}createDOM(t){return Zl().createElement("div")}}class Ji extends _o{$config(){return this.config("linebreak",{importDOM:{br:t=>Gi(t)||Xi(t)?null:{conversion:Vi,priority:0}}})}getTextContent(){return"\n"}createDOM(){return Zl().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function Vi(t){return{node:qi()}}function qi(){return Wl(new Ji)}function Yi(t){return t instanceof Ji}function Gi(t){const e=t.parentElement;if(null!==e&&Cc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Qi(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&Qi(n))return!0}}return!1}function Xi(t){const e=t.parentElement;if(null!==e&&Cc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Qi(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&Qi(o))return!0}return!1}function Qi(t){return zs(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Zi extends Fi{$config(){return this.config("paragraph",{extends:Fi,importDOM:{p:()=>({conversion:ts,priority:0})}})}createDOM(t){const e=Zl().createElement("p"),n=Cl(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}exportDOM(t){const{element:e}=super.exportDOM(t);if(gc(e)){this.isEmpty()&&e.append(Zl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Xo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=es();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Xo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function ts(t){const e=es();if(Lc(e,t),Pc(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in R&&e.setFormat(n)}return Ic(e,t),{node:e}}function es(){return Wl(new Zi)}function ns(t){return t instanceof Zi}function os(t){console.warn(t)}const rs=0,is=1,ss=2,ls=3,cs=4,as=-8,us=-7,fs=-6,ds=-5,hs=-4;function gs(t,e,n,o,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Wi(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const s=t._observer;null!==s&&(s.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",i.set("root",n),Xs(n,t,"root"))}function _s(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of jc(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const ps={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Es(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>Pi(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>Pi(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function ys(e){const n=e||{},o=mi(),r=n.theme||{},i=void 0===e?o:n.parentEditor||null,s=n.disableEvents||!1,l=Wi(),c=n.namespace||(null!==i?i._config.namespace:cl()),a=n.editorState,u=[zi,Wo,Ji,Zo,Zi,ji,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ze,Yn,rs),t.registerCommand(Be,Gn,rs),t.registerCommand(Re,Xn,rs),t.registerCommand(We,Qn,rs),t.registerCommand(tn,eo,rs)}(p),p}function ms(t,e){const n=t.get(e);t.delete(e),n&&n()}function xs(t,e,n){return t.set(e,n),ms.bind(null,t,e)}class Cs{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,i,s,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new ot,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=cl(),this._onError=r,this._onWarn=i,this._htmlConversions=s,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return xs(this._listeners.update,t)}registerEditableListener(t){return xs(this._listeners.editable,t)}registerDecoratorListener(t){return xs(this._listeners.decorator,t)}registerTextContentListener(t){return xs(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return Eu(xs(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new tt,new tt,new tt,new tt,new tt]);const i=r.get(e);void 0===i&&t(36,String(e));const s=function(t){return 7&t}(o),l=i[s];return s!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),i.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let i=r.get(e);void 0===i&&(i=new Set,r.set(e,i)),i.add(o);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(e,o),()=>{i.delete(o),0===i.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Ac(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Ac(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=Ys(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:xo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,...e){return Nl(this,t,...e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Cl(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,gs(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||co(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Pl(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,gt(this),this._updateTags.add(xo),bi(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;Ln.set(t,n);let o=Kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},Kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=no(t);r.push(zn.register(n));for(let n=0;n{so(t)||(io(t),(e.isEditable()||"click"===o)&&i(t,e))}:t=>{if(so(t))return;io(t);const n=e.isEditable();switch(o){case"cut":return n&&Nl(e,Tn,t);case"copy":return Nl(e,vn,t);case"paste":return n&&Nl(e,Je,t);case"dragstart":return n&&Nl(e,xn,t);case"dragover":return n&&Nl(e,Cn,t);case"dragend":return n&&Nl(e,Sn,t);case"focus":return n&&Nl(e,On,t);case"blur":return n&&Nl(e,Mn,t);case"drop":return n&&Nl(e,yn,t)}};r.push(Fn(t,o,s))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(xo),bi(this);Ni("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=Ri(e),o._selection=e._selection?e._selection.clone():null),ht(this);const r=this._pendingEditorState,i=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=i&&this._updateTags.add(i),bi(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Ai(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[t,e]of o._nodeMap.entries())Pi(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=Wi(),r=ni,i=ri,s=oi,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,ni=o,ri=!1,oi=e,vs(null);try{const r=e._nodes;Ti(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,ni=r,ri=i,oi=s}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&bi(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):Mi(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ai(this,()=>{const o=Kr(),r=nl();null!==o?o.dirty||ol(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Al("focus"),Dl(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=Jl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ni("editable",this,!0,t),this._slotsUsed&&this.update(()=>pi()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Cs.version=Z;let Ss=null;function vs(t){Ss=t}const Ts=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let ks=1;function bs(){ks=1}function Ns(e,n){const o=Es(e,n);return void 0===o&&t(30,n),o}function Es(t,e){return t._nodes.get(e)}const ws="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Os(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Bs(e)||ql(e)?cc(e):null})();if(!gc(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=Zs(n),r=n.nodeName;return po(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Ps(n))}const Ms=Os;function As(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return Fs(e)===t&&t.read("latest",()=>!Os(e))}function Ds(t){return t instanceof Cs}function Fs(t){let e=t;for(;null!=e;){const t=Ps(e);if(Ds(t))return t;e=wl(e)}return null}function Ps(t){return t?t.__lexicalEditor:null}function Is(t){return L.test(t)?"rtl":K.test(t)?"ltr":null}function Ls(t){return er(t)||t.isToken()}function Ks(t){return Ls(t)||t.isSegmented()}function zs(t){return _c(t)&&3===t.nodeType}function Bs(t){return _c(t)&&9===t.nodeType}function Rs(t){let e=t;for(;null!=e;){if(zs(e))return e;e=e.firstChild}return null}function Ws(t,e,n){const o=z[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~z.superscript:"superscript"===e?r&=~z.subscript:"lowercase"===e?(r&=~z.uppercase,r&=~z.capitalize):"uppercase"===e?(r&=~z.lowercase,r&=~z.capitalize):"capitalize"===e&&(r&=~z.lowercase,r&=~z.uppercase),r}function $s(t){return Xo(t)||Yi(t)||Ki(t)}function Us(t,e){const n=function(){const t=Ss;return Ss=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);fi(),di();const o=_i(),r=hi(),i=""+ks++;r._nodeMap.set(i,t),Pi(t)?o._dirtyElements.set(i,!0):o._dirtyLeaves.add(i),o._cloneNotNeeded.add(i),0===o._dirtyType&&(o._dirtyType=1),t.__key=i}function Hs(e){null!==ta(e)&&t(380,e.__key,String(ta(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==i?i.getWritable():null;null===r&&(o.__first=s),null===i&&(o.__last=l),null!==c&&(c.__next=s),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const js=Hs;function Js(e){di(),ho(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Zc(n)?n.__slotHost:null,r=hi(),i=_i(),s=r._nodeMap,l=i._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Zc(t)?t.__slotHost:null}}(o,s,l);const c=n.__key;0===i._dirtyType&&(i._dirtyType=1),Pi(e)?l.set(c,!0):i._dirtyLeaves.add(c)}function Vs(t){fi();const e=_i(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=Ys(n);null!==t&&t.getWritable()}if(null!==t){const e=Ys(t);null!==e&&e.getWritable()}}}function qs(){if(ui())return null;return _i()._compositionKey}function Ys(t,e){const n=(e||hi())._nodeMap.get(t);return void 0===n?null:n}function Gs(t,e){const n=Qs(t,_i());return void 0!==n?Ys(n,e):null}function Xs(t,e,n){t[`__lexicalKey_${e._key}`]=n}function Qs(t,e){return t[`__lexicalKey_${e._key}`]}function Zs(t,e){let n=t;for(;null!=n;){const t=Gs(n,e);if(null!==t)return t;n=wl(n)}return null}function tl(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function el(t){return t.read(()=>nl().getTextContent())}function nl(){return hi()._nodeMap.get("root")}function ol(t){fi();const e=hi();null!==t&&(t.dirty=!0,t.setCachedNodes(null),ur(t)&&_i()._slotsUsed&&Or(t)),e._selection=t}function rl(){fi();ht(_i())}function il(t){const e=function(t,e){let n=t;for(;null!=n;){const t=Qs(n,e);if(void 0!==t)return t;n=wl(n)}return null}(t,_i());return null===e?null:Ys(e)}function sl(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function ll(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function cl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function al(t){return zs(t)?t.nodeValue:null}function ul(t,e,n){const o=Jl(Il(e));if(null===o)return;const r=nc(o,e._rootElement),i=r.anchorNode;let{anchorOffset:s,focusOffset:l}=r;if(null!==i){let e=al(i);const o=Zs(i);if(null!==e&&Xo(o)){if((e===A||e===F)&&n){const t=n.length;e=n,s=t,l=t}null!==e&&fl(o,e,s,l,t)}}}function fl(t,e,n,o,r){let i=t;if(i.isAttached()&&(r||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let c=e;if((s||r)&&(e.endsWith(A)&&(c=e.slice(0,-A.length)),r)){const t=F;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=i.getTextContent();if(r||c!==u){const e=Kr();if(""===c){if(Vs(null),a||l||d)i.remove();else{const t=_i();dl(i,"",e),setTimeout(()=>{t.update(()=>{i.isAttached()&&""===i.getTextContent()&&i.remove()})},20)}return}const r=i.getParent(),u=zr(),f=i.getTextContentSize(),h=qs(),g=i.getKey();if(i.isToken()&&!s||null!==h&&g===h&&!s||ur(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!i.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!ur(e)||null===n||null===o)return void dl(i,c,e);if(e.setTextNodeRange(i,n,i,o),i.isSegmented()){const t=Go(i.getTextContent());i.replace(t),i=t}dl(i,c,e)}}}function dl(t,e,n){if(t.setTextContent(e),ur(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const i=n[r];"text"===i.type&&i.key===e&&(i.offset=Ka(t,i.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function hl(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function gl(t,e){return hl(t,e,"altKey")&&hl(t,e,"ctrlKey")&&hl(t,e,"shiftKey")&&hl(t,e,"metaKey")}function _l(t,e,n){if(!gl(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const pl={ctrlKey:!r,metaKey:r},yl={altKey:r,ctrlKey:!r};function ml(t){return"Backspace"===t.key}function xl(t){const e=nl();if(ur(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(Bi(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),It(t),t;const r=o.getTopLevelElementOrThrow(),i=r.getParent();if(null===i)return Pi(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),It(t)),t;const s=i;return e.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),It(t),t}{const t=e.select(0,e.getChildrenSize());return ol(It(t)),t}}function Cl(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=ku(r);return n[e]=t,t}return r}function Sl(e,n,o,r,i){if(0===o.size)return;const s=r.__type,l=r.__key,c=n.get(s);void 0===c&&t(33,s);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===i;(void 0===f||d)&&u.set(l,d?"updated":i)}function vl(t){const e=t.getType(),n=hi();if(n._readOnly){const t=Ac(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r}function Tl(t,e,n){const o=t.getParent();let r=n,i=t;return null!==o&&(e&&0===n?(r=i.getIndexWithinParent(),i=o):e||n!==i.getChildrenSize()||(r=i.getIndexWithinParent()+1,i=o)),i.getChildAtIndex(e?r-1:r)}function kl(t,e){const n=t.offset;if("element"===t.type){return Tl(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Tl(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function bl(t){const e=Il(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Nl(t,e,...n){return Ei(t,e,n[0],t)}function El(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function wl(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return ql(n)?n.host:null}function Ol(t){return Bs(t)?t:gc(t)?t.ownerDocument:null}function Ml(t){return _i()._updateTags.has(t)}function Al(t){fi();_i()._updateTags.add(t)}function Dl(t){fi();_i()._deferred.push(t)}function Fl(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Pl(t){const e=Ol(t);return e?e.defaultView:null}function Il(e){const n=e._window;return null===n&&t(78),n}function Ll(t){return Pi(t)&&t.isInline()||Ki(t)&&t.isInline()}function Kl(t){let e=t.getLatest();for(;null!==e;){if(null!==ta(e)&&Pi(e))return e;const t=e.getParentOrThrow();if(Bl(t))return t;e=t}return e}function zl(t){return Pi(t)&&t.isShadowRoot()}function Bl(t){return Bi(t)||zl(t)}function Rl(t,e=!1){const n=t.constructor.clone(t,Ts);return Us(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Wl(e){const n=_i(),o=e.getType(),r=Es(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:i,replaceWithKlass:s}=r;if(null!==i){const n=i(e),r=n.constructor;return null!==s?n instanceof s||t(201,s.name,s.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function $l(e,n){!Bi(e.getParent())||Pi(n)||Ki(n)||t(99)}function Ul(e){const n=Ys(e);return null===n&&t(63,e),n}function Hl(t){if(!t||t.isInline())return!1;if(Ki(t))return!0;if(Pi(t)){if(t.isShadowRoot()){const e=t.getParent();return!(Pi(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function jl(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function Jl(t){return n?(t||window).getSelection():null}function Vl(t){const e=Pl(t);return e?e.getSelection():null}function ql(t){return pc(t)&&"host"in t}const Yl=[];function Gl(t){const e=t.getRootNode();if(e===t||!ql(e))return Yl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!ql(t))break;n.push(t),o=t.host}return n}function*Xl(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Bs(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Ql(t){return null!==t?t.ownerDocument:document}function Zl(){const t=mi();return Ql(null!==t?t._rootElement:null)}function tc(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=Gl(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function ec(t,e){const n=tc(t,e);if(null!==n){const t=rc(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function nc(t,e){const n=tc(t,e);return null===n?t:ic(n,sc(t))}function oc(t,e){const n=tc(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=rc(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:ic(n,sc(t)),range:o}}function rc(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function ic(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:i}=t;return"backward"===e?{anchorNode:r,anchorOffset:i,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:i}}function sc(t){return t.direction}function lc(t){const e=t.getRootNode();return Bs(e)||ql(e)?e.activeElement:null}function cc(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function ac(t){const e=t.target;if(null!==e&&gc(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function uc(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Bl(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),i=Bl(n),s=e!==o||i?Rl(e):e;if(i)return Pi(e)&&Pi(s)||t(133),e.insertAfter(s),[e,s,s];{const[t,o,i]=r(n),l=e.getNextSiblings();return i.append(s,...l),[t,o,s]}},[i,s]=r(o);return[i,s]}function fc(t){return gc(t)&&"A"===t.tagName}function dc(t){return gc(t)&&"TR"===t.tagName}function hc(t){return gc(t)&&("TD"===t.tagName||"TH"===t.tagName)}function gc(t){return _c(t)&&1===t.nodeType}function _c(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function pc(t){return _c(t)&&11===t.nodeType}const yc=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function mc(t){return!(!gc(t)||!t.style.display.startsWith("inline"))||yc.test(t.nodeName)}const xc=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Cc(t){return(!gc(t)||!t.style.display.startsWith("inline"))&&xc.test(t.nodeName)}function Sc(t){if(Ki(t)&&!t.isInline())return!0;if(!Pi(t)||Bl(t))return!1;const e=t.getFirstChild(),n=null===e||Yi(e)||Xo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function vc(){return _i()}function Tc(t=vc()){return t._config.dom||ps}function kc(e,n,o=vc()){const r=Tc(o).$getDOMSlot(e,n,o);return Pi(e)&&(Ec(r)||t(344,e.getKey(),e.getType())),r}function bc(t,e,n,o){const r=t.read("latest",()=>{const o=Ys(e);return null!==o?function(t,e,n=vc()){const o=sa(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r}function Nc(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}function Ec(t){return t instanceof G}function wc(t,e,n=vc()){return Rs(kc(t,e,n).element)}const Oc=new WeakMap,Mc=new Map;function Ac(e){if(!e._readOnly&&e.isEmpty())return Mc;e._readOnly||t(192);let n=Oc.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Oc.set(e,n)),n}function Dc(t){const e=t.constructor.clone(t,Ts);return e.afterCloneFrom(t),e}function Fc(t){return(e=Dc(t))[fo]=!0,e;var e}function Pc(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Ic(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Lc(t,e){const n=e.style.textAlign;return n&&n in R?t.setFormat(n):t}function Kc(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function zc(t){return!0===t.__lexicalUnmanaged}function Bc(t,e=vc()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Rc(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(gc(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==Qs(n,e))return!1;n=wl(n)}return!1}function Wc(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==_o[e]}const $c=new WeakMap,Uc=Symbol("lexical.synthesizedGetType");function Hc(e){const n=$c.get(e);if(n)return n;const o=null!=e.prototype&&j in e.prototype?e.prototype[j]():void 0,r=function(e){if(!(e===_o||e.prototype instanceof _o)){let n="",o="";try{n=e.getType()}catch(t){}try{Cs.version&&(o=JSON.parse(Cs.version))}catch(t){}t(290,e.name,n,o)}return e===Li||e===Fi||e===_o}(e),i=!r&&Wc(e,"getType")?e.getType:void 0,s=i&&!(Uc in i)?i.call(e):void 0;let l,c=s;if(o)if(s)l=o[s];else{for(const[t,e]of Object.entries(o))c=t,l=e;if(!l)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){l=e;break}}}if(!r&&c){if(!Wc(e,"getType")){const t=e,n=function(){return this!==t?_o.getType.call(this):c};n[Uc]=!0,e.getType=n}if(Wc(e,"clone")||(e.clone=(t,n)=>{vs(t);const o=new e;return n!==Ts&&o.afterCloneFrom(t),o}),Wc(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!Wc(e,"importDOM")&&l){const{importDOM:t}=l;t&&(e.importDOM=()=>t)}}const a={klass:e,ownNodeConfig:l,ownNodeType:c};return $c.set(e,a),a}function*jc(t){for(let e=t;e&&(e===_o||po(e.prototype));){const t=Hc(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Gc(e)}}function Jc(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Hc(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of jc(o)){const o=n&&e.get(n);o&&o.add(t)}return e}function Vc(t){const e=vc();fi();return new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)}const qc=(t,e)=>{let n=t;for(;null!=n&&!Bi(n);){if(e(n))return n;n=n.getParent()}return null};function Yc(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?Ys(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Gc(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const Xc=new Map;function Qc(t){return Pi(t)||Ki(t)}function Zc(t){return Pi(t)||Ki(t)}function ta(t){const e=t.getLatest();return Zc(e)?e.__slotHost:null}function ea(e){const n=ta(e);if(null===n)return null;const o=Ys(n);return Pi(o)||Ki(o)||t(370),o}function na(t){const e=ea(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ra(e))if(o===n)return t;return null}function oa(t){let e=t.getLatest();for(;null!==e;){if(null!==ta(e))return e;e=e.getParent()}return null}function ra(t){const e=t.getLatest();return Qc(e)&&null!==e.__slots?e.__slots:Xc}function ia(t){return Array.from(ra(t).keys())}function sa(t,e){const n=ra(t).get(e);return void 0===n?null:Ys(n)}const la=["__proto__","constructor","prototype"],ca=Symbol("slotMapOwner");function aa(t){let e=t.__slots;return null!==e&&e[ca]===t||(e=new Map(e),e[ca]=t,t.__slots=e),e}const ua=new WeakMap,fa=[];function da(t){for(const{ownNodeConfig:e}of jc(t)){const t=e&&e.slots;if(t)return t}return fa}function ha(t){let e="";for(const n of ia(t)){const o=sa(t,n);null!==o&&(e+=o.getTextContent())}return e}function ga(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function _a(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=ua.get(e);if(void 0===n){const o=da(e),r=new Map;for(const n of o)la.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,ua.set(e,n)}return n}(e.constructor);let r=null,i=!0;for(const t of n.keys()){if(null!==r&&ga(r,t,o)>0){i=!1;break}r=t}if(i)return;const s=Array.from(n).sort(([t],[e])=>ga(t,e,o));n.clear();for(const[t,e]of s)n.set(t,e)}function pa(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!Pi(o)&&!Ki(o)||o.isInline())&&t(374,o.__key);const i=e.getWritable(),s=aa(i),l=s.get(n);void 0!==l&&xa(l);const c=o.getWritable(),a=ea(c);if(null!==a){const t=na(c);null!==t&&aa(a.getWritable()).delete(t),c.__slotHost=null}return Hs(c),c.__slotHost=i.__key,s.set(n,c.__key),_a(i),function(){const t=vc();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),i}function ya(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(xa(o),aa(n).delete(e)),n}function ma(t,e){}function xa(e){const n=Ys(e);if(null===n)return;const o=n.getWritable();Zc(o)||t(377,e),o.__slotHost=null,o.remove()}const Ca={next:"previous",previous:"next"};class Sa{origin;constructor(t){this.origin=t}[Symbol.iterator](){return qa({hasNext:Ma,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ia(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ia(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),l=new Map;for(let t=i.getAdjacentCaret();null!==t&&l.size0){const n=i.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||i.origin.is(e));else{const t=e.getParent();t&&t.is(s)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else i.insert(e);i=Ia(e,this.direction)}for(const t of l.values())t.remove();return this}}class va extends Sa{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ba(t,this.direction)}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=ka(this.direction);return Ia(this.getNodeAtCaret(),t)||Ba(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof va&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ta={root:Bi,shadowRoot:Bl};function ka(t){return Ca[t]}function ba(t,e="root"){return null===t||Ta[e](t)?null:null===ta(t)?t:null}class Na extends Sa{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ia(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Pi(this.origin)?Ba(this.origin,this.direction):null}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=ka(this.direction);return Ia(this.getNodeAtCaret(),t)||Ba(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Na&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Na||t instanceof Ea)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Ea extends Sa{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:La(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){return La(this.origin,ka(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Ea&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Na||t instanceof Ea)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ia(this.origin,this.direction)}}function wa(t){return t instanceof Ea}function Oa(t){return t instanceof Sa}function Ma(t){return t instanceof Na}function Aa(t){return t instanceof va}const Da={next:class extends Ea{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ea{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Fa={next:class extends Na{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Na{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Pa={next:class extends va{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends va{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Ia(t,e){return t?new Fa[e](t):null}function La(t,e,n){return t?new Da[e](t,Ka(t,n)):null}function Ka(t,n,o="error"){const r=t.getTextContentSize();let i="next"===n?r:"previous"===n?0:n;return(i<0||i>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),i=i<0?0:r),i}function za(t,e){return new Ua(t,e)}function Ba(t,e){return Pi(t)?new Pa[e](t):null}function Ra(t){return t&&t.getChildCaret()||t}function Wa(t){return t&&Ra(t.getAdjacentCaret())}class $a{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new $a(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return wa(e)?function(t,e){const{direction:n,origin:o}=t,r=Ka(o,"focus"===e?ka(n):n);return za(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[za(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=wa(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=wa(n),r=e=>e.isSameNodeCaret(n)?null:Wa(e)||e.getParentCaret(t);return qa({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Ua{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&Sc(t));if(f&&ia(f).length>0)return null;return u&&f?[u,f]:null}(d,h,a);if(g){const[t,e]=g;Ba(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(h){const t=function(t){if(Aa(t)){const e=t.origin;if(Sc(e))return e}else{const e=t.getParentAtCaret();if(e&&Sc(e))return e}return null}(h),e=t&&t.getParent(),n=t&&t.getParents().findLast(zl);if(t&&e&&!Bi(e)&&t.isEmpty()&&a.has(t.getKey())&&0===ia(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!Bi(n)&&n.isEmpty();){const t=n.getParent();if(t&&Bi(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const _=[d,h,...l,...c].find(lu);if(_){return Ja(fu(au(_),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function au(t){const e=function(t){let e=t;for(;Aa(e);){const t=Wa(e);if(!Aa(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Xo(e.origin))return wa(e)?e:La(e.origin,n,n);const o=e.getAdjacentCaret();return Ma(o)&&Xo(o.origin)?La(o.origin,n,ka(n)):e}function uu(t){return wa(t)&&t.offset!==Ka(t.origin,t.direction)}function fu(t,e){return t.direction===e?t:t.getFlipped()}function du(t,e){return t.direction===e?t:Va(fu(t.focus,e),fu(t.anchor,e))}function hu(t,e,n){let o=Ba(t,"next");for(let t=0;t0||!i&&n.canBeEmpty()&&r(n,"last"))&&s.insert(e(n).splice(0,0,o))}return s}function mu(e,n,o){let r=fu(n,"next");wa(r)&&(0===r.offset?r=Ia(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Ia(r.origin,"next"))),r.origin.is(e)&&(Ma(r)||t(342,e.getKey(),e.getType()),r=iu(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=yu(t,o))r=t;return wa(r)&&t(283),r.insert(e.isInline()?es().append(e):e),fu(Ia(e.getLatest(),"next"),n.direction)}function xu(t){return t}function Cu(...t){return t}function Su(t,e){return[t,e]}function vu(t){return t}function Tu(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function ku(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function bu(t,...e){const n=ku(...e);n.length>0&&t.classList.add(...n)}function Nu(t,...e){const n=ku(...e);n.length>0&&t.classList.remove(...n)}function Eu(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function wu(t,e,n){return Eu(...Object.entries(e).map(([e,o])=>Fn(t,e,o,n)))}export{Al as $addUpdateTag,Wl as $applyNodeReplacement,gi as $assumeActiveEditor,tu as $caretFromPoint,ru as $caretRangeFromSelection,Dc as $cloneWithProperties,Fc as $cloneWithPropertiesEphemeral,Ya as $comparePointCaretNext,Rl as $copyNode,Vc as $create,Yc as $createChildrenArray,qi as $createLineBreakNode,Pr as $createNodeSelection,es as $createParagraphNode,or as $createPoint,Fr as $createRangeSelection,Ir as $createRangeSelectionFromDom,tr as $createTabNode,Go as $createTextNode,ja as $extendCaretToRange,qc as $findMatchingParent,_r as $formatText,pi as $fullReconcile,qr as $generateNodesFromRawText,Wa as $getAdjacentChildCaret,kl as $getAdjacentNode,gu as $getAdjacentSiblingOrParentSiblingCaret,fu as $getCaretInDirection,Va as $getCaretRange,du as $getCaretRangeInDirection,yr as $getCharacterOffsets,Ba as $getChildCaret,hu as $getChildCaretAtIndex,Ra as $getChildCaretOrSelf,Ja as $getCollapsedCaretRange,Za as $getCommonAncestor,Ga as $getCommonAncestorResultBranchOrder,kc as $getDOMSlot,wc as $getDOMTextNode,Zl as $getDocument,vc as $getEditor,Tc as $getEditorDOMRenderConfig,Zs as $getNearestNodeFromDOMNode,Kl as $getNearestRootOrShadowRoot,Ys as $getNodeByKey,Ul as $getNodeByKeyOrThrow,Gs as $getNodeFromDOMNode,zr as $getPreviousSelection,nl as $getRoot,Kr as $getSelection,Ia as $getSiblingCaret,sa as $getSlot,oa as $getSlotFrame,ea as $getSlotHost,na as $getSlotNameWithinHost,ia as $getSlotNames,xt as $getState,Ct as $getStateChange,Yr as $getTextContent,Ka as $getTextNodeOffset,La as $getTextPointCaret,za as $getTextPointCaretSlice,bt as $getWritableNodeState,Fl as $hasAncestor,Ml as $hasUpdateTag,mu as $insertNodeToNearestRootAtCaret,Jr as $insertNodes,Ar as $isBlockElementNode,Aa as $isChildCaret,Ki as $isDecoratorNode,Ui as $isEditorState,Ec as $isElementDOMSlot,Pi as $isElementNode,uu as $isExtendableTextPointCaret,Ll as $isInlineElementOrDecoratorNode,Ro as $isInlineFormattable,$s as $isLeafNode,po as $isLexicalNode,Yi as $isLineBreakNode,Oa as $isNodeCaret,dr as $isNodeSelection,ns as $isParagraphNode,ur as $isRangeSelection,Bi as $isRootNode,Bl as $isRootOrShadowRoot,Os as $isSelectionCapturedInDecoratorInput,zl as $isShadowRootNode,Ma as $isSiblingCaret,Zc as $isSlotChild,Qc as $isSlotHost,er as $isTabNode,Xo as $isTextNode,wa as $isTextPointCaret,Ha as $isTextPointCaretSlice,Ks as $isTokenOrSegmented,Ls as $isTokenOrTab,Bc as $markSlotEditable,Hl as $needsBlockCursorBeside,vl as $nodesOfType,au as $normalizeCaret,It as $normalizeSelection__EXPERIMENTAL,Dl as $onUpdate,vi as $parseSerializedNode,Hs as $removeFromParent,ya as $removeSlot,cu as $removeTextFromCaretRange,iu as $rewindSiblingCaret,xl as $selectAll,Vs as $setCompositionKey,Ic as $setDirectionFromDOM,Lc as $setFormatFromDOM,eu as $setPointFromCaret,ol as $setSelection,nu as $setSelectionFromCaretRange,pa as $setSlot,St as $setState,gr as $setTextFormat,yu as $splitAtPointCaretNext,uc as $splitNode,jr as $updateDOMSelection,ou as $updateRangeSelectionFromCaretRange,ji as ArtificialNode__DO_NOT_USE,ze as BEFORE_INPUT_COMMAND,Mn as BLUR_COMMAND,En as CAN_REDO_COMMAND,wn as CAN_UNDO_COMMAND,s as CAN_USE_BEFORE_INPUT,n as CAN_USE_DOM,bn as CLEAR_EDITOR_COMMAND,Nn as CLEAR_HISTORY_COMMAND,Ke as CLICK_COMMAND,vo as COLLABORATION_TAG,hs as COMMAND_PRIORITY_BEFORE_CRITICAL,as as COMMAND_PRIORITY_BEFORE_EDITOR,ds as COMMAND_PRIORITY_BEFORE_HIGH,us as COMMAND_PRIORITY_BEFORE_LOW,fs as COMMAND_PRIORITY_BEFORE_NORMAL,cs as COMMAND_PRIORITY_CRITICAL,rs as COMMAND_PRIORITY_EDITOR,ls as COMMAND_PRIORITY_HIGH,is as COMMAND_PRIORITY_LOW,ss as COMMAND_PRIORITY_NORMAL,We as COMPOSITION_END_COMMAND,wo as COMPOSITION_END_TAG,Re as COMPOSITION_START_COMMAND,Eo as COMPOSITION_START_TAG,je as CONTROLLED_TEXT_INSERTION_COMMAND,vn as COPY_COMMAND,Tn as CUT_COMMAND,So as CUT_TAG,ps as DEFAULT_EDITOR_DOM_CONFIG,$e as DELETE_CHARACTER_COMMAND,Ye as DELETE_LINE_COMMAND,qe as DELETE_WORD_COMMAND,Sn as DRAGEND_COMMAND,Cn as DRAGOVER_COMMAND,xn as DRAGSTART_COMMAND,yn as DROP_COMMAND,Li as DecoratorNode,Fi as ElementNode,On as FOCUS_COMMAND,mn as FORMAT_ELEMENT_COMMAND,Ge as FORMAT_TEXT_COMMAND,yo as HISTORIC_TAG,xo as HISTORY_MERGE_TAG,mo as HISTORY_PUSH_TAG,_n as INDENT_CONTENT_COMMAND,Be as INPUT_COMMAND,Ue as INSERT_LINE_BREAK_COMMAND,He as INSERT_PARAGRAPH_COMMAND,gn as INSERT_TAB_COMMAND,Sc as INTERNAL_$isBlock,k as IS_ALL_FORMATTING,c as IS_ANDROID,f as IS_ANDROID_CHROME,r as IS_APPLE,d as IS_APPLE_WEBKIT,p as IS_BOLD,u as IS_CHROME,C as IS_CODE,i as IS_FIREFOX,T as IS_HIGHLIGHT,l as IS_IOS,y as IS_ITALIC,a as IS_SAFARI,m as IS_STRIKETHROUGH,S as IS_SUBSCRIPT,v as IS_SUPERSCRIPT,x as IS_UNDERLINE,ln as KEY_ARROW_DOWN_COMMAND,on as KEY_ARROW_LEFT_COMMAND,en as KEY_ARROW_RIGHT_COMMAND,sn as KEY_ARROW_UP_COMMAND,un as KEY_BACKSPACE_COMMAND,dn as KEY_DELETE_COMMAND,tn as KEY_DOWN_COMMAND,cn as KEY_ENTER_COMMAND,fn as KEY_ESCAPE_COMMAND,An as KEY_MODIFIER_COMMAND,an as KEY_SPACE_COMMAND,hn as KEY_TAB_COMMAND,Ji as LineBreakNode,nn as MOVE_TO_END,rn as MOVE_TO_START,_t as NODE_STATE_DIRECT,H as NODE_STATE_KEY,pt as NODE_STATE_LATEST,pn as OUTDENT_CONTENT_COMMAND,Je as PASTE_COMMAND,Co as PASTE_TAG,Zi as ParagraphNode,Ze as REDO_COMMAND,Ve as REMOVE_TEXT_COMMAND,zi as RootNode,Ie as SELECTION_CHANGE_COMMAND,Le as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,kn as SELECT_ALL_COMMAND,Xe as SET_TEXT_FORMAT_COMMAND,To as SKIP_COLLAB_TAG,bo as SKIP_DOM_SELECTION_TAG,ko as SKIP_SCROLL_INTO_VIEW_TAG,No as SKIP_SELECTION_FOCUS_TAG,z as TEXT_TYPE_TO_FORMAT,Zo as TabNode,Wo as TextNode,Qe as UNDO_COMMAND,bu as addClassNamesToElement,uo as buildImportMap,Cu as configExtension,Pe as createCommand,ys as createEditor,Dn as createRefCountedRegistry,vt as createSharedNodeState,mt as createState,Su as declarePeerDependency,xu as defineExtension,Xl as findAllLexicalElementsDeep,ka as flipDirection,lc as getActiveElement,cc as getActiveElementDeep,ac as getComposedEventTarget,tc as getComposedStaticRange,Ol as getDOMOwnerDocument,Jl as getDOMSelection,Vl as getDOMSelectionFromTarget,nc as getDOMSelectionPoints,ec as getDOMSelectionRange,oc as getDOMSelectionRangeAndPoints,Gl as getDOMShadowRoots,Rs as getDOMTextNode,da as getDeclaredSlots,Ps as getEditorPropertyFromDOMNode,Fs as getNearestEditorFromDOMNode,wl as getParentElement,Es as getRegisteredNode,Ns as getRegisteredNodeOrThrow,Jc as getRegisteredSubtypeMap,Ql as getRootOwnerDocument,Hc as getStaticNodeConfig,Mo as getStyleObjectFromCSS,Is as getTextDirection,_s as getTransformSetFromKlass,Cc as isBlockDomNode,ui as isCurrentlyReadOnlyMode,Rc as isDOMCapturingSelection,Bs as isDOMDocumentNode,_c as isDOMNode,ql as isDOMShadowRoot,zs as isDOMTextNode,zc as isDOMUnmanaged,pc as isDocumentFragment,_l as isExactShortcutMatch,fc as isHTMLAnchorElement,gc as isHTMLElement,hc as isHTMLTableCellElement,dc as isHTMLTableRowElement,mc as isInlineDomNode,Xi as isLastChildInBlockNode,Ds as isLexicalEditor,gl as isModifierMatch,Gi as isOnlyChildInBlockNode,Ms as isSelectionCapturedInDecoratorInput,As as isSelectionWithinEditor,jc as iterStaticNodeConfigChain,qa as makeStepwiseIterator,Eu as mergeRegister,bc as mountSlotContainer,ku as normalizeClassNames,Fn as registerEventListener,wu as registerEventListeners,Nu as removeClassNamesFromElement,js as removeFromParent,bs as resetRandomKey,vu as safeCast,Fo as setDOMStyleFromCSS,Do as setDOMStyleObject,Kc as setDOMUnmanaged,Pc as setNodeIndentFromDOM,Tu as shallowMergeConfig,io as stopLexicalPropagation,Ws as toggleTextFormatType,Vr as tokenizeRawText,Nc as unmountSlotContainer}; ++/*@__INLINE__*/function Pe(t){return{type:t}}const Ie=/* @__PURE__ */Pe("SELECTION_CHANGE_COMMAND"),Le=/* @__PURE__ */Pe("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),Ke=/* @__PURE__ */Pe("CLICK_COMMAND"),ze=/* @__PURE__ */Pe("BEFORE_INPUT_COMMAND"),Be=/* @__PURE__ */Pe("INPUT_COMMAND"),Re=/* @__PURE__ */Pe("COMPOSITION_START_COMMAND"),We=/* @__PURE__ */Pe("COMPOSITION_END_COMMAND"),$e=/* @__PURE__ */Pe("DELETE_CHARACTER_COMMAND"),Ue=/* @__PURE__ */Pe("INSERT_LINE_BREAK_COMMAND"),He=/* @__PURE__ */Pe("INSERT_PARAGRAPH_COMMAND"),je=/* @__PURE__ */Pe("CONTROLLED_TEXT_INSERTION_COMMAND"),Je=/* @__PURE__ */Pe("PASTE_COMMAND"),Ve=/* @__PURE__ */Pe("REMOVE_TEXT_COMMAND"),qe=/* @__PURE__ */Pe("DELETE_WORD_COMMAND"),Ye=/* @__PURE__ */Pe("DELETE_LINE_COMMAND"),Ge=/* @__PURE__ */Pe("FORMAT_TEXT_COMMAND"),Xe=/* @__PURE__ */Pe("SET_TEXT_FORMAT_COMMAND"),Qe=/* @__PURE__ */Pe("UNDO_COMMAND"),Ze=/* @__PURE__ */Pe("REDO_COMMAND"),tn=/* @__PURE__ */Pe("KEYDOWN_COMMAND"),en=/* @__PURE__ */Pe("KEY_ARROW_RIGHT_COMMAND"),nn=/* @__PURE__ */Pe("MOVE_TO_END"),on=/* @__PURE__ */Pe("KEY_ARROW_LEFT_COMMAND"),rn=/* @__PURE__ */Pe("MOVE_TO_START"),sn=/* @__PURE__ */Pe("KEY_ARROW_UP_COMMAND"),ln=/* @__PURE__ */Pe("KEY_ARROW_DOWN_COMMAND"),cn=/* @__PURE__ */Pe("KEY_ENTER_COMMAND"),an=/* @__PURE__ */Pe("KEY_SPACE_COMMAND"),un=/* @__PURE__ */Pe("KEY_BACKSPACE_COMMAND"),fn=/* @__PURE__ */Pe("KEY_ESCAPE_COMMAND"),dn=/* @__PURE__ */Pe("KEY_DELETE_COMMAND"),hn=/* @__PURE__ */Pe("KEY_TAB_COMMAND"),gn=/* @__PURE__ */Pe("INSERT_TAB_COMMAND"),_n=/* @__PURE__ */Pe("INDENT_CONTENT_COMMAND"),pn=/* @__PURE__ */Pe("OUTDENT_CONTENT_COMMAND"),yn=/* @__PURE__ */Pe("DROP_COMMAND"),mn=/* @__PURE__ */Pe("FORMAT_ELEMENT_COMMAND"),xn=/* @__PURE__ */Pe("DRAGSTART_COMMAND"),Cn=/* @__PURE__ */Pe("DRAGOVER_COMMAND"),Sn=/* @__PURE__ */Pe("DRAGEND_COMMAND"),vn=/* @__PURE__ */Pe("COPY_COMMAND"),Tn=/* @__PURE__ */Pe("CUT_COMMAND"),kn=/* @__PURE__ */Pe("SELECT_ALL_COMMAND"),bn=/* @__PURE__ */Pe("CLEAR_EDITOR_COMMAND"),Nn=/* @__PURE__ */Pe("CLEAR_HISTORY_COMMAND"),En=/* @__PURE__ */Pe("CAN_REDO_COMMAND"),wn=/* @__PURE__ */Pe("CAN_UNDO_COMMAND"),On=/* @__PURE__ */Pe("FOCUS_COMMAND"),Mn=/* @__PURE__ */Pe("BLUR_COMMAND"),An=/* @__PURE__ */Pe("KEY_MODIFIER_COMMAND");function Dn(t){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(n,o){let r=e.get(n);void 0===r&&(r={dispose:t(n,o),holders:new Set},e.set(n,r));const i=()=>{const t=e.get(n);t&&t.holders.delete(i)&&0===t.holders.size&&(e.delete(n),t.dispose())};return r.holders.add(i),i}}}function Fn(t,e,n,o){return t.addEventListener(e,n,o),t.removeEventListener.bind(t,e,n,o)}const Pn=Object.freeze({}),In=[["keydown",function(t,e){const n=e._inputState;n.lastKeyDownTimeStamp=t.timeStamp,n.lastKeyCode=t.key,"Backspace"!==t.key&&Jn(n);if(e.isComposing())return;Nl(e,tn,t)}],["pointerdown",function(t,e){const n=ac(t),o=t.pointerType;_c(n)&&"touch"!==o&&"pen"!==o&&0===t.button&&Ai(e,()=>{Rc(n,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(t,e){Nl(e,Re,t)}],["compositionend",function(t,e){const n=e._inputState;i?n.compositionPhase="ending-firefox":l||!a&&!d?Nl(e,We,t):(n.compositionPhase="ending-safari",n.compositionEndData=t.data)}],["input",function(t,e){t.stopPropagation();const n=e._inputState;Jn(n),Ai(e,()=>{qn(t,e)||e.dispatchCommand(Be,t)},{event:t}),n.unprocessedBeforeInputData=null}],["click",function(t,e){Ai(e,()=>{const n=Kr(),o=Jl(Il(e)),r=zr();if(o)if(ur(n)){const t=n.anchor,e=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Bi(e)&&1===nl().getChildrenSize()&&e.getTopLevelElementOrThrow().isEmpty()&&null!==r&&n.is(r)&&(o.removeAllRanges(),n.dirty=!0)}else if("touch"===t.pointerType||"pen"===t.pointerType){const n=nc(o,e._rootElement).anchorNode;if(gc(n)||zs(n)){ol(Lr(r,o,e,t))}}if(i&&null!==o&&0===o.rangeCount){const n=e._rootElement;if(null!==n&&t.target===n){const i=t.clientY;let s=n.childNodes.length;for(let t=0;tfunction(t,e){const n=t.inputType;if("deleteCompositionText"===n||i&&bl(e))return;if("insertCompositionText"===n)return;Ai(e,()=>{qn(t,e)||Nl(e,ze,t)},{event:t})}(t,e)]);const Ln=new WeakMap,Kn=new WeakMap,zn=Dn(t=>(t.addEventListener("selectionchange",ro),()=>t.removeEventListener("selectionchange",ro)));function Bn(t,e,n,o,r,i){const l=t.anchor,c=t.focus,a=l.getNode(),u=_i();let f;if(void 0!==i)f=i;else{const t=Jl(Il(u));f=null!==t?nc(t,u._rootElement):null}const d=null!==f?f.anchorNode:null,h=l.key,g=u.getElementByKey(h),_=n.length;return h!==c.key||!Xo(a)||(!r&&(!s||u._inputState.lastBeforeInputInsertTextTimeStamp1||(r||!s)&&null!==g&&!a.isComposing()&&d!==wc(a,g,u)||null!==f&&null!==e&&(!e.collapsed||e.startContainer!==f.anchorNode||e.startOffset!==f.anchorOffset)||!a.isComposing()&&(a.getFormat()!==t.format||a.getStyle()!==t.style)||function(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;const n=t.anchor.offset,o=e.getParentOrThrow(),r=Ls(e);return 0===n?!e.canInsertTextBefore()||!o.canInsertTextBefore()&&!e.isComposing()||r||function(t){const e=t.getPreviousSibling();return(Xo(e)||Pi(e)&&e.isInline())&&!e.canInsertTextAfter()}(e):n===e.getTextContentSize()&&(!e.canInsertTextAfter()||!o.canInsertTextAfter()&&!e.isComposing()||r)}(t,a)}function Rn(t,e){return zs(t)&&null!==t.nodeValue&&0!==e&&e!==t.nodeValue.length}function Wn(e,n,o){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:l}=nc(e,n._rootElement),c=n._inputState;c.isSelectionChangeFromDOMUpdate&&(c.isSelectionChangeFromDOMUpdate=!1,Rn(r,i)&&Rn(s,l)&&!c.postDeleteSelectionToRestore)||Ai(n,()=>{if(!o)return void ol(null);if(!As(n,r,s))return;let a=Kr();if(c.postDeleteSelectionToRestore&&ur(a)&&a.isCollapsed()){const t=a.anchor,e=c.postDeleteSelectionToRestore.anchor;(t.key===e.key&&t.offset===e.offset+1||1===t.offset&&e.getNode().is(t.getNode().getPreviousSibling()))&&(a=c.postDeleteSelectionToRestore.clone(),ol(a))}if(c.postDeleteSelectionToRestore=null,ur(a)){const o=a.anchor,u=o.getNode();if(a.isCollapsed()){"Range"===e.type&&r===s&&(a.dirty=!0);const i=Il(n).event,l=i?i.timeStamp:performance.now(),{format:f,style:d,offset:h,key:g,timeStamp:_}=c.collapsedSelectionFormat,p=nl(),y=!1===n.isComposing()&&""===p.getTextContent();if(l<_+200&&o.offset===h&&o.key===g)$n(a,f,d);else if("text"===o.type)Xo(u)||t(141),Un(a,u);else if("element"===o.type&&!y){Pi(u)||t(259);const e=o.getNode();e.isEmpty()?function(t,e){const n=e.getTextFormat(),o=e.getTextStyle();$n(t,n,o)}(a,e):$n(a,a.format,"")}}else{const t=o.key,e=a.focus.key,n=a.getNodes(),r=n.length,s=a.isBackward(),c=s?l:i,u=s?i:l,f=s?e:t,d=s?t:e;let h=2047,g=!1;for(let t=0;tJn(t),0)}function qn(t,e){const n=ac(t);if(gc(n)&&Rc(n,e))return!0;const o=e.getRootElement();if(null===o)return!1;const r=cc(o.ownerDocument);return null!==r&&o.contains(r)&&Rc(r,e)}function Yn(e){const n=e.inputType,o=Hn(e),r=_i(),i=r._inputState,s=Kr();if("insertText"===n&&e.data&&i.isInsertTextAfterHandledSelectionCommand){if(Jn(i),e.preventDefault(),ur(s)&&!s.isCollapsed()){const t=s.isBackward()?s.anchor:s.focus;s.anchor.set(t.key,t.offset,t.type),s.focus.set(t.key,t.offset,t.type)}return!0}if("deleteContentBackward"===n){if(null===s){const t=zr();if(!ur(t))return!0;ol(t.clone())}if(ur(s)){const n=s.anchor.key===s.focus.key;if(function(t,e){return"MediaLast"===t.lastKeyCode&&e{Ai(r,()=>{Vs(null)})},30),ur(s)){const e=s.anchor.getNode();e.markDirty(),Xo(e)||t(142),Un(s,e)}}else{if(Vs(null),l&&null!==o&&!o.collapsed&&(s.applyDOMRange(o),!s.isCollapsed()))return e.preventDefault(),s.removeText(),!0;e.preventDefault();const t=s.anchor.getNode(),c=t.getTextContent(),a=t.canInsertTextAfter(),u=0===s.anchor.offset&&s.focus.offset===c.length;let d=f&&n&&!u&&a;if(d&&s.isCollapsed()&&(d=!Ki(kl(s.anchor,!0))),!d){Nl(r,$e,!0);const t=Kr();f&&ur(t)&&t.isCollapsed()&&(i.postDeleteSelectionToRestore=t,setTimeout(()=>i.postDeleteSelectionToRestore=null))}}return!0}}if(!ur(s))return!0;const c=e.data;null!==i.unprocessedBeforeInputData&&ul(!1,r,i.unprocessedBeforeInputData),s.dirty&&null===i.unprocessedBeforeInputData||!s.isCollapsed()||Bi(s.anchor.getNode())||null===o||s.applyDOMRange(o),i.unprocessedBeforeInputData=null;const a=s.anchor,u=s.focus,d=a.getNode(),h=u.getNode();if("insertText"===n||"insertTranspose"===n){if("\n"===c)e.preventDefault(),Nl(r,Ue,!1);else if(c===D)e.preventDefault(),Nl(r,He);else if(null==c&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=c&&Bn(s,o,c,e.timeStamp,!0)?(e.preventDefault(),Nl(r,je,c),jn(c)):i.unprocessedBeforeInputData=c;return i.lastBeforeInputInsertTextTimeStamp=e.timeStamp,!0}switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Nl(r,je,e);jn((e.dataTransfer?e.dataTransfer.getData("text/plain"):null)??e.data);break;case"insertFromComposition":{const t=i.hadOrphanedCompositionEvents;i.hadOrphanedCompositionEvents=!1;const n=r._compositionKey;Vs(null),t||Nl(r,je,e),Zn(n);break}case"insertLineBreak":Vs(null),Nl(r,Ue,!1);break;case"insertParagraph":Vs(null),i.isInsertLineBreak&&!l?(i.isInsertLineBreak=!1,Nl(r,Ue,!1)):Nl(r,He);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Nl(r,Je,e);break;case"deleteByComposition":(function(t,e){return t!==e||Pi(t)||Pi(e)||!Ls(t)||!Ls(e)})(d,h)&&Nl(r,Ve,e);break;case"deleteByDrag":Al(No),Nl(r,Ve,e);break;case"deleteByCut":Nl(r,Ve,e);break;case"deleteContent":Nl(r,$e,!1);break;case"deleteWordBackward":Nl(r,qe,!0);break;case"deleteWordForward":Nl(r,qe,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Nl(r,Ye,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Nl(r,Ye,!1);break;case"formatStrikeThrough":Nl(r,Ge,"strikethrough");break;case"formatBold":Nl(r,Ge,"bold");break;case"formatItalic":Nl(r,Ge,"italic");break;case"formatUnderline":Nl(r,Ge,"underline");break;case"historyUndo":Nl(r,Qe);break;case"historyRedo":Nl(r,Ze)}return!0}function Gn(t){const e=_i(),n=e._inputState,o=Kr(),r=t.data,l=Hn(t);let c=!1;if(null!=r&&ur(o)){const a=Jl(Il(e)),u=null!==a?nc(a,e._rootElement):null,d="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&!e.isComposing();d&&(n.hadOrphanedCompositionEvents=!0);const h=o.anchor.getNode(),g="insertCompositionText"===t.inputType&&"ending-firefox"!==n.compositionPhase&&e.isComposing()&&Xo(h)&&Ks(h);if(!d&&!g&&Bn(o,l,r,t.timeStamp,!1,u)){if(c=!0,"ending-firefox"===n.compositionPhase){const t=to(e,r);if(n.compositionPhase="idle",t)return Al(wo),rl(),!0}const l=o.anchor.getNode();if(null===a||null===u)return!0;const d=o.isBackward(),h=d?o.anchor.offset:o.focus.offset,g=d?o.focus.offset:o.anchor.offset;s&&!o.isCollapsed()&&Xo(l)&&null!==u.anchorNode&&l.getTextContent().slice(0,h)+r+l.getTextContent().slice(h+g)===al(u.anchorNode)||Nl(e,je,r);const _=r.length;i&&_>1&&"insertCompositionText"===t.inputType&&!e.isComposing()&&(o.anchor.offset-=_,o._cachedNodes=null,o._cachedIsBackward=null),f&&e.isComposing()&&(n.lastKeyDownTimeStamp=0,Vs(null))}}if(!c){ul(!1,e,null!==r?r:void 0),"ending-firefox"===n.compositionPhase&&(to(e,r||void 0),Al(wo),n.compositionPhase="idle")}return rl(),!0}function Xn(t){const e=_i(),n=e._inputState,o=Kr();if(ur(o)&&!e.isComposing()){n.compositionPhase="composing",n.hadOrphanedCompositionEvents=!1;const r=o.anchor,i=o.anchor.getNode();if(Vs(r.key),Al(Eo),t.timeStamp{to(e,n.compositionEndData)}),n.compositionPhase="idle",n.compositionEndData="",o)return!0}if(function(t){return _l(t,"ArrowRight",{shiftKey:"any"})}(t))Nl(e,en,t);else if(function(t){return _l(t,"ArrowRight",{...pl,shiftKey:"any"})}(t))Nl(e,nn,t);else if(function(t){return _l(t,"ArrowLeft",{shiftKey:"any"})}(t))Nl(e,on,t);else if(function(t){return _l(t,"ArrowLeft",{...pl,shiftKey:"any"})}(t))Nl(e,rn,t);else if(function(t){return _l(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(t))Nl(e,sn,t);else if(function(t){return _l(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(t))Nl(e,ln,t);else if(function(t){return _l(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(t))n.isInsertLineBreak=!0,Nl(e,cn,t);else if(function(t){return" "===t.key}(t))Nl(e,an,t);else if(function(t){return r&&_l(t,"o",{ctrlKey:!0})}(t))t.preventDefault(),n.isInsertLineBreak=!0,Nl(e,Ue,!0);else if(function(t){return _l(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(t))n.isInsertLineBreak=!1,Nl(e,cn,t);else if(function(t){return _l(t,"Backspace",{shiftKey:"any"})||r&&_l(t,"h",{ctrlKey:!0})}(t))ml(t)?Nl(e,un,t)&&Vn(n):(t.preventDefault(),Nl(e,$e,!0));else if(function(t){return"Escape"===t.key}(t))Nl(e,fn,t);else if(function(t){return _l(t,"Delete",{})||r&&_l(t,"d",{ctrlKey:!0})}(t))!function(t){return"Delete"===t.key}(t)?(t.preventDefault(),Nl(e,$e,!1)):Nl(e,dn,t);else if(function(t){return _l(t,"Backspace",yl)}(t))t.preventDefault(),Nl(e,qe,!0);else if(function(t){return _l(t,"Delete",yl)}(t))t.preventDefault(),Nl(e,qe,!1);else if(function(t){return r&&_l(t,"Backspace",{metaKey:!0})}(t))t.preventDefault(),Nl(e,Ye,!0);else if(function(t){return r&&(_l(t,"Delete",{metaKey:!0})||_l(t,"k",{ctrlKey:!0}))}(t))t.preventDefault(),Nl(e,Ye,!1);else if(function(t){return _l(t,"b",pl)}(t))t.preventDefault(),Nl(e,Ge,"bold");else if(function(t){return _l(t,"u",pl)}(t))t.preventDefault(),Nl(e,Ge,"underline");else if(function(t){return _l(t,"i",pl)}(t))t.preventDefault(),Nl(e,Ge,"italic");else if(function(t){return _l(t,"Tab",{shiftKey:"any"})}(t))Nl(e,hn,t);else if(function(t){return _l(t,"z",pl)}(t))t.preventDefault(),Nl(e,Qe);else if(function(t){if(r)return _l(t,"z",{metaKey:!0,shiftKey:!0});return _l(t,"y",{ctrlKey:!0})||_l(t,"z",{ctrlKey:!0,shiftKey:!0})}(t))t.preventDefault(),Nl(e,Ze);else{const o=e._editorState._selection;!function(t){return _l(t,"a",pl)}(t)?null===o||ur(o)||(!function(t){return _l(t,"c",pl)}(t)?function(t){return _l(t,"x",pl)}(t)&&(t.preventDefault(),Nl(e,Tn,t)):(t.preventDefault(),Nl(e,vn,t))):(t.preventDefault(),Nl(e,kn,t)&&Vn(n))}return function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey}(t)&&e.dispatchCommand(An,t),!0}function no(t){let e=t.__lexicalEventHandles;return void 0===e&&(e=[],t.__lexicalEventHandles=e),e}const oo=new Map;function ro(t){const e=Vl(t.target);if(null===e)return;const n=Ol(t.target);let o=null,r=null;const i=null!==n?Kn.get(n):void 0;if(null!==n){if(void 0!==i){const t=i.editors;let n=i.hasShadowEditor;if(void 0===n){n=!1;for(const e of t)if(null!==e._rootElement&&ql(e._rootElement.getRootNode())){n=!0;break}i.hasShadowEditor=n}if(n){let n=null,i=null;for(const s of t){const t=s._rootElement;if(null===t)continue;const l=nc(e,t).anchorNode;if(null!==l&&Fs(l)===s){if(ql(t.getRootNode())){o=s,r=l;break}null===n&&(n=s,i=l)}}null===o&&null!==n&&(o=n,r=i)}else{const t=e.anchorNode;null===t||gc(t)&&null!==t.shadowRoot||(o=Fs(t),null!==o&&(r=t))}}if(null===o){const t=cc(n);o=null!==t?Fs(t):null}}if(null===o)return;if(o._inputState.isSelectionChangeFromMouseDown){if(void 0!==i)for(const t of i.editors)t._inputState.isSelectionChangeFromMouseDown=!1;Ai(o,()=>{const n=zr(),i=r??nc(e,o._rootElement).anchorNode;if(gc(i)||zs(i)){ol(Lr(n,e,o,t))}})}const s=ll(o),l=s[s.length-1],c=l._key,a=oo.get(c),u=a||l;u!==o&&Wn(e,u,!1),Wn(e,o,!0),o!==l?oo.set(c,o):a&&oo.delete(c)}function io(t){t._lexicalHandled=!0}function so(t){return!0===t._lexicalHandled}const lo=()=>{};function co(e){const n=Ln.get(e);if(void 0===n)return void lo();const o=Kn.get(n);if(void 0===o)return void lo();Ln.delete(e);const r=Ps(e);Ds(r)?(!function(t){if(null!==t._parentEditor){const e=ll(t),n=e[e.length-1]._key;oo.get(n)===t&&oo.delete(n)}else oo.delete(t._key)}(r),o.editors.delete(r),o.hasShadowEditor=void 0,e.__lexicalEditor=null):r&&t(198);const i=no(e);for(let t=0;tt.__key===this.__key);if(Xo(this))return n;if(ur(e)&&"element"===e.anchor.type&&"element"===e.focus.type){if(e.isCollapsed())return!1;const t=this.getParent();if(Ki(this)&&this.isInline()&&t){const n=e.isBackward()?e.focus:e.anchor;if(t.is(n.getNode())&&n.offset===t.getChildrenSize()&&this.is(t.getLastChild()))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(null===t)return-1;let e=t.getFirstChild(),n=0;for(;null!==e;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return null===t?null:Ys(t)}getParentOrThrow(){const e=this.getParent();return null===e&&t(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const n=e.getParent();if(Bl(n)||null!==ta(e))return Pi(e)||e===this&&Ki(e)||t(194),e;e=n}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&t(67,this.__key),e}getParents(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e),e=e.getParent();return t}getParentKeys(){const t=[];let e=this.getParent();for(;null!==e;)t.push(e.__key),e=e.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return null===t?null:Ys(t)}getPreviousSiblings(){const t=[],e=this.getParent();if(null===e)return t;let n=e.getFirstChild();for(;null!==n&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return null===t?null:Ys(t)}getNextSiblings(){const t=[];let e=this.getNextSibling();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getCommonAncestor(t){const e=Pi(this)?this:this.getParent(),n=Pi(t)?t:t.getParent(),o=e&&n?Za(e,n):null;return o?o.commonAncestor:null}is(t){return null!=t&&this.__key===t.__key}isBefore(e){const n=Za(this,e);return null!==n&&("descendant"===n.type||("branch"===n.type?-1===Ga(n):("same"!==n.type&&"ancestor"!==n.type&&t(279),!1)))}isParentOf(t){return Fl(t,this)}getNodesBetween(e){const n=this.isBefore(e),o=[],r=new Set;let i=this;for(;null!==i;){const s=i.__key;if(r.has(s)||(r.add(s),o.push(i)),i===e)break;const l=Pi(i)?n?i.getFirstChild():i.getLastChild():null;if(null!==l){i=l;continue}const c=n?i.getNextSibling():i.getPreviousSibling();if(null!==c){i=c;continue}const a=i.getParentOrThrow();if(r.has(a.__key)||o.push(a),a===e)break;let u=null,f=a;do{if(null===f&&t(68),u=n?f.getNextSibling():f.getPreviousSibling(),f=f.getParent(),null===f)break;null!==u||r.has(f.__key)||o.push(f)}while(null===u);i=u}return n||o.reverse(),o}isDirty(){const t=_i()._dirtyLeaves;return null!==t&&t.has(this.__key)}getLatest(){if(ho(this))return this;const e=Ys(this.__key);return null===e&&t(113),e}getWritable(){if(ho(this))return this;fi();const t=hi(),e=_i(),n=t._nodeMap,o=this.__key,r=this.getLatest(),i=e._cloneNotNeeded,s=Kr();if(null!==s&&s.setCachedNodes(null),i.has(o))return Js(r),r;const l=Dc(r);return i.add(o),Js(l),n.set(o,l),l}getTextContent(){return ha(this)}getTextContentSize(){return this.getTextContent().length}createDOM(e,n){t(70)}updateDOM(e,n,o){t(71)}getDOMSlot(t){return new q(t)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(e){t(18,this.name)}updateFromJSON(t){return function(t,e){const n=t.getWritable(),o=e.$;let r=o;for(const t of Nt(n).flatKeys)t in e&&(void 0!==r&&r!==o||(r={...o}),r[t]=e[t]);return(n.__state||r)&&bt(t).updateFromJSON(r),n}(this,t)}static transform(){return null}remove(t){ao(this,!0,t)}replace(e,n){fi();let o=Kr();null!==o&&(o=o.clone()),$l(this,e);const r=this.getLatest(),i=this.__key,s=e.__key,l=e.getWritable(),c=this.getParentOrThrow().getWritable(),a=c.__size,u=l.getParent(),f=null!==u?l.getIndexWithinParent():-1;Hs(l),null!==u&&ur(o)&&Br(o,u,f,-1);const d=r.getPreviousSibling(),h=r.getNextSibling(),g=r.__prev,_=r.__next,p=r.__parent;if(ao(r,!1,!0),null===d)c.__first=s;else{d.getWritable().__next=s}if(l.__prev=g,null===h)c.__last=s;else{h.getWritable().__prev=s}l.__next=_,l.__parent=p,c.__size=a;let y=0;n&&(Pi(this)&&Pi(l)||t(139),y=l.getChildrenSize(),l.splice(y,0,this.getChildren()));const m=ia(this);if(m.length>0){Qc(this)&&Qc(l)||t(368,this.__key,l.__key);for(const t of m){const e=sa(this,t);null!==e&&(ya(this,t),pa(l,t,e))}}if(ur(o)){ol(o);const t=o.anchor,e=o.focus;t.key===i&&(n&&"element"===t.type?t.set(l.__key,y+t.offset,"element"):ir(t,l)),e.key===i&&(n&&"element"===e.type?e.set(l.__key,y+e.offset,"element"):ir(e,l))}return qs()===i&&Vs(s),l}insertAfter(t,e=!0){fi(),$l(this,t);const n=this.getWritable(),o=t.getWritable();ma(this.getParentOrThrow());const r=o.getParent(),i=Kr();let s=!1,l=!1;if(null!==r){const n=t.getIndexWithinParent();if(ur(i)){const t=r.__key,e=i.anchor,o=i.focus;s="element"===e.type&&e.key===t&&e.offset===n+1,l="element"===o.type&&o.key===t&&o.offset===n+1}Hs(o),e&&ur(i)&&Br(i,r,n,-1)}else Hs(o);const c=this.getNextSibling(),a=this.getParentOrThrow().getWritable(),u=o.__key,f=n.__next;if(null===c)a.__last=u;else{c.getWritable().__prev=u}if(a.__size++,n.__next=u,o.__next=f,o.__prev=n.__key,o.__parent=n.__parent,e&&ur(i)){const t=this.getIndexWithinParent();Br(i,a,t+1);const e=a.__key;s&&i.anchor.set(e,t+2,"element"),l&&i.focus.set(e,t+2,"element")}return t}insertBefore(t,e=!0){fi(),$l(this,t);const n=this.getWritable(),o=t.getWritable();ma(this.getParentOrThrow());const r=o.__key,i=Kr(),s=o.getParent(),l=null!==s?o.getIndexWithinParent():-1;Hs(o),null!==s&&e&&ur(i)&&Br(i,s,l,-1);const c=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),u=n.__prev,f=this.getIndexWithinParent();if(null===c)a.__first=r;else{c.getWritable().__next=r}if(a.__size++,n.__prev=r,o.__prev=u,o.__next=n.__key,o.__parent=n.__parent,e&&ur(i)){Br(i,this.getParentOrThrow(),f)}return t}isParentRequired(){return!1}createParentElementNode(){return es()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,e){fi();const n=ea(this);if(null!==n)return n.selectPrevious(t,e);const o=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===o)return r.select(0,0);if(Pi(o))return o.select();if(!Xo(o)){const t=o.getIndexWithinParent()+1;return r.select(t,t)}return o.select(t,e)}selectNext(t,e){fi();const n=ea(this);if(null!==n)return n.selectNext(t,e);const o=this.getNextSibling(),r=this.getParentOrThrow();if(null===o)return r.select();if(Pi(o))return o.select(0,0);if(!Xo(o)){const t=o.getIndexWithinParent();return r.select(t,t)}return o.select(t,e)}markDirty(){this.getWritable()}reconcileObservedMutation(t,e){this.markDirty()}}function po(t){return t instanceof _o}const yo="historic",mo="history-push",xo="history-merge",Co="paste",So="cut",vo="collaboration",To="skip-collab",ko="skip-scroll-into-view",bo="skip-dom-selection",No="skip-selection-focus",Eo="composition-start",wo="composition-end",Oo="!important";function Mo(t){const e={};if(!t)return e;let n="",o="",r=null,i=!1,s=!1,l=!1,c=0;const a=t.length;let u=-1;for(let f=0;f=0&&o.slice(r).toLowerCase()===Oo?t.setProperty(e,o.slice(0,r).trim(),"important"):t.setProperty(e,n,"")}function Do(t,e){for(const n in e){const o=e[n];null==o?t.removeProperty(n):Ao(t,n,o)}}function Fo(t,e,n=""){if(e===n)return;const o=Mo(n),r=Mo(e);for(const e in r)delete o[e],Ao(t,e,r[e]);for(const e in o)t.removeProperty(e)}function Po(t,e){return 16&e?"code":e&T?"mark":32&e?"sub":64&e?"sup":null}function Io(t,e){return 1&e?"strong":2&e?"em":"span"}function Lo(t,e,n,o,r){const i=o.classList;let s=Cl(r,"base");void 0!==s&&i.add(...s),s=Cl(r,"underlineStrikethrough");let l=!1;const c=8&e&&4&e;void 0!==s&&(8&n&&4&n?(l=!0,c||i.add(...s)):c&&i.remove(...s));for(const t in z){const o=z[t];if(s=Cl(r,t),void 0!==s)if(n&o){if(l&&("underline"===t||"strikethrough"===t)){e&o&&i.remove(...s);continue}(0===(e&o)||c&&"underline"===t||"strikethrough"===t)&&i.add(...s)}else e&o&&i.remove(...s)}}function Ko(t,e,n){const o=n.isComposing(),r=t+(o?A:""),s=vc(),l=Tc(s).$getDOMSlot(n,e,s),c=l.getFirstChild();if(null===c||c.nodeType!==Node.TEXT_NODE)return void l.insertChild(Zl().createTextNode(r));const a=c,u=a.nodeValue;if(u!==r)if(true||o||i){const[t,e,n]=function(t,e){const n=t.length,o=e.length;let r=0,i=0;for(;r({conversion:Jo,priority:0}),b:()=>({conversion:Uo,priority:0}),code:()=>({conversion:Yo,priority:0}),em:()=>({conversion:Yo,priority:0}),i:()=>({conversion:Yo,priority:0}),mark:()=>({conversion:Yo,priority:0}),s:()=>({conversion:Yo,priority:0}),span:()=>({conversion:$o,priority:0}),strong:()=>({conversion:Yo,priority:0}),sub:()=>({conversion:Yo,priority:0}),sup:()=>({conversion:Yo,priority:0}),u:()=>({conversion:Yo,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}constructor(t="",e){super(e),this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return U[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===qs()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const e=z[t];return 0!==(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(t,e){return Ws(this.getLatest().__format,t,e)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,e){const n=this.__format,o=Po(0,n),r=Io(0,n),i=null===o?r:o,s=Zl().createElement(i);let l=s;this.hasFormat("code")&&s.setAttribute("spellcheck","false"),null!==o&&(l=Zl().createElement(r),s.appendChild(l));zo(l,this,0,n,this.__text,t);const c=this.__style;return""!==c&&Fo(s.style,c),s}updateDOM(e,n,o){const r=this.__text,i=e.__format,s=this.__format,l=Po(0,i),c=Po(0,s),a=Io(0,i),u=Io(0,s);if((null===l?a:l)!==(null===c?u:c))return!0;if(l===c&&a!==u){const e=n.firstChild;null==e&&t(48);const i=Zl().createElement(u);return zo(i,this,0,s,r,o),n.replaceChild(i,e),!1}let f=n;null!==c&&null!==l&&(f=n.firstChild,null==f&&t(49)),Ko(r,f,this);const d=o.theme.text;void 0!==d&&i!==s&&Lo(0,i,s,f,d);const h=e.__style,g=this.__style;return h!==g&&Fo(n.style,g,h),!1}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(e){let{element:n}=super.exportDOM(e);return gc(n)||t(132),n.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?n.style.textTransform="lowercase":this.hasFormat("uppercase")?n.style.textTransform="uppercase":this.hasFormat("capitalize")&&(n.style.textTransform="capitalize"),this.hasFormat("bold")&&(n=Bo(n,"b")),this.hasFormat("italic")&&(n=Bo(n,"i")),this.hasFormat("strikethrough")&&(n=Bo(n,"s")),this.hasFormat("underline")&&(n=Bo(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,e){}setFormat(t){const e=this.getWritable();return e.__format="string"==typeof t?z[t]:t,e}setDetail(t){const e=this.getWritable();return e.__detail="string"==typeof t?B[t]:t,e}setStyle(t){const e=this.getWritable();return e.__style=t,e}toggleFormat(t){const e=Ws(this.getFormat(),t,null);return this.setFormat(e)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const e=$[t];if(this.__mode===e)return this;const n=this.getWritable();return n.__mode=e,n}setTextContent(t){if(this.__text===t)return this;const e=this.getWritable();return e.__text=t,e}select(t,e){fi();let n=t,o=e;const r=Kr(),i=this.getTextContent(),s=this.__key;if("string"==typeof i){const t=i.length;void 0===n&&(n=t),void 0===o&&(o=t)}else n=0,o=0;if(!ur(r))return Dr(s,n,s,o,"text","text");{const t=qs();t!==r.anchor.key&&t!==r.focus.key||Vs(s),r.setTextNodeRange(this,n,this,o)}return r}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,e,n,o){const r=this.getWritable(),i=r.__text,s=n.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const c=Kr();if(o&&ur(c)){const e=t+s;c.setTextNodeRange(r,e,r,e)}const a=i.slice(0,l)+n+i.slice(l+e);return r.__text=a,r}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){fi();const e=this.getLatest(),n=e.getTextContent();if(""===n)return[];const o=e.__key,r=qs(),i=n.length;t.sort((t,e)=>t-e),t.push(i);const s=[],l=t.length;for(let e=0,o=0;ee&&(s.push(n.slice(e,r)),e=r)}const c=s.length;if(1===c)return[e];const a=s[0],u=e.getParent();let f;const d=e.getFormat(),h=e.getStyle(),g=e.__detail;let _=!1,p=null,y=null;const m=Kr();if(ur(m)){const[t,e]=m.isBackward()?[m.focus,m.anchor]:[m.anchor,m.focus];"text"===t.type&&t.key===o&&(p=t),"text"===e.type&&e.key===o&&(y=e)}e.isSegmented()?(f=Go(a),f.__format=d,f.__style=h,f.__detail=g,f.__state=At(e,f),_=!0):f=e.setTextContent(a);const x=[f];for(let t=1;t=v&&(p.set(t.getKey(),C-v,"text"),C=v){y.set(t.getKey(),S-v,"text");break}v=e}if(null!==u){!function(t){const e=t.getPreviousSibling(),n=t.getNextSibling();null!==e&&Js(e);null!==n&&Js(n)}(this);const t=u.getWritable(),e=this.getIndexWithinParent();_?(t.splice(e,0,x),this.remove()):t.splice(e,1,x),ur(m)&&Br(m,u,e,c-1)}return x}mergeWithSibling(e){const n=e===this.getPreviousSibling();n||e===this.getNextSibling()||t(50);const o=this.__key,r=e.__key,i=this.__text,s=i.length;qs()===r&&Vs(o);const l=Kr();if(ur(l)){const t=l.anchor,i=l.focus;null!==t&&t.key===r&&$r(t,n,o,e,s),null!==i&&i.key===r&&$r(i,n,o,e,s)}const c=e.__text,a=n?c+i:i+c;this.setTextContent(a);const u=this.getWritable();return e.remove(),u}isTextEntity(){return!1}}function $o(t){return{forChild:Qo(t.style),node:null}}function Uo(t){const e=t,n="normal"===e.style.fontWeight;return{forChild:Qo(e.style,n?void 0:"bold"),node:null}}const Ho=new WeakMap;function jo(t){if(!gc(t))return!1;if("PRE"===t.nodeName)return!0;const e=t.style.whiteSpace;return"string"==typeof e&&e.startsWith("pre")}function Jo(e){const n=e;null===e.parentElement&&t(129);let o=n.textContent||"";if(null!==function(t){let e,n=t.parentNode;const o=[t];for(;null!==n&&void 0===(e=Ho.get(n))&&!jo(n);)o.push(n),n=n.parentNode;const r=void 0===e?n:e;for(let t=0;t0){/[ \t\n]$/.test(n)&&(o=o.slice(1)),e=!1;break}}e&&(o=o.slice(1))}if(" "===o[o.length-1]){let t=n,e=!0;for(;null!==t&&null!==(t=Vo(t,!0));){if((t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){e=!1;break}}e&&(o=o.slice(0,o.length-1))}return""===o?{node:null}:{node:Go(o)}}function Vo(t,e){let n=t;for(;;){let t;for(;null===(t=e?n.nextSibling:n.previousSibling);){const t=n.parentElement;if(null===t)return null;n=t}if(n=t,gc(n)){const t=n.style.display;if(""===t&&!mc(n)||""!==t&&!t.startsWith("inline"))return null}let o=n;for(;null!==(o=e?n.firstChild:n.lastChild);)n=o;if(zs(n))return n;if("BR"===n.nodeName)return null}}const qo={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Yo(t){const e=qo[t.nodeName.toLowerCase()];return void 0===e?{node:null}:{forChild:Qo(t.style,e),node:null}}function Go(t=""){return Wl(new Wo(t))}function Xo(t){return t instanceof Wo}function Qo(t,e){const n=t.fontWeight,o=t.textDecoration.split(" "),r="700"===n||"bold"===n,i=o.includes("line-through"),s="italic"===t.fontStyle,l=o.includes("underline"),c=t.verticalAlign;return t=>Xo(t)||Ro(t)?(r&&!t.hasFormat("bold")&&t.toggleFormat("bold"),i&&!t.hasFormat("strikethrough")&&t.toggleFormat("strikethrough"),s&&!t.hasFormat("italic")&&t.toggleFormat("italic"),l&&!t.hasFormat("underline")&&t.toggleFormat("underline"),"sub"!==c||t.hasFormat("subscript")||t.toggleFormat("subscript"),"super"!==c||t.hasFormat("superscript")||t.toggleFormat("superscript"),e&&!t.hasFormat(e)&&t.toggleFormat(e),t):t}class Zo extends Wo{$config(){return this.config("tab",{extends:Wo})}constructor(t=void 0){super("\t",t),this.__detail=2}createDOM(t){const e=super.createDOM(t),n=Cl(t.theme,"tab");if(void 0!==n){e.classList.add(...n)}return e}setTextContent(t){return super.setTextContent("\t")}spliceText(e,n,o,r){return""===o&&0===n||"\t"===o&&1===n||t(286),this}setDetail(e){return 2!==e&&t(127),this}setMode(e){return"normal"!==e&&t(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function tr(){return Wl(new Zo)}function er(t){return t instanceof Zo}class nr{key;offset;type;_selection;constructor(t,e,n){this._selection=null,this.key=t,this.offset=e,this.type=n}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){if(this.key===t.key)return this.offsett&&(o=t)}else if(!Pi(e)){const t=e.getNextSibling();if(Xo(t))n=t.__key,o=0,r="text";else{const t=e.getParent();t&&(n=t.__key,o=e.getIndexWithinParent()+1)}}t.set(n,o,r)}function ir(t,e){if(Pi(e)){const n=e.getLastDescendant();Pi(n)||Xo(n)?rr(t,n):rr(t,e)}else rr(t,e)}function sr(t,e,n,o){const r=t.getNode(),i=r.getChildAtIndex(t.offset),s=Go();if(s.setFormat(n),s.setStyle(o),ns(i))i.splice(0,0,[s]);else if(null!==i){const t=Bl(r)?es().append(s):s;i.insertBefore(t)}else if(Bl(r)){const t=r.getLastChild();Pi(t)&&!t.isInline()&&t.isEmpty()?t.append(s):r.append(es().append(s))}else r.append(s);t.is(e)&&e.set(s.__key,0,"text"),t.set(s.__key,0,"text")}function lr(e,n,o,r){const i=e.anchor.getNode();Xo(i)||t(398);const s=e.anchor.offset,l=Go(n);l.setFormat(o),l.setStyle(r);const c=i.getParentOrThrow();if(0===s)c.isInline()&&!i.__prev?c.insertBefore(l):i.insertBefore(l,!1);else if(s===i.getTextContentSize())c.isInline()&&!i.__next?c.insertAfter(l):i.insertAfter(l,!1);else{const[t]=i.splitText(s);t.insertAfter(l,!1)}""===i.getTextContent()&&i.isAttached()&&i.remove(),l.selectEnd(),l.isComposing()&&"text"===e.anchor.type&&e.anchor.set(e.anchor.key,e.anchor.offset-n.length,e.anchor.type)}class cr{_nodes;_cachedNodes;dirty;constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!dr(t))return!1;const e=this._nodes,n=t._nodes;return e.size===n.size&&Array.from(e).every(t=>n.has(t))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new cr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const e=this.getNodes().filter(t=>null===ta(t)),n=e.length;if(0===n)return;const o=e[n-1];let r;if(Xo(o))r=o.select();else{const t=o.getIndexWithinParent()+1;r=o.getParentOrThrow().select(t,t)}r.insertNodes(t);for(let t=0;tnull===ta(t));if((Kr()||zr())===this&&t[0]){const e=Ia(t[0],"next");nu(Va(e,e))}for(const e of t)e.remove();ar()}}function ar(){const t=nl();if(t.isEmpty()){const e=es();t.append(e),e.select()}}function ur(t){return t instanceof fr}class fr{format;style;anchor;focus;_cachedNodes;_cachedIsBackward;dirty;constructor(t,e,n,o){this.anchor=t,this.focus=e,t._selection=this,e._selection=this,this._cachedNodes=null,this._cachedIsBackward=null,this.format=n,this.style=o,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ur(t)&&(this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(null!==t)return t;const e=function(t){const e=[],[n,o]=t.getTextSlices();n&&e.push(n.caret.origin);const r=new Set,i=new Set;for(const n of t)if(Aa(n)){const{origin:t}=n;0===e.length?r.add(t):(i.add(t),e.push(t))}else{const{origin:t}=n;Pi(t)&&i.has(t)||e.push(t)}o&&e.push(o.caret.origin);if(Ma(t.focus)&&Pi(t.focus.origin)&&null===t.focus.getNodeAtCaret())for(let n=Ba(t.focus.origin,"previous");Aa(n)&&r.has(n.origin)&&!n.origin.isEmpty()&&n.origin.is(e[e.length-1]);n=Wa(n))r.delete(n.origin),e.pop();for(;e.length>1;){const t=e[e.length-1];if(!Pi(t)||i.has(t)||t.isEmpty()||r.has(t))break;e.pop()}if(0===e.length&&t.isCollapsed()){const n=au(t.anchor),o=au(t.anchor.getFlipped()),r=t=>wa(t)?t.origin:t.getNodeAtCaret(),i=r(n)||r(o)||(t.anchor.getNodeAtCaret()?n.origin:o.origin);e.push(i)}return e}(du(ru(this),"next"));return ui()||(this._cachedNodes=e),e}setTextNodeRange(t,e,n,o){return this.anchor.set(t.__key,e,"text"),this.focus.set(n.__key,o,"text"),this}getTextContent(){const t=this.getNodes();if(0===t.length)return"";const e=t[0],n=t[t.length-1],o=this.anchor,r=this.focus,i=o.isBefore(r),[s,l]=yr(this);let c="",a=!0;for(let u=0;u(Pi(t)||Ki(t))&&!t.isInline())){Pi(r)||t(211,o.constructor.name,o.getType());const n=Xr(this);return r.splice(n,0,e),void i.selectEnd()}if(Pi(r)&&null!==ta(r)){const t=Xr(this),n=Gr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}if(null===r){const t=ti(e),n=t.getLastDescendant();let o=tu(this.anchor,"next");for(const e of t.getChildren())o=mu(e,o);return void(null!==n&&n.selectEnd())}if(Pi(r)&&!r.isParentRequired()&&!Bl(r.getParentOrThrow())){const t=Xr(this),n=Gr(e);r.splice(t,0,n);const o=n[n.length-1];return void(void 0!==o?o.selectEnd():r.select(t,t))}const s=ti(e),l=s.getLastDescendant(),c=s.getChildren(),a=!Pi(r)||!r.isEmpty()?this.insertParagraph():null;a&&!r.isAttached()&&(o=this.anchor.getNode(),r=qc(o,Sc));const u=c[c.length-1];let f=c[0];var d;Pi(d=f)&&Sc(d)&&!d.isEmpty()&&Pi(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Pi(r)||t(211,o.constructor.name,o.getType()),r.append(...f.getChildren()),f=c[1]),f&&(null===r&&t(212,o.constructor.name,o.getType()),function(e,n){const o=n.getParentOrThrow().getLastChild();let r=n;const i=[n];for(;r!==o;)r.getNextSibling()||t(140),r=r.getNextSibling(),i.push(r);let s=e;for(const t of i)s=s.insertAfter(t)}(r,f));const h=qc(l,Sc);a&&Pi(h)&&(a.canMergeWhenEmpty()||Sc(u))&&(h.append(...a.getChildren()),a.remove()),Pi(r)&&r.isEmpty()&&r.remove(),l.selectEnd();const g=Pi(r)?r.getLastChild():null;Yi(g)&&h!==r&&g.remove()}insertParagraph(){const e=this.anchor.getNode();if("element"===this.anchor.type&&Bl(e)){const t=es();return e.splice(this.anchor.offset,0,[t]),t.select(),t}const n=Xr(this),o=qc(this.anchor.getNode(),Sc);if(null!==o&&null!==ta(o))return null;Pi(o)||t(213);const r=o.getChildAtIndex(n),i=r?[r,...r.getNextSiblings()]:[],s=o.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(t){const e=qi();if(this.insertNodes([e]),t){const t=e.getParentOrThrow(),n=e.getIndexWithinParent();t.select(n,n)}}extract(){const t=[...this.getNodes()],e=t.length;let n=t[0],o=t[e-1];const[r,i]=yr(this),s=this.isBackward(),[l,c]=s?[this.focus,this.anchor]:[this.anchor,this.focus],[a,u]=s?[i,r]:[r,i];if(0===e)return[];if(1===e){if(Xo(n)&&!this.isCollapsed()){const t=n.splitText(a,u),e=0===a?t[0]:t[1];return e?(l.set(e.getKey(),0,"text"),c.set(e.getKey(),e.getTextContentSize(),"text"),[e]):[]}return[n]}if(Xo(n)&&(a===n.getTextContentSize()?t.shift():0!==a&&([,n]=n.splitText(a),t[0]=n,l.set(n.getKey(),0,"text"))),Xo(o)){const e=o.getTextContent().length;0===u?t.pop():u!==e&&([o]=o.splitText(u),t[t.length-1]=o,c.set(o.getKey(),o.getTextContentSize(),"text"))}return t}modify(t,e,n){if(ei(this,t,e,n))return;const o="move"===t,r=_i(),i=Jl(Il(r));if(!i)return;const s=r._blockCursorElement,l=r._rootElement,c=this.focus.getNode();null===l||null===s||!Pi(c)||c.isInline()||c.canBeEmpty()||jl(s,r,l);const a=El(r,this.focus.key);let u=a;if("text"===this.focus.type&&(u=Xo(c)?wc(c,a,r):null),this.dirty){const t=El(r,this.anchor.key);let e=t;if("text"===this.anchor.type){const n=this.anchor.getNode();e=Xo(n)?wc(n,t,r):null}e&&u&&Ur(i,e,this.anchor.offset,u,this.focus.offset)}if("character"===n&&Xo(c)&&c.isUnmergeable()){if(e?0===this.focus.offset:this.focus.offset===c.getTextContentSize()){const t=Ia(c,e?"previous":"next").getNodeAtCaret();if(Xo(t)){if(!o){const n=t.getTextContentSize();return e?this.focus.set(t.__key,n-1,"text"):this.focus.set(t.__key,1,"text"),void(this.dirty=!0)}{const n=r.getElementByKey(t.getKey()),o=n?wc(t,n,r):null;if(o){const t=e?o.length:0;Ur(i,o,t,o,t)}}}}}if(Cr(i,t,e?"backward":"forward",n),i.rangeCount>0){const t=tc(i,r._rootElement),n=t||i.getRangeAt(0),s=this.anchor.getNode(),l=Bi(s)?s:Kl(s);if(this.applyDOMRange(n),this.dirty=!0,!o){Sr(this,e,l);(t?"backward"!==i.direction:i.anchorNode===n.startContainer&&i.anchorOffset===n.startOffset)||xr(this)}}"lineboundary"===n&&ei(this,t,e,n,"decorators")}forwardDeletion(t,e,n){if(!n&&("element"===t.type&&Pi(e)&&t.offset===e.getChildrenSize()||"text"===t.type&&t.offset===e.getTextContentSize())){const t=e.getParent(),n=e.getNextSibling()||(null===t?null:t.getNextSibling());if(Pi(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(t){const e=this.isCollapsed();if(this.isCollapsed()){const e=this.anchor;let n=e.getNode();if(this.forwardDeletion(e,n,t))return;const o=ja(tu(e,t?"previous":"next"));if(o.getTextSlices().every(t=>null===t||0===t.distance)){let t={type:"initial"};for(const e of o.iterNodeCarets("shadowRoot"))if(Aa(e))if(e.origin.isInline());else{if(e.origin.isShadowRoot()){if("merge-block"===t.type)break;if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){const t=au(e);ou(this,Va(t,t)),o.anchor.origin.remove()}return}"merge-next-block"!==t.type&&"merge-block"!==t.type||(t={block:t.block,caret:e,type:"merge-block"})}else{if("merge-block"===t.type)break;if(Ma(e)){if(Pi(e.origin)){if(e.origin.isInline()){if(!e.origin.isParentOf(o.anchor.origin))break}else t={block:e.origin,type:"merge-next-block"};continue}if(Ki(e.origin)){if(e.origin.isIsolated());else if(ia(e.origin).length>0){if(Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),ol(t)}}else if("merge-next-block"===t.type&&(e.origin.isKeyboardSelectable()||!e.origin.isInline())&&Pi(o.anchor.origin)&&o.anchor.origin.isEmpty()){o.anchor.origin.remove();const t=Pr();t.add(e.origin.getKey()),ol(t)}else e.origin.remove();return}break}}if("merge-block"===t.type){const{caret:e,block:n}=t;if(ia(n).length>0)return;return e.origin.isEmpty()&&!n.isEmpty()&&e.origin.getParent()===n.getParent()?void e.origin.remove(!0):(ou(this,Va(!e.origin.isEmpty()&&n.isEmpty()?iu(Ia(n,e.direction)):o.anchor,e)),this.removeText())}for(let t=e.getNode();null!==t;){if(null!==ta(t))return;if(Pi(t)&&t.isShadowRoot())break;t=t.getParent()}}const r=this.focus;if(vr(this,t,"character"),this.isCollapsed()){if(t&&0===e.offset&&mr(this,e.getNode()))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===e.type?e.getNode():null,null!==o&&o.isSegmented()){const e=r.offset,i=o.getTextContentSize();if(o.is(n)||t&&e!==i||!t&&0!==e)return void kr(o,t,e)}else if(null!==n&&n.isSegmented()){const r=e.offset,i=n.getTextContentSize();if(n.is(o)||t&&0!==r||!t&&r!==i)return void kr(n,t,r)}!function(t,e){const n=t.anchor,o=t.focus,r=n.getNode(),i=o.getNode();if(r===i&&"text"===n.type&&"text"===o.type){const t=n.offset,i=o.offset,s=t0&&(g===h.getTextContentSize()||Ks(h)||([h]=h.splitText(g)),h.setFormat(p));for(let t=a+1;t{for(const[e,o]of n)t=Ws(t,e,o?z[e]:0);return t})}function _r(t,e,n=null){const o=null===n&&ur(t)?Ws(t.format,e,null):n;hr(t,t=>Ws(t,e,o))}function pr(t){const e=t.offset;if("text"===t.type)return e;const n=t.getNode();return e===n.getChildrenSize()?n.getTextContent().length:0}function yr(t){const e=t.getStartEndPoints();if(null===e)return[0,0];const[n,o]=e;return"element"===n.type&&"element"===o.type&&n.key===o.key&&n.offset===o.offset?[0,0]:[pr(n),pr(o)]}function mr(t,e){for(let n=e;n;n=n.getParent()){if(Pi(n)){if(n.collapseAtStart(t))return!0;if(Bl(n))break}if(n.getPreviousSibling())break}return!1}function xr(t){const e=t.focus,n=t.anchor,o=n.key,r=n.offset,i=n.type;n.set(e.key,e.offset,e.type,!0),e.set(o,r,i,!0)}function Cr(t,e,n,o){t.modify(e,n,o)}function Sr(t,e,n){const o=t.getNodes(),r=o.filter(t=>Fl(t,n));if(0===r.length||r.length===o.length)return!1;const i=e?r[0]:r[r.length-1],s=Pi(i)?i:i.getParentOrThrow();return e?s.selectStart():s.selectEnd(),!0}function vr(t,e,n){if(ei(t,"extend",e,n))return;const o=_i(),r=Jl(Il(o));if(!r||"function"!=typeof r.modify)return;const i=o._blockCursorElement,s=o._rootElement,l=t.anchor,c=t.focus.getNode();null===s||null===i||!Pi(c)||c.isInline()||c.canBeEmpty()||jl(i,o,s);const a=t=>{const e=t.getNode(),n=o.getElementByKey(t.key);return null!==n&&"text"===t.type&&Xo(e)?wc(e,n,o):n},u=l.getNode(),f=a(l);if(null===f)return;const d=l.offset,h=t.isCollapsed(),g=t.focus,_=h?f:a(g);if(null===_)return;const p=g.offset;if(Ur(r,_,p,_,p),Cr(r,"move",e?"backward":"forward",n),0===r.rangeCount)return;const y=tc(r,s)||r.getRangeAt(0),m=y.startContainer,x=y.startOffset;if(h&&"character"===n&&"text"===l.type&&Xo(u)&&u.isUnmergeable()){if(d===(e?0:u.getTextContentSize())){const n=Ia(u,e?"previous":"next").getNodeAtCaret();if(Xo(n)){const o=e?n.getTextContentSize()-1:1;return t.focus.set(n.__key,o,"text"),void(t.dirty=!0)}}}if(h&&"character"===n&&"text"===l.type){const n=e?0:u.getTextContentSize(),o=m===f?x:d!==n?n:-1;if(o>=0)return void(o!==d&&(t.focus.set(l.key,o,"text"),t.dirty=!0))}const[C,S,v,T]=e?[m,x,f,d]:[f,d,m,x],k=Bi(u)?u:Kl(u);t.applyDOMRange({collapsed:!1,endContainer:v,endOffset:T,startContainer:C,startOffset:S}),t.dirty=!0,!Sr(t,e,k)&&e&&xr(t),"lineboundary"===n&&ei(t,"extend",e,n,"decorators")}const Tr=(()=>{try{const t=new RegExp("\\p{Emoji}","u"),e=t.test.bind(t);if(e("\u2764\ufe0f")&&e("#\ufe0f\u20e3")&&e("\u{1f44d}"))return e}catch(t){}return()=>!1})();function kr(t,e,n){const o=t,r=o.getTextContent().split(/(?=\s)/g),i=r.length;let s=0,l=0;for(let t=0;tn||o){r.splice(t,1),o&&(l=void 0);break}}const c=r.join("").trim();""===c?o.remove():(o.setTextContent(c),o.select(l,l))}function br(e,n,o,r){let i,s=n,l=!1;if(gc(e)){let c=!1;const a=e.childNodes,u=a.length,f=r._blockCursorElement;s===u&&u>0&&(c=!0,s=u-1),void 0!==Qs(e,r)||Rc(e,r)||(l=!0);let d=a[s],h=!1;if(d===f)d=a[s+1],h=!0;else if(null!==f){const t=f.parentNode;if(e===t){n>Array.prototype.indexOf.call(t.children,f)&&s--}}if(i=il(d),Xo(i))s=Ka(i,c?"next":"previous");else{let a=il(e);if(null===a)return null;if(Pi(a)){const l=r.getElementByKey(a.getKey());null===l&&t(214);const u=kc(a,l,r);[a,s]=u.resolveChildIndex(a,l,e,n),Pi(a)||t(215),c&&s>=a.getChildrenSize()&&(s=Math.max(0,a.getChildrenSize()-1));let f=a.getChildAtIndex(s);if(Pi(f)&&function(t,e,n){const o=t.getParent();return null===n||null===o||!o.canBeEmpty()||o!==n.getNode()}(f,0,o)){const t=c?f.getLastDescendant():f.getFirstDescendant();null===t?a=f:(f=t,a=Pi(f)?f:f.getParentOrThrow()),s=0}Xo(f)?(i=f,a=null,s=Ka(f,c?"next":"previous")):f!==a&&c&&!h&&(Pi(a)||t(216),s=Math.min(a.getChildrenSize(),s+1))}else{const t=ea(a),o=null!==t?t:a,i=o.getIndexWithinParent(),l=r.getElementByKey(a.getKey());let c="after";if(null!==l&&il(e)===a){const t=kc(a,l,r);t.element!==l?c=t.resolveLeafPosition(l,e,n):0===n&&Ki(a)&&(c="before")}s="before"===c?i:i+1,a=o.getParentOrThrow()}if(Pi(a))return[or(a.__key,s,"element"),l]}}else i=il(e);return Xo(i)?[or(i.__key,Ka(i,s,"clamp"),"text"),l]:null}function Nr(t,e,n){const o=t.offset,r=t.getNode();if(0===o){const o=r.getPreviousSibling(),i=r.getParent();if(e){if((n||!e)&&null===o&&Pi(i)&&i.isInline()){const e=i.getPreviousSibling();Xo(e)&&t.set(e.__key,e.getTextContent().length,"text")}}else Pi(o)&&!n&&o.isInline()?t.set(o.__key,o.getChildrenSize(),"element"):Xo(o)&&!r.isUnmergeable()&&t.set(o.__key,o.getTextContent().length,"text")}else if(o===r.getTextContent().length){const o=r.getNextSibling(),i=r.getParent();if(e&&Pi(o)&&o.isInline())t.set(o.__key,0,"element");else if((n||e)&&null===o&&Pi(i)&&i.isInline()&&!i.canInsertTextAfter()&&i.getTextContentSize()>1){const e=i.getNextSibling();Xo(e)&&t.set(e.__key,0,"text")}}}function Er(t){const e=Ys(t.key);return null===e?null:oa(e)}function wr(t,e,n){const o=Er(t),r=Er(e);if(o===r||null!==o&&null!==r&&o.is(r))return!1;const i=n(o,r);if(null!==o)return Pi(o)?e.set(o.getKey(),i?o.getChildrenSize():0,"element"):e.set(o.getKey(),i?o.getTextContentSize():0,"text"),!0;const s=ea(r);if(null===s)return!1;const l=s.getParent();if(null===l)return!1;const c=s.getIndexWithinParent();return e.set(l.getKey(),i?c+1:c,"element"),!0}function Or(t){const e=wr(t.anchor,t.focus,(e,n)=>function(t,e,n,o){if(null!==n&&null!==o){const t=ea(n),e=ea(o);if(null!==t&&t.is(e)){for(const e of ra(t).values()){if(e===n.getKey())return!0;if(e===o.getKey())return!1}return!0}return null===t||null===e||t.isBefore(e)}if(null!==n){const t=ea(n),o=Ys(e.key);return null===t||null===o||!(!t.is(o)&&!t.isParentOf(o))||t.isBefore(o)}const r=ea(o),i=Ys(t.key);return null!==r&&null!==i&&!r.is(i)&&!r.isParentOf(i)&&i.isBefore(r)}(t.anchor,t.focus,e,n));return e&&(t.dirty=!0),e}function Mr(t,e,n,o,r,i){if(null===t||null===n||!As(r,t,n))return null;const s=br(t,e,ur(i)?i.anchor:null,r);if(null===s)return null;const l=br(n,o,ur(i)?i.focus:null,r);if(null===l)return null;const[c,a]=s,[u,f]=l;if("element"===c.type&&"element"===u.type){const e=il(t),o=il(n);if(Ki(e)&&Ki(o))return null}const d=r._slotsUsed&&wr(c,u,()=>0!==(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING));return function(t,e){if("text"===t.type&&"text"===e.type){const n=t.isBefore(e),o=t.is(e);Nr(t,n,o),Nr(e,!n,o),o&&e.set(t.key,t.offset,t.type)}}(c,u),[c,u,a||f||d]}function Ar(t){return Pi(t)&&!t.isInline()}function Dr(t,e,n,o,r,i){const s=hi(),l=new fr(or(t,e,r),or(n,o,i),0,"");return l.dirty=!0,s._selection=l,l}function Fr(){const t=or("root",0,"element"),e=or("root",0,"element");return new fr(t,e,0,"")}function Pr(){return new cr(new Set)}function Ir(t,e){return Lr(null,t,e,null)}function Lr(t,e,n,o){const r=n._window;if(null===r)return null;const i=o||r.event,s=i?i.type:void 0,l="selectionchange"===s,c=!it&&(l||"beforeinput"===s||"compositionstart"===s||"compositionend"===s||"click"===s&&i&&3===i.detail||"drop"===s||void 0===s);let a,u,f,d;if(ur(t)&&!c)return t.clone();{if(null===e)return null;const o=nc(e,n._rootElement);if(a=o.anchorNode,u=o.focusNode,f=o.anchorOffset,d=o.focusOffset,(l||void 0===s)&&ur(t)&&!As(n,a,u))return t.clone()}const h=Mr(a,f,u,d,n,t);if(null===h)return null;const[g,_,p]=h;let y=0,m="";if(ur(t)){const e=t.anchor;if(g.key===e.key)y=t.format,m=t.style;else{const t=g.getNode();Xo(t)?(y=t.getFormat(),m=t.getStyle()):Pi(t)&&(y=t.getTextFormat(),m=t.getTextStyle())}}const x=new fr(g,_,y,m);return p&&(x.dirty=!0),x}function Kr(){return hi()._selection}function zr(){return _i()._editorState._selection}function Br(t,e,n,o=1){const r=t.anchor,i=t.focus,s=r.getNode(),l=i.getNode();if(!e.is(s)&&!e.is(l))return;const c=e.__key;if(t.isCollapsed()){const e=r.offset;if(n<=e&&o>0||n0||n0||n=t,s=r?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(s)){let t=0;r&&(t=s.getTextContentSize()),e.set(s.__key,t,"text"),o.set(s.__key,t,"text")}return}if(Pi(i)){const t=i.getChildrenSize(),o=n>=t,r=o?i.getChildAtIndex(t-1):i.getChildAtIndex(n);if(Xo(r)){let t=0;o&&(t=r.getTextContentSize()),e.set(r.__key,t,"text")}}if(Pi(s)){const t=s.getChildrenSize(),e=r>=t,n=e?s.getChildAtIndex(t-1):s.getChildAtIndex(r);if(Xo(n)){let t=0;e&&(t=n.getTextContentSize()),o.set(n.__key,t,"text")}}}function Wr(t,e,n,o,r){let i=null,s=0,l=null;null!==o?(i=o.__key,Xo(o)?(s=o.getTextContentSize(),l="text"):Pi(o)&&(s=o.getChildrenSize(),l="element")):null!==r&&(i=r.__key,Xo(r)?l="text":Pi(r)&&(l="element")),null!==i&&null!==l?t.set(i,s,l):(s=e.getIndexWithinParent(),-1===s&&(s=n.getChildrenSize()),t.set(n.__key,s,"element"))}function $r(t,e,n,o,r){"text"===t.type?t.set(n,t.offset+(e?0:r),"text"):t.offset>o.getIndexWithinParent()&&t.set(t.key,t.offset-1,"element")}function Ur(t,e,n,o,r){try{t.setBaseAndExtent(e,n,o,r)}catch(t){}}function Hr(t,e,n){const o=El(t,e.getKey());if(Pi(e)){const r=kc(e,o,t);return[r.element,n+r.getFirstChildOffset()]}return[o,n]}function jr(t,e,n,o,r,s){const l=s.getRootNode(),c=Bs(l)||ql(l)?cc(l):null;if(r.has(vo)&&c!==s||null!==c&&Os(c,c))return;const a=nc(o,s);let u;if(!ur(e))return void(null!==t&&As(n,a.anchorNode,a.focusNode)&&o.removeAllRanges());const f=e.anchor,d=e.focus,h=f.getNode(),g=d.getNode(),[_,p]=Hr(n,h,f.offset),[y,m]=Hr(n,g,d.offset),x=e.format,C=e.style,S=e.isCollapsed();let v=_,T=y,k=!1;if("text"===f.type?(v=Xo(h)?wc(h,_,n):null,k=h.getFormat()!==x||h.getStyle()!==C):ur(t)&&"text"===t.anchor.type&&(k=!0),"text"===d.type&&(T=Xo(g)?wc(g,y,n):null),null!==v&&null!==T){if(S&&(null===t||k||ur(t)&&(t.format!==x||t.style!==C))&&function(t,e,n,o,r,i){t._inputState.collapsedSelectionFormat={format:e,key:r,offset:o,style:n,timeStamp:i}}(n,x,C,p,f.key,performance.now()),("Range"!==o.type||!S)&&a.anchorOffset===p&&a.focusOffset===m&&a.anchorNode===v&&a.focusNode===T){if(null===c||!s.contains(c)){const t=null!==c?Fs(c):null;null!==t&&t!==n||r.has(No)||s.focus({preventScroll:!0})}if("element"!==f.type)return}if(Ur(o,v,p,T,m),i&&e.isCollapsed()&&null!==s&&!r.has(No)){const t=lc(s);if(null===t||!s.contains(t)){const t=cc(s.ownerDocument),e=null!==t?Fs(t):null;null!==e&&e!==n||s.focus({preventScroll:!0})}}if(!r.has(ko)&&e.isCollapsed()&&null!==s&&s===lc(s)){const t=ur(e)&&"element"===e.anchor.type?v.childNodes[p]||null:(void 0===u&&(u=ec(o,s)),u);if(null!==t){let e;if(zs(t)){const n=t.ownerDocument.createRange();n.selectNode(t),e=n.getBoundingClientRect()}else e=t.getBoundingClientRect();!function(t,e,n){const o=Ol(n),r=Pl(o);if(null===o||null===r)return;const i=n.getBoundingClientRect();if(e.bottoma&&(f=l-a),0!==f)if(e)r.scrollBy(0,f);else{const t=u.scrollTop;u.scrollTop+=f;const e=u.scrollTop-t;s-=e,l-=e}if(e)break;u=wl(u)}}(n,e,s)}}!function(t){t._inputState.isSelectionChangeFromDOMUpdate=!0}(n)}}function Jr(t){let e=Kr()||zr();null===e&&(e=nl().selectEnd()),e.insertNodes(t)}function Vr(t,e){for(const n of t.split(/(\r?\n|\t)/))"\n"===n||"\r\n"===n?e.linebreak():"\t"===n?e.tab():""!==n&&e.text(n)}function qr(t){const e=[];return Vr(t,{linebreak:()=>e.push(qi()),tab:()=>e.push(tr()),text:t=>e.push(Go(t))}),e}function Yr(){const t=Kr();return null===t?"":t.getTextContent()}function Gr(t){const e=[];for(const n of t)Yi(n)||(!Pi(n)&&!Ki(n)||n.isInline()?e.push(n):Pi(n)&&e.push(...Gr(n.getChildren())));return e}function Xr(e){let n=e;e.isCollapsed()||n.removeText();const o=Kr();ur(o)&&(n=o),ur(n)||t(161);const r=n.anchor;let i=r.getNode(),s=r.offset;for(;!Sc(i)&&null===ta(i);){const t=i;if([i,s]=Qr(i,s),t.is(i))break}return s}function Qr(t,e){const n=t.getParent();if(!n){const t=es();return nl().append(t),t.select(),[nl(),0]}if(Xo(t)){const o=t.splitText(e);if(0===o.length)return[n,t.getIndexWithinParent()];const r=0===e?0:1;return[n,o[0].getIndexWithinParent()+r]}if(!Pi(t)||0===e)return[n,t.getIndexWithinParent()];const o=t.getChildAtIndex(e);if(o){const n=new fr(or(t.__key,e,"element"),or(t.__key,e,"element"),0,""),r=t.insertNewAfter(n);r&&r.append(o,...o.getNextSiblings())}return[n,t.getIndexWithinParent()+1]}function Zr(t){return Yi(t)||Ll(t)||Xo(t)||t.isParentRequired()}function ti(t){const e=es();let n=null;for(let o=0;o99&&t(14)}function hi(){return null===ni&&t(195,yi()),ni}function gi(t){null!==hi()&&null===oi&&(oi=t),oi!==t&&e(378)}function _i(){return null===oi&&t(337,yi()),oi}function pi(){_i()._dirtyType=2}function yi(){let t=0;const e=new Set,n=Cs.version;if("undefined"!=typeof window)for(const o of Xl(document)){const r=Ps(o);if(Ds(r))t++;else if(r){let t=String(r.constructor.version||"<0.17.1");t===n&&(t+=" (separately built, likely a bundler configuration issue)"),e.add(t)}}let o=` Detected on the page: ${t} compatible editor(s) with version ${n}`;return e.size&&(o+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),o}function mi(){return oi}function xi(t,e,n){const o=e.__type,r=Ns(t,o);let i=n.get(o);void 0===i&&(i=Array.from(r.transforms),n.set(o,i));const s=i.length;for(let t=0;t0&&wi(t,t._deferred));const i=t._editorState,s=i._selection,l=n._selection,c=0!==t._dirtyType,a=ni,u=ri,f=oi,d=t._updating,h=t._observer;let g=null;if(t._pendingEditorState=null,t._editorState=n,!r&&c&&null!==h){oi=t,ni=n,ri=!1,t._updating=!0;try{const e=t._dirtyType,o=t._dirtyElements,r=t._dirtyLeaves;h.disconnect(),g=De(i,n,t,e,o,r)}catch(e){if(e instanceof Error&&t._onError(e),ii)throw e;return gs(t,null,o,n),gt(t),t._dirtyType=2,ii=!0,bi(t,i),void(ii=!1)}finally{h.observe(o,ai),t._updating=d,ni=a,ri=u,oi=f}}n._readOnly||(n._readOnly=!0);const _=t._dirtyLeaves,p=t._dirtyElements,y=t._normalizedNodes,m=t._updateTags;c&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set);t._updateTags=new Set,function(t,e){const n=t._decorators;let o=t._pendingDecorators||n;const r=e._nodeMap;let i;for(i in o)r.has(i)||(o===n&&(o=tl(t)),delete o[i])}(t,n);const x=r?null:Jl(Il(t));if(t._editable&&null!==x&&(c||null===l||l.dirty||!l.is(s))&&null!==o&&!m.has(bo)){oi=t,ni=n;try{if(null!==h&&h.disconnect(),c||null===l||l.dirty){const e=t._blockCursorElement;null!==e&&jl(e,t,o),jr(s,l,t,x,m,o)}!function(t,e,n){let o=t._blockCursorElement;if(ur(n)&&n.isCollapsed()&&"element"===n.anchor.type&&e.contains(lc(e))){const r=n.anchor,i=r.getNode(),s=r.offset;let l=!1,c=null;if(s===i.getChildrenSize()){Hl(i.getChildAtIndex(s-1))&&(l=!0)}else{const e=i.getChildAtIndex(s);if(null!==e&&Hl(e)){const n=e.getPreviousSibling();(null===n||Hl(n))&&(l=!0,c=t.getElementByKey(e.__key))}}if(l){const n=kc(i,t.getElementByKey(i.__key),t).element;return null===o&&(t._blockCursorElement=o=function(t){const e=t.theme,n=Zl().createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let o=e.blockCursor;if(void 0!==o){if("string"==typeof o){const t=ku(o);o=e.blockCursor=t}void 0!==o&&n.classList.add(...o)}return n}(t._config)),e.style.caretColor="transparent",void(null===c?n.appendChild(o):n.insertBefore(o,c))}}null!==o&&jl(o,t,e)}(t,o,l)}finally{null!==h&&h.observe(o,ai),oi=f,ni=a}}null!==g&&function(t,e,n,o,r){const i=Array.from(t._listeners.mutation),s=i.length;for(let t=0;t{li.delete(t),t._cascadeCount=0},0)}(t),t._cascadeCount++>99)return t._updates=[],t._cascadeCount=0,void t._onWarn(new Error(`One or more update listeners are endlessly enqueueing more updates. May have encountered infinite recursion caused by update listeners that trigger additional updates without a stop condition. Editor namespace: ${t._config.namespace}`));const n=e.shift();if(n){const[e,o]=n;Mi(t,e,o)}}(t)}(t,e)}finally{si=n}}function Ni(t,e,n,...o){const r=e._updating;e._updating=n;try{const n=e._listeners[t],r=Array.from(n);for(const[t,e]of r){e&&e();const r=t(...o);n.has(t)?n.set(t,r):r&&r()}}finally{e._updating=r}}function Ei(t,e,n,o){const r=ll(t);let i;if(!si)for(let t=0;t=0;t--)for(let s=0;s0&&l._updating){i=l;break}const c=l._commands.get(e);if(void 0!==c){const e=c[t];if(e.size>0){let t=!1;if(Ai(l,()=>{for(const r of e)if(r(n,o))return void(t=!0)}),t)return t}}}return i&&i.update(()=>{Ei(i,e,n,o)}),!1}function wi(t,e){if(t._deferred=[],0!==e.length){const n=t._updating;t._updating=!0;try{for(let t=0;t0||u>0;){if(c>0){e._dirtyLeaves=new Set;for(const t of l){const o=r.get(t);Xo(o)&&o.isAttached()&&o.isSimpleText()&&!o.isUnmergeable()&&Pt(o),void 0!==o&&Ci(o,i)&&xi(e,o,s),n.add(t)}if(l=e._dirtyLeaves,c=l.size,c>0){ci++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map,a.delete("root")&&a.set("root",!0);for(const t of a){const n=t[0],l=t[1];if(o.set(n,l),!l)continue;const c=r.get(n);void 0!==c&&Ci(c,i)&&xi(e,c,s)}l=e._dirtyLeaves,c=l.size,a=e._dirtyElements,u=a.size,ci++}e._dirtyLeaves=n,e._dirtyElements=o}(a,e),Oi(e),function(t,e,n,o){const r=t._nodeMap,i=e._nodeMap,s=[];for(const[t]of o){const e=i.get(t);void 0!==e&&(e.isAttached()||(Pi(e)&&rt(e,t,r,i,s,o),r.has(t)||o.delete(t),s.push(t)))}for(const t of n){const e=i.get(t);void 0===e||e.isAttached()||(Qc(e)&&null!==e.__slots&&rt(e,t,r,i,s,n),r.has(t)||n.delete(t),s.push(t))}for(const t of s)i.delete(t);const l=_i(),c=l._compositionKey;null===c||i.has(c)||(l._compositionKey=null)}(c,a,e._dirtyLeaves,e._dirtyElements));r!==e._compositionKey&&(a._flushSync=!0);const i=a._selection;if(ur(i)){e._slotsUsed&&Or(i);const n=a._nodeMap,o=i.anchor.key,r=i.focus.key;void 0!==n.get(o)&&void 0!==n.get(r)||t(19)}else dr(i)&&0===i._nodes.size&&(a._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=c,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void bi(e)}finally{ni=f,ri=d,oi=h,e._updating=g,ci=0}const p=0!==e._dirtyType||e._deferred.length>0||function(t,e){const n=e.getEditorState()._selection,o=t._selection;if(null!==o){if(o.dirty||!o.is(n))return!0}else if(null!==n)return!0;return!1}(a,e);p?a._flushSync?(a._flushSync=!1,bi(e)):u&&ws(()=>{bi(e)}):(a._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Ai(t,e,n){oi===t&&void 0===n?ui()?Mi(t,e,n):e():Mi(t,e,n)}function Di(t){if(Bl(t)){let e=null;for(const n of t.getChildren())e=n.isInline()?(e||n.replace(n.createParentElementNode())).append(n):null}}class Fi extends _o{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;__slotHost;__slots;$config(){return this.config(Symbol.for("ElementNode"),{$transform:Di,extends:_o})}constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle="",this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(384,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return W[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e),e=e.getNextSibling();return t}getChildrenKeys(){const t=[];let e=this.getFirstChild();for(;null!==e;)t.push(e.__key),e=e.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()&&0===ia(this).length}isDirty(){const t=_i()._dirtyElements;return null!==t&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),e=this.getParentOrThrow().getLastChild();return null!==e&&e.is(t)}getAllTextNodes(){const t=[];for(const e of ia(this)){const n=sa(this,e);Pi(n)&&t.push(...n.getAllTextNodes())}let e=this.getFirstChild();for(;null!==e;){if(Xo(e)&&t.push(e),Pi(e)){const n=e.getAllTextNodes();t.push(...n)}e=e.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;Pi(t);){const e=t.getFirstChild();if(null===e)break;t=e}return t}getLastDescendant(){let t=this.getLastChild();for(;Pi(t);){const e=t.getLastChild();if(null===e)break;t=e}return t}getDescendantByIndex(t){const e=this.getChildren(),n=e.length;if(t>=n){const t=e[n-1];return Pi(t)&&t.getLastDescendant()||t||null}const o=e[t];return Pi(o)&&o.getFirstDescendant()||o||null}getFirstChild(){const t=this.getLatest().__first;return null===t?null:Ys(t)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&t(45,this.__key),e}getLastChild(){const t=this.getLatest().__last;return null===t?null:Ys(t)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&t(96,this.__key),e}getChildAtIndex(t){const e=this.getChildrenSize();let n,o;if(t=t;){if(o===t)return n;n=n.getPreviousSibling(),o--}return null}getTextContent(){let t=ha(this);const e=this.getChildren(),n=e.length;for(let o=0;ot.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const e=this.getWritable();return e.__dir=t,e}setFormat(t){return this.getWritable().__format=""!==t&&R[t]||0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const e=this.getWritable();return e.__textFormat=t,e}setTextStyle(t){const e=this.getWritable();return e.__textStyle=t,e}setIndent(t){return this.getWritable().__indent=t,this}splice(e,n,o){ho(this)&&t(324,this.__key,this.__type);const r=this.getChildrenSize(),i=this.getWritable();e+n<=r||t(226,String(e),String(n),String(r));for(const t of o);const s=i.__key,l=[],c=[],a=this.getChildAtIndex(e+n);let u=null,f=r-n+o.length;if(0!==e)if(e===r)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(n>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let o=0;o0&&(e.style.paddingInlineStart=40*t+"px",e.setAttribute("data-lexical-indent",String(t)));const n=this.getDirection();n&&(e.dir=n)}return{element:e}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},e=this.getTextFormat(),n=this.getTextStyle();return 0===e&&""===n||Bl(this)||this.getChildren().some(Xo)||(0!==e&&(t.textFormat=e),""!==n&&(t.textStyle=n)),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,e){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,e,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,e){const n=kc(this,t,e);let o=n.getFirstChild();for(let t=this.getFirstChild();t;t=t.getNextSibling()){const r=e.getElementByKey(t.getKey());null!==r&&(null==o?(n.insertChild(r),o=r):o!==r&&n.replaceChild(r,o),o=o.nextSibling)}}}function Pi(t){return t instanceof Fi}function Ii(t,e,n){let o=t.getNode();for(;o;){const t=o.__key;if(e.has(t)&&!n.has(t))return!0;o=o.getParent()}return!1}class Li extends _o{__slotHost;__slots;constructor(t){super(t),this.__slotHost=null,this.__slots=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__slotHost=e.__slotHost,null!==this.__slotHost&&null!==this.__parent&&t(383,this.__key,String(this.__slotHost),String(this.__parent)),this.__slots=e.__slots)}decorate(t,e){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ki(t){return t instanceof Li}class zi extends Fi{__cachedText;$config(){return this.config("root",{extends:Fi})}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){t(51)}getTextContent(){const t=this.__cachedText;return null===t||!ui()&&0!==_i()._dirtyType?super.getTextContent():t}remove(){t(52)}replace(e){t(53)}insertBefore(e){t(54)}insertAfter(e){t(55)}updateDOM(t,e){return!1}splice(e,n,o){for(const e of o)Pi(e)||Ki(e)||t(282);return super.splice(e,n,o)}static importJSON(t){return nl().updateFromJSON(t)}collapseAtStart(){return!0}}function Bi(t){return t instanceof zi}function Ri(t){return new Hi(nt(t._nodeMap),null,t._slotsUsed)}function Wi(){return new Hi(new Map([["root",new zi]]),null,!1)}function $i(e){const n=e.exportJSON(),o=e.constructor;if(n.type!==o.getType()&&t(130,o.name),Pi(e)){const r=n.children;Array.isArray(r)||t(59,o.name);const i=e.getChildren();for(let t=0;t0){const i={};for(const n of r){const r=sa(e,n);null===r&&t(366,o.name,n),i[n]=$i(r)}n.$slots=i}return n}function Ui(t){return t instanceof Hi}class Hi{_nodeMap;_selection;_flushSync;_readOnly;_parsed;_slotsUsed;constructor(t,e=null,n=!1){this._nodeMap=t,this._selection=e||null,this._flushSync=!1,this._readOnly=!1,this._parsed=!1,this._slotsUsed=n}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(t,e){return ki(e&&e.editor||null,this,t)}clone(t){const e=new Hi(this._nodeMap,void 0===t?this._selection:t,this._slotsUsed);return e._readOnly=!0,e}toJSON(){return ki(null,this,()=>({root:$i(nl())}))}}class ji extends Fi{$config(){return this.config("artificial",{extends:Fi})}createDOM(t){return Zl().createElement("div")}}class Ji extends _o{$config(){return this.config("linebreak",{importDOM:{br:t=>Gi(t)||Xi(t)?null:{conversion:Vi,priority:0}}})}getTextContent(){return"\n"}createDOM(){return Zl().createElement("br")}updateDOM(){return!1}isInline(){return!0}}function Vi(t){return{node:qi()}}function qi(){return Wl(new Ji)}function Yi(t){return t instanceof Ji}function Gi(t){const e=t.parentElement;if(null!==e&&Cc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Qi(n)){const n=e.lastChild;if(n===t||n.previousSibling===t&&Qi(n))return!0}}return!1}function Xi(t){const e=t.parentElement;if(null!==e&&Cc(e)){const n=e.firstChild;if(n===t||n.nextSibling===t&&Qi(n))return!1;const o=e.lastChild;if(o===t||o.previousSibling===t&&Qi(o))return!0}return!1}function Qi(t){return zs(t)&&/^( |\t|\r?\n)+$/.test(t.textContent||"")}class Zi extends Fi{$config(){return this.config("paragraph",{extends:Fi,importDOM:{p:()=>({conversion:ts,priority:0})}})}createDOM(t){const e=Zl().createElement("p"),n=Cl(t.theme,"paragraph");if(void 0!==n){e.classList.add(...n)}return e}updateDOM(t,e,n){return!1}exportDOM(t){const{element:e}=super.exportDOM(t);if(gc(e)){this.isEmpty()&&e.append(Zl().createElement("br"));const t=this.getFormatType();t&&(e.style.textAlign=t)}return{element:e}}exportJSON(){const t=super.exportJSON();if(void 0===t.textFormat||void 0===t.textStyle){const e=this.getChildren().find(Xo);e?(t.textFormat=e.getFormat(),t.textStyle=e.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,e){const n=es();n.setTextFormat(t.format),n.setTextStyle(t.style);const o=this.getDirection();return n.setDirection(o),n.setFormat(this.getFormatType()),n.setStyle(this.getStyle()),this.insertAfter(n,e),n}collapseAtStart(){const t=this.getChildren();if(0===t.length||Xo(t[0])&&""===t[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function ts(t){const e=es();if(Lc(e,t),Pc(t,e),""===e.getFormatType()){const n=t.getAttribute("align");n&&n&&n in R&&e.setFormat(n)}return Ic(e,t),{node:e}}function es(){return Wl(new Zi)}function ns(t){return t instanceof Zi}function os(t){console.warn(t)}const rs=0,is=1,ss=2,ls=3,cs=4,as=-8,us=-7,fs=-6,ds=-5,hs=-4;function gs(t,e,n,o,r){const i=t._keyToDOMMap;i.clear(),t._editorState=Wi(),t._pendingEditorState=o,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,r&&r.preserveUpdateQueue||(t._updateTags=new Set,t._updates=[],t._cascadeCount=0),t._blockCursorElement=null,null!==t._inputState.handledSelectionCommandTimeoutId&&clearTimeout(t._inputState.handledSelectionCommandTimeoutId),t._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null};const s=t._observer;null!==s&&(s.disconnect(),t._observer=null),null!==e&&(e.textContent="",function(t,e){const n=`__lexicalKey_${e._key}`;delete t[n]}(e,t)),null!==n&&(n.textContent="",i.set("root",n),Xs(n,t,"root"))}function _s(t){const e=new Set,n=new Set;for(const{klass:o,ownNodeConfig:r}of jc(t)){const t=o.transform;if(!n.has(t)){n.add(t);const r=o.transform();r&&e.add(r)}if(r){const t=r.$transform;t&&e.add(t)}}return e}const ps={$createDOM:(t,e)=>t.createDOM(e._config,e),$decorateDOM:(t,e,n,o)=>{},$exportDOM:(t,e)=>{const n=Es(e,t.getType());return n&&void 0!==n.exportDOM?n.exportDOM(e,t):t.exportDOM(e)},$extractWithChild:(t,e,n,o,r)=>Pi(t)&&t.extractWithChild(e,n,o),$getDOMSlot:(t,e,n)=>t.getDOMSlot(e),$getSlotTargetElement:(t,e,n,o)=>null,$shouldExclude:(t,e,n)=>Pi(t)&&t.excludeFromCopy("html"),$shouldInclude:(t,e,n)=>!e||t.isSelected(e),$updateDOM:(t,e,n,o)=>t.updateDOM(e,n,o._config)};function ys(e){const n=e||{},o=mi(),r=n.theme||{},i=void 0===e?o:n.parentEditor||null,s=n.disableEvents||!1,l=Wi(),c=n.namespace||(null!==i?i._config.namespace:cl()),a=n.editorState,u=[zi,Wo,Ji,Zo,Zi,ji,...n.nodes||[]],{onError:f,onWarn:d,html:h}=n,g=void 0===n.editable||n.editable;let _;if(void 0===e&&null!==o)_=o._nodes;else{_=new Map;for(let e=0;e{Object.keys(t).forEach(e=>{let o=n.get(e);void 0===o&&(o=[],n.set(e,o)),o.push(t[e])})};return t.forEach(t=>{const e=t.klass.importDOM;if(null==e||o.has(e))return;o.add(e);const n=e.call(t.klass);null!==n&&r(n)}),e&&r(e),n}(_,h?h.import:void 0),g,e);return void 0!==a&&(p._pendingEditorState=a,p._dirtyType=2),function(t){t.registerCommand(ze,Yn,rs),t.registerCommand(Be,Gn,rs),t.registerCommand(Re,Xn,rs),t.registerCommand(We,Qn,rs),t.registerCommand(tn,eo,rs)}(p),p}function ms(t,e){const n=t.get(e);t.delete(e),n&&n()}function xs(t,e,n){return t.set(e,n),ms.bind(null,t,e)}class Cs{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_cascadeCount;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_onWarn;_htmlConversions;_window;_editable;_blockCursorElement;_slotsUsed;_inputState;_createEditorArgs;constructor(t,e,n,o,r,i,s,l,c){this._createEditorArgs=c,this._parentEditor=e,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new ot,this._updates=[],this._updating=!1,this._cascadeCount=0,this._listeners={decorator:new Map,editable:new Map,mutation:new Map,root:new Map,textcontent:new Map,update:new Map},this._commands=new Map,this._config=o,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=cl(),this._onError=r,this._onWarn=i,this._htmlConversions=s,this._editable=l,this._headless=null!==e&&e._headless,this._window=null,this._blockCursorElement=null,this._slotsUsed=!1,this._inputState={collapsedSelectionFormat:{format:0,key:"root",offset:0,style:"",timeStamp:0},compositionEndData:"",compositionPhase:"idle",hadOrphanedCompositionEvents:!1,handledSelectionCommandTimeoutId:null,isInsertLineBreak:!1,isInsertTextAfterHandledSelectionCommand:!1,isSelectionChangeFromDOMUpdate:!1,isSelectionChangeFromMouseDown:!1,lastBeforeInputInsertTextTimeStamp:0,lastKeyCode:null,lastKeyDownTimeStamp:0,postDeleteSelectionToRestore:null,unprocessedBeforeInputData:null}}isComposing(){return null!=this._compositionKey}registerUpdateListener(t){return xs(this._listeners.update,t)}registerEditableListener(t){return xs(this._listeners.editable,t)}registerDecoratorListener(t){return xs(this._listeners.decorator,t)}registerTextContentListener(t){return xs(this._listeners.textcontent,t)}registerRootListener(t){const e=this._listeners.root;return Eu(xs(e,t,t(this._rootElement,null)||void 0),()=>function(t,e,n){const o=t.get(e);o&&o(),t.set(e,e(...n)||void 0)}(e,t,[null,this._rootElement]))}registerCommand(e,n,o){void 0===o&&t(35);const r=this._commands;r.has(e)||r.set(e,[new tt,new tt,new tt,new tt,new tt]);const i=r.get(e);void 0===i&&t(36,String(e));const s=function(t){return 7&t}(o),l=i[s];return s!==o?l.addFront(n):l.addBack(n),()=>{l.delete(n),i.every(t=>0===t.size)&&r.delete(e)}}registerMutationListener(t,e,n){const o=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,r=this._listeners.mutation;let i=r.get(e);void 0===i&&(i=new Set,r.set(e,i)),i.add(o);const s=n&&n.skipInitialization;return void 0!==s&&s||this.initializeMutationListener(e,o),()=>{i.delete(o),0===i.size&&r.delete(e)}}getRegisteredNode(e){const n=this._nodes.get(e.getType());return void 0===n&&t(37,e.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,e){const n=this._editorState,o=Ac(n).get(e.getType());if(!o)return;const r=new Map;for(const t of o.keys())r.set(t,"created");r.size>0&&t(r,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,e){const n=this.getRegisteredNode(t);return n.transforms.add(e),n}registerNodeTransform(t,e){const n=this.registerNodeTransformToKlass(t,e),o=[n],r=n.replaceWithKlass;if(null!=r){const t=this.registerNodeTransformToKlass(r,e);o.push(t)}return function(t,e){const n=Ac(t.getEditorState()),o=[];for(const t of e){const e=n.get(t);e&&o.push(e)}if(0===o.length)return;t.update(()=>{for(const t of o)for(const e of t.keys()){const t=Ys(e);t&&t.markDirty()}},null===t._pendingEditorState?{tag:xo}:void 0)}(this,o.map(t=>t.klass.getType())),()=>{o.forEach(t=>t.transforms.delete(e))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,...e){return Nl(this,t,...e)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const e=this._rootElement;if(t!==e){const n=Cl(this._config.theme,"root"),o=this._pendingEditorState||this._editorState;if(this._rootElement=t,gs(this,e,t,o,{preserveUpdateQueue:!0}),null!==e&&(this._config.disableEvents||co(e),null!=n&&e.classList.remove(...n)),null!==t){const e=Pl(t),o=t.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=e,this._dirtyType=2,gt(this),this._updateTags.add(xo),bi(this),this._config.disableEvents||function(t,e){const n=t.ownerDocument;Ln.set(t,n);let o=Kn.get(n);void 0===o&&(o={editors:new Set,hasShadowEditor:void 0},Kn.set(n,o)),o.editors.add(e),o.hasShadowEditor=void 0,t.__lexicalEditor=e;const r=no(t);r.push(zn.register(n));for(let n=0;n{so(t)||(io(t),(e.isEditable()||"click"===o)&&i(t,e))}:t=>{if(so(t))return;io(t);const n=e.isEditable();switch(o){case"cut":return n&&Nl(e,Tn,t);case"copy":return Nl(e,vn,t);case"paste":return n&&Nl(e,Je,t);case"dragstart":return n&&Nl(e,xn,t);case"dragover":return n&&Nl(e,Cn,t);case"dragend":return n&&Nl(e,Sn,t);case"focus":return n&&Nl(e,On,t);case"blur":return n&&Nl(e,Mn,t);case"drop":return n&&Nl(e,yn,t)}};r.push(Fn(t,o,s))}}(t,this),null!=n&&t.classList.add(...n)}else this._window=null,this._updateTags.add(xo),bi(this);Ni("root",this,!1,t,e)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&t(38);let o=e;o._readOnly&&(o=Ri(e),o._selection=e._selection?e._selection.clone():null),ht(this);const r=this._pendingEditorState,i=void 0!==n?n.tag:null;null===r||r.isEmpty()||(null!=i&&this._updateTags.add(i),bi(this)),this._pendingEditorState=o,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,this._slotsUsed=this._slotsUsed||e._slotsUsed,Ai(this,()=>{if(i&&this._updateTags.add(i),e._parsed)for(const[t,e]of o._nodeMap.entries())Pi(e)?this._dirtyElements.set(t,!0):this._dirtyLeaves.add(t)},{discrete:!this._updating||void 0})}parseEditorState(t,e){return function(t,e,n){const o=Wi(),r=ni,i=ri,s=oi,l=e._dirtyElements,c=e._dirtyLeaves,a=e._cloneNotNeeded,u=e._dirtyType;e._dirtyElements=new Map,e._dirtyLeaves=new Set,e._cloneNotNeeded=new Set,e._dirtyType=0,ni=o,ri=!1,oi=e,vs(null);try{const r=e._nodes;Ti(t.root,r),n&&n(),o._readOnly=!0,o._parsed=!0}catch(t){t instanceof Error&&e._onError(t)}finally{e._dirtyElements=l,e._dirtyLeaves=c,e._cloneNotNeeded=a,e._dirtyType=u,ni=r,ri=i,oi=s}return o}("string"==typeof t?JSON.parse(t):t,this,e)}read(...t){const[e,n]=1===t.length?["force-commit",t[0]]:t;"force-commit"===e&&bi(this);return("pending"===e?this._pendingEditorState||this._editorState:this.getEditorState()).read(n,{editor:this})}update(t,e){!function(t,e,n){t._updating?t._updates.push([e,n]):Mi(t,e,n)}(this,t,e)}focus(t,e={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Ai(this,()=>{const o=Kr(),r=nl();null!==o?o.dirty||ol(o.clone()):0!==r.getChildrenSize()&&("rootStart"===e.defaultSelection?r.selectStart():r.selectEnd()),Al("focus"),Dl(()=>{n.removeAttribute("autocapitalize"),t&&t()})}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;null!==t&&t.blur();const e=Jl(this._window);null!==e&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ni("editable",this,!0,t),this._slotsUsed&&this.update(()=>pi()))}toJSON(){return{editorState:this._editorState.toJSON()}}}Cs.version=Z;let Ss=null;function vs(t){Ss=t}const Ts=Symbol("INTERNAL_SKIP_AFTER_CLONE_FROM");let ks=1;function bs(){ks=1}function Ns(e,n){const o=Es(e,n);return void 0===o&&t(30,n),o}function Es(t,e){return t._nodes.get(e)}const ws="function"==typeof queueMicrotask?queueMicrotask:t=>{Promise.resolve().then(t)};function Os(t,e){const n=void 0!==e?e:(()=>{const e=t.getRootNode();return Bs(e)||ql(e)?cc(e):null})();if(!gc(n))return!1;if(n.hasAttribute("data-lexical-slot"))return!1;const o=Zs(n),r=n.nodeName;return po(o)&&("INPUT"===r||"TEXTAREA"===r||"true"===n.contentEditable&&null==Ps(n))}const Ms=Os;function As(t,e,n){const o=t.getRootElement();if(!o)return!1;try{if(!e||!o.contains(e)||!o.contains(n))return!1}catch(t){return!1}return Fs(e)===t&&t.read("latest",()=>!Os(e))}function Ds(t){return t instanceof Cs}function Fs(t){let e=t;for(;null!=e;){const t=Ps(e);if(Ds(t))return t;e=wl(e)}return null}function Ps(t){return t?t.__lexicalEditor:null}function Is(t){return L.test(t)?"rtl":K.test(t)?"ltr":null}function Ls(t){return er(t)||t.isToken()}function Ks(t){return Ls(t)||t.isSegmented()}function zs(t){return _c(t)&&3===t.nodeType}function Bs(t){return _c(t)&&9===t.nodeType}function Rs(t){let e=t;for(;null!=e;){if(zs(e))return e;e=e.firstChild}return null}function Ws(t,e,n){const o=z[e];if(null!==n&&(t&o)===(n&o))return t;let r=t^o;return"subscript"===e?r&=~z.superscript:"superscript"===e?r&=~z.subscript:"lowercase"===e?(r&=~z.uppercase,r&=~z.capitalize):"uppercase"===e?(r&=~z.lowercase,r&=~z.capitalize):"capitalize"===e&&(r&=~z.lowercase,r&=~z.uppercase),r}function $s(t){return Xo(t)||Yi(t)||Ki(t)}function Us(t,e){const n=function(){const t=Ss;return Ss=null,t}();if(null!=(e=e||n&&n.__key))return void(t.__key=e);fi(),di();const o=_i(),r=hi(),i=""+ks++;r._nodeMap.set(i,t),Pi(t)?o._dirtyElements.set(i,!0):o._dirtyLeaves.add(i),o._cloneNotNeeded.add(i),0===o._dirtyType&&(o._dirtyType=1),t.__key=i}function Hs(e){null!==ta(e)&&t(380,e.__key,String(ta(e)));const n=e.getParent();if(null!==n){const t=e.getWritable(),o=n.getWritable(),r=e.getPreviousSibling(),i=e.getNextSibling(),s=null!==i?i.__key:null,l=null!==r?r.__key:null,c=null!==r?r.getWritable():null,a=null!==i?i.getWritable():null;null===r&&(o.__first=s),null===i&&(o.__last=l),null!==c&&(c.__next=s),null!==a&&(a.__prev=l),t.__prev=null,t.__next=null,t.__parent=null,o.__size--}}const js=Hs;function Js(e){di(),ho(e)&&t(323,e.__key,e.__type);const n=e.getLatest(),o=null!==n.__parent?n.__parent:Zc(n)?n.__slotHost:null,r=hi(),i=_i(),s=r._nodeMap,l=i._dirtyElements;null!==o&&function(t,e,n){let o=t;for(;null!==o;){if(n.has(o))return;const t=e.get(o);if(void 0===t)break;n.set(o,!1),o=null!==t.__parent?t.__parent:Zc(t)?t.__slotHost:null}}(o,s,l);const c=n.__key;0===i._dirtyType&&(i._dirtyType=1),Pi(e)?l.set(c,!0):i._dirtyLeaves.add(c)}function Vs(t){fi();const e=_i(),n=e._compositionKey;if(t!==n){if(e._compositionKey=t,null!==n){const t=Ys(n);null!==t&&t.getWritable()}if(null!==t){const e=Ys(t);null!==e&&e.getWritable()}}}function qs(){if(ui())return null;return _i()._compositionKey}function Ys(t,e){const n=(e||hi())._nodeMap.get(t);return void 0===n?null:n}function Gs(t,e){const n=Qs(t,_i());return void 0!==n?Ys(n,e):null}function Xs(t,e,n){t[`__lexicalKey_${e._key}`]=n}function Qs(t,e){return t[`__lexicalKey_${e._key}`]}function Zs(t,e){let n=t;for(;null!=n;){const t=Gs(n,e);if(null!==t)return t;n=wl(n)}return null}function tl(t){const e=t._decorators,n=Object.assign({},e);return t._pendingDecorators=n,n}function el(t){return t.read(()=>nl().getTextContent())}function nl(){return hi()._nodeMap.get("root")}function ol(t){fi();const e=hi();null!==t&&(t.dirty=!0,t.setCachedNodes(null),ur(t)&&_i()._slotsUsed&&Or(t)),e._selection=t}function rl(){fi();ht(_i())}function il(t){const e=function(t,e){let n=t;for(;null!=n;){const t=Qs(n,e);if(void 0!==t)return t;n=wl(n)}return null}(t,_i());return null===e?null:Ys(e)}function sl(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function ll(t){const e=[];for(let n=t;null!==n;n=n._parentEditor)e.push(n);return e}function cl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function al(t){return zs(t)?t.nodeValue:null}function ul(t,e,n){const o=Jl(Il(e));if(null===o)return;const r=nc(o,e._rootElement),i=r.anchorNode;let{anchorOffset:s,focusOffset:l}=r;if(null!==i){let e=al(i);const o=Zs(i);if(null!==e&&Xo(o)){if((e===A||e===F)&&n){const t=n.length;e=n,s=t,l=t}null!==e&&fl(o,e,s,l,t)}}}function fl(t,e,n,o,r){let i=t;if(i.isAttached()&&(r||!i.isDirty())){const s=i.isComposing();if(i.isToken()&&s)return;let c=e;if((s||r)&&(e.endsWith(A)&&(c=e.slice(0,-A.length)),r)){const t=F;let e;for(;-1!==(e=c.indexOf(t));)c=c.slice(0,e)+c.slice(e+t.length),null!==n&&n>e&&(n=Math.max(e,n-t.length)),null!==o&&o>e&&(o=Math.max(e,o-t.length))}const u=i.getTextContent();if(r||c!==u){const e=Kr();if(""===c){if(Vs(null),a||l||d)i.remove();else{const t=_i();dl(i,"",e),setTimeout(()=>{t.update(()=>{i.isAttached()&&""===i.getTextContent()&&i.remove()})},20)}return}const r=i.getParent(),u=zr(),f=i.getTextContentSize(),h=qs(),g=i.getKey();if(i.isToken()&&!s||null!==h&&g===h&&!s||ur(u)&&(null!==r&&!r.canInsertTextBefore()&&0===u.anchor.offset||u.anchor.key===t.__key&&0===u.anchor.offset&&!i.canInsertTextBefore()&&!s||u.focus.key===t.__key&&u.focus.offset===f&&!i.canInsertTextAfter()&&!s))return void i.markDirty();if(!ur(e)||null===n||null===o)return void dl(i,c,e);if(e.setTextNodeRange(i,n,i,o),i.isSegmented()){const t=Go(i.getTextContent());i.replace(t),i=t}dl(i,c,e)}}}function dl(t,e,n){if(t.setTextContent(e),ur(n)){const e=t.getKey();let o=!1;for(const r of["anchor","focus"]){const i=n[r];"text"===i.type&&i.key===e&&(i.offset=Ka(t,i.offset,"clamp"),o=!0)}o&&(n._cachedNodes=null,n._cachedIsBackward=null)}}function hl(t,e,n){const o=e[n]||!1;return"any"===o||o===t[n]}function gl(t,e){return hl(t,e,"altKey")&&hl(t,e,"ctrlKey")&&hl(t,e,"shiftKey")&&hl(t,e,"metaKey")}function _l(t,e,n){if(!gl(t,n))return!1;if(t.key.toLowerCase()===e.toLowerCase())return!0;if(e.length>1)return!1;if(1===t.key.length&&t.key.charCodeAt(0)<=127)return!1;if(t.code.startsWith("Digit")&&/^\d$/.test(e))return t.code===`Digit${e}`;const o="Key"+e.toUpperCase();return t.code===o}const pl={ctrlKey:!r,metaKey:r},yl={altKey:r,ctrlKey:!r};function ml(t){return"Backspace"===t.key}function xl(t){const e=nl();if(ur(t)){const e=t.anchor,n=t.focus,o=e.getNode();if(Bi(o))return e.set(o.getKey(),0,"element"),n.set(o.getKey(),o.getChildrenSize(),"element"),It(t),t;const r=o.getTopLevelElementOrThrow(),i=r.getParent();if(null===i)return Pi(r)&&(e.set(r.getKey(),0,"element"),n.set(r.getKey(),r.getChildrenSize(),"element"),It(t)),t;const s=i;return e.set(s.getKey(),0,"element"),n.set(s.getKey(),s.getChildrenSize(),"element"),It(t),t}{const t=e.select(0,e.getChildrenSize());return ol(It(t)),t}}function Cl(t,e){void 0===t.__lexicalClassNameCache&&(t.__lexicalClassNameCache={});const n=t.__lexicalClassNameCache,o=n[e];if(void 0!==o)return o;const r=t[e];if("string"==typeof r){const t=ku(r);return n[e]=t,t}return r}function Sl(e,n,o,r,i){if(0===o.size)return;const s=r.__type,l=r.__key,c=n.get(s);void 0===c&&t(33,s);const a=c.klass;let u=e.get(a);void 0===u&&(u=new Map,e.set(a,u));const f=u.get(l),d="destroyed"===f&&"created"===i;(void 0===f||d)&&u.set(l,d?"updated":i)}function vl(t){const e=t.getType(),n=hi();if(n._readOnly){const t=Ac(n).get(e);return t?Array.from(t.values()):[]}const o=n._nodeMap,r=[];for(const[,n]of o)n instanceof t&&n.__type===e&&n.isAttached()&&r.push(n);return r}function Tl(t,e,n){const o=t.getParent();let r=n,i=t;return null!==o&&(e&&0===n?(r=i.getIndexWithinParent(),i=o):e||n!==i.getChildrenSize()||(r=i.getIndexWithinParent()+1,i=o)),i.getChildAtIndex(e?r-1:r)}function kl(t,e){const n=t.offset;if("element"===t.type){return Tl(t.getNode(),e,n)}{const o=t.getNode();if(e&&0===n||!e&&n===o.getTextContentSize()){const t=e?o.getPreviousSibling():o.getNextSibling();return null===t?Tl(o.getParentOrThrow(),e,o.getIndexWithinParent()+(e?0:1)):t}}return null}function bl(t){const e=Il(t).event,n=e&&e.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Nl(t,e,...n){return Ei(t,e,n[0],t)}function El(e,n){const o=e._keyToDOMMap.get(n);return void 0===o&&t(75,n),o}function wl(t){const e=t.assignedSlot||t.parentElement;if(null!==e)return e;const n=t.parentNode;return ql(n)?n.host:null}function Ol(t){return Bs(t)?t:gc(t)?t.ownerDocument:null}function Ml(t){return _i()._updateTags.has(t)}function Al(t){fi();_i()._updateTags.add(t)}function Dl(t){fi();_i()._deferred.push(t)}function Fl(t,e){let n=t.getParent();for(;null!==n;){if(n.is(e))return!0;n=n.getParent()}return!1}function Pl(t){const e=Ol(t);return e?e.defaultView:null}function Il(e){const n=e._window;return null===n&&t(78),n}function Ll(t){return Pi(t)&&t.isInline()||Ki(t)&&t.isInline()}function Kl(t){let e=t.getLatest();for(;null!==e;){if(null!==ta(e)&&Pi(e))return e;const t=e.getParentOrThrow();if(Bl(t))return t;e=t}return e}function zl(t){return Pi(t)&&t.isShadowRoot()}function Bl(t){return Bi(t)||zl(t)}function Rl(t,e=!1){const n=t.constructor.clone(t,Ts);return Us(n,null),n.afterCloneFrom(t),e||n.resetOnCopyNodeFrom(t),n}function Wl(e){const n=_i(),o=e.getType(),r=Es(n,o);void 0===r&&t(200,e.constructor.name,o);const{replace:i,replaceWithKlass:s}=r;if(null!==i){const n=i(e),r=n.constructor;return null!==s?n instanceof s||t(201,s.name,s.getType(),r.name,r.getType(),e.constructor.name,o):n instanceof e.constructor&&r!==e.constructor||t(202,r.name,r.getType(),e.constructor.name,o),n.__key===e.__key&&t(203,e.constructor.name,o,r.name,r.getType()),n}return e}function $l(e,n){!Bi(e.getParent())||Pi(n)||Ki(n)||t(99)}function Ul(e){const n=Ys(e);return null===n&&t(63,e),n}function Hl(t){if(!t||t.isInline())return!1;if(Ki(t))return!0;if(Pi(t)){if(t.isShadowRoot()){const e=t.getParent();return!(Pi(e)&&e.isShadowRoot())}return!t.canBeEmpty()}return!1}function jl(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null;const o=t.parentElement;null!==o&&o.removeChild(t)}function Jl(t){return n?(t||window).getSelection():null}function Vl(t){const e=Pl(t);return e?e.getSelection():null}function ql(t){return pc(t)&&"host"in t}const Yl=[];function Gl(t){const e=t.getRootNode();if(e===t||!ql(e))return Yl;const n=[e];let o=e.host;for(;;){const t=o.getRootNode();if(t===o||!ql(t))break;n.push(t),o=t.host}return n}function*Xl(t){const e=[t];let n;for(;n=e.pop();){yield*n.querySelectorAll('[data-lexical-editor="true"]');const t=(Bs(n)?n:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);let o;for(;o=t.nextNode();)o.shadowRoot&&e.push(o.shadowRoot)}}function Ql(t){return null!==t?t.ownerDocument:document}function Zl(){const t=mi();return Ql(null!==t?t._rootElement:null)}function tc(t,e){if(null===e||"function"!=typeof t.getComposedRanges)return null;const n=Gl(e);if(0===n.length)return null;const o=t.getComposedRanges;try{const e=o.call(t,{shadowRoots:n})[0];if(void 0!==e)return e}catch(t){}try{const e=o.apply(t,n)[0];if(void 0!==e)return e}catch(t){}return null}function ec(t,e){const n=tc(t,e);if(null!==n){const t=rc(n);if(null!==t)return t}return t.rangeCount>0?t.getRangeAt(0):null}function nc(t,e){const n=tc(t,e);return null===n?t:ic(n,sc(t))}function oc(t,e){const n=tc(t,e);if(null===n)return{points:t,range:t.rangeCount>0?t.getRangeAt(0):null};const o=rc(n)??(t.rangeCount>0?t.getRangeAt(0):null);return{points:ic(n,sc(t)),range:o}}function rc(t){const e=t.startContainer.ownerDocument;if(null===e)return null;const n=e.createRange();try{return n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n}catch(t){return null}}function ic(t,e){const{startContainer:n,startOffset:o,endContainer:r,endOffset:i}=t;return"backward"===e?{anchorNode:r,anchorOffset:i,direction:e,focusNode:n,focusOffset:o}:{anchorNode:n,anchorOffset:o,direction:e,focusNode:r,focusOffset:i}}function sc(t){return t.direction}function lc(t){const e=t.getRootNode();return Bs(e)||ql(e)?e.activeElement:null}function cc(t){let e=t.activeElement;for(;null!==e&&null!==e.shadowRoot;){const t=e.shadowRoot.activeElement;if(null===t)break;e=t}return e}function ac(t){const e=t.target;if(null!==e&&gc(e)&&null!==e.shadowRoot&&"function"==typeof t.composedPath){const e=t.composedPath();if(e.length>0)return e[0]}return e}function uc(e,n){let o=e.getChildAtIndex(n);null==o&&(o=e),Bl(e)&&t(102);const r=e=>{const n=e.getParentOrThrow(),i=Bl(n),s=e!==o||i?Rl(e):e;if(i)return Pi(e)&&Pi(s)||t(133),e.insertAfter(s),[e,s,s];{const[t,o,i]=r(n),l=e.getNextSiblings();return i.append(s,...l),[t,o,s]}},[i,s]=r(o);return[i,s]}function fc(t){return gc(t)&&"A"===t.tagName}function dc(t){return gc(t)&&"TR"===t.tagName}function hc(t){return gc(t)&&("TD"===t.tagName||"TH"===t.tagName)}function gc(t){return _c(t)&&1===t.nodeType}function _c(t){return"object"==typeof t&&null!==t&&"nodeType"in t&&"number"==typeof t.nodeType}function pc(t){return _c(t)&&11===t.nodeType}const yc=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/i;function mc(t){return!(!gc(t)||!t.style.display.startsWith("inline"))||yc.test(t.nodeName)}const xc=/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/i;function Cc(t){return(!gc(t)||!t.style.display.startsWith("inline"))&&xc.test(t.nodeName)}function Sc(t){if(Ki(t)&&!t.isInline())return!0;if(!Pi(t)||Bl(t))return!1;const e=t.getFirstChild(),n=null===e||Yi(e)||Xo(e)||e.isInline();return!t.isInline()&&!1!==t.canBeEmpty()&&n}function vc(){return _i()}function Tc(t=vc()){return t._config.dom||ps}function kc(e,n,o=vc()){const r=Tc(o).$getDOMSlot(e,n,o);return Pi(e)&&(Ec(r)||t(344,e.getKey(),e.getType())),r}function bc(t,e,n,o){const r=t.read("latest",()=>{const o=Ys(e);return null!==o?function(t,e,n=vc()){const o=sa(t,e);if(null===o)return null;const r=n.getElementByKey(o.getKey());return null!==r?r.parentElement:null}(o,n,t):null});return null!==r&&(r.parentElement!==o&&o.appendChild(r),r.style.display=""),r}function Nc(t,e,n){n.style.display="none";const o=t.getElementByKey(e);null!==o&&n.parentElement!==o&&o.insertBefore(n,o.firstChild)}function Ec(t){return t instanceof G}function wc(t,e,n=vc()){return Rs(kc(t,e,n).element)}const Oc=new WeakMap,Mc=new Map;function Ac(e){if(!e._readOnly&&e.isEmpty())return Mc;e._readOnly||t(192);let n=Oc.get(e);return n||(n=function(t){const e=new Map;for(const[n,o]of t._nodeMap){const t=o.__type;let r=e.get(t);r||(r=new Map,e.set(t,r)),r.set(n,o)}return e}(e),Oc.set(e,n)),n}function Dc(t){const e=t.constructor.clone(t,Ts);return e.afterCloneFrom(t),e}function Fc(t){return(e=Dc(t))[fo]=!0,e;var e}function Pc(t,e){const n=t.getAttribute("data-lexical-indent");if(null!==n){const t=parseInt(n,10);if(Number.isFinite(t)&&t>=0)return void e.setIndent(t)}const o=parseInt(t.style.paddingInlineStart,10)||0,r=Math.round(o/40);e.setIndent(r)}function Ic(t,e){const n=e.getAttribute("dir");return"ltr"===n||"rtl"===n?t.setDirection(n):t}function Lc(t,e){const n=e.style.textAlign;return n&&n in R?t.setFormat(n):t}function Kc(t,e){t.__lexicalUnmanaged=!0,e&&void 0!==e.captureSelection&&(t.__lexicalCapturedSelection=e.captureSelection)}function zc(t){return!0===t.__lexicalUnmanaged}function Bc(t,e=vc()){const n=e.isEditable();t.contentEditable=n?"true":"false",n?t.__lexicalEditor=e:delete t.__lexicalEditor}function Rc(t,e){let n=t;for(;null!=n;){if(!0===n.__lexicalCapturedSelection)return!0;if(gc(n)&&n.hasAttribute("data-lexical-slot"))return!1;if(void 0!==Qs(n,e))return!1;n=wl(n)}return!1}function Wc(t,e){return function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(t,e)&&t[e]!==_o[e]}const $c=new WeakMap,Uc=Symbol("lexical.synthesizedGetType");function Hc(e){const n=$c.get(e);if(n)return n;const o=null!=e.prototype&&j in e.prototype?e.prototype[j]():void 0,r=function(e){if(!(e===_o||e.prototype instanceof _o)){let n="",o="";try{n=e.getType()}catch(t){}try{Cs.version&&(o=JSON.parse(Cs.version))}catch(t){}t(290,e.name,n,o)}return e===Li||e===Fi||e===_o}(e),i=!r&&Wc(e,"getType")?e.getType:void 0,s=i&&!(Uc in i)?i.call(e):void 0;let l,c=s;if(o)if(s)l=o[s];else{for(const[t,e]of Object.entries(o))c=t,l=e;if(!l)for(const t of Object.getOwnPropertySymbols(o)){const e=o[t];if(e){l=e;break}}}if(!r&&c){if(!Wc(e,"getType")){const t=e,n=function(){return this!==t?_o.getType.call(this):c};n[Uc]=!0,e.getType=n}if(Wc(e,"clone")||(e.clone=(t,n)=>{vs(t);const o=new e;return n!==Ts&&o.afterCloneFrom(t),o}),Wc(e,"importJSON")||(e.importJSON=l&&l.$importJSON||(t=>(new e).updateFromJSON(t))),!Wc(e,"importDOM")&&l){const{importDOM:t}=l;t&&(e.importDOM=()=>t)}}const a={klass:e,ownNodeConfig:l,ownNodeType:c};return $c.set(e,a),a}function*jc(t){for(let e=t;e&&(e===_o||po(e.prototype));){const t=Hc(e);yield t,e=t.ownNodeConfig&&t.ownNodeConfig.extends||Gc(e)}}function Jc(t){const e=new Map,n=new Map;for(const o of t){const{ownNodeType:t}=Hc(o);t&&(n.set(t,o),e.set(t,new Set))}for(const[t,o]of n)for(const{ownNodeType:n}of jc(o)){const o=n&&e.get(n);o&&o.add(t)}return e}function Vc(t){const e=vc();fi();return new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(t)).klass)}const qc=(t,e)=>{let n=t;for(;null!=n&&!Bi(n);){if(e(n))return n;n=n.getParent()}return null};function Yc(e,n){const o=[];let r=e.__first;for(;null!==r;){const e=null===n?Ys(r):n.get(r);null==e&&t(174),o.push(r),r=e.__next}return o}function Gc(t){const e=Object.getPrototypeOf(t);if("function"==typeof e&&e!==Function.prototype)return e;const n=t.prototype&&Object.getPrototypeOf(t.prototype);return n?n.constructor:null}const Xc=new Map;function Qc(t){return Pi(t)||Ki(t)}function Zc(t){return Pi(t)||Ki(t)}function ta(t){const e=t.getLatest();return Zc(e)?e.__slotHost:null}function ea(e){const n=ta(e);if(null===n)return null;const o=Ys(n);return Pi(o)||Ki(o)||t(370),o}function na(t){const e=ea(t);if(null===e)return null;const n=t.getLatest().__key;for(const[t,o]of ra(e))if(o===n)return t;return null}function oa(t){let e=t.getLatest();for(;null!==e;){if(null!==ta(e))return e;e=e.getParent()}return null}function ra(t){const e=t.getLatest();return Qc(e)&&null!==e.__slots?e.__slots:Xc}function ia(t){return Array.from(ra(t).keys())}function sa(t,e){const n=ra(t).get(e);return void 0===n?null:Ys(n)}const la=["__proto__","constructor","prototype"],ca=Symbol("slotMapOwner");function aa(t){let e=t.__slots;return null!==e&&e[ca]===t||(e=new Map(e),e[ca]=t,t.__slots=e),e}const ua=new WeakMap,fa=[];function da(t){for(const{ownNodeConfig:e}of jc(t)){const t=e&&e.slots;if(t)return t}return fa}function ha(t){let e="";for(const n of ia(t)){const o=sa(t,n);null!==o&&(e+=o.getTextContent())}return e}function ga(t,e,n){const o=n.get(t),r=n.get(e);return void 0!==o?void 0!==r?o-r:-1:void 0!==r?1:te?1:0}function _a(e){const n=e.__slots;if(null===n||n.size<2)return;const o=function(e){let n=ua.get(e);if(void 0===n){const o=da(e),r=new Map;for(const n of o)la.includes(n)&&t(371,e.name,n),r.has(n)&&t(372,e.name,n),r.set(n,r.size);n=r,ua.set(e,n)}return n}(e.constructor);let r=null,i=!0;for(const t of n.keys()){if(null!==r&&ga(r,t,o)>0){i=!1;break}r=t}if(i)return;const s=Array.from(n).sort(([t],[e])=>ga(t,e,o));n.clear();for(const[t,e]of s)n.set(t,e)}function pa(e,n,o){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n||t(373,n);const r=e.getLatest();if(null!==r.__slots&&r.__slots.get(n)===o.getLatest().__key)return r;(!Pi(o)&&!Ki(o)||o.isInline())&&t(374,o.__key);const i=e.getWritable(),s=aa(i),l=s.get(n);void 0!==l&&xa(l);const c=o.getWritable(),a=ea(c);if(null!==a){const t=na(c);null!==t&&aa(a.getWritable()).delete(t),c.__slotHost=null}return Hs(c),c.__slotHost=i.__key,s.set(n,c.__key),_a(i),function(){const t=vc();t._slotsUsed=!0,t._pendingEditorState&&(t._pendingEditorState._slotsUsed=!0)}(),i}function ya(t,e){const n=t.getWritable();if(null===n.__slots)return n;const o=n.__slots.get(e);return void 0!==o&&(xa(o),aa(n).delete(e)),n}function ma(t,e){}function xa(e){const n=Ys(e);if(null===n)return;const o=n.getWritable();Zc(o)||t(377,e),o.__slotHost=null,o.remove()}const Ca={next:"previous",previous:"next"};class Sa{origin;constructor(t){this.origin=t}[Symbol.iterator](){return qa({hasNext:Ma,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return Ia(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Ia(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,e){const n=this.getNodeAtCaret();return t.is(this.origin)||t.is(n)||(null===n?this.insert(t):n.replace(t,e)),this}splice(e,n,o="next"){const r=o===this.direction?n:Array.from(n).reverse();let i=this;const s=this.getParentAtCaret(),l=new Map;for(let t=i.getAdjacentCaret();null!==t&&l.size0){const n=i.getNodeAtCaret();if(n)if(l.delete(n.getKey()),l.delete(e.getKey()),n.is(e)||i.origin.is(e));else{const t=e.getParent();t&&t.is(s)&&e.remove(),n.replace(e)}else null===n&&t(263,Array.from(l).join(" "))}else i.insert(e);i=Ia(e,this.direction)}for(const t of l.values())t.remove();return this}}class va extends Sa{type="child";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ba(t,this.direction)}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=ka(this.direction);return Ia(this.getNodeAtCaret(),t)||Ba(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof va&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const Ta={root:Bi,shadowRoot:Bl};function ka(t){return Ca[t]}function ba(t,e="root"){return null===t||Ta[e](t)?null:null===ta(t)?t:null}class Na extends Sa{type="sibling";getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Ia(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Pi(this.origin)?Ba(this.origin,this.direction):null}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=ka(this.direction);return Ia(this.getNodeAtCaret(),t)||Ba(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Na&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Na||t instanceof Ea)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Ea extends Sa{type="text";offset;constructor(t,e){super(t),this.offset=e}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:La(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Ia(ba(this.getParentAtCaret(),t),this.direction)}getFlipped(){return La(this.origin,ka(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Ea&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Na||t instanceof Ea)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Ia(this.origin,this.direction)}}function wa(t){return t instanceof Ea}function Oa(t){return t instanceof Sa}function Ma(t){return t instanceof Na}function Aa(t){return t instanceof va}const Da={next:class extends Ea{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Ea{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Fa={next:class extends Na{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends Na{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},Pa={next:class extends va{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends va{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function Ia(t,e){return t?new Fa[e](t):null}function La(t,e,n){return t?new Da[e](t,Ka(t,n)):null}function Ka(t,n,o="error"){const r=t.getTextContentSize();let i="next"===n?r:"previous"===n?0:n;return(i<0||i>r)&&("clamp"!==o&&e(284,String(n),String(r),t.getKey()),i=i<0?0:r),i}function za(t,e){return new Ua(t,e)}function Ba(t,e){return Pi(t)?new Pa[e](t):null}function Ra(t){return t&&t.getChildCaret()||t}function Wa(t){return t&&Ra(t.getAdjacentCaret())}class $a{type="node-caret-range";direction;anchor;focus;constructor(t,e,n){this.anchor=t,this.focus=e,this.direction=n}getLatest(){const t=this.anchor.getLatest(),e=this.focus.getLatest();return t===this.anchor&&e===this.focus?this:new $a(t,e,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=t=>{const e=this[t].getLatest();return wa(e)?function(t,e){const{direction:n,origin:o}=t,r=Ka(o,"focus"===e?ka(n):n);return za(t,r-t.offset)}(e,t):null},e=t("anchor"),n=t("focus");if(e&&n){const{caret:t}=e,{caret:o}=n;if(t.isSameNodeCaret(o))return[za(t,o.offset-t.offset),null]}return[e,n]}iterNodeCarets(t="root"){const e=wa(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),n=this.focus.getLatest(),o=wa(n),r=e=>e.isSameNodeCaret(n)?null:Wa(e)||e.getParentCaret(t);return qa({hasNext:t=>null!==t&&!(o&&n.isSameNodeCaret(t)),initial:e.isSameNodeCaret(n)?null:r(e),map:t=>t,step:r})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Ua{type="slice";caret;distance;constructor(t,e){this.caret=t,this.distance=e}getSliceIndices(){const{distance:t,caret:{offset:e}}=this,n=e+t;return n{let n;for(let o=c;on.has(t.getKey())&&Sc(t));if(f&&ia(f).length>0)return null;return u&&f?[u,f]:null}(d,h,a);if(g){const[t,e]=g;Ba(t,"previous").splice(0,e.getChildren());let n=e.getParent();for(e.remove(!0);n&&n.isEmpty();){const t=n;n=n.getParent(),t.remove(!0)}}else if(h){const t=function(t){if(Aa(t)){const e=t.origin;if(Sc(e))return e}else{const e=t.getParentAtCaret();if(e&&Sc(e))return e}return null}(h),e=t&&t.getParent(),n=t&&t.getParents().findLast(zl);if(t&&e&&!Bi(e)&&t.isEmpty()&&a.has(t.getKey())&&0===ia(t).length&&(!n||a.has(n.getKey()))){t.remove(!0);let n=e;for(;n&&!Bi(n)&&n.isEmpty();){const t=n.getParent();if(t&&Bi(t)&&t.getChildrenSize()<=1)break;const e=n;n=t,e.remove(!0)}}}const _=[d,h,...l,...c].find(lu);if(_){return Ja(fu(au(_),e.direction))}t(269,JSON.stringify(l.map(t=>t.origin.__key)))}function au(t){const e=function(t){let e=t;for(;Aa(e);){const t=Wa(e);if(!Aa(t))break;e=t}return e}(t.getLatest()),{direction:n}=e;if(Xo(e.origin))return wa(e)?e:La(e.origin,n,n);const o=e.getAdjacentCaret();return Ma(o)&&Xo(o.origin)?La(o.origin,n,ka(n)):e}function uu(t){return wa(t)&&t.offset!==Ka(t.origin,t.direction)}function fu(t,e){return t.direction===e?t:t.getFlipped()}function du(t,e){return t.direction===e?t:Va(fu(t.focus,e),fu(t.anchor,e))}function hu(t,e,n){let o=Ba(t,"next");for(let t=0;t0||!i&&n.canBeEmpty()&&r(n,"last"))&&s.insert(e(n).splice(0,0,o))}return s}function mu(e,n,o){let r=fu(n,"next");wa(r)&&(0===r.offset?r=Ia(r.origin,"previous").getFlipped():r.offset===r.origin.getTextContentSize()&&(r=Ia(r.origin,"next"))),r.origin.is(e)&&(Ma(r)||t(342,e.getKey(),e.getType()),r=iu(r)),(e.is(r.getNodeAtCaret())||e.is(r.getFlipped().getNodeAtCaret()))&&e.remove(!0);for(let t=r;t;t=yu(t,o))r=t;return wa(r)&&t(283),r.insert(e.isInline()?es().append(e):e),fu(Ia(e.getLatest(),"next"),n.direction)}function xu(t){return t}function Cu(...t){return t}function Su(t,e){return[t,e]}function vu(t){return t}function Tu(t,e){if(!e||t===e)return t;for(const n in e)if(t[n]!==e[n])return{...t,...e};return t}function ku(...t){const e=[];for(const n of t)if(n&&"string"==typeof n)for(const[t]of n.matchAll(/\S+/g))e.push(t);return e}function bu(t,...e){const n=ku(...e);n.length>0&&t.classList.add(...n)}function Nu(t,...e){const n=ku(...e);n.length>0&&t.classList.remove(...n)}function Eu(...t){return()=>{for(let e=t.length-1;e>=0;e--)t[e]();t.length=0}}function wu(t,e,n){return Eu(...Object.entries(e).map(([e,o])=>Fn(t,e,o,n)))}export{Al as $addUpdateTag,Wl as $applyNodeReplacement,gi as $assumeActiveEditor,tu as $caretFromPoint,ru as $caretRangeFromSelection,Dc as $cloneWithProperties,Fc as $cloneWithPropertiesEphemeral,Ya as $comparePointCaretNext,Rl as $copyNode,Vc as $create,Yc as $createChildrenArray,qi as $createLineBreakNode,Pr as $createNodeSelection,es as $createParagraphNode,or as $createPoint,Fr as $createRangeSelection,Ir as $createRangeSelectionFromDom,tr as $createTabNode,Go as $createTextNode,ja as $extendCaretToRange,qc as $findMatchingParent,_r as $formatText,pi as $fullReconcile,qr as $generateNodesFromRawText,Wa as $getAdjacentChildCaret,kl as $getAdjacentNode,gu as $getAdjacentSiblingOrParentSiblingCaret,fu as $getCaretInDirection,Va as $getCaretRange,du as $getCaretRangeInDirection,yr as $getCharacterOffsets,Ba as $getChildCaret,hu as $getChildCaretAtIndex,Ra as $getChildCaretOrSelf,Ja as $getCollapsedCaretRange,Za as $getCommonAncestor,Ga as $getCommonAncestorResultBranchOrder,kc as $getDOMSlot,wc as $getDOMTextNode,Zl as $getDocument,vc as $getEditor,Tc as $getEditorDOMRenderConfig,Zs as $getNearestNodeFromDOMNode,Kl as $getNearestRootOrShadowRoot,Ys as $getNodeByKey,Ul as $getNodeByKeyOrThrow,Gs as $getNodeFromDOMNode,zr as $getPreviousSelection,nl as $getRoot,Kr as $getSelection,Ia as $getSiblingCaret,sa as $getSlot,oa as $getSlotFrame,ea as $getSlotHost,na as $getSlotNameWithinHost,ia as $getSlotNames,xt as $getState,Ct as $getStateChange,Yr as $getTextContent,Ka as $getTextNodeOffset,La as $getTextPointCaret,za as $getTextPointCaretSlice,bt as $getWritableNodeState,Fl as $hasAncestor,Ml as $hasUpdateTag,mu as $insertNodeToNearestRootAtCaret,Jr as $insertNodes,Ar as $isBlockElementNode,Aa as $isChildCaret,Ki as $isDecoratorNode,Ui as $isEditorState,Ec as $isElementDOMSlot,Pi as $isElementNode,uu as $isExtendableTextPointCaret,Ll as $isInlineElementOrDecoratorNode,Ro as $isInlineFormattable,$s as $isLeafNode,po as $isLexicalNode,Yi as $isLineBreakNode,Oa as $isNodeCaret,dr as $isNodeSelection,ns as $isParagraphNode,ur as $isRangeSelection,Bi as $isRootNode,Bl as $isRootOrShadowRoot,Os as $isSelectionCapturedInDecoratorInput,zl as $isShadowRootNode,Ma as $isSiblingCaret,Zc as $isSlotChild,Qc as $isSlotHost,er as $isTabNode,Xo as $isTextNode,wa as $isTextPointCaret,Ha as $isTextPointCaretSlice,Ks as $isTokenOrSegmented,Ls as $isTokenOrTab,Bc as $markSlotEditable,Hl as $needsBlockCursorBeside,vl as $nodesOfType,au as $normalizeCaret,It as $normalizeSelection__EXPERIMENTAL,Dl as $onUpdate,vi as $parseSerializedNode,Hs as $removeFromParent,ya as $removeSlot,cu as $removeTextFromCaretRange,iu as $rewindSiblingCaret,xl as $selectAll,Vs as $setCompositionKey,Ic as $setDirectionFromDOM,Lc as $setFormatFromDOM,eu as $setPointFromCaret,ol as $setSelection,nu as $setSelectionFromCaretRange,pa as $setSlot,St as $setState,gr as $setTextFormat,yu as $splitAtPointCaretNext,uc as $splitNode,jr as $updateDOMSelection,ou as $updateRangeSelectionFromCaretRange,ji as ArtificialNode__DO_NOT_USE,ze as BEFORE_INPUT_COMMAND,Mn as BLUR_COMMAND,En as CAN_REDO_COMMAND,wn as CAN_UNDO_COMMAND,s as CAN_USE_BEFORE_INPUT,n as CAN_USE_DOM,bn as CLEAR_EDITOR_COMMAND,Nn as CLEAR_HISTORY_COMMAND,Ke as CLICK_COMMAND,vo as COLLABORATION_TAG,hs as COMMAND_PRIORITY_BEFORE_CRITICAL,as as COMMAND_PRIORITY_BEFORE_EDITOR,ds as COMMAND_PRIORITY_BEFORE_HIGH,us as COMMAND_PRIORITY_BEFORE_LOW,fs as COMMAND_PRIORITY_BEFORE_NORMAL,cs as COMMAND_PRIORITY_CRITICAL,rs as COMMAND_PRIORITY_EDITOR,ls as COMMAND_PRIORITY_HIGH,is as COMMAND_PRIORITY_LOW,ss as COMMAND_PRIORITY_NORMAL,We as COMPOSITION_END_COMMAND,wo as COMPOSITION_END_TAG,Re as COMPOSITION_START_COMMAND,Eo as COMPOSITION_START_TAG,je as CONTROLLED_TEXT_INSERTION_COMMAND,vn as COPY_COMMAND,Tn as CUT_COMMAND,So as CUT_TAG,ps as DEFAULT_EDITOR_DOM_CONFIG,$e as DELETE_CHARACTER_COMMAND,Ye as DELETE_LINE_COMMAND,qe as DELETE_WORD_COMMAND,Sn as DRAGEND_COMMAND,Cn as DRAGOVER_COMMAND,xn as DRAGSTART_COMMAND,yn as DROP_COMMAND,Li as DecoratorNode,Fi as ElementNode,On as FOCUS_COMMAND,mn as FORMAT_ELEMENT_COMMAND,Ge as FORMAT_TEXT_COMMAND,yo as HISTORIC_TAG,xo as HISTORY_MERGE_TAG,mo as HISTORY_PUSH_TAG,_n as INDENT_CONTENT_COMMAND,Be as INPUT_COMMAND,Ue as INSERT_LINE_BREAK_COMMAND,He as INSERT_PARAGRAPH_COMMAND,gn as INSERT_TAB_COMMAND,Sc as INTERNAL_$isBlock,k as IS_ALL_FORMATTING,c as IS_ANDROID,f as IS_ANDROID_CHROME,r as IS_APPLE,d as IS_APPLE_WEBKIT,p as IS_BOLD,u as IS_CHROME,C as IS_CODE,i as IS_FIREFOX,T as IS_HIGHLIGHT,l as IS_IOS,y as IS_ITALIC,a as IS_SAFARI,m as IS_STRIKETHROUGH,S as IS_SUBSCRIPT,v as IS_SUPERSCRIPT,x as IS_UNDERLINE,ln as KEY_ARROW_DOWN_COMMAND,on as KEY_ARROW_LEFT_COMMAND,en as KEY_ARROW_RIGHT_COMMAND,sn as KEY_ARROW_UP_COMMAND,un as KEY_BACKSPACE_COMMAND,dn as KEY_DELETE_COMMAND,tn as KEY_DOWN_COMMAND,cn as KEY_ENTER_COMMAND,fn as KEY_ESCAPE_COMMAND,An as KEY_MODIFIER_COMMAND,an as KEY_SPACE_COMMAND,hn as KEY_TAB_COMMAND,Ji as LineBreakNode,nn as MOVE_TO_END,rn as MOVE_TO_START,_t as NODE_STATE_DIRECT,H as NODE_STATE_KEY,pt as NODE_STATE_LATEST,pn as OUTDENT_CONTENT_COMMAND,Je as PASTE_COMMAND,Co as PASTE_TAG,Zi as ParagraphNode,Ze as REDO_COMMAND,Ve as REMOVE_TEXT_COMMAND,zi as RootNode,Ie as SELECTION_CHANGE_COMMAND,Le as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,kn as SELECT_ALL_COMMAND,Xe as SET_TEXT_FORMAT_COMMAND,To as SKIP_COLLAB_TAG,bo as SKIP_DOM_SELECTION_TAG,ko as SKIP_SCROLL_INTO_VIEW_TAG,No as SKIP_SELECTION_FOCUS_TAG,z as TEXT_TYPE_TO_FORMAT,Zo as TabNode,Wo as TextNode,Qe as UNDO_COMMAND,bu as addClassNamesToElement,uo as buildImportMap,Cu as configExtension,Pe as createCommand,ys as createEditor,Dn as createRefCountedRegistry,vt as createSharedNodeState,mt as createState,Su as declarePeerDependency,xu as defineExtension,Xl as findAllLexicalElementsDeep,ka as flipDirection,lc as getActiveElement,cc as getActiveElementDeep,ac as getComposedEventTarget,tc as getComposedStaticRange,Ol as getDOMOwnerDocument,Jl as getDOMSelection,Vl as getDOMSelectionFromTarget,nc as getDOMSelectionPoints,ec as getDOMSelectionRange,oc as getDOMSelectionRangeAndPoints,Gl as getDOMShadowRoots,Rs as getDOMTextNode,da as getDeclaredSlots,Ps as getEditorPropertyFromDOMNode,Fs as getNearestEditorFromDOMNode,wl as getParentElement,Es as getRegisteredNode,Ns as getRegisteredNodeOrThrow,Jc as getRegisteredSubtypeMap,Ql as getRootOwnerDocument,Hc as getStaticNodeConfig,Mo as getStyleObjectFromCSS,Is as getTextDirection,_s as getTransformSetFromKlass,Cc as isBlockDomNode,ui as isCurrentlyReadOnlyMode,Rc as isDOMCapturingSelection,Bs as isDOMDocumentNode,_c as isDOMNode,ql as isDOMShadowRoot,zs as isDOMTextNode,zc as isDOMUnmanaged,pc as isDocumentFragment,_l as isExactShortcutMatch,fc as isHTMLAnchorElement,gc as isHTMLElement,hc as isHTMLTableCellElement,dc as isHTMLTableRowElement,mc as isInlineDomNode,Xi as isLastChildInBlockNode,Ds as isLexicalEditor,gl as isModifierMatch,Gi as isOnlyChildInBlockNode,Ms as isSelectionCapturedInDecoratorInput,As as isSelectionWithinEditor,jc as iterStaticNodeConfigChain,qa as makeStepwiseIterator,Eu as mergeRegister,bc as mountSlotContainer,ku as normalizeClassNames,Fn as registerEventListener,wu as registerEventListeners,Nu as removeClassNamesFromElement,js as removeFromParent,bs as resetRandomKey,vu as safeCast,Fo as setDOMStyleFromCSS,Do as setDOMStyleObject,Kc as setDOMUnmanaged,Pc as setNodeIndentFromDOM,Tu as shallowMergeConfig,io as stopLexicalPropagation,Ws as toggleTextFormatType,Vr as tokenizeRawText,Nc as unmountSlotContainer}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b746e5fc..bbc02588 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,9 +80,9 @@ patchedDependencies: effect@4.0.0-beta.98: hash: d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933 path: patches/effect@4.0.0-beta.98.patch - lexical@0.47.0: - hash: 4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780 - path: patches/lexical@0.47.0.patch + lexical@0.49.0: + hash: 9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc + path: patches/lexical@0.49.0.patch importers: @@ -309,8 +309,8 @@ importers: specifier: ^3.3.9 version: 3.3.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8) '@lexical/react': - specifier: ^0.47.0 - version: 0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31) + specifier: ^0.49.0 + version: 0.49.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31) '@pierre/diffs': specifier: 'catalog:' version: 1.3.6(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8) @@ -345,8 +345,8 @@ importers: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) lexical: - specifier: ^0.47.0 - version: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + specifier: ^0.49.0 + version: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) lucide-react: specifier: ^1.34.0 version: 1.34.0(react@19.2.8) @@ -1957,32 +1957,32 @@ packages: react-native: optional: true - '@lexical/a11y@0.47.0': - resolution: {integrity: sha512-MlAL25PxThTYQuFn2aOwyfY9+/wKloAd8fbf4a1GeFATVgvirC8xACBmERpqpf4A06OdLIoIZ5J/qtgJXsdn1g==} + '@lexical/a11y@0.49.0': + resolution: {integrity: sha512-ypvO0SI9DCzEAjxkRLq+gNzRqfjg632RCkwu16Hk94PCBrEmcDhx5iUGg3SRJC7WnM2wXC/F/SB8yWDEfq7tEw==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/clipboard@0.47.0': - resolution: {integrity: sha512-OIB+NxHjfpRJJoTtU/mqeb7vPVMks5l97QgwoZthQLR/GIc5zrOtvoLftxl5hKAG5lwOe9BzhashKgVcsSPB3g==} + '@lexical/clipboard@0.49.0': + resolution: {integrity: sha512-AVKj21xH1qU7JAFA/v0hCoafa+Yti1I7cHG+JQIgc/EqCtP8ePeJyIfTPNN/tXskoCdq++HewQoiSXRwwlocVg==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/code-core@0.47.0': - resolution: {integrity: sha512-L0hg+57yzQDhYRV5NFyTwSz2+N3O/iLBgRuMNccE3ieltPPSq7lCBTKOuXF3G0ot3NVudu8//ewHjw7OCMqI5g==} + '@lexical/code-core@0.49.0': + resolution: {integrity: sha512-29sXI4ydcN/OyBJNlZXkGKtQXzfiIWet+YN20+wT97zkqityOvRilK6qzTRz9Cd0ungEPlJENqXQhsy6BJeXpg==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/devtools-core@0.47.0': - resolution: {integrity: sha512-u/+WHfs9p6Jiz83OdWzM2W7xc/BXUqN/RN/o97qFP+H7XX/D5fD3Sn0q/0ymyDgacN7sI4HNxQttkrKXKn1PCA==} + '@lexical/devtools-core@0.49.0': + resolution: {integrity: sha512-LgjNlvRiuO/QF36aG6kfR4ptEvSw587o2+YF6SOsaOB7iw2Z3pqpsKloWSEF4QXaLFI65Li8JjMdQj+BaFMIOA==} peerDependencies: react: '>=18.x' react-dom: '>=18.x' @@ -1991,104 +1991,104 @@ packages: typescript: optional: true - '@lexical/dragon@0.47.0': - resolution: {integrity: sha512-qqkro6sTLddOh2aYSqoXtm1QOQ/DY71AtWj3XmHPIPtxN/PkVKbvJBVZiP/a9kgFoPs+2a2Tlq9cCIDf6xSHuw==} + '@lexical/dragon@0.49.0': + resolution: {integrity: sha512-62/4DP5qyX/l4Yf5qRyyQrs9BV725eRU3OmLUW6g7T5xrcHXxAo7tia/NvqjqvXdpvQzyHjWgsy7dMitGITUsw==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/extension@0.47.0': - resolution: {integrity: sha512-F9WyXB0eDsCbeSuShzgjBS3ugxNnTvHQa+P+VZiVSWilbDNGjJyysco2JCwn5ruLmEP4MXCQn5IKeW7A9FG8KQ==} + '@lexical/extension@0.49.0': + resolution: {integrity: sha512-Wv0VsuqxorbxHCK4ms1PwAu6cXIGNLtflq66auF+zwxOtBprkSFV8VzzzdKLOYD2admP0VK6EqVCeGXFK1GggA==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/hashtag@0.47.0': - resolution: {integrity: sha512-i5ML0v5d52h8hen4cdS/tnqfiteWbvpwihJgZR9hLIk9w6vQJISXUWzg4jRPQIezWwU1xikbBLkT5rD+Qth7tw==} + '@lexical/hashtag@0.49.0': + resolution: {integrity: sha512-aQTpNjrEO5apsaohWGl4ku22EgHpWUzZg5CIzvriS2A1vNmIfzLoCL+lDFpzAwk3DT1Kj1yvGHh5TvhYsb9D8w==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/history@0.47.0': - resolution: {integrity: sha512-CqAR6G4x6WewKS2uDgf2N1/rszIlXiDCW4dwu0IiQV9oVbhOklvAmPBJX6319myJxB+ArtjuuMgDU3gi/iTqXA==} + '@lexical/history@0.49.0': + resolution: {integrity: sha512-uQdtEd34gIJklXNSdHS2Wko1zxx1xUMVXbiodcLO6a3GeFTE5bKnx6af1zGX78KpYhUQYnHWorKuUvtdZlJPaA==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/html@0.47.0': - resolution: {integrity: sha512-VrJ9tSRuoUP5tTQb7TB+6PTW0Gh5aC3Hnne4GuXDwKUIzoWFXWkxlB0oIlfL5HVljrzO/Ra65v5M3RnR4TX1PA==} + '@lexical/html@0.49.0': + resolution: {integrity: sha512-NQqAydKzRjQl7Jx+bTTyC2iuz5uhuDaQX0SSPrdfgaFDCPjqQEejcBkCt1QXnu1CkbVHutZKVGVzljx40Y6y+Q==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/internal@0.47.0': - resolution: {integrity: sha512-VKDTHajXvjCkjYHwWra4Qjz8AI6PWeNPW7l6Q9AIlAwUiolAXrlkyfrBAFzdAP360IyDbC2gO9fwTb9ZvZM85Q==} + '@lexical/internal@0.49.0': + resolution: {integrity: sha512-s+XjPC7Qb39A/Xx9ahcz1s69CPix4ultaqyW+MDG0AXYW2quDr7m0USqReKIAiuoLIWtGN5HW8BwV2Y6t4qr6Q==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/link@0.47.0': - resolution: {integrity: sha512-lDAbTyJwufKs3yUn1D4AY0IoBU9O4JXzTDqSRa8qVCK7LC3+cF0u+rR5o9RJfxtHUzmALk+s2I0IqlxGCyIocg==} + '@lexical/link@0.49.0': + resolution: {integrity: sha512-CsZVu1OfnPOn6IKWVO5DbmKwIuicGtgWSzrZMdMB8w6yPoMgFyPWeVulhPE7LNz2FhaQCWv+lVVYVAiJrUzJsg==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/list@0.47.0': - resolution: {integrity: sha512-g8AApVZNqqcCDXfJtgxEfAv7ylK0HmblRaJYMxB0OI7nlLipUjutIUy8cRX5GKI0woa+oGPYi68cZcMQnBysGw==} + '@lexical/list@0.49.0': + resolution: {integrity: sha512-zs6wYkxakDRcJO0KmwrPPHgeLLIxzjD+P2CRu+scJCHRuA5e2iSw2iFjH5n/LlWBrlnPMSjeQse4QqsRy9nnqA==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/mark@0.47.0': - resolution: {integrity: sha512-/9ZS9NSjrqJ/sTZ7l2KFiBxZbbXEmPp/JxtN5sTlM+F4a/hTRreROWlcXgTLyf9g8GTnRyZScvBqFYKWd6HR1g==} + '@lexical/mark@0.49.0': + resolution: {integrity: sha512-JSYD8UYQQOMT6oDYh1KsLPK3KMGfQzU7E9fJkugKEO0/XebfsmiuNtkLCGDVIZOo8bNHlwb1YVvmswC2bjotMQ==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/markdown@0.47.0': - resolution: {integrity: sha512-mtfcomzk/ZT2wtImEzYeFB6VLsOYM6RqBmwnvEMp5alvJISXFhIHDKAT4BkUMMtWGM6AnrlytZyMNPb4QwnZIA==} + '@lexical/markdown@0.49.0': + resolution: {integrity: sha512-n7x/3OLdi5R0ztICCn8udxRIWFZFVtmQS3a06Tjkyvm/j/dPlFQ/henKSOFjjX/IqVzQzSmiNaDhqKWxXM5npQ==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/overflow@0.47.0': - resolution: {integrity: sha512-XR+F2mni27TgjmE2/PsFYXkAq0AIMV8JJh5VSeHiSg0mccKSfEqsfTxYlwV+um2eGT+6XggtpwFMDy6ZjC+uMw==} + '@lexical/overflow@0.49.0': + resolution: {integrity: sha512-h5Qjv2SkpI76kaukvKJzvWehG9hwB06GEmAnp6aJaioOzoDcBAeWpmYBebtBUwRm0PNLFe3YICFFLpZ5Tg5VoQ==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/plain-text@0.47.0': - resolution: {integrity: sha512-MyRjCpEnDJuEeoT/ndYI/i2605QM2bAgFEi6sX/NObYDJSuupC2iY6tOEbCFZ1s0Y1SX6arNrrAPhwygcemz7g==} + '@lexical/plain-text@0.49.0': + resolution: {integrity: sha512-l7IuUj9n9CtFfz4Fz6zU6mmO+VkcnvyyebABx+lHevvTa7B6YI5PPVgABFfzdyPanyW/FGs7qpKBf59inAqbkg==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/react@0.47.0': - resolution: {integrity: sha512-4y2iEKghKcYcJ8+GoO8pqyvwjJFVDWR71Ezm37lLQGmSTFKY50miTJmgKI12GeL4hLWQjePpB3eVdmSQHG1b7g==} + '@lexical/react@0.49.0': + resolution: {integrity: sha512-NqXF4i/IBFKVDDLDJYTwmBXE++MQuIrTQs7VTux6IPyDEpyfeFMn1rQTFb949S3f7rs33Rcu1uGtFbODQfS1Iw==} peerDependencies: react: '>=18.x' react-dom: '>=18.x' @@ -2100,48 +2100,48 @@ packages: yjs: optional: true - '@lexical/rich-text@0.47.0': - resolution: {integrity: sha512-GtRH7KNW7fVJzd3Xftdr/EPXaMqHt2xCIO/eJtf17Yrs7vlVOljM0xMcDoj4QOY2Gp4p3CheLlwBbcO96YYV0A==} + '@lexical/rich-text@0.49.0': + resolution: {integrity: sha512-LM+d8ULmQvi2Av6UaW4NAIa/Bj9FOo9oh6+dglTzuoFPFQ3sogy5c38i2K9k0ul7aE+bFsXkSmHbu4LkrHIkBQ==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/selection@0.47.0': - resolution: {integrity: sha512-/q+eXnryZxCeqeWAODhTRlJL+jGa6/vIhE/bh+KvHmLbZJM8qfwa0qzt4rb3g+L1/CbjcowS/Xwv2ha1OmjBFQ==} + '@lexical/selection@0.49.0': + resolution: {integrity: sha512-08Vd1+VoC6YnztWOFWVsqF/Hxw5EP8qeL1c7t3+rVCV8revLzXxdQw+vbPX3tgM4fmjOBDUXk6Ws1+rTtsqjcQ==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/table@0.47.0': - resolution: {integrity: sha512-T0sOB1i0I05f2U+tTVXDitYq4ACtFob42gULwwqqKfQ/SEPq26Kfd5CljI1rSS4+N+vQz/VTDYF/BN7ZMgHpjA==} + '@lexical/table@0.49.0': + resolution: {integrity: sha512-PG+dxSTBPbUZUY2kBZm0pJuqCEOGom4RrGrc6Jlj/7o0F37k/gGRVprFSRKuf3CqO03QIP6qRovXGDuKb+Exuw==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/text@0.47.0': - resolution: {integrity: sha512-Rj1xa/MMhgOckjOJ+ifDUO8BUyi7o+a/vpYcsftMTCpiKmeteO+qSAKoyhvZke496nLh/WFCWKw/iD43bst/Ig==} + '@lexical/text@0.49.0': + resolution: {integrity: sha512-mowedvbvx0HDaW+ymVdYmWVhueqgauhhqIWaCtbJj33tPk8pOu1BB0pZuJQbOB+1bDnFiZhkJV8W/CvR2M9lEA==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/utils@0.47.0': - resolution: {integrity: sha512-uVAqNr5qiE4t9GSj+L4rv06WaIGADzblxEKCn134sPzvsVouDv0VTT0pBKjQYUgshT4z9iW5cFtO11+iPacBYg==} + '@lexical/utils@0.49.0': + resolution: {integrity: sha512-Jaa6DERBqxiFOFa49VPRV1WOb7mzRbMZ5U+v+RFagjzTmBhfxDmEkbQQ9nYTU3n3DPfdT8Hkyffextmw04etXg==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: typescript: optional: true - '@lexical/yjs@0.47.0': - resolution: {integrity: sha512-EKw1df2cmUTQrfSp1EnXqsHtNjwgxS973CRor0W4GWmIQJyKdmf6cmA7cct3flkyH5tE/xDnpr8sy38U4R2hlQ==} + '@lexical/yjs@0.49.0': + resolution: {integrity: sha512-uqV3D0AOLqQ1f/Bo6ZtuDLoJYGlBm0RlucNYhNvfMAncEw0f/xHc1pTyXeWjdCI/iWgWR/MV6hgVi26TSPs+Vg==} peerDependencies: typescript: '>=5.2' yjs: '>=13.5.22' @@ -4658,8 +4658,8 @@ packages: lazy-val@1.0.5: resolution: {integrity: sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==} - lexical@0.47.0: - resolution: {integrity: sha512-ZKsxsk3jUpXsRtG20EBq42z2bq8A20UHtjqvVT/kIxfsaiXwaRFBBcLSFxPa77j+hXkBF5w96C3/imwtmLoRdg==} + lexical@0.49.0: + resolution: {integrity: sha512-9V1ZIzGpJEd8rIN+nN7veL4fW4fFWbS66Un4JNqSZB4D5t9euzN9+3+jEXy83FjNjNy0MiiUI3+DQaGCLYko0w==} peerDependencies: typescript: '>=5.2' peerDependenciesMeta: @@ -7549,232 +7549,232 @@ snapshots: optionalDependencies: react-dom: 19.2.8(react@19.2.8) - '@lexical/a11y@0.47.0(typescript@7.0.2)': + '@lexical/a11y@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/clipboard@0.47.0(typescript@7.0.2)': + '@lexical/clipboard@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/list': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/list': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) '@types/trusted-types': 2.0.7 - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/code-core@0.47.0(typescript@7.0.2)': + '@lexical/code-core@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/devtools-core@0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)': + '@lexical/devtools-core@0.49.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)': dependencies: - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/link': 0.47.0(typescript@7.0.2) - '@lexical/mark': 0.47.0(typescript@7.0.2) - '@lexical/table': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/link': 0.49.0(typescript@7.0.2) + '@lexical/mark': 0.49.0(typescript@7.0.2) + '@lexical/table': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) react: 19.2.8 react-dom: 19.2.8(react@19.2.8) optionalDependencies: typescript: 7.0.2 - '@lexical/dragon@0.47.0(typescript@7.0.2)': + '@lexical/dragon@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/extension@0.47.0(typescript@7.0.2)': + '@lexical/extension@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) '@preact/signals-core': 1.14.3 - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/hashtag@0.47.0(typescript@7.0.2)': + '@lexical/hashtag@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/text': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/text': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/history@0.47.0(typescript@7.0.2)': + '@lexical/history@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/html@0.47.0(typescript@7.0.2)': + '@lexical/html@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/internal@0.47.0(typescript@7.0.2)': + '@lexical/internal@0.49.0(typescript@7.0.2)': optionalDependencies: typescript: 7.0.2 - '@lexical/link@0.47.0(typescript@7.0.2)': + '@lexical/link@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/list@0.47.0(typescript@7.0.2)': + '@lexical/list@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/mark@0.47.0(typescript@7.0.2)': + '@lexical/mark@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/markdown@0.47.0(typescript@7.0.2)': - dependencies: - '@lexical/code-core': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/link': 0.47.0(typescript@7.0.2) - '@lexical/list': 0.47.0(typescript@7.0.2) - '@lexical/rich-text': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - '@lexical/text': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/markdown@0.49.0(typescript@7.0.2)': + dependencies: + '@lexical/code-core': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/link': 0.49.0(typescript@7.0.2) + '@lexical/list': 0.49.0(typescript@7.0.2) + '@lexical/rich-text': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + '@lexical/text': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/overflow@0.47.0(typescript@7.0.2)': + '@lexical/overflow@0.49.0(typescript@7.0.2)': dependencies: - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/plain-text@0.47.0(typescript@7.0.2)': + '@lexical/plain-text@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/clipboard': 0.47.0(typescript@7.0.2) - '@lexical/dragon': 0.47.0(typescript@7.0.2) - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/clipboard': 0.49.0(typescript@7.0.2) + '@lexical/dragon': 0.49.0(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/react@0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31)': + '@lexical/react@0.49.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2)(yjs@13.6.31)': dependencies: '@floating-ui/react': 0.27.19(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - '@lexical/a11y': 0.47.0(typescript@7.0.2) - '@lexical/devtools-core': 0.47.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2) - '@lexical/dragon': 0.47.0(typescript@7.0.2) - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/hashtag': 0.47.0(typescript@7.0.2) - '@lexical/history': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/link': 0.47.0(typescript@7.0.2) - '@lexical/list': 0.47.0(typescript@7.0.2) - '@lexical/mark': 0.47.0(typescript@7.0.2) - '@lexical/markdown': 0.47.0(typescript@7.0.2) - '@lexical/overflow': 0.47.0(typescript@7.0.2) - '@lexical/plain-text': 0.47.0(typescript@7.0.2) - '@lexical/rich-text': 0.47.0(typescript@7.0.2) - '@lexical/table': 0.47.0(typescript@7.0.2) - '@lexical/text': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - '@lexical/yjs': 0.47.0(typescript@7.0.2)(yjs@13.6.31) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/a11y': 0.49.0(typescript@7.0.2) + '@lexical/devtools-core': 0.49.0(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(typescript@7.0.2) + '@lexical/dragon': 0.49.0(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/hashtag': 0.49.0(typescript@7.0.2) + '@lexical/history': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/link': 0.49.0(typescript@7.0.2) + '@lexical/list': 0.49.0(typescript@7.0.2) + '@lexical/mark': 0.49.0(typescript@7.0.2) + '@lexical/markdown': 0.49.0(typescript@7.0.2) + '@lexical/overflow': 0.49.0(typescript@7.0.2) + '@lexical/plain-text': 0.49.0(typescript@7.0.2) + '@lexical/rich-text': 0.49.0(typescript@7.0.2) + '@lexical/table': 0.49.0(typescript@7.0.2) + '@lexical/text': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + '@lexical/yjs': 0.49.0(typescript@7.0.2)(yjs@13.6.31) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) react: 19.2.8 react-dom: 19.2.8(react@19.2.8) optionalDependencies: typescript: 7.0.2 yjs: 13.6.31 - '@lexical/rich-text@0.47.0(typescript@7.0.2)': + '@lexical/rich-text@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/clipboard': 0.47.0(typescript@7.0.2) - '@lexical/dragon': 0.47.0(typescript@7.0.2) - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/clipboard': 0.49.0(typescript@7.0.2) + '@lexical/dragon': 0.49.0(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/selection@0.47.0(typescript@7.0.2)': + '@lexical/selection@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/table@0.47.0(typescript@7.0.2)': + '@lexical/table@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/clipboard': 0.47.0(typescript@7.0.2) - '@lexical/extension': 0.47.0(typescript@7.0.2) - '@lexical/html': 0.47.0(typescript@7.0.2) - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/utils': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/clipboard': 0.49.0(typescript@7.0.2) + '@lexical/extension': 0.49.0(typescript@7.0.2) + '@lexical/html': 0.49.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/utils': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/text@0.47.0(typescript@7.0.2)': + '@lexical/text@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/utils@0.47.0(typescript@7.0.2)': + '@lexical/utils@0.49.0(typescript@7.0.2)': dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 - '@lexical/yjs@0.47.0(typescript@7.0.2)(yjs@13.6.31)': + '@lexical/yjs@0.49.0(typescript@7.0.2)(yjs@13.6.31)': dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) - '@lexical/selection': 0.47.0(typescript@7.0.2) - lexical: 0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) + '@lexical/selection': 0.49.0(typescript@7.0.2) + lexical: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2) yjs: 13.6.31 optionalDependencies: typescript: 7.0.2 @@ -10306,9 +10306,9 @@ snapshots: lazy-val@1.0.5: {} - lexical@0.47.0(patch_hash=4b8dd229acb72970dcf7536933ce8ac8689aeec7d653398adddb203d56f71780)(typescript@7.0.2): + lexical@0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2): dependencies: - '@lexical/internal': 0.47.0(typescript@7.0.2) + '@lexical/internal': 0.49.0(typescript@7.0.2) optionalDependencies: typescript: 7.0.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fba5cb6b..5100d708 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -71,7 +71,7 @@ patchedDependencies: "@effect/platform-node@4.0.0-beta.98": patches/@effect__platform-node@4.0.0-beta.98.patch brace-expansion@5.0.9: patches/brace-expansion@5.0.9.patch effect@4.0.0-beta.98: patches/effect@4.0.0-beta.98.patch - lexical@0.47.0: patches/lexical@0.47.0.patch + lexical@0.49.0: patches/lexical@0.49.0.patch peerDependencyRules: allowAny: From 776fb4c3c98824c6240ecf72ee953dad70d94f66 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:57:45 -0400 Subject: [PATCH 5/8] chore(deps): upgrade vite-plus to 0.3.0 oxlint and @oxlint/plugins stay at 1.79.0, the version vite-plus 0.3.0 pins. --- oxlint-plugin-threadlines/package.json | 4 +- package.json | 2 +- pnpm-lock.yaml | 1788 +++++++++++++----------- pnpm-workspace.yaml | 4 +- 4 files changed, 940 insertions(+), 858 deletions(-) diff --git a/oxlint-plugin-threadlines/package.json b/oxlint-plugin-threadlines/package.json index 87e36528..a3b30509 100644 --- a/oxlint-plugin-threadlines/package.json +++ b/oxlint-plugin-threadlines/package.json @@ -8,12 +8,12 @@ }, "dependencies": { "@effect/platform-node": "catalog:", - "@oxlint/plugins": "^1.80.0", + "@oxlint/plugins": "^1.79.0", "effect": "catalog:" }, "devDependencies": { "@effect/vitest": "catalog:", - "oxlint": "^1.80.0", + "oxlint": "^1.79.0", "typescript": "catalog:", "vite": "catalog:", "vite-plus": "catalog:", diff --git a/package.json b/package.json index 2424097b..f438b88b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "devDependencies": { "@effect/tsgo": "catalog:", - "@oxlint/plugins": "^1.80.0", + "@oxlint/plugins": "^1.79.0", "@types/node": "catalog:", "@typescript/native-preview": "catalog:", "vite": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbc02588..40007a78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,8 +37,8 @@ catalogs: specifier: ^7.0.2 version: 7.0.2 vite-plus: - specifier: 0.2.4 - version: 0.2.4 + specifier: 0.3.0 + version: 0.3.0 overrides: '@effect/atom-react': 4.0.0-beta.98 @@ -58,7 +58,7 @@ overrides: tar: 7.5.21 undici@7: 7.29.0 undici@8: 8.10.0 - vite: npm:@voidzero-dev/vite-plus-core@0.2.4 + vite: npm:@voidzero-dev/vite-plus-core@0.3.0 vitest: 4.1.11 yaml: ^2.9.0 @@ -92,8 +92,8 @@ importers: specifier: 'catalog:' version: 0.13.2 '@oxlint/plugins': - specifier: ^1.80.0 - version: 1.80.0 + specifier: ^1.79.0 + version: 1.79.0 '@types/node': specifier: ^24.10.13 version: 24.13.3 @@ -101,11 +101,11 @@ importers: specifier: 'catalog:' version: 7.0.0-dev.20260707.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) apps/desktop: dependencies: @@ -150,14 +150,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) apps/marketing: dependencies: @@ -175,14 +175,14 @@ importers: specifier: ~5.9.3 version: 5.9.3 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) apps/relay-worker: dependencies: @@ -194,14 +194,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) wrangler: specifier: ^4.127.0 version: 4.127.0(@types/node@24.13.3) @@ -270,14 +270,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) apps/web: dependencies: @@ -371,13 +371,13 @@ importers: devDependencies: '@rolldown/plugin-babel': specifier: ^0.2.0 - version: 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2) + version: 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2) '@tailwindcss/vite': specifier: ^4.3.3 - version: 4.3.3(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)) + version: 4.3.3(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)) '@tanstack/router-plugin': specifier: ^1.168.35 - version: 1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) + version: 1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) '@types/babel__core': specifier: ^7.20.5 version: 7.20.5 @@ -389,10 +389,10 @@ importers: version: 19.2.5(@types/react@19.2.18) '@vitejs/plugin-react': specifier: ^6.1.0 - version: 6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(babel-plugin-react-compiler@1.0.0) + version: 6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2))(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(babel-plugin-react-compiler@1.0.0) '@vitest/browser-playwright': specifier: 'catalog:' - version: 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) + version: 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) babel-plugin-react-compiler: specifier: 1.0.0 version: 1.0.0 @@ -409,14 +409,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) vitest-browser-react: specifier: ^2.0.5 version: 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11) @@ -427,8 +427,8 @@ importers: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1) '@oxlint/plugins': - specifier: ^1.80.0 - version: 1.80.0 + specifier: ^1.79.0 + version: 1.79.0 effect: specifier: 4.0.0-beta.98 version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) @@ -437,20 +437,20 @@ importers: specifier: 4.0.0-beta.97 version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11) oxlint: - specifier: ^1.80.0 - version: 1.80.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) + specifier: ^1.79.0 + version: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) typescript: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/client-runtime: dependencies: @@ -468,14 +468,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/contracts: dependencies: @@ -490,14 +490,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/effect-acp: dependencies: @@ -521,14 +521,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/effect-codex-app-server: dependencies: @@ -552,14 +552,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/shared: dependencies: @@ -586,14 +586,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/ssh: dependencies: @@ -620,14 +620,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages/tailscale: dependencies: @@ -648,14 +648,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) scripts: dependencies: @@ -691,14 +691,14 @@ importers: specifier: 'catalog:' version: 7.0.2 vite: - specifier: npm:@voidzero-dev/vite-plus-core@0.2.4 - version: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + specifier: npm:@voidzero-dev/vite-plus-core@0.3.0 + version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' vite-plus: specifier: 'catalog:' - version: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) vitest: specifier: 4.1.11 - version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) packages: @@ -2234,394 +2234,276 @@ packages: '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} - '@oxc-project/runtime@0.138.0': - resolution: {integrity: sha512-yHhoXsN8tYxgdJCdD91PbySNjEEaBX/tH2OQRDXJpsQv5b184oC4/qVbU7qlblvfil/JP15Lh2HW7+HN5DS90Q==} + '@oxc-project/runtime@0.146.0': + resolution: {integrity: sha512-lbXHIpZ1MmK6zuw5txlMdIZ2waLVUIU5Gnm3sEuwJOiqDfQfbtjeHscatmeBoxbv8+If9LFM6PGh/3DcDWYIYw==} engines: {node: ^20.19.0 || >=22.12.0} '@oxc-project/types@0.137.0': resolution: {integrity: sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==} - '@oxc-project/types@0.138.0': - resolution: {integrity: sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==} + '@oxc-project/types@0.146.0': + resolution: {integrity: sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==} - '@oxfmt/binding-android-arm-eabi@0.57.0': - resolution: {integrity: sha512-qVBsEO+KugOsCmUHcO8iqNnqc65p7PCKpCs8M66mPZ+Ri+CWbcpoQOEJBg2OTu03+0qu++NK1jj6IzvQVs0Sig==} + '@oxfmt/binding-android-arm-eabi@0.64.0': + resolution: {integrity: sha512-o6uzh/jTOQeAY5TdkAeXdqv7MBRcPxiRA08zrcBtkKj5cSu/FMu0Hl7Q6Fi1KCKyCWZ6lJVjBzdsJvsKltUsGQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.57.0': - resolution: {integrity: sha512-mp6PibWbao3aizijcheOeHQaYEhcUAt8pwLniYbtLfHxL/psFF0BykAwCj+s3c6qIpa8yN8keZICWrqtZ70w8g==} + '@oxfmt/binding-android-arm64@0.64.0': + resolution: {integrity: sha512-jRGSUeeP7p3Gynw2YaCVtjBIA6ZxY6bEB/ES5i54OhqmRTyuVg7ZgstEtzgq6GOAJd+2QZ5pvf+bFfmW5Mp9cw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.57.0': - resolution: {integrity: sha512-T+0stuCBqmUVY+aMIvrgXhzGhHO3sD5tNiiEcYqgSdPsnukskQqn2u5qOVD0sv1l7RLdFS5Z/f5Wi9Ktyjr3Eg==} + '@oxfmt/binding-darwin-arm64@0.64.0': + resolution: {integrity: sha512-JINwtU2lW7nOFSqi+H2qplipNUqah9Gc1jgGmB82kTD4UnZrZIVxCJ9qEmFiKfjNq27gYLFhrUb0to86aCwMjw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.57.0': - resolution: {integrity: sha512-O+3JbqWs/mCI2oi4xfhRO2IVPFJNDDEBV8Odo+ZpmsUOeKJfjXoNH7nDmBEQcDgK7NfjDIyE7kRgYSZcTLDO0A==} + '@oxfmt/binding-darwin-x64@0.64.0': + resolution: {integrity: sha512-gCmuswrgrOSajV4HCRFkVCGIruPq8bjYuPYgSE2WQB3mD6XrdyZ3JMSRZCkQ8zCxOyGWriBo6QoZ5nmMHQ1BfA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.57.0': - resolution: {integrity: sha512-pxwhxVC+JkLX9twOQ/8C/vbuOQcMZyKIDmiRDZfO7yITuVcIdZCiLRqqf4QOxb2+8FWrRXzQpm+1DBKcMpHSSQ==} + '@oxfmt/binding-freebsd-x64@0.64.0': + resolution: {integrity: sha512-Ab8g7a38pT0MMImjh7anRSTve6buWBIlcXIFBYa5xl4s6UxEgKSc2xOOhbGtLwvXnEi2PsEDGoJh3oUU7xkehQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.57.0': - resolution: {integrity: sha512-pxBU4zH2imB/MDBfth2rOMeVxXUMjRQLCazagwLARIFH3hVlxZJBlM4nSnHXaIHJK4/qezoFCIORN6AY8Mra4A==} + '@oxfmt/binding-linux-arm-gnueabihf@0.64.0': + resolution: {integrity: sha512-BgvS3CoQ+Xy2deoZqEN8JVKabcCZi2RxA3yant8G9OAv9KuPJ9TCjHkqigzdHUVwErZxEP5d2bzLIEyKYyBDLg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.57.0': - resolution: {integrity: sha512-JAprOzt8tycYou36ZgEw14DlRHTiN8qdtKANdV3VZIRIvTI/lh/cX13c9pJ/EnDk2GT3FASH7KvCgQ2AufAifQ==} + '@oxfmt/binding-linux-arm-musleabihf@0.64.0': + resolution: {integrity: sha512-QXpNxwoMj0YvnceCNZadNSden3bIcnvjn/sDp/rwZhRoZoZYGpHvtPyhGsdJz9uvT9GkaMW7SsLddurU56dt8w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.57.0': - resolution: {integrity: sha512-ajtjaxSaj9xl4BW7REt+Cef/ttzbAq00Bq4z7JUDZEfgFXdwSjH8K9bF+IcIJzZB9lKqMfQ4eHuSFOvvlvtqOg==} + '@oxfmt/binding-linux-arm64-gnu@0.64.0': + resolution: {integrity: sha512-BBgH3I1ppDsI5pZ4Pdhw0ceYxwVCfbU/bZEBCeZ6caRS9x0ZabErxubP7riGUn11PXZBhe8DYdjkDKP1FlVQ5w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxfmt/binding-linux-arm64-musl@0.57.0': - resolution: {integrity: sha512-p4Y/+RYk9Bk5WO+zHSUXAClRmZ2fbJCejMuCAsU2HhyME4jqf6Ftt/mJYEwIah1wGCBDYOB7wEGV1x5bCEZ6hA==} + '@oxfmt/binding-linux-arm64-musl@0.64.0': + resolution: {integrity: sha512-v19HSjC/BGXdt26qEvKZtwAHgGmQ2Agcap2kQP+KIqoRZqivVzYth3ui2dJA1i+6/fjpjga85lIOaJJjQ/bOOw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxfmt/binding-linux-ppc64-gnu@0.57.0': - resolution: {integrity: sha512-By6tRALAZsno0F4zedmtG+wdMvJiJmJoXM4d3+A9zHE4HRXLqXITwRH8mgrlcXc5yJM2g2W3riRPwTYdgemZLQ==} + '@oxfmt/binding-linux-ppc64-gnu@0.64.0': + resolution: {integrity: sha512-PElLnOo4xFTBZrxPhgTIj0eHqZXwEBQoNWtb7facUV170T0B0FRET0iNbb3LUeLWTybkUW+vsdyv4ihOdyXGyw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - '@oxfmt/binding-linux-riscv64-gnu@0.57.0': - resolution: {integrity: sha512-skYeG+RgvyzspqVEBsEprL90OYYZfoVNqB3HcCNR6QDJyXKOzfDRT3zncnHmUaFluIlBHuY23mU1b5WGgR98hA==} + '@oxfmt/binding-linux-riscv64-gnu@0.64.0': + resolution: {integrity: sha512-Qzsg15n4F5CH+MorcRW4MkAEMiLzXmeG+DiDSbP/bBTqCmWOH3K9DHryNrve+JHlV0txS+B6Z9P5Xz+cmWeL+g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] - '@oxfmt/binding-linux-riscv64-musl@0.57.0': - resolution: {integrity: sha512-FFgACrZOXAXUh5KQh2mt1CDOVOZmn+QzHP71wM9QobNwyQvoFfyAeefVUltW83g3sm7LTiH3yfFqLLVUpA5ZFQ==} + '@oxfmt/binding-linux-riscv64-musl@0.64.0': + resolution: {integrity: sha512-/GZ358wnQ/Ez4UVnCcZIi56JkY0sOdZ+B108pqXKqZz3jLS59F4KEAB1Qv3fRlObrFEk+3L2vUQ/xoPx+3vjXw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] - '@oxfmt/binding-linux-s390x-gnu@0.57.0': - resolution: {integrity: sha512-Nm/BAOfQeFiiKd502mZn/GAVKJwtd0RdCg17G3Wz/WSOIQmDi3+7/SZH4BHn1Ye5KvTVH3ua8WvfwLLycNIuvA==} + '@oxfmt/binding-linux-s390x-gnu@0.64.0': + resolution: {integrity: sha512-/C9We3DXegowfLXtVCYHeNiU9azwCDr5cQkEtCVlc74vyn+lLQSPApJ1CZmxAduqeq/Oi3gQ+IVptyhCaTMtkQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - '@oxfmt/binding-linux-x64-gnu@0.57.0': - resolution: {integrity: sha512-BiSy5Ku3mQqyxS6YIqAJgd403wEUWvI7kerfzPxc2l/txZVmZM0pSj7oDM+4bGBExowxOi7o73jEam1W0EDTZg==} + '@oxfmt/binding-linux-x64-gnu@0.64.0': + resolution: {integrity: sha512-91KM2CeRWscIEHlj1NsW2WSnzGeq1Ehq+39bfDowTdkn+fcvK/x4Y1RcyqT7glyBjZio0ldkeCG6Usj3v7ASog==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxfmt/binding-linux-x64-musl@0.57.0': - resolution: {integrity: sha512-BCRkJiotz5s9afLYD2LuMvzAoDYx9H17E/YbDyu4xK7l4zHDPeny9ErSXL//i/nJyaOwRk08x4b8cgJC00+JDg==} + '@oxfmt/binding-linux-x64-musl@0.64.0': + resolution: {integrity: sha512-gw7uEk9I+7zoT1EYLra1eWArIzNcz8e3jkv+Noo2+o2T7wPvsNSQbfoa4DSfZlvn1i6mJ05RiZ4/omaXPDNhQg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxfmt/binding-openharmony-arm64@0.57.0': - resolution: {integrity: sha512-4Oaxe1qrGgXfpCJ1C/ERJ2iCtV2rN1R79ga9fsfyVHfSQRu/hVW780u2KDqZWFZ/iGTHODJji0JemxqFZ63eIQ==} + '@oxfmt/binding-openharmony-arm64@0.64.0': + resolution: {integrity: sha512-HYHFf616FHSPSO07c09mjmXBfQ73wIVM3m0txOiooa5XZkGoxFd6B14PVj0LB0DXIqJ6wAO/dDR/NX/5UUaqnw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.57.0': - resolution: {integrity: sha512-MYLAsDnhdNsSGheLYhWgbk0vfIrlS84iQYun/y21fX6u0jj8iBtYtbpZMdiqYeuf8U12eVPUjVY2xE2NrCfJ0g==} + '@oxfmt/binding-win32-arm64-msvc@0.64.0': + resolution: {integrity: sha512-uQjFp081IZSWD6VAofX2iO2z01awAdHmfC+NrieWIPKrT2hZKQDyq/U18M7ifC0sm0Wz8aHY/p6+FDYIzs/CrQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.57.0': - resolution: {integrity: sha512-PBwdzZALJY/jcCx2E6is0yu+cuVXeySTDmwuseD+9j0mHqlRNxwlKgsyRTBed/woPeqfVfuXfWjoq4Cx2Zt3Eg==} + '@oxfmt/binding-win32-ia32-msvc@0.64.0': + resolution: {integrity: sha512-lNM6byTAQ881jugzFu8juJTbNRgsUTlswMA6pJmwi1XDvmIqnnb49lcUAs5gz94fCJLrVN+/X3s3jOKqx23WIQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.57.0': - resolution: {integrity: sha512-bQJdH9i4RRfw55jm7+8/xS7GzHLLTbHx4huhrrDxQJaJtbSDbsyOnODvP1ftT7EG0KFKAYO2S+q6AcioXODx8w==} + '@oxfmt/binding-win32-x64-msvc@0.64.0': + resolution: {integrity: sha512-BtmbtL/QjMtF1a6C3CqoDluH2IfB6fJt62E+B9RFfUPtFk4Iz9PFS6+y/SzzOvSxc7aUk2Kphwg7Dh8lMbwu6g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint-tsgolint/darwin-arm64@0.24.0': - resolution: {integrity: sha512-C2uMmwK5Bc4ri4ysZ6sA8Rcu+A5zBQTp6ml2u0CLLbRZp4kMFPV3yWk8B5DK9Aw7y9bbjogIm75tUwGLFzlsYQ==} + '@oxlint-tsgolint/darwin-arm64@7.0.2001': + resolution: {integrity: sha512-CUJEdbSZ54+Xy9OXqOhWLTKZKV0BBiV7C2i/ygyVmXtkUNXx5YCzN8DpSSshTAKktoL7S+tnQ/ftFG/i7X896w==} cpu: [arm64] os: [darwin] - '@oxlint-tsgolint/darwin-x64@0.24.0': - resolution: {integrity: sha512-Wgvt/1lRbDxmoNqWQKKcL+UIiqLmdJ+EWLpQa1qzoNVAfNB0PJpa82/8dH1twT/3rSs4zrP5TXPWl4juB71WuQ==} + '@oxlint-tsgolint/darwin-x64@7.0.2001': + resolution: {integrity: sha512-pXfBb5BqONCcgrXQNUZWXgiYmRSWJzd97S8i41VVOh6ut0tyo+cJ5FKFpczDHxiVNfj/3e7c9B4MtztNdpIVCw==} cpu: [x64] os: [darwin] - '@oxlint-tsgolint/linux-arm64@0.24.0': - resolution: {integrity: sha512-PB1rxII7KV83+ASY4sSkXtqvpij6ME66+QCRL49uksi/ofs2Rf/UVboYr095n0Rkbl2wgvlsHGl6DHC361jQUQ==} + '@oxlint-tsgolint/linux-arm64@7.0.2001': + resolution: {integrity: sha512-roP7zujb/QDPzDwEKsFFpzNHHy91/Y7oX9vQXk78ekyZtcQj1QXDIMH33gjDdHBfRl4K9pZ36xhRgrP4Zr+R8A==} cpu: [arm64] os: [linux] - '@oxlint-tsgolint/linux-x64@0.24.0': - resolution: {integrity: sha512-xcz3CxKmjTQLREtE/UShh+ruWmm9nAb7UM9zKcD65BStiuYgOakAKkPHl4YS5DztpVcDrE0+HqbOolTlRKYWmw==} + '@oxlint-tsgolint/linux-x64@7.0.2001': + resolution: {integrity: sha512-UDezNqdECVmngu2TPnjaS1YoAmcTaBoI5lV9vk3VahBxoi+I5r9k3iJTT7qZoYWOXTD/7T7bNcwRgrocR6BscQ==} cpu: [x64] os: [linux] - '@oxlint-tsgolint/win32-arm64@0.24.0': - resolution: {integrity: sha512-A2i6ZGBec3i20S7RaxkgHc6r3HYtD5Mn7j/mb22NkTz14u0JuudvTu6JggAnbGMcv8+dBKQI//EasxSPJLD8pw==} + '@oxlint-tsgolint/win32-arm64@7.0.2001': + resolution: {integrity: sha512-uJZhqB6pdXLuN+AD1F5082byyQti/NPmJA77GtcFlmT2HzRelqbNls3SaIqxpjdFgvSBF9g0yOKGBkGFg7kX8Q==} cpu: [arm64] os: [win32] - '@oxlint-tsgolint/win32-x64@0.24.0': - resolution: {integrity: sha512-0ZbGd9qRB6zs82moekaKdEvncRANq49EAwfNX62JpTS46feXUhKAuoyVDvZMj6Rywejylrmmu79Wo6faYCo4Ew==} + '@oxlint-tsgolint/win32-x64@7.0.2001': + resolution: {integrity: sha512-FkDRm8hx9OwzGQqyWG1tO5QrTLRApff9DzSgpz9QZau37BR8d1VYKOxMLGf6shPZntJFoTwIIJYT68VndYDCog==} cpu: [x64] os: [win32] - '@oxlint/binding-android-arm-eabi@1.72.0': - resolution: {integrity: sha512-zhCmvn+1Mj3UchAc/90i99S0t7jJUsHmFVSPg4UWrjO8b8eaSGwscgO6QAUtvHBstkjQwBttQNswEnAF1mIQdA==} + '@oxlint/binding-android-arm-eabi@1.79.0': + resolution: {integrity: sha512-TebFaaMklO/RXzTv7PucaCq9l3X6D1gA+C8H6K4njtjFOV+zWE9MKLpulcJZN9bzytbUbQIY0mZuz12nQ5Kv4Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxlint/binding-android-arm-eabi@1.80.0': - resolution: {integrity: sha512-RM3Plj+biQpxa5d1GOOX6ciDlcUROmm4OZ/pLTpitkQt2mJv4jhtY4cbgaetOm5UKWZe05/TGQ6o1Vl8EOHkrA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [android] - - '@oxlint/binding-android-arm64@1.72.0': - resolution: {integrity: sha512-mtH+aY/ozv1eZoCUC2owjFAtyNBKHpJHygKeEu9zXXnQGW1Q2/qOpvx+I+Lf23+TvTz66F4iiXUbl2cGvoLPCQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [android] - - '@oxlint/binding-android-arm64@1.80.0': - resolution: {integrity: sha512-YlO5JEf0Yr2bUUlu8O8daVcUxtcGGbcSmyV7E7nSbJbfAdxTE0PFPwgnIlw7wXJaTYjb+qs5hI5q3jxUkI7cAw==} + '@oxlint/binding-android-arm64@1.79.0': + resolution: {integrity: sha512-KqqnOtAVgNsPPF0YSodkFZA1O80jcKoCZCTu3bgsszxA+MrMP9TLzfXitKjEj1FmrPprKDMdRDMmY3weESO9sg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxlint/binding-darwin-arm64@1.72.0': - resolution: {integrity: sha512-EvnajNPDtfknB3ZieeOOyDTwJn9QXDiwfnF4ZDQqART6RG6hjY4WigQcZdGoK2dkB3e1vrmEzN9aYbQCUkh/gQ==} + '@oxlint/binding-darwin-arm64@1.79.0': + resolution: {integrity: sha512-BVC2nsMzqQzRDPc5RhixkZ+m1p7iH4bxRRvqkbwDXX0PlQKm1BPy8J8cRjnAFafOq2QzI+BfO3vE8w2GZ3CBag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/binding-darwin-arm64@1.80.0': - resolution: {integrity: sha512-BULDOyO3AhsmdWfQeIUCykDt3dd7XZBGLhp1eIh56skRv01O+cNjNPwXMIbeW1x4+pxcln5if72wcRgViVo7PA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [darwin] - - '@oxlint/binding-darwin-x64@1.72.0': - resolution: {integrity: sha512-ZkCdEa/G80A7vEHfeCDz/+L3m33DE73v32mDKhgOIgz8Uwf0DFcK7+uu6qC+7LEhmz5fpOe1osWKyjSNMydFIQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [darwin] - - '@oxlint/binding-darwin-x64@1.80.0': - resolution: {integrity: sha512-YJ4JzLw7N5TDSQFlA0hAQGHvnDZgyypm1yunObVWcWiF9KM7eGCJKYKLgTC2Fi/57OdnBhbj4OkzPGdFQJ6HyA==} + '@oxlint/binding-darwin-x64@1.79.0': + resolution: {integrity: sha512-p6Lm+snmhGuLKL1+CpCV8L6ijkE/qJzK2H2jG9+eKJT0n31RbY4FLsdhexekgP3bLpw4Kgde+9DZuDZQ4yIInA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/binding-freebsd-x64@1.72.0': - resolution: {integrity: sha512-NroXv2vh+sxVY1uya/rM5pjhx1hm8BzlYpx9q67QP0Xhw5MH2bf5GJylpvLEC+781p1Xli/317EoV9AlGwViag==} + '@oxlint/binding-freebsd-x64@1.79.0': + resolution: {integrity: sha512-qDMm0dXZnoHyRqSL4N4xUq82T4sqK5cbKSjvd/dF/YbMUXc2R1wEPf+vmA5S0qUmi0nwXfNbjXBtZaIqzQLIMg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxlint/binding-freebsd-x64@1.80.0': - resolution: {integrity: sha512-AYUIk5QnL0s8oWAYsREZwkRYy1SupJTXALo93J1TgzHywxQtdM99FecRMQ87MXEdPQ0j1TmEpeeq3fGNkpvMqg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [freebsd] - - '@oxlint/binding-linux-arm-gnueabihf@1.72.0': - resolution: {integrity: sha512-0NDywYgfj279Ou/BcQuCYSj7NJwBfmWn5qc5uGO/Ny7fUWmXyIpvawqX/8acQlWG6IXelJsJhj+JAy6sjsKj0A==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@oxlint/binding-linux-arm-gnueabihf@1.80.0': - resolution: {integrity: sha512-9hBZVANupQ89W9dXyE0n8doCyaW5pDyGn3y6XlIMPZ+rIKuyqkr3SNUXmVJIhuvUq0NBU3RBiSXXE69l4XI6KA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm] - os: [linux] - - '@oxlint/binding-linux-arm-musleabihf@1.72.0': - resolution: {integrity: sha512-4vpXB06h65Ezsy4hRyrGjGrfa1SkVPii09yaajiYhmVpgsFiLD+KNxIx/BNAY+XiO+i1yqp9HHdwqM8VTqa5XQ==} + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': + resolution: {integrity: sha512-2od7s0nuKPzqyUZAWk9KkCyGg7eI9dwFPZg+20lB15fKFkVZ0c9ZFxqPfiBAyDTlTkh9stPI0t+JlPCqMbItVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm-musleabihf@1.80.0': - resolution: {integrity: sha512-SvS2uKqzY+pbfuvAHzH4338R6Zwo805GAwrIMVvK1KxoOWCIjZUdfzTCvilD7z6JK91v011+zYMryabhDo2AsQ==} + '@oxlint/binding-linux-arm-musleabihf@1.79.0': + resolution: {integrity: sha512-ZOQUjkzDnvlhSE3+tWC3YXx94MMl+sYMlwH+u1+YGApGHOJP/YAc8ZBRFOXZ6eOBmxtXAWuS/fBcdZr8qqNO1A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.72.0': - resolution: {integrity: sha512-immaN4g2ZGFiOkKrvRX9LvzZdd2GkQM5wR+UyzYyUuyhUTXGQ4HKUJH18xp4G8OfhCVaVAJfKZxwE1r8+4hhaQ==} + '@oxlint/binding-linux-arm64-gnu@1.79.0': + resolution: {integrity: sha512-lu158FR4nGqGeRS3BQvtG85wRgU/Fy4MD5Cxp1hzJXizGiLo6u2742wJSCDKh8cFcZntvX7fcxlq4mMmfryH1g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.80.0': - resolution: {integrity: sha512-tCLadyqRVL3pQTRPNg7cjXKvcvS4fbyXeQHhKk5BTJ1oftQln5/yIIWbu/Xom/DX41zv2P9QGt6+D/TtQVtY3A==} + '@oxlint/binding-linux-arm64-musl@1.79.0': + resolution: {integrity: sha512-mbpKQeE2aflTjddaHK7MP8KP/OFbUM++lt5M635ENM8IyIdK0jm2t9pb+2v9mVVIvhF6TqA4l7F79Pll1mi+uw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@oxlint/binding-linux-arm64-musl@1.72.0': - resolution: {integrity: sha512-JGHS9Mnr7iWyyLDxgCv1MhzVpAckgptg00F2gnxt/GD7lQ2SW1BRcxHqhSTaSdDpjWRrBkBxMMh4+Hn3aVtExg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - - '@oxlint/binding-linux-arm64-musl@1.80.0': - resolution: {integrity: sha512-XfpCNRlOPcLlJl4Bn/FUhjqlR6BVavEykERBf/MV7YA9VZDa5g5znVqYhyviMafcxS9Pe/i/kPvHNO0U6svEHQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [linux] - - '@oxlint/binding-linux-ppc64-gnu@1.72.0': - resolution: {integrity: sha512-AOYgBZqxNshrg83P9v0RYv+m8s10Cqkj4/PxXFDhcS3k7FqsIG5+CxErshZCIN7G8iy4Y+VGfAsuEdar8AcbBg==} + '@oxlint/binding-linux-ppc64-gnu@1.79.0': + resolution: {integrity: sha512-WpGNua7gaxaHnpSDeog2ji8IDHn/QLPl9LPzwkR/FvVv58vT5BcXjRXnU+wbu3N75cpeha8CdC7ho/U2OIsB4g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - '@oxlint/binding-linux-ppc64-gnu@1.80.0': - resolution: {integrity: sha512-3I4yMwcFG9NeO8ioY6JBBuKsIm5GL/x7MATt1S4tVWaxPu5HcJ+XnLUbcVBTxG8q2Wu56HSj+NmXQiVYb1lp6A==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ppc64] - os: [linux] - - '@oxlint/binding-linux-riscv64-gnu@1.72.0': - resolution: {integrity: sha512-QMybPS5ij3/vrKG67mqzHwW++91sYxK/PPUVi6SBtNCEzW4niS52fVBdXbQ6nou0wWbUPEpx8Sl/ZjtgE3clXA==} + '@oxlint/binding-linux-riscv64-gnu@1.79.0': + resolution: {integrity: sha512-tK1E93A5LVzISg4ngpKJnfTs7EqtIUceGI7MQ4GyDjJiLi8wPCkEyKlj2xkyKWZ1yzkDJyLHTBJ5/iFWRdnJvg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] - '@oxlint/binding-linux-riscv64-gnu@1.80.0': - resolution: {integrity: sha512-E1wAKymkpe1/E8helzBKdm81OBOF+ezxRyXRMEuik3ZpWDER5CPOKZwF66RsdwW98uwZv8UTFremUQtC1CzdJA==} + '@oxlint/binding-linux-riscv64-musl@1.79.0': + resolution: {integrity: sha512-qhQvUIrngXivA2A9pQ+xPCychztn/5qUv7yS3gDwXv3w7Rag+eTeeXWmRyx+t7XsW5x6LuY/8AsTq36UgFIblg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] - '@oxlint/binding-linux-riscv64-musl@1.72.0': - resolution: {integrity: sha512-gOc3W7JV0PXRpIL7stUlLe3Wa9Gp0Kdlup87IT3gHDvPKck2xNgMIl/Gs2lldYY2lyXZDC4rWi3hmoLUobkgbQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [riscv64] - os: [linux] - - '@oxlint/binding-linux-riscv64-musl@1.80.0': - resolution: {integrity: sha512-+gLRGD4sIo3+VA++iham5UxD9tKSoJ/VOrROCEXIcknrYtQg6iIQgvjN0cpiRF7N6UYC7pJbvHJlDnMge5LRpQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [riscv64] - os: [linux] - - '@oxlint/binding-linux-s390x-gnu@1.72.0': - resolution: {integrity: sha512-rpGxph+FjjHcYI5q6uxB3Az+tnfmEnDbSA8+PK9ZE/VzyUAkvBOMeuY7ZQMhu5mpZH7YQDsTdW6Cx4kV/msc6w==} + '@oxlint/binding-linux-s390x-gnu@1.79.0': + resolution: {integrity: sha512-sv6AaVgU/eE6u+6WFiQVDcPPwTxP6IJMSB9k701W2r/r6Tx465e8vPvVyRxquNH4Vy6KwRNu90mVbxXJN8+5gg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - '@oxlint/binding-linux-s390x-gnu@1.80.0': - resolution: {integrity: sha512-aR0PrzHj9leW3NmzBAAP4EzdoBNoJcs9sjnIQPIwyRnBGYrRbXUIpEB5Q39AqK3PLY5JK5uEhDQDiUa1QSAstw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [s390x] - os: [linux] - - '@oxlint/binding-linux-x64-gnu@1.72.0': - resolution: {integrity: sha512-WND+uhf/Ko13SLqQMWQUgsZuLvYYEvL0ZKgg0tgGYfLqxG7l8Ju123fHDMJyYSDl5E3bUbpFUuii/OvMreFQzw==} + '@oxlint/binding-linux-x64-gnu@1.79.0': + resolution: {integrity: sha512-iFZL02deziHslb3jEX9KdqlAkYoo4fGyotchKDzdfK1f5mxlIBeiQeHhvK3iFpuEJSB4ma/qeFn9oxPiwnhUPQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxlint/binding-linux-x64-gnu@1.80.0': - resolution: {integrity: sha512-vSVh5cSo3Xxs6ghBCcFJlpbkbENzDog1qXtoXLa/HC3aCrR4XO76GZbXmQoCPHnu99nQpdCeC3H9tdNICfDh7A==} + '@oxlint/binding-linux-x64-musl@1.79.0': + resolution: {integrity: sha512-3DtZR2raqObnh7wXZoFYFd0Fw7skBvcb3f7A+/lkEiDuh8hrE6vv9b/62Qxao1a9/OeHLw/FcXlXzgsW9wTRFg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@oxlint/binding-linux-x64-musl@1.72.0': - resolution: {integrity: sha512-SrpbrUL70nG9vh6zP4/oKHWgLuHquwsr7MW9XOn0olBVgh10Uqr8qscKhQoBGEn6olK/IUpn5GSKcdQ5AjUhGA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - - '@oxlint/binding-linux-x64-musl@1.80.0': - resolution: {integrity: sha512-FfzBXpNQ8u7/ZI/p8bl73MeZ508Ax3hxWp3SiJpEFiC+BB9XcXy5FAZHTLKDPSzrUpxQZSZJAVdDmuJp/+HDBQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [linux] - - '@oxlint/binding-openharmony-arm64@1.72.0': - resolution: {integrity: sha512-qkrsEn6NmgFKr7U/QnezQMb+q/vzAy0Dd9Y95gQGQTyjzDLN+HRZMuM5u70iyH4nBLCfKBzhjMsYCehKay2jyg==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [openharmony] - - '@oxlint/binding-openharmony-arm64@1.80.0': - resolution: {integrity: sha512-zMzbkumtmprCgRwoYNzcB3iC39fXdJIMLMU33KdCjEGLlJGOEt1+LwQ4LF8ndLzAEKVz4BR0y3V6Xrkk3Nm3yA==} + '@oxlint/binding-openharmony-arm64@1.79.0': + resolution: {integrity: sha512-Oatt4GuA1WJkqzk2ozx4HrWROOi7opV3AKDw/U8qDIqeTqzsjn5K2x3REJMNjU3/KU/Bkq96Zi3CknaiDTaC/Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxlint/binding-win32-arm64-msvc@1.72.0': - resolution: {integrity: sha512-LWR6ZlFZph+KPjXv8opgZsXRDCdrdQe8VL8Cg9zxCoBS73h6znzZpydVgmdnwj8mB9AuSM5jxEgDJDpQkjboeg==} + '@oxlint/binding-win32-arm64-msvc@1.79.0': + resolution: {integrity: sha512-NAgZr9Qp8nIA9rpo0JEvwiabTF/2UVqBNnupBG9X4kxXcQoScJUTi+qHhvabb9s/thgj5wQ4XcIaJvb+ZMgoKw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/binding-win32-arm64-msvc@1.80.0': - resolution: {integrity: sha512-ib6iRcrXsk4t1fm3iKcwksyWh1ZkZXC/2mEzakl0ai2+6HZunf1WWMZ/xP9EJAvw9g9K4UVTC3NF/+G2qLrbTQ==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [arm64] - os: [win32] - - '@oxlint/binding-win32-ia32-msvc@1.72.0': - resolution: {integrity: sha512-yt6HEh7IsHvtjRWtmeZRX134eaXKHq5Gnqlf1xBJdJl1JtdoRUEJw3nAxpZoUDS860cX/foKbztO441anVBtVQ==} + '@oxlint/binding-win32-ia32-msvc@1.79.0': + resolution: {integrity: sha512-+KyXjIvcpaXmWW/j9NNY5yWjrIVxaX18VyIheQy3jwc2GSYgpCr7MGI/HxIGQ/shAL5IWEKbhsqoMpAO5Stiog==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxlint/binding-win32-ia32-msvc@1.80.0': - resolution: {integrity: sha512-xhRWBMpLxZvgKAH6+DJZmpP+W8Y8UdQOSU1JfxSWNXsaBaRGW77j+1hCuNHlzj7OH4SPN8fYd1q0o2qrDtoVyw==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [ia32] - os: [win32] - - '@oxlint/binding-win32-x64-msvc@1.72.0': - resolution: {integrity: sha512-b2eKFD2hX7tIwmo/cyH6TDq8vzWRZ2qNHrzoGntUTmq0h3zQh/uX3eTSHCwI8OB/ADQfJCRelLItK8BsxuucDA==} - engines: {node: ^20.19.0 || >=22.12.0} - cpu: [x64] - os: [win32] - - '@oxlint/binding-win32-x64-msvc@1.80.0': - resolution: {integrity: sha512-yAnO7lwBYQnz2pcfBPIGQQZWIX5zd5R/1aAKIF3oE+TVj7IhoHcROjOkz3sRDngzqhfPKfFaXqug5j5rE5dn6Q==} + '@oxlint/binding-win32-x64-msvc@1.79.0': + resolution: {integrity: sha512-mEelcCMMBS57sIXh2veGMNy+pQwuGtcMxHxGIZWQ5Ba9pJ5jCCUFOZB9E2JhBaxGsURe+WGe0zJp4RVre52gpQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint/plugins@1.68.0': - resolution: {integrity: sha512-titLmukUt/h8ho7Svlf0xSBjoy2ccZKrXjpXpZCj+v6V4CJccC2KyP45BLSCMx8YIpifMyiDyUptM4+5sruKbQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@oxlint/plugins@1.80.0': - resolution: {integrity: sha512-QRgH1XqQEYNHa4f1vvPQ5fAdNdncHGIUG1ZWLlGIZHky3qwCEeAKYitZNbZMtaXtAQAAFFTOwqUfzESvimqZNA==} + '@oxlint/plugins@1.79.0': + resolution: {integrity: sha512-S0uyoxakDINJ4DPgqxGlEEvrdSMeQb7Z2lKVjxoY2gwsbZbfg2Xr8Klfeo5ZeraHmmdBCELFUHkSe6KEmBpMvg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@peculiar/asn1-schema@2.8.0': @@ -3359,13 +3241,8 @@ packages: playwright: '*' vitest: 4.1.11 - '@vitest/browser-preview@4.1.10': - resolution: {integrity: sha512-14MJrL59ZFkqXLjwfSk6RzTDy5Czf9UG4+8q8L6Gxjs2aPjEce/cVNYV14bXAc2BvMjUNu904+ZEZA1Xc1wtvQ==} - peerDependencies: - vitest: 4.1.11 - - '@vitest/browser@4.1.10': - resolution: {integrity: sha512-UDwuWGwXj646CBx/bQHOaJSX7np0I8JL/UKQYa1e4QrVHH8VdWtx8eaOuf8sy0ShwDgR6NjJAsp5eF6vjF6qng==} + '@vitest/browser-preview@4.1.11': + resolution: {integrity: sha512-iPKSE6Ibayey6HFgK1V1/aHgyhx7HSRk1YMi+lnBZGmlIiNV5Uc7xRkD9Su8RDylTxDECK23t7kTHdRKoqSYDQ==} peerDependencies: vitest: 4.1.11 @@ -3374,23 +3251,9 @@ packages: peerDependencies: vitest: 4.1.11 - '@vitest/expect@4.1.10': - resolution: {integrity: sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==} - '@vitest/expect@4.1.11': resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==} - '@vitest/mocker@4.1.10': - resolution: {integrity: sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==} - peerDependencies: - msw: ^2.4.9 - vite: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - '@vitest/mocker@4.1.11': resolution: {integrity: sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==} peerDependencies: @@ -3402,43 +3265,28 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.10': - resolution: {integrity: sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==} - '@vitest/pretty-format@4.1.11': resolution: {integrity: sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==} - '@vitest/runner@4.1.10': - resolution: {integrity: sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==} - '@vitest/runner@4.1.11': resolution: {integrity: sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==} - '@vitest/snapshot@4.1.10': - resolution: {integrity: sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==} - '@vitest/snapshot@4.1.11': resolution: {integrity: sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==} - '@vitest/spy@4.1.10': - resolution: {integrity: sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==} - '@vitest/spy@4.1.11': resolution: {integrity: sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==} - '@vitest/utils@4.1.10': - resolution: {integrity: sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==} - '@vitest/utils@4.1.11': resolution: {integrity: sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==} - '@voidzero-dev/vite-plus-core@0.2.4': - resolution: {integrity: sha512-AoAYGPwNO56o9TuCR+KaQGA5XpSnTpn2QYHK0DQ0f8j3wvaMmToeWOJF6STo+XMntMDfiaB7sOsSFNE+hPYyjg==} + '@voidzero-dev/vite-plus-core@0.3.0': + resolution: {integrity: sha512-aOqoqIWaF+Q/geDU48pC2rVFEVSvLV1GGj/NdvhUiBhCZntoFNbwI+hjUeG8BMaPG67sOV6ey+/sgkdmGmKqaw==} engines: {node: ^20.19.0 || ^22.18.0 || >=24.11.0} peerDependencies: '@arethetypeswrong/core': ^0.18.1 '@types/node': ^24.10.13 - '@vitejs/devtools': ^0.3.0 + '@vitejs/devtools': ^0.4.0 || ^0.5.0 esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 @@ -3449,7 +3297,7 @@ packages: sugarss: ^5.0.0 terser: ^5.16.0 tsx: ^4.8.1 - typescript: ^5.0.0 || ^6.0.0 + typescript: ^5.0.0 || ^6.0.0 || ^7.0.0 unplugin-unused: ^0.5.0 unrun: '*' yaml: ^2.9.0 @@ -3489,50 +3337,50 @@ packages: yaml: optional: true - '@voidzero-dev/vite-plus-darwin-arm64@0.2.4': - resolution: {integrity: sha512-UQwoLpnBW3qLqj5H3airPQeMCX3kfffVDM2EYGe889Fn5dOS9VhikuWloJlcjwtKwqLbFqkrsGjfb6XRvuLozg==} + '@voidzero-dev/vite-plus-darwin-arm64@0.3.0': + resolution: {integrity: sha512-9ADr1egZ8T4tJOqrpQLhoDl95Y74R95+bsvjmin0gy1C0eQVhpmcNnBfb07KFNhJioJp9MMO7F7Dx4fQL5SKsw==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [darwin] - '@voidzero-dev/vite-plus-darwin-x64@0.2.4': - resolution: {integrity: sha512-f4XtiA4cBc/Z260QvvXIlBqTb/dZMAioohQDoR5jLG9o9vIOaWE2Ujm/zcWDyNpyZ88RLRrcO8ZwiMrEsdzbJw==} + '@voidzero-dev/vite-plus-darwin-x64@0.3.0': + resolution: {integrity: sha512-GegasVCwNeDOkNyvhLOuwU1+T2JkjY/Tq+SOvwphUpVcqQ6OOAUq9LlpoXviO2QL/Kq2NbMYjiAfPKVSTLUFQw==} engines: {node: '>=20.0.0'} cpu: [x64] os: [darwin] - '@voidzero-dev/vite-plus-linux-arm64-gnu@0.2.4': - resolution: {integrity: sha512-TUamG9wEehZI4SFG7M6nUKb6z/7x3nNOBbnPdWIpv4C8uWKHwNtsnaaVLeygHIUIJEhbByR3oEFDylYLLr4KRw==} + '@voidzero-dev/vite-plus-linux-arm64-gnu@0.3.0': + resolution: {integrity: sha512-nYI3KNYXkXjRPsSdR4Lr7J2xMxfR1+TplWlG/dV37qVXWAjbyHpoAlbULjZBAVJMyXRNlcADhBrEwXe4g6s48A==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [linux] - '@voidzero-dev/vite-plus-linux-arm64-musl@0.2.4': - resolution: {integrity: sha512-CS9uQ22QFr+lZZp95Huccg3cip3QYVU9GWrhvATqMBXWXb8IRHOulzuXrFxzvhMBITyPaRS9m/eIHmnM4L4h4Q==} + '@voidzero-dev/vite-plus-linux-arm64-musl@0.3.0': + resolution: {integrity: sha512-HRlVA3AOcuGXmOdHhQ+Zv5XAaKbYF9si5rRHoOsKl0UyBo4txA3OoJfmP0WjanfLUNmu85JyO2dO1ptL4C6wgg==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [linux] - '@voidzero-dev/vite-plus-linux-x64-gnu@0.2.4': - resolution: {integrity: sha512-X5XfvftFERjer78SG+QKaJCa9LgIKygx4w13sD1/RS/kYOtaf1+yifrJpOFel+t9TRe/YqGTZa5C8uFrDz3OHw==} + '@voidzero-dev/vite-plus-linux-x64-gnu@0.3.0': + resolution: {integrity: sha512-9A+dFScPfwcrzF/rRR0zH8++2hOf6xtFmN/5LyzyfUywtw9MILXcC72IMcOeL6QRJwKUMsudi1rFeDE59azNvw==} engines: {node: '>=20.0.0'} cpu: [x64] os: [linux] - '@voidzero-dev/vite-plus-linux-x64-musl@0.2.4': - resolution: {integrity: sha512-2iIWW6JR0UOK4QIFKgUQHjaF/7hZxELePny8R1OIn2jzShRfQhS1cmxksSg8ce/5nhYrfQ9dkg5ZmdLbxhpS/A==} + '@voidzero-dev/vite-plus-linux-x64-musl@0.3.0': + resolution: {integrity: sha512-KfIV3qaPdaOOE8JQMRHRE34FtZocl9O86XLTP6JMjDUlcx8FPgf8/fz/HFqJ8g232vM+JsgLI/YTVeXP8LkTKw==} engines: {node: '>=20.0.0'} cpu: [x64] os: [linux] - '@voidzero-dev/vite-plus-win32-arm64-msvc@0.2.4': - resolution: {integrity: sha512-3yY4FnpvKBxjmHtEcao6Wcs/VBstzC0GhXAPWetbiFEl/sgL66V4Uhws02esfOSWw8abqLrXyPE9vK+newtsuw==} + '@voidzero-dev/vite-plus-win32-arm64-msvc@0.3.0': + resolution: {integrity: sha512-KRhdy5K13AYx9KBfCVHRrK7zSZU+bMW9CL6gTai+UkJgAmDJi1kjdSNboZOjO8mrzUnTCrELgMI2tnstcxSTuA==} engines: {node: '>=20.0.0'} cpu: [arm64] os: [win32] - '@voidzero-dev/vite-plus-win32-x64-msvc@0.2.4': - resolution: {integrity: sha512-ERnFrh1O0XZhmGSqND04jtHM7tyKaGAOeT1w/HpVFmL/cQK2vuLl2GKjEwOqkBLd2csNGCcnk3e7C2qDmrNR/Q==} + '@voidzero-dev/vite-plus-win32-x64-msvc@0.3.0': + resolution: {integrity: sha512-7+G+GxGmxdpQO0zjiGnkZFXKGqm0CrVduebRsJd6ccuOuxCQYPxLcoHq4WOaGrh56SrAGS7XjhnQCrXRkzKUVQ==} engines: {node: '>=20.0.0'} cpu: [x64] os: [win32] @@ -3574,6 +3422,119 @@ packages: '@xterm/xterm@6.0.0': resolution: {integrity: sha512-TQwDdQGtwwDt+2cgKDLn0IRaSxYu1tSUjgKarSDkUM0ZNiSRXFpjxEsvc/Zgc5kq5omJ+V0a8/kIM2WD3sMOYg==} + '@yuku-codegen/binding-darwin-arm64@0.5.48': + resolution: {integrity: sha512-yo96Oef12WzqnphInfz/eexVse3+kWgfGS5g2S3rFS3dcGn1ENW9xLFDZUP9rh+yP76DOq38wBoFi1+I9+6qBg==} + cpu: [arm64] + os: [darwin] + + '@yuku-codegen/binding-darwin-x64@0.5.48': + resolution: {integrity: sha512-aRCTw0EZC4bVosmw//0OMYP5tGWFE0Cu5yUBFkUbhXx/iBzvORcJ2xPNlOp/vtCCo9Ys4vp8b0DigJV6uOVb2g==} + cpu: [x64] + os: [darwin] + + '@yuku-codegen/binding-freebsd-x64@0.5.48': + resolution: {integrity: sha512-CA0AQAEApDkbw51PdLWMtKPJ41/7rvXsS3SJs+phG7fHJI+MuFzWuLbkucZfZoEOiDscmcsfYIdgL8BsfuyKKQ==} + cpu: [x64] + os: [freebsd] + + '@yuku-codegen/binding-linux-arm-gnu@0.5.48': + resolution: {integrity: sha512-DuSQlk8bH4gpmW3/00P0NLagAcMv8jOxjT40cQmxKRkktr+SUOALCfkT89tdDq3qtY95NR2GXOZ7AjNh7KKqCw==} + cpu: [arm] + os: [linux] + + '@yuku-codegen/binding-linux-arm-musl@0.5.48': + resolution: {integrity: sha512-bxj4Ee+wlaJcWJwft2ReJXWw5sfl1qavDz6+dlRdU1xfTEtjPSNiAWhiCHnJR0R4Ygd57DnzSQmAVGvFv6RcGw==} + cpu: [arm] + os: [linux] + + '@yuku-codegen/binding-linux-arm64-gnu@0.5.48': + resolution: {integrity: sha512-mk5JVWh+0JOe5ue8k17kbYX8uGBoKt3ZqoCyxNh4nYAAcX7+X1tFUiU7jbjctu4vHeejCBFSTdQ021+V31cUCQ==} + cpu: [arm64] + os: [linux] + + '@yuku-codegen/binding-linux-arm64-musl@0.5.48': + resolution: {integrity: sha512-4q3vkrNghbllyxOm2KesFLxCPKHF7r3JyQ7BWZccY1j2Y05yKoIFhoWCqIuQ2W/dpte9RI0+OVfwyxnrKg6fkA==} + cpu: [arm64] + os: [linux] + + '@yuku-codegen/binding-linux-x64-gnu@0.5.48': + resolution: {integrity: sha512-csd4M1EVrGaohM8acM6gq1zpUA/Rwe2ulUMBKUcwQXm/k6n7cq1A++qdew78SOVb4do3JH1WE+WFwoGQAcWc1w==} + cpu: [x64] + os: [linux] + + '@yuku-codegen/binding-linux-x64-musl@0.5.48': + resolution: {integrity: sha512-KcDuEOT+GFoVKdvAWOv1v9iYjwnmvMZlO+j1Rw+5PYdeFLGWGzv/DD11y4SAAdwXIFcil4T0hibeIaF82WStMg==} + cpu: [x64] + os: [linux] + + '@yuku-codegen/binding-win32-arm64@0.5.48': + resolution: {integrity: sha512-HI8qNrI8dWM5BuqIMKsqornRvTNFrE6sm5zToIJ9YIa9zt5+29P7fJ7Nr39EVf6dAWSb6q7JSpScJnRsQ+FgZA==} + cpu: [arm64] + os: [win32] + + '@yuku-codegen/binding-win32-x64@0.5.48': + resolution: {integrity: sha512-X5YWJLO6EfBZpeBqO0AYESnUizbpFDWArcvVD61w0PEWQ3CaFRLnbQXs+kpM4ZZfGMfIE22zfA08QSY67q7TNQ==} + cpu: [x64] + os: [win32] + + '@yuku-parser/binding-darwin-arm64@0.5.48': + resolution: {integrity: sha512-If8mb7HH3vqghJ2NNZ8SuHfhsnjVzOxJpB8xcNOXS5WjYrs2mUhHIh5KOIvK13hDOzh0htGeGK3A6MsiEqE7HQ==} + cpu: [arm64] + os: [darwin] + + '@yuku-parser/binding-darwin-x64@0.5.48': + resolution: {integrity: sha512-EimvPXfspzxf1K11eB6tCW5oiQEXB8g84T2wP1TwzQagdDKo33bkmmVF0B32vTIpXnk/Ifu5IB61izZ1MylljA==} + cpu: [x64] + os: [darwin] + + '@yuku-parser/binding-freebsd-x64@0.5.48': + resolution: {integrity: sha512-0GcUMrumLHheThY9r5Tp46gaZYzn0irWPS1Zba6WY+vVQfhUtzGiWgXxI6tuXX0N32kEaaEVRpkKctvo6Kx3aQ==} + cpu: [x64] + os: [freebsd] + + '@yuku-parser/binding-linux-arm-gnu@0.5.48': + resolution: {integrity: sha512-8S5T5wjCC73dmmpQeZ49aYsSunIUM3D4Fc6rdK96c+Ayg/p3FmeSPF3xuLZHejcTmqJIIvnbfPlUF+rB6DITjQ==} + cpu: [arm] + os: [linux] + + '@yuku-parser/binding-linux-arm-musl@0.5.48': + resolution: {integrity: sha512-tTmbxvnUHcK2/crS9547vk2SMmsajH1yqJ8ltXhIuHJgqR1v+d9n9KT+kSayo/5CS76LegeYxhMFjEivBH2hFA==} + cpu: [arm] + os: [linux] + + '@yuku-parser/binding-linux-arm64-gnu@0.5.48': + resolution: {integrity: sha512-KGYCBMqI2zfwyhgq5tpPVNe7jpUeYTBm8DhjdS+zqWNumde/PEC170QE5RHxcOAlsirIDeIUk0jqx+r/axoFSw==} + cpu: [arm64] + os: [linux] + + '@yuku-parser/binding-linux-arm64-musl@0.5.48': + resolution: {integrity: sha512-2wTSMsCSXLTc2lZUjMAuU5X4cje55u205WJqfV5NWNF6j9pW/tXyxr15dJeekj8ziLqBXzIsj4DbRh4sY/WcjA==} + cpu: [arm64] + os: [linux] + + '@yuku-parser/binding-linux-x64-gnu@0.5.48': + resolution: {integrity: sha512-d/6v9UnGglVu1WC2JQyv/5aWSi5fXZeGSlidCfmHp4+N65N1GDKUnFtys5MK5eAPeAjTgSHGGtOc/yCcKTlv3A==} + cpu: [x64] + os: [linux] + + '@yuku-parser/binding-linux-x64-musl@0.5.48': + resolution: {integrity: sha512-gX19gw6u4ApPy7SYMPKfFlEkrtj6WlORvrTKK3sBQqjyV+8+mUAkQgxXNjHw4RnOiAmVYg7TOlZcg8d+Qqod9A==} + cpu: [x64] + os: [linux] + + '@yuku-parser/binding-win32-arm64@0.5.48': + resolution: {integrity: sha512-w6cQQLbqj3Jcom5Q7ifm103NUOQ9d+Cb4VU5lkrZDjMnwVJ9Hzzg1vCQR7miJuF44vhCXldbme5UryE3giEKlA==} + cpu: [arm64] + os: [win32] + + '@yuku-parser/binding-win32-x64@0.5.48': + resolution: {integrity: sha512-4gO0HmG7fzFxrw1rs0dUdnnaY9YgennjETqDWrTSp7x9fmTUOAoN4VsMfP7YyliQeG1WJJHc55O+rOhmsLppow==} + cpu: [x64] + os: [win32] + + '@yuku-toolchain/types@0.5.43': + resolution: {integrity: sha512-kSpvPntnXw5+lYjO71ffBEnQ5ycQ74KGIYknh0TS4xeyCuBkOqxyJumxZkMhLBBUCLjDAbx2+Icnr3Zh4ftjpQ==} + abbrev@4.0.0: resolution: {integrity: sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==} engines: {node: ^20.17.0 || >=22.9.0} @@ -4677,70 +4638,140 @@ packages: cpu: [arm64] os: [android] + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + lightningcss-darwin-arm64@1.32.0: resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + lightningcss-darwin-x64@1.32.0: resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + lightningcss-freebsd-x64@1.32.0: resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + lightningcss-linux-arm-gnueabihf@1.32.0: resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + lightningcss-linux-arm64-gnu@1.32.0: resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + lightningcss-win32-x64-msvc@1.32.0: resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + lightningcss@1.32.0: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lodash.escaperegexp@4.1.2: resolution: {integrity: sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==} @@ -5183,8 +5214,8 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} - oxfmt@0.57.0: - resolution: {integrity: sha512-ZB7Bi+rGDSqmVIo9jwcLyFgjxXvQhDdU+jx+ZrVy6VRiVXK2+CHc4hO3J4dUQjHe7V0ymHB+MDuv5z+NhK07HA==} + oxfmt@0.64.0: + resolution: {integrity: sha512-XZ4GFBN/PLbXKq+0zrgpQfPKYuJlUuj+nzZJY7UpIbFMNyefNLCdN9EwViycNqnYcv0wrn0jXcQLlqJp8RCKBg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -5196,25 +5227,12 @@ packages: vite-plus: optional: true - oxlint-tsgolint@0.24.0: - resolution: {integrity: sha512-giCk5sEvG02d5tzPmFMX3hem8ndzEEu1xvGYS5OwNfO2WGl6ZVxt5LjE0yiMDoz94INI7XkXwgFAQiydPvVHDw==} + oxlint-tsgolint@7.0.2001: + resolution: {integrity: sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg==} hasBin: true - oxlint@1.72.0: - resolution: {integrity: sha512-1rhdZIP/EvoI91ABIwNU5Q8+bWf8mjrS5UzIOZld4d4bXxJvtlUhlQvaoTogIGin/qdErMOrwaIJvCSIAKTLhA==} - engines: {node: ^20.19.0 || >=22.12.0} - hasBin: true - peerDependencies: - oxlint-tsgolint: '>=0.22.1' - vite-plus: '*' - peerDependenciesMeta: - oxlint-tsgolint: - optional: true - vite-plus: - optional: true - - oxlint@1.80.0: - resolution: {integrity: sha512-5nTiSps4qdbCWLbxzuO00alHkEO2exR9YMN/ig6QXWrLsYSG0KaObOAM+l6oU2LcKPWoSAGYbkZIGEu1ViiWKA==} + oxlint@1.79.0: + resolution: {integrity: sha512-hVJ9hq9m2unPS+Of4eJJgCPdIeCC+3DHEUX3tkmrPJr3OK2hz7PhXwgC+ZP71ZcYu8cCDEtQrqLxWNvxBppBVg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -5831,10 +5849,6 @@ packages: resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} engines: {node: ^20.0.0 || >=22.0.0} - tinyrainbow@3.1.0: - resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} - engines: {node: '>=14.0.0'} - tinyrainbow@3.1.1: resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==} engines: {node: '>=14.0.0'} @@ -6107,13 +6121,13 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-plus@0.2.4: - resolution: {integrity: sha512-gaBBjOXIq9lLRU44oAYdIr99p+JBLX1kxs+l/6LqGgSXwcVKAdDa1boSrOTELqYCkQQ0fpppXUGWi9o6JDT5zw==} + vite-plus@0.3.0: + resolution: {integrity: sha512-GNWbWuWD37frCSFrz6MLzUo62bTv5IOJozHEgZYOkxsLkuQtTwm4TowzpfoGrSsfwhAAtfPd/sK1Y0+v1SwhZA==} engines: {node: ^20.19.0 || ^22.18.0 || >=24.11.0} hasBin: true peerDependencies: - '@vitest/browser-playwright': 4.1.10 - '@vitest/browser-webdriverio': 4.1.10 + '@vitest/browser-playwright': 4.1.11 + '@vitest/browser-webdriverio': 4.1.11 peerDependenciesMeta: '@vitest/browser-playwright': optional: true @@ -6435,6 +6449,12 @@ packages: youch@4.1.0-beta.10: resolution: {integrity: sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==} + yuku-codegen@0.5.48: + resolution: {integrity: sha512-p7HxD5Xl4jzDzqMrGePAOeSHmRY4g58h4HuGq15weQFPxuPWd/W6e7nqp/+Lea6JfpOdBwJOAyXFqIZ/J9Zfnw==} + + yuku-parser@0.5.48: + resolution: {integrity: sha512-OWBfhrpgK9+/4+IXG9oT8Bao4AhViQA7vdyNNH7EUg8dQYgwa70XtIBWTpCEme1P1ECyoDNYkn0wT63f8XRcVA==} + zod-to-json-schema@3.25.2: resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} peerDependencies: @@ -6959,7 +6979,7 @@ snapshots: '@effect/vitest@4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)': dependencies: effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933) - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) '@electron-internal/extract-zip@1.0.4': {} @@ -7876,204 +7896,145 @@ snapshots: '@oslojs/encoding@1.1.0': {} - '@oxc-project/runtime@0.138.0': {} + '@oxc-project/runtime@0.146.0': {} '@oxc-project/types@0.137.0': {} - '@oxc-project/types@0.138.0': {} - - '@oxfmt/binding-android-arm-eabi@0.57.0': - optional: true - - '@oxfmt/binding-android-arm64@0.57.0': - optional: true - - '@oxfmt/binding-darwin-arm64@0.57.0': - optional: true - - '@oxfmt/binding-darwin-x64@0.57.0': - optional: true - - '@oxfmt/binding-freebsd-x64@0.57.0': - optional: true - - '@oxfmt/binding-linux-arm-gnueabihf@0.57.0': - optional: true - - '@oxfmt/binding-linux-arm-musleabihf@0.57.0': - optional: true - - '@oxfmt/binding-linux-arm64-gnu@0.57.0': - optional: true + '@oxc-project/types@0.146.0': {} - '@oxfmt/binding-linux-arm64-musl@0.57.0': + '@oxfmt/binding-android-arm-eabi@0.64.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.57.0': + '@oxfmt/binding-android-arm64@0.64.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.57.0': + '@oxfmt/binding-darwin-arm64@0.64.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.57.0': + '@oxfmt/binding-darwin-x64@0.64.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.57.0': + '@oxfmt/binding-freebsd-x64@0.64.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.57.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.64.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.57.0': + '@oxfmt/binding-linux-arm-musleabihf@0.64.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.57.0': + '@oxfmt/binding-linux-arm64-gnu@0.64.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.57.0': + '@oxfmt/binding-linux-arm64-musl@0.64.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.57.0': + '@oxfmt/binding-linux-ppc64-gnu@0.64.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.57.0': + '@oxfmt/binding-linux-riscv64-gnu@0.64.0': optional: true - '@oxlint-tsgolint/darwin-arm64@0.24.0': + '@oxfmt/binding-linux-riscv64-musl@0.64.0': optional: true - '@oxlint-tsgolint/darwin-x64@0.24.0': + '@oxfmt/binding-linux-s390x-gnu@0.64.0': optional: true - '@oxlint-tsgolint/linux-arm64@0.24.0': + '@oxfmt/binding-linux-x64-gnu@0.64.0': optional: true - '@oxlint-tsgolint/linux-x64@0.24.0': + '@oxfmt/binding-linux-x64-musl@0.64.0': optional: true - '@oxlint-tsgolint/win32-arm64@0.24.0': + '@oxfmt/binding-openharmony-arm64@0.64.0': optional: true - '@oxlint-tsgolint/win32-x64@0.24.0': + '@oxfmt/binding-win32-arm64-msvc@0.64.0': optional: true - '@oxlint/binding-android-arm-eabi@1.72.0': + '@oxfmt/binding-win32-ia32-msvc@0.64.0': optional: true - '@oxlint/binding-android-arm-eabi@1.80.0': + '@oxfmt/binding-win32-x64-msvc@0.64.0': optional: true - '@oxlint/binding-android-arm64@1.72.0': + '@oxlint-tsgolint/darwin-arm64@7.0.2001': optional: true - '@oxlint/binding-android-arm64@1.80.0': + '@oxlint-tsgolint/darwin-x64@7.0.2001': optional: true - '@oxlint/binding-darwin-arm64@1.72.0': + '@oxlint-tsgolint/linux-arm64@7.0.2001': optional: true - '@oxlint/binding-darwin-arm64@1.80.0': + '@oxlint-tsgolint/linux-x64@7.0.2001': optional: true - '@oxlint/binding-darwin-x64@1.72.0': + '@oxlint-tsgolint/win32-arm64@7.0.2001': optional: true - '@oxlint/binding-darwin-x64@1.80.0': + '@oxlint-tsgolint/win32-x64@7.0.2001': optional: true - '@oxlint/binding-freebsd-x64@1.72.0': + '@oxlint/binding-android-arm-eabi@1.79.0': optional: true - '@oxlint/binding-freebsd-x64@1.80.0': + '@oxlint/binding-android-arm64@1.79.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.72.0': + '@oxlint/binding-darwin-arm64@1.79.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.80.0': + '@oxlint/binding-darwin-x64@1.79.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.72.0': + '@oxlint/binding-freebsd-x64@1.79.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.80.0': + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.72.0': + '@oxlint/binding-linux-arm-musleabihf@1.79.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.80.0': + '@oxlint/binding-linux-arm64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.72.0': + '@oxlint/binding-linux-arm64-musl@1.79.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.80.0': + '@oxlint/binding-linux-ppc64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.72.0': + '@oxlint/binding-linux-riscv64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.80.0': + '@oxlint/binding-linux-riscv64-musl@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.72.0': + '@oxlint/binding-linux-s390x-gnu@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.80.0': + '@oxlint/binding-linux-x64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.72.0': + '@oxlint/binding-linux-x64-musl@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.80.0': + '@oxlint/binding-openharmony-arm64@1.79.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.72.0': + '@oxlint/binding-win32-arm64-msvc@1.79.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.80.0': + '@oxlint/binding-win32-ia32-msvc@1.79.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.72.0': + '@oxlint/binding-win32-x64-msvc@1.79.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.80.0': - optional: true - - '@oxlint/binding-linux-x64-musl@1.72.0': - optional: true - - '@oxlint/binding-linux-x64-musl@1.80.0': - optional: true - - '@oxlint/binding-openharmony-arm64@1.72.0': - optional: true - - '@oxlint/binding-openharmony-arm64@1.80.0': - optional: true - - '@oxlint/binding-win32-arm64-msvc@1.72.0': - optional: true - - '@oxlint/binding-win32-arm64-msvc@1.80.0': - optional: true - - '@oxlint/binding-win32-ia32-msvc@1.72.0': - optional: true - - '@oxlint/binding-win32-ia32-msvc@1.80.0': - optional: true - - '@oxlint/binding-win32-x64-msvc@1.72.0': - optional: true - - '@oxlint/binding-win32-x64-msvc@1.80.0': - optional: true - - '@oxlint/plugins@1.68.0': {} - - '@oxlint/plugins@1.80.0': {} + '@oxlint/plugins@1.79.0': {} '@peculiar/asn1-schema@2.8.0': dependencies: @@ -8186,14 +8147,14 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.1.2': optional: true - '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2)': + '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2)': dependencies: '@babel/core': 7.29.7 picomatch: 4.0.5 rolldown: 1.1.2 optionalDependencies: '@babel/runtime': 7.29.7 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' '@rolldown/pluginutils@1.0.1': {} @@ -8329,12 +8290,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - '@tailwindcss/vite@4.3.3(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))': + '@tailwindcss/vite@4.3.3(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))': dependencies: '@tailwindcss/node': 4.3.3 '@tailwindcss/oxide': 4.3.3 tailwindcss: 4.3.3 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' '@tanstack/devtools-event-client@0.5.0': {} @@ -8402,7 +8363,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2)': + '@tanstack/router-plugin@1.168.35(@tanstack/react-router@1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2)': dependencies: '@babel/core': 7.29.7 '@babel/template': 7.29.7 @@ -8411,11 +8372,11 @@ snapshots: '@tanstack/router-generator': 1.167.33 '@tanstack/router-utils': 1.162.2 chokidar: 5.0.0 - unplugin: 3.3.0(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) + unplugin: 3.3.0(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2) zod: 4.4.3 optionalDependencies: '@tanstack/react-router': 1.170.32(react-dom@19.2.8(react@19.2.8))(react@19.2.8) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' transitivePeerDependencies: - '@farmfe/core' - '@rspack/core' @@ -8673,95 +8634,92 @@ snapshots: optionalDependencies: react: 19.2.8 - '@vitejs/plugin-react@6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(babel-plugin-react-compiler@1.0.0)': + '@vitejs/plugin-react@6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2))(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(babel-plugin-react-compiler@1.0.0)': dependencies: '@rolldown/pluginutils': 1.0.1 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' optionalDependencies: - '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2) + '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(rolldown@1.1.2) babel-plugin-react-compiler: 1.0.0 - '@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11)': + '@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11)': dependencies: - '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) playwright: 1.62.1 tinyrainbow: 3.1.1 - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite + optional: true - '@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11)': + '@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11)': dependencies: - '@testing-library/dom': 10.4.1 - '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1) - '@vitest/browser': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + playwright: 1.62.1 + tinyrainbow: 3.1.1 + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)': + '@vitest/browser-preview@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11)': dependencies: '@testing-library/dom': 10.4.1 '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1) - '@vitest/browser': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11)': + '@vitest/browser-preview@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)': dependencies: - '@blazediff/core': 1.9.1 - '@vitest/mocker': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) - '@vitest/utils': 4.1.10 - magic-string: 0.30.21 - pngjs: 7.0.0 - sirv: 3.0.2 - tinyrainbow: 3.1.0 - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) - ws: 8.21.0 + '@testing-library/dom': 10.4.1 + '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1) + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)': + '@vitest/browser@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11)': dependencies: '@blazediff/core': 1.9.1 - '@vitest/mocker': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) - '@vitest/utils': 4.1.10 + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + '@vitest/utils': 4.1.11 magic-string: 0.30.21 pngjs: 7.0.0 sirv: 3.0.2 - tinyrainbow: 3.1.0 - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) - ws: 8.21.0 + tinyrainbow: 3.1.1 + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + ws: 8.21.3 transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)': + '@vitest/browser@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)': dependencies: '@blazediff/core': 1.9.1 - '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) '@vitest/utils': 4.1.11 magic-string: 0.30.21 pngjs: 7.0.0 sirv: 3.0.2 tinyrainbow: 3.1.1 - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) ws: 8.21.3 transitivePeerDependencies: - bufferutil @@ -8769,15 +8727,6 @@ snapshots: - utf-8-validate - vite - '@vitest/expect@4.1.10': - dependencies: - '@standard-schema/spec': 1.1.0 - '@types/chai': 5.2.3 - '@vitest/spy': 4.1.10 - '@vitest/utils': 4.1.10 - chai: 6.2.2 - tinyrainbow: 3.1.0 - '@vitest/expect@4.1.11': dependencies: '@standard-schema/spec': 1.1.0 @@ -8787,67 +8736,33 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.1 - '@vitest/mocker@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))': - dependencies: - '@vitest/spy': 4.1.10 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - msw: 2.15.0(@types/node@24.13.3)(typescript@5.9.3) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' - - '@vitest/mocker@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))': - dependencies: - '@vitest/spy': 4.1.10 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - msw: 2.15.0(@types/node@24.13.3)(typescript@7.0.2) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' - - '@vitest/mocker@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))': + '@vitest/mocker@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))': dependencies: '@vitest/spy': 4.1.11 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.15.0(@types/node@24.13.3)(typescript@5.9.3) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' - '@vitest/mocker@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))': + '@vitest/mocker@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))': dependencies: '@vitest/spy': 4.1.11 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.15.0(@types/node@24.13.3)(typescript@7.0.2) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' - - '@vitest/pretty-format@4.1.10': - dependencies: - tinyrainbow: 3.1.0 + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' '@vitest/pretty-format@4.1.11': dependencies: tinyrainbow: 3.1.1 - '@vitest/runner@4.1.10': - dependencies: - '@vitest/utils': 4.1.10 - pathe: 2.0.3 - '@vitest/runner@4.1.11': dependencies: '@vitest/utils': 4.1.11 pathe: 2.0.3 - '@vitest/snapshot@4.1.10': - dependencies: - '@vitest/pretty-format': 4.1.10 - '@vitest/utils': 4.1.10 - magic-string: 0.30.21 - pathe: 2.0.3 - '@vitest/snapshot@4.1.11': dependencies: '@vitest/pretty-format': 4.1.11 @@ -8855,72 +8770,84 @@ snapshots: magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.10': {} - '@vitest/spy@4.1.11': {} - '@vitest/utils@4.1.10': - dependencies: - '@vitest/pretty-format': 4.1.10 - convert-source-map: 2.0.0 - tinyrainbow: 3.1.0 - '@vitest/utils@4.1.11': dependencies: '@vitest/pretty-format': 4.1.11 convert-source-map: 2.0.0 tinyrainbow: 3.1.1 - '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)': + '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)': dependencies: - '@oxc-project/runtime': 0.138.0 - '@oxc-project/types': 0.138.0 - lightningcss: 1.32.0 + '@oxc-project/runtime': 0.146.0 + '@oxc-project/types': 0.146.0 + lightningcss: 1.33.0 postcss: 8.5.23 + yuku-codegen: 0.5.48 + yuku-parser: 0.5.48 optionalDependencies: '@types/node': 24.13.3 + '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0 + '@voidzero-dev/vite-plus-darwin-x64': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0 esbuild: 0.28.2 fsevents: 2.3.3 jiti: 2.7.0 typescript: 5.9.3 yaml: 2.9.0 - '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)': + '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)': dependencies: - '@oxc-project/runtime': 0.138.0 - '@oxc-project/types': 0.138.0 - lightningcss: 1.32.0 + '@oxc-project/runtime': 0.146.0 + '@oxc-project/types': 0.146.0 + lightningcss: 1.33.0 postcss: 8.5.23 + yuku-codegen: 0.5.48 + yuku-parser: 0.5.48 optionalDependencies: '@types/node': 24.13.3 + '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0 + '@voidzero-dev/vite-plus-darwin-x64': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0 esbuild: 0.28.2 fsevents: 2.3.3 jiti: 2.7.0 typescript: 7.0.2 yaml: 2.9.0 - '@voidzero-dev/vite-plus-darwin-arm64@0.2.4': + '@voidzero-dev/vite-plus-darwin-arm64@0.3.0': optional: true - '@voidzero-dev/vite-plus-darwin-x64@0.2.4': + '@voidzero-dev/vite-plus-darwin-x64@0.3.0': optional: true - '@voidzero-dev/vite-plus-linux-arm64-gnu@0.2.4': + '@voidzero-dev/vite-plus-linux-arm64-gnu@0.3.0': optional: true - '@voidzero-dev/vite-plus-linux-arm64-musl@0.2.4': + '@voidzero-dev/vite-plus-linux-arm64-musl@0.3.0': optional: true - '@voidzero-dev/vite-plus-linux-x64-gnu@0.2.4': + '@voidzero-dev/vite-plus-linux-x64-gnu@0.3.0': optional: true - '@voidzero-dev/vite-plus-linux-x64-musl@0.2.4': + '@voidzero-dev/vite-plus-linux-x64-musl@0.3.0': optional: true - '@voidzero-dev/vite-plus-win32-arm64-msvc@0.2.4': + '@voidzero-dev/vite-plus-win32-arm64-msvc@0.3.0': optional: true - '@voidzero-dev/vite-plus-win32-x64-msvc@0.2.4': + '@voidzero-dev/vite-plus-win32-x64-msvc@0.3.0': optional: true '@volar/kit@2.4.28(typescript@5.9.3)': @@ -8979,6 +8906,74 @@ snapshots: '@xterm/xterm@6.0.0': {} + '@yuku-codegen/binding-darwin-arm64@0.5.48': + optional: true + + '@yuku-codegen/binding-darwin-x64@0.5.48': + optional: true + + '@yuku-codegen/binding-freebsd-x64@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-arm-gnu@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-arm-musl@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-arm64-gnu@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-arm64-musl@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-x64-gnu@0.5.48': + optional: true + + '@yuku-codegen/binding-linux-x64-musl@0.5.48': + optional: true + + '@yuku-codegen/binding-win32-arm64@0.5.48': + optional: true + + '@yuku-codegen/binding-win32-x64@0.5.48': + optional: true + + '@yuku-parser/binding-darwin-arm64@0.5.48': + optional: true + + '@yuku-parser/binding-darwin-x64@0.5.48': + optional: true + + '@yuku-parser/binding-freebsd-x64@0.5.48': + optional: true + + '@yuku-parser/binding-linux-arm-gnu@0.5.48': + optional: true + + '@yuku-parser/binding-linux-arm-musl@0.5.48': + optional: true + + '@yuku-parser/binding-linux-arm64-gnu@0.5.48': + optional: true + + '@yuku-parser/binding-linux-arm64-musl@0.5.48': + optional: true + + '@yuku-parser/binding-linux-x64-gnu@0.5.48': + optional: true + + '@yuku-parser/binding-linux-x64-musl@0.5.48': + optional: true + + '@yuku-parser/binding-win32-arm64@0.5.48': + optional: true + + '@yuku-parser/binding-win32-x64@0.5.48': + optional: true + + '@yuku-toolchain/types@0.5.43': {} + abbrev@4.0.0: {} accepts@2.0.0: @@ -9144,8 +9139,8 @@ snapshots: ultrahtml: 1.7.0 unifont: 0.7.5 unstorage: 1.17.5(ioredis@5.11.1) - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' - vitefu: 1.1.3(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)) + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + vitefu: 1.1.3(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)) xxhash-wasm: 1.1.0 yargs-parser: 22.0.0 zod: 4.4.3 @@ -10319,36 +10314,69 @@ snapshots: lightningcss-android-arm64@1.32.0: optional: true + lightningcss-android-arm64@1.33.0: + optional: true + lightningcss-darwin-arm64@1.32.0: optional: true + lightningcss-darwin-arm64@1.33.0: + optional: true + lightningcss-darwin-x64@1.32.0: optional: true + lightningcss-darwin-x64@1.33.0: + optional: true + lightningcss-freebsd-x64@1.32.0: optional: true + lightningcss-freebsd-x64@1.33.0: + optional: true + lightningcss-linux-arm-gnueabihf@1.32.0: optional: true + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + lightningcss-linux-arm64-gnu@1.32.0: optional: true + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + lightningcss-linux-arm64-musl@1.32.0: optional: true + lightningcss-linux-arm64-musl@1.33.0: + optional: true + lightningcss-linux-x64-gnu@1.32.0: optional: true + lightningcss-linux-x64-gnu@1.33.0: + optional: true + lightningcss-linux-x64-musl@1.32.0: optional: true + lightningcss-linux-x64-musl@1.33.0: + optional: true + lightningcss-win32-arm64-msvc@1.32.0: optional: true + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + lightningcss-win32-x64-msvc@1.32.0: optional: true + lightningcss-win32-x64-msvc@1.33.0: + optional: true + lightningcss@1.32.0: dependencies: detect-libc: 2.1.2 @@ -10365,6 +10393,22 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + lodash.escaperegexp@4.1.2: {} lodash.isequal@4.5.0: {} @@ -11048,185 +11092,161 @@ snapshots: outvariant@1.4.3: {} - oxfmt@0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): + oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): dependencies: tinypool: 2.1.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.57.0 - '@oxfmt/binding-android-arm64': 0.57.0 - '@oxfmt/binding-darwin-arm64': 0.57.0 - '@oxfmt/binding-darwin-x64': 0.57.0 - '@oxfmt/binding-freebsd-x64': 0.57.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.57.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.57.0 - '@oxfmt/binding-linux-arm64-gnu': 0.57.0 - '@oxfmt/binding-linux-arm64-musl': 0.57.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-musl': 0.57.0 - '@oxfmt/binding-linux-s390x-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-musl': 0.57.0 - '@oxfmt/binding-openharmony-arm64': 0.57.0 - '@oxfmt/binding-win32-arm64-msvc': 0.57.0 - '@oxfmt/binding-win32-ia32-msvc': 0.57.0 - '@oxfmt/binding-win32-x64-msvc': 0.57.0 - vite-plus: 0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) - - oxfmt@0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)): + '@oxfmt/binding-android-arm-eabi': 0.64.0 + '@oxfmt/binding-android-arm64': 0.64.0 + '@oxfmt/binding-darwin-arm64': 0.64.0 + '@oxfmt/binding-darwin-x64': 0.64.0 + '@oxfmt/binding-freebsd-x64': 0.64.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.64.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.64.0 + '@oxfmt/binding-linux-arm64-gnu': 0.64.0 + '@oxfmt/binding-linux-arm64-musl': 0.64.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-musl': 0.64.0 + '@oxfmt/binding-linux-s390x-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-musl': 0.64.0 + '@oxfmt/binding-openharmony-arm64': 0.64.0 + '@oxfmt/binding-win32-arm64-msvc': 0.64.0 + '@oxfmt/binding-win32-ia32-msvc': 0.64.0 + '@oxfmt/binding-win32-x64-msvc': 0.64.0 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + + oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)): dependencies: tinypool: 2.1.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.57.0 - '@oxfmt/binding-android-arm64': 0.57.0 - '@oxfmt/binding-darwin-arm64': 0.57.0 - '@oxfmt/binding-darwin-x64': 0.57.0 - '@oxfmt/binding-freebsd-x64': 0.57.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.57.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.57.0 - '@oxfmt/binding-linux-arm64-gnu': 0.57.0 - '@oxfmt/binding-linux-arm64-musl': 0.57.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-musl': 0.57.0 - '@oxfmt/binding-linux-s390x-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-musl': 0.57.0 - '@oxfmt/binding-openharmony-arm64': 0.57.0 - '@oxfmt/binding-win32-arm64-msvc': 0.57.0 - '@oxfmt/binding-win32-ia32-msvc': 0.57.0 - '@oxfmt/binding-win32-x64-msvc': 0.57.0 - vite-plus: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) - - oxfmt@0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): + '@oxfmt/binding-android-arm-eabi': 0.64.0 + '@oxfmt/binding-android-arm64': 0.64.0 + '@oxfmt/binding-darwin-arm64': 0.64.0 + '@oxfmt/binding-darwin-x64': 0.64.0 + '@oxfmt/binding-freebsd-x64': 0.64.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.64.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.64.0 + '@oxfmt/binding-linux-arm64-gnu': 0.64.0 + '@oxfmt/binding-linux-arm64-musl': 0.64.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-musl': 0.64.0 + '@oxfmt/binding-linux-s390x-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-musl': 0.64.0 + '@oxfmt/binding-openharmony-arm64': 0.64.0 + '@oxfmt/binding-win32-arm64-msvc': 0.64.0 + '@oxfmt/binding-win32-ia32-msvc': 0.64.0 + '@oxfmt/binding-win32-x64-msvc': 0.64.0 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) + + oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): dependencies: tinypool: 2.1.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.57.0 - '@oxfmt/binding-android-arm64': 0.57.0 - '@oxfmt/binding-darwin-arm64': 0.57.0 - '@oxfmt/binding-darwin-x64': 0.57.0 - '@oxfmt/binding-freebsd-x64': 0.57.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.57.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.57.0 - '@oxfmt/binding-linux-arm64-gnu': 0.57.0 - '@oxfmt/binding-linux-arm64-musl': 0.57.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.57.0 - '@oxfmt/binding-linux-riscv64-musl': 0.57.0 - '@oxfmt/binding-linux-s390x-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-gnu': 0.57.0 - '@oxfmt/binding-linux-x64-musl': 0.57.0 - '@oxfmt/binding-openharmony-arm64': 0.57.0 - '@oxfmt/binding-win32-arm64-msvc': 0.57.0 - '@oxfmt/binding-win32-ia32-msvc': 0.57.0 - '@oxfmt/binding-win32-x64-msvc': 0.57.0 - vite-plus: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) - - oxlint-tsgolint@0.24.0: - optionalDependencies: - '@oxlint-tsgolint/darwin-arm64': 0.24.0 - '@oxlint-tsgolint/darwin-x64': 0.24.0 - '@oxlint-tsgolint/linux-arm64': 0.24.0 - '@oxlint-tsgolint/linux-x64': 0.24.0 - '@oxlint-tsgolint/win32-arm64': 0.24.0 - '@oxlint-tsgolint/win32-x64': 0.24.0 - - oxlint@1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): + '@oxfmt/binding-android-arm-eabi': 0.64.0 + '@oxfmt/binding-android-arm64': 0.64.0 + '@oxfmt/binding-darwin-arm64': 0.64.0 + '@oxfmt/binding-darwin-x64': 0.64.0 + '@oxfmt/binding-freebsd-x64': 0.64.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.64.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.64.0 + '@oxfmt/binding-linux-arm64-gnu': 0.64.0 + '@oxfmt/binding-linux-arm64-musl': 0.64.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-musl': 0.64.0 + '@oxfmt/binding-linux-s390x-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-musl': 0.64.0 + '@oxfmt/binding-openharmony-arm64': 0.64.0 + '@oxfmt/binding-win32-arm64-msvc': 0.64.0 + '@oxfmt/binding-win32-ia32-msvc': 0.64.0 + '@oxfmt/binding-win32-x64-msvc': 0.64.0 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + + oxlint-tsgolint@7.0.2001: optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.72.0 - '@oxlint/binding-android-arm64': 1.72.0 - '@oxlint/binding-darwin-arm64': 1.72.0 - '@oxlint/binding-darwin-x64': 1.72.0 - '@oxlint/binding-freebsd-x64': 1.72.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.72.0 - '@oxlint/binding-linux-arm-musleabihf': 1.72.0 - '@oxlint/binding-linux-arm64-gnu': 1.72.0 - '@oxlint/binding-linux-arm64-musl': 1.72.0 - '@oxlint/binding-linux-ppc64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-musl': 1.72.0 - '@oxlint/binding-linux-s390x-gnu': 1.72.0 - '@oxlint/binding-linux-x64-gnu': 1.72.0 - '@oxlint/binding-linux-x64-musl': 1.72.0 - '@oxlint/binding-openharmony-arm64': 1.72.0 - '@oxlint/binding-win32-arm64-msvc': 1.72.0 - '@oxlint/binding-win32-ia32-msvc': 1.72.0 - '@oxlint/binding-win32-x64-msvc': 1.72.0 - oxlint-tsgolint: 0.24.0 - vite-plus: 0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) - - oxlint@1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)): + '@oxlint-tsgolint/darwin-arm64': 7.0.2001 + '@oxlint-tsgolint/darwin-x64': 7.0.2001 + '@oxlint-tsgolint/linux-arm64': 7.0.2001 + '@oxlint-tsgolint/linux-x64': 7.0.2001 + '@oxlint-tsgolint/win32-arm64': 7.0.2001 + '@oxlint-tsgolint/win32-x64': 7.0.2001 + + oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.72.0 - '@oxlint/binding-android-arm64': 1.72.0 - '@oxlint/binding-darwin-arm64': 1.72.0 - '@oxlint/binding-darwin-x64': 1.72.0 - '@oxlint/binding-freebsd-x64': 1.72.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.72.0 - '@oxlint/binding-linux-arm-musleabihf': 1.72.0 - '@oxlint/binding-linux-arm64-gnu': 1.72.0 - '@oxlint/binding-linux-arm64-musl': 1.72.0 - '@oxlint/binding-linux-ppc64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-musl': 1.72.0 - '@oxlint/binding-linux-s390x-gnu': 1.72.0 - '@oxlint/binding-linux-x64-gnu': 1.72.0 - '@oxlint/binding-linux-x64-musl': 1.72.0 - '@oxlint/binding-openharmony-arm64': 1.72.0 - '@oxlint/binding-win32-arm64-msvc': 1.72.0 - '@oxlint/binding-win32-ia32-msvc': 1.72.0 - '@oxlint/binding-win32-x64-msvc': 1.72.0 - oxlint-tsgolint: 0.24.0 - vite-plus: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) - - oxlint@1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): + '@oxlint/binding-android-arm-eabi': 1.79.0 + '@oxlint/binding-android-arm64': 1.79.0 + '@oxlint/binding-darwin-arm64': 1.79.0 + '@oxlint/binding-darwin-x64': 1.79.0 + '@oxlint/binding-freebsd-x64': 1.79.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.79.0 + '@oxlint/binding-linux-arm-musleabihf': 1.79.0 + '@oxlint/binding-linux-arm64-gnu': 1.79.0 + '@oxlint/binding-linux-arm64-musl': 1.79.0 + '@oxlint/binding-linux-ppc64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-musl': 1.79.0 + '@oxlint/binding-linux-s390x-gnu': 1.79.0 + '@oxlint/binding-linux-x64-gnu': 1.79.0 + '@oxlint/binding-linux-x64-musl': 1.79.0 + '@oxlint/binding-openharmony-arm64': 1.79.0 + '@oxlint/binding-win32-arm64-msvc': 1.79.0 + '@oxlint/binding-win32-ia32-msvc': 1.79.0 + '@oxlint/binding-win32-x64-msvc': 1.79.0 + oxlint-tsgolint: 7.0.2001 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + + oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)): optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.72.0 - '@oxlint/binding-android-arm64': 1.72.0 - '@oxlint/binding-darwin-arm64': 1.72.0 - '@oxlint/binding-darwin-x64': 1.72.0 - '@oxlint/binding-freebsd-x64': 1.72.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.72.0 - '@oxlint/binding-linux-arm-musleabihf': 1.72.0 - '@oxlint/binding-linux-arm64-gnu': 1.72.0 - '@oxlint/binding-linux-arm64-musl': 1.72.0 - '@oxlint/binding-linux-ppc64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-gnu': 1.72.0 - '@oxlint/binding-linux-riscv64-musl': 1.72.0 - '@oxlint/binding-linux-s390x-gnu': 1.72.0 - '@oxlint/binding-linux-x64-gnu': 1.72.0 - '@oxlint/binding-linux-x64-musl': 1.72.0 - '@oxlint/binding-openharmony-arm64': 1.72.0 - '@oxlint/binding-win32-arm64-msvc': 1.72.0 - '@oxlint/binding-win32-ia32-msvc': 1.72.0 - '@oxlint/binding-win32-x64-msvc': 1.72.0 - oxlint-tsgolint: 0.24.0 - vite-plus: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) - - oxlint@1.80.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): + '@oxlint/binding-android-arm-eabi': 1.79.0 + '@oxlint/binding-android-arm64': 1.79.0 + '@oxlint/binding-darwin-arm64': 1.79.0 + '@oxlint/binding-darwin-x64': 1.79.0 + '@oxlint/binding-freebsd-x64': 1.79.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.79.0 + '@oxlint/binding-linux-arm-musleabihf': 1.79.0 + '@oxlint/binding-linux-arm64-gnu': 1.79.0 + '@oxlint/binding-linux-arm64-musl': 1.79.0 + '@oxlint/binding-linux-ppc64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-musl': 1.79.0 + '@oxlint/binding-linux-s390x-gnu': 1.79.0 + '@oxlint/binding-linux-x64-gnu': 1.79.0 + '@oxlint/binding-linux-x64-musl': 1.79.0 + '@oxlint/binding-openharmony-arm64': 1.79.0 + '@oxlint/binding-win32-arm64-msvc': 1.79.0 + '@oxlint/binding-win32-ia32-msvc': 1.79.0 + '@oxlint/binding-win32-x64-msvc': 1.79.0 + oxlint-tsgolint: 7.0.2001 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0) + + oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)): optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.80.0 - '@oxlint/binding-android-arm64': 1.80.0 - '@oxlint/binding-darwin-arm64': 1.80.0 - '@oxlint/binding-darwin-x64': 1.80.0 - '@oxlint/binding-freebsd-x64': 1.80.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.80.0 - '@oxlint/binding-linux-arm-musleabihf': 1.80.0 - '@oxlint/binding-linux-arm64-gnu': 1.80.0 - '@oxlint/binding-linux-arm64-musl': 1.80.0 - '@oxlint/binding-linux-ppc64-gnu': 1.80.0 - '@oxlint/binding-linux-riscv64-gnu': 1.80.0 - '@oxlint/binding-linux-riscv64-musl': 1.80.0 - '@oxlint/binding-linux-s390x-gnu': 1.80.0 - '@oxlint/binding-linux-x64-gnu': 1.80.0 - '@oxlint/binding-linux-x64-musl': 1.80.0 - '@oxlint/binding-openharmony-arm64': 1.80.0 - '@oxlint/binding-win32-arm64-msvc': 1.80.0 - '@oxlint/binding-win32-ia32-msvc': 1.80.0 - '@oxlint/binding-win32-x64-msvc': 1.80.0 - oxlint-tsgolint: 0.24.0 - vite-plus: 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) + '@oxlint/binding-android-arm-eabi': 1.79.0 + '@oxlint/binding-android-arm64': 1.79.0 + '@oxlint/binding-darwin-arm64': 1.79.0 + '@oxlint/binding-darwin-x64': 1.79.0 + '@oxlint/binding-freebsd-x64': 1.79.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.79.0 + '@oxlint/binding-linux-arm-musleabihf': 1.79.0 + '@oxlint/binding-linux-arm64-gnu': 1.79.0 + '@oxlint/binding-linux-arm64-musl': 1.79.0 + '@oxlint/binding-linux-ppc64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-musl': 1.79.0 + '@oxlint/binding-linux-s390x-gnu': 1.79.0 + '@oxlint/binding-linux-x64-gnu': 1.79.0 + '@oxlint/binding-linux-x64-musl': 1.79.0 + '@oxlint/binding-openharmony-arm64': 1.79.0 + '@oxlint/binding-win32-arm64-msvc': 1.79.0 + '@oxlint/binding-win32-ia32-msvc': 1.79.0 + '@oxlint/binding-win32-x64-msvc': 1.79.0 + oxlint-tsgolint: 7.0.2001 + vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0) p-cancelable@2.1.1: {} @@ -11930,8 +11950,6 @@ snapshots: tinypool@2.1.0: {} - tinyrainbow@3.1.0: {} - tinyrainbow@3.1.1: {} tldts-core@7.4.8: {} @@ -12077,7 +12095,7 @@ snapshots: unpipe@1.0.0: {} - unplugin@3.3.0(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2): + unplugin@3.3.0(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.1.2): dependencies: '@jridgewell/remapping': 2.3.5 picomatch: 4.0.7 @@ -12085,7 +12103,7 @@ snapshots: optionalDependencies: esbuild: 0.28.2 rolldown: 1.1.2 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' unstorage@1.17.5(ioredis@5.11.1): dependencies: @@ -12138,35 +12156,35 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite-plus@0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0): - dependencies: - '@oxc-project/types': 0.138.0 - '@oxlint/plugins': 1.68.0 - '@vitest/browser': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - '@vitest/browser-preview': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - '@vitest/expect': 4.1.10 - '@vitest/mocker': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) - '@vitest/pretty-format': 4.1.10 - '@vitest/runner': 4.1.10 - '@vitest/snapshot': 4.1.10 - '@vitest/spy': 4.1.10 - '@vitest/utils': 4.1.10 - '@voidzero-dev/vite-plus-core': 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0) - oxfmt: 0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) - oxlint: 1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) - oxlint-tsgolint: 0.24.0 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0): + dependencies: + '@oxc-project/types': 0.146.0 + '@oxlint/plugins': 1.79.0 + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + '@vitest/expect': 4.1.11 + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/pretty-format': 4.1.11 + '@vitest/runner': 4.1.11 + '@vitest/snapshot': 4.1.11 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0) + oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) + oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) + oxlint-tsgolint: 7.0.2001 + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) optionalDependencies: - '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) - '@voidzero-dev/vite-plus-darwin-arm64': 0.2.4 - '@voidzero-dev/vite-plus-darwin-x64': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-musl': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-musl': 0.2.4 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.2.4 - '@voidzero-dev/vite-plus-win32-x64-msvc': 0.2.4 + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) + '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0 + '@voidzero-dev/vite-plus-darwin-x64': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0 transitivePeerDependencies: - '@arethetypeswrong/core' - '@edge-runtime/vm' @@ -12197,34 +12215,35 @@ snapshots: - utf-8-validate - yaml - vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0): - dependencies: - '@oxc-project/types': 0.138.0 - '@oxlint/plugins': 1.68.0 - '@vitest/browser': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) - '@vitest/browser-preview': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) - '@vitest/expect': 4.1.10 - '@vitest/mocker': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) - '@vitest/pretty-format': 4.1.10 - '@vitest/runner': 4.1.10 - '@vitest/snapshot': 4.1.10 - '@vitest/spy': 4.1.10 - '@vitest/utils': 4.1.10 - '@voidzero-dev/vite-plus-core': 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0) - oxfmt: 0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)) - oxlint: 1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)) - oxlint-tsgolint: 0.24.0 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0): + dependencies: + '@oxc-project/types': 0.146.0 + '@oxlint/plugins': 1.79.0 + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + '@vitest/expect': 4.1.11 + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + '@vitest/pretty-format': 4.1.11 + '@vitest/runner': 4.1.11 + '@vitest/snapshot': 4.1.11 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0) + oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)) + oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)) + oxlint-tsgolint: 7.0.2001 + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) optionalDependencies: - '@voidzero-dev/vite-plus-darwin-arm64': 0.2.4 - '@voidzero-dev/vite-plus-darwin-x64': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-musl': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-musl': 0.2.4 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.2.4 - '@voidzero-dev/vite-plus-win32-x64-msvc': 0.2.4 + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11) + '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0 + '@voidzero-dev/vite-plus-darwin-x64': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0 transitivePeerDependencies: - '@arethetypeswrong/core' - '@edge-runtime/vm' @@ -12255,34 +12274,35 @@ snapshots: - utf-8-validate - yaml - vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0): - dependencies: - '@oxc-project/types': 0.138.0 - '@oxlint/plugins': 1.68.0 - '@vitest/browser': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - '@vitest/browser-preview': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) - '@vitest/expect': 4.1.10 - '@vitest/mocker': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) - '@vitest/pretty-format': 4.1.10 - '@vitest/runner': 4.1.10 - '@vitest/snapshot': 4.1.10 - '@vitest/spy': 4.1.10 - '@vitest/utils': 4.1.10 - '@voidzero-dev/vite-plus-core': 0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0) - oxfmt: 0.57.0(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) - oxlint: 1.72.0(oxlint-tsgolint@0.24.0)(vite-plus@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) - oxlint-tsgolint: 0.24.0 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0): + dependencies: + '@oxc-project/types': 0.146.0 + '@oxlint/plugins': 1.79.0 + '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + '@vitest/expect': 4.1.11 + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/pretty-format': 4.1.11 + '@vitest/runner': 4.1.11 + '@vitest/snapshot': 4.1.11 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0) + oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) + oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)) + oxlint-tsgolint: 7.0.2001 + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) optionalDependencies: - '@voidzero-dev/vite-plus-darwin-arm64': 0.2.4 - '@voidzero-dev/vite-plus-darwin-x64': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-arm64-musl': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-gnu': 0.2.4 - '@voidzero-dev/vite-plus-linux-x64-musl': 0.2.4 - '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.2.4 - '@voidzero-dev/vite-plus-win32-x64-msvc': 0.2.4 + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) + '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0 + '@voidzero-dev/vite-plus-darwin-x64': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0 + '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0 + '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0 + '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0 transitivePeerDependencies: - '@arethetypeswrong/core' - '@edge-runtime/vm' @@ -12313,23 +12333,52 @@ snapshots: - utf-8-validate - yaml - vitefu@1.1.3(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)): + vitefu@1.1.3(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)): optionalDependencies: - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' vitest-browser-react@2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11): dependencies: react: 19.2.8 react-dom: 19.2.8(react@19.2.8) - vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) optionalDependencies: '@types/react': 19.2.18 '@types/react-dom': 19.2.5(@types/react@19.2.18) - vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11))(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)): + vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)): + dependencies: + '@vitest/expect': 4.1.11 + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/pretty-format': 4.1.11 + '@vitest/runner': 4.1.11 + '@vitest/snapshot': 4.1.11 + '@vitest/spy': 4.1.11 + '@vitest/utils': 4.1.11 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.4 + pathe: 2.0.3 + picomatch: 4.0.7 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.3.0 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.1 + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 24.13.3 + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) + transitivePeerDependencies: + - msw + + vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)): dependencies: '@vitest/expect': 4.1.11 - '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) '@vitest/pretty-format': 4.1.11 '@vitest/runner': 4.1.11 '@vitest/snapshot': 4.1.11 @@ -12346,19 +12395,19 @@ snapshots: tinyexec: 1.3.0 tinyglobby: 0.2.17 tinyrainbow: 3.1.1 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.13.3 - '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) - '@vitest/browser-preview': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) transitivePeerDependencies: - msw - vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-preview@4.1.10)(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)): + vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)): dependencies: '@vitest/expect': 4.1.11 - '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)) + '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)) '@vitest/pretty-format': 4.1.11 '@vitest/runner': 4.1.11 '@vitest/snapshot': 4.1.11 @@ -12375,11 +12424,12 @@ snapshots: tinyexec: 1.3.0 tinyglobby: 0.2.17 tinyrainbow: 3.1.1 - vite: '@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)' + vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)' why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 24.13.3 - '@vitest/browser-preview': 4.1.10(@voidzero-dev/vite-plus-core@0.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11) + '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11) + '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11) transitivePeerDependencies: - msw @@ -12641,6 +12691,38 @@ snapshots: cookie: 1.1.1 youch-core: 0.3.3 + yuku-codegen@0.5.48: + dependencies: + '@yuku-toolchain/types': 0.5.43 + optionalDependencies: + '@yuku-codegen/binding-darwin-arm64': 0.5.48 + '@yuku-codegen/binding-darwin-x64': 0.5.48 + '@yuku-codegen/binding-freebsd-x64': 0.5.48 + '@yuku-codegen/binding-linux-arm-gnu': 0.5.48 + '@yuku-codegen/binding-linux-arm-musl': 0.5.48 + '@yuku-codegen/binding-linux-arm64-gnu': 0.5.48 + '@yuku-codegen/binding-linux-arm64-musl': 0.5.48 + '@yuku-codegen/binding-linux-x64-gnu': 0.5.48 + '@yuku-codegen/binding-linux-x64-musl': 0.5.48 + '@yuku-codegen/binding-win32-arm64': 0.5.48 + '@yuku-codegen/binding-win32-x64': 0.5.48 + + yuku-parser@0.5.48: + dependencies: + '@yuku-toolchain/types': 0.5.43 + optionalDependencies: + '@yuku-parser/binding-darwin-arm64': 0.5.48 + '@yuku-parser/binding-darwin-x64': 0.5.48 + '@yuku-parser/binding-freebsd-x64': 0.5.48 + '@yuku-parser/binding-linux-arm-gnu': 0.5.48 + '@yuku-parser/binding-linux-arm-musl': 0.5.48 + '@yuku-parser/binding-linux-arm64-gnu': 0.5.48 + '@yuku-parser/binding-linux-arm64-musl': 0.5.48 + '@yuku-parser/binding-linux-x64-gnu': 0.5.48 + '@yuku-parser/binding-linux-x64-musl': 0.5.48 + '@yuku-parser/binding-win32-arm64': 0.5.48 + '@yuku-parser/binding-win32-x64': 0.5.48 + zod-to-json-schema@3.25.2(zod@4.4.3): dependencies: zod: 4.4.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5100d708..9a3a187e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -23,8 +23,8 @@ catalog: "@vitest/browser-playwright": 4.1.11 effect: 4.0.0-beta.98 typescript: ^7.0.2 - vite: npm:@voidzero-dev/vite-plus-core@0.2.4 - vite-plus: 0.2.4 + vite: npm:@voidzero-dev/vite-plus-core@0.3.0 + vite-plus: 0.3.0 vitest: 4.1.11 yaml: ^2.9.0 From 1ddb13c8f9a1dbe72db25143a8e7930d47f42761 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:44:23 -0400 Subject: [PATCH 6/8] chore(deps): upgrade effect family to 4.0.0-beta.107 Renames Schema.TaggedErrorClass to Schema.TaggedError and Schema.UnknownFromJsonString to Schema.fromJsonString(Schema.Unknown); SchemaIssue.InvalidValue no longer takes the actual value, and Schema failure messages drop the "got " suffix (two test expectations updated to match). OtlpTracer/OtlpMetrics exporters now require OtlpExporter.Flusher, provided next to the JSON codec in the web, desktop and server observability layers. McpServer.layerHttp needs an explicit protocol list (2025-06-18). The platform-node, platform-node-shared and platform-bun patches are upstream in beta.107 and are dropped. The effect core patch (PubSub interrupted-poller hole, RpcClient RequestHooks) is regenerated against beta.107. @effect/tsgo stays at 0.13.2; 0.38 brings a much stricter rule set and is a separate change. --- apps/desktop/src/app/DesktopObservability.ts | 4 +- apps/desktop/src/preview/PreviewAutomation.ts | 4 +- apps/desktop/src/preview/PreviewSession.ts | 2 +- apps/desktop/src/relay/DesktopRelay.ts | 2 +- .../OrchestrationEngineHarness.integration.ts | 11 +- .../orchestrationEngine.integration.test.ts | 2 +- apps/server/src/checkpointing/Errors.ts | 4 +- apps/server/src/cli/config.ts | 2 +- .../src/diagnostics/ProcessDiagnostics.ts | 2 +- apps/server/src/keybindings.ts | 5 +- apps/server/src/mcp/McpHttpServer.ts | 3 +- .../src/observability/Layers/Observability.ts | 13 +- apps/server/src/orchestration/Errors.ts | 12 +- apps/server/src/persistence/Errors.ts | 8 +- .../src/provider/Drivers/CodexHomeLayout.ts | 2 +- apps/server/src/provider/Errors.ts | 22 +- .../src/provider/Layers/ClaudeAdapter.ts | 4 +- .../provider/Layers/CodexSessionRuntime.ts | 8 +- .../src/provider/Layers/CursorAdapter.ts | 2 +- apps/server/src/provider/opencodeRuntime.ts | 2 +- .../src/sourceControl/AzureDevOpsCli.ts | 2 +- apps/server/src/sourceControl/BitbucketApi.ts | 2 +- apps/server/src/sourceControl/GitHubCli.ts | 2 +- apps/server/src/sourceControl/GitLabCli.ts | 2 +- apps/server/src/telemetry/Identify.ts | 2 +- apps/server/src/terminal/Layers/Manager.ts | 4 +- apps/server/src/terminal/Services/PTY.ts | 2 +- .../textGeneration/ClaudeTextGeneration.ts | 2 +- .../src/textGeneration/CodexTextGeneration.ts | 2 +- .../workspace/Services/WorkspaceEntries.ts | 4 +- .../workspace/Services/WorkspaceFileSystem.ts | 2 +- .../src/workspace/Services/WorkspacePaths.ts | 8 +- apps/web/src/observability/clientTracing.ts | 3 +- oxlint-plugin-threadlines/test/utils.ts | 2 +- packages/contracts/src/editor.ts | 2 +- packages/contracts/src/filesystem.ts | 2 +- packages/contracts/src/git.ts | 10 +- packages/contracts/src/keybindings.ts | 2 +- packages/contracts/src/orchestration.ts | 21 +- packages/contracts/src/previewAutomation.ts | 12 +- packages/contracts/src/project.ts | 10 +- packages/contracts/src/provider.ts | 8 +- packages/contracts/src/providerAuth.ts | 2 +- packages/contracts/src/providerExtensions.ts | 2 +- packages/contracts/src/server.ts | 4 +- packages/contracts/src/settings.ts | 2 +- packages/contracts/src/sourceControl.ts | 6 +- packages/contracts/src/terminal.ts | 19 +- packages/contracts/src/usage.ts | 2 +- packages/contracts/src/vcs.ts | 12 +- packages/effect-acp/src/client.test.ts | 2 +- packages/effect-acp/src/errors.ts | 10 +- .../scripts/generate.ts | 2 +- .../effect-codex-app-server/src/errors.ts | 10 +- .../src/protocol.test.ts | 4 +- .../effect-codex-app-server/src/protocol.ts | 4 +- packages/shared/src/schemaJson.ts | 2 +- packages/shared/src/schemaYaml.ts | 7 +- .../@effect__platform-bun@4.0.0-beta.98.patch | 67 --- ...__platform-node-shared@4.0.0-beta.98.patch | 94 ---- ...@effect__platform-node@4.0.0-beta.98.patch | 69 --- ...a.98.patch => effect@4.0.0-beta.107.patch} | 48 +- pnpm-lock.yaml | 521 ++++++------------ pnpm-workspace.yaml | 21 +- scripts/build-desktop-artifact.ts | 2 +- .../update-release-package-versions.test.ts | 2 +- 66 files changed, 364 insertions(+), 770 deletions(-) delete mode 100644 patches/@effect__platform-bun@4.0.0-beta.98.patch delete mode 100644 patches/@effect__platform-node-shared@4.0.0-beta.98.patch delete mode 100644 patches/@effect__platform-node@4.0.0-beta.98.patch rename patches/{effect@4.0.0-beta.98.patch => effect@4.0.0-beta.107.patch} (88%) diff --git a/apps/desktop/src/app/DesktopObservability.ts b/apps/desktop/src/app/DesktopObservability.ts index de850e05..8336254f 100644 --- a/apps/desktop/src/app/DesktopObservability.ts +++ b/apps/desktop/src/app/DesktopObservability.ts @@ -15,7 +15,7 @@ import * as Ref from "effect/Ref"; import * as Schema from "effect/Schema"; import * as Semaphore from "effect/Semaphore"; import * as Tracer from "effect/Tracer"; -import { OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; +import { OtlpExporter, OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; import * as DesktopDataMigration from "./DesktopDataMigration.ts"; import * as DesktopEnvironment from "./DesktopEnvironment.ts"; @@ -415,7 +415,7 @@ const tracerLayer = Layer.unwrap( return Layer.succeed(Tracer.Tracer, tracer); }), -).pipe(Layer.provideMerge(OtlpSerialization.layerJson)); +).pipe(Layer.provideMerge(Layer.mergeAll(OtlpSerialization.layerJson, OtlpExporter.layerFlusher))); export const layer = Layer.mergeAll( backendOutputLogLayer, diff --git a/apps/desktop/src/preview/PreviewAutomation.ts b/apps/desktop/src/preview/PreviewAutomation.ts index 4110c8a5..9dc6c713 100644 --- a/apps/desktop/src/preview/PreviewAutomation.ts +++ b/apps/desktop/src/preview/PreviewAutomation.ts @@ -73,7 +73,7 @@ const DRAG_MOVE_STEPS = 10; const MAX_NETWORK_FAILURES = 100; -export class PreviewTargetMissingError extends Schema.TaggedErrorClass()( +export class PreviewTargetMissingError extends Schema.TaggedError()( "PreviewTargetMissingError", { webContentsId: Schema.Number }, ) { @@ -82,7 +82,7 @@ export class PreviewTargetMissingError extends Schema.TaggedErrorClass()( +export class PreviewCommandError extends Schema.TaggedError()( "PreviewCommandError", { webContentsId: Schema.Number, method: Schema.String, cause: Schema.Defect() }, ) { diff --git a/apps/desktop/src/preview/PreviewSession.ts b/apps/desktop/src/preview/PreviewSession.ts index ee9bd5a4..7f3a39c0 100644 --- a/apps/desktop/src/preview/PreviewSession.ts +++ b/apps/desktop/src/preview/PreviewSession.ts @@ -34,7 +34,7 @@ const ALLOWED_PREVIEW_PERMISSIONS: ReadonlySet = new Set([ "notifications", ]); -export class PreviewSessionCreationError extends Schema.TaggedErrorClass()( +export class PreviewSessionCreationError extends Schema.TaggedError()( "PreviewSessionCreationError", { partition: Schema.String, cause: Schema.Defect() }, ) { diff --git a/apps/desktop/src/relay/DesktopRelay.ts b/apps/desktop/src/relay/DesktopRelay.ts index 0f00112e..714b57f2 100644 --- a/apps/desktop/src/relay/DesktopRelay.ts +++ b/apps/desktop/src/relay/DesktopRelay.ts @@ -80,7 +80,7 @@ const decodeRelayCreateSessionResult = Schema.decodeUnknownEffect(RelayCreateSes const decodeRelayRenewSessionResult = Schema.decodeUnknownEffect(RelayRenewSessionResult); const decodeAuthBearerBootstrapResult = Schema.decodeUnknownEffect(AuthBearerBootstrapResult); const decodeAuthWebSocketTokenResult = Schema.decodeUnknownEffect(AuthWebSocketTokenResult); -const decodeUnknownJsonString = Schema.decodeUnknownEffect(Schema.UnknownFromJsonString); +const decodeUnknownJsonString = Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Unknown)); const encodeBootstrapBearerRequestBody = Schema.encodeEffect( Schema.fromJsonString(BootstrapBearerRequestBody), ); diff --git a/apps/server/integration/OrchestrationEngineHarness.integration.ts b/apps/server/integration/OrchestrationEngineHarness.integration.ts index 64f4735a..51001b90 100644 --- a/apps/server/integration/OrchestrationEngineHarness.integration.ts +++ b/apps/server/integration/OrchestrationEngineHarness.integration.ts @@ -116,12 +116,9 @@ export function gitShowFileAtRef(cwd: string, ref: string, filePath: string): st return runGit(cwd, ["show", `${ref}:${filePath}`]); } -class WaitForTimeoutError extends Schema.TaggedErrorClass()( - "WaitForTimeoutError", - { - description: Schema.String, - }, -) {} +class WaitForTimeoutError extends Schema.TaggedError()("WaitForTimeoutError", { + description: Schema.String, +}) {} function waitFor( read: Effect.Effect, @@ -160,7 +157,7 @@ function waitFor( ); } -class OrchestrationHarnessRuntimeError extends Schema.TaggedErrorClass()( +class OrchestrationHarnessRuntimeError extends Schema.TaggedError()( "OrchestrationHarnessRuntimeError", { operation: Schema.String, diff --git a/apps/server/integration/orchestrationEngine.integration.test.ts b/apps/server/integration/orchestrationEngine.integration.test.ts index 36ba0c7a..a6636eb0 100644 --- a/apps/server/integration/orchestrationEngine.integration.test.ts +++ b/apps/server/integration/orchestrationEngine.integration.test.ts @@ -54,7 +54,7 @@ function nowIso() { return "2026-05-01T00:00:00.000Z"; } -class IntegrationWaitTimeoutError extends Schema.TaggedErrorClass()( +class IntegrationWaitTimeoutError extends Schema.TaggedError()( "IntegrationWaitTimeoutError", { description: Schema.String, diff --git a/apps/server/src/checkpointing/Errors.ts b/apps/server/src/checkpointing/Errors.ts index 287028b2..35aa15ce 100644 --- a/apps/server/src/checkpointing/Errors.ts +++ b/apps/server/src/checkpointing/Errors.ts @@ -5,7 +5,7 @@ import type { VcsError } from "@threadlines/contracts"; /** * CheckpointUnavailableError - Expected checkpoint does not exist. */ -export class CheckpointUnavailableError extends Schema.TaggedErrorClass()( +export class CheckpointUnavailableError extends Schema.TaggedError()( "CheckpointUnavailableError", { threadId: Schema.String, @@ -22,7 +22,7 @@ export class CheckpointUnavailableError extends Schema.TaggedErrorClass()( +export class CheckpointInvariantError extends Schema.TaggedError()( "CheckpointInvariantError", { operation: Schema.String, diff --git a/apps/server/src/cli/config.ts b/apps/server/src/cli/config.ts index 269b5e4c..88e1cd1e 100644 --- a/apps/server/src/cli/config.ts +++ b/apps/server/src/cli/config.ts @@ -584,7 +584,7 @@ export const DurationFromString = Schema.String.pipe( return Effect.succeed(duration); } return Effect.fail( - new SchemaIssue.InvalidValue(Option.some(value), { + new SchemaIssue.InvalidValue({ message: "Invalid duration. Use values like 5m, 1h, 30d, or 15 minutes.", }), ); diff --git a/apps/server/src/diagnostics/ProcessDiagnostics.ts b/apps/server/src/diagnostics/ProcessDiagnostics.ts index 2234b24f..8079238a 100644 --- a/apps/server/src/diagnostics/ProcessDiagnostics.ts +++ b/apps/server/src/diagnostics/ProcessDiagnostics.ts @@ -75,7 +75,7 @@ export class ProcessSnapshot extends Context.Service()( +export class ProcessDiagnosticsError extends Schema.TaggedError()( "ProcessDiagnosticsError", { message: Schema.String, diff --git a/apps/server/src/keybindings.ts b/apps/server/src/keybindings.ts index e030c327..da431a81 100644 --- a/apps/server/src/keybindings.ts +++ b/apps/server/src/keybindings.ts @@ -29,7 +29,6 @@ import * as Exit from "effect/Exit"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import * as Layer from "effect/Layer"; -import * as Option from "effect/Option"; import * as Predicate from "effect/Predicate"; import * as PubSub from "effect/PubSub"; import * as Schema from "effect/Schema"; @@ -67,7 +66,7 @@ export const ResolvedKeybindingFromConfig = KeybindingRule.pipe( Effect.filterOrFail( Predicate.isNotNull, () => - new SchemaIssue.InvalidValue(Option.some(rule), { + new SchemaIssue.InvalidValue({ message: "Invalid keybinding rule", }), ), @@ -79,7 +78,7 @@ export const ResolvedKeybindingFromConfig = KeybindingRule.pipe( const key = encodeShortcut(resolved.shortcut); if (!key) { return yield* Effect.fail( - new SchemaIssue.InvalidValue(Option.some(resolved), { + new SchemaIssue.InvalidValue({ message: "Resolved shortcut cannot be encoded to key string", }), ); diff --git a/apps/server/src/mcp/McpHttpServer.ts b/apps/server/src/mcp/McpHttpServer.ts index a5871a44..9126d66d 100644 --- a/apps/server/src/mcp/McpHttpServer.ts +++ b/apps/server/src/mcp/McpHttpServer.ts @@ -19,7 +19,7 @@ import * as Sink from "effect/Sink"; import * as Stream from "effect/Stream"; import * as Layer from "effect/Layer"; import type * as Types from "effect/Types"; -import { McpSchema, McpServer, Tool } from "effect/unstable/ai"; +import { McpSchema, McpProtocol, McpServer, Tool } from "effect/unstable/ai"; import { HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http"; import { @@ -272,6 +272,7 @@ export const layer = McpServer.toolkit(BrowserStandardToolkit).pipe( name: "threadlines-browser", version: "1", path: MCP_ROUTE_PATH, + protocols: [McpProtocol.v2025_06_18], }).pipe(Layer.provide(AuthenticationLive)), ), Layer.provideMerge(noServerStreamRoute), diff --git a/apps/server/src/observability/Layers/Observability.ts b/apps/server/src/observability/Layers/Observability.ts index 357ac2eb..61f2dcc5 100644 --- a/apps/server/src/observability/Layers/Observability.ts +++ b/apps/server/src/observability/Layers/Observability.ts @@ -7,13 +7,22 @@ import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as References from "effect/References"; import * as Tracer from "effect/Tracer"; -import { OtlpMetrics, OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; +import { + OtlpExporter, + OtlpMetrics, + OtlpSerialization, + OtlpTracer, +} from "effect/unstable/observability"; import { ServerConfig } from "../../config.ts"; import { ServerLoggerLive } from "../../serverLogger.ts"; import { BrowserTraceCollector } from "../Services/BrowserTraceCollector.ts"; -const otlpSerializationLayer = OtlpSerialization.layerJson; +// Exporters need the JSON codec plus the shared flush registry (one per layer build). +const otlpSerializationLayer = Layer.mergeAll( + OtlpSerialization.layerJson, + OtlpExporter.layerFlusher, +); const SLOW_TRACE_RECORD_THRESHOLD_MS = 1_000; const SQL_TRACE_SAMPLE_MODULO = 100; const PROJECTION_TRACE_SAMPLE_MODULO = 20; diff --git a/apps/server/src/orchestration/Errors.ts b/apps/server/src/orchestration/Errors.ts index be7943f7..de65b0df 100644 --- a/apps/server/src/orchestration/Errors.ts +++ b/apps/server/src/orchestration/Errors.ts @@ -3,7 +3,7 @@ import * as Schema from "effect/Schema"; import type { ProjectionRepositoryError } from "../persistence/Errors.ts"; -export class OrchestrationCommandJsonParseError extends Schema.TaggedErrorClass()( +export class OrchestrationCommandJsonParseError extends Schema.TaggedError()( "OrchestrationCommandJsonParseError", { detail: Schema.String, @@ -15,7 +15,7 @@ export class OrchestrationCommandJsonParseError extends Schema.TaggedErrorClass< } } -export class OrchestrationCommandDecodeError extends Schema.TaggedErrorClass()( +export class OrchestrationCommandDecodeError extends Schema.TaggedError()( "OrchestrationCommandDecodeError", { issue: Schema.String, @@ -27,7 +27,7 @@ export class OrchestrationCommandDecodeError extends Schema.TaggedErrorClass()( +export class OrchestrationCommandInvariantError extends Schema.TaggedError()( "OrchestrationCommandInvariantError", { commandType: Schema.String, @@ -40,7 +40,7 @@ export class OrchestrationCommandInvariantError extends Schema.TaggedErrorClass< } } -export class OrchestrationCommandPreviouslyRejectedError extends Schema.TaggedErrorClass()( +export class OrchestrationCommandPreviouslyRejectedError extends Schema.TaggedError()( "OrchestrationCommandPreviouslyRejectedError", { commandId: Schema.String, @@ -53,7 +53,7 @@ export class OrchestrationCommandPreviouslyRejectedError extends Schema.TaggedEr } } -export class OrchestrationProjectorDecodeError extends Schema.TaggedErrorClass()( +export class OrchestrationProjectorDecodeError extends Schema.TaggedError()( "OrchestrationProjectorDecodeError", { eventType: Schema.String, @@ -66,7 +66,7 @@ export class OrchestrationProjectorDecodeError extends Schema.TaggedErrorClass()( +export class OrchestrationListenerCallbackError extends Schema.TaggedError()( "OrchestrationListenerCallbackError", { listener: Schema.Literals(["read-model", "domain-event"]), diff --git a/apps/server/src/persistence/Errors.ts b/apps/server/src/persistence/Errors.ts index 2a3d7aff..d220ac60 100644 --- a/apps/server/src/persistence/Errors.ts +++ b/apps/server/src/persistence/Errors.ts @@ -5,7 +5,7 @@ import * as SchemaIssue from "effect/SchemaIssue"; // Core Persistence Errors // =============================== -export class PersistenceSqlError extends Schema.TaggedErrorClass()( +export class PersistenceSqlError extends Schema.TaggedError()( "PersistenceSqlError", { operation: Schema.String, @@ -18,7 +18,7 @@ export class PersistenceSqlError extends Schema.TaggedErrorClass()( +export class PersistenceDecodeError extends Schema.TaggedError()( "PersistenceDecodeError", { operation: Schema.String, @@ -67,7 +67,7 @@ export const isPersistenceError = (u: unknown) => // Provider Session Repository Errors // =============================== -export class ProviderSessionRepositoryValidationError extends Schema.TaggedErrorClass()( +export class ProviderSessionRepositoryValidationError extends Schema.TaggedError()( "ProviderSessionRepositoryValidationError", { operation: Schema.String, @@ -80,7 +80,7 @@ export class ProviderSessionRepositoryValidationError extends Schema.TaggedError } } -export class ProviderSessionRepositoryPersistenceError extends Schema.TaggedErrorClass()( +export class ProviderSessionRepositoryPersistenceError extends Schema.TaggedError()( "ProviderSessionRepositoryPersistenceError", { operation: Schema.String, diff --git a/apps/server/src/provider/Drivers/CodexHomeLayout.ts b/apps/server/src/provider/Drivers/CodexHomeLayout.ts index f33f9409..1fec721e 100644 --- a/apps/server/src/provider/Drivers/CodexHomeLayout.ts +++ b/apps/server/src/provider/Drivers/CodexHomeLayout.ts @@ -64,7 +64,7 @@ export const resolveCodexHomeLayout = Effect.fn("resolveCodexHomeLayout")(functi }; }); -export class CodexShadowHomeError extends Schema.TaggedErrorClass()( +export class CodexShadowHomeError extends Schema.TaggedError()( "CodexShadowHomeError", { detail: Schema.String, diff --git a/apps/server/src/provider/Errors.ts b/apps/server/src/provider/Errors.ts index 0cf15223..73438aff 100644 --- a/apps/server/src/provider/Errors.ts +++ b/apps/server/src/provider/Errors.ts @@ -5,7 +5,7 @@ import type { CheckpointServiceError } from "../checkpointing/Errors.ts"; /** * ProviderAdapterValidationError - Invalid adapter API input. */ -export class ProviderAdapterValidationError extends Schema.TaggedErrorClass()( +export class ProviderAdapterValidationError extends Schema.TaggedError()( "ProviderAdapterValidationError", { provider: Schema.String, @@ -22,7 +22,7 @@ export class ProviderAdapterValidationError extends Schema.TaggedErrorClass()( +export class ProviderAdapterSessionNotFoundError extends Schema.TaggedError()( "ProviderAdapterSessionNotFoundError", { provider: Schema.String, @@ -38,7 +38,7 @@ export class ProviderAdapterSessionNotFoundError extends Schema.TaggedErrorClass /** * ProviderAdapterSessionClosedError - Adapter session exists but is closed. */ -export class ProviderAdapterSessionClosedError extends Schema.TaggedErrorClass()( +export class ProviderAdapterSessionClosedError extends Schema.TaggedError()( "ProviderAdapterSessionClosedError", { provider: Schema.String, @@ -54,7 +54,7 @@ export class ProviderAdapterSessionClosedError extends Schema.TaggedErrorClass

()( +export class ProviderAdapterRequestError extends Schema.TaggedError()( "ProviderAdapterRequestError", { provider: Schema.String, @@ -71,7 +71,7 @@ export class ProviderAdapterRequestError extends Schema.TaggedErrorClass()( +export class ProviderAdapterProcessError extends Schema.TaggedError()( "ProviderAdapterProcessError", { provider: Schema.String, @@ -88,7 +88,7 @@ export class ProviderAdapterProcessError extends Schema.TaggedErrorClass()( +export class ProviderValidationError extends Schema.TaggedError()( "ProviderValidationError", { operation: Schema.String, @@ -104,7 +104,7 @@ export class ProviderValidationError extends Schema.TaggedErrorClass()( +export class ProviderUnsupportedError extends Schema.TaggedError()( "ProviderUnsupportedError", { provider: Schema.String, @@ -125,7 +125,7 @@ export class ProviderUnsupportedError extends Schema.TaggedErrorClass()( +export class ProviderInstanceNotFoundError extends Schema.TaggedError()( "ProviderInstanceNotFoundError", { instanceId: Schema.String, @@ -142,7 +142,7 @@ export class ProviderInstanceNotFoundError extends Schema.TaggedErrorClass()( +export class ProviderDriverError extends Schema.TaggedError()( "ProviderDriverError", { driver: Schema.String, @@ -159,7 +159,7 @@ export class ProviderDriverError extends Schema.TaggedErrorClass()( +export class ProviderSessionNotFoundError extends Schema.TaggedError()( "ProviderSessionNotFoundError", { threadId: Schema.String, @@ -174,7 +174,7 @@ export class ProviderSessionNotFoundError extends Schema.TaggedErrorClass()( +export class ProviderSessionDirectoryPersistenceError extends Schema.TaggedError()( "ProviderSessionDirectoryPersistenceError", { operation: Schema.String, diff --git a/apps/server/src/provider/Layers/ClaudeAdapter.ts b/apps/server/src/provider/Layers/ClaudeAdapter.ts index 2a873aa6..ad0e375b 100644 --- a/apps/server/src/provider/Layers/ClaudeAdapter.ts +++ b/apps/server/src/provider/Layers/ClaudeAdapter.ts @@ -135,8 +135,8 @@ import { import { type ClaudeAdapterShape } from "../Services/ClaudeAdapter.ts"; import { estimatePartialFileChangeStat } from "./claudePartialToolInput.ts"; import { type EventNdjsonLogger, makeEventNdjsonLogger } from "./EventNdjsonLogger.ts"; -const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.UnknownFromJsonString); -const decodeUnknownJsonStringExit = Schema.decodeUnknownExit(Schema.UnknownFromJsonString); +const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.fromJsonString(Schema.Unknown)); +const decodeUnknownJsonStringExit = Schema.decodeUnknownExit(Schema.fromJsonString(Schema.Unknown)); const PROVIDER = ProviderDriverKind.make("claudeAgent"); const COMPACT_CONTEXT_COMMAND = "/compact"; diff --git a/apps/server/src/provider/Layers/CodexSessionRuntime.ts b/apps/server/src/provider/Layers/CodexSessionRuntime.ts index fa7fbd41..b5b469d2 100644 --- a/apps/server/src/provider/Layers/CodexSessionRuntime.ts +++ b/apps/server/src/provider/Layers/CodexSessionRuntime.ts @@ -319,7 +319,7 @@ export type CodexSessionRuntimeError = | CodexSessionRuntimeInvalidUserInputAnswersError | CodexSessionRuntimeThreadIdMissingError; -export class CodexSessionRuntimePendingApprovalNotFoundError extends Schema.TaggedErrorClass()( +export class CodexSessionRuntimePendingApprovalNotFoundError extends Schema.TaggedError()( "CodexSessionRuntimePendingApprovalNotFoundError", { requestId: Schema.String, @@ -330,7 +330,7 @@ export class CodexSessionRuntimePendingApprovalNotFoundError extends Schema.Tagg } } -export class CodexSessionRuntimePendingUserInputNotFoundError extends Schema.TaggedErrorClass()( +export class CodexSessionRuntimePendingUserInputNotFoundError extends Schema.TaggedError()( "CodexSessionRuntimePendingUserInputNotFoundError", { requestId: Schema.String, @@ -341,7 +341,7 @@ export class CodexSessionRuntimePendingUserInputNotFoundError extends Schema.Tag } } -export class CodexSessionRuntimeInvalidUserInputAnswersError extends Schema.TaggedErrorClass()( +export class CodexSessionRuntimeInvalidUserInputAnswersError extends Schema.TaggedError()( "CodexSessionRuntimeInvalidUserInputAnswersError", { questionId: Schema.String, @@ -352,7 +352,7 @@ export class CodexSessionRuntimeInvalidUserInputAnswersError extends Schema.Tagg } } -export class CodexSessionRuntimeThreadIdMissingError extends Schema.TaggedErrorClass()( +export class CodexSessionRuntimeThreadIdMissingError extends Schema.TaggedError()( "CodexSessionRuntimeThreadIdMissingError", { threadId: Schema.String, diff --git a/apps/server/src/provider/Layers/CursorAdapter.ts b/apps/server/src/provider/Layers/CursorAdapter.ts index b733d112..48ccef38 100644 --- a/apps/server/src/provider/Layers/CursorAdapter.ts +++ b/apps/server/src/provider/Layers/CursorAdapter.ts @@ -76,7 +76,7 @@ import { import { type CursorAdapterShape } from "../Services/CursorAdapter.ts"; import { resolveCursorAcpBaseModelId } from "./CursorProvider.ts"; import { type EventNdjsonLogger, makeEventNdjsonLogger } from "./EventNdjsonLogger.ts"; -const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.UnknownFromJsonString); +const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.fromJsonString(Schema.Unknown)); const PROVIDER = ProviderDriverKind.make("cursor"); const CURSOR_RESUME_VERSION = 1 as const; diff --git a/apps/server/src/provider/opencodeRuntime.ts b/apps/server/src/provider/opencodeRuntime.ts index b3fa7cfa..3ae015ce 100644 --- a/apps/server/src/provider/opencodeRuntime.ts +++ b/apps/server/src/provider/opencodeRuntime.ts @@ -32,7 +32,7 @@ import { hideWindowsConsole } from "@threadlines/shared/childProcess"; import { isWindowsCommandNotFound } from "../processRunner.ts"; import { collectStreamAsString } from "./providerSnapshot.ts"; import * as NetService from "@threadlines/shared/Net"; -const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.UnknownFromJsonString); +const encodeUnknownJsonStringExit = Schema.encodeUnknownExit(Schema.fromJsonString(Schema.Unknown)); const OPENCODE_EMPTY_CONFIG_CONTENT = "{}"; const OPENCODE_SERVER_READY_PREFIX = "opencode server listening"; diff --git a/apps/server/src/sourceControl/AzureDevOpsCli.ts b/apps/server/src/sourceControl/AzureDevOpsCli.ts index 739fc88d..f5d6e2c3 100644 --- a/apps/server/src/sourceControl/AzureDevOpsCli.ts +++ b/apps/server/src/sourceControl/AzureDevOpsCli.ts @@ -16,7 +16,7 @@ import * as SourceControlProvider from "./SourceControlProvider.ts"; const DEFAULT_TIMEOUT_MS = 30_000; -export class AzureDevOpsCliError extends Schema.TaggedErrorClass()( +export class AzureDevOpsCliError extends Schema.TaggedError()( "AzureDevOpsCliError", { operation: Schema.String, diff --git a/apps/server/src/sourceControl/BitbucketApi.ts b/apps/server/src/sourceControl/BitbucketApi.ts index f99fb2bf..394ece34 100644 --- a/apps/server/src/sourceControl/BitbucketApi.ts +++ b/apps/server/src/sourceControl/BitbucketApi.ts @@ -60,7 +60,7 @@ const BitbucketApiEnvConfig = Config.all({ ), }); -export class BitbucketApiError extends Schema.TaggedErrorClass()( +export class BitbucketApiError extends Schema.TaggedError()( "BitbucketApiError", { operation: Schema.String, diff --git a/apps/server/src/sourceControl/GitHubCli.ts b/apps/server/src/sourceControl/GitHubCli.ts index 5ecce50b..5f174da8 100644 --- a/apps/server/src/sourceControl/GitHubCli.ts +++ b/apps/server/src/sourceControl/GitHubCli.ts @@ -17,7 +17,7 @@ import * as GitHubPullRequests from "./gitHubPullRequests.ts"; const DEFAULT_TIMEOUT_MS = 30_000; -export class GitHubCliError extends Schema.TaggedErrorClass()("GitHubCliError", { +export class GitHubCliError extends Schema.TaggedError()("GitHubCliError", { operation: Schema.String, detail: Schema.String, cause: Schema.optional(Schema.Defect()), diff --git a/apps/server/src/sourceControl/GitLabCli.ts b/apps/server/src/sourceControl/GitLabCli.ts index fafa367c..d065cf87 100644 --- a/apps/server/src/sourceControl/GitLabCli.ts +++ b/apps/server/src/sourceControl/GitLabCli.ts @@ -18,7 +18,7 @@ import type * as SourceControlProvider from "./SourceControlProvider.ts"; const DEFAULT_TIMEOUT_MS = 30_000; -export class GitLabCliError extends Schema.TaggedErrorClass()("GitLabCliError", { +export class GitLabCliError extends Schema.TaggedError()("GitLabCliError", { operation: Schema.String, detail: Schema.String, cause: Schema.optional(Schema.Defect()), diff --git a/apps/server/src/telemetry/Identify.ts b/apps/server/src/telemetry/Identify.ts index 1c63f63c..a34d0e1c 100644 --- a/apps/server/src/telemetry/Identify.ts +++ b/apps/server/src/telemetry/Identify.ts @@ -5,7 +5,7 @@ import * as Schema from "effect/Schema"; import * as Crypto from "node:crypto"; import { ServerConfig } from "../config.ts"; -class IdentifyUserError extends Schema.TaggedErrorClass()("IdentifyUserError", { +class IdentifyUserError extends Schema.TaggedError()("IdentifyUserError", { message: Schema.String, cause: Schema.optional(Schema.Defect()), }) {} diff --git a/apps/server/src/terminal/Layers/Manager.ts b/apps/server/src/terminal/Layers/Manager.ts index a8fe8ad8..7cd4cf1d 100644 --- a/apps/server/src/terminal/Layers/Manager.ts +++ b/apps/server/src/terminal/Layers/Manager.ts @@ -86,7 +86,7 @@ const POWERSHELL_PROMPT_HOOK = "} } | Out-Null"; const nowIso = Effect.map(DateTime.now, DateTime.formatIso); -class TerminalSubprocessCheckError extends Schema.TaggedErrorClass()( +class TerminalSubprocessCheckError extends Schema.TaggedError()( "TerminalSubprocessCheckError", { message: Schema.String, @@ -95,7 +95,7 @@ class TerminalSubprocessCheckError extends Schema.TaggedErrorClass()( +class TerminalProcessSignalError extends Schema.TaggedError()( "TerminalProcessSignalError", { message: Schema.String, diff --git a/apps/server/src/terminal/Services/PTY.ts b/apps/server/src/terminal/Services/PTY.ts index 33c62aa4..725990d6 100644 --- a/apps/server/src/terminal/Services/PTY.ts +++ b/apps/server/src/terminal/Services/PTY.ts @@ -13,7 +13,7 @@ import * as Context from "effect/Context"; /** * PtyError - Error type for PTY adapter operations. */ -export class PtySpawnError extends Schema.TaggedErrorClass()("PtySpawnError", { +export class PtySpawnError extends Schema.TaggedError()("PtySpawnError", { adapter: Schema.String, message: Schema.String, cause: Schema.optional(Schema.Defect()), diff --git a/apps/server/src/textGeneration/ClaudeTextGeneration.ts b/apps/server/src/textGeneration/ClaudeTextGeneration.ts index aa69cbb1..baf6872a 100644 --- a/apps/server/src/textGeneration/ClaudeTextGeneration.ts +++ b/apps/server/src/textGeneration/ClaudeTextGeneration.ts @@ -56,7 +56,7 @@ const ClaudeOutputEnvelope = Schema.Struct({ structured_output: Schema.Unknown, }); -const encodeJsonString = Schema.encodeEffect(Schema.UnknownFromJsonString); +const encodeJsonString = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown)); const decodeClaudeOutputEnvelope = Schema.decodeEffect(Schema.fromJsonString(ClaudeOutputEnvelope)); export const makeClaudeTextGeneration = Effect.fn("makeClaudeTextGeneration")(function* ( diff --git a/apps/server/src/textGeneration/CodexTextGeneration.ts b/apps/server/src/textGeneration/CodexTextGeneration.ts index 715a4fb4..763859dc 100644 --- a/apps/server/src/textGeneration/CodexTextGeneration.ts +++ b/apps/server/src/textGeneration/CodexTextGeneration.ts @@ -49,7 +49,7 @@ const CODEX_COMMIT_MESSAGE_TIMEOUT_MS = 120_000; // Codex one-shot responses have been observed to take 15-20s even for tiny // prompts (server-side floor), so the title budget needs tail headroom. const CODEX_THREAD_TITLE_TIMEOUT_MS = 90_000; -const encodeJsonString = Schema.encodeEffect(Schema.UnknownFromJsonString); +const encodeJsonString = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown)); type CodexTextGenerationOperation = | "generateCommitMessage" diff --git a/apps/server/src/workspace/Services/WorkspaceEntries.ts b/apps/server/src/workspace/Services/WorkspaceEntries.ts index 96d6c98b..48ca1a76 100644 --- a/apps/server/src/workspace/Services/WorkspaceEntries.ts +++ b/apps/server/src/workspace/Services/WorkspaceEntries.ts @@ -19,7 +19,7 @@ import type { ProjectSearchEntriesResult, } from "@threadlines/contracts"; -export class WorkspaceEntriesError extends Schema.TaggedErrorClass()( +export class WorkspaceEntriesError extends Schema.TaggedError()( "WorkspaceEntriesError", { cwd: Schema.String, @@ -29,7 +29,7 @@ export class WorkspaceEntriesError extends Schema.TaggedErrorClass()( +export class WorkspaceEntriesBrowseError extends Schema.TaggedError()( "WorkspaceEntriesBrowseError", { cwd: Schema.optional(Schema.String), diff --git a/apps/server/src/workspace/Services/WorkspaceFileSystem.ts b/apps/server/src/workspace/Services/WorkspaceFileSystem.ts index 9acbaa70..7e58622d 100644 --- a/apps/server/src/workspace/Services/WorkspaceFileSystem.ts +++ b/apps/server/src/workspace/Services/WorkspaceFileSystem.ts @@ -18,7 +18,7 @@ import type { } from "@threadlines/contracts"; import { WorkspacePathOutsideRootError } from "./WorkspacePaths.ts"; -export class WorkspaceFileSystemError extends Schema.TaggedErrorClass()( +export class WorkspaceFileSystemError extends Schema.TaggedError()( "WorkspaceFileSystemError", { cwd: Schema.String, diff --git a/apps/server/src/workspace/Services/WorkspacePaths.ts b/apps/server/src/workspace/Services/WorkspacePaths.ts index 5a9e7a0c..a6bd1c44 100644 --- a/apps/server/src/workspace/Services/WorkspacePaths.ts +++ b/apps/server/src/workspace/Services/WorkspacePaths.ts @@ -10,7 +10,7 @@ import * as Schema from "effect/Schema"; import * as Context from "effect/Context"; import type * as Effect from "effect/Effect"; -export class WorkspaceRootNotExistsError extends Schema.TaggedErrorClass()( +export class WorkspaceRootNotExistsError extends Schema.TaggedError()( "WorkspaceRootNotExistsError", { workspaceRoot: Schema.String, @@ -22,7 +22,7 @@ export class WorkspaceRootNotExistsError extends Schema.TaggedErrorClass()( +export class WorkspaceRootCreateFailedError extends Schema.TaggedError()( "WorkspaceRootCreateFailedError", { workspaceRoot: Schema.String, @@ -34,7 +34,7 @@ export class WorkspaceRootCreateFailedError extends Schema.TaggedErrorClass()( +export class WorkspaceRootNotDirectoryError extends Schema.TaggedError()( "WorkspaceRootNotDirectoryError", { workspaceRoot: Schema.String, @@ -46,7 +46,7 @@ export class WorkspaceRootNotDirectoryError extends Schema.TaggedErrorClass()( +export class WorkspacePathOutsideRootError extends Schema.TaggedError()( "WorkspacePathOutsideRootError", { workspaceRoot: Schema.String, diff --git a/apps/web/src/observability/clientTracing.ts b/apps/web/src/observability/clientTracing.ts index 9812fb12..0104a04a 100644 --- a/apps/web/src/observability/clientTracing.ts +++ b/apps/web/src/observability/clientTracing.ts @@ -6,7 +6,7 @@ import * as Option from "effect/Option"; import * as Scope from "effect/Scope"; import * as Tracer from "effect/Tracer"; import { FetchHttpClient, HttpClient } from "effect/unstable/http"; -import { OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; +import { OtlpExporter, OtlpSerialization, OtlpTracer } from "effect/unstable/observability"; import { resolvePrimaryEnvironmentHttpUrl } from "../environments/primary"; import { isElectron } from "../env"; @@ -25,6 +25,7 @@ const CLIENT_TRACING_RESOURCE = { const delegateRuntimeLayer = Layer.mergeAll( FetchHttpClient.layer, OtlpSerialization.layerJson, + OtlpExporter.layerFlusher, Layer.succeed(HttpClient.TracerDisabledWhen, () => true), ); diff --git a/oxlint-plugin-threadlines/test/utils.ts b/oxlint-plugin-threadlines/test/utils.ts index cc931f03..20ecab9c 100644 --- a/oxlint-plugin-threadlines/test/utils.ts +++ b/oxlint-plugin-threadlines/test/utils.ts @@ -27,7 +27,7 @@ class OxlintFixtureExpectedFailure extends Data.TaggedError("OxlintFixtureExpect } } -const encodeOxlintConfig = Schema.encodeEffect(Schema.UnknownFromJsonString); +const encodeOxlintConfig = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown)); interface RuleHarness { readonly run: ( diff --git a/packages/contracts/src/editor.ts b/packages/contracts/src/editor.ts index c180cf24..269848a5 100644 --- a/packages/contracts/src/editor.ts +++ b/packages/contracts/src/editor.ts @@ -50,7 +50,7 @@ export const LaunchEditorInput = Schema.Struct({ }); export type LaunchEditorInput = typeof LaunchEditorInput.Type; -export class ExternalLauncherError extends Schema.TaggedErrorClass()( +export class ExternalLauncherError extends Schema.TaggedError()( "ExternalLauncherError", { message: Schema.String, diff --git a/packages/contracts/src/filesystem.ts b/packages/contracts/src/filesystem.ts index 511f8ee1..5c7e2b5d 100644 --- a/packages/contracts/src/filesystem.ts +++ b/packages/contracts/src/filesystem.ts @@ -21,7 +21,7 @@ export const FilesystemBrowseResult = Schema.Struct({ }); export type FilesystemBrowseResult = typeof FilesystemBrowseResult.Type; -export class FilesystemBrowseError extends Schema.TaggedErrorClass()( +export class FilesystemBrowseError extends Schema.TaggedError()( "FilesystemBrowseError", { message: TrimmedNonEmptyString, diff --git a/packages/contracts/src/git.ts b/packages/contracts/src/git.ts index cd75c673..a7a42da9 100644 --- a/packages/contracts/src/git.ts +++ b/packages/contracts/src/git.ts @@ -730,7 +730,7 @@ export const VcsDropStashResult = Schema.Struct({ export type VcsDropStashResult = typeof VcsDropStashResult.Type; // RPC / domain errors -export class GitCommandError extends Schema.TaggedErrorClass()("GitCommandError", { +export class GitCommandError extends Schema.TaggedError()("GitCommandError", { operation: Schema.String, command: Schema.String, cwd: Schema.String, @@ -753,7 +753,7 @@ export class GitCommandError extends Schema.TaggedErrorClass()( * executable does, and the provider SDKs report that as a missing binary, which * sends the user looking for the wrong problem. */ -export class CheckoutMissingError extends Schema.TaggedErrorClass()( +export class CheckoutMissingError extends Schema.TaggedError()( "CheckoutMissingError", { threadId: TrimmedNonEmptyStringSchema, @@ -779,7 +779,7 @@ export class CheckoutMissingError extends Schema.TaggedErrorClass()( +export class VcsWorktreeInUseError extends Schema.TaggedError()( "VcsWorktreeInUseError", { /** Absolute path of the worktree that was not removed. */ @@ -805,7 +805,7 @@ export class VcsWorktreeInUseError extends Schema.TaggedErrorClass()( +export class TextGenerationError extends Schema.TaggedError()( "TextGenerationError", { operation: Schema.String, @@ -818,7 +818,7 @@ export class TextGenerationError extends Schema.TaggedErrorClass()("GitManagerError", { +export class GitManagerError extends Schema.TaggedError()("GitManagerError", { operation: Schema.String, detail: Schema.String, cause: Schema.optional(Schema.Defect()), diff --git a/packages/contracts/src/keybindings.ts b/packages/contracts/src/keybindings.ts index ca7f1734..76a0609f 100644 --- a/packages/contracts/src/keybindings.ts +++ b/packages/contracts/src/keybindings.ts @@ -149,7 +149,7 @@ export const ResolvedKeybindingsConfig = Schema.Array(ResolvedKeybindingRule).ch ); export type ResolvedKeybindingsConfig = typeof ResolvedKeybindingsConfig.Type; -export class KeybindingsConfigError extends Schema.TaggedErrorClass()( +export class KeybindingsConfigError extends Schema.TaggedError()( "KeybindingsConfigParseError", { configPath: Schema.String, diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts index c257370e..a5313bc8 100644 --- a/packages/contracts/src/orchestration.ts +++ b/packages/contracts/src/orchestration.ts @@ -1,6 +1,5 @@ import * as Effect from "effect/Effect"; import * as Exit from "effect/Exit"; -import * as Option from "effect/Option"; import * as Schema from "effect/Schema"; import * as SchemaIssue from "effect/SchemaIssue"; import * as SchemaTransformation from "effect/SchemaTransformation"; @@ -293,7 +292,7 @@ export const ChatAttachmentReadResult = Schema.Struct({ }); export type ChatAttachmentReadResult = typeof ChatAttachmentReadResult.Type; -export class ChatAttachmentReadError extends Schema.TaggedErrorClass()( +export class ChatAttachmentReadError extends Schema.TaggedError()( "ChatAttachmentReadError", { message: TrimmedNonEmptyString, @@ -325,7 +324,7 @@ export const CodexInlineVisualizationReadResult = Schema.Struct({ }); export type CodexInlineVisualizationReadResult = typeof CodexInlineVisualizationReadResult.Type; -export class CodexInlineVisualizationReadError extends Schema.TaggedErrorClass()( +export class CodexInlineVisualizationReadError extends Schema.TaggedError()( "CodexInlineVisualizationReadError", { message: TrimmedNonEmptyString, @@ -2153,7 +2152,7 @@ export const TurnCountRange = Schema.Struct({ Schema.makeFilter( (input) => input.fromTurnCount <= input.toTurnCount || - new SchemaIssue.InvalidValue(Option.some(input.fromTurnCount), { + new SchemaIssue.InvalidValue({ message: "fromTurnCount must be less than or equal to toTurnCount", }), { identifier: "OrchestrationTurnDiffRange" }, @@ -2358,7 +2357,7 @@ export const OrchestrationRpcSchemas = { }, } as const; -export class OrchestrationGetSnapshotError extends Schema.TaggedErrorClass()( +export class OrchestrationGetSnapshotError extends Schema.TaggedError()( "OrchestrationGetSnapshotError", { message: TrimmedNonEmptyString, @@ -2366,7 +2365,7 @@ export class OrchestrationGetSnapshotError extends Schema.TaggedErrorClass()( +export class OrchestrationDispatchCommandError extends Schema.TaggedError()( "OrchestrationDispatchCommandError", { message: TrimmedNonEmptyString, @@ -2374,7 +2373,7 @@ export class OrchestrationDispatchCommandError extends Schema.TaggedErrorClass()( +export class OrchestrationGetTurnDiffError extends Schema.TaggedError()( "OrchestrationGetTurnDiffError", { message: TrimmedNonEmptyString, @@ -2382,7 +2381,7 @@ export class OrchestrationGetTurnDiffError extends Schema.TaggedErrorClass()( +export class OrchestrationGetFullThreadDiffError extends Schema.TaggedError()( "OrchestrationGetFullThreadDiffError", { message: TrimmedNonEmptyString, @@ -2390,7 +2389,7 @@ export class OrchestrationGetFullThreadDiffError extends Schema.TaggedErrorClass }, ) {} -export class OrchestrationGetRevertPlanError extends Schema.TaggedErrorClass()( +export class OrchestrationGetRevertPlanError extends Schema.TaggedError()( "OrchestrationGetRevertPlanError", { message: TrimmedNonEmptyString, @@ -2398,7 +2397,7 @@ export class OrchestrationGetRevertPlanError extends Schema.TaggedErrorClass()( +export class OrchestrationThreadSearchError extends Schema.TaggedError()( "OrchestrationThreadSearchError", { message: TrimmedNonEmptyString, @@ -2406,7 +2405,7 @@ export class OrchestrationThreadSearchError extends Schema.TaggedErrorClass()( +export class OrchestrationReplayEventsError extends Schema.TaggedError()( "OrchestrationReplayEventsError", { message: TrimmedNonEmptyString, diff --git a/packages/contracts/src/previewAutomation.ts b/packages/contracts/src/previewAutomation.ts index 9fa26161..577ad81b 100644 --- a/packages/contracts/src/previewAutomation.ts +++ b/packages/contracts/src/previewAutomation.ts @@ -115,7 +115,7 @@ export type PreviewAutomationTarget = typeof PreviewAutomationTargetSchema.Type; * Collapsing them into one string would make all three look like the tool being * broken. */ -export class PreviewAutomationNoHostError extends Schema.TaggedErrorClass()( +export class PreviewAutomationNoHostError extends Schema.TaggedError()( "PreviewAutomationNoHostError", { threadId: ThreadId, operation: PreviewAutomationOperationSchema }, ) { @@ -124,7 +124,7 @@ export class PreviewAutomationNoHostError extends Schema.TaggedErrorClass()( +export class PreviewAutomationUnsupportedError extends Schema.TaggedError()( "PreviewAutomationUnsupportedError", { operation: PreviewAutomationOperationSchema }, ) { @@ -133,7 +133,7 @@ export class PreviewAutomationUnsupportedError extends Schema.TaggedErrorClass

()( +export class PreviewAutomationTimeoutError extends Schema.TaggedError()( "PreviewAutomationTimeoutError", { operation: PreviewAutomationOperationSchema, timeoutMs: Schema.Finite }, ) { @@ -142,7 +142,7 @@ export class PreviewAutomationTimeoutError extends Schema.TaggedErrorClass()( +export class PreviewAutomationDisconnectedError extends Schema.TaggedError()( "PreviewAutomationDisconnectedError", { operation: PreviewAutomationOperationSchema }, ) { @@ -152,7 +152,7 @@ export class PreviewAutomationDisconnectedError extends Schema.TaggedErrorClass< } /** The page was reached and said no: a bad selector, a missing element, a throw. */ -export class PreviewAutomationExecutionError extends Schema.TaggedErrorClass()( +export class PreviewAutomationExecutionError extends Schema.TaggedError()( "PreviewAutomationExecutionError", { operation: PreviewAutomationOperationSchema, detail: Schema.String }, ) { @@ -162,7 +162,7 @@ export class PreviewAutomationExecutionError extends Schema.TaggedErrorClass

()(
+export class PreviewAutomationResultTooLargeError extends Schema.TaggedError()(
   "PreviewAutomationResultTooLargeError",
   {
     operation: PreviewAutomationOperationSchema,
diff --git a/packages/contracts/src/project.ts b/packages/contracts/src/project.ts
index 91537c6e..c8e880b1 100644
--- a/packages/contracts/src/project.ts
+++ b/packages/contracts/src/project.ts
@@ -35,7 +35,7 @@ export const ProjectSearchEntriesResult = Schema.Struct({
 });
 export type ProjectSearchEntriesResult = typeof ProjectSearchEntriesResult.Type;
 
-export class ProjectSearchEntriesError extends Schema.TaggedErrorClass()(
+export class ProjectSearchEntriesError extends Schema.TaggedError()(
   "ProjectSearchEntriesError",
   {
     message: TrimmedNonEmptyString,
@@ -90,7 +90,7 @@ export type ProjectWriteFileConflict = typeof ProjectWriteFileConflict.Type;
 export const ProjectWriteFileResult = Schema.Union([ProjectFileWritten, ProjectWriteFileConflict]);
 export type ProjectWriteFileResult = typeof ProjectWriteFileResult.Type;
 
-export class ProjectWriteFileError extends Schema.TaggedErrorClass()(
+export class ProjectWriteFileError extends Schema.TaggedError()(
   "ProjectWriteFileError",
   {
     message: TrimmedNonEmptyString,
@@ -109,7 +109,7 @@ export const ProjectListEntriesResult = Schema.Struct({
 });
 export type ProjectListEntriesResult = typeof ProjectListEntriesResult.Type;
 
-export class ProjectListEntriesError extends Schema.TaggedErrorClass()(
+export class ProjectListEntriesError extends Schema.TaggedError()(
   "ProjectListEntriesError",
   {
     message: TrimmedNonEmptyString,
@@ -176,7 +176,7 @@ export const ProjectReadFileResult = Schema.Union([
 ]);
 export type ProjectReadFileResult = typeof ProjectReadFileResult.Type;
 
-export class ProjectReadFileError extends Schema.TaggedErrorClass()(
+export class ProjectReadFileError extends Schema.TaggedError()(
   "ProjectReadFileError",
   {
     message: TrimmedNonEmptyString,
@@ -206,7 +206,7 @@ export const ProjectFaviconResult = Schema.Struct({
 });
 export type ProjectFaviconResult = typeof ProjectFaviconResult.Type;
 
-export class ProjectFaviconError extends Schema.TaggedErrorClass()(
+export class ProjectFaviconError extends Schema.TaggedError()(
   "ProjectFaviconError",
   {
     message: TrimmedNonEmptyString,
diff --git a/packages/contracts/src/provider.ts b/packages/contracts/src/provider.ts
index 876c2685..917549eb 100644
--- a/packages/contracts/src/provider.ts
+++ b/packages/contracts/src/provider.ts
@@ -234,7 +234,7 @@ export const ProviderStartReviewResult = Schema.Struct({
 });
 export type ProviderStartReviewResult = typeof ProviderStartReviewResult.Type;
 
-export class ProviderStartReviewError extends Schema.TaggedErrorClass()(
+export class ProviderStartReviewError extends Schema.TaggedError()(
   "ProviderStartReviewError",
   {
     message: TrimmedNonEmptyString,
@@ -327,7 +327,7 @@ export const ProviderExternalThreadImportResult = Schema.Struct({
 });
 export type ProviderExternalThreadImportResult = typeof ProviderExternalThreadImportResult.Type;
 
-export class ProviderExternalThreadError extends Schema.TaggedErrorClass()(
+export class ProviderExternalThreadError extends Schema.TaggedError()(
   "ProviderExternalThreadError",
   {
     message: TrimmedNonEmptyString,
@@ -393,7 +393,7 @@ export const ProviderSubagentTranscriptResult = Schema.Struct({
 });
 export type ProviderSubagentTranscriptResult = typeof ProviderSubagentTranscriptResult.Type;
 
-export class ProviderSubagentTranscriptError extends Schema.TaggedErrorClass()(
+export class ProviderSubagentTranscriptError extends Schema.TaggedError()(
   "ProviderSubagentTranscriptError",
   {
     message: TrimmedNonEmptyString,
@@ -454,7 +454,7 @@ export const ProviderRealtimeListVoicesResult = Schema.Struct({
 });
 export type ProviderRealtimeListVoicesResult = typeof ProviderRealtimeListVoicesResult.Type;
 
-export class ProviderRealtimeError extends Schema.TaggedErrorClass()(
+export class ProviderRealtimeError extends Schema.TaggedError()(
   "ProviderRealtimeError",
   {
     message: TrimmedNonEmptyString,
diff --git a/packages/contracts/src/providerAuth.ts b/packages/contracts/src/providerAuth.ts
index 26ea6257..16baecd5 100644
--- a/packages/contracts/src/providerAuth.ts
+++ b/packages/contracts/src/providerAuth.ts
@@ -106,7 +106,7 @@ export const ProviderAuthEvent = Schema.Union([
 ]);
 export type ProviderAuthEvent = typeof ProviderAuthEvent.Type;
 
-export class ProviderAuthError extends Schema.TaggedErrorClass()(
+export class ProviderAuthError extends Schema.TaggedError()(
   "ProviderAuthError",
   {
     instanceId: Schema.String,
diff --git a/packages/contracts/src/providerExtensions.ts b/packages/contracts/src/providerExtensions.ts
index d81e05a9..3f766967 100644
--- a/packages/contracts/src/providerExtensions.ts
+++ b/packages/contracts/src/providerExtensions.ts
@@ -608,7 +608,7 @@ export const ProviderExtensionMcpResourceReadResult = Schema.Struct({
 export type ProviderExtensionMcpResourceReadResult =
   typeof ProviderExtensionMcpResourceReadResult.Type;
 
-export class ProviderExtensionsError extends Schema.TaggedErrorClass()(
+export class ProviderExtensionsError extends Schema.TaggedError()(
   "ProviderExtensionsError",
   {
     message: TrimmedNonEmptyString,
diff --git a/packages/contracts/src/server.ts b/packages/contracts/src/server.ts
index 42f8484d..22b99339 100644
--- a/packages/contracts/src/server.ts
+++ b/packages/contracts/src/server.ts
@@ -828,7 +828,7 @@ export const ServerProviderUpdateBlockerResolutionResult = Schema.Struct({
 export type ServerProviderUpdateBlockerResolutionResult =
   typeof ServerProviderUpdateBlockerResolutionResult.Type;
 
-export class ServerProviderRateLimitResetCreditError extends Schema.TaggedErrorClass()(
+export class ServerProviderRateLimitResetCreditError extends Schema.TaggedError()(
   "ServerProviderRateLimitResetCreditError",
   {
     instanceId: ProviderInstanceId,
@@ -841,7 +841,7 @@ export class ServerProviderRateLimitResetCreditError extends Schema.TaggedErrorC
   }
 }
 
-export class ServerProviderUpdateError extends Schema.TaggedErrorClass()(
+export class ServerProviderUpdateError extends Schema.TaggedError()(
   "ServerProviderUpdateError",
   {
     provider: ProviderDriverKind,
diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts
index ab654c87..d9b48040 100644
--- a/packages/contracts/src/settings.ts
+++ b/packages/contracts/src/settings.ts
@@ -512,7 +512,7 @@ export type ServerSettings = typeof ServerSettings.Type;
 
 export const DEFAULT_SERVER_SETTINGS: ServerSettings = Schema.decodeSync(ServerSettings)({});
 
-export class ServerSettingsError extends Schema.TaggedErrorClass()(
+export class ServerSettingsError extends Schema.TaggedError()(
   "ServerSettingsError",
   {
     settingsPath: Schema.String,
diff --git a/packages/contracts/src/sourceControl.ts b/packages/contracts/src/sourceControl.ts
index 49904ab2..8a025761 100644
--- a/packages/contracts/src/sourceControl.ts
+++ b/packages/contracts/src/sourceControl.ts
@@ -237,7 +237,7 @@ export const SourceControlToolUpdateResult = Schema.Struct({
 });
 export type SourceControlToolUpdateResult = typeof SourceControlToolUpdateResult.Type;
 
-export class SourceControlToolUpdateError extends Schema.TaggedErrorClass()(
+export class SourceControlToolUpdateError extends Schema.TaggedError()(
   "SourceControlToolUpdateError",
   {
     target: SourceControlToolUpdateTarget,
@@ -249,7 +249,7 @@ export class SourceControlToolUpdateError extends Schema.TaggedErrorClass()(
+export class SourceControlProviderError extends Schema.TaggedError()(
   "SourceControlProviderError",
   {
     provider: SourceControlProviderKind,
@@ -263,7 +263,7 @@ export class SourceControlProviderError extends Schema.TaggedErrorClass()(
+export class SourceControlRepositoryError extends Schema.TaggedError()(
   "SourceControlRepositoryError",
   {
     provider: SourceControlProviderKind,
diff --git a/packages/contracts/src/terminal.ts b/packages/contracts/src/terminal.ts
index ffb775e9..c031d919 100644
--- a/packages/contracts/src/terminal.ts
+++ b/packages/contracts/src/terminal.ts
@@ -160,14 +160,11 @@ export const TerminalEvent = Schema.Union([
 ]);
 export type TerminalEvent = typeof TerminalEvent.Type;
 
-export class TerminalCwdError extends Schema.TaggedErrorClass()(
-  "TerminalCwdError",
-  {
-    cwd: Schema.String,
-    reason: Schema.Literals(["notFound", "notDirectory", "statFailed"]),
-    cause: Schema.optional(Schema.Defect()),
-  },
-) {
+export class TerminalCwdError extends Schema.TaggedError()("TerminalCwdError", {
+  cwd: Schema.String,
+  reason: Schema.Literals(["notFound", "notDirectory", "statFailed"]),
+  cause: Schema.optional(Schema.Defect()),
+}) {
   override get message() {
     if (this.reason === "notDirectory") {
       return `Terminal cwd is not a directory: ${this.cwd}`;
@@ -188,7 +185,7 @@ export class TerminalCwdError extends Schema.TaggedErrorClass(
   }
 }
 
-export class TerminalHistoryError extends Schema.TaggedErrorClass()(
+export class TerminalHistoryError extends Schema.TaggedError()(
   "TerminalHistoryError",
   {
     operation: Schema.Literals(["read", "truncate", "migrate"]),
@@ -202,7 +199,7 @@ export class TerminalHistoryError extends Schema.TaggedErrorClass()(
+export class TerminalSessionLookupError extends Schema.TaggedError()(
   "TerminalSessionLookupError",
   {
     threadId: Schema.String,
@@ -214,7 +211,7 @@ export class TerminalSessionLookupError extends Schema.TaggedErrorClass()(
+export class TerminalNotRunningError extends Schema.TaggedError()(
   "TerminalNotRunningError",
   {
     threadId: Schema.String,
diff --git a/packages/contracts/src/usage.ts b/packages/contracts/src/usage.ts
index efb3ab53..c5bd39c5 100644
--- a/packages/contracts/src/usage.ts
+++ b/packages/contracts/src/usage.ts
@@ -203,7 +203,7 @@ export const UsageSummary = Schema.Struct({
 });
 export type UsageSummary = typeof UsageSummary.Type;
 
-export class UsageReadError extends Schema.TaggedErrorClass()("UsageReadError", {
+export class UsageReadError extends Schema.TaggedError()("UsageReadError", {
   reason: Schema.Literals(["scanFailed", "invalidWindow"]),
   /** Stable, bounded description. The underlying failure travels in `cause`. */
   detail: TrimmedNonEmptyString,
diff --git a/packages/contracts/src/vcs.ts b/packages/contracts/src/vcs.ts
index 40deeb77..e2b09977 100644
--- a/packages/contracts/src/vcs.ts
+++ b/packages/contracts/src/vcs.ts
@@ -86,7 +86,7 @@ export interface VcsProcessTimeoutFailure {
   readonly timeoutMs: number;
 }
 
-export class VcsProcessSpawnError extends Schema.TaggedErrorClass()(
+export class VcsProcessSpawnError extends Schema.TaggedError()(
   "VcsProcessSpawnError",
   {
     operation: Schema.String,
@@ -107,7 +107,7 @@ export class VcsProcessSpawnError extends Schema.TaggedErrorClass()(
+export class VcsProcessExitError extends Schema.TaggedError()(
   "VcsProcessExitError",
   {
     operation: Schema.String,
@@ -122,7 +122,7 @@ export class VcsProcessExitError extends Schema.TaggedErrorClass()(
+export class VcsProcessTimeoutError extends Schema.TaggedError()(
   "VcsProcessTimeoutError",
   {
     operation: Schema.String,
@@ -143,7 +143,7 @@ export class VcsProcessTimeoutError extends Schema.TaggedErrorClass()(
+export class VcsOutputDecodeError extends Schema.TaggedError()(
   "VcsOutputDecodeError",
   {
     operation: Schema.String,
@@ -194,7 +194,7 @@ export class VcsOutputDecodeError extends Schema.TaggedErrorClass()(
+export class VcsRepositoryDetectionError extends Schema.TaggedError()(
   "VcsRepositoryDetectionError",
   {
     operation: Schema.String,
@@ -208,7 +208,7 @@ export class VcsRepositoryDetectionError extends Schema.TaggedErrorClass()(
+export class VcsUnsupportedOperationError extends Schema.TaggedError()(
   "VcsUnsupportedOperationError",
   {
     operation: Schema.String,
diff --git a/packages/effect-acp/src/client.test.ts b/packages/effect-acp/src/client.test.ts
index dae7dfe6..8fc74219 100644
--- a/packages/effect-acp/src/client.test.ts
+++ b/packages/effect-acp/src/client.test.ts
@@ -214,7 +214,7 @@ it.layer(NodeServices.layer)("effect-acp client", (it) => {
         }
         const rendered = Cause.pretty(result.cause);
         assert.include(rendered, "Invalid x/typed_request payload:");
-        assert.include(rendered, "Expected string, got 123");
+        assert.include(rendered, "Expected string");
       }),
   );
 
diff --git a/packages/effect-acp/src/errors.ts b/packages/effect-acp/src/errors.ts
index 05e0b1b4..6edebca5 100644
--- a/packages/effect-acp/src/errors.ts
+++ b/packages/effect-acp/src/errors.ts
@@ -2,7 +2,7 @@ import * as Schema from "effect/Schema";
 
 import * as AcpSchema from "./_generated/schema.gen.ts";
 
-export class AcpSpawnError extends Schema.TaggedErrorClass()("AcpSpawnError", {
+export class AcpSpawnError extends Schema.TaggedError()("AcpSpawnError", {
   command: Schema.optional(Schema.String),
   cause: Schema.Defect(),
 }) {
@@ -13,7 +13,7 @@ export class AcpSpawnError extends Schema.TaggedErrorClass()("Acp
   }
 }
 
-export class AcpProcessExitedError extends Schema.TaggedErrorClass()(
+export class AcpProcessExitedError extends Schema.TaggedError()(
   "AcpProcessExitedError",
   {
     code: Schema.optional(Schema.Number),
@@ -27,7 +27,7 @@ export class AcpProcessExitedError extends Schema.TaggedErrorClass()(
+export class AcpProtocolParseError extends Schema.TaggedError()(
   "AcpProtocolParseError",
   {
     detail: Schema.String,
@@ -39,7 +39,7 @@ export class AcpProtocolParseError extends Schema.TaggedErrorClass()(
+export class AcpTransportError extends Schema.TaggedError()(
   "AcpTransportError",
   {
     detail: Schema.String,
@@ -47,7 +47,7 @@ export class AcpTransportError extends Schema.TaggedErrorClass()("AcpRequestError", {
+export class AcpRequestError extends Schema.TaggedError()("AcpRequestError", {
   code: AcpSchema.ErrorCode,
   errorMessage: Schema.String,
   data: Schema.optional(Schema.Unknown),
diff --git a/packages/effect-codex-app-server/scripts/generate.ts b/packages/effect-codex-app-server/scripts/generate.ts
index 030c54ab..b186dd8d 100644
--- a/packages/effect-codex-app-server/scripts/generate.ts
+++ b/packages/effect-codex-app-server/scripts/generate.ts
@@ -49,7 +49,7 @@ interface ProtocolSchemaPaths {
   readonly typescriptDir: string;
 }
 
-class GeneratorError extends Schema.TaggedErrorClass()("GeneratorError", {
+class GeneratorError extends Schema.TaggedError()("GeneratorError", {
   detail: Schema.String,
   cause: Schema.optional(Schema.Defect()),
 }) {
diff --git a/packages/effect-codex-app-server/src/errors.ts b/packages/effect-codex-app-server/src/errors.ts
index d9977c63..1a757763 100644
--- a/packages/effect-codex-app-server/src/errors.ts
+++ b/packages/effect-codex-app-server/src/errors.ts
@@ -6,7 +6,7 @@ export interface CodexAppServerProtocolErrorShape {
   readonly data?: unknown;
 }
 
-export class CodexAppServerSpawnError extends Schema.TaggedErrorClass()(
+export class CodexAppServerSpawnError extends Schema.TaggedError()(
   "CodexAppServerSpawnError",
   {
     command: Schema.optional(Schema.String),
@@ -20,7 +20,7 @@ export class CodexAppServerSpawnError extends Schema.TaggedErrorClass()(
+export class CodexAppServerProcessExitedError extends Schema.TaggedError()(
   "CodexAppServerProcessExitedError",
   {
     code: Schema.optional(Schema.Number),
@@ -34,7 +34,7 @@ export class CodexAppServerProcessExitedError extends Schema.TaggedErrorClass()(
+export class CodexAppServerProtocolParseError extends Schema.TaggedError()(
   "CodexAppServerProtocolParseError",
   {
     detail: Schema.String,
@@ -46,7 +46,7 @@ export class CodexAppServerProtocolParseError extends Schema.TaggedErrorClass()(
+export class CodexAppServerTransportError extends Schema.TaggedError()(
   "CodexAppServerTransportError",
   {
     detail: Schema.String,
@@ -58,7 +58,7 @@ export class CodexAppServerTransportError extends Schema.TaggedErrorClass()(
+export class CodexAppServerRequestError extends Schema.TaggedError()(
   "CodexAppServerRequestError",
   {
     code: Schema.Number,
diff --git a/packages/effect-codex-app-server/src/protocol.test.ts b/packages/effect-codex-app-server/src/protocol.test.ts
index 84812588..bb75cd5b 100644
--- a/packages/effect-codex-app-server/src/protocol.test.ts
+++ b/packages/effect-codex-app-server/src/protocol.test.ts
@@ -11,13 +11,13 @@ import { assert, it } from "@effect/vitest";
 import * as CodexError from "./errors.ts";
 import * as CodexProtocol from "./protocol.ts";
 import { makeInMemoryStdio } from "./_internal/stdio.ts";
-const encodeUnknownJsonString = Schema.encodeUnknownSync(Schema.UnknownFromJsonString);
+const encodeUnknownJsonString = Schema.encodeUnknownSync(Schema.fromJsonString(Schema.Unknown));
 
 const encoder = new TextEncoder();
 
 const encodeJsonl = (value: unknown) => encoder.encode(`${encodeUnknownJsonString(value)}\n`);
 
-const decodeJson = Schema.decodeEffect(Schema.UnknownFromJsonString);
+const decodeJson = Schema.decodeEffect(Schema.fromJsonString(Schema.Unknown));
 
 it.layer(NodeServices.layer)("effect-codex-app-server protocol", (it) => {
   it.effect(
diff --git a/packages/effect-codex-app-server/src/protocol.ts b/packages/effect-codex-app-server/src/protocol.ts
index f1676e05..31a7a8a3 100644
--- a/packages/effect-codex-app-server/src/protocol.ts
+++ b/packages/effect-codex-app-server/src/protocol.ts
@@ -86,8 +86,8 @@ function isIncomingResponse(value: unknown): value is typeof JsonRpcResponseEnve
   return isJsonRpcResponseEnvelope(value);
 }
 
-const encodeJsonString = Schema.encodeUnknownEffect(Schema.UnknownFromJsonString);
-const decodeJsonString = Schema.decodeUnknownEffect(Schema.UnknownFromJsonString);
+const encodeJsonString = Schema.encodeUnknownEffect(Schema.fromJsonString(Schema.Unknown));
+const decodeJsonString = Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Unknown));
 
 const encodeWireMessage = (
   message: Record,
diff --git a/packages/shared/src/schemaJson.ts b/packages/shared/src/schemaJson.ts
index 4feeb9d3..c60d297a 100644
--- a/packages/shared/src/schemaJson.ts
+++ b/packages/shared/src/schemaJson.ts
@@ -69,7 +69,7 @@ const parseLenientJsonGetter = SchemaGetter.onSome((input: string) =>
 
       return Option.some(JSON.parse(stripped));
     },
-    catch: (e) => new SchemaIssue.InvalidValue(Option.some(input), { message: String(e) }),
+    catch: (e) => new SchemaIssue.InvalidValue({ message: String(e) }),
   }),
 );
 
diff --git a/packages/shared/src/schemaYaml.ts b/packages/shared/src/schemaYaml.ts
index 7a1fd840..1a2c0bf0 100644
--- a/packages/shared/src/schemaYaml.ts
+++ b/packages/shared/src/schemaYaml.ts
@@ -1,5 +1,4 @@
 import * as Effect from "effect/Effect";
-import * as Option from "effect/Option";
 import * as Schema from "effect/Schema";
 import * as SchemaGetter from "effect/SchemaGetter";
 import * as SchemaIssue from "effect/SchemaIssue";
@@ -32,8 +31,7 @@ export function parseYaml(
   return SchemaGetter.transformOrFail((input: E) =>
     Effect.try({
       try: () => parseYamlString(input, options) as unknown,
-      catch: (error) =>
-        new SchemaIssue.InvalidValue(Option.some(input), { message: formatYamlError(error) }),
+      catch: (error) => new SchemaIssue.InvalidValue({ message: formatYamlError(error) }),
     }),
   );
 }
@@ -44,8 +42,7 @@ export function stringifyYaml(
   return SchemaGetter.transformOrFail((input: unknown) =>
     Effect.try({
       try: () => stringifyYamlValue(input, options),
-      catch: (error) =>
-        new SchemaIssue.InvalidValue(Option.some(input), { message: formatYamlError(error) }),
+      catch: (error) => new SchemaIssue.InvalidValue({ message: formatYamlError(error) }),
     }),
   );
 }
diff --git a/patches/@effect__platform-bun@4.0.0-beta.98.patch b/patches/@effect__platform-bun@4.0.0-beta.98.patch
deleted file mode 100644
index 26ff8a97..00000000
--- a/patches/@effect__platform-bun@4.0.0-beta.98.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff --git a/dist/BunHttpServer.d.ts b/dist/BunHttpServer.d.ts
---- a/dist/BunHttpServer.d.ts
-+++ b/dist/BunHttpServer.d.ts
-@@ -31,4 +31,5 @@ export declare const make: (options: ServeOptions & {
- export declare const make: (options: ServeOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined;
- }) => Effect.Effect<{
-@@ -50,4 +51,5 @@ export declare const layerServer: (options: ServeOptions & {
- export declare const layerServer: (options: ServeOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined;
- }) => Layer.Layer;
-@@ -64,4 +66,5 @@ export declare const layer: (options: ServeOptions & {
- export declare const layer: (options: ServeOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined;
- }) => Layer.Layer;
-@@ -84,4 +87,5 @@ export declare const layerConfig: (options: Config.Wrap(options: Config.Wrap & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined;
- }>) => Layer.Layer;
-diff --git a/dist/BunHttpServer.js b/dist/BunHttpServer.js
---- a/dist/BunHttpServer.js
-+++ b/dist/BunHttpServer.js
-@@ -43,3 +43,4 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
-     fetch: handlerStack[0],
-     websocket: {
-+      ...options.websocket,
-       open(ws) {
-diff --git a/src/BunHttpServer.ts b/src/BunHttpServer.ts
---- a/src/BunHttpServer.ts
-+++ b/src/BunHttpServer.ts
-@@ -77,4 +77,5 @@ export const make = Effect.fnUntraced(
-     options: ServeOptions & {
-       readonly disablePreemptiveShutdown?: boolean | undefined
-       readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+      readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined
-     }
-@@ -91,3 +92,4 @@ export const make = Effect.fnUntraced(
-       fetch: handlerStack[0],
-       websocket: {
-+        ...options.websocket,
-         open(ws) {
-@@ -233,4 +235,5 @@ export const layerServer: (
-   options: ServeOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined
-   }
-@@ -262,4 +265,5 @@ export const layer = (
-   options: ServeOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+    readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined
-   }
-@@ -296,4 +300,5 @@ export const layerConfig = (
-     ServeOptions & {
-       readonly disablePreemptiveShutdown?: boolean | undefined
-       readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+      readonly websocket?: Omit, "open" | "message" | "close" | "drain" | "ping" | "pong" | "data" | "binaryType"> | undefined
-     }
diff --git a/patches/@effect__platform-node-shared@4.0.0-beta.98.patch b/patches/@effect__platform-node-shared@4.0.0-beta.98.patch
deleted file mode 100644
index 50116e85..00000000
--- a/patches/@effect__platform-node-shared@4.0.0-beta.98.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/dist/NodeChildProcessSpawner.js b/dist/NodeChildProcessSpawner.js
-index 384b19c2265cb753509f7c988cb6b450042d975e..2654a34e7975024d774d7f5b273d40d293ad2fda 100644
---- a/dist/NodeChildProcessSpawner.js
-+++ b/dist/NodeChildProcessSpawner.js
-@@ -336,20 +336,26 @@ const make = /*#__PURE__*/Effect.gen(function* () {
-           let isReferenced = true;
-           const cwd = yield* resolveWorkingDirectory(cmd.options);
-           const env = resolveEnvironment(cmd.options);
-+          const commandOptions = cmd.options;
-           const stdio = buildStdioArray(stdinConfig, stdoutConfig, stderrConfig, resolvedAdditionalFds);
-           const [childProcess, exitSignal] = yield* Effect.acquireRelease(spawn(cmd, {
-             cwd,
-             env,
-             stdio,
-             detached: cmd.options.detached ?? process.platform !== "win32",
--            shell: cmd.options.shell
-+            shell: cmd.options.shell,
-+            windowsHide: commandOptions.windowsHide
-           }), Effect.fnUntraced(function* ([childProcess, exitSignal]) {
-             const exited = yield* Deferred.isDone(exitSignal);
-             const killWithTimeout = withTimeout(childProcess, cmd, cmd.options);
-             if (exited) {
-               // Process already exited, check if children need cleanup
-               const [code] = yield* Deferred.await(exitSignal);
--              if (code !== 0 && Predicate.isNotNull(code)) {
-+              // Skipped on Windows: there are no process groups, and
-+              // `taskkill /pid  /T` cannot enumerate the children of an
-+              // exited pid — it only spawns a cmd.exe + taskkill.exe that
-+              // fail, and a reused pid could kill an unrelated process.
-+              if (code !== 0 && Predicate.isNotNull(code) && process.platform !== "win32") {
-                 // Non-zero exit code ,attempt to clean up process group
-                 return yield* Effect.ignore(killWithTimeout(killProcessGroup));
-               }
-@@ -363,7 +369,10 @@ const make = /*#__PURE__*/Effect.gen(function* () {
-           }));
-           const pid = ProcessId(childProcess.pid);
-           childProcess.on("exit", code => {
--            if (code !== 0 && Predicate.isNotNull(code)) {
-+            // Skipped on Windows for the same reason as the release
-+            // finalizer above: group cleanup for an exited pid is a no-op
-+            // that costs two process spawns per non-zero exit.
-+            if (code !== 0 && Predicate.isNotNull(code) && process.platform !== "win32") {
-               killProcessGroupOnExit(childProcess, cmd.options.killSignal ?? "SIGTERM");
-             }
-           });
-diff --git a/src/NodeChildProcessSpawner.ts b/src/NodeChildProcessSpawner.ts
-index ec7da1d3444463ee4883411e1cc2a2ce14ef9644..679a178f24e9272d7cc391a7fe9b01b1fcba9a9e 100644
---- a/src/NodeChildProcessSpawner.ts
-+++ b/src/NodeChildProcessSpawner.ts
-@@ -468,6 +468,9 @@ const make = Effect.gen(function*() {
- 
-         const cwd = yield* resolveWorkingDirectory(cmd.options)
-         const env = resolveEnvironment(cmd.options)
-+        const commandOptions = cmd.options as ChildProcess.CommandOptions & {
-+          readonly windowsHide?: boolean | undefined
-+        }
-         const stdio = buildStdioArray(stdinConfig, stdoutConfig, stderrConfig, resolvedAdditionalFds)
- 
-         const [childProcess, exitSignal] = yield* Effect.acquireRelease(
-@@ -476,7 +479,8 @@ const make = Effect.gen(function*() {
-             env,
-             stdio,
-             detached: cmd.options.detached ?? process.platform !== "win32",
--            shell: cmd.options.shell
-+            shell: cmd.options.shell,
-+            windowsHide: commandOptions.windowsHide
-           }),
-           Effect.fnUntraced(function*([childProcess, exitSignal]) {
-             const exited = yield* Deferred.isDone(exitSignal)
-@@ -484,7 +488,11 @@ const make = Effect.gen(function*() {
-             if (exited) {
-               // Process already exited, check if children need cleanup
-               const [code] = yield* Deferred.await(exitSignal)
--              if (code !== 0 && Predicate.isNotNull(code)) {
-+              // Skipped on Windows: there are no process groups, and
-+              // `taskkill /pid  /T` cannot enumerate the children of an
-+              // exited pid — it only spawns a cmd.exe + taskkill.exe that
-+              // fail, and a reused pid could kill an unrelated process.
-+              if (code !== 0 && Predicate.isNotNull(code) && process.platform !== "win32") {
-                 // Non-zero exit code ,attempt to clean up process group
-                 return yield* Effect.ignore(killWithTimeout(killProcessGroup))
-               }
-@@ -508,7 +516,10 @@ const make = Effect.gen(function*() {
- 
-         const pid = ProcessId(childProcess.pid!)
-         childProcess.on("exit", (code) => {
--          if (code !== 0 && Predicate.isNotNull(code)) {
-+          // Skipped on Windows for the same reason as the release finalizer
-+          // above: group cleanup for an exited pid is a no-op that costs two
-+          // process spawns per non-zero exit.
-+          if (code !== 0 && Predicate.isNotNull(code) && process.platform !== "win32") {
-             killProcessGroupOnExit(childProcess, cmd.options.killSignal ?? "SIGTERM")
-           }
-         })
diff --git a/patches/@effect__platform-node@4.0.0-beta.98.patch b/patches/@effect__platform-node@4.0.0-beta.98.patch
deleted file mode 100644
index 241c4687..00000000
--- a/patches/@effect__platform-node@4.0.0-beta.98.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff --git a/dist/NodeHttpServer.d.ts b/dist/NodeHttpServer.d.ts
---- a/dist/NodeHttpServer.d.ts
-+++ b/dist/NodeHttpServer.d.ts
-@@ -33,4 +33,5 @@ export declare const make: (evaluate: LazyArg>, options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit | undefined;
- }) => Effect.Effect<{
-@@ -72,4 +73,5 @@ export declare const layerServer: (evaluate: LazyArg>, options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit | undefined;
- }) => Layer.Layer;
-@@ -92,4 +94,5 @@ export declare const layer: (evaluate: LazyArg, options: Net.ListenO
- export declare const layer: (evaluate: LazyArg, options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined;
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined;
-+    readonly websocket?: Omit | undefined;
- }) => Layer.Layer;
-@@ -104,4 +107,5 @@ export declare const layerConfig: (evaluate: LazyArg, options: Confi
- export declare const layerConfig: (evaluate: LazyArg, options: Config.Wrap | undefined;
- }>) => Layer.Layer;
-diff --git a/dist/NodeHttpServer.js b/dist/NodeHttpServer.js
---- a/dist/NodeHttpServer.js
-+++ b/dist/NodeHttpServer.js
-@@ -91,3 +91,4 @@ export const make = /*#__PURE__*/Effect.fnUntraced(function* (evaluate, options)
-   const address = server.address();
-   const wss = yield* Effect.acquireRelease(Effect.sync(() => new NodeWS.WebSocketServer({
-+    ...options.websocket,
-     noServer: true
-diff --git a/src/NodeHttpServer.ts b/src/NodeHttpServer.ts
---- a/src/NodeHttpServer.ts
-+++ b/src/NodeHttpServer.ts
-@@ -75,4 +75,5 @@ export const make = Effect.fnUntraced(function*(
-   options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+    readonly websocket?: Omit | undefined
-   }
-@@ -116,4 +117,4 @@ export const make = Effect.fnUntraced(function*(
-   const address = server.address()!
- 
--  const wss = yield* Effect.acquireRelease(
--    Effect.sync(() => new NodeWS.WebSocketServer({ noServer: true })),
-+  const wss = yield* Effect.acquireRelease(
-+    Effect.sync(() => new NodeWS.WebSocketServer({ ...options.websocket, noServer: true })),
-@@ -400,4 +401,5 @@ export const layerServer: (
-   options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+    readonly websocket?: Omit | undefined
-   }
-@@ -430,4 +432,5 @@ export const layer = (
-   options: Net.ListenOptions & {
-     readonly disablePreemptiveShutdown?: boolean | undefined
-     readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+    readonly websocket?: Omit | undefined
-   }
-@@ -454,4 +457,5 @@ export const layerConfig = (
-     Net.ListenOptions & {
-       readonly disablePreemptiveShutdown?: boolean | undefined
-       readonly gracefulShutdownTimeout?: Duration.Input | undefined
-+      readonly websocket?: Omit | undefined
-     }
diff --git a/patches/effect@4.0.0-beta.98.patch b/patches/effect@4.0.0-beta.107.patch
similarity index 88%
rename from patches/effect@4.0.0-beta.98.patch
rename to patches/effect@4.0.0-beta.107.patch
index ca73f53b..f2d7ad7a 100644
--- a/patches/effect@4.0.0-beta.98.patch
+++ b/patches/effect@4.0.0-beta.107.patch
@@ -1,8 +1,8 @@
 diff --git a/dist/PubSub.js b/dist/PubSub.js
-index 5f294e781fcedc57902bf53d20cab83184fe358b..72d3b1f36b84e54a22321ab756401ad144e7c62b 100644
+index b5fbe9cc5fc0752bcab11e6c6fcc25c61725c271..bd90c9ea1b91af633f1da56b215b6189b7aa3ad5 100644
 --- a/dist/PubSub.js
 +++ b/dist/PubSub.js
-@@ -2049,6 +2049,11 @@ const strategyCompletePollersUnsafe = (strategy, pubsub, subscribers, subscripti
+@@ -2030,6 +2030,11 @@ const strategyCompletePollersUnsafe = (strategy, pubsub, subscribers, subscripti
    let keepPolling = true;
    while (keepPolling && !subscription.isEmpty()) {
      const poller = MutableList.take(pollers);
@@ -15,7 +15,7 @@ index 5f294e781fcedc57902bf53d20cab83184fe358b..72d3b1f36b84e54a22321ab756401ad1
        removeSubscribers(subscribers, subscription, pollers);
        if (pollers.length === 0) {
 diff --git a/dist/unstable/rpc/RpcClient.d.ts b/dist/unstable/rpc/RpcClient.d.ts
-index a70061a638faabdd663eca25cb79585fec06e03c..1af40759e2d51d1c1d2da86bd00a43fc71cfff3a 100644
+index 7feaa44684c9e08e70b8c2bd7cbf365201d39d68..e68fcda5edf64c9b453c34681bebac9761e12b8b 100644
 --- a/dist/unstable/rpc/RpcClient.d.ts
 +++ b/dist/unstable/rpc/RpcClient.d.ts
 @@ -2,6 +2,7 @@ import * as Cause from "../../Cause.ts";
@@ -26,7 +26,7 @@ index a70061a638faabdd663eca25cb79585fec06e03c..1af40759e2d51d1c1d2da86bd00a43fc
  import * as Layer from "../../Layer.ts";
  import * as Queue from "../../Queue.ts";
  import * as Schedule from "../../Schedule.ts";
-@@ -261,9 +262,40 @@ export declare const layerProtocolWorker: (options: {
+@@ -275,9 +276,40 @@ export declare const layerProtocolWorker: (options: {
      readonly targetUtilization?: number | undefined;
      readonly timeToLive: Duration.Input;
  }) => Layer.Layer;
@@ -68,10 +68,10 @@ index a70061a638faabdd663eca25cb79585fec06e03c..1af40759e2d51d1c1d2da86bd00a43fc
  /**
   * Represents optional client protocol hooks that run when a transport connects
 diff --git a/dist/unstable/rpc/RpcClient.js b/dist/unstable/rpc/RpcClient.js
-index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3997610ee 100644
+index 7a7ea894edc03e8cf76c34210f7bd1fc8cfd465b..08c47ffc258ebc0e7621569295a044d086deaa7b 100644
 --- a/dist/unstable/rpc/RpcClient.js
 +++ b/dist/unstable/rpc/RpcClient.js
-@@ -46,6 +46,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -49,6 +49,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
    const services = yield* Effect.context();
    const scope = Context.get(services, Scope.Scope);
    const entries = new Map();
@@ -79,7 +79,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
    let isShutdown = false;
    yield* Scope.addFinalizer(scope, Effect.withFiber(parent => {
      isShutdown = true;
-@@ -83,6 +84,11 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -86,6 +87,11 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
        return Effect.interrupt;
      }
      const id = generateRequestId();
@@ -91,7 +91,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
      const send = middleware(message => options.onFromClient({
        message,
        context,
-@@ -100,7 +106,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -103,7 +109,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
        headers: Headers.merge(parentFiber.getRef(CurrentHeaders), headers)
      });
      if (discard) {
@@ -100,7 +100,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
      }
      let fiber;
      return Effect.onInterrupt(Effect.callback(resume => {
-@@ -118,7 +124,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -121,7 +127,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
          }
        };
        entries.set(id, entry);
@@ -109,7 +109,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
          captureStackTrace: false
        }) : identity, Effect.runForkWith(parentFiber.context));
        fiber.addObserver(exit => {
-@@ -127,8 +133,9 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -130,8 +136,9 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
          }
        });
      }), interruptors => {
@@ -120,7 +120,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
      });
    });
    const onStreamRequest = Effect.fnUntraced(function* (rpc, middleware, payload, headers, streamBufferSize, context) {
-@@ -140,11 +147,17 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -143,11 +150,17 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
      });
      const fiber = Fiber.getCurrent();
      const id = generateRequestId();
@@ -140,7 +140,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
      });
      const queue = yield* Queue.bounded(streamBufferSize);
      entries.set(id, {
-@@ -152,9 +165,10 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -155,9 +168,10 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
        rpc,
        queue,
        scope,
@@ -153,7 +153,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
        message,
        context,
        discard: false
-@@ -169,7 +183,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -172,7 +186,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
          sampled: span.sampled
        } : {}),
        headers: Headers.merge(fiber.getRef(CurrentHeaders), headers)
@@ -162,7 +162,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
        captureStackTrace: false
      }) : identity, Effect.catchCause(error => Queue.failCause(queue, error)), Effect.interruptible, Effect.forkIn(scope, {
        startImmediately: true
-@@ -199,7 +213,10 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -202,7 +216,10 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
        });
      };
    };
@@ -174,7 +174,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
      const parentFiber = Fiber.getCurrent();
      const fiber = options.onFromClient({
        message: {
-@@ -213,7 +230,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -216,7 +233,7 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
      fiber.addObserver(() => {
        resume(Effect.void);
      });
@@ -183,7 +183,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
    const write = message => {
      switch (message._tag) {
        case "Chunk":
-@@ -221,7 +238,13 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -224,7 +241,13 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
            const requestId = message.requestId;
            const entry = entries.get(requestId);
            if (!entry || entry._tag !== "Queue") return Effect.void;
@@ -198,7 +198,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
              message: {
                _tag: "Ack",
                requestId: message.requestId
-@@ -236,11 +259,18 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
+@@ -239,11 +262,18 @@ export const makeNoSerialization = /*#__PURE__*/Effect.fnUntraced(function* (gro
            const entry = entries.get(requestId);
            if (!entry) return Effect.void;
            entries.delete(requestId);
@@ -220,7 +220,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
          }
        case "Defect":
          {
-@@ -589,7 +619,7 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
+@@ -592,7 +622,7 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
    const requestClientMap = new Map();
    const write = yield* socket.writer;
    let parser = serialization.makeUnsafe();
@@ -229,7 +229,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
    let currentError;
    const onOpen = Effect.suspend(() => {
      currentError = undefined;
-@@ -609,8 +639,7 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
+@@ -619,8 +649,7 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
            body: () => {
              const response = responses[i++];
              if (response._tag === "Pong") {
@@ -237,9 +237,9 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
 -              return Effect.void;
 +              return pinger.onPong;
              }
-             if ("requestId" in response) {
-               const clientId = requestClientMap.get(response.requestId);
-@@ -638,12 +667,12 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
+             if (Object.hasOwn(response, "requestId")) {
+               const requestId = response.requestId;
+@@ -649,12 +678,12 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
        }
      }, {
        onOpen
@@ -254,7 +254,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
    }).pipe(Effect.flatMap(() => Effect.fail(new Socket.SocketError({
      reason: new Socket.SocketCloseError({
        code: 1000
-@@ -685,20 +714,20 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
+@@ -698,20 +727,20 @@ export const makeProtocolSocket = options => Protocol.make(Effect.fnUntraced(fun
    };
  }));
  const defaultRetryPolicy = /*#__PURE__*/Schedule.min([/*#__PURE__*/Schedule.exponential(500, 1.5), /*#__PURE__*/Schedule.spaced(5000)]);
@@ -279,7 +279,7 @@ index 5b6f00559cb5468d27e0cd67e37ff6d694d8762b..e1241ecf93b09b216e0a81aa3ffb3ab3
    }).pipe(Effect.delay("5 seconds"), Effect.ignore, Effect.forever, Effect.interruptible, Effect.forkScoped);
    return {
      timeout: latch.await,
-@@ -841,6 +870,11 @@ export const makeProtocolWorker = options => Protocol.make(Effect.fnUntraced(fun
+@@ -859,6 +888,11 @@ export const makeProtocolWorker = options => Protocol.make(Effect.fnUntraced(fun
   * @since 4.0.0
   */
  export const layerProtocolWorker = /*#__PURE__*/flow(makeProtocolWorker, /*#__PURE__*/Layer.effect(Protocol));
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 40007a78..55ce1ba2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,8 +13,8 @@ catalogs:
       specifier: ^0.121.0
       version: 0.121.0
     '@effect/openapi-generator':
-      specifier: 4.0.0-beta.98
-      version: 4.0.0-beta.98
+      specifier: 4.0.0-beta.107
+      version: 4.0.0-beta.107
     '@effect/tsgo':
       specifier: 0.13.2
       version: 0.13.2
@@ -41,16 +41,16 @@ catalogs:
       version: 0.3.0
 
 overrides:
-  '@effect/atom-react': 4.0.0-beta.98
-  '@effect/platform-bun': 4.0.0-beta.98
-  '@effect/platform-node': 4.0.0-beta.98
-  '@effect/platform-node-shared': 4.0.0-beta.98
-  '@effect/sql-sqlite-bun': 4.0.0-beta.97
-  '@effect/vitest': 4.0.0-beta.97
+  '@effect/atom-react': 4.0.0-beta.107
+  '@effect/platform-bun': 4.0.0-beta.107
+  '@effect/platform-node': 4.0.0-beta.107
+  '@effect/platform-node-shared': 4.0.0-beta.107
+  '@effect/sql-sqlite-bun': 4.0.0-beta.107
+  '@effect/vitest': 4.0.0-beta.107
   '@hono/node-server': 2.0.11
   '@types/node': ^24.10.13
   brace-expansion: 5.0.9
-  effect: 4.0.0-beta.98
+  effect: 4.0.0-beta.107
   fast-uri: 3.1.5
   js-yaml@4: 4.3.1
   postcss: 8.5.23
@@ -65,21 +65,12 @@ overrides:
 packageExtensionsChecksum: sha256-q5WdBF7BCWKzly/tgcivWtVAQ00t1e/WaEGl0+mhjaI=
 
 patchedDependencies:
-  '@effect/platform-bun@4.0.0-beta.98':
-    hash: 9fc1610289fc4eec0a69d930d8a359b7a4b1055920b831ba4bf91223be7a0e04
-    path: patches/@effect__platform-bun@4.0.0-beta.98.patch
-  '@effect/platform-node-shared@4.0.0-beta.98':
-    hash: 32a956569b355a7617af71fb5384e5ad2e40a302999506093492facea434779c
-    path: patches/@effect__platform-node-shared@4.0.0-beta.98.patch
-  '@effect/platform-node@4.0.0-beta.98':
-    hash: 0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19
-    path: patches/@effect__platform-node@4.0.0-beta.98.patch
   brace-expansion@5.0.9:
     hash: 954a7d16cd35f4b31756829c2e8a16c3f3fe0b89d8d69fbfe8d79b9a322f8275
     path: patches/brace-expansion@5.0.9.patch
-  effect@4.0.0-beta.98:
-    hash: d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933
-    path: patches/effect@4.0.0-beta.98.patch
+  effect@4.0.0-beta.107:
+    hash: ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb
+    path: patches/effect@4.0.0-beta.107.patch
   lexical@0.49.0:
     hash: 9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc
     path: patches/lexical@0.49.0.patch
@@ -110,8 +101,8 @@ importers:
   apps/desktop:
     dependencies:
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@threadlines/contracts':
         specifier: workspace:*
         version: link:../../packages/contracts
@@ -125,8 +116,8 @@ importers:
         specifier: workspace:*
         version: link:../../packages/tailscale
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       electron:
         specifier: 43.1.0
         version: 43.1.0
@@ -135,8 +126,8 @@ importers:
         version: 6.8.9
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -157,7 +148,7 @@ importers:
         version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   apps/marketing:
     dependencies:
@@ -179,10 +170,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
 
   apps/relay-worker:
     dependencies:
@@ -201,7 +192,7 @@ importers:
         version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
       wrangler:
         specifier: ^4.127.0
         version: 4.127.0(@types/node@24.13.3)
@@ -215,17 +206,17 @@ importers:
         specifier: 'catalog:'
         version: 0.121.0(zod@4.4.3)
       '@effect/platform-bun':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=9fc1610289fc4eec0a69d930d8a359b7a4b1055920b831ba4bf91223be7a0e04)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@effect/platform-node-shared':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=32a956569b355a7617af71fb5384e5ad2e40a302999506093492facea434779c)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
       '@effect/sql-sqlite-bun':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
       '@opencode-ai/sdk':
         specifier: ^1.18.23
         version: 1.18.23
@@ -233,15 +224,15 @@ importers:
         specifier: 'catalog:'
         version: 1.3.6(@shikijs/themes@4.4.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       node-pty:
         specifier: ^1.1.0
         version: 1.1.0
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@threadlines/contracts':
         specifier: workspace:*
         version: link:../../packages/contracts
@@ -274,10 +265,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   apps/web:
     dependencies:
@@ -297,8 +288,8 @@ importers:
         specifier: ^3.2.2
         version: 3.2.2(react@19.2.8)
       '@effect/atom-react':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(react@19.2.8)(scheduler@0.27.0)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(react@19.2.8)(scheduler@0.27.0)
       '@fontsource-variable/cascadia-mono':
         specifier: ^5.3.0
         version: 5.3.0
@@ -342,8 +333,8 @@ importers:
         specifier: ^0.7.1
         version: 0.7.1
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       lexical:
         specifier: ^0.49.0
         version: 0.49.0(patch_hash=9e84123f6620009ea644f3d7fc7bdaf50dff26dda4c87a7f973073048e10edbc)(typescript@7.0.2)
@@ -416,7 +407,7 @@ importers:
         version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
       vitest-browser-react:
         specifier: ^2.0.5
         version: 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.11)
@@ -424,18 +415,18 @@ importers:
   oxlint-plugin-threadlines:
     dependencies:
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@oxlint/plugins':
         specifier: ^1.79.0
         version: 1.79.0
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       oxlint:
         specifier: ^1.79.0
         version: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
@@ -450,7 +441,7 @@ importers:
         version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/client-runtime:
     dependencies:
@@ -461,8 +452,8 @@ importers:
         specifier: workspace:*
         version: link:../shared
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       typescript:
         specifier: 'catalog:'
@@ -472,20 +463,20 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/contracts:
     dependencies:
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       typescript:
         specifier: 'catalog:'
         version: 7.0.2
@@ -497,23 +488,23 @@ importers:
         version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/effect-acp:
     dependencies:
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/openapi-generator':
         specifier: 'catalog:'
-        version: 4.0.0-beta.98(@effect/platform-node@4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1))(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
+        version: 4.0.0-beta.107(@effect/platform-node@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1))(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -525,26 +516,26 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/effect-codex-app-server:
     dependencies:
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/openapi-generator':
         specifier: 'catalog:'
-        version: 4.0.0-beta.98(@effect/platform-node@4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1))(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
+        version: 4.0.0-beta.107(@effect/platform-node@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1))(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -556,10 +547,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/shared:
     dependencies:
@@ -567,18 +558,18 @@ importers:
         specifier: workspace:*
         version: link:../contracts
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       yaml:
         specifier: ^2.9.0
         version: 2.9.0
     devDependencies:
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -590,10 +581,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/ssh:
     dependencies:
@@ -604,15 +595,15 @@ importers:
         specifier: workspace:*
         version: link:../shared
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -624,23 +615,23 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   packages/tailscale:
     dependencies:
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       '@types/node':
         specifier: ^24.10.13
         version: 24.13.3
@@ -652,10 +643,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   scripts:
     dependencies:
@@ -666,8 +657,8 @@ importers:
         specifier: 'catalog:'
         version: 0.121.0(zod@4.4.3)
       '@effect/platform-node':
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
       '@github/copilot-sdk':
         specifier: 'catalog:'
         version: 1.0.11
@@ -678,15 +669,15 @@ importers:
         specifier: workspace:*
         version: link:../packages/shared
       effect:
-        specifier: 4.0.0-beta.98
-        version: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       yaml:
         specifier: ^2.9.0
         version: 2.9.0
     devDependencies:
       '@effect/vitest':
-        specifier: 4.0.0-beta.97
-        version: 4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)
+        specifier: 4.0.0-beta.107
+        version: 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)
       typescript:
         specifier: 'catalog:'
         version: 7.0.2
@@ -695,10 +686,10 @@ importers:
         version: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
       vite-plus:
         specifier: 'catalog:'
-        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+        version: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
       vitest:
         specifier: 4.1.11
-        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+        version: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
 packages:
 
@@ -1100,42 +1091,42 @@ packages:
     peerDependencies:
       react: '>=16.8.0'
 
-  '@effect/atom-react@4.0.0-beta.98':
-    resolution: {integrity: sha512-M7BMiXyJZ1sSOwkipkF8/yNYoAp5WA6xhD0u8wobI6h9OIQp5oxx+AvE4FCj0wmfexAsUZPfZ4McCXstXYskbg==}
+  '@effect/atom-react@4.0.0-beta.107':
+    resolution: {integrity: sha512-dSx8Mmgge8oy3On8k95V3dyaRo9od8Eg0our56PIrTlRZBBRLXM2vc/X7GsxAYtHs2PMracVFUJqizXCcPsCyQ==}
     peerDependencies:
-      effect: 4.0.0-beta.98
-      react: ^19.2.4
-      scheduler: '*'
+      effect: 4.0.0-beta.107
+      react: '>=19.2.7 <20.0.0'
+      scheduler: '>=0.27.0 <0.28.0'
 
-  '@effect/openapi-generator@4.0.0-beta.98':
-    resolution: {integrity: sha512-7bqawr/HqJWqQ8H/bHyzBlLPA3LIIm3Y+cGYlIxnC/QVK795QpiEXb7uxTnP7V7w49V0sBtTerv4/9ZjsMffLQ==}
+  '@effect/openapi-generator@4.0.0-beta.107':
+    resolution: {integrity: sha512-qw3h8mUxtgjppJRq28HFO1YWbWUFJ4j6XaCk7n3AyARuV+1EGQRy7yWuWko/ZwGYzPUd4o8mUtG3APjyl7EOfg==}
     hasBin: true
     peerDependencies:
-      '@effect/platform-node': 4.0.0-beta.98
-      effect: 4.0.0-beta.98
+      '@effect/platform-node': 4.0.0-beta.107
+      effect: 4.0.0-beta.107
 
-  '@effect/platform-bun@4.0.0-beta.98':
-    resolution: {integrity: sha512-QorRKhvwHDPwvE8lH5lE0r0dI2z+zj12VUN4h7hfoIunKUiXSoSOMZqF3w13W30RpV6ivsvJywUycaa/18yMPA==}
+  '@effect/platform-bun@4.0.0-beta.107':
+    resolution: {integrity: sha512-nDKutCpgr+xHQX7tgN8Cq6JXtj96GqiElKaJ7AwAkZYl2q9f6onc/3aJgl6CyH/DlUoidw6YaxeU+UaTRmMN1g==}
     peerDependencies:
-      effect: 4.0.0-beta.98
+      effect: 4.0.0-beta.107
 
-  '@effect/platform-node-shared@4.0.0-beta.98':
-    resolution: {integrity: sha512-iySXaffnCJX1sNAIp79ghhIeui9E5qwUQyqd1VLPkB9UNO4vdpd9B5fTEXwe7S/GusL4jsk9vSvX38XJgRFG1w==}
+  '@effect/platform-node-shared@4.0.0-beta.107':
+    resolution: {integrity: sha512-y6BqcRi86BfTJv+tvDrob4ozYVHxxlHYcn/zIQqZjXI9CvKnkgD6ng+38G1o45c4f2ucU+6HRI9POCmFdMoVGA==}
     engines: {node: '>=18.0.0'}
     peerDependencies:
-      effect: 4.0.0-beta.98
+      effect: 4.0.0-beta.107
 
-  '@effect/platform-node@4.0.0-beta.98':
-    resolution: {integrity: sha512-IQu1TiLXQEDSGkDBllyYjVadf+UqdjptryqX4mmktVTTbGDq7X4uVxe7cSgXuqZvyfG6kagTzwj2lfynxOaKQg==}
+  '@effect/platform-node@4.0.0-beta.107':
+    resolution: {integrity: sha512-k+6YNbV4Ck0L6YXtlgkvEnuP5tlxWD8EeWOrpn46PDqbGEwt4ONpRltTwm3tn2cyBXD0i+2P11cUH/6sdFagTA==}
     engines: {node: '>=18.0.0'}
     peerDependencies:
-      effect: 4.0.0-beta.98
-      ioredis: ^5.7.0
+      effect: 4.0.0-beta.107
+      ioredis: '>=5.7.0 <6.0.0'
 
-  '@effect/sql-sqlite-bun@4.0.0-beta.97':
-    resolution: {integrity: sha512-bLEcfiYoW1tQTmBU21/DBbNBlZ7kz5gTAr99OlGL9ObvdmCU64KnzR+vyPFsOACW6/+Yx5goNZICFoUoNjEGug==}
+  '@effect/sql-sqlite-bun@4.0.0-beta.107':
+    resolution: {integrity: sha512-BuSSCUoXz6JSR30wT4Y0ukmJKvIFhm/gROwEeA0nLO5QYf33CdTunwX+q35+/MNOOLT8jL3xaDsz5R5aAF1vYQ==}
     peerDependencies:
-      effect: 4.0.0-beta.98
+      effect: 4.0.0-beta.107
 
   '@effect/tsgo-darwin-arm64@0.13.2':
     resolution: {integrity: sha512-AlYlxU2sD3urNCmNCQWtatPJS/+m2r3CvgZdDTs9KEz2YcyQc2GV1g2RWFkoMwmgzYBx69DBLu1oscqJO2qAog==}
@@ -1176,10 +1167,10 @@ packages:
     resolution: {integrity: sha512-zPQMHBdCN1k7Jbxjxq0HVAbzsZd+LAoRPzBEZ3F4y/uxNK0K/XGvFXUUw/CUAsD6rhUtC2VahZY1tp0owb5lgg==}
     hasBin: true
 
-  '@effect/vitest@4.0.0-beta.97':
-    resolution: {integrity: sha512-1dH6LBWSZyqnTV7ZO+yIpPGPf/xd7RtFfvQ4ZpTy9elzFN+wr1YBFpHSCr8+BfXOml6b8g9Mtj5eDy1qjbizUA==}
+  '@effect/vitest@4.0.0-beta.107':
+    resolution: {integrity: sha512-n4/qsx4DnT4dEI/wNgMivxyUeJoeiU1TCSz0WnoHWk/dny40Oxjip2P9IXGQDgPb9fsYVnerF0QRA6nPUuExQA==}
     peerDependencies:
-      effect: 4.0.0-beta.98
+      effect: 4.0.0-beta.107
       vitest: 4.1.11
 
   '@electron-internal/extract-zip@1.0.4':
@@ -4047,8 +4038,8 @@ packages:
   ee-first@1.1.1:
     resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
 
-  effect@4.0.0-beta.98:
-    resolution: {integrity: sha512-oz+bsG5h+6RNrw4t5GMfQrk/xBS8ROoqkYsuvRhBr5O7mCOrpvH/hbw+QrDzvKIpX4HJClwm86F94c87W0sJxg==}
+  effect@4.0.0-beta.107:
+    resolution: {integrity: sha512-OoBAv8eF+yanc+C6xhgEUnWeXUSHA6ynnscYqpkAY9GSnzZWystsIjBowVqCkLpHGlnRtdIqYT3wHwpOY6JDnQ==}
 
   ejs@3.1.10:
     resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==}
@@ -4251,9 +4242,6 @@ packages:
     resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==}
     engines: {node: '>= 18.0.0'}
 
-  find-my-way-ts@0.1.6:
-    resolution: {integrity: sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==}
-
   find-proc@0.1.0:
     resolution: {integrity: sha512-OaOpEYv2PiQ7SQ5LIrl+deA1XaWcxEjnpM6VuWXTUvn+teIXxeFTLDmu18/zDQpFmHN4o3oDBX+BT0AGwEhemg==}
     engines: {node: ^20.19.0 || >=22.12.0}
@@ -4463,10 +4451,6 @@ packages:
   inherits@2.0.4:
     resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
 
-  ini@7.0.0:
-    resolution: {integrity: sha512-ifK0CgjALofS5bkrcTy4RaQ9Vx2Knf/eLeIO+NaswQEpH1UblrtTSCIvN71qQDMq0PeQ/SSPojvEJp9vvvfr+w==}
-    engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0}
-
   inline-style-parser@0.2.7:
     resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==}
 
@@ -5070,9 +5054,6 @@ packages:
   muggle-string@0.4.1:
     resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==}
 
-  multipasta@0.2.8:
-    resolution: {integrity: sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==}
-
   mute-stream@3.0.0:
     resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==}
     engines: {node: ^20.17.0 || >=22.9.0}
@@ -5871,10 +5852,6 @@ packages:
     resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
     engines: {node: '>=0.6'}
 
-  toml@4.1.2:
-    resolution: {integrity: sha512-m0vXfHODcw3gk+KONAOlVQ5yNHc3yS3B1ybM3HS1vqDoS0RWTDDVBVVTYi8hH0k+2OM1vmo9fb1WX9EVqjqfHA==}
-    engines: {node: '>=20'}
-
   totalist@3.0.1:
     resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
     engines: {node: '>=6'}
@@ -6899,41 +6876,41 @@ snapshots:
       react: 19.2.8
       tslib: 2.8.1
 
-  '@effect/atom-react@4.0.0-beta.98(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(react@19.2.8)(scheduler@0.27.0)':
+  '@effect/atom-react@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(react@19.2.8)(scheduler@0.27.0)':
     dependencies:
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       react: 19.2.8
       scheduler: 0.27.0
 
-  '@effect/openapi-generator@4.0.0-beta.98(@effect/platform-node@4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1))(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))':
+  '@effect/openapi-generator@4.0.0-beta.107(@effect/platform-node@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1))(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))':
     dependencies:
-      '@effect/platform-node': 4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      '@effect/platform-node': 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       swagger2openapi: 7.0.8
     transitivePeerDependencies:
       - encoding
 
-  '@effect/platform-bun@4.0.0-beta.98(patch_hash=9fc1610289fc4eec0a69d930d8a359b7a4b1055920b831ba4bf91223be7a0e04)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))':
+  '@effect/platform-bun@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))':
     dependencies:
-      '@effect/platform-node-shared': 4.0.0-beta.98(patch_hash=32a956569b355a7617af71fb5384e5ad2e40a302999506093492facea434779c)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      '@effect/platform-node-shared': 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
     transitivePeerDependencies:
       - bufferutil
       - utf-8-validate
 
-  '@effect/platform-node-shared@4.0.0-beta.98(patch_hash=32a956569b355a7617af71fb5384e5ad2e40a302999506093492facea434779c)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))':
+  '@effect/platform-node-shared@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))':
     dependencies:
       '@types/ws': 8.18.1
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
-      ws: 8.21.0
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
+      ws: 8.21.3
     transitivePeerDependencies:
       - bufferutil
       - utf-8-validate
 
-  '@effect/platform-node@4.0.0-beta.98(patch_hash=0e9f397f8e2ec9aef8e8d4f212b219732c48e5980d32035adad5764f3c56dc19)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(ioredis@5.11.1)':
+  '@effect/platform-node@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(ioredis@5.11.1)':
     dependencies:
-      '@effect/platform-node-shared': 4.0.0-beta.98(patch_hash=32a956569b355a7617af71fb5384e5ad2e40a302999506093492facea434779c)(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      '@effect/platform-node-shared': 4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       ioredis: 5.11.1
       mime: 4.1.0
       undici: 8.10.0
@@ -6941,9 +6918,9 @@ snapshots:
       - bufferutil
       - utf-8-validate
 
-  '@effect/sql-sqlite-bun@4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))':
+  '@effect/sql-sqlite-bun@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))':
     dependencies:
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
 
   '@effect/tsgo-darwin-arm64@0.13.2':
     optional: true
@@ -6976,9 +6953,9 @@ snapshots:
       '@effect/tsgo-win32-arm64': 0.13.2
       '@effect/tsgo-win32-x64': 0.13.2
 
-  '@effect/vitest@4.0.0-beta.97(effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933))(vitest@4.1.11)':
+  '@effect/vitest@4.0.0-beta.107(effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb))(vitest@4.1.11)':
     dependencies:
-      effect: 4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933)
+      effect: 4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb)
       vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
 
   '@electron-internal/extract-zip@1.0.4': {}
@@ -8648,7 +8625,7 @@ snapshots:
       '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
       playwright: 1.62.1
       tinyrainbow: 3.1.1
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
+      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
     transitivePeerDependencies:
       - bufferutil
       - msw
@@ -8674,7 +8651,7 @@ snapshots:
       '@testing-library/dom': 10.4.1
       '@testing-library/user-event': 14.6.1(@testing-library/dom@10.4.1)
       '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vitest@4.1.11)
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
+      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
     transitivePeerDependencies:
       - bufferutil
       - msw
@@ -8702,7 +8679,7 @@ snapshots:
       pngjs: 7.0.0
       sirv: 3.0.2
       tinyrainbow: 3.1.1
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
+      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
       ws: 8.21.3
     transitivePeerDependencies:
       - bufferutil
@@ -9573,18 +9550,13 @@ snapshots:
 
   ee-first@1.1.1: {}
 
-  effect@4.0.0-beta.98(patch_hash=d3f9d7cfbb82a1137d9f5034d2d491aebcfb6386c6e26886eada7c5671c4d933):
+  effect@4.0.0-beta.107(patch_hash=ccee8481ed28c1fa1bb88e1ad0787aea2596f3d866b9b70fe04da9e6a38ce2cb):
     dependencies:
       '@standard-schema/spec': 1.1.0
       fast-check: 4.9.0
-      find-my-way-ts: 0.1.6
-      ini: 7.0.0
       kubernetes-types: 1.30.0
       msgpackr: 2.0.4
-      multipasta: 0.2.8
-      toml: 4.1.2
       uuid: 14.0.1
-      yaml: 2.9.0
 
   ejs@3.1.10:
     dependencies:
@@ -9887,8 +9859,6 @@ snapshots:
     transitivePeerDependencies:
       - supports-color
 
-  find-my-way-ts@0.1.6: {}
-
   find-proc@0.1.0: {}
 
   flattie@1.1.1: {}
@@ -10166,8 +10136,6 @@ snapshots:
 
   inherits@2.0.4: {}
 
-  ini@7.0.0: {}
-
   inline-style-parser@0.2.7: {}
 
   ioredis@5.11.1:
@@ -10946,8 +10914,6 @@ snapshots:
 
   muggle-string@0.4.1: {}
 
-  multipasta@0.2.8: {}
-
   mute-stream@3.0.0: {}
 
   nanoid@3.3.17: {}
@@ -11092,7 +11058,7 @@ snapshots:
 
   outvariant@1.4.3: {}
 
-  oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
+  oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)):
     dependencies:
       tinypool: 2.1.0
     optionalDependencies:
@@ -11115,34 +11081,9 @@ snapshots:
       '@oxfmt/binding-win32-arm64-msvc': 0.64.0
       '@oxfmt/binding-win32-ia32-msvc': 0.64.0
       '@oxfmt/binding-win32-x64-msvc': 0.64.0
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
 
-  oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)):
-    dependencies:
-      tinypool: 2.1.0
-    optionalDependencies:
-      '@oxfmt/binding-android-arm-eabi': 0.64.0
-      '@oxfmt/binding-android-arm64': 0.64.0
-      '@oxfmt/binding-darwin-arm64': 0.64.0
-      '@oxfmt/binding-darwin-x64': 0.64.0
-      '@oxfmt/binding-freebsd-x64': 0.64.0
-      '@oxfmt/binding-linux-arm-gnueabihf': 0.64.0
-      '@oxfmt/binding-linux-arm-musleabihf': 0.64.0
-      '@oxfmt/binding-linux-arm64-gnu': 0.64.0
-      '@oxfmt/binding-linux-arm64-musl': 0.64.0
-      '@oxfmt/binding-linux-ppc64-gnu': 0.64.0
-      '@oxfmt/binding-linux-riscv64-gnu': 0.64.0
-      '@oxfmt/binding-linux-riscv64-musl': 0.64.0
-      '@oxfmt/binding-linux-s390x-gnu': 0.64.0
-      '@oxfmt/binding-linux-x64-gnu': 0.64.0
-      '@oxfmt/binding-linux-x64-musl': 0.64.0
-      '@oxfmt/binding-openharmony-arm64': 0.64.0
-      '@oxfmt/binding-win32-arm64-msvc': 0.64.0
-      '@oxfmt/binding-win32-ia32-msvc': 0.64.0
-      '@oxfmt/binding-win32-x64-msvc': 0.64.0
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
-
-  oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
+  oxfmt@0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
     dependencies:
       tinypool: 2.1.0
     optionalDependencies:
@@ -11165,7 +11106,7 @@ snapshots:
       '@oxfmt/binding-win32-arm64-msvc': 0.64.0
       '@oxfmt/binding-win32-ia32-msvc': 0.64.0
       '@oxfmt/binding-win32-x64-msvc': 0.64.0
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
 
   oxlint-tsgolint@7.0.2001:
     optionalDependencies:
@@ -11176,7 +11117,7 @@ snapshots:
       '@oxlint-tsgolint/win32-arm64': 7.0.2001
       '@oxlint-tsgolint/win32-x64': 7.0.2001
 
-  oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
+  oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)):
     optionalDependencies:
       '@oxlint/binding-android-arm-eabi': 1.79.0
       '@oxlint/binding-android-arm64': 1.79.0
@@ -11198,33 +11139,9 @@ snapshots:
       '@oxlint/binding-win32-ia32-msvc': 1.79.0
       '@oxlint/binding-win32-x64-msvc': 1.79.0
       oxlint-tsgolint: 7.0.2001
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
 
-  oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)):
-    optionalDependencies:
-      '@oxlint/binding-android-arm-eabi': 1.79.0
-      '@oxlint/binding-android-arm64': 1.79.0
-      '@oxlint/binding-darwin-arm64': 1.79.0
-      '@oxlint/binding-darwin-x64': 1.79.0
-      '@oxlint/binding-freebsd-x64': 1.79.0
-      '@oxlint/binding-linux-arm-gnueabihf': 1.79.0
-      '@oxlint/binding-linux-arm-musleabihf': 1.79.0
-      '@oxlint/binding-linux-arm64-gnu': 1.79.0
-      '@oxlint/binding-linux-arm64-musl': 1.79.0
-      '@oxlint/binding-linux-ppc64-gnu': 1.79.0
-      '@oxlint/binding-linux-riscv64-gnu': 1.79.0
-      '@oxlint/binding-linux-riscv64-musl': 1.79.0
-      '@oxlint/binding-linux-s390x-gnu': 1.79.0
-      '@oxlint/binding-linux-x64-gnu': 1.79.0
-      '@oxlint/binding-linux-x64-musl': 1.79.0
-      '@oxlint/binding-openharmony-arm64': 1.79.0
-      '@oxlint/binding-win32-arm64-msvc': 1.79.0
-      '@oxlint/binding-win32-ia32-msvc': 1.79.0
-      '@oxlint/binding-win32-x64-msvc': 1.79.0
-      oxlint-tsgolint: 7.0.2001
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0)
-
-  oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
+  oxlint@1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)):
     optionalDependencies:
       '@oxlint/binding-android-arm-eabi': 1.79.0
       '@oxlint/binding-android-arm64': 1.79.0
@@ -11246,7 +11163,7 @@ snapshots:
       '@oxlint/binding-win32-ia32-msvc': 1.79.0
       '@oxlint/binding-win32-x64-msvc': 1.79.0
       oxlint-tsgolint: 7.0.2001
-      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
+      vite-plus: 0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0)
 
   p-cancelable@2.1.1: {}
 
@@ -11966,8 +11883,6 @@ snapshots:
 
   toidentifier@1.0.1: {}
 
-  toml@4.1.2: {}
-
   totalist@3.0.1: {}
 
   tough-cookie@6.0.2:
@@ -12156,66 +12071,7 @@ snapshots:
       '@types/unist': 3.0.3
       vfile-message: 4.0.3
 
-  vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0):
-    dependencies:
-      '@oxc-project/types': 0.146.0
-      '@oxlint/plugins': 1.79.0
-      '@vitest/browser': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)
-      '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)
-      '@vitest/expect': 4.1.11
-      '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
-      '@vitest/pretty-format': 4.1.11
-      '@vitest/runner': 4.1.11
-      '@vitest/snapshot': 4.1.11
-      '@vitest/spy': 4.1.11
-      '@vitest/utils': 4.1.11
-      '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)
-      oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
-      oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
-      oxlint-tsgolint: 7.0.2001
-      vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
-    optionalDependencies:
-      '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11)
-      '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0
-      '@voidzero-dev/vite-plus-darwin-x64': 0.3.0
-      '@voidzero-dev/vite-plus-linux-arm64-gnu': 0.3.0
-      '@voidzero-dev/vite-plus-linux-arm64-musl': 0.3.0
-      '@voidzero-dev/vite-plus-linux-x64-gnu': 0.3.0
-      '@voidzero-dev/vite-plus-linux-x64-musl': 0.3.0
-      '@voidzero-dev/vite-plus-win32-arm64-msvc': 0.3.0
-      '@voidzero-dev/vite-plus-win32-x64-msvc': 0.3.0
-    transitivePeerDependencies:
-      - '@arethetypeswrong/core'
-      - '@edge-runtime/vm'
-      - '@opentelemetry/api'
-      - '@types/node'
-      - '@vitejs/devtools'
-      - '@vitest/coverage-istanbul'
-      - '@vitest/coverage-v8'
-      - '@vitest/ui'
-      - bufferutil
-      - esbuild
-      - happy-dom
-      - jiti
-      - jsdom
-      - less
-      - msw
-      - publint
-      - sass
-      - sass-embedded
-      - stylus
-      - sugarss
-      - svelte
-      - terser
-      - tsx
-      - typescript
-      - unplugin-unused
-      - unrun
-      - utf-8-validate
-      - yaml
-
-  vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0):
+  vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0):
     dependencies:
       '@oxc-project/types': 0.146.0
       '@oxlint/plugins': 1.79.0
@@ -12229,11 +12085,11 @@ snapshots:
       '@vitest/spy': 4.1.11
       '@vitest/utils': 4.1.11
       '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)
-      oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0))
-      oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0))
+      oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0))
+      oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(typescript@5.9.3)(yaml@2.9.0))
       oxlint-tsgolint: 7.0.2001
       vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0)'
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
+      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
     optionalDependencies:
       '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11)
       '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0
@@ -12274,7 +12130,7 @@ snapshots:
       - utf-8-validate
       - yaml
 
-  vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0):
+  vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0):
     dependencies:
       '@oxc-project/types': 0.146.0
       '@oxlint/plugins': 1.79.0
@@ -12288,11 +12144,11 @@ snapshots:
       '@vitest/spy': 4.1.11
       '@vitest/utils': 4.1.11
       '@voidzero-dev/vite-plus-core': 0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)
-      oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
-      oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
+      oxfmt: 0.64.0(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
+      oxlint: 1.79.0(oxlint-tsgolint@7.0.2001)(vite-plus@0.3.0(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(esbuild@0.28.2)(jiti@2.7.0)(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(typescript@7.0.2)(yaml@2.9.0))
       oxlint-tsgolint: 7.0.2001
       vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
-      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
+      vitest: 4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
     optionalDependencies:
       '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11)
       '@voidzero-dev/vite-plus-darwin-arm64': 0.3.0
@@ -12346,36 +12202,7 @@ snapshots:
       '@types/react': 19.2.18
       '@types/react-dom': 19.2.5(@types/react@19.2.18)
 
-  vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)):
-    dependencies:
-      '@vitest/expect': 4.1.11
-      '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
-      '@vitest/pretty-format': 4.1.11
-      '@vitest/runner': 4.1.11
-      '@vitest/snapshot': 4.1.11
-      '@vitest/spy': 4.1.11
-      '@vitest/utils': 4.1.11
-      es-module-lexer: 2.3.2
-      expect-type: 1.4.0
-      magic-string: 0.30.21
-      obug: 2.1.4
-      pathe: 2.0.3
-      picomatch: 4.0.7
-      std-env: 4.2.0
-      tinybench: 2.9.0
-      tinyexec: 1.3.0
-      tinyglobby: 0.2.17
-      tinyrainbow: 3.1.1
-      vite: '@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0)'
-      why-is-node-running: 2.3.0
-    optionalDependencies:
-      '@types/node': 24.13.3
-      '@vitest/browser-playwright': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11)
-      '@vitest/browser-preview': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(vitest@4.1.11)
-    transitivePeerDependencies:
-      - msw
-
-  vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)):
+  vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3)):
     dependencies:
       '@vitest/expect': 4.1.11
       '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@5.9.3)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))
@@ -12404,7 +12231,7 @@ snapshots:
     transitivePeerDependencies:
       - msw
 
-  vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11)(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)):
+  vitest@4.1.11(@types/node@24.13.3)(@vitest/browser-playwright@4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))(playwright@1.62.1)(vitest@4.1.11))(@vitest/browser-preview@4.1.11)(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2)):
     dependencies:
       '@vitest/expect': 4.1.11
       '@vitest/mocker': 4.1.11(@voidzero-dev/vite-plus-core@0.3.0(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.0))(msw@2.15.0(@types/node@24.13.3)(typescript@7.0.2))
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 9a3a187e..794bf6ff 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -7,21 +7,21 @@ packages:
 catalog:
   "@anthropic-ai/claude-agent-sdk": ^0.3.247
   "@anthropic-ai/sdk": ^0.121.0
-  "@effect/atom-react": 4.0.0-beta.98
-  "@effect/openapi-generator": 4.0.0-beta.98
-  "@effect/platform-bun": 4.0.0-beta.98
-  "@effect/platform-node": 4.0.0-beta.98
-  "@effect/platform-node-shared": 4.0.0-beta.98
-  "@effect/sql-sqlite-bun": 4.0.0-beta.97
+  "@effect/atom-react": 4.0.0-beta.107
+  "@effect/openapi-generator": 4.0.0-beta.107
+  "@effect/platform-bun": 4.0.0-beta.107
+  "@effect/platform-node": 4.0.0-beta.107
+  "@effect/platform-node-shared": 4.0.0-beta.107
+  "@effect/sql-sqlite-bun": 4.0.0-beta.107
   "@effect/tsgo": 0.13.2
-  "@effect/vitest": 4.0.0-beta.97
+  "@effect/vitest": 4.0.0-beta.107
   "@github/copilot-sdk": 1.0.11
   "@pierre/diffs": 1.3.6
   "@types/bun": ^1.4.0
   "@types/node": ^24.10.13
   "@typescript/native-preview": 7.0.0-dev.20260707.2
   "@vitest/browser-playwright": 4.1.11
-  effect: 4.0.0-beta.98
+  effect: 4.0.0-beta.107
   typescript: ^7.0.2
   vite: npm:@voidzero-dev/vite-plus-core@0.3.0
   vite-plus: 0.3.0
@@ -66,11 +66,8 @@ packageExtensions:
       vite: "catalog:"
 
 patchedDependencies:
-  "@effect/platform-bun@4.0.0-beta.98": patches/@effect__platform-bun@4.0.0-beta.98.patch
-  "@effect/platform-node-shared@4.0.0-beta.98": patches/@effect__platform-node-shared@4.0.0-beta.98.patch
-  "@effect/platform-node@4.0.0-beta.98": patches/@effect__platform-node@4.0.0-beta.98.patch
   brace-expansion@5.0.9: patches/brace-expansion@5.0.9.patch
-  effect@4.0.0-beta.98: patches/effect@4.0.0-beta.98.patch
+  effect@4.0.0-beta.107: patches/effect@4.0.0-beta.107.patch
   lexical@0.49.0: patches/lexical@0.49.0.patch
 
 peerDependencyRules:
diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts
index d5f90578..220de8e4 100644
--- a/scripts/build-desktop-artifact.ts
+++ b/scripts/build-desktop-artifact.ts
@@ -47,7 +47,7 @@ const WorkspaceConfig = Schema.Struct({
 const RepoRoot = Effect.service(Path.Path).pipe(
   Effect.flatMap((path) => path.fromFileUrl(new URL("..", import.meta.url))),
 );
-const encodeJsonString = Schema.encodeEffect(Schema.UnknownFromJsonString);
+const encodeJsonString = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown));
 const decodeWorkspaceConfig = Schema.decodeEffect(fromYaml(WorkspaceConfig));
 
 const readWorkspaceConfig = Effect.fn("readWorkspaceConfig")(function* () {
diff --git a/scripts/update-release-package-versions.test.ts b/scripts/update-release-package-versions.test.ts
index 0abc9484..8d630ba3 100644
--- a/scripts/update-release-package-versions.test.ts
+++ b/scripts/update-release-package-versions.test.ts
@@ -166,7 +166,7 @@ it.layer(ScriptTestLayer)("update-release-package-versions", (it) => {
 
       assert.equal(
         error.message,
-        'SchemaError(Expected string, got undefined\n  at ["GITHUB_OUTPUT"])',
+        'SchemaError(Expected string\n  at ["GITHUB_OUTPUT"])',
       );
     }),
   );

From a050910f76c0dd42a17092377a8b3594413596b1 Mon Sep 17 00:00:00 2001
From: badcuban <108198679+badcuban@users.noreply.github.com>
Date: Thu, 27 Aug 2026 23:25:20 -0400
Subject: [PATCH 7/8] chore: format with vite-plus 0.3.0's oxfmt

---
 .../src/backend/DesktopBackendManager.ts      |  16 +-
 apps/server/src/auth/Layers/ServerAuth.ts     |  26 ++--
 .../src/git/GitAuthRemediationService.ts      |  30 ++--
 .../Layers/ProjectionSnapshotQuery.ts         | 146 +++++++++---------
 apps/server/src/processRunner.ts              |  12 +-
 .../src/provider/Layers/CodexAdapter.test.ts  |  41 +++--
 .../provider/Layers/ProviderService.test.ts   |  45 +++---
 .../src/provider/providerMaintenanceRunner.ts |  10 +-
 apps/server/src/terminal/Layers/Manager.ts    |  26 ++--
 .../src/workspace/Layers/WorkspaceEntries.ts  |  36 ++---
 apps/web/src/components/ChatView.tsx          |  42 ++---
 .../browser/previewAutomationHost.ts          |  10 +-
 apps/web/src/lib/providerSkillsReactQuery.ts  |  20 ++-
 apps/web/src/store.ts                         |  43 +++---
 .../threadlines-context-preview-mockups.html  |   3 +-
 packages/shared/src/qrCode.ts                 |   2 +-
 packages/shared/src/terminalCommandTracker.ts |   2 +-
 scripts/marketing-media.ts                    |  18 +--
 .../update-release-package-versions.test.ts   |   5 +-
 19 files changed, 243 insertions(+), 290 deletions(-)

diff --git a/apps/desktop/src/backend/DesktopBackendManager.ts b/apps/desktop/src/backend/DesktopBackendManager.ts
index c3de1482..05c46600 100644
--- a/apps/desktop/src/backend/DesktopBackendManager.ts
+++ b/apps/desktop/src/backend/DesktopBackendManager.ts
@@ -366,15 +366,13 @@ const makeDesktopBackendManager = Effect.fn("makeDesktopBackendManager")(functio
     Ref.update(state, withActiveRun(runId, f));
 
   const snapshot = Ref.get(state).pipe(
-    Effect.map(
-      (current): DesktopBackendSnapshot => ({
-        desiredRunning: current.desiredRunning,
-        ready: current.ready,
-        activePid: activePid(current.active),
-        restartAttempt: current.restartAttempt,
-        restartScheduled: Option.isSome(current.restartFiber),
-      }),
-    ),
+    Effect.map((current): DesktopBackendSnapshot => ({
+      desiredRunning: current.desiredRunning,
+      ready: current.ready,
+      activePid: activePid(current.active),
+      restartAttempt: current.restartAttempt,
+      restartScheduled: Option.isSome(current.restartFiber),
+    })),
   );
   const currentConfig = Ref.get(state).pipe(Effect.map((current) => current.config));
 
diff --git a/apps/server/src/auth/Layers/ServerAuth.ts b/apps/server/src/auth/Layers/ServerAuth.ts
index 57800df7..b9f0d247 100644
--- a/apps/server/src/auth/Layers/ServerAuth.ts
+++ b/apps/server/src/auth/Layers/ServerAuth.ts
@@ -197,15 +197,13 @@ export const makeServerAuth = Effect.gen(function* () {
         },
       })
       .pipe(
-        Effect.map(
-          (session): AuthenticatedSession => ({
-            sessionId: session.sessionId,
-            subject: TRUSTED_LOOPBACK_BROWSER_DEV_SUBJECT,
-            method: session.method,
-            role: session.role,
-            expiresAt: session.expiresAt,
-          }),
-        ),
+        Effect.map((session): AuthenticatedSession => ({
+          sessionId: session.sessionId,
+          subject: TRUSTED_LOOPBACK_BROWSER_DEV_SUBJECT,
+          method: session.method,
+          role: session.role,
+          expiresAt: session.expiresAt,
+        })),
         Effect.mapError(
           (cause) =>
             new AuthError({
@@ -418,12 +416,10 @@ export const makeServerAuth = Effect.gen(function* () {
       ),
       Effect.map((clientSessions) =>
         clientSessions
-          .map(
-            (clientSession): AuthClientSession => ({
-              ...clientSession,
-              current: clientSession.sessionId === currentSessionId,
-            }),
-          )
+          .map((clientSession): AuthClientSession => ({
+            ...clientSession,
+            current: clientSession.sessionId === currentSessionId,
+          }))
           .filter(
             (clientSession) => clientSession.current || !isInternalClientSession(clientSession),
           ),
diff --git a/apps/server/src/git/GitAuthRemediationService.ts b/apps/server/src/git/GitAuthRemediationService.ts
index 889671c7..7abacacf 100644
--- a/apps/server/src/git/GitAuthRemediationService.ts
+++ b/apps/server/src/git/GitAuthRemediationService.ts
@@ -125,14 +125,13 @@ export const make = Effect.fn("makeGitAuthRemediationService")(function* () {
         timeoutMs: GH_PROBE_TIMEOUT_MS,
       })
       .pipe(
-        Effect.map(
-          (result): RemediationProbe =>
-            result.exitCode === 0
-              ? { applicable: true, reason: null }
-              : {
-                  applicable: false,
-                  reason: `GitHub CLI is installed but not logged in to ${host}. Run "gh auth login" in a terminal first.`,
-                },
+        Effect.map((result): RemediationProbe =>
+          result.exitCode === 0
+            ? { applicable: true, reason: null }
+            : {
+                applicable: false,
+                reason: `GitHub CLI is installed but not logged in to ${host}. Run "gh auth login" in a terminal first.`,
+              },
         ),
         Effect.catch(() =>
           Effect.succeed({
@@ -153,14 +152,13 @@ export const make = Effect.fn("makeGitAuthRemediationService")(function* () {
         timeoutMs: SSH_PROBE_TIMEOUT_MS,
       })
       .pipe(
-        Effect.map(
-          (result): RemediationProbe =>
-            result.exitCode === 0
-              ? { applicable: true, reason: null }
-              : {
-                  applicable: false,
-                  reason: `SSH access to ${host} is not set up on this machine (no usable key).`,
-                },
+        Effect.map((result): RemediationProbe =>
+          result.exitCode === 0
+            ? { applicable: true, reason: null }
+            : {
+                applicable: false,
+                reason: `SSH access to ${host} is not set up on this machine (no usable key).`,
+              },
         ),
         Effect.catch(() =>
           Effect.succeed({
diff --git a/apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts b/apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
index e7168c86..4a51d201 100644
--- a/apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
+++ b/apps/server/src/orchestration/Layers/ProjectionSnapshotQuery.ts
@@ -2079,36 +2079,34 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
                   ),
                 threads: threadRows
                   .filter((row) => row.deletedAt === null)
-                  .map(
-                    (row): OrchestrationThreadShell => ({
-                      id: row.threadId,
-                      projectId: row.projectId,
-                      title: row.title,
-                      modelSelection: row.modelSelection,
-                      runtimeMode: row.runtimeMode,
-                      interactionMode: row.interactionMode,
-                      branch: row.branch,
-                      worktreePath: row.worktreePath,
-                      effectiveCwd: row.effectiveCwd,
-                      ...projectEffectiveCwdSource(row),
-                      goal: row.goal,
-                      voiceActive: (row.voiceActive ?? 0) > 0,
-                      latestTurn: latestTurnByThread.get(row.threadId) ?? null,
-                      createdAt: row.createdAt,
-                      updatedAt: row.updatedAt,
-                      archivedAt: row.archivedAt,
-                      pinnedAt: row.pinnedAt,
-                      doneOverride: mapThreadDoneOverride(row),
-                      lastSeenAt: row.lastSeenAt ?? null,
-                      session: sessionByThread.get(row.threadId) ?? null,
-                      latestUserMessageAt: row.latestUserMessageAt,
-                      hasPendingApprovals: row.pendingApprovalCount > 0,
-                      hasPendingUserInput: row.pendingUserInputCount > 0,
-                      hasActionableProposedPlan: row.hasActionableProposedPlan > 0,
-                      cumulativeDiffStat: mapThreadDiffStat(diffStatByThread.get(row.threadId)),
-                      diffStatBaselineTurnCount: row.diffStatBaselineTurnCount ?? 0,
-                    }),
-                  ),
+                  .map((row): OrchestrationThreadShell => ({
+                    id: row.threadId,
+                    projectId: row.projectId,
+                    title: row.title,
+                    modelSelection: row.modelSelection,
+                    runtimeMode: row.runtimeMode,
+                    interactionMode: row.interactionMode,
+                    branch: row.branch,
+                    worktreePath: row.worktreePath,
+                    effectiveCwd: row.effectiveCwd,
+                    ...projectEffectiveCwdSource(row),
+                    goal: row.goal,
+                    voiceActive: (row.voiceActive ?? 0) > 0,
+                    latestTurn: latestTurnByThread.get(row.threadId) ?? null,
+                    createdAt: row.createdAt,
+                    updatedAt: row.updatedAt,
+                    archivedAt: row.archivedAt,
+                    pinnedAt: row.pinnedAt,
+                    doneOverride: mapThreadDoneOverride(row),
+                    lastSeenAt: row.lastSeenAt ?? null,
+                    session: sessionByThread.get(row.threadId) ?? null,
+                    latestUserMessageAt: row.latestUserMessageAt,
+                    hasPendingApprovals: row.pendingApprovalCount > 0,
+                    hasPendingUserInput: row.pendingUserInputCount > 0,
+                    hasActionableProposedPlan: row.hasActionableProposedPlan > 0,
+                    cumulativeDiffStat: mapThreadDiffStat(diffStatByThread.get(row.threadId)),
+                    diffStatBaselineTurnCount: row.diffStatBaselineTurnCount ?? 0,
+                  })),
                 updatedAt: updatedAt ?? "1970-01-01T00:00:00.000Z",
               };
 
@@ -2231,36 +2229,34 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
                   .map((row) =>
                     mapProjectShellRow(row, repositoryIdentities.get(row.projectId) ?? null),
                   ),
-                threads: threadRows.map(
-                  (row): OrchestrationThreadShell => ({
-                    id: row.threadId,
-                    projectId: row.projectId,
-                    title: row.title,
-                    modelSelection: row.modelSelection,
-                    runtimeMode: row.runtimeMode,
-                    interactionMode: row.interactionMode,
-                    branch: row.branch,
-                    worktreePath: row.worktreePath,
-                    effectiveCwd: row.effectiveCwd,
-                    ...projectEffectiveCwdSource(row),
-                    goal: row.goal,
-                    voiceActive: (row.voiceActive ?? 0) > 0,
-                    latestTurn: latestTurnByThread.get(row.threadId) ?? null,
-                    createdAt: row.createdAt,
-                    updatedAt: row.updatedAt,
-                    archivedAt: row.archivedAt,
-                    pinnedAt: row.pinnedAt,
-                    doneOverride: mapThreadDoneOverride(row),
-                    lastSeenAt: row.lastSeenAt ?? null,
-                    session: sessionByThread.get(row.threadId) ?? null,
-                    latestUserMessageAt: row.latestUserMessageAt,
-                    hasPendingApprovals: row.pendingApprovalCount > 0,
-                    hasPendingUserInput: row.pendingUserInputCount > 0,
-                    hasActionableProposedPlan: row.hasActionableProposedPlan > 0,
-                    cumulativeDiffStat: mapThreadDiffStat(diffStatByThread.get(row.threadId)),
-                    diffStatBaselineTurnCount: row.diffStatBaselineTurnCount ?? 0,
-                  }),
-                ),
+                threads: threadRows.map((row): OrchestrationThreadShell => ({
+                  id: row.threadId,
+                  projectId: row.projectId,
+                  title: row.title,
+                  modelSelection: row.modelSelection,
+                  runtimeMode: row.runtimeMode,
+                  interactionMode: row.interactionMode,
+                  branch: row.branch,
+                  worktreePath: row.worktreePath,
+                  effectiveCwd: row.effectiveCwd,
+                  ...projectEffectiveCwdSource(row),
+                  goal: row.goal,
+                  voiceActive: (row.voiceActive ?? 0) > 0,
+                  latestTurn: latestTurnByThread.get(row.threadId) ?? null,
+                  createdAt: row.createdAt,
+                  updatedAt: row.updatedAt,
+                  archivedAt: row.archivedAt,
+                  pinnedAt: row.pinnedAt,
+                  doneOverride: mapThreadDoneOverride(row),
+                  lastSeenAt: row.lastSeenAt ?? null,
+                  session: sessionByThread.get(row.threadId) ?? null,
+                  latestUserMessageAt: row.latestUserMessageAt,
+                  hasPendingApprovals: row.pendingApprovalCount > 0,
+                  hasPendingUserInput: row.pendingUserInputCount > 0,
+                  hasActionableProposedPlan: row.hasActionableProposedPlan > 0,
+                  cumulativeDiffStat: mapThreadDiffStat(diffStatByThread.get(row.threadId)),
+                  diffStatBaselineTurnCount: row.diffStatBaselineTurnCount ?? 0,
+                })),
                 updatedAt: updatedAt ?? "1970-01-01T00:00:00.000Z",
               };
 
@@ -2304,12 +2300,10 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
           "ProjectionSnapshotQuery.getCounts:decodeRow",
         ),
       ),
-      Effect.map(
-        (row): ProjectionSnapshotCounts => ({
-          projectCount: row.projectCount,
-          threadCount: row.threadCount,
-        }),
-      ),
+      Effect.map((row): ProjectionSnapshotCounts => ({
+        projectCount: row.projectCount,
+        threadCount: row.threadCount,
+      })),
     );
 
   const getActiveProjectByWorkspaceRoot: ProjectionSnapshotQueryShape["getActiveProjectByWorkspaceRoot"] =
@@ -2406,17 +2400,15 @@ const makeProjectionSnapshotQuery = Effect.gen(function* () {
         projectId: threadRow.value.projectId,
         workspaceRoot: threadRow.value.workspaceRoot,
         worktreePath: threadRow.value.worktreePath,
-        checkpoints: checkpointRows.map(
-          (row): OrchestrationCheckpointSummary => ({
-            turnId: row.turnId,
-            checkpointTurnCount: row.checkpointTurnCount,
-            checkpointRef: row.checkpointRef,
-            status: row.status,
-            files: row.files,
-            assistantMessageId: row.assistantMessageId,
-            completedAt: row.completedAt,
-          }),
-        ),
+        checkpoints: checkpointRows.map((row): OrchestrationCheckpointSummary => ({
+          turnId: row.turnId,
+          checkpointTurnCount: row.checkpointTurnCount,
+          checkpointRef: row.checkpointRef,
+          status: row.status,
+          files: row.files,
+          assistantMessageId: row.assistantMessageId,
+          completedAt: row.completedAt,
+        })),
       });
     });
 
diff --git a/apps/server/src/processRunner.ts b/apps/server/src/processRunner.ts
index d27b5a3d..bab81c58 100644
--- a/apps/server/src/processRunner.ts
+++ b/apps/server/src/processRunner.ts
@@ -179,13 +179,11 @@ const collectText = Effect.fn("processRunner.collectText")(function* (input: {
         });
       },
     ),
-    Effect.map(
-      (state): CollectedUint8StreamText => ({
-        text: Buffer.concat(state.chunks, state.bytes).toString("utf8"),
-        bytes: state.bytes,
-        truncated: false,
-      }),
-    ),
+    Effect.map((state): CollectedUint8StreamText => ({
+      text: Buffer.concat(state.chunks, state.bytes).toString("utf8"),
+      bytes: state.bytes,
+      truncated: false,
+    })),
   );
 });
 
diff --git a/apps/server/src/provider/Layers/CodexAdapter.test.ts b/apps/server/src/provider/Layers/CodexAdapter.test.ts
index 10816965..43c93a4d 100644
--- a/apps/server/src/provider/Layers/CodexAdapter.test.ts
+++ b/apps/server/src/provider/Layers/CodexAdapter.test.ts
@@ -270,22 +270,21 @@ class FakeCodexRuntime implements CodexSessionRuntimeShape {
       }),
   );
 
-  public readonly interruptTurnImpl = vi.fn(
-    (_turnId?: TurnId): Promise => Promise.resolve(undefined),
+  public readonly interruptTurnImpl = vi.fn((_turnId?: TurnId): Promise =>
+    Promise.resolve(undefined),
   );
   public readonly realtimeStartImpl = vi.fn(
     (_input?: CodexSessionRuntimeRealtimeStartInput): Promise => Promise.resolve(undefined),
   );
   public readonly realtimeStopImpl = vi.fn((): Promise => Promise.resolve(undefined));
   public readonly realtimeAppendAudioImpl = vi.fn((): Promise => Promise.resolve(undefined));
-  public readonly realtimeListVoicesImpl = vi.fn(
-    (): Promise =>
-      Promise.resolve({
-        v1: ["juniper"],
-        v2: ["alloy"],
-        defaultV1: "juniper",
-        defaultV2: "alloy",
-      }),
+  public readonly realtimeListVoicesImpl = vi.fn((): Promise =>
+    Promise.resolve({
+      v1: ["juniper"],
+      v2: ["alloy"],
+      defaultV1: "juniper",
+      defaultV2: "alloy",
+    }),
   );
 
   public readonly compactContextImpl = vi.fn((): Promise => Promise.resolve(undefined));
@@ -317,12 +316,11 @@ class FakeCodexRuntime implements CodexSessionRuntimeShape {
     return Promise.resolve(undefined);
   });
 
-  public readonly readThreadImpl = vi.fn(
-    (): Promise =>
-      Promise.resolve({
-        threadId: "provider-thread-1",
-        turns: [],
-      }),
+  public readonly readThreadImpl = vi.fn((): Promise =>
+    Promise.resolve({
+      threadId: "provider-thread-1",
+      turns: [],
+    }),
   );
 
   public readonly readProviderThreadIdImpl = vi.fn(() => Promise.resolve("provider-thread-1"));
@@ -347,12 +345,11 @@ class FakeCodexRuntime implements CodexSessionRuntimeShape {
     ): Promise => Promise.resolve({ data: [] }),
   );
 
-  public readonly rollbackThreadImpl = vi.fn(
-    (_numTurns: number): Promise =>
-      Promise.resolve({
-        threadId: "provider-thread-1",
-        turns: [],
-      }),
+  public readonly rollbackThreadImpl = vi.fn((_numTurns: number): Promise =>
+    Promise.resolve({
+      threadId: "provider-thread-1",
+      turns: [],
+    }),
   );
 
   public readonly deleteThreadImpl = vi.fn((): Promise => Promise.resolve(undefined));
diff --git a/apps/server/src/provider/Layers/ProviderService.test.ts b/apps/server/src/provider/Layers/ProviderService.test.ts
index 1bdc9782..c3d29b95 100644
--- a/apps/server/src/provider/Layers/ProviderService.test.ts
+++ b/apps/server/src/provider/Layers/ProviderService.test.ts
@@ -221,11 +221,10 @@ function makeFakeCodexAdapter(provider: ProviderDriverKind = CODEX_DRIVER) {
       }),
   );
 
-  const clearThreadGoal = vi.fn(
-    (threadId: ThreadId): Effect.Effect =>
-      Effect.sync(() => {
-        goals.delete(threadId);
-      }),
+  const clearThreadGoal = vi.fn((threadId: ThreadId): Effect.Effect =>
+    Effect.sync(() => {
+      goals.delete(threadId);
+    }),
   );
 
   const startReview = vi.fn(
@@ -256,20 +255,18 @@ function makeFakeCodexAdapter(provider: ProviderDriverKind = CODEX_DRIVER) {
     ): Effect.Effect => Effect.void,
   );
 
-  const stopSession = vi.fn(
-    (threadId: ThreadId): Effect.Effect =>
-      Effect.sync(() => {
-        sessions.delete(threadId);
-      }),
+  const stopSession = vi.fn((threadId: ThreadId): Effect.Effect =>
+    Effect.sync(() => {
+      sessions.delete(threadId);
+    }),
   );
 
-  const listSessions = vi.fn(
-    (): Effect.Effect> =>
-      Effect.sync(() => Array.from(sessions.values())),
+  const listSessions = vi.fn((): Effect.Effect> =>
+    Effect.sync(() => Array.from(sessions.values())),
   );
 
-  const hasSession = vi.fn(
-    (threadId: ThreadId): Effect.Effect => Effect.succeed(sessions.has(threadId)),
+  const hasSession = vi.fn((threadId: ThreadId): Effect.Effect =>
+    Effect.succeed(sessions.has(threadId)),
   );
 
   const readThread = vi.fn(
@@ -296,18 +293,16 @@ function makeFakeCodexAdapter(provider: ProviderDriverKind = CODEX_DRIVER) {
       Effect.succeed({ threadId, turns: [] }),
   );
 
-  const deleteThread = vi.fn(
-    (threadId: ThreadId): Effect.Effect =>
-      Effect.sync(() => {
-        sessions.delete(threadId);
-      }),
+  const deleteThread = vi.fn((threadId: ThreadId): Effect.Effect =>
+    Effect.sync(() => {
+      sessions.delete(threadId);
+    }),
   );
 
-  const stopAll = vi.fn(
-    (): Effect.Effect =>
-      Effect.sync(() => {
-        sessions.clear();
-      }),
+  const stopAll = vi.fn((): Effect.Effect =>
+    Effect.sync(() => {
+      sessions.clear();
+    }),
   );
 
   const adapter: ProviderAdapterShape = {
diff --git a/apps/server/src/provider/providerMaintenanceRunner.ts b/apps/server/src/provider/providerMaintenanceRunner.ts
index 0420084e..0aba47b0 100644
--- a/apps/server/src/provider/providerMaintenanceRunner.ts
+++ b/apps/server/src/provider/providerMaintenanceRunner.ts
@@ -547,12 +547,10 @@ export const make = Effect.fn("ProviderMaintenanceRunner.make")(function* () {
             concurrency: "unbounded",
           },
         ).pipe(
-          Effect.map(
-            (verifiedProviders): VerifiedProviderRefresh => ({
-              providers,
-              verifiedProviders,
-            }),
-          ),
+          Effect.map((verifiedProviders): VerifiedProviderRefresh => ({
+            providers,
+            verifiedProviders,
+          })),
           Effect.catchCause((cause) =>
             Effect.logWarning("Provider post-update version verification failed", {
               provider,
diff --git a/apps/server/src/terminal/Layers/Manager.ts b/apps/server/src/terminal/Layers/Manager.ts
index 7cd4cf1d..eaeb1dff 100644
--- a/apps/server/src/terminal/Layers/Manager.ts
+++ b/apps/server/src/terminal/Layers/Manager.ts
@@ -2446,20 +2446,18 @@ export const makeTerminalManagerWithOptions = Effect.fn("makeTerminalManagerWith
             const currentActivityEvents = yield* modifyManagerState((state) => {
               terminalEventListeners.add(bufferedListener);
               return [
-                [...state.sessions.values()].map(
-                  (session): TerminalEvent => ({
-                    type: "activity",
-                    threadId: session.threadId,
-                    terminalId: session.terminalId,
-                    createdAt: session.updatedAt,
-                    hasRunningSubprocess:
-                      session.status === "running" && session.hasRunningSubprocess,
-                    command:
-                      session.status === "running" && session.hasRunningSubprocess
-                        ? session.runningSubprocessCommand
-                        : null,
-                  }),
-                ),
+                [...state.sessions.values()].map((session): TerminalEvent => ({
+                  type: "activity",
+                  threadId: session.threadId,
+                  terminalId: session.terminalId,
+                  createdAt: session.updatedAt,
+                  hasRunningSubprocess:
+                    session.status === "running" && session.hasRunningSubprocess,
+                  command:
+                    session.status === "running" && session.hasRunningSubprocess
+                      ? session.runningSubprocessCommand
+                      : null,
+                })),
                 state,
               ] as const;
             });
diff --git a/apps/server/src/workspace/Layers/WorkspaceEntries.ts b/apps/server/src/workspace/Layers/WorkspaceEntries.ts
index ad558096..c8ad935d 100644
--- a/apps/server/src/workspace/Layers/WorkspaceEntries.ts
+++ b/apps/server/src/workspace/Layers/WorkspaceEntries.ts
@@ -516,23 +516,19 @@ export const makeWorkspaceEntries = Effect.gen(function* () {
 
       const directoryEntries = [...directorySet]
         .toSorted((left, right) => left.localeCompare(right))
-        .map(
-          (directoryPath): ProjectEntry => ({
-            path: directoryPath,
-            kind: "directory",
-            parentPath: parentPathOf(directoryPath),
-          }),
-        )
+        .map((directoryPath): ProjectEntry => ({
+          path: directoryPath,
+          kind: "directory",
+          parentPath: parentPathOf(directoryPath),
+        }))
         .map(toSearchableWorkspaceEntry);
       const fileEntries = [...new Set(filePaths)]
         .toSorted((left, right) => left.localeCompare(right))
-        .map(
-          (filePath): ProjectEntry => ({
-            path: filePath,
-            kind: "file",
-            parentPath: parentPathOf(filePath),
-          }),
-        )
+        .map((filePath): ProjectEntry => ({
+          path: filePath,
+          kind: "file",
+          parentPath: parentPathOf(filePath),
+        }))
         .map(toSearchableWorkspaceEntry);
 
       const now = yield* DateTime.now;
@@ -835,13 +831,11 @@ export const makeWorkspaceEntries = Effect.gen(function* () {
     const normalizedCwd = yield* normalizeWorkspaceRoot(input.cwd);
     return yield* Cache.get(workspaceIndexCache, normalizedCwd).pipe(
       Effect.map((index) => ({
-        entries: index.entries.map(
-          (entry): ProjectEntry => ({
-            path: entry.path,
-            kind: entry.kind,
-            parentPath: entry.parentPath,
-          }),
-        ),
+        entries: index.entries.map((entry): ProjectEntry => ({
+          path: entry.path,
+          kind: entry.kind,
+          parentPath: entry.parentPath,
+        })),
         truncated: index.truncated,
       })),
     );
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index 59d9c0a9..aebd5814 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -1254,8 +1254,9 @@ export default function ChatView(props: ChatViewProps) {
   );
   const openTerminalThreadKeys = useTerminalStateStore(
     useShallow((state) =>
-      Object.entries(state.terminalStateByThreadKey).flatMap(([nextThreadKey, nextTerminalState]) =>
-        nextTerminalState.terminalOpen ? [nextThreadKey] : [],
+      Object.entries(state.terminalStateByThreadKey).flatMap(
+        ([nextThreadKey, nextTerminalState]) =>
+          nextTerminalState.terminalOpen ? [nextThreadKey] : [],
       ),
     ),
   );
@@ -4706,25 +4707,24 @@ export default function ChatView(props: ChatViewProps) {
         dataUrl: await readFileAsDataUrl(attachment.file),
       })),
     ).then((attachments) => [...attachments, ...drawingAttachments]);
-    const optimisticAttachments = composerAttachmentsSnapshot.map(
-      (attachment): ChatAttachment =>
-        attachment.type === "image"
-          ? {
-              type: "image",
-              id: attachment.id,
-              name: attachment.name,
-              mimeType: attachment.mimeType,
-              sizeBytes: attachment.sizeBytes,
-              previewUrl: attachment.previewUrl,
-            }
-          : {
-              type: "file",
-              kind: attachment.kind,
-              id: attachment.id,
-              name: attachment.name,
-              mimeType: attachment.mimeType,
-              sizeBytes: attachment.sizeBytes,
-            },
+    const optimisticAttachments = composerAttachmentsSnapshot.map((attachment): ChatAttachment =>
+      attachment.type === "image"
+        ? {
+            type: "image",
+            id: attachment.id,
+            name: attachment.name,
+            mimeType: attachment.mimeType,
+            sizeBytes: attachment.sizeBytes,
+            previewUrl: attachment.previewUrl,
+          }
+        : {
+            type: "file",
+            kind: attachment.kind,
+            id: attachment.id,
+            name: attachment.name,
+            mimeType: attachment.mimeType,
+            sizeBytes: attachment.sizeBytes,
+          },
     );
     const threadRefForSend = scopeThreadRef(environmentId, threadIdForSend);
     const optimisticMessage: ChatMessage = {
diff --git a/apps/web/src/components/browser/previewAutomationHost.ts b/apps/web/src/components/browser/previewAutomationHost.ts
index 07a5f81a..e5a675c4 100644
--- a/apps/web/src/components/browser/previewAutomationHost.ts
+++ b/apps/web/src/components/browser/previewAutomationHost.ts
@@ -551,12 +551,10 @@ export function usePreviewAutomationHost(input: {
         // through anyway must still answer: an unhandled rejection here is
         // twenty seconds of silence for the agent, with nothing logged.
         void handle(request)
-          .catch(
-            (cause): PreviewAutomationResponse => ({
-              requestId: request.requestId,
-              error: describe(cause),
-            }),
-          )
+          .catch((cause): PreviewAutomationResponse => ({
+            requestId: request.requestId,
+            error: describe(cause),
+          }))
           .then((response) => api.previewAutomation.respond(response));
       },
     );
diff --git a/apps/web/src/lib/providerSkillsReactQuery.ts b/apps/web/src/lib/providerSkillsReactQuery.ts
index df0b3c36..2d776361 100644
--- a/apps/web/src/lib/providerSkillsReactQuery.ts
+++ b/apps/web/src/lib/providerSkillsReactQuery.ts
@@ -53,17 +53,15 @@ export function providerSkillsQueryOptions(input: {
       if (provider.status === "error") {
         throw new Error(provider.message || "Could not load project skills.");
       }
-      return provider.skills.map(
-        (skill): ServerProviderSkill => ({
-          name: skill.name,
-          path: skill.path,
-          enabled: skill.enabled ?? true,
-          ...(skill.displayName ? { displayName: skill.displayName } : {}),
-          ...(skill.description ? { description: skill.description } : {}),
-          ...(skill.shortDescription ? { shortDescription: skill.shortDescription } : {}),
-          ...(skill.scope ? { scope: skill.scope } : {}),
-        }),
-      );
+      return provider.skills.map((skill): ServerProviderSkill => ({
+        name: skill.name,
+        path: skill.path,
+        enabled: skill.enabled ?? true,
+        ...(skill.displayName ? { displayName: skill.displayName } : {}),
+        ...(skill.description ? { description: skill.description } : {}),
+        ...(skill.shortDescription ? { shortDescription: skill.shortDescription } : {}),
+        ...(skill.scope ? { scope: skill.scope } : {}),
+      }));
     },
     enabled:
       (input.enabled ?? true) &&
diff --git a/apps/web/src/store.ts b/apps/web/src/store.ts
index 606461d9..e94a3d07 100644
--- a/apps/web/src/store.ts
+++ b/apps/web/src/store.ts
@@ -186,28 +186,27 @@ function resolveSessionProviderFromModelSelection(input: {
 }
 
 function mapMessage(environmentId: EnvironmentId, message: OrchestrationMessage): ChatMessage {
-  const attachments = message.attachments?.map(
-    (attachment): ChatAttachment =>
-      attachment.type === "image"
-        ? {
-            type: "image",
-            id: attachment.id,
-            name: attachment.name,
-            mimeType: attachment.mimeType,
-            sizeBytes: attachment.sizeBytes,
-            previewUrl: resolveEnvironmentHttpUrl({
-              environmentId,
-              pathname: attachmentPreviewRoutePath(attachment.id),
-            }),
-          }
-        : {
-            type: "file",
-            kind: attachment.kind,
-            id: attachment.id,
-            name: attachment.name,
-            mimeType: attachment.mimeType,
-            sizeBytes: attachment.sizeBytes,
-          },
+  const attachments = message.attachments?.map((attachment): ChatAttachment =>
+    attachment.type === "image"
+      ? {
+          type: "image",
+          id: attachment.id,
+          name: attachment.name,
+          mimeType: attachment.mimeType,
+          sizeBytes: attachment.sizeBytes,
+          previewUrl: resolveEnvironmentHttpUrl({
+            environmentId,
+            pathname: attachmentPreviewRoutePath(attachment.id),
+          }),
+        }
+      : {
+          type: "file",
+          kind: attachment.kind,
+          id: attachment.id,
+          name: attachment.name,
+          mimeType: attachment.mimeType,
+          sizeBytes: attachment.sizeBytes,
+        },
   );
 
   return {
diff --git a/docs/design/threadlines-context-preview-mockups.html b/docs/design/threadlines-context-preview-mockups.html
index be2f8b17..fb46524a 100644
--- a/docs/design/threadlines-context-preview-mockups.html
+++ b/docs/design/threadlines-context-preview-mockups.html
@@ -1700,8 +1700,7 @@ 

Ship cleaner workflows

source: input.url, elements: input.selectedElements, }); -}
+} diff --git a/packages/shared/src/qrCode.ts b/packages/shared/src/qrCode.ts index 490e11fa..273224a9 100644 --- a/packages/shared/src/qrCode.ts +++ b/packages/shared/src/qrCode.ts @@ -778,7 +778,7 @@ export class QrSegment { if (!QrSegment.isNumeric(digits)) throw new RangeError("String contains non-numeric characters"); let bb: Array = []; - for (let i = 0; i < digits.length; ) { + for (let i = 0; i < digits.length;) { // Consume up to 3 digits per iteration const n: int = Math.min(digits.length - i, 3); appendBits(parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb); diff --git a/packages/shared/src/terminalCommandTracker.ts b/packages/shared/src/terminalCommandTracker.ts index d2f557c0..eab17213 100644 --- a/packages/shared/src/terminalCommandTracker.ts +++ b/packages/shared/src/terminalCommandTracker.ts @@ -201,7 +201,7 @@ export function applyTerminalInputData( let submittedCommand: string | null = null; let didSubmit = false; - for (let index = 0; index < data.length; ) { + for (let index = 0; index < data.length;) { if (data.startsWith("\r\n", index)) { didSubmit = true; submittedCommand = normalizeSubmittedTerminalCommand(nextState.draft) ?? submittedCommand; diff --git a/scripts/marketing-media.ts b/scripts/marketing-media.ts index 61fa4f01..ca246d5c 100644 --- a/scripts/marketing-media.ts +++ b/scripts/marketing-media.ts @@ -376,16 +376,14 @@ async function getDevToolsTargets(port: number): Promise ({ - id: typeof target.id === "string" ? target.id : "", - title: typeof target.title === "string" ? target.title : "", - type: typeof target.type === "string" ? target.type : "", - url: typeof target.url === "string" ? target.url : "", - webSocketDebuggerUrl: - typeof target.webSocketDebuggerUrl === "string" ? target.webSocketDebuggerUrl : undefined, - }), - ); + return value.filter(isRecord).map((target): DevToolsTarget => ({ + id: typeof target.id === "string" ? target.id : "", + title: typeof target.title === "string" ? target.title : "", + type: typeof target.type === "string" ? target.type : "", + url: typeof target.url === "string" ? target.url : "", + webSocketDebuggerUrl: + typeof target.webSocketDebuggerUrl === "string" ? target.webSocketDebuggerUrl : undefined, + })); } function resolveMainTarget(targets: ReadonlyArray): DevToolsTarget { diff --git a/scripts/update-release-package-versions.test.ts b/scripts/update-release-package-versions.test.ts index 8d630ba3..83bb3e7e 100644 --- a/scripts/update-release-package-versions.test.ts +++ b/scripts/update-release-package-versions.test.ts @@ -164,10 +164,7 @@ it.layer(ScriptTestLayer)("update-release-package-versions", (it) => { Effect.flip, ); - assert.equal( - error.message, - 'SchemaError(Expected string\n at ["GITHUB_OUTPUT"])', - ); + assert.equal(error.message, 'SchemaError(Expected string\n at ["GITHUB_OUTPUT"])'); }), ); From 47bf4da0435f3ad432dc162d9959627bb2d38f90 Mon Sep 17 00:00:00 2001 From: badcuban <108198679+badcuban@users.noreply.github.com> Date: Thu, 27 Aug 2026 23:28:36 -0400 Subject: [PATCH 8/8] fix(server): drop duplicate GET /mcp route effect beta.107's McpServer.layerHttp registers its own 405 handlers for GET, PUT, PATCH, DELETE and OPTIONS on the MCP path, so our hand-rolled GET 405 route now collides at boot ("Method 'GET' already declared for route '/mcp'"). --- apps/server/src/mcp/McpHttpServer.ts | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/apps/server/src/mcp/McpHttpServer.ts b/apps/server/src/mcp/McpHttpServer.ts index 9126d66d..16b2239f 100644 --- a/apps/server/src/mcp/McpHttpServer.ts +++ b/apps/server/src/mcp/McpHttpServer.ts @@ -138,29 +138,6 @@ const AuthenticationLive = HttpRouter.middleware<{ provides: McpInvocationContext; }>()(authenticate).layer; -/** - * The stream this server does not offer, said properly. - * - * Streamable HTTP lets a client open a GET stream for server-initiated - * messages, and a server that has none must answer 405. Ours had no GET route - * at all, so the request fell through to the web app's catch-all and came back - * a 302 to an HTML page -- which a client reads as neither "here is the stream" - * nor "there is no stream", and sits in connecting on. - */ -const noServerStreamRoute = HttpRouter.add( - "GET", - MCP_ROUTE_PATH, - Effect.succeed( - HttpServerResponse.jsonUnsafe( - { - jsonrpc: "2.0", - error: { code: -32000, message: "This server does not offer an event stream." }, - }, - { status: 405, headers: { allow: "POST" } }, - ), - ), -); - /** * The screenshot tool, registered by hand so it can answer with a picture. * @@ -275,5 +252,4 @@ export const layer = McpServer.toolkit(BrowserStandardToolkit).pipe( protocols: [McpProtocol.v2025_06_18], }).pipe(Layer.provide(AuthenticationLive)), ), - Layer.provideMerge(noServerStreamRoute), );