diff --git a/plugins/cmark/CHANGELOG.md b/plugins/cmark/CHANGELOG.md index a2955b8db..137254323 100644 --- a/plugins/cmark/CHANGELOG.md +++ b/plugins/cmark/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## 1.2.4 - 2026-11-11 + +内部结构重构,界面与操作方式不变。这一版把源码重新分层,为后续同时维护多种宿主打底。 + +- 源码按 `contracts / core / domain / service / adapters / ui` 分层:业务逻辑与宿主平台彻底解耦,平台差异只在 adapters 层出现 +- 平台访问统一收敛到 `runtime/legacy-bridge.ts`,新增结构门禁脚本(`npm run check`):core 或 domain 层一旦直接依赖 Node / Electron 就会被拦下,防止解耦被后续改动侵蚀 +- `preload` 拆分为 `panels / ports` 两部分,宿主能力按端口声明,不再散落在各面板脚本里 +- 预留桌面端(Tauri)适配层,本轮未启用,不进产物 +- README 重写:补上主界面、深色主题、公式弹窗、提交历史、改动对比、设置面板的实际截图 + +## 1.2.3 - 2026-10-30 + +搜索模块整体重做,不再靠零散补丁维持;另外修掉一批与「焦点」相关的顽固问题。 + +- 搜索状态收敛成单一来源:一个搜索词同时驱动目录树过滤、正文高亮和命中计数,高亮词只在一处同步,不再出现「搜到了正文却不亮」 +- 修复搜索状态下隐藏面板再唤起、搜索状态丢失:目录树过滤、打开的文档、正文高亮、输入框内容都会原样恢复 +- 修复把搜索词逐字删到空时,最后一个字符删不掉(会被判定成宿主重新唤起时的清空而写回输入框) +- 修复在 AI 面板、公式弹窗、重命名输入框里按上下键会切换笔记、按 Esc 会退出搜索 +- 修复正文编辑器无法输入:光标被宿主的搜索框反复抢走 +- 修复「笔记内查找」对话框从未挂载(按 Ctrl+Shift+F 无反应) +- 新增:没有搜索词时,上下键按目录树顺序切换笔记,切到折叠目录里的笔记会自动展开 +- 修复快捷指令打不开对应笔记:动态指令只存在于宿主运行内存,宿主重启即丢失;现在按 near.txt 重建并写入宿主索引 +- 修复全文索引只在启动时构建,新写的内容搜不到 +- 修复「设为全局搜索」在重新打包后被覆盖 +- 命中计数如实显示当前笔记在命中列表中的位置,不再固定显示 1/N +- 移除界面上并不存在的侧栏搜索框与相关死代码 + +## 1.2.1 - 2026-10-28 + +- 修复 Gitee 一键建仓 / 同步报 403:HTTPS 的用户名原先写死成 `x-access-token`(只有 GitHub 接受这种占位),Gitee 要求用户名必须等于令牌所有者,否则回 `The token username invalid`。现在按远端推断用户名(`gitee.com//` 取 owner,其它保持 `x-access-token`),已用旧版本绑过 Gitee 的用户升级后无需重新授权 +- 修复「使用已有仓库」选到空仓库时报「合并远端分支失败」:远端没有任何分支时直接走首次推送,不再先 merge +- 认证类错误(令牌用户名不匹配、401/403)统一归类,提示改为「令牌无效或用户名不匹配」 +- 修复「工作区变更记录」面板里混入单个文档状态的问题:状态条被整体覆盖后遗留裸 chip,导致全局的「分支 main / 工作区干净」和文档的「路径 / 与最近提交一致」叠在同一行 +- 修复面板已打开时点另一个入口不切换模式,标题、内容与操作按钮停在上一模式 + ## 1.2.0 - 2026-10-27 同一份产物同时支持 ZTools 与 uTools,宿主自动识别,不再需要分叉维护。 diff --git a/plugins/cmark/README.md b/plugins/cmark/README.md index 0dbef7851..0ad747868 100644 --- a/plugins/cmark/README.md +++ b/plugins/cmark/README.md @@ -2,66 +2,48 @@ Obsidian 的轻量替代。本地 Markdown 笔记,文件是你的,版本用 Git 管,随时能带走。 -跑在 [ZTools](https://github.com/ztools) 插件体系里。 -

- 看一篇覆盖全部语法的笔记,导出成长图的样子 + CMark 主界面

## 为什么用它 -### 笔记就是文件 - -磁盘上的 `.md`,没有数据库、没有私有格式、没有云端账号。 - -用任何编辑器都能打开,用 Git 就能同步、回溯、协作。哪天真不想用了,直接删掉软件, -笔记一篇不少 —— 这一点从第一行代码起就没打算妥协。 - -### 版本回溯不用装插件、不用记命令 +**笔记就是文件。** 磁盘上的 `.md`,没有数据库、没有私有格式、没有云端账号。用任何编辑器都能打开,用 Git 就能同步、回溯、协作。哪天真不想用了,删掉软件,笔记一篇不少 —— 这一点从第一行代码起就没打算妥协。 -写完一段发现改坏了,翻开提交历史,点开任意一次提交就是那篇笔记当时的完整内容, -可以直接照着补回来。 +**版本回溯不用装插件、不用记命令。** 写完一段发现改坏了,翻开提交历史,点开任意一次提交就是那篇笔记当时的完整内容,可以直接照着补回来。想知道具体改了什么,逐行 diff 摆在那儿;只想撤回一个文件的改动也行,不用连带其他。 -想看具体改了什么,逐行 diff 摆在那儿;只想撤回一个文件的改动也行,不用连带其他。 -整个过程在侧边栏里点几下,不用切终端、不用理解 Git 的分支模型。 - -### 自动同步到你自己的仓库 - -定时自动提交并推送到 GitHub、Gitee 或自建服务器,配置一次之后就不必再管。 - -连续失败会自动暂停并留下原因,不会在后台无声地失败。本地另留一份快照轮转, -误删也有兜底。 +**自动同步到你自己的仓库。** 定时提交并推送到 GitHub、Gitee 或自建服务器,配置一次之后就不必再管。连续失败会自动暂停并留下原因,不会在后台无声地失败;本地另留一份快照轮转,误删也有兜底。 ## 界面 ### 编辑区 -左边是磁盘上的真实目录和当前分支,右边是编辑区,格式工具栏在上方。 +

+ 深色主题下的编辑区 +

+ +### 公式与代码

- 编辑区 + 公式编辑弹窗

### 版本与改动 -侧边栏里就能看逐行 diff、撤销单个文件的改动,或者切到提交历史。 -

- 改动对比 - 提交历史 + 提交历史 + 改动对比

### 设置 -笔记目录、自动同步、提交选项都在一个面板里。 -

- 设置面板 + 设置面板

-## 功能对比 +## 功能 -### 编辑 +### 编辑与导出 | 能力 | Obsidian | CMark | |---|---|---| @@ -72,9 +54,13 @@ Obsidian 的轻量替代。本地 Markdown 笔记,文件是你的,版本用 | 数学公式 | ✓ | ✓ 行内与块级,KaTeX | | 图表 | 插件支持 | ✓ 内置 mermaid、echarts,编辑区直接渲染 | | 任务列表 | ✓ | ✓ | -| 高亮 / 上下标 | 插件支持 | ✓ `==高亮==` `^上标^` `~下标~` | +| 高亮 / 上下标 | 插件支持 | ✓ | | 图片粘贴 | ✓ | ✓ 自动入库、按内容去重 | -| 图片缩放 | 插件支持 | ✓ 拖动调整 | +| 图片缩放 | 插件支持 | ✓ 拖动调整,尺寸写回 Markdown | +| 导出 PDF | ✓ | ✓ | +| 导出 HTML | 插件支持 | ✓ 单文件,图片内嵌 | +| 导出长图 | 插件支持 | ✓ | +| 导出 Markdown | ✓ | ✓ | ### 组织与检索 @@ -99,63 +85,50 @@ Obsidian 的轻量替代。本地 Markdown 笔记,文件是你的,版本用 | 历史版本查看 | 插件支持 | ✓ 点任意提交看该版全文 | | 差异对比 diff | 插件支持 | ✓ 工作区改动与单次提交都可看 | | 自动同步 | 插件支持 | ✓ 定时提交推送,失败自动暂停 | -| 回收站 | ✓ | ✓ 内置git版本回溯 | - -### 导出 - -| 能力 | Obsidian | CMark | -|---|---|---| -| 导出 PDF | ✓ | ✓ | -| 导出 HTML | 插件支持 | ✓ 单文件,图片内嵌 | -| 导出长图 | 插件支持 | ✓ | -| 导出 Markdown | ✓ | ✓ | +| 回收站 | ✓ | — | ## 定位 CMark 不跟 Obsidian 抢生态。它只解决一件更窄的事: -手上已经有一堆 Markdown 文件,或者只想用 Git 把它们管起来,不想为此再搭一整套 -工作区、插件市场和同步服务。这类需求下,Obsidian 的那些长处 —— 双链图谱、标签体系、 -上千个插件 —— 用不上,但配置成本照样要付。 +手上已经有一堆 Markdown 文件,或者只想用 Git 把它们管起来,不想为此再搭一整套工作区、插件市场和同步服务。这类需求下,Obsidian 的那些长处 —— 双链图谱、标签体系、上千个插件 —— 用不上,但配置成本照样要付。 -所以 CMark 把 Obsidian 里要靠插件才能做到的三件事做成了原生功能: -表格可视化编辑、图表渲染、Git 版本控制与自动同步。上面标「—」的那些能力 -是有意不做的,换来的是不用建 Vault、不用挑插件、不用理解 Git 命令。 +所以 CMark 把 Obsidian 里要靠插件才能做到的三件事做成了原生功能:表格可视化编辑、图表渲染、Git 版本控制与自动同步。上面标「—」的那些能力是有意不做的,换来的是不用建 Vault、不用挑插件、不用理解 Git 命令。 ## 安装 -### 方式一:npm(推荐) - -ZTools 3.3.0-beta 起内置了 npm 安装入口,不用等市场审核、也不用导入安装包: - -1. ZTools → 设置 → 已安装插件 → **从 npm 安装** -2. 填包名 `@lancc/cmark`(带 scope,`@lancc/` 不能省) -3. **不要**勾「使用国内镜像」:官方源可直连,勾了可能因镜像同步延迟装到旧版本 -4. 装完重启 ZTools,搜索框输入 `cmark` 或 `markdown` 打开 +| 渠道 | 适合 | 入口 | +|---|---|---| +| npm(推荐) | 想装最新版、不想等审核 | ZTools → 设置 → 已安装插件 → 从 npm 安装 | +| 插件市场 | 最省事 | ZTools 搜索框输入 `markdown` 或 `cmark` | +| 离线包 | 内网环境、锁定版本 | Releases 下载 `.zpx` / `.zip` → 导入本地插件 | +| uTools | 用的是 uTools | uTools 开发者中心 →「导入源码工程」选 `app/plugin.json` | -升级走同一个入口,重装即覆盖,笔记与配置都保留。 +## 首次使用 -### 方式二:插件市场 +1. 选笔记目录(可以就是你已有的 Markdown 目录) +2. 建仓库有两种方式: + - **一键建仓**(设置 → Git 集成):GitHub 点「授权建仓」,浏览器里输 8 位码即完成;Gitee 粘一个私人令牌。向导会自动建仓、绑定远程并推送首次提交 + - 手动:初始化本地仓库后填远程地址(GitHub / Gitee / 自建都行),或者只建本地仓库 +3. 打开「定时提交并推送」,插件会按设定策略自动 commit + push -ZTools 里搜 `markdown` 或 `cmark`,装上即用。 +### 把常用笔记挂成 ZTools 指令 -### 方式三:离线安装包(GitHub Releases) +编辑器工具栏里点「设为全局搜索」后,这篇笔记会注册成 ZTools 的一个指令,指令名就是笔记标题。 -适合市场审核期间、内网环境,或者想锁定某个版本。 +- 在 ZTools 搜索框直接输入标题回车,一步打开那篇笔记(不会只停在面板上) +- 也可以在 ZTools 设置里给它配全局快捷键 +- 再点一次按钮即取消,`.cmark/near.txt` 里记着哪些笔记挂过 -1. 到 [Releases](https://github.com/LanccBy2016/cmark/releases) 下载最新的 `cmark-<版本>.zpx`(或 `.zip`) -2. 打开 ZTools → 设置 → 插件 → 右上角「更多」→ 导入本地插件 -3. 选中刚下载的文件,确认安全提示后安装 -4. 首次打开会让你选一个笔记目录:选空文件夹即可,选已有 `.md` 的目录也能直接接管 +## 笔记存在哪 -两种包内容完全一样,装一个就够: +笔记就是磁盘上的 `.md` 文件,没有私有格式。`.cmark/` 只存排序、只读标记、图片附件这类元数据,随仓库一起提交。 -- `.zpx` —— asar 的 gzip 压缩包,体积小(约 4 MB) -- `.zip` —— 解压后就是插件根目录(约 10 MB) +图片以内部协议存进 `.cmark/attachments/`,尺寸以 `` 写回 Markdown 本身 —— Obsidian / Typora / VS Code 打开同一份文件,看到的大小一致。 -两条渠道装的是同一个插件位(插件名相同),后装的会覆盖先装的,**插件数据(配置、历史)保留**。 +卸载插件不会删笔记(笔记在你自己选的目录里)。`~/.cmark-config.json` 记录着笔记目录路径,删掉它等于重新走首次引导。 -### 方式四:从源码构建 +## 开发与打包 ```bash npm install @@ -172,9 +145,7 @@ node scripts/pack-zpx.mjs # 产出 release/cmark-<版本>.zpx node scripts/pack-zpx.mjs --zip # 同时产出 .zip ``` -### 方式五:uTools - -同一份产物同时支持 uTools 和 ZTools —— `preload/host.js` 会自动识别宿主(`window.utools` / `window.ztools`)并补齐缺失的那个全局对象,其余代码不用分支。 +给 uTools 打包: ```bash npm run build @@ -182,37 +153,6 @@ node scripts/pack.mjs # 准备 app/(plugin.json 的 main 指向 index.ht npm run pack:upx # 产出 release/cmark-<版本>.upx ``` -上架走的是**导入源码工程**,不是传 upx: - -- uTools 开发者中心 → 插件详情 → 「导入源码工程」→ 选 `app/plugin.json`(`app/` 本身就是完整插件工程:`plugin.json` 的 `main` 指向 `index.html`,同级有 `index.html` / `preload.js` / `preload/` / `logo.png` / `assets/`,10.6 MB,不含 node_modules 与 src) -- 导入后在开发者工具里点「打包」生成上架用的 upx;`npm run pack:upx` 产出的 `.upx` 适合本地分发/离线测试 - -改完代码要让 uTools 里的工程更新:`npm run build && node scripts/pack.mjs`(`app/` 会被重建,开发者工具会自动重载)。 - -宿主识别结果可在控制台查看:`window.__CMARK_HOST`(`utools` / `ztools` / `browser`)。 - -## 首次使用 - -1. 选笔记目录(可以就是你已有的 Markdown 目录) -2. 建仓库有两种方式: - - **一键建仓**(设置 → 一键建仓):GitHub 点「授权建仓」,浏览器里输入 8 位码即完成;Gitee 粘一个私人令牌。向导会自动建仓、绑定远程并推送首次提交。 - - 手动:在左侧「版本控制」里初始化仓库,填远程地址(GitHub / Gitee 都行),或只建本地仓库 -3. 打开「定时提交并推送」,插件会按设定间隔自动 commit + push - -笔记就是磁盘上的 `.md` 文件,没有私有格式。`.cmark/` 只存排序、只读标记、图片附件这类元数据,随仓库一起提交。图片尺寸以 `` 写回 Markdown 本身,Obsidian / Typora / VS Code 打开同一份文件看到的大小一致。 - -### 把常用笔记挂成 ZTools 指令 - -编辑器工具栏里点「设为全局搜索」后,这篇笔记会注册成 ZTools 的一个指令,指令名就是笔记标题。 - -- 在 ZTools 搜索框直接输入标题回车,一步打开那篇笔记(不会只停在面板上) -- 也可以在 ZTools 设置里给它配全局快捷键 -- 再点一次按钮即取消,`.cmark/near.txt` 里记着哪些笔记挂过 - -## 卸载 - -卸载插件不会删笔记(笔记在你自己选的目录里)。`~/.cmark-config.json` 记录着笔记目录路径,删掉它等于重新走首次引导。 - ## 许可 [MIT](LICENSE)。第三方组件见 [THIRD-PARTY.md](THIRD-PARTY.md)。 diff --git a/plugins/cmark/THIRD-PARTY.md b/plugins/cmark/THIRD-PARTY.md index 2c35da128..0462c1b8c 100644 --- a/plugins/cmark/THIRD-PARTY.md +++ b/plugins/cmark/THIRD-PARTY.md @@ -38,9 +38,3 @@ EPL-2.0 是**文件级**弱传染许可:只要不修改 elkjs 自身的源文 |---|---| | `public/export-file/github-markdown.css` | GitHub 官方 Markdown 样式(sindresorhus/github-markdown-css,MIT) | | `public/katex.min.css`、`public/fonts/*` | KaTeX 发行包(MIT) | - -## 关于 `public/export-file/index.html` - -该文件是导出 PDF / 长图时使用的隐藏渲染窗口模板,全部内容为标准 HTML 骨架加几条 -基础样式,不含任何第三方专有代码。若你在分发时希望更彻底,可直接替换为自己的模板, -接口只需保留 `
` 与 `window.waitAllImageLoaded()` 两个约定。 diff --git a/plugins/cmark/assets/index-B17NCAw4.js b/plugins/cmark/assets/index-B17NCAw4.js deleted file mode 100644 index 5914efbd9..000000000 --- a/plugins/cmark/assets/index-B17NCAw4.js +++ /dev/null @@ -1,758 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid-C_q9pug0.js","./markdown-DVehI1Sg.js"])))=>i.map(i=>d[i]); -import{aL as Nr,aK as ih,aD as f6}from"./mermaid-C_q9pug0.js";import{m as e$,_ as t$,k as I4}from"./markdown-DVehI1Sg.js";function n$(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Ag={exports:{}},Nf={},Tg={exports:{}},mn={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var d6;function r$(){if(d6)return mn;d6=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function m(X){return X===null||typeof X!="object"?null:(X=h&&X[h]||X["@@iterator"],typeof X=="function"?X:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function E(X,ne,W){this.props=X,this.context=ne,this.refs=x,this.updater=W||g}E.prototype.isReactComponent={},E.prototype.setState=function(X,ne){if(typeof X!="object"&&typeof X!="function"&&X!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,ne,"setState")},E.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};function C(){}C.prototype=E.prototype;function y(X,ne,W){this.props=X,this.context=ne,this.refs=x,this.updater=W||g}var _=y.prototype=new C;_.constructor=y,b(_,E.prototype),_.isPureReactComponent=!0;var O=Array.isArray,S=Object.prototype.hasOwnProperty,w={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function T(X,ne,W){var Te,je={},$e=null,Me=null;if(ne!=null)for(Te in ne.ref!==void 0&&(Me=ne.ref),ne.key!==void 0&&($e=""+ne.key),ne)S.call(ne,Te)&&!A.hasOwnProperty(Te)&&(je[Te]=ne[Te]);var pe=arguments.length-2;if(pe===1)je.children=W;else if(1>>1,ne=re[X];if(0>>1;Xi(je,I))$ei(Me,je)?(re[X]=Me,re[$e]=I,X=$e):(re[X]=je,re[Te]=I,X=Te);else if($ei(Me,I))re[X]=Me,re[$e]=I,X=$e;else break e}}return de}function i(re,de){var I=re.sortIndex-de.sortIndex;return I!==0?I:re.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],f=1,h=null,m=3,g=!1,b=!1,x=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(re){for(var de=n(u);de!==null;){if(de.callback===null)r(u);else if(de.startTime<=re)r(u),de.sortIndex=de.expirationTime,t(l,de);else break;de=n(u)}}function O(re){if(x=!1,_(re),!b)if(n(l)!==null)b=!0,ve(S);else{var de=n(u);de!==null&&me(O,de.startTime-re)}}function S(re,de){b=!1,x&&(x=!1,C(T),T=-1),g=!0;var I=m;try{for(_(de),h=n(l);h!==null&&(!(h.expirationTime>de)||re&&!F());){var X=h.callback;if(typeof X=="function"){h.callback=null,m=h.priorityLevel;var ne=X(h.expirationTime<=de);de=e.unstable_now(),typeof ne=="function"?h.callback=ne:h===n(l)&&r(l),_(de)}else r(l);h=n(l)}if(h!==null)var W=!0;else{var Te=n(u);Te!==null&&me(O,Te.startTime-de),W=!1}return W}finally{h=null,m=I,g=!1}}var w=!1,A=null,T=-1,P=5,M=-1;function F(){return!(e.unstable_now()-Mre||125X?(re.sortIndex=I,t(u,re),n(l)===null&&re===n(u)&&(x?(C(T),T=-1):x=!0,me(O,I-X))):(re.sortIndex=ne,t(l,re),b||g||(b=!0,ve(S))),re},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(re){var de=m;return function(){var I=m;m=de;try{return re.apply(this,arguments)}finally{m=I}}}})(Bg)),Bg}var v6;function l$(){return v6||(v6=1,Og.exports=o$()),Og.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var y6;function u$(){if(y6)return zi;y6=1;var e=Nc(),t=l$();function n(c){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;v"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function m(c){return l.call(h,c)?!0:l.call(f,c)?!1:u.test(c)?h[c]=!0:(f[c]=!0,!1)}function g(c,d,v,k){if(v!==null&&v.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return k?!1:v!==null?!v.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function b(c,d,v,k){if(d===null||typeof d>"u"||g(c,d,v,k))return!0;if(k)return!1;if(v!==null)switch(v.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function x(c,d,v,k,N,R,K){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=k,this.attributeNamespace=N,this.mustUseProperty=v,this.propertyName=c,this.type=d,this.sanitizeURL=R,this.removeEmptyString=K}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){E[c]=new x(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var d=c[0];E[d]=new x(d,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){E[c]=new x(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){E[c]=new x(c,2,!1,c,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){E[c]=new x(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){E[c]=new x(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){E[c]=new x(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){E[c]=new x(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){E[c]=new x(c,5,!1,c.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function y(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var d=c.replace(C,y);E[d]=new x(d,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var d=c.replace(C,y);E[d]=new x(d,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var d=c.replace(C,y);E[d]=new x(d,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){E[c]=new x(c,1,!1,c.toLowerCase(),null,!1,!1)}),E.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){E[c]=new x(c,1,!1,c.toLowerCase(),null,!0,!0)});function _(c,d,v,k){var N=E.hasOwnProperty(d)?E[d]:null;(N!==null?N.type!==0:k||!(2ue||N[K]!==R[ue]){var ge=` -`+N[K].replace(" at new "," at ");return c.displayName&&ge.includes("")&&(ge=ge.replace("",c.displayName)),ge}while(1<=K&&0<=ue);break}}}finally{W=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?ne(c):""}function je(c){switch(c.tag){case 5:return ne(c.type);case 16:return ne("Lazy");case 13:return ne("Suspense");case 19:return ne("SuspenseList");case 0:case 2:case 15:return c=Te(c.type,!1),c;case 11:return c=Te(c.type.render,!1),c;case 1:return c=Te(c.type,!0),c;default:return""}}function $e(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case A:return"Fragment";case w:return"Portal";case P:return"Profiler";case T:return"StrictMode";case $:return"Suspense";case Y:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case F:return(c.displayName||"Context")+".Consumer";case M:return(c._context.displayName||"Context")+".Provider";case z:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case Z:return d=c.displayName||null,d!==null?d:$e(c.type)||"Memo";case ve:d=c._payload,c=c._init;try{return $e(c(d))}catch{}}return null}function Me(c){var d=c.type;switch(c.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=d.render,c=c.displayName||c.name||"",d.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(d);case 8:return d===T?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function pe(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function Oe(c){var d=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function Ie(c){var d=Oe(c)?"checked":"value",v=Object.getOwnPropertyDescriptor(c.constructor.prototype,d),k=""+c[d];if(!c.hasOwnProperty(d)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var N=v.get,R=v.set;return Object.defineProperty(c,d,{configurable:!0,get:function(){return N.call(this)},set:function(K){k=""+K,R.call(this,K)}}),Object.defineProperty(c,d,{enumerable:v.enumerable}),{getValue:function(){return k},setValue:function(K){k=""+K},stopTracking:function(){c._valueTracker=null,delete c[d]}}}}function ze(c){c._valueTracker||(c._valueTracker=Ie(c))}function le(c){if(!c)return!1;var d=c._valueTracker;if(!d)return!0;var v=d.getValue(),k="";return c&&(k=Oe(c)?c.checked?"true":"false":c.value),c=k,c!==v?(d.setValue(c),!0):!1}function Se(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function Ne(c,d){var v=d.checked;return I({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??c._wrapperState.initialChecked})}function Be(c,d){var v=d.defaultValue==null?"":d.defaultValue,k=d.checked!=null?d.checked:d.defaultChecked;v=pe(d.value!=null?d.value:v),c._wrapperState={initialChecked:k,initialValue:v,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function He(c,d){d=d.checked,d!=null&&_(c,"checked",d,!1)}function Ge(c,d){He(c,d);var v=pe(d.value),k=d.type;if(v!=null)k==="number"?(v===0&&c.value===""||c.value!=v)&&(c.value=""+v):c.value!==""+v&&(c.value=""+v);else if(k==="submit"||k==="reset"){c.removeAttribute("value");return}d.hasOwnProperty("value")?Qe(c,d.type,v):d.hasOwnProperty("defaultValue")&&Qe(c,d.type,pe(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(c.defaultChecked=!!d.defaultChecked)}function ut(c,d,v){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var k=d.type;if(!(k!=="submit"&&k!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+c._wrapperState.initialValue,v||d===c.value||(c.value=d),c.defaultValue=d}v=c.name,v!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,v!==""&&(c.name=v)}function Qe(c,d,v){(d!=="number"||Se(c.ownerDocument)!==c)&&(v==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+v&&(c.defaultValue=""+v))}var ot=Array.isArray;function ht(c,d,v,k){if(c=c.options,d){d={};for(var N=0;N"+d.valueOf().toString()+"",d=G.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;d.firstChild;)c.appendChild(d.firstChild)}});function lt(c,d){if(d){var v=c.firstChild;if(v&&v===c.lastChild&&v.nodeType===3){v.nodeValue=d;return}}c.textContent=d}var cn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rn=["Webkit","ms","Moz","O"];Object.keys(cn).forEach(function(c){rn.forEach(function(d){d=d+c.charAt(0).toUpperCase()+c.substring(1),cn[d]=cn[c]})});function Lt(c,d,v){return d==null||typeof d=="boolean"||d===""?"":v||typeof d!="number"||d===0||cn.hasOwnProperty(c)&&cn[c]?(""+d).trim():d+"px"}function Ke(c,d){c=c.style;for(var v in d)if(d.hasOwnProperty(v)){var k=v.indexOf("--")===0,N=Lt(v,d[v],k);v==="float"&&(v="cssFloat"),k?c.setProperty(v,N):c[v]=N}}var qr=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ki(c,d){if(d){if(qr[c]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,c));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function Gi(c,d){if(c.indexOf("-")===-1)return typeof d.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ui=null;function Oi(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var fr=null,ei=null,tr=null;function yr(c){if(c=mf(c)){if(typeof fr!="function")throw Error(n(280));var d=c.stateNode;d&&(d=xd(d),fr(c.stateNode,c.type,d))}}function he(c){ei?tr?tr.push(c):tr=[c]:ei=c}function Re(){if(ei){var c=ei,d=tr;if(tr=ei=null,yr(c),d)for(c=0;c>>=0,c===0?32:31-(Er(c)/Do|0)|0}var $r=64,qa=4194304;function na(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function ra(c,d){var v=c.pendingLanes;if(v===0)return 0;var k=0,N=c.suspendedLanes,R=c.pingedLanes,K=v&268435455;if(K!==0){var ue=K&~N;ue!==0?k=na(ue):(R&=K,R!==0&&(k=na(R)))}else K=v&~N,K!==0?k=na(K):R!==0&&(k=na(R));if(k===0)return 0;if(d!==0&&d!==k&&(d&N)===0&&(N=k&-k,R=d&-d,N>=R||N===16&&(R&4194240)!==0))return d;if((k&4)!==0&&(k|=v&16),d=c.entangledLanes,d!==0)for(c=c.entanglements,d&=k;0v;v++)d.push(c);return d}function Ps(c,d,v){c.pendingLanes|=d,d!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,d=31-$n(d),c[d]=v}function Pi(c,d){var v=c.pendingLanes&~d;c.pendingLanes=d,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=d,c.mutableReadLanes&=d,c.entangledLanes&=d,d=c.entanglements;var k=c.eventTimes;for(c=c.expirationTimes;0=af),iC=" ",sC=!1;function aC(c,d){switch(c){case"keyup":return Yj.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oC(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var _u=!1;function Xj(c,d){switch(c){case"compositionend":return oC(d);case"keypress":return d.which!==32?null:(sC=!0,iC);case"textInput":return c=d.data,c===iC&&sC?null:c;default:return null}}function Qj(c,d){if(_u)return c==="compositionend"||!l1&&aC(c,d)?(c=Q3(),ld=n1=So=null,_u=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:v,offset:d-c};c=k}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=pC(v)}}function gC(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?gC(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function vC(){for(var c=window,d=Se();d instanceof c.HTMLIFrameElement;){try{var v=typeof d.contentWindow.location.href=="string"}catch{v=!1}if(v)c=d.contentWindow;else break;d=Se(c.document)}return d}function f1(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}function oq(c){var d=vC(),v=c.focusedElem,k=c.selectionRange;if(d!==v&&v&&v.ownerDocument&&gC(v.ownerDocument.documentElement,v)){if(k!==null&&f1(v)){if(d=k.start,c=k.end,c===void 0&&(c=d),"selectionStart"in v)v.selectionStart=d,v.selectionEnd=Math.min(c,v.value.length);else if(c=(d=v.ownerDocument||document)&&d.defaultView||window,c.getSelection){c=c.getSelection();var N=v.textContent.length,R=Math.min(k.start,N);k=k.end===void 0?R:Math.min(k.end,N),!c.extend&&R>k&&(N=k,k=R,R=N),N=mC(v,R);var K=mC(v,k);N&&K&&(c.rangeCount!==1||c.anchorNode!==N.node||c.anchorOffset!==N.offset||c.focusNode!==K.node||c.focusOffset!==K.offset)&&(d=d.createRange(),d.setStart(N.node,N.offset),c.removeAllRanges(),R>k?(c.addRange(d),c.extend(K.node,K.offset)):(d.setEnd(K.node,K.offset),c.addRange(d)))}}for(d=[],c=v;c=c.parentNode;)c.nodeType===1&&d.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,Au=null,d1=null,cf=null,h1=!1;function yC(c,d,v){var k=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;h1||Au==null||Au!==Se(k)||(k=Au,"selectionStart"in k&&f1(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),cf&&uf(cf,k)||(cf=k,k=gd(d1,"onSelect"),0Pu||(c.current=D1[Pu],D1[Pu]=null,Pu--)}function Yn(c,d){Pu++,D1[Pu]=c.current,c.current=d}var No={},fi=To(No),Ri=To(!1),Cl=No;function Ru(c,d){var v=c.type.contextTypes;if(!v)return No;var k=c.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===d)return k.__reactInternalMemoizedMaskedChildContext;var N={},R;for(R in v)N[R]=d[R];return k&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=d,c.__reactInternalMemoizedMaskedChildContext=N),N}function Fi(c){return c=c.childContextTypes,c!=null}function bd(){Qn(Ri),Qn(fi)}function PC(c,d,v){if(fi.current!==No)throw Error(n(168));Yn(fi,d),Yn(Ri,v)}function RC(c,d,v){var k=c.stateNode;if(d=d.childContextTypes,typeof k.getChildContext!="function")return v;k=k.getChildContext();for(var N in k)if(!(N in d))throw Error(n(108,Me(c)||"Unknown",N));return I({},v,k)}function wd(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||No,Cl=fi.current,Yn(fi,c),Yn(Ri,Ri.current),!0}function FC(c,d,v){var k=c.stateNode;if(!k)throw Error(n(169));v?(c=RC(c,d,Cl),k.__reactInternalMemoizedMergedChildContext=c,Qn(Ri),Qn(fi),Yn(fi,c)):Qn(Ri),Yn(Ri,v)}var Ha=null,Ed=!1,S1=!1;function IC(c){Ha===null?Ha=[c]:Ha.push(c)}function xq(c){Ed=!0,IC(c)}function Oo(){if(!S1&&Ha!==null){S1=!0;var c=0,d=xn;try{var v=Ha;for(xn=1;c>=K,N-=K,Wa=1<<32-$n(d)+N|v<Xt?(Wr=jt,jt=null):Wr=jt.sibling;var On=Ve(De,jt,_e[Xt],nt);if(On===null){jt===null&&(jt=Wr);break}c&&jt&&On.alternate===null&&d(De,jt),xe=R(On,xe,Xt),zt===null?Ot=On:zt.sibling=On,zt=On,jt=Wr}if(Xt===_e.length)return v(De,jt),ir&&Dl(De,Xt),Ot;if(jt===null){for(;Xt<_e.length;Xt++)jt=Je(De,_e[Xt],nt),jt!==null&&(xe=R(jt,xe,Xt),zt===null?Ot=jt:zt.sibling=jt,zt=jt);return ir&&Dl(De,Xt),Ot}for(jt=k(De,jt);Xt<_e.length;Xt++)Wr=yt(jt,De,Xt,_e[Xt],nt),Wr!==null&&(c&&Wr.alternate!==null&&jt.delete(Wr.key===null?Xt:Wr.key),xe=R(Wr,xe,Xt),zt===null?Ot=Wr:zt.sibling=Wr,zt=Wr);return c&&jt.forEach(function(jo){return d(De,jo)}),ir&&Dl(De,Xt),Ot}function Tt(De,xe,_e,nt){var Ot=de(_e);if(typeof Ot!="function")throw Error(n(150));if(_e=Ot.call(_e),_e==null)throw Error(n(151));for(var zt=Ot=null,jt=xe,Xt=xe=0,Wr=null,On=_e.next();jt!==null&&!On.done;Xt++,On=_e.next()){jt.index>Xt?(Wr=jt,jt=null):Wr=jt.sibling;var jo=Ve(De,jt,On.value,nt);if(jo===null){jt===null&&(jt=Wr);break}c&&jt&&jo.alternate===null&&d(De,jt),xe=R(jo,xe,Xt),zt===null?Ot=jo:zt.sibling=jo,zt=jo,jt=Wr}if(On.done)return v(De,jt),ir&&Dl(De,Xt),Ot;if(jt===null){for(;!On.done;Xt++,On=_e.next())On=Je(De,On.value,nt),On!==null&&(xe=R(On,xe,Xt),zt===null?Ot=On:zt.sibling=On,zt=On);return ir&&Dl(De,Xt),Ot}for(jt=k(De,jt);!On.done;Xt++,On=_e.next())On=yt(jt,De,Xt,On.value,nt),On!==null&&(c&&On.alternate!==null&&jt.delete(On.key===null?Xt:On.key),xe=R(On,xe,Xt),zt===null?Ot=On:zt.sibling=On,zt=On);return c&&jt.forEach(function(Zq){return d(De,Zq)}),ir&&Dl(De,Xt),Ot}function Cr(De,xe,_e,nt){if(typeof _e=="object"&&_e!==null&&_e.type===A&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case S:e:{for(var Ot=_e.key,zt=xe;zt!==null;){if(zt.key===Ot){if(Ot=_e.type,Ot===A){if(zt.tag===7){v(De,zt.sibling),xe=N(zt,_e.props.children),xe.return=De,De=xe;break e}}else if(zt.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===ve&&$C(Ot)===zt.type){v(De,zt.sibling),xe=N(zt,_e.props),xe.ref=gf(De,zt,_e),xe.return=De,De=xe;break e}v(De,zt);break}else d(De,zt);zt=zt.sibling}_e.type===A?(xe=Pl(_e.props.children,De.mode,nt,_e.key),xe.return=De,De=xe):(nt=Jd(_e.type,_e.key,_e.props,null,De.mode,nt),nt.ref=gf(De,xe,_e),nt.return=De,De=nt)}return K(De);case w:e:{for(zt=_e.key;xe!==null;){if(xe.key===zt)if(xe.tag===4&&xe.stateNode.containerInfo===_e.containerInfo&&xe.stateNode.implementation===_e.implementation){v(De,xe.sibling),xe=N(xe,_e.children||[]),xe.return=De,De=xe;break e}else{v(De,xe);break}else d(De,xe);xe=xe.sibling}xe=Cg(_e,De.mode,nt),xe.return=De,De=xe}return K(De);case ve:return zt=_e._init,Cr(De,xe,zt(_e._payload),nt)}if(ot(_e))return Dt(De,xe,_e,nt);if(de(_e))return Tt(De,xe,_e,nt);Sd(De,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"?(_e=""+_e,xe!==null&&xe.tag===6?(v(De,xe.sibling),xe=N(xe,_e),xe.return=De,De=xe):(v(De,xe),xe=Eg(_e,De.mode,nt),xe.return=De,De=xe),K(De)):v(De,xe)}return Cr}var Lu=VC(!0),UC=VC(!1),_d=To(null),Ad=null,zu=null,B1=null;function P1(){B1=zu=Ad=null}function R1(c){var d=_d.current;Qn(_d),c._currentValue=d}function F1(c,d,v){for(;c!==null;){var k=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,k!==null&&(k.childLanes|=d)):k!==null&&(k.childLanes&d)!==d&&(k.childLanes|=d),c===v)break;c=c.return}}function ju(c,d){Ad=c,B1=zu=null,c=c.dependencies,c!==null&&c.firstContext!==null&&((c.lanes&d)!==0&&(Ii=!0),c.firstContext=null)}function ds(c){var d=c._currentValue;if(B1!==c)if(c={context:c,memoizedValue:d,next:null},zu===null){if(Ad===null)throw Error(n(308));zu=c,Ad.dependencies={lanes:0,firstContext:c}}else zu=zu.next=c;return d}var Sl=null;function I1(c){Sl===null?Sl=[c]:Sl.push(c)}function HC(c,d,v,k){var N=d.interleaved;return N===null?(v.next=v,I1(d)):(v.next=N.next,N.next=v),d.interleaved=v,Ga(c,k)}function Ga(c,d){c.lanes|=d;var v=c.alternate;for(v!==null&&(v.lanes|=d),v=c,c=c.return;c!==null;)c.childLanes|=d,v=c.alternate,v!==null&&(v.childLanes|=d),v=c,c=c.return;return v.tag===3?v.stateNode:null}var Bo=!1;function M1(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function WC(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function Ya(c,d){return{eventTime:c,lane:d,tag:0,payload:null,callback:null,next:null}}function Po(c,d,v){var k=c.updateQueue;if(k===null)return null;if(k=k.shared,(Dn&2)!==0){var N=k.pending;return N===null?d.next=d:(d.next=N.next,N.next=d),k.pending=d,Ga(c,v)}return N=k.interleaved,N===null?(d.next=d,I1(k)):(d.next=N.next,N.next=d),k.interleaved=d,Ga(c,v)}function Td(c,d,v){if(d=d.updateQueue,d!==null&&(d=d.shared,(v&4194240)!==0)){var k=d.lanes;k&=c.pendingLanes,v|=k,d.lanes=v,bl(c,v)}}function KC(c,d){var v=c.updateQueue,k=c.alternate;if(k!==null&&(k=k.updateQueue,v===k)){var N=null,R=null;if(v=v.firstBaseUpdate,v!==null){do{var K={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};R===null?N=R=K:R=R.next=K,v=v.next}while(v!==null);R===null?N=R=d:R=R.next=d}else N=R=d;v={baseState:k.baseState,firstBaseUpdate:N,lastBaseUpdate:R,shared:k.shared,effects:k.effects},c.updateQueue=v;return}c=v.lastBaseUpdate,c===null?v.firstBaseUpdate=d:c.next=d,v.lastBaseUpdate=d}function Nd(c,d,v,k){var N=c.updateQueue;Bo=!1;var R=N.firstBaseUpdate,K=N.lastBaseUpdate,ue=N.shared.pending;if(ue!==null){N.shared.pending=null;var ge=ue,Pe=ge.next;ge.next=null,K===null?R=Pe:K.next=Pe,K=ge;var We=c.alternate;We!==null&&(We=We.updateQueue,ue=We.lastBaseUpdate,ue!==K&&(ue===null?We.firstBaseUpdate=Pe:ue.next=Pe,We.lastBaseUpdate=ge))}if(R!==null){var Je=N.baseState;K=0,We=Pe=ge=null,ue=R;do{var Ve=ue.lane,yt=ue.eventTime;if((k&Ve)===Ve){We!==null&&(We=We.next={eventTime:yt,lane:0,tag:ue.tag,payload:ue.payload,callback:ue.callback,next:null});e:{var Dt=c,Tt=ue;switch(Ve=d,yt=v,Tt.tag){case 1:if(Dt=Tt.payload,typeof Dt=="function"){Je=Dt.call(yt,Je,Ve);break e}Je=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=Tt.payload,Ve=typeof Dt=="function"?Dt.call(yt,Je,Ve):Dt,Ve==null)break e;Je=I({},Je,Ve);break e;case 2:Bo=!0}}ue.callback!==null&&ue.lane!==0&&(c.flags|=64,Ve=N.effects,Ve===null?N.effects=[ue]:Ve.push(ue))}else yt={eventTime:yt,lane:Ve,tag:ue.tag,payload:ue.payload,callback:ue.callback,next:null},We===null?(Pe=We=yt,ge=Je):We=We.next=yt,K|=Ve;if(ue=ue.next,ue===null){if(ue=N.shared.pending,ue===null)break;Ve=ue,ue=Ve.next,Ve.next=null,N.lastBaseUpdate=Ve,N.shared.pending=null}}while(!0);if(We===null&&(ge=Je),N.baseState=ge,N.firstBaseUpdate=Pe,N.lastBaseUpdate=We,d=N.shared.interleaved,d!==null){N=d;do K|=N.lane,N=N.next;while(N!==d)}else R===null&&(N.shared.lanes=0);Tl|=K,c.lanes=K,c.memoizedState=Je}}function GC(c,d,v){if(c=d.effects,d.effects=null,c!==null)for(d=0;dv?v:4,c(!0);var k=$1.transition;$1.transition={};try{c(!1),d()}finally{xn=v,$1.transition=k}}function h5(){return hs().memoizedState}function Cq(c,d,v){var k=Mo(c);if(v={lane:k,action:v,hasEagerState:!1,eagerState:null,next:null},p5(c))m5(d,v);else if(v=HC(c,d,v,k),v!==null){var N=wi();zs(v,c,k,N),g5(v,d,k)}}function kq(c,d,v){var k=Mo(c),N={lane:k,action:v,hasEagerState:!1,eagerState:null,next:null};if(p5(c))m5(d,N);else{var R=c.alternate;if(c.lanes===0&&(R===null||R.lanes===0)&&(R=d.lastRenderedReducer,R!==null))try{var K=d.lastRenderedState,ue=R(K,v);if(N.hasEagerState=!0,N.eagerState=ue,Rs(ue,K)){var ge=d.interleaved;ge===null?(N.next=N,I1(d)):(N.next=ge.next,ge.next=N),d.interleaved=N;return}}catch{}finally{}v=HC(c,d,N,k),v!==null&&(N=wi(),zs(v,c,k,N),g5(v,d,k))}}function p5(c){var d=c.alternate;return c===hr||d!==null&&d===hr}function m5(c,d){bf=Pd=!0;var v=c.pending;v===null?d.next=d:(d.next=v.next,v.next=d),c.pending=d}function g5(c,d,v){if((v&4194240)!==0){var k=d.lanes;k&=c.pendingLanes,v|=k,d.lanes=v,bl(c,v)}}var Id={readContext:ds,useCallback:di,useContext:di,useEffect:di,useImperativeHandle:di,useInsertionEffect:di,useLayoutEffect:di,useMemo:di,useReducer:di,useRef:di,useState:di,useDebugValue:di,useDeferredValue:di,useTransition:di,useMutableSource:di,useSyncExternalStore:di,useId:di,unstable_isNewReconciler:!1},Dq={readContext:ds,useCallback:function(c,d){return da().memoizedState=[c,d===void 0?null:d],c},useContext:ds,useEffect:s5,useImperativeHandle:function(c,d,v){return v=v!=null?v.concat([c]):null,Rd(4194308,4,l5.bind(null,d,c),v)},useLayoutEffect:function(c,d){return Rd(4194308,4,c,d)},useInsertionEffect:function(c,d){return Rd(4,2,c,d)},useMemo:function(c,d){var v=da();return d=d===void 0?null:d,c=c(),v.memoizedState=[c,d],c},useReducer:function(c,d,v){var k=da();return d=v!==void 0?v(d):d,k.memoizedState=k.baseState=d,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:d},k.queue=c,c=c.dispatch=Cq.bind(null,hr,c),[k.memoizedState,c]},useRef:function(c){var d=da();return c={current:c},d.memoizedState=c},useState:r5,useDebugValue:Y1,useDeferredValue:function(c){return da().memoizedState=c},useTransition:function(){var c=r5(!1),d=c[0];return c=Eq.bind(null,c[1]),da().memoizedState=c,[d,c]},useMutableSource:function(){},useSyncExternalStore:function(c,d,v){var k=hr,N=da();if(ir){if(v===void 0)throw Error(n(407));v=v()}else{if(v=d(),Hr===null)throw Error(n(349));(Al&30)!==0||QC(k,d,v)}N.memoizedState=v;var R={value:v,getSnapshot:d};return N.queue=R,s5(e5.bind(null,k,R,c),[c]),k.flags|=2048,Cf(9,ZC.bind(null,k,R,v,d),void 0,null),v},useId:function(){var c=da(),d=Hr.identifierPrefix;if(ir){var v=Ka,k=Wa;v=(k&~(1<<32-$n(k)-1)).toString(32)+v,d=":"+d+"R"+v,v=wf++,0<\/script>",c=c.removeChild(c.firstChild)):typeof k.is=="string"?c=K.createElement(v,{is:k.is}):(c=K.createElement(v),v==="select"&&(K=c,k.multiple?K.multiple=!0:k.size&&(K.size=k.size))):c=K.createElementNS(c,v),c[ca]=d,c[pf]=k,I5(c,d,!1,!1),d.stateNode=c;e:{switch(K=Gi(v,k),v){case"dialog":Xn("cancel",c),Xn("close",c),N=k;break;case"iframe":case"object":case"embed":Xn("load",c),N=k;break;case"video":case"audio":for(N=0;NHu&&(d.flags|=128,k=!0,kf(R,!1),d.lanes=4194304)}else{if(!k)if(c=Od(K),c!==null){if(d.flags|=128,k=!0,v=c.updateQueue,v!==null&&(d.updateQueue=v,d.flags|=4),kf(R,!0),R.tail===null&&R.tailMode==="hidden"&&!K.alternate&&!ir)return hi(d),null}else 2*Gn()-R.renderingStartTime>Hu&&v!==1073741824&&(d.flags|=128,k=!0,kf(R,!1),d.lanes=4194304);R.isBackwards?(K.sibling=d.child,d.child=K):(v=R.last,v!==null?v.sibling=K:d.child=K,R.last=K)}return R.tail!==null?(d=R.tail,R.rendering=d,R.tail=d.sibling,R.renderingStartTime=Gn(),d.sibling=null,v=dr.current,Yn(dr,k?v&1|2:v&1),d):(hi(d),null);case 22:case 23:return xg(),k=d.memoizedState!==null,c!==null&&c.memoizedState!==null!==k&&(d.flags|=8192),k&&(d.mode&1)!==0?(Qi&1073741824)!==0&&(hi(d),d.subtreeFlags&6&&(d.flags|=8192)):hi(d),null;case 24:return null;case 25:return null}throw Error(n(156,d.tag))}function Pq(c,d){switch(A1(d),d.tag){case 1:return Fi(d.type)&&bd(),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return qu(),Qn(Ri),Qn(fi),q1(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 5:return z1(d),null;case 13:if(Qn(dr),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(n(340));Mu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return Qn(dr),null;case 4:return qu(),null;case 10:return R1(d.type._context),null;case 22:case 23:return xg(),null;case 24:return null;default:return null}}var jd=!1,pi=!1,Rq=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function Vu(c,d){var v=c.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(k){br(c,d,k)}else v.current=null}function og(c,d,v){try{v()}catch(k){br(c,d,k)}}var z5=!1;function Fq(c,d){if(x1=Mn,c=vC(),f1(c)){if("selectionStart"in c)var v={start:c.selectionStart,end:c.selectionEnd};else e:{v=(v=c.ownerDocument)&&v.defaultView||window;var k=v.getSelection&&v.getSelection();if(k&&k.rangeCount!==0){v=k.anchorNode;var N=k.anchorOffset,R=k.focusNode;k=k.focusOffset;try{v.nodeType,R.nodeType}catch{v=null;break e}var K=0,ue=-1,ge=-1,Pe=0,We=0,Je=c,Ve=null;t:for(;;){for(var yt;Je!==v||N!==0&&Je.nodeType!==3||(ue=K+N),Je!==R||k!==0&&Je.nodeType!==3||(ge=K+k),Je.nodeType===3&&(K+=Je.nodeValue.length),(yt=Je.firstChild)!==null;)Ve=Je,Je=yt;for(;;){if(Je===c)break t;if(Ve===v&&++Pe===N&&(ue=K),Ve===R&&++We===k&&(ge=K),(yt=Je.nextSibling)!==null)break;Je=Ve,Ve=Je.parentNode}Je=yt}v=ue===-1||ge===-1?null:{start:ue,end:ge}}else v=null}v=v||{start:0,end:0}}else v=null;for(b1={focusedElem:c,selectionRange:v},Mn=!1,Ct=d;Ct!==null;)if(d=Ct,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,Ct=c;else for(;Ct!==null;){d=Ct;try{var Dt=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var Tt=Dt.memoizedProps,Cr=Dt.memoizedState,De=d.stateNode,xe=De.getSnapshotBeforeUpdate(d.elementType===d.type?Tt:Is(d.type,Tt),Cr);De.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var _e=d.stateNode.containerInfo;_e.nodeType===1?_e.textContent="":_e.nodeType===9&&_e.documentElement&&_e.removeChild(_e.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(nt){br(d,d.return,nt)}if(c=d.sibling,c!==null){c.return=d.return,Ct=c;break}Ct=d.return}return Dt=z5,z5=!1,Dt}function Df(c,d,v){var k=d.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var N=k=k.next;do{if((N.tag&c)===c){var R=N.destroy;N.destroy=void 0,R!==void 0&&og(d,v,R)}N=N.next}while(N!==k)}}function qd(c,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var v=d=d.next;do{if((v.tag&c)===c){var k=v.create;v.destroy=k()}v=v.next}while(v!==d)}}function lg(c){var d=c.ref;if(d!==null){var v=c.stateNode;switch(c.tag){case 5:c=v;break;default:c=v}typeof d=="function"?d(c):d.current=c}}function j5(c){var d=c.alternate;d!==null&&(c.alternate=null,j5(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&(delete d[ca],delete d[pf],delete d[k1],delete d[vq],delete d[yq])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function q5(c){return c.tag===5||c.tag===3||c.tag===4}function $5(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||q5(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function ug(c,d,v){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?v.nodeType===8?v.parentNode.insertBefore(c,d):v.insertBefore(c,d):(v.nodeType===8?(d=v.parentNode,d.insertBefore(c,v)):(d=v,d.appendChild(c)),v=v._reactRootContainer,v!=null||d.onclick!==null||(d.onclick=yd));else if(k!==4&&(c=c.child,c!==null))for(ug(c,d,v),c=c.sibling;c!==null;)ug(c,d,v),c=c.sibling}function cg(c,d,v){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?v.insertBefore(c,d):v.appendChild(c);else if(k!==4&&(c=c.child,c!==null))for(cg(c,d,v),c=c.sibling;c!==null;)cg(c,d,v),c=c.sibling}var ri=null,Ms=!1;function Ro(c,d,v){for(v=v.child;v!==null;)V5(c,d,v),v=v.sibling}function V5(c,d,v){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(sn,v)}catch{}switch(v.tag){case 5:pi||Vu(v,d);case 6:var k=ri,N=Ms;ri=null,Ro(c,d,v),ri=k,Ms=N,ri!==null&&(Ms?(c=ri,v=v.stateNode,c.nodeType===8?c.parentNode.removeChild(v):c.removeChild(v)):ri.removeChild(v.stateNode));break;case 18:ri!==null&&(Ms?(c=ri,v=v.stateNode,c.nodeType===8?C1(c.parentNode,v):c.nodeType===1&&C1(c,v),It(c)):C1(ri,v.stateNode));break;case 4:k=ri,N=Ms,ri=v.stateNode.containerInfo,Ms=!0,Ro(c,d,v),ri=k,Ms=N;break;case 0:case 11:case 14:case 15:if(!pi&&(k=v.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){N=k=k.next;do{var R=N,K=R.destroy;R=R.tag,K!==void 0&&((R&2)!==0||(R&4)!==0)&&og(v,d,K),N=N.next}while(N!==k)}Ro(c,d,v);break;case 1:if(!pi&&(Vu(v,d),k=v.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=v.memoizedProps,k.state=v.memoizedState,k.componentWillUnmount()}catch(ue){br(v,d,ue)}Ro(c,d,v);break;case 21:Ro(c,d,v);break;case 22:v.mode&1?(pi=(k=pi)||v.memoizedState!==null,Ro(c,d,v),pi=k):Ro(c,d,v);break;default:Ro(c,d,v)}}function U5(c){var d=c.updateQueue;if(d!==null){c.updateQueue=null;var v=c.stateNode;v===null&&(v=c.stateNode=new Rq),d.forEach(function(k){var N=Uq.bind(null,c,k);v.has(k)||(v.add(k),k.then(N,N))})}}function Ls(c,d){var v=d.deletions;if(v!==null)for(var k=0;kN&&(N=K),k&=~R}if(k=N,k=Gn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*Mq(k/1960))-k,10c?16:c,Io===null)var k=!1;else{if(c=Io,Io=null,Wd=0,(Dn&6)!==0)throw Error(n(331));var N=Dn;for(Dn|=4,Ct=c.current;Ct!==null;){var R=Ct,K=R.child;if((Ct.flags&16)!==0){var ue=R.deletions;if(ue!==null){for(var ge=0;geGn()-hg?Ol(c,0):dg|=v),Li(c,d)}function r6(c,d){d===0&&((c.mode&1)===0?d=1:(d=qa,qa<<=1,(qa&130023424)===0&&(qa=4194304)));var v=wi();c=Ga(c,d),c!==null&&(Ps(c,d,v),Li(c,v))}function Vq(c){var d=c.memoizedState,v=0;d!==null&&(v=d.retryLane),r6(c,v)}function Uq(c,d){var v=0;switch(c.tag){case 13:var k=c.stateNode,N=c.memoizedState;N!==null&&(v=N.retryLane);break;case 19:k=c.stateNode;break;default:throw Error(n(314))}k!==null&&k.delete(d),r6(c,v)}var i6;i6=function(c,d,v){if(c!==null)if(c.memoizedProps!==d.pendingProps||Ri.current)Ii=!0;else{if((c.lanes&v)===0&&(d.flags&128)===0)return Ii=!1,Oq(c,d,v);Ii=(c.flags&131072)!==0}else Ii=!1,ir&&(d.flags&1048576)!==0&&MC(d,kd,d.index);switch(d.lanes=0,d.tag){case 2:var k=d.type;zd(c,d),c=d.pendingProps;var N=Ru(d,fi.current);ju(d,v),N=U1(null,d,k,c,N,v);var R=H1();return d.flags|=1,typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,Fi(k)?(R=!0,wd(d)):R=!1,d.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,M1(d),N.updater=Md,d.stateNode=N,N._reactInternals=d,X1(d,k,c,v),d=tg(null,d,k,!0,R,v)):(d.tag=0,ir&&R&&_1(d),bi(null,d,N,v),d=d.child),d;case 16:k=d.elementType;e:{switch(zd(c,d),c=d.pendingProps,N=k._init,k=N(k._payload),d.type=k,N=d.tag=Wq(k),c=Is(k,c),N){case 0:d=eg(null,d,k,c,v);break e;case 1:d=N5(null,d,k,c,v);break e;case 11:d=D5(null,d,k,c,v);break e;case 14:d=S5(null,d,k,Is(k.type,c),v);break e}throw Error(n(306,k,""))}return d;case 0:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:Is(k,N),eg(c,d,k,N,v);case 1:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:Is(k,N),N5(c,d,k,N,v);case 3:e:{if(O5(d),c===null)throw Error(n(387));k=d.pendingProps,R=d.memoizedState,N=R.element,WC(c,d),Nd(d,k,null,v);var K=d.memoizedState;if(k=K.element,R.isDehydrated)if(R={element:k,isDehydrated:!1,cache:K.cache,pendingSuspenseBoundaries:K.pendingSuspenseBoundaries,transitions:K.transitions},d.updateQueue.baseState=R,d.memoizedState=R,d.flags&256){N=$u(Error(n(423)),d),d=B5(c,d,k,v,N);break e}else if(k!==N){N=$u(Error(n(424)),d),d=B5(c,d,k,v,N);break e}else for(Xi=Ao(d.stateNode.containerInfo.firstChild),Ji=d,ir=!0,Fs=null,v=UC(d,null,k,v),d.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(Mu(),k===N){d=Ja(c,d,v);break e}bi(c,d,k,v)}d=d.child}return d;case 5:return YC(d),c===null&&N1(d),k=d.type,N=d.pendingProps,R=c!==null?c.memoizedProps:null,K=N.children,w1(k,N)?K=null:R!==null&&w1(k,R)&&(d.flags|=32),T5(c,d),bi(c,d,K,v),d.child;case 6:return c===null&&N1(d),null;case 13:return P5(c,d,v);case 4:return L1(d,d.stateNode.containerInfo),k=d.pendingProps,c===null?d.child=Lu(d,null,k,v):bi(c,d,k,v),d.child;case 11:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:Is(k,N),D5(c,d,k,N,v);case 7:return bi(c,d,d.pendingProps,v),d.child;case 8:return bi(c,d,d.pendingProps.children,v),d.child;case 12:return bi(c,d,d.pendingProps.children,v),d.child;case 10:e:{if(k=d.type._context,N=d.pendingProps,R=d.memoizedProps,K=N.value,Yn(_d,k._currentValue),k._currentValue=K,R!==null)if(Rs(R.value,K)){if(R.children===N.children&&!Ri.current){d=Ja(c,d,v);break e}}else for(R=d.child,R!==null&&(R.return=d);R!==null;){var ue=R.dependencies;if(ue!==null){K=R.child;for(var ge=ue.firstContext;ge!==null;){if(ge.context===k){if(R.tag===1){ge=Ya(-1,v&-v),ge.tag=2;var Pe=R.updateQueue;if(Pe!==null){Pe=Pe.shared;var We=Pe.pending;We===null?ge.next=ge:(ge.next=We.next,We.next=ge),Pe.pending=ge}}R.lanes|=v,ge=R.alternate,ge!==null&&(ge.lanes|=v),F1(R.return,v,d),ue.lanes|=v;break}ge=ge.next}}else if(R.tag===10)K=R.type===d.type?null:R.child;else if(R.tag===18){if(K=R.return,K===null)throw Error(n(341));K.lanes|=v,ue=K.alternate,ue!==null&&(ue.lanes|=v),F1(K,v,d),K=R.sibling}else K=R.child;if(K!==null)K.return=R;else for(K=R;K!==null;){if(K===d){K=null;break}if(R=K.sibling,R!==null){R.return=K.return,K=R;break}K=K.return}R=K}bi(c,d,N.children,v),d=d.child}return d;case 9:return N=d.type,k=d.pendingProps.children,ju(d,v),N=ds(N),k=k(N),d.flags|=1,bi(c,d,k,v),d.child;case 14:return k=d.type,N=Is(k,d.pendingProps),N=Is(k.type,N),S5(c,d,k,N,v);case 15:return _5(c,d,d.type,d.pendingProps,v);case 17:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:Is(k,N),zd(c,d),d.tag=1,Fi(k)?(c=!0,wd(d)):c=!1,ju(d,v),y5(d,k,N),X1(d,k,N,v),tg(null,d,k,!0,c,v);case 19:return F5(c,d,v);case 22:return A5(c,d,v)}throw Error(n(156,d.tag))};function s6(c,d){return gl(c,d)}function Hq(c,d,v,k){this.tag=c,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ms(c,d,v,k){return new Hq(c,d,v,k)}function wg(c){return c=c.prototype,!(!c||!c.isReactComponent)}function Wq(c){if(typeof c=="function")return wg(c)?1:0;if(c!=null){if(c=c.$$typeof,c===z)return 11;if(c===Z)return 14}return 2}function zo(c,d){var v=c.alternate;return v===null?(v=ms(c.tag,d,c.key,c.mode),v.elementType=c.elementType,v.type=c.type,v.stateNode=c.stateNode,v.alternate=c,c.alternate=v):(v.pendingProps=d,v.type=c.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=c.flags&14680064,v.childLanes=c.childLanes,v.lanes=c.lanes,v.child=c.child,v.memoizedProps=c.memoizedProps,v.memoizedState=c.memoizedState,v.updateQueue=c.updateQueue,d=c.dependencies,v.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},v.sibling=c.sibling,v.index=c.index,v.ref=c.ref,v}function Jd(c,d,v,k,N,R){var K=2;if(k=c,typeof c=="function")wg(c)&&(K=1);else if(typeof c=="string")K=5;else e:switch(c){case A:return Pl(v.children,N,R,d);case T:K=8,N|=8;break;case P:return c=ms(12,v,d,N|2),c.elementType=P,c.lanes=R,c;case $:return c=ms(13,v,d,N),c.elementType=$,c.lanes=R,c;case Y:return c=ms(19,v,d,N),c.elementType=Y,c.lanes=R,c;case me:return Xd(v,N,R,d);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case M:K=10;break e;case F:K=9;break e;case z:K=11;break e;case Z:K=14;break e;case ve:K=16,k=null;break e}throw Error(n(130,c==null?c:typeof c,""))}return d=ms(K,v,d,N),d.elementType=c,d.type=k,d.lanes=R,d}function Pl(c,d,v,k){return c=ms(7,c,k,d),c.lanes=v,c}function Xd(c,d,v,k){return c=ms(22,c,k,d),c.elementType=me,c.lanes=v,c.stateNode={isHidden:!1},c}function Eg(c,d,v){return c=ms(6,c,null,d),c.lanes=v,c}function Cg(c,d,v){return d=ms(4,c.children!==null?c.children:[],c.key,d),d.lanes=v,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}function Kq(c,d,v,k,N){this.tag=d,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ia(0),this.expirationTimes=ia(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ia(0),this.identifierPrefix=k,this.onRecoverableError=N,this.mutableSourceEagerHydrationData=null}function kg(c,d,v,k,N,R,K,ue,ge){return c=new Kq(c,d,v,ue,ge),d===1?(d=1,R===!0&&(d|=8)):d=0,R=ms(3,null,null,d),c.current=R,R.stateNode=c,R.memoizedState={element:k,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},M1(R),c}function Gq(c,d,v){var k=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ng.exports=u$(),Ng.exports}var b6;function c$(){if(b6)return sh;b6=1;var e=xN();return sh.createRoot=e.createRoot,sh.hydrateRoot=e.hydrateRoot,sh}var f$=c$();const w6=e=>{let t;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const m=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,m))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,i,o);return o},M4=(e=>e?w6(e):w6),d$=e=>e;function h$(e,t=d$){const n=ae.useSyncExternalStore(e.subscribe,ae.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return ae.useDebugValue(n),n}const E6=e=>{const t=M4(e),n=r=>h$(t,r);return Object.assign(n,t),n},p$=(e=>e?E6(e):E6);let Pg;const et=p$((e,t)=>({workspace:"",tree:[],truncated:!1,currentRel:"",content:"",savedContent:"",saving:!1,message:"",editorApi:null,editor:null,activeMarks:{},activeBlock:{type:"paragraph"},locked:!1,loadRevision:0,near:!1,toolbarHidden:!1,sourceMode:!1,bodyFontSize:14,aiOpen:!1,searchTerm:"",notesIndex:[],searchHits:{},hitOrder:[],diskMtime:0,conflict:"",refreshTree(){const n=window.__CMARK.listTree();e({workspace:n.workspace,tree:n.children,truncated:n.truncated})},openNote(n){e({loadRevision:(t().loadRevision||0)+1});const{currentRel:r,content:i,savedContent:s,save:a}=t();r&&i!==s&&a();const o=window.__CMARK.readNoteEx?.(n);let l="",u=0;if(o){if(!o.ok){if(o.code==="ENOENT"||/ENOENT/i.test(String(o.message||""))){e({currentRel:"",content:"",savedContent:"",conflict:"",message:"这篇笔记已不存在"});try{t().refreshTree()}catch{}return}e({conflict:"",message:`打开失败:${o.message||o.code||"无法读取文件"}`});return}l=o.text??"",u=o.mtime??0}else{if(window.__CMARK.exists&&!window.__CMARK.exists(n)){e({message:"这篇笔记已不存在"}),t().refreshTree();return}l=window.__CMARK.readNote(n),u=window.__CMARK.statNote?.(n)?.mtime??0}const f=window.__ZNOTES?.readNoteState?.(n);e({currentRel:n,content:l,savedContent:l,diskMtime:u,conflict:"",locked:!!(f&&f.locked),near:!!(f&&f.near)})},setContent(n){e({content:n})},save(){const{currentRel:n,content:r,savedContent:i,locked:s}=t();if(!n||r===i)return;if(s){t().setMessage("该笔记已设为只读,未保存",2600);return}if(window.__CMARK?.exists&&!window.__CMARK.exists(n)){e({savedContent:r,conflict:"文件已不在原位置(可能被移动或删除)"}),t().setMessage("这篇笔记已不在原位置,内容未保存",5e3);return}const a=window.__CMARK.statNote?.(n);if(a&&a.ok&&t().diskMtime&&a.mtime&&a.mtime!==t().diskMtime){e({conflict:"磁盘上的文件已被其它程序修改"}),t().setMessage("这篇笔记在磁盘上被改过,已暂停保存",5e3);return}e({saving:!0});const o=window.__CMARK.writeNote(n,r);if(e({saving:!1}),o.ok){const l=window.__CMARK.statNote?.(n);e({savedContent:r,diskMtime:l?.mtime||t().diskMtime,conflict:""})}else t().setMessage("保存失败:"+(o.message||"未知错误"),4e3)},setMessage(n,r=2500){e({message:n}),Pg&&window.clearTimeout(Pg),Pg=window.setTimeout(()=>e({message:""}),r)},setEditorApi(n){e({editorApi:n})},setEditor(n){e({editor:n})},markClean(n){e({content:n,savedContent:n})},setActive(n,r){e({activeMarks:n,activeBlock:r})},toggleToolbar(){e({toolbarHidden:!t().toolbarHidden})},toggleSourceMode(){e({sourceMode:!t().sourceMode})},forceSave(){const{currentRel:n,content:r}=t();if(!n)return;e({conflict:"",savedContent:""});const i=window.__CMARK.writeNote(n,r),s=window.__CMARK.statNote?.(n);i.ok?e({savedContent:r,diskMtime:s?.mtime||0}):t().setMessage("保存失败:"+(i.message||""),4e3)},reloadFromDisk(){const{currentRel:n}=t();n&&(e({conflict:""}),t().openNote(n),t().setMessage("已重新载入磁盘上的版本",2400))},buildIndex(){const n=window.__CMARK;let r=[];try{r=n?.loadAllNotes?.()||[]}catch{r=[]}e({notesIndex:r})},searchNotes(n){const r=String(n??"").trim().toLowerCase();if(!r){e({searchTerm:"",searchHits:{},hitOrder:[]});return}const i={},s=t().notesIndex.length?t().notesIndex:(()=>{const u=window.__CMARK;let f=[];try{f=u?.loadAllNotes?.()||[]}catch{}return f.length&&e({notesIndex:f}),f})();for(const u of s){if((u.rel.split("/").pop()||u.rel).replace(/\.md$/i,"").toLowerCase().includes(r)){i[u.rel]={field:"title",snippet:""};continue}const m=u.text.toLowerCase().indexOf(r);if(m>=0){const g=Math.max(0,m-30),b=u.text.slice(g,m+r.length+40).replace(/\s+/g," ").trim();i[u.rel]={field:"content",snippet:b}}}const a=[],o=u=>{for(const f of u)f.type==="folder"?o(f.children||[]):Object.prototype.hasOwnProperty.call(i,f.rel)&&a.push(f.rel)};o(t().tree||[]);for(const u of Object.keys(i))a.includes(u)||a.push(u);e({searchTerm:n,searchHits:i,hitOrder:a});const l=a;if(l.length){const u=l[0];setTimeout(()=>{if(t().searchTerm===n)try{t().openNote(u),window.setTimeout(()=>{try{window.ztools?.subInputFocus?.()}catch{}},120)}catch{}},350)}},setSearchTerm(n){e({searchTerm:n})},clearCurrent(){e({currentRel:"",content:"",savedContent:"",locked:!1,near:!1})},toggleNear(){const{currentRel:n,near:r,setMessage:i}=t();if(!n)return;const s=!r,a=window.__ZNOTES?.setNoteNear?.(n,s);if(a&&a.ok===!1){i("设置失败:"+(a.message||"未知原因"),3200);return}const o=n.split("/").pop().replace(/\.(md|markdown)$/i,"");try{const l=window.ztools,u="note/"+n;s?l?.setFeature?.({code:u,icon:"logo.png",explain:"打开笔记「"+o+"」",cmds:[o]}):l?.removeFeature?.(u)}catch{}e({near:s}),i(s?"已设为全局搜索:「"+o+"」":"已取消全局搜索",2400)},syncNearFeatures(){try{const n=window.__NDB,r=window.__ZNOTES,i=window.ztools;if(!n?.allDocs||!i?.setFeature)return;const s=n.allDocs("note/")||[];for(const a of s){const o=String(a?._id||"");if(!o.startsWith("note/"))continue;const l=o.slice(5);if(!r?.readNoteState?.(l)?.near)continue;const u=l.split("/").pop().replace(/\.(md|markdown)$/i,"");i.setFeature({code:o,icon:"logo.png",explain:"打开笔记「"+u+"」",cmds:[u]})}}catch{}},setAiOpen(n){e({aiOpen:n})},setBodyFontSize(n){const r=Math.min(16,Math.max(12,Math.round(Number(n)||14)));e({bodyFontSize:r});try{window.localStorage.setItem("cmark-dev-body-font-size",String(r))}catch{}},toggleLocked(){const{currentRel:n,locked:r,setMessage:i}=t();if(!n)return;const s=window.__ZNOTES?.setNoteLocked?.(n,!r);s&&s.ok?(e({locked:!r}),i(r?"已取消只读":"已设为只读",1800)):i("设置只读失败:"+(s?.message||"接口不可用"),3600)}}));function bN({title:e,defaultValue:t="",placeholder:n="",maxLength:r=120,okText:i="确定",onSubmit:s,onCancel:a}){const[o,l]=te.useState(t),u=te.useRef(null);return te.useEffect(()=>{const f=window.setTimeout(()=>{const h=u.current;h&&(h.focus(),h.select())},20);return()=>window.clearTimeout(f)},[]),te.useEffect(()=>{const f=h=>{if(h.key==="Escape")h.preventDefault(),h.stopPropagation(),a();else if(h.key==="Enter"){h.preventDefault(),h.stopPropagation();const m=o.trim();m&&s(m)}};return window.addEventListener("keydown",f,!0),()=>window.removeEventListener("keydown",f,!0)},[o,s,a]),V.jsx("div",{className:"zdlg-mask",onMouseDown:f=>f.target===f.currentTarget&&a(),children:V.jsxs("div",{className:"zdlg-card",onMouseDown:f=>f.stopPropagation(),children:[V.jsx("div",{className:"zdlg-title",children:e}),V.jsx("input",{ref:u,className:"zdlg-input",type:"text",value:o,maxLength:r,spellCheck:!1,placeholder:n,onChange:f=>l(f.target.value)}),V.jsxs("div",{className:"zdlg-btns",children:[V.jsx("button",{type:"button",className:"zdlg-btn",onClick:a,children:"取消"}),V.jsx("button",{type:"button",className:"zdlg-btn primary",disabled:!o.trim(),onClick:()=>{const f=o.trim();f&&s(f)},children:i})]})]})})}function m$({message:e,okText:t="确定",danger:n,onOk:r,onCancel:i}){return te.useEffect(()=>{const s=a=>{a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[i]),V.jsx("div",{className:"zdlg-mask",onMouseDown:s=>s.target===s.currentTarget&&i(),children:V.jsxs("div",{className:"zdlg-card",onMouseDown:s=>s.stopPropagation(),children:[V.jsx("div",{className:"zdlg-msg",children:e}),V.jsxs("div",{className:"zdlg-btns",children:[V.jsx("button",{type:"button",className:"zdlg-btn",onClick:i,children:"取消"}),V.jsx("button",{type:"button",className:"zdlg-btn primary"+(n?" danger":""),onClick:r,children:t})]})]})})}var nm=xN();const wN=Nr(nm);function C6(){return window.__znotesGit}const ah={branch:V.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"currentColor",children:V.jsx("path",{d:"M5 3.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0zM3.75 5.9a2.75 2.75 0 1 0-1.5 0v4.2a2.75 2.75 0 1 0 1.5 0V8.5h3.5a2.5 2.5 0 0 0 2.5-2.5V5.9a2.75 2.75 0 1 0-1.5 0v.1a1 1 0 0 1-1 1h-3.5zM12.25 5.15a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zM4.5 13.05a1.25 1.25 0 1 0-1.5-1.24v1.24z"})}),pull:V.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"currentColor",children:V.jsx("path",{d:"M8 1.5a.75.75 0 0 1 .75.75v6.94l2.22-2.22a.75.75 0 1 1 1.06 1.06l-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 1 1 1.06-1.06l2.22 2.22V2.25A.75.75 0 0 1 8 1.5zM2.5 12.5a.75.75 0 0 1 .75.75v.25h9.5v-.25a.75.75 0 0 1 1.5 0v1a.75.75 0 0 1-.75.75H2.5a.75.75 0 0 1-.75-.75v-1a.75.75 0 0 1 .75-.75z"})}),push:V.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"currentColor",children:V.jsx("path",{d:"M8 14.5a.75.75 0 0 1-.75-.75V6.81L5.03 9.03a.75.75 0 0 1-1.06-1.06l3.5-3.5a.75.75 0 0 1 1.06 0l3.5 3.5a.75.75 0 1 1-1.06 1.06L8.75 6.81v6.94a.75.75 0 0 1-.75.75zM2.5 2.5a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 .75.75v1a.75.75 0 0 1-1.5 0v-.25h-9.5v.25a.75.75 0 0 1-1.5 0v-1z"})}),sync:V.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor",children:V.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})})};function g$({onOpenPanel:e}){const[t,n]=te.useState("—"),[r,i]=te.useState(!1),[s,a]=te.useState(0),[o,l]=te.useState(null),u=te.useRef(!0),f=te.useCallback(async()=>{const x=C6();if(!x?.state){n("git");return}try{const E=await x.state();if(!u.current)return;const C=!!(E&&E.ok&&E.data);i(!!(C&&E.data?.isRepo)),n(C&&E.data?.branch?String(E.data.branch):C&&E.data?.isRepo?"(无分支)":"git"),a(C?Number(E.data?.dirty||0):0)}catch{}},[]);te.useEffect(()=>{u.current=!0,f();const x=window.setInterval(()=>void f(),3e4);return()=>{u.current=!1,window.clearInterval(x)}},[f]);const{hint:h,show:m}=v$(),g=te.useCallback(async x=>{const E=C6(),C=x==="pull"?E?.pull:x==="push"?E?.push:E?.sync;if(C){l(x);try{const y=await C.call(E),_=x==="pull"?"已拉取":x==="push"?"已推送":"已同步",O=x==="pull"?"拉取失败:":x==="push"?"推送失败:":"同步失败:";if(y&&y.ok){const S=x==="sync"&&y.data?.local?"已提交到本机(未配置远程仓库)":_;m(S,!1)}else m(O+(y&&y.message||"未知原因"),!0)}catch(y){m("操作失败:"+(y?.message||""),!0)}finally{l(null),f()}}},[f,m]),b=r?`当前分支:${t},点击查看改动与历史`:"这个文件夹还不是 git 仓库,点击查看";return V.jsxs(V.Fragment,{children:[V.jsxs("div",{className:"branch-bar",children:[V.jsxs("button",{className:"zbb-branch",type:"button",title:b,onClick:e,children:[ah.branch,V.jsx("span",{className:"zbb-bname",children:t}),V.jsx("span",{className:"zbb-dirty"+(s>0?" on":""),title:"有未提交的改动"})]}),V.jsx("button",{className:"zbb-btn",type:"button",title:"拉取(git pull)",disabled:!!o,onClick:()=>void g("pull"),children:ah.pull}),V.jsx("button",{className:"zbb-btn",type:"button",title:"推送(git push)",disabled:!!o,onClick:()=>void g("push"),children:ah.push}),V.jsx("button",{className:"zbb-btn"+(o==="sync"?" busy":""),type:"button",title:"同步(拉取然后推送)",disabled:!!o,onClick:()=>void g("sync"),children:ah.sync})]}),h?nm.createPortal(V.jsx("div",{className:"app-toast"+(h.err?" err":""),children:h.text}),document.body):null]})}function v$(){const[e,t]=te.useState(null),n=te.useRef(null),r=te.useCallback((i,s)=>{t({text:i,err:s}),n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(()=>t(null),2600)},[]);return te.useEffect(()=>()=>{n.current&&window.clearTimeout(n.current)},[]),{hint:e,show:r}}function y$(){return V.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[V.jsx("circle",{cx:"8",cy:"8",r:"2.2"}),V.jsx("path",{d:"M8 1.6v1.6M8 12.8v1.6M1.6 8h1.6M12.8 8h1.6M3.5 3.5l1.1 1.1M11.4 11.4l1.1 1.1M12.5 3.5l-1.1 1.1M4.6 11.4l-1.1 1.1",strokeLinecap:"round"})]})}function x$(e){return V.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:V.jsx("path",{d:e.open?"M3.5 6.5L8 11l4.5-4.5":"M6.5 3.5L11 8l-4.5 4.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function b$(){return V.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:V.jsx("path",{d:"M2 4.5h12M2 8h8M2 11.5h12",strokeLinecap:"round"})})}const Jo=e=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";function w$(e){const{node:t,depth:n,open:r,toggle:i,active:s,onPick:a,onMenu:o}=e,l=t.type==="folder",u=r.has(t.id),f=e.dragOver===t.rel&&e.dragRel!==t.rel,h=e.dragRel===t.rel,m=te.useRef(null),[g,b]=te.useState(!1);return te.useEffect(()=>{if(s!==t.rel)return;const x=m.current;if(x)try{x.scrollIntoView({block:"nearest"})}catch{}},[s,t.rel]),V.jsxs("div",{ref:m,className:"row"+(s===t.rel?" active":"")+(f?" drop-target":"")+(h?" dragging":""),style:{paddingLeft:4+n*14},draggable:!0,onDragStart:x=>{e.setDragRel(t.rel),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",t.rel)},onDragOver:x=>{!e.dragRel||e.dragRel===t.rel||(x.preventDefault(),x.stopPropagation(),x.dataTransfer.dropEffect="move",e.setDragOver(t.rel))},onDragLeave:()=>{e.dragOver===t.rel&&e.setDragOver("")},onDrop:x=>{x.preventDefault(),x.stopPropagation();const E=e.dragRel||x.dataTransfer.getData("text/plain");e.setDragOver(""),e.setDragRel(null),!(!E||E===t.rel)&&(l?e.onDrop(E,t.rel):e.onReorder&&Jo(E)===Jo(t.rel)?e.onReorder(E,t.rel):e.onDrop(E,Jo(t.rel)))},onDragEnd:()=>{e.setDragRel(null),e.setDragOver("")},onClick:()=>l?i(t.id):a(t.rel),onContextMenu:x=>o(x,t),title:t.rel,children:[V.jsx("span",{className:"caret",children:l?V.jsx(x$,{open:u}):null}),V.jsx("span",{className:"label",children:t.name}),V.jsx("span",{className:"row-actions-slot"+(g?" is-open":""),style:{width:l?42:21},onMouseOver:()=>b(!0),onMouseOut:x=>{const E=x.relatedTarget;E&&x.currentTarget.contains(E)||b(!1)},children:g?V.jsx("span",{className:"row-actions",children:l?V.jsxs(V.Fragment,{children:[V.jsx("button",{type:"button",title:"新建文件夹",onClick:x=>{x.stopPropagation(),e.onQuickNewFolder?.(t.rel)},children:V.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M2 4.5A1.5 1.5 0 0 1 3.5 3h2.6l1.2 1.5h5.2A1.5 1.5 0 0 1 14 6v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 12z"}),V.jsx("path",{d:"M8 7.5v3M6.5 9h3"})]})}),V.jsx("button",{type:"button",title:"新建笔记",onClick:x=>{x.stopPropagation(),e.onQuickNewNote?.(t.rel)},children:V.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M9.5 2.5H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5z"}),V.jsx("path",{d:"M9.5 2.5v3h3"}),V.jsx("path",{d:"M8 8.5v3M6.5 10h3"})]})})]}):V.jsx("button",{type:"button",title:"在浏览器中打开",onClick:x=>{x.stopPropagation(),e.onQuickOpenBrowser?.(t.rel)},children:V.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("circle",{cx:"8",cy:"8",r:"5.7"}),V.jsx("path",{d:"M2.4 8h11.2M8 2.3c1.6 1.7 2.4 3.6 2.4 5.7S9.6 12 8 13.7C6.4 12 5.6 10.1 5.6 8S6.4 4 8 2.3z"})]})})}):null})]})}function EN(e){const{nodes:t,depth:n,...r}=e;return V.jsx(V.Fragment,{children:t.map(i=>V.jsxs("div",{children:[V.jsx(w$,{node:i,depth:n,...r}),i.type==="folder"&&r.open.has(i.id)&&i.children&&i.children.length>0&&V.jsx(EN,{nodes:i.children,depth:n+1,...r})]},i.id))})}const js={folder:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.31c.46 0 .9.18 1.22.5l1.06 1.06h4.41A1.75 1.75 0 0 1 14.25 4.5v8A1.75 1.75 0 0 1 12.5 14.25h-9A1.75 1.75 0 0 1 1.75 12.5V3zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .14.11.25.25.25h9a.25.25 0 0 0 .25-.25V4.5a.25.25 0 0 0-.25-.25H7.88L6.5 2.88a.25.25 0 0 0-.18-.07H3.5z"})}),open:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.31c.46 0 .9.18 1.22.5l1.06 1.06h4.41A1.75 1.75 0 0 1 14.25 4.5v1.2c-.28-.1-.58-.16-.9-.16H1.75V3zm0 4.29h11.5l.29.03v.02l-1.9 5.7a1.2 1.2 0 0 1-1.14.81H3.5a1.75 1.75 0 0 1-1.75-1.75V7.29z"})}),note:V.jsxs("svg",{viewBox:"0 0 16 16",children:[V.jsx("path",{d:"M2.75 1A1.75 1.75 0 0 0 1 2.75v10.5C1 14.22 1.78 15 2.75 15h6.6a4.5 4.5 0 0 1-1.3-6.28 4.5 4.5 0 0 1 5.2-1.6V2.75A1.75 1.75 0 0 0 11.5 1H2.75zm0 1.5h8.75a.25.25 0 0 1 .25.25v2.4a4.5 4.5 0 0 0-1.5-.26V4.25A.75.75 0 0 0 9.5 3.5H4.25a.75.75 0 0 0 0 1.5h4v3.9a4.5 4.5 0 0 0-2.4 3.35H2.75a.25.25 0 0 1-.25-.25V2.75c0-.14.11-.25.25-.25z"}),V.jsx("path",{d:"M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7zm.75 1.5v1.75H14a.75.75 0 0 1 0 1.5h-1.25V15a.75.75 0 0 1-1.5 0v-1.75H10a.75.75 0 0 1 0-1.5h1.25V10a.75.75 0 0 1 1.5 0z"})]}),rename:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M11.7 1.3a1.5 1.5 0 0 1 2.1 0l.9.9a1.5 1.5 0 0 1 0 2.1L5.9 13.1l-3.4.9a.6.6 0 0 1-.7-.7l.9-3.4L11.7 1.3zm.9 1.2L3.4 11.7l-.5 1.9 1.9-.5L14 3.9l-1.4-1.4z"})}),copy:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M5 1.75A1.75 1.75 0 0 1 6.75 0h5.5A1.75 1.75 0 0 1 14 1.75v7.5A1.75 1.75 0 0 1 12.25 11h-1v1.25A1.75 1.75 0 0 1 9.5 14h-5.5A1.75 1.75 0 0 1 2.25 12.25v-7.5A1.75 1.75 0 0 1 4 3h1V1.75zM4 4.5a.25.25 0 0 0-.25.25v7.5c0 .14.11.25.25.25h5.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25H4zm3-3a.25.25 0 0 0-.25.25V3h2.75A1.75 1.75 0 0 1 11.25 4.75V9.5h1a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25H7z"})}),lock:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M8 1a3 3 0 0 0-3 3v2H4.5A1.5 1.5 0 0 0 3 7.5v6A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-6A1.5 1.5 0 0 0 11.5 6H11V4a3 3 0 0 0-3-3zm0 1.5A1.5 1.5 0 0 1 9.5 4v2h-3V4A1.5 1.5 0 0 1 8 2.5zM4.5 7.5h7v6h-7v-6z"})}),trash:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M6 1.75A.75.75 0 0 1 6.75 1h2.5a.75.75 0 0 1 .75.75V2.5h2.75a.75.75 0 0 1 0 1.5h-.53l-.66 9.3A1.75 1.75 0 0 1 9.82 15H6.18a1.75 1.75 0 0 1-1.74-1.7L3.78 4h-.53a.75.75 0 0 1 0-1.5H6v-.75zM5.29 4l.64 9.13a.25.25 0 0 0 .25.24h3.64a.25.25 0 0 0 .25-.24L10.71 4H5.29z"})}),collapse:V.jsx("svg",{viewBox:"0 0 16 16",children:V.jsx("path",{d:"M2 3.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.25zm0 9.5a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75zM8 5.6l3.1 3.1a.75.75 0 0 1-1.06 1.06L8 7.72l-2.04 2.04A.75.75 0 1 1 4.9 8.7L8 5.6z"})})};function E$(e,t,n){const r=String(n??"").trim().toLowerCase();if(!r)return{nodes:e,expand:[]};const i=new Set,s=o=>!!o&&Object.prototype.hasOwnProperty.call(t,o),a=o=>o.map(l=>{const u=l.name.toLowerCase().includes(r);if(l.type==="folder"){if(u)return i.add(l.id),l;const f=a(l.children||[]);return f.length?(i.add(l.id),{...l,children:f}):null}return s(l.rel)||u?l:null}).filter(Boolean);return{nodes:a(e),expand:[...i]}}function C$({onOpenGitPanel:e,onOpenSettings:t}){const n=et(pe=>pe.tree),r=et(pe=>pe.searchTerm),i=et(pe=>pe.searchHits),s=te.useMemo(()=>E$(n,i,r),[n,i,r]),a=s.expand.join("|"),o=te.useRef("");te.useEffect(()=>{if(!String(r||"").trim()){o.current="";return}if(!a||a===o.current)return;o.current=a;const pe=a.split("|").filter(Boolean);x(Oe=>{const Ie=new Set(Oe);let ze=!1;for(const le of pe)Ie.has(le)||(Ie.add(le),ze=!0);return ze?Ie:Oe})},[a,r]);const l=et(pe=>pe.currentRel),u=et(pe=>pe.refreshTree),f=et(pe=>pe.openNote),h=et(pe=>pe.setMessage),m=et(pe=>pe.locked),g=et(pe=>pe.clearCurrent),[b,x]=te.useState(new Set),[E,C]=te.useState(null),[y,_]=te.useState(null),[O,S]=te.useState(null),[w,A]=te.useState("");te.useEffect(()=>{u()},[u]);const T=pe=>x(Oe=>{const Ie=new Set(Oe);return Ie.has(pe)?Ie.delete(pe):Ie.add(pe),Ie}),P=te.useMemo(()=>E?.node?E.node.type==="folder"?E.node.rel:Jo(E.node.rel):"",[E]);te.useEffect(()=>{if(!E)return;const pe=le=>{if(le.button===2)return;const Se=le.target;Se&&Se.closest&&Se.closest(".zctx")||C(null)},Oe=le=>{le.key==="Escape"&&C(null)},Ie=()=>C(null),ze=()=>C(null);return document.addEventListener("mousedown",pe,!0),window.addEventListener("keydown",Oe,!0),document.addEventListener("scroll",Ie,!0),window.addEventListener("resize",ze),window.addEventListener("blur",ze),()=>{document.removeEventListener("mousedown",pe,!0),window.removeEventListener("keydown",Oe,!0),document.removeEventListener("scroll",Ie,!0),window.removeEventListener("resize",ze),window.removeEventListener("blur",ze)}},[E]);const M=(pe,Oe)=>{const Ie=Oe!==void 0?Oe:P;C(null),_({kind:"prompt",title:pe==="note"?"新建笔记":"新建文件夹",value:pe==="note"?"未命名":"新建文件夹",onSubmit:ze=>{_(null);const le=pe==="note"?window.__CMARK.createNote(Ie,ze):window.__CMARK.createFolder(Ie,ze);if(!le.ok)return h(le.message||"创建失败");u(),pe==="note"&&le.rel&&f(le.rel);try{const Se=et.getState().searchNotes;Se&&et.getState().searchTerm&&Se("")}catch{}Ie&&x(Se=>{if(Se.has(Ie))return Se;const Ne=new Set(Se);return Ne.add(Ie),Ne})}})},F=()=>{const pe=E?.node;C(null),pe&&_({kind:"prompt",title:pe.type==="note"?"重命名笔记":"重命名文件夹",value:pe.name,onSubmit:Oe=>{_(null),z(pe,Oe)}})},z=(pe,Oe)=>{if(!Oe||Oe===pe.name)return;if(pe.rel===l){const ze=et.getState();if(ze.content!==ze.savedContent&&(ze.save(),et.getState().content!==et.getState().savedContent)){h("当前笔记还有未保存的改动,改名已取消",3600);return}}const Ie=window.__CMARK.renameNode(pe.rel,Oe);if(!Ie.ok)return h(Ie.message||"重命名失败");u(),pe.type==="note"&&Ie.rel&&f(Ie.rel)},$=()=>{const pe=E?.node;if(C(null),!pe)return;if(pe.type==="folder"){const Ie=window.__CMARK.countInDir(pe.rel);if(Ie>0)return h(`文件夹内仍有 ${Ie} 篇笔记,请先移出或删除后再试`,4e3)}const Oe=pe.type==="note"?`删除笔记「${pe.name}」? -删除后将无法恢复,请确认是否继续。`:`删除文件夹「${pe.name}」?`;_({kind:"confirm",message:Oe,okText:"删除",danger:!0,onOk:()=>{_(null),pe.rel===l&&g();const Ie=window.__CMARK.deleteNode(pe.rel);if(!Ie.ok)return h(Ie.message||"删除失败");u()}})},Y=()=>{const pe=E?.node;if(C(null),!pe)return;const Oe=window.__CMARK.duplicateNode?.(pe.rel);if(!Oe||!Oe.ok)return h(Oe?.message||"复制失败");u(),h("已复制一份",1600)},Z=()=>{const pe=E?.node;C(null),window.__CMARK.shellShowItem?.(pe?pe.rel:"")},ve=()=>{const pe=E?.node;if(C(null),!pe||pe.type!=="note")return;const Oe=et.getState(),Ie=window.__ZNOTES?.readNoteState?.(pe.rel)?.locked;if(pe.rel===Oe.currentRel){Oe.toggleLocked();return}const ze=window.__ZNOTES?.setNoteLocked?.(pe.rel,!Ie);h(ze?.ok?Ie?"已取消只读":"已设为只读":ze?.message||"操作失败",1800)},me=(pe,Oe)=>{if(Jo(pe)===Oe)return;const Ie=et.getState(),ze=!!l&&(l===pe||l.startsWith(pe+"/")),le=l===pe;if(ze&&Ie.content!==Ie.savedContent){Ie.save();const Ne=et.getState();if(Ne.content!==Ne.savedContent){h("有未保存的改动,已暂停移动,请稍后重试",2600);return}}const Se=window.__CMARK.moveNode(pe,Oe);if(!Se.ok)return h(Se.message||"移动失败");if(ze&&Se.rel&&l){const Ne=le?Se.rel:Se.rel+l.slice(pe.length);et.getState().openNote(Ne)}u()},re=(pe,Oe)=>{if(pe===Oe)return;const Ie=structuredClone(n),ze=Qe=>Jo(Qe),le=ze(Oe);if(ze(pe)!==le)return;const Se=(Qe,ot)=>{for(const ht of Qe)if(ht.type==="folder"){if(ht.rel===ot)return ht.children||[];const Wt=Se(ht.children||[],ot);if(Wt)return Wt}return ot===""?Qe:null},Ne=Se(Ie,le);if(!Ne)return;const Be=Ne.findIndex(Qe=>Qe.rel===pe),He=Ne.findIndex(Qe=>Qe.rel===Oe);if(Be<0||He<0)return;const[Ge]=Ne.splice(Be,1);Ne.splice(He,0,Ge);const ut=window.__CMARK.saveOrder?.(Ie);ut&&!ut.ok&&h(ut.message||"排序保存失败"),u()},de=pe=>{pe.preventDefault();const Oe=O||pe.dataTransfer.getData("text/plain");A(""),S(null),Oe&&Jo(Oe)!==""&&me(Oe,"")},I=()=>x(new Set),X=pe=>M("note",pe),ne=pe=>M("folder",pe),W=pe=>{try{window.__CMARK.shellShowItem?.(pe)}catch{}},Te=pe=>{try{const Oe=window.__CMARK.openNoteInBrowser?.(pe);Oe?Oe.ok||h(Oe.message||"打开失败"):h("打开失败:宿主接口不可用")}catch(Oe){h("在浏览器中打开失败:"+Oe.message)}},je=te.useRef(null),[$e,Me]=te.useState(!1);return te.useEffect(()=>{const pe=je.current;if(!pe)return;const Oe=()=>{try{Me(pe.scrollHeight>pe.clientHeight+4)}catch{}};Oe();let Ie=null;try{Ie=new ResizeObserver(Oe),Ie.observe(pe)}catch{}return window.addEventListener("resize",Oe),()=>{try{Ie?.disconnect()}catch{}window.removeEventListener("resize",Oe)}},[n,b,r]),V.jsxs("aside",{className:"sidebar",children:[V.jsx(g$,{onOpenPanel:e}),V.jsx("div",{className:"tree",ref:je,onContextMenu:pe=>{pe.target===pe.currentTarget&&(pe.preventDefault(),C({x:pe.clientX,y:pe.clientY,node:null}))},onDragOver:pe=>{O&&(pe.preventDefault(),A("__root__"))},onDrop:de,children:n.length===0?V.jsx("div",{className:"tree-empty",children:"右键新建笔记"}):V.jsx(EN,{nodes:s.nodes,depth:0,open:b,toggle:T,onQuickNewNote:X,onQuickNewFolder:ne,onQuickOpenBrowser:Te,onQuickReveal:W,active:l,onPick:f,onMenu:(pe,Oe)=>{pe.preventDefault(),pe.stopPropagation(),C({x:pe.clientX,y:pe.clientY,node:Oe})},dragRel:O,dragOver:w,setDragRel:S,setDragOver:A,onDrop:me,onReorder:re})}),V.jsx("div",{className:"footer",children:V.jsxs("button",{onClick:t,children:[V.jsx(y$,{}),"设置"]})}),b.size>0&&$e?V.jsx("button",{type:"button",className:"tree-collapse-fab",title:"折叠全部目录",onClick:I,children:V.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M4 9.5 8 5.5l4 4"}),V.jsx("path",{d:"M4 13 8 9l4 4"})]})}):null,E&&V.jsx("div",{className:"zctx",style:{left:Math.min(E.x,window.innerWidth-160),top:Math.min(E.y,window.innerHeight-300)},onMouseDown:pe=>pe.stopPropagation(),onClick:pe=>pe.stopPropagation(),children:E.node?V.jsxs(V.Fragment,{children:[V.jsxs("button",{type:"button",onClick:()=>M("note"),children:[js.note,V.jsx("span",{children:"新建笔记"})]}),V.jsxs("button",{type:"button",onClick:()=>M("folder"),children:[js.folder,V.jsx("span",{children:"新建文件夹"})]}),V.jsx("div",{className:"zctx-sep"}),V.jsxs("button",{type:"button",onClick:F,children:[js.rename,V.jsx("span",{children:"重命名"})]}),V.jsxs("button",{type:"button",onClick:Y,children:[js.copy,V.jsx("span",{children:"复制一份"})]}),V.jsxs("button",{type:"button",onClick:Z,children:[js.open,V.jsx("span",{children:"在资源管理器中打开"})]}),E.node.type==="note"?V.jsxs("button",{type:"button",onClick:ve,children:[js.lock,V.jsx("span",{children:m&&E.node.rel===l?"取消只读":"设为只读"})]}):null,V.jsx("div",{className:"zctx-sep"}),V.jsxs("button",{type:"button",className:"danger",onClick:$,children:[js.trash,V.jsx("span",{children:"删除"})]})]}):V.jsxs(V.Fragment,{children:[V.jsxs("button",{type:"button",onClick:()=>M("folder"),children:[js.folder,V.jsx("span",{children:"新建文件夹"})]}),V.jsxs("button",{type:"button",onClick:()=>M("note"),children:[js.note,V.jsx("span",{children:"新建笔记"})]}),V.jsx("div",{className:"zctx-sep"}),V.jsxs("button",{type:"button",onClick:Z,children:[js.open,V.jsx("span",{children:"在资源管理器中打开"})]}),V.jsx("div",{className:"zctx-sep"}),V.jsxs("button",{type:"button",onClick:I,children:[js.collapse,V.jsx("span",{children:"折叠全部"})]})]})}),y?.kind==="prompt"?V.jsx(bN,{title:y.title,defaultValue:y.value,onSubmit:pe=>y.onSubmit(pe),onCancel:()=>_(null)}):null,y?.kind==="confirm"?V.jsx(m$,{message:y.message,okText:y.okText,danger:y.danger,onOk:()=>y.onOk(),onCancel:()=>_(null)}):null]})}const k6=typeof navigator<"u"&&navigator.userAgent.includes("Mac OS X"),aw=(e,t)=>!e||e.nodeName===t?e:aw(e.parentElement,t),k$=/^(?:\w+:)?\/\/(\S+)$/,D$=/mailto:([^?\\]+)/,S$=/^localhost[\d:?]*(?:[^\d:?]\S*)?$/,_$=/^[^\s.]+\.\S{2,}$/,Oc=e=>{if(typeof e!="string")return!1;const t=k$.exec(e),n=D$.exec(e),r=t||n;if(!r)return!1;const i=r[1];if(!i)return!1;try{new URL(e)}catch{return!1}return S$.test(i)||_$.test(i)},CN=(e,{allowedSchemes:t,permitInvalid:n=!1})=>{if(!e)return null;if(e.startsWith("/")||e.startsWith("#"))return e;let r=null;try{r=new URL(e)}catch{return n?e:null}return t&&!t.includes(r.protocol.slice(0,-1))?null:r.href},A$=e=>e===void 0,T$=e=>e===null,N$=e=>A$(e)||T$(e),Pr=e=>!N$(e);function Ce(e,t){return(...n)=>e(t,...n)}const O$={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=oe.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},B$={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=an.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},P$={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=we.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},u0=new WeakMap,Yf=new WeakMap,Jf=new WeakMap,kN=new WeakMap,D6=new WeakMap,S6=new WeakMap,_6=new WeakMap,Of=new WeakMap,oe={ancestors(e,t={}){const{reverse:n=!1}=t;let r=oe.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){const n=[];for(let r=0;rt[r])return 1}return 0},endsAfter(e,t){const n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),s=e[n],a=t[n];return oe.equals(r,i)&&s>a},endsAt(e,t){const n=e.length,r=e.slice(0,n),i=t.slice(0,n);return oe.equals(r,i)},endsBefore(e,t){const n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),s=e[n],a=t[n];return oe.equals(r,i)&&sn===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return oe.compare(e,t)===1},isAncestor(e,t){return e.lengtht.length&&oe.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&oe.compare(e,t)===0},isPath(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")},isSibling(e,t){if(e.length!==t.length)return!1;const n=e.slice(0,-1),r=t.slice(0,-1),i=e[e.length-1],s=t[t.length-1];return i!==s&&oe.equals(n,r)},levels(e,t={}){const{reverse:n=!1}=t,r=[];for(let i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error(`Cannot get the next path of a root path [${e}], because it has no next index.`);const t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error(`Cannot get the parent path of the root path [${e}].`);return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error(`Cannot get the previous path of a root path [${e}], because it has no previous index.`);const t=e[e.length-1];if(t<=0)throw new Error(`Cannot get the previous path of a first child path [${e}] because it would result in a negative index.`);return e.slice(0,-1).concat(t-1)},relative(e,t){if(!oe.isAncestor(t,e)&&!oe.equals(e,t))throw new Error(`Cannot get the relative path of [${e}] inside ancestor [${t}], because it is not above or equal to the path.`);return e.slice(t.length)},transform(e,t,n={}){if(!e)return null;const r=[...e],{affinity:i="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{const{path:s}=t;(oe.equals(s,r)||oe.endsBefore(s,r)||oe.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{const{path:s}=t;if(oe.equals(s,r)||oe.isAncestor(s,r))return null;oe.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{const{path:s,position:a}=t;oe.equals(s,r)||oe.endsBefore(s,r)?r[s.length-1]-=1:oe.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=a);break}case"split_node":{const{path:s,position:a}=t;if(oe.equals(s,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else oe.endsBefore(s,r)?r[s.length-1]+=1:oe.isAncestor(s,r)&&e[s.length]>=a&&(r[s.length-1]+=1,r[s.length]-=a);break}case"move_node":{const{path:s,newPath:a}=t;if(oe.equals(s,a))return r;if(oe.isAncestor(s,r)||oe.equals(s,r)){const o=a.slice();return oe.endsBefore(s,a)&&s.length0?"forward":t<0?"backward":"collapsed"},edges(e,t={}){const{reverse:n=!1}=t,{anchor:r,focus:i}=e;return we.isBackward(e)===n?[r,i]:[i,r]},end(e){const[,t]=we.edges(e);return t},equals(e,t){return an.equals(e.anchor,t.anchor)&&an.equals(e.focus,t.focus)},surrounds(e,t){const n=we.intersection(e,t);return n?we.equals(n,t):!1},includes(e,t){if(Qt.isRange(t)){if(we.includes(e,t.anchor)||we.includes(e,t.focus))return!0;const[a,o]=we.edges(e),[l,u]=we.edges(t);return an.isBefore(a,l)&&an.isAfter(o,u)}const[n,r]=we.edges(e);let i=!1,s=!1;return Qt.isPoint(t)?(i=an.compare(t,n)>=0,s=an.compare(t,r)<=0):(i=oe.compare(t,n.path)>=0,s=oe.compare(t,r.path)<=0),i&&s},intersection(e,t){const{anchor:n,focus:r}=e,i=Sa(e,M$),[s,a]=we.edges(e),[o,l]=we.edges(t),u=an.isBefore(s,o)?o:s,f=an.isBefore(a,l)?a:l;return an.isBefore(f,u)?null:L$({anchor:u,focus:f},i)},isBackward(e){const{anchor:t,focus:n}=e;return an.isAfter(t,n)},isCollapsed(e){const{anchor:t,focus:n}=e;return an.equals(t,n)},isExpanded(e){return!we.isCollapsed(e)},isForward(e){return!we.isBackward(e)},isRange(e){return Yr(e)&&an.isPoint(e.anchor)&&an.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){const[t]=we.edges(e);return t},transform(e,t,n={}){if(e===null)return null;const{affinity:r="inward"}=n;let i,s;if(r==="inward"){const l=we.isCollapsed(e);we.isForward(e)?(i="forward",s=l?i:"backward"):(i="backward",s=l?i:"forward")}else r==="outward"?we.isForward(e)?(i="backward",s="forward"):(i="forward",s="backward"):(i=r,s=r);const a=an.transform(e.anchor,t,{affinity:i}),o=an.transform(e.focus,t,{affinity:s});return!a||!o?null:{anchor:a,focus:o}}},T6=(e,{deep:t=!1}={})=>!Yr(e)||typeof e.apply=="function"?!1:t?ie.isNodeList(e.children):Array.isArray(e.children),Sr={isAncestor(e,{deep:t=!1}={}){return Yr(e)&&ie.isNodeList(e.children,{deep:t})},isElement:T6,isElementList(e,{deep:t=!1}={}){return Array.isArray(e)&&e.every(n=>Sr.isElement(n,{deep:t}))},isElementProps(e){return e.children!==void 0},isElementType:(e,t,n="type")=>T6(e)&&e[n]===t,matches(e,t){for(const n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},z$=["text"],j$=["children"];function N6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ku(e){for(var t=1;t=0:aKu(Ku({},h),{},{path:[h.path[0]-i,...h.path.slice(1)]}),o=a(n),l=a(r),u={anchor:o,focus:l},f=ie.nodes(s,{reverse:!0,pass:([,h])=>!we.includes(u,h)});for(const[,h]of f){if(!we.includes(u,h)){const m=h[h.length-1];Hl(s,oe.parent(h),g=>ow(g,m,1))}oe.equals(h,l.path)&&hp(s,h,m=>{const g=m.text.slice(0,l.offset);return Ku(Ku({},m),{},{text:g})}),oe.equals(h,o.path)&&hp(s,h,m=>{const g=m.text.slice(o.offset);return Ku(Ku({},m),{},{text:g})})}return s.children},findPath(e,t){for(const[n,r]of ie.nodes(e))if(n===t)return r},get(e,t){const n=ie.getIf(e,t);if(n===void 0)throw new Error(`Cannot find a descendant at path [${t}] in node: ${Jn.stringify(e)}`);return n},getIf(e,t){let n=e;for(let r=0;rie.isNode(n,{deep:t}))},isText(e){return typeof e.text=="string"},last(e,t){const n=t.slice();let r=ie.get(e,n);for(;r&&!(ie.isText(r)||r.children.length===0);){const i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){const n=ie.get(e,t);if(!ie.isText(n))throw new Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Jn.stringify(n)}`);return n},*levels(e,t,n={}){for(const r of oe.levels(t,n))yield[ie.get(e,r),r]},matches(e,t){return ie.isElement(e)&&Sr.isElementProps(t)&&Sr.matches(e,t)||ie.isText(e)&&kn.isTextProps(t)&&kn.matches(e,t)},*nodes(e,t={}){const{pass:n,reverse:r=!1}=t,{from:i=[],to:s}=t,a=new Set;let o=[],l=e;for(;!(s&&(r?oe.isBefore(o,s):oe.isAfter(o,s)));){if(a.has(l)||(yield[l,o]),!a.has(l)&&!ie.isText(l)&&l.children.length!==0&&(n==null||n([l,o])===!1)){a.add(l);let u=r?l.children.length-1:0;oe.isAncestor(o,i)&&(u=i[o.length]),o=o.concat(u),l=ie.get(e,o);continue}if(o.length===0)break;if(!r){const u=oe.next(o);if(ie.has(e,u)){o=u,l=ie.get(e,o);continue}}if(r&&o[o.length-1]!==0){o=oe.previous(o),l=ie.get(e,o);continue}o=oe.parent(o),l=ie.get(e,o),a.add(l)}},parent(e,t){const n=oe.parent(t),r=ie.get(e,n);if(ie.isText(r))throw new Error(`Cannot get the parent of path [${t}] because it does not exist in the root.`);return r},string(e){return ie.isText(e)?e.text:e.children.map(ie.string).join("")},*texts(e,t={}){for(const[n,r]of ie.nodes(e,t))ie.isText(n)&&(yield[n,r])}};function O6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sr(e){for(var t=1;toc.isOperation(t))},isSelectionOperation(e){return oc.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return oc.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return sr(sr({},e),{},{type:"remove_node"});case"insert_text":return sr(sr({},e),{},{type:"remove_text"});case"merge_node":return sr(sr({},e),{},{type:"split_node",path:oe.previous(e.path)});case"move_node":{const{newPath:t,path:n}=e;if(oe.equals(t,n))return e;if(oe.isSibling(n,t))return sr(sr({},e),{},{path:t,newPath:n});const r=oe.transform(n,e),i=oe.transform(oe.next(n),e);return sr(sr({},e),{},{path:r,newPath:i})}case"remove_node":return sr(sr({},e),{},{type:"insert_node"});case"remove_text":return sr(sr({},e),{},{type:"insert_text"});case"set_node":{const{properties:t,newProperties:n}=e;return sr(sr({},e),{},{properties:n,newProperties:t})}case"set_selection":{const{properties:t,newProperties:n}=e;return t==null?sr(sr({},e),{},{properties:n,newProperties:null}):n==null?sr(sr({},e),{},{properties:null,newProperties:t}):sr(sr({},e),{},{properties:n,newProperties:t})}case"split_node":return sr(sr({},e),{},{type:"merge_node",path:oe.next(e.path)})}}},Yr=e=>typeof e=="object"&&e!==null,so=(e,t)=>{if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;ne.selection?e.selection:e.children.length>0?L.end(e,[]):[0],Bc=(e,t)=>{const[n]=L.node(e,t);return r=>r===n},f0=(e,t=!1)=>{const n=!t,r=t?W$(e):e;let i=Mt.None,s=Mt.None,a=0,o=null,l=null,u=null;for(const f of r){const h=f.codePointAt(0);if(!h)break;const m=oV(f,h);if([i,s]=n?[s,m]:[m,i],Go(i,Mt.ZWJ)&&Go(s,Mt.ExtPict)&&(n?o=B6(e.substring(0,a)):o=B6(e.substring(0,e.length-a)),!o)||Go(i,Mt.RI)&&Go(s,Mt.RI)&&(l!==null?l=!l:n?l=!0:l=hV(e.substring(0,e.length-a)),!l)||Go(i,Mt.InCBLinker|Mt.InCBExtend)&&Go(s,Mt.InCBConsonant)&&(n?u=P6(e.substring(0,a)):u=P6(e.substring(0,e.length-a)),!u)||i!==Mt.None&&s!==Mt.None&&uV(i,s))break;a+=f.length}return a||1},q$=/\s/,$$=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,V$=/['\u2018\u2019]/,DN=e=>typeof Intl>"u"||typeof Intl.Segmenter!="function"?void 0:new Intl.Segmenter(void 0,{granularity:"word"}).segment(e),U$=(e,t=!1,n)=>{var r;let i=0,s=-1,a=e;for(;a.length>0;){const u=f0(a,t),[f,h]=d0(a,u,t);if(n?n(f):z4(f,h,t))s<0&&(s=i);else if(s>=0)break;i+=u,a=h}if(n||s<0)return i;const o=t?e.slice(e.length-i,e.length-s):e.slice(s,i),l=(r=DN(o))===null||r===void 0?void 0:r.containing(t?o.length-1:0);return l!=null&&l.isWordLike?t?s+o.length-l.index:s+l.segment.length:i},H$=(e,t,n)=>{const r=(h,m,g)=>n?n(h):z4(h,m,g);let i=t,s=e.slice(0,t);for(;s.length>0;){const h=f0(s,!0),[m,g]=d0(s,h,!0);if(!r(m,g,!0))break;i-=h,s=g}let a=t,o=e.slice(t);for(;o.length>0;){const h=f0(o),[m,g]=d0(o,h);if(!r(m,g,!1))break;a+=h,o=g}if(n||i===a)return[i,a];const l=DN(e.slice(i,a)),u=t-i,f=[u>0?l?.containing(u-1):void 0,uh?.isWordLike);return f?[i+f.index,i+f.index+f.segment.length]:[i,a]},d0=(e,t,n)=>{if(n){const r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},z4=(e,t,n=!1)=>{if(q$.test(e))return!1;if(V$.test(e)){const r=f0(t,n),[i,s]=d0(t,r,n);if(z4(i,s,n))return!0}return!$$.test(e)},W$=function*(t){const n=t.length-1;for(let r=0;re>=55296&&e<=56319,G$=e=>e>=56320&&e<=57343;var Mt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any",e[e.InCBConsonant=4096]="InCBConsonant",e[e.InCBExtend=8192]="InCBExtend",e[e.InCBLinker=16384]="InCBLinker"})(Mt||(Mt={}));const Y$=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AF0\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDECB-\uDECF\uDEF0-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDDF0\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDE50-\uDE52\uDE5B\uDE5C\uDE5F\uDE80\uDE81]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,J$=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,X$=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Q$=/^[\u1100-\u115F\uA960-\uA97C]$/,Z$=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,eV=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,tV=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,nV=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,rV=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCCF\uDCD0\uDCF6-\uDCFF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAF-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDE5F\uDE66-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFA]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDEE5\uDEE9\uDEEB-\uDEF0\uDEF3-\uDEFF\uDFDC-\uDFF0]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE58-\uDE5F\uDE6E-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,iV=/^(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])$/,sV=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D1\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42\u1B43\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAA\u1BAC\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD32\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE\uDFCF\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3D\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF41\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,aV=/^(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)$/,oV=(e,t)=>{let n=Mt.Any;return e.search(Y$)!==-1&&(n|=Mt.Extend),t===8205&&(n|=Mt.ZWJ),t>=127462&&t<=127487&&(n|=Mt.RI),e.search(J$)!==-1&&(n|=Mt.Prepend),e.search(X$)!==-1&&(n|=Mt.SpacingMark),e.search(Q$)!==-1&&(n|=Mt.L),e.search(Z$)!==-1&&(n|=Mt.V),e.search(eV)!==-1&&(n|=Mt.T),e.search(tV)!==-1&&(n|=Mt.LV),e.search(nV)!==-1&&(n|=Mt.LVT),e.search(rV)!==-1&&(n|=Mt.ExtPict),e.search(iV)!==-1&&(n|=Mt.InCBConsonant),e.search(sV)!==-1&&(n|=Mt.InCBExtend),e.search(aV)!==-1&&(n|=Mt.InCBLinker),n};function Go(e,t){return(e&t)!==0}const lV=[[Mt.L,Mt.L|Mt.V|Mt.LV|Mt.LVT],[Mt.LV|Mt.V,Mt.V|Mt.T],[Mt.LVT|Mt.T,Mt.T],[Mt.Any,Mt.Extend|Mt.ZWJ],[Mt.Any,Mt.SpacingMark],[Mt.Prepend,Mt.Any],[Mt.InCBLinker|Mt.InCBExtend,Mt.InCBConsonant],[Mt.ZWJ,Mt.ExtPict],[Mt.RI,Mt.RI]];function uV(e,t){return lV.findIndex(n=>Go(e,n[0])&&Go(t,n[1]))===-1}const cV=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCCF\uDCD0\uDCF6-\uDCFF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAF-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDE5F\uDE66-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFA]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDEE5\uDEE9\uDEEB-\uDEF0\uDEF3-\uDEFF\uDFDC-\uDFF0]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE58-\uDE5F\uDE6E-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AF0\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDECB-\uDECF\uDEF0-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDDF0\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDE50-\uDE52\uDE5B\uDE5C\uDE5F\uDE80\uDE81]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,B6=e=>e.search(cV)!==-1,fV=/(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*$/,P6=e=>e.search(fV)!==-1,dV=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,hV=e=>{const t=e.match(dV);return t===null?!1:t[0].length/2%2===1},SN=(e,{deep:t=!1}={})=>Yr(e)?typeof e.above=="function"&&typeof e.addMark=="function"&&typeof e.after=="function"&&typeof e.apply=="function"&&typeof e.before=="function"&&typeof e.collapse=="function"&&typeof e.delete=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.deselect=="function"&&typeof e.edges=="function"&&typeof e.elementReadOnly=="function"&&typeof e.end=="function"&&typeof e.first=="function"&&typeof e.fragment=="function"&&typeof e.getDirtyPaths=="function"&&typeof e.getFragment=="function"&&typeof e.getMarks=="function"&&typeof e.hasBlocks=="function"&&typeof e.hasInlines=="function"&&typeof e.hasPath=="function"&&typeof e.hasRange=="function"&&typeof e.hasTexts=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertNodes=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertText=="function"&&typeof e.isBlock=="function"&&typeof e.isEdge=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isEmpty=="function"&&typeof e.isEnd=="function"&&typeof e.isInline=="function"&&typeof e.isNormalizing=="function"&&typeof e.isSelectable=="function"&&typeof e.isStart=="function"&&typeof e.isVoid=="function"&&typeof e.last=="function"&&typeof e.leaf=="function"&&typeof e.levels=="function"&&typeof e.liftNodes=="function"&&typeof e.markableVoid=="function"&&typeof e.mergeNodes=="function"&&typeof e.move=="function"&&typeof e.moveNodes=="function"&&typeof e.next=="function"&&typeof e.node=="function"&&typeof e.nodes=="function"&&typeof e.normalize=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.parent=="function"&&typeof e.path=="function"&&typeof e.pathRef=="function"&&typeof e.pathRefs=="function"&&typeof e.point=="function"&&typeof e.pointRef=="function"&&typeof e.pointRefs=="function"&&typeof e.positions=="function"&&typeof e.previous=="function"&&typeof e.range=="function"&&typeof e.rangeRef=="function"&&typeof e.rangeRefs=="function"&&typeof e.removeMark=="function"&&typeof e.removeNodes=="function"&&typeof e.select=="function"&&typeof e.setNodes=="function"&&typeof e.setNormalizing=="function"&&typeof e.setPoint=="function"&&typeof e.setSelection=="function"&&typeof e.shouldMergeNodesRemovePrevNode=="function"&&typeof e.shouldNormalize=="function"&&typeof e.splitNodes=="function"&&typeof e.start=="function"&&typeof e.string=="function"&&typeof e.unhangRange=="function"&&typeof e.unsetNodes=="function"&&typeof e.unwrapNodes=="function"&&typeof e.void=="function"&&typeof e.withoutNormalizing=="function"&&typeof e.wrapNodes=="function"&&(e.marks===null||Yr(e.marks))&&(e.selection===null||we.isRange(e.selection))&&(t?ie.isNodeList(e.children)&&oc.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations)):!1,L={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e,t={}){const{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e,t={}){const{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e,t={}){return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasRange(e,t){return e.hasRange(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor:SN,isElementReadOnly(e,t){return e.isElementReadOnly(t)},insertionPoint(e,t){return e.insertionPoint(t)},isIsolated(e,t){return e.isIsolated(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isRemoteChange(e){return Of.get(e)===!0},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},word(e,t){return e.word(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},withRemoteChanges(e,t){const n=Of.get(e);Of.set(e,!0);try{t()}finally{n===void 0?Of.delete(e):Of.set(e,n)}},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},Qt={isLocation(e){return oe.isPath(e)||an.isPoint(e)||we.isRange(e)},isPath(e){return Array.isArray(e)},isPoint(e){return"offset"in e},isRange(e){return"anchor"in e},isSpan(e){return Array.isArray(e)&&Array.isArray(e[0])}},pV={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(oe.isPath)}};function R6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function F6(e){for(var t=1;tt.offset?1:0:n},isAfter(e,t){return an.compare(e,t)===1},isBefore(e,t){return an.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&oe.equals(e.path,t.path)},isPoint(e){return Yr(e)&&typeof e.offset=="number"&&oe.isPath(e.path)},transform(e,t,n={}){if(e===null)return null;const{affinity:r="forward"}=n;let{path:i,offset:s}=e;switch(t.type){case"insert_node":case"move_node":{i=oe.transform(i,t,n);break}case"insert_text":{oe.equals(t.path,i)&&(t.offset{let{text:t}=e;return Sa(e,mV)},kn={equals(e,t,n={}){const{loose:r=!1,ignore:i=[]}=n;if(i.length===0)return r?so(L6(e),L6(t)):so(e,t);const s=a=>Object.fromEntries(Object.entries(a).filter(([o])=>!(r&&o==="text")&&!i.includes(o)));return so(s(e),s(t))},isText(e){return Yr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>kn.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(const n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){let n=[{leaf:Qa({},e)}];for(const r of t){const{anchor:i,focus:s,merge:a}=r,o=Sa(r,gV),[l,u]=we.edges(r),f=[];let h=0;const m=l.offset,g=u.offset,b=a??Object.assign;for(const{leaf:x}of n){const{length:E}=x.text,C=h;if(h+=E,m<=C&&h<=g){b(x,o),f.push({leaf:x});continue}if(m!==g&&(m===h||g===C)||m>h||gC){const S=m-C;_={leaf:Qa(Qa({},y),{},{text:y.text.slice(0,S)})},y=Qa(Qa({},y),{},{text:y.text.slice(S)})}b(y,o),_&&f.push(_),f.push({leaf:y}),O&&f.push(O)}n=f}if(n.length>1){let r=0;for(const[i,s]of n.entries()){const a=r,o=a+s.leaf.text.length,l={start:a,end:o};i===0&&(l.isFirst=!0),i===n.length-1&&(l.isLast=!0),s.position=l,r=o}}return n}};function z6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fp(e){for(var t=1;tdp(e,t,0,...n),dp=(e,t,n,...r)=>{const i=e.slice();return i.splice(t,n,...r),i},q6=(e,t,n)=>{const r=e.slice();return r[t]=n,r},ow=dp,j4=(e,t,n)=>{if(t.length===0)throw new Error("Cannot modify the editor");const r=ie.get(e,t),i=t.slice();let s=n(r);for(;i.length>1;){const o=i.pop(),l=ie.get(e,i);s=fp(fp({},l),{},{children:q6(l.children,o,s)})}const a=i[0];e.children=q6(e.children,a,s)},Hl=(e,t,n)=>{t.length===0?e.children=n(e.children):j4(e,t,r=>{if(ie.isText(r))throw new Error(`Cannot get the element at path [${t}] because it refers to a leaf node: ${Jn.stringify(r)}`);return fp(fp({},r),{},{children:n(r.children)})})},hp=(e,t,n)=>j4(e,t,r=>{if(!ie.isText(r))throw new Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Jn.stringify(r)}`);return n(r)});function $6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function si(e){for(var t=1;t{const a=r[r.length-1];if(a>s.length)throw new Error(`Cannot apply an "insert_node" operation at path [${r}] because the destination is past the end of the node.`);return j6(s,a,i)}),n=!0;break}case"insert_text":{const{path:r,offset:i,text:s}=t;if(s.length===0)break;hp(e,r,a=>{const o=a.text.slice(0,i),l=a.text.slice(i);return si(si({},a),{},{text:o+s+l})}),n=!0;break}case"merge_node":{const{path:r}=t,i=r[r.length-1],s=oe.previous(r),a=s[s.length-1];if(r.length===0)throw new Error(`Cannot apply a "merge_node" operation at path [${r}] because the root node cannot be merged.`);if(typeof i!="number"||typeof a!="number")throw new Error("Index must be number");Hl(e,oe.parent(r),o=>{const l=o[i],u=o[a];let f;if(ie.isText(l)&&ie.isText(u))f=si(si({},u),{},{text:u.text+l.text});else if(ie.isElement(l)&&ie.isElement(u))f=si(si({},u),{},{children:u.children.concat(l.children)});else throw new Error(`Cannot apply a "merge_node" operation at path [${r}] to nodes of different interfaces: ${Jn.stringify(l)} ${Jn.stringify(u)}`);return dp(o,a,2,f)}),n=!0;break}case"move_node":{const{path:r,newPath:i}=t,s=r[r.length-1];if(oe.isAncestor(r,i))throw new Error(`Cannot move a path [${r}] to new path [${i}] because the destination is inside itself.`);const a=ie.get(e,r);Hl(e,oe.parent(r),u=>ow(u,s,1));const o=oe.transform(r,t),l=o[o.length-1];Hl(e,oe.parent(o),u=>j6(u,l,a)),n=!0;break}case"remove_node":{const{path:r}=t,i=r[r.length-1];if(Hl(e,oe.parent(r),s=>ow(s,i,1)),e.selection){let s=si({},e.selection);for(const[a,o]of we.points(s)){const l=an.transform(a,t);if(s!=null&&l!=null)s[o]=l;else{let u,f;for(const[m,g]of ie.texts(e))if(oe.compare(g,r)===-1)u=[m,g];else{f=[m,g];break}let h=!1;u&&f&&(oe.isSibling(u[1],r)?h=!1:oe.equals(f[1],r)?h=!0:h=oe.common(u[1],r).length{const o=a.text.slice(0,i),l=a.text.slice(i+s.length);return si(si({},a),{},{text:o+l})}),n=!0;break}case"set_node":{const{path:r,properties:i,newProperties:s}=t;if(r.length===0)throw new Error("Cannot set properties on the root node!");j4(e,r,a=>{const o=si({},a);for(const l in s){if(Ec.includes(l))throw new Error(`Cannot set the "${l}" property of nodes!`);const u=s[l];if(l==="then"&&typeof u=="function")throw new Error('Cannot set the "then" property of a node to a function');u==null?delete o[l]:o[l]=u}for(const l in i)Object.hasOwn(s,l)||delete o[l];return o});break}case"set_selection":{const{newProperties:r}=t;if(r==null){e.selection=null;break}if(e.selection==null){if(!(r.anchor&&r.focus))throw new Error(`Cannot apply an incomplete "set_selection" operation properties ${Jn.stringify(r)} when there is no current selection.`);e.selection=si({},r);break}const i=si({},e.selection);for(const s in r){if(_N.includes(s))throw new Error(`Cannot set the "${s}" property of the selection!`);const a=r[s];if(s==="then"&&typeof a=="function")throw new Error('Cannot set the "then" property of the selection to a function');if(a==null){if(s==="anchor"||s==="focus")throw new Error(`Cannot remove the "${s}" selection property`);delete i[s]}else i[s]=a}e.selection=i;break}case"split_node":{const{path:r,position:i,properties:s}=t,a=r[r.length-1];if(r.length===0)throw new Error(`Cannot apply a "split_node" operation at path [${r}] because the root node cannot be split.`);if(typeof a!="number")throw new Error("Index must be number");Hl(e,oe.parent(r),o=>{const l=o[a];let u,f;if(ie.isText(l)){const h=l.text.slice(0,i),m=l.text.slice(i);u=si(si({},l),{},{text:h}),f={text:m}}else{const h=l.children.slice(0,i),m=l.children.slice(i);u=si(si({},l),{},{children:h}),f={children:m}}for(const h in s){if(Ec.includes(h))throw new Error(`Cannot set the "${h}" property of nodes!`);const m=s[h];if(h==="then"&&typeof m=="function")throw new Error('Cannot set the "then" property of a node to a function');m!=null&&(f[h]=m)}return dp(o,a,1,u,f)}),n=!0;break}}if(n&&e.selection){const r=si({},e.selection),i=L.isRemoteChange(e)&&we.isExpanded(r)?we.transform(r,t,{affinity:"inward"}):null;for(const[s,a]of we.points(r))r[a]=i?i[a]:an.transform(s,t);we.equals(r,e.selection)||(e.selection=r)}}},yV={setChildren(e,t){e.setChildren(t)},insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},xV={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},bV={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t,n={}){L.withoutNormalizing(e,()=>{const{voids:r=!1,select:i=!1}=n;let{at:s=L4(e)}=n;if(Qt.isPath(s)&&(s=L.range(e,s)),Qt.isRange(s))if(we.isCollapsed(s))s=s.anchor;else{const f=we.end(s);if(!r&&L.void(e,{at:f}))return;const h=we.start(s),m=L.pointRef(e,h),g=L.pointRef(e,f);Fe.delete(e,{at:s,voids:r});const b=m.unref(),x=g.unref();s=b||x,n.select!==!1&&Fe.setSelection(e,{anchor:s,focus:s})}if(!r&&L.void(e,{at:s})||L.elementReadOnly(e,{at:s}))return;const a=i?L.pointRef(e,s):void 0,{path:o,offset:l}=s;t.length>0&&e.apply({type:"insert_text",path:o,offset:l,text:t});const u=a?.unref();u&&Fe.select(e,u)})}};function V6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oh(e){for(var t=1;tVh.get(e)||!1,AN=(e,t,n)=>{const r=Vh.get(e)||!1;Vh.set(e,!0);try{t(),n()}finally{Vh.set(e,r)}},U6=8;function q4(e,t,n,r=!1){let i=u0.get(e)||[],s=Yf.get(e);const a=o=>{if(o){const l=o.join(",");s.has(l)||(s.add(l),i.push(o))}};if(n){const o=i;if(i=[],r){s=void 0;for(const l of o){const u=n(l);u&&i.push(u)}}else{s=new Set;for(const l of o)a(n(l))}}!s&&(t.length>U6||!n&&i.length>U6)&&(s=new Set(i.map(o=>o.join(","))));for(const o of t)s?a(o):i.some(l=>oe.equals(l,o))||i.push(o);u0.set(e,i),s?Yf.set(e,s):Yf.delete(e)}const TN=(e,t)=>{for(const n of L.pathRefs(e))O$.transform(n,t);for(const n of L.pointRefs(e))B$.transform(n,t);for(const n of L.rangeRefs(e))P$.transform(n,t);if(!wV(e)){const n=oe.operationCanTransformPath(t)?r=>oe.transform(r,t):void 0;q4(e,e.getDirtyPaths(t),n,t.type!=="merge_node")}Fe.transform(e,t),e.operations.push(t),L.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Jf.get(e)||(Jf.set(e,!0),Promise.resolve().then(()=>{Jf.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},NN=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{const{path:n}=t;return oe.levels(n)}case"insert_node":{const{node:n,path:r}=t,i=oe.levels(r),s=ie.isText(n)?[]:Array.from(ie.nodes(n),([,a])=>r.concat(a));return[...i,...s]}case"merge_node":{const{path:n}=t,r=oe.ancestors(n),i=oe.previous(n);return[...r,i]}case"move_node":{const{path:n,newPath:r}=t;if(oe.equals(n,r))return[];const i=[],s=[];for(const u of oe.ancestors(n)){const f=oe.transform(u,t);i.push(f)}for(const u of oe.ancestors(r)){const f=oe.transform(u,t);s.push(f)}const a=s[s.length-1],o=r[r.length-1],l=a.concat(o);return[...i,...s,l]}case"remove_node":{const{path:n}=t;return[...oe.ancestors(n)]}case"split_node":{const{path:n}=t,r=oe.levels(n),i=oe.next(n);return[...r,i]}default:return[]}},ON=e=>{const{selection:t}=e;return t?ie.fragment(e,t):[]},EV=(e,t)=>ie.extractProps(t),BN=(e,t,n)=>{const[r,i]=t;if(ie.isText(r))return;"children"in r||(r.children=[]);let s=r;if(s!==e&&s.children.length===0){const o={text:""};Fe.insertNodes(e,o,{at:i.concat(0),voids:!0}),s=ie.get(e,i)}if(s!==e&&(e.isInline(s)||ie.isText(s.children[0])||e.isInline(s.children[0])))for(let o=0;o{const i=n*42;if(t>i)throw new Error(`Could not completely normalize the editor after ${i} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. Next dirty path: [${r[r.length-1]}]. Check the normalizeNode logic for this node and its ancestors.`);return!0},RN=(e,t={})=>{const{voids:n=!1,mode:r="lowest",at:i=e.selection,match:s}=t;if(!i)return;let a=L.path(e,i);if(!Qt.isRange(i)||oe.equals(i.focus.path,i.anchor.path)){if(a.length===0)return;a=oe.parent(a)}const o=r==="lowest",[l]=L.levels(e,{at:a,voids:n,match:s,reverse:o});return l};function H6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W6(e){for(var t=1;t{const{selection:r}=e;if(r){const i=(o,l)=>{if(!ie.isText(o))return!1;const[u,f]=L.parent(e,l);return!e.isVoid(u)||e.markableVoid(u)},s=we.isExpanded(r);let a=!1;if(!s){const[o,l]=L.node(e,r);if(o&&i(o,l)){const[u]=L.parent(e,l);a=u&&e.markableVoid(u)}}if(s||a)Fe.setNodes(e,{[t]:n},{match:i,split:!0,voids:!0});else{const o=W6(W6({},L.marks(e)||{}),{},{[t]:n});e.marks=o,Jf.get(e)||e.onChange()}}};function K6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G6(e){for(var t=1;t{const r=L.point(e,t,{edge:"end"}),i=L.end(e,[]),s={anchor:r,focus:i},{distance:a=1}=n;let o=0,l;for(const u of L.positions(e,G6(G6({},n),{},{at:s}))){if(o>a)break;o!==0&&(l=u),o++}return l};function Y6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J6(e){for(var t=1;t{const r=L.start(e,[]),i=L.point(e,t,{edge:"start"}),s={anchor:r,focus:i},{distance:a=1}=n;let o=0,l;for(const u of L.positions(e,J6(J6({},n),{},{at:s,reverse:!0}))){if(o>a)break;o!==0&&(l=u),o++}return l},MN=(e,t)=>{const{selection:n}=e;n&&we.isCollapsed(n)&&Fe.delete(e,{unit:t,reverse:!0})},LN=(e,t)=>{const{selection:n}=e;n&&we.isCollapsed(n)&&Fe.delete(e,{unit:t})},zN=(e,{direction:t="forward"}={})=>{const{selection:n}=e;if(n&&we.isExpanded(n)){const[r,i]=we.edges(n),s=u=>{var f;return(f=L.above(e,{at:u,match:h=>ie.isElement(h)&&L.isBlock(e,h)}))===null||f===void 0?void 0:f[1]},a=s(r),o=s(i);if(!L.above(e,{at:r,match:u=>ie.isElement(u)&&e.isIsolated(u)})&&a&&o&&a.length===1&&oe.isSibling(a,o)&&oe.isBefore(a,o)&&!L.isVoid(e,ie.get(e,o))&&L.isStart(e,r,a)&&L.isStart(e,i,o)){const u=L.pathRef(e,o);L.withoutNormalizing(e,()=>{for(let h=o[o.length-1]-1;h>=a[a.length-1];h--)Fe.removeNodes(e,{at:[...oe.parent(a),h]})});const f=u.unref();f&&Fe.select(e,L.start(e,f));return}Fe.delete(e,{reverse:t==="backward"})}},jN=(e,t)=>[L.start(e,t),L.end(e,t)];function X6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Q6(e){for(var t=1;tL.above(e,Q6(Q6({},t),{},{match:n=>ie.isElement(n)&&L.isElementReadOnly(e,n)})),uw=(e,t)=>L.point(e,t,{edge:"end"}),$N=(e,t)=>{const n=L.path(e,t,{edge:"start"});return L.node(e,n)},VN=(e,t)=>{const n=L.range(e,t);return ie.fragment(e,n)};function Z6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;tL.above(e,ek(ek({},t),{},{match:n=>ie.isElement(n)&&L.isVoid(e,n)})),HN=(e,t)=>t.children.some(n=>ie.isElement(n)&&L.isBlock(e,n)),WN=(e,t)=>t.children.some(n=>ie.isText(n)||L.isInline(e,n)),KN=(e,t)=>ie.has(e,t),GN=(e,t)=>{const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},YN=(e,t)=>t.children.every(n=>ie.isText(n)),JN=e=>{Fe.splitNodes(e,{always:!0})},CV=(e,t,n)=>{Fe.insertNodes(e,t,n)},kV=e=>{Fe.splitNodes(e,{always:!0})};function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function DV(e){for(var t=1;t{const{selection:r,marks:i}=e;if(r){if(n.at==null&&we.isCollapsed(r)){const s=L.insertionPoint(e,r.anchor);an.equals(s,r.anchor)||Fe.select(e,s)}if(i){const s=DV({text:t},i);Fe.insertNodes(e,s,{at:n.at,voids:n.voids})}else Fe.insertText(e,t,n);e.marks=null}},_V=(e,t)=>{const n=L.above(e,{at:t,match:(f,h)=>Sr.isElement(f)&&e.isInline(f)&&L.isEdge(e,t,h),mode:"highest",voids:!0});let r=t;if(n){const[,f]=n;if(L.isStart(e,t,f)&&oe.hasPrevious(f)){const h=oe.previous(f);if(!kn.isText(ie.getIf(e,h)))return null;r=L.end(e,h)}else if(L.isEnd(e,t,f)){const h=oe.next(f);if(!kn.isText(ie.getIf(e,h)))return null;r=L.start(e,h)}else return null}const i=ie.parent(e,r.path);let s=r.path[r.path.length-1];const a=f=>Sr.isElement(f)&&e.isInline(f)&&!e.isVoid(f)&&ie.string(f)==="";for(;r.offset===0&&s>1&&a(i.children[s-1])&&kn.isText(i.children[s-2]);)s-=2,r=L.end(e,oe.parent(r.path).concat(s));const o=[],l=i.children[s-1];r.offset===0&&Sr.isElement(l)&&e.isInline(l)&&o.push([l,oe.previous(r.path),"end"]);let[u]=L.leaf(e,r);if(r.offset===u.text.length)for(;s+1{var n,r;if(!kn.isText(ie.getIf(e,t.path)))return{point:t,affinity:!1,inlineAffinity:null};const i=_V(e,t);let s=(n=i?.point)!==null&&n!==void 0?n:t,a=i!==null;const[o]=L.leaf(e,s),l=ie.parent(e,s.path).children,u=s.path[s.path.length-1],f=l[u-1],h=l[u+1];let m;if(s.offset===0&&kn.isText(f)?m=[f,o,oe.previous(s.path),s.path]:s.offset===o.text.length&&kn.isText(h)&&(m=[o,h,s.path,oe.next(s.path)]),m){const[g,b,x,E]=m,C=e.leafEdgeAffinity(g,b);C!==null&&(a=!0,s=C==="backward"?{path:x,offset:g.text.length}:{path:E,offset:0})}return{point:s,affinity:a,inlineAffinity:(r=i?.affinity)!==null&&r!==void 0?r:null}},AV=(e,t)=>$4(e,t).point,XN=(e,t)=>!e.isInline(t),QN=(e,t,n)=>L.isStart(e,t,n)||L.isEnd(e,t,n),qf=(e,t)=>{const{children:n}=t,[r]=n;return n.length===0||n.length===1&&ie.isText(r)&&r.text===""&&!e.isVoid(t)},ZN=(e,t,n)=>{const r=L.end(e,n);return an.equals(t,r)},eO=e=>{const t=kN.get(e);return t===void 0?!0:t},tO=(e,t,n)=>{if(t.offset!==0)return!1;const r=L.start(e,n);return an.equals(t,r)},nO=(e,t)=>{const n=L.path(e,t,{edge:"end"});return L.node(e,n)},rO=(e,t,n={})=>{const r=L.path(e,t,n);return[ie.leaf(e,r),r]};function*iO(e,t={}){const{at:n=e.selection,reverse:r=!1,voids:i=!1}=t;let{match:s}=t;if(s==null&&(s=()=>!0),!n)return;const a=[],o=L.path(e,n);for(const[l,u]of ie.levels(e,o))if(s(l,u)&&(a.push([l,u]),!i&&ie.isElement(l)&&L.isVoid(e,l)))break;r&&a.reverse(),yield*a}const TV=["text"],NV=["text"],OV=["text"],sO=(e,t={})=>{const{marks:n,selection:r}=e;if(!r)return null;let{anchor:i,focus:s}=r;if(n)return n;if(we.isExpanded(r)){if(we.isBackward(r)&&([s,i]=[i,s]),L.isEnd(e,i,i.path)){const b=L.after(e,i);b&&(i=b)}const[g]=L.nodes(e,{match:ie.isText,at:{anchor:i,focus:s}});if(g){const[b]=g,{text:x}=b;return Sa(b,TV)}else return{}}const a=$4(e,i);if(a.affinity){const[h]=L.leaf(e,a.point),{text:m}=h;return Sa(h,NV)}const{path:o}=i;let[l]=L.leaf(e,o);if(i.offset===0){const h=L.previous(e,{at:o,match:ie.isText});if(!L.above(e,{match:g=>ie.isElement(g)&&L.isVoid(e,g)&&e.markableVoid(g)})){const g=L.above(e,{match:b=>ie.isElement(b)&&L.isBlock(e,b)});if(h&&g){const[b,x]=h,[,E]=g;oe.isAncestor(E,x)&&(l=b)}}}const{text:u}=l;return Sa(l,OV)},BV=(e,t={})=>{const{mode:n="lowest",voids:r=!1}=t;let{match:i,at:s=e.selection}=t;if(!s)return;const a=L.after(e,s,{voids:r});if(!a)return;const[,o]=L.last(e,[]),l=[a.path,o];if(Qt.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(Qt.isPath(s)){const[f]=L.parent(e,s);i=h=>f.children.includes(h)}else i=()=>!0;const[u]=L.nodes(e,{at:l,match:i,mode:n,voids:r});return u},aO=(e,t,n={})=>{const r=L.path(e,t,n);return[ie.get(e,r),r]};function*PV(e,t={}){const{at:n=e.selection,mode:r="all",universal:i=!1,reverse:s=!1,voids:a=!1,pass:o}=t;let{match:l}=t;if(l||(l=()=>!0),!n)return;let u,f;if(Qt.isSpan(n))u=n[0],f=n[1];else{const b=L.path(e,n,{edge:"start"}),x=L.path(e,n,{edge:"end"});u=s?x:b,f=s?b:x}const h=ie.nodes(e,{reverse:s,from:u,to:f,pass:([b,x])=>o&&o([b,x])?!0:ie.isElement(b)?!!(!a&&(L.isVoid(e,b)||L.isElementReadOnly(e,b))):!1}),m=[];let g;for(const[b,x]of h){const E=g&&oe.compare(x,g[1])===0;if(r==="highest"&&E)continue;if(!l(b,x)){if(i&&!E&&ie.isText(b))return;continue}if(r==="lowest"&&E){g=[b,x];continue}const C=r==="lowest"?g:[b,x];C&&(i?m.push(C):yield C),g=[b,x]}r==="lowest"&&g&&(i?m.push(g):yield g),i&&(yield*m)}const oO=(e,t={})=>{const{force:n=!1,operation:r}=t,i=o=>u0.get(o)||[],s=o=>Yf.get(o)||new Set,a=o=>{const l=i(o).pop(),u=l.join(",");return s(o).delete(u),l};if(L.isNormalizing(e)){if(n){const o=Array.from(ie.nodes(e),([,u])=>u),l=new Set(o.map(u=>u.join(",")));u0.set(e,o),Yf.set(e,l)}i(e).length!==0&&L.withoutNormalizing(e,()=>{for(const f of i(e))if(ie.has(e,f)){const h=L.node(e,f),[m,g]=h;ie.isElement(m)&&m.children.length===0&&e.normalizeNode(h,{operation:r,force:n})}let o=i(e);const l=o.length;let u=0;for(;o.length!==0;){if(!e.shouldNormalize({dirtyPaths:o,iteration:u,initialDirtyPathsLength:l,operation:r}))return;const f=a(e);if(ie.has(e,f)){const h=L.node(e,f);e.normalizeNode(h,{operation:r,force:n})}u++,o=i(e)}})}},lO=(e,t,n={})=>{const r=L.path(e,t,n),i=oe.parent(r);return L.node(e,i)},V4=()=>{var e;return(e=Symbol.dispose)!==null&&e!==void 0?e:Symbol.for("Symbol.dispose")},uO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[V4()](){i.unref()},unref(){const{current:a}=i;return L.pathRefs(e).delete(i),i.current=null,a}};return L.pathRefs(e).add(i),i},cO=e=>{let t=D6.get(e);return t||(t=new Set,D6.set(e,t)),t},fO=(e,t,n={})=>{const{depth:r,edge:i}=n;if(Qt.isPath(t)){if(i==="start"){const[,s]=ie.first(e,t);t=s}else if(i==="end"){const[,s]=ie.last(e,t);t=s}}return Qt.isRange(t)&&(i==="start"?t=we.start(t):i==="end"?t=we.end(t):t=oe.common(t.anchor.path,t.focus.path)),Qt.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},dO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[V4()](){i.unref()},unref(){const{current:a}=i;return L.pointRefs(e).delete(i),i.current=null,a}};return L.pointRefs(e).add(i),i},hO=e=>{let t=S6.get(e);return t||(t=new Set,S6.set(e,t)),t},pO=(e,t,n={})=>{const{edge:r="start"}=n;if(Qt.isPath(t)){let i;if(r==="end"){const[,a]=ie.last(e,t);i=a}else{const[,a]=ie.first(e,t);i=a}const s=ie.get(e,i);if(!ie.isText(s))throw new Error(`Cannot get the ${r} point in the node at path [${t}] because it has no ${r} text node.`);return{path:i,offset:r==="end"?s.text.length:0}}if(Qt.isRange(t)){const[i,s]=we.edges(t);return r==="start"?i:s}return t};function*mO(e,t={}){const{at:n=e.selection,unit:r="offset",isWordCharacter:i,reverse:s=!1,voids:a=!1}=t;if(!n)return;const o=L.range(e,n),[l,u]=we.edges(o),f=s?u:l;let h=!1,m="",g=0,b=0,x=0;const E=[],C=O=>!L.above(e,{at:O,voids:!0,match:S=>ie.isElement(S)&&!e.isSelectable(S)}),y=(O,S)=>{for(const[,w]of ie.texts(O)){const A={path:[...S,...w],offset:0};if(C(A))return A}};for(const[O,S]of L.nodes(e,{at:n,reverse:s,voids:a})){const w=E.some(T=>oe.isAncestor(T,S));function*A(T){w||(yield T)}if(ie.isElement(O)){if(!e.isSelectable(O))if(E.push(S),s){if(oe.hasPrevious(S)){const T=L.end(e,oe.previous(S));C(T)&&(yield*A(T))}continue}else{const T=oe.next(S);if(L.hasPath(e,T)){const P=L.start(e,T);C(P)&&(yield*A(P))}continue}if(!a&&(e.isVoid(O)||e.isElementReadOnly(O))){const T=y(O,S);if(T&&(yield*A(T)),e.isInline(O)){const[,P]=L.above(e,{at:S,match:F=>ie.isElement(F)&&L.isBlock(e,F)}),M=s?oe.isAncestor(P,l.path)?l:L.start(e,P):oe.isAncestor(P,u.path)?u:L.end(e,P);m=L.string(e,{anchor:L.start(e,S),focus:M},{voids:a}),g=0}h=!0;continue}if(e.isInline(O))continue;if(L.hasInlines(e,O)){const T=oe.isAncestor(S,u.path)?u:L.end(e,S),P=oe.isAncestor(S,l.path)?l:L.start(e,S);m=L.string(e,{anchor:P,focus:T},{voids:a}),h=!0}}if(ie.isText(O)){const T=oe.equals(S,f.path);for(T?(b=s?f.offset:O.text.length-f.offset,x=f.offset):(b=O.text.length,x=s?b:0),(T||h||r==="offset")&&(yield*A({path:S,offset:x}),h=!1);;){if(g===0){if(m==="")break;g=_(m,r,s),m=d0(m,g,s)[1]}if(x=s?x-g:x+g,b=b-g,b<0){g=-b;break}g=0,yield*A({path:S,offset:x})}}}function _(O,S,w){return S==="character"?f0(O,w):S==="word"?U$(O,w,i):S==="line"||S==="block"?O.length:1}}const RV=(e,t={})=>{const{mode:n="lowest",voids:r=!1}=t;let{match:i,at:s=e.selection}=t;if(!s)return;const a=L.before(e,s,{voids:r});if(!a)return;const[,o]=L.first(e,[]),l=[a.path,o];if(Qt.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(Qt.isPath(s)){const[f]=L.parent(e,s);i=h=>f.children.includes(h)}else i=()=>!0;const[u]=L.nodes(e,{reverse:!0,at:l,match:i,mode:n,voids:r});return u},gO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[V4()](){i.unref()},unref(){const{current:a}=i;return L.rangeRefs(e).delete(i),i.current=null,a}};return L.rangeRefs(e).add(i),i},vO=e=>{let t=_6.get(e);return t||(t=new Set,_6.set(e,t)),t},yO=(e,t,n)=>{if(Qt.isRange(t)&&!n)return t;const r=L.start(e,t),i=L.end(e,n||t);return{anchor:r,focus:i}};function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FV(e){for(var t=1;t{const{selection:n}=e;if(n){const r=(a,o)=>{if(!ie.isText(a))return!1;const[l,u]=L.parent(e,o);return!e.isVoid(l)||e.markableVoid(l)},i=we.isExpanded(n);let s=!1;if(!i){const[a,o]=L.node(e,n);if(a&&r(a,o)){const[l]=L.parent(e,o);s=l&&e.markableVoid(l)}}if(i||s)Fe.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{const a=FV({},L.marks(e)||{});delete a[t],e.marks=a,Jf.get(e)||e.onChange()}}},bO=(e,t)=>{kN.set(e,t)},cw=(e,t)=>L.point(e,t,{edge:"start"}),wO=(e,t,n={})=>{const{voids:r=!1}=n,i=L.range(e,t),[s,a]=we.edges(i);let o="";for(const[l,u]of L.nodes(e,{at:i,match:ie.isText,voids:r})){let f=l.text;oe.equals(u,a.path)&&(f=f.slice(0,a.offset)),oe.equals(u,s.path)&&(f=f.slice(s.offset)),o+=f}return o},EO=(e,t,n={})=>{const{voids:r=!1}=n;let[i,s]=we.edges(t);if(i.offset!==0||s.offset!==0||we.isCollapsed(t)||oe.hasPrevious(s.path))return t;const a=L.above(e,{at:s,match:h=>ie.isElement(h)&&L.isBlock(e,h),voids:r}),o=a?a[1]:[],u={anchor:L.start(e,i),focus:s};let f=!0;for(const[h,m]of L.nodes(e,{at:u,match:ie.isText,reverse:!0,voids:r})){if(f){f=!1;continue}if(h.text!==""||oe.isBefore(m,o)){s={path:m,offset:h.text.length};break}}return{anchor:i,focus:s}},CO=(e,t)=>{const n=L.isNormalizing(e);L.setNormalizing(e,!1);try{t()}finally{L.setNormalizing(e,n)}L.normalize(e)},IV=(e,[t,n],[r,i])=>ie.isElement(t)&&L.isEmpty(e,t)&&oe.isSibling(n,i)||ie.isText(t)&&t.text===""&&n[n.length-1]!==0,MV=(e,t={})=>{const{at:n=e.selection,isWordCharacter:r}=t;if(!n)return;const i=Qt.isPoint(n)?n:n.focus,s=L.above(e,{at:i,match:m=>Sr.isElement(m)&&L.isBlock(e,m)});if(!s||L.isVoid(e,s[0]))return;let a="",o=[],l=-1;for(const[m,g]of L.nodes(e,{at:s[1],match:kn.isText,voids:!0})){if(L.above(e,{at:g,match:x=>Sr.isElement(x)&&L.isVoid(e,x),voids:!0})){if(oe.equals(g,i.path))return;if(l>=0)break;a="",o=[];continue}oe.equals(g,i.path)&&(l=a.length+i.offset),o.push({path:g,start:a.length,end:a.length+m.text.length}),a+=m.text}if(l<0)return;const[u,f]=H$(a,l,r);if(u===f)return;const h=(m,g)=>{const b=g?o.find(C=>m>=C.start&&mm>C.start&&m<=C.end),{path:x,start:E}=b;return{path:x,offset:m-E}};return{anchor:h(u,!0),focus:h(f,!1)}},LV=(e,t,n)=>{const r=L.above(e,{at:t,match:l=>ie.isElement(l)&&L.isBlock(e,l)});if(!r)return;const[i,s]=r;if(!ie.isElement(i)||L.isVoid(e,i)||!L.isEmpty(e,i)||n&&!oe.hasPrevious(s))return;const a=n?oe.previous(s):oe.next(s);if(!ie.has(e,a))return;const o=ie.get(e,a);if(!(!ie.isElement(o)||!L.isBlock(e,o)||!L.isVoid(e,o)))return[s,a]},rk=(e,t)=>ie.isElement(t)&&L.isInline(e,t)&&!L.isVoid(e,t)&&L.isEmpty(e,t),zV=(e,t,n)=>{const r=oe.parent(t.path);if(r.length>0&&rk(e,ie.get(e,r)))return r;const i=ie.get(e,t.path);if(!(n?t.offset===0:ie.isText(i)&&t.offset===i.text.length)||n&&!oe.hasPrevious(t.path))return;const a=n?oe.previous(t.path):oe.next(t.path);if(ie.has(e,a)&&rk(e,ie.get(e,a)))return a},fw=(e,t)=>{var n;return(n=L.above(e,{at:t,match:r=>ie.isElement(r)&&L.isIsolated(e,r),voids:!0}))===null||n===void 0?void 0:n[1]},kO=(e,t,n)=>{const r=fw(e,t),i=fw(e,n);return r&&i?oe.equals(r,i):r===i},jV=(e,t,n,r)=>{if(kO(e,t,n))return n;const i=fw(e,t);if(!(!i||oe.isAncestor(i,n.path)))return r?L.start(e,i):L.end(e,i)},qV=(e,t={})=>{L.withoutNormalizing(e,()=>{var n,r;const{reverse:i=!1,unit:s="character",distance:a=1,voids:o=!1}=t;let{at:l=e.selection,hanging:u=!1}=t;if(!l)return;let f=!1;if(Qt.isRange(l)&&we.isCollapsed(l)&&(f=!0,l=l.anchor),Qt.isPoint(l)){const z=!o&&(s==="character"||s==="word")&&a===1?LV(e,l,i):void 0;if(z){const[Z,ve]=z,me=L.pathRef(e,ve);Fe.removeNodes(e,{at:Z});const re=me.unref();re&&t.at==null&&Fe.select(e,i?L.end(e,re):L.start(e,re));return}const $=L.void(e,{at:l,mode:"highest"}),Y=s==="character"&&a===1?zV(e,l,i):void 0;if(!o&&$){const[,Z]=$;l=Z}else if(Y)l=Y;else{const Z={unit:s,distance:a},ve=jV(e,l,i?L.before(e,l,Z)||L.start(e,[]):L.after(e,l,Z)||L.end(e,[]),i);if(!ve)return;l={anchor:l,focus:ve},u=!0}}if(Qt.isPath(l)){const z=t.at==null&&i?L.before(e,l):void 0,$=z&&oe.isAncestor(oe.parent(l),z.path)?L.pointRef(e,z):void 0;if(Fe.removeNodes(e,{at:l,voids:o}),e.children.length===0&&t.at==null){$?.unref(),Fe.insertNodes(e,{children:[{text:""}]},{at:[0],select:!0});return}const Y=$&&$.unref();Y&&Fe.select(e,Y);return}if(we.isCollapsed(l))return;if(!u){const[,z]=we.edges(l),$=L.end(e,[]);an.equals(z,$)||(l=L.unhangRange(e,l,{voids:o}))}let[h,m]=we.edges(l);const g=L.above(e,{match:z=>ie.isElement(z)&&L.isBlock(e,z),at:h,voids:o}),b=L.above(e,{match:z=>ie.isElement(z)&&L.isBlock(e,z),at:m,voids:o}),x=g&&b&&!oe.equals(g[1],b[1]),E=oe.equals(h.path,m.path),C=o?null:(n=L.void(e,{at:h,mode:"highest"}))!==null&&n!==void 0?n:L.elementReadOnly(e,{at:h,mode:"highest"}),y=o?null:(r=L.void(e,{at:m,mode:"highest"}))!==null&&r!==void 0?r:L.elementReadOnly(e,{at:m,mode:"highest"});if(C){const z=L.before(e,h);z&&g&&oe.isAncestor(g[1],z.path)&&(h=z)}if(y){const z=L.after(e,m);z&&b&&oe.isAncestor(b[1],z.path)&&(m=z)}const _=[];let O;for(const z of L.nodes(e,{at:l,voids:o})){const[$,Y]=z;O&&oe.compare(Y,O)===0||(!o&&ie.isElement($)&&(L.isVoid(e,$)||L.isElementReadOnly(e,$))||!oe.isCommon(Y,h.path)&&!oe.isCommon(Y,m.path))&&(_.push(z),O=Y)}const S=Array.from(_,([,z])=>L.pathRef(e,z)),w=L.pointRef(e,h),A=L.pointRef(e,m);let T="";if(!E&&!C){const z=w.current,[$]=L.leaf(e,z),{path:Y}=z,{offset:Z}=h,ve=$.text.slice(Z);ve.length>0&&(e.apply({type:"remove_text",path:Y,offset:Z,text:ve}),T=ve)}if(S.reverse().map(z=>z.unref()).filter(z=>z!==null).forEach(z=>Fe.removeNodes(e,{at:z,voids:o})),!y){const z=A.current,[$]=L.leaf(e,z),{path:Y}=z,Z=E?h.offset:0,ve=$.text.slice(Z,m.offset);ve.length>0&&(e.apply({type:"remove_text",path:Y,offset:Z,text:ve}),T=ve)}!E&&x&&A.current&&w.current&&kO(e,w.current,A.current)&&Fe.mergeNodes(e,{at:A.current,hanging:!0,voids:o}),f&&i&&s==="character"&&T.length>1&&T.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Fe.insertText(e,T.slice(0,T.length-a));const P=w.unref(),M=A.unref(),F=i?P||M:M||P;t.at==null&&F&&Fe.select(e,F)})};function ik(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sk(e){for(var t=1;t{L.withoutNormalizing(e,()=>{var r,i,s;const{hanging:a=!1,voids:o=!1,select:l=n.at==null,filter:u}=n;let f;t.length&&n.at==null&&e.selection&&we.isCollapsed(e.selection)&&(f=$4(e,e.selection.anchor),an.equals(f.point,e.selection.anchor)||Fe.select(e,f.point));let{at:h=L4(e),batchDirty:m=!0}=n;if(!t.length)return;if(Qt.isRange(h)){if(!a){const[,ne]=we.edges(h),W=L.end(e,[]);an.equals(ne,W)||(h=L.unhangRange(e,h,{voids:o}))}if(we.isCollapsed(h))h=h.anchor;else{const[ne,W]=we.edges(h);if(!o&&L.void(e,{at:W}))return;const Te=L.pointRef(e,ne),je=L.pointRef(e,W);Fe.delete(e,{at:h,voids:o});const $e=Te.unref(),Me=je.unref();h=$e??Me}}else Qt.isPath(h)&&(h=L.start(e,h));if(!o&&L.void(e,{at:h}))return;const g=L.above(e,{at:h,match:ne=>ie.isElement(ne)&&L.isInline(e,ne),mode:"highest",voids:o});if(g&&((r=f)===null||r===void 0?void 0:r.inlineAffinity)!=="inside"){const[,ne]=g,W=ie.parent(e,ne),Te=ne[ne.length-1];if(L.isEnd(e,h,ne)){const je=oe.next(ne);kn.isText(W.children[Te+1])||Fe.insertNodes(e,{text:""},{at:je,voids:o}),h=L.start(e,je)}else L.isStart(e,h,ne)&&(kn.isText(W.children[Te-1])?h=L.end(e,oe.previous(ne)):(Fe.insertNodes(e,{text:""},{at:ne,voids:o}),h=L.start(e,ne)))}const b=L.above(e,{match:ne=>ie.isElement(ne)&&L.isBlock(e,ne),at:h,voids:o}),[,x]=b,E={blockEntry:b},C=ne=>{if(!u)return ne;if(ie.isText(ne))return u(ne,E)?ne:null;if(ie.isElement(ne)){if(!u(ne,E))return null;const W=ne.children.map(C).filter(Te=>Te!==null);return W.length===0&&!e.isVoid(ne)?null:sk(sk({},ne),{},{children:W})}return ne},y=u?t.map(C).filter(ne=>ne!==null):t;if(!y.length)return;t=y;const _=L.isStart(e,h,x),O=L.isEnd(e,h,x),S=_&&O,[,w]=ie.first({children:t},[]),[,A]=ie.last({children:t},[]),T=([ne,W])=>W.length===0?!1:S?!0:!(!_&&oe.isAncestor(W,w)&&ie.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne)||!O&&oe.isAncestor(W,A)&&ie.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne));let P=!0;const M=[],F=[],z=[];for(const ne of ie.nodes({children:t},{pass:T})){const[W,Te]=ne;P&&ie.isElement(W)&&!e.isInline(W)&&!oe.isAncestor(Te,w)&&(P=!1),T(ne)&&(ie.isElement(W)&&!e.isInline(W)?(P=!1,F.push(W)):P?M.push(W):z.push(W))}const[$]=L.nodes(e,{at:h,match:ne=>ie.isText(ne)||L.isInline(e,ne),mode:((i=f)===null||i===void 0?void 0:i.inlineAffinity)==="inside"?"lowest":"highest",voids:o}),[,Y]=$,Z=L.isStart(e,h,Y),ve=L.isEnd(e,h,Y),me=L.pathRef(e,O&&!z.length?oe.next(x):x),re=L.pathRef(e,ve?oe.next(Y):Y),de=F.length>0&&!_&&!O,I=z.length>0||de;Fe.splitNodes(e,{at:h,match:ne=>I?ie.isElement(ne)&&L.isBlock(e,ne):ie.isText(ne)||L.isInline(e,ne),mode:I||((s=f)===null||s===void 0?void 0:s.inlineAffinity)==="inside"?"lowest":"highest",always:I&&(!_||M.length>0)&&(!O||z.length>0),voids:o});const X=L.pathRef(e,!Z||Z&&ve?oe.next(Y):Y);if(Fe.insertNodes(e,M,{at:X.current,match:ne=>ie.isText(ne)||L.isInline(e,ne),mode:"highest",voids:o,batchDirty:m}),S&&!M.length&&F.length&&!z.length&&Fe.removeNodes(e,{at:x,voids:o}),Fe.insertNodes(e,F,{at:me.current,match:ne=>ie.isElement(ne)&&L.isBlock(e,ne),mode:"lowest",voids:o,batchDirty:m}),Fe.insertNodes(e,z,{at:re.current,match:ne=>ie.isText(ne)||L.isInline(e,ne),mode:"highest",voids:o,batchDirty:m}),l){let ne;if(z.length>0&&re.current?ne=oe.previous(re.current):F.length>0&&me.current?ne=oe.previous(me.current):X.current&&(ne=oe.previous(X.current)),ne){const W=ie.get(e,ne),Te=de&&!z.length&&ie.isElement(W)&&L.isVoid(e,W)?L.start(e,oe.next(ne)):L.end(e,ne);Fe.select(e,Te)}}X.unref(),me.unref(),re.unref()})},SO=(e,t={})=>{const{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")Fe.select(e,r.anchor);else if(n==="focus")Fe.select(e,r.focus);else if(n==="start"){const[i]=we.edges(r);Fe.select(e,i)}else if(n==="end"){const[,i]=we.edges(r);Fe.select(e,i)}}else return},_O=e=>{const{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},AO=(e,t={})=>{const{selection:n}=e,{distance:r=1,unit:i="character",reverse:s=!1}=t;let{edge:a=null}=t;if(!n)return;a==="start"&&(a=we.isBackward(n)?"focus":"anchor"),a==="end"&&(a=we.isBackward(n)?"anchor":"focus");const{anchor:o,focus:l}=n,u={distance:r,unit:i},f={};if(a==null||a==="anchor"){const h=s?L.before(e,o,u):L.after(e,o,u);h&&(f.anchor=h)}if(a==null||a==="focus"){const h=s?L.before(e,l,u):L.after(e,l,u);h&&(f.focus=h)}Fe.setSelection(e,f)},Uh=(e,t)=>{const{selection:n}=e;if(t=L.range(e,t),n){Fe.setSelection(e,t);return}if(!Qt.isRange(t))throw new Error(`When setting the selection and the current selection is \`null\` you must provide at least an \`anchor\` and \`focus\`, but you passed: ${Jn.stringify(t)}`);e.apply({type:"set_selection",properties:n,newProperties:t})};function ak(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ok(e){for(var t=1;t{const{selection:r}=e;let{edge:i="both"}=n;if(!r)return;i==="start"&&(i=we.isBackward(r)?"focus":"anchor"),i==="end"&&(i=we.isBackward(r)?"anchor":"focus");const{anchor:s,focus:a}=r,o=i==="anchor"?s:a;Fe.setSelection(e,{[i==="anchor"?"anchor":"focus"]:ok(ok({},o),t)})},NO=(e,t)=>{const{selection:n}=e,r={},i={};if(n){for(const s in t){if(_N.includes(s))continue;const a=Object.hasOwn(n,s)?n[s]:void 0,o=t[s];$V(s,a,o)&&(r[s]=n[s],i[s]=t[s])}Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}};function $V(e,t,n){return(e==="anchor"||e==="focus")&&an.isPoint(t)&&an.isPoint(n)?!an.equals(t,n):t!==n}const OO=(e,t,n={})=>{L.withoutNormalizing(e,()=>{const{hanging:r=!1,voids:i=!1,mode:s="lowest",batchDirty:a=!0}=n;let{at:o,match:l,select:u}=n;if(ie.isNode(t)&&(t=[t]),t.length===0)return;const[f]=t;if(!o){if(ie.isElement(f)&&e.isInline(f)&&e.selection&&we.isCollapsed(e.selection)){const x=L.insertionPoint(e,e.selection.anchor);an.equals(x,e.selection.anchor)||Fe.select(e,x)}o=L4(e),u!==!1&&(u=!0)}if(u==null&&(u=!1),Qt.isRange(o))if(r||(o=L.unhangRange(e,o,{voids:i})),we.isCollapsed(o))o=o.anchor;else{var h,m;const[x,E]=we.edges(o),C=L.pointRef(e,x),y=L.pointRef(e,E),_=L.before(e,x,{voids:i}),O=_&&L.pointRef(e,_);Fe.delete(e,{at:o});const S=C.unref(),w=y.unref(),A=O?O.unref():null;o=(h=(m=w??S)!==null&&m!==void 0?m:A)!==null&&h!==void 0?h:L.start(e,[])}if(Qt.isPoint(o)){l==null&&(ie.isText(f)?l=E=>ie.isText(E):e.isInline(f)?l=E=>ie.isText(E)||L.isInline(e,E):l=E=>ie.isElement(E)&&L.isBlock(e,E));const[x]=L.nodes(e,{at:o.path,match:l,mode:s,voids:i});if(x){const[,E]=x,C=L.pathRef(e,E),y=L.isEnd(e,o,E);Fe.splitNodes(e,{at:o,match:l,mode:s,voids:i});const _=C.unref();o=y?oe.next(_):_}else return}const g=oe.parent(o);let b=o[o.length-1];if(!(!i&&L.void(e,{at:g}))){if(a){const x=[],E=oe.levels(g);AN(e,()=>{for(const C of t){const y=g.concat(b);b++;const _={type:"insert_node",path:y,node:C};e.apply(_),o=oe.next(o),x.push(_),ie.isText(C)?E.push(y):E.push(...Array.from(ie.nodes(C),([,O])=>y.concat(O)))}},()=>{q4(e,E,C=>{let y=C;for(const _ of x)if(oe.operationCanTransformPath(_)&&(y=oe.transform(y,_),!y))return null;return y})})}else for(const x of t){const E=g.concat(b);b++,e.apply({type:"insert_node",path:E,node:x}),o=oe.next(o)}if(o=oe.previous(o),u){const x=L.end(e,o);x&&Fe.select(e,x)}}})},BO=(e,t={})=>{const{height:n=1}=t;if(!Number.isInteger(n)||n<0)throw new Error("The height of a lift must be a non-negative integer.");n!==0&&L.withoutNormalizing(e,()=>{const{at:r=e.selection,mode:i="lowest",voids:s=!1}=t;let{match:a}=t;if(!r)return;a==null&&(a=Qt.isPath(r)?Bc(e,r):u=>ie.isElement(u)&&L.isBlock(e,u));const o=L.nodes(e,{at:r,match:a,mode:i,voids:s}),l=Array.from(o,([,u])=>L.pathRef(e,u));try{for(const u of l){for(let f=0;f0&&h.length<2)break;if(h.length<2)throw new Error(`Cannot lift node at a path [${h}] because it has a depth of less than \`2\`.`);const m=L.node(e,oe.parent(h)),[g,b]=m,x=h[h.length-1],{length:E}=g.children;if(E===1){const C=oe.next(b);Fe.moveNodes(e,{at:h,to:C,voids:s}),Fe.removeNodes(e,{at:b,voids:s})}else if(x===0)Fe.moveNodes(e,{at:h,to:b,voids:s});else if(x===E-1){const C=oe.next(b);Fe.moveNodes(e,{at:h,to:C,voids:s})}else{const C=oe.next(h),y=oe.next(b);Fe.splitNodes(e,{at:C,voids:s}),Fe.moveNodes(e,{at:h,to:y,voids:s})}}t.select&&u.current&&Fe.select(e,L.end(e,u.current))}}finally{for(const u of l)u.unref()}})},VV=["text"],UV=["children"],PO=(e,t)=>t!==e&&(ie.isText(t)||L.isVoid(e,t)||t.children.length===1&&PO(e,t.children[0])),HV=(e,t={})=>{L.withoutNormalizing(e,()=>{let{match:n,at:r=e.selection}=t;const{hanging:i=!1,voids:s=!1,mode:a="lowest"}=t;if(!r)return;const o=Qt.isPath(r),l=o?r:null,u=n==null&&o;if(n==null)if(o){const[M]=L.parent(e,r);n=F=>M.children.includes(F)}else n=M=>ie.isElement(M)&&L.isBlock(e,M);if(!i&&Qt.isRange(r)&&(r=L.unhangRange(e,r,{voids:s})),Qt.isRange(r))if(we.isCollapsed(r))r=r.anchor;else{const[,M]=we.edges(r),F=L.pointRef(e,M);Fe.delete(e,{at:r}),r=F.unref(),t.at==null&&Fe.select(e,r)}const[f]=L.nodes(e,{at:r,match:n,voids:s,mode:a}),h=u&&l&&oe.hasPrevious(l)?oe.previous(l):null,m=h?L.node(e,h):L.previous(e,{at:r,match:n,voids:s,mode:a});if(!f||!m)return;const[g,b]=f,[x,E]=m;if(b.length===0||E.length===0)return;const C=oe.next(E),y=oe.common(b,E),_=oe.isSibling(b,E),O=Array.from(L.levels(e,{at:b}),([M])=>M).slice(y.length).slice(0,-1),S=L.above(e,{at:b,mode:"highest",match:M=>O.includes(M)&&PO(e,M)});let w,A,T;if(ie.isText(g)&&ie.isText(x)){const{text:M}=g,F=Sa(g,VV);A=x.text.length,w=F}else if(ie.isElement(g)&&ie.isElement(x)){if(g.children.length>0&&x.children.length>0&&L.hasInlines(e,g)!==L.hasInlines(e,x)&&(T=L.shouldMergeNodesRemovePrevNode(e,m,f),!T))throw new Error(`Cannot merge the node at path [${b}] with the previous node at path [${E}] because their children are not the same kind: one contains blocks and the other contains text or inline nodes.`);const{children:M}=g,F=Sa(g,UV);A=x.children.length,w=F}else throw new Error(`Cannot merge the node at path [${b}] with the previous sibling because it is not the same kind: ${Jn.stringify(g)} ${Jn.stringify(x)}`);const P=S&&L.pathRef(e,S[1]);_||Fe.moveNodes(e,{at:b,to:C,voids:s}),P&&Fe.removeNodes(e,{at:P.current,voids:s}),T??L.shouldMergeNodesRemovePrevNode(e,m,f)?Fe.removeNodes(e,{at:E,voids:s}):e.apply({type:"merge_node",path:C,position:A,properties:w}),P&&P.unref()})},dw=(e,t)=>{L.withoutNormalizing(e,()=>{const{to:n,at:r=e.selection,mode:i="lowest",select:s=!1,voids:a=!1}=t;let{match:o}=t;if(!r)return;o==null&&(o=Qt.isPath(r)?Bc(e,r):g=>ie.isElement(g)&&L.isBlock(e,g));const l=L.pathRef(e,n),u=L.nodes(e,{at:r,match:o,mode:i,voids:a}),f=Array.from(u,([,g])=>L.pathRef(e,g));let h;for(const g of f){const b=g.unref(),x=l.current;if(b.length!==0){var m;e.apply({type:"move_node",path:b,newPath:x}),h=(m=oe.transform(b,{type:"move_node",path:b,newPath:x}))!==null&&m!==void 0?m:void 0}l.current&&oe.isSibling(x,b)&&oe.isAfter(x,b)&&(l.current=oe.next(l.current))}l.unref(),s&&h&&Fe.select(e,L.end(e,h))})},RO=(e,t={})=>{L.withoutNormalizing(e,()=>{const{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t;let{at:s=e.selection,match:a}=t;if(!s)return;a==null&&(a=Qt.isPath(s)?Bc(e,s):u=>ie.isElement(u)&&L.isBlock(e,u)),!n&&Qt.isRange(s)&&(s=L.unhangRange(e,s,{voids:r}));const o=L.nodes(e,{at:s,match:a,mode:i,voids:r}),l=Array.from(o,([,u])=>L.pathRef(e,u));for(const u of l){const f=u.unref();if(f){const[h]=L.node(e,f);e.apply({type:"remove_node",path:f,node:h})}}})},hw=(e,t,n={})=>{L.withoutNormalizing(e,()=>{let{match:r,at:i=e.selection,compare:s,merge:a}=n;const{hanging:o=!1,mode:l="lowest",replace:u=!1,split:f=!1,voids:h=!1}=n;if(i){if(r==null&&(r=Qt.isPath(i)?Bc(e,i):m=>ie.isElement(m)&&L.isBlock(e,m)),!o&&Qt.isRange(i)&&(i=L.unhangRange(e,i,{voids:h})),f&&Qt.isRange(i)){if(we.isCollapsed(i)&&L.leaf(e,i.anchor)[0].text.length>0)return;const m=L.rangeRef(e,i,{affinity:"inward"}),[g,b]=we.edges(i),x=l==="lowest"?"lowest":"highest",E=L.isEnd(e,b,b.path);Fe.splitNodes(e,{at:b,match:r,mode:x,voids:h,always:!E});const C=L.isStart(e,g,g.path);Fe.splitNodes(e,{at:g,match:r,mode:x,voids:h,always:!C}),i=m.unref(),n.at==null&&Fe.select(e,i)}s||(s=(m,g)=>m!==g);for(const[m,g]of L.nodes(e,{at:i,match:r,mode:l,voids:h})){const b={},x={};if(g.length===0)continue;let E=!1;const C=typeof t=="function"?t(m,g):t;for(const y in C){if(Ec.includes(y))continue;const _=Object.hasOwn(m,y)?m[y]:void 0,O=C[y];s(O,_)&&(E=!0,Object.hasOwn(m,y)&&(b[y]=_),a?O!=null&&(x[y]=a(_,O)):O!=null&&(x[y]=O))}if(u)for(const y in m)Object.hasOwn(m,y)&&!Object.hasOwn(C,y)&&!Ec.includes(y)&&(E=!0,b[y]=m[y]);E&&e.apply({type:"set_node",path:g,properties:b,newProperties:x})}}})};function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uk(e){for(var t=1;te===t||so(e,t),fk=(e,t)=>{let n=0,r=0;for(;n{if(t===e.children)return;const n={node:e},r=O=>(O.children||(O.children=kn.isText(O.node)?[]:O.node.children.map(S=>({node:S,parent:O}))),O.children),i=O=>{let S=n;for(const w of O)S=S&&r(S)[w];return S},s=O=>{const S=[];for(;O!==n;){const w=O.parent;if(!w)return null;S.push(r(w).indexOf(O)),O=w}return S.reverse()},a=new Map,o=new Set,l=new Set,u=[],f=new Set;for(const O of(h=u0.get(e))!==null&&h!==void 0?h:[]){var h;const S=i(O);S&&f.add(S)}const m=O=>{const S=e.getDirtyPaths(O),w=i(O.path),A=O.path.length?i(oe.parent(O.path)):n,T=O.type==="move_node"?i(oe.parent(O.newPath)):void 0;if(A&&r(A),T&&r(T),e.apply(O),O.type==="insert_node")r(A).splice(O.path[O.path.length-1],0,{node:O.node,parent:A});else if(O.type==="remove_node")r(A).splice(O.path[O.path.length-1],1),w.parent=void 0;else if(O.type==="move_node"){const P=oe.transform(O.path,O);r(A).splice(O.path[O.path.length-1],1),r(T).splice(P[P.length-1],0,w),w.parent=T}for(const P of S){const M=i(P);M&&f.add(M)}},g=O=>{l.add(O);for(const S of r(O))g(S)},b=O=>{for(const[S]of ie.nodes(O))L.isEditor(S)||o.add(S)},x=(O,S,w)=>{const{start:A,suffix:T}=fk(S,w),P=Math.max(S.length,w.length)-T;for(let M=A;M{for(const[S]of ie.nodes(O))L.isEditor(S)||a.delete(S)},C=O=>{for(const[S]of ie.nodes(O))if(!L.isEditor(S)&&o.has(S)&&a.has(S))return!0;return!1},y=(O,S,w)=>{const A=new Map(Object.entries(ie.extractProps(O))),T=new Map(Object.entries(ie.extractProps(S))),P=[...new Set([...A.keys(),...T.keys()])].filter(M=>!Ec.includes(M)&&!so(A.get(M),T.get(M)));P.length&&m({type:"set_node",path:w,properties:Object.fromEntries(P.map(M=>[M,A.get(M)])),newProperties:Object.fromEntries(P.map(M=>[M,T.get(M)]))})},_=(O,S)=>{const w=ie.ancestor(e,s(O)).children,{start:A,suffix:T}=fk(w,S);if(!(A===w.length&&A===S.length)){(w.length>S.length||a.size>0)&&u.push({parent:O,length:S.length,suffix:T});for(let P=A;P{var de,I;return re==="text"||re==="children"||so((de=Object.getOwnPropertyDescriptor(Z,re))===null||de===void 0?void 0:de.value,(I=Object.getOwnPropertyDescriptor(F,re))===null||I===void 0?void 0:I.value)});if(Z&&!ve&&me){if(so(Z,F))continue;if(y(Z,F,M),kn.isText(Z)&&kn.isText(F)){let re=0,de=0;for(;re{AN(e,()=>{_(n,t);for(const{parent:O,length:S,suffix:w}of u.reverse()){const A=s(O);for(;ie.ancestor(e,A).children.length>S;){const T=A.concat(S-w);m({type:"remove_node",path:T,node:ie.descendant(e,T)})}}},()=>{const O=new Map,S=(A,T)=>{var P;O.set(A,T),(P=A.children)===null||P===void 0||P.forEach((M,F)=>S(M,T.concat(F)))};S(n,[]);const w=[];for(const A of f){const T=O.get(A);T&&w.push(T)}q4(e,w,()=>null)})})},KV=(e,t)=>{if(we.isCollapsed(t))return t.anchor;{const[,n]=we.edges(t),r=L.pointRef(e,n);return Fe.delete(e,{at:t}),r.unref()}},FO=(e,t={})=>{L.withoutNormalizing(e,()=>{const{mode:n="lowest",voids:r=!1,select:i=t.at==null}=t;let{match:s,at:a=e.selection,height:o=0,always:l=!1}=t;if(!a)return;const u=s==null&&!Qt.isPath(a);if(s==null&&(s=g=>ie.isElement(g)&&L.isBlock(e,g)),Qt.isRange(a)&&(a=KV(e,a),!a))return;if(Qt.isPath(a)){const g=a,b=L.point(e,g),[x]=L.parent(e,g);s=E=>E===x,o=b.path.length-g.length+1,a=b,l=!0}const f=L.pointRef(e,a,{affinity:"backward"});let h;try{const[g]=L.nodes(e,{at:a,match:s,mode:n,voids:r});if(!g)return;const b=L.void(e,{at:a,mode:"highest"}),x=0;if(!r&&b){const[O,S]=b;if(e.isInline(O)){let A=L.after(e,S);if(!A){const T={text:""},P=oe.next(S);Fe.insertNodes(e,T,{at:P,voids:r}),A=L.point(e,P)}a=A,l=!0}o=a.path.length-S.length+1,l=!0}h=L.pointRef(e,a);const E=a.path.length-o,[,C]=g,y=a.path.slice(0,E);let _=o===0?a.offset:a.path[E]+x;for(const[O,S]of L.levels(e,{at:y,reverse:!0,voids:r})){let w=!1;if(S.length{Array.isArray(t)||(t=[t]);const r={};for(const i of t)r[i]=null;Fe.setNodes(e,r,n)},MO=(e,t={})=>{L.withoutNormalizing(e,()=>{const{mode:n="lowest",hanging:r=!1,split:i=!1,voids:s=!1}=t;let{at:a=e.selection,match:o}=t;if(!a)return;if(!r&&we.isRange(a)&&(a=L.unhangRange(e,a,{voids:s})),o==null&&(o=Qt.isPath(a)?Bc(e,a):h=>ie.isElement(h)&&L.isBlock(e,h)),i&&we.isRange(a)&&we.isExpanded(a)){const h=L.rangeRef(e,a,{affinity:"inward"}),[m,g]=we.edges(a),b=(C,y)=>ie.isElement(C)&&L.isInline(e,C)&&o(C,y),x=n==="all"?"highest":n,E=e.operations.length;Fe.splitNodes(e,{at:g,match:b,mode:x,voids:s}),Fe.splitNodes(e,{at:m,match:b,mode:x,voids:s}),a=h.unref(),t.at==null&&e.operations.length>E&&Fe.select(e,a)}Qt.isPath(a)&&(a=L.range(e,a));const l=Qt.isRange(a)?L.rangeRef(e,a):null,u=L.nodes(e,{at:a,match:o,mode:n,voids:s}),f=Array.from(u,([,h])=>L.pathRef(e,h)).reverse();for(const h of f){const m=h.unref(),[g]=L.node(e,m);let b=L.range(e,m);i&&l&&(b=we.intersection(l.current,b)),Fe.liftNodes(e,{at:b,match:x=>!ie.isText(g)&&g.children.includes(x),voids:s})}l&&l.unref()})};function dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lh(e){for(var t=1;t{L.withoutNormalizing(e,()=>{const{mode:r="lowest",hanging:i=!1,split:s=!1,voids:a=!1}=n;let{match:o,at:l=e.selection}=n;if(!l)return;if(!i&&we.isRange(l)&&(l=L.unhangRange(e,l,{voids:a})),o==null&&(Qt.isPath(l)?o=Bc(e,l):e.isInline(t)?o=f=>ie.isElement(f)&&L.isInline(e,f)||ie.isText(f):o=f=>ie.isElement(f)&&L.isBlock(e,f)),s&&Qt.isRange(l)){const[f,h]=we.edges(l),m=oe.equals(f.path,h.path)?oe.parent(f.path):oe.common(f.path,h.path),g=L.rangeRef(e,l,{affinity:"inward"}),b=y=>{const _=L.above(e,{at:y,match:O=>ie.isElement(O)&&L.isBlock(e,O)});return _&&L.isEdge(e,y,_[1])},x=we.isBackward(l),E=we.isCollapsed(l),C=(y,_)=>{const[O]=L.nodes(e,{at:y,match:o,mode:"lowest",voids:a});if(!e.isInline(t)||E||!O||!ie.isText(O[0])){Fe.splitNodes(e,{at:y,match:o,voids:a,always:!b(y)});return}Fe.splitNodes(e,{at:y,match:ie.isText,voids:a,always:!b(y)});const S=_==="start"?x?"focus":"anchor":x?"anchor":"focus",w=Math.min(m.length+1,O[1].length),A=T=>!ie.isText(T)||T.text!=="";for(let T=y.path.length-1;T>=w;T--){const P=g.current[S],M=P.path.slice(0,T),F=ie.get(e,M);if(!ie.isElement(F)||!e.isInline(F))continue;const z=P.path[T]+(_==="end"?1:0),$=F.children.slice(0,z).some(A),Y=F.children.slice(z).some(A);if($&&Y)e.apply({type:"split_node",path:M,position:z,properties:e.getSplitProperties(F,M)});else if(_==="start"?$:Y){const Z=_==="start"?L.after(e,M,{voids:a}):L.before(e,M,{voids:a});Z&&(g.current=lh(lh({},g.current),{},{[S]:Z}))}}};C(h,"end"),C(f,"start"),l=g.unref(),n.at==null&&Fe.select(e,l)}const u=Array.from(L.nodes(e,{at:l,match:e.isInline(t)?f=>ie.isElement(f)&&L.isBlock(e,f):f=>ie.isEditor(f),mode:"lowest",voids:a}));for(const[,f]of u){const h=Qt.isRange(l)?we.intersection(l,L.range(e,f)):l;if(!h)continue;const m=Array.from(L.nodes(e,{at:h,match:o,mode:r,voids:a}));if(m.length>0){const[g]=m,b=m[m.length-1],[,x]=g,[,E]=b;if(x.length===0&&E.length===0)continue;const C=oe.equals(x,E)?oe.parent(x):oe.common(x,E),y=L.range(e,x,E),_=L.node(e,C),[O]=_,S=C.length+1,w=oe.next(E.slice(0,S)),A=lh(lh({},t),{},{children:[]});Fe.insertNodes(e,A,{at:w,voids:a}),Fe.moveNodes(e,{at:y,match:T=>!ie.isText(O)&&O.children.includes(T),to:w.concat(0),voids:a})}}})},z0=()=>{const e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isIsolated:()=>!1,inlineEdgeAffinity:()=>null,leafEdgeAffinity:()=>null,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:(...t)=>TN(e,...t),addMark:(...t)=>FN(e,...t),deleteBackward:(...t)=>MN(e,...t),deleteForward:(...t)=>LN(e,...t),deleteFragment:(...t)=>zN(e,...t),getFragment:(...t)=>ON(e,...t),insertBreak:(...t)=>JN(e,...t),insertSoftBreak:(...t)=>kV(e,...t),insertFragment:(...t)=>DO(e,...t),insertNode:(...t)=>CV(e,...t),insertText:(...t)=>SV(e,...t),normalizeNode:(...t)=>BN(e,...t),removeMark:(...t)=>xO(e,...t),getDirtyPaths:(...t)=>NN(e,...t),getSplitProperties:(...t)=>EV(e,...t),shouldNormalize:(...t)=>PN(e,...t),above:(...t)=>RN(e,...t),after:(...t)=>IN(e,...t),before:(...t)=>lw(e,...t),collapse:(...t)=>SO(e,...t),delete:(...t)=>qV(e,...t),deselect:(...t)=>_O(e,...t),edges:(...t)=>jN(e,...t),elementReadOnly:(...t)=>qN(e,...t),end:(...t)=>uw(e,...t),first:(...t)=>$N(e,...t),fragment:(...t)=>VN(e,...t),getMarks:(...t)=>sO(e,...t),hasBlocks:(...t)=>HN(e,...t),hasInlines:(...t)=>WN(e,...t),hasPath:(...t)=>KN(e,...t),hasRange:(...t)=>GN(e,...t),hasTexts:(...t)=>YN(e,...t),insertNodes:(...t)=>OO(e,...t),insertionPoint:(...t)=>AV(e,...t),isBlock:(...t)=>XN(e,...t),isEdge:(...t)=>QN(e,...t),isEmpty:(...t)=>qf(e,...t),isEnd:(...t)=>ZN(e,...t),isNormalizing:(...t)=>eO(e,...t),isStart:(...t)=>tO(e,...t),last:(...t)=>nO(e,...t),leaf:(...t)=>rO(e,...t),levels:(...t)=>iO(e,...t),liftNodes:(...t)=>BO(e,...t),mergeNodes:(...t)=>HV(e,...t),move:(...t)=>AO(e,...t),moveNodes:(...t)=>dw(e,...t),next:(...t)=>BV(e,...t),node:(...t)=>aO(e,...t),nodes:(...t)=>PV(e,...t),normalize:(...t)=>oO(e,...t),parent:(...t)=>lO(e,...t),path:(...t)=>fO(e,...t),pathRef:(...t)=>uO(e,...t),pathRefs:(...t)=>cO(e,...t),point:(...t)=>pO(e,...t),pointRef:(...t)=>dO(e,...t),pointRefs:(...t)=>hO(e,...t),positions:(...t)=>mO(e,...t),previous:(...t)=>RV(e,...t),range:(...t)=>yO(e,...t),rangeRef:(...t)=>gO(e,...t),rangeRefs:(...t)=>vO(e,...t),removeNodes:(...t)=>RO(e,...t),select:(...t)=>Uh(e,...t),setChildren:(...t)=>WV(e,...t),setNodes:(...t)=>hw(e,...t),setNormalizing:(...t)=>bO(e,...t),setPoint:(...t)=>TO(e,...t),setSelection:(...t)=>NO(e,...t),splitNodes:(...t)=>FO(e,...t),start:(...t)=>cw(e,...t),string:(...t)=>wO(e,...t),unhangRange:(...t)=>EO(e,...t),unsetNodes:(...t)=>IO(e,...t),unwrapNodes:(...t)=>MO(e,...t),void:(...t)=>UN(e,...t),word:(...t)=>MV(e,...t),withoutNormalizing:(...t)=>CO(e,...t),wrapNodes:(...t)=>pw(e,...t),shouldMergeNodesRemovePrevNode:(...t)=>IV(e,...t)};return e};var qs={},hk;function GV(){if(hk)return qs;hk=1,Object.defineProperty(qs,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)r["f"+i]=111+i;function s(m,g,b){g&&!("byKey"in g)&&(b=g,g=null),Array.isArray(m)||(m=[m]);var x=m.map(function(y){return l(y,g)}),E=function(_){return x.some(function(O){return u(O,_)})},C=b==null?E:E(b);return C}function a(m,g){return s(m,g)}function o(m,g){return s(m,{byKey:!0},g)}function l(m,g){var b=g&&g.byKey,x={};m=m.replace("++","+add");var E=m.split("+"),C=E.length;for(var y in t)x[t[y]]=!1;var _=!0,O=!1,S=void 0;try{for(var w=E[Symbol.iterator](),A;!(_=(A=w.next()).done);_=!0){var T=A.value,P=T.endsWith("?")&&T.length>1;P&&(T=T.slice(0,-1));var M=h(T),F=t[M];if(T.length>1&&!F&&!n[T]&&!r[M])throw new TypeError('Unknown modifier: "'+T+'"');(C===1||!F)&&(b?x.key=M:x.which=f(T)),F&&(x[F]=P?null:!0)}}catch(z){O=!0,S=z}finally{try{!_&&w.return&&w.return()}finally{if(O)throw S}}return x}function u(m,g){for(var b in m){var x=m[b],E=void 0;if(x!=null&&(b==="key"&&g.key!=null?E=g.key.toLowerCase():b==="which"?E=x===91&&g.which===93?91:g.which:E=g[b],!(E==null&&x===!1)&&E!==x))return!1}return!0}function f(m){m=h(m);var g=r[m]||m.toUpperCase().charCodeAt(0);return g}function h(m){return m=m.toLowerCase(),m=n[m]||m,m}return qs.default=s,qs.isHotkey=s,qs.isCodeHotkey=a,qs.isKeyHotkey=o,qs.parseHotkey=l,qs.compareHotkey=u,qs.toKeyCode=f,qs.toKeyName=h,qs}var ks=GV();function h0(e){"@babel/helpers - typeof";return h0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h0(e)}function YV(e,t){if(h0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(h0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JV(e){var t=YV(e,"string");return h0(t)=="symbol"?t:t+""}function LO(e,t,n){return(t=JV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zO=globalThis.Node,XV=globalThis.Text;const jO=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,QV=e=>pp(e)&&e.nodeType===8,ao=e=>pp(e)&&e.nodeType===1,pp=e=>{const t=jO(e);return!!t&&e instanceof t.Node},pk=e=>{const t=e&&e.anchorNode&&jO(e.anchorNode);return!!t&&e instanceof t.Selection},ZV=e=>{let[t,n]=e;if(ao(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=qO(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},qO=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(QV(i)||ao(i)&&i.childNodes.length===0||ao(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},tU=(e,t,n)=>{const[r]=qO(e,t,n);return r},mk=e=>e.getSelection!=null?e.getSelection():document.getSelection(),gk=(e,t)=>!!(e.compareDocumentPosition(t)&zO.DOCUMENT_POSITION_PRECEDING),nU=(e,t)=>!!(e.compareDocumentPosition(t)&zO.DOCUMENT_POSITION_FOLLOWING),Rl=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},vk=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var Rg,Fg;const yk=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Ig=typeof navigator<"u"&&/Android/.test(navigator.userAgent),$f=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),rU=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Rg=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Rg!==void 0&&Rg[1]&&parseInt((Fg=navigator.userAgent.match(/Version\/(\d+)/))===null||Fg===void 0?void 0:Fg[1],10)<17);let iU=0,sU=class{constructor(){LO(this,"id",void 0),this.id=`${iU++}`}};const aU=new WeakMap,oU=new WeakMap,lU=new WeakMap,uU=new WeakMap,mw=new WeakMap,cU=new WeakMap,xk=new WeakMap,bk=new WeakMap,wk=new WeakMap,uh=new WeakMap,fU=new WeakMap,dU=new WeakMap,$O=new WeakMap,hU=new WeakMap,Ek=Symbol("placeholder");function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lc(e){for(var t=1;t$O.get(e),androidScheduleFlush:e=>{var t;(t=dU.get(e))===null||t===void 0||t()},blur:e=>{const t=Et.toDOMNode(e,e),n=Et.findDocumentOrShadowRoot(e);uh.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Et.findDocumentOrShadowRoot(e),r=mk(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Fe.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Et.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Et.toSlateNode(e,t.target)}catch(x){if(r)return null;throw x}let l;try{l=Et.findPath(e,o)}catch(x){if(r)return null;throw x}if(ie.isElement(o)&&L.isVoid(e,o)){const x=a.getBoundingClientRect(),E=e.isInline(o)?i-x.left{if(!x)return null;const E=f.createRange();return E.setStart(x.offsetNode,x.offset),E.setEnd(x.offsetNode,x.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Et.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=xk.get(t);return n||(n=new sU,xk.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=lU.get(r);if(s==null){if(r===e)return n;break}const a=oU.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Jn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(uh.get(e)||!Et.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Et.focus(e,{retries:t.retries-1})},10);return}const n=Et.toDOMNode(e,e),r=Et.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Et.toDOMRange(e,e.selection):null;if(e.selection||Fe.select(e,L.start(e,[])),uh.set(e,!0),n.focus({preventScroll:!0}),i){const s=mk(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=uU.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Et.isMounted(e))return!1;const i=Et.toDOMNode(e,e);let s;try{s=ao(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||Rl(s,"[data-slate-editor]")!==i)return!1;const a=Rl(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?Rl(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&Rl(o,"[data-slate-editor]")===i){var l;const u=(l=Rl(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||Rl(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&Rl(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>pp(t)&&Et.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Et.hasEditableTarget(e,t)||Et.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>pp(t)&&Et.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!fU.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Et.isComposing(e)?pU(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,lc(lc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!uh.get(e),isMounted:e=>!!mw.get(e),isReadOnly:e=>!!wk.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(wk.get(e)||!Et.hasTarget(e,t))return!1;const n=Et.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n;const r=t===e?mw.get(e):(n=bk.get(e))===null||n===void 0?void 0:n.get(Et.findKey(e,t));if(!r)throw new Error(`Cannot resolve a DOM node from Slate node: ${Jn.stringify(t)}`);return r},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=bk.get(e))===null||n===void 0?void 0:n.get(Et.findKey(e,ie.get(e,t.path))),i=r?Dk(e,r,t):null;return!i&&mU(e)&&e.onDOMError(new Error(kk(t))),i},resolveDOMRange:(e,t)=>{const n=Et.resolveDOMPoint(e,t.anchor),r=we.isCollapsed(t)?n:Et.resolveDOMPoint(e,t.focus);return n&&r?Sk(e,n,r,we.isBackward(t)):null},resolveEventRange:(e,t)=>Et.findEventRange(e,t,{suppressThrow:!0}),toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Et.toDOMNode(e,n),i=Dk(e,r,t);if(!i)throw new Error(kk(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Et.toDOMPoint(e,n),s=we.isCollapsed(t)?i:Et.toDOMPoint(e,r);return Sk(e,i,s,we.isBackward(t))},toSlateNode:(e,t)=>{let n=ao(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?cU.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:ZV(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Et.toDOMNode(e,e),y=o.closest('[data-slate-void="true"]'),_=y&&vk(C,y)?y:null,O=o.closest('[contenteditable="false"]'),S=O&&vk(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),A=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Et.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` -`?0:a);const M=P.cloneContents();[...Array.prototype.slice.call(M.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(M.querySelectorAll("[contenteditable=false]"))].forEach(z=>{if(Ig&&!r&&z.hasAttribute("data-slate-zero-width")&&z.textContent.length>0&&z.textContext!=="\uFEFF"){z.textContent.startsWith("\uFEFF")&&(z.textContent=z.textContent.slice(1));return}z.parentNode.removeChild(z)}),f=M.textContent.length,A=u}}else if(_){const T=_.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(S){const T=M=>M?M.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=S.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...T(P?.previousElementSibling),...T(P)].findLast(F=>gk(S,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...T(P),...T(P?.nextElementSibling)].find(F=>nU(S,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),A=w,l==="forward"?f=0:(f=A.textContent.length,A.querySelectorAll("[data-slate-zero-width]").forEach(M=>{f-=M.textContent.length})))}A&&f===A.textContent.length&&Ig&&A.getAttribute("data-slate-zero-width")==="z"&&(h=A.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||$f&&(m=A.textContent)!==null&&m!==void 0&&m.endsWith(` - -`))&&f--}if(Ig&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Et.hasDOMNode(e,C,{editable:!0})){const y=Et.toSlateNode(e,C);let _;try{_=Et.findPath(e,y)}catch(w){if(i)return null;throw w}let{path:O,offset:S}=L.start(e,_);return C.querySelector("[data-slate-leaf]")||(S=a),{path:O,offset:S}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let x;try{x=Et.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Et.findPath(e,x)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=pk(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(pk(t)){if($f&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let _=function(T){return T.childElementCount>0?_(T.children[0]):T};const O=C.startContainer,S=y.startContainer,w=_(O.children[C.startOffset]),A=_(S.children[y.startOffset]);h=0,A.childNodes.length>0?l=A.childNodes[0]:l=A,w.childNodes.length>0?f=w.childNodes[0]:f=w,A instanceof HTMLElement?u=A.innerHTML.length:u=0}else C.startContainer===f?(l=y.endContainer,u=y.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=y.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;rU&&eU(l)||$f?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);$f&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` - -`)&&h===f.textContent.length&&h--;const g=Et.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=gk(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?lc(lc({},r),{},{text:n}):lc(lc({},r),{},{children:VO(r.children,t.slice(1),n)})),pU=e=>{var t;const n=Et.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Et.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Et.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=z0();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=VO(e.children,r.path,s),{view:a,point:r}},mU=e=>{var t,n;return!!((t=mw.get(e))!==null&&t!==void 0&&t.isConnected)&&!aU.get(e)&&!((n=$O.get(e))!==null&&n!==void 0&&n.length)&&!hU.get(e)},kk=e=>`Cannot resolve a DOM point from Slate point: ${Jn.stringify(e)}`,Dk=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const s=Et.getWindow(e).document.createRange(),[a,o]=r?n:t,[l,u]=r?t:n,h=!!(ao(a)?a:a.parentElement).getAttribute("data-slate-zero-width"),g=!!(ao(l)?l:l.parentElement).getAttribute("data-slate-zero-width");return s.setStart(a,h?1:o),s.setEnd(l,g?1:u),s};function gU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _k(e,t){if(e==null)return{};var n,r,i=gU(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r{const t=vU[e],n=yU[e],r=xU[e],i=t&&ks.isHotkey(t),s=n&&ks.isHotkey(n),a=r&&ks.isHotkey(r);return o=>!!(i&&i(o)||yk&&s&&s(o)||!yk&&a&&a(o))};ar("bold"),ar("compose"),ar("moveBackward"),ar("moveForward"),ar("deleteBackward"),ar("deleteForward"),ar("deleteLineBackward"),ar("deleteLineForward"),ar("deleteWordBackward"),ar("deleteWordForward"),ar("extendBackward"),ar("extendForward"),ar("extendLineBackward"),ar("extendLineForward"),ar("italic"),ar("moveLineBackward"),ar("moveLineForward"),ar("moveWordBackward"),ar("moveWordForward"),ar("redo"),ar("insertSoftBreak"),ar("splitBlock"),ar("transposeCharacter"),ar("undo");const bU=["anchor","focus"],wU=["anchor","focus"],EU=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),UO=(e,t)=>{const{anchor:n,focus:r}=e,i=_k(e,bU),{anchor:s,focus:a}=t,o=_k(t,wU);return e[Ek]===t[Ek]&&EU(i,o)},CU=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n-1}return tv=t,tv}var nv,Kk;function FU(){if(Kk)return nv;Kk=1;var e=im();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return nv=t,nv}var rv,Gk;function sm(){if(Gk)return rv;Gk=1;var e=OU(),t=BU(),n=PU(),r=RU(),i=FU();function s(a){var o=-1,l=a==null?0:a.length;for(this.clear();++og))return!1;var x=h.get(a),E=h.get(o);if(x&&E)return x==o&&E==a;var C=-1,y=!0,_=l&i?new e:void 0;for(h.set(a,o),h.set(o,a);++C-1&&r%1==0&&r-1&&n%1==0&&n<=e}return ey=t,ey}var ty,KD;function mH(){if(KD)return ty;KD=1;var e=Rc(),t=X4(),n=xo(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",x="[object WeakMap]",E="[object ArrayBuffer]",C="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",O="[object Int8Array]",S="[object Int16Array]",w="[object Int32Array]",A="[object Uint8Array]",T="[object Uint8ClampedArray]",P="[object Uint16Array]",M="[object Uint32Array]",F={};F[y]=F[_]=F[O]=F[S]=F[w]=F[A]=F[T]=F[P]=F[M]=!0,F[r]=F[i]=F[E]=F[s]=F[C]=F[a]=F[o]=F[l]=F[u]=F[f]=F[h]=F[m]=F[g]=F[b]=F[x]=!1;function z($){return n($)&&t($.length)&&!!F[e($)]}return ty=z,ty}var ny,GD;function Q4(){if(GD)return ny;GD=1;function e(t){return function(n){return t(n)}}return ny=e,ny}var Uf={exports:{}};Uf.exports;var YD;function Z4(){return YD||(YD=1,(function(e,t){var n=HO(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=o})(Uf,Uf.exports)),Uf.exports}var ry,JD;function eE(){if(JD)return ry;JD=1;var e=mH(),t=Q4(),n=Z4(),r=n&&n.isTypedArray,i=r?t(r):e;return ry=i,ry}var iy,XD;function QO(){if(XD)return iy;XD=1;var e=dH(),t=um(),n=is(),r=cm(),i=fm(),s=eE(),a=Object.prototype,o=a.hasOwnProperty;function l(u,f){var h=n(u),m=!h&&t(u),g=!h&&!m&&r(u),b=!h&&!m&&!g&&s(u),x=h||m||g||b,E=x?e(u.length,String):[],C=E.length;for(var y in u)(f||o.call(u,y))&&!(x&&(y=="length"||g&&(y=="offset"||y=="parent")||b&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,C)))&&E.push(y);return E}return iy=l,iy}var sy,QD;function tE(){if(QD)return sy;QD=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return sy=t,sy}var ay,ZD;function gH(){if(ZD)return ay;ZD=1;var e=WO(),t=e(Object.keys,Object);return ay=t,ay}var oy,e7;function vH(){if(e7)return oy;e7=1;var e=tE(),t=gH(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var a=[];for(var o in Object(s))r.call(s,o)&&o!="constructor"&&a.push(o);return a}return oy=i,oy}var ly,t7;function Ic(){if(t7)return ly;t7=1;var e=W4(),t=X4();function n(r){return r!=null&&t(r.length)&&!e(r)}return ly=n,ly}var uy,n7;function j0(){if(n7)return uy;n7=1;var e=QO(),t=vH(),n=Ic();function r(i){return n(i)?e(i):t(i)}return uy=r,uy}var cy,r7;function ZO(){if(r7)return cy;r7=1;var e=JO(),t=J4(),n=j0();function r(i){return e(i,n,t)}return cy=r,cy}var fy,i7;function yH(){if(i7)return fy;i7=1;var e=ZO(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,a,o,l,u,f){var h=o&t,m=e(s),g=m.length,b=e(a),x=b.length;if(g!=x&&!h)return!1;for(var E=g;E--;){var C=m[E];if(!(h?C in a:r.call(a,C)))return!1}var y=f.get(s),_=f.get(a);if(y&&_)return y==a&&_==s;var O=!0;f.set(s,a),f.set(a,s);for(var S=h;++Etypeof e=="object"&&e!=null&&e.nodeType===1,H7=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ch=(e,t)=>{if(e.clientHeight{const i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightst||s>e&&a=t&&o>=n?s-e-r:a>t&&on?a-t+i:0,WH=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},W7=(e,t)=>{var n,r,i,s;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:u,skipOverflowHiddenElements:f}=t,h=typeof u=="function"?u:ve=>ve!==u;if(!U7(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,g=[];let b=e;for(;U7(b)&&h(b);){if(b=WH(b),b===m){g.push(b);break}b!=null&&b===document.body&&ch(b)&&!ch(document.documentElement)||b!=null&&ch(b,f)&&g.push(b)}const x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,E=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,{scrollX:C,scrollY:y}=window,{height:_,width:O,top:S,right:w,bottom:A,left:T}=e.getBoundingClientRect(),{top:P,right:M,bottom:F,left:z}=(ve=>{const me=window.getComputedStyle(ve);return{top:parseFloat(me.scrollMarginTop)||0,right:parseFloat(me.scrollMarginRight)||0,bottom:parseFloat(me.scrollMarginBottom)||0,left:parseFloat(me.scrollMarginLeft)||0}})(e);let $=o==="start"||o==="nearest"?S-P:o==="end"?A+F:S+_/2-P+F,Y=l==="center"?T+O/2-z+M:l==="end"?w+M:T-z;const Z=[];for(let ve=0;ve=0&&T>=0&&A<=E&&w<=x&&(me===m&&!ch(me)||S>=I&&A<=ne&&T>=W&&w<=X))return Z;const Te=getComputedStyle(me),je=parseInt(Te.borderLeftWidth,10),$e=parseInt(Te.borderTopWidth,10),Me=parseInt(Te.borderRightWidth,10),pe=parseInt(Te.borderBottomWidth,10);let Oe=0,Ie=0;const ze="offsetWidth"in me?me.offsetWidth-me.clientWidth-je-Me:0,le="offsetHeight"in me?me.offsetHeight-me.clientHeight-$e-pe:0,Se="offsetWidth"in me?me.offsetWidth===0?0:de/me.offsetWidth:0,Ne="offsetHeight"in me?me.offsetHeight===0?0:re/me.offsetHeight:0;if(m===me)Oe=o==="start"?$:o==="end"?$-E:o==="nearest"?fh(y,y+E,E,$e,pe,y+$,y+$+_,_):$-E/2,Ie=l==="start"?Y:l==="center"?Y-x/2:l==="end"?Y-x:fh(C,C+x,x,je,Me,C+Y,C+Y+O,O),Oe=Math.max(0,Oe+y),Ie=Math.max(0,Ie+C);else{Oe=o==="start"?$-I-$e:o==="end"?$-ne+pe+le:o==="nearest"?fh(I,ne,re,$e,pe+le,$,$+_,_):$-(I+re/2)+le/2,Ie=l==="start"?Y-W-je:l==="center"?Y-(W+de/2)+ze/2:l==="end"?Y-X+Me+ze:fh(W,X,de,je,Me+ze,Y,Y+O,O);const{scrollLeft:Be,scrollTop:He}=me;Oe=Ne===0?0:Math.max(0,Math.min(He+Oe/Ne,me.scrollHeight-re/Ne+le)),Ie=Se===0?0:Math.max(0,Math.min(Be+Ie/Se,me.scrollWidth-de/Se+ze)),$+=He-Oe,Y+=Be-Ie}Z.push({el:me,top:Oe,left:Ie})}return Z},KH=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function iB(e,t){if(!e.isConnected||!(i=>{let s=i;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(e))return;const n=(i=>{const s=window.getComputedStyle(i);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(e);if((i=>typeof i=="object"&&typeof i.behavior=="function")(t))return t.behavior(W7(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:i,top:s,left:a}of W7(e,KH(t))){const o=s-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:o,left:l,behavior:r})}}const Rt={...Sr},Ye={...oe,child:(e,t)=>e.concat([t]),firstChild:e=>Ye.child(e,0),lastIndex:e=>e.at(-1)??-1,next:e=>{try{return oe.next(e)}catch{return e}},parent:e=>{try{return oe.parent(e)}catch{return e}},previous:e=>{if(e.length===0)return;const t=e.at(-1);if(!(t<=0))return e.slice(0,-1).concat(t-1)}},GH={*children(e,t,n={}){const{from:r,reverse:i=!1,to:s}=n,a=dt.ancestor(e,t);if(!a)return;const{children:o}=a;let l=i?o.length-1:0;const u=s??(i?0:o.length);for(r!==void 0&&(l=r);i?l>=u:lSN(e),isLastChild(e,t){if(t.length===0)return!1;const n=dt.parent(e,t);return n?t.at(-1)===n.children.length-1:!1},lastChild(e,t){return dt.children(e,t,{reverse:!0}).next().value}},Pn=kn,dt={...ie,isAncestor:Rt.isAncestor,ancestor:(...e)=>{try{return ie.ancestor(...e)}catch{}},common:(...e)=>{try{return ie.common(...e)}catch{}},descendant:(...e)=>{try{return ie.descendant(...e)}catch{}},first:(...e)=>{try{return ie.first(...e)}catch{}},fragment:(...e)=>{try{const t=ie.fragment;return t(...e)}catch{return[]}},get:(...e)=>{try{return ie.get(...e)}catch{}},hasSingleChild:e=>Pn.isText(e)?!0:e.children.length===1&&dt.hasSingleChild(e.children[0]),isDescendant:e=>Rt.isElement(e)||Pn.isText(e),last:(...e)=>{try{return ie.last(...e)}catch{}},leaf:(...e)=>{try{return ie.leaf(...e)}catch{}},parent:(...e)=>{try{return ie.parent(...e)}catch{}},...GH},sB={...Qt,isAt:e=>sB.isLocation(e)||dt.isNode(e)},aB=pV,Gl=oc,dn={...we,contains:(e,t)=>{const[n,r]=dn.edges(t);return dn.includes(e,n)&&dn.includes(e,r)},isCollapsed:e=>!!e&&we.isCollapsed(e),isExpanded:e=>!!e&&we.isExpanded(e)},fo={...an,get:(e,{focus:t}={})=>{let n;return dn.isRange(e)&&(n=t?e.focus:e.anchor),fo.isPoint(e)&&(n=e),Ye.isPath(e)&&(n={offset:0,path:e}),n}},YH=e=>Et.blur(e),K7=e=>Et.deselect(e),JH=e=>{try{return Et.findDocumentOrShadowRoot(e)}catch{}},XH=(e,t)=>{try{return Et.findEventRange(e,t)}catch{}},QH=(e,t)=>{try{return Et.findKey(e,t)}catch{}},ZH=(e,t,n)=>{const r=()=>e.api.node({...n,at:[],match:i=>i===t})?.[1];if(n)return r();try{return Et.findPath(e,t)}catch{return r()}},eW=(e,{at:t,edge:n,retries:r=5}={})=>{const i=s=>{e.tf.withoutNormalizing(()=>{e.tf.deselect(),e.tf.select(s)})};if(n){const s=n==="startEditor"||n==="endEditor"?[]:t??e.selection;s&&i(n==="start"?e.api.start(s):e.api.end(s))}else t&&i(t);try{Et.focus(e,{retries:r})}catch(s){console.error(s)}},tW=e=>{try{return Et.getWindow(e)}catch{}},nW=(e,t,n)=>{try{return Et.hasDOMNode(e,t,n)}catch{}return!1},rW=(e,t)=>{try{return Et.hasEditableTarget(e,t)}catch{}return!1},G7=(e,t)=>{try{return GN(e,t)}catch{}return!1},iW=(e,t)=>{try{return Et.hasSelectableTarget(e,t)}catch{}return!1},sW=(e,t)=>{try{return Et.hasTarget(e,t)}catch{}return!1},aW=e=>Et.isComposing(e),oW=e=>Et.isFocused(e),lW=e=>Et.isReadOnly(e),uW=(e,t)=>{try{return Et.isTargetInsideNonReadonlyVoid(e,t)}catch{}return!1},cW=(e,t)=>{try{return Et.toDOMNode(e,t)}catch{}},fW=(e,t)=>{try{return Et.toDOMPoint(e,t)}catch{}},dW=(e,t)=>{try{return Et.toDOMRange(e,t)}catch{}},hW=(e,t)=>{try{return Et.toSlateNode(e,t)}catch{}},pW=(e,t,n)=>{try{return Et.toSlatePoint(e,t,n)}catch{}},mW=(e,t,n)=>{try{return Et.toSlateRange(e,t,n)}catch{}},En=(e,t)=>t&&AU(t)&&dt.isNode(t)?e.api.findPath(t):t??void 0;function gW(e){return Array.isArray(e)?e:[e]}const oB=(e,t,n)=>n?typeof n=="object"?Object.entries(n).every(([r,i])=>gW(i).includes(e[r])):n(e,t):!0,zc=(e,{id:t,block:n,empty:r,match:i,text:s}={})=>{let a=!1,o=()=>!0;return s!==void 0&&(a=!0,o=Yo(o,l=>Pn.isText(l)===s)),r!==void 0&&(a=!0,o=Yo(o,l=>Pn.isText(l)?l.text.length>0==!r:e.api.isEmpty(l)===r)),n!==void 0&&(a=!0,o=Yo(o,l=>e.api.isBlock(l)===n)),t!==void 0&&(a=!0,o=Yo(o,l=>t===!0&&!!l.id||l.id===t)),typeof i=="object"?(a=!0,o=Yo(o,(l,u)=>oB(l,u,i))):typeof i=="function"&&(a=!0,o=Yo(o,i)),a?o:void 0},gi=(e,{id:t,empty:n,match:r,text:i,...s}={})=>{const{at:a,block:o}=s;return{...s,at:En(e,a),match:zc(e,{id:t,block:o,empty:n,match:r,text:i})}},Yo=(e,t)=>(n,r)=>e(n,r)&&(!t||t(n,r)),lB=(e,t,n)=>(r,i)=>{const s=zc(e,n);return(!t||t(r,i))&&(!s||s(r,i))},vW=(e,t,n)=>(r,i)=>{const a=(()=>{if(!n?.match){if(n?.at&&Ye.isPath(n.at)){const[o]=e.api.node(n.at)??[];return l=>l===o}return o=>Rt.isElement(o)&&e.api.isBlock(o)}return zc(e,n)})();return(!t||t(r,i))&&(!a||a(r,i))},yW=(e,t)=>{try{return RN(e,gi(e,t))}catch{return}},xW=(e,t,n)=>FN(e,t,n),bW=(e,t,n)=>uO(e,t,n),wW=(e,t,n)=>dO(e,t,n),EW=(e,t,n)=>gO(e,t,n),CW=(e,t="character")=>{MN(e,t)},kW=(e,t="character")=>{LN(e,t)},DW=(e,t)=>zN(e,t),uB=new Set(["addMark","apply","blur","collapse","delete","deleteBackward","deleteForward","deleteFragment","deselect","deselectDOM","focus","insertBreak","insertData","insertFragment","insertFragmentData","insertNode","insertNodes","insertSoftBreak","insertText","insertTextData","liftNodes","mergeNodes","move","moveNodes","normalize","normalizeNode","redo","removeMark","removeNodes","select","setFragmentData","setNodes","setChildren","setNodesBatch","setPoint","setSelection","setSplittingOnce","splitNodes","undo","unsetNodes","unwrapNodes","withMerging","withNewBatch","withoutMerging","withoutNormalizing","withoutSaving","wrapNodes","writeHistory"]),cB=new Set(["above","after","before","edges","elementReadOnly","end","findDocumentOrShadowRoot","findEventRange","findKey","findPath","first","fragment","getDirtyPaths","getFragment","getMarks","getWindow","hasBlocks","hasDOMNode","hasEditableTarget","hasInlines","hasPath","hasRange","hasSelectableTarget","hasTarget","hasTexts","highestBlock","isBlock","isComposing","isEdge","isElementReadOnly","isEmpty","isEnd","isFocused","isInline","isMerging","isNormalizing","isReadOnly","isSaving","isSelectable","isSplittingOnce","isStart","isTargetInsideNonReadonlyVoid","isVoid","last","leaf","levels","markableVoid","next","node","nodes","normalize","onChange","operations","parent","path","pathRef","pathRefs","point","pointRef","pointRefs","positions","previous","range","rangeRef","rangeRefs","selection","setNormalizing","shouldMergeNodes","shouldNormalize","start","string","toDOMNode","toDOMPoint","toDOMRange","toSlateNode","toSlatePoint","toSlateRange","unhangRange","void"]),Y7=(e,t)=>{if(!t)return;const n=e,r=Object.entries(t).reduce((i,[s,a])=>(uB.has(s)&&(i[s]=a),i),{});Object.assign(n,r)},J7=(e,t)=>{if(!t)return;const n=e,r=Object.entries(t).reduce((i,[s,a])=>(cB.has(s)&&(i[s]=a),i),{});Object.assign(n,r),t.marks&&(n.getMarks=t.marks)},oE=e=>{const t=e;cB.forEach(n=>{t[n]&&(n==="getMarks"?t.api.marks=t.getMarks:t.api[n]=t[n])}),uB.forEach(n=>{t[n]&&(t.tf[n]=t[n])})},SW=(e,t,n={})=>{try{if(n.previous){const r=e.api.previous({at:En(e,t)});return r?uw(e,r[1]):void 0}return uw(e,En(e,t))}catch{}},_W=(e,t,n)=>{try{return rO(e,En(e,t),n)}catch{}},AW=(e,t,n)=>{try{return IN(e,En(e,t),n)}catch{}},TW=(e,t,n)=>{if(!n||!n.match&&!n.matchString){try{return lw(e,En(e,t),n)}catch{}return}const r=!n.unit||n.unit==="offset",i=n.matchString?oo(n.matchString):[""],s=n.matchByRegex??!1;let a;return i.some(o=>{let l=t,u=e.api.point(t,{edge:"end"});const f=o.length+1,h=Array.from({length:f});let m=0;for(;;){const g=lw(e,En(e,l),n);if(!g||e.api.isAt({at:{anchor:g,focus:u},blocks:!0}))return n.matchBlockStart&&(a=u),!1;const b=e.api.string({anchor:g,focus:u});let x=b;if(r&&f&&(h.unshift({point:g,text:b}),h.pop(),x=HH(h.slice(0,-1),"text").join("")),(s?o.match(x):x===o)||n.match?.({at:t,beforePoint:g,beforeString:x}))return n.afterMatch?f&&r?(a=h.at(-1)?.point,!!a):(a=u,!0):(a=g,!0);if(u=g,l=g,m+=1,!n.skipInvalid&&(!o||m>=o.length))return!1}return!1}),a},NW=(e,t,n={})=>{try{if(n.next){const r=e.api.next({at:En(e,t)});return r?cw(e,r[1]):void 0}return cw(e,En(e,t))}catch{}},OW=(e,t)=>UN(e,{...t,at:En(e,t?.at)}),BW=(e,t)=>Rt.isElement(t)&&XN(e,t);function*PW(e,t={}){const n=gi(e,t),{ignoreNonSelectable:r=!1,mode:i="all",reverse:s=!1,universal:a=!1,voids:o=!1}=n,l=En(e,n.at)??e.selection;let u=zc(e,n);if(u||(u=()=>!0),!l)return;let f,h;if(aB.isSpan(l))f=l[0],h=l[1];else{const x=e.api.path(l,{edge:"start"}),E=e.api.path(l,{edge:"end"});if(f=s?E:x,h=s?x:E,!x||!E)return}const m=dt.nodes(e,{from:f,reverse:s,to:h,pass:([x])=>Rt.isElement(x)?!!(!o&&(e.api.isVoid(x)||e.api.isElementReadOnly(x))||r&&!e.api.isSelectable(x)):!1}),g=[];let b;for(const[x,E]of m){if(r&&Rt.isElement(x)&&!e.api.isSelectable(x))continue;const C=b&&Ye.compare(E,b[1])===0;if(i==="highest"&&C)continue;if(!u(x,E)){if(a&&!C&&Pn.isText(x))return;continue}if(i==="lowest"&&C){b=[x,E];continue}const y=i==="lowest"?b:[x,E];y&&(a?g.push(y):yield y),b=[x,E]}i==="lowest"&&b&&(a?g.push(b):yield b),a&&(yield*g)}const RW=(e,t)=>{let n=!1;return CO(e,()=>{n=!!t()}),n},FW=(e,t,n={})=>{const{edge:r,focus:i,next:s,previous:a}=n;if(i&&e.tf.focus(),s||a){const l=En(e,t)??e.selection;if(!l)return;const u=e.api.path(l);if(!u)return;const f=a?e.api.end(u,{previous:!0}):e.api.start(u,{next:!0});if(!f)return;Uh(e,f);return}if(r){const l=En(e,t)??e.selection;if(!l)return;const u=Ye.isPath(l)?l:e.api.node({at:l,block:!0})?.[1];if(!u)return;const f=r==="end"?e.api.end(u):e.api.start(u);if(!f)return;Uh(e,f);return}const o=En(e,t);o&&Uh(e,o)};function Xy(e){return Array.isArray(e)?e:[e]}const eu=(e,{allow:t,exclude:n,filter:r,level:i,maxLevel:s}={})=>{if(!e)return!1;const[a,o]=e;if(i&&!Xy(i).includes(o.length)||s&&o.length>s||r&&!r(e))return!1;if(t){const l=Xy(t);if(l.length>0&&!l.includes(a.type))return!1}if(n){const l=Xy(n);if(l.length>0&&l.includes(a.type))return!1}return!0},IW=(e,t,n)=>{try{if(sB.isAt(t))return aO(e,En(e,t),n);const r=t;return e.api.nodes(r).next().value}catch{return}},MW=(e,t,n)=>{try{return fO(e,En(e,t),n)}catch{}},LW=(e,t)=>{try{return jN(e,En(e,t))}catch{}},zW=(e,t=e.selection,n)=>{if(!t)return"";try{return wO(e,En(e,t),n)}catch{return""}},jW=(e,t)=>{try{return $N(e,En(e,t))}catch{}},qW=(e,t)=>{const n=(r,i=[])=>(r.forEach(s=>{t?.includes(s.type)?n(s.children,i):i.push(s)}),i);return n(e)},X7=(e,t,n)=>{if(t===null)return[];try{const r=t===void 0?ON(e):VN(e,En(e,t));return r.length>0&&n?.unwrap&&n.unwrap.length>0?qW(r,n.unwrap):r}catch{return[]}},$W=(e,t)=>iO(e,gi(e,t)),VW=e=>sO(e),UW=e=>cO(e),HW=(e,t,n)=>{try{return pO(e,En(e,t),n)}catch{}},WW=e=>hO(e),KW=(e,t)=>mO(e,{...t,at:En(e,t?.at)}),GW=e=>vO(e),YW=(e,t)=>HN(e,t),JW=(e,t)=>WN(e,t),XW=(e,t)=>YN(e,t),QW=e=>JN(e),ZW=(e,t,n)=>e.tf.insertNodes(t,n),eK=(e,t,n)=>QN(e,t,n),tK=e=>eO(e),nK=(e,t)=>qN(e,t),rK=(e,t=[],n)=>{let r=t;if(r===null)return!0;if(Ye.isPath(r)&&r.length===0||dt.isEditor(r))return e.children.length===1&&qf(e,e.children[0]);if(n?.after){const i=e.api.block({above:!0,at:r});if(!i)return!1;const s=e.api.point(r),a=e.api.parent(r);if(!a)return!1;const[,o]=a;if(!e.api.isEnd(s,o))return!1;const l=Array.from(dt.children(e,i[1],{from:Ye.lastIndex(s.path)+1})).map(([u])=>u);if(l.length>0){for(const u of l)if(Pn.isText(u)&&u.text)return!1}else return e.api.isEnd(s,i[1]);return!0}if(Ye.isPath(r))return qf(e,e.api.node(r)?.[0]);if(n?.block){const i=e.api.block({at:r});if(!i)return!1;r=i[0]}if(!dt.isNode(r)){const i=e.api.nodes({at:r,...n});for(const s of i)if(!qf(e,s[0]))return!1;return!0}return qf(e,r)},iK=(e,t,n)=>!!t&&ZN(e,t,n),sK=(e,t,n)=>!!t&&tO(e,t,n),aK=(e,[t,n],r)=>{const i=n.slice(0,r+1),s=e.api.node(i);return s||[t,n]},oK=(e,t,n={})=>{try{const{level:r}=n,i=nO(e,En(e,t));return i&&typeof r=="number"?e.children.length===0?void 0:aK(e,i,r):i}catch{}},lK=(e,t={})=>{const{from:n="after",mode:r=n==="child"?"all":"lowest",voids:i=!1}=t;let s=zc(e,t);const a=En(e,t.at)??e.selection;if(!a)return;let o;if(n==="child"&&Ye.isPath(a)){const h=Ye.firstChild(a);e.api.node(h)&&(o=h,s=Yo((m,g)=>!Ye.isAncestor(g,a)&&!Ye.equals(g,a),s))}if(!o){const h=e.api.after(a,{voids:i});if(!h)return;o=h.path}const[,l]=e.api.last([]),u=[o,l];if(Ye.isPath(a)&&a.length===0)return;if(s==null)if(Ye.isPath(a)){const[h]=e.api.parent(a);s=m=>h.children.includes(m)}else s=()=>!0;const[f]=e.api.nodes({at:u,match:s,mode:r,voids:i});return f},uK=(e,t)=>oO(e,t),cK=(e,t,n)=>{const r=e.meta.isNormalizing;e.meta.isNormalizing=!0,BN(e,t,n),e.meta.isNormalizing=r},fK=(e,t,n)=>{try{return lO(e,En(e,t),n)}catch{}},dK=(e,t)=>{const{from:n="after",mode:r="lowest",voids:i=!1}=t;let s=zc(e,t);const a=En(e,t.at)??e.selection;if(!a)return;let o;if(n==="parent"&&Ye.isPath(a)&&a.length>1&&(o=a,s=Yo((h,m)=>!Ye.isAfter(m,a)&&!Ye.equals(m,a),s)),!o){const h=e.api.before(a,{voids:i});if(!h)return;o=h.path}const[,l]=e.api.first([]),u=[o,l];if(Ye.isPath(a)&&a.length===0)return;if(s==null)if(Ye.isPath(a)){const[h]=e.api.parent(a);s=m=>h.children.includes(m)}else s=()=>!0;const[f]=e.api.nodes({at:u,match:s,mode:r,reverse:!0,voids:i});return f},hK=(e,t)=>{const n=i=>{try{return dK(e,i)}catch{}};if(t?.sibling){const i=gi(e,t).at;if(!i)return;const s=Ye.previous(i);return s?e.api.node(s):void 0}if(!(t?.id&&t?.block))return n(t);const r=e.api.node({id:t.id,at:[]});if(r)return n({at:r[1],block:!0})},pK=(e,t,n,r)=>{let i=En(e,t);if(dn.isRange(i)&&!n)return i;if(i==="start"){const s=e.api.block({at:n})?.[1];if(!s)return;const a=e.api.start(s);if(!a)return;const o=fo.get(n);return o?{anchor:a,focus:o}:void 0}return n&&i==="before"&&(i=e.api.before(n,r?.before)??En(e,n)),yO(e,i,En(e,n))},mK=(e,t)=>xO(e,t),gK=(e,t,n)=>{const[r,i]=t;return Rt.isElement(r)&&e.api.isEmpty(r)||Pn.isText(r)&&r.text===""&&i.at(-1)!==0?(e.tf.removeNodes({at:i}),!1):!0},vK=(e,t,n={})=>{const{character:r,unhang:i=!0,voids:s}=n;if(!dn.isRange(t))return t;if(r){let[a,o]=dn.edges(t);if(!Ye.equals(a.path,o.path))if(o.offset===0){const l=e.api.after(a);l&&(o=l)}else{const l=e.api.before(o);l&&(a=l)}return{anchor:a,focus:o}}return i?EO(e,t,{voids:s}):t},yK=(e,{at:t,...n}={})=>{const r=t??e.selection;if(!r)return null;const[i,s]=e.api.edges(r??e.selection),a=e.api.block({at:i,...n});if(!a)return null;const o=e.api.block({at:s,...n});return o?[a,o]:null},xK=(e,{above:t,highest:n,...r}={})=>{if(n){const i=r.at??e.selection;if(!i)return;const s=e.api.path(i)?.[0];return s===void 0?void 0:e.api.node([s])}return t?e.api.above({...r,block:!0}):e.api.node({...r,block:!0,mode:"lowest"})},bK=(e,t)=>[...e.api.nodes({...t,block:!0})],wK=(e,t)=>{try{const{at:n=e.selection,match:r,reverse:i=!1,voids:s=!1}=t;if(!n)return;let a,o;if(aB.isSpan(n))[a,o]=n;else if(dn.isRange(n)){const f=e.api.path(n,{edge:"start"}),h=e.api.path(n,{edge:"end"});a=i?h:f,o=i?f:h}let l=[e,[]];Ye.isPath(n)&&(l=e.api.node(n));const u=dt.descendants(l[0],{from:a,reverse:i,to:o,pass:([f])=>s?!1:e.api.isVoid(f)});for(const[f,h]of u)if(oB(f,h,r))return[f,Ye.isPath(n)?n.concat(h):h]}catch{return}},EK=(e,t)=>e.api.marks()?.[t],CK=(e,t)=>!!e.api.mark(t),kK=(e,t,n={})=>{const{contains:r=!1}=n;if(!e.selection)return!1;const i=dn.isRange(t)?t:e.api.range(t);return i?r?dn.contains(e.selection,i):!!dn.intersection(e.selection,i):!1},DK=/^(?:\s|$)/,SK=(e,{at:t=e.selection,block:n,blocks:r,end:i,start:s,text:a,word:o,...l}={})=>{if(!t)return!1;if(fo.isPoint(t)){if(o&&i){const u=e.api.after(t);if(!u)return!0;const f=e.api.range(t,u),h=e.api.string(f);return DK.test(h)}if(s||i){const u=e.api.block({at:t,...l});if(!u)return!1;if(s)return e.api.isStart(t,u[1]);if(i)return e.api.isEnd(t,u[1])}return!1}if(dn.isRange(t)){const[u,f]=dn.edges(t);if(a)return Ye.equals(u.path,f.path);const h=e.api.block({at:u,...l}),m=e.api.block({at:f,...l});if(r)return!h&&!m?!1:!h||!m?!0:!Ye.equals(h[1],m[1]);if(!h||!m)return!1;if(n)return Ye.equals(h[1],m[1]);if(s)return e.api.isStart(u,h[1])||dn.isExpanded(t)&&e.api.isStart(f,h[1]);if(i)return e.api.isEnd(f,m[1])}return!1},_K=e=>{if(e.selection){const t=e.selection.focus,n=e.api.end([]);return n.offset===0&&e.api.isEnd(t,t)&&Ye.equals(Ye.next(Ye.parent(t.path)),n.path)}return!1},AK=(e,t)=>{const n=e.api.node(t)?.[0];return Pn.isText(n)},TK=(e,t)=>{if(t.length===0)return;const n=t[0][1],r=t.at(-1)[1];return e.api.range(n,r)};function NK({key:e,defaultValue:t,getProp:n,mode:r="block",nodes:i}){if(i.length===0)return t;const s=n??(o=>o[e]);let a;for(const o of i){if(r==="block"||r==="all"){const l=s(o);if(l!==void 0){if(a===void 0)a=l;else if(a!==l)return;if(r==="block")continue}else if(r==="block")return t}if(r==="text"||r==="all"){const l=Array.from(dt.texts(o));for(const[u]of l){const f=s(u);if(f!==void 0){if(a===void 0)a=f;else if(a!==f)return}else if(r==="text")return t}}}return a}const OK={scrollMode:"if-needed"};function BK(e,t,n=OK){requestAnimationFrame(()=>{let r;if(fo.isPoint(t)){const{offset:s=0,path:a}=t;r=e.api.toDOMRange({anchor:{offset:s,path:a},focus:{offset:s,path:a}})}else r=t;if(!r)return;const i=r.startContainer.parentElement;i.getBoundingClientRect=r.getBoundingClientRect.bind(r),iB(i,n),setTimeout(()=>{i.getBoundingClientRect=void 0},0)})}const PK=(e,t)=>!!e.api.node(t),RK=(e,t)=>{SO(e,t)},FK=/[\u0E00-\u0E7F]+/,IK=(e,t={})=>{let n=En(e,t?.at)??e.selection;e.tf.withoutNormalizing(()=>{const{distance:r=1,reverse:i=!1,unit:s="character",voids:a=!1}=t;let{hanging:o=!1}=t;if(!n)return;let l=!1;if(dn.isRange(n)&&dn.isCollapsed(n)&&(l=!0,n=n.anchor),fo.isPoint(n)){const F=e.api.void({at:n,mode:"highest"});if(!a&&F){const[,z]=F;n=z}else{const z={distance:r,unit:s},$=i?e.api.before(n,z)||e.api.start([]):e.api.after(n,z)||e.api.end([]);n={anchor:n,focus:$},o=!0}}if(Ye.isPath(n)){e.tf.removeNodes({at:n,voids:a});return}if(dn.isCollapsed(n))return;if(!o){const[,F]=dn.edges(n),z=e.api.end([]);fo.equals(F,z)||(n=e.api.unhangRange(n,{voids:a}))}let[u,f]=dn.edges(n);const h=e.api.above({at:u,voids:a,match:F=>Rt.isElement(F)&&e.api.isBlock(F)}),m=e.api.above({at:f,voids:a,match:F=>Rt.isElement(F)&&e.api.isBlock(F)}),g=h&&m&&!Ye.equals(h[1],m[1]),b=Ye.equals(u.path,f.path),x=a?null:e.api.void({at:u,mode:"highest"})??e.api.elementReadOnly({at:u,mode:"highest"}),E=a?null:e.api.void({at:f,mode:"highest"})??e.api.elementReadOnly({at:f,mode:"highest"});if(x){const F=e.api.before(u);F&&h&&Ye.isAncestor(h[1],F.path)&&(u=F)}if(E){const F=e.api.after(f);F&&m&&Ye.isAncestor(m[1],F.path)&&(f=F)}const C=[];let y;for(const F of e.api.nodes({at:n,voids:a})){const[z,$]=F;y&&Ye.compare($,y)===0||(!a&&Rt.isElement(z)&&e.api.isElementReadOnly(z)||!Ye.isCommon($,u.path)&&!Ye.isCommon($,f.path))&&(C.push(F),y=$)}const _=Array.from(C,([,F])=>e.api.pathRef(F)),O=e.api.pointRef(u),S=e.api.pointRef(f);let w="";if(!b&&!x){const F=O.current,[z]=e.api.leaf(F),{path:$}=F,{offset:Y}=u,Z=z.text.slice(Y);Z.length>0&&(e.tf.apply({offset:Y,path:$,text:Z,type:"remove_text"}),w=Z)}const A=_.reverse().map(F=>F.unref()).filter(F=>F!==null);for(const F of A)e.tf.removeNodes({at:F,voids:a});if(!E){const F=S.current,[z]=e.api.leaf(F),{path:$}=F,Y=b?u.offset:0,Z=z.text.slice(Y,f.offset);Z.length>0&&(e.tf.apply({offset:Y,path:$,text:Z,type:"remove_text"}),w=Z)}!b&&g&&S.current&&O.current&&e.tf.mergeNodes({at:S.current,hanging:!0,reverse:!i,voids:a}),l&&i&&s==="character"&&w.length>1&&FK.exec(w)&&e.tf.insertText(w.slice(0,w.length-r));const T=O.unref(),P=S.unref(),M=i?T||P:P||T;t?.at==null&&M&&e.tf.select(M)})},MK=e=>{_O(e)},LK=(e,t,n)=>{DO(e,t,{...n,at:En(e,n?.at)})},zK=(e,t,{nextBlock:n,removeEmpty:r,...i}={})=>{i=gi(e,i),e.tf.withoutNormalizing(()=>{if(r){const s=e.api.above({at:i.at});if(s){const a=r===!0?{allow:["p"]}:r,{filter:o}=a;a.filter=([l,u])=>dt.string(l)||l.children.some(f=>e.api.isInline(f))?!1:!o||o([l,u]),eu(s,a)&&(e.tf.removeNodes({at:s[1]}),n=!1)}}if(n){const{at:s=e.selection}=i;if(s){const a=e.api.end(s),o=e.api.above({at:a,block:!0});o&&(i.at=Ye.next(o[1]))}}OO(e,t,i)})},jK=e=>{e.tf.withoutNormalizing(()=>{e.api.isExpanded()&&e.tf.delete(),e.tf.insertText(` -`)})},qK=(e,t,{marks:n=!0,...r}={})=>{const i=En(e,r.at);if(i){Fe.insertText(e,t,{...r,at:i});return}if(e.selection)if(n&&e.marks){const s={text:t,...e.marks};e.tf.insertNodes(s,{voids:r.voids}),e.marks=null}else Fe.insertText(e,t,r)},$K=(e,t)=>BO(e,gi(e,t)),fB=(e,t)=>{if(Rt.isElement(t)){const n=t;return e.api.isVoid(t)?!0:n.children.length===1?fB(e,n.children[0]):!1}return!dt.isEditor(t)},VK=(e,t={})=>{const n=gi(e,t);e.tf.withoutNormalizing(()=>{let{at:r=e.selection,match:i}=n;const{hanging:s=!1,mode:a="lowest",voids:o=!1}=n;if(!r)return;if(i==null)if(Ye.isPath(r)){const[T]=e.api.parent(r);i=P=>T.children.includes(P)}else i=T=>Rt.isElement(T)&&e.api.isBlock(T);if(!s&&dn.isRange(r)&&(r=e.api.unhangRange(r)),dn.isRange(r))if(dn.isCollapsed(r))r=r.anchor;else{const[,T]=dn.edges(r),P=e.api.pointRef(T);e.tf.delete({at:r}),r=P.unref(),n.at==null&&e.tf.select(r)}const l=e.api.nodes({at:r,match:i,mode:a,voids:o}),[u]=Array.from(l),f=e.api.previous({at:r,match:i,mode:a,voids:o});if(!u||!f)return;const[h,m]=u,[g,b]=f;if(m.length===0||b.length===0)return;const x=Ye.next(b),E=Ye.common(m,b),C=Ye.isSibling(m,b),y=e.api.levels({at:m}),_=new Set(Array.from(y,([T])=>T).slice(E.length).slice(0,-1)),O=e.api.above({at:m,mode:"highest",match:T=>_.has(T)&&fB(e,T)}),S=O&&e.api.pathRef(O[1]);let w,A;if(Pn.isText(h)&&Pn.isText(g)){const{text:T,...P}=h;A=g.text.length,w=P}else if(Rt.isElement(h)&&Rt.isElement(g)){const{children:T,...P}=h;A=g.children.length,w=P}else throw new TypeError(`Cannot merge the node at path [${m}] with the previous sibling because it is not the same kind: ${JSON.stringify(h)} ${JSON.stringify(g)}`);e.api.shouldMergeNodes(f,u,{reverse:n.reverse})&&(C||e.tf.moveNodes({at:m,to:x,voids:o}),S&&e.tf.removeNodes({at:S.current,event:{type:"mergeNodes"},voids:o}),S&&S.unref(),e.tf.apply({path:x,position:A,properties:w,type:"merge_node"}))})},UK=(e,{children:t,fromIndex:n=0,...r})=>{const i=gi(e,r);let s=!1;if(t){if(!i.at)return s;const a=e.api.node(i.at);if(!a)return s;const[o,l]=a;if(!e.api.isBlock(o))return s;for(let u=o.children.length-1;u>=n;u--){const f=[...l,u],h=dt.get(e,f);(!i.match||h&&i.match(h,f))&&(dw(e,{...i,at:f}),s=!0)}return s}return dw(e,i)},HK=(e,t)=>{AO(e,t)},WK=(e,{children:t,previousEmptyBlock:n,...r}={})=>{const i=gi(e,r);e.tf.withoutNormalizing(()=>{if(n){const s=e.api.block({at:i.at});if(!s)return;const a=e.api.previous({at:s[1],sibling:!0});if(!a)return;const[o,l]=a;e.api.isEmpty(o)&&e.tf.removeNodes({at:l});return}if(t&&i.at){for(const[,s]of dt.children(e,i.at,{reverse:!0}))e.tf.removeNodes({...i,at:s});return}return RO(e,gi(e,i))})},KK=(e,t,{marks:n,...r}={})=>{if(n){let i=En(e,r.at)??e.selection;if(!i||(Ye.isPath(i)&&(i=e.api.range(i)),!dn.isRange(i)))return;const s=(l,u)=>{if(!Pn.isText(l))return!1;const f=e.api.parent(u);if(!f)return!1;const[h]=f;return!e.api.isVoid(h)||e.api.markableVoid(h)},a=dn.isExpanded(i);let o=!1;if(!a){const l=e.api.node(i);if(!l)return;const[u,f]=l;if(u&&s(u,f)){const h=e.api.parent(f);if(!h)return;const[m]=h;o=m&&e.api.markableVoid(m)}}if(a||o)return hw(e,t,gi(e,{...r,at:i,match:s,split:!0,voids:!0}))}return hw(e,t,gi(e,r))},dB=(e,t)=>{const n=[];for(const{at:r,props:i}of t){if(r.length===0)throw new Error("Cannot set properties on the root node.");const s=dt.get(e,r);if(!s||!dt.isDescendant(s))throw new Error(`Cannot build batched set_node operations because path [${r.join(",")}] does not exist.`);const a={},o={};let l=!1;for(const u in i){if(!Object.hasOwn(i,u)||u==="children"||u==="text")continue;const f=i[u],h=s[u];f!==h&&(l=!0,Object.hasOwn(s,u)&&(a[u]=h),f!=null&&(o[u]=f))}l&&n.push({type:"set_node",path:r,properties:a,newProperties:o})}return n},hB=(e,t)=>{if(t.length===0)return;const n=new Set;for(const r of t){if(r.path.length===0)throw new Error("Cannot set properties on the root node.");const i=r.path.join(",");if(n.has(i))throw new Error(`setNodesBatch does not support duplicate update paths. Duplicate path: [${r.path.join(",")}]`);n.add(i)}e.tf.withoutNormalizing(()=>{for(const r of t)e.apply(r)})},GK=(e,t)=>{hB(e,dB(e,t))},YK=(e,t,n)=>{TO(e,t,n)},JK=(e,t)=>{NO(e,t)},XK=(e,t)=>FO(e,gi(e,t)),QK=(e,t,n)=>IO(e,t,gi(e,n)),ZK=(e,t)=>{MO(e,gi(e,t))},eG=(e,t,{children:n,...r}={})=>{const i=gi(e,r);if(i.at&&(i.at=e.api.unhangRange(i.at,i)),n){const s=e.api.path(i.at);if(!s)return;const a=dt.get(e,s);if(!a?.children)return;e.tf.withoutNormalizing(()=>{const o=Ye.firstChild(s);pw(e,t,{...i,at:o}),a.children.length>1&&e.tf.moveNodes({at:s,children:!0,fromIndex:1,to:Ye.child(o,1)})});return}pw(e,t,i)},tG=(e,t,{remove:n}={})=>{e.selection&&e.tf.withoutNormalizing(()=>{e.tf.removeMarks([...oo(n),...Object.keys(t)]),Object.entries(t).forEach(([r,i])=>{e.tf.addMark(r,i)})})},nG=(e,{block:t,nodes:n,...r}={})=>{const i=En(e,r.at)??e.selection;if(!n&&!t)return;const s=n??(i?e.api.blocks({at:i}):[]);if(s.length===0)return;const a=s.at(-1),o=Ye.next(a[1]),l=s.map(([u])=>u);e.tf.insertNodes(l,{at:o,...r})},rG=(e,t,{at:n,shouldChange:r=!0,...i}={})=>{const s=n??e.selection;if(!s)return;const a=(u,f)=>{if(!Pn.isText(u))return!1;const[h]=e.api.parent(f);return!e.api.isVoid(h)||e.api.markableVoid(h)},o=dn.isExpanded(s);let l=!1;if(!o){const[u,f]=e.api.node(s);if(u&&a(u,f)){const[h]=e.api.parent(f);l=h&&e.api.markableVoid(h)}}if(t&&(o||l)){const u=oo(t);e.tf.unsetNodes(u,{at:s,match:a,split:!0,voids:!0,...i})}else if(!n){const u={...e.api.marks()};t?(oo(t).forEach(f=>{delete u[f]}),e.marks=u):e.marks={},r&&e.api.onChange()}},iG=(e,t,{at:n,children:r,removeNodes:i,...s})=>{e.tf.withoutNormalizing(()=>{if(r){if(!n)return;n=En(e,n);const a=e.api.path(n);if(!a)return;e.tf.removeNodes({...i,at:a,children:!0}),e.tf.insertNodes(t,{...s,at:a.concat([0])})}else e.tf.removeNodes({...i,at:n}),e.tf.insertNodes(t,{...s,at:n})})},sG=(e,t={})=>{e.tf.replaceNodes(e.api.create.value(),{at:[],children:!0,...t}),t.children||(e.operations=[],e.marks=null,e.history?.undos&&(e.history.undos=[],e.history.redos=[]))},aG=(e,t,{defaultType:n,someOptions:r,wrap:i,...s}={})=>{const a=s.at??e.selection;if(!a)return;const o=e.api.some({at:a,...r,match:{type:t}});if(i){o?e.tf.unwrapNodes({at:a,match:{type:t}}):e.tf.wrapNodes({children:[],type:t},{at:a});return}const l=n??e.api.create.block().type??"p";o&&t===l||e.tf.setNodes({type:o?l:t},{at:a,...s})},oG=(e,t,{remove:n}={})=>{e.selection&&e.tf.withoutNormalizing(()=>{if(e.api.hasMark(t)){e.tf.removeMark(t);return}e.tf.removeMarks([...oo(n),t]),e.tf.addMark(t,!0)})},Qy=new WeakMap,Fl=new WeakMap,dh=new WeakMap,qo={isMerging(e){return Fl.get(e)},isSaving(e){return Qy.get(e)},isSplittingOnce(e){return dh.get(e)},setSplittingOnce(e,t){dh.set(e,t)},withMerging(e,t){const n=e.api.isMerging();Fl.set(e,!0);try{t()}finally{Fl.set(e,n)}},withNewBatch(e,t){const n=e.api.isMerging(),r=e.api.isSplittingOnce();Fl.set(e,!0),dh.set(e,!0);try{t()}finally{Fl.set(e,n),r||dh.delete(e)}},withoutMerging(e,t){const n=e.api.isMerging();Fl.set(e,!1);try{t()}finally{Fl.set(e,n)}},withoutSaving(e,t){const n=e.api.isSaving();Qy.set(e,!1);try{t()}finally{Qy.set(e,n)}}},Il=(e,t)=>()=>(console.warn(`[OVERRIDE_MISSING] The method editor.${e}() has not been implemented or overridden. This may cause unexpected behavior. Please ensure that all required editor methods are properly defined.`),t),lG=({children:e,selection:t}={})=>{const n=z0();e&&(n.children=e),t&&(n.selection=t),Object.assign(n,{apply:Ce(TN,n),isElementReadOnly:n.isElementReadOnly,isInline:n.isInline,isSelectable:n.isSelectable,isVoid:n.isVoid,markableVoid:n.markableVoid,onChange:n.onChange}),Object.assign(n,{addMark:Ce(xW,n),deleteBackward:Ce(CW,n),deleteForward:Ce(kW,n),deleteFragment:Ce(DW,n),getDirtyPaths:Ce(NN,n),getFragment:Ce(X7,n),insertBreak:Ce(QW,n),insertFragment:Ce(LK,n),insertNode:Ce(ZW,n),insertSoftBreak:Ce(jK,n),insertText:Ce(qK,n),normalizeNode:Ce(cK,n),removeMark:Ce(mK,n),shouldNormalize:Ce(PN,n)}),Object.assign(n,{above:Ce(yW,n),after:Ce(AW,n),before:Ce(TW,n),collapse:Ce(RK,n),delete:Ce(IK,n),deselect:Ce(MK,n),deselectDOM:Ce(K7,n),edges:Ce(LW,n),elementReadOnly:Ce(nK,n),end:Ce(SW,n),first:Ce(jW,n),fragment:Ce(X7,n),getMarks:Ce(VW,n),hasBlocks:Ce(YW,n),hasInlines:Ce(JW,n),hasPath:Ce(KN,n),hasRange:Ce(G7,n),hasTexts:Ce(XW,n),insertNodes:Ce(zK,n),isBlock:Ce(BW,n),isEdge:Ce(eK,n),isEmpty:Ce(rK,n),isEnd:Ce(iK,n),isNormalizing:Ce(tK,n),isStart:Ce(sK,n),last:Ce(oK,n),leaf:Ce(_W,n),levels:Ce($W,n),liftNodes:Ce($K,n),mergeNodes:Ce(VK,n),move:Ce(HK,n),moveNodes:Ce(UK,n),next:Ce(lK,n),node:Ce(IW,n),nodes:Ce(PW,n),normalize:Ce(uK,n),parent:Ce(fK,n),path:Ce(MW,n),pathRef:Ce(bW,n),pathRefs:Ce(UW,n),point:Ce(HW,n),pointRef:Ce(wW,n),pointRefs:Ce(WW,n),positions:Ce(KW,n),previous:Ce(hK,n),range:Ce(pK,n),rangeRef:Ce(EW,n),rangeRefs:Ce(GW,n),removeNodes:Ce(WK,n),select:Ce(FW,n),setNodes:Ce(KK,n),setNodesBatch:Ce(GK,n),setNormalizing:Ce(bO,n),setPoint:Ce(YK,n),setSelection:Ce(JK,n),shouldMergeNodes:Ce(gK,n),splitNodes:Ce(XK,n),start:Ce(NW,n),string:Ce(zW,n),unhangRange:Ce(vK,n),unsetNodes:Ce(QK,n),unwrapNodes:Ce(ZK,n),void:Ce(OW,n),withoutNormalizing:Ce(RW,n),wrapNodes:Ce(eG,n)}),Object.assign(n,{history:{redos:[],undos:[]},meta:{isNormalizing:!1},redo:Il("redo"),undo:Il("undo"),writeHistory:Il("writeHistory")}),Object.assign(n,{insertData:Il("insertData"),insertFragmentData:Il("insertFragmentData",!1),insertTextData:Il("insertTextData",!1),setFragmentData:Il("setFragmentData")});const r={block:Ce(xK,n),blocks:Ce(bK,n),create:{block:s=>({children:[{text:""}],type:"p",...s}),value:()=>[r.create.block()]},descendant:Ce(wK,n),edgeBlocks:Ce(yK,n),findDocumentOrShadowRoot:Ce(JH,n),findEventRange:Ce(XH,n),findKey:Ce(QH,n),findPath:Ce(ZH,n),getWindow:Ce(tW,n),hasDOMNode:Ce(nW,n),hasEditableTarget:Ce(rW,n),hasMark:Ce(CK,n),hasRange:Ce(G7,n),hasSelectableTarget:Ce(iW,n),hasTarget:Ce(sW,n),isAt:Ce(SK,n),isComposing:Ce(aW,n),isEditorEnd:Ce(_K,n),isFocused:Ce(oW,n),isMerging:Ce(qo.isMerging,n),isReadOnly:Ce(lW,n),isSaving:Ce(qo.isSaving,n),isSelected:Ce(kK,n),isSplittingOnce:Ce(qo.isSplittingOnce,n),isTargetInsideNonReadonlyVoid:Ce(uW,n),isText:Ce(AK,n),mark:Ce(EK,n),nodesRange:Ce(TK,n),prop:NK,scrollIntoView:Ce(BK,n),some:Ce(PK,n),toDOMNode:Ce(cW,n),toDOMPoint:Ce(fW,n),toDOMRange:Ce(dW,n),toSlateNode:Ce(hW,n),toSlatePoint:Ce(pW,n),toSlateRange:Ce(mW,n),isCollapsed:()=>dn.isCollapsed(n.selection),isExpanded:()=>dn.isExpanded(n.selection),shouldNormalizeNode:()=>!0},i={addMarks:Ce(tG,n),blur:Ce(YH,n),deselectDOM:Ce(K7,n),duplicateNodes:Ce(nG,n),focus:Ce(eW,n),removeMarks:Ce(rG,n),replaceNodes:Ce(iG,n),reset:Ce(sG,n),setSplittingOnce:Ce(qo.setSplittingOnce,n),toggleBlock:Ce(aG,n),toggleMark:Ce(oG,n),withMerging:Ce(qo.withMerging,n),withNewBatch:Ce(qo.withNewBatch,n),withoutMerging:Ce(qo.withoutMerging,n),withoutSaving:Ce(qo.withoutSaving,n),escape:()=>!1,moveLine:()=>!1,selectAll:()=>!1,tab:()=>!1};return n.api=r,n.tf=i,n.transforms=i,oE(n),n},Zy=(e,t)=>e.length===t.length+1&&Ye.isParent(t,e),uc=(e,t)=>Ye.transform(e,t),Q7=(e,t)=>(t.type==="remove_node"||t.type==="merge_node")&&Ye.equals(t.path,e)?e:t.type==="move_node"&&Ye.equals(t.path,e)?Ye.transform(e,{node:{text:""},path:t.newPath,type:"insert_node"}):uc(e,t),Hh=({offset:e,path:t},n,r)=>{if(n.type==="set_selection"||n.type==="set_node")return{offset:e,path:t};if((n.type==="insert_node"||n.type==="remove_node"||n.type==="split_node"||n.type==="merge_node")&&Zy(n.path,t)){const s=n.path.at(-1);if(n.type==="insert_node"||n.type==="split_node"){const o=n.type==="split_node"?s+1:s;(o{const n=e.offset+e.text.length;if(t.type!=="set_selection"&&Ye.equals(t.path,e.path)){if(t.type==="insert_text"&&t.offset>e.offset&&t.offset=s)&&(a+=e.text[l-e.offset]);if(!a)return[];const o=e.offset-Math.max(0,Math.min(e.offset,s)-i);return[{...e,offset:o,text:a}]}if(t.type==="split_node"&&t.position>e.offset&&t.position{switch(e.type){case"insert_node":{if(t.type==="insert_node"&&Ye.equals(t.path,e.path)&&n==="before")return[e];const r=Q7(e.path,t);return r?[{...e,path:r}]:[]}case"insert_text":{const r=Hh({offset:e.offset,path:e.path},t,n);return r?[{...e,offset:r.offset,path:r.path}]:[]}case"merge_node":{const r=uc(e.path,t),i=Ye.previous(e.path);if(!r||!i)return null;const s=Hh({offset:e.position,path:i},t,"after"),a=Ye.previous(r);return!s||!a||!Ye.equals(s.path,a)?null:[{...e,path:r,position:s.offset}]}case"move_node":{const r=uc(e.path,t);if(!r)return[];const i=Q7(e.newPath,t);return i?[{...e,newPath:i,path:r}]:null}case"remove_node":case"set_node":{const r=uc(e.path,t);return r?[{...e,path:r}]:[]}case"remove_text":return uG(e,t);case"set_selection":return[e];case"split_node":{if(!uc(e.path,t))return[];const r=Hh({offset:e.position,path:e.path},t,"before");return r?[{...e,path:r.path,position:r.offset}]:null}}},fG=(e,t)=>{const n=e,r=t;return n.text===r.text&&n.offset===r.offset&&n.position===r.position&&(n.path===r.path||Ye.equals(n.path,r.path))&&(n.newPath===r.newPath||Ye.equals(n.newPath,r.newPath))},Z7=(e,t,n)=>{const r=cG(e,t,n);return r?.length===1&&fG(e,r[0])?[e]:r},dG=e=>e==="after"?"before":"after",cc=(e,t,n)=>{if(e.length===0||t.length===0)return[e,t];if(e.length>1){const s=cc([e[0]],t,n);if(!s)return null;const a=cc(e.slice(1),s[1],n);return a?[s[0].concat(a[0]),a[1]]:null}if(t.length>1){const s=cc(e,[t[0]],n);if(!s)return null;const a=cc(s[0],t.slice(1),n);return a?[a[0],s[1].concat(a[1])]:null}const r=Z7(e[0],t[0],n),i=Z7(t[0],e[0],dG(n));return r&&i?[r,i]:null},gw=(e,t)=>{let n=e??null;for(const r of t){if(!n)return null;n=dn.transform(n,r,{affinity:"inward"})}return n},pB=(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]),hG=(e,t)=>{let n=[t];for(let r=e.length-1;r>=0&&n.length>0;r--){const i=e[r],s=cc(i.operations,n,"after");if(!s||s[0].length===0){e.splice(0,r+1);return}i.selectionBefore=gw(i.selectionBefore,n),pB(s[0],i.operations)||(i.operations=s[0]),n=s[1],i.selectionAfter!==void 0&&(i.selectionAfter=gw(i.selectionAfter,n))}},pG=(e,t)=>{let n=[t];for(let r=e.length-1;r>=0&&n.length>0;r--){const i=e[r],s=i.operations.map(Gl.inverse).reverse(),a=cc(s,n,"after");if(!a){n=i.operations.concat(n),e.splice(r,1);continue}if(n=a[1],a[0].length===0){e.splice(r,1);continue}pB(a[0],s)||(i.operations=a[0].map(Gl.inverse).reverse()),i.selectionBefore=gw(i.selectionBefore,n)}},mG=(e,t)=>{hG(e.redos,t),pG(e.undos,t)},gG=e=>e?{anchor:{...e.anchor},focus:{...e.focus}}:null,vG=e=>{const t=e,{apply:n,setChildren:r}=t,i=t,{normalize:s}=i;let a=!0,o=!1;return t.history={redos:[],undos:[]},t.redo=()=>{const{history:l}=t,{redos:u}=l;if(u.length>0){const f=u.at(-1);o=!0;try{t.tf.withoutSaving(()=>{t.tf.withoutNormalizing(()=>{for(const m of f.operations)t.apply(m)})})}finally{o=!1}const h=f.selectionAfter??f.selectionBefore;h&&t.tf.select(h),l.redos.pop(),t.writeHistory("undos",f)}},t.undo=()=>{const{history:l}=t,{undos:u}=l;if(u.length>0){const f=u.at(-1),h=gG(t.selection);o=!0;try{t.tf.withoutSaving(()=>{t.tf.withoutNormalizing(()=>{const m=f.operations.map(Gl.inverse).reverse();for(const g of m)t.apply(g);f.selectionBefore&&t.tf.select(f.selectionBefore)})})}finally{o=!1}t.writeHistory("redos",{...f,selectionAfter:h}),l.undos.pop()}},t.apply=l=>{const{history:u,operations:f}=t,{undos:h}=u,m=h.at(-1),g=m?.operations.at(-1);let b=t.api.isSaving(),x=t.api.isMerging();if(b==null&&(b=xG(l)),b){if(x==null&&(m==null?x=!1:g&&f.includes(g)?x=!0:x=yG(l,g)),!x&&!a&&m&&g&&f.includes(g)&&(x=!0),t.api.isSplittingOnce()&&(x=!1,t.tf.setSplittingOnce(void 0)),m&&x)m.operations.push(l);else{const E={operations:[l],selectionBefore:t.selection};t.writeHistory("undos",E)}for(;h.length>100;)h.shift();u.redos=[]}else!o&&l.type!=="set_selection"&&mG(u,l);a=!1,n(l)},i.normalize=l=>{s(l),t.api.isNormalizing()&&(a=!0)},t.setNodesBatch=l=>{hB(t,dB(t,l))},r&&(t.setChildren=l=>{const u=t.history.undos.at(-1),f=u?.operations.length;t.tf.withNewBatch(()=>r(l));const h=t.history.undos.at(-1);(h!==u||h?.operations.length!==f)&&t.tf.setSplittingOnce(!0)}),t.writeHistory=(l,u)=>{t.history[l].push(u)},oE(t),t},yG=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&Ye.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&Ye.equals(e.path,t.path)),xG=(e,t)=>e.type!=="set_selection";let bG="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",p0=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=bG[n[e]&63];return t};var ex,eS;function mB(){if(eS)return ex;eS=1;var e=pu(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return ex=t,ex}var tx,tS;function lE(){if(tS)return tx;tS=1;var e=mB();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return tx=t,tx}var nx,nS;function gB(){if(nS)return nx;nS=1;var e=lE(),t=Fc();function n(r,i,s){(s!==void 0&&!t(r[i],s)||s===void 0&&!(i in r))&&e(r,i,s)}return nx=n,nx}var Hf={exports:{}};Hf.exports;var rS;function vB(){return rS||(rS=1,(function(e,t){var n=Zs(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var h=u.length,m=o?o(h):new u.constructor(h);return u.copy(m),m}e.exports=l})(Hf,Hf.exports)),Hf.exports}var rx,iS;function uE(){if(iS)return rx;iS=1;var e=YO();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return rx=t,rx}var ix,sS;function yB(){if(sS)return ix;sS=1;var e=uE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return ix=t,ix}var sx,aS;function xB(){if(aS)return sx;aS=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return Ex=r,Ex}var Cx,kS;function kB(){if(kS)return Cx;kS=1;var e=AG(),t=TG(),n=t(e);return Cx=n,Cx}var kx,DS;function dE(){if(DS)return kx;DS=1;var e=sE(),t=CB(),n=kB();function r(i,s){return n(t(i,s,e),i+"")}return kx=r,kx}var Dx,SS;function DB(){if(SS)return Dx;SS=1;var e=Fc(),t=Ic(),n=fm(),r=Wi();function i(s,a,o){if(!r(o))return!1;var l=typeof a;return(l=="number"?t(o)&&n(a,o.length):l=="string"&&a in o)?e(o[a],s):!1}return Dx=i,Dx}var Sx,_S;function SB(){if(_S)return Sx;_S=1;var e=dE(),t=DB();function n(r){return e(function(i,s){var a=-1,o=s.length,l=o>1?s[o-1]:void 0,u=o>2?s[2]:void 0;for(l=r.length>3&&typeof l=="function"?(o--,l):void 0,u&&t(s[0],s[1],u)&&(l=o<3?void 0:l,o=1),i=Object(i);++a!!e.dispatchFromDevtools&&typeof e.dispatch=="function",Cc=new Map,hh=e=>{const t=Cc.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},BG=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Cc.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Cc.set(n.name,i),{type:"tracked",store:e,...i}},PG=(e,t,n)=>{if(t===void 0)return;const r=Cc.get(e);r?.stores[t]===n&&(delete r.stores[t],Object.keys(r.stores).length===0&&Cc.delete(e))},RG=/^at (?:new |async )?(.+?) \(/,FG=/^([^@]+)@/;function IG(e){var t,n,r;if(!e)return;const i=e.split(` -`),s=i.findIndex(o=>o.includes("api.setState"));if(s<0)return;const a=((t=i[s+1])==null?void 0:t.trim())||"";return((n=RG.exec(a))==null?void 0:n[1])||((r=FG.exec(a))==null?void 0:r[1])}const MG=(e,t={})=>(n,r,i)=>{const{enabled:s,anonymousActionType:a,store:o,...l}=t;let u;try{u=(s??(TS?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);const{connection:f,...h}=BG(o,u,l);let m=!0;i.setState=((E,C,y)=>{const _=n(E,C);if(!m)return _;const O=y===void 0?{type:a||IG(new Error().stack)||"anonymous"}:typeof y=="string"?{type:y}:y;return o===void 0?(f?.send(O,r()),_):(f?.send({...O,type:`${o}/${O.type}`},{...hh(l.name),[o]:i.getState()}),_)});let g;i.devtools={cleanup:()=>{g?.(),g=void 0,PG(l.name,o,i),(o===void 0||!Cc.has(l.name))&&f&&typeof f.unsubscribe=="function"&&f.unsubscribe()}};const b=(...E)=>{const C=m;m=!1,n(...E),m=C},x=e(i.setState,r,i);if(h.type==="untracked"?f?.init(x):(h.stores[h.store]=i,f?.init(Object.fromEntries(Object.entries(h.stores).map(([E,C])=>[E,E===h.store?x:C.getState()])))),NS(i)){let E=!1;const C=i.dispatch;i.dispatch=(...y)=>{(TS?"production":void 0)!=="production"&&y[0].type==="__setState"&&!E&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),E=!0),C(...y)}}return g=f.subscribe(E=>{var C;const y=typeof l.serialize=="object"?l.serialize.reviver:void 0;switch(E.type){case"ACTION":if(typeof E.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ax(E.payload,y,_=>{if(_.type==="__setState"){if(o===void 0){b(_.state);return}Object.keys(_.state).length!==1&&console.error(` - [zustand devtools middleware] Unsupported __setState action format. - When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), - and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } - `);const O=_.state[o];if(O==null)return;JSON.stringify(i.getState())!==JSON.stringify(O)&&b(O);return}NS(i)&&i.dispatch(_)});case"DISPATCH":switch(E.payload.type){case"RESET":return b(x),o===void 0?f?.init(i.getState()):f?.init(hh(l.name));case"COMMIT":if(o===void 0){f?.init(i.getState());return}return f?.init(hh(l.name));case"ROLLBACK":return Ax(E.state,y,_=>{if(o===void 0){b(_),f?.init(i.getState());return}b(_[o]),f?.init(hh(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ax(E.state,y,_=>{if(o===void 0){b(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[o])&&b(_[o])});case"IMPORT_STATE":{const{nextLiftedState:_}=E.payload,O=(C=_.computedStates.slice(-1)[0])==null?void 0:C.state;if(!O)return;b(o===void 0?O:O[o]),f?.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),x},LG=MG,Ax=(e,t,n)=>{let r;try{r=JSON.parse(e,t)}catch(i){console.error("[zustand devtools middleware] Could not parse the received json",i)}r!==void 0&&n(r)},zG=e=>(t,n,r)=>{const i=r.subscribe;return r.subscribe=((a,o,l)=>{let u=a;if(o){const f=l?.equalityFn||Object.is;let h=a(r.getState());u=m=>{const g=a(m);if(!f(h,g)){const b=h;o(h=g,b)}},l?.fireImmediately&&o(h,h)}return i(u)}),e(t,n,r)},jG=zG;function qG(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const a=l=>l===null?null:JSON.parse(l,void 0),o=(s=n.getItem(i))!=null?s:null;return o instanceof Promise?o.then(a):a(o)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const vw=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return vw(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return vw(r)(n)}}}},$G=(e,t)=>(n,r,i)=>{let s={storage:qG(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,C)=>({...C,...E}),...t},a=!1,o=0;const l=new Set,u=new Set;let f=s.storage;if(!f)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...E)},r,i);const h=()=>{const E=s.partialize({...r()});return f.setItem(s.name,{state:E,version:s.version})},m=i.setState;i.setState=(...E)=>(m(...E),h());const g=e((...E)=>(n(...E),h()),r,i);i.getInitialState=()=>g;let b;const x=()=>{var E,C;if(!f)return;const y=++o;a=!1,l.forEach(O=>{var S;return O((S=r())!=null?S:g)});const _=((C=s.onRehydrateStorage)==null?void 0:C.call(s,(E=r())!=null?E:g))||void 0;return vw(f.getItem.bind(f))(s.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==s.version){if(s.migrate){const S=s.migrate(O.state,O.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var S;if(y!==o)return;const[w,A]=O;if(b=s.merge(A,(S=r())!=null?S:g),n(b,!0),w)return h()}).then(()=>{y===o&&(_?.(r(),void 0),b=r(),a=!0,u.forEach(O=>O(b)))}).catch(O=>{y===o&&_?.(void 0,O)})};return i.persist={setOptions:E=>{s={...s,...E},E.storage&&(f=E.storage)},clearStorage:()=>{++o,f?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>x(),hasHydrated:()=>a,onHydrate:E=>(l.add(E),()=>{l.delete(E)}),onFinishHydration:E=>(u.add(E),()=>{u.delete(E)})},s.skipHydration||x(),b||g},VG=$G;var _B=Symbol.for("immer-nothing"),OS=Symbol.for("immer-draftable"),rs=Symbol.for("immer-state");function Gs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var m0=Object.getPrototypeOf;function kc(e){return!!e&&!!e[rs]}function ou(e){return e?AB(e)||Array.isArray(e)||!!e[OS]||!!e.constructor?.[OS]||q0(e)||gm(e):!1}var UG=Object.prototype.constructor.toString(),BS=new WeakMap;function AB(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=BS.get(n);return r===void 0&&(r=Function.toString.call(n),BS.set(n,r)),r===UG}function mp(e,t,n=!0){mm(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function mm(e){const t=e[rs];return t?t.type_:Array.isArray(e)?1:q0(e)?2:gm(e)?3:0}function yw(e,t){return mm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function TB(e,t,n){const r=mm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function HG(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function q0(e){return e instanceof Map}function gm(e){return e instanceof Set}function Wl(e){return e.copy_||e.base_}function xw(e,t){if(q0(e))return new Map(e);if(gm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=AB(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[rs];let i=Reflect.ownKeys(r);for(let s=0;s1&&Object.defineProperties(e,{set:ph,add:ph,clear:ph,delete:ph}),Object.freeze(e),t&&Object.values(e).forEach(n=>hE(n,!0))),e}function WG(){Gs(2)}var ph={value:WG};function vm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var KG={};function lu(e){const t=KG[e];return t||Gs(0,e),t}var g0;function NB(){return g0}function GG(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function PS(e,t){t&&(lu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bw(e){ww(e),e.drafts_.forEach(YG),e.drafts_=null}function ww(e){e===g0&&(g0=e.parent_)}function RS(e){return g0=GG(g0,e)}function YG(e){const t=e[rs];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function FS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[rs].modified_&&(bw(t),Gs(4)),ou(e)&&(e=gp(t,e),t.parent_||vp(t,e)),t.patches_&&lu("Patches").generateReplacementPatches_(n[rs].base_,e,t.patches_,t.inversePatches_)):e=gp(t,n,[]),bw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_B?e:void 0}function gp(e,t,n){if(vm(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[rs];if(!i)return mp(t,(s,a)=>IS(e,i,t,s,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return vp(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,o=!1;i.type_===3&&(a=new Set(s),s.clear(),o=!0),mp(a,(l,u)=>IS(e,i,s,l,u,n,o),r),vp(e,s,!1),n&&e.patches_&&lu("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function IS(e,t,n,r,i,s,a){if(i==null||typeof i!="object"&&!a)return;const o=vm(i);if(!(o&&!a)){if(kc(i)){const l=s&&t&&t.type_!==3&&!yw(t.assigned_,r)?s.concat(r):void 0,u=gp(e,i,l);if(TB(n,r,u),kc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ou(i)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&o)return;gp(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(q0(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&vp(e,i)}}}function vp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hE(t,n)}function JG(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:NB(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=pE;n&&(i=[r],s=v0);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return r.draft_=o,r.revoke_=a,o}var pE={get(e,t){if(t===rs)return e;const n=Wl(e);if(!yw(n,t))return XG(e,n,t);const r=n[t];return e.finalized_||!ou(r)?r:r===Tx(e.base_,t)?(Nx(e),e.copy_[t]=Cw(r,e)):r},has(e,t){return t in Wl(e)},ownKeys(e){return Reflect.ownKeys(Wl(e))},set(e,t,n){const r=OB(Wl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Tx(Wl(e),t),s=i?.[rs];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(HG(n,i)&&(n!==void 0||yw(e.base_,t)))return!0;Nx(e),Ew(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Tx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Nx(e),Ew(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Wl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Gs(11)},getPrototypeOf(e){return m0(e.base_)},setPrototypeOf(){Gs(12)}},v0={};mp(pE,(e,t)=>{v0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});v0.deleteProperty=function(e,t){return v0.set.call(this,e,t,void 0)};v0.set=function(e,t,n){return pE.set.call(this,e[0],t,n,e[0])};function Tx(e,t){const n=e[rs];return(n?Wl(n):e)[t]}function XG(e,t,n){const r=OB(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function OB(e,t){if(!(t in e))return;let n=m0(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=m0(n)}}function Ew(e){e.modified_||(e.modified_=!0,e.parent_&&Ew(e.parent_))}function Nx(e){e.copy_||(e.copy_=xw(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QG=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(l=s,...u){return a.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&Gs(6),r!==void 0&&typeof r!="function"&&Gs(7);let i;if(ou(t)){const s=RS(this),a=Cw(t,void 0);let o=!0;try{i=n(a),o=!1}finally{o?bw(s):ww(s)}return PS(s,r),FS(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===_B&&(i=void 0),this.autoFreeze_&&hE(i,!0),r){const s=[],a=[];lu("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else Gs(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...o)=>this.produceWithPatches(a,l=>t(l,...o));let r,i;return[this.produce(t,n,(a,o)=>{r=a,i=o}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ou(e)||Gs(8),kc(e)&&(e=ZG(e));const t=RS(this),n=Cw(e,void 0);return n[rs].isManual_=!0,ww(t),n}finishDraft(e,t){const n=e&&e[rs];(!n||!n.isManual_)&&Gs(9);const{scope_:r}=n;return PS(r,t),FS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=lu("Patches").applyPatches_;return kc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Cw(e,t){const n=q0(e)?lu("MapSet").proxyMap_(e,t):gm(e)?lu("MapSet").proxySet_(e,t):JG(e,t);return(t?t.scope_:NB()).drafts_.push(n),n}function ZG(e){return kc(e)||Gs(10,e),BB(e)}function BB(e){if(!ou(e)||vm(e))return e;const t=e[rs];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xw(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=xw(e,!0);return mp(n,(i,s)=>{TB(n,i,BB(s))},r),t&&(t.finalized_=!1),n}var eY=new QG,tY=eY.produce;const Dr={Remove:"remove",Replace:"replace",Add:"add"},PB=Symbol.for("__MUTATIVE_PROXY_DRAFT__"),nY=Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"),Wh=Symbol.iterator,es={mutable:"mutable",immutable:"immutable"},mE={};function Xf(e,t){return e instanceof Map?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function MS(e,t){if(t in e){let n=Reflect.getPrototypeOf(e);for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Reflect.getPrototypeOf(n)}}}function gE(e){return Object.getPrototypeOf(e)===Set.prototype}function vE(e){return Object.getPrototypeOf(e)===Map.prototype}function Zi(e){var t;return(t=e.copy)!==null&&t!==void 0?t:e.original}function uu(e){return!!yn(e)}function yn(e){return typeof e!="object"?null:e?.[PB]}function yE(e){var t;const n=yn(e);return n?(t=n.copy)!==null&&t!==void 0?t:n.original:e}function Xs(e,t){if(!e||typeof e!="object")return!1;let n;return Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e)||e instanceof Map||e instanceof Set||!!t?.mark&&((n=t.mark(e,es))===es.immutable||typeof n=="function")}function RB(e,t=[]){if(Object.hasOwnProperty.call(e,"key")){const n=e.parent.copy,r=yn(ho(n,e.key));if(r!==null&&r?.original!==e.original)return null;const i=e.parent.type===3,s=i?Array.from(e.parent.setMap.keys()).indexOf(e.key):e.key;if(!(i&&n.size>s||Xf(n,s)))return null;t.push(s)}if(e.parent)return RB(e.parent,t);t.reverse();try{rY(e.copy,t)}catch{return null}return t}function mu(e){return Array.isArray(e)?1:e instanceof Map?2:e instanceof Set?3:0}function ho(e,t){return mu(e)===2?e.get(t):e[t]}function $0(e,t,n){mu(e)===2?e.set(t,n):e[t]=n}function Ox(e,t){const n=yn(e);return(n?Zi(n):e)[t]}function lo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function kw(e){if(e)for(;e.finalities.revoke.length>0;)e.finalities.revoke.pop()()}function Yl(e,t){return t?e:[""].concat(e).map(n=>{const r=`${n}`;return r.indexOf("/")===-1&&r.indexOf("~")===-1?r:r.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")}function rY(e,t){for(let n=0;n{let r=Reflect.getOwnPropertyDescriptor(e,n);if(r.enumerable&&r.configurable&&r.writable){t[n]=e[n];return}r.writable||(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(r={configurable:!0,writable:!0,enumerable:r.enumerable,value:e[n]}),Reflect.defineProperty(t,n,r)}),t}const sY=Object.prototype.propertyIsEnumerable;function FB(e,t){let n;if(Array.isArray(e))return Array.prototype.concat.call(e);if(e instanceof Set){if(!gE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(e.values())}return Set.prototype.difference?Set.prototype.difference.call(e,new Set):new Set(e.values())}else if(e instanceof Map){if(!vE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(e)}return new Map(e)}else if(t?.mark&&(n=t.mark(e,es),n!==void 0)&&n!==es.mutable){if(n===es.immutable)return iY(e);if(typeof n=="function"){if(t.enablePatches||t.enableAutoFreeze)throw new Error("You can't use mark and patches or auto freeze together.");return n()}throw new Error(`Unsupported mark result: ${n}`)}else if(typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i]}),Object.getOwnPropertySymbols(e).forEach(i=>{sY.call(e,i)&&(r[i]=e[i])}),r}else throw new Error("Please check mark() to ensure that it is a stable marker draftable function.")}function Si(e){e.copy||(e.copy=FB(e.original,e.options))}function Wf(e){if(!Xs(e))return yE(e);if(Array.isArray(e))return e.map(Wf);if(e instanceof Map){const n=Array.from(e.entries()).map(([r,i])=>[r,Wf(i)]);if(!vE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(n)}return new Map(n)}if(e instanceof Set){const n=Array.from(e).map(Wf);if(!gE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(n)}return new Set(n)}const t=Object.create(Object.getPrototypeOf(e));for(const n in e)t[n]=Wf(e[n]);return t}function Kh(e){return uu(e)?Wf(e):e}function _a(e){var t;e.assignedMap=(t=e.assignedMap)!==null&&t!==void 0?t:new Map,e.operated||(e.operated=!0,e.parent&&_a(e.parent))}function LS(){throw new Error("Cannot modify frozen object")}function nc(e,t,n,r,i){{n=n??new WeakMap,r=r??[],i=i??[];const a=n.has(e)?n.get(e):e;if(r.length>0){const o=r.indexOf(a);if(a&&typeof a=="object"&&o!==-1)throw r[0]===a?new Error("Forbids circular reference"):new Error(`Forbids circular reference: ~/${i.slice(0,o).map((l,u)=>{if(typeof l=="symbol")return`[${l.toString()}]`;const f=r[u];return typeof l=="object"&&(f instanceof Map||f instanceof Set)?Array.from(f.keys()).indexOf(l):l}).join("/")}`);r.push(a),i.push(t)}else r.push(a)}if(Object.isFrozen(e)||uu(e)){r.pop(),i.pop();return}switch(mu(e)){case 2:for(const[o,l]of e)nc(o,o,n,r,i),nc(l,o,n,r,i);e.set=e.clear=e.delete=LS;break;case 3:for(const o of e)nc(o,o,n,r,i);e.add=e.clear=e.delete=LS;break;case 1:Object.freeze(e);let a=0;for(const o of e)nc(o,a,n,r,i),a+=1;break;default:Object.freeze(e),Object.keys(e).forEach(o=>{const l=e[o];nc(l,o,n,r,i)})}r.pop(),i.pop()}function xE(e,t){const n=mu(e);if(n===0)Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)});else if(n===1){let r=0;for(const i of e)t(r,i,e),r+=1}else e.forEach((r,i)=>t(i,r,e))}function IB(e,t,n){if(uu(e)||!Xs(e,n)||t.has(e)||Object.isFrozen(e))return;const r=e instanceof Set,i=r?new Map:void 0;if(t.add(e),xE(e,(s,a)=>{var o;if(uu(a)){const l=yn(a);Si(l);const u=!((o=l.assignedMap)===null||o===void 0)&&o.size||l.operated?l.copy:l.original;$0(r?i:e,s,u)}else IB(a,t,n)}),i){const s=e,a=Array.from(s);s.clear(),a.forEach(o=>{s.add(i.has(o)?i.get(o):o)})}}function aY(e,t){const n=e.type===3?e.setMap:e.copy;e.finalities.revoke.length>1&&e.assignedMap.get(t)&&n&&IB(ho(n,t),e.finalities.handledSet,e.options)}function Dw(e){e.type===3&&e.copy&&(e.copy.clear(),e.setMap.forEach(t=>{e.copy.add(yE(t))}))}function Sw(e,t,n,r){if(e.operated&&e.assignedMap&&e.assignedMap.size>0&&!e.finalized){if(n&&r){const s=RB(e);s&&t(e,s,n,r)}e.finalized=!0}}function bE(e,t,n,r){const i=yn(n);i&&(i.callbacks||(i.callbacks=[]),i.callbacks.push((s,a)=>{var o;const l=e.type===3?e.setMap:e.copy;if(lo(ho(l,t),n)){let u=i.original;i.copy&&(u=i.copy),Dw(e),Sw(e,r,s,a),e.options.enableAutoFreeze&&(e.options.updatedValues=(o=e.options.updatedValues)!==null&&o!==void 0?o:new WeakMap,e.options.updatedValues.set(u,i.original)),$0(l,t,u)}}),e.options.enableAutoFreeze&&i.finalities!==e.finalities&&(e.options.enableAutoFreeze=!1)),Xs(n,e.options)&&e.finalities.draft.push(()=>{const s=e.type===3?e.setMap:e.copy;lo(ho(s,t),n)&&aY(e,t)})}function oY(e,t,n,r,i){let{original:s,assignedMap:a,options:o}=e,l=e.copy;l.length{const u=ho(e,l),f=Kh(ho(t,l)),h=o?Xf(e,l)?Dr.Replace:Dr.Add:Dr.Remove;if(lo(u,f)&&h===Dr.Replace)return;const m=r.concat(l),g=Yl(m,a);i.push(h===Dr.Remove?{op:h,path:g}:{op:h,path:g,value:f}),s.push(h===Dr.Add?{op:Dr.Remove,path:g}:h===Dr.Remove?{op:Dr.Add,path:g,value:u}:{op:Dr.Replace,path:g,value:u})})}function uY({original:e,copy:t},n,r,i,s){let a=0;e.forEach(o=>{if(!t.has(o)){const l=n.concat([a]),u=Yl(l,s);r.push({op:Dr.Remove,path:u,value:o}),i.unshift({op:Dr.Add,path:u,value:o})}a+=1}),a=0,t.forEach(o=>{if(!e.has(o)){const l=n.concat([a]),u=Yl(l,s);r.push({op:Dr.Add,path:u,value:o}),i.unshift({op:Dr.Remove,path:u,value:o})}a+=1})}function y0(e,t,n,r){const{pathAsArray:i=!0}=e.options.enablePatches;switch(e.type){case 0:case 2:return lY(e,t,n,r,i);case 1:return oY(e,t,n,r,i);case 3:return uY(e,t,n,r,i)}}const yp=(e,t,n=!1)=>{if(typeof e=="object"&&e!==null&&(!Xs(e,t)||n))throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.")},_w={get size(){return Zi(yn(this)).size},has(e){return Zi(yn(this)).has(e)},set(e,t){const n=yn(this),r=Zi(n);return(!r.has(e)||!lo(r.get(e),t))&&(Si(n),_a(n),n.assignedMap.set(e,!0),n.copy.set(e,t),bE(n,e,t,y0)),this},delete(e){if(!this.has(e))return!1;const t=yn(this);return Si(t),_a(t),t.original.has(e)?t.assignedMap.set(e,!1):t.assignedMap.delete(e),t.copy.delete(e),!0},clear(){const e=yn(this);if(this.size){Si(e),_a(e),e.assignedMap=new Map;for(const[t]of e.original)e.assignedMap.set(t,!1);e.copy.clear()}},forEach(e,t){const n=yn(this);Zi(n).forEach((r,i)=>{e.call(t,this.get(i),i,this)})},get(e){var t,n;const r=yn(this),i=Zi(r).get(e),s=((n=(t=r.options).mark)===null||n===void 0?void 0:n.call(t,i,es))===es.mutable;if(r.options.strict&&yp(i,r.options,s),s||r.finalized||!Xs(i,r.options)||i!==r.original.get(e))return i;const a=mE.createDraft({original:i,parentDraft:r,key:e,finalities:r.finalities,options:r.options});return Si(r),r.copy.set(e,a),a},keys(){return Zi(yn(this)).keys()},values(){const e=this.keys();return{[Wh]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}},entries(){const e=this.keys();return{[Wh]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const n=this.get(t.value);return{done:!1,value:[t.value,n]}}}},[Wh](){return this.entries()}},cY=Reflect.ownKeys(_w),zS=(e,t,{isValuesIterator:n})=>()=>{var r,i;const s=t.next();if(s.done)return s;const a=s.value;let o=e.setMap.get(a);const l=yn(o),u=((i=(r=e.options).mark)===null||i===void 0?void 0:i.call(r,o,es))===es.mutable;if(e.options.strict&&yp(a,e.options,u),!u&&!l&&Xs(a,e.options)&&!e.finalized&&e.original.has(a)){const f=mE.createDraft({original:a,parentDraft:e,key:a,finalities:e.finalities,options:e.options});e.setMap.set(a,f),o=f}else l&&(o=l.proxy);return{done:!1,value:n?o:[o,o]}},xp={get size(){return yn(this).setMap.size},has(e){const t=yn(this);if(t.setMap.has(e))return!0;Si(t);const n=yn(e);return!!(n&&t.setMap.has(n.original))},add(e){const t=yn(this);return this.has(e)||(Si(t),_a(t),t.assignedMap.set(e,!0),t.setMap.set(e,e),bE(t,e,e,y0)),this},delete(e){if(!this.has(e))return!1;const t=yn(this);Si(t),_a(t);const n=yn(e);return n&&t.setMap.has(n.original)?(t.assignedMap.set(n.original,!1),t.setMap.delete(n.original)):(!n&&t.setMap.has(e)?t.assignedMap.set(e,!1):t.assignedMap.delete(e),t.setMap.delete(e))},clear(){if(!this.size)return;const e=yn(this);Si(e),_a(e);for(const t of e.original)e.assignedMap.set(t,!1);e.setMap.clear()},values(){const e=yn(this);Si(e);const t=e.setMap.keys();return{[Symbol.iterator]:()=>this.values(),next:zS(e,t,{isValuesIterator:!0})}},entries(){const e=yn(this);Si(e);const t=e.setMap.keys();return{[Symbol.iterator]:()=>this.entries(),next:zS(e,t,{isValuesIterator:!1})}},keys(){return this.values()},[Wh](){return this.values()},forEach(e,t){const n=this.values();let r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}};Set.prototype.difference&&Object.assign(xp,{intersection(e){return Set.prototype.intersection.call(new Set(this.values()),e)},union(e){return Set.prototype.union.call(new Set(this.values()),e)},difference(e){return Set.prototype.difference.call(new Set(this.values()),e)},symmetricDifference(e){return Set.prototype.symmetricDifference.call(new Set(this.values()),e)},isSubsetOf(e){return Set.prototype.isSubsetOf.call(new Set(this.values()),e)},isSupersetOf(e){return Set.prototype.isSupersetOf.call(new Set(this.values()),e)},isDisjointFrom(e){return Set.prototype.isDisjointFrom.call(new Set(this.values()),e)}});const fY=Reflect.ownKeys(xp),MB=new WeakSet,LB={get(e,t,n){var r,i;const s=(r=e.copy)===null||r===void 0?void 0:r[t];if(s&&MB.has(s))return s;if(t===PB)return e;let a;if(e.options.mark){const u=t==="size"&&(e.original instanceof Map||e.original instanceof Set)?Reflect.get(e.original,t):Reflect.get(e.original,t,n);if(a=e.options.mark(u,es),a===es.mutable)return e.options.strict&&yp(u,e.options,!0),u}const o=Zi(e);if(o instanceof Map&&cY.includes(t)){if(t==="size")return Object.getOwnPropertyDescriptor(_w,"size").get.call(e.proxy);const u=_w[t];if(u)return u.bind(e.proxy)}if(o instanceof Set&&fY.includes(t)){if(t==="size")return Object.getOwnPropertyDescriptor(xp,"size").get.call(e.proxy);const u=xp[t];if(u)return u.bind(e.proxy)}if(!Xf(o,t)){const u=MS(o,t);return u?"value"in u?u.value:(i=u.get)===null||i===void 0?void 0:i.call(e.proxy):void 0}const l=o[t];if(e.options.strict&&yp(l,e.options),e.finalized||!Xs(l,e.options))return l;if(l===Ox(e.original,t)){if(Si(e),e.copy[t]=wE({original:e.original[t],parentDraft:e,key:e.type===1?Number(t):t,finalities:e.finalities,options:e.options}),typeof a=="function"){const u=yn(e.copy[t]);return Si(u),_a(u),u.copy}return e.copy[t]}return l},set(e,t,n){var r;if(e.type===3||e.type===2)throw new Error("Map/Set draft does not support any property assignment.");let i;if(e.type===1&&t!=="length"&&!(Number.isInteger(i=Number(t))&&i>=0&&(t===0||i===0||String(i)===String(t))))throw new Error("Only supports setting array indices and the 'length' property.");const s=MS(Zi(e),t);if(s?.set)return s.set.call(e.proxy,n),!0;const a=Ox(Zi(e),t),o=yn(a);return o&&lo(o.original,n)?(e.copy[t]=n,e.assignedMap=(r=e.assignedMap)!==null&&r!==void 0?r:new Map,e.assignedMap.set(t,!1),!0):(lo(n,a)&&(n!==void 0||Xf(e.original,t))||(Si(e),_a(e),Xf(e.original,t)&&lo(n,e.original[t])?e.assignedMap.delete(t):e.assignedMap.set(t,!0),e.copy[t]=n,bE(e,t,n,y0)),!0)},has(e,t){return t in Zi(e)},ownKeys(e){return Reflect.ownKeys(Zi(e))},getOwnPropertyDescriptor(e,t){const n=Zi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},getPrototypeOf(e){return Reflect.getPrototypeOf(e.original)},setPrototypeOf(){throw new Error("Cannot call 'setPrototypeOf()' on drafts")},defineProperty(){throw new Error("Cannot call 'defineProperty()' on drafts")},deleteProperty(e,t){var n;return e.type===1?LB.set.call(this,e,t,void 0,e.proxy):(Ox(e.original,t)!==void 0||t in e.original?(Si(e),_a(e),e.assignedMap.set(t,!1)):(e.assignedMap=(n=e.assignedMap)!==null&&n!==void 0?n:new Map,e.assignedMap.delete(t)),e.copy&&delete e.copy[t],!0)}};function wE(e){const{original:t,parentDraft:n,key:r,finalities:i,options:s}=e,a=mu(t),o={type:a,finalized:!1,parent:n,original:t,copy:null,proxy:null,finalities:i,options:s,setMap:a===3?new Map(t.entries()):void 0};(r||"key"in e)&&(o.key=r);const{proxy:l,revoke:u}=Proxy.revocable(a===1?Object.assign([],o):o,LB);if(i.revoke.push(u),MB.add(l),o.proxy=l,n){const f=n;f.finalities.draft.push((h,m)=>{var g,b;const x=yn(l);let E=f.type===3?f.setMap:f.copy;const C=ho(E,r),y=yn(C);if(y){let _=y.original;y.operated&&(_=yE(C)),Dw(y),Sw(y,y0,h,m),f.options.enableAutoFreeze&&(f.options.updatedValues=(g=f.options.updatedValues)!==null&&g!==void 0?g:new WeakMap,f.options.updatedValues.set(_,y.original)),$0(E,r,_)}(b=x.callbacks)===null||b===void 0||b.forEach(_=>{_(h,m)})})}else{const f=yn(l);f.finalities.draft.push((h,m)=>{Dw(f),Sw(f,y0,h,m)})}return l}mE.createDraft=wE;function dY(e,t,n,r,i){var s;const a=yn(e),o=(s=a?.original)!==null&&s!==void 0?s:e,l=!!t.length;if(a?.operated)for(;a.finalities.draft.length>0;)a.finalities.draft.pop()(n,r);const u=l?t[0]:a?a.operated?a.copy:a.original:e;return a&&kw(a),i&&nc(u,u,a?.options.updatedValues),[u,n&&l?[{op:Dr.Replace,path:[],value:t[0]}]:n,r&&l?[{op:Dr.Replace,path:[],value:o}]:r]}function hY(e,t){var n;const r={draft:[],revoke:[],handledSet:new WeakSet};let i,s;t.enablePatches&&(i=[],s=[]);const o=((n=t.mark)===null||n===void 0?void 0:n.call(t,e,es))===es.mutable||!Xs(e,t)?e:wE({original:e,parentDraft:null,finalities:r,options:t});return[o,(l=[])=>{const[u,f,h]=dY(o,l,i,s,t.enableAutoFreeze);return t.enablePatches?[u,f,h]:u}]}function Aw(e){const{rootDraft:t,value:n,useRawReturn:r=!1,isRoot:i=!0}=e;xE(n,(s,a,o)=>{const l=yn(a);if(l&&t&&l.finalities===t.finalities){e.isContainDraft=!0;const u=l.original;if(o instanceof Set){const f=Array.from(o);o.clear(),f.forEach(h=>o.add(s===h?u:h))}else $0(o,s,u)}else typeof a=="object"&&a!==null&&(e.value=a,e.isRoot=!1,Aw(e))}),i&&(e.isContainDraft||console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."),r&&console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."))}function zB(e){var t;const n=yn(e);if(!Xs(e,n?.options))return e;const r=mu(e);if(n&&!n.operated)return n.original;let i;function s(){i=r===2?vE(e)?new Map(e):new(Object.getPrototypeOf(e)).constructor(e):r===3?Array.from(n.setMap.values()):FB(e,n?.options)}if(n){n.finalized=!0;try{s()}finally{n.finalized=!1}}else i=e;if(xE(i,(a,o)=>{if(n&&lo(ho(n.original,a),o))return;const l=zB(o);l!==o&&(i===e&&s(),$0(i,a,l))}),r===3){const a=(t=n?.original)!==null&&t!==void 0?t:i;return gE(a)?new Set(i):new(Object.getPrototypeOf(a)).constructor(i)}return i}function jS(e){if(!uu(e))throw new Error(`current() is only used for Draft, parameter: ${e}`);return zB(e)}const pY=e=>function t(n,r,i){var s,a,o;if(typeof n=="function"&&typeof r!="function")return function(S,...w){return t(S,A=>n.call(this,A,...w),r)};const l=n,u=r;let f=i;if(typeof r!="function"&&(f=r),f!==void 0&&Object.prototype.toString.call(f)!=="[object Object]")throw new Error(`Invalid options: ${f}, 'options' should be an object.`);f=Object.assign(Object.assign({},e),f);const h=uu(l)?jS(l):l,m=Array.isArray(f.mark)?((S,w)=>{for(const A of f.mark){if(typeof A!="function")throw new Error(`Invalid mark: ${A}, 'mark' should be a function.`);const T=A(S,w);if(T)return T}}):f.mark,g=(s=f.enablePatches)!==null&&s!==void 0?s:!1,b=(a=f.strict)!==null&&a!==void 0?a:!1,E={enableAutoFreeze:(o=f.enableAutoFreeze)!==null&&o!==void 0?o:!1,mark:m,strict:b,enablePatches:g};if(!Xs(h,E)&&typeof h=="object"&&h!==null)throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");const[C,y]=hY(h,E);if(typeof r!="function"){if(!Xs(h,E))throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");return[C,y]}let _;try{_=u(C)}catch(S){throw kw(yn(C)),S}const O=S=>{const w=yn(C);if(!uu(S)){if(S!==void 0&&!lo(S,C)&&w?.operated)throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");const T=S?.[nY];if(T){const P=T[0];return E.strict&&typeof S=="object"&&S!==null&&Aw({rootDraft:w,value:S,useRawReturn:!0}),y([P])}if(S!==void 0)return typeof S=="object"&&S!==null&&Aw({rootDraft:w,value:S}),y([S])}if(S===C||S===void 0)return y([]);const A=yn(S);if(E===A.options){if(A.operated)throw new Error("Cannot return a modified child draft.");return y([jS(S)])}return y([S])};return _ instanceof Promise?_.then(O,S=>{throw kw(yn(C)),S}):O(_)},mY=pY();Object.prototype.constructor.toString();var gY=e=>(t,n,r)=>(r.setState=(i,s,...a)=>{const o=typeof i=="function"?tY(i):i;return t(o,typeof s=="boolean"?s:!0,...a)},e(r.setState,n,r)),vY=gY,yY=(e,t)=>(n,r,i)=>(i.setState=(s,a,...o)=>{const l=typeof s=="function"?mY(s,t&&{...t,enablePatches:!1}):s;return n(l,typeof a=="boolean"?a:!0,...o)},e(i.setState,r,i)),xY=yY,mh=(e,t=!1)=>{const n=typeof e=="boolean",{enabled:r,...i}=n?{}:e||{};return{enabled:(n?e:r)??t,...i}},jB=(e,t)=>{const n=e(t),r={...t.actions,...n};return{...t,actions:r,set:(i,...s)=>{if(i in r){const a=r[i];return a?.(...s)}return t.set(i,s[0])}}},bY=e=>e,qB=(e,t,n)=>{const r=t.get.bind(t),i=t.subscribe.bind(t),s=e(t),a={...t.selectors,...s},o={...t,selectors:a,get:(l,...u)=>{if(l in a){const f=a[l];return f?.(...u)}return r(l)},subscribe:(l,...u)=>{if(l in a){const f=[...u];let h,m=bY;typeof f.at(-1)!="function"&&(h=f.pop());const b=f.pop();typeof f.at(-1)=="function"&&(m=f.pop());const E=f;return i("state",()=>m(a[l](...E)),b,h)}return i(l,...u)}};if(n?.selectWithStore){const l=n.selectWithStore;o.useValue=(u,...f)=>{if(u in a){const h=a[u],m=f.at(-1),g=typeof m=="function"?m:void 0,b=g?f.slice(0,-1):f;return l(()=>h?.(...b),g)}return t.useValue?.(u,...f)}}return o},$B=(e,t)=>{const{name:n,devtools:r,immer:i,mutative:s,persist:a,isMutativeState:o}=t,l=[],u=mh(r);u.enabled&&l.push(x=>LG(x,{...u,name:u?.name??n}));const f=mh(a);f.enabled&&l.push(x=>VG(x,{...f,name:f.name??n}));const h=mh(i);h.enabled&&l.push(x=>vY(x));const m=mh(s);m.enabled&&l.push(x=>xY(x,m));const g=l.reverse().reduce((x,E)=>E(x),typeof e=="function"?e:()=>e),b=o||h.enabled||m.enabled;return{stateCreator:jG(g),isMutative:b,name:n}},VB=(e,{name:t,isMutative:n})=>({get:a=>a==="state"?e.getState():e.getState()[a],set:(a,o)=>{if(a==="state")return e.setState(o);const l=a,u=e.getState()[l];if(typeof o=="function"&&u!==void 0&&u!==null&&typeof u!="function"&&(o=o(u)),u===o)return;const h=a.replace(/^\S/,g=>g.toUpperCase()),m=t?`@@${t}/set${h}`:void 0;e.setState(n?g=>{g[l]=o}:{[l]:o},void 0,m)},subscribe:(a,o,l,u)=>{if(a==="state")return l?e.subscribe(o,l,u):e.subscribe(o);let f,h,m;return l?(f=g=>o(g[a]),h=l,m=u):(f=g=>g[a],h=o,m=u),e.subscribe(f,h,m)},store:e,name:t,actions:{},selectors:{}}),bp=(e,t)=>{const n=t?.extendSelectors??qB,r=t?.extendActions??jB;return{...e,actions:e.actions||{},extendSelectors:i=>bp(n(i,e),t),extendActions:i=>bp(r(i,e),t)}},wY=(e,t)=>{const n=$B(e,t),r=M4(n.stateCreator),i=VB(r,{name:n.name,isMutative:n.isMutative});return bp(i)},Bx,qS;function UB(){if(qS)return Bx;qS=1;var e=fE(),t=SB(),n=t(function(r,i,s,a){e(r,i,s,a)});return Bx=n,Bx}var EY=UB();const CY=Nr(EY);var Px,$S;function kY(){if($S)return Px;$S=1;function e(t,n,r,i){var s=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++s]);++s0&&s(f)?i>1?n(f,i-1,s,a,o):e(o,f):a||(o[o.length]=f)}return o}return Kx=n,Kx}var Gx,r8;function zY(){if(r8)return Gx;r8=1;var e=LY();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Gx=t,Gx}var Yx,i8;function KB(){if(i8)return Yx;i8=1;var e=zY(),t=CB(),n=kB();function r(i){return n(t(i,void 0,e),i+"")}return Yx=r,Yx}var Jx,s8;function jY(){if(s8)return Jx;s8=1;var e=IY(),t=KB(),n=t(function(r,i){return r==null?{}:e(r,i)});return Jx=n,Jx}var qY=jY();const $Y=Nr(qY);var Xx,a8;function VY(){if(a8)return Xx;a8=1;var e=nE();function t(n,r){return e(n,r)}return Xx=t,Xx}var UY=VY();const HY=Nr(UY);var Qx,o8;function WY(){if(o8)return Qx;o8=1;function e(t){return t===void 0}return Qx=e,Qx}var KY=WY();const Zx=Nr(KY);var eb,l8;function GY(){if(l8)return eb;l8=1;var e="Expected a function";function t(n){if(typeof n!="function")throw new TypeError(e);return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}}return eb=t,eb}var tb,u8;function GB(){if(u8)return tb;u8=1;var e=Y4(),t=U4(),n=J4(),r=XO(),i=Object.getOwnPropertySymbols,s=i?function(a){for(var o=[];a;)e(o,n(a)),a=t(a);return o}:r;return tb=s,tb}var nb,c8;function EE(){if(c8)return nb;c8=1;var e=JO(),t=GB(),n=qc();function r(i){return e(i,n,t)}return nb=r,nb}var rb,f8;function YY(){if(f8)return rb;f8=1;var e=rm(),t=aE(),n=WB(),r=EE();function i(s,a){if(s==null)return{};var o=e(r(s),function(l){return[l]});return a=t(a),n(s,o,function(l,u){return a(l,u[0])})}return rb=i,rb}var ib,d8;function JY(){if(d8)return ib;d8=1;var e=aE(),t=GY(),n=YY();function r(i,s){return n(i,t(e(s)))}return ib=r,ib}var XY=JY();const sb=Nr(XY);function QY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ZY(e,t){if(e==null)return{};var n,r,i=QY(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;rnew V0(Dc(Dc({},r),{},{offset:n}))):[]}function iJ(e,t){const n=e.text.length;let r=Nw.get(e);r||(r=new Set,Nw.set(e,r)),r.add([n,t])}function sJ(e){const t=Nw.get(e);return t?Array.from(t.values(),([n,r])=>new U0(Dc(Dc({},r),{},{offset:n}))):[]}function aJ(e,t){const n=e.text.length;let r=Ow.get(e);r||(r=new Set,Ow.set(e,r)),r.add([n,t])}function oJ(e){const t=Ow.get(e);return t?Array.from(t.values(),([n,r])=>new CE(Dc(Dc({},r),{},{offset:n}))):[]}function p8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bw(e){for(var t=1;ts instanceof V0),i=n.find(s=>s instanceof U0);if(!r||r.offset==null||r.path==null)throw new Error("The hyperscript tag must have an tag as a child with `path` and `offset` attributes defined.");if(!i||i.offset==null||i.path==null)throw new Error("The hyperscript tag must have a tag as a child with `path` and `offset` attributes defined.");return Bw({anchor:{offset:r.offset,path:r.path},focus:{offset:i.offset,path:i.path}},t)}function pJ(e,t,n){const r=xm(n);if(r.length>1)throw new Error("The hyperscript tag must only contain a single node's worth of children.");let[i]=r;if(i==null&&(i={text:""}),!kn.isText(i))throw new Error(` - The hyperscript tag can only contain text content as children.`);return Gh.delete(i),Object.assign(i,t),i}const mJ=e=>(t,n,r)=>{const i=[];let s;for(const u of r)we.isRange(u)?s=u:i.push(u);const a=xm(i),o={},l=e();Object.assign(l,n),l.children=a;for(const[u,f]of ie.texts(l)){for(const{ref:h=o,offset:m}of rJ(u))m!=null&&(h.anchor={path:f,offset:m});for(const{ref:h=o,offset:m}of sJ(u))m!=null&&(h.focus={path:f,offset:m});for(const{ref:h,offset:m}of oJ(u))h&&(h.offset=m,h.path=f)}if(o.anchor&&!o.focus)throw new Error("Slate hyperscript ranges must have both `` and `` defined if one is defined, but you only defined ``. For collapsed selections, use `` instead.");if(!o.anchor&&o.focus)throw new Error("Slate hyperscript ranges must have both `` and `` defined if one is defined, but you only defined ``. For collapsed selections, use `` instead.");return s!=null?l.selection=s:we.isRange(o)&&(l.selection=o),l},gJ=["__self","__source"];function m8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mc(e){for(var t=1;t{const{elements:t={}}=e,n=bJ(t),r=mc(mc(mc({},vJ),n),e.creators);return xJ(r)},xJ=e=>(n,r,...i)=>{if(Yr(r)){const{__self:o,__source:l}=r;r=ZY(r,gJ)}if(typeof n=="function")return n(mc({children:i},r));const s=e[n];if(!s)throw new Error(`No hyperscript creator found for tag: <${n}>`);return r==null&&(r={}),Yr(r)||(i=[r].concat(i),r={}),i=i.filter(o=>!!o).flat(),s(n,r,i)},bJ=e=>{const t={};for(const n in e){const r=e[n];if(typeof r!="object")throw new Error(`Properties specified for a hyperscript shorthand should be an object, but for the custom element <${n}> tag you passed: ${r}`);t[n]=(i,s,a)=>YB("element",mc(mc({},r),s),a)}return t},kE=yJ();var ab,g8;function wJ(){if(g8)return ab;g8=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r{if(Array.isArray(r))return r;if(i==="options")return{...n,...r}})}function Jt(e={}){let t,n;Gu(e)?(t={key:""},n=s=>e(s)):t=e;const r=t.key??"",i=Aa({key:r,__apiExtensions:[],__configuration:null,__extensions:n?[n]:[],__selectorExtensions:[],api:{},dependencies:[],editor:{},handlers:{},inject:{},node:{type:r},options:{},override:{},parser:{},parsers:{},plugins:[],priority:100,render:{},rules:{},shortcuts:{},inputRules:[],transforms:{}},e);return i.node.isLeaf&&!Pr(i.node.isDecoration)&&(i.node.isDecoration=!0),i.configure=s=>{const a={...i};return a.__configuration=o=>Gu(s)?s(o):s,Jt(a)},i.configurePlugin=(s,a)=>{const o={...i},l=u=>{let f=!1;const h=u.map(m=>{if(m.key===s.key)return f=!0,Jt({...m,__configuration:g=>Gu(a)?a(g):a});if(m.plugins&&m.plugins.length>0){const g=l(m.plugins);if(g.found)return f=!0,{...m,plugins:g.plugins}}return m});return{found:f,plugins:h}};return o.plugins=l(o.plugins).plugins,Jt(o)},i.extendEditorApi=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!1}],Jt(a)},i.extendSelectors=s=>{const a={...i};return a.__selectorExtensions=[...a.__selectorExtensions,s],Jt(a)},i.extendApi=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!0}],Jt(a)},i.extendEditorTransforms=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!1,isTransform:!0}],Jt(a)},i.extendTransforms=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!0,isTransform:!0}],Jt(a)},i.overrideEditor=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isOverride:!0,isPluginSpecific:!1,isTransform:!0}],Jt(a)},i.extend=s=>{let a={...i};return Gu(s)?a.__extensions=[...a.__extensions,s]:a=Aa(a,s),Jt(a)},i.clone=()=>Aa(i),i.extendPlugin=(s,a)=>{const o={...i},l=f=>{let h=!1;const m=f.map(g=>{if(g.key===s.key)return h=!0,Jt({...g,__extensions:[...g.__extensions,b=>Gu(a)?a(b):a]});if(g.plugins&&g.plugins.length>0){const b=l(g.plugins);if(b.found)return h=!0,{...g,plugins:b.plugins}}return g});return{found:h,plugins:m}},u=l(o.plugins);return o.plugins=u.plugins,u.found||o.plugins.push(Jt({key:s.key,__extensions:[f=>Gu(a)?a(f):a]})),Jt(o)},i.withComponent=s=>i.extend({node:{component:s},render:{node:s}}),i}function Wn(e={}){return Jt(e)}function pn(e,t){const n=e.getPlugin(t);return{api:e.api,editor:e,plugin:n,setOption:((r,i)=>e.setOption(n,r,i)),setOptions:(r=>e.setOptions(n,r)),tf:e.transforms,type:n.node.type,getOption:(r,...i)=>e.getOption(n,r,...i),getOptions:()=>e.getOptions(n)}}const B8=e=>{if(e===void 0)return[];if(Array.isArray(e))return[...e];throw new Error("inputRules config must be an array of explicit rule instances.")},XB=(e,t)=>{let n=Aa({},t);if(n.__resolved=!0,n.__configuration){const{inputRules:s,...a}=n.__configuration(pn(e,n));if(s!==void 0){const o=B8(s);n.__configuredInputRules=[...B8(n.__configuredInputRules),...o]}n=Aa(n,a),n.__configuration=void 0}if(n.__extensions&&n.__extensions.length>0){for(const s of n.__extensions)n=Aa(n,s(pn(e,n)));n.__extensions=[]}const r=n.inject?.targetPluginToInject,i=n.inject?.targetPlugins;return r&&i&&i.length>0&&(n.inject=n.inject||{},n.inject.plugins=qi({},n.inject.plugins,Object.fromEntries(i.map(s=>[s,r({...pn(e,n),targetPlugin:s})])))),n.node?.component&&(n.render.node=n.node.component),n.render?.node&&(n.node.component=n.render.node),MJ(e,n),n},MJ=(e,t)=>{t.__extensions||e.api.debug.error(`Invalid plugin '${t.key}', you should use createSlatePlugin.`,"USE_CREATE_PLUGIN"),t.node.isElement&&t.node.isLeaf&&e.api.debug.error(`Plugin ${t.key} cannot be both an element and a leaf.`,"PLUGIN_NODE_TYPE")};function LJ(e,t){let n=t;const r=e.plugins[t.key];return r||(n.node||(n=Jt(n)),n.__resolved?n:XB(e,n))}function Bt(e,t){const n=e.getPlugin({key:t});return n.node.type??n.key??""}const zJ=(e,t)=>t.map(n=>e.getType(n)),ai=(e,t)=>e.meta.pluginCache.node.types[t],jJ=(e,t)=>t.map(n=>ai(e,n)??n).filter(Boolean),_i=(e,t)=>{const n=ai(e,t);return n?e.getPlugin({key:n}):null};const qJ=/\S+/,$J=(e,t)=>{const n=e.api.range("before",t);if(!n)return!0;const r=e.api.string(n);return r?!qJ.exec(r):!0},VJ=(e,{end:t="",start:n})=>{const{selection:r}=e;if(!r)return;let i=r.anchor;if(t&&(i=e.api.before(r,{matchString:t}),!i))return;const s=e.api.before(i,{afterMatch:!0,matchString:n,skipInvalid:!0});if(!s)return;const a=e.api.before(i,{matchString:n,skipInvalid:!0});if(a&&$J(e,a))return{afterStartMatchPoint:s,beforeEndMatchPoint:i,beforeStartMatchPoint:a}},UJ=e=>({enabled:e.enabled,priority:e.priority,target:"insertText",trigger:e.trigger,resolve:({editor:t,text:n})=>{if(n!==e.trigger||!t.selection||!t.api.isCollapsed())return;const r=VJ(t,{end:e.end,start:e.start});if(!r)return;const i={anchor:r.afterStartMatchPoint,focus:r.beforeEndMatchPoint},s=t.api.string(i);if(!(e.trim!=="allow"&&s.trim()!==s))return{...r,end:e.end}},apply:({editor:t,pluginKey:n},r)=>{const i=e.marks?[...e.marks]:[e.mark??n];return r.beforeEndMatchPoint!==t.selection?.anchor&&t.tf.delete({at:{anchor:r.beforeEndMatchPoint,focus:t.selection.anchor}}),t.tf.select({anchor:r.afterStartMatchPoint,focus:r.beforeEndMatchPoint}),i.forEach(s=>{t.tf.addMark(t.getType(s),!0)}),t.tf.collapse({edge:"end"}),t.tf.removeMarks(i.map(s=>t.getType(s)),{shouldChange:!1}),t.tf.delete({at:{anchor:r.beforeStartMatchPoint,focus:r.afterStartMatchPoint}}),!0}}),HJ=(e,t)=>{if(!e.isCollapsed)return;const n=typeof t.match=="function"?t.match(e):t.match;if(!n)return;const r=e.getBlockStartRange(),i=e.getBlockStartText();if(!r||i===void 0)return;const s={range:r,text:i};if(typeof n=="string"){if(i!==n)return;if(t.resolveMatch){const o=t.resolveMatch({match:n,range:r,text:i});return o===void 0?void 0:{...s,...o}}return s}const a=i.match(n);if(a){if(t.resolveMatch){const o=t.resolveMatch({match:a,range:r,text:i});return o===void 0?void 0:{...s,...o}}return s}},WJ=e=>({enabled:e.enabled,priority:e.priority,target:"insertText",trigger:e.trigger,resolve:t=>HJ(t,e),apply:(t,n)=>{if(e.apply)return e.apply(t,n);const{editor:r,pluginKey:i}=t,s=n;e.removeMatchedText!==!1&&r.tf.delete({at:s.range});const a=r.getType(e.node??i);return e.mode==="wrap"?(r.tf.toggleBlock(a,{wrap:!0}),!0):e.mode==="toggle"?(r.tf.toggleBlock(a),!0):(r.tf.setNodes({type:a},{match:o=>r.api.isBlock(o)}),!0)}}),P8=(e,t)=>{const{editor:n}=e,{selection:r}=n;if(!e.isCollapsed||!r)return;const i=e.getBlockEntry();if(!i)return;const[s,a]=i,o=n.api.end(a);if(t.block&&s.type!==n.getType(t.block)||!o||!n.api.isEnd(r.focus,a))return;const l=e.getBlockStartRange(),u=e.getBlockStartText();if(!(!l||u===void 0||u!==t.fence))return t.resolveMatch?t.resolveMatch({fence:t.fence,path:a,range:l,text:u}):{path:a,range:l,text:u}};function KJ(e){if(e.on==="break")return{priority:e.priority,target:"insertBreak",enabled:e.enabled,resolve:n=>P8(n,{block:e.block,fence:e.fence,resolveMatch:e.resolveMatch}),apply:e.apply};const t=e.fence.at(-1);if(!t)throw new Error("createBlockFenceInputRule requires a non-empty fence.");return{priority:e.priority,target:"insertText",enabled:e.enabled,trigger:t,resolve:n=>{if(n.text===t)return P8(n,{block:e.block,fence:e.fence.slice(0,-t.length),resolveMatch:e.resolveMatch})},apply:e.apply}}const GJ=()=>({blockFence:e=>KJ(e),blockStart:e=>WJ(e),insertBreak:e=>e,insertData:e=>e,insertText:e=>e,mark:e=>UJ(e)}),YJ=(e,t=[],n=wY)=>{e.plugins={},e.meta.pluginList=[],e.meta.inputRules={insertBreak:[],insertData:[],insertText:{all:[],byTrigger:{}},plugins:{}},e.meta.shortcuts={},e.meta.components={},e.meta.pluginCache={decorate:[],handlers:{onChange:[],onNodeChange:[],onTextChange:[]},inject:{nodeProps:[]},node:{isContainer:[],isLeaf:[],isMetadataProp:[],isText:[],leafProps:[],textProps:[],types:{}},transformInitialValue:[],render:{aboveEditable:[],aboveNodes:[],aboveSlate:[],afterContainer:[],afterEditable:[],beforeContainer:[],beforeEditable:[],belowNodes:[],belowRootNodes:[]},rules:{match:[]},useHooks:[]};const r=nX(e,t);return rX(e,r),iX(e),JJ(e,n),e.meta.pluginList.forEach(i=>{i.extendEditor&&(e=i.extendEditor(pn(e,i)),oE(e)),XJ(e,i),i.node?.isContainer&&e.meta.pluginCache.node.isContainer.push(i.key),i.node?.isMetadataProp&&e.meta.pluginCache.node.isMetadataProp.push(i.key),e.meta.pluginCache.node.types[i.node.type]=i.key,i.inject?.nodeProps&&e.meta.pluginCache.inject.nodeProps.push(i.key),i.render?.node&&(e.meta.components[i.key]=i.render.node),i.node?.isLeaf&&(i.node?.isDecoration===!0||i.render.leaf)&&e.meta.pluginCache.node.isLeaf.push(i.key),i.node.isLeaf&&i.node.isDecoration===!1&&e.meta.pluginCache.node.isText.push(i.key),i.node?.leafProps&&e.meta.pluginCache.node.leafProps.push(i.key),i.node.textProps&&e.meta.pluginCache.node.textProps.push(i.key),i.render.aboveEditable&&e.meta.pluginCache.render.aboveEditable.push(i.key),i.render.aboveSlate&&e.meta.pluginCache.render.aboveSlate.push(i.key),i.render.afterEditable&&e.meta.pluginCache.render.afterEditable.push(i.key),i.render.beforeEditable&&e.meta.pluginCache.render.beforeEditable.push(i.key),i.rules?.match&&e.meta.pluginCache.rules.match.push(i.key),i.render.afterContainer&&e.meta.pluginCache.render.afterContainer.push(i.key),i.render.beforeContainer&&e.meta.pluginCache.render.beforeContainer.push(i.key),i.render.belowRootNodes&&e.meta.pluginCache.render.belowRootNodes.push(i.key),(i.transformInitialValue||i.normalizeInitialValue)&&e.meta.pluginCache.transformInitialValue.push(i.key),i.decorate&&e.meta.pluginCache.decorate.push(i.key),i.render.aboveNodes&&e.meta.pluginCache.render.aboveNodes.push(i.key),i.render.belowNodes&&e.meta.pluginCache.render.belowNodes.push(i.key),i.useHooks&&e.meta.pluginCache.useHooks.push(i.key),i.handlers?.onChange&&e.meta.pluginCache.handlers.onChange.push(i.key),i.handlers?.onNodeChange&&e.meta.pluginCache.handlers.onNodeChange.push(i.key),i.handlers?.onTextChange&&e.meta.pluginCache.handlers.onTextChange.push(i.key)}),QJ(e),ZJ(e),eX(e),e},JJ=(e,t)=>{e.meta.pluginList.forEach(n=>{let r=t(n.options,{mutative:!0,name:n.key});n.__selectorExtensions&&n.__selectorExtensions.length>0&&n.__selectorExtensions.forEach(i=>{const s=i(pn(e,n));r=r.extendSelectors(()=>s)}),n.optionsStore=r})},XJ=(e,t)=>{Object.entries(t.api).forEach(([n,r])=>{e.api[n]=r}),t.__apiExtensions&&t.__apiExtensions.length>0&&(t.__apiExtensions.forEach(({extension:n,isOverride:r,isPluginSpecific:i,isTransform:s})=>{const a=n(pn(e,t));r?(a.api&&(qi(e.api,a.api),qi(t.api,a.api),J7(e,e.api)),a.transforms&&(qi(e.transforms,a.transforms),qi(t.transforms,a.transforms),Y7(e,a.transforms))):s?i?(e.transforms[t.key]||(e.transforms[t.key]={}),t.transforms[t.key]||(t.transforms[t.key]={}),qi(e.transforms[t.key],a),qi(t.transforms[t.key],a)):(qi(e.transforms,a),qi(t.transforms,a),Y7(e,a)):i?(e.api[t.key]||(e.api[t.key]={}),t.api[t.key]||(t.api[t.key]={}),qi(e.api[t.key],a),qi(t.api[t.key],a)):(qi(e.api,a),qi(t.api,a),J7(e,e.api))}),t.__apiExtensions=void 0)},QJ=e=>{e.meta.shortcuts={},e.meta.pluginList.forEach(t=>{Object.entries(t.shortcuts).forEach(([n,r])=>{const i=`${t.key}.${n}`;if(r===null)delete e.meta.shortcuts[i];else if(r&&typeof r=="object"){const s={...r};if(!s.handler){const a=t.transforms?.[t.key],o=t.api?.[t.key];a?.[n]?s.handler=()=>a[n]():o?.[n]&&(s.handler=()=>o[n]())}s.priority=s.priority??t.priority,e.meta.shortcuts[i]=s}})})},ZJ=e=>{const t={insertBreak:[],insertData:[],insertText:{all:[],byTrigger:{}},plugins:{}};e.meta.pluginList.forEach((r,i)=>{const s=r.key,a=r.inputRules,o=typeof a=="function"?a({rule:GJ()}):a??[],l=r.__configuredInputRules??[],u=[...o,...l];t.plugins[s]={rules:[]},u.forEach((f,h)=>{if(!f)return;const m=Aa({},f),g={...m,id:`${s}.${h}`,pluginIndex:i,pluginKey:s,priority:m.priority??r.priority,ruleIndex:h};if(t.plugins[s].rules.push(g),g.target==="insertText"){const b=Array.isArray(g.trigger)?[...g.trigger]:[g.trigger];t.insertText.all.push(g),b.forEach(x=>{t.insertText.byTrigger[x]||(t.insertText.byTrigger[x]=[]),t.insertText.byTrigger[x].push(g)})}else g.target==="insertBreak"?t.insertBreak.push(g):g.target==="insertData"&&t.insertData.push(g)})});const n=(r,i)=>i.priority!==r.priority?i.priority-r.priority:r.pluginIndex!==i.pluginIndex?r.pluginIndex-i.pluginIndex:r.ruleIndex-i.ruleIndex;t.insertBreak.sort(n),t.insertData.sort(n),t.insertText.all.sort(n),Object.values(t.insertText.byTrigger).forEach(r=>{r.sort(n)}),e.meta.inputRules=t},eX=e=>{const t=!!e.plugins.autoformat,n=e.meta.inputRules.insertBreak.length>0||e.meta.inputRules.insertData.length>0||e.meta.inputRules.insertText.all.length>0;if(t&&n)throw new Error(["AutoformatPlugin cannot be used with plugin-owned input rules.","Remove AutoformatPlugin from your editor plugins.","Enable inputRules on the feature plugins you use instead."].join(" "))},tX=(e,t)=>{const n=new Map,r=i=>{const s=XB(e,i);if(s.key){const a=n.get(s.key);a?n.set(s.key,Aa(a,s)):n.set(s.key,s)}s.plugins&&s.plugins.length>0&&s.plugins.forEach(r)};return t.forEach(r),n},nX=(e,t)=>{const n=tX(e,t),r=Array.from(n.values()).filter(o=>o.enabled!==!1);r.sort((o,l)=>l.priority-o.priority);const i=[],s=new Set,a=o=>{s.has(o.key)||(s.add(o.key),o.dependencies?.forEach(l=>{const u=n.get(l);u?a(u):e.api.debug.warn(`Plugin "${o.key}" depends on missing plugin "${l}"`,"PLUGIN_DEPENDENCY_MISSING")}),i.push(o))};return r.forEach(a),i},rX=(e,t)=>{e.meta.pluginList=t,e.plugins=Object.fromEntries(t.map(n=>[n.key,n]))},iX=e=>{const t=n=>{let r=[...n];const i={},s={},a={};for(const o of n)o.override.enabled&&Object.assign(i,o.override.enabled),o.override.components&&Object.entries(o.override.components).forEach(([l,u])=>{(!s[l]||o.priority>s[l].priority)&&(s[l]={component:u,priority:o.priority})}),o.override.plugins&&Object.entries(o.override.plugins).forEach(([l,u])=>{a[l]=Aa(a[l],u),u.enabled!==void 0&&(i[l]=u.enabled)});return r=r.map(o=>{let l={...o};a[o.key]&&(l=Aa(l,a[o.key])),s[o.key]&&(!o.render.node&&!o.node.component||s[o.key].priority>o.priority)&&(l.render.node=s[o.key].component,l.node.component=s[o.key].component);const u=i[o.key]??l.enabled;return Pr(u)&&(l.enabled=u),l}),r.filter(o=>o.enabled!==!1).map(o=>({...o,plugins:t(o.plugins||[])}))};e.meta.pluginList=t(e.meta.pluginList),e.plugins=Object.fromEntries(e.meta.pluginList.map(n=>[n.key,n]))},sX=Jt({key:"ast",parser:{format:"application/x-slate-fragment",deserialize:({data:e})=>{const t=decodeURIComponent(window.atob(e));let n;try{n=JSON.parse(t)}catch{}return n}}}),aX=({editor:e})=>vG(e),oX=Jt({key:"history",extendEditor:aX}),H0=Jt({key:"p",node:{isElement:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"P"}],query:({element:e})=>e.style.fontFamily!=="Consolas"}}},rules:{merge:{removeEmpty:!0}}}),lX=e=>{const{editor:t,tf:{insertBreak:n}}=e,r=(s,a,o)=>{const l=t.meta.pluginCache.rules.match;for(const u of l){const f=t.getPlugin({key:u});if(f.rules?.break&&f.rules?.match?.({...e,node:a,path:o,rule:s}))return f}return null},i=(s,a,o)=>s==="reset"?(t.tf.resetBlock({at:a}),!0):s==="exit"?(t.tf.insertExitBreak(),!0):s==="deleteExit"?(t.tf.deleteBackward("character"),t.tf.insertExitBreak(),!0):s==="lineBreak"?(t.tf.insertSoftBreak(),!0):s==="lift"&&o?!!t.tf.liftBlock({at:a,match:{type:o}}):!1;return{transforms:{insertBreak(){if(t.selection){const s=t.api.block();if(s){const[a,o]=s,l=_i(t,a.type)?.rules.break;if(t.api.isCollapsed()&&t.api.isEmpty(t.selection,{block:!0})){const m=r("break.empty",a,o),g=(m?.rules.break??l)?.empty,b=m?.node.type;if(i(g,o,b))return}if(t.api.isCollapsed()&&!t.api.isEmpty(t.selection,{block:!0})&&t.api.isAt({end:!0})){const m=t.api.range("before",t.selection);if(m&&t.api.string(m)===` -`){const g=r("break.emptyLineEnd",a,o),b=(g?.rules.break??l)?.emptyLineEnd,x=g?.node.type;if(i(b,o,x))return}}const u=r("break.default",a,o),f=(u?.rules.break??l)?.default,h=u?.node.type;if(i(f,o,h))return;if((r("break.splitReset",a,o)?.rules.break?.splitReset??l?.splitReset)&&!t.api.isAt({blocks:!0})){const m=t.api.isAt({start:!0});n(),t.tf.resetBlock({at:m?o:Ye.next(o)});return}}}n()}}}},uX=e=>{const{editor:t,tf:{deleteBackward:n,deleteForward:r,deleteFragment:i}}=e,s=()=>{t.api.isAt({start:!0})&&t.tf.removeMarks()},a=(l,u,f)=>{const h=t.meta.pluginCache.rules.match;for(const m of h){const g=t.getPlugin({key:m});if(g.rules?.delete&&g.rules?.match?.({...e,node:u,path:f,rule:l}))return g}return null},o=(l,u,f)=>l==="reset"?(t.tf.resetBlock({at:u}),!0):l==="lift"&&f?!!t.tf.liftBlock({at:u,match:{type:f}}):!1;return{transforms:{deleteBackward(l){if(t.selection&&t.api.isCollapsed()){const u=t.api.block();if(u){const[f,h]=u,m=_i(t,f.type)?.rules.delete;if(t.api.isAt({start:!0})){const g=a("delete.start",f,h),b=(g?.rules.delete??m)?.start,x=g?.node.type;if(o(b,h,x))return}if(t.api.isEmpty(t.selection,{block:!0})){const g=a("delete.empty",f,h),b=(g?.rules.delete??m)?.empty,x=g?.node.type;if(o(b,h,x))return}}if(fo.equals(t.selection.anchor,t.api.start([]))){t.tf.resetBlock({at:[0]});return}}n(l),s()},deleteForward(l){r(l),s()},deleteFragment(l){if(t.selection&&dn.equals(t.selection,t.api.range([]))){t.tf.reset({children:!0,select:!0});return}i(l),s()}}}},cX=e=>{const{editor:t,tf:{removeNodes:n}}=e,r=(i,s,a)=>{const o=t.meta.pluginCache.rules.match;for(const l of o){const u=t.getPlugin({key:l});if(u.rules.merge&&u.rules?.match?.({...e,node:s,path:a,rule:i}))return u.rules.merge}return null};return{api:{shouldMergeNodes(i,s,{reverse:a}={}){const[o,l]=i,[,u]=s,[f,h]=a?i:s,[m,g]=a?s:i;if(Pn.isText(o)&&o.text===""&&l.at(-1)!==0)return t.tf.removeNodes({at:l}),!1;const b=(x,E)=>{const C=_i(t,x.type);return C?!(!C.rules.merge?.removeEmpty||r("merge.removeEmpty",x,E)?.removeEmpty===!1):!0};return Rt.isElement(m)&&t.api.isVoid(m)?(b(m,g)?t.tf.removeNodes({at:l}):Rt.isElement(f)&&t.api.isEmpty(f)&&t.tf.removeNodes({at:h}),!1):Rt.isElement(o)&&t.api.isEmpty(o)&&Ye.isSibling(l,u)&&b(o,l)?(t.tf.removeNodes({at:l}),!1):!0}},transforms:{removeNodes(i={}){if(i.event?.type==="mergeNodes"&&i.at){const s=t.api.node(i.at);if(s){const[a,o]=s;if(Rt.isElement(a)){const l=_i(t,a.type);if(l){const u=l.rules.merge;if(r("merge.removeEmpty",a,o)?.removeEmpty===!1||u?.removeEmpty===!1)return}}}}n(i)}}}},fX=e=>{const{editor:t,tf:{normalizeNode:n}}=e,r=(i,s,a)=>{const o=t.meta.pluginCache.rules.match;for(const l of o){const u=t.getPlugin({key:l});if(u.rules?.normalize&&u.rules?.match?.({...e,node:s,path:a,rule:i}))return u.rules.normalize}return null};return{transforms:{normalizeNode([i,s]){if(Rt.isElement(i)&&i.type){const a=_i(t,i.type)?.rules.normalize;if((r("normalize.removeEmpty",i,s)||a)?.removeEmpty&&t.api.isEmpty(i)){t.tf.removeNodes({at:s});return}}n([i,s])}}}},dX=({api:{isInline:e,isSelectable:t,isVoid:n,markableVoid:r},editor:i})=>({api:{create:{block:s=>({children:[{text:""}],type:i.getType(H0.key),...s})},isInline(s){return _i(i,s.type)?.node.isInline?!0:e(s)},isSelectable(s){return _i(i,s.type)?.node.isSelectable===!1?!1:t(s)},isVoid(s){return _i(i,s.type)?.node.isVoid?!0:n(s)},markableVoid(s){return _i(i,s.type)?.node.isMarkableVoid?!0:r(s)}}}),hX=Jt({key:"override"}).overrideEditor(dX).overrideEditor(lX).overrideEditor(uX).overrideEditor(cX).overrideEditor(fX),pX=(e,t,{fragment:n,...r})=>{e.tf.withoutNormalizing(()=>{t.some(i=>i.parser?.preInsert?.({...pn(e,i),fragment:n,...r})===!0),e.tf.insertFragment(n)})},mX=(e,t,{data:n,...r})=>(t.forEach(i=>{const s=i.parser?.transformData;s&&(n=s({...pn(e,i),data:n,...r}))}),n),gX=(e,t,{fragment:n,...r})=>(t.forEach(i=>{const s=i.parser?.transformFragment;s&&(n=s({fragment:n,...r,...pn(e,i)}))}),n),QB=({apply:e,node:t,path:n=[],query:r,source:i})=>{eu([t,n],r)&&(typeof i=="function"?e(t,i()):e(t,i)),dt.isAncestor(t)&&t.children.forEach((s,a)=>{QB({apply:e,node:s,path:n.concat([a]),query:r,source:i})})},ZB=e=>e.dataset.slateVoid==="true",vX=e=>e.dataset.slateNode==="element",yX=e=>e.dataset.slateNode==="text",xX=e=>e.dataset.slateString==="true",eP=e=>e.dataset.slateLeaf==="true",wp=e=>eP(e)||vX(e)||ZB(e)||xX(e)||yX(e),bX=(e,t)=>e.classList.contains(`slate-${t}`),Ep=(e,t)=>(n,r)=>{const{inject:{excludeBelowPlugins:i,excludePlugins:s,isBlock:a,isElement:o,isLeaf:l,maxLevel:u,targetPlugins:f}}=t,h=Rt.isElement(n)?n:void 0;if(o&&!h||a&&(!h||!e.api.isBlock(h))||l&&h||h?.type&&(s?.includes(ai(e,h.type))||f&&!f.includes(ai(e,h.type))))return!1;if(i||u){if(!r||u&&r.length>u)return!1;if(i){const m=jJ(e,i);if(e.api.above({at:r,match:g=>Rt.isElement(g)&&m.includes(g.type)}))return!1}}return!0},DE=(e,t)=>{const n=[];return[...e.meta.pluginList].reverse().forEach(r=>{const i=r.inject.plugins?.[t.key];i&&n.push(i)}),[t,...n]},wX=e=>Object.keys(e).filter(t=>typeof e[t]!="object"&&(!Pn.isText(e)||t!=="text")).map(t=>tP(t)),tP=e=>`data-slate-${HB(e)}`,nP=({attributes:e,node:t,plugin:n,props:r})=>{const i={...r,attributes:{...r.attributes}};if(n?.node.props){const s=(typeof n.node.props=="function"?n.node.props(i):n.node.props)??{};i.attributes={...i.attributes,...s}}return e&&n&&(i.attributes={...i.attributes,...$Y(e,...n.node.dangerouslyAllowAttributes??[],[...t?wX(t):[]])}),Object.keys(i.attributes).forEach(s=>{i.attributes?.[s]===void 0&&delete i.attributes?.[s]}),i},al=e=>e?`slate-${e}`:"",EX=e=>{QB({...e,apply:qi})},gh=e=>{if(!e.api.isCollapsed())return null;const t=e.selection.anchor,n=e.api.range(t.path);if(!n)return null;const r=e.api.isStart(t,n)?"start":e.api.isEnd(t,n)?"end":null;if(!r)return null;const i=dt.parent(e,t.path)??null,s=(()=>{if(!i||!Rt.isElement(i))return!1;const f=_i(e,i.type)?.rules.selection?.affinity;return f==="hard"||f==="directional"})(),a=s?[i,Ye.parent(t.path)]:[dt.get(e,t.path),t.path];if(r==="start"&&t.path.at(-1)===0&&!s)return[null,a];const o=r==="end"?oe.next(a[1]):oe.previous(a[1]),l=dt.get(e,o),u=l?[l,o]:null;return r==="end"?[a,u]:[u,a]},CX=(e,t)=>{const{marks:n,selection:r}=e;if(!r)return;const i=u=>n&&HY(dt.extractProps(u),n)&&Object.keys(n).length>1,[s,a]=t;if(!s||!a){const u=s||a;return!n||i(u[0])?u===s?"backward":"forward":void 0}const o=n&&(s&&i(s[0])?"backward":a&&i(a[0])?"forward":null),l=r.anchor.offset===0?"forward":"backward";return l==="backward"&&o==="forward"||$f&&l==="forward"&&o!=="backward"?"forward":"backward"},R8=(e,t,n)=>{const r=Object.keys(dt.extractProps(t));return(Rt.isElement(t)?[t.type]:r).some(i=>_i(e,i)?.rules.selection?.affinity===n)},Eb=(e,t,n)=>{const[r,i]=t;return r&&R8(e,r[0],n)||i&&R8(e,i[0],n)},Cb=(e,t,n)=>{const r=o=>{e.marks=o,e.api.onChange()},i=o=>{e.tf.setSelection({anchor:o,focus:o})},[s,a]=t;if(n==="backward"){if(s===null){r({});return}const o=e.api.end(s[1]);if(o&&i(o),Rt.isElement(s[0]))return;r(null);return}if(s===null){r(null);return}if(a===null){r({});return}i(e.api.end(s[1])),!Rt.isElement(a[0])&&r(dt.extractProps(a[0]))},kX=Wn({key:"affinity"}).overrideEditor(({editor:e,tf:{deleteBackward:t,insertText:n,move:r}})=>({transforms:{deleteBackward:i=>{(()=>{if(i==="character"&&e.api.isCollapsed()){const[a]=gh(e)??[null],o=a&&(Pn.isText(a[0])?a[0].text:dt.string(a[0]));t(i);const l=gh(e);return l&&Eb(e,l,"directional")&&!F8(l)&&Cb(e,l,o&&o.length>1?"backward":"forward"),!0}})()||t(i)},insertText(i,s){return(()=>{if(!e.selection||e.api.isExpanded())return;const o=e.selection.focus.path,l=dt.get(e,o);if(!l)return;const u=Object.keys(dt.extractProps(l)).filter(g=>_i(e,g)?.rules.selection?.affinity==="outward");if(!u.length||!e.api.isEnd(e.selection.focus,o))return;const f=e.api.start(o,{next:!0}),h=[];let m=null;if(f){const g=f.path;m=dt.get(e,g)||null}for(const g of u)l[g]&&(m?.[g]||h.push(g));h.length>0&&e.tf.removeMarks(h)})(),n(i,s)},move:i=>{(()=>{const{distance:a=1,reverse:o=!1,unit:l="character"}=i||{};if(l==="character"&&a===1&&e.api.isCollapsed()){const u=gh(e);if(u&&Eb(e,u,"hard"))return u&&u[o?0:1]===null&&CX(e,u)===(o?"forward":"backward")?(Cb(e,u,o?"backward":"forward"),!0):(r({...i,unit:"offset"}),!0);r(i);const f=gh(e);return f&&Eb(e,f,"directional")&&!F8(f)&&Cb(e,f,o?"forward":"backward"),!0}})()||r(i)}}})),F8=e=>{const[t,n]=e;return t&&Rt.isElement(t[0])||n&&Rt.isElement(n[0])},DX=({editor:e,getOptions:t})=>{const{chunkSize:n,query:r}=t();return e.getChunkSize=i=>r(i)?n:null,{}},rP=Wn({key:"chunking",options:{chunkSize:1e3,contentVisibilityAuto:!0,query:dt.isEditor}}).overrideEditor(DX),SX=Wn({key:"debug",options:{isProduction:!0,logger:{error:(e,t,n)=>console.error(`${t?`[${t}] `:""}${e}`,n),info:(e,t,n)=>console.info(`${t?`[${t}] `:""}${e}`,n),log:(e,t,n)=>console.log(`${t?`[${t}] `:""}${e}`,n),warn:(e,t,n)=>console.warn(`${t?`[${t}] `:""}${e}`,n)},logLevel:"error",throwErrors:!0}}).extendEditorApi(({getOptions:e})=>{const t=(n,r,i,s)=>{};return{debug:{error:(n,r,i)=>t(),info:(n,r,i)=>t(),log:(n,r,i)=>t(),warn:(n,r,i)=>t()}}}),_X=(e,t,n)=>{const r=e.getOptions(gc),i=Yh.get(e)??!1;if(n){const s=typeof n.scrollOptions=="object"&&n.scrollOptions?{...typeof r.scrollOptions=="object"?r.scrollOptions:{},...sb(n.scrollOptions,Zx)}:n.scrollOptions??r.scrollOptions,a={...r,scrollOperations:{...r.scrollOperations,...sb(n.operations??{},Zx)},scrollOptions:s,...sb({scrollMode:n.mode},Zx)};e.setOptions(gc,a)}Yh.set(e,!0);try{t()}finally{Yh.set(e,i),e.setOptions(gc,r)}},Yh=new WeakMap,gc=Wn({key:"dom",options:{scrollMode:"last",scrollOperations:{insert_node:!0,insert_text:!0},scrollOptions:{scrollMode:"if-needed"}}}).extendEditorApi(({editor:e})=>({isScrolling:()=>Yh.get(e)??!1})).extendEditorTransforms(({editor:e})=>({withScrolling:Ce(_X,e)})).overrideEditor(({api:e,editor:t,getOption:n,tf:{apply:r}})=>({transforms:{apply(i){if(e.isScrolling()){r(i);const s=n("scrollOperations");if(!s[i.type])return;const a=t.operations.filter(m=>!!s[m.type]);if(a.length===0)return;const o=n("scrollMode")==="first"?a[0]:a.at(-1);if(!o)return;const{offset:l,path:u}=o.path?o:{};if(!u)return;const f=n("scrollOptions"),h={offset:l??0,path:u};e.scrollIntoView(h,f);return}return r(i)}}})).overrideEditor(({editor:e,tf:{apply:t}})=>({transforms:{apply(n){if(n.type==="set_selection"){const{properties:r}=n;e.dom.prevSelection=r,t(n),e.dom.currentKeyboardEvent=null;return}t(n)}}})),W0=e=>e.nodeType===Node.ELEMENT_NODE,iP=e=>e.nodeType===Node.TEXT_NODE,AX=new Set(["A","ABBR","ACRONYM","B","BDI","BDO","BIG","BR","BUTTON","CANVAS","CITE","CODE","CONTENT","DATA","DEL","DFN","EM","EMBED","FONT","I","IFRAME","IMG","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","MARQUEE","math","MENUITEM","METER","NOBR","OBJECT","OUTPUT","PICTURE","PORTAL","PROGRESS","Q","S","SAMP","SELECT","SHADOW","SMALL","SOURCE","SPAN","STRIKE","STRONG","SUB","SUP","svg","TEXTAREA","TIME","TRACK","TT","U","VAR","VIDEO","WBR"]),SE=e=>{if(!W0(e))return!1;const t=e,n=AX.has(t.tagName),r=t.style.display.split(" ")[0];return r===""?n:r.startsWith("inline")?!0:r==="inherit"&&t.parentElement?SE(t.parentElement):["contents","initial","none","revert","revert-layer","unset"].includes(r)?n:!1},Pw=e=>W0(e)?!SE(e):!1,TX=/^\s+/,NX=/\n$/,OX=(e,{shouldCollapseWhiteSpace:t=!0,trimEnd:n="collapse",trimStart:r="collapse",whiteSpaceIncludesNewlines:i=!0}={})=>{let s=e;return r==="all"&&(s=s.replace(TX,"")),n==="single-newline"&&(s=s.replace(NX,"")),t&&(i?s=s.replaceAll(/\s+/g," "):(s=s.replaceAll(/[^\S\n\r]+/g," "),s=s.replaceAll(/^[^\S\n\r]+/gm,""),s=s.replaceAll(/[^\S\n\r]+$/gm,""))),s},BX=e=>{let t=e;for(;;){if(t.nextSibling)t=t.nextSibling;else{if(t=t.parentElement,t&&Pw(t))return!0;t=t?.nextSibling||null}if(!t||Pw(t))return!0;if((t.textContent||"").length>0)return!1}},PX=e=>{e.inlineFormattingContext?e.inlineFormattingContext.atStart=!1:e.inlineFormattingContext={atStart:!0,lastHasTrailingWhiteSpace:!1}},I8=e=>{e.inlineFormattingContext=null},RX=(e,t)=>{const n=e.textContent||"",r=n.trim()==="";(t.inlineFormattingContext||!r)&&PX(t);const{whiteSpaceRule:i}=t,s=i!=="normal"?"collapse":!t.inlineFormattingContext||t.inlineFormattingContext.atStart||t.inlineFormattingContext.lastHasTrailingWhiteSpace?"all":"collapse",a=i==="normal"?"collapse":BX(e)?"single-newline":"collapse",o={normal:!0,pre:!1,"pre-line":!0}[i],l=OX(n||"",{shouldCollapseWhiteSpace:o,trimEnd:a,trimStart:s,whiteSpaceIncludesNewlines:i!=="pre-line"});t.inlineFormattingContext&&o&&(t.inlineFormattingContext.lastHasTrailingWhiteSpace=l.endsWith(" ")),e.textContent=l},FX=(e,t)=>{if(W0(e)){aP(e,t);return}if(iP(e)){RX(e,t);return}sP(e,t)},sP=(e,t)=>{const n=Array.from(e.childNodes);for(const r of n)FX(r,t)},IX=e=>{const t=e.style.whiteSpace;switch(t){case"break-spaces":case"pre":case"pre-wrap":return"pre";case"normal":case"nowrap":return"normal";case"pre-line":return"pre-line"}return e.tagName==="PRE"?"pre":t==="initial"?"normal":null},aP=(e,t)=>{const n=SE(e),r=t.whiteSpaceRule,i=IX(e);i&&(t.whiteSpaceRule=i),n||I8(t),sP(e,t),n||I8(t),t.whiteSpaceRule=r},MX=e=>{const t=e.cloneNode(!0);return aP(t,{inlineFormattingContext:null,whiteSpaceRule:"normal"}),t},bm=(e,t,n=!1)=>Array.from(t.childNodes).flatMap(r=>r.nodeType===1&&!wp(r)&&n?bm(e,r,n):lP(e)(r)),LX=(e,t)=>{if(t.nodeName==="BODY")return kE("fragment",{},bm(e,t))},zX=e=>{if(e.nodeName==="BR")return` -`},jX=({element:e,type:t})=>{if(!bX(e,t)&&!eP(e))return;const n={};if(Object.entries(e.dataset).forEach(([r,i])=>{if(r.startsWith("slate")&&i&&!["slateInline","slateLeaf","slateNode","slateVoid"].includes(r)){const s=r.slice(5).charAt(0).toLowerCase()+r.slice(6);if(i===void 0)return;let a=i;i==="true"?a=!0:i==="false"?a=!1:Number.isNaN(Number(i))||(a=Number(i)),n[s]=a}}),Object.keys(n).length>0)return n},qX=({editor:e,element:t,plugin:n})=>{const r=n.parsers.html?.deserializer?.toNodeProps,i=n.parsers.html?.deserializer?.disableDefaultNodeProps??!1?{}:jX({...pn(e,n),element:t});if(!r)return i;const s=r({...pn(e,n),element:t})??{};return{...i,...s}},$X=e=>{let t=e.parsers?.html?.deserializer;const n=t?.rules??[],r=n.some(i=>i.validClassName?.includes(`slate-${e.key}`))?n:[{validClassName:`slate-${e.key}`,validNodeName:"*"},...n];return t||(t={rules:r}),t.rules=r,t},oP=(e,t,{deserializeLeaf:n,element:r})=>{const{node:{isElement:i,isLeaf:s}}=t,a=$X(t);if(!a)return;const{attributeNames:o,isElement:l,isLeaf:u,query:f,rules:h}=a;let{parse:m}=a;const g=l||i,b=u||s;if(!n&&!g||n&&!b||h&&!h.some(({validAttribute:y,validClassName:_,validNodeName:O="*",validStyle:S})=>{if(O){const w=oo(O);if(w.length>0&&!w.includes(r.nodeName)&&O!=="*")return!1}if(_&&!r.classList.contains(_))return!1;if(S)for(const[w,A]of Object.entries(S)){if(!oo(A).includes(r.style[w])&&A!=="*"||A==="*"&&!r.style[w])return!1;const T=t.inject.nodeProps?.defaultNodeValue;if(T&&T===r.style[w])return!1}if(y)if(typeof y=="string"){if(!r.getAttributeNames().includes(y))return!1}else for(const[w,A]of Object.entries(y)){const T=oo(A),P=r.getAttribute(w);if(!Pr(P)||!T.includes(P))return!1}return!0})||f&&!f({...pn(e,t),element:r}))return;if(!m)if(g)m=({type:y})=>({type:y});else if(b)m=({type:y})=>({[y]:!0});else return;const x=wp(r)?{}:m({...pn(e,t),element:r,node:{}})??{},E=qX({editor:e,element:r,plugin:t});let C={...x,...E};if(Object.keys(C).length!==0){if(DE(e,t).forEach(y=>{const _=y.parsers?.html?.deserializer?.parse?.({...pn(e,t),element:r,node:C});_&&!wp(r)&&(C={...C,..._})}),o){const y={},_=r.getAttributeNames();for(const O of _)o.includes(O)&&(y[O]=r.getAttribute(O));Object.keys(y).length>0&&(C.attributes=y)}return{...a,node:C}}},VX=(e,t)=>{let n;return[...e.meta.pluginList].reverse().some(r=>(n=oP(e,r,{element:t}),!!n)),n},UX=(e,t,n=!1)=>{const r=VX(e,t);if(r){const{node:i,withoutChildren:s}=r;let a=i.children??bm(e,t,n);return(a.length===0||s||ZB(t))&&(a=[{text:""}]),kE("element",i,a)}},HX=(e,t)=>{let n={};return[...e.meta.pluginList].reverse().forEach(r=>{const i=oP(e,r,{deserializeLeaf:!0,element:t});i&&(n={...n,...i.node})}),n},WX=(e,t)=>{const n=HX(e,t);return bm(e,t).reduce((r,i)=>{if(!i)return r;if(Rt.isElement(i))Object.keys(n).length>0&&EX({node:i,query:{filter:([s])=>Pn.isText(s)},source:n}),r.push(i);else{const s={...n};Pn.isText(i)&&i.text&&Object.keys(s).forEach(a=>{s[a]&&i[a]&&(s[a]=i[a])}),r.push(kE("text",s,i))}return r},[])},KX=e=>{if(iP(e))return e.parentElement?.dataset.platePreventDeserialization?"":e.textContent||""},GX=e=>{if(e.nodeName!=="BR"||e.className==="Apple-interchange-newline")return!1;const t=e.parentElement;return!(!t||t.tagName==="P"||t.tagName==="SPAN"||(()=>{let r=e.previousSibling;for(;r;){if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return!0;r=r.previousSibling}for(r=e.nextSibling;r;){if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return!0;r=r.nextSibling}return!1})())},lP=e=>t=>{const n=KX(t);if(n)return n;if(!W0(t))return null;if(GX(t))return{children:[{text:""}],type:e.getType("p")};if(t.nodeName==="BR"&&t.className==="Apple-interchange-newline")return null;const r=zX(t);if(r)return r;const i=LX(e,t);if(i)return i;const s=UX(e,t,wp(t));return s||WX(e,t)},YX=(e,t)=>lP(e)(t),uP=e=>new DOMParser().parseFromString(e,"text/html"),JX=e=>uP(e).body,XX=(e,{collapseWhiteSpace:t=!0,defaultElementPlugin:n,element:r})=>(typeof r=="string"&&(r=JX(r)),t&&(r=MX(r)),EQ(e,{defaultElementPlugin:n,descendants:YX(e,r)})),QX=Jt({key:"html"}).extendApi(({editor:e})=>({deserialize:Ce(XX,e)})).extend({parser:{format:"text/html",deserialize:({api:e,data:t})=>{const n=uP(t);return e.html.deserialize({element:n.body})}}}),M8=Wn({key:"length"}).overrideEditor(({editor:e,getOptions:t,tf:{apply:n}})=>{let r=!1,i=!1;const s=a=>{const o=e.selection?.focus;if(!o)return;const l=e.api.before(o,{distance:a,unit:"character"})??e.api.start([]);if(!l)return;if(Ye.equals(l.path,o.path)){e.tf.delete({at:{anchor:l,focus:o}});return}if(o.offset>0){e.tf.delete({at:{anchor:{offset:0,path:o.path},focus:o}});return}const u=e.api.block({at:o});if(u&&u[1].length===1&&e.api.isEmpty(u[0])){e.tf.removeNodes({at:u[1]});return}const f=e.api.previous({at:o,match:Pn.isText});f&&e.tf.select(e.api.end(f[1]))};return{transforms:{apply(a){e.tf.withoutNormalizing(()=>{n(a);const o=t();if(o.maxLength){if(r){i=!0;return}r=!0;try{do{i=!1;const l=e.api.string([]).length-o.maxLength;if(l<=0)return;s(l)}while(i)}finally{r=!1,i=!1}}})}}}}),cP="navigationFeedback",vc={key:cP},Rw=new WeakMap,L8=new WeakMap,ZX=["data-nav-cycle","data-nav-highlight","data-nav-pulse","data-nav-target"],fP=e=>{e?.pathRef.unref()},Cp=e=>{const t=e?.pathRef.current;if(!e||!t)return null;const{pathRef:n,...r}=e;return{...r,path:t}},dP=(e,t)=>{const n=dt.get(e,t.path);if(n)try{return e.api.toDOMNode(n)}catch{return}},hP=(e,t)=>{if(!t)return;const n=dP(e,t);if(n){for(const r of ZX)n.removeAttribute(r);n.style.removeProperty("--plate-nav-feedback-duration")}},eQ=(e,t)=>{const n=dP(e,t);n&&(n.setAttribute("data-nav-cycle",String(t.cycle)),n.setAttribute("data-nav-highlight",t.variant),n.setAttribute("data-nav-pulse",String(t.pulse)),n.setAttribute("data-nav-target","true"),n.style.setProperty("--plate-nav-feedback-duration",`${t.duration}ms`))},pP=e=>{const t=Rw.get(e);t&&(clearTimeout(t),Rw.delete(e))},tQ=e=>{const t=(L8.get(e)??0)+1;return L8.set(e,t),t},Jh=(e,t)=>{const n=e.getOption(vc,"activeTarget"),r=Cp(n);return!n||t!==void 0&&n.pulse!==t?!1:(pP(e),hP(e,r),fP(n),e.setOption(vc,"activeTarget",null),!0)},mP=(e,{duration:t,target:n,variant:r="navigated"})=>{if(!e.api.node(n.path))return!1;const i=tQ(e),s=t??e.getOption(vc,"duration")??800,a=e.getOption(vc,"activeTarget");pP(e),hP(e,Cp(a)),fP(a);const o=e.api.pathRef(n.path),l={cycle:i%2,duration:s,pathRef:o,pulse:i,type:n.type,variant:r};e.setOption(vc,"activeTarget",l),eQ(e,Cp(l)??{cycle:l.cycle,duration:l.duration,path:n.path,pulse:l.pulse,type:l.type,variant:l.variant});const u=setTimeout(()=>{Jh(e,i)},s);return Rw.set(e,u),!0},nQ=(e,{scrollTarget:t,select:n,target:r})=>t||(n&&"focus"in n&&n.focus?n.focus:n&&"anchor"in n&&n.anchor?n.anchor:n&&"path"in n?n:e.api.start(r.path)),rQ=(e,{flash:t,focus:n=!0,scroll:r=!0,scrollTarget:i,select:s,target:a})=>{if(!e.api.node(a.path))return!1;if(s&&("focus"in s?e.tf.select(s):e.tf.select({anchor:s,focus:s})),n&&e.tf.focus(),r){const o=nQ(e,{scrollTarget:i,select:s,target:a});o&&e.api.scrollIntoView(o)}return t!==!1&&mP(e,{duration:t?.duration,target:a,variant:t?.variant}),!0},gP=Wn({key:cP,options:{activeTarget:null,duration:1600}}).extendEditorApi(({editor:e})=>{const t=()=>{const n=e.getOption(vc,"activeTarget"),r=Cp(n);return!r&&n?(Jh(e),null):r};return{navigation:{activeTarget:t,clear:()=>Jh(e),isTarget:n=>{const r=t();return!!r&&Ye.equals(r.path,n)}}}}).extendEditorTransforms(({editor:e})=>({navigation:{clear:()=>Jh(e),flashTarget:t=>mP(e,t),navigate:t=>rQ(e,t)}})),z8=()=>globalThis.performance?.now()??Date.now(),iQ=({editor:e,getOptions:t,tf:{apply:n,insertNode:r,insertNodes:i}})=>{const s=()=>({[t().idKey??""]:t().idCreator()}),a=u=>{const{filter:f,filterText:h}=t();return f(u)&&(!h||u[0]?.type!==void 0)},o=({disableInsertOverrides:u,idKey:f,nodeEntry:h,query:m})=>{const g=new Set,b=x=>{const[E,C]=x;eu(x,m)&&(E[f]!==void 0&&g.add(E[f]),!u&&Pr(E._id)&&g.add(E._id));const y=E.children;y&&y.forEach((_,O)=>{b([_,[...C,O]])})};return b(h),g},l=({duplicateCandidateIds:u,idKey:f})=>{if(u.size===0)return new Set;const h=new Set,m=z8();let g=0;for(const[b]of dt.nodes(e)){g+=1;const x=b?.[f];if(!(x===void 0||!u.has(x))&&(h.add(x),h.size===u.size))break}return t().onDuplicateIdScan?.({candidateCount:u.size,duration:z8()-m,existingCount:h.size,visitedCount:g}),h};return{transforms:{apply(u){const{allow:f,disableInsertOverrides:h,exclude:m,idCreator:g,idKey:b="",reuseId:x}=t(),E={allow:f,exclude:m,filter:a};if(u.type==="insert_node"){const C=Ds(u.node),y=l({duplicateCandidateIds:o({disableInsertOverrides:h,idKey:b,nodeEntry:[C,u.path],query:E}),idKey:b}),_=S=>y.has(S),O=S=>{const[w,A]=S;if(eu(S,E)&&(w[b]!==void 0&&_(w[b])&&delete w[b],w[b]===void 0&&Object.assign(w,s()),!h&&Pr(w._id))){const P=w._id;delete w._id,_(P)||(w[b]=P)}const T=w.children;T&&T.forEach((P,M)=>{O([P,[...A,M]])})};return O([C,u.path]),n({...u,node:C})}if(u.type==="split_node"){const C=u.properties;let y=u.properties[b];if(eu([C,u.path],E))return(!x||y===void 0||e.api.some({at:[],match:{[b]:y}}))&&(y=g()),n({...u,properties:{...u.properties,[b]:y}});y&&delete u.properties[b]}return n(u)},insertNode(u){const{disableInsertOverrides:f,idKey:h=""}=t();!f&&u[h]&&(Object.isExtensible(u)||(u=Ds(u)),u._id=u[h]),r(u)},insertNodes(u,f){const h=oo(u).filter(b=>!!b);if(h.length===0)return;const{disableInsertOverrides:m,idKey:g=""}=t();i(h.map(b=>(!m&&b[g]&&(Object.isExtensible(b)||(b=Ds(b)),b._id=b[g]),b)),f)}}}},vP=()=>!0,yP=({allow:e,exclude:t,filter:n,filterInline:r=!0,filterText:i=!0})=>e===void 0&&t===void 0&&(n===void 0||n===vP)&&r&&i,xP=(e,t)=>Rt.isElement(e)&&(t?t(e):e.inline!==!0),bP=(e,t={})=>{const{allow:n,exclude:r,filter:i=()=>!0,filterInline:s=!0,filterText:a=!0,isBlock:o,idKey:l="id"}=t,[u,f]=e;return!u[l]&&eu([u,f],{allow:n,exclude:r,filter:h=>{const[m]=h;return a&&!Rt.isElement(m)||s&&Rt.isElement(m)&&!(o?o(m):m.inline!==!0)?!1:i(h)}})},sQ=e=>e.initialValueIds!==void 0?e.initialValueIds:e.normalizeInitialValue===null?!1:e.normalizeInitialValue===!0?"always":"if-needed",aQ=(e,t={})=>{const{idCreator:n=()=>p0(10),idKey:r="id"}=t;if(yP(t)){const o=f=>{if(!Rt.isElement(f)||!xP(f,t.isBlock))return f;let h;return f.children.forEach((m,g)=>{const b=o(m);b!==m&&(h||(h=[...f.children]),h[g]=b)}),f[r]?h?{...f,children:h}:f:{...f,...h?{children:h}:{},[r]:n()}};let l=!1;const u=e.map(f=>{const h=o(f);return h!==f&&(l=!0),h});return l?u:e}const i=(o,l)=>{let u=o,f=!1;if(bP([o,l],t)&&(u={...o,[r]:n()}),Rt.isElement(o)){const h=o.children.map((m,g)=>{const b=i(m,[...l,g]);return b!==m&&(f=!0),b});f&&(u=u===o?{...o,children:h}:{...u,children:h})}return u};let s=!1;const a=e.map((o,l)=>{const u=i(o,[l]);return u!==o&&(s=!0),u});return s?a:e},oQ=(e,t,n={})=>aQ(t,{...n,isBlock:e.api.isBlock}),wP=Wn({key:"nodeId",options:{filterInline:!0,filterText:!0,idKey:"id",filter:vP,idCreator:()=>p0(10)}}).extend(({getOptions:e})=>({node:{isMetadataProp:({key:t})=>t===(e().idKey??"id")}})).extendTransforms(({editor:e,getOptions:t})=>({normalize(){const n=t(),{idCreator:r,idKey:i}=n,s=[];if(yP({...n,isBlock:e.api.isBlock})){const o=[],l=u=>{Rt.isElement(u)&&xP(u,e.api.isBlock)&&(u[i]||s.push({at:[...o],props:{[i]:r()}}),u.children.forEach((f,h)=>{o.push(h),l(f),o.pop()}))};if(e.children.forEach((u,f)=>{o.push(f),l(u),o.pop()}),s.length===0)return;e.tf.withoutSaving(()=>{e.tf.setNodesBatch(s)});return}const a=o=>{const[l,u]=o;bP(o,{...n,isBlock:e.api.isBlock})&&s.push({at:u,props:{[i]:r()}}),Rt.isElement(l)&&l.children.forEach((f,h)=>{a([f,[...u,h]])})};e.children.forEach((o,l)=>{a([o,[l]])}),s.length!==0&&e.tf.withoutSaving(()=>{e.tf.setNodesBatch(s)})}})).extend({transformInitialValue:({editor:e,getOptions:t,value:n})=>{const r=t(),{idKey:i="id"}=r,s=sQ(r);if(s===!1)return n;if(s==="if-needed"){const a=n[0],o=n.at(-1);if(a?.[i]&&o?.[i])return n}return oQ(e,n,r)}}).overrideEditor(iQ),lQ=(e,t,n,r)=>e.meta.pluginCache.handlers.onNodeChange.some(i=>{const s=e.getPlugin({key:i});if(!s||e.dom?.readOnly)return!1;const a=s.handlers?.onNodeChange;if(!a)return!1;const o=a({editor:e,node:t,operation:r,plugin:s,prevNode:n});return o??!1}),uQ=(e,t,n,r,i)=>e.meta.pluginCache.handlers.onTextChange.some(s=>{const a=e.getPlugin({key:s});if(!a||e.dom?.readOnly)return!1;const o=a.handlers?.onTextChange;if(!o)return!1;const l=o({editor:e,node:t,operation:i,plugin:a,prevText:r,text:n});return l??!1}),kb={handlers:!0,inject:!0,transformInitialValue:!1,render:!0},Zr=(e,t,n)=>{if(!e)return!1;const r=n==="normalizeInitialValue"?"transformInitialValue":n;return t.editOnly===!0?kb[r]:typeof t.editOnly=="object"?t.editOnly[r]!==void 0?t.editOnly[r]:r==="transformInitialValue"?t.editOnly.normalizeInitialValue??kb.transformInitialValue:kb[r]:!1},cQ=e=>{const t=e.meta.isNormalizing;e.meta.isNormalizing=!0,e.meta.pluginCache.transformInitialValue.forEach(n=>{const r=e.getPlugin({key:n});if(Zr(e.dom.readOnly,r,"transformInitialValue")||!r.transformInitialValue&&!r.normalizeInitialValue)return;const i={...pn(e,r),value:e.children};if(r.transformInitialValue){const a=r.transformInitialValue(i);if(a===void 0)throw new Error(`Plugin "${n}" transformInitialValue must return the next value.`);e.children=a;return}const s=r.normalizeInitialValue?.(i);s!==void 0&&(e.children=s)}),e.meta.isNormalizing=t},fQ=(e,{autoSelect:t,selection:n,shouldNormalizeEditor:r,value:i,onReady:s})=>{const a=(o=!1)=>{if((!e.children||e.children?.length===0)&&(e.children=e.api.create.value()),n)e.selection=n;else if(t){const l=(t==="start"?"start":"end")=="start"?e.api.start([]):e.api.end([]);e.tf.select(l)}e.children.length>0&&cQ(e),r&&e.tf.normalize({force:!0}),s&&s({editor:e,isAsync:o,value:e.children})};if(i===null)a();else if(typeof i=="string")e.children=e.api.html.deserialize({element:i}),a();else if(typeof i=="function"){const o=i(e);o&&typeof o.then=="function"?o.then(l=>{e.children=l,a(!0)}):(e.children=o,a())}else i&&(e.children=i),a()},dQ=(e,{match:t,reverse:n}={})=>{if(!e.selection||!e.api.isCollapsed())return;const r=e.api.block();if(!r)return;const i=e.api.above({at:r[1],match:lB(e,(a,o)=>o.length===1||o.length>1&&!!a.type&&!_i(e,a.type)?.node.isStrictSiblings,{match:t})})?.[1]??r[1],s=n?i:Ye.next(i);if(s)return e.tf.insertNodes(e.api.create.block(),{at:s,select:!0}),!0},hQ=(e,{at:t,match:n}={})=>{const r=e.api.block({at:t});if(!r||!n)return;const[,i]=r;if(e.api.above({at:i,match:lB(e,(s,a)=>a.length{const n=e.api.block({at:t});if(!n?.[0])return;const[r,i]=n,s=e.getOptions(wP).idKey??"id";return e.tf.withoutNormalizing(()=>{const{type:a,...o}=dt.extractProps(r);delete o[s],Object.keys(o).forEach(u=>{e.tf.unsetNodes(u,{at:i})});const l=e.getType(H0.key);r.type!==l&&e.tf.setNodes({type:l},{at:i})}),!0},mQ=(e,t)=>{let n=t;typeof t=="string"?n=e.api.html.deserialize({element:t}):(!t||t.length===0)&&(n=e.api.create.value()),e.tf.replaceNodes(n,{at:[],children:!0})},j8=()=>{},q8=()=>{},gQ=(e,t)=>{const n=dt.extractProps(t);return Object.entries(n).every(([r,i])=>r==="type"?!0:e.meta.pluginCache.node.isMetadataProp.some(s=>{const a=e.plugins[s];return a.node.isMetadataProp?.({...pn(e,a),key:r,node:t,value:i})}))},kp=Wn({api:{redecorate:()=>{}},key:"slateExtension",options:{onNodeChange:j8,onTextChange:q8}}).extendEditorApi(({editor:e})=>({isElementStateEmpty:Ce(gQ,e)})).extendEditorTransforms(({editor:e,getOption:t,tf:n})=>{const r=n?.apply??e.tf.apply;return{init:Ce(fQ,e),insertExitBreak:Ce(dQ,e),liftBlock:Ce(hQ,e),resetBlock:Ce(pQ,e),setValue:Ce(mQ,e),apply(i){const s=e.meta.pluginCache.handlers.onNodeChange.length>0||t("onNodeChange")!==j8,a=e.meta.pluginCache.handlers.onTextChange.length>0||t("onTextChange")!==q8;if(!s&&!a){r(i);return}let o,l,u,f,h;if(Gl.isNodeOperation(i)&&s)switch(i.type){case"insert_node":o=i.node,l=i.node;break;case"merge_node":case"move_node":case"set_node":case"split_node":o=dt.get(e,i.path);break;case"remove_node":o=i.node,l=i.node;break}else if(Gl.isTextOperation(i)&&a){const m=Ye.parent(i.path);h=dt.get(e,m),u=dt.get(e,i.path).text}if(r(i),Gl.isNodeOperation(i)&&s){switch(i.type){case"insert_node":case"remove_node":break;case"merge_node":{const m=Ye.previous(i.path);m&&(l=dt.get(e,m));break}case"move_node":l=dt.get(e,i.newPath);break;case"set_node":l=dt.get(e,i.path);break;case"split_node":l=dt.get(e,i.path);break}l||(l=o),lQ(e,l,o,i)||t("onNodeChange")({editor:e,node:l,operation:i,prevNode:o})}if(Gl.isTextOperation(i)&&a){const m=dt.get(e,i.path);m&&(f=m.text),uQ(e,h,f,u,i)||t("onTextChange")({editor:e,node:h,operation:i,prevText:u,text:f})}}}}),vQ=e=>t=>Pn.isText(t)||Rt.isElement(t)&&e.api.isInline(t),yQ=e=>()=>({children:[],type:e}),xQ=(e,t)=>e.some((n,r,i)=>{const s=i[r-1];return r!==0?t(n)!==t(s):!1}),bQ=(e,t,n,r)=>{const i=r||xQ(e,t),{fragment:s}=e.reduce((a,o)=>{if(i&&t(o)){let l=a.precedingBlock;l||(l=n(),a.precedingBlock=l,a.fragment.push(l)),l.children.push(o)}else a.fragment.push(o),a.precedingBlock=null;return a},{fragment:[],precedingBlock:null});return s},wQ=e=>e.length===0?[{text:""}]:e,EP=(e,t,n,r)=>(e=wQ(e),e=bQ(e,t,n,r),e=e.map(i=>Rt.isElement(i)?{...i,children:EP(i.children,t,n,!1)}:i),e),EQ=(e,{defaultElementPlugin:t=H0,descendants:n})=>EP(n,vQ(e),yQ(e.getType(t.key)),!0),CP=(e,t,n)=>t.every(r=>{const i=r.parser?.query;return!i||i({...pn(e,r),...n})}),CQ=Jt({key:"parser"}).overrideEditor(({editor:e,tf:{insertData:t}})=>({transforms:{insertData(n){[...e.meta.pluginList].reverse().some(r=>{const i=r.parser;if(!i)return!1;const s=DE(e,r),{deserialize:a,format:o,mimeTypes:l}=i;if(!o&&!l)return!1;const u=l||(Array.isArray(o)?o:o?[o]:[]).map(f=>f.includes("/")?f:`text/${f}`);for(const f of u){let h=n.getData(f);if(f!=="Files"&&!h||f==="Files"&&n.files.length===0||!CP(e,s,{data:h,dataTransfer:n,mimeType:f}))continue;h=mX(e,s,{data:h,dataTransfer:n,mimeType:f});let m=a?.({...pn(e,r),data:h,dataTransfer:n,mimeType:f});if(m?.length&&(m=gX(e,s,{data:h,dataTransfer:n,fragment:m,mimeType:f}),m.length!==0))return pX(e,s,{data:h,dataTransfer:n,fragment:m,mimeType:f}),!0}return!1})||t(n)}}})),Yu=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},Db=({editor:e})=>{const{selection:t}=e,n=!!t&&e.api.isCollapsed(),r=Yu(()=>{if(t)return e.api.range("start",t)}),i=Yu(()=>{const s=r();return s?e.api.string(s):void 0});return{editor:e,getBlockEntry:Yu(()=>{if(t)return e.api.block({at:t})}),getBlockStartRange:r,getBlockStartText:i,getBlockTextBeforeSelection:Yu(()=>i()??""),getCharAfter:Yu(()=>{if(!t||!n)return;const s=e.api.after(t,{distance:1,unit:"character"});if(s)return e.api.string({anchor:t.anchor,focus:s})||void 0}),getCharBefore:Yu(()=>{if(!t||!n)return;const s=e.api.before(t,{distance:1,unit:"character"});if(s)return e.api.string({anchor:s,focus:t.anchor})||void 0}),isCollapsed:n}},kQ=(e,t)=>Array.isArray(e)?e.includes(t):e===t,DQ=Wn({editOnly:!0,key:"inputRules"}).overrideEditor(({editor:e,tf:{insertBreak:t,insertData:n,insertText:r}})=>({transforms:{insertBreak(){const i=Db({editor:e});let s=!1;for(const a of e.meta.inputRules.insertBreak){const o={cause:"insertBreak",insertBreak:t,pluginKey:a.pluginKey,...i};if(a.enabled?.(o)===!1)continue;const l=a.resolve?a.resolve(o):!0;if(l!==void 0&&a.apply(o,l)!==!1){s=!0;break}}s||t()},insertData(i){const s=i.getData("text/plain")||null,a=Db({editor:e});let o=!1;for(const l of e.meta.inputRules.insertData){const u={cause:"insertData",data:i,insertData:n,pluginKey:l.pluginKey,text:s,...a};if(l.enabled?.(u)===!1||l.mimeTypes&&l.mimeTypes.length>0&&!l.mimeTypes.some(h=>!!u.data.getData(h)))continue;const f=l.resolve?l.resolve(u):!0;if(f!==void 0&&l.apply(u,f)!==!1){o=!0;break}}o||n(i)},insertText(i,s){const a=e.meta.inputRules.insertText.byTrigger[i]??[],o=Db({editor:e});let l=!1;for(const u of a){const f={cause:"insertText",insertText:r,options:s,pluginKey:u.pluginKey,text:i,...o};if(!kQ(u.trigger,f.text)||u.enabled?.(f)===!1)continue;const h=u.resolve?u.resolve(f):!0;if(h!==void 0&&u.apply(f,h)!==!1){l=!0;break}}l||r(i,s)}}})),SQ=({affinity:e,chunking:t,maxLength:n,navigationFeedback:r,nodeId:i,plugins:s=[]})=>{let a=i,o=[SX,kp,gc,gP.configure({enabled:r!==!1,options:typeof r=="boolean"?void 0:r}),oX,DQ,hX,CQ,n?M8.configure({options:{maxLength:n}}):M8,QX,sX,wP.configure({enabled:a!==!1,options:a===!1?void 0:a}),kX.configure({enabled:e}),H0,rP.configure({enabled:t!==!1,options:typeof t=="boolean"?void 0:t})];const l=new Map(s.map(u=>[u.key,u]));return o=o.map(u=>{const f=l.get(u.key);if(f){const h=s.findIndex(m=>m.key===u.key);return h!==-1&&s.splice(h,1),f}return u}),o},_Q=(e,{id:t,affinity:n=!0,autoSelect:r,chunking:i=!0,maxLength:s,navigationFeedback:a,nodeId:o,optionsStoreFactory:l,plugins:u=[],readOnly:f=!1,rootPlugin:h,selection:m,shouldNormalizeEditor:g,skipInitialization:b,userId:x,value:E,onReady:C,...y}={})=>{const _=e;_.id=t??_.id??p0(),_.meta.key=_.meta.key??p0(),_.meta.isFallback=!1,_.meta.userId=x,_.dom={composing:!1,currentKeyboardEvent:null,focused:!1,prevSelection:null,readOnly:f},_.getApi=()=>_.api,_.getTransforms=()=>_.transforms,_.getPlugin=A=>LJ(_,A),_.getType=A=>Bt(_,A),_.getInjectProps=A=>{const T=_.getPlugin(A).inject?.nodeProps??{};return T.nodeKey=T.nodeKey??_.getType(A.key),T.styleKey=T.styleKey??T.nodeKey,T},_.getOptionsStore=A=>_.getPlugin(A).optionsStore,_.getOptions=A=>_.getOptionsStore(A)?_.getOptionsStore(A).get("state"):_.getPlugin(A).options,_.getOption=(A,T,...P)=>{const M=_.getOptionsStore(A);if(!M)return _.getPlugin(A).options[T];if(!(T in M.get("state"))&&!(T in M.selectors)){_.api.debug.error(`editor.getOption: ${T} option is not defined in plugin ${A.key}.`,"OPTION_UNDEFINED");return}return M.get(T,...P)},_.setOption=(A,T,...P)=>{const M=_.getOptionsStore(A);if(M){if(!(T in M.get("state"))){_.api.debug.error(`editor.setOption: ${T} option is not defined in plugin ${A.key}.`,"OPTION_UNDEFINED");return}M.set(T,...P)}},_.setOptions=(A,T)=>{const P=_.getOptionsStore(A);P&&(typeof T=="object"?P.set("state",M=>{Object.assign(M,T)}):typeof T=="function"&&P.set("state",T))};const O=SQ({affinity:n,chunking:i,maxLength:s,navigationFeedback:a,nodeId:o,plugins:u});let S=Jt({key:"root",priority:1e4,...y,override:{...y.override,components:{...y.components,...y.override?.components}},plugins:[...O,...u]});h&&(S=h(S)),YJ(_,[S],l);const w=_.tf.normalizeNode;return _.tf.normalizeNode=(...A)=>{if(_.api.shouldNormalizeNode(A[0]))return w(...A)},_.normalizeNode=_.tf.normalizeNode,b||_.tf.init({autoSelect:r,selection:m,shouldNormalizeEditor:g,value:E,onReady:C}),_},AQ={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",escape:"escape",extendBackward:"shift+left",extendDownward:"shift+down",extendForward:"shift+right",extendUpward:"shift+up",insertSoftBreak:"shift+enter",italic:"mod+i",moveBackward:"left",moveDownward:"down",moveForward:"right",moveUpward:"up",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",selectAll:"mod+a",splitBlock:"enter",tab:"tab",undo:"mod+z",untab:"shift+tab"},TQ={deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},NQ={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Rn=e=>{const t=AQ[e],n=TQ[e],r=NQ[e],i=t&&ks.isKeyHotkey(t),s=n&&ks.isKeyHotkey(n),a=r&&ks.isKeyHotkey(r);return o=>!!(i?.(o)||k6&&s?.(o)||!k6&&a?.(o))},$8=e=>(t,n,{composing:r}={})=>!(!Rn(e)(n)||!!r!==t.api.isComposing()),Hs={isBold:Rn("bold"),isCompose:Rn("compose"),isDeleteBackward:Rn("deleteBackward"),isDeleteForward:Rn("deleteForward"),isDeleteLineBackward:Rn("deleteLineBackward"),isDeleteLineForward:Rn("deleteLineForward"),isDeleteWordBackward:Rn("deleteWordBackward"),isDeleteWordForward:Rn("deleteWordForward"),isEscape:Rn("escape"),isExtendBackward:Rn("extendBackward"),isExtendDownward:Rn("extendDownward"),isExtendForward:Rn("extendForward"),isExtendLineBackward:Rn("extendLineBackward"),isExtendLineForward:Rn("extendLineForward"),isExtendUpward:Rn("extendUpward"),isItalic:Rn("italic"),isMoveBackward:Rn("moveBackward"),isMoveDownward:Rn("moveDownward"),isMoveForward:Rn("moveForward"),isMoveLineBackward:Rn("moveLineBackward"),isMoveLineForward:Rn("moveLineForward"),isMoveUpward:Rn("moveUpward"),isMoveWordBackward:Rn("moveWordBackward"),isMoveWordForward:Rn("moveWordForward"),isRedo:Rn("redo"),isSelectAll:Rn("selectAll"),isSoftBreak:Rn("insertSoftBreak"),isSplitBlock:Rn("splitBlock"),isTab:$8("tab"),isTransposeCharacter:Rn("transposeCharacter"),isUndo:Rn("undo"),isUntab:$8("untab")};function kP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const{key:i,inject:{excludeBelowPlugins:s,maxLevel:a,nodeProps:o}}=t,{element:l,text:u}=n,f=l??u;if(!f||!o)return;const{classNames:h,defaultNodeValue:m,nodeKey:g=e.getType(i),query:b,styleKey:x=g,transformClassName:E,transformNodeValue:C,transformProps:y,transformStyle:_,validNodeValues:O}=o;if(!Ep(e,t)(f,s||a?r(f):void 0))return;const S=b?.({...o,...pn(e,t),nodeProps:n});if(b&&!S)return;const w=f[g];if(!y&&(!Pr(w)||O&&!O.includes(w)||w===m))return;const A={...n,...pn(e,t),nodeValue:w},T=C?.(A)??w;A.value=T;let P={};return l&&g&&w&&(P.className=`slate-${g}-${w}`),(h?.[w]||E)&&(P.className=E?.(A)??h?.[T]),x&&(P.style=_?.(A)??{[x]:T}),y&&(P=y({...A,props:P})??P),P},_E=(e,t,n,r=!1)=>(e.meta.pluginCache.inject.nodeProps.forEach(i=>{const s=e.getPlugin({key:i}),a=OQ(e,s,t,n);if(Zr(r,s,"inject")||!a)return;const o=t.attributes;t.attributes={...o,...a,className:Ss(o?.className,a.className)||void 0,style:{...o?.style,...a.style}}}),t),BQ=(e,t)=>{if(!(e.meta.pluginCache.decorate.length===0&&!t))return n=>{let r=[];const i=s=>{s?.length&&(r=[...r,...s])};return e.meta.pluginCache.decorate.forEach(s=>{const a=e.getPlugin({key:s});i(a.decorate({...pn(e,a),entry:n}))}),t&&i(t({editor:e,entry:n})),r}},PQ=e=>e?.ownerDocument?.defaultView||null,RQ=e=>DP(e)&&e.nodeType===1,DP=e=>{const t=PQ(e);return!!t&&e instanceof t.Node},FQ=e=>DP(e)&&e.nodeType===3,SP=e=>{let t="";if(FQ(e)&&e.nodeValue)return e.nodeValue;if(RQ(e)){for(const r of Array.from(e.childNodes))t+=SP(r);const n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=` -`)}return t},V8=e=>{const t=window.getSelection();if(!t||t.rangeCount===0)return[];const n=t.getRangeAt(0).cloneContents().querySelectorAll('[data-slate-node="element"][data-slate-id]'),r=Array.from(n);if(r.length===0)return[];const i=[];return r.forEach((s,a)=>{const o=s.dataset.slateId,l=e.api.node({id:o,at:[]});if(!(!l||l[1].length!==1))if((a===0||a===r.length-1)&&s.textContent?.trim()!==dt.string(l[0])&&Rt.isElement(l[0])&&!e.api.isVoid(l[0])){const u=document.createElement("div");u.append(s);const f=e.api.html.deserialize({element:u});i.push(f[0])}else i.push(l[0])}),i},_P=()=>{const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0).cloneContents(),n=document.createElement("div");return n.append(t),n},IQ=e=>{const t=e??_P();return t?!!t?.querySelector('[data-slate-editor="true"]'):!1};gc.extendEditorApi(({editor:e})=>({getFragment(){return V8(e)}})).overrideEditor(({editor:e,tf:{setFragmentData:t}})=>({transforms:{setFragmentData(n,r){if(r!=="copy")return t(n,r);const i=V8(e),s=_P();if(!(!s||!i)&&!IQ(s)&&i.length>0){const a=JSON.stringify(i),o=window.btoa(encodeURIComponent(a));n.setData("application/x-slate-fragment",o),n.setData("text/html",s.innerHTML),n.setData("text/plain",SP(s))}}}}));const AE=(e,t)=>({...e.attributes,className:Ss(e.attributes.className,e.className)||void 0,ref:t,style:{...e.attributes.style,...e.style}}),AP=ae.forwardRef(function({as:t="div",children:n,...r},i){const s=AE(r,i),a=!!r.element.id&&!!r.editor.api.isBlock(r.element);return ae.createElement(t,{"data-slate-node":"element","data-slate-inline":s["data-slate-inline"],"data-block-id":a?r.element.id:void 0,...s,style:{position:"relative",...s?.style}},n)}),TP=ae.forwardRef(({as:e="span",children:t,...n},r)=>{const i=AE(n,r);return ae.createElement(e,i,t)}),U8=()=>ae.createElement("span",{style:{fontSize:0,lineHeight:0},contentEditable:!1},String.fromCodePoint(160)),NP=ae.forwardRef(({as:e="span",children:t,inset:n,...r},i)=>{const s=AE(r,i);return n?ae.createElement(ae.Fragment,null,ae.createElement(U8,null),ae.createElement(e,s,t,ae.createElement(U8,null))):ae.createElement(e,s,t)}),TE=(e,t,{isElement:n,isLeaf:r,isText:i})=>Object.keys(t).reduce((s,a)=>{if(typeof t[a]=="object"||n&&a==="children"||(r||i)&&a==="text")return s;const o=e.getPlugin({key:a});if(r&&o?.node.isLeaf&&o?.node.isDecoration!==!0||i&&o?.node.isLeaf&&o?.node.isDecoration!==!1)return s;const l=tP(a);return s[l]=t[a],s},{}),MQ=(e,t,n)=>{const r=t.node.isElement,i=TE(e,n,{isElement:r,isLeaf:t.node.isLeaf&&t.node.isDecoration===!0,isText:t.node.isLeaf&&t.node.isDecoration===!1}),s=t.node.toDataAttributes?.({...t?pn(e,t):{},node:n})??{};return{...i,...s}},$c=({attributes:e,editor:t,node:n,path:r,plugin:i,props:s})=>{let a={...s,...i?pn(t,i):{api:t.api,editor:t,tf:t.transforms}};const{className:o}=s,l=nP({attributes:e,node:n,plugin:i,props:a});return a={...l,attributes:{...l.attributes,className:Ss(al(i?.node.type),o)||void 0}},a=_E(t,a,r?()=>r:u=>t.api.findPath(u)),a.style&&Object.keys(a.style).length===0&&(a.style=void 0),a},LQ=(e,t)=>function(r){const i=r.element,s=e.meta.components?.[t.key],a=s??AP;let{children:o}=r;const l=MQ(e,t,i);r=$c({attributes:{...i.attributes,...l},editor:e,node:i,path:r.path,plugin:t,props:r}),e.meta.pluginCache.render.belowNodes.forEach(h=>{const m=e.getPlugin({key:h}).render.belowNodes({...r,key:h});m&&(o=m({...r,children:o}))});const u=s?{}:{as:t.render?.as};let f=ae.createElement(a,{...u,...r},o,e.meta.pluginCache.render.belowRootNodes.map(h=>{const m=e.getPlugin({key:h}).render.belowRootNodes;return ae.createElement(m,{key:h,...u,...r})}));return e.meta.pluginCache.render.aboveNodes.forEach(h=>{const m=e.getPlugin({key:h}).render.aboveNodes({...r,key:h});m&&(f=m({...r,children:f}))}),f},zQ=(e,{renderElement:t}={})=>function(r){const i=_i(e,r.element.type);if(i?.node.isElement)return LQ(e,i)(r);if(t)return t(r);const s=$c({editor:e,path:r.path,props:{...r}});return ae.createElement(AP,s,r.children,e.meta.pluginCache.render.belowRootNodes.map(a=>{const o=e.getPlugin({key:a}).render.belowRootNodes;return ae.createElement(o,{key:a,...s})}))},jQ=(e,t)=>function(r){const{children:i,text:s}=r;if(s[t.node.type??t.key]){const a=e.meta.components?.[t.key],o=a??TP,l=$c({attributes:{...s.attributes},editor:e,node:s,path:r.path,plugin:t,props:r}),u=a?{}:{as:t.render?.as};return ae.createElement(o,{...u,...l},i)}return i},qQ=(e,{renderText:t}={})=>{const n=[],r=[];return e.meta.pluginCache.node.isText.forEach(i=>{const s=e.getPlugin({key:i});s&&n.push(jQ(e,s))}),e.meta.pluginCache.node.textProps.forEach(i=>{const s=e.getPlugin({key:i});s&&r.push(s)}),function({attributes:s,...a}){if(n.forEach(f=>{const h=f(a);h!==void 0&&(a.children=h)}),r.forEach(f=>{if(a.text[f.node.type??f.key]){const h=typeof f.node.textProps=="function"?f.node.textProps(a):f.node.textProps??{};h.className&&(h.className=Ss(a.className,h.className)),s={...s,...h}}}),t)return t({attributes:s,...a});const o=$c({editor:e,path:a.path,props:{attributes:s,...a}}),l=o.text,u=TE(e,l,{isText:!0});return ae.createElement(TP,{...o,attributes:{...o.attributes,...u}})}};function $Q({decorate:e,decorations:t,editor:n,element:r={children:[],type:""},path:i}){const s=zQ(n),a={"data-slate-node":"element",ref:null};let o=ae.createElement(H8,{decorate:e,decorations:t,editor:n,parentPath:i},r.children);return n.api.isVoid(r)&&(a["data-slate-void"]=!0,o=ae.createElement("span",{style:{color:"transparent",height:"0",outline:"none",position:"absolute"},"data-slate-spacer":!0},ae.createElement(H8,{decorate:e,decorations:t,editor:n,parentPath:i},r.children))),n.api.isInline(r)&&(a["data-slate-inline"]=!0),ae.createElement(ae.Fragment,null,s?.({attributes:a,children:o,element:r,path:i}))}const VQ=ae.memo($Q,(e,t)=>(e.element===t.element||e.element._memo!==void 0&&e.element._memo===t.element._memo)&&CU(e.decorations,t.decorations));function UQ({decorations:e,editor:t,path:n,text:r={text:""}}){const i=GQ(t),s=qQ(t),a=Pn.decorations(r,e).map(({leaf:o,position:l},u)=>{const f=i({attributes:{"data-slate-leaf":!0},children:ae.createElement("span",{"data-slate-string":!0},o.text===""?"\uFEFF":o.text),leaf:o,leafPosition:l,path:n,text:o});return ae.createElement(ae.Fragment,{key:u},f)});return s({attributes:{"data-slate-node":"text",ref:null},children:a,path:n,text:r})}const HQ=ae.memo(UQ,(e,t)=>Pn.equals(t.text,e.text)&&kU(t.decorations,e.decorations)),WQ=()=>[];function H8({children:e=[],decorate:t=WQ,decorations:n=[],editor:r,parentPath:i=[]}){return ae.createElement(ae.Fragment,null,e.map((s,a)=>{const o=[...i,a];let l=[];const u=r.api.range(o);if(u){l=t([s,o]);for(const f of n){const h=dn.intersection(f,u);h&&l.push(h)}}return Rt.isElement(s)?ae.createElement(VQ,{key:a,decorate:t,decorations:l,editor:r,element:s,path:o}):ae.createElement(HQ,{key:a,decorations:l,editor:r,path:o,text:s})}))}const KQ=(e,t)=>function(r){const{children:i,leaf:s}=r;if(s[t.node.type]){const a=t.render.leaf??e.meta.components?.[t.key],o=a??NP,l=$c({attributes:{...s.attributes},editor:e,node:s,path:r.path,plugin:t,props:r}),u=a?{}:{as:t.render?.as};return ae.createElement(o,{...u,...l},i)}return i},GQ=(e,{renderLeaf:t}={})=>{const n=[],r=[];return e.meta.pluginCache.node.isLeaf.forEach(i=>{const s=e.getPlugin({key:i});s&&n.push(KQ(e,s))}),e.meta.pluginCache.node.leafProps.forEach(i=>{const s=e.getPlugin({key:i});s&&r.push(s)}),function({attributes:s,...a}){if(n.forEach(f=>{const h=f(a);h!==void 0&&(a.children=h)}),r.forEach(f=>{if(a.leaf[f.node.type]){const h=typeof f.node.leafProps=="function"?f.node.leafProps(a):f.node.leafProps??{};h.className&&(h.className=Ss(a.className,h.className)),s={...s,...h}}}),t)return t({attributes:s,...a});const o=$c({editor:e,path:a.path,props:{attributes:s,...a}}),l=o.leaf,u=TE(e,l,{isLeaf:!0});return ae.createElement(NP,{...o,attributes:{...o.attributes,...u}})}};var Sb,W8;function YQ(){if(W8)return Sb;W8=1,Sb=i;var e="֑-߿יִ-﷽ﹰ-ﻼ",t="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",n=new RegExp("^[^"+t+"]*["+e+"]"),r=new RegExp("^[^"+e+"]*["+t+"]");function i(s){return s=String(s||""),n.test(s)?"rtl":r.test(s)?"ltr":"neutral"}return Sb}var JQ=YQ();const NE=Nr(JQ);var _b,K8;function XQ(){if(K8)return _b;K8=1;var e=Zs(),t=function(){return e.Date.now()};return _b=t,_b}var Ab,G8;function QQ(){if(G8)return Ab;G8=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Ab=t,Ab}var Tb,Y8;function ZQ(){if(Y8)return Tb;Y8=1;var e=QQ(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Tb=n,Tb}var Nb,J8;function eZ(){if(J8)return Nb;J8=1;var e=ZQ(),t=Wi(),n=hm(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var h=s.test(u);return h||a.test(u)?o(u.slice(2),h?2:8):i.test(u)?r:+u}return Nb=l,Nb}var Ob,X8;function OP(){if(X8)return Ob;X8=1;var e=Wi(),t=XQ(),n=eZ(),r="Expected a function",i=Math.max,s=Math.min;function a(o,l,u){var f,h,m,g,b,x,E=0,C=!1,y=!1,_=!0;if(typeof o!="function")throw new TypeError(r);l=n(l)||0,e(u)&&(C=!!u.leading,y="maxWait"in u,m=y?i(n(u.maxWait)||0,l):m,_="trailing"in u?!!u.trailing:_);function O($){var Y=f,Z=h;return f=h=void 0,E=$,g=o.apply(Z,Y),g}function S($){return E=$,b=setTimeout(T,l),C?O($):g}function w($){var Y=$-x,Z=$-E,ve=l-Y;return y?s(ve,m-Z):ve}function A($){var Y=$-x,Z=$-E;return x===void 0||Y>=l||Y<0||y&&Z>=m}function T(){var $=t();if(A($))return P($);b=setTimeout(T,w($))}function P($){return b=void 0,_&&f?O($):(f=h=void 0,g)}function M(){b!==void 0&&clearTimeout(b),E=0,f=x=h=b=void 0}function F(){return b===void 0?g:P(t())}function z(){var $=t(),Y=A($);if(f=arguments,h=this,x=$,Y){if(b===void 0)return S(x);if(y)return clearTimeout(b),b=setTimeout(T,l),O(x)}return b===void 0&&(b=setTimeout(T,l)),g}return z.cancel=M,z.flush=F,z}return Ob=a,Ob}var tZ=OP();const nZ=Nr(tZ);var Bb,Q8;function rZ(){if(Q8)return Bb;Q8=1;var e=OP(),t=Wi(),n="Expected a function";function r(i,s,a){var o=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(o="leading"in a?!!a.leading:o,l="trailing"in a?!!a.trailing:l),e(i,s,{leading:o,maxWait:s,trailing:l})}return Bb=r,Bb}var iZ=rZ();const sZ=Nr(iZ);function b0(e){"@babel/helpers - typeof";return b0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b0(e)}function aZ(e,t){if(b0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(b0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oZ(e){var t=aZ(e,"string");return b0(t)=="symbol"?t:t+""}function K0(e,t,n){return(t=oZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var BP=globalThis.Node,lZ=globalThis.Text;const OE=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,uZ=e=>ts(e)&&e.nodeType===8,Vi=e=>ts(e)&&e.nodeType===1,ts=e=>{const t=OE(e);return!!t&&e instanceof t.Node},Dp=e=>{const t=e&&e.anchorNode&&OE(e.anchorNode);return!!t&&e instanceof t.Selection},PP=e=>ts(e)&&e.nodeType===3,cZ=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,fZ=e=>{let[t,n]=e;if(Vi(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=RP(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},RP=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(uZ(i)||Vi(i)&&i.childNodes.length===0||Vi(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},hZ=(e,t,n)=>{const[r]=RP(e,t,n);return r},FP=e=>{let t="";if(PP(e)&&e.nodeValue)return e.nodeValue;if(Vi(e)){var n;if(e.hasAttribute("data-slate-spacer")||e.tagName==="BR"&&((n=e.parentElement)===null||n===void 0?void 0:n.getAttribute("data-slate-zero-width"))==="n")return t;for(const a of Array.from(e.childNodes))t+=FP(a);const r=getComputedStyle(e).getPropertyValue("display"),i=r==="block"||r==="list",s=!!e.closest('[data-slate-inline="true"]');(e.tagName==="BR"||i&&!s)&&(t+=` -`)}return t},pZ=/<[^>]*\sdata-slate-fragment="([^"]+)"/m,mZ=e=>{const t=e.getData("text/html"),[,n]=t.match(pZ)||[];return n},Us=e=>e.getSelection!=null?e.getSelection():document.getSelection(),BE=(e,t,n)=>{const{target:r}=t;if(Vi(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:i}=Pt.getWindow(e);if(tu(i,r))return Pt.hasDOMNode(e,r,{editable:!0});const s=n.find(({addedNodes:a,removedNodes:o})=>{for(const l of a)if(l===r||tu(l,r))return!0;for(const l of o)if(l===r||tu(l,r))return!0});return!s||s===t?!1:BE(e,s,n)},gZ=()=>{let e=document.activeElement;for(;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(n=e.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var t,n,r;e=(r=e)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return e},Z8=(e,t)=>!!(e.compareDocumentPosition(t)&BP.DOCUMENT_POSITION_PRECEDING),vZ=(e,t)=>!!(e.compareDocumentPosition(t)&BP.DOCUMENT_POSITION_FOLLOWING),Ml=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},tu=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var Pb,Rb;const yZ=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,e_=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),oi=typeof navigator<"u"&&/Android/.test(navigator.userAgent),eo=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ma=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),xZ=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Qf=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),IP=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),bZ=oi&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),t_=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),wZ=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),EZ=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!Qf||IP),Xh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Pb=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Pb!==void 0&&Pb[1]&&parseInt((Rb=navigator.userAgent.match(/Version\/(\d+)/))===null||Rb===void 0?void 0:Rb[1],10)<17);const $o=!IP&&!bZ&&!xZ&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function";let CZ=0,MP=class{constructor(){K0(this,"id",void 0),this.id=`${CZ++}`}};const Xo=new WeakMap,Jl=new WeakMap,nu=new WeakMap,LP=new WeakMap,Xl=new WeakMap,Fw=new WeakMap,w0=new WeakMap,ru=new WeakMap,Sp=new WeakMap,E0=new WeakMap,Iw=new WeakMap,Qo=new WeakMap,Ea=new WeakMap,Zf=new WeakMap,Qh=new WeakMap,PE=new WeakMap,Es=new WeakMap,to=new WeakMap,Lr=new WeakMap,ba=new WeakMap,xa=new WeakMap,Zh=new WeakMap,Sc=Symbol("placeholder"),zP=Symbol("mark-placeholder");function n_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fc(e){for(var t=1;tLr.get(e),androidScheduleFlush:e=>{var t;(t=PE.get(e))===null||t===void 0||t()},blur:e=>{const t=Pt.toDOMNode(e,e),n=Pt.findDocumentOrShadowRoot(e);Qo.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Pt.findDocumentOrShadowRoot(e),r=Us(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Fe.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Pt.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Pt.toSlateNode(e,t.target)}catch(x){if(r)return null;throw x}let l;try{l=Pt.findPath(e,o)}catch(x){if(r)return null;throw x}if(ie.isElement(o)&&L.isVoid(e,o)){const x=a.getBoundingClientRect(),E=e.isInline(o)?i-x.left{if(!x)return null;const E=f.createRange();return E.setStart(x.offsetNode,x.offset),E.setEnd(x.offsetNode,x.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Pt.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=Sp.get(t);return n||(n=new MP,Sp.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=nu.get(r);if(s==null){if(r===e)return n;break}const a=Jl.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Jn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(Qo.get(e)||!Pt.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Pt.focus(e,{retries:t.retries-1})},10);return}const n=Pt.toDOMNode(e,e),r=Pt.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Pt.toDOMRange(e,e.selection):null;if(e.selection||Fe.select(e,L.start(e,[])),Qo.set(e,!0),n.focus({preventScroll:!0}),i){const s=Us(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=LP.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Pt.isMounted(e))return!1;const i=Pt.toDOMNode(e,e);let s;try{s=Vi(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||Ml(s,"[data-slate-editor]")!==i)return!1;const a=Ml(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?Ml(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&Ml(o,"[data-slate-editor]")===i){var l;const u=(l=Ml(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||Ml(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&Ml(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>ts(t)&&Pt.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Pt.hasEditableTarget(e,t)||Pt.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>ts(t)&&Pt.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Ea.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Pt.isComposing(e)?kZ(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,fc(fc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!Qo.get(e),isMounted:e=>!!Xl.get(e),isReadOnly:e=>!!Iw.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(Iw.get(e)||!Pt.hasTarget(e,t))return!1;const n=Pt.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n;const r=t===e?Xl.get(e):(n=E0.get(e))===null||n===void 0?void 0:n.get(Pt.findKey(e,t));if(!r)throw new Error(`Cannot resolve a DOM node from Slate node: ${Jn.stringify(t)}`);return r},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=E0.get(e))===null||n===void 0?void 0:n.get(Pt.findKey(e,ie.get(e,t.path))),i=r?i_(e,r,t):null;return!i&&DZ(e)&&e.onDOMError(new Error(r_(t))),i},resolveDOMRange:(e,t)=>{const n=Pt.resolveDOMPoint(e,t.anchor),r=we.isCollapsed(t)?n:Pt.resolveDOMPoint(e,t.focus);return n&&r?s_(e,n,r,we.isBackward(t)):null},resolveEventRange:(e,t)=>Pt.findEventRange(e,t,{suppressThrow:!0}),toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Pt.toDOMNode(e,n),i=i_(e,r,t);if(!i)throw new Error(r_(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Pt.toDOMPoint(e,n),s=we.isCollapsed(t)?i:Pt.toDOMPoint(e,r);return s_(e,i,s,we.isBackward(t))},toSlateNode:(e,t)=>{let n=Vi(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?w0.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:fZ(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Pt.toDOMNode(e,e),y=o.closest('[data-slate-void="true"]'),_=y&&tu(C,y)?y:null,O=o.closest('[contenteditable="false"]'),S=O&&tu(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),A=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Pt.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` -`?0:a);const M=P.cloneContents();[...Array.prototype.slice.call(M.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(M.querySelectorAll("[contenteditable=false]"))].forEach(z=>{if(oi&&!r&&z.hasAttribute("data-slate-zero-width")&&z.textContent.length>0&&z.textContext!=="\uFEFF"){z.textContent.startsWith("\uFEFF")&&(z.textContent=z.textContent.slice(1));return}z.parentNode.removeChild(z)}),f=M.textContent.length,A=u}}else if(_){const T=_.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(S){const T=M=>M?M.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=S.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...T(P?.previousElementSibling),...T(P)].findLast(F=>Z8(S,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...T(P),...T(P?.nextElementSibling)].find(F=>vZ(S,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),A=w,l==="forward"?f=0:(f=A.textContent.length,A.querySelectorAll("[data-slate-zero-width]").forEach(M=>{f-=M.textContent.length})))}A&&f===A.textContent.length&&oi&&A.getAttribute("data-slate-zero-width")==="z"&&(h=A.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||eo&&(m=A.textContent)!==null&&m!==void 0&&m.endsWith(` - -`))&&f--}if(oi&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Pt.hasDOMNode(e,C,{editable:!0})){const y=Pt.toSlateNode(e,C);let _;try{_=Pt.findPath(e,y)}catch(w){if(i)return null;throw w}let{path:O,offset:S}=L.start(e,_);return C.querySelector("[data-slate-leaf]")||(S=a),{path:O,offset:S}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let x;try{x=Pt.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Pt.findPath(e,x)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=Dp(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(Dp(t)){if(eo&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let _=function(T){return T.childElementCount>0?_(T.children[0]):T};const O=C.startContainer,S=y.startContainer,w=_(O.children[C.startOffset]),A=_(S.children[y.startOffset]);h=0,A.childNodes.length>0?l=A.childNodes[0]:l=A,w.childNodes.length>0?f=w.childNodes[0]:f=w,A instanceof HTMLElement?u=A.innerHTML.length:u=0}else C.startContainer===f?(l=y.endContainer,u=y.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=y.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;Qf&&dZ(l)||eo?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);eo&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` - -`)&&h===f.textContent.length&&h--;const g=Pt.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=Z8(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?fc(fc({},r),{},{text:n}):fc(fc({},r),{},{children:jP(r.children,t.slice(1),n)})),kZ=e=>{var t;const n=Pt.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Pt.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Pt.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=z0();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=jP(e.children,r.path,s),{view:a,point:r}},DZ=e=>{var t,n;return!!((t=Xl.get(e))!==null&&t!==void 0&&t.isConnected)&&!Xo.get(e)&&!((n=Lr.get(e))!==null&&n!==void 0&&n.length)&&!ba.get(e)},r_=e=>`Cannot resolve a DOM point from Slate point: ${Jn.stringify(e)}`,i_=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const s=Pt.getWindow(e).document.createRange(),[a,o]=r?n:t,[l,u]=r?t:n,h=!!(Vi(a)?a:a.parentElement).getAttribute("data-slate-zero-width"),g=!!(Vi(l)?l:l.parentElement).getAttribute("data-slate-zero-width");return s.setStart(a,h?1:o),s.setEnd(l,g?1:u),s};function SZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function C0(e,t){if(e==null)return{};var n,r,i=SZ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;rn.slice(0,r.start)+r.text+n.slice(r.end),e)}function AZ(e,t){const n=Math.min(e.length,t.length);for(let r=0;rn.start?n.text.length:0)-i),o=s.slice(r,a),l=Math.max(t.end,n.end-t.text.length+(t.end-t.start));return $P(e,{start:r,end:l,text:o})}function OZ(e){const{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Mw(e,t){let{path:n,offset:r}=t;if(!L.hasPath(e,n))return null;let i=ie.get(e,n);if(!ie.isText(i))return null;const s=L.above(e,{match:a=>ie.isElement(a)&&L.isBlock(e,a),at:n});if(!s)return null;for(;r>i.text.length;){const a=L.next(e,{at:n,match:ie.isText});if(!a||!oe.isDescendant(a[1],s[1]))return null;r-=i.text.length,i=a[0],n=a[1]}return{path:n,offset:r}}function a_(e,t){const n=Mw(e,t.anchor);if(!n)return null;if(we.isCollapsed(t))return{anchor:n,focus:n};const r=Mw(e,t.focus);return r?{anchor:n,focus:r}:null}function Lw(e,t,n){const r=Lr.get(e),i=r?.find(({path:l})=>oe.equals(l,t.path));if(!i||t.offset<=i.diff.start)return an.transform(t,n,{affinity:"backward"});const{diff:s}=i;if(n.type==="insert_node"&&kn.isText(n.node)&&n.node.text===s.text&&s.start===s.end&&oe.equals(n.path,oe.next(t.path))&&t.offset<=s.start+s.text.length&&ie.leaf(e,t.path).text.length===s.start)return{path:n.path,offset:t.offset-s.start};if(t.offset<=s.start+s.text.length){const l={path:t.path,offset:s.start},u=an.transform(l,n,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-s.start}:null}const a={path:t.path,offset:t.offset-s.text.length+s.end-s.start},o=an.transform(a,n,{affinity:"backward"});return o?n.type==="split_node"&&oe.equals(n.path,t.path)&&a.offset=r.end?e:t.offset<=r.start?{diff:{start:t.text.length+r.start,end:t.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+t.text.length,text:r.text},id:i,path:n};case"remove_text":return!oe.equals(t.path,n)||t.offset>=r.end?e:t.offset+t.text.length<=r.start?{diff:{start:r.start-t.text.length,end:r.end-t.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-t.text.length,text:r.text},id:i,path:n};case"split_node":return!oe.equals(t.path,n)||t.position>=r.end?{diff:r,id:i,path:oe.transform(n,t,{affinity:"backward"})}:t.position>r.start?{diff:{start:r.start,end:Math.min(t.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-t.position,end:r.end-t.position,text:r.text},id:i,path:oe.transform(n,t,{affinity:"forward"})};case"merge_node":return oe.equals(t.path,n)?{diff:{start:r.start+t.position,end:r.end+t.position,text:r.text},id:i,path:oe.transform(n,t)}:{diff:r,id:i,path:oe.transform(n,t)}}const s=oe.transform(n,t);return s?{diff:r,path:s,id:i}:null}const l_=(e,t)=>{const n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},u_=(e,t,n)=>{try{const r=Pt.toDOMRange(e,t),i=Pt.toDOMRange(e,n),s=r.getBoundingClientRect(),a=i.getBoundingClientRect();return l_(s,a)&&l_(a,s)}catch{return!1}},PZ=(e,t)=>{const n=L.range(e,we.end(t)),r=Array.from(L.positions(e,{at:t}));let i=0,s=r.length,a=Math.floor(s/2);if(u_(e,L.range(e,r[i]),n))return L.range(e,r[i],n);if(r.length<2)return L.range(e,r[r.length-1],n);for(;a!==r.length&&a!==i;)u_(e,L.range(e,r[a]),n)?s=a:i=a,a=Math.floor((i+s)/2);return L.range(e,r[i],n)};function c_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fb(e){for(var t=1;tnu.has(e)||VP.has(e)||ie.isElement(e)&&e.children.some(UP),HP=e=>ie.isElement(e)?Fb(Fb({},e),{},{children:e.children.map(HP)}):Fb({},e),WP=e=>{VP.add(e),ie.isElement(e)&&e.children.forEach(WP)},zw=e=>{const t=UP(e)?HP(e):e;return WP(t),t},RZ=["children"],FZ=["children"],IZ=["children"];function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ys(e){for(var t=1;t{const i=e.querySelector("li")!==null;let s=e;for(let a=Vi(t)?t:t.parentElement;a&&a!==n;a=a.parentElement)if(i&&["OL","UL","LI"].includes(a.nodeName)||r&&a.getAttribute("data-slate-inline")==="true"&&!a.hasAttribute("data-slate-void")){const o=a.cloneNode(!1);o.appendChild(s),s=a.ownerDocument.createDocumentFragment(),s.appendChild(o)}return s},LZ=(e,t="x-slate-fragment")=>{const n=e,{apply:r,onChange:i,deleteBackward:s,addMark:a,removeMark:o,insertNodes:l}=n;return n.insertNodes=(u,f)=>{l(ie.isNode(u)?zw(u):u.map(zw),f)},E0.set(n,new WeakMap),n.addMark=(u,f)=>{var h,m;(h=PE.get(n))===null||h===void 0||h(),!Es.get(n)&&(m=Lr.get(n))!==null&&m!==void 0&&m.length&&Es.set(n,null),to.delete(n),a(u,f)},n.removeMark=u=>{var f;!Es.get(n)&&(f=Lr.get(n))!==null&&f!==void 0&&f.length&&Es.set(n,null),to.delete(n),o(u)},n.deleteBackward=u=>{if(u!=="line")return s(u);if(n.selection&&we.isCollapsed(n.selection)){const f=L.above(n,{match:h=>ie.isElement(h)&&L.isBlock(n,h),at:n.selection});if(f){const[,h]=f,m=L.range(n,h,n.selection.anchor),g=PZ(n,m);we.isCollapsed(g)?s("character"):Fe.delete(n,{at:g})}}},n.apply=u=>{const f=[],h=[],m=Lr.get(n);if(m!=null&&m.length){const E=m.map(C=>BZ(C,u)).filter(Boolean);Lr.set(n,E)}const g=xa.get(n);g&&xa.set(n,o_(n,g,u));const b=ba.get(n);if(b!=null&&b.at){const E=Qt.isPoint(b?.at)?Lw(n,b.at,u):o_(n,b.at,u);ba.set(n,E?ys(ys({},b),{},{at:E}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...Ju(n,u.path));break}case"set_selection":{var x;(x=Zf.get(n))===null||x===void 0||x.unref(),Zf.delete(n);break}case"insert_node":case"remove_node":{f.push(...Ju(n,oe.parent(u.path)));break}case"merge_node":{const E=oe.previous(u.path);f.push(...Ju(n,E));break}case"move_node":{const E=oe.common(oe.parent(u.path),oe.parent(u.newPath));f.push(...Ju(n,E));let C;oe.isBefore(u.path,u.newPath)?(f.push(...Ju(n,oe.parent(u.path))),C=u.newPath):(f.push(...Ju(n,oe.parent(u.newPath))),C=u.path);const y=ie.get(e,oe.parent(C)),_=Pt.findKey(n,y),O=L.pathRef(n,oe.parent(C));h.push([O,_]);break}}switch(r(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":case"insert_text":case"remove_text":case"set_selection":Xo.set(n,!0)}for(const[E,C]of f){const[y]=L.node(n,E);Sp.set(y,C)}for(const[E,C]of h){if(E.current){const[y]=L.node(n,E.current);Sp.set(y,C)}E.unref()}},n.onDOMError=u=>{typeof globalThis.reportError=="function"?globalThis.reportError(u):setTimeout(()=>{throw u})},n.setFragmentData=u=>{const{selection:f}=n;if(!f)return;const[h,m]=we.edges(f),g=L.void(n,{at:h.path}),b=L.void(n,{at:m.path});if(we.isCollapsed(f)&&!g)return;const x=Pt.toDOMRange(n,f);let E=x.cloneContents(),C=x.commonAncestorContainer,y=E.childNodes[0];if(E.childNodes.forEach(A=>{A.textContent&&A.textContent.trim()!==""&&(y=A)}),b){const[A]=b,T=x.cloneRange(),P=Pt.toDOMNode(n,A);T.setEndAfter(P),E=T.cloneContents(),C=T.commonAncestorContainer}if(g&&(y=E.querySelector("[data-slate-spacer]")),Array.from(E.querySelectorAll("[data-slate-zero-width]")).forEach(A=>{const T=A.getAttribute("data-slate-zero-width")==="n";A.textContent="",T&&A.appendChild(A.ownerDocument.createElement("br"))}),PP(y)){const A=y.ownerDocument.createElement("span");A.style.whiteSpace="pre",A.appendChild(y),E.appendChild(A),y=A}const _=n.getFragment(),O=JSON.stringify(_),S=window.btoa(encodeURIComponent(O));y.setAttribute("data-slate-fragment",S),u.setData(`application/${t}`,S),E=MZ(E,C,Pt.toDOMNode(n,n),!g&&!b);const w=E.ownerDocument.createElement("div");return w.appendChild(E),w.setAttribute("hidden","true"),E.ownerDocument.body.appendChild(w),u.setData("text/html",w.innerHTML),u.setData("text/plain",FP(w)),E.ownerDocument.body.removeChild(w),u},n.insertData=u=>{n.insertFragmentData(u)||n.insertTextData(u)},n.insertFragmentData=u=>{const f=u.getData(`application/${t}`)||mZ(u);if(f){const h=decodeURIComponent(window.atob(f)),m=JSON.parse(h);return n.insertFragment(m),!0}return!1},n.insertTextData=u=>{const f=u.getData("text/plain");if(!f)return!1;const h=f.split(/\r\n|\r|\n/);if(h.length===1)return n.insertText(f),!0;if(zZ(n))return jZ(n,h),!0;const m=qZ(n,h);return m&&n.insertFragment(m),!0},n.onChange=u=>{const f=Qh.get(n);f&&f(u),i(u)},n},Ju=(e,t)=>{const n=[];for(const[r,i]of L.levels(e,{at:t})){const s=Pt.findKey(e,r);n.push([i,s])}return n},zZ=e=>!!e.selection&&!!L.above(e,{at:we.start(e.selection),match:t=>Sr.isElement(t)&&L.isInline(e,t)}),jZ=(e,t)=>{var n;const r=(n=L.marks(e))!==null&&n!==void 0?n:{},i=t.slice(1,-1);if(e.insertText(t[0]),Fe.splitNodes(e,{always:!0}),i.length&&e.selection){const{anchor:s}=e.selection,[[a,o]]=L.nodes(e,{at:s,match:m=>Sr.isElement(m)&&L.isBlock(e,m),mode:"lowest"}),{children:l}=a,u=C0(a,RZ),f=Array.from(L.nodes(e,{at:s,match:m=>Sr.isElement(m)&&L.isInline(e,m)}),([m])=>{let{children:g}=m;return C0(m,FZ)}),h=m=>f.reduceRight((g,b)=>ys(ys({},b),{},{children:[g]}),ys(ys({},r),{},{text:m}));Fe.insertNodes(e,i.map(m=>ys(ys({},u),{},{children:[h(m)]})),{at:o,select:!1})}e.insertText(t[t.length-1])},qZ=(e,t)=>{var n;if(!e.selection)return null;const r=L.above(e,{at:we.start(e.selection),match:l=>Sr.isElement(l)&&L.isBlock(e,l),mode:"lowest"});if(!r)return null;const[i]=r,{children:s}=i,a=C0(i,IZ),o=(n=L.marks(e))!==null&&n!==void 0?n:{};return t.map(l=>ys(ys({},a),{},{children:[ys(ys({},o),{},{text:l})]}))},$Z=3,VZ={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},UZ={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},HZ={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},or=e=>{const t=VZ[e],n=UZ[e],r=HZ[e],i=t&&ks.isHotkey(t),s=n&&ks.isHotkey(n),a=r&&ks.isHotkey(r);return o=>!!(i&&i(o)||e_&&s&&s(o)||!e_&&a&&a(o))};var Vn={isBold:or("bold"),isCompose:or("compose"),isMoveBackward:or("moveBackward"),isMoveForward:or("moveForward"),isDeleteBackward:or("deleteBackward"),isDeleteForward:or("deleteForward"),isDeleteLineBackward:or("deleteLineBackward"),isDeleteLineForward:or("deleteLineForward"),isDeleteWordBackward:or("deleteWordBackward"),isDeleteWordForward:or("deleteWordForward"),isExtendBackward:or("extendBackward"),isExtendForward:or("extendForward"),isExtendLineBackward:or("extendLineBackward"),isExtendLineForward:or("extendLineForward"),isItalic:or("italic"),isMoveLineBackward:or("moveLineBackward"),isMoveLineForward:or("moveLineForward"),isMoveWordBackward:or("moveWordBackward"),isMoveWordForward:or("moveWordForward"),isRedo:or("redo"),isSoftBreak:or("insertSoftBreak"),isSplitBlock:or("splitBlock"),isTransposeCharacter:or("transposeCharacter"),isUndo:or("undo")};const WZ=["anchor","focus"],KZ=["anchor","focus"];function d_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h_(e){for(var t=1;tObject.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),KP=(e,t)=>{const{anchor:n,focus:r}=e,i=C0(e,WZ),{anchor:s,focus:a}=t,o=C0(t,KZ);return e[Sc]===t[Sc]&&GZ(i,o)},RE=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{const r=Array.from(t.children,()=>[]);if(n.length===0)return r;const i=Pt.findPath(e,t),s=i.length,a=L.range(e,i),o=new Array(t.children.length),l=u=>{const f=o[u];if(f)return f;const h=L.range(e,[...i,u]);return o[u]=h,h};for(const u of n){const f=we.intersection(a,u);if(!f)continue;const[h,m]=we.edges(f),g=h.path[s],b=m.path[s];for(let x=g;x<=b;x++){const E=r[x];if(!E)continue;const C=l(x),y=we.intersection(C,u);y&&E.push(h_(h_({},u),y))}}return r};var iu=[],JZ=function(){return iu.some(function(e){return e.activeTargets.length>0})},XZ=function(){return iu.some(function(e){return e.skippedTargets.length>0})},p_="ResizeObserver loop completed with undelivered notifications.",QZ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:p_}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=p_),window.dispatchEvent(e)},k0;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(k0||(k0={}));var su=function(e){return Object.freeze(e)},ZZ=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,su(this)}return e})(),YP=(function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,su(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,s=t.right,a=t.bottom,o=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:s,bottom:a,left:o,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),FE=function(e){return e instanceof SVGElement&&"getBBox"in e},JP=function(e){if(FE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,s=i.offsetWidth,a=i.offsetHeight;return!(s||a||e.getClientRects().length)},m_=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},eee=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},e0=typeof window<"u"?window:{},vh=new WeakMap,g_=/auto|scroll/,tee=/^tb|vertical/,nee=/msie|trident/i.test(e0.navigator&&e0.navigator.userAgent),pa=function(e){return parseFloat(e||"0")},yc=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new ZZ((n?t:e)||0,(n?e:t)||0)},v_=su({devicePixelContentBoxSize:yc(),borderBoxSize:yc(),contentBoxSize:yc(),contentRect:new YP(0,0,0,0)}),XP=function(e,t){if(t===void 0&&(t=!1),vh.has(e)&&!t)return vh.get(e);if(JP(e))return vh.set(e,v_),v_;var n=getComputedStyle(e),r=FE(e)&&e.ownerSVGElement&&e.getBBox(),i=!nee&&n.boxSizing==="border-box",s=tee.test(n.writingMode||""),a=!r&&g_.test(n.overflowY||""),o=!r&&g_.test(n.overflowX||""),l=r?0:pa(n.paddingTop),u=r?0:pa(n.paddingRight),f=r?0:pa(n.paddingBottom),h=r?0:pa(n.paddingLeft),m=r?0:pa(n.borderTopWidth),g=r?0:pa(n.borderRightWidth),b=r?0:pa(n.borderBottomWidth),x=r?0:pa(n.borderLeftWidth),E=h+u,C=l+f,y=x+g,_=m+b,O=o?e.offsetHeight-_-e.clientHeight:0,S=a?e.offsetWidth-y-e.clientWidth:0,w=i?E+y:0,A=i?C+_:0,T=r?r.width:pa(n.width)-w-S,P=r?r.height:pa(n.height)-A-O,M=T+E+S+y,F=P+C+O+_,z=su({devicePixelContentBoxSize:yc(Math.round(T*devicePixelRatio),Math.round(P*devicePixelRatio),s),borderBoxSize:yc(M,F,s),contentBoxSize:yc(T,P,s),contentRect:new YP(h,l,T,P)});return vh.set(e,z),z},QP=function(e,t,n){var r=XP(e,n),i=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case k0.DEVICE_PIXEL_CONTENT_BOX:return a;case k0.BORDER_BOX:return i;default:return s}},ree=(function(){function e(t){var n=XP(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=su([n.borderBoxSize]),this.contentBoxSize=su([n.contentBoxSize]),this.devicePixelContentBoxSize=su([n.devicePixelContentBoxSize])}return e})(),ZP=function(e){if(JP(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},iee=function(){var e=1/0,t=[];iu.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(u){var f=new ree(u.target),h=ZP(u.target);o.push(f),u.lastReportedSize=QP(u.target,u.observedBox),he?n.activeTargets.push(i):n.skippedTargets.push(i))})})},see=function(){var e=0;for(y_(e);JZ();)e=iee(),y_(e);return XZ()&&QZ(),e>0},Ib,eR=[],aee=function(){return eR.splice(0).forEach(function(e){return e()})},oee=function(e){if(!Ib){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return aee()}).observe(n,r),Ib=function(){n.textContent="".concat(t?t--:t++)}}eR.push(e),Ib()},lee=function(e){oee(function(){requestAnimationFrame(e)})},ep=0,uee=function(){return!!ep},cee=250,fee={attributes:!0,characterData:!0,childList:!0,subtree:!0},x_=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],b_=function(e){return e===void 0&&(e=0),Date.now()+e},Mb=!1,dee=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=cee),!Mb){Mb=!0;var r=b_(t);lee(function(){var i=!1;try{i=see()}finally{if(Mb=!1,t=r-b_(),!uee())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,fee)};document.body?n():e0.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),x_.forEach(function(n){return e0.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),x_.forEach(function(n){return e0.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),jw=new dee,w_=function(e){!ep&&e>0&&jw.start(),ep+=e,!ep&&jw.stop()},hee=function(e){return!FE(e)&&!eee(e)&&getComputedStyle(e).display==="inline"},pee=(function(){function e(t,n){this.target=t,this.observedBox=n||k0.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=QP(this.target,this.observedBox,!0);return hee(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),mee=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),yh=new WeakMap,E_=function(e,t){for(var n=0;n=0&&(s&&iu.splice(iu.indexOf(r),1),r.observationTargets.splice(i,1),w_(-1))},e.disconnect=function(t){var n=this,r=yh.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e})(),gee=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");xh.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!m_(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");xh.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!m_(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");xh.unobserve(this,t)},e.prototype.disconnect=function(){xh.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();function vee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _p(e,t){if(e==null)return{};var n,r,i=vee(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r{const e=te.useContext(IE);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the component's context.");return e},Le=Pt;function C_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t{},Dee=e=>e?.constructor.name==="DataTransfer",tR=new WeakMap;function See({editor:e,scheduleOnDOMSelectionChange:t,onDOMSelectionChange:n}){let r=!1,i=!1,s=null,a=null,o=null,l=0,u=!1,f=!1,h=0,m=!1;const g=()=>{const I=xa.get(e);if(xa.delete(e),I){const{selection:X}=e,ne=a_(e,I);ne&&(!X||!we.equals(ne,X))&&Fe.select(e,ne)}},b=()=>{const{children:I}=e;if(x(),f&&e.children===I){var X;(X=Zh.get(e))===null||X===void 0||X()}f=!1},x=()=>{const I=ba.get(e);if(ba.delete(e),!!I){if(I.at){const X=Qt.isPoint(I.at)?Mw(e,I.at):a_(e,I.at);if(!X)return;const ne=L.range(e,X);(!e.selection||!we.equals(e.selection,ne))&&Fe.select(e,X)}I.run()}},E=()=>{if(!Ea.get(e)||u)return!1;try{const I=Le.toDOMNode(e,e),{activeElement:X}=Le.getWindow(e).document;if(X!==I&&!I.contains(X))return!1}catch{}return Date.now()-l{var I;return!!((I=Lr.get(e))!==null&&I!==void 0&&I.some(({path:X})=>{try{return ie.leaf(e,X).text.length===0}catch{return!1}}))},y=()=>C()||z()&&Es.get(e)!==void 0,_=()=>{if(a&&(clearTimeout(a),a=null),o&&(clearTimeout(o),o=null),!i&&E()&&y()){a=setTimeout(_,Cee);return}if(!z()&&!F()){g();return}r||(r=!0,setTimeout(()=>r=!1)),F()&&(r="action");const I=e.selection&&L.rangeRef(e,e.selection,{affinity:"forward"});to.set(e,e.marks),kee("flush",ba.get(e),Lr.get(e));let X=z(),ne;for(;ne=(W=Lr.get(e))===null||W===void 0?void 0:W[0];){var W,Te;const Me=Es.get(e);Me!==void 0&&(Es.delete(e),e.marks=Me),Me&&m===!1&&(m=null);const pe=OZ(ne);(!e.selection||!we.equals(e.selection,pe))&&Fe.select(e,pe),ne.diff.text?L.insertText(e,ne.diff.text):L.deleteFragment(e),Lr.set(e,(Te=Lr.get(e))===null||Te===void 0?void 0:Te.filter(({id:Oe})=>Oe!==ne.id)),_Z(e,ne)||(X=!1,ba.delete(e),to.delete(e),r="action",xa.delete(e),t.cancel(),n.cancel(),I?.unref())}const je=I?.unref();if(je&&!xa.get(e)&&(!e.selection||!we.equals(je,e.selection))&&Fe.select(e,je),F()){b();return}X&&t(),t.flush(),n.flush(),g();const $e=to.get(e);to.delete(e),$e!==void 0&&$e!==e.marks&&(e.marks=$e,e.onChange())},O=()=>{if(!(r||!E()||!y())){i=!0;try{_()}finally{i=!1}}},S=I=>{if(s&&clearTimeout(s),y()&&!r){wN.flushSync(()=>{Ea.set(e,!1),_()}),A();return}s=setTimeout(()=>{if(Ea.set(e,!1),_(),u){var X;(X=Zh.get(e))===null||X===void 0||X()}A()},bee)},w=I=>{Ea.set(e,!0),l=Date.now(),u=!1,s&&(clearTimeout(s),s=null)},A=(I=!1)=>{const X=Fw.get(e);if(X){if(z()||I){X.style.display="none";return}X.style.removeProperty("display")}},T=(I,X)=>{var ne;const W=(ne=Lr.get(e))!==null&&ne!==void 0?ne:[];Lr.set(e,W);const Te=ie.leaf(e,I),je=W.findIndex(Me=>oe.equals(Me.path,I));if(je<0){$P(Te.text,X)&&W.push({path:I,diff:X,id:h++}),A();return}const $e=NZ(Te.text,W[je].diff,X);if(!$e){W.splice(je,1),A();return}W[je]=bh(bh({},W[je]),{},{diff:$e})},P=(I,{at:X}={})=>{m=!1,xa.delete(e),t.cancel(),n.cancel(),F()&&_(),o&&clearTimeout(o),ba.set(e,{at:X,run:I}),o=setTimeout(_)},M=I=>{a&&(clearTimeout(a),a=null);const X=Xo.get(e),{inputType:ne}=I;if(ne==="insertCompositionText"||ne==="deleteCompositionText")if(l=Date.now(),I.data)u=!1;else{u=!0;const ze=Lr.get(e);ze!=null&&ze.length&&ze.every(({path:Se})=>{try{return ie.leaf(e,Se).text.length===0}catch{return!1}})&&(Lr.set(e,[]),xa.delete(e))}let W=null;const Te=I.dataTransfer||I.data||void 0;m!==!1&&ne!=="insertText"&&ne!=="insertCompositionText"&&(m=!1);let[je]=I.getTargetRanges();je&&!X&&(W=Le.toSlateRange(e,je,{exactMatch:!1,suppressThrow:!0}));const Me=Le.getWindow(e).getSelection();if(!W&&Me&&!X&&(je=Me,W=Le.toSlateRange(e,Me,{exactMatch:!1,suppressThrow:!0})),W=W??e.selection,!W)return;let pe=!0;if(ne.startsWith("delete")){const ze=ne.endsWith("Backward")?"backward":"forward";let[le,Se]=we.edges(W),[Ne,Be]=L.leaf(e,le.path);if(we.isExpanded(W)&&Ne.text.length===le.offset&&Se.offset===0){const ht=L.next(e,{at:le.path,match:ie.isText});ht&&oe.equals(ht[1],Se.path)&&(ze==="backward"?(W={anchor:Se,focus:Se},le=Se,[Ne,Be]=ht):(W={anchor:le,focus:le},Se=le))}const He={text:"",start:le.offset,end:Se.offset},Ge=Lr.get(e),ut=Ge?.find(ht=>oe.equals(ht.path,Be)),Qe=ut?[ut.diff,He]:[He];if(qP(Ne.text,...Qe).length===0&&(pe=!1),we.isExpanded(W)){if(pe&&oe.equals(W.anchor.path,W.focus.path)){const ht={path:W.anchor.path,offset:le.offset},Wt=L.range(e,ht,ht);Z(Wt),T(W.anchor.path,{text:"",end:Se.offset,start:le.offset}),ne==="deleteContentBackward"&&re();return}return P(()=>L.deleteFragment(e,{direction:ze}),{at:W})}}switch(ne){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return P(()=>L.deleteFragment(e),{at:W});case"deleteContent":case"deleteContentForward":{const{anchor:ze}=W;if(pe&&we.isCollapsed(W)){const le=ie.leaf(e,ze.path);if(ze.offsetL.deleteForward(e),{at:W})}case"deleteContentBackward":{var Oe;const{anchor:ze}=W,le=Dp(je)?je.isCollapsed:!!((Oe=je)!==null&&Oe!==void 0&&Oe.collapsed);if(pe&&le&&we.isCollapsed(W)&&ze.offset>0){T(ze.path,{text:"",start:ze.offset-1,end:ze.offset}),re();return}return P(()=>L.deleteBackward(e),{at:W})}case"deleteEntireSoftLine":return P(()=>{L.deleteBackward(e,{unit:"line"}),L.deleteForward(e,{unit:"line"})},{at:W});case"deleteHardLineBackward":return P(()=>L.deleteBackward(e,{unit:"block"}),{at:W});case"deleteSoftLineBackward":return P(()=>L.deleteBackward(e,{unit:"line"}),{at:W});case"deleteHardLineForward":return P(()=>L.deleteForward(e,{unit:"block"}),{at:W});case"deleteSoftLineForward":return P(()=>L.deleteForward(e,{unit:"line"}),{at:W});case"deleteWordBackward":return P(()=>L.deleteBackward(e,{unit:"word"}),{at:W});case"deleteWordForward":return P(()=>L.deleteForward(e,{unit:"word"}),{at:W});case"insertLineBreak":return P(()=>L.insertSoftBreak(e),{at:W});case"insertParagraph":return P(()=>L.insertBreak(e),{at:W});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(Dee(Te))return P(()=>Le.insertData(e,Te),{at:W});let ze=Te??"";if(Es.get(e)&&(ze=ze.replace("\uFEFF","")),ne==="insertText"&&/.*\n.*\n$/.test(ze)&&(ze=ze.slice(0,-1)),ze.includes(` -`))return P(()=>{const le=ze.split(` -`);le.forEach((Se,Ne)=>{Se&&L.insertText(e,Se),Ne!==le.length-1&&L.insertSoftBreak(e)})},{at:W});if(ne==="insertText"&&!Le.isComposing(e)&&we.isCollapsed(W)&&typeof L.insertionPoint=="function"&&!an.equals(L.insertionPoint(e,W.anchor),W.anchor)){var Ie;const le=Dp(je)?je.anchorNode:(Ie=je)===null||Ie===void 0?void 0:Ie.startContainer,Se=ts(le)&&le.nodeType===3?{node:le,text:le.textContent}:null;return I.preventDefault(),P(()=>{Se&&Se.node.isConnected&&Se.node.textContent!==Se.text&&(Se.node.textContent=Se.text),L.insertText(e,ze)},{at:W})}if(oe.equals(W.anchor.path,W.focus.path)){const[le,Se]=we.edges(W),Ne={start:le.offset,end:Se.offset,text:ze};if(ze&&m&&ne==="insertCompositionText"){const Be=m.start+m.text.search(/\S|$/);Ne.start+Ne.text.search(/\S|$/)===Be+1&&Ne.end===m.start+m.text.length?(Ne.start-=1,m=null,re()):m=!1}else ne==="insertText"?m===null?m=Ne:m&&we.isCollapsed(W)&&m.end+m.text.length===le.offset?m=bh(bh({},m),{},{text:m.text+ze}):m=!1:m=!1;if(pe){const Be=e.selection;if(T(le.path,Ne),Be){const He={path:le.path,offset:le.offset+ze.length};P(()=>{},{at:He})}return}}return P(()=>L.insertText(e,ze),{at:W})}}},F=()=>!!ba.get(e),z=()=>{var I;return!!((I=Lr.get(e))!==null&&I!==void 0&&I.length)},$=()=>F()||z(),Y=()=>r,Z=I=>{xa.set(e,I),a&&(clearTimeout(a),a=null);const{selection:X}=e;if(!I)return;const ne=!X||!oe.equals(X.anchor.path,I.anchor.path),W=!X||!oe.equals(X.anchor.path.slice(0,-1),I.anchor.path.slice(0,-1));(ne&&m||W)&&(m=!1),(ne||z())&&(a=setTimeout(_,wee))},ve=()=>{(F()||!z())&&_()},me=I=>{z()||(A(!0),setTimeout(A))},re=()=>{F()||(o&&clearTimeout(o),o=setTimeout(_))};return{flush:_,flushDeferredDiffs:O,scheduleFlush:re,hasPendingDiffs:z,hasPendingAction:F,hasPendingChanges:$,isFlushing:Y,handleUserSelect:Z,handleCompositionEnd:S,handleCompositionStart:w,handleDOMBeforeInput:M,handleKeyDown:me,handleDomMutations:I=>{var X;if(!z()&&I.some(ne=>BE(e,ne,I))){if(F()){f=!0;return}(X=Zh.get(e))===null||X===void 0||X()}},handleInput:ve}}function _ee(){const e=te.useRef(!1);return te.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}const ns=Xh?te.useLayoutEffect:te.useEffect;function Aee(e,t,n){const[r]=te.useState(()=>new MutationObserver(t));ns(()=>{r.takeRecords()}),te.useEffect(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}const Tee=["node"];function k_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nee(e){for(var t=1;t{let{node:t}=e,n=_p(e,Tee);if(!oi)return null;const r=As(),i=_ee(),[s]=te.useState(()=>See(Nee({editor:r},n)));return Aee(t,s.handleDomMutations,Oee),PE.set(r,s.scheduleFlush),tR.set(r,s.flushDeferredDiffs),i&&s.flush(),s}:()=>null;function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pee(e){for(var t=1;t{const{isLast:t,leaf:n,parent:r,text:i}=e,s=As(),a=Le.findPath(s,i),o=oe.parent(a),l=!!n[zP];return s.isVoid(r)?ae.createElement(Lb,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!s.isInline(r)&&L.string(s,o)===""?ae.createElement(Lb,{isLineBreak:!0,isMarkPlaceholder:l}):n.text===""?ae.createElement(Lb,{isMarkPlaceholder:l}):t&&n.text.slice(-1)===` -`?ae.createElement(S_,{isTrailing:!0,text:n.text}):ae.createElement(S_,{text:n.text})},S_=e=>{const{text:t,isTrailing:n=!1}=e,r=As(),i=te.useRef(null),s=()=>`${t??""}${n?` -`:""}`,[a]=te.useState(s);return ns(()=>{var o,l;const u=s();if(i.current&&i.current.textContent!==u){if(oi&&Ea.get(r)){var f;const g=(f=Le.getWindow(r).getSelection())===null||f===void 0?void 0:f.anchorNode;if(g&&i.current.contains(g))return}i.current.textContent=u}if(eo){var h;(h=i.current)===null||h===void 0||h.toggleAttribute("data-slate-trailing",n)}const m=(o=i.current)===null||o===void 0?void 0:o.firstChild;eo&&n&&((l=i.current)===null||l===void 0?void 0:l.childNodes.length)===1&&m?.nodeType===3&&m.splitText(t.length)}),ae.createElement(Fee,{ref:i},a)},Fee=te.memo(te.forwardRef((e,t)=>ae.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Lb=e=>{const{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,i={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(i["data-slate-mark-placeholder"]=!0),ae.createElement("span",Pee({},i),"\uFEFF",n?ae.createElement("br",null):null)},Iee=(e,t)=>{const n=Object.keys(e).filter(i=>i!=="children"),r=Object.keys(t).filter(i=>i!=="children");return n.length===r.length&&n.every(i=>i in t&&e[i]===t[i])},__=(e,t)=>e.children[e.children.length-1]===t,nR=(e,t,n,r)=>e===t?!0:Iee(e,t)&&__(e,n)===__(t,r)&&(r.text!==""||ie.string(e)===""==(ie.string(t)===""));function A_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rR(e){for(var t=1;tae.createElement($ee,rR({},e)),jee=e=>{const{leaf:t,isLast:n,text:r,parent:i,renderPlaceholder:s,renderLeaf:a=zee,leafPosition:o}=e,l=As(),u=te.useRef(null),f=te.useRef(null),[h,m]=te.useState(!1),g=te.useRef(null),b=te.useCallback(y=>{if(Lee(u,y==null),y==null){var _;Fw.delete(l),(_=t.onPlaceholderResize)===null||_===void 0||_.call(t,null)}else{if(Fw.set(l,y),!u.current){const O=window.ResizeObserver||gee;u.current=new O(()=>{var S;(S=t.onPlaceholderResize)===null||S===void 0||S.call(t,y)})}u.current.observe(y),f.current=y}},[f,t,l]);let x=ae.createElement(Ree,{isLast:n,leaf:t,parent:i,text:r});const E=!!t[Sc];if(te.useEffect(()=>(E?g.current||(g.current=setTimeout(()=>{m(!0),g.current=null},Mee)):(T_(g),m(!1)),()=>T_(g)),[E,m]),E&&h){const y={children:t.placeholder,attributes:{"data-slate-placeholder":!0,"aria-hidden":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",WebkitUserSelect:"none",textDecoration:"none",WebkitUserModify:ma?"inherit":void 0},contentEditable:!1,ref:b}};x=ae.createElement(ae.Fragment,null,x,s(y))}return a({attributes:{"data-slate-leaf":!0},children:x,leaf:t,text:r,leafPosition:o})},qee=ae.memo(jee,(e,t)=>nR(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&kn.equals(t.leaf,e.leaf)&&t.leaf[Sc]===e.leaf[Sc]),$ee=e=>{const{attributes:t,children:n}=e;return ae.createElement("span",rR({},t),n)};function iR(e,t){const[,n]=te.useReducer(l=>l+1,0),r=te.useRef(void 0),i=te.useRef(()=>null),s=te.useRef(null);let a;try{if(e!==i.current||r.current){const l=e();t(s.current,l)?a=s.current:a=l}else a=s.current}catch(l){throw r.current&&Vee(l)&&(l.message+=` -The error may be correlated with this previous error: -${r.current.stack} - -`),l}i.current=e,s.current=a,r.current=void 0;const o=te.useCallback(()=>{try{const l=i.current();if(t(s.current,l))return;s.current=l}catch(l){l instanceof Error?r.current=l:r.current=new Error(String(l))}n()},[]);return[a,o]}function Vee(e){return e instanceof Error}const sR=te.createContext({}),aR=(e,t)=>{const n=As(),{decorate:r,addEventListener:i}=te.useContext(sR),s=()=>{const u=Le.findPath(n,e),f=r([e,u]);if(ie.isText(e)){const h=L.range(n,u);return f.flatMap(m=>{const g=we.intersection(m,h);return g?[g]:[]})}return f},a=ie.isText(e)?GP:RE,[o,l]=iR(s,a);return ns(()=>{const u=i(l);return l(),u},[i,l]),te.useMemo(()=>[...o,...t],[o,t])},Uee=e=>{const[,t]=te.useReducer(o=>o+1,0),n=te.useRef(new Set),r=te.useRef(!1),i=te.useRef(e);ns(()=>{if(i.current=e,n.current.forEach(o=>o()),!r.current){r.current=!0;return}t()},[e]);const s=te.useCallback(o=>i.current(o),[]),a=te.useCallback(o=>(n.current.add(o),()=>{n.current.delete(o)}),[]);return te.useMemo(()=>({decorate:s,addEventListener:a}),[s,a])};function N_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oR(e){for(var t=1;tae.createElement(Kee,oR({},e)),Wee=e=>{const{decorations:t,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:s,renderText:a=Hee,text:o}=e,l=As(),u=te.useRef(null),f=aR(o,t),h=kn.decorations(o,f),m=Le.findKey(l,o),g=[];for(let E=0;E{const C=E0.get(l);E?(C?.set(m,E),ru.set(o,E),w0.set(E,o)):(C?.delete(m),ru.delete(o),u.current&&w0.delete(u.current)),u.current=E},[u,l,m,o])};return a({text:o,children:g,attributes:x})},lR=ae.memo(Wee,(e,t)=>nR(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&GP(t.decorations,e.decorations)),Kee=e=>{const{attributes:t,children:n}=e;return ae.createElement("span",oR({},t),n)};function O_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qw(e){for(var t=1;t{for(const t of e){const n=NE(ie.string(t));if(n!=="neutral")return n}},Gee=e=>{var t;const n=nu.get(e),r=Jl.get(e);if(!n||r===void 0)return;const i=n.children.slice(0,r).reverse(),s=n.children.slice(r+1);return(t=B_(i))!==null&&t!==void 0?t:B_(s)},Yee=e=>ae.createElement(Qee,qw({},e)),Jee=e=>{const{decorations:t,element:n,renderElement:r=Yee,renderChunk:i,renderPlaceholder:s,renderLeaf:a,renderText:o}=e,l=As(),u=ea(),f=l.isInline(n),h=aR(n,t),m=Le.findKey(l,n),g=te.useCallback(E=>{const C=E0.get(l);E?(C?.set(m,E),ru.set(n,E),w0.set(E,n)):(C?.delete(m),ru.delete(n))},[l,m,n]);let b=dR({decorations:h,node:n,renderElement:r,renderChunk:i,renderPlaceholder:s,renderLeaf:a,renderText:o});const x={"data-slate-node":"element",ref:g};if(f&&(x["data-slate-inline"]=!0),!f&&L.hasInlines(l,n)){const E=ie.string(n),C=E===""?Gee(n):NE(E);C==="rtl"&&(x.dir=C)}if(L.isVoid(l,n)){x["data-slate-void"]=!0,!u&&f&&(x.contentEditable=!1);const E=f?"span":"div",[[C]]=ie.texts(n);b=ae.createElement(E,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute",userSelect:"none",WebkitUserSelect:"none"}},ae.createElement(lR,{renderPlaceholder:s,decorations:[],isLast:!1,parent:n,text:C})),Jl.set(C,0),nu.set(C,n)}return r({attributes:x,children:b,element:n})},Xee=ae.memo(Jee,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&RE(e.decorations,t.decorations)),Qee=e=>{const{attributes:t,children:n,element:r}=e,s=As().isInline(r)?"span":"div";return ae.createElement(s,qw(qw({},t),{},{style:{position:"relative"}}),n)};class Zee{constructor(t,{chunkSize:n,debug:r}){Zn(this,"root",void 0),Zn(this,"chunkSize",void 0),Zn(this,"debug",void 0),Zn(this,"reachedEnd",void 0),Zn(this,"pointerChunk",void 0),Zn(this,"pointerIndex",void 0),Zn(this,"pointerIndexStack",void 0),Zn(this,"cachedPointerNode",void 0),this.root=t,this.chunkSize=n,this.debug=r??!1,this.pointerChunk=t,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}readLeaf(){if(this.reachedEnd)return null;for(;;)if(this.pointerIndex+1=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}else if(this.pointerChunk.type==="root"){this.pointerIndex=-1;return}else this.exitChunk();this.validateState(),this.enterChunkUntilLeaf(!0)}insertBefore(t){this.returnToPreviousLeaf(),this.insertAfter(t),this.readLeaf()}insertAfter(t){if(t.length===0)return;let n=0,r=0;for(;this.pointerChunk.type==="chunk"&&this.pointerIndex===this.pointerSiblings.length-1;){const o=this.chunkSize-this.pointerSiblings.length,l=Math.min(o,t.length);if(l>0){const u=t.splice(0,l);this.rawInsertAfter(u,n)}this.exitChunk(),n++}if(t.length===0)return;const i=this.savePointer();let s=null;if(this.readLeaf())for(;this.pointerChunk.type==="chunk"&&this.pointerIndex===0;){const o=this.chunkSize-this.pointerSiblings.length,l=Math.min(o,t.length);if(l>0){const u=t.splice(-l,l);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(u,r),s||(s=this.savePointer())}this.exitChunk(),r++}this.restorePointer(i);const a=Math.max(n,r);this.rawInsertAfter(t,a),s&&this.restorePointer(s),this.validateState()}remove(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,this.pointerSiblings.length===0&&this.pointerChunk.type==="chunk"?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}invalidateChunk(){for(let t=this.pointerChunk;t.type==="chunk";t=t.parent)this.root.modifiedChunks.add(t)}get atStart(){return this.pointerChunk.type==="root"&&this.pointerIndex===-1}get pointerSiblings(){return this.pointerChunk.children}getPointerNode(){return this.reachedEnd||this.pointerIndex===-1?null:this.pointerSiblings[this.pointerIndex]}get pointerNode(){if(this.cachedPointerNode!==void 0)return this.cachedPointerNode;const t=this.getPointerNode();return this.cachedPointerNode=t,t}getChunkPath(t){const n=[];for(let r=t;r.type==="chunk";r=r.parent){const i=r.parent.children.indexOf(r);if(i===-1)return null;n.unshift(i)}return n}savePointer(){if(this.atStart)return"start";if(!this.pointerNode)throw new Error("Cannot save pointer when pointerNode is null");return{chunk:this.pointerChunk,node:this.pointerNode}}restorePointer(t){if(t==="start"){this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.cachedPointerNode=void 0;return}const{chunk:n,node:r}=t,i=n.children.indexOf(r);if(i===-1)throw new Error("Cannot restore point because saved node is no longer in saved chunk");const s=this.getChunkPath(n);if(!s)throw new Error("Cannot restore point because saved chunk is no longer connected to root");this.pointerChunk=n,this.pointerIndex=i,this.pointerIndexStack=s,this.reachedEnd=!1,this.cachedPointerNode=r,this.validateState()}enterChunk(t){var n;if(((n=this.pointerNode)===null||n===void 0?void 0:n.type)!=="chunk")throw new Error("Cannot enter non-chunk");if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=t?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),this.pointerChunk.children.length===0)throw new Error("Cannot enter empty chunk")}enterChunkUntilLeaf(t){for(;((n=this.pointerNode)===null||n===void 0?void 0:n.type)==="chunk";){var n;this.enterChunk(t)}}exitChunk(){if(this.pointerChunk.type==="root")throw new Error("Cannot exit root");const t=this.pointerChunk;this.pointerChunk=t.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}rawInsertAfter(t,n){if(t.length===0)return;const r=(u,f,h)=>{if(h===1)return u;const m=[];for(let g=0;g{if(r.type==="chunk"){const{parent:i,children:s}=r;if(!i.children.includes(r))throw new Error(`Debug: Chunk ${r.key.id} has an incorrect parent property`);s.forEach(t)}};if(this.root.children.forEach(t),this.cachedPointerNode!==void 0&&this.cachedPointerNode!==this.getPointerNode())throw new Error("Debug: The cached pointer is incorrect and has not been invalidated");const n=this.getChunkPath(this.pointerChunk);if(!n)throw new Error("Debug: The pointer chunk is not connected to the root");if(!oe.equals(this.pointerIndexStack,n))throw new Error(`Debug: The cached index stack [${this.pointerIndexStack.join(", ")}] does not match the path of the pointer chunk [${n.join(", ")}]`)}}class ete{constructor(t,n){Zn(this,"editor",void 0),Zn(this,"children",void 0),Zn(this,"cachedKeys",void 0),Zn(this,"pointerIndex",void 0),this.editor=t,this.children=n,this.cachedKeys=new Array(n.length),this.pointerIndex=0}read(t){if(t===1)return[this.children[this.pointerIndex++]];const n=this.remaining(t);return this.pointerIndex+=t,n}remaining(t){return t===void 0?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+t)}get reachedEnd(){return this.pointerIndex>=this.children.length}lookAhead(t,n){const r=this.children.indexOf(t,this.pointerIndex);if(r>-1)return r-this.pointerIndex;for(let i=this.pointerIndex;i({type:"leaf",node:r,key:this.findKey(r,n+i),index:n+i}))}findKey(t,n){const r=this.cachedKeys[n];if(r)return r;const i=Le.findKey(this.editor,t);return this.cachedKeys[n]=i,i}}const tte=(e,{chunkTree:t,children:n,chunkSize:r,rerenderChildren:i=[],onInsert:s,onUpdate:a,onIndexChange:o,debug:l})=>{const u=new Zee(t,{chunkSize:r,debug:l}),f=new ete(e,n);let h;for(;h=u.readLeaf();){const m=f.lookAhead(h.node,h.key),g=m>0&&t.movedNodeKeys.has(h.key);if(m===-1||g){u.remove();continue}const b=f.pointerIndex,x=f.read(m+1),E=x.pop();if(x.length){const y=f.toChunkLeaves(x,b);u.insertBefore(y),x.forEach((_,O)=>{s?.(_,b+O)})}const C=f.pointerIndex-1;h.node!==E&&(h.node=E,u.invalidateChunk(),a?.(E,C)),h.index!==C&&(h.index=C,o?.(E,C)),i.includes(C)&&u.invalidateChunk()}if(!f.reachedEnd){const m=f.remaining(),g=f.toChunkLeaves(m,f.pointerIndex);u.returnToPreviousLeaf(),u.insertAfter(g),m.forEach((b,x)=>{s?.(b,f.pointerIndex+x)})}t.movedNodeKeys.clear()};function P_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nte(e){for(var t=1;t{const r=Le.findKey(e,t);let i=R_.get(r);return i||(i={type:"root",movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},R_.set(r,i)),n.reconcile&&tte(e,nte({chunkTree:i,children:t.children},n.reconcile)),i};function F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rte(e){for(var t=1;te,cR=e=>{const{root:t,ancestor:n,renderElement:r,renderChunk:i=ite}=e;return n.children.map(s=>{if(s.type==="chunk"){const o=s.key.id,l=i({highest:n===t,lowest:s.children.some(u=>u.type==="leaf"),attributes:{"data-slate-chunk":!0},children:ae.createElement(ate,{root:t,ancestor:s,renderElement:r,renderChunk:i})});return ae.createElement(te.Fragment,{key:o},l)}const a=s.node;return r(a,s.index,s.key)})},ste=e=>(te.useEffect(()=>{e.root.modifiedChunks.clear()}),ae.createElement(cR,rte({},e))),ate=ae.memo(cR,(e,t)=>e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)),fR=te.createContext(null),ote=()=>te.useContext(fR),dR=e=>{const{decorations:t,node:n,renderElement:r,renderChunk:i,renderPlaceholder:s,renderText:a,renderLeaf:o}=e,l=As();Xo.set(l,!1);const h=ie.isElement(n)&&!l.isInline(n)&&L.hasInlines(l,n)?null:l.getChunkSize(n),m=!!h,{decorationsByChild:g,childrenToRedecorate:b}=lte(l,n,t);m||n.children.forEach((y,_)=>{Jl.set(y,_),nu.set(y,n)});const x=te.useCallback((y,_,O)=>{const S=O??Le.findKey(l,y);return ae.createElement(fR.Provider,{key:`provider-${S.id}`,value:y},ae.createElement(Xee,{decorations:g[_],element:y,key:S.id,renderElement:r,renderChunk:i,renderPlaceholder:s,renderLeaf:o,renderText:a}))},[l,g,r,i,s,o,a]),E=(y,_)=>{const O=Le.findKey(l,y);return ae.createElement(lR,{decorations:g[_],key:O.id,isLast:_===n.children.length-1,parent:n,renderPlaceholder:s,renderLeaf:o,renderText:a,text:y})};if(!m)return n.children.map((y,_)=>ie.isText(y)?E(y,_):x(y,_));const C=uR(l,n,{reconcile:{chunkSize:h,rerenderChildren:b,onInsert:(y,_)=>{Jl.set(y,_),nu.set(y,n)},onUpdate:(y,_)=>{Jl.set(y,_),nu.set(y,n)},onIndexChange:(y,_)=>{Jl.set(y,_)}}});return ae.createElement(ste,{root:C,ancestor:C,renderElement:x,renderChunk:i})},lte=(e,t,n)=>{const r=YZ(e,t,n),i=te.useRef(r).current,s=[];i.length=r.length;for(let o=0;ote.useContext(hR),wm=te.createContext({}),ute=(e,t)=>e===t;function cte(e,t=ute,{deferred:n}={}){const r=te.useContext(wm);if(!r)throw new Error("The `useSlateSelector` hook must be used inside the component's context.");const{addEventListener:i}=r,s=As(),a=te.useCallback(()=>e(s),[s,e]),[o,l]=iR(a,t);return ns(()=>{const u=i(l,{deferred:n});return l(),u},[i,l,n]),o}function fte(){const e=te.useRef(new Set),t=te.useRef(new Set),n=te.useCallback(()=>{e.current.forEach(a=>a())},[]),r=te.useCallback(()=>{t.current.forEach(a=>a()),t.current.clear()},[]),i=te.useCallback((a,{deferred:o=!1}={})=>{const l=o?()=>t.current.add(a):a;return e.current.add(l),()=>{e.current.delete(l)}},[]);return{selectorContext:te.useMemo(()=>({addEventListener:i,flushDeferred:r}),[i,r]),onChange:n}}function dte(){const{flushDeferred:e}=te.useContext(wm);ns(e)}const hte=()=>{const{addEventListener:e}=te.useContext(wm),[,t]=te.useReducer(n=>n+1,0);if(!e)throw new Error("The `useSlate` hook must be used inside the component's context.");return ns(()=>e(t),[e]),As()};function pte(){const e=As(),t=te.useRef(!1),n=te.useRef(0),r=te.useCallback(()=>{if(t.current)return;t.current=!0;const i=Le.getWindow(e);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{t.current=!1})},[e]);return te.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}const mte=e=>Vi(e)&&e.hasAttribute("data-slate-placeholder"),gte=({addedNodes:e,removedNodes:t})=>{const n=[...Array.from(e),...Array.from(t)];return n.length>0&&n.every(mte)},pR=(e,t)=>{let n=[];const r=()=>{n=[]},i=a=>{if(!t.current)return;const o=a.filter(l=>!gte(l)&&BE(e,l,a));n.push(...o)};function s(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),r())}return{registerMutations:i,restoreDOM:s,clear:r}},vte=e=>{const t=te.useMemo(()=>{const n=pR(e,{current:!0});let r=null;const i=()=>{var u;(u=r)===null||u===void 0||u.disconnect(),r=null,n.clear()},s=()=>{r??(r=new MutationObserver(n.registerMutations)),r.observe(Le.toDOMNode(e,e),{childList:!0,subtree:!0})},a=u=>{!r&&!(u!=null&&u.includes(` -`))||s()},o=()=>{r&&(n.registerMutations(r.takeRecords()),r.disconnect())};return{observe:s,track:a,pause:o,restore:()=>{o(),n.restoreDOM()},clear:i}},[e]);return te.useEffect(()=>()=>t.clear(),[t]),t},I_=(e,t)=>{const n=Le.resolveDOMRange(e,{anchor:t,focus:t});if(!n)return null;const[r]=Array.from(n.getClientRects());return(r??n.getBoundingClientRect()).top},yte=(e,t)=>{const n=L.above(e,{at:t,match:o=>ie.isElement(o)&&L.isBlock(e,o)});if(!n)return null;const r=L.start(e,n[1]),i=L.before(e,r);if(!i||!L.leaf(e,i)[0].text.endsWith(` -`))return null;if(an.equals(t,r))return i;const s=I_(e,t),a=I_(e,r);return s===null||a===null||Math.abs(s-a)>2?null:i},M_=(e,t,n)=>{const r=L.above(e,{at:t,match:a=>ie.isElement(a)&&e.isInline(a)});if(!r||e.isVoid(r[0])||e.isElementReadOnly(r[0])||!(n?L.isStart(e,t,r[1]):L.isEnd(e,t,r[1]))||n&&!oe.hasPrevious(r[1]))return"character";const i=n?oe.previous(r[1]):oe.next(r[1]);if(!L.hasPath(e,i))return"character";const s=ie.get(e,i);return ie.isText(s)&&s.text===""?"offset":"character"},xte=e=>ts(e)&&e.nodeType===e.TEXT_NODE,bte=(e,t)=>{const{selection:n}=e;if(!n||!we.isCollapsed(n))return;const r=Us(Le.findDocumentOrShadowRoot(e)),i=r?.anchorNode;if(!r||!xte(i))return;const s=r.anchorOffset,a=s-t.length;if(a<0||i.data.slice(a,s)!==t||!Le.hasDOMNode(e,i,{editable:!0}))return;const o=Le.findPath(e,Le.toSlateNode(e,i));oe.equals(o,n.anchor.path)&&!L.void(e,{at:n})||i.deleteData(a,t.length)},L_=(e,t)=>{var n;return(n=L.above(e,{at:t,match:r=>ie.isElement(r)&&L.isBlock(e,r)}))===null||n===void 0?void 0:n[1]},mR=(e,t)=>{const[n,r]=we.edges(t),i=L_(e,n),s=L_(e,r);return!i||!s||i.length!==1||s.length!==1||i[0]>=s[0]||!L.isStart(e,n,i)||!L.isStart(e,r,s)?null:Array.from({length:s[0]-i[0]},(a,o)=>[i[0]+o])},wte=(e,t)=>mR(e,t)?t:L.unhangRange(e,t),z_=(e,t)=>{if(we.isCollapsed(t)){const s=L.void(e,{at:t});s&&Fe.removeNodes(e,{at:s[1],voids:!0});return}const n=mR(e,t);if(!n){Fe.select(e,t),L.deleteFragment(e);return}const r=L.pathRef(e,oe.next(n[n.length-1]));L.withoutNormalizing(e,()=>{for(const s of[...n].reverse())Fe.removeNodes(e,{at:s})});const i=r.unref();i&&Fe.select(e,L.start(e,i))},Ete={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};let gR=class extends te.Component{constructor(...t){super(...t),Zn(this,"context",null),Zn(this,"manager",null),Zn(this,"mutationObserver",null)}observe(){var t;const{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,Ete)}componentDidMount(){const{receivedUserInput:t}=this.props,n=this.context;this.manager=pR(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r;const i=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}};Zn(gR,"contextType",IE);const Cte=oi?gR:({children:e})=>ae.createElement(ae.Fragment,null,e),$w=new WeakMap,vR=te.createContext(!1),kte=()=>te.useContext(vR),Dte=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderChunk","renderLeaf","renderText","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Ste=["text"];function j_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ga(e){for(var t=1;tts(e)&&e.nodeType===3,_te=(e,t,n)=>{if(!we.isCollapsed(t)||!we.isCollapsed(n))return!1;const[r,i]=oe.isBefore(t.anchor.path,n.anchor.path)?[t.anchor,n.anchor]:[n.anchor,t.anchor];if(i.offset!==0||!oe.equals(oe.next(r.path),i.path))return!1;const s=ie.get(e,r.path);return ie.isText(s)&&r.offset===s.text.length},Ate=e=>ae.createElement(ae.Fragment,null,dR(e)),Tte=te.forwardRef((e,t)=>{const n=te.useCallback(le=>ae.createElement(Ote,ga({},le)),[]),{autoFocus:r,decorate:i=Bte,onDOMBeforeInput:s,placeholder:a,readOnly:o=!1,renderElement:l,renderChunk:u,renderLeaf:f,renderText:h,renderPlaceholder:m=n,scrollSelectionIntoView:g=Pte,style:b={},as:x="div",disableDefaultStyles:E=!1}=e,C=_p(e,Dte),y=hte(),[_,O]=te.useState(!1);ns(()=>($w.set(y,_),()=>{$w.delete(y)}),[y,_]);const S=te.useRef(null),w=te.useRef(y.children),A=te.useRef(y.selection),T=te.useRef(!1),P=te.useRef(!1),M=te.useRef([]),F=te.useRef(null),[z,$]=te.useState(),Y=te.useRef(!1),Z=vte(y),ve=te.useRef(!1),{onUserInput:me,receivedUserInput:re}=pte(),[,de]=te.useReducer(le=>le+1,0);Zh.set(y,de),Iw.set(y,o);const I=te.useMemo(()=>({isBlurring:!1,isDraggingInternally:!1,isTabbing:!1,pendingSelection:null,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);te.useEffect(()=>{!S.current||!r||(y.children.length>0?Le.focus(y):S.current.focus())},[r,y]);const X=te.useRef(void 0),ne=te.useMemo(()=>sZ(()=>{if(Xo.get(y)){ne();return}I.pendingSelection=null;const Se=Le.toDOMNode(y,y).getRootNode();if(!Y.current&&ma&&Se instanceof ShadowRoot){Y.current=!0,gZ()?document.execCommand("indent"):Fe.deselect(y),Y.current=!1;return}const Ne=X.current;if((oi||!Le.isComposing(y))&&(!I.isUpdatingSelection||Ne!=null&&Ne.isFlushing())&&!I.isDraggingInternally){const Be=Le.findDocumentOrShadowRoot(y),{activeElement:He}=Be,Ge=Le.toDOMNode(y,y),ut=Us(Be);if(He===Ge?(I.latestElement=He,Qo.set(y,!0)):Qo.delete(y),!ut)return Fe.deselect(y);const{anchorNode:Qe,focusNode:ot}=ut,ht=Le.hasEditableTarget(y,Qe)||Le.isTargetInsideNonReadonlyVoid(y,Qe),Wt=Le.hasTarget(y,ot),kt=ts(He)&&Ge.contains(He);if(ht&&Wt&&(o||kt||I.isBlurring)){const gt=Le.toSlateRange(y,ut,{exactMatch:!1,suppressThrow:!0});gt&&(!Le.isComposing(y)&&!(Ne!=null&&Ne.hasPendingChanges())&&!(Ne!=null&&Ne.isFlushing())?ut.isCollapsed&&!q_(Qe)&&y.selection&&we.equals(gt,y.selection)?$_(y,ut,I):Fe.select(y,gt):Ne?.handleUserSelect(gt))}o&&(!ht||!Wt)&&Fe.deselect(y)}},100),[y,o,I]),W=te.useMemo(()=>nZ(ne,0),[ne]),Te=te.useCallback(()=>{const le=Le.toDOMNode(y,y).getRootNode();W.flush(),ma&&le instanceof ShadowRoot||ne(),ne.flush()},[y,ne,W]);X.current=Bee({node:S,onDOMSelectionChange:ne,scheduleOnDOMSelectionChange:W}),ns(()=>{var le,Se;let Ne;S.current&&(Ne=OE(S.current))?(LP.set(y,Ne),Xl.set(y,S.current),ru.set(y,S.current),w0.set(S.current,y)):ru.delete(y);const{selection:Be}=y,He=T.current;T.current=!1;const Ge=P.current;P.current=!1;const ut=(He&&w.current!==y.children||Ge)&&!!Be&&(!A.current||!we.equals(A.current,Be));w.current=y.children,A.current=Be;const Qe=Le.findDocumentOrShadowRoot(y),ot=Us(Qe);if(!ot||!Le.isFocused(y)||(le=X.current)!==null&&le!==void 0&&le.hasPendingAction())return;const ht=Ln=>{const on=ot.type!=="None";if(!Be&&!on)return;const be=ot.focusNode;let G;if(eo&&ot.rangeCount>1){const Ke=ot.getRangeAt(0),qr=ot.getRangeAt(ot.rangeCount-1);Ke.startContainer===be?G=qr.endContainer:G=Ke.startContainer}else G=ot.anchorNode;const ft=Xl.get(y);let lt=!1;if(tu(ft,G)&&tu(ft,be)&&(lt=!0),on&<&&Be&&!Ln){var cn;const Ke=Le.toSlateRange(y,ot,{exactMatch:!0,suppressThrow:!0});if(Ke&&we.equals(Ke,Be)&&(!I.hasMarkPlaceholder||(cn=G)!==null&&cn!==void 0&&(cn=cn.parentElement)!==null&&cn!==void 0&&cn.hasAttribute("data-slate-mark-placeholder"))){ut&&g(y,ot.getRangeAt(0));return}}if(Be&&!Le.hasRange(y,Be)){y.selection=Le.toSlateRange(y,ot,{exactMatch:!1,suppressThrow:!0});return}const rn=I.pendingSelection;if(I.pendingSelection=null,rn&&!Ln&&rn.basedOn===Be&&!(Be&&we.equals(rn.range,Be))){Fe.select(y,rn.range);return}I.isUpdatingSelection=!0;const Lt=Be&&Le.resolveDOMRange(y,Be);return Lt?(Le.isComposing(y)&&!oi?ot.rangeCount>0&&ot.collapseToEnd():we.isBackward(Be)?ot.setBaseAndExtent(Lt.endContainer,Lt.endOffset,Lt.startContainer,Lt.startOffset):ot.setBaseAndExtent(Lt.startContainer,Lt.startOffset,Lt.endContainer,Lt.endOffset),g(y,Lt)):ot.removeAllRanges(),Lt};ot.rangeCount<=1&&ht();const Wt=((Se=X.current)===null||Se===void 0?void 0:Se.isFlushing())==="action";if(!oi||!Wt){setTimeout(()=>{I.isUpdatingSelection=!1});return}let kt=null;const gt=requestAnimationFrame(()=>{if(Wt){const Ln=on=>{const be=Xl.get(y);be&&(be.focus(),ht(on))};Ln(),kt=setTimeout(()=>{Ln(!0),I.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(gt),kt&&clearTimeout(kt)}});const je=te.useCallback(le=>{if(o){U_(le,s);return}if(!Le.hasEditableTarget(y,le.target))return;H_(y,le);const Ne=Le.toDOMNode(y,y).getRootNode();if(Y!=null&&Y.current&&ma&&Ne instanceof ShadowRoot){const ot=le.getTargetRanges()[0],ht=new window.Range;ht.setStart(ot.startContainer,ot.startOffset),ht.setEnd(ot.endContainer,ot.endOffset);const Wt=Le.toSlateRange(y,ht,{exactMatch:!1,suppressThrow:!0});Wt&&Fe.select(y,Wt),le.preventDefault(),le.stopImmediatePropagation();return}if(me(),T.current=!0,!U_(le,s)){var Be;if(X.current)return X.current.handleDOMBeforeInput(le);Te();const{selection:Qe}=y,{inputType:ot}=le,ht=le.dataTransfer||le.data||void 0,Wt=ot==="insertCompositionText"||ot==="deleteCompositionText";if(Wt&&Le.isComposing(y)){(Qf||ve.current)&&Z.track(le.data);return}let kt=!1,gt=null;if(ot==="insertText"&&Qe&&we.isCollapsed(Qe)&&le.data&&le.data.length===1&&/[a-z ]/i.test(le.data)&&Qe.anchor.offset!==0){kt=!0,(y.marks||typeof L.insertionPoint=="function"&&!an.equals(L.insertionPoint(y,Qe.anchor),Qe.anchor))&&(kt=!1);const on=Us(Le.findDocumentOrShadowRoot(y)),be=on?.anchorNode;if(q_(be)||(kt=!1),!Xo.get(y)){const{anchor:G}=Qe,ft=Le.resolveDOMPoint(y,G);if(!ft)kt=!1;else{var He,Ge;const[lt,cn]=ft,rn=(He=lt.parentElement)===null||He===void 0?void 0:He.closest("a"),Lt=Le.getWindow(y);if(kt&&rn&&Le.hasDOMNode(y,rn)){var ut;const Ke=Lt?.document.createTreeWalker(rn,NodeFilter.SHOW_TEXT).lastChild();Ke===lt&&((ut=Ke.textContent)===null||ut===void 0?void 0:ut.length)===cn&&(kt=!1)}if(kt&<.parentElement&&(Lt==null||(Ge=Lt.getComputedStyle(lt.parentElement))===null||Ge===void 0?void 0:Ge.whiteSpace)==="pre"){const Ke=L.above(y,{at:G.path,match:qr=>ie.isElement(qr)&&L.isBlock(y,qr)});Ke&&ie.string(Ke[0]).includes(" ")&&(kt=!1)}kt&&zb(lt)&&(gt=on!=null&&on.isCollapsed&&zb(be)?[be,on.anchorOffset]:[lt,cn])}}}if((!ot.startsWith("delete")||ot.startsWith("deleteBy"))&&!Xo.get(y)){const[on]=le.getTargetRanges();if(on){const be=Le.toSlateRange(y,on,{exactMatch:!1,suppressThrow:!0});if(!be)kt=!1;else if(!Qe||!we.equals(Qe,be)){kt=!1;const G=!Wt&&y.selection&&!_te(y,y.selection,be)&&L.rangeRef(y,y.selection);Fe.select(y,be),G&&Zf.set(y,G)}kt&&zb(on.startContainer)&&(gt=[on.startContainer,on.startOffset])}}if(Wt)return;if(kt||(F.current=null,le.preventDefault()),Qe&&we.isExpanded(Qe)&&ot.startsWith("delete")){const on=ot.endsWith("Backward")?"backward":"forward";L.deleteFragment(y,{direction:on});return}switch(ot){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{L.deleteFragment(y);break}case"deleteContent":case"deleteContentForward":{L.deleteForward(y);break}case"deleteContentBackward":{L.deleteBackward(y);break}case"deleteEntireSoftLine":{L.deleteBackward(y,{unit:"line"}),L.deleteForward(y,{unit:"line"});break}case"deleteHardLineBackward":{L.deleteBackward(y,{unit:"block"});break}case"deleteSoftLineBackward":{L.deleteBackward(y,{unit:"line"});break}case"deleteHardLineForward":{L.deleteForward(y,{unit:"block"});break}case"deleteSoftLineForward":{L.deleteForward(y,{unit:"line"});break}case"deleteWordBackward":{L.deleteBackward(y,{unit:"word"});break}case"deleteWordForward":{L.deleteForward(y,{unit:"word"});break}case"insertLineBreak":L.insertSoftBreak(y);break;case"insertParagraph":{L.insertBreak(y);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(ot==="insertFromComposition"&&Le.isComposing(y)&&(O(!1),Ea.set(y,!1)),ht?.constructor.name==="DataTransfer")Le.insertData(y,ht);else if(typeof ht=="string")if(kt){if(F.current=null,gt&&Qe){const[on]=L.leaf(y,Qe.anchor),[be,G]=gt;F.current={point:Qe.anchor,text:on.text,domNode:be,domOffset:G,domText:be.data,char:ht}}M.current.push(()=>L.insertText(y,ht))}else L.insertText(y,ht);break}}const Ln=(Be=Zf.get(y))===null||Be===void 0?void 0:Be.unref();Zf.delete(y),Ln&&(!y.selection||!we.equals(y.selection,Ln))&&Fe.select(y,Ln)}},[y,me,s,Z,Te,o]),$e=te.useCallback(le=>{le==null?(ne.cancel(),W.cancel(),Xl.delete(y),ru.delete(y),S.current&&$o&&S.current.removeEventListener("beforeinput",je)):$o&&le.addEventListener("beforeinput",je),S.current=le,typeof t=="function"?t(le):t&&(t.current=le)},[ne,W,y,je,t]);ns(()=>{const le=Le.getWindow(y),Se=()=>{const ut=X.current;if(I.isUpdatingSelection||I.isDraggingInternally||Le.isComposing(y)||ut!=null&&ut.hasPendingChanges()||ut!=null&&ut.isFlushing()||Xo.get(y))return null;const Qe=Us(Le.findDocumentOrShadowRoot(y));if(!Qe||!(Le.hasEditableTarget(y,Qe.anchorNode)||Le.isTargetInsideNonReadonlyVoid(y,Qe.anchorNode))||!Le.hasTarget(y,Qe.focusNode))return null;const ot=Le.toSlateRange(y,Qe,{exactMatch:!1,suppressThrow:!0});return ot?{range:ot,basedOn:y.selection}:null},Ne=({target:ut})=>{const Qe=ut instanceof HTMLElement?ut:null,ot=Qe?.tagName;ot==="INPUT"||ot==="TEXTAREA"||(I.pendingSelection=Se(),W())};le.document.addEventListener("selectionchange",Ne);const Be=ut=>{I.isTabbing=ut.key==="Tab"},He=()=>{I.isTabbing=!1};le.document.addEventListener("keydown",Be,!0),le.document.addEventListener("keyup",He,!0),le.document.addEventListener("pointerdown",He,!0);const Ge=()=>{I.isDraggingInternally=!1};return le.document.addEventListener("dragend",Ge),le.document.addEventListener("drop",Ge),()=>{le.document.removeEventListener("selectionchange",Ne),le.document.removeEventListener("keydown",Be,!0),le.document.removeEventListener("keyup",He,!0),le.document.removeEventListener("pointerdown",He,!0),le.document.removeEventListener("dragend",Ge),le.document.removeEventListener("drop",Ge)}},[y,W,I]);const Me=i([y,[]]),pe=Uee(i),Oe=a&&y.children.length===1&&Array.from(ie.texts(y)).length===1&&ie.string(y)===""&&!_,Ie=te.useCallback(le=>{if(le&&Oe){var Se;$((Se=le.getBoundingClientRect())===null||Se===void 0?void 0:Se.height)}else $(void 0)},[Oe]);if(Oe){const le=L.start(y,[]);Me.push({[Sc]:!0,placeholder:a,onPlaceholderResize:Ie,anchor:le,focus:le})}const{marks:ze}=y;if(I.hasMarkPlaceholder=!1,y.selection&&we.isCollapsed(y.selection)&&ze){const{anchor:le}=y.selection,Se=ie.leaf(y,le.path),{text:Ne}=Se,Be=_p(Se,Ste);if(!kn.equals(Se,ze,{loose:!0})){I.hasMarkPlaceholder=!0;const He=Object.fromEntries(Object.keys(Be).map(Ge=>[Ge,null]));Me.push(ga(ga(ga({[zP]:!0},He),ze),{},{anchor:le,focus:le}))}}return te.useEffect(()=>{setTimeout(()=>{const{selection:le}=y;if(le){const{anchor:Se}=le,Ne=ie.leaf(y,Se.path);if(ze&&!kn.equals(Ne,ze,{loose:!0})){Es.set(y,ze);return}}Es.delete(y)})}),dte(),ae.createElement(hR.Provider,{value:o},ae.createElement(vR.Provider,{value:_},ae.createElement(sR.Provider,{value:pe},ae.createElement(Cte,{node:S,receivedUserInput:re},ae.createElement(x,ga(ga({role:o?void 0:"textbox","aria-multiline":o?void 0:!0,"aria-placeholder":Oe?a:void 0,translate:"no"},C),{},{spellCheck:$o||!Xh?C.spellCheck:!1,autoCorrect:$o||!Xh?C.autoCorrect:"false",autoCapitalize:$o||!Xh?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!o,zindex:-1,suppressContentEditableWarning:!0,ref:$e,style:ga(ga({},E?{}:ga({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},z?{minHeight:z}:{})),b),onBeforeInput:te.useCallback(le=>{if(o){zn(le,C.onBeforeInput);return}if(!$o&&!zn(le,C.onBeforeInput)&&Le.hasSelectableTarget(y,le.target)&&(le.preventDefault(),!Le.isComposing(y))){const Se=le.data;L.insertText(y,Se)}},[C.onBeforeInput,y,o]),onInput:te.useCallback(le=>{if(o){zn(le,C.onInput);return}if(!Le.hasEditableTarget(y,le.target)||(Z.pause(),zn(le,C.onInput)))return;if(X.current){X.current.handleInput();return}for(const Be of M.current)Be();M.current=[];const Se=F.current;if(F.current=null,Se){const{point:Be,text:He,domNode:Ge,domOffset:ut,domText:Qe,char:ot}=Se,ht=ie.getIf(y,Be.path);if(kn.isText(ht)&&ht.text===He&&Ge.isConnected&&Ge.data===Qe.slice(0,ut)+ot+Qe.slice(ut)&&(Ge.deleteData(ut,ot.length),y.selection&&we.isCollapsed(y.selection)&&an.equals(y.selection.anchor,Be))){var Ne;(Ne=Us(Le.findDocumentOrShadowRoot(y)))===null||Ne===void 0||Ne.collapse(Ge,ut)}}Le.isFocused(y)||H_(y,le.nativeEvent)},[o,C.onInput,y,Z]),onBlur:te.useCallback(le=>{if(o){zn(le,C.onBlur);return}if(I.isUpdatingSelection||!Le.hasSelectableTarget(y,le.target)||zn(le,C.onBlur))return;const Se=Le.findDocumentOrShadowRoot(y);if(I.latestElement===Se.activeElement)return;const{relatedTarget:Ne}=le,Be=Le.toDOMNode(y,y);if(Ne!==Be&&!(Vi(Ne)&&Ne.hasAttribute("data-slate-spacer"))){if(Ne!=null&&ts(Ne)&&Le.hasDOMNode(y,Ne)){const He=Le.toSlateNode(y,Ne);if(ie.isElement(He)&&!y.isVoid(He))return}I.isBlurring=!0;try{Te()}finally{I.isBlurring=!1}if(ma){const He=Us(Se);He?.removeAllRanges()}Qo.delete(y)}},[o,I,y,C.onBlur,Te]),onClick:te.useCallback(le=>{if(Le.hasTarget(y,le.target)&&Te(),Le.hasTarget(y,le.target)&&!zn(le,C.onClick)&&ts(le.target)){const Ne=Le.toSlateNode(y,le.target);let Be;try{Be=Le.findPath(y,Ne)}catch{return}if(!L.hasPath(y,Be)||ie.get(y,Be)!==Ne)return;if(le.detail===$Z&&Be.length>=1){let ht=Be;if(!(ie.isElement(Ne)&&L.isBlock(y,Ne))){var Se;const kt=L.above(y,{match:gt=>ie.isElement(gt)&&L.isBlock(y,gt),at:Be});ht=(Se=kt?.[1])!==null&&Se!==void 0?Se:Be.slice(0,1)}const Wt=L.above(y,{at:L.start(y,ht),match:kt=>{var gt;return ie.isElement(kt)&&!!((gt=y.isIsolated)!==null&>!==void 0&>.call(y,kt))}});if(ht.length>1||Wt){const kt=L.range(y,ht);Fe.select(y,kt);return}}if(o)return;const He=L.start(y,Be),Ge=L.end(y,Be),ut=L.void(y,{at:He}),Qe=L.void(y,{at:Ge}),ot=y.selection&&we.isCollapsed(y.selection)&&L.void(y,{at:y.selection.anchor});if(le.shiftKey&&ot&&!oe.isAncestor(ot[1],Be)&&!(ut&&oe.equals(ut[1],ot[1]))){const ht=Le.resolveEventRange(y,le);if(!ht)return;const Wt=L.start(y,ot[1]),kt=L.end(y,ot[1]),gt=an.isBefore(ht.anchor,Wt)?kt:Wt;Fe.select(y,{anchor:gt,focus:ht.anchor});return}if(ut&&Qe&&oe.equals(ut[1],Qe[1])){if(le.shiftKey&&y.selection){const{anchor:Wt}=y.selection,kt=an.isBefore(Wt,He)?Ge:He;Fe.select(y,{anchor:Wt,focus:kt});return}const ht=L.range(y,He);Fe.select(y,ht)}}},[y,C.onClick,o,Te]),onCompositionEnd:te.useCallback(le=>{if(o){zn(le,C.onCompositionEnd);return}if(!Bf(le)&&Le.hasSelectableTarget(y,le.target)){var Se;Promise.resolve().then(()=>{O(!1),Ea.set(y,!1)}),(Se=X.current)===null||Se===void 0||Se.handleCompositionEnd(le);const Ne=ve.current;if(ve.current=!1,zn(le,C.onCompositionEnd)||oi){Z.clear();return}if(Ne&&!le.data&&(Z.restore(),L.deleteFragment(y)),!ma&&!t_&&!yZ&&!EZ&&!wZ&&le.data){const Be=Es.get(y);Es.delete(y),Be!==void 0&&(to.set(y,y.marks),y.marks=Be),Z.restore(),bte(y,le.data),L.insertText(y,le.data);const He=to.get(y);to.delete(y),He!==void 0&&(y.marks=He)}Z.clear()}},[o,C.onCompositionEnd,y,Z]),onCompositionUpdate:te.useCallback(le=>{if(o){zn(le,C.onCompositionUpdate);return}Le.hasSelectableTarget(y,le.target)&&!zn(le,C.onCompositionUpdate)&&!Bf(le)&&(Le.isComposing(y)||(O(!0),Ea.set(y,!0)))},[o,C.onCompositionUpdate,y]),onCompositionStart:te.useCallback(le=>{if(o){zn(le,C.onCompositionStart);return}if(!Bf(le)&&Le.hasSelectableTarget(y,le.target)){var Se;if((Se=X.current)===null||Se===void 0||Se.handleCompositionStart(le),zn(le,C.onCompositionStart)||oi)return;Z.clear(),O(!0),Te();const{selection:Ne}=y;if(Ne&&we.isExpanded(Ne)){if(eo&&!t_){Z.observe(),ve.current=!0;return}L.deleteFragment(y);return}}},[o,C.onCompositionStart,y,Z,Te]),onCopy:te.useCallback(le=>{Le.hasSelectableTarget(y,le.target)&&!zn(le,C.onCopy)&&!Bf(le)&&(le.preventDefault(),Le.setFragmentData(y,le.clipboardData,"copy"))},[C.onCopy,y]),onCut:te.useCallback(le=>{if(o){zn(le,C.onCut);return}if(Le.hasSelectableTarget(y,le.target)&&!zn(le,C.onCut)&&!Bf(le)){le.preventDefault(),V_(y),Le.setFragmentData(y,le.clipboardData,"cut");const{selection:Se}=y;if(Se)if(we.isExpanded(Se))z_(y,Se);else{const Ne=ie.parent(y,Se.anchor.path);L.isVoid(y,Ne)&&Fe.delete(y)}}},[o,y,C.onCut]),onDragOver:te.useCallback(le=>{if(o){zn(le,C.onDragOver);return}if(Le.hasTarget(y,le.target)&&!zn(le,C.onDragOver)){const Se=Le.toSlateNode(y,le.target);ie.isElement(Se)&&L.isVoid(y,Se)&&le.preventDefault()}},[o,C.onDragOver,y]),onDragStart:te.useCallback(le=>{if(o){zn(le,C.onDragStart);return}if(Le.hasTarget(y,le.target)&&!zn(le,C.onDragStart)){const Se=Le.toSlateNode(y,le.target),Ne=Le.findPath(y,Se);if(ie.isElement(Se)&&L.isVoid(y,Se)||L.void(y,{at:Ne,voids:!0})){const He=L.range(y,Ne);Fe.select(y,He)}V_(y),I.isDraggingInternally=!0,Le.setFragmentData(y,le.dataTransfer,"drag")}},[o,y,C.onDragStart,I]),onDrop:te.useCallback(le=>{if(o){zn(le,C.onDrop);return}if(Le.hasTarget(y,le.target)&&!zn(le,C.onDrop)){le.preventDefault();const Se=y.selection,Ne=Le.findEventRange(y,le,{suppressThrow:!0}),Be=le.dataTransfer;if(!Ne&&I.isDraggingInternally)return;if(Ne){if(Fe.select(y,Ne),I.isDraggingInternally&&Se){if(we.includes(Se,Ne.anchor))return;if(!L.void(y,{at:Ne,voids:!0})){const He=L.rangeRef(y,Ne);z_(y,Se);const Ge=He.unref();Ge&&Fe.select(y,Ge)}}}else!y.selection&&y.children.length>0&&Fe.select(y,L.end(y,[]));Le.insertData(y,Be),Le.isFocused(y)||Le.focus(y)}},[o,y,C.onDrop,I]),onDragEnd:te.useCallback(le=>{if(o){zn(le,C.onDragEnd);return}I.isDraggingInternally&&C.onDragEnd&&Le.hasTarget(y,le.target)&&C.onDragEnd(le)},[o,I,C,y]),onFocus:te.useCallback(le=>{if(o){zn(le,C.onFocus);return}if(!I.isUpdatingSelection&&Le.hasEditableTarget(y,le.target)&&!zn(le,C.onFocus)){const Se=Le.toDOMNode(y,y),Ne=Le.findDocumentOrShadowRoot(y);if(I.latestElement=Ne.activeElement,eo&&le.target!==Se){Se.focus();return}if(Qo.set(y,!0),I.isTabbing&&le.target===Se){const Be=Us(Ne);Be&&y.selection&&(I.pendingSelection=null,$_(y,Be,I)),I.isTabbing=!1}}},[o,I,y,C.onFocus]),onKeyDown:te.useCallback(le=>{if(o){zn(le,C.onKeyDown);return}if(Le.hasEditableTarget(y,le.target)){var Se;(Se=X.current)===null||Se===void 0||Se.handleKeyDown(le);const{nativeEvent:Ne}=le;if(Le.isComposing(y)&&(Ne.isComposing===!1||Nte(y,Ne))&&(Ea.set(y,!1),O(!1)),zn(le,C.onKeyDown)||Le.isComposing(y))return;P.current=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(Ne.key);const{selection:Be}=y,He=y.children[Be!==null?Be.focus.path[0]:0],Ge=NE(ie.string(He))==="rtl";if(Vn.isRedo(Ne)){le.preventDefault();const Qe=y;typeof Qe.redo=="function"&&Qe.redo();return}if(Vn.isUndo(Ne)){le.preventDefault();const Qe=y;typeof Qe.undo=="function"&&Qe.undo();return}if((Qf||ma)&&Ne.key==="ArrowUp"&&!Ne.altKey&&!Ne.ctrlKey&&!Ne.metaKey&&Be&&(Ne.shiftKey||we.isCollapsed(Be))){const Qe=yte(y,Be.focus);if(Qe){le.preventDefault(),Fe.select(y,Ne.shiftKey?{anchor:Be.anchor,focus:Qe}:Qe);return}}if(Vn.isMoveLineBackward(Ne)){le.preventDefault(),Fe.move(y,{unit:"line",reverse:!0});return}if(Vn.isMoveLineForward(Ne)){le.preventDefault(),Fe.move(y,{unit:"line"});return}if(Vn.isExtendLineBackward(Ne)){le.preventDefault(),Fe.move(y,{unit:"line",edge:"focus",reverse:!0});return}if(Vn.isExtendLineForward(Ne)){le.preventDefault(),Fe.move(y,{unit:"line",edge:"focus"});return}if(Vn.isMoveBackward(Ne)){le.preventDefault(),Be&&we.isCollapsed(Be)?Fe.move(y,{reverse:!Ge,unit:M_(y,Be.focus,!Ge)}):Fe.collapse(y,{edge:Ge?"end":"start"});return}if(Vn.isMoveForward(Ne)){le.preventDefault(),Be&&we.isCollapsed(Be)?Fe.move(y,{reverse:Ge,unit:M_(y,Be.focus,Ge)}):Fe.collapse(y,{edge:Ge?"start":"end"});return}const ut=Vn.isMoveWordBackward(Ne);if(ut||Vn.isMoveWordForward(Ne)){le.preventDefault();const Qe=Le.findDocumentOrShadowRoot(y),ot=Us(Qe);if(ot!=null&&ot.modify){ot.modify("move",ut?"left":"right","word");const ht=Le.toSlateRange(y,ot,{exactMatch:!1,suppressThrow:!0});if(ht){Fe.select(y,ht);return}}Be&&we.isExpanded(Be)&&Fe.collapse(y,{edge:"focus"}),Fe.move(y,{unit:"word",reverse:ut?!Ge:Ge});return}if($o){if((Qf||ma)&&Be&&(Vn.isDeleteBackward(Ne)||Vn.isDeleteForward(Ne))&&we.isCollapsed(Be)){const Qe=ie.parent(y,Be.anchor.path);if(ie.isElement(Qe)&&L.isVoid(y,Qe)&&(L.isInline(y,Qe)||L.isBlock(y,Qe))){le.preventDefault(),Vn.isDeleteForward(Ne)?L.deleteForward(y,{unit:"block"}):L.deleteBackward(y,{unit:"block"});return}}if(ma&&Be&&we.isCollapsed(Be)){if(Vn.isDeleteBackward(Ne)&&L.isStart(y,Be.anchor,[])){le.preventDefault(),L.deleteBackward(y);return}if(Vn.isDeleteForward(Ne)&&L.isEnd(y,Be.anchor,[])){le.preventDefault(),L.deleteForward(y);return}}}else{if(Vn.isBold(Ne)||Vn.isItalic(Ne)||Vn.isTransposeCharacter(Ne)){le.preventDefault();return}if(Vn.isSoftBreak(Ne)){le.preventDefault(),L.insertSoftBreak(y);return}if(Vn.isSplitBlock(Ne)){le.preventDefault(),L.insertBreak(y);return}if(Vn.isDeleteBackward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"backward"}):L.deleteBackward(y);return}if(Vn.isDeleteForward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"forward"}):L.deleteForward(y);return}if(Vn.isDeleteLineBackward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"backward"}):L.deleteBackward(y,{unit:"line"});return}if(Vn.isDeleteLineForward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"forward"}):L.deleteForward(y,{unit:"line"});return}if(Vn.isDeleteWordBackward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"backward"}):L.deleteBackward(y,{unit:"word"});return}if(Vn.isDeleteWordForward(Ne)){le.preventDefault(),Be&&we.isExpanded(Be)?L.deleteFragment(y,{direction:"forward"}):L.deleteForward(y,{unit:"word"});return}}}},[o,y,C.onKeyDown]),onPaste:te.useCallback(le=>{if(o){zn(le,C.onPaste);return}Le.hasEditableTarget(y,le.target)&&!zn(le,C.onPaste)&&(!$o||cZ(le.nativeEvent)||ma)&&(le.preventDefault(),Le.insertData(y,le.clipboardData))},[o,y,C.onPaste])}),ae.createElement(Ate,{decorations:Me,node:y,renderElement:l,renderChunk:u,renderPlaceholder:m,renderLeaf:f,renderText:h}))))))}),Nte=(e,t)=>{const{selection:n}=e;return!!n&&we.isCollapsed(n)&&(Vn.isDeleteBackward(t)||Vn.isDeleteForward(t))&&!!L.void(e,{at:n})},q_=e=>{var t;return ts(e)&&e.nodeType===e.TEXT_NODE&&!!((t=e.parentElement)!==null&&t!==void 0&&t.closest("[data-slate-string], [data-slate-zero-width]"))},$_=(e,t,n)=>{if(!e.selection)return;const r=Le.resolveDOMRange(e,e.selection);if(!r)return;const i=we.isBackward(e.selection);n.isUpdatingSelection=!0,t.setBaseAndExtent(i?r.endContainer:r.startContainer,i?r.endOffset:r.startOffset,i?r.startContainer:r.endContainer,i?r.startOffset:r.endOffset),setTimeout(()=>{n.isUpdatingSelection=!1})},V_=e=>{const{selection:t}=e;if(t&&we.isExpanded(t)){const n=wte(e,t);we.equals(n,t)||Fe.select(e,n)}},Ote=({attributes:e,children:t})=>ae.createElement("span",ga({},e),t,oi&&ae.createElement("br",null)),Bte=()=>[],Pte=(e,t)=>{const{selection:n}=e,r=!!n&&we.isBackward(n),i=n&&!r&&we.isExpanded(n)?L.unhangRange(e,n):n,s=i&&n&&!we.equals(i,n)?Le.toDOMRange(e,i):t.cloneRange();if(s.collapse(r),s.getBoundingClientRect){const a=s.startContainer.parentElement,o=s.getBoundingClientRect();if(o.width===0&&o.height===0&&o.x===0&&o.y===0){const u=a.getBoundingClientRect();if(u.width>0||u.height>0)return}a.getBoundingClientRect=s.getBoundingClientRect.bind(s),iB(a,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}),delete a.getBoundingClientRect}},zn=(e,t)=>{if(!t)return!1;const n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},Bf=e=>ts(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),U_=(e,t)=>{if(!t)return!1;const n=t(e);return n??e.defaultPrevented},H_=(e,t)=>{const n=e;if(t.inputType==="historyUndo"&&typeof n.undo=="function"){n.undo();return}if(t.inputType==="historyRedo"&&typeof n.redo=="function"){n.redo();return}},yR=te.createContext(!1),Rte=()=>te.useContext(yR),xR=parseInt(ae.version.split(".")[0],10),Fte=["editor","children","onChange","onSelectionChange","onValueChange","initialValue","value"],Ite=e=>{const{editor:t,children:n,onChange:r,onSelectionChange:i,onValueChange:s,initialValue:a,value:o}=e,l=_p(e,Fte),u=te.useRef(null),f=te.useRef(void 0),h=te.useRef(void 0),m=te.useRef(void 0);if(o!==void 0&&a!==void 0)throw new Error("[Slate] value and initialValue cannot be used together.");if(o!==void 0&&!ie.isNodeList(o))throw new Error(`[Slate] value is invalid! Expected a list of elements but got: ${Jn.stringify(o)}`);if(u.current!==t){var g;if(!L.isEditor(t))throw new Error(`[Slate] editor is invalid! You passed: ${Jn.stringify(t)}`);if(a===void 0&&o===void 0&&t.children.length===0)throw new Error("[Slate] editor.children is empty and no initialValue was provided. If this is intentional, pass initialValue={[]} to the Slate component.");const S=(g=a??o)!==null&&g!==void 0?g:t.children;if(!ie.isNodeList(S))throw new Error(`[Slate] initialValue is invalid! Expected a list of elements but got: ${Jn.stringify(S)}`);const w=a===void 0&&o===void 0?S:S.map(zw),A=w.every((T,P)=>T===S[P])?S:w;t.children=A.length>0?A:[{children:[{text:""}]}],Object.assign(t,l),u.current=t,f.current=void 0,h.current=o}const{selectorContext:b,onChange:x}=fte(),E=te.useCallback(()=>{const S=t.operations.some(A=>A.type!=="set_selection"),w=S&&t.children===m.current;m.current=void 0,S&&!w&&(f.current=t.children),r&&r(t.children),i&&t.operations.find(A=>A.type==="set_selection")&&i(t.selection),s&&S&&!w&&s(t.children),x()},[t,x,r,i,s]),C=o!==void 0,y=te.useCallback(()=>{const S=()=>E();return Qh.set(t,S),()=>{Qh.get(t)===S&&Qh.delete(t)}},[t,E]);te.useEffect(()=>{if(!C)return y()},[C,y]),ns(()=>{if(C)return y()},[C,y]),ns(()=>{let S;const w=()=>{var A;if(o===void 0)return;if(o===f.current){h.current=o;return}if(o===h.current)return;if(Le.isComposing(t)||$w.get(t)||ba.get(t)||(A=Lr.get(t))!==null&&A!==void 0&&A.length){S=window.requestAnimationFrame(w);return}const T=t.children;h.current=o,Fe.setChildren(t,o),T!==t.children&&(m.current=t.children,x())};return w(),()=>{S!==void 0&&window.cancelAnimationFrame(S)}},[t,o,x]);const[_,O]=te.useState(Le.isFocused(t));return te.useEffect(()=>{O(Le.isFocused(t))},[t]),ns(()=>{const S=()=>O(Le.isFocused(t));return xR>=17?(document.addEventListener("focusin",S),document.addEventListener("focusout",S),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",S)}):(document.addEventListener("focus",S,!0),document.addEventListener("blur",S,!0),()=>{document.removeEventListener("focus",S,!0),document.removeEventListener("blur",S,!0)})},[t]),ae.createElement(wm.Provider,{value:b},ae.createElement(IE.Provider,{value:t},ae.createElement(yR.Provider,{value:_},n)))},Mte=({suppressThrow:e=!1}={})=>{const t=ote();if(!t)return!1;const n=te.useCallback(r=>{if(!r.selection)return!1;try{const i=Le.findPath(r,t),s=L.range(r,i);return!!we.intersection(s,r.selection)}catch(i){if(e)return!1;throw i}},[t,e]);return cte(n,void 0,{deferred:!0})},Lte=new Set(["insert_node","move_node","remove_node","set_node"]),zte=(e,t="x-slate-fragment")=>{let n=e;n=LZ(n,t);const{onChange:r,apply:i,insertText:s}=n;return n.getChunkSize=()=>null,oi&&(n.insertText=(a,o)=>(xa.delete(n),s(a,o))),n.onChange=a=>{(xR<18?wN.unstable_batchedUpdates:l=>l())(()=>{r(a)})},n.apply=a=>{if(oi&&Lte.has(a.type)){var o;(o=tR.get(n))===null||o===void 0||o()}if(a.type==="move_node"){const l=ie.parent(n,a.path);if(!!n.getChunkSize(l)){const f=ie.get(n,a.path),h=uR(n,l),m=Le.findKey(n,f);h.movedNodeKeys.add(m)}}i(a)},n};/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @lightSyntaxTransform - * @noflow - * @nolint - * @preventMunge - * @preserve-invariant-messages - */var jb,W_;function jte(){if(W_)return jb;W_=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,a=(re,de)=>{for(var I in de)t(re,I,{get:de[I],enumerable:!0})},o=(re,de,I,X)=>{if(de&&typeof de=="object"||typeof de=="function")for(let ne of r(de))!s.call(re,ne)&&ne!==I&&t(re,ne,{get:()=>de[ne],enumerable:!(X=n(de,ne))||X.enumerable});return re},l=(re,de,I)=>(I=re!=null?e(i(re)):{},o(!re||!re.__esModule?t(I,"default",{value:re,enumerable:!0}):I,re)),u=re=>o(t({},"__esModule",{value:!0}),re),f={};a(f,{$dispatcherGuard:()=>T,$makeReadOnly:()=>M,$reset:()=>P,$structuralCheck:()=>me,c:()=>_,clearRenderCounterRegistry:()=>z,renderCounterRegistry:()=>F,useRenderCounter:()=>Z}),jb=u(f);var h=l(Nc()),{useRef:m,useEffect:g,isValidElement:b}=h,x,E=(x=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?x:h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.memo_cache_sentinel"),y,_=typeof((y=h.__COMPILER_RUNTIME)==null?void 0:y.c)=="function"?h.__COMPILER_RUNTIME.c:function(de){return h.useMemo(()=>{const I=new Array(de);for(let X=0;X{O[re]=()=>{throw new Error(`[React] Unexpected React hook call (${re}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var S=null;O.useMemoCache=re=>{if(S==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return S.useMemoCache(re)};function w(re){return E.ReactCurrentDispatcher.current=re,E.ReactCurrentDispatcher.current}var A=[];function T(re){const de=E.ReactCurrentDispatcher.current;if(re===0){if(A.push(de),A.length===1&&(S=de),de===O)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");w(O)}else if(re===1){const I=A.pop();if(I==null)throw new Error("React Compiler internal error: unexpected null in guard stack");A.length===0&&(S=null),w(I)}else if(re===2)A.push(de),w(S);else if(re===3){const I=A.pop();if(I==null)throw new Error("React Compiler internal error: unexpected null in guard stack");w(I)}else throw new Error("React Compiler internal error: unreachable block"+re)}function P(re){for(let de=0;de{de.count=0})}function $(re,de){let I=F.get(re);I==null&&(I=new Set,F.set(re,I)),I.add(de)}function Y(re,de){const I=F.get(re);I?.delete(de)}function Z(re){const de=m(null);de.current!=null&&(de.current.count+=1),g(()=>{if(de.current==null){const I={count:0};$(re,I),de.current=I}return()=>{de.current!==null&&Y(re,de.current)}})}var ve=new Set;function me(re,de,I,X,ne,W){function Te(Me,pe,Oe,Ie){const ze=`${X}:${W} [${ne}] ${I}${Oe} changed from ${Me} to ${pe} at depth ${Ie}`;ve.has(ze)||(ve.add(ze),console.error(ze))}const je=2;function $e(Me,pe,Oe,Ie){if(!(Ie>je)){if(Me===pe)return;if(typeof Me!=typeof pe)Te(`type ${typeof Me}`,`type ${typeof pe}`,Oe,Ie);else if(typeof Me=="object"){const ze=Array.isArray(Me),le=Array.isArray(pe);if(Me===null&&pe!==null)Te("null",`type ${typeof pe}`,Oe,Ie);else if(pe===null)Te(`type ${typeof Me}`,"null",Oe,Ie);else if(Me instanceof Map)if(!(pe instanceof Map))Te("Map instance","other value",Oe,Ie);else if(Me.size!==pe.size)Te(`Map instance with size ${Me.size}`,`Map instance with size ${pe.size}`,Oe,Ie);else for(const[Se,Ne]of Me)pe.has(Se)?$e(Ne,pe.get(Se),`${Oe}.get(${Se})`,Ie+1):Te(`Map instance with key ${Se}`,`Map instance without key ${Se}`,Oe,Ie);else if(pe instanceof Map)Te("other value","Map instance",Oe,Ie);else if(Me instanceof Set)if(!(pe instanceof Set))Te("Set instance","other value",Oe,Ie);else if(Me.size!==pe.size)Te(`Set instance with size ${Me.size}`,`Set instance with size ${pe.size}`,Oe,Ie);else for(const Se of pe)Me.has(Se)||Te(`Set instance without element ${Se}`,`Set instance with element ${Se}`,Oe,Ie);else if(pe instanceof Set)Te("other value","Set instance",Oe,Ie);else if(ze||le)if(ze!==le)Te(`type ${ze?"array":"object"}`,`type ${le?"array":"object"}`,Oe,Ie);else if(Me.length!==pe.length)Te(`array with length ${Me.length}`,`array with length ${pe.length}`,Oe,Ie);else for(let Se=0;Sete.useContext(qte);function bR(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&bR(e[r],t[r]),!0):e===t}const Vte=te.createContext({activeScopes:[],hotkeys:[],disableScope:()=>{},enableScope:()=>{},toggleScope:()=>{}}),Ute=()=>te.useContext(Vte),wR=new Set(["alt","control","ctrl","meta","mod","shift"]),Hte={AltLeft:"alt",AltRight:"alt",ControlLeft:"ctrl",ControlRight:"ctrl",down:"arrowdown",esc:"escape",left:"arrowleft",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",return:"enter",right:"arrowright",ShiftLeft:"shift",ShiftRight:"shift",up:"arrowup"},Wte=/key|digit|numpad/;function _c(e){return(Hte[e.trim()]||e.trim()).toLowerCase().replace(Wte,"")}function Kte(e){return wR.has(e)}function qb(e,t=","){return e.toLowerCase().split(t)}function $b(e,t="+",n=!1,r){const i=e.toLocaleLowerCase().split(t).map(o=>_c(o)),s={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),meta:i.includes("meta"),mod:i.includes("mod"),shift:i.includes("shift"),useKey:n},a=i.filter(o=>!wR.has(o));return{...s,keys:a,description:r}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&CR([_c(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&kR([_c(e.code)])})),typeof window<"u"&&window.addEventListener("blur",()=>{Zo.clear()});const Zo=new Set;function ER(e){return Array.isArray(e)}function Gte(e,t=","){return(ER(e)?e:e.split(t)).every(n=>Zo.has(n.trim().toLowerCase()))}function CR(e){const t=Array.isArray(e)?e:[e];if(Zo.has("meta"))for(const n of Zo)Kte(n)||Zo.delete(n.toLowerCase());for(const n of t)Zo.add(n.toLowerCase())}function kR(e){const t=Array.isArray(e)?e:[e];if(e==="meta")Zo.clear();else for(const n of t)Zo.delete(n.toLowerCase())}const Ql={Alt:"Alt",Mod:"Mod",Shift:"Shift"};function Yte(e){const t=te.useRef(void 0);return bR(t.current,e)||(t.current=e),t.current}function Jte(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Xte(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Qte(e){return DR(e,["input","textarea","select"])}function DR({target:e},t=!1){const n=e&&e.tagName;return ER(t)?!!(n&&t?.some(r=>r.toLowerCase()===n.toLowerCase())):!!(n&&t&&t)}function Zte(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}const ene=(e,t,n=!1)=>{const{keys:r,alt:i,ctrl:s,meta:a,mod:o,shift:l,useKey:u}=t,{key:f,altKey:h,code:m,ctrlKey:g,metaKey:b,shiftKey:x}=e,E=_c(m);if(u&&r?.length===1&&r.includes(f))return!0;if(!r?.includes(E)&&!["alt","control","ctrl","meta","os","shift","unknown"].includes(E))return!1;if(!n){if(i!==h&&E!=="alt"||l!==x&&E!=="shift")return!1;if(o){if(!b&&!g)return!1}else if(a!==b&&E!=="meta"&&E!=="os"||s!==g&&E!=="ctrl"&&E!=="control")return!1}return r&&r.length===1&&r.includes(E)?!0:r?Gte(r):!r},K_=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},tne=typeof window>"u"?te.useEffect:te.useLayoutEffect;function Vw(e,t,n,r){const[i,s]=te.useState(null),a=te.useRef(!1),o=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=te.useMemo(()=>Array.isArray(e)&&e.length>0&&Array.isArray(e[0])?e.map(x=>x.map(E=>E.toString()).join(o?.splitKey||"+")).join(o?.delimiter||","):Array.isArray(e)?e.join(o?.delimiter||","):e,[e,o?.splitKey,o?.delimiter]),u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,f=te.useCallback(t,u??[]),h=te.useRef(f);h.current=u?f:t;const m=Yte(o),{activeScopes:g}=Ute(),b=$te();return tne(()=>{if(m?.enabled===!1||!Zte(g,m?.scopes))return;const x=(_,O=!1)=>{if(!(Qte(_)&&!DR(_,m?.enableOnFormTags))){if(i!==null){const S=i.getRootNode();if((S instanceof Document||S instanceof ShadowRoot)&&S.activeElement!==i&&!i.contains(S.activeElement)){K_(_);return}}_.target?.isContentEditable&&!m?.enableOnContentEditable||qb(l,m?.delimiter).forEach(S=>{const w=$b(S,m?.splitKey,m?.useKey);if(ene(_,w,m?.ignoreModifiers)||w.keys?.includes("*")){if((m?.ignoreEventWhenPrevented??!0)&&_.defaultPrevented||m?.ignoreEventWhen?.(_)||O&&a.current)return;if(!Xte(_,w,m?.enabled)){K_(_);return}h.current(_,w),Jte(_,w,m?.preventDefault),O||(a.current=!0)}})}},E=_=>{_.code!==void 0&&(CR(_c(_.code)),(m?.keydown===void 0&&m?.keyup!==!0||m?.keydown)&&x(_))},C=_=>{_.code!==void 0&&(kR(_c(_.code)),a.current=!1,m?.keyup&&x(_,!0))},y=i||o?.document||document;if(y.addEventListener("keyup",C),y.addEventListener("keydown",E),b)for(const _ of qb(l,m?.delimiter))b.addHotkey($b(_,m?.splitKey,m?.useKey,m?.description));return()=>{if(y.removeEventListener("keyup",C),y.removeEventListener("keydown",E),b)for(const _ of qb(l,m?.delimiter))b.removeHotkey($b(_,m?.splitKey,m?.useKey,m?.description))}},[i,l,m,g]),s}const Kr={};let nne=0;function Ui(e,t){const n=`atom${++nne}`,r={toString:()=>n};return typeof e=="function"?r.read=e:(r.init=e,r.read=rne,r.write=ine),t&&(r.write=t),r}function rne(e){return e(this)}function ine(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const Vb=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,Ub=e=>"init"in e,Hb=e=>!!e.write,Ap=new WeakMap,sne=(e,t)=>{Ap.set(e,t),e.catch(()=>{}).finally(()=>Ap.delete(e))},G_=(e,t)=>{const n=Ap.get(e);n&&(Ap.delete(e),n(t))},Y_=(e,t)=>{e.status="fulfilled",e.value=t},J_=(e,t)=>{e.status="rejected",e.reason=t},ane=e=>typeof e?.then=="function",Pf=(e,t)=>!!e&&"v"in e&&"v"in t&&Object.is(e.v,t.v),X_=(e,t)=>!!e&&"e"in e&&"e"in t&&Object.is(e.e,t.e),Xu=e=>!!e&&"v"in e&&e.v instanceof Promise,one=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,wh=e=>{if("e"in e)throw e.e;return e.v},SR=()=>{const e=new WeakMap,t=new WeakMap,n=[],r=new WeakMap;let i,s;(Kr?"production":void 0)!=="production"&&(i=new Set,s=new Set);const a=T=>e.get(T),o=(T,P)=>{P.d.forEach((M,F)=>{if(!r.has(F)){const z=a(F);r.set(F,[z,new Set]),z&&o(F,z)}r.get(F)[1].add(T)})},l=(T,P)=>{var M;(Kr?"production":void 0)!=="production"&&Object.freeze(P);const F=a(T);if(e.set(T,P),(M=n[n.length-1])==null||M.add(T),r.has(T)||(r.set(T,[F,new Set]),o(T,P)),Xu(F)){const z="v"in P?P.v instanceof Promise?P.v:Promise.resolve(P.v):Promise.reject(P.e);F.v!==z&&G_(F.v,z)}},u=(T,P,M,F)=>{const z=new Map(F?P.d:null);let $=!1;M.forEach((Y,Z)=>{!Y&&Vb(T,Z)&&(Y=P),Y?(z.set(Z,Y),P.d.get(Z)!==Y&&($=!0)):(Kr?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),($||P.d.size!==z.size)&&(P.d=z)},f=(T,P,M,F)=>{const z=a(T),$={d:z?.d||new Map,v:P};if(M&&u(T,$,M,F),Pf(z,$)&&z.d===$.d)return z;if(Xu(z)&&Xu($)&&one(z,$)){if(z.d===$.d)return z;$.v=z.v}return l(T,$),$},h=(T,P,M,F)=>{if(ane(P)){let z;const $=()=>{const Z=a(T);if(!Xu(Z)||Z.v!==Y)return;const ve=f(T,Y,M);t.has(T)&&Z.d!==ve.d&&S(T,ve,Z.d)},Y=new Promise((Z,ve)=>{let me=!1;P.then(re=>{me||(me=!0,Y_(Y,re),Z(re),$())},re=>{me||(me=!0,J_(Y,re),ve(re),$())}),z=re=>{me||(me=!0,re.then(de=>Y_(Y,de),de=>J_(Y,de)),Z(re))}});return Y.orig=P,Y.status="pending",sne(Y,Z=>{Z&&(z(Z),F?.())}),f(T,Y,M,!0)}return f(T,P,M)},m=(T,P,M)=>{const F=a(T),z={d:F?.d||new Map,e:P};return M&&u(T,z,M),X_(F,z)&&F.d===z.d?F:(l(T,z),z)},g=(T,P)=>{const M=a(T);if(!P?.(T)&&M&&(t.has(T)||Array.from(M.d).every(([me,re])=>{if(me===T)return!0;const de=g(me,P);return de===re||Pf(de,re)})))return M;const F=new Map;let z=!0;const $=me=>{if(Vb(T,me)){const de=a(me);if(de)return F.set(me,de),wh(de);if(Ub(me))return F.set(me,void 0),me.init;throw new Error("no atom init")}const re=g(me,P);return F.set(me,re),wh(re)};let Y,Z;const ve={get signal(){return Y||(Y=new AbortController),Y.signal},get setSelf(){return(Kr?"production":void 0)!=="production"&&!Hb(T)&&console.warn("setSelf function cannot be used with read-only atom"),!Z&&Hb(T)&&(Z=(...me)=>{if((Kr?"production":void 0)!=="production"&&z&&console.warn("setSelf function cannot be called in sync"),!z)return C(T,...me)}),Z}};try{const me=T.read($,ve);return h(T,me,F,()=>Y?.abort())}catch(me){return m(T,me,F)}finally{z=!1}},b=T=>wh(g(T)),x=T=>{const P=Z=>{var ve,me;const re=new Set((ve=t.get(Z))==null?void 0:ve.t);return(me=r.get(Z))==null||me[1].forEach(de=>{re.add(de)}),re},M=new Array,F=new Set,z=Z=>{if(!F.has(Z)){F.add(Z);for(const ve of P(Z))Z!==ve&&z(ve);M.push(Z)}};z(T);const $=new Set([T]),Y=Z=>F.has(Z);for(let Z=M.length-1;Z>=0;--Z){const ve=M[Z],me=a(ve);if(!me)continue;let re=!1;for(const de of me.d.keys())if(de!==ve&&$.has(de)){re=!0;break}if(re){const de=g(ve,Y);o(ve,de),Pf(me,de)||$.add(ve)}F.delete(ve)}},E=(T,...P)=>{const M=$=>wh(g($)),F=($,...Y)=>{const Z=n.length>0;Z||n.push(new Set([$]));let ve;if(Vb(T,$)){if(!Ub($))throw new Error("atom not writable");const me=a($),re=h($,Y[0]);Pf(me,re)||x($)}else ve=E($,...Y);if(!Z){const me=w(n.pop());(Kr?"production":void 0)!=="production"&&i.forEach(re=>re({type:"async-write",flushed:me}))}return ve};return T.write(M,F,...P)},C=(T,...P)=>{n.push(new Set([T]));const M=E(T,...P),F=w(n.pop());return(Kr?"production":void 0)!=="production"&&i.forEach(z=>z({type:"write",flushed:F})),M},y=(T,P,M)=>{var F;const z=t.get(T);if(z)return P&&z.t.add(P),z;const $=M||[];(F=a(T))==null||F.d.forEach((Z,ve)=>{ve!==T&&y(ve,T,$)}),g(T);const Y={t:new Set(P&&[P]),l:new Set};if(t.set(T,Y),(Kr?"production":void 0)!=="production"&&s.add(T),Hb(T)&&T.onMount){const{onMount:Z}=T;$.push(()=>{const ve=Z((...me)=>C(T,...me));ve&&(Y.u=ve)})}return M||$.forEach(Z=>Z()),Y},_=(T,P)=>!P.l.size&&(!P.t.size||P.t.size===1&&P.t.has(T)),O=(T,P)=>{if(!_(T,P))return;const M=P.u;M&&M(),t.delete(T),(Kr?"production":void 0)!=="production"&&s.delete(T);const F=a(T);F?(Xu(F)&&G_(F.v),F.d.forEach((z,$)=>{if($!==T){const Y=t.get($);Y&&(Y.t.delete(T),O($,Y))}})):(Kr?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",T)},S=(T,P,M)=>{const F=new Set(P.d.keys()),z=new Set;M?.forEach(($,Y)=>{if(F.has(Y)){F.delete(Y);return}z.add(Y);const Z=t.get(Y);Z&&Z.t.delete(T)}),F.forEach($=>{y($,T)}),z.forEach($=>{const Y=t.get($);Y&&O($,Y)})},w=T=>{let P;(Kr?"production":void 0)!=="production"&&(P=new Set);const M=[],F=z=>{var $;if(!r.has(z))return;const[Y,Z]=r.get(z);r.delete(z),M.push([z,Y]),Z.forEach(F),($=a(z))==null||$.d.forEach((ve,me)=>F(me))};if(T.forEach(F),M.forEach(([z,$])=>{const Y=a(z);if(!Y){(Kr?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(Y!==$){const Z=t.get(z);Z&&Y.d!==$?.d&&S(z,Y,$?.d),Z&&!(!Xu($)&&(Pf($,Y)||X_($,Y)))&&(Z.l.forEach(ve=>ve()),(Kr?"production":void 0)!=="production"&&P.add(z))}}),(Kr?"production":void 0)!=="production")return P},A=(T,P)=>{const M=y(T),F=w([T]),z=M.l;return z.add(P),(Kr?"production":void 0)!=="production"&&i.forEach($=>$({type:"sub",flushed:F})),()=>{z.delete(P),O(T,M),(Kr?"production":void 0)!=="production"&&i.forEach($=>$({type:"unsub"}))}};return(Kr?"production":void 0)!=="production"?{get:b,set:C,sub:A,dev_subscribe_store:T=>(i.add(T),()=>{i.delete(T)}),dev_get_mounted_atoms:()=>s.values(),dev_get_atom_state:T=>e.get(T),dev_get_mounted:T=>t.get(T),dev_restore_atoms:T=>{n.push(new Set);for(const[M,F]of T)Ub(M)&&(h(M,F),x(M));const P=w(n.pop());i.forEach(M=>M({type:"restore",flushed:P}))}}:{get:b,set:C,sub:A}};let Rf;const lne=()=>(Rf||(Rf=SR(),(Kr?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Rf),globalThis.__JOTAI_DEFAULT_STORE__!==Rf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Rf),Uw=SR,Kl=lne,une={},cne=te.createContext(void 0),ME=e=>{const t=te.useContext(cne);return e?.store||t||Kl()},fne=e=>typeof e?.then=="function",dne=ae.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function _R(e,t){const n=ME(t),[[r,i,s],a]=te.useReducer(u=>{const f=n.get(e);return Object.is(u[0],f)&&u[1]===n&&u[2]===e?u:[f,n,e]},void 0,()=>[n.get(e),n,e]);let o=r;(i!==n||s!==e)&&(a(),o=n.get(e));const l=t?.delay;return te.useEffect(()=>{const u=n.sub(e,()=>{if(typeof l=="number"){setTimeout(a,l);return}a()});return a(),u},[n,e,l]),te.useDebugValue(o),fne(o)?dne(o):o}function LE(e,t){const n=ME(t);return te.useCallback((...i)=>{if((une?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function hne(e,t){return[_R(e,t),LE(e,t)]}const pne={},Wb=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),mne=new WeakMap,gne=(e,t,n,r)=>{const i=Wb(()=>new WeakMap,mne,t),s=Wb(()=>new WeakMap,i,n);return Wb(e,s,r)};function AR(e,t,n=Object.is){return gne(()=>{const r=Symbol(),i=([a,o])=>{if(o===r)return t(a);const l=t(a,o);return n(o,l)?o:l},s=Ui(a=>{const o=a(s),l=a(e);return i([l,o])});return s.init=r,s},e,t,n)}const vne=e=>typeof e?.then=="function";function yne(e=()=>{try{return window.localStorage}catch(n){(pne?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const s={getItem:(l,u)=>{var f,h;const m=b=>{if(b=b||"",r!==b){try{i=JSON.parse(b,t?.reviver)}catch{return u}r=b}return i},g=(h=(f=e())==null?void 0:f.getItem(l))!=null?h:null;return vne(g)?g.then(m):m(g)},setItem:(l,u)=>{var f;return(f=e())==null?void 0:f.setItem(l,JSON.stringify(u,void 0))},removeItem:l=>{var u;return(u=e())==null?void 0:u.removeItem(l)}},a=l=>(u,f,h)=>l(u,m=>{let g;try{g=JSON.parse(m||"")}catch{g=h}f(g)});let o;try{o=(n=e())==null?void 0:n.subscribe}catch{}return!o&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(o=(l,u)=>{if(!(e()instanceof window.Storage))return()=>{};const f=h=>{h.storageArea===e()&&h.key===l&&u(h.newValue)};return window.addEventListener("storage",f),()=>{window.removeEventListener("storage",f)}}),o&&(s.subscribe=a(o)),s}yne();const Q_=new WeakMap;function xne(e,t){const n=ME(t),r=bne(n);for(const[i,s]of e)(!r.has(i)||t?.dangerouslyForceHydrate)&&(r.add(i),n.set(i,s))}const bne=e=>{let t=Q_.get(e);return t||(t=new WeakSet,Q_.set(e,t)),t};var wne=Object.defineProperty,Tp=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,NR=Object.prototype.propertyIsEnumerable,Z_=(e,t,n)=>t in e?wne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Np=(e,t)=>{for(var n in t||(t={}))TR.call(t,n)&&Z_(e,n,t[n]);if(Tp)for(var n of Tp(t))NR.call(t,n)&&Z_(e,n,t[n]);return e},zE=(e,t)=>{var n={};for(var r in e)TR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tp)for(var r of Tp(e))t.indexOf(r)<0&&NR.call(e,r)&&(n[r]=e[r]);return n},eA=e=>typeof e=="function"?{__fn:e}:e,Ene=e=>e&&typeof e=="object"&&"__fn"in e?e.__fn:e,Cne=e=>{const t=Ui(eA(e));return Ui(n=>Ene(n(t)),(n,r,i)=>r(t,eA(i)))},kne=(e,t,n={})=>{const r=ae.useMemo(()=>{const i=[];for(const s of Object.keys(e)){const a=t[s];a!==void 0&&i.push([e[s],a])}return i},[e,t]);xne(r,n)},Dne=(e,t,{skipInitialValues:n,store:r}={})=>{const i=ae.useMemo(()=>Object.entries(e),[e]),s=ae.useMemo(()=>Ui(null,(l,u,f)=>{const h=f.previousValues;for(const[m,g]of i){const b=f.values[m];b!=null&&(h&&Object.is(h[m],b)||u(g,b))}}),[i]),a=LE(s,{store:r}),o=ae.useRef(n);ae.useEffect(()=>{a({previousValues:o.current,values:t}),o.current=t},[a,t])},Op=(e,t)=>`${e}:${t}`,Hw="provider",Ww=ae.createContext(new Map),Sne=(e,t=Hw,n=!0)=>{var r;const i=ae.useContext(Ww),s=(r=i.get(Op(e,t)))!=null?r:i.get(Op(e,Hw));return!s&&n&&console.warn(`Tried to access jotai store '${e}' outside of a matching provider.`),s},_ne=e=>{var t=e,{initialValues:n,children:r,store:i,atoms:s}=t,a=zE(t,["initialValues","children","store","atoms"]);const o=Np(Np({},n),a);return kne(s,o,{store:i}),Dne(s,a,{store:i,skipInitialValues:a}),ae.createElement(ae.Fragment,null,r)},Ane=(e,t,n={})=>{const r=n.effect;return i=>{var s=i,{store:a,scope:o,children:l,resetKey:u}=s,f=zE(s,["store","scope","children","resetKey"]);const[h,m]=ae.useState(()=>a??Uw()),g=a??h;ae.useEffect(()=>{!a&&u&&m(Uw())},[u,a]);const b=ae.useContext(Ww),x=ae.useMemo(()=>{const E=new Map(b);return o&&E.set(Op(e,o),g),E.set(Op(e,Hw),g),E},[b,g,o]);return ae.createElement(Ww.Provider,{value:x},ae.createElement(_ne,Np({store:g,atoms:t},f),!!r&&ae.createElement(r,null),l))}},tA=(e="")=>e.length>0?e[0].toUpperCase()+e.slice(1):"",Tne=e=>!!e&&typeof e=="object"&&"read"in e&&typeof e.read=="function",Eh=(e={})=>typeof e=="string"?{scope:e}:e,nA=e=>e,Vc=(e,{name:t,delay:n,effect:r,extend:i,suppressWarnings:s})=>{const a={},o={},l={};function u(F,z){this.options=F,this.store=z}for(const[F,z]of Object.entries(e)){const $=Tne(z)?z:Cne(z);a[F]=$;const Y="write"in $;l[F]=Y,Y&&(o[F]=$)}const f=Np({},a);if(i){const F=i(a);for(const[z,$]of Object.entries(F))f[z]=$,l[z]="write"in $}const h=(F={})=>{const{scope:z,store:$,warnIfNoStore:Y=!s}=Eh(F),Z=Sne(t,z,!$&&Y);return $??Z},m=(F,z,$,Y=nA,Z,ve)=>{var me,re;const de=Eh($),I=typeof Z=="function"?Z:void 0;ve=(me=typeof Z=="function"?ve:Z)!=null?me:[Y,I];const[X,ne]=ae.useMemo(()=>[Y,I],ve),W=ae.useMemo(()=>X===nA&&!ne?F:AR(F,X,ne),[F,X,ne]);return _R(W,{store:z,delay:(re=de.delay)!=null?re:n})},g=(F,z,$)=>(z??Kl()).get(F),b=(F,z,$)=>LE(F,{store:z}),x=(F,z,$)=>(...Y)=>(z??Kl()).set(F,...Y),E=(F,z,$)=>{const{delay:Y=n}=Eh($);return hne(F,{store:z,delay:Y})},C=(F,z,$)=>Y=>{z??(z=Kl());const Z=z.sub(F,()=>{Y(z.get(F))});return()=>Z()};for(const F of Object.keys(f)){const z=f[F],$=l[F],Y=tA(F);u.prototype[`use${Y}Value`]=function(Z,ve,me){return m(z,this.store,this.options,Z,ve,me)},u.prototype[`get${Y}`]=function(){return g(z,this.store,this.options)},u.prototype[`subscribe${Y}`]=function(Z){return C(z,this.store,this.options)(Z)},$&&(u.prototype[`useSet${Y}`]=function(){return b(z,this.store,this.options)},u.prototype[`set${Y}`]=function(...Z){return x(z,this.store,this.options)(...Z)},u.prototype[`use${Y}State`]=function(){return E(z,this.store,this.options)})}const y=(F,z,$,Y=$)=>{u.prototype[F]=function(Z,...ve){const me=f[Z];return $(me,this.store,this.options,...ve)},u.prototype[z]=function(Z,...ve){return Y(Z,this.store,this.options,...ve)}};y("useValue","useAtomValue",m),y("get","getAtom",g),y("useSet","useSetAtom",b),y("set","setAtom",(F,z,$,...Y)=>x(F,z)(...Y),x),y("useState","useAtomState",E),y("subscribe","subscribeAtom",(F,z,$,Y)=>C(F,z)(Y),C);const _=Ane(t,o,{effect:r}),O={atom:f,name:t},S=(F={})=>{const z=Eh(F),$=h(z);return te.useMemo(()=>new u(z,$),[$,z.delay,z.scope,z.store,z.warnIfNoStore])},w=(F,z)=>{var $;const Y=($=h(z))!=null?$:Kl();return E(f[F],Y,z)},A=(F,z={},$)=>{var Y=z,{equalityFn:Z,selector:ve}=Y,me=zE(Y,["equalityFn","selector"]),re;const de=(re=h(me))!=null?re:Kl();return m(f[F],de,me,ve,Z??$,Z&&$)},T=(F,z)=>{var $;const Y=($=h(z))!=null?$:Kl();return b(f[F],Y)},P=tA(t),M=t.length===0?"store":`${t}Store`;return{[`${P}Provider`]:_,[M]:O,[`use${P}Store`]:S,[`use${P}State`]:w,[`use${P}Value`]:A,[`use${P}Set`]:T,name:t}};function mi(e,t,n,r,i){return e.useValue(t,n,r,i)}function Zl(e,t){return e.useSet(t)}function OR(e,t,n,r,i){return e.useAtomValue(t,n,r,i)}const Nne=Symbol(),BR=Symbol(),Ff="a",tp="w";let One=(e,t)=>new Proxy(e,t);const Kw=Object.getPrototypeOf,rA=new WeakMap,Bne=e=>e&&(rA.has(e)?rA.get(e):Kw(e)===Object.prototype||Kw(e)===Array.prototype),iA=e=>typeof e=="object"&&e!==null,Pne=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(n=>{n.configurable=!0}),Object.create(Kw(e),t)},PR=e=>e[BR]||e,RR=(e,t,n,r)=>{if(!Bne(e))return e;let i=r&&r.get(e);if(!i){const l=PR(e);i=(u=>Object.values(Object.getOwnPropertyDescriptors(u)).some(f=>!f.configurable&&!f.writable))(l)?[l,Pne(l)]:[l],r?.set(e,i)}const[s,a]=i;let o=n&&n.get(s);return o&&o[1].f===!!a||(o=((l,u)=>{const f={f:u};let h=!1;const m=(b,x)=>{if(!h){let E=f[Ff].get(l);if(E||(E={},f[Ff].set(l,E)),b===tp)E[tp]=!0;else{let C=E[b];C||(C=new Set,E[b]=C),C.add(x)}}},g={get:(b,x)=>x===BR?l:(m("k",x),RR(Reflect.get(b,x),f[Ff],f.c,f.t)),has:(b,x)=>x===Nne?(h=!0,f[Ff].delete(l),!0):(m("h",x),Reflect.has(b,x)),getOwnPropertyDescriptor:(b,x)=>(m("o",x),Reflect.getOwnPropertyDescriptor(b,x)),ownKeys:b=>(m(tp),Reflect.ownKeys(b))};return u&&(g.set=g.deleteProperty=()=>!1),[g,f]})(s,!!a),o[1].p=One(a||s,o[0]),n&&n.set(s,o)),o[1][Ff]=t,o[1].c=n,o[1].t=r,o[1].p},Gw=(e,t,n,r,i=Object.is)=>{if(i(e,t))return!1;if(!iA(e)||!iA(t))return!0;const s=n.get(PR(e));if(!s)return!0;if(r){const o=r.get(e);if(o&&o.n===t)return o.g;r.set(e,{n:t,g:!1})}let a=null;try{for(const o of s.h||[])if(a=Reflect.has(e,o)!==Reflect.has(t,o),a)return a;if(s[tp]===!0){if(a=((o,l)=>{const u=Reflect.ownKeys(o),f=Reflect.ownKeys(l);return u.length!==f.length||u.some((h,m)=>h!==f[m])})(e,t),a)return a}else for(const o of s.o||[])if(a=!!Reflect.getOwnPropertyDescriptor(e,o)!=!!Reflect.getOwnPropertyDescriptor(t,o),a)return a;for(const o of s.k||[])if(a=Gw(e[o],t[o],n,r,i),a)return a;return a===null&&(a=!0),a}finally{r&&r.set(e,{n:t,g:a})}},Rne=e=>()=>{const[,n]=te.useReducer(f=>f+1,0),r=new WeakMap,i=te.useRef(),s=te.useRef(),a=te.useRef();te.useEffect(()=>{i.current=r,s.current!==a.current&&Gw(s.current,a.current,r,new WeakMap)&&(s.current=a.current,n())});const o=te.useCallback(f=>(a.current=f,s.current&&s.current!==f&&i.current&&!Gw(s.current,f,i.current,new WeakMap)?s.current:(s.current=f,f)),[]),l=e(o),u=te.useMemo(()=>new WeakMap,[]);return RR(l,r,u)};var Kb={exports:{}},Gb={},Yb={exports:{}},Jb={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sA;function Fne(){if(sA)return Jb;sA=1;var e=Nc();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function o(h,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),x=b[0].inst,E=b[1];return s(function(){x.value=g,x.getSnapshot=m,l(x)&&E({inst:x})},[h,g,m]),i(function(){return l(x)&&E({inst:x}),h(function(){l(x)&&E({inst:x})})},[h]),a(g),g}function l(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function u(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return Jb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Jb}var aA;function Ine(){return aA||(aA=1,Yb.exports=Fne()),Yb.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var oA;function Mne(){if(oA)return Gb;oA=1;var e=Nc(),t=Ine();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return Gb.useSyncExternalStoreWithSelector=function(u,f,h,m,g){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=o(function(){function C(w){if(!y){if(y=!0,_=w,w=m(w),g!==void 0&&x.hasValue){var A=x.value;if(g(A,w))return O=A}return O=w}if(A=O,r(_,w))return A;var T=m(w);return g!==void 0&&g(A,T)?(_=w,A):(_=w,O=T)}var y=!1,_,O,S=h===void 0?null:h;return[function(){return C(f())},S===null?void 0:function(){return C(S())}]},[f,h,m,g]);var E=i(u,b[0],b[1]);return a(function(){x.hasValue=!0,x.value=E},[E]),l(E),E},Gb}var lA;function Lne(){return lA||(lA=1,Kb.exports=Mne()),Kb.exports}var zne=Lne();const jne=Nr(zne),{useSyncExternalStoreWithSelector:qne}=jne,$ne=e=>e;function Vne(e,t=$ne,n){const r=qne(e.subscribe,e.getState,e.getInitialState,t,n);return ae.useDebugValue(r),r}const uA=(e,t)=>{const n=M4(e),r=(i,s=t)=>Vne(n,i,s);return Object.assign(r,n),r},Une=((e,t)=>e?uA(e,t):uA);var Hne=(e,t)=>qB(e,t,{selectWithStore:(n,r)=>t.useStore(n,r)}),Wne=e=>bp(e,{extendSelectors:(t,n)=>Hne(t,n),extendActions:(t,n)=>jB(t,n)}),Kne=(e,t)=>{const n=$B(e,t),r=Une(n.stateCreator),i=Rne(r),s=f=>i()[f],a=VB(r,{name:n.name,isMutative:n.isMutative}),o=(f,h)=>r(m=>m[f],h),u={...a,store:r,useStore:r,useValue:o,useState:(f,h)=>[o(f,h),g=>a.set(f,g)],useTracked:s,useTrackedStore:i};return Wne(u)},Em=Kne;function Gne(e,t,...n){return e.useValue(t,...n)}var Yne=(e,t,n)=>e.useStore(t,n),Xb,cA;function Jne(){if(cA)return Xb;cA=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Xb=e,Xb}var Qb,fA;function Xne(){if(fA)return Qb;fA=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(s);++i1),C}),i(m,o(m),b),x&&(b=t(b,l|u|f,s));for(var E=g.length;E--;)n(b,g[E]);return b});return n2=h,n2}var nre=tre();const rre=Nr(nre);var gA=Object.prototype.hasOwnProperty;function vA(e,t,n){for(n of e.keys())if(t0(n,t))return n}function t0(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&t0(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=vA(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=vA(t,i),!i)||!t0(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(gA.call(e,n)&&++r&&!gA.call(t,n)||!(n in t)||!t0(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function ire(e){const t=ae.useRef(e),n=ae.useRef(0);return t0(e,t.current)||(t.current=e,n.current+=1),ae.useMemo(()=>t.current,[n.current])}function yA(e,t){return ae.useMemo(e,ire(t))}var sre=Object.defineProperty,jE=(e,t)=>sre(e,"name",{value:t,configurable:!0});function Yw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}jE(Yw,"setRef");function FR(...e){return t=>{let n=!1;const r=e.map(i=>{const s=Yw(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;iare(e,"name",{value:t,configurable:!0});function MR(e){const t=te.forwardRef((n,r)=>{let{children:i,...s}=n,a=null,o=!1;const l=[];i=VR(i),te.Children.forEach(i,m=>{if(qR(m)){o=!0;const g=m;let b="child"in g.props?g.props.child:g.props.children;for(;qE(b)&&typeof Bp=="function";)b=Bp(b._payload);a=ure(g,b),l.push(a?.props?.children)}else l.push(m)}),a?a=te.cloneElement(a,void 0,l):!o&&te.Children.count(i)===1&&te.isValidElement(i)&&(a=i);const u=a?jR(a):void 0,f=IR(r,u);if(!a){if(i||i===0)throw new Error(o?dre(e):fre(e));return i}const h=zR(s,a.props??{});return a.type!==te.Fragment&&(h.ref=r?f:u),te.cloneElement(a,h)});return t.displayName=`${e}.Slot`,t}ss(MR,"createSlot");var ore=MR("Slot"),LR=Symbol.for("radix.slottable");function lre(e){const t=ss(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=LR,t}ss(lre,"createSlottable");var ure=ss((e,t)=>"child"in e.props?te.isValidElement(t)?te.cloneElement(t,void 0,e.props.children(t.props.children)):null:te.isValidElement(t)?t:null,"getSlottableElementFromSlottable");function zR(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"?n[r]=[i,s].filter(Boolean).join(" "):r==="aria-describedby"&&(n[r]=UR(s,i))}return{...e,...n}}ss(zR,"mergeProps");function jR(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ss(jR,"getElementRef");function qR(e){return te.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LR}ss(qR,"isSlottable");var cre=Symbol.for("react.lazy");function qE(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cre&&"_payload"in e&&$R(e._payload)}ss(qE,"isLazyComponent");function $R(e){return typeof e=="object"&&e!==null&&"then"in e}ss($R,"isPromiseLike");function VR(e){let t=e;for(;qE(t)&&typeof Bp=="function";)t=Bp(t._payload);return t}ss(VR,"useUnwrappedLazy");function UR(...e){const t=new Set;for(const n of e)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}ss(UR,"concatAriaDescribedby");var fre=ss(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),dre=ss(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Bp=a$[" use ".trim().toString()];const $E=e=>ae.forwardRef((t,n)=>{const r=Zt.c(8);let i,s,a;r[0]!==t?({as:i,asChild:a,...s}=t,r[0]=t,r[1]=i,r[2]=s,r[3]=a):(i=r[1],s=r[2],a=r[3]);const o=a!==void 0&&a?ore:i||e;let l;return r[4]!==o||r[5]!==s||r[6]!==n?(l=ae.createElement(o,{ref:n,...s}),r[4]=o,r[5]=s,r[6]=n,r[7]=l):l=r[7],l});$E("div");ae.memo(e=>{const t=Zt.c(2),{children:n}=e;let r;return t[0]!==n?(r=ae.createElement(ae.Fragment,null,n),t[0]=n,t[1]=r):r=t[1],r});$E("span");const hre=(e,t)=>{if(typeof e=="function")return e(t);e!=null&&(e.current=t)},pre=(...e)=>t=>{const n=[];if(e.forEach(r=>{const i=hre(r,t);typeof i=="function"&&n.push(i)}),n.length>0)return()=>{for(const r of n)r?.()}},Cm=(...e)=>ae.useCallback(pre(...e),e),gu=e=>{const t=$E(e);return({propsHook:n,stateHook:r}={})=>ae.forwardRef((i,s)=>{const a=Zt.c(17);let o,l,u,f,h,m,g;if(a[0]!==i){const{asChild:T,className:P,getClassName:M,options:F,setProps:z,state:$,style:Y,...Z}=i;o=T,l=P,u=F,h=z,m=$,g=Y,f=Z,a[0]=i,a[1]=o,a[2]=l,a[3]=u,a[4]=f,a[5]=h,a[6]=m,a[7]=g}else o=a[1],l=a[2],u=a[3],f=a[4],h=a[5],m=a[6],g=a[7];const b=Pr(m)?m:r?r(u):void 0,{hidden:x,props:E,ref:C}=n?n(b):{hidden:!1,props:{},ref:null},y=Cm(s,C),_=Pr(E?.className)||Pr(l)?Ss(E?.className,l):void 0,O=E?.style||g?{...E?.style,...g}:void 0;if(!o&&x)return null;const S=t,w=h?.(E??{})??{};let A;return a[8]!==S||a[9]!==y||a[10]!==o||a[11]!==_||a[12]!==E||a[13]!==f||a[14]!==O||a[15]!==w?(A=ae.createElement(S,{asChild:o,ref:y,...E,className:_,style:O,...f,...w}),a[8]=S,a[9]=y,a[10]=o,a[11]=_,a[12]=E,a[13]=f,a[14]=O,a[15]=w,a[16]=A):A=a[16],A})},mre=typeof window<"u"&&window.document?.createElement!==void 0;mre?ae.useLayoutEffect:ae.useEffect;const r2=(e,t=[])=>{const n=ae.useRef(e);return n.current=e,ae.useCallback((...r)=>n.current(...r),t)},po=e=>e,VE=e=>({_tag:"Left",value:e}),km=e=>({_tag:"Right",value:e}),gre=(e,t,n)=>n._tag==="Left"?e(n.value):t(n.value),HR={dimap:(e,t,n)=>r=>t(n(e(r))),first:e=>([t,n])=>[e(t),n],right:e=>t=>t._tag==="Left"?t:km(e(t.value)),wander:e=>t=>t.map(e)},vre={empty:()=>{},foldMap:(e,t)=>{for(let n=0;n[],foldMap:(e,t)=>{let n=[];return t.forEach(r=>{n=n.concat(e(r))}),n}},UE=e=>({dimap:(t,n,r)=>i=>r(t(i)),first:t=>([n,r])=>t(n),right:t=>n=>n._tag==="Left"?e.empty():t(n.value),wander:t=>n=>e.foldMap(t,n)}),i2={Equivalence:{Equivalence:"Equivalence",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Iso:{Equivalence:"Iso",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Lens:{Equivalence:"Lens",Iso:"Lens",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Prism:{Equivalence:"Prism",Iso:"Prism",Lens:"Prism",Prism:"Prism",Traversal:"Traversal",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Traversal:{Equivalence:"Traversal",Iso:"Traversal",Lens:"Traversal",Prism:"Traversal",Traversal:"Traversal",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:"Setter"},Getter:{Equivalence:"Getter",Iso:"Getter",Lens:"Getter",Prism:"AffineFold",Traversal:"Fold",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},AffineFold:{Equivalence:"AffineFold",Iso:"AffineFold",Lens:"AffineFold",Prism:"AffineFold",Traversal:"Fold",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},Fold:{Equivalence:"Fold",Iso:"Fold",Lens:"Fold",Prism:"Fold",Traversal:"Fold",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:void 0},Setter:{Equivalence:void 0,Iso:void 0,Lens:void 0,Prism:void 0,Traversal:void 0,Getter:void 0,AffineFold:void 0,Fold:void 0,Setter:void 0}},Uc=(e,t)=>{const n=t;return n._tag=e,n},WR=e=>(e._removable=!0,e);function Bn(e,t,n){switch(arguments.length){case 2:{const r=(i,s)=>e(i,t(i,s));return r._tag=i2[e._tag][t._tag],r._removable=t._removable||!1,r}default:{const r=i2[e._tag][t._tag],i=(s,a)=>e(s,t(s,n(s,a)));return i._tag=i2[r][n._tag],i._removable=n._removable||!1,i}}}const xre=Uc("Equivalence",(e,t)=>t),Dm=(e,t)=>Uc("Iso",(n,r)=>n.dimap(e,t,r)),as=(e,t)=>Uc("Lens",(n,r)=>n.dimap(i=>[e(i),i],t,n.first(r))),HE=(e,t)=>Uc("Prism",(n,r)=>n.dimap(e,i=>gre(po,t,i),n.right(r))),WE=Uc("Traversal",(e,t)=>e.dimap(po,po,e.wander(t))),bre=e=>Uc("Getter",(t,n)=>t.dimap(e,po,n)),KR=(e,t,n)=>e(HR,t)(n),wre=(e,t,n)=>e(HR,()=>t)(n),Ere=(e,t)=>e(UE({}),po)(t),Cre=(e,t)=>e(UE(vre),po)(t),GR=(e,t)=>e(UE(yre),n=>[n])(t),kre=Dm(e=>e.map((t,n)=>[n,t]),e=>{const t=[...e].sort((r,i)=>r[0]-i[0]),n=[];for(let r=0;ras(t=>t[e],([t,n])=>Object.assign(Object.assign({},n),{[e]:t})),Dre=e=>as(t=>{const n={};for(const r of e)n[r]=t[r];return n},([t,n])=>{const r=Object.assign({},n);for(const i of e)delete r[i];return Object.assign(r,t)}),YR=e=>as(t=>t[e],([t,n])=>{const r=n.slice();return r[e]=t,r}),KE=YR(0),GE=e=>HE(t=>e(t)?km(t):VE(t),po),S0=Symbol("__no_match__"),JR=GE(e=>e!==S0),XR=Symbol("__remove_me__"),s2=e=>WR(Bn(as(t=>0<=e&&e{if(t===S0)return n;if(t===XR)return typeof n=="string"?n.substring(0,e)+n.substring(e+1):[...n.slice(0,e),...n.slice(e+1)];if(typeof n=="string")return e===0?t+n.substring(1):e===n.length?n.substring(0,e-1)+t:n.substring(0,e)+t+n.substring(e+1);{const r=n.slice();return r[e]=t,r}}),JR)),Sre=HE(e=>e===void 0?VE(void 0):km(e),po),_re=e=>HE(t=>e(t)?km(t):VE(t),po),Are=e=>WR(Bn(as(t=>{const n=t.findIndex(e);return n===-1?[S0,-1]:[t[n],n]},([[t,n],r])=>{if(t===S0)return r;if(t===XR)return[...r.slice(0,n),...r.slice(n+1)];const i=r.slice();return i[n]=t,i}),KE,JR)),Tre=e=>Bn(as(t=>{const n=t.map((r,i)=>e(r)?i:null).filter(r=>r!=null);return[n.map(r=>t[r]),n]},([[t,n],r])=>{const i=r.length,s=t.length;let a=0,o=0,l=0;const u=[];for(;aas(t=>t===void 0?e:t,([t,n])=>t),Ore=e=>Bn(as(t=>{const n=GR(e,t);return[n,n.length]},([[t,n],r])=>{if(t.length!==n)throw new Error("cannot add/remove elements through partsOf");let i=0;return KR(e,()=>t[i++],r)}),KE),Bre=e=>as(t=>e(t),([t,n])=>t),Pre=e=>as(t=>t,([t,n])=>e(t)),Rre=as(e=>{},([e,t])=>e===void 0?t:[e,...t]),Fre=as(e=>{},([e,t])=>e===void 0?t:[...t,e]),Ire=Bn(Dm(e=>e.split(""),e=>e.join("")),WE),Mre=Bn(Dm(e=>e.split(/\b/),e=>e.join("")),WE,GE(e=>!/\s+/.test(e)));class Un{constructor(t){this._ref=t}get _tag(){return this._ref._tag}get _removable(){return this._ref._removable}compose(t){return new Un(Bn(this._ref,t._ref))}iso(t,n){return new Un(Bn(this._ref,Dm(t,n)))}lens(t,n){return new Un(Bn(this._ref,as(t,([r,i])=>n(i,r))))}indexed(){return new Un(Bn(this._ref,kre))}prop(t){return new Un(Bn(this._ref,xA(t)))}path(...t){return t.length===1&&(t=t[0].split(".")),new Un(t.reduce((n,r)=>Bn(n,xA(r)),this._ref))}pick(t){return new Un(Bn(this._ref,Dre(t)))}nth(t){return new Un(Bn(this._ref,YR(t)))}filter(t){return new Un(Bn(this._ref,Tre(t)))}valueOr(t){return new Un(Bn(this._ref,Nre(t)))}partsOf(t){const n=typeof t=="function"?t(QR):t;return new Un(Bn(this._ref,Ore(n._ref)))}reread(t){return new Un(Bn(this._ref,Bre(t)))}rewrite(t){return new Un(Bn(this._ref,Pre(t)))}optional(){return new Un(Bn(this._ref,Sre))}guard_(){return t=>this.guard(t)}guard(t){return new Un(Bn(this._ref,_re(t)))}at(t){return new Un(Bn(this._ref,s2(t)))}head(){return new Un(Bn(this._ref,s2(0)))}index(t){return new Un(Bn(this._ref,s2(t)))}find(t){return new Un(Bn(this._ref,Are(t)))}elems(){return new Un(Bn(this._ref,WE))}to(t){return new Un(Bn(this._ref,bre(t)))}when(t){return new Un(Bn(this._ref,GE(t)))}chars(){return new Un(Bn(this._ref,Ire))}words(){return new Un(Bn(this._ref,Mre))}prependTo(){return new Un(Bn(this._ref,Rre))}appendTo(){return new Un(Bn(this._ref,Fre))}}const QR=new Un(xre);function Lre(){return QR}function zre(e){return t=>Ere(e._ref,t)}function jre(e){return t=>Cre(e._ref,t)}function qre(e){return t=>GR(e._ref,t)}function $re(e){return t=>n=>KR(e._ref,t,n)}function Vre(e){return t=>n=>wre(e._ref,t,n)}const bA=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),Ure=new WeakMap,Hre=(e,t,n)=>{const r=bA(()=>new WeakMap,Ure,t);return bA(e,r,n)},Wre=e=>typeof e=="function";function Kre(e,t){return Hre(()=>{const n=t(Lre());return Ui(i=>{const s=i(e);return s instanceof Promise?s.then(a=>wA(n,a)):wA(n,s)},(i,s,a)=>{const o=Wre(a)?$re(n)(a):Vre(n)(a),l=i(e);return s(e,l instanceof Promise?l.then(o):o(l))})},e,t)}const wA=(e,t)=>e._tag==="Traversal"?qre(e)(t):e._tag==="Prism"?jre(e)(t):zre(e)(t),Gre=e=>{const t=Zt.c(4),{attributes:n,children:r,lowest:i}=e;if(!i)return r;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={contentVisibility:"auto"},t[0]=s):s=t[0];let a;return t[1]!==n||t[2]!==r?(a=ae.createElement("div",{...n,style:s},r),t[1]=n,t[2]=r,t[3]=a):a=t[3],a},Yre=["configure","configurePlugin","extendEditorApi","extendSelectors","extendApi","extendEditorTransforms","extendTransforms","overrideEditor","extend","extendPlugin"];function un(e,t){const n={...e};return Yre.forEach(r=>{const i=n[r];n[r]=(...s)=>un(i(...s))}),t?n.extend(t):n}function YE(e,t){return un(e,t)}const Sm=(e={})=>un(Jt(e));function Hc(e,t){return pn(e,t)}function ZR(e,t){return e.plugins[t.key]??Sm({key:t.key})}const Jre=un(kp,{handlers:{onKeyDown:({editor:e,event:t})=>{t.persist(),e.dom.currentKeyboardEvent=t,Hs.isMoveUpward(t)?e.tf.moveLine({reverse:!0})&&(t.preventDefault(),t.stopPropagation()):Hs.isMoveDownward(t)?e.tf.moveLine({reverse:!1})&&(t.preventDefault(),t.stopPropagation()):Hs.isTab(e,t)||Hs.isUntab(e,t)?e.tf.tab({reverse:Hs.isUntab(e,t)})&&(t.preventDefault(),t.stopPropagation()):Hs.isSelectAll(t)?e.tf.selectAll()&&(t.preventDefault(),t.stopPropagation()):Hs.isEscape(t)&&e.tf.escape()&&(t.preventDefault(),t.stopPropagation())}}}).extendEditorApi(({editor:e})=>({redecorate:()=>{e.api.debug.warn("The method editor.api.redecorate() has not been overridden. This may cause unexpected behavior. Please ensure that all required editor methods are properly defined.","OVERRIDE_MISSING")}})).extendEditorTransforms(({editor:e,tf:{reset:t}})=>({reset(n){const r=e.api.isFocused();t(n),r&&e.tf.focus({edge:"startEditor"})}})).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{normalizeNode(n,r){if(Pr(n[0]._memo)){e.tf.unsetNodes("_memo",{at:n[1]});return}t(n,r)}}})),rc=Em({blur:null,focus:null,last:null},{mutative:!0,name:"event-editor"}),{useValue:T2e}=rc,Xre="focus-editor-event",Qre="blur-editor-event",Zre=Sm({key:"eventEditor",handlers:{onBlur:({editor:e})=>{rc.get("focus")===e.id&&rc.set("focus",null),rc.set("blur",e.id),document.dispatchEvent(new CustomEvent(Qre,{detail:{id:e.id}}))},onFocus:({editor:e})=>{rc.set("focus",e.id),rc.set("last",e.id),document.dispatchEvent(new CustomEvent(Xre,{detail:{id:e.id}}))}}}),eie=e=>{const t=ae.useRef(e);return t.current=e,cF(n=>{const r=n.api.navigation.activeTarget();if(!r)return null;const i=t.current;if(!i)return null;const s=Array.isArray(i)?i:n.api.findPath(i);return!s||!Ye.equals(r.path,s)?null:r},[e])},tie=YE(gP,{inject:{isElement:!0,nodeProps:{transformProps:({element:e,props:t,text:n})=>{const r=eie(e??n);return r?{...t,"data-nav-cycle":String(r.cycle),"data-nav-highlight":r.variant,"data-nav-pulse":String(r.pulse),"data-nav-target":"true",style:{...t.style??{},"--plate-nav-feedback-duration":`${r.duration}ms`}}:t}}}}),eF=un(H0,({editor:e,type:t})=>({shortcuts:{toggleParagraph:{keys:[[Ql.Mod,Ql.Alt,"0"],[Ql.Mod,Ql.Shift,"0"]],preventDefault:!0,handler:()=>{e.tf.toggleBlock(t)}}}})),nie=({editor:e})=>zte(e),rie=un(gc,{key:"dom",extendEditor:nie}),iie=({navigationFeedback:e}={})=>[Jre,rie,Zre,tie.configure({enabled:e!==!1,options:typeof e=="boolean"?void 0:e}),eF],sie=(e,t={})=>{const{navigationFeedback:n,optionsStoreFactory:r,plugins:i=[],...s}=t;return _Q(e,{navigationFeedback:n,...s,optionsStoreFactory:r??Em,plugins:[...iie({navigationFeedback:n}),...i]})},tF=({editor:e=lG(),...t}={})=>sie(e,t),aie=(e={})=>{const t=tF(e);return t.meta.isFallback=!0,t.apply=()=>{throw new Error("Cannot apply operations on the fallback editor. The fallback editor is used when a hook that depends on the Plate store was unable to locate a valid store. If you are using PlateController, use `useEditorMounted(id?: string)` or `!editor.meta.isFallback` to ensure that a valid Plate store is available before attempting to call operations on the editor.")},t},EA=["onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onDOMBeforeInput","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Wc=({attributes:e,disableInjectNodeProps:t,editor:n,plugin:r,pluginContext:i,props:s,readOnly:a})=>{const o=!t&&n.meta.pluginCache.inject.nodeProps.length>0,l=!o&&!r?.node.props&&!r?.node.dangerouslyAllowAttributes?.length,u=i||(r?Hc(n,r):{api:n.api,editor:n,tf:n.transforms}),{className:f}=s;let h={...s,...u};if(l)return h={...h,attributes:{...s.attributes,className:Ss(al(r?.node.type),s.attributes?.className,f)||void 0}},h.attributes?.style&&Object.keys(h.attributes.style).length===0&&(h.attributes.style=void 0),h;const m=nP({attributes:e,plugin:r,props:h});return h={...m,attributes:{...m.attributes,className:Ss(al(r?.node.type),m.attributes?.className,f)||void 0}},o&&(h=_E(n,h,g=>n.api.findPath(g),a)),h.attributes?.style&&Object.keys(h.attributes.style).length===0&&(h.attributes.style=void 0),h},oie=e=>{let t=!1;return{...e,bubbles:e.bubbles,cancelable:e.cancelable,currentTarget:e.currentTarget,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,nativeEvent:e,target:e.target,timeStamp:e.timeStamp,type:e.type,isDefaultPrevented:()=>e.defaultPrevented,isPropagationStopped:()=>t,persist:()=>{throw new Error("persist is not implemented for synthetic events created using convertDomEventToSyntheticEvent")},preventDefault:()=>e.preventDefault(),stopPropagation:()=>{t=!0,e.stopPropagation()}}},lie=(e,t)=>{if(!t)return!1;const n=t(e);return n??e.isPropagationStopped()},uie=(e,{editableProps:t,handlerKey:n})=>{const r=t?.[n],i=e.meta.pluginList.filter(s=>s.handlers?.[n]);if(!(i.length===0&&!r))return s=>{const a=s instanceof Event?oie(s):s;return i.some(o=>{if(Zr(e.dom.readOnly,o,"handlers"))return!1;const l=o.handlers[n],u=l({...Hc(e,o),event:a});return u??!1})?!0:lie(a,r)}},cie=(e,t)=>e.meta.pluginCache.handlers.onChange.some(n=>{const r=ZR(e,{key:n});if(Zr(e.dom.readOnly,r,"handlers"))return!1;const i=r.handlers.onChange,s=i({...Hc(e,r),value:t});return s??!1}),fie=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),JE=(e,t)=>{const n=Zt.c(11),r=e.attributes;let i;n[0]!==e.attributes||n[1]!==e.className?(i=Ss(e.attributes.className,e.className)||void 0,n[0]=e.attributes,n[1]=e.className,n[2]=i):i=n[2];const s=Cm(t,e.attributes.ref),a=e.attributes;let o;n[3]!==e.style||n[4]!==a.style?(o={...a.style,...e.style},n[3]=e.style,n[4]=a.style,n[5]=o):o=n[5];let l;return n[6]!==e.attributes||n[7]!==i||n[8]!==s||n[9]!==o?(l={...r,className:i,ref:s,style:o},n[6]=e.attributes,n[7]=i,n[8]=s,n[9]=o,n[10]=l):l=n[10],l},nF=e=>fie.has(e),rF=(e,t)=>{const n=Zt.c(2);let r;return n[0]!==e?(r=i=>{i&&(e?i.setAttribute("data-block-id",String(e)):i.removeAttribute("data-block-id"))},n[0]=e,n[1]=r):r=n[1],Cm(r,t)},XE=ae.forwardRef(function(t,n){const r=Zt.c(15);let i,s,a,o,l;if(r[0]!==t){const{as:b,children:x,insetProp:E,...C}=t;s=x,a=E,o=C,i=b===void 0?"div":b,l=o.element.id&&o.editor.api.isBlock(o.element)?o.element.id:void 0,r[0]=t,r[1]=i,r[2]=s,r[3]=a,r[4]=o,r[5]=l}else i=r[1],s=r[2],a=r[3],o=r[4],l=r[5];const u=rF(l,n);let f;r[6]!==o.attributes||r[7]!==o.className||r[8]!==o.style?(f={attributes:o.attributes,className:o.className,style:o.style},r[6]=o.attributes,r[7]=o.className,r[8]=o.style,r[9]=f):f=r[9];const h=JE(f,u),m=a??o.plugin?.rules.selection?.affinity==="directional";let g;return r[10]!==i||r[11]!==h||r[12]!==s||r[13]!==m?(g=ae.createElement(die,{attributes:h,inset:m,tag:i},s),r[10]=i,r[11]=h,r[12]=s,r[13]=m,r[14]=g):g=r[14],g});function die(e){const t=Zt.c(17),{attributes:n,children:r,inset:i,tag:s}=e;let a;t[0]!==s?(a=nF(s),t[0]=s,t[1]=a):a=t[1];const o=a;let l;t[2]!==i?(l=i&&ae.createElement(n0,null),t[2]=i,t[3]=l):l=t[3];let u;t[4]!==s||t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==o?(u=o?ae.createElement("div",{"data-slate-node":"element","data-slate-inline":n["data-slate-inline"],...n,style:{position:"relative",...n?.style}},ae.createElement(s,{contentEditable:!1}),r):ae.createElement(s,{"data-slate-node":"element","data-slate-inline":n["data-slate-inline"],...n,style:{position:"relative",...n?.style}},r,i&&ae.createElement(n0,null)),t[4]=s,t[5]=n,t[6]=r,t[7]=i,t[8]=o,t[9]=u):u=t[9];let f;t[10]!==i||t[11]!==o?(f=i&&o&&ae.createElement(n0,null),t[10]=i,t[11]=o,t[12]=f):f=t[12];let h;return t[13]!==l||t[14]!==u||t[15]!==f?(h=ae.createElement(ae.Fragment,null,l,u,f),t[13]=l,t[14]=u,t[15]=f,t[16]=h):h=t[16],h}const iF=ae.forwardRef((e,t)=>{const n=Zt.c(8);let r,i,s;n[0]!==e?({as:s,children:r,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s):(r=n[1],i=n[2],s=n[3]);const a=s===void 0?"span":s,o=JE(i,t);let l;return n[4]!==a||n[5]!==o||n[6]!==r?(l=ae.createElement(a,o,r),n[4]=a,n[5]=o,n[6]=r,n[7]=l):l=n[7],l}),n0=()=>{const e=Zt.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={fontSize:0,lineHeight:0},e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=ae.createElement("span",{style:t,contentEditable:!1},String.fromCodePoint(160)),e[1]=n):n=e[1],n},sF=ae.forwardRef((e,t)=>{const n=Zt.c(15);let r,i,s,a;n[0]!==e?({as:a,children:r,inset:i,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s,n[4]=a):(r=n[1],i=n[2],s=n[3],a=n[4]);const o=a===void 0?"span":a,l=JE(s,t);if(i??s.plugin?.rules.selection?.affinity==="hard"){let f;n[5]===Symbol.for("react.memo_cache_sentinel")?(f=ae.createElement(n0,null),n[5]=f):f=n[5];let h;n[6]===Symbol.for("react.memo_cache_sentinel")?(h=ae.createElement(n0,null),n[6]=h):h=n[6];let m;return n[7]!==o||n[8]!==l||n[9]!==r?(m=ae.createElement(ae.Fragment,null,f,ae.createElement(o,l,r,h)),n[7]=o,n[8]=l,n[9]=r,n[10]=m):m=n[10],m}let u;return n[11]!==o||n[12]!==l||n[13]!==r?(u=ae.createElement(o,l,r),n[11]=o,n[12]=l,n[13]=r,n[14]=u):u=n[14],u}),CA=String.fromCodePoint(160),kA={fontSize:0,lineHeight:0},hie=(e,t)=>{if(!e.api.isCollapsed())return!1;const n=e.selection?.focus;return!n||dt.get(e,n.path)!==t?!1:n.offset===0||n.offset===t.text.length},DA=(e,t)=>{const n=e.attributes??e.leaf.attributes??{};return{...n,className:[t,n.className].filter(Boolean).join(" ")||void 0}},pie=(e,t)=>function(r){const i=ea(),{render:{leaf:s,node:a}}=t,{children:o,leaf:l,text:u}=r,f=s??a;if(Zr(i,t,"render"))return o;if(l[t.node.type]){const h=!f&&e.meta.pluginCache.inject.nodeProps.length===0&&!t.node.props&&!t.node.dangerouslyAllowAttributes?.length;if(h&&!t.rules.selection?.affinity){const x=t.render?.as??"span",E=DA(r,al(t.node.type)||void 0);return ae.createElement(x,E,o)}if(h&&t.rules.selection?.affinity==="hard"){const x=t.render?.as??"span",E=DA(r,al(t.node.type)||void 0);return hie(e,u)?ae.createElement(ae.Fragment,null,ae.createElement("span",{contentEditable:!1,style:kA},CA),ae.createElement(x,E,o,ae.createElement("span",{contentEditable:!1,style:kA},CA))):ae.createElement(x,E,o)}const m=f??sF,g=Wc({attributes:l.attributes,editor:e,plugin:t,props:r,readOnly:i}),b=f?{}:{as:t.render?.as};return ae.createElement(m,{...b,...g},o)}return o},SA=String.fromCodePoint(160),_A={fontSize:0,lineHeight:0},mie=(e,t)=>{if(!e.api.isCollapsed())return!1;const n=e.selection?.focus;return!n||dt.get(e,n.path)!==t?!1:n.offset===0||n.offset===t.text.length},gie=(e,t)=>{const n=[],r=new Map,i=[],s=new Map,a=[],o=e.meta.pluginCache.inject.nodeProps.length>0;if(e.meta.pluginCache.node.isLeaf.forEach(u=>{const f=e.getPlugin({key:u});if(f){const h=f.node.type??u;if(e.meta.pluginCache.inject.nodeProps.length===0&&!f.render?.leaf&&!f.render?.node&&!f.node.props&&!f.node.dangerouslyAllowAttributes?.length&&(!f.rules.selection?.affinity||f.rules.selection?.affinity==="hard")){const m={className:f.node.type?`slate-${f.node.type}`:void 0,editOnly:f.editOnly,key:h,selectionAffinity:f.rules.selection?.affinity,tag:f.render?.as??"span"};i.push(m),s.set(h,!0)}else{const m={key:h,renderLeaf:pie(e,f)};n.push(m),r.set(h,m.renderLeaf)}}}),e.meta.pluginCache.node.leafProps.forEach(u=>{const f=e.getPlugin({key:u});f&&a.push(f)}),!o&&i.length===0&&n.length===0&&a.length===0)return t||function({attributes:f,...h}){return ae.createElement("span",f,h.children)};const l=!o&&!t&&a.length===0;return function({attributes:f,...h}){const m=ea(),g=h.leaf;let b=!1,x=!1;for(const C in g)if(Object.hasOwn(g,C)&&(!b&&s.has(C)&&(b=!0),!x&&r.has(C)&&(x=!0),b&&x))break;if(b){for(const{className:C,editOnly:y,key:_,selectionAffinity:O,tag:S}of i)if(g[_]&&!(y&&Zr(m,{editOnly:y},"render"))){if(O==="hard"){if(!mie(e,h.text)){h.children=ae.createElement(S,{className:C},h.children);continue}h.children=ae.createElement(ae.Fragment,null,ae.createElement("span",{contentEditable:!1,style:_A},SA),ae.createElement(S,{className:C},h.children,ae.createElement("span",{contentEditable:!1,style:_A},SA)));continue}h.children=ae.createElement(S,{className:C},h.children)}}if(x)for(const{key:C,renderLeaf:y}of n)g[C]&&(h.children=ae.createElement(y,h,h.children));if(a.forEach(C=>{if(h.leaf[C.node.type]){const y=typeof C.node.leafProps=="function"?C.node.leafProps(h):C.node.leafProps??{};y.className&&(y.className=Ss(h.className,y.className)),f={...f,...y}}}),l)return ae.createElement("span",f,h.children);if(t)return t({attributes:f,...h});const E=Wc({editor:e,props:{attributes:f,...h},readOnly:m});return ae.createElement(sF,E,h.children)}},vie=(e,t)=>{const n=e.attributes??{};return{...n,className:[t,n.className].filter(Boolean).join(" ")||void 0}},yie=(e,t)=>function(r){const i=ea(),{render:{node:s}}=t,{children:a,text:o}=r,l=t.node.type??t.key;if(Zr(i,t,"render"))return a;if(o[l]){if(!s&&e.meta.pluginCache.inject.nodeProps.length===0&&!t.node.props&&!t.node.dangerouslyAllowAttributes?.length){const m=t.render?.as??"span",g=vie(r,al(t.node.type)||void 0);return ae.createElement(m,g,a)}const u=s??iF,f=Wc({attributes:r.attributes,editor:e,plugin:t,props:r,readOnly:i}),h=s?{}:{as:t.render?.as};return ae.createElement(u,{...h,...f},a)}return a},xie=(e,t)=>{const n=[],r=new Map,i=[],s=new Map,a=[],o=e.meta.pluginCache.inject.nodeProps.length>0;if(e.meta.pluginList.forEach(u=>{if(u.node.isLeaf&&u.node.isDecoration===!1)if(!u.render.node&&!u.node.component&&!u.node.props&&!u.node.dangerouslyAllowAttributes?.length){const f={className:al(u.node.type)||void 0,plugin:u,tag:u.render?.as??"span",textKey:u.node.type??u.key};i.push(f),s.set(f.textKey,!0)}else{const f={renderText:yie(e,u),textKey:u.node.type??u.key};n.push(f),r.set(f.textKey,!0)}u.node.textProps&&a.push(u)}),!o&&i.length===0&&n.length===0&&a.length===0)return t||function({attributes:f,...h}){return ae.createElement("span",f,h.children)};const l=!o&&!t&&a.length===0;return function({attributes:f,...h}){const m=ea(),g=h.text;let b=!1,x=!1;for(const C in g)if(Object.hasOwn(g,C)&&(!b&&s.has(C)&&(b=!0),!x&&r.has(C)&&(x=!0),b&&x))break;if(b)for(const{className:C,plugin:y,tag:_,textKey:O}of i)g[O]&&(Zr(m,y,"render")||(h.children=ae.createElement(_,{className:C},h.children)));if(x)for(const{renderText:C,textKey:y}of n)g[y]&&(h.children=ae.createElement(C,h,h.children));if(a.forEach(C=>{if(h.text[C.node.type??C.key]){const y=typeof C.node.textProps=="function"?C.node.textProps(h):C.node.textProps??{};y.className&&(y.className=Ss(h.className,y.className)),f={...f,...y}}}),l)return ae.createElement("span",f,h.children);if(t)return t({attributes:f,...h});const E=Wc({editor:e,props:{attributes:f,...h},readOnly:m});return ae.createElement(iF,E,h.children)}},bie=({disabled:e,readOnly:t,...n}={})=>{const{id:r}=n,i=vr(r),s=Ts(r),a=mi(s,"versionDecorate"),o=mi(s,"decorate"),l=mi(s,"renderChunk"),u=mi(s,"renderElement"),f=mi(s,"renderLeaf"),h=mi(s,"renderText"),m=ae.useMemo(()=>BQ(i,o??n?.decorate),[n?.decorate,i,o]),g=ae.useMemo(()=>{if(!(!a||!m))return O=>m(O)},[m,a]),b=QE(rP,"contentVisibilityAuto")?Gre:void 0,x=l??n?.renderChunk??b,E=ae.useMemo(()=>Iie(i,u??n?.renderElement),[n?.renderElement,i,u]),C=ae.useMemo(()=>gie(i,f??n?.renderLeaf),[n?.renderLeaf,i,f]),y=ae.useMemo(()=>xie(i,h??n?.renderText),[n?.renderText,i,h]),_=yA(()=>{const O={decorate:g,renderChunk:x,renderElement:E,renderLeaf:C,renderText:y};return EA.forEach(S=>{const w=uie(i,{editableProps:n,handlerKey:S});w&&(O[S]=w)}),O},[g,n,x,E,C,y]);return yA(()=>({...rre(n,[...EA,"renderChunk","renderElement","renderLeaf","renderText","decorate"]),..._,"aria-disabled":e,className:Ss("slate-editor","ignore-click-outside/toolbar",n.className),"data-readonly":t?"true":void 0,readOnly:t}),[n,_,t])},G0=e=>{const t=Zt.c(3),n=vr();let r;return t[0]!==n.api||t[1]!==e?(r=n.api.findPath(e),t[0]=n.api,t[1]=e,t[2]=r):r=t[2],r},wie=e=>{const t=Zt.c(19),{id:n}=e,r=vr(n),i=Ts(n),s=mi(i,"onChange"),a=mi(i,"onValueChange"),o=mi(i,"onSelectionChange"),l=rp("versionEditor",n),u=rp("versionSelection",n),f=rp("versionValue",n);let h;t[0]!==r||t[1]!==s||t[2]!==l?(h=O=>{l(),cie(r,O)||s?.({editor:r,value:O})},t[0]=r,t[1]=s,t[2]=l,t[3]=h):h=t[3];const m=h;let g;t[4]!==r||t[5]!==a||t[6]!==f?(g=O=>{f(),a?.({editor:r,value:O})},t[4]=r,t[5]=a,t[6]=f,t[7]=g):g=t[7];const b=g;let x;t[8]!==r||t[9]!==o||t[10]!==u?(x=O=>{u(),o?.({editor:r,selection:O})},t[8]=r,t[9]=o,t[10]=u,t[11]=x):x=t[11];const E=x,C=r,y=r.children;let _;return t[12]!==r.meta.key||t[13]!==m||t[14]!==E||t[15]!==b||t[16]!==C||t[17]!==y?(_={key:r.meta.key,editor:C,initialValue:y,onChange:m,onSelectionChange:E,onValueChange:b},t[12]=r.meta.key,t[13]=m,t[14]=E,t[15]=b,t[16]=C,t[17]=y,t[18]=_):_=t[18],_},Eie="element",{elementStore:a2}=Vc({element:null,entry:null,path:null},{name:"element",suppressWarnings:!0}),Jw=ae.createContext(null),AA=ae.createContext(null);let Cie=null;const aF=(e,t,n)=>{(!n||!Object.is(n.element,t.element))&&e.set(a2.atom.element,t.element),(!n||!Object.is(n.entry,t.entry))&&e.set(a2.atom.entry,t.entry),(!n||!Object.is(n.path,t.path))&&e.set(a2.atom.path,t.path)},kie=e=>{const t=Uw();return aF(t,e),t},Die=e=>{let t=null;const n=new Set;let r=e;return{getJotaiStore:()=>(t||(t=kie(r)),t),getState:()=>r,setState:i=>{if(Object.is(r.element,i.element)&&Object.is(r.entry,i.entry)&&Object.is(r.path,i.path))return;const s=r;r=i,t&&aF(t,i,s),n.forEach(a=>{a()})},subscribe:i=>(n.add(i),()=>{n.delete(i)})}},Sie=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.scope===t)return n;n=n.parent}return e},TA=(e,t)=>{if(!e||!t)return e;let n=e;for(;n;){if(n.scope===t)return n;n=n.parent}return null},_ie=e=>{const t=Zt.c(8),n=ae.useContext(Jw);let r;t[0]!==e?(r=TA(Cie,e),t[0]=e,t[1]=r):r=t[1];const i=r;if(i)return i;let s;t[2]!==n||t[3]!==e?(s=TA(n,e),t[2]=n,t[3]=e,t[4]=s):s=t[4];const a=s;if(a)return a;let o;return t[5]!==n||t[6]!==e?(o=Sie(n,e),t[5]=n,t[6]=e,t[7]=o):o=t[7],o};function _m({children:e,path:t,scope:n,...r}){const i=r.element??null,s=r.entry??null,a=t??null,[o]=ae.useState(()=>Die({element:i,entry:s,path:a})),l=ae.useContext(Jw),u=ae.useContext(AA),f=ae.useMemo(()=>({element:i,entry:s,parent:l,path:a,scope:n}),[i,a,s,l,n]),h=ae.useMemo(()=>({parent:u,runtime:o,scope:n,get store(){return o.getJotaiStore()}}),[u,o,n]);return ae.useLayoutEffect(()=>{o.setState({element:i,entry:s,path:a})},[i,a,s,o]),ae.createElement(AA.Provider,{value:h},ae.createElement(Jw.Provider,{value:f},t&&Ye.equals(t,[0])?ae.createElement(Aie,null):null,e))}function Aie(){const e=vr(),t=Ts(),n=kte(),r=ea();return e.dom.readOnly=r,e.dom.composing=n,ae.useLayoutEffect(()=>{t.set("composing",n)},[n,t]),null}function Tie(e){const t=Zt.c(3),{editor:n,plugin:r,pluginContext:i,...s}=e;let a=s;const o=ea();if(Zr(o,r,"render"))return null;const{children:l}=a,u=r.render?.node,f=u??XE;a=Wc({attributes:a.element.attributes,editor:n,plugin:r,pluginContext:i,props:a,readOnly:o});let h=l;n.meta.pluginCache.render.belowNodes.forEach(x=>{const E=n.getPlugin({key:x}),C=E.render.belowNodes,y=C({...a,key:x});y&&!Zr(o,E,"render")&&(h=y({...a,children:h}))});let m;t[0]!==u||t[1]!==r.render?.as?(m=u?{}:{as:r.render?.as},t[0]=u,t[1]=r.render?.as,t[2]=m):m=t[2];const g=m;let b=ae.createElement(f,{...g,...a},h,ae.createElement(oF,{...g,...a}));return n.meta.pluginCache.render.aboveNodes.forEach(x=>{const E=n.getPlugin({key:x}),C=E.render.aboveNodes,y=C({...a,key:x});y&&!Zr(o,E,"render")&&(b=y({...a,children:b}))}),b}function oF(e){const t=Zt.c(8);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];const r=vr(),i=ea();let s;t[2]!==r||t[3]!==n||t[4]!==i?(s=r.meta.pluginCache.render.belowRootNodes.map(o=>{const l=r.getPlugin({key:o});if(Zr(i,l,"render"))return null;const u=l.render.belowRootNodes;return ae.createElement(u,{key:o,...n})}),t[2]=r,t[3]=n,t[4]=i,t[5]=s):s=t[5];let a;return t[6]!==s?(a=ae.createElement(ae.Fragment,null,s),t[6]=s,t[7]=a):a=t[7],a}const Nie=(e,t)=>{const n=Hc(e,t);return function(i){const{element:s,path:a}=i;return ae.createElement(_m,{element:s,entry:[s,a],path:a,scope:t.key},ae.createElement(Tie,{editor:e,plugin:t,pluginContext:n,...i}))}};function Oie(e){const t=Zt.c(16),{attributes:n,children:r,editor:i,element:s,plugin:a}=e,o=G0(s);let l;t[0]!==s||t[1]!==o?(l=[s,o],t[0]=s,t[1]=o,t[2]=l):l=t[2];let u;t[3]!==n||t[4]!==r||t[5]!==i||t[6]!==s||t[7]!==o||t[8]!==a?(u=ae.createElement(Bie,{attributes:n,editor:i,element:s,path:o,plugin:a},r),t[3]=n,t[4]=r,t[5]=i,t[6]=s,t[7]=o,t[8]=a,t[9]=u):u=t[9];let f;return t[10]!==s||t[11]!==o||t[12]!==a.key||t[13]!==l||t[14]!==u?(f=ae.createElement(_m,{element:s,entry:l,path:o,scope:a.key},u),t[10]=s,t[11]=o,t[12]=a.key,t[13]=l,t[14]=u,t[15]=f):f=t[15],f}function lF({attributes:e,editor:t,element:n,path:r,readOnly:i}){return t.meta.pluginCache.inject.nodeProps.length===0?e:_E(t,{attributes:e,element:n},s=>s===n?r:t.api.findPath(s),i).attributes}function Bie(e){const t=Zt.c(16),{attributes:n,children:r,editor:i,element:s,path:a,plugin:o}=e,l=ea();let u;t[0]!==n||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==l?(u={attributes:n,editor:i,element:s,path:a,readOnly:l},t[0]=n,t[1]=i,t[2]=s,t[3]=a,t[4]=l,t[5]=u):u=t[5];const f=lF(u),h=o.render?.as;let m;t[6]!==r||t[7]!==i||t[8]!==s||t[9]!==f||t[10]!==a||t[11]!==o||t[12]!==h?(m={as:h,attributes:f,children:r,editor:i,element:s,path:a,plugin:o},t[6]=r,t[7]=i,t[8]=s,t[9]=f,t[10]=a,t[11]=o,t[12]=h,t[13]=m):m=t[13];const g=m;let b;return t[14]!==g?(b=ae.createElement(XE,g),t[14]=g,t[15]=b):b=t[15],b}function NA(e){const t=Zt.c(20),{attributes:n,blockId:r,children:i,editor:s,element:a,isVoidTag:o,plugin:l,renderBelowNodes:u,tag:f}=e,h=G0(a);let m;t[0]!==a||t[1]!==h?(m=[a,h],t[0]=a,t[1]=h,t[2]=m):m=t[2];let g;t[3]!==f||t[4]!==n||t[5]!==r||t[6]!==i||t[7]!==s||t[8]!==a||t[9]!==o||t[10]!==h||t[11]!==l||t[12]!==u?(g=ae.createElement(Pie,{attributes:n,blockId:r,editor:s,element:a,isVoidTag:o,path:h,plugin:l,renderBelowNodes:u,tag:f},i),t[3]=f,t[4]=n,t[5]=r,t[6]=i,t[7]=s,t[8]=a,t[9]=o,t[10]=h,t[11]=l,t[12]=u,t[13]=g):g=t[13];let b;return t[14]!==a||t[15]!==h||t[16]!==l.key||t[17]!==m||t[18]!==g?(b=ae.createElement(_m,{element:a,entry:m,path:h,scope:l.key},g),t[14]=a,t[15]=h,t[16]=l.key,t[17]=m,t[18]=g,t[19]=b):b=t[19],b}function Pie(e){const t=Zt.c(27),{attributes:n,blockId:r,children:i,editor:s,element:a,isVoidTag:o,path:l,plugin:u,renderBelowNodes:f,tag:h}=e,m=ea();let g;t[0]!==n||t[1]!==s||t[2]!==a||t[3]!==l||t[4]!==m?(g={attributes:n,editor:s,element:a,path:l,readOnly:m},t[0]=n,t[1]=s,t[2]=a,t[3]=l,t[4]=m,t[5]=g):g=t[5];const b=lF(g),x=rF(r,b.ref);let E;if(t[6]!==n||t[7]!==i||t[8]!==s||t[9]!==a||t[10]!==l||t[11]!==u||t[12]!==m||t[13]!==f){if(E=i,f){const A={attributes:n,children:i,editor:s,element:a,path:l,plugin:u};s.meta.pluginCache.render.belowNodes.forEach(T=>{const P=s.getPlugin({key:T});if(Zr(m,P,"render"))return;const M=P.render.belowNodes({...A,key:T});M&&(E=M({...A,children:E}))})}t[6]=n,t[7]=i,t[8]=s,t[9]=a,t[10]=l,t[11]=u,t[12]=m,t[13]=f,t[14]=E}else E=t[14];const C=b["data-slate-inline"];let y;t[15]!==b.style?(y={position:"relative",...b.style},t[15]=b.style,t[16]=y):y=t[16];const _=y;let O;t[17]!==b||t[18]!==x||t[19]!==C||t[20]!==_?(O={"data-slate-inline":C,"data-slate-node":"element",...b,ref:x,style:_},t[17]=b,t[18]=x,t[19]=C,t[20]=_,t[21]=O):O=t[21];const S=O;let w;return t[22]!==h||t[23]!==E||t[24]!==S||t[25]!==o?(w=o?ae.createElement("div",S,ae.createElement(h,{contentEditable:!1}),E):ae.createElement(h,S,E),t[22]=h,t[23]=E,t[24]=S,t[25]=o,t[26]=w):w=t[26],w}function OA(e){const t=Zt.c(5),{editor:n,plugin:r,props:i}=e,s=G0(i.element);let a;return t[0]!==n||t[1]!==s||t[2]!==r||t[3]!==i?(a=Nie(n,r)({...i,path:s}),t[0]=n,t[1]=s,t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function Rie(e){const t=Zt.c(4),{props:n,renderElementProp:r}=e,i=G0(n.element);let s;return t[0]!==i||t[1]!==n||t[2]!==r?(s=r({...n,path:i}),t[0]=i,t[1]=n,t[2]=r,t[3]=s):s=t[3],s}function Fie(e){const t=Zt.c(20),{editor:n,props:r}=e,i=ea(),s=G0(r.element);let a;t[0]!==n||t[1]!==s||t[2]!==r||t[3]!==i?(a=Wc({disableInjectNodeProps:!0,editor:n,props:{...r,path:s},readOnly:i}),t[0]=n,t[1]=s,t[2]=r,t[3]=i,t[4]=a):a=t[4];const o=a;let l;t[5]!==o.element||t[6]!==s?(l=[o.element,s],t[5]=o.element,t[6]=s,t[7]=l):l=t[7];const u=o.element.type??"default";let f;t[8]!==o?(f=ae.createElement(oF,o),t[8]=o,t[9]=f):f=t[9];let h;t[10]!==o||t[11]!==r.children||t[12]!==f?(h=ae.createElement(XE,o,r.children,f),t[10]=o,t[11]=r.children,t[12]=f,t[13]=h):h=t[13];let m;return t[14]!==o.element||t[15]!==s||t[16]!==l||t[17]!==u||t[18]!==h?(m=ae.createElement(_m,{element:o.element,entry:l,path:s,scope:u},h),t[14]=o.element,t[15]=s,t[16]=l,t[17]=u,t[18]=h,t[19]=m):m=t[19],m}const Iie=(e,t)=>{const n=e.meta.pluginCache.render.aboveNodes.length>0,r=e.meta.pluginCache.render.belowRootNodes.length>0;return function(s){const a=_i(e,s.element.type);if(a?.node.isElement){if(!n&&!r&&!a.render.node&&!a.node.props&&!a.node.dangerouslyAllowAttributes?.length){const o=e.dom.readOnly;if(Zr(o,a,"render"))return null;const l=s.element.id&&e.api.isBlock(s.element)?s.element.id:void 0,u=a.rules.selection?.affinity==="directional",f={...s.attributes,className:[al(a.node.type),s.attributes?.className].filter(Boolean).join(" ")||void 0},h=a.render?.as??"div",m=typeof h=="string",g=h,b=m&&nF(g),x=e.meta.pluginCache.render.belowNodes.some(E=>!Zr(o,e.getPlugin({key:E}),"render"));return!u&&!x&&m?ae.createElement(NA,{attributes:f,blockId:l,editor:e,element:s.element,isVoidTag:b,plugin:a,renderBelowNodes:!1,tag:g},s.children):!u&&x&&m?ae.createElement(NA,{attributes:f,blockId:l,editor:e,element:s.element,isVoidTag:b,plugin:a,renderBelowNodes:!0,tag:g},s.children):!x&&m?ae.createElement(Oie,{attributes:f,editor:e,element:s.element,plugin:a},s.children):ae.createElement(OA,{editor:e,plugin:a,props:s})}return ae.createElement(OA,{editor:e,plugin:a,props:s})}return t?ae.createElement(Rie,{props:s,renderElementProp:t}):ae.createElement(Fie,{editor:e,props:s})}},{plateControllerStore:np,usePlateControllerStore:Mie}=Vc({activeId:Ui(null),editorStores:Ui({}),primaryEditorIds:Ui([])},{name:"plateController"}),r0=e=>Mie({scope:void 0,warnIfNoStore:!1}),Lie=()=>!!r0().store,zie=e=>{const t=Zt.c(2);let n;t[0]!==e?(n=Ui(i=>{const s=i(np.atom.editorStores),a=l=>l?s[l]??null:null;if(e)return a(e);const o=[i(np.atom.activeId),...i(np.atom.primaryEditorIds)];for(const l of o){const u=a(l);if(u)return u}return null}),t[0]=e,t[1]=n):n=t[1];const r=n;return OR(r0(),r)},uF=({id:e,composing:t=!1,containerRef:n={current:null},decorate:r=null,editor:i,isMounted:s=!1,primary:a=!0,readOnly:o=null,renderChunk:l=null,renderElement:u=null,renderLeaf:f=null,renderText:h=null,scrollRef:m={current:null},versionDecorate:g=1,versionEditor:b=1,versionSelection:x=1,versionValue:E=1,onChange:C=null,onNodeChange:y=null,onSelectionChange:_=null,onTextChange:O=null,onValueChange:S=null,...w}={})=>Vc({composing:t,containerRef:n,decorate:r,editor:i,isMounted:s,primary:a,readOnly:o,renderChunk:l,renderElement:u,renderLeaf:f,renderText:h,scrollRef:m,versionDecorate:g,versionEditor:b,versionSelection:x,versionValue:E,onChange:C,onNodeChange:y,onSelectionChange:_,onTextChange:O,onValueChange:S,...w},{name:"plate",suppressWarnings:!0,extend:A=>({trackedEditor:Ui(T=>({editor:T(A.editor),version:T(A.versionEditor)})),trackedSelection:Ui(T=>({selection:T(A.editor).selection,version:T(A.versionSelection)})),trackedValue:Ui(T=>({value:T(A.editor).children,version:T(A.versionValue)}))})}),{PlateProvider:jie,plateStore:qie,usePlateStore:$ie}=uF(),{usePlateStore:Vie}=uF(),Ts=e=>{const t=$ie({scope:e,warnIfNoStore:!1})??null,[n]=ae.useState(!!t.store),r=n?t:zie(e),i=Lie(),s=Vie();if(!r){if(i)return s;throw new Error("Plate hooks must be used inside a Plate or PlateController")}return r},Uie=()=>mi(Ts(),"editor").id,Hie=e=>!!mi(Ts(e),"readOnly"),vr=e=>{const t=Ts(e),n=mi(t,"editor")??aie();return n.store=t,n},Wie=e=>Ts(e).useTrackedSelectionValue().selection,rp=(e,t)=>{const n=Zt.c(6),r=ae.useRef(1),i=Ts(t),s=Zl(i,"versionDecorate"),a=Zl(i,"versionSelection"),o=Zl(i,"versionValue"),l=Zl(i,"versionEditor");let u;return n[0]!==e||n[1]!==s||n[2]!==l||n[3]!==a||n[4]!==o?(u=()=>{const f=r.current+1;e:switch(e){case"versionDecorate":s(f);break e;case"versionEditor":l(f);break e;case"versionSelection":a(f);break e;case"versionValue":o(f)}r.current=f},n[0]=e,n[1]=s,n[2]=l,n[3]=a,n[4]=o,n[5]=u):u=n[5],u},Kie=e=>{const t=Zt.c(2),n=rp("versionDecorate",e);let r;return t[0]!==n?(r=()=>{n()},t[0]=n,t[1]=r):r=t[1],r};function Y0(e,t){const n=Zt.c(6),r=vr(t);let i;n[0]!==r||n[1]!==e?(i=Hc(r,e),n[0]=r,n[1]=e,n[2]=i):i=n[2];let s;return n[3]!==r.store||n[4]!==i?(s={...i,store:r.store},n[3]=r.store,n[4]=i,n[5]=s):s=n[5],s}const cF=(e,t,{id:n,equalityFn:r=(i,s)=>i===s}={})=>{const i=ae.useMemo(()=>AR(qie.atom.trackedEditor,({editor:s},a)=>e(s,a),r),t);return OR(Ts(n),i)};function QE(e,t,...n){return Gie(vr(),e,t,...n)}function Gie(e,t,n,...r){const i=e.getOptionsStore(t);if(i){if(n!=="state"&&!(n in i.get("state"))&&!(n in i.selectors)){e.api.debug.error(`usePluginOption: ${n} option is not defined in plugin ${t.key}`,"OPTION_UNDEFINED");return}return n==="state"?Yne(i,s=>s,r[0]):Gne(i,n,...r)}}const ZE=e=>{const t=Zt.c(1),n=Eie,r=vr(),i=_ie(n)?.element;if(!i){r.api.debug.warn(`useElement(${n}) hook must be used inside the node component's context`,"USE_ELEMENT_CONTEXT");let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0],s}return i};function Yie(e){const t=Zt.c(4),{id:n,editableRef:r}=e,i=vr(n);let s;return t[0]!==r||t[1]!==i.meta.shortcuts||t[2]!==n?(s=ae.createElement(ae.Fragment,null,Object.entries(i.meta.shortcuts).map(a=>{const[o,l]=a;return!l||!Pr(l.keys)||!l.handler?null:ae.createElement(Jie,{id:n,key:o,editableRef:r,hotkeyConfig:l})})),t[0]=r,t[1]=i.meta.shortcuts,t[2]=n,t[3]=s):s=t[3],s}function Jie(e){const t=Zt.c(15),{id:n,editableRef:r,hotkeyConfig:i}=e,s=vr(n);let a,o,l;t[0]!==i?({keys:o,handler:a,...l}=i,t[0]=i,t[1]=a,t[2]=o,t[3]=l):(a=t[1],o=t[2],l=t[3]);let u;t[4]!==s||t[5]!==a||t[6]!==l?(u=(x,E)=>{a({editor:s,event:x,eventDetails:E})!==!1&&!Pr(l.preventDefault)&&(x.preventDefault(),x.stopPropagation?.())},t[4]=s,t[5]=a,t[6]=l,t[7]=u):u=t[7];let f;t[8]!==l?(f={enableOnContentEditable:!0,...l},t[8]=l,t[9]=f):f=t[9];let h;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[10]=h):h=t[10];const m=Vw(o,u,f,h);let g,b;return t[11]!==r||t[12]!==m?(g=()=>{r.current&&m(r.current)},b=[m,r],t[11]=r,t[12]=m,t[13]=g,t[14]=b):(g=t[13],b=t[14]),te.useEffect(g,b),null}const Xie=({id:e})=>{const t=vr(e),n=Kie(e);return ae.useEffect(()=>{t.api.redecorate=n},[t,n]),null};function Qie({id:e,plugin:t}){const n=vr(e);return t.useHooks?.(Hc(n,t)),null}function Zie({id:e}){const t=Ts(e),n=mi(t,"editor"),r=Zl(t,"isMounted");return ae.useEffect(()=>(r(!0),()=>{r(!1)}),[r]),ae.createElement(ae.Fragment,null,n.meta.pluginCache.useHooks.map(i=>ae.createElement(Qie,{id:e,key:i,plugin:ZR(n,{key:i})})))}function ese(){globalThis.__PLATE_INSTANCES__=(globalThis.__PLATE_INSTANCES__||0)+1}ese();function tse(e){const t=Zt.c(3);let n,r;t[0]!==e?(n=()=>{!e&&globalThis.__PLATE_INSTANCES__&&globalThis.__PLATE_INSTANCES__>1&&console.warn("Detected multiple @platejs/core instances!")},r=[e],t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),ae.useEffect(n,r)}function nse(e){const t=Zt.c(15),{children:n,containerRef:r,decorate:i,editor:s,primary:a,readOnly:o,renderElement:l,renderLeaf:u,scrollRef:f,onChange:h,onNodeChange:m,onSelectionChange:g,onTextChange:b,onValueChange:x}=e,E=o??s?.dom.readOnly;let C;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==s||t[4]!==h||t[5]!==m||t[6]!==g||t[7]!==b||t[8]!==x||t[9]!==a||t[10]!==l||t[11]!==u||t[12]!==f||t[13]!==E?(C=ae.createElement(jie,{readOnly:E,onChange:h,onNodeChange:m,onSelectionChange:g,onTextChange:b,onValueChange:x,containerRef:r,decorate:i,editor:s,primary:a,renderElement:l,renderLeaf:u,scope:s.id,scrollRef:f},n),t[0]=n,t[1]=r,t[2]=i,t[3]=s,t[4]=h,t[5]=m,t[6]=g,t[7]=b,t[8]=x,t[9]=a,t[10]=l,t[11]=u,t[12]=f,t[13]=E,t[14]=C):C=t[14],C}function rse(e){const t=te.useId(),n=ae.useRef(null),r=ae.useRef(null);return tse(e.suppressInstanceWarning),e.editor?(e.editor.meta.uid=`e-${t.replaceAll(":","")}`,ae.createElement(nse,{key:e.editor.meta.key,containerRef:n,scrollRef:r,...e})):null}const ise=e=>{const t=Zt.c(23),{id:n}=e,r=Uie(),i=n??r;let s;t[0]!==i?(s=Kre(np.atom.editorStores,w=>w.prop(i)),t[0]=i,t[1]=s):s=t[1];const a=s,o=r0();let l;t[2]!==a||t[3]!==o?(l=o.setAtom(a),t[2]=a,t[3]=o,t[4]=l):l=t[4];let u;t[5]!==a?(u=[a],t[5]=a,t[6]=u):u=t[6];const f=r2(l,u),h=r2(Zl(r0(),"primaryEditorIds")),m=r2(Zl(r0(),"activeId")),g=Ts(i),b=mi(g,"primary"),x=Rte();let E,C;t[7]!==i||t[8]!==m||t[9]!==f||t[10]!==g?(E=()=>(f(g??null),()=>{f(null),m(w=>w===i?null:w)}),C=[g,f,m,i],t[7]=i,t[8]=m,t[9]=f,t[10]=g,t[11]=E,t[12]=C):(E=t[11],C=t[12]),ae.useEffect(E,C);let y,_;t[13]!==i||t[14]!==b||t[15]!==h?(y=()=>{if(b)return h(w=>[...w,i]),()=>{h(w=>w.filter(A=>A!==i))}},_=[i,b,h],t[13]=i,t[14]=b,t[15]=h,t[16]=y,t[17]=_):(y=t[16],_=t[17]),ae.useEffect(y,_);let O,S;return t[18]!==x||t[19]!==i||t[20]!==m?(S=()=>{i&&x&&m(i)},O=[i,x,m],t[18]=x,t[19]=i,t[20]=m,t[21]=O,t[22]=S):(O=t[21],S=t[22]),ae.useEffect(S,O),null};function sse(e){const t=Zt.c(11),{id:n,children:r}=e;let i;t[0]!==n?(i={id:n},t[0]=n,t[1]=i):i=t[1];const s=wie(i),a=vr(n);let o;return t[2]!==r||t[3]!==a||t[4]!==s.editor||t[5]!==s.initialValue||t[6]!==s.key||t[7]!==s.onChange||t[8]!==s.onSelectionChange||t[9]!==s.onValueChange?(o=ae.createElement(Ite,{key:s.key,editor:s.editor,initialValue:s.initialValue,onChange:s.onChange,onSelectionChange:s.onSelectionChange,onValueChange:s.onValueChange},r),a.meta.pluginCache.render.aboveSlate.forEach(l=>{const u=a.getPlugin({key:l}).render.aboveSlate;o=ae.createElement(u,null,o)}),t[2]=r,t[3]=a,t[4]=s.editor,t[5]=s.initialValue,t[6]=s.key,t[7]=s.onChange,t[8]=s.onSelectionChange,t[9]=s.onValueChange,t[10]=o):o=t[10],o}const fF=ae.forwardRef(({autoFocusOnEditable:e,readOnly:t,renderEditable:n,...r},i)=>{const{id:s}=r,a=vr(s),o=Hie(),l=r.disabled?!0:t??o;if(a.dom.readOnly=l,!a)throw new Error("Editor not found. Please ensure that PlateContent is rendered below Plate.");const u=bie({...r,readOnly:l}),f=te.useRef(null),h=Cm(i,f);if(!a.children||a.children.length===0)return null;const m=ae.createElement(Tte,{ref:h,...u});let g=null,b=null;a.meta.pluginCache.render.beforeEditable.forEach(E=>{const C=a.getPlugin({key:E});if(Zr(l,C,"render"))return;const y=C.render.beforeEditable;b=ae.createElement(ae.Fragment,null,b,ae.createElement(y,u))}),a.meta.pluginCache.render.afterEditable.forEach(E=>{const C=a.getPlugin({key:E});if(Zr(l,C,"render"))return;const y=C.render.afterEditable;g=ae.createElement(ae.Fragment,null,g,ae.createElement(y,u))});let x=ae.createElement(ae.Fragment,null,n?n(m):m,ae.createElement(Xie,{id:s}),ae.createElement(Yie,{id:s,editableRef:f}),ae.createElement(Zie,{id:s}),ae.createElement(ise,{id:s}));return a.meta.pluginCache.render.aboveEditable.forEach(E=>{const C=a.getPlugin({key:E});if(Zr(l,C,"render"))return;const y=C.render.aboveEditable;x=ae.createElement(y,null,x)}),ae.createElement(sse,{id:s},ae.createElement(ase,{id:s,disabled:r.disabled,readOnly:t,autoFocusOnEditable:e,editor:a}),b,x,g)});fF.displayName="PlateContent";function ase(e){const t=Zt.c(25),{id:n,autoFocusOnEditable:r,disabled:i,editor:s,readOnly:a}=e,o=Ts(n);let l;t[0]!==i||t[1]!==a||t[2]!==o?(l=()=>{if(i){o.setReadOnly(!0);return}Pr(a)&&o.setReadOnly(a)},t[0]=i,t[1]=a,t[2]=o,t[3]=l):l=t[3];let u;t[4]!==i||t[5]!==s.dom||t[6]!==a||t[7]!==o?(u=[i,s.dom,a,o],t[4]=i,t[5]=s.dom,t[6]=a,t[7]=o,t[8]=u):u=t[8],ae.useLayoutEffect(l,u);const f=mi(o,"onNodeChange");let h,m;t[9]!==s||t[10]!==f?(h=()=>{f&&s.setOption(kp,"onNodeChange",f)},m=[s,f],t[9]=s,t[10]=f,t[11]=h,t[12]=m):(h=t[11],m=t[12]),ae.useLayoutEffect(h,m);const g=mi(o,"onTextChange");let b,x;t[13]!==s||t[14]!==g?(b=()=>{g&&s.setOption(kp,"onTextChange",g)},x=[s,g],t[13]=s,t[14]=g,t[15]=b,t[16]=x):(b=t[15],x=t[16]),ae.useLayoutEffect(b,x);const E=ae.useRef(a);let C;t[17]!==r||t[18]!==s.tf||t[19]!==a?(C=()=>{r&&E.current&&!a&&s.tf.focus({edge:"endEditor"}),E.current=a},t[17]=r,t[18]=s.tf,t[19]=a,t[20]=C):C=t[20];let y;return t[21]!==r||t[22]!==s||t[23]!==a?(y=[r,s,a],t[21]=r,t[22]=s,t[23]=a,t[24]=y):y=t[24],ae.useEffect(C,y),null}const dF=e=>Array.isArray(e.children)?{...e,children:e.children.map(dF)}:{...e},ose=e=>e.map(dF);function lse(e={},t=[]){const[,n]=ae.useState({}),r=ae.useRef(!1);return ae.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),ae.useMemo(()=>e.enabled===!1?null:tF({...e,value:Array.isArray(e.value)?ose(e.value):e.value,onReady:i=>{i.isAsync&&r.current&&n({}),e.onReady?.(i)}}),[e.id,e.enabled,...t])}const use={a:"a",ai:"ai",aiChat:"aiChat",audio:"audio",blockquote:"blockquote",bold:"bold",callout:"callout",code:"code",codeBlock:"code_block",codeDrawing:"code_drawing",codeLine:"code_line",codeSyntax:"code_syntax",column:"column",columnGroup:"column_group",comment:"comment",date:"date",emojiInput:"emoji_input",equation:"equation",excalidraw:"excalidraw",file:"file",footnoteDefinition:"footnoteDefinition",footnoteInput:"footnoteInput",footnoteReference:"footnoteReference",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",highlight:"highlight",hr:"hr",img:"img",inlineEquation:"inline_equation",italic:"italic",kbd:"kbd",li:"li",lic:"lic",link:"a",listTodoClassic:"action_item",mediaEmbed:"media_embed",mention:"mention",mentionInput:"mention_input",olClassic:"ol",p:"p",searchHighlight:"search_highlight",slashInput:"slash_input",strikethrough:"strikethrough",sub:"subscript",suggestion:"suggestion",sup:"superscript",table:"table",tag:"tag",taskList:"taskList",td:"td",th:"th",toc:"toc",toggle:"toggle",tr:"tr",ulClassic:"ul",underline:"underline",video:"video"},cse={backgroundColor:"backgroundColor",color:"color",fontFamily:"fontFamily",fontSize:"fontSize",fontWeight:"fontWeight",indent:"indent",lineHeight:"lineHeight",listType:"listStyleType",textAlign:"textAlign",textIndent:"textIndent"},ee={...use,...cse,autoformat:"autoformat",blockMenu:"blockMenu",blockPlaceholder:"blockPlaceholder",blockSelection:"blockSelection",caption:"caption",copilot:"copilot",csv:"csv",cursorOverlay:"cursorOverlay",delete:"delete",dnd:"dnd",docx:"docx",emoji:"emoji",exitBreak:"exitBreak",heading:["h1","h2","h3","h4","h5","h6"],html:"html",juice:"juice",list:"list",listChecked:"checked",listClassic:"listClassic",listRestart:"listRestart",listRestartPolite:"listRestartPolite",listStart:"listStart",listTodo:"todo",markdown:"markdown",nodeId:"nodeId",normalizeTypes:"normalizeTypes",ol:"decimal",placeholder:"placeholder",playwright:"playwright",removeEmptyNodes:"removeEmptyNodes",resetNode:"resetNode",singleBlock:"singleBlock",singleLine:"singleLine",slashCommand:"slash_command",softBreak:"softBreak",tabbable:"tabbable",trailingBlock:"trailingBlock",ul:"disc",yjs:"yjs"};var o2,BA;function fse(){if(BA)return o2;BA=1;var e=dE(),t=Fc(),n=DB(),r=qc(),i=Object.prototype,s=i.hasOwnProperty,a=e(function(o,l){o=Object(o);var u=-1,f=l.length,h=f>2?l[2]:void 0;for(h&&n(l[0],l[1],h)&&(f=1);++u{if(!t(e))return;let n=e.firstChild;for(;n;){const r=n,i=n.previousSibling;n=n.nextSibling,hF(r,t),!r.previousSibling&&!r.nextSibling&&!r.parentNode&&n&&i!==n.previousSibling&&n.parentNode?n=i?i.nextSibling:e.firstChild:!r.previousSibling&&!r.nextSibling&&!r.parentNode&&n&&!n.previousSibling&&!n.nextSibling&&!n.parentNode&&(i?n=i.nextSibling?i.nextSibling.nextSibling:null:e.firstChild&&(n=e.firstChild.nextSibling))}},Xw=(e,t)=>{hF(e,n=>W0(n)?t(n):!0)},mse=(e,t)=>{let n=null;return Xw(e,r=>t(r)?(n=r,!1):!0),n},Am=(e,t)=>!!mse(e,t),gse=e=>`${e.trim().replaceAll(new RegExp(pse,"g"),"")}`;Jt({key:ee.exitBreak,editOnly:!0}).extendTransforms(({editor:e})=>({insert:t=>e.tf.insertExitBreak(t),insertBefore:t=>e.tf.insertExitBreak({...t,reverse:!0})}));const vse=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){const{rules:s,onError:a}=t();if(!(i.length===0&&s.some(({path:o,strictType:l,type:u})=>{const f=dt.get(e,o);if(f){if(l&&Rt.isElement(f)&&f.type!==l){const{children:h,...m}=e.api.create.block({type:l});return e.tf.setNodes(m,{at:o}),!0}}else try{return e.tf.insertNodes(e.api.create.block({type:l??u}),{at:o}),!0}catch(h){a?.(h)}return!1})))return n([r,i])}}});Wn({key:ee.normalizeTypes,options:{rules:[]}}).overrideEditor(vse);Jt({key:ee.singleBlock,override:{enabled:{[ee.trailingBlock]:!1}}}).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{insertBreak(){e.tf.insertSoftBreak()},normalizeNode(n){const[r,i]=n;if(i.length===0&&e.children.length>1){e.tf.withoutNormalizing(()=>{for(;e.children.length>1;)e.tf.insertText(` -`,{at:e.api.start([1])}),e.tf.mergeNodes({at:[1],match:(s,a)=>a.length===1})});return}t(n)}}}));Jt({key:ee.singleLine,override:{enabled:{[ee.trailingBlock]:!1}}}).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{insertBreak(){},insertSoftBreak(){},normalizeNode(n){const[r,i]=n;if(Pn.isText(r)){const s=r.text.replace(/[\r\n\u2028\u2029]/g,"");if(s!==r.text){e.tf.insertText(s,{at:i});return}}if(i.length===0&&e.children.length>1){e.tf.withoutNormalizing(()=>{for(;e.children.length>1;)e.tf.mergeNodes({at:[1],match:(s,a)=>a.length===1})});return}t(n)}}}));const yse=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){const{insert:s,level:a,type:o,...l}=t(),u=o??e.getType(ee.p);if(i.length===0){const f=e.api.last([],{level:a}),h=f?.[0];if(!h||h.type!==u&&eu(f,l)){const m=f?Ye.next(f[1]):[0],g=()=>{e.tf.insertNodes(e.api.create.block({type:u},m),{at:m})};s?s(e,{at:m,insert:g,type:u}):g();return}}return n([r,i])}}});Wn({key:ee.trailingBlock,options:{level:0}}).overrideEditor(yse).extend(({editor:e})=>({options:{type:e.getType(ee.p)}}));const xse=(e,t=[])=>{const n=e.getType(ee.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:i,type:n}),i=[])};return t.forEach(a=>{if(Rt.isElement(a)&&!e.api.isInline(a)&&e.api.isBlock(a)){s(),r.push(a);return}i.push(a)}),s(),r.length>0?r:[{children:[{text:""}],type:n}]},Qw=(e,t,n,r)=>{const i=e.getType(ee.p);return t.type!==i||t[ee.listType]?!1:!!e.api.above({at:n,match:(s,a)=>a.length{if(!Qw(e,t,n,r))return!1;if(!(e.selection&&e.api.isEmpty(e.selection,{block:!0})))return!0;const i=e.api.parent(n);return!i||i[0].type!==r?!0:!Ye.hasPrevious(n)},wse=Jt({key:ee.blockquote,node:{isElement:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"BLOCKQUOTE"}]}}},render:{as:"blockquote"},rules:{break:{empty:"lift"},delete:{start:"lift"},match:({editor:e,node:t,path:n,rule:r})=>{if(!["break.empty","delete.start"].includes(r)||!n)return!1;const i=e.getType(ee.blockquote);return r==="delete.start"?bse(e,t,n,i):Qw(e,t,n,i)}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t,{wrap:!0})}})).overrideEditor(({editor:e,tf:{normalizeNode:t,tab:n},type:r})=>({transforms:{normalizeNode([i,s]){if(Rt.isElement(i)&&i.type===r){const a=xse(e,i.children);if(a.length!==i.children.length||a.some((o,l)=>o!==i.children[l])){e.tf.replaceNodes(a,{at:s,children:!0});return}}t([i,s])},tab(i){if(i.reverse){const s=e.api.blocks({mode:"lowest",match:(a,o)=>!a.indent&&Qw(e,a,o,r)});if(s.length>0){const a=[...s].sort((o,l)=>l[1].length-o[1].length||l[1].join(".").localeCompare(o[1].join(".")));return e.tf.withoutNormalizing(()=>{for(const[,o]of a)e.tf.liftBlock({at:o,match:{type:r}})}),!0}}return n(i)}}})),Kc={isElement:!0},Gc={break:{splitReset:!0},delete:{start:"reset"},merge:{removeEmpty:!0}},pF=Wn({key:"h1",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H1"}]}}},render:{as:"h1"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),mF=Wn({key:"h2",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H2"}]}}},render:{as:"h2"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),gF=Wn({key:"h3",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H3"}]}}},render:{as:"h3"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),vF=Wn({key:"h4",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H4"}]}}},render:{as:"h4"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),yF=Wn({key:"h5",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H5"}]}}},render:{as:"h5"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),xF=Wn({key:"h6",node:Kc,parsers:{html:{deserializer:{rules:[{validNodeName:"H6"}]}}},render:{as:"h6"},rules:Gc}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),Ese=Wn({key:"heading",options:{levels:[1,2,3,4,5,6]}}).extend(({plugin:e})=>{const{options:{levels:t}}=e,n={1:pF,2:mF,3:gF,4:vF,5:yF,6:xF};return{plugins:(Array.isArray(t)?t:Array.from({length:t||6},(r,i)=>i+1)).map(r=>n[r])}}),Cse=Jt({key:ee.hr,node:{isElement:!0,isVoid:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"HR"}]}}},render:{as:"hr"}}),bF=Jt({key:ee.bold,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["STRONG","B"]},{validStyle:{fontWeight:["600","700","bold"]}}],query:({element:e})=>!Am(e,t=>t.style.fontWeight==="normal")}}},render:{as:"strong"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),wF=Jt({key:ee.code,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["CODE"]},{validStyle:{fontFamily:"Consolas"}}],query({element:e}){return aw(e,"P")?.style.fontFamily==="Consolas"?!1:!aw(e,"PRE")}}}},render:{as:"code"},rules:{selection:{affinity:"hard"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),EF=Jt({key:ee.italic,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["EM","I"]},{validStyle:{fontStyle:"italic"}}],query:({element:e})=>!Am(e,t=>t.style.fontStyle==="normal")}}},render:{as:"em"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),CF=Jt({key:ee.strikethrough,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["S","DEL","STRIKE"]},{validStyle:{textDecoration:"line-through"}}],query:({element:e})=>!Am(e,t=>t.style.textDecoration==="none")}}},render:{as:"s"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),kF=Jt({key:ee.sub,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["SUB"]},{validStyle:{verticalAlign:"sub"}}]}}},render:{as:"sub"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t,{remove:e.getType(ee.sup)})}})),DF=Jt({key:ee.sup,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["SUP"]},{validStyle:{verticalAlign:"super"}}]}}},render:{as:"sup"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t,{remove:e.getType(ee.sub)})}})),SF=Jt({key:ee.underline,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["U"]},{validStyle:{textDecoration:["underline"]}}],query:({element:e})=>!Am(e,t=>t.style.textDecoration==="none")}}},render:{as:"u"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),kse=Jt({plugins:[bF,wF,EF,CF,kF,DF,SF]}),Dse=Jt({key:ee.highlight,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["MARK"]}]}}},render:{as:"mark"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),Sse=Jt({key:ee.kbd,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["KBD"]}]}}},render:{as:"kbd"},rules:{selection:{affinity:"hard"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),_F=un(wse),_se=un(Ese),Ase=un(pF),Tse=un(mF),Nse=un(gF),Ose=un(vF),Bse=un(yF),Pse=un(xF),AF=un(Cse);Sm({plugins:[_F,_se,AF]});const Rse=un(bF,{shortcuts:{toggle:{keys:[[Ql.Mod,"b"]]}}}),Fse=un(wF),Ise=un(EF,{shortcuts:{toggle:{keys:[[Ql.Mod,"i"]]}}}),Mse=un(CF),Lse=un(kF),zse=un(DF),jse=un(SF,{shortcuts:{toggle:{keys:[[Ql.Mod,"u"]]}}}),qse=un(kse,{plugins:[Rse,Fse,Ise,Mse,Lse,zse,jse]}),$se=un(Dse);un(Sse);const Vse=(e,{children:t,header:n,row:r}={})=>(n=n??(r?r.children.every(i=>i.type===e.getType(ee.th)):!1),{children:t??[e.api.create.block()],type:n?e.getType(ee.th):e.getType(ee.td)}),Use=(e,{colCount:t=1,...n}={})=>{const{api:r}=e.getPlugin({key:ee.table});return{children:Array.from({length:t}).fill(t).map(()=>r.create.tableCell(n)),type:e.getType(ee.tr)}},Hse=(e,{colCount:t,header:n,rowCount:r=0,...i}={})=>{const{api:s}=e.getPlugin({key:ee.table});return{children:Array.from({length:r}).fill(r).map((a,o)=>s.create.tableRow({colCount:t,...i,header:n&&o===0})),type:e.getType(ee.table)}},Tm=e=>e.colSpan||Number(e.attributes?.colspan)||1,e3=e=>e.rowSpan||Number(e.attributes?.rowspan)||1,ip=({col:e,row:t},n)=>({col:e+Tm(n)-1,row:t+e3(n)-1});function Nm(e,{all:t,cellNode:n,tableNode:r}){const{api:i,getOptions:s,setOption:a}=pn(e,{key:ee.table});if(!r&&(!n||(r=e.api.above({at:n,match:{type:e.getType(ee.table)}})?.[0],!r)))return;const{_cellIndices:o}=s(),l={...o};let u=!1;const f=[];let h;for(let m=0;m{const{getOption:n}=pn(e,{key:ee.table});let r=n("cellIndices",t.id);return r||(r=Nm(e,{cellNode:t}),r||e.api.debug.warn("No cell indices found for element. Make sure all table cells have an id.","TABLE_CELL_INDICES")),r??{col:0,row:0}},FA=e=>{const t=e.at(-2);if(t===void 0)throw new Error(`can not get rowIndex of path ${e}`);return t},Tr=e=>zJ(e,[ee.td,ee.th]),Wse=(e,{at:t=e.selection}={})=>{if(!t)return;const n=e.api.node({at:t,match:{type:Tr(e)}});if(!n)return;const[,r]=n,i=e.api.above({at:r,match:{type:e.getType(ee.tr)}});if(!i)return;const[,s]=i,a=e.api.above({at:s,match:{type:e.getType(ee.table)}});if(a)return{cell:n,row:i,table:a}},Kse=(e,t)=>{const n=e.api.node(Ye.next(t));if(!n)return;const[r,i]=n,s=r?.children?.[0],a=i.concat(0);if(s&&a)return e.api.node(a)},Gse=(e,t)=>{const n=Ye.previous(t);if(!n)return;const r=e.api.node(n);if(!r)return;const[i,s]=r,a=i?.children?.[i.children.length-1],o=s.concat(i.children.length-1);if(a&&o)return e.api.node(o)},Yse=(e,t,n,r)=>{const i=e.api.node(Ye.next(n));if(i)return i;const[,s]=r;return Kse(e,s)},Jse=(e,t,n,r)=>{const i=Ye.previous(n);if(!i){const[,a]=r;return Gse(e,a)}const s=e.api.node(i);if(s)return s},J0=(e,t,n,r)=>t.children.flatMap(i=>i.children).find(i=>{const s=er(e,i),{col:a,row:o}=s,{col:l,row:u}=ip(s,i);return r>=a&&r<=l&&n>=o&&n<=u}),Xse=(e,{at:t,format:n})=>{const{api:r,type:i}=pn(e,ta),s=e.api.node({at:t.anchor.path,match:{type:Tr(e)}}),a=e.api.node({at:t.focus.path,match:{type:Tr(e)}}),o=s[0],l=a[0],u=s[1].slice(0,-2),f=e.api.node({at:u,match:{type:i}})[0],{col:h,row:m}=ip(er(e,o),o),{col:g,row:b}=ip(er(e,l),l);let x=Math.min(m,b),E=Math.max(m,b),C=Math.min(h,g),y=Math.max(h,g);const _=E-x,O=y-C;let S=r.create.table({children:[],colCount:O+1,rowCount:_+1}),w=[],A=new WeakSet,T=x,P=C;for(;;){const F=J0(e,f,T,P);if(!F)break;const z=er(e,F),{col:$,row:Y}=ip(z,F),{col:Z,row:ve}=z;if(veE||Zy){A=new WeakSet,w=[],x=Math.min(x,ve),E=Math.max(E,Y),C=Math.min(C,Z),y=Math.max(y,$),T=x,P=C;const me=E-x,re=y-C;S=r.create.table({children:[],colCount:re+1,rowCount:me+1});continue}if(!A.has(F)){A.add(F);const me=S.children[T-x].children;me[P-C]=F;const re=e.api.findPath(F);w.push([F,re])}if(P+1<=y)P+=1;else if(T+1<=E)P=C,T+=1;else break}const M=n||"table";return M==="cell"?w:(S.children?.forEach(F=>{const z=F;z.children=z.children?.filter($=>{const Y=$;return r.table.getCellChildren(Y).length>0})}),M==="table"?[[S,u]]:{cellEntries:w,tableEntries:[[S,u]]})},Qse=e=>!!e?.children.some(t=>t.children.some(n=>{const r=n;return Tm(r)>1||e3(r)>1})),Zse=(e,{at:t,format:n="table"})=>{const{api:r}=e.getPlugin({key:ee.table}),{disableMerge:i}=e.getOptions(ta),s=t.anchor.path,a=t.focus.path,o=s.slice(0,-2),l=dt.get(e,o);if(!i&&Qse(l))return Xse(e,{at:t,format:n});const u=s.at(-2),f=a.at(-2),h=s.at(-1),m=a.at(-1),g=Math.min(u,f),b=Math.max(u,f),x=Math.min(h,m),E=Math.max(h,m),C=b-g,y=E-x,_=r.create.table({children:[],colCount:y+1,rowCount:C+1});let O=g,S=x;const w=[];for(;;){const A=o.concat([O,S]),T=dt.get(e,A);if(!T)break;const P=_.children[O-g].children;if(P[S-x]=T,w.push([T,A]),S+1<=E)S+=1;else if(O+1<=b)S=x,O+=1;else break}return n==="cell"?w:[[_,o]]},Qr=(e,{format:t="table",...n}={})=>{const{api:r}=e.getPlugin({key:ee.table}),i=e.api.edgeBlocks({match:{type:Tr(e)},...n});if(i){const[s,a]=i;if(!Ye.equals(s[1],a[1]))return Zse(e,{at:{anchor:{offset:0,path:s[1]},focus:{offset:0,path:a[1]}},format:t});if(t==="table"){const o=r.create.table({rowCount:1});return o.children[0].children=[s[0]],[[o,s[1].slice(0,-2)]]}return[s]}return[]},IA=new WeakMap,X0=e=>{const{selection:t}=e,{children:n}=e,r=IA.get(e);if(r&&r.children===n&&r.selection===t)return r;const i={children:n,selection:t};return IA.set(e,i),i},Q0=e=>{const t=X0(e);if("cellEntries"in t)return t.cellEntries??[];const n=Qr(e,{format:"cell"}),r=n.length>1?n:[];return t.cellEntries=r,r},MA=e=>{const t=X0(e);if("selectedCells"in t)return t.selectedCells??null;const n=Q0(e);if(n.length===0)return t.selectedCells=null,null;const r=n.map(([i])=>i);return t.selectedCells=r,r},LA=e=>{const t=X0(e);if("selectedCellIds"in t)return t.selectedCellIds??null;const n=Q0(e).map(([i])=>i.id).filter(i=>!!i),r=n.length>0?n:null;return t.selectedCellIds=r,r},zA=e=>{const t=X0(e);if("selectedTableIds"in t)return t.selectedTableIds??null;const n=e4(e);if(!n)return t.selectedTableIds=null,null;const r=n.map(s=>s.id).filter(s=>!!s),i=r.length>0?r:null;return t.selectedTableIds=i,i},Zw=(e,t)=>t?Q0(e).find(([n])=>n.id===t)?.[0]??null:null,e4=e=>{const t=X0(e);if("selectedTables"in t)return t.selectedTables??null;if(Q0(e).length===0)return t.selectedTables=null,null;const n=Qr(e,{format:"table"}).map(([r])=>r);return t.selectedTables=n,n},jA=(e,t)=>!!Zw(e,t),qA=e=>Q0(e).length>0,au=(e,t)=>e.api.block({above:!0,match:{type:e.getType(ee.table)},...t}),eae=(e,{cellIndices:t,defaultBorder:n={size:1},element:r})=>{const i=e.api.findPath(r),[s,a]=e.api.parent(i)??[];if(!s||!a)return{bottom:n,right:n};const[o]=e.api.parent(a)??[],l=e.getType(ee.table);if(!o||o.type!==l)return{bottom:n,right:n};const{col:u}=t??er(e,r),f=u===0,h=o.children?.[0]===s,m=g=>{const b=r.borders?.[g];return{color:b?.color??n.color,size:b?.size??n.size,style:b?.style??n.style}};return{bottom:m("bottom"),left:f?m("left"):void 0,right:m("right"),top:h?m("top"):void 0}},tae=(e,{cellIndices:t,colSizes:n,element:r,rowSize:i})=>{const{api:s}=pn(e,{key:ee.table}),a=e.api.findPath(r);if(!i){const[f]=e.api.parent(a)??[];if(!f||f.type!==e.getType(ee.tr))return{minHeight:0,width:0};i=f.size??0}if(!n){const[,f]=e.api.parent(a)??[];if(!f)return{minHeight:i,width:0};const[h]=e.api.parent(f)??[];if(!h)return{minHeight:i,width:0};n=nae(h)}const o=s.table.getColSpan(r),{col:l}=t??er(e,r),u=(n??[]).slice(l,l+o).reduce((f,h)=>f+(h||0),0);return{minHeight:i,width:u}},Z0=e=>e.children?.[0]?.children?e.children[0].children.map(t=>t.colSpan||t?.attributes?.colspan||1).reduce((t,n)=>Number(t)+Number(n)):0,nae=(e,t)=>{const n=Z0(e);return(e.colSizes?[...e.colSizes]:Array.from({length:n}).fill(0)).map((r,i)=>r)},TF=(e,t)=>{const[n,r]=dn.edges(e.selection),i=dt.child(t[0],0),s=dt.child(t[0],t[0].children.length-1),a=e.api.above({at:n,match:l=>l.type===ee.tr}),o=e.api.above({at:r,match:l=>l.type===ee.tr});!a||!o||i.id===a[0].id&&o[0].id===s.id&&rae(e)},rae=e=>{const t=Qr(e,{format:"cell"}),n=[];t.forEach(([r,i])=>{n.push(e.api.pathRef(i))}),n.forEach(r=>{e.tf.removeNodes({at:r.unref()})})},Pp=(e,t,n,r)=>{const[i,s]=t,a=i.children[n].children.findIndex(o=>{const{col:l}=er(e,o);return l===r});return s.concat([n,a])},NF=e=>e.children?.[0]?.children?.reduce((t,n)=>t+(Tm(n)??1),0),iae=e=>{const t=e.getType(ee.table),n=e.api.above({match:{type:t}});n&&e.tf.withoutNormalizing(()=>{const{api:r}=pn(e,ta);if(e.api.isExpanded())return TF(e,n);const i=n[0],s=e.api.above({match:{type:Tr(e)}});if(!s)return;const a=s[0],{col:o}=er(e,a),l=r.table.getColSpan(a);if(NF(i)<=l){e.tf.removeNodes({at:n[1]});return}const u=o+l-1,f=i.children.length,h=new Set;for(const x of Array.from({length:f},(E,C)=>C))for(const E of Array.from({length:l},(C,y)=>y)){const C=J0(e,i,x,o+E);C&&h.add(C)}const m=Array.from(h),{squizeColSpanCells:g}=m.reduce((x,E)=>{if(!E)return x;const C=E,{col:y}=er(e,C),_=r.table.getColSpan(C);return(y1||_>1&&y+_-1>u)&&x.squizeColSpanCells.push(C),x},{squizeColSpanCells:[]});g.forEach(x=>{const E=x,{col:C,row:y}=er(e,E),_=r.table.getColSpan(E),O=Pp(e,n,y,C),S=_-(Math.min(C+_-1,u)-o+1),w=Ds({...E,colSpan:S});w.attributes?.colspan&&(w.attributes.colspan=S.toString()),e.tf.setNodes(w,{at:O})});const b=e.api.above({match:{type:e.getType(ee.tr)}});if(a&&b&&n&&b[0].children.length>1){const[x,E]=n,C=[];m.forEach(_=>{const O=_,{col:S,row:w}=er(e,O);if(!g.includes(O)&&S>=o&&S<=u){const A=Pp(e,n,w,S);C[w]||(C[w]=[]),C[w].push(A)}}),C.forEach(_=>{const O=_[0];_.forEach(()=>{e.tf.removeNodes({at:O})})});const{colSizes:y}=x;if(y){const _=[...y];_.splice(o,1),e.tf.setNodes({colSizes:_},{at:E})}}})},OF=(e,[t,n])=>{const{api:r}=pn(e,ta),i=NF(t),s=Qr(e,{format:"cell"}),a=FA(s[0][1]);if(a===null)return;let o=0,l=-1,u=0,f=0;if(s.forEach(([h,m])=>{m.at(-2)===a&&(o+=h.colSpan??1);const g=FA(m);if(l!==g){if(u!==0){u--;return}const b=r.table.getRowSpan(h);u=b&&b>1?b-1:0,f+=b??1}l=g}),o===i){const h=[];for(let m=a;m{e.tf.removeNodes({at:m.unref()})})}},sae=e=>{const{api:t,tf:n,type:r}=pn(e,{key:ee.table});if(e.api.some({match:{type:r}})){const i=e.api.above({match:{type:r}});if(!i)return;if(e.api.isExpanded())return OF(e,i);const s=i[0],a=e.api.above({match:{type:Tr(e)}});if(!a)return;const o=a[0],{row:l}=er(e,o),u=t.table.getRowSpan(o),f=l+u-1,h=Z0(s),m=new Set;for(const _ of Array.from({length:h},(O,S)=>S))for(const O of Array.from({length:u},(S,w)=>w)){const S=J0(e,s,l+O,_);m.add(S)}const{moveToNextRowCells:g,squizeRowSpanCells:b}=Array.from(m).reduce((_,O)=>{if(!O)return _;const S=O,{row:w}=er(e,S),A=t.table.getRowSpan(S);return w1?_.squizeRowSpanCells.push(S):A>1&&w+A-1>f&&_.moveToNextRowCells.push(S),_},{moveToNextRowCells:[],squizeRowSpanCells:[]}),x=l+u,E=s.children[x];if(E===void 0&&l===0){n.remove.table();return}if(E)for(let _=0;_{const{col:de}=er(e,re);return de>=S});if(T===-1){const re=E.children.at(-1),de=e.api.findPath(re),I=de.slice(0,-2),X=de.at(-1)+_+1,ne=[...I,x,X],W=A-(f-w+1),Te=Ds({...O,rowSpan:W});Te.attributes?.rowspan&&(Te.attributes.rowspan=W.toString()),e.tf.insertNodes(Te,{at:ne});continue}const P=E.children[T],{col:M}=er(e,P);let F=_;M{const O=_,{row:S}=er(e,O),w=t.table.getRowSpan(O),A=e.api.findPath(O),T=w-(Math.min(S+w-1,f)-l+1),P=Ds({...O,rowSpan:T});P.attributes?.rowspan&&(P.attributes.rowspan=T.toString()),e.tf.setNodes(P,{at:A})});const C=s.children[l],y=e.api.findPath(C);Array.from({length:u}).forEach(()=>{e.tf.removeNodes({at:y})})}},aae=(e,{at:t,before:n,fromCell:r,header:i,select:s}={})=>{const{api:a,getOptions:o,type:l}=pn(e,ta),{initialTableWidth:u,minColumnWidth:f}=o();t&&!r&&dt.get(e,t)?.type===e.getType(ee.table)&&(r=dt.lastChild(e,t.concat([0]))[1],t=void 0);const h=r?e.api.node({at:r,match:{type:Tr(e)}}):e.api.block({match:{type:Tr(e)}});if(!h)return;const[,m]=h,g=h[0],b=e.api.block({above:!0,at:m,match:{type:l}});if(!b)return;const[x,E]=b,{col:C}=er(e,g),y=a.table.getColSpan(g);let _,O;Ye.isPath(t)?(_=C,O=C-1):(_=n?C:C+y,O=n?C:C+y-1);const S=x.children.length,w=_<=0;let A=n?0:1;w&&(O=0,A=0);const T=new Set;Array.from({length:S},(P,M)=>M).forEach(P=>{const M=J0(e,x,P,O);M&&T.add(M)}),Array.from(T).forEach(P=>{const{col:M,row:F}=er(e,P),z=a.table.getRowSpan(P),$=a.table.getColSpan(P),Y=Pp(e,b,F,M);if(M+$-1>=_&&!w&&!n){const Z=$+1,ve=Ds({...P,colSpan:Z});ve.attributes?.colspan&&(ve.attributes.colspan=Z.toString()),e.tf.setNodes(ve,{at:Y})}else{const Z=Y.slice(0,-1),ve=Y.at(-1),me=[...Z,n?ve:ve+A],re=e.api.parent(Y)[0],de={...a.create.tableCell({header:i,row:re}),colSpan:1,rowSpan:z};e.tf.insertNodes(de,{at:me,select:s})}}),e.tf.withoutNormalizing(()=>{const{colSizes:P}=x;if(P){let M=[...P.slice(0,_),0,...P.slice(_)];if(u){M[_]=P[_]??P[_-1]??u/P.length;const F=P.reduce((Y,Z)=>Y+Z,0),z=M.reduce((Y,Z)=>Y+Z,0),$=Math.max(F,u);if(z>$){const Y=$/z;M=M.map(Z=>Math.max(f??0,Math.floor(Z*Y)))}}e.tf.setNodes({colSizes:M},{at:E})}})},oae=(e,{at:t,before:n,fromRow:r,header:i,select:s}={})=>{const{api:a,type:o}=pn(e,ta);t&&!r&&dt.get(e,t)?.type===e.getType(ee.table)&&(r=dt.lastChild(e,t)[1],t=void 0);const l=e.api.block({at:r,match:{type:e.getType(ee.tr)}});if(!l)return;const[,u]=l,f=e.api.block({above:!0,at:u,match:{type:o}});if(!f)return;const h=f[0],m=e.api.node({at:r,match:{type:Tr(e)}});if(!m)return;const[g,b]=m,x=g,E=a.table.getRowSpan(x),{row:C}=er(e,x),y=b.at(-2),_=b.slice(0,-2);let O,S,w;Ye.isPath(t)?(O=t.at(-1),S=C-1,w=t):(O=n?C:C+E,S=n?C-1:C+E-1,w=[..._,n?y:y+E]);const A=O===0;A&&(S=0);const T=Z0(h),P=new Set;Array.from({length:T},(z,$)=>$).forEach(z=>{const $=J0(e,h,S,z);$&&P.add($)});const M=Array.from(P),F=[];M.forEach(z=>{if(!z)return;const $=z,{col:Y,row:Z}=er(e,$),ve=a.table.getRowSpan($),me=a.table.getColSpan($),re=Pp(e,f,Z,Y);if(Z+ve-1>=O&&!A){const de=ve+1,I=Ds({...$,rowSpan:de});I.attributes?.rowspan&&(I.attributes.rowspan=de.toString()),e.tf.setNodes(I,{at:re})}else{const de=e.api.parent(re)[0],I=a.create.tableCell({header:i,row:de});F.push({...I,colSpan:me,rowSpan:1})}}),e.tf.withoutNormalizing(()=>{if(e.tf.insertNodes({children:F,type:e.getType(ee.tr)},{at:w,select:!1}),s){const z=e.api.node({at:w,match:{type:Tr(e)}});if(z){const[,$]=z;e.tf.select($)}}})},lae=e=>{const{api:t}=pn(e,ta),n=Qr(e,{format:"cell"});e.tf.withoutNormalizing(()=>{let r=0;for(const u of n){const[f,h]=u;if(h.at(-2)===n[0][1].at(-2)){const m=t.table.getColSpan(f);r+=m}}let i=0;const{col:s}=er(e,n[0][0]);n.forEach(u=>{const f=u[0],{col:h}=er(e,f);s===h&&(i+=t.table.getRowSpan(f))});const a=[];for(const u of n){const[f]=u,h=t.table.getCellChildren(f);(h.length!==1||!e.api.isEmpty(h[0]))&&a.push(...Ds(h))}const o={};n.forEach(([u,f])=>{const h=f.at(-2);o[h]?o[h].push(f):o[h]=[f]}),Object.values(o).forEach(u=>{u?.forEach(()=>{e.tf.removeNodes({at:u[0]})})});const l={...t.create.tableCell({children:a,header:n[0][0].type===e.getType(ee.th)}),colSpan:r,rowSpan:i};e.tf.insertNodes(l,{at:n[0][1]})}),e.tf.select(e.api.end(n[0][1]))},uae=e=>{const{api:t}=pn(e,ta),n=e.getType(ee.tr),[[r,i]]=Qr(e,{format:"cell"});e.tf.withoutNormalizing(()=>{const s=b=>({...t.create.tableCell({children:b,header:r.type===e.getType(ee.th)}),colSpan:1,rowSpan:1}),a=i.slice(0,-2),[o,l]=i.slice(-2),u=t.table.getColSpan(r),f=t.table.getRowSpan(r),h=[];for(let b=0;b{const E=e.api.node({at:[...a,b],match:{type:n}});if(!E)return 0;const C=E[0];let y=[],_=Number.POSITIVE_INFINITY,O=!1;if(C.children.forEach(S=>{const w=S,{col:A}=er(e,w),T=Math.abs(A-x);T<_&&(_=T,y=e.api.findPath(w),O=A0){const S=y.at(-1);return O?S+1:S}return 1};for(let b=0;b{const r=e.api.nodes({at:[],match:{type:t}});for(const[i]of r)Nm(e,{tableNode:i});return n},fae=e=>{const{getOptions:t,type:n}=pn(e,{key:ee.table}),{disableMerge:r}=t(),i=e.api.above({match:{type:n}});i&&e.tf.withoutNormalizing(()=>{if(!r){iae(e);return}if(e.api.isExpanded())return TF(e,i);const s=e.api.above({match:{type:Tr(e)}}),a=e.api.above({match:{type:e.getType(ee.tr)}});if(s&&a&&Z0(i[0])<=1){e.tf.removeNodes({at:i[1]});return}if(s&&a&&i&&a[0].children.length>1){const[o,l]=i,u=s[1],f=u.at(-1),h=u.slice(),m=h.length-2;o.children.forEach((b,x)=>{h[m]=x,!(b.children.length===1||f>b.children.length-1)&&e.tf.removeNodes({at:h})});const{colSizes:g}=o;if(g){const b=[...g];b.splice(f,1),e.tf.setNodes({colSizes:b},{at:l})}}})},dae=e=>{const{getOptions:t,type:n}=pn(e,{key:ee.table}),{disableMerge:r}=t();if(!r)return sae(e);if(e.api.some({match:{type:n}})){const i=e.api.above({match:{type:n}});if(!i)return;if(e.api.isExpanded())return OF(e,i);const s=e.api.above({match:{type:e.getType(ee.tr)}});s&&i&&i[0].children.length>1&&e.tf.removeNodes({at:s[1]})}},hae=e=>{if(e.api.some({match:{type:e.getType(ee.table)}})){const t=e.api.above({match:{type:e.getType(ee.table)}});t&&e.tf.removeNodes({at:t[1]})}},pae=(e,{colCount:t=2,header:n,rowCount:r=2}={},{select:i,...s}={})=>{const{api:a}=e.getPlugin({key:ee.table}),o=e.getType(ee.table);e.tf.withoutNormalizing(()=>{const l=a.create.table({colCount:t,header:n,rowCount:r});if(!s.at){const u=e.api.block({match:{type:o}});if(u){const[,f]=u,h=Ye.next(f);e.tf.insertNodes(l,{at:h,...s}),e.selection&&e.tf.select(e.api.start(h));return}}if(e.tf.insertNodes(l,{nextBlock:!s.at,select:i,...s}),i){const u=e.api.node({at:s.at,match:{type:o}});if(!u)return;e.tf.select(e.api.start(u[1]))}})},mae=(e,t={})=>{const{api:n,getOptions:r,type:i}=pn(e,ta),{disableMerge:s,initialTableWidth:a,minColumnWidth:o}=r();if(!s)return aae(e,t);const{before:l,header:u,select:f}=t;let{at:h,fromCell:m}=t;h&&!m&&dt.get(e,h)?.type===e.getType(ee.table)&&(m=dt.lastChild(e,h.concat([0]))[1],h=void 0);const g=e.api.block({at:m,match:{type:Tr(e)}});if(!g)return;const[,b]=g,x=e.api.block({above:!0,at:b,match:{type:i}});if(!x)return;const[E,C]=x;let y,_;Ye.isPath(h)?(y=h,_=h.at(-1)):(y=l?b:Ye.next(b),_=l?b.at(-1):b.at(-1)+1);const O=b.at(-2);e.tf.withoutNormalizing(()=>{E.children.forEach((w,A)=>{const T=[...y];Ye.isPath(h)?T[h.length-2]=A:T[b.length-2]=A;const P=u===void 0?w.children.every(M=>M.type===e.getType(ee.th)):u;e.tf.insertNodes(n.create.tableCell({header:P}),{at:T,select:f&&A===O})});const{colSizes:S}=E;if(S){let w=[...S.slice(0,_),0,...S.slice(_)];if(a){w[_]=S[_]??S[_-1]??a/S.length;const A=S.reduce((M,F)=>M+F,0),T=w.reduce((M,F)=>M+F,0),P=Math.max(A,a);if(T>P){const M=P/T;w=w.map(F=>Math.max(o??0,Math.floor(F*M)))}}e.tf.setNodes({colSizes:w},{at:C})}})},gae=(e,t={})=>{const{api:n,getOptions:r,type:i}=pn(e,ta),{disableMerge:s}=r();if(!s)return oae(e,t);const{before:a,header:o,select:l}=t;let{at:u,fromRow:f}=t;u&&!f&&dt.get(e,u)?.type===e.getType(ee.table)&&(f=dt.lastChild(e,u)[1],u=void 0);const h=e.api.block({at:f,match:{type:e.getType(ee.tr)}});if(!h)return;const[m,g]=h,b=e.api.block({above:!0,at:g,match:{type:i}});if(!b)return;const x=()=>({children:m.children.map((E,C)=>{const y=b[0].children.length!==1&&b[0].children.every(_=>_.children[C].type===e.getType(ee.th));return n.create.tableCell({header:o??y})}),type:e.getType(ee.tr)});if(e.tf.withoutNormalizing(()=>{e.tf.insertNodes(x(),{at:Ye.isPath(u)?u:a?g:Ye.next(g)})}),l){const E=e.api.block({match:{type:Tr(e)}});if(!E)return;const[,C]=E;Ye.isPath(u)?C[C.length-2]=u.at(-2):C[C.length-2]=a?C.at(-2):C.at(-2)+1,e.tf.select(C)}},t4=(e,{at:t,edge:n,fromOneCell:r,reverse:i}={})=>{if(n){const a=Qr(e,{at:t,format:"cell"}),o=r?0:1;if(a.length>o){const[,l]=a[0],[,u]=a.at(-1),f=[...l],h=[...u];switch(n){case"bottom":h[h.length-2]+=1;break;case"left":f[f.length-1]-=1;break;case"right":h[h.length-1]+=1;break;case"top":f[f.length-2]-=1;break}return dt.has(e,f)&&dt.has(e,h)&&e.tf.select({anchor:e.api.start(f),focus:e.api.start(h)}),!0}return}const s=e.api.block({at:t,match:{type:Tr(e)}});if(s){const[,a]=s,o=[...a],l=i?-1:1;if(o[o.length-2]+=l,dt.has(e,o))e.tf.select(e.api.start(o));else{const u=a.slice(0,-2);i?e.tf.withoutNormalizing(()=>{e.tf.select(e.api.start(u)),e.tf.move({reverse:!0})}):e.tf.withoutNormalizing(()=>{e.tf.select(e.api.end(u)),e.tf.move()})}return!0}},$A=1,VA=e=>Array.from(e?.getClientRects?.()??[]).filter(t=>t.height>0),BF=(e,t=e.selection?.anchor)=>{if(!t||!e.api.isAt({block:!0,match:{type:Tr(e)}}))return;const n=e.api.block({at:t,match:{type:Tr(e)}}),r=e.api.block({at:t});if(!n||!r)return;const[,i]=n,[,s]=r;return{blockPath:s,cellPath:i,point:t}},PF=(e,{blockPath:t,cellPath:n,reverse:r})=>{const i=r?e.api.previous({at:t,block:!0}):e.api.next({at:t,block:!0});return!!i&&Ye.isAncestor(n,i[1])},RF=(e,{blockPath:t,point:n,reverse:r})=>{const i=e.api.range(t),s=r?e.api.isStart(n,t):e.api.isEnd(n,t);if(!i)return s;const a=VA(e.api.toDOMRange({anchor:n,focus:n})),o=VA(e.api.toDOMRange(i));if(a.length===0||o.length===0)return s;const l=a.at(-1),u=r?Math.min(...o.map(f=>f.top)):Math.max(...o.map(f=>f.bottom));return r?l.top<=u+$A:l.bottom>=u-$A},vae=({api:e,editor:t,getOptions:n,tf:{apply:r},type:i})=>({transforms:{apply(s){if(s.type==="set_selection"&&s.newProperties){const u={...t.selection,...s.newProperties};if(dn.isRange(u)&&t.api.isAt({at:u,blocks:!0,match:f=>f.type===i})){const f=t.api.block({at:u.anchor,match:h=>h.type===i});if(f){const[,h]=f;dn.isBackward(u)?s.newProperties.focus=t.api.start(h):t.api.before(h)&&(s.newProperties.focus=t.api.end(h))}else{const h=t.api.block({at:u.focus,match:m=>m.type===i});if(h){const[,m]=h;if(dn.isBackward(u)){const g=t.api.start(m),b=t.api.before(g);s.newProperties.focus=b??g}else s.newProperties.focus=t.api.end(m)}}}}const a=s.type==="remove_node"?s.node.type:s.type==="move_node"?t.api.node(s.path)?.[0].type:void 0,o=(s.type==="remove_node"||s.type==="move_node")&&a&&[t.getType(ee.tr),i,...Tr(t)].includes(a);if(o&&s.type==="remove_node"){const u=[...t.api.nodes({at:s.path,match:{type:Tr(t)}})],f=n()._cellIndices;u.forEach(([h])=>{delete f[h.id]})}r(s);let l;o&&a!==i&&(l=t.api.node({at:s.type==="move_node"?s.newPath:s.path,match:{type:i}})?.[0],l&&Nm(t,{tableNode:l}))}}}),yae=({editor:e,tf:{deleteFragment:t},type:n})=>({transforms:{deleteFragment(r){if(e.api.isAt({block:!0,match:i=>i.type===n})){const i=Qr(e,{format:"cell"});if(i.length>1){e.tf.withoutNormalizing(()=>{i.forEach(([,s])=>{e.tf.replaceNodes(e.api.create.block(),{at:s,children:!0})}),e.tf.select({anchor:e.api.start(i[0][1]),focus:e.api.end(i.at(-1)[1])})});return}}t(r)}}}),xae=({api:e,api:{getFragment:t},editor:n,type:r})=>({api:{getFragment(){const i=t(),s=[];return i.forEach(a=>{if(a.type===r){const o=a.children,l=o.length;if(!l)return;const u=o[0].children.length;if(l<=1&&u<=1){const h=o[0],m=e.table.getCellChildren(h);s.push(...m[0].children);return}const f=Qr(n);if(f.length>0){s.push(f[0][0]);return}}s.push(a)}),s}}}),bae=({api:e,editor:t,getOptions:n,tf:{insert:r,insertFragment:i},type:s})=>({transforms:{insertFragment(a){const o=a.find(l=>l.type===s);if(!o&&au(t,{at:t.selection?.anchor})){const l=Qr(t,{format:"cell"});if(l.length>1){l.forEach(u=>{if(u){const[,f]=u;t.tf.replaceNodes(Ds(a),{at:f,children:!0})}}),t.tf.select({anchor:t.api.start(l[0][1]),focus:t.api.end(l.at(-1)[1])});return}}if(o){if(au(t,{at:t.selection?.anchor})){const[l]=Qr(t,{at:t.selection?.anchor,format:"cell"});if(l){t.tf.withoutNormalizing(()=>{const[,u]=l,f=[...u],h=f.at(-1);let m=null,g=!0;o.children.forEach(b=>{if(f[f.length-1]=h,!g){const C=f.slice(0,-1);if(f[f.length-2]+=1,!dt.has(t,f)){if(n().disableExpandOnInsert)return;r.tableRow({fromRow:C})}}g=!1;const x=b.children;let E=!0;x.forEach(C=>{if(!E){const _=[...f];if(f[f.length-1]+=1,!dt.has(t,f)){if(n().disableExpandOnInsert)return;r.tableColumn({fromCell:_})}}E=!1;const y=e.table.getCellChildren(C);t.tf.replaceNodes(Ds(y),{at:f,children:!0}),m=[...f]})}),m&&t.tf.select({anchor:t.api.start(u),focus:t.api.end(m)})});return}}else if(a.length===1&&a[0].type===ee.table){t.tf.insertNodes(a[0]);return}}i(a)}}}),wae=({editor:e,tf:{insertText:t}})=>({transforms:{insertText(n,r){e.api.isExpanded()&&au(e,{at:e.selection?.anchor})&&Qr(e,{format:"cell"}).length>1&&e.tf.collapse({edge:"focus"}),t(n,r)}}}),Eae=({editor:e,getOption:t,getOptions:n,tf:{normalizeNode:r},type:i})=>({transforms:{normalizeNode([s,a]){const{enableUnsetSingleColSize:o,initialTableWidth:l}=n();if(Rt.isElement(s)){if(s.type===i){const u=s;if(!u.children.some(f=>Rt.isElement(f)&&f.type===e.getType(ee.tr))){e.tf.removeNodes({at:a});return}if(u.colSizes&&u.colSizes.length>0&&o&&Z0(u)<2){e.tf.unsetNodes("colSizes",{at:a});return}if(e.api.block({above:!0,at:a,match:{type:i}})){e.tf.unwrapNodes({at:a});return}if(l){const f=u,h=f.children[0]?.children?.length;if(h){const m=[];if(f.colSizes)f.colSizes.some(g=>!g)&&f.colSizes.forEach(g=>{m.push(g||l/h)});else for(let g=0;g0){e.tf.setNodes({colSizes:m},{at:a});return}}}}if(s.type===e.getType(ee.tr)&&e.api.parent(a)?.[0].type!==i){e.tf.unwrapNodes({at:a});return}if(Tr(e).includes(s.type)){const u=s,f=t("cellIndices",u.id);u.id&&!f&&Nm(e,{all:!0,cellNode:u});const{children:h}=u;if(e.api.parent(a)?.[0].type!==e.getType(ee.tr)){e.tf.unwrapNodes({at:a});return}if(Pn.isText(h[0])){e.tf.wrapNodes(e.api.create.block({},a),{at:a,children:!0});return}}}r([s,a])}}}),Cae=({api:e,editor:t,plugin:n,tf:{setFragmentData:r}})=>({transforms:{setFragmentData(i,s){const a=Qr(t,{format:"table"})?.[0],o=Qr(t,{format:"cell"}),l=t.selection;if(!a||!l){r(i,s);return}const[u,f]=a,h=u.children;u.children=u.children.filter(y=>y.children.length>0);let m="",g="";const b=document.createElement("div"),x=document.createElement("table");if(a&&l&&o.length===1&&(s==="copy"||s==="cut")){r(i);return}t.tf.withoutNormalizing(()=>{h.forEach(_=>{const O=_.children,S=[],w=_.type===t.getType(ee.th)?document.createElement("th"):document.createElement("tr");O.forEach(A=>{i.clearData();const T=t.api.findPath(A);t.tf.select({anchor:t.api.start(T),focus:t.api.end(T)}),r(i),S.push(i.getData("text/plain"));const P=document.createElement("td");P.colSpan=e.table.getColSpan(A),P.rowSpan=e.table.getRowSpan(A),P.innerHTML=i.getData("text/html"),w.append(P)}),x.append(w),m+=`${S.join(",")} -`,g+=`${S.join(" ")} -`});const y=t.api.node({at:f,match:{type:ee.table}});if(y!=null&&y.length>0){const _=y[0];_.attributes!=null&&Object.entries(_.attributes).forEach(([O,S])=>{S!=null&&n.node.dangerouslyAllowAttributes?.includes(O)&&x.setAttribute(O,String(S))})}t.tf.select(l),b.append(x)}),i.setData("text/csv",m),i.setData("text/tsv",g),i.setData("text/plain",g),i.setData("text/html",b.innerHTML);const E=JSON.stringify([u]),C=window.btoa(encodeURIComponent(E));i.setData("application/x-slate-fragment",C)}}}),kae=(e,t,n)=>{if(Ye.isPath(t))return n.some(i=>Ye.isCommon(i,t));const r=e.api.range(t);return r?n.some(i=>{const s=e.api.range(i);return s?dn.includes(s,r.anchor)||dn.includes(s,r.focus)||dn.includes(r,s):!1}):!1},Dae=({api:{marks:e},editor:t,tf:{addMark:n,removeMark:r,setNodes:i}})=>({api:{marks(){const a=(()=>{const{selection:o}=t;if(!o||t.api.isCollapsed())return;const l=Qr(t,{format:"cell"});if(l.length<=1)return;const u={},f={};let h=0;return l.forEach(([m,g])=>{const b=t.api.nodes({at:g,match:x=>Pn.isText(x)});Array.from(b,x=>x[0]).forEach(x=>{h++;const E=Object.keys(x);E.length!==1&&(E.splice(E.indexOf("text"),1),E.forEach(C=>{u[C]=(u[C]||0)+1,f[C]=x[C]}))})}),Object.keys(u).forEach(m=>{u[m]!==h&&delete f[m]}),f})();return a||e()}},transforms:{addMark(s,a){if(!(()=>{const{selection:l}=t;if(!l||t.api.isCollapsed()||t.meta.isNormalizing)return;const u=Qr(t,{format:"cell"});if(!(u.length<=1))return u.forEach(([f,h])=>{t.tf.setNodes({[s]:a},{at:h,split:!0,voids:!0,match:m=>Pn.isText(m)})}),!0})())return n(s,a)},removeMark(s){if(!(()=>{const{selection:o}=t;if(!o||t.api.isCollapsed()||t.meta.isNormalizing)return;const l=Qr(t,{format:"cell"});if(!(l.length<=1))return l.forEach(([u,f])=>{t.tf.setNodes({[s]:null},{at:f,split:!0,voids:!0,match:h=>Pn.isText(h)})}),!0})())return r(s)},setNodes(s,a){if(!(()=>{const{selection:l}=t;if(!l||t.api.isCollapsed()||t.meta.isNormalizing)return;const u=Qr(t,{format:"cell"});if(!(u.length<=1)){if(a?.at){const f=u.map(([,h])=>h);if(!kae(t,a.at,f))return}return i(s,{...a,match:vW(t,(f,h)=>u.some(([m,g])=>Ye.isCommon(g,h)),a)}),!0}})())return i(s,a)}}}),Sae=e=>{const{editor:t,tf:{moveLine:n,selectAll:r,tab:i},type:s}=e,a=Dae(e);return{api:{...xae(e).api,...a.api},transforms:{moveLine:o=>(()=>{if(!t.api.isCollapsed())return;const u=BF(t);if(!u)return;const{blockPath:f,cellPath:h,point:m}=u;if(!PF(t,{blockPath:f,cellPath:h,reverse:o.reverse})&&RF(t,{blockPath:f,point:m,reverse:o.reverse}))return t4(t,{reverse:o.reverse})})()?!0:n(o),selectAll:()=>(()=>{const l=t.api.above({match:{type:s}});if(!l)return;const[,u]=l,f=t.api.range(u);if(f&&t.selection&&dn.equals(t.selection,f)){const h=t.api.range([]);return h&&t.tf.select(h),!0}return t.tf.select(u),!0})()?!0:r(),tab:o=>(()=>{if(t.selection&&t.api.isExpanded()&&Array.from(t.api.nodes({at:t.selection,match:{type:Tr(t)}})).length>1)return t.tf.collapse({edge:"end"}),!0;const u=Wse(t);if(!u)return;const{cell:f,row:h}=u,[,m]=f;if(o.reverse){const g=Jse(t,f,m,h);if(g){const[,b]=g;t.tf.select(b)}}else{const g=Yse(t,f,m,h);if(g){const[,b]=g;t.tf.select(b)}}return!0})()?!0:i(o),...Eae(e).transforms,...yae(e).transforms,...bae(e).transforms,...wae(e).transforms,...vae(e).transforms,...Cae(e).transforms,...a.transforms}}},FF=({element:e,type:t})=>{const n=e.style.background||e.style.backgroundColor;return n?{background:n,type:t}:{type:t}},IF=Jt({key:ee.tr,node:{isContainer:!0,isElement:!0,isStrictSiblings:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"TR"}]}}}}),MF=Jt({key:ee.td,node:{dangerouslyAllowAttributes:["colspan","rowspan"],isContainer:!0,isElement:!0,isStrictSiblings:!0,props:({element:e})=>({colSpan:e?.attributes?.colspan,rowSpan:e?.attributes?.rowspan})},parsers:{html:{deserializer:{attributeNames:["rowspan","colspan"],parse:FF,rules:[{validNodeName:"TD"}]}}},rules:{merge:{removeEmpty:!1}}}),LF=Jt({key:ee.th,node:{dangerouslyAllowAttributes:["colspan","rowspan"],isContainer:!0,isElement:!0,isStrictSiblings:!0,props:({element:e})=>({colSpan:e?.attributes?.colspan,rowSpan:e?.attributes?.rowspan})},parsers:{html:{deserializer:{attributeNames:["rowspan","colspan"],parse:FF,rules:[{validNodeName:"TH"}]}}},rules:{merge:{removeEmpty:!1}}}),ta=Wn({key:ee.table,node:{isContainer:!0,isElement:!0},transformInitialValue:cae,options:{_cellIndices:{},_selectedCellIds:void 0,_selectedTableIds:void 0,_selectionVersion:0,disableMerge:!1,minColumnWidth:48,selectedCells:null,selectedTables:null},parsers:{html:{deserializer:{rules:[{validNodeName:"TABLE"}]}}},plugins:[IF,MF,LF]}).extendSelectors(({editor:e,getOptions:t})=>({cellIndices:n=>t()._cellIndices[n],isCellSelected:n=>{const r=t()._selectedCellIds;return r!==void 0?!!n&&(r?.includes(n)??!1):jA(e,n)},isSelectingCell:()=>{const n=t()._selectedCellIds;return n!==void 0?!!n:qA(e)},selectedCell:n=>(t()._selectionVersion,Zw(e,n)),selectedCellIds:()=>{const n=t()._selectedCellIds;return n!==void 0?n:LA(e)},selectedCells:()=>(t()._selectionVersion,MA(e)),selectedTableIds:()=>{const n=t()._selectedTableIds;return n!==void 0?n:zA(e)},selectedTables:()=>(t()._selectionVersion,e4(e))})).extendEditorApi(({editor:e})=>({create:{table:Ce(Hse,e),tableCell:Ce(Vse,e),tableRow:Ce(Use,e)},table:{getCellBorders:Ce(eae,e),getCellSize:Ce(tae,e),getSelectedCell:Ce(Zw,e),getSelectedCellIds:Ce(LA,e),getSelectedCells:Ce(MA,e),getSelectedTableIds:Ce(zA,e),getSelectedTables:Ce(e4,e),getColSpan:Tm,getRowSpan:e3,getCellChildren:t=>t.children,isCellSelected:Ce(jA,e),isSelectingCell:Ce(qA,e)}})).extendEditorTransforms(({editor:e})=>({insert:{table:Ce(pae,e),tableColumn:Ce(mae,e),tableRow:Ce(gae,e)},remove:{table:Ce(hae,e),tableColumn:Ce(fae,e),tableRow:Ce(dae,e)},table:{merge:Ce(lae,e),split:Ce(uae,e)}})).overrideEditor(Sae),UA={"shift+down":"bottom","shift+left":"left","shift+right":"right","shift+up":"top"},_ae=(e,t)=>{const n=BF(e,e.selection?.focus);if(!n)return!1;const{blockPath:r,cellPath:i,point:s}=n;return t==="shift+left"?e.api.isStart(s,i):t==="shift+right"?e.api.isEnd(s,i):PF(e,{blockPath:r,cellPath:i,reverse:t==="shift+up"})?!1:RF(e,{blockPath:r,point:s,reverse:t==="shift+up"})},Aae=({editor:e,event:t})=>{if(t.defaultPrevented)return;if(t.which===229&&e.selection&&e.api.isExpanded()&&Array.from(e.api.nodes({at:e.selection,match:{type:Tr(e)}})).length>1){e.tf.collapse({edge:"end"});return}const n={"shift+down":Hs.isExtendDownward(t),"shift+left":Hs.isExtendBackward(t),"shift+right":Hs.isExtendForward(t),"shift+up":Hs.isExtendUpward(t)};Object.keys(n).forEach(r=>{n[r]&&(t4(e,{edge:UA[r],reverse:r==="shift+up"})||_ae(e,r)&&t4(e,{at:e.selection,edge:UA[r],fromOneCell:!0,reverse:r==="shift+up"}))&&(t.preventDefault(),t.stopPropagation())})},zF=un(IF),jF=un(MF),qF=un(LF),$F=un(ta,{handlers:{onKeyDown:Aae},plugins:[zF,jF,qF]});Vc({colSizeOverrides:Ui(new Map),marginLeftOverride:null,rowSizeOverrides:Ui(new Map)},{name:"table"});const Tae={rules:[{validNodeName:"PRE"},{validNodeName:"P",validStyle:{fontFamily:"Consolas"}}],parse:({element:e})=>{const t=[...e.childNodes].find(i=>i.nodeName==="SELECT")?.textContent||"",n=e.textContent?.replace(t,"")||"";let r=n.split(` -`);return r?.length||(r=[n]),{children:r.map(i=>({children:[{text:i}],type:ee.codeLine})),type:ee.codeBlock}}},n4=(e,{at:t=e.selection}={})=>{if(t&&e.api.some({at:t,match:{type:e.getType(ee.codeLine)}})){const n=e.api.parent(t);if(!n)return;const[,r]=n,i=e.api.above({at:t,match:{type:e.getType(ee.codeLine)}})||e.api.parent(r);if(!i)return;const[s,a]=i;if(Rt.isElement(s)&&s.type!==e.getType(ee.codeLine))return;const o=e.api.parent(a);return o?{codeBlock:o,codeLine:i}:void 0}},Nae=/\S|$/,Oae=(e,{codeLine:t})=>{const[,n]=t;return e.api.string(n).search(Nae)},Bae=e=>{const{codeBlock:t}=n4(e)??{};if(!t)return!1;const n=Array.from(dt.children(e,t[1]));if(n.length===0)return!0;if(n.length>1)return!1;const r=n[0][0];return!dt.string(r)},VF=["py","gyp","ipython"],HA=new WeakSet;function Pae(e){return e?typeof e=="string"?e:e.source:null}function Rae(e){return Fae("(?=",e,")")}function Fae(...e){return e.map(t=>Pae(t)).join("")}function Iae(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],keyword:["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={begin:/^(>>>|\.\.\.) /,className:"meta"},r={begin:/\{/,className:"subst",end:/\}/,illegal:/#/,keywords:t},i={begin:/\{\{/,relevance:0},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,contains:[e.BACKSLASH_ESCAPE,n],end:/'''/,relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,contains:[e.BACKSLASH_ESCAPE,n],end:/"""/,relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r],end:/'''/},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r],end:/"""/},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,contains:[e.BACKSLASH_ESCAPE,i,r],end:/'/},{begin:/([fF][rR]|[rR][fF]|[fF])"/,contains:[e.BACKSLASH_ESCAPE,i,r],end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a="[0-9](_?[0-9])*",o=`(\\b(${a}))?\\.(${a})|\\b(${a})\\.`,l={className:"number",relevance:0,variants:[{begin:`(\\b(${a})|(${o}))[eE][+-]?(${a})[jJ]?\\b`},{begin:`(${o})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${a})[jJ]\\b`}]},u={begin:Rae(/# type:/),className:"comment",contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}],end:/$/,keywords:t},f={className:"params",variants:[{begin:/\(\s*\)/,className:"",skip:!0},{begin:/\(/,contains:["self",n,l,s,e.HASH_COMMENT_MODE],end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t}]};return r.contains=[s,l,n],{aliases:[...VF],contains:[n,l,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},s,u,e.HASH_COMMENT_MODE,{contains:[e.UNDERSCORE_TITLE_MODE,f,{begin:/->/,endsWithParent:!0,keywords:t}],end:/:/,illegal:/[${=;\n,]/,variants:[{beginKeywords:"def",className:"function"},{beginKeywords:"class",className:"class"}]},{begin:/^[\t ]*@/,className:"meta",contains:[l,f,s],end:/(?=#)|$/}],illegal:/(<\/|->|\?)|=>/,keywords:t,name:"Python"}}const Mae=(e,t)=>{t!=="python"||!e||HA.has(e)||typeof e.register=="function"&&(e.register("python",Iae),typeof e.registerAlias=="function"&&e.registerAlias("python",[...VF]),HA.add(e))},Rp=new WeakMap;function Lae(e){return e.value||e.children||[]}function UF(e,t=[]){return e.flatMap(n=>{const r=[...t,...n.properties?n.properties.className:[]];return n.children?UF(n.children,r):{classes:r,text:n.value}})}function zae(e){const t=[[]];let n=t[0];for(const r of e){const i=r.text.split(` -`);for(let s=0;sdt.string(g)).join(` -`),o=t.lang||r;Mae(s,o);let l;try{!o||o==="plaintext"?l={value:[]}:o==="auto"?l=s.highlightAuto(a):l=s.highlight(o,a)}catch(g){const b=s.listLanguages();o&&b.includes(o)?(e.api.debug.warn(`Could not highlight with Highlight.js for language "${o}". Falling back to plaintext`,"CODE_HIGHLIGHT",g),l={value:[]}):(e.api.debug.warn(`Language "${o}" is not registered. Falling back to plaintext`),l={value:[]})}const u=zae(UF(Lae(l))),f=t.children,h=new Map,m=Math.min(u.length,f.length);for(let g=0;g{Rp.delete(t)})}const $ae=/\s/,WA=(e,{codeLine:t})=>{const[,n]=t,r=e.api.start(n),i=r&&e.api.after(r),s=i&&e.api.range(r,i),a=e.api.string(s);return $ae.test(a)?(e.tf.delete({at:s}),!0):!1},Vae=/\S/,KA=(e,{codeLine:t,indentDepth:n=2})=>{const[,r]=t,i=e.api.start(r),s=" ".repeat(n);if(!e.api.isExpanded()){const a=e.selection?.anchor,o=e.api.range(i,a),l=e.api.string(o);if(Vae.test(l)){e.tf.insertText(s,{at:e.selection});return}}e.tf.insertText(s,{at:i})},Uae=(e,{codeBlock:t,codeLine:n})=>{WA(e,{codeLine:n})&&WA(e,{codeLine:n})},Hae=e=>{if(!e.selection)return;const t=e.getType(ee.codeBlock),n=e.getType(ee.p);e.tf.withoutNormalizing(()=>{const r=e.api.nodes({at:e.selection,match:{type:t}}),i=Array.from(r).reverse();for(const s of i){const a=dt.children(e,s[1]);for(const[,o]of a)e.tf.setNodes({type:n},{at:o});e.tf.unwrapNodes({at:s[1],match:{type:t},split:!0})}})},Wae=({editor:e,tf:{insertData:t},type:n})=>({transforms:{insertData(r){const i=r.getData("text/plain"),s=r.getData("vscode-editor-data"),a=e.getType(ee.codeLine);if(s)try{const l=JSON.parse(s),u=i.split(` -`),[f]=e.api.block()??[];if(f&&[n,a].includes(f?.type)){if(u[0]&&e.tf.insertText(u[0]),u.length>1){const h=u.slice(1).map(m=>({children:[{text:m}],type:a}));e.tf.insertNodes(h)}}else{const h={children:u.map(m=>({children:[{text:m}],type:a})),lang:l?.mode,type:n};e.tf.insertNodes(h,{select:!0})}return}catch{}const[o]=e.api.block()??[];if(o&&[n,a].includes(o?.type)&&i?.includes(` -`)){const l=i.split(` -`);if(l[0]&&e.tf.insertText(l[0]),l.length>1){const u=l.slice(1).map(f=>({children:[{text:f}],type:a}));e.tf.insertNodes(u)}return}t(r)}}});function Kae(e){return e.children}const Gae=({editor:e,tf:{insertFragment:t},type:n})=>({transforms:{insertFragment(r){const[i]=e.api.block()??[],s=e.getType(ee.codeLine);function a(o){return{children:[{text:dt.string(o)}],type:s}}return i&&[n,s].includes(i?.type)?t(r.flatMap(o=>{const l=o;return l.type===n?Kae(l):a(l)})):t(r)}}}),Yae=({editor:e,getOptions:t,tf:{normalizeNode:n},type:r})=>({transforms:{normalizeNode([i,s]){if(i.type===r&&t().lowlight&&HF(e,[i,s]),n([i,s]),!Rt.isElement(i))return;const a=e.getType(ee.codeBlock),o=e.getType(ee.codeLine);if(i.type===a){const l=Array.from(dt.children(e,s)).find(([u])=>u.type!==o);l&&e.tf.setNodes({type:o},{at:l[1]})}}}}),Jae=e=>{const{editor:t,getOptions:n,tf:{apply:r,deleteBackward:i,insertBreak:s,resetBlock:a,selectAll:o,tab:l},type:u}=e;return{transforms:{apply(f){let h=!1;if(n().lowlight&&f.type==="set_node"){const m=t.api.node(f.path),g="lang"in(f.properties??{})||"lang"in(f.newProperties??{}),b=f.properties?.lang!==f.newProperties?.lang;m?.[0].type===u&&g&&b&&(qae(m[0]),h=!0)}r(f),h&&t.api.redecorate()},insertBreak(){(()=>{if(!t.selection)return;const h=n4(t,{});if(!h)return;const{codeBlock:m,codeLine:g}=h,b=Oae(t,{codeLine:g});return s(),KA(t,{codeLine:g,indentDepth:b}),!0})()||s()},deleteBackward(f){(()=>{if(!t.selection||t.api.isExpanded())return;const m=n4(t,{});if(!m)return;const{codeLine:g}=m,[,b]=g;if(!t.api.isStart(t.selection.anchor,b))return;const x=t.api.previous({at:b,match:{type:t.getType(ee.codeLine)}}),E=t.api.string(b);if(!x)return E.length>0?!0:void 0;if(E.length>0)return;const C=t.api.end(x[1]);return t.tf.removeNodes({at:b}),C&&t.tf.select(C),!0})()||i(f)},resetBlock(f){if(t.api.block({at:f?.at,match:{type:u}})){Hae(t);return}return a(f)},selectAll:()=>(()=>{const h=t.api.above({match:{type:u}});if(h&&!(t.api.isAt({end:!0})&&t.api.isAt({start:!0})))return t.tf.select(h[1]),!0})()?!0:o(),tab:f=>(()=>{const m=t.getType("code_line"),g=t.api.nodes({match:{type:m}}),b=Array.from(g);if(b.length>0){const[,x]=b[0],E=t.api.parent(x);return E?(t.tf.withoutNormalizing(()=>{for(const C of b)f.reverse?Uae(t,{codeBlock:E,codeLine:C}):KA(t,{codeLine:C})}),!0):void 0}})()?!0:l(f),...Wae(e).transforms,...Gae(e).transforms,...Yae(e).transforms}}},WF=Wn({key:ee.codeLine,node:{isElement:!0,isStrictSiblings:!0}}),KF=Jt({key:ee.codeSyntax,node:{isLeaf:!0}}),GF=Wn({key:ee.codeBlock,inject:{plugins:{[ee.html]:{parser:{query:({editor:e})=>!e.api.some({match:{type:e.getType(ee.codeLine)}})}}}},node:{isElement:!0},options:{defaultLanguage:null,lowlight:null},parsers:{html:{deserializer:Tae}},plugins:[WF,KF],render:{as:"pre"},rules:{delete:{empty:"reset"},match:({editor:e,rule:t})=>["break.empty","delete.empty"].includes(t)&&Bae(e)},decorate:({editor:e,entry:[t,n],getOptions:r,type:i})=>{if(!r().lowlight)return[];const s=e.getType(ee.codeLine);return t.type===i&&!Rp.get(t.children[0])&&HF(e,[t,n]),t.type===s?Rp.get(t)||[]:[]}}).overrideEditor(Jae).extendTransforms(({editor:e})=>({toggle:()=>{e.tf.toggleBlock(e.getType(ee.codeBlock))}})),YF=un(KF),JF=un(WF),Xae=un(GF,{plugins:[JF,YF]});function Qae(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],x=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:x,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},S={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,`(?!${b.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[S,h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:w.concat([{begin:/\(/,end:/\)/,keywords:O,contains:w.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:O,relevance:0},{begin:g,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Zae(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=Qae(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function eoe(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(o);const l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},f={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],C={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:E,built_in:[...y,..._,"set","shopt",...O,...S]},contains:[g,e.SHEBANG(),b,h,s,a,C,o,l,u,f,n]}}function toe(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",E={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},C=[h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:C.concat([{begin:/\(/,end:/\)/,keywords:E,contains:C.concat(["self"]),relevance:0}]),relevance:0},_={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:E,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:E,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:u,keywords:E}}}function noe(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],x=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:x,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},S={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,`(?!${b.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[S,h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:w.concat([{begin:/\(/,end:/\)/,keywords:O,contains:w.concat(["self"]),relevance:0}]),relevance:0},T={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:O,relevance:0},{begin:g,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function roe(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(f,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=e.inherit(m,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,g]},x={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},E=e.inherit(x,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});m.contains=[x,b,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],g.contains=[E,b,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const C={variants:[u,x,b,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},C,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[C,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}const ioe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),soe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],aoe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ooe=[...soe,...aoe],loe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),uoe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),coe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),foe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function doe(e){const t=e.regex,n=ioe(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+uoe.join("|")+")"},{begin:":(:)?("+coe.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+foe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:loe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ooe.join("|")+")\\b"}]}}function hoe(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function poe(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"XF(e,t,n-1))}function voe(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+XF("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},f={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,GA,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},GA,u]}}const YA="[A-Za-z$_][0-9A-Za-z$_]*",yoe=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xoe=["true","false","null","undefined","NaN","Infinity"],QF=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ZF=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],eI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],boe=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],woe=[].concat(eI,QF,ZF);function Eoe(e){const t=e.regex,n=(re,{after:de})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(re,de)=>{const I=re[0].length+re.index,X=re.input[I];if(X==="<"||X===","){de.ignoreMatch();return}X===">"&&(n(re,{after:I})||de.ignoreMatch());let ne;const W=re.input.substring(I);if(ne=W.match(/^\s*=/)){de.ignoreMatch();return}if((ne=W.match(/^\s+extends\s+/))&&ne.index===0){de.ignoreMatch();return}}},o={$pattern:YA,keyword:yoe,literal:xoe,built_in:woe,"variable.language":boe},l="[0-9](_?[0-9])*",u=`\\.(${l})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${f})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${f})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,E,{match:/\$\d+/},h];m.contains=_.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(_)});const O=[].concat(y,m.contains),S=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(O)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...QF,...ZF]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(re){return t.concat("(?!",re.join("|"),")")}const $={match:t.concat(/\b/,z([...eI,"super","import","await"].map(re=>`${re}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Y={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},ve="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ve)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:T},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,E,y,{match:/\$\d+/},h,T,{scope:"attr",match:r+t.lookahead(":"),relevance:0},me,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:ve,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},Y,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},$,F,A,Z,{match:/\$[(.]/}]}}const Coe="([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",koe={scope:"number",match:Coe,relevance:0};function Doe(e){const t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,koe,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var sc="[0-9](_*[0-9])*",Dh=`\\.(${sc})`,Sh="[0-9a-fA-F](_*[0-9a-fA-F])*",Soe={className:"number",variants:[{begin:`(\\b(${sc})((${Dh})|\\.)?|(${Dh}))[eE][+-]?(${sc})[fFdD]?\\b`},{begin:`\\b(${sc})((${Dh})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Dh})[fFdD]?\\b`},{begin:`\\b(${sc})[fFdD]\\b`},{begin:`\\b0[xX]((${Sh})\\.?|(${Sh})?\\.(${Sh}))[pP][+-]?(${sc})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Sh})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function _oe(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(a);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},u=Soe,f=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=h;return m.variants[1].contains=[h],h.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,f,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,f],relevance:0},e.C_LINE_COMMENT_MODE,f,o,l,a,e.C_NUMBER_MODE]},f]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}const Aoe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Toe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Noe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Ooe=[...Toe,...Noe],Boe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),tI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),nI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Poe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Roe=tI.concat(nI).sort().reverse();function Foe(e){const t=Aoe(e),n=Roe,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",a=[],o=[],l=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},u=function(_,O,S){return{className:_,begin:O,relevance:S}},f={$pattern:/[a-z-]+/,keyword:r,attribute:Boe.join(" ")},h={begin:"\\(",end:"\\)",contains:o,keywords:f,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,h,u("variable","@@?"+i,10),u("variable","@\\{"+i+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const m=o.concat({begin:/\{/,end:/\}/,contains:a}),g={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},b={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Poe.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},x={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:f,returnEnd:!0,contains:o,relevance:0}},E={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:m}},C={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,u("keyword","all\\b"),u("variable","@\\{"+i+"\\}"),{begin:"\\b("+Ooe.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",s,0),u("selector-id","#"+s),u("selector-class","\\."+s,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+tI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+nI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:m},{begin:"!important"},t.FUNCTION_DISPATCH]},y={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[C]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,E,y,b,C,g,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function Ioe(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function Moe(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},f={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),m=e.inherit(f,{contains:[]});u.contains.push(m),f.contains.push(h);let g=[n,l];return[u,f,h,m].forEach(C=>{C.contains=C.contains.concat(g)}),g=g.concat(u,f),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,s,u,f,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,r,l,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function zoe(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function joe(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},o={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[o]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},f=[e.BACKSLASH_ESCAPE,s,l],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(x,E,C="\\1")=>{const y=C==="\\1"?C:t.concat(C,E);return t.concat(t.concat("(?:",x,")"),E,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,C,r)},g=(x,E,C)=>t.concat(t.concat("(?:",x,")"),E,/(?:\\.|[^\\\/])*?/,C,r),b=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",t.either(...h,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}function qoe(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+r},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),f=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(Y,Z)=>{Z.data._beginMatch=Y[1]||Y[2]},"on:end":(Y,Z)=>{Z.data._beginMatch!==Y[1]&&Z.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[ -]`,b={scope:"string",variants:[f,u,h,m]},x={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],C=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:C,literal:(Y=>{const Z=[];return Y.forEach(ve=>{Z.push(ve),ve.toLowerCase()===ve?Z.push(ve.toUpperCase()):Z.push(ve.toLowerCase())}),Z})(E),built_in:y},S=Y=>Y.map(Z=>Z.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,t.concat(g,"+"),t.concat("(?!",S(y).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},A=t.concat(r,"\\b(?!\\()"),T={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),A],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},P={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},M={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[P,a,T,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,x,w]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(C).join("\\b|"),"|",S(y).join("\\b|"),"\\b)"),r,t.concat(g,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[M]};M.contains.push(F);const z=[P,T,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,x,w],$={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...z]},...z,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:O,contains:[$,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},o,{scope:"variable.language",match:/\$this\b/},a,F,T,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",$,a,T,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,x]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},b,x]}}function $oe(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Voe(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Uoe(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},f={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,f,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,f,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,f,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,f,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",g=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,b=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${g}))[eE][+-]?(${m})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${m})[jJ](?=${b})`}]},E={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,x,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,x,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,E,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,C,h]}]}}function Hoe(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Woe(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Koe(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],f={className:"subst",begin:/#\{/,end:/\}/,keywords:a},h={className:"string",contains:[e.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,f]})]}]},m="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},x={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},w=[h,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[x]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:n}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,f],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);f.contains=w,x.contains=w;const M=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:w}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(M).concat(u).concat(w)}}function Goe(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:f,keyword:o,literal:l,built_in:u},illegal:""},s]}}const Yoe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Joe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Xoe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Qoe=[...Joe,...Xoe],Zoe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),ele=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tle=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nle=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function rle(e){const t=Yoe(e),n=tle,r=ele,i="@[a-z-]+",s="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Qoe.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nle.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Zoe.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function ile(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function sle(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=f,b=[...u,...l].filter(S=>!f.includes(S)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},E={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},C={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function y(S){return t.concat(/\b/,t.either(...S.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:y(m),relevance:0};function O(S,{exceptions:w,when:A}={}){const T=A;return w=w||[],S.map(P=>P.match(/\|\d+$/)||w.includes(P)?P:T(P)?`${P}|0`:P)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(b,{when:S=>S.length<3}),literal:s,type:o,built_in:h},contains:[{scope:"type",match:y(a)},_,C,x,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,E]}}function rI(e){return e?typeof e=="string"?e:e.source:null}function If(e){return Hn("(?=",e,")")}function Hn(...e){return e.map(n=>rI(n)).join("")}function ale(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function ki(...e){return"("+(ale(e).capture?"":"?:")+e.map(r=>rI(r)).join("|")+")"}const t3=e=>Hn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),ole=["Protocol","Type"].map(t3),JA=["init","self"].map(t3),lle=["Any","Self"],c2=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],XA=["false","nil","true"],ule=["assignment","associativity","higherThan","left","lowerThan","none","right"],cle=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],QA=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],iI=ki(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),sI=ki(iI,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),f2=Hn(iI,sI,"*"),aI=ki(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Fp=ki(aI,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),va=Hn(aI,Fp,"*"),_h=Hn(/[A-Z]/,Fp,"*"),fle=["attached","autoclosure",Hn(/convention\(/,ki("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Hn(/objc\(/,va,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],dle=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function hle(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,ki(...ole,...JA)],className:{2:"keyword"}},s={match:Hn(/\./,ki(...c2)),relevance:0},a=c2.filter(He=>typeof He=="string").concat(["_|0"]),o=c2.filter(He=>typeof He!="string").concat(lle).map(t3),l={variants:[{className:"keyword",match:ki(...o,...JA)}]},u={$pattern:ki(/\b\w+/,/#\w+/),keyword:a.concat(cle),literal:XA},f=[i,s,l],h={match:Hn(/\./,ki(...QA)),relevance:0},m={className:"built_in",match:Hn(/\b/,ki(...QA),/(?=\()/)},g=[h,m],b={match:/->/,relevance:0},x={className:"operator",relevance:0,variants:[{match:f2},{match:`\\.(\\.|${sI})+`}]},E=[b,x],C="([0-9]_*)+",y="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${C})(\\.(${C}))?([eE][+-]?(${C}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${C}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(He="")=>({className:"subst",variants:[{match:Hn(/\\/,He,/[0\\tnr"']/)},{match:Hn(/\\/,He,/u\{[0-9a-fA-F]{1,8}\}/)}]}),S=(He="")=>({className:"subst",match:Hn(/\\/,He,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(He="")=>({className:"subst",label:"interpol",begin:Hn(/\\/,He,/\(/),end:/\)/}),A=(He="")=>({begin:Hn(He,/"""/),end:Hn(/"""/,He),contains:[O(He),S(He),w(He)]}),T=(He="")=>({begin:Hn(He,/"/),end:Hn(/"/,He),contains:[O(He),w(He)]}),P={className:"string",variants:[A(),A("#"),A("##"),A("###"),T(),T("#"),T("##"),T("###")]},M=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:M},z=He=>{const Ge=Hn(He,/\//),ut=Hn(/\//,He);return{begin:Ge,end:ut,contains:[...M,{scope:"comment",begin:`#(?!.*${ut})`,end:/$/}]}},$={scope:"regexp",variants:[z("###"),z("##"),z("#"),F]},Y={match:Hn(/`/,va,/`/)},Z={className:"variable",match:/\$\d+/},ve={className:"variable",match:`\\$${Fp}+`},me=[Y,Z,ve],re={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:dle,contains:[...E,_,P]}]}},de={scope:"keyword",match:Hn(/@/,ki(...fle),If(ki(/\(/,/\s+/)))},I={scope:"meta",match:Hn(/@/,va)},X=[re,de,I],ne={match:If(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Hn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Fp,"+")},{className:"type",match:_h,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Hn(/\s+&\s+/,If(_h)),relevance:0}]},W={begin://,keywords:u,contains:[...r,...f,...X,b,ne]};ne.contains.push(W);const Te={match:Hn(va,/\s*:/),keywords:"_|0",relevance:0},je={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Te,...r,$,...f,...g,...E,_,P,...me,...X,ne]},$e={begin://,keywords:"repeat each",contains:[...r,ne]},Me={begin:ki(If(Hn(va,/\s*:/)),If(Hn(va,/\s+/,va,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:va}]},pe={begin:/\(/,end:/\)/,keywords:u,contains:[Me,...r,...f,...E,_,P,...X,ne,je],endsParent:!0,illegal:/["']/},Oe={match:[/(func|macro)/,/\s+/,ki(Y.match,va,f2)],className:{1:"keyword",3:"title.function"},contains:[$e,pe,t],illegal:[/\[/,/%/]},Ie={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[$e,pe,t],illegal:/\[|%/},ze={match:[/operator/,/\s+/,f2],className:{1:"keyword",3:"title"}},le={begin:[/precedencegroup/,/\s+/,_h],className:{1:"keyword",3:"title"},contains:[ne],keywords:[...ule,...XA],end:/}/},Se={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Ne={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Be={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,va,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[$e,...f,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:_h},...f],relevance:0}]};for(const He of P.variants){const Ge=He.contains.find(Qe=>Qe.label==="interpol");Ge.keywords=u;const ut=[...f,...g,...E,_,P,...me];Ge.contains=[...ut,{begin:/\(/,end:/\)/,contains:["self",...ut]}]}return{name:"Swift",keywords:u,contains:[...r,Oe,Ie,Se,Ne,Be,ze,le,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},$,...f,...g,...E,_,P,...me,...X,ne,je]}}const Ip="[A-Za-z$_][0-9A-Za-z$_]*",oI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],lI=["true","false","null","undefined","NaN","Infinity"],uI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],cI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],fI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dI=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],hI=[].concat(fI,uI,cI);function ple(e){const t=e.regex,n=(re,{after:de})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(re,de)=>{const I=re[0].length+re.index,X=re.input[I];if(X==="<"||X===","){de.ignoreMatch();return}X===">"&&(n(re,{after:I})||de.ignoreMatch());let ne;const W=re.input.substring(I);if(ne=W.match(/^\s*=/)){de.ignoreMatch();return}if((ne=W.match(/^\s+extends\s+/))&&ne.index===0){de.ignoreMatch();return}}},o={$pattern:Ip,keyword:oI,literal:lI,built_in:hI,"variable.language":dI},l="[0-9](_?[0-9])*",u=`\\.(${l})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${f})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${f})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},x={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},y={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,E,{match:/\$\d+/},h];m.contains=_.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(_)});const O=[].concat(y,m.contains),S=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(O)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S},A={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...uI,...cI]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},M={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function z(re){return t.concat("(?!",re.join("|"),")")}const $={match:t.concat(/\b/,z([...fI,"super","import","await"].map(re=>`${re}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Y={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Z={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},ve="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",me={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(ve)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:T},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,x,E,y,{match:/\$\d+/},h,T,{scope:"attr",match:r+t.lookahead(":"),relevance:0},me,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,e.REGEXP_MODE,{className:"function",begin:ve,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},M,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},Y,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},$,F,A,Z,{match:/\$[(.]/}]}}function mle(e){const t=e.regex,n=ple(e),r=Ip,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Ip,keyword:oI.concat(l),literal:lI,built_in:hI.concat(i),"variable.language":dI},f={className:"meta",begin:"@"+r},h=(x,E,C)=>{const y=x.contains.findIndex(_=>_.label===E);if(y===-1)throw new Error("can not find mode to replace");x.contains.splice(y,1,C)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(f);const m=n.contains.find(x=>x.scope==="attr"),g=Object.assign({},m,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m,g]),n.contains=n.contains.concat([f,s,a,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",o);const b=n.contains.find(x=>x.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function gle(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(a,o),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,f,h,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}function vle(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,e.QUOTE_STRING_MODE,l,u,o]}}function yle(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,l,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,a,l,o]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function xle(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},o=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},E=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,x,s,a],C=[...E];return C.pop(),C.push(o),g.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}const ble={arduino:Zae,bash:eoe,c:toe,cpp:noe,csharp:roe,css:doe,diff:hoe,go:poe,graphql:moe,ini:goe,java:voe,javascript:Eoe,json:Doe,kotlin:_oe,less:Foe,lua:Ioe,makefile:Moe,markdown:Loe,objectivec:zoe,perl:joe,php:qoe,"php-template":$oe,plaintext:Voe,python:Uoe,"python-repl":Hoe,r:Woe,ruby:Koe,rust:Goe,scss:rle,shell:ile,sql:sle,swift:hle,typescript:mle,vbnet:gle,wasm:vle,xml:yle,yaml:xle};var d2,ZA;function wle(){if(ZA)return d2;ZA=1;function e(he){return he instanceof Map?he.clear=he.delete=he.set=function(){throw new Error("map is read-only")}:he instanceof Set&&(he.add=he.clear=he.delete=function(){throw new Error("set is read-only")}),Object.freeze(he),Object.getOwnPropertyNames(he).forEach(Re=>{const it=he[Re],Xe=typeof it;(Xe==="object"||Xe==="function")&&!Object.isFrozen(it)&&e(it)}),he}class t{constructor(Re){Re.data===void 0&&(Re.data={}),this.data=Re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(he){return he.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(he,...Re){const it=Object.create(null);for(const Xe in he)it[Xe]=he[Xe];return Re.forEach(function(Xe){for(const jn in Xe)it[jn]=Xe[jn]}),it}const i="",s=he=>!!he.scope,a=(he,{prefix:Re})=>{if(he.startsWith("language:"))return he.replace("language:","language-");if(he.includes(".")){const it=he.split(".");return[`${Re}${it.shift()}`,...it.map((Xe,jn)=>`${Xe}${"_".repeat(jn+1)}`)].join(" ")}return`${Re}${he}`};class o{constructor(Re,it){this.buffer="",this.classPrefix=it.classPrefix,Re.walk(this)}addText(Re){this.buffer+=n(Re)}openNode(Re){if(!s(Re))return;const it=a(Re.scope,{prefix:this.classPrefix});this.span(it)}closeNode(Re){s(Re)&&(this.buffer+=i)}value(){return this.buffer}span(Re){this.buffer+=``}}const l=(he={})=>{const Re={children:[]};return Object.assign(Re,he),Re};class u{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Re){this.top.children.push(Re)}openNode(Re){const it=l({scope:Re});this.add(it),this.stack.push(it)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Re){return this.constructor._walk(Re,this.rootNode)}static _walk(Re,it){return typeof it=="string"?Re.addText(it):it.children&&(Re.openNode(it),it.children.forEach(Xe=>this._walk(Re,Xe)),Re.closeNode(it)),Re}static _collapse(Re){typeof Re!="string"&&Re.children&&(Re.children.every(it=>typeof it=="string")?Re.children=[Re.children.join("")]:Re.children.forEach(it=>{u._collapse(it)}))}}class f extends u{constructor(Re){super(),this.options=Re}addText(Re){Re!==""&&this.add(Re)}startScope(Re){this.openNode(Re)}endScope(){this.closeNode()}__addSublanguage(Re,it){const Xe=Re.root;it&&(Xe.scope=`language:${it}`),this.add(Xe)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(he){return he?typeof he=="string"?he:he.source:null}function m(he){return x("(?=",he,")")}function g(he){return x("(?:",he,")*")}function b(he){return x("(?:",he,")?")}function x(...he){return he.map(it=>h(it)).join("")}function E(he){const Re=he[he.length-1];return typeof Re=="object"&&Re.constructor===Object?(he.splice(he.length-1,1),Re):{}}function C(...he){return"("+(E(he).capture?"":"?:")+he.map(Xe=>h(Xe)).join("|")+")"}function y(he){return new RegExp(he.toString()+"|").exec("").length-1}function _(he,Re){const it=he&&he.exec(Re);return it&&it.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(he,{joinWith:Re}){let it=0;return he.map(Xe=>{it+=1;const jn=it;let qn=h(Xe),bt="";for(;qn.length>0;){const pt=O.exec(qn);if(!pt){bt+=qn;break}bt+=qn.substring(0,pt.index),qn=qn.substring(pt.index+pt[0].length),pt[0][0]==="\\"&&pt[1]?bt+="\\"+String(Number(pt[1])+jn):(bt+=pt[0],pt[0]==="("&&it++)}return bt}).map(Xe=>`(${Xe})`).join(Re)}const w=/\b\B/,A="[a-zA-Z]\\w*",T="[a-zA-Z_]\\w*",P="\\b\\d+(\\.\\d+)?",M="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",z="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$=(he={})=>{const Re=/^#![ ]*\//;return he.binary&&(he.begin=x(Re,/.*\b/,he.binary,/\b.*/)),r({scope:"meta",begin:Re,end:/$/,relevance:0,"on:begin":(it,Xe)=>{it.index!==0&&Xe.ignoreMatch()}},he)},Y={begin:"\\\\[\\s\\S]",relevance:0},Z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Y]},ve={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Y]},me={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},re=function(he,Re,it={}){const Xe=r({scope:"comment",begin:he,end:Re,contains:[]},it);Xe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const jn=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Xe.contains.push({begin:x(/[ ]+/,"(",jn,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Xe},de=re("//","$"),I=re("/\\*","\\*/"),X=re("#","$"),ne={scope:"number",begin:P,relevance:0},W={scope:"number",begin:M,relevance:0},Te={scope:"number",begin:F,relevance:0},je={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Y,{begin:/\[/,end:/\]/,relevance:0,contains:[Y]}]},$e={scope:"title",begin:A,relevance:0},Me={scope:"title",begin:T,relevance:0},pe={begin:"\\.\\s*"+T,relevance:0};var Ie=Object.freeze({__proto__:null,APOS_STRING_MODE:Z,BACKSLASH_ESCAPE:Y,BINARY_NUMBER_MODE:Te,BINARY_NUMBER_RE:F,COMMENT:re,C_BLOCK_COMMENT_MODE:I,C_LINE_COMMENT_MODE:de,C_NUMBER_MODE:W,C_NUMBER_RE:M,END_SAME_AS_BEGIN:function(he){return Object.assign(he,{"on:begin":(Re,it)=>{it.data._beginMatch=Re[1]},"on:end":(Re,it)=>{it.data._beginMatch!==Re[1]&&it.ignoreMatch()}})},HASH_COMMENT_MODE:X,IDENT_RE:A,MATCH_NOTHING_RE:w,METHOD_GUARD:pe,NUMBER_MODE:ne,NUMBER_RE:P,PHRASAL_WORDS_MODE:me,QUOTE_STRING_MODE:ve,REGEXP_MODE:je,RE_STARTERS_RE:z,SHEBANG:$,TITLE_MODE:$e,UNDERSCORE_IDENT_RE:T,UNDERSCORE_TITLE_MODE:Me});function ze(he,Re){he.input[he.index-1]==="."&&Re.ignoreMatch()}function le(he,Re){he.className!==void 0&&(he.scope=he.className,delete he.className)}function Se(he,Re){Re&&he.beginKeywords&&(he.begin="\\b("+he.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",he.__beforeBegin=ze,he.keywords=he.keywords||he.beginKeywords,delete he.beginKeywords,he.relevance===void 0&&(he.relevance=0))}function Ne(he,Re){Array.isArray(he.illegal)&&(he.illegal=C(...he.illegal))}function Be(he,Re){if(he.match){if(he.begin||he.end)throw new Error("begin & end are not supported with match");he.begin=he.match,delete he.match}}function He(he,Re){he.relevance===void 0&&(he.relevance=1)}const Ge=(he,Re)=>{if(!he.beforeMatch)return;if(he.starts)throw new Error("beforeMatch cannot be used with starts");const it=Object.assign({},he);Object.keys(he).forEach(Xe=>{delete he[Xe]}),he.keywords=it.keywords,he.begin=x(it.beforeMatch,m(it.begin)),he.starts={relevance:0,contains:[Object.assign(it,{endsParent:!0})]},he.relevance=0,delete it.beforeMatch},ut=["of","and","for","in","not","or","if","then","parent","list","value"],Qe="keyword";function ot(he,Re,it=Qe){const Xe=Object.create(null);return typeof he=="string"?jn(it,he.split(" ")):Array.isArray(he)?jn(it,he):Object.keys(he).forEach(function(qn){Object.assign(Xe,ot(he[qn],Re,qn))}),Xe;function jn(qn,bt){Re&&(bt=bt.map(pt=>pt.toLowerCase())),bt.forEach(function(pt){const Nt=pt.split("|");Xe[Nt[0]]=[qn,ht(Nt[0],Nt[1])]})}}function ht(he,Re){return Re?Number(Re):Wt(he)?0:1}function Wt(he){return ut.includes(he.toLowerCase())}const kt={},gt=he=>{console.error(he)},Ln=(he,...Re)=>{console.log(`WARN: ${he}`,...Re)},on=(he,Re)=>{kt[`${he}/${Re}`]||(console.log(`Deprecated as of ${he}. ${Re}`),kt[`${he}/${Re}`]=!0)},be=new Error;function G(he,Re,{key:it}){let Xe=0;const jn=he[it],qn={},bt={};for(let pt=1;pt<=Re.length;pt++)bt[pt+Xe]=jn[pt],qn[pt+Xe]=!0,Xe+=y(Re[pt-1]);he[it]=bt,he[it]._emit=qn,he[it]._multi=!0}function ft(he){if(Array.isArray(he.begin)){if(he.skip||he.excludeBegin||he.returnBegin)throw gt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),be;if(typeof he.beginScope!="object"||he.beginScope===null)throw gt("beginScope must be object"),be;G(he,he.begin,{key:"beginScope"}),he.begin=S(he.begin,{joinWith:""})}}function lt(he){if(Array.isArray(he.end)){if(he.skip||he.excludeEnd||he.returnEnd)throw gt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),be;if(typeof he.endScope!="object"||he.endScope===null)throw gt("endScope must be object"),be;G(he,he.end,{key:"endScope"}),he.end=S(he.end,{joinWith:""})}}function cn(he){he.scope&&typeof he.scope=="object"&&he.scope!==null&&(he.beginScope=he.scope,delete he.scope)}function rn(he){cn(he),typeof he.beginScope=="string"&&(he.beginScope={_wrap:he.beginScope}),typeof he.endScope=="string"&&(he.endScope={_wrap:he.endScope}),ft(he),lt(he)}function Lt(he){function Re(bt,pt){return new RegExp(h(bt),"m"+(he.case_insensitive?"i":"")+(he.unicodeRegex?"u":"")+(pt?"g":""))}class it{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(pt,Nt){Nt.position=this.position++,this.matchIndexes[this.matchAt]=Nt,this.regexes.push([Nt,pt]),this.matchAt+=y(pt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const pt=this.regexes.map(Nt=>Nt[1]);this.matcherRe=Re(S(pt,{joinWith:"|"}),!0),this.lastIndex=0}exec(pt){this.matcherRe.lastIndex=this.lastIndex;const Nt=this.matcherRe.exec(pt);if(!Nt)return null;const xr=Nt.findIndex((ci,Bs)=>Bs>0&&ci!==void 0),Tn=this.matchIndexes[xr];return Nt.splice(0,xr),Object.assign(Nt,Tn)}}class Xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(pt){if(this.multiRegexes[pt])return this.multiRegexes[pt];const Nt=new it;return this.rules.slice(pt).forEach(([xr,Tn])=>Nt.addRule(xr,Tn)),Nt.compile(),this.multiRegexes[pt]=Nt,Nt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(pt,Nt){this.rules.push([pt,Nt]),Nt.type==="begin"&&this.count++}exec(pt){const Nt=this.getMatcher(this.regexIndex);Nt.lastIndex=this.lastIndex;let xr=Nt.exec(pt);if(this.resumingScanAtSamePosition()&&!(xr&&xr.index===this.lastIndex)){const Tn=this.getMatcher(0);Tn.lastIndex=this.lastIndex+1,xr=Tn.exec(pt)}return xr&&(this.regexIndex+=xr.position+1,this.regexIndex===this.count&&this.considerAll()),xr}}function jn(bt){const pt=new Xe;return bt.contains.forEach(Nt=>pt.addRule(Nt.begin,{rule:Nt,type:"begin"})),bt.terminatorEnd&&pt.addRule(bt.terminatorEnd,{type:"end"}),bt.illegal&&pt.addRule(bt.illegal,{type:"illegal"}),pt}function qn(bt,pt){const Nt=bt;if(bt.isCompiled)return Nt;[le,Be,rn,Ge].forEach(Tn=>Tn(bt,pt)),he.compilerExtensions.forEach(Tn=>Tn(bt,pt)),bt.__beforeBegin=null,[Se,Ne,He].forEach(Tn=>Tn(bt,pt)),bt.isCompiled=!0;let xr=null;return typeof bt.keywords=="object"&&bt.keywords.$pattern&&(bt.keywords=Object.assign({},bt.keywords),xr=bt.keywords.$pattern,delete bt.keywords.$pattern),xr=xr||/\w+/,bt.keywords&&(bt.keywords=ot(bt.keywords,he.case_insensitive)),Nt.keywordPatternRe=Re(xr,!0),pt&&(bt.begin||(bt.begin=/\B|\b/),Nt.beginRe=Re(Nt.begin),!bt.end&&!bt.endsWithParent&&(bt.end=/\B|\b/),bt.end&&(Nt.endRe=Re(Nt.end)),Nt.terminatorEnd=h(Nt.end)||"",bt.endsWithParent&&pt.terminatorEnd&&(Nt.terminatorEnd+=(bt.end?"|":"")+pt.terminatorEnd)),bt.illegal&&(Nt.illegalRe=Re(bt.illegal)),bt.contains||(bt.contains=[]),bt.contains=[].concat(...bt.contains.map(function(Tn){return qr(Tn==="self"?bt:Tn)})),bt.contains.forEach(function(Tn){qn(Tn,Nt)}),bt.starts&&qn(bt.starts,pt),Nt.matcher=jn(Nt),Nt}if(he.compilerExtensions||(he.compilerExtensions=[]),he.contains&&he.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return he.classNameAliases=r(he.classNameAliases||{}),qn(he)}function Ke(he){return he?he.endsWithParent||Ke(he.starts):!1}function qr(he){return he.variants&&!he.cachedVariants&&(he.cachedVariants=he.variants.map(function(Re){return r(he,{variants:null},Re)})),he.cachedVariants?he.cachedVariants:Ke(he)?r(he,{starts:he.starts?r(he.starts):null}):Object.isFrozen(he)?r(he):he}var Ki="11.11.2";class Gi extends Error{constructor(Re,it){super(Re),this.name="HTMLInjectionError",this.html=it}}const ui=n,Oi=r,fr=Symbol("nomatch"),ei=7,tr=function(he){const Re=Object.create(null),it=Object.create(null),Xe=[];let jn=!0;const qn="Could not find the language '{}', did you forget to load/include a language module?",bt={disableAutodetect:!0,name:"Plain text",contains:[]};let pt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function Nt(Ze){return pt.noHighlightRe.test(Ze)}function xr(Ze){let At=Ze.className+" ";At+=Ze.parentNode?Ze.parentNode.className:"";const sn=pt.languageDetectRe.exec(At);if(sn){const fn=Bi(sn[1]);return fn||(Ln(qn.replace("{}",sn[1])),Ln("Falling back to no-highlight mode for this block.",Ze)),fn?sn[1]:"no-highlight"}return At.split(/\s+/).find(fn=>Nt(fn)||Bi(fn))}function Tn(Ze,At,sn){let fn="",st="";typeof At=="object"?(fn=Ze,sn=At.ignoreIllegals,st=At.language):(on("10.7.0","highlight(lang, code, ...args) has been deprecated."),on("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),st=Ze,fn=At),sn===void 0&&(sn=!0);const $n={code:fn,language:st};za("before:highlight",$n);const Er=$n.result?$n.result:ci($n.language,$n.code,sn);return Er.code=$n.code,za("after:highlight",Er),Er}function ci(Ze,At,sn,fn){const st=Object.create(null);function $n(at,vt){return at.keywords[vt]}function Er(){if(!Gt.keywords){nr.addText(Nn);return}let at=0;Gt.keywordPatternRe.lastIndex=0;let vt=Gt.keywordPatternRe.exec(Nn),Vt="";for(;vt;){Vt+=Nn.substring(at,vt.index);const gn=Pi.case_insensitive?vt[0].toLowerCase():vt[0],rr=$n(Gt,gn);if(rr){const[Or,p]=rr;if(nr.addText(Vt),Vt="",st[gn]=(st[gn]||0)+1,st[gn]<=ei&&(aa+=p),Or.startsWith("_"))Vt+=vt[0];else{const D=Pi.classNameAliases[Or]||Or;$r(vt[0],D)}}else Vt+=vt[0];at=Gt.keywordPatternRe.lastIndex,vt=Gt.keywordPatternRe.exec(Nn)}Vt+=Nn.substring(at),nr.addText(Vt)}function Do(){if(Nn==="")return;let at=null;if(typeof Gt.subLanguage=="string"){if(!Re[Gt.subLanguage]){nr.addText(Nn);return}at=ci(Gt.subLanguage,Nn,!0,sa[Gt.subLanguage]),sa[Gt.subLanguage]=at._top}else at=La(Nn,Gt.subLanguage.length?Gt.subLanguage:null);Gt.relevance>0&&(aa+=at.relevance),nr.__addSublanguage(at._emitter,at.language)}function ti(){Gt.subLanguage!=null?Do():Er(),Nn=""}function $r(at,vt){at!==""&&(nr.startScope(vt),nr.addText(at),nr.endScope())}function qa(at,vt){let Vt=1;const gn=vt.length-1;for(;Vt<=gn;){if(!at._emit[Vt]){Vt++;continue}const rr=Pi.classNameAliases[at[Vt]]||at[Vt],Or=vt[Vt];rr?$r(Or,rr):(Nn=Or,Er(),Nn=""),Vt++}}function na(at,vt){return at.scope&&typeof at.scope=="string"&&nr.openNode(Pi.classNameAliases[at.scope]||at.scope),at.beginScope&&(at.beginScope._wrap?($r(Nn,Pi.classNameAliases[at.beginScope._wrap]||at.beginScope._wrap),Nn=""):at.beginScope._multi&&(qa(at.beginScope,vt),Nn="")),Gt=Object.create(at,{parent:{value:Gt}}),Gt}function ra(at,vt,Vt){let gn=_(at.endRe,Vt);if(gn){if(at["on:end"]){const rr=new t(at);at["on:end"](vt,rr),rr.isMatchIgnored&&(gn=!1)}if(gn){for(;at.endsParent&&at.parent;)at=at.parent;return at}}if(at.endsWithParent)return ra(at.parent,vt,Vt)}function nf(at){return Gt.matcher.regexIndex===0?(Nn+=at[0],1):(oa=!0,0)}function Du(at){const vt=at[0],Vt=at.rule,gn=new t(Vt),rr=[Vt.__beforeBegin,Vt["on:begin"]];for(const Or of rr)if(Or&&(Or(at,gn),gn.isMatchIgnored))return nf(vt);return Vt.skip?Nn+=vt:(Vt.excludeBegin&&(Nn+=vt),ti(),!Vt.returnBegin&&!Vt.excludeBegin&&(Nn=vt)),na(Vt,at),Vt.returnBegin?0:vt.length}function yi(at){const vt=at[0],Vt=At.substring(at.index),gn=ra(Gt,at,Vt);if(!gn)return fr;const rr=Gt;Gt.endScope&&Gt.endScope._wrap?(ti(),$r(vt,Gt.endScope._wrap)):Gt.endScope&&Gt.endScope._multi?(ti(),qa(Gt.endScope,at)):rr.skip?Nn+=vt:(rr.returnEnd||rr.excludeEnd||(Nn+=vt),ti(),rr.excludeEnd&&(Nn=vt));do Gt.scope&&nr.closeNode(),!Gt.skip&&!Gt.subLanguage&&(aa+=Gt.relevance),Gt=Gt.parent;while(Gt!==gn.parent);return gn.starts&&na(gn.starts,at),rr.returnEnd?0:vt.length}function ni(){const at=[];for(let vt=Gt;vt!==Pi;vt=vt.parent)vt.scope&&at.unshift(vt.scope);at.forEach(vt=>nr.openNode(vt))}let ia={};function Ps(at,vt){const Vt=vt&&vt[0];if(Nn+=at,Vt==null)return ti(),0;if(ia.type==="begin"&&vt.type==="end"&&ia.index===vt.index&&Vt===""){if(Nn+=At.slice(vt.index,vt.index+1),!jn){const gn=new Error(`0 width match regex (${Ze})`);throw gn.languageName=Ze,gn.badRule=ia.rule,gn}return 1}if(ia=vt,vt.type==="begin")return Du(vt);if(vt.type==="illegal"&&!sn){const gn=new Error('Illegal lexeme "'+Vt+'" for mode "'+(Gt.scope||"")+'"');throw gn.mode=Gt,gn}else if(vt.type==="end"){const gn=yi(vt);if(gn!==fr)return gn}if(vt.type==="illegal"&&Vt==="")return vt.index===At.length||(Nn+=` -`),1;if(tn>1e5&&tn>vt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Nn+=Vt,Vt.length}const Pi=Bi(Ze);if(!Pi)throw gt(qn.replace("{}",Ze)),new Error('Unknown language: "'+Ze+'"');const bl=Lt(Pi);let xn="",Gt=fn||bl;const sa={},nr=new pt.__emitter(pt);ni();let Nn="",aa=0,xi=0,tn=0,oa=!1;try{if(Pi.__emitTokens)Pi.__emitTokens(At,nr);else{for(Gt.matcher.considerAll();;){tn++,oa?oa=!1:Gt.matcher.considerAll(),Gt.matcher.lastIndex=xi;const at=Gt.matcher.exec(At);if(!at)break;const vt=At.substring(xi,at.index),Vt=Ps(vt,at);xi=at.index+Vt}Ps(At.substring(xi))}return nr.finalize(),xn=nr.toHTML(),{language:Ze,value:xn,relevance:aa,illegal:!1,_emitter:nr,_top:Gt}}catch(at){if(at.message&&at.message.includes("Illegal"))return{language:Ze,value:ui(At),illegal:!0,relevance:0,_illegalBy:{message:at.message,index:xi,context:At.slice(xi-100,xi+100),mode:at.mode,resultSoFar:xn},_emitter:nr};if(jn)return{language:Ze,value:ui(At),illegal:!1,relevance:0,errorRaised:at,_emitter:nr,_top:Gt};throw at}}function Bs(Ze){const At={value:ui(Ze),illegal:!1,relevance:0,_top:bt,_emitter:new pt.__emitter(pt)};return At._emitter.addText(Ze),At}function La(Ze,At){At=At||pt.languages||Object.keys(Re);const sn=Bs(Ze),fn=At.filter(Bi).filter(yl).map(ti=>ci(ti,Ze,!1));fn.unshift(sn);const st=fn.sort((ti,$r)=>{if(ti.relevance!==$r.relevance)return $r.relevance-ti.relevance;if(ti.language&&$r.language){if(Bi(ti.language).supersetOf===$r.language)return 1;if(Bi($r.language).supersetOf===ti.language)return-1}return 0}),[$n,Er]=st,Do=$n;return Do.secondBest=Er,Do}function bu(Ze,At,sn){const fn=At&&it[At]||sn;Ze.classList.add("hljs"),Ze.classList.add(`language-${fn}`)}function Co(Ze){let At=null;const sn=xr(Ze);if(Nt(sn))return;if(za("before:highlightElement",{el:Ze,language:sn}),Ze.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ze);return}if(Ze.children.length>0&&(pt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ze)),pt.throwUnescapedHTML))throw new Gi("One of your code blocks includes unescaped HTML.",Ze.innerHTML);At=Ze;const fn=At.textContent,st=sn?Tn(fn,{language:sn,ignoreIllegals:!0}):La(fn);Ze.innerHTML=st.value,Ze.dataset.highlighted="yes",bu(Ze,sn,st.language),Ze.result={language:st.language,re:st.relevance,relevance:st.relevance},st.secondBest&&(Ze.secondBest={language:st.secondBest.language,relevance:st.secondBest.relevance}),za("after:highlightElement",{el:Ze,result:st,text:fn})}function wu(Ze){pt=Oi(pt,Ze)}const us=()=>{ko(),on("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function pl(){ko(),on("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ml=!1;function ko(){function Ze(){ko()}if(document.readyState==="loading"){ml||window.addEventListener("DOMContentLoaded",Ze,!1),ml=!0;return}document.querySelectorAll(pt.cssSelector).forEach(Co)}function Eu(Ze,At){let sn=null;try{sn=At(he)}catch(fn){if(gt("Language definition for '{}' could not be registered.".replace("{}",Ze)),jn)gt(fn);else throw fn;sn=bt}sn.name||(sn.name=Ze),Re[Ze]=sn,sn.rawDefinition=At.bind(null,he),sn.aliases&&vl(sn.aliases,{languageName:Ze})}function Cu(Ze){delete Re[Ze];for(const At of Object.keys(it))it[At]===Ze&&delete it[At]}function gl(){return Object.keys(Re)}function Bi(Ze){return Ze=(Ze||"").toLowerCase(),Re[Ze]||Re[it[Ze]]}function vl(Ze,{languageName:At}){typeof Ze=="string"&&(Ze=[Ze]),Ze.forEach(sn=>{it[sn.toLowerCase()]=At})}function yl(Ze){const At=Bi(Ze);return At&&!At.disableAutodetect}function Gn(Ze){Ze["before:highlightBlock"]&&!Ze["before:highlightElement"]&&(Ze["before:highlightElement"]=At=>{Ze["before:highlightBlock"](Object.assign({block:At.el},At))}),Ze["after:highlightBlock"]&&!Ze["after:highlightElement"]&&(Ze["after:highlightElement"]=At=>{Ze["after:highlightBlock"](Object.assign({block:At.el},At))})}function ku(Ze){Gn(Ze),Xe.push(Ze)}function xl(Ze){const At=Xe.indexOf(Ze);At!==-1&&Xe.splice(At,1)}function za(Ze,At){const sn=Ze;Xe.forEach(function(fn){fn[sn]&&fn[sn](At)})}function ja(Ze){return on("10.7.0","highlightBlock will be removed entirely in v12.0"),on("10.7.0","Please use highlightElement now."),Co(Ze)}Object.assign(he,{highlight:Tn,highlightAuto:La,highlightAll:ko,highlightElement:Co,highlightBlock:ja,configure:wu,initHighlighting:us,initHighlightingOnLoad:pl,registerLanguage:Eu,unregisterLanguage:Cu,listLanguages:gl,getLanguage:Bi,registerAliases:vl,autoDetection:yl,inherit:Oi,addPlugin:ku,removePlugin:xl}),he.debugMode=function(){jn=!1},he.safeMode=function(){jn=!0},he.versionString=Ki,he.regex={concat:x,lookahead:m,either:C,optional:b,anyNumberOfTimes:g};for(const Ze in Ie)typeof Ie[Ze]=="object"&&e(Ie[Ze]);return Object.assign(he,Ie),he},yr=tr({});return yr.newInstance=()=>tr({}),d2=yr,yr.HighlightJS=yr,yr.default=yr,d2}var Ele=wle();const Cle=Nr(Ele),e9={},kle="hljs-";function Dle(e){const t=Cle.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:a,registered:o};function n(l,u,f){const h=f||e9,m=typeof h.prefix=="string"?h.prefix:kle;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Sle,classPrefix:m});const g=t.highlight(u,{ignoreIllegals:!0,language:l});if(g.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:g.errorRaised});const b=g._emitter.root,x=b.data;return x.language=g.language,x.relevance=g.relevance,b}function r(l,u){const h=(u||e9).subset||i();let m=-1,g=0,b;for(;++mg&&(g=E.data.relevance,b=E)}return b||{type:"root",children:[],data:{language:void 0,relevance:g}}}function i(){return t.listLanguages()}function s(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let f;for(f in l)Object.hasOwn(l,f)&&t.registerLanguage(f,l[f])}}function a(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let f;for(f in l)if(Object.hasOwn(l,f)){const h=l[f];t.registerAliases(typeof h=="string"?h:[...h],{languageName:f})}}}function o(l){return!!t.getLanguage(l)}}class Sle{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(a,o){return o?a+"_".repeat(o):n.options.classPrefix+a}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const ed=(e,{getNodesOptions:t,offset:n=1,setNodesProps:r,unsetNodesProps:i=[]})=>{const{nodeKey:s}=e.getInjectProps(Nle),a=e.api.nodes({block:!0,mode:"lowest",...t}),o=Array.from(a);e.tf.withoutNormalizing(()=>{o.forEach(([l,u])=>{const f=(l[s]??0)+n,h=r?.({indent:f})??{};f<=0?e.tf.unsetNodes([s,...i],{at:u}):e.tf.setNodes({[s]:f,...h},{at:u})})})},_le=(e,t)=>{ed(e,{offset:1,...t})},Ale=(e,t)=>{ed(e,{offset:-1,...t})},Tle=({editor:e,getOptions:t,plugin:n,tf:{normalizeNode:r,tab:i}})=>({transforms:{normalizeNode([s,a]){const{indentMax:o}=t(),l=s,{type:u}=l,f=Ep(e,n);if(u){if(f(l,a)){if(o&&l.indent&&l.indent>o){e.tf.setNodes({indent:o},{at:a});return}}else if(l.indent){e.tf.unsetNodes("indent",{at:a});return}}return r([s,a])},tab:s=>(()=>{const o=Ep(e,n),l=e.api.block();if(!l)return;const[u,f]=l;if(o(u,f)){if(s.reverse){if(!u.indent)return e.api.above({at:f,match:(h,m)=>m.length{const{offset:n,unit:r}=e();return t*n+r}},targetPlugins:[ee.p]},options:{offset:24,unit:"px"}}).overrideEditor(Tle),Ole=(e,[t,n])=>{if(!Pr(t[ee.indent])&&(t[ee.listType]||t[ee.listStart]))return e.tf.unsetNodes([ee.listType,ee.listStart],{at:n}),!0},Ble=(e,t)=>{const n=e.getType;return typeof n=="function"?n.call(e,t):t},Mp=(e,t)=>{const n=t.type;return typeof n=="string"&&ee.heading.some(r=>n===Ble(e,r))},Ple=(e,t,n)=>t[ee.listType]===n[ee.listType]&&Mp(e,t)===Mp(e,n),Rle=(e,t,n)=>{const r=t[ee.listType];return t[ee.indent]===n[ee.indent]&&r!=null&&r===n[ee.listType]&&Mp(e,t)!==Mp(e,n)},pI=(e,t)=>{const{breakQuery:n,query:r,...i}=t??{};return{...i,breakQuery:(s,a)=>Rle(e,s,a)||!!n?.(s,a),query:(s,a)=>Ple(e,s,a)&&(r?!!r(s,a):!0)}},mI=(e,[t,n],{breakOnEqIndentNeqListStyleType:r=!0,breakOnListRestart:i=!1,breakOnLowerIndent:s=!0,breakQuery:a,eqIndent:o=!0,getNextEntry:l,getPreviousEntry:u,query:f})=>{if(!u&&!l)return;const h=l??u;let m=h([t,n]);for(;;){if(!m)return;const[g,b]=m,x=t[ee.indent],E=g[ee.indent];if(a?.(g,t)||!Pr(E)||i&&(u&&t[ee.listRestart]||l&&g[ee.listRestart])||s&&EmI(e,t,{getPreviousEntry:([,r])=>{const i=Ye.previous(r);if(!i)return;const s=dt.get(e,i);if(s)return[s,i]},...n,getNextEntry:void 0}),zr={Circle:"circle",Disc:"disc",DisclosureClosed:"disclosure-closed",DisclosureOpen:"disclosure-open",LowerAlpha:"lower-alpha",LowerRoman:"lower-roman",Square:"square",UpperAlpha:"upper-alpha",UpperRoman:"upper-roman"},gI=[zr.Disc,zr.Circle,zr.Square,zr.DisclosureOpen,zr.DisclosureClosed],Fle=(e,t)=>{const[n]=e,[r]=t??[null],i=n[ee.listRestart]??null,s=n[ee.listRestartPolite]??null;return i||(s&&!r?s:r?(r[ee.listStart]??1)+1:1)},vI=(e,t,n)=>e.tf.withoutNormalizing(()=>{const[r,i]=t,s=r[ee.listType],a=r[ee.listStart];if(!s)return;if(gI.includes(s))return Pr(a)?(e.tf.unsetNodes(ee.listStart,{at:i}),!0):void 0;const o=Fle(t,Om(e,t,pI(e,{breakOnEqIndentNeqListStyleType:!1,...n})));return Pr(a)&&o===1?(e.tf.unsetNodes(ee.listStart,{at:i}),!0):a!==o&&o>1?(e.tf.setNodes({[ee.listStart]:o},{at:i}),!0):!1}),Ile=({editor:e,tf:{insertBreak:t}})=>({transforms:{insertBreak(){const n=e.api.above();if(!n)return t();const[r,i]=n;if(!Pr(r[ee.listType])||r[ee.listType]!==ee.listTodo||e.api.isExpanded()||!e.api.isEnd(e.selection?.focus,i))return t();e.tf.withoutNormalizing(()=>{t();const s=e.api.above();s&&e.tf.setNodes({checked:!1},{at:s[1]})})}}}),yI=(e,t,n)=>mI(e,t,{getNextEntry:([,r])=>{const i=Ye.next(r),s=dt.get(e,i);if(s)return[s,i]},...n,getPreviousEntry:void 0}),Mle=(e,{listStyleType:t=zr.Disc,...n}={})=>{ed(e,{offset:1,setNodesProps:()=>({[ee.listType]:t}),...n})},Lle=(e,{listStyleType:t=zr.Disc,...n}={})=>{ed(e,{offset:1,setNodesProps:()=>({[ee.listChecked]:!1,[ee.listType]:t}),...n})},r4=(e,t={})=>{ed(e,{offset:-1,unsetNodesProps:[ee.listType,ee.listChecked],...t})},xI=(e,{at:t,indent:n=0,listStyleType:r=zr.Disc})=>{const i=n||n+1;e.tf.setNodes({[ee.indent]:i,[ee.listType]:r},{at:t})},bI=(e,{at:t,indent:n=0,listStyleType:r=ee.listTodo})=>{const i=n||n+1;e.tf.setNodes({[ee.indent]:i,[ee.listChecked]:!1,[ee.listType]:r},{at:t})},zle=(e,t,{listStyleType:n=zr.Disc})=>{e.tf.withoutNormalizing(()=>{t.forEach(r=>{const[i,s]=r;let a=i[ee.indent]??0;if(a=i[ee.listType]||Object.hasOwn(i,ee.listChecked)?a:a+1,n==="todo"){e.tf.unsetNodes(ee.listType,{at:s}),bI(e,{at:s,indent:a,listStyleType:n});return}e.tf.unsetNodes(ee.listChecked,{at:s}),xI(e,{at:s,indent:a,listStyleType:n})})})},jle=(e,t,{current:n=!0,next:r=!0,previous:i=!0,...s}={})=>{const a=[],o=t[0];if(!o[ee.listType]&&!Object.hasOwn(o,ee.listChecked))return a;let l=t;if(i)for(;;){const u=Om(e,l,s);if(!u)break;a.push(u),l=u}if(n&&a.push(t),r)for(l=t;;){const u=yI(e,l,s);if(!u)break;a.push(u),l=u}return a},qle=(e,t,{getSiblingListOptions:n,listStyleType:r=zr.Disc})=>{e.tf.withoutNormalizing(()=>{jle(e,t,n).forEach(([i,s])=>{r===ee.listTodo?(e.tf.unsetNodes(ee.listType,{at:s}),bI(e,{at:s,indent:i[ee.indent],listStyleType:r})):(e.tf.unsetNodes(ee.listChecked,{at:s}),xI(e,{at:s,indent:i[ee.indent],listStyleType:r}))})})},$le=(e,t,{listStyleType:n=zr.Disc})=>{let r=!0;for(const i of t){const[s]=i;if(n===ee.listTodo){if(!Object.hasOwn(s,ee.listChecked)){r=!1;break}continue}if(!s[ee.listType]||s[ee.listType]!==n){r=!1;break}}return r},Vle=(e,t)=>e.api.above({...t,match:n=>Pr(n[ee.listType])});function Ule(e){return!!e.listStyleType&&!gI.includes(e.listStyleType)}const Hle=(e,[t,n],{listStyleType:r=zr.Disc,...i})=>{if(!(Object.hasOwn(t,ee.listChecked)||t[ee.listType]))return r==="todo"?Lle(e,{listStyleType:r,...i}):Mle(e,{listStyleType:r,...i}),!0},Wle=(e,[t,n],{listStyleType:r=zr.Disc})=>{if(r===ee.listTodo&&Object.hasOwn(t,ee.listChecked))return e.tf.unsetNodes(ee.listChecked,{at:n}),r4(e,{listStyleType:r}),!0;if(r===t[ee.listType])return e.tf.unsetNodes([ee.listType],{at:n}),r4(e,{listStyleType:r}),!0},Kle=(e,t,n)=>{const{listRestart:r,listRestartPolite:i,listStyleType:s}=t,{getSiblingListOptions:a}=e.getOptions(wI),o={...a,...n},l=(()=>{if(e.api.isCollapsed()){const h=e.api.block();return h?Hle(e,h,t)?!0:Wle(e,h,{listStyleType:s})?!1:(qle(e,h,{getSiblingListOptions:o,listStyleType:s}),!0):null}if(e.api.isExpanded()){const h=Ep(e,e.getPlugin({key:ee.list})),m=[...e.api.nodes({block:!0,match:h})];return $le(e,m,{listStyleType:s})?(e.tf.withoutNormalizing(()=>{m.forEach(g=>{const[b,x]=g,E=b[ee.indent];e.tf.unsetNodes(ee.listType,{at:x}),E>1?e.tf.setNodes({[ee.indent]:E-1},{at:x}):e.tf.unsetNodes([ee.indent,ee.listChecked],{at:x})})}),!1):(zle(e,m,{listStyleType:s}),!0)}return null})(),u=r||i,f=!!r;if(l&&u){const h=Vle(e,{at:e.api.start(e.selection)});if(!h)return;const m=!Om(e,h,pI(e,{breakOnEqIndentNeqListStyleType:!1,...o}));if(!f&&(!m||u<=0)||f&&u===1&&m)return;const g=f?ee.listRestart:ee.listRestartPolite;e.tf.setNodes({[g]:u},{at:h[1]})}},Gle=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){if(!e.tf.withoutNormalizing(()=>{if(Ole(e,[r,i])||vI(e,[r,i],t().getSiblingListOptions))return!0}))return n([r,i])}}}),Yle=e=>{const{editor:t,getOptions:n,tf:{apply:r,resetBlock:i}}=e;return{transforms:{resetBlock(s){if(t.api.block(s)?.[0]?.[ee.listType]){r4(t);return}return i(s)},...Gle(e).transforms,...Ile(e).transforms,apply(s){const{getSiblingListOptions:a}=n();if(s.type==="insert_node"){const u=s.node[ee.listType];if(u&&["lower-roman","upper-roman"].includes(u)){const f=Om(t,[s.node,s.path],{breakOnEqIndentNeqListStyleType:!1,eqIndent:!1,...a});if(f){const h=f[0][ee.listType];h===zr.LowerAlpha&&u===zr.LowerRoman?s.node[ee.listType]=zr.LowerAlpha:h===zr.UpperAlpha&&u===zr.UpperRoman&&(s.node[ee.listType]=zr.UpperAlpha)}}}s.type==="split_node"&&s.properties[ee.listType]&&(delete s.properties[ee.listRestart],delete s.properties[ee.listRestartPolite]),r(s);const o=[];switch(s.type){case"insert_node":case"remove_node":case"set_node":o.push(s.path);break;case"merge_node":o.push(Ye.previous(s.path));break;case"move_node":o.push(s.path,s.newPath);break;case"split_node":o.push(s.path,Ye.next(s.path));break}const l=u=>ee.listType in u;o.forEach(u=>{let f=t.api.node(u);if(f)for(l(f[0])||(f=t.api.node(Ye.next(u)));f&&l(f[0])&&!vI(t,f,a);)f=yI(t,f,{...a,breakOnEqIndentNeqListStyleType:!1,breakOnLowerIndent:!1,eqIndent:!1})})}}}},wI=Wn({key:ee.list,inject:{plugins:{[ee.html]:{parser:{transformData:({data:e})=>{const{body:t}=new DOMParser().parseFromString(e,"text/html"),n=[];return Xw(t,r=>{if(r.tagName==="LI"){const i=[];Array.from(r.children).forEach(s=>{(s.tagName==="UL"||s.tagName==="OL")&&i.push(s)}),i.length>0&&n.push({li:r,nestedLists:i})}return!0}),n.forEach(({li:r,nestedLists:i})=>{i.forEach(s=>{s.remove(),r.parentNode&&r.parentNode.insertBefore(s,r.nextSibling)})}),Xw(t,r=>{if(r.tagName==="LI"){const i=r,{childNodes:s}=r,a=[];s.forEach(u=>{if(u.nodeType===Node.ELEMENT_NODE){const f=u;if(Pw(f)){a.push(...f.childNodes);return}}a.push(u)}),r.replaceChildren(...a);const o=r.getAttribute("aria-level");if(o)i.dataset.indent=o;else{let u=0,f=r.parentElement;for(;f&&f!==t;)(f.tagName==="UL"||f.tagName==="OL")&&u++,f=f.parentElement;u>0&&(i.dataset.indent=String(u))}const l=i.style.listStyleType;if(l)i.dataset.listStyleType=l;else{const u=r.closest("ul, ol");if(u){const f=u.style.listStyleType;f?i.dataset.listStyleType=f:u.tagName==="UL"?i.dataset.listStyleType="disc":u.tagName==="OL"&&(i.dataset.listStyleType="decimal")}}return!1}return!0}),gse(t.innerHTML)}}}},targetPlugins:[ee.p]},options:{getListStyleType:e=>e.style.listStyleType},parsers:{html:{deserializer:{isElement:!0,rules:[{validNodeName:"LI"}],parse:({editor:e,element:t,getOptions:n})=>{const r=t.dataset.indent,i=t.getAttribute("aria-level"),s=Number(r||i),a=t.dataset.listStyleType||n().getListStyleType?.(t);return{indent:s||void 0,listStyleType:a||void 0,type:e.getType(ee.p)}}}}},rules:{break:{empty:"reset",splitReset:!1},delete:{start:"reset"},merge:{removeEmpty:!1},match:({node:e})=>Pr(e[ee.listType])}}).overrideEditor(Yle),Jle=un(wI,{render:{belowNodes:e=>{if(e.element.listStyleType)return t=>ae.createElement(Xle,t)}}});function Xle(e){const t=Zt.c(9),{listStart:n,listStyleType:r}=e.element,i=Ule(e.element)?"ol":"ul";let s;t[0]!==r?(s={listStyleType:r,margin:0,padding:0,position:"relative"},t[0]=r,t[1]=s):s=t[1];let a;t[2]!==e.children?(a=ae.createElement("li",null,e.children),t[2]=e.children,t[3]=a):a=t[3];let o;return t[4]!==i||t[5]!==n||t[6]!==s||t[7]!==a?(o=ae.createElement(i,{style:s,start:n},a),t[4]=i,t[5]=n,t[6]=s,t[7]=a,t[8]=o):o=t[8],o}const Qle=(e,t)=>{e.tf.insertNodes({children:[{text:""}],texExpression:"",type:e.getType(ee.equation)},t)},Zle=(e,t,n)=>{e.tf.insertNodes({children:[{text:""}],texExpression:t??e.api.string(e.selection),type:e.getType(ee.inlineEquation)},n)},eue=e=>typeof e.texExpression=="string"||typeof e.texExpression=="number"||typeof e.texExpression=="boolean"?String(e.texExpression):"",EI=({editor:e,tf:{normalizeNode:t},type:n})=>({transforms:{normalizeNode(r){const[i,s]=r;if(Rt.isElement(i)&&i.type===n&&typeof i.texExpression!="string"){e.tf.setNodes({texExpression:eue({texExpression:i.texExpression})},{at:s});return}return t(r)}}}),tue=Jt({key:ee.equation,node:{isElement:!0,isVoid:!0},parsers:{html:{deserializer:{toNodeProps:({element:e})=>({texExpression:e.getAttribute("data-slate-tex-expression")??""})}}}}).overrideEditor(EI).extendEditorTransforms(({editor:e})=>({insert:{equation:Ce(Qle,e)}})),nue=Jt({key:ee.inlineEquation,node:{isElement:!0,isInline:!0,isVoid:!0},parsers:{html:{deserializer:{toNodeProps:({element:e})=>({texExpression:e.getAttribute("data-slate-tex-expression")??""})}}}}).overrideEditor(EI).extendEditorTransforms(({editor:e})=>({insert:{inlineEquation:Ce(Zle,e)}}));let rue=class CI{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new CI(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},iue=class kI{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new kI(n,rue.range(this,t))}};class Ft{constructor(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+t,i,s,a=n&&n.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="…"+o.slice(i-15,i):u=o.slice(0,i);var f;s+15":">","<":"<",'"':""","'":"'"},cue=/[&><"']/g;function fue(e){return String(e).replace(cue,t=>uue[t])}var DI=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},due=function(t){var n=DI(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},hue=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},pue=function(t){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},$t={contains:sue,deflt:aue,escape:fue,hyphenate:lue,getBaseElem:DI,isCharacterBox:due,protocolFromUrl:pue};class Vo{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return wa[mue[this.id]]}sub(){return wa[gue[this.id]]}fracNum(){return wa[vue[this.id]]}fracDen(){return wa[yue[this.id]]}cramp(){return wa[xue[this.id]]}text(){return wa[bue[this.id]]}isTight(){return this.size>=2}}var n3=0,Lp=1,xc=2,uo=3,_0=4,Cs=5,Ac=6,Ai=7,wa=[new Vo(n3,0,!1),new Vo(Lp,0,!0),new Vo(xc,1,!1),new Vo(uo,1,!0),new Vo(_0,2,!1),new Vo(Cs,2,!0),new Vo(Ac,3,!1),new Vo(Ai,3,!0)],mue=[_0,Cs,_0,Cs,Ac,Ai,Ac,Ai],gue=[Cs,Cs,Cs,Cs,Ai,Ai,Ai,Ai],vue=[xc,uo,_0,Cs,Ac,Ai,Ac,Ai],yue=[uo,uo,Cs,Cs,Ai,Ai,Ai,Ai],xue=[Lp,Lp,uo,uo,Cs,Cs,Ai,Ai],bue=[n3,Lp,xc,uo,xc,uo,xc,uo],Ht={DISPLAY:wa[n3],TEXT:wa[xc],SCRIPT:wa[_0],SCRIPTSCRIPT:wa[Ac]},i4=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function wue(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var sp=[];i4.forEach(e=>e.blocks.forEach(t=>sp.push(...t)));function Eue(e){for(var t=0;t=sp[t]&&e<=sp[t+1])return!0;return!1}var Qu=80,Cue=function(t,n){return"M95,"+(622+t+n)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+t/2.075+" -"+t+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+t)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},kue=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+t/2.084+" -"+t+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+t)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Due=function(t,n){return"M983 "+(10+t+n)+` -l`+t/3.13+" -"+t+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Sue=function(t,n){return"M424,"+(2398+t+n)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+t)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` -h400000v`+(40+t)+"h-400000z"},_ue=function(t,n){return"M473,"+(2713+t+n)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Aue=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Tue=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` -H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},Nue=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Cue(n,Qu);break;case"sqrtSize1":i=kue(n,Qu);break;case"sqrtSize2":i=Due(n,Qu);break;case"sqrtSize3":i=Sue(n,Qu);break;case"sqrtSize4":i=_ue(n,Qu);break;case"sqrtTall":i=Tue(n,Qu,r)}return i},Oue=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},t9={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Bue=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z -M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z -M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z -M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class td{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return $t.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var no={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},n9={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function r3(e,t,n){if(!no[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=no[t][r];if(!i&&e[0]in n9&&(r=n9[e[0]].charCodeAt(0),i=no[t][r]),!i&&n==="text"&&Eue(r)&&(i=no[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var s4={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Pue={ex:!0,em:!0,mu:!0},Rue=function(t){return typeof t!="string"&&(t=t.unit),t in s4||t in Pue||t==="ex"},gr=function(t,n){var r;if(t.unit in s4)r=s4[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new Ft("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},ct=function(t){return+t.toFixed(4)+"em"},ol=function(t){return t.filter(n=>n).join(" ")},SI=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},_I=function(t){var n=document.createElement(t);n.className=ol(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,AI=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+$t.escape(ol(this.classes))+'"');var r="";for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=$t.hyphenate(i)+":"+this.style[i]+";");r&&(n+=' style="'+$t.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Fue.test(s))throw new Ft("Invalid attribute name '"+s+"'");n+=" "+s+'="'+$t.escape(this.attributes[s])+'"'}n+=">";for(var a=0;a",n};class Bm{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,SI.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return $t.contains(this.classes,t)}toNode(){return _I.call(this,"span")}toMarkup(){return AI.call(this,"span")}}class TI{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,SI.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return $t.contains(this.classes,t)}toNode(){return _I.call(this,"a")}toMarkup(){return AI.call(this,"a")}}class Iue{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return $t.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=''+$t.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=ct(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=ol(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=$t.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+$t.escape(r)+'"');var s=$t.escape(this.text);return t?(n+=">",n+=s,n+="",n):s}}class ll{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i':''}}class r9{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var zue={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Ar={math:{},text:{}};function B(e,t,n,r,i,s){Ar[e][i]={font:t,group:n,replace:r},s&&r&&(Ar[e][r]=Ar[e][i])}var q="math",Ue="text",H="main",ce="ams",cr="accent-token",xt="bin",Ni="close",Yc="inner",qt="mathord",Fr="op-token",os="open",Pm="punct",fe="rel",bo="spacing",ye="textord";B(q,H,fe,"≡","\\equiv",!0);B(q,H,fe,"≺","\\prec",!0);B(q,H,fe,"≻","\\succ",!0);B(q,H,fe,"∼","\\sim",!0);B(q,H,fe,"⊥","\\perp");B(q,H,fe,"⪯","\\preceq",!0);B(q,H,fe,"⪰","\\succeq",!0);B(q,H,fe,"≃","\\simeq",!0);B(q,H,fe,"∣","\\mid",!0);B(q,H,fe,"≪","\\ll",!0);B(q,H,fe,"≫","\\gg",!0);B(q,H,fe,"≍","\\asymp",!0);B(q,H,fe,"∥","\\parallel");B(q,H,fe,"⋈","\\bowtie",!0);B(q,H,fe,"⌣","\\smile",!0);B(q,H,fe,"⊑","\\sqsubseteq",!0);B(q,H,fe,"⊒","\\sqsupseteq",!0);B(q,H,fe,"≐","\\doteq",!0);B(q,H,fe,"⌢","\\frown",!0);B(q,H,fe,"∋","\\ni",!0);B(q,H,fe,"∝","\\propto",!0);B(q,H,fe,"⊢","\\vdash",!0);B(q,H,fe,"⊣","\\dashv",!0);B(q,H,fe,"∋","\\owns");B(q,H,Pm,".","\\ldotp");B(q,H,Pm,"⋅","\\cdotp");B(q,H,ye,"#","\\#");B(Ue,H,ye,"#","\\#");B(q,H,ye,"&","\\&");B(Ue,H,ye,"&","\\&");B(q,H,ye,"ℵ","\\aleph",!0);B(q,H,ye,"∀","\\forall",!0);B(q,H,ye,"ℏ","\\hbar",!0);B(q,H,ye,"∃","\\exists",!0);B(q,H,ye,"∇","\\nabla",!0);B(q,H,ye,"♭","\\flat",!0);B(q,H,ye,"ℓ","\\ell",!0);B(q,H,ye,"♮","\\natural",!0);B(q,H,ye,"♣","\\clubsuit",!0);B(q,H,ye,"℘","\\wp",!0);B(q,H,ye,"♯","\\sharp",!0);B(q,H,ye,"♢","\\diamondsuit",!0);B(q,H,ye,"ℜ","\\Re",!0);B(q,H,ye,"♡","\\heartsuit",!0);B(q,H,ye,"ℑ","\\Im",!0);B(q,H,ye,"♠","\\spadesuit",!0);B(q,H,ye,"§","\\S",!0);B(Ue,H,ye,"§","\\S");B(q,H,ye,"¶","\\P",!0);B(Ue,H,ye,"¶","\\P");B(q,H,ye,"†","\\dag");B(Ue,H,ye,"†","\\dag");B(Ue,H,ye,"†","\\textdagger");B(q,H,ye,"‡","\\ddag");B(Ue,H,ye,"‡","\\ddag");B(Ue,H,ye,"‡","\\textdaggerdbl");B(q,H,Ni,"⎱","\\rmoustache",!0);B(q,H,os,"⎰","\\lmoustache",!0);B(q,H,Ni,"⟯","\\rgroup",!0);B(q,H,os,"⟮","\\lgroup",!0);B(q,H,xt,"∓","\\mp",!0);B(q,H,xt,"⊖","\\ominus",!0);B(q,H,xt,"⊎","\\uplus",!0);B(q,H,xt,"⊓","\\sqcap",!0);B(q,H,xt,"∗","\\ast");B(q,H,xt,"⊔","\\sqcup",!0);B(q,H,xt,"◯","\\bigcirc",!0);B(q,H,xt,"∙","\\bullet",!0);B(q,H,xt,"‡","\\ddagger");B(q,H,xt,"≀","\\wr",!0);B(q,H,xt,"⨿","\\amalg");B(q,H,xt,"&","\\And");B(q,H,fe,"⟵","\\longleftarrow",!0);B(q,H,fe,"⇐","\\Leftarrow",!0);B(q,H,fe,"⟸","\\Longleftarrow",!0);B(q,H,fe,"⟶","\\longrightarrow",!0);B(q,H,fe,"⇒","\\Rightarrow",!0);B(q,H,fe,"⟹","\\Longrightarrow",!0);B(q,H,fe,"↔","\\leftrightarrow",!0);B(q,H,fe,"⟷","\\longleftrightarrow",!0);B(q,H,fe,"⇔","\\Leftrightarrow",!0);B(q,H,fe,"⟺","\\Longleftrightarrow",!0);B(q,H,fe,"↦","\\mapsto",!0);B(q,H,fe,"⟼","\\longmapsto",!0);B(q,H,fe,"↗","\\nearrow",!0);B(q,H,fe,"↩","\\hookleftarrow",!0);B(q,H,fe,"↪","\\hookrightarrow",!0);B(q,H,fe,"↘","\\searrow",!0);B(q,H,fe,"↼","\\leftharpoonup",!0);B(q,H,fe,"⇀","\\rightharpoonup",!0);B(q,H,fe,"↙","\\swarrow",!0);B(q,H,fe,"↽","\\leftharpoondown",!0);B(q,H,fe,"⇁","\\rightharpoondown",!0);B(q,H,fe,"↖","\\nwarrow",!0);B(q,H,fe,"⇌","\\rightleftharpoons",!0);B(q,ce,fe,"≮","\\nless",!0);B(q,ce,fe,"","\\@nleqslant");B(q,ce,fe,"","\\@nleqq");B(q,ce,fe,"⪇","\\lneq",!0);B(q,ce,fe,"≨","\\lneqq",!0);B(q,ce,fe,"","\\@lvertneqq");B(q,ce,fe,"⋦","\\lnsim",!0);B(q,ce,fe,"⪉","\\lnapprox",!0);B(q,ce,fe,"⊀","\\nprec",!0);B(q,ce,fe,"⋠","\\npreceq",!0);B(q,ce,fe,"⋨","\\precnsim",!0);B(q,ce,fe,"⪹","\\precnapprox",!0);B(q,ce,fe,"≁","\\nsim",!0);B(q,ce,fe,"","\\@nshortmid");B(q,ce,fe,"∤","\\nmid",!0);B(q,ce,fe,"⊬","\\nvdash",!0);B(q,ce,fe,"⊭","\\nvDash",!0);B(q,ce,fe,"⋪","\\ntriangleleft");B(q,ce,fe,"⋬","\\ntrianglelefteq",!0);B(q,ce,fe,"⊊","\\subsetneq",!0);B(q,ce,fe,"","\\@varsubsetneq");B(q,ce,fe,"⫋","\\subsetneqq",!0);B(q,ce,fe,"","\\@varsubsetneqq");B(q,ce,fe,"≯","\\ngtr",!0);B(q,ce,fe,"","\\@ngeqslant");B(q,ce,fe,"","\\@ngeqq");B(q,ce,fe,"⪈","\\gneq",!0);B(q,ce,fe,"≩","\\gneqq",!0);B(q,ce,fe,"","\\@gvertneqq");B(q,ce,fe,"⋧","\\gnsim",!0);B(q,ce,fe,"⪊","\\gnapprox",!0);B(q,ce,fe,"⊁","\\nsucc",!0);B(q,ce,fe,"⋡","\\nsucceq",!0);B(q,ce,fe,"⋩","\\succnsim",!0);B(q,ce,fe,"⪺","\\succnapprox",!0);B(q,ce,fe,"≆","\\ncong",!0);B(q,ce,fe,"","\\@nshortparallel");B(q,ce,fe,"∦","\\nparallel",!0);B(q,ce,fe,"⊯","\\nVDash",!0);B(q,ce,fe,"⋫","\\ntriangleright");B(q,ce,fe,"⋭","\\ntrianglerighteq",!0);B(q,ce,fe,"","\\@nsupseteqq");B(q,ce,fe,"⊋","\\supsetneq",!0);B(q,ce,fe,"","\\@varsupsetneq");B(q,ce,fe,"⫌","\\supsetneqq",!0);B(q,ce,fe,"","\\@varsupsetneqq");B(q,ce,fe,"⊮","\\nVdash",!0);B(q,ce,fe,"⪵","\\precneqq",!0);B(q,ce,fe,"⪶","\\succneqq",!0);B(q,ce,fe,"","\\@nsubseteqq");B(q,ce,xt,"⊴","\\unlhd");B(q,ce,xt,"⊵","\\unrhd");B(q,ce,fe,"↚","\\nleftarrow",!0);B(q,ce,fe,"↛","\\nrightarrow",!0);B(q,ce,fe,"⇍","\\nLeftarrow",!0);B(q,ce,fe,"⇏","\\nRightarrow",!0);B(q,ce,fe,"↮","\\nleftrightarrow",!0);B(q,ce,fe,"⇎","\\nLeftrightarrow",!0);B(q,ce,fe,"△","\\vartriangle");B(q,ce,ye,"ℏ","\\hslash");B(q,ce,ye,"▽","\\triangledown");B(q,ce,ye,"◊","\\lozenge");B(q,ce,ye,"Ⓢ","\\circledS");B(q,ce,ye,"®","\\circledR");B(Ue,ce,ye,"®","\\circledR");B(q,ce,ye,"∡","\\measuredangle",!0);B(q,ce,ye,"∄","\\nexists");B(q,ce,ye,"℧","\\mho");B(q,ce,ye,"Ⅎ","\\Finv",!0);B(q,ce,ye,"⅁","\\Game",!0);B(q,ce,ye,"‵","\\backprime");B(q,ce,ye,"▲","\\blacktriangle");B(q,ce,ye,"▼","\\blacktriangledown");B(q,ce,ye,"■","\\blacksquare");B(q,ce,ye,"⧫","\\blacklozenge");B(q,ce,ye,"★","\\bigstar");B(q,ce,ye,"∢","\\sphericalangle",!0);B(q,ce,ye,"∁","\\complement",!0);B(q,ce,ye,"ð","\\eth",!0);B(Ue,H,ye,"ð","ð");B(q,ce,ye,"╱","\\diagup");B(q,ce,ye,"╲","\\diagdown");B(q,ce,ye,"□","\\square");B(q,ce,ye,"□","\\Box");B(q,ce,ye,"◊","\\Diamond");B(q,ce,ye,"¥","\\yen",!0);B(Ue,ce,ye,"¥","\\yen",!0);B(q,ce,ye,"✓","\\checkmark",!0);B(Ue,ce,ye,"✓","\\checkmark");B(q,ce,ye,"ℶ","\\beth",!0);B(q,ce,ye,"ℸ","\\daleth",!0);B(q,ce,ye,"ℷ","\\gimel",!0);B(q,ce,ye,"ϝ","\\digamma",!0);B(q,ce,ye,"ϰ","\\varkappa");B(q,ce,os,"┌","\\@ulcorner",!0);B(q,ce,Ni,"┐","\\@urcorner",!0);B(q,ce,os,"└","\\@llcorner",!0);B(q,ce,Ni,"┘","\\@lrcorner",!0);B(q,ce,fe,"≦","\\leqq",!0);B(q,ce,fe,"⩽","\\leqslant",!0);B(q,ce,fe,"⪕","\\eqslantless",!0);B(q,ce,fe,"≲","\\lesssim",!0);B(q,ce,fe,"⪅","\\lessapprox",!0);B(q,ce,fe,"≊","\\approxeq",!0);B(q,ce,xt,"⋖","\\lessdot");B(q,ce,fe,"⋘","\\lll",!0);B(q,ce,fe,"≶","\\lessgtr",!0);B(q,ce,fe,"⋚","\\lesseqgtr",!0);B(q,ce,fe,"⪋","\\lesseqqgtr",!0);B(q,ce,fe,"≑","\\doteqdot");B(q,ce,fe,"≓","\\risingdotseq",!0);B(q,ce,fe,"≒","\\fallingdotseq",!0);B(q,ce,fe,"∽","\\backsim",!0);B(q,ce,fe,"⋍","\\backsimeq",!0);B(q,ce,fe,"⫅","\\subseteqq",!0);B(q,ce,fe,"⋐","\\Subset",!0);B(q,ce,fe,"⊏","\\sqsubset",!0);B(q,ce,fe,"≼","\\preccurlyeq",!0);B(q,ce,fe,"⋞","\\curlyeqprec",!0);B(q,ce,fe,"≾","\\precsim",!0);B(q,ce,fe,"⪷","\\precapprox",!0);B(q,ce,fe,"⊲","\\vartriangleleft");B(q,ce,fe,"⊴","\\trianglelefteq");B(q,ce,fe,"⊨","\\vDash",!0);B(q,ce,fe,"⊪","\\Vvdash",!0);B(q,ce,fe,"⌣","\\smallsmile");B(q,ce,fe,"⌢","\\smallfrown");B(q,ce,fe,"≏","\\bumpeq",!0);B(q,ce,fe,"≎","\\Bumpeq",!0);B(q,ce,fe,"≧","\\geqq",!0);B(q,ce,fe,"⩾","\\geqslant",!0);B(q,ce,fe,"⪖","\\eqslantgtr",!0);B(q,ce,fe,"≳","\\gtrsim",!0);B(q,ce,fe,"⪆","\\gtrapprox",!0);B(q,ce,xt,"⋗","\\gtrdot");B(q,ce,fe,"⋙","\\ggg",!0);B(q,ce,fe,"≷","\\gtrless",!0);B(q,ce,fe,"⋛","\\gtreqless",!0);B(q,ce,fe,"⪌","\\gtreqqless",!0);B(q,ce,fe,"≖","\\eqcirc",!0);B(q,ce,fe,"≗","\\circeq",!0);B(q,ce,fe,"≜","\\triangleq",!0);B(q,ce,fe,"∼","\\thicksim");B(q,ce,fe,"≈","\\thickapprox");B(q,ce,fe,"⫆","\\supseteqq",!0);B(q,ce,fe,"⋑","\\Supset",!0);B(q,ce,fe,"⊐","\\sqsupset",!0);B(q,ce,fe,"≽","\\succcurlyeq",!0);B(q,ce,fe,"⋟","\\curlyeqsucc",!0);B(q,ce,fe,"≿","\\succsim",!0);B(q,ce,fe,"⪸","\\succapprox",!0);B(q,ce,fe,"⊳","\\vartriangleright");B(q,ce,fe,"⊵","\\trianglerighteq");B(q,ce,fe,"⊩","\\Vdash",!0);B(q,ce,fe,"∣","\\shortmid");B(q,ce,fe,"∥","\\shortparallel");B(q,ce,fe,"≬","\\between",!0);B(q,ce,fe,"⋔","\\pitchfork",!0);B(q,ce,fe,"∝","\\varpropto");B(q,ce,fe,"◀","\\blacktriangleleft");B(q,ce,fe,"∴","\\therefore",!0);B(q,ce,fe,"∍","\\backepsilon");B(q,ce,fe,"▶","\\blacktriangleright");B(q,ce,fe,"∵","\\because",!0);B(q,ce,fe,"⋘","\\llless");B(q,ce,fe,"⋙","\\gggtr");B(q,ce,xt,"⊲","\\lhd");B(q,ce,xt,"⊳","\\rhd");B(q,ce,fe,"≂","\\eqsim",!0);B(q,H,fe,"⋈","\\Join");B(q,ce,fe,"≑","\\Doteq",!0);B(q,ce,xt,"∔","\\dotplus",!0);B(q,ce,xt,"∖","\\smallsetminus");B(q,ce,xt,"⋒","\\Cap",!0);B(q,ce,xt,"⋓","\\Cup",!0);B(q,ce,xt,"⩞","\\doublebarwedge",!0);B(q,ce,xt,"⊟","\\boxminus",!0);B(q,ce,xt,"⊞","\\boxplus",!0);B(q,ce,xt,"⋇","\\divideontimes",!0);B(q,ce,xt,"⋉","\\ltimes",!0);B(q,ce,xt,"⋊","\\rtimes",!0);B(q,ce,xt,"⋋","\\leftthreetimes",!0);B(q,ce,xt,"⋌","\\rightthreetimes",!0);B(q,ce,xt,"⋏","\\curlywedge",!0);B(q,ce,xt,"⋎","\\curlyvee",!0);B(q,ce,xt,"⊝","\\circleddash",!0);B(q,ce,xt,"⊛","\\circledast",!0);B(q,ce,xt,"⋅","\\centerdot");B(q,ce,xt,"⊺","\\intercal",!0);B(q,ce,xt,"⋒","\\doublecap");B(q,ce,xt,"⋓","\\doublecup");B(q,ce,xt,"⊠","\\boxtimes",!0);B(q,ce,fe,"⇢","\\dashrightarrow",!0);B(q,ce,fe,"⇠","\\dashleftarrow",!0);B(q,ce,fe,"⇇","\\leftleftarrows",!0);B(q,ce,fe,"⇆","\\leftrightarrows",!0);B(q,ce,fe,"⇚","\\Lleftarrow",!0);B(q,ce,fe,"↞","\\twoheadleftarrow",!0);B(q,ce,fe,"↢","\\leftarrowtail",!0);B(q,ce,fe,"↫","\\looparrowleft",!0);B(q,ce,fe,"⇋","\\leftrightharpoons",!0);B(q,ce,fe,"↶","\\curvearrowleft",!0);B(q,ce,fe,"↺","\\circlearrowleft",!0);B(q,ce,fe,"↰","\\Lsh",!0);B(q,ce,fe,"⇈","\\upuparrows",!0);B(q,ce,fe,"↿","\\upharpoonleft",!0);B(q,ce,fe,"⇃","\\downharpoonleft",!0);B(q,H,fe,"⊶","\\origof",!0);B(q,H,fe,"⊷","\\imageof",!0);B(q,ce,fe,"⊸","\\multimap",!0);B(q,ce,fe,"↭","\\leftrightsquigarrow",!0);B(q,ce,fe,"⇉","\\rightrightarrows",!0);B(q,ce,fe,"⇄","\\rightleftarrows",!0);B(q,ce,fe,"↠","\\twoheadrightarrow",!0);B(q,ce,fe,"↣","\\rightarrowtail",!0);B(q,ce,fe,"↬","\\looparrowright",!0);B(q,ce,fe,"↷","\\curvearrowright",!0);B(q,ce,fe,"↻","\\circlearrowright",!0);B(q,ce,fe,"↱","\\Rsh",!0);B(q,ce,fe,"⇊","\\downdownarrows",!0);B(q,ce,fe,"↾","\\upharpoonright",!0);B(q,ce,fe,"⇂","\\downharpoonright",!0);B(q,ce,fe,"⇝","\\rightsquigarrow",!0);B(q,ce,fe,"⇝","\\leadsto");B(q,ce,fe,"⇛","\\Rrightarrow",!0);B(q,ce,fe,"↾","\\restriction");B(q,H,ye,"‘","`");B(q,H,ye,"$","\\$");B(Ue,H,ye,"$","\\$");B(Ue,H,ye,"$","\\textdollar");B(q,H,ye,"%","\\%");B(Ue,H,ye,"%","\\%");B(q,H,ye,"_","\\_");B(Ue,H,ye,"_","\\_");B(Ue,H,ye,"_","\\textunderscore");B(q,H,ye,"∠","\\angle",!0);B(q,H,ye,"∞","\\infty",!0);B(q,H,ye,"′","\\prime");B(q,H,ye,"△","\\triangle");B(q,H,ye,"Γ","\\Gamma",!0);B(q,H,ye,"Δ","\\Delta",!0);B(q,H,ye,"Θ","\\Theta",!0);B(q,H,ye,"Λ","\\Lambda",!0);B(q,H,ye,"Ξ","\\Xi",!0);B(q,H,ye,"Π","\\Pi",!0);B(q,H,ye,"Σ","\\Sigma",!0);B(q,H,ye,"Υ","\\Upsilon",!0);B(q,H,ye,"Φ","\\Phi",!0);B(q,H,ye,"Ψ","\\Psi",!0);B(q,H,ye,"Ω","\\Omega",!0);B(q,H,ye,"A","Α");B(q,H,ye,"B","Β");B(q,H,ye,"E","Ε");B(q,H,ye,"Z","Ζ");B(q,H,ye,"H","Η");B(q,H,ye,"I","Ι");B(q,H,ye,"K","Κ");B(q,H,ye,"M","Μ");B(q,H,ye,"N","Ν");B(q,H,ye,"O","Ο");B(q,H,ye,"P","Ρ");B(q,H,ye,"T","Τ");B(q,H,ye,"X","Χ");B(q,H,ye,"¬","\\neg",!0);B(q,H,ye,"¬","\\lnot");B(q,H,ye,"⊤","\\top");B(q,H,ye,"⊥","\\bot");B(q,H,ye,"∅","\\emptyset");B(q,ce,ye,"∅","\\varnothing");B(q,H,qt,"α","\\alpha",!0);B(q,H,qt,"β","\\beta",!0);B(q,H,qt,"γ","\\gamma",!0);B(q,H,qt,"δ","\\delta",!0);B(q,H,qt,"ϵ","\\epsilon",!0);B(q,H,qt,"ζ","\\zeta",!0);B(q,H,qt,"η","\\eta",!0);B(q,H,qt,"θ","\\theta",!0);B(q,H,qt,"ι","\\iota",!0);B(q,H,qt,"κ","\\kappa",!0);B(q,H,qt,"λ","\\lambda",!0);B(q,H,qt,"μ","\\mu",!0);B(q,H,qt,"ν","\\nu",!0);B(q,H,qt,"ξ","\\xi",!0);B(q,H,qt,"ο","\\omicron",!0);B(q,H,qt,"π","\\pi",!0);B(q,H,qt,"ρ","\\rho",!0);B(q,H,qt,"σ","\\sigma",!0);B(q,H,qt,"τ","\\tau",!0);B(q,H,qt,"υ","\\upsilon",!0);B(q,H,qt,"ϕ","\\phi",!0);B(q,H,qt,"χ","\\chi",!0);B(q,H,qt,"ψ","\\psi",!0);B(q,H,qt,"ω","\\omega",!0);B(q,H,qt,"ε","\\varepsilon",!0);B(q,H,qt,"ϑ","\\vartheta",!0);B(q,H,qt,"ϖ","\\varpi",!0);B(q,H,qt,"ϱ","\\varrho",!0);B(q,H,qt,"ς","\\varsigma",!0);B(q,H,qt,"φ","\\varphi",!0);B(q,H,xt,"∗","*",!0);B(q,H,xt,"+","+");B(q,H,xt,"−","-",!0);B(q,H,xt,"⋅","\\cdot",!0);B(q,H,xt,"∘","\\circ",!0);B(q,H,xt,"÷","\\div",!0);B(q,H,xt,"±","\\pm",!0);B(q,H,xt,"×","\\times",!0);B(q,H,xt,"∩","\\cap",!0);B(q,H,xt,"∪","\\cup",!0);B(q,H,xt,"∖","\\setminus",!0);B(q,H,xt,"∧","\\land");B(q,H,xt,"∨","\\lor");B(q,H,xt,"∧","\\wedge",!0);B(q,H,xt,"∨","\\vee",!0);B(q,H,ye,"√","\\surd");B(q,H,os,"⟨","\\langle",!0);B(q,H,os,"∣","\\lvert");B(q,H,os,"∥","\\lVert");B(q,H,Ni,"?","?");B(q,H,Ni,"!","!");B(q,H,Ni,"⟩","\\rangle",!0);B(q,H,Ni,"∣","\\rvert");B(q,H,Ni,"∥","\\rVert");B(q,H,fe,"=","=");B(q,H,fe,":",":");B(q,H,fe,"≈","\\approx",!0);B(q,H,fe,"≅","\\cong",!0);B(q,H,fe,"≥","\\ge");B(q,H,fe,"≥","\\geq",!0);B(q,H,fe,"←","\\gets");B(q,H,fe,">","\\gt",!0);B(q,H,fe,"∈","\\in",!0);B(q,H,fe,"","\\@not");B(q,H,fe,"⊂","\\subset",!0);B(q,H,fe,"⊃","\\supset",!0);B(q,H,fe,"⊆","\\subseteq",!0);B(q,H,fe,"⊇","\\supseteq",!0);B(q,ce,fe,"⊈","\\nsubseteq",!0);B(q,ce,fe,"⊉","\\nsupseteq",!0);B(q,H,fe,"⊨","\\models");B(q,H,fe,"←","\\leftarrow",!0);B(q,H,fe,"≤","\\le");B(q,H,fe,"≤","\\leq",!0);B(q,H,fe,"<","\\lt",!0);B(q,H,fe,"→","\\rightarrow",!0);B(q,H,fe,"→","\\to");B(q,ce,fe,"≱","\\ngeq",!0);B(q,ce,fe,"≰","\\nleq",!0);B(q,H,bo," ","\\ ");B(q,H,bo," ","\\space");B(q,H,bo," ","\\nobreakspace");B(Ue,H,bo," ","\\ ");B(Ue,H,bo," "," ");B(Ue,H,bo," ","\\space");B(Ue,H,bo," ","\\nobreakspace");B(q,H,bo,null,"\\nobreak");B(q,H,bo,null,"\\allowbreak");B(q,H,Pm,",",",");B(q,H,Pm,";",";");B(q,ce,xt,"⊼","\\barwedge",!0);B(q,ce,xt,"⊻","\\veebar",!0);B(q,H,xt,"⊙","\\odot",!0);B(q,H,xt,"⊕","\\oplus",!0);B(q,H,xt,"⊗","\\otimes",!0);B(q,H,ye,"∂","\\partial",!0);B(q,H,xt,"⊘","\\oslash",!0);B(q,ce,xt,"⊚","\\circledcirc",!0);B(q,ce,xt,"⊡","\\boxdot",!0);B(q,H,xt,"△","\\bigtriangleup");B(q,H,xt,"▽","\\bigtriangledown");B(q,H,xt,"†","\\dagger");B(q,H,xt,"⋄","\\diamond");B(q,H,xt,"⋆","\\star");B(q,H,xt,"◃","\\triangleleft");B(q,H,xt,"▹","\\triangleright");B(q,H,os,"{","\\{");B(Ue,H,ye,"{","\\{");B(Ue,H,ye,"{","\\textbraceleft");B(q,H,Ni,"}","\\}");B(Ue,H,ye,"}","\\}");B(Ue,H,ye,"}","\\textbraceright");B(q,H,os,"{","\\lbrace");B(q,H,Ni,"}","\\rbrace");B(q,H,os,"[","\\lbrack",!0);B(Ue,H,ye,"[","\\lbrack",!0);B(q,H,Ni,"]","\\rbrack",!0);B(Ue,H,ye,"]","\\rbrack",!0);B(q,H,os,"(","\\lparen",!0);B(q,H,Ni,")","\\rparen",!0);B(Ue,H,ye,"<","\\textless",!0);B(Ue,H,ye,">","\\textgreater",!0);B(q,H,os,"⌊","\\lfloor",!0);B(q,H,Ni,"⌋","\\rfloor",!0);B(q,H,os,"⌈","\\lceil",!0);B(q,H,Ni,"⌉","\\rceil",!0);B(q,H,ye,"\\","\\backslash");B(q,H,ye,"∣","|");B(q,H,ye,"∣","\\vert");B(Ue,H,ye,"|","\\textbar",!0);B(q,H,ye,"∥","\\|");B(q,H,ye,"∥","\\Vert");B(Ue,H,ye,"∥","\\textbardbl");B(Ue,H,ye,"~","\\textasciitilde");B(Ue,H,ye,"\\","\\textbackslash");B(Ue,H,ye,"^","\\textasciicircum");B(q,H,fe,"↑","\\uparrow",!0);B(q,H,fe,"⇑","\\Uparrow",!0);B(q,H,fe,"↓","\\downarrow",!0);B(q,H,fe,"⇓","\\Downarrow",!0);B(q,H,fe,"↕","\\updownarrow",!0);B(q,H,fe,"⇕","\\Updownarrow",!0);B(q,H,Fr,"∐","\\coprod");B(q,H,Fr,"⋁","\\bigvee");B(q,H,Fr,"⋀","\\bigwedge");B(q,H,Fr,"⨄","\\biguplus");B(q,H,Fr,"⋂","\\bigcap");B(q,H,Fr,"⋃","\\bigcup");B(q,H,Fr,"∫","\\int");B(q,H,Fr,"∫","\\intop");B(q,H,Fr,"∬","\\iint");B(q,H,Fr,"∭","\\iiint");B(q,H,Fr,"∏","\\prod");B(q,H,Fr,"∑","\\sum");B(q,H,Fr,"⨂","\\bigotimes");B(q,H,Fr,"⨁","\\bigoplus");B(q,H,Fr,"⨀","\\bigodot");B(q,H,Fr,"∮","\\oint");B(q,H,Fr,"∯","\\oiint");B(q,H,Fr,"∰","\\oiiint");B(q,H,Fr,"⨆","\\bigsqcup");B(q,H,Fr,"∫","\\smallint");B(Ue,H,Yc,"…","\\textellipsis");B(q,H,Yc,"…","\\mathellipsis");B(Ue,H,Yc,"…","\\ldots",!0);B(q,H,Yc,"…","\\ldots",!0);B(q,H,Yc,"⋯","\\@cdots",!0);B(q,H,Yc,"⋱","\\ddots",!0);B(q,H,ye,"⋮","\\varvdots");B(Ue,H,ye,"⋮","\\varvdots");B(q,H,cr,"ˊ","\\acute");B(q,H,cr,"ˋ","\\grave");B(q,H,cr,"¨","\\ddot");B(q,H,cr,"~","\\tilde");B(q,H,cr,"ˉ","\\bar");B(q,H,cr,"˘","\\breve");B(q,H,cr,"ˇ","\\check");B(q,H,cr,"^","\\hat");B(q,H,cr,"⃗","\\vec");B(q,H,cr,"˙","\\dot");B(q,H,cr,"˚","\\mathring");B(q,H,qt,"","\\@imath");B(q,H,qt,"","\\@jmath");B(q,H,ye,"ı","ı");B(q,H,ye,"ȷ","ȷ");B(Ue,H,ye,"ı","\\i",!0);B(Ue,H,ye,"ȷ","\\j",!0);B(Ue,H,ye,"ß","\\ss",!0);B(Ue,H,ye,"æ","\\ae",!0);B(Ue,H,ye,"œ","\\oe",!0);B(Ue,H,ye,"ø","\\o",!0);B(Ue,H,ye,"Æ","\\AE",!0);B(Ue,H,ye,"Œ","\\OE",!0);B(Ue,H,ye,"Ø","\\O",!0);B(Ue,H,cr,"ˊ","\\'");B(Ue,H,cr,"ˋ","\\`");B(Ue,H,cr,"ˆ","\\^");B(Ue,H,cr,"˜","\\~");B(Ue,H,cr,"ˉ","\\=");B(Ue,H,cr,"˘","\\u");B(Ue,H,cr,"˙","\\.");B(Ue,H,cr,"¸","\\c");B(Ue,H,cr,"˚","\\r");B(Ue,H,cr,"ˇ","\\v");B(Ue,H,cr,"¨",'\\"');B(Ue,H,cr,"˝","\\H");B(Ue,H,cr,"◯","\\textcircled");var NI={"--":!0,"---":!0,"``":!0,"''":!0};B(Ue,H,ye,"–","--",!0);B(Ue,H,ye,"–","\\textendash");B(Ue,H,ye,"—","---",!0);B(Ue,H,ye,"—","\\textemdash");B(Ue,H,ye,"‘","`",!0);B(Ue,H,ye,"‘","\\textquoteleft");B(Ue,H,ye,"’","'",!0);B(Ue,H,ye,"’","\\textquoteright");B(Ue,H,ye,"“","``",!0);B(Ue,H,ye,"“","\\textquotedblleft");B(Ue,H,ye,"”","''",!0);B(Ue,H,ye,"”","\\textquotedblright");B(q,H,ye,"°","\\degree",!0);B(Ue,H,ye,"°","\\degree");B(Ue,H,ye,"°","\\textdegree",!0);B(q,H,ye,"£","\\pounds");B(q,H,ye,"£","\\mathsterling",!0);B(Ue,H,ye,"£","\\pounds");B(Ue,H,ye,"£","\\textsterling",!0);B(q,ce,ye,"✠","\\maltese");B(Ue,ce,ye,"✠","\\maltese");var s9='0123456789/@."';for(var h2=0;h20)return Ws(s,u,i,n,a.concat(f));if(l){var h,m;if(l==="boldsymbol"){var g=$ue(s,i,n,a,r);h=g.fontName,m=[g.fontClass]}else o?(h=PI[l].fontName,m=[l]):(h=Oh(l,n.fontWeight,n.fontShape),m=[l,n.fontWeight,n.fontShape]);if(Rm(s,h,i).metrics)return Ws(s,h,i,n,a.concat(m));if(NI.hasOwnProperty(s)&&h.slice(0,10)==="Typewriter"){for(var b=[],x=0;x{if(ol(e.classes)!==ol(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},Hue=e=>{for(var t=0;tn&&(n=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},$i=function(t,n,r,i){var s=new Bm(t,n,r,i);return i3(s),s},OI=(e,t,n,r)=>new Bm(e,t,n,r),Wue=function(t,n,r){var i=$i([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=ct(i.height),i.maxFontSize=1,i},Kue=function(t,n,r,i){var s=new TI(t,n,r,i);return i3(s),s},BI=function(t){var n=new td(t);return i3(n),n},Gue=function(t,n){return t instanceof td?$i([],[t],n):t},Yue=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,a=1;a{var n=$i(["mspace"],[],t),r=gr(e,t);return n.style.marginRight=ct(r),n},Oh=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",i+"-"+s},PI={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},RI={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Que=function(t,n){var[r,i,s]=RI[t],a=new cu(r),o=new ll([a],{width:ct(i),height:ct(s),style:"width:"+ct(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=OI(["overlay"],[o],n);return l.height=s,l.style.height=ct(s),l.style.width=ct(i),l},Ae={fontMap:PI,makeSymbol:Ws,mathsym:que,makeSpan:$i,makeSvgSpan:OI,makeLineSpan:Wue,makeAnchor:Kue,makeFragment:BI,wrapFragment:Gue,makeVList:Jue,makeOrd:Vue,makeGlue:Xue,staticSvg:Que,svgData:RI,tryCombineChars:Hue},pr={number:3,unit:"mu"},zl={number:4,unit:"mu"},Za={number:5,unit:"mu"},Zue={mord:{mop:pr,mbin:zl,mrel:Za,minner:pr},mop:{mord:pr,mop:pr,mrel:Za,minner:pr},mbin:{mord:zl,mop:zl,mopen:zl,minner:zl},mrel:{mord:Za,mop:Za,mopen:Za,minner:Za},mopen:{},mclose:{mop:pr,mbin:zl,mrel:Za,minner:pr},mpunct:{mord:pr,mop:pr,mrel:Za,mopen:pr,mclose:pr,mpunct:pr,minner:pr},minner:{mord:pr,mop:pr,mbin:zl,mrel:Za,mopen:pr,mpunct:pr,minner:pr}},ece={mord:{mop:pr},mop:{mord:pr,mop:pr},mbin:{},mrel:{},mopen:{},mclose:{mop:pr},mpunct:{},minner:{mop:pr}},FI={},jp={},qp={};function mt(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var E=x.classes[0],C=b.classes[0];E==="mbin"&&$t.contains(nce,C)?x.classes[0]="mord":C==="mbin"&&$t.contains(tce,E)&&(b.classes[0]="mord")},{node:h},m,g),f9(s,(b,x)=>{var E=a4(x),C=a4(b),y=E&&C?b.hasClass("mtight")?ece[E][C]:Zue[E][C]:null;if(y)return Ae.makeGlue(y,u)},{node:h},m,g),s},f9=function e(t,n,r,i,s){i&&t.push(i);for(var a=0;am=>{t.splice(h+1,0,m),a++})(a)}i&&t.pop()},II=function(t){return t instanceof td||t instanceof TI||t instanceof Bm&&t.hasClass("enclosing")?t:null},sce=function e(t,n){var r=II(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},a4=function(t,n){return t?(n&&(t=sce(t,n)),ice[t.classes[0]]||null):null},A0=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Tc(n.concat(r))},_n=function(t,n,r){if(!t)return Tc();if(jp[t.type]){var i=jp[t.type](t,n);if(r&&n.size!==r.size){i=Tc(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new Ft("Got group of unknown type: '"+t.type+"'")};function MI(e){return new td(e)}class bs{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=ol(this.classes));for(var r=0;r0&&(t+=' class ="'+$t.escape(ol(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class Ca{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return $t.escape(this.toText())}toText(){return this.text}}class ace{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",ct(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var tt={MathNode:bs,TextNode:Ca,SpaceNode:ace,newDocumentFragment:MI},_s=function(t,n,r){return Ar[n][t]&&Ar[n][t].replace&&t.charCodeAt(0)!==55349&&!(NI.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Ar[n][t].replace),new tt.TextNode(t)},s3=function(t){return t.length===1?t[0]:new tt.MathNode("mrow",t)},a3=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if($t.contains(["\\imath","\\jmath"],s))return null;Ar[i][s]&&Ar[i][s].replace&&(s=Ar[i][s].replace);var a=Ae.fontMap[r].fontName;return r3(s,a,i)?Ae.fontMap[r].variant:null};function v2(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof Ca&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof Ca&&n.text===","}else return!1}var ls=function(t,n,r){if(t.length===1){var i=Kn(t[0],n);return r&&i instanceof bs&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o=1&&(a.type==="mn"||v2(a))){var u=l.children[0];u instanceof bs&&u.type==="mn"&&(u.children=[...a.children,...u.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var f=a.children[0];if(f instanceof Ca&&f.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof Ca&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),s.pop())}}}s.push(l),a=l}return s},ul=function(t,n,r){return s3(ls(t,n,r))},Kn=function(t,n){if(!t)return new tt.MathNode("mrow");if(qp[t.type]){var r=qp[t.type](t,n);return r}else throw new Ft("Got group of unknown type: '"+t.type+"'")},oce={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},lce=function(t){var n=new tt.MathNode("mo",[new tt.TextNode(oce[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},uce={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},cce=function(t){return t.type==="ordgroup"?t.body.length:1},fce=function(t,n){function r(){var o=4e5,l=t.label.slice(1);if($t.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=t,f=cce(u.base),h,m,g;if(f>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,g=.42,m=l+"4"):(h=312,o=2340,g=.34,m="tilde4");else{var b=[1,1,2,2,3,3][f];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],g=[0,.24,.3,.3,.36,.42][b],m=l+b):(o=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],g=[0,.26,.286,.3,.306,.34][b],m="tilde"+b)}var x=new cu(m),E=new ll([x],{width:"100%",height:ct(g),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Ae.makeSvgSpan([],[E],n),minWidth:0,height:g}}else{var C=[],y=uce[l],[_,O,S]=y,w=S/1e3,A=_.length,T,P;if(A===1){var M=y[3];T=["hide-tail"],P=[M]}else if(A===2)T=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(A===3)T=["brace-left","brace-center","brace-right"],P=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+A+" children.");for(var F=0;F0&&(i.style.minWidth=ct(s)),i},dce=function(t,n,r,i,s){var a,o=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(a=Ae.makeSpan(["stretchy",n],[],s),n==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(n)&&u.push(new r9({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&u.push(new r9({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new ll(u,{width:"100%",height:ct(o)});a=Ae.makeSvgSpan([],[f],s)}return a.height=o,a.style.height=ct(o),a},mo={encloseSpan:dce,mathMLnode:lce,svgSpan:fce};function ln(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function o3(e){var t=Fm(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Fm(e){return e&&(e.type==="atom"||zue.hasOwnProperty(e.type))?e:null}var l3=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=ln(e.base,"accent"),n=r.base,e.base=n,i=Lue(_n(e,t)),e.base=r):(r=ln(e,"accent"),n=r.base);var s=_n(n,t.havingCrampedStyle()),a=r.isShifty&&$t.isCharacterBox(n),o=0;if(a){var l=$t.getBaseElem(n),u=_n(l,t.havingCrampedStyle());o=i9(u).skew}var f=r.label==="\\c",h=f?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),m;if(r.isStretchy)m=mo.svgSpan(r,t),m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ct(2*o)+")",marginLeft:ct(2*o)}:void 0}]});else{var g,b;r.label==="\\vec"?(g=Ae.staticSvg("vec",t),b=Ae.svgData.vec[1]):(g=Ae.makeOrd({mode:r.mode,text:r.label},t,"textord"),g=i9(g),g.italic=0,b=g.width,f&&(h+=g.depth)),m=Ae.makeSpan(["accent-body"],[g]);var x=r.label==="\\textcircled";x&&(m.classes.push("accent-full"),h=s.height);var E=o;x||(E-=b/2),m.style.left=ct(E),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-h},{type:"elem",elem:m}]})}var C=Ae.makeSpan(["mord","accent"],[m],t);return i?(i.children[0]=C,i.height=Math.max(C.height,i.height),i.classes[0]="mord",i):C},LI=(e,t)=>{var n=e.isStretchy?mo.mathMLnode(e.label):new tt.MathNode("mo",[_s(e.label,e.mode)]),r=new tt.MathNode("mover",[Kn(e.base,t),n]);return r.setAttribute("accent","true"),r},hce=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));mt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=$p(t[0]),r=!hce.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:l3,mathmlBuilder:LI});mt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:l3,mathmlBuilder:LI});mt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=_n(e.base,t),r=mo.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,s=Ae.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]});return Ae.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=mo.mathMLnode(e.label),r=new tt.MathNode("munder",[Kn(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Bh=e=>{var t=new tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};mt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Ae.wrapFragment(_n(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;e.below&&(r=t.havingStyle(n.sub()),a=Ae.wrapFragment(_n(e.below,r,t),t),a.classes.push(s+"-arrow-pad"));var o=mo.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var f;if(a){var h=-t.fontMetrics().axisHeight+a.height+.5*o.height+.111;f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:h}]})}else f=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l}]});return f.children[0].children[0].children[1].classes.push("svg-align"),Ae.makeSpan(["mrel","x-arrow"],[f],t)},mathmlBuilder(e,t){var n=mo.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=Bh(Kn(e.body,t));if(e.below){var s=Bh(Kn(e.below,t));r=new tt.MathNode("munderover",[n,s,i])}else r=new tt.MathNode("mover",[n,i])}else if(e.below){var a=Bh(Kn(e.below,t));r=new tt.MathNode("munder",[n,a])}else r=Bh(),r=new tt.MathNode("mover",[n,r]);return r}});var pce=Ae.makeSpan;function zI(e,t){var n=li(e.body,t,!0);return pce([e.mclass],n,t)}function jI(e,t){var n,r=ls(e.body,t);return e.mclass==="minner"?n=new tt.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new tt.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new tt.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}mt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:_r(i),isCharacterBox:$t.isCharacterBox(i)}},htmlBuilder:zI,mathmlBuilder:jI});var Im=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};mt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Im(t[0]),body:_r(t[1]),isCharacterBox:$t.isCharacterBox(t[1])}}});mt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],a;r!=="\\stackrel"?a=Im(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:_r(i)},l={type:"supsub",mode:s.mode,base:o,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:a,body:[l],isCharacterBox:$t.isCharacterBox(l)}},htmlBuilder:zI,mathmlBuilder:jI});mt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Im(t[0]),body:_r(t[0])}},htmlBuilder(e,t){var n=li(e.body,t,!0),r=Ae.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=ls(e.body,t),r=new tt.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var mce={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},d9=()=>({type:"styling",body:[],mode:"math",style:"display"}),h9=e=>e.type==="textord"&&e.text==="@",gce=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function vce(e,t,n){var r=mce[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},a=n.callFunction("\\Big",[s],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function yce(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ft("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var m=!0,g=l+1;gAV=|." after @',a[l]);var b=vce(u,f,e),x={type:"styling",body:[b],mode:"math",style:"display"};r.push(x),o=d9()}s%2===0?r.push(o):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var E=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:E,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}mt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ae.wrapFragment(_n(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ct(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new tt.MathNode("mrow",[Kn(e.label,t)]);return n=new tt.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new tt.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});mt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ae.wrapFragment(_n(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new tt.MathNode("mrow",[Kn(e.fragment,t)])}});mt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=ln(t[0],"ordgroup"),i=r.body,s="",a=0;a=1114111)throw new Ft("\\@char with invalid code point "+s);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:u}}});var qI=(e,t)=>{var n=li(e.body,t.withColor(e.color),!1);return Ae.makeFragment(n)},$I=(e,t)=>{var n=ls(e.body,t.withColor(e.color)),r=new tt.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};mt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=ln(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:_r(i)}},htmlBuilder:qI,mathmlBuilder:$I});mt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=ln(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:qI,mathmlBuilder:$I});mt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&ln(i,"size").value}},htmlBuilder(e,t){var n=Ae.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ct(gr(e.size,t)))),n},mathmlBuilder(e,t){var n=new tt.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ct(gr(e.size,t)))),n}});var o4={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},VI=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ft("Expected a control sequence",e);return t},xce=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},UI=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};mt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(o4[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=o4[r.text]),ln(t.parseFunction(),"internal");throw new Ft("Invalid token after macro prefix",r)}});mt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Ft("Expected a control sequence",r);for(var s=0,a,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){a=t.gullet.future(),o[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ft('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Ft('Argument number "'+r.text+'" out of order');s++,o.push([])}else{if(r.text==="EOF")throw new Ft("Expected a macro definition");o[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},n===o4[n]),{type:"internal",mode:t.mode}}});mt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=VI(t.gullet.popToken());t.gullet.consumeSpaces();var i=xce(t);return UI(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});mt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=VI(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return UI(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Kf=function(t,n,r){var i=Ar.math[t]&&Ar.math[t].replace,s=r3(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},u3=function(t,n,r,i){var s=r.havingBaseStyle(n),a=Ae.makeSpan(i.concat(s.sizingClasses(r)),[t],r),o=s.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},HI=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ct(s),t.height-=s,t.depth+=s},bce=function(t,n,r,i,s,a){var o=Ae.makeSymbol(t,"Main-Regular",s,i),l=u3(o,n,i,a);return r&&HI(l,i,n),l},wce=function(t,n,r,i){return Ae.makeSymbol(t,"Size"+n+"-Regular",r,i)},WI=function(t,n,r,i,s,a){var o=wce(t,n,s,i),l=u3(Ae.makeSpan(["delimsizing","size"+n],[o],i),Ht.TEXT,i,a);return r&&HI(l,i,Ht.TEXT),l},y2=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=Ae.makeSpan(["delimsizinginner",i],[Ae.makeSpan([],[Ae.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},x2=function(t,n,r){var i=no["Size4-Regular"][t.charCodeAt(0)]?no["Size4-Regular"][t.charCodeAt(0)][4]:no["Size1-Regular"][t.charCodeAt(0)][4],s=new cu("inner",Oue(t,Math.round(1e3*n))),a=new ll([s],{width:ct(i),height:ct(n),style:"width:"+ct(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=Ae.makeSvgSpan([],[a],r);return o.height=n,o.style.height=ct(n),o.style.width=ct(i),{type:"elem",elem:o}},l4=.008,Ph={type:"kern",size:-1*l4},Ece=["|","\\lvert","\\rvert","\\vert"],Cce=["\\|","\\lVert","\\rVert","\\Vert"],KI=function(t,n,r,i,s,a){var o,l,u,f,h="",m=0;o=u=f=t,l=null;var g="Size1-Regular";t==="\\uparrow"?u=f="⏐":t==="\\Uparrow"?u=f="‖":t==="\\downarrow"?o=u="⏐":t==="\\Downarrow"?o=u="‖":t==="\\updownarrow"?(o="\\uparrow",u="⏐",f="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="‖",f="\\Downarrow"):$t.contains(Ece,t)?(u="∣",h="vert",m=333):$t.contains(Cce,t)?(u="∥",h="doublevert",m=556):t==="["||t==="\\lbrack"?(o="⎡",u="⎢",f="⎣",g="Size4-Regular",h="lbrack",m=667):t==="]"||t==="\\rbrack"?(o="⎤",u="⎥",f="⎦",g="Size4-Regular",h="rbrack",m=667):t==="\\lfloor"||t==="⌊"?(u=o="⎢",f="⎣",g="Size4-Regular",h="lfloor",m=667):t==="\\lceil"||t==="⌈"?(o="⎡",u=f="⎢",g="Size4-Regular",h="lceil",m=667):t==="\\rfloor"||t==="⌋"?(u=o="⎥",f="⎦",g="Size4-Regular",h="rfloor",m=667):t==="\\rceil"||t==="⌉"?(o="⎤",u=f="⎥",g="Size4-Regular",h="rceil",m=667):t==="("||t==="\\lparen"?(o="⎛",u="⎜",f="⎝",g="Size4-Regular",h="lparen",m=875):t===")"||t==="\\rparen"?(o="⎞",u="⎟",f="⎠",g="Size4-Regular",h="rparen",m=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",f="⎩",u="⎪",g="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",f="⎭",u="⎪",g="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",f="⎩",u="⎪",g="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",f="⎭",u="⎪",g="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",f="⎭",u="⎪",g="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",f="⎩",u="⎪",g="Size4-Regular");var b=Kf(o,g,s),x=b.height+b.depth,E=Kf(u,g,s),C=E.height+E.depth,y=Kf(f,g,s),_=y.height+y.depth,O=0,S=1;if(l!==null){var w=Kf(l,g,s);O=w.height+w.depth,S=2}var A=x+_+O,T=Math.max(0,Math.ceil((n-A)/(S*C))),P=A+T*S*C,M=i.fontMetrics().axisHeight;r&&(M*=i.sizeMultiplier);var F=P/2-M,z=[];if(h.length>0){var $=P-x-_,Y=Math.round(P*1e3),Z=Bue(h,Math.round($*1e3)),ve=new cu(h,Z),me=(m/1e3).toFixed(3)+"em",re=(Y/1e3).toFixed(3)+"em",de=new ll([ve],{width:me,height:re,viewBox:"0 0 "+m+" "+Y}),I=Ae.makeSvgSpan([],[de],i);I.height=Y/1e3,I.style.width=me,I.style.height=re,z.push({type:"elem",elem:I})}else{if(z.push(y2(f,g,s)),z.push(Ph),l===null){var X=P-x-_+2*l4;z.push(x2(u,X,i))}else{var ne=(P-x-_-O)/2+2*l4;z.push(x2(u,ne,i)),z.push(Ph),z.push(y2(l,g,s)),z.push(Ph),z.push(x2(u,ne,i))}z.push(Ph),z.push(y2(o,g,s))}var W=i.havingBaseStyle(Ht.TEXT),Te=Ae.makeVList({positionType:"bottom",positionData:F,children:z});return u3(Ae.makeSpan(["delimsizing","mult"],[Te],W),Ht.TEXT,i,a)},b2=80,w2=.08,E2=function(t,n,r,i,s){var a=Nue(t,i,r),o=new cu(t,a),l=new ll([o],{width:"400em",height:ct(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ae.makeSvgSpan(["hide-tail"],[l],s)},kce=function(t,n){var r=n.havingBaseSizing(),i=XI("\\surd",t*r.sizeMultiplier,JI,r),s=r.sizeMultiplier,a=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l=0,u=0,f=0,h;return i.type==="small"?(f=1e3+1e3*a+b2,t<1?s=1:t<1.4&&(s=.7),l=(1+a+w2)/s,u=(1+a)/s,o=E2("sqrtMain",l,f,a,n),o.style.minWidth="0.853em",h=.833/s):i.type==="large"?(f=(1e3+b2)*i0[i.size],u=(i0[i.size]+a)/s,l=(i0[i.size]+a+w2)/s,o=E2("sqrtSize"+i.size,l,f,a,n),o.style.minWidth="1.02em",h=1/s):(l=t+a+w2,u=t+a,f=Math.floor(1e3*t+a)+b2,o=E2("sqrtTall",l,f,a,n),o.style.minWidth="0.742em",h=1.056),o.height=u,o.style.height=ct(l),{span:o,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+a)*s}},GI=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Dce=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],YI=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],i0=[0,1.2,1.8,2.4,3],Sce=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),$t.contains(GI,t)||$t.contains(YI,t))return WI(t,n,!1,r,i,s);if($t.contains(Dce,t))return KI(t,i0[n],!1,r,i,s);throw new Ft("Illegal delimiter: '"+t+"'")},_ce=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ace=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"stack"}],JI=[{type:"small",style:Ht.SCRIPTSCRIPT},{type:"small",style:Ht.SCRIPT},{type:"small",style:Ht.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Tce=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},XI=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),a=s;an)return r[a]}return r[r.length-1]},QI=function(t,n,r,i,s,a){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;$t.contains(YI,t)?o=_ce:$t.contains(GI,t)?o=JI:o=Ace;var l=XI(t,n,o,i);return l.type==="small"?bce(t,l.style,r,i,s,a):l.type==="large"?WI(t,l.size,r,i,s,a):KI(t,n,r,i,s,a)},Nce=function(t,n,r,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,f=Math.max(n-o,r+o),h=Math.max(f/500*l,2*f-u);return QI(t,h,!0,i,s,a)},co={sqrtImage:kce,sizedDelim:Sce,sizeToMaxHeight:i0,customSizedDelim:QI,leftRightDelim:Nce},p9={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Oce=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Mm(e,t){var n=Fm(e);if(n&&$t.contains(Oce,n.text))return n;throw n?new Ft("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ft("Invalid delimiter type '"+e.type+"'",e)}mt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Mm(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:p9[e.funcName].size,mclass:p9[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ae.makeSpan([e.mclass]):co.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(_s(e.delim,e.mode));var n=new tt.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=ct(co.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function m9(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}mt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Mm(t[0],e).text,color:n}}});mt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Mm(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=ln(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{m9(e);for(var n=li(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,a=0;a{m9(e);var n=ls(e.body,t);if(e.left!=="."){var r=new tt.MathNode("mo",[_s(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new tt.MathNode("mo",[_s(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return s3(n)}});mt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Mm(t[0],e);if(!e.parser.leftrightDepth)throw new Ft("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=A0(t,[]);else{n=co.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?_s("|","text"):_s(e.delim,e.mode),r=new tt.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var c3=(e,t)=>{var n=Ae.wrapFragment(_n(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,a=0,o=$t.isCharacterBox(e.body);if(r==="sout")s=Ae.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,a=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=gr({number:.6,unit:"pt"},t),u=gr({number:.35,unit:"ex"},t),f=t.havingBaseSizing();i=i/f.sizeMultiplier;var h=n.height+n.depth+l+u;n.style.paddingLeft=ct(h/2+l);var m=Math.floor(1e3*h*i),g=Aue(m),b=new ll([new cu("phase",g)],{width:"400em",height:ct(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});s=Ae.makeSvgSpan(["hide-tail"],[b],t),s.style.height=ct(h),a=n.depth+l+u}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var x=0,E=0,C=0;/box/.test(r)?(C=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(r==="colorbox"?0:C),E=x):r==="angl"?(C=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*C,E=Math.max(0,.25-n.depth)):(x=o?.2:0,E=x),s=mo.encloseSpan(n,r,x,E,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=ct(C)):r==="angl"&&C!==.049&&(s.style.borderTopWidth=ct(C),s.style.borderRightWidth=ct(C)),a=n.depth+E,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?["svg-align"]:[];y=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:_}]})}return/cancel/.test(r)&&(y.height=n.height,y.depth=n.depth),/cancel/.test(r)&&!o?Ae.makeSpan(["mord","cancel-lap"],[y],t):Ae.makeSpan(["mord"],[y],t)},f3=(e,t)=>{var n=0,r=new tt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Kn(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};mt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=ln(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:c3,mathmlBuilder:f3});mt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=ln(t[0],"color-token").color,a=ln(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:c3,mathmlBuilder:f3});mt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});mt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:c3,mathmlBuilder:f3});mt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var ZI={};function Pa(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new Ft("{"+e.envName+"} can be used only in display mode.")};function d3(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function fl(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:f,maxNumCols:h,leqno:m}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new Ft("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],x=[b],E=[],C=[],y=l!=null?[]:void 0;function _(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function O(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new iue("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(_(),C.push(g9(e));;){var S=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),S={type:"ordgroup",mode:e.mode,body:S},n&&(S={type:"styling",mode:e.mode,style:n,body:[S]}),b.push(S);var w=e.fetch().text;if(w==="&"){if(h&&b.length===h){if(u||o)throw new Ft("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(w==="\\end"){O(),b.length===1&&S.type==="styling"&&S.body[0].body.length===0&&(x.length>1||!f)&&x.pop(),C.length0&&(_+=.25),u.push({pos:_,isDashed:ut[Qe]})}for(O(a[0]),r=0;r0&&(F+=y,Aut))for(r=0;r=o)){var Me=void 0;(i>0||t.hskipBeforeAndAfter)&&(Me=$t.deflt(ne.pregap,m),Me!==0&&(Z=Ae.makeSpan(["arraycolsep"],[]),Z.style.width=ct(Me),Y.push(Z)));var pe=[];for(r=0;r0){for(var le=Ae.makeLineSpan("hline",n,f),Se=Ae.makeLineSpan("hdashline",n,f),Ne=[{type:"elem",elem:l,shift:0}];u.length>0;){var Be=u.pop(),He=Be.pos-z;Be.isDashed?Ne.push({type:"elem",elem:Se,shift:He}):Ne.push({type:"elem",elem:le,shift:He})}l=Ae.makeVList({positionType:"individualShift",children:Ne})}if(me.length===0)return Ae.makeSpan(["mord"],[l],n);var Ge=Ae.makeVList({positionType:"individualShift",children:me});return Ge=Ae.makeSpan(["tag"],[Ge],n),Ae.makeFragment([l,Ge])},Pce={c:"center ",l:"left ",r:"right "},Fa=function(t,n){for(var r=[],i=new tt.MathNode("mtd",[],["mtr-glue"]),s=new tt.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var b=t.cols,x="",E=!1,C=0,y=b.length;b[0].type==="separator"&&(m+="top ",C=1),b[b.length-1].type==="separator"&&(m+="bottom ",y-=1);for(var _=C;_0?"left ":"",m+=T[T.length-1].length>0?"right ":"";for(var P=1;P-1?"alignat":"align",s=t.envName==="split",a=fl(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:d3(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,u={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var f="",h=0;h0&&g&&(E=1),r[b]={type:"align",align:x,pregap:E,postgap:0}}return a.colSeparationType=g?"align":"alignat",a};Pa({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Fm(t[0]),r=n?[t[0]]:ln(t[0],"ordgroup").body,i=r.map(function(a){var o=o3(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ft("Unknown column alignment: "+l,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return fl(e.parser,s,h3(e.envName))},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new Ft("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=fl(e.parser,r,h3(e.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=fl(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Fm(t[0]),r=n?[t[0]]:ln(t[0],"ordgroup").body,i=r.map(function(a){var o=o3(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ft("Unknown column alignment: "+l,a)});if(i.length>1)throw new Ft("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=fl(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new Ft("{subarray} can contain only one column");return s},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=fl(e.parser,t,h3(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:eM,htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){$t.contains(["gather","gather*"],e.envName)&&Lm(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:d3(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return fl(e.parser,t,"display")},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:eM,htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Lm(e);var t={autoTag:d3(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return fl(e.parser,t,"display")},htmlBuilder:Ra,mathmlBuilder:Fa});Pa({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Lm(e),yce(e.parser)},htmlBuilder:Ra,mathmlBuilder:Fa});Q("\\nonumber","\\gdef\\@eqnsw{0}");Q("\\notag","\\nonumber");mt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ft(e.funcName+" valid only within array environment")}});var v9=ZI;mt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new Ft("Invalid environment name",i);for(var s="",a=0;a{var n=e.font,r=t.withFont(n);return _n(e.body,r)},nM=(e,t)=>{var n=e.font,r=t.withFont(n);return Kn(e.body,r)},y9={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};mt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=$p(t[0]),s=r;return s in y9&&(s=y9[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:tM,mathmlBuilder:nM});mt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=$t.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Im(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});mt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,a=n.parseExpression(!0,i),o="math"+r.slice(1);return{type:"font",mode:s,font:o,body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:tM,mathmlBuilder:nM});var rM=(e,t)=>{var n=t;return e==="display"?n=n.id>=Ht.SCRIPT.id?n.text():Ht.DISPLAY:e==="text"&&n.size===Ht.DISPLAY.size?n=Ht.TEXT:e==="script"?n=Ht.SCRIPT:e==="scriptscript"&&(n=Ht.SCRIPTSCRIPT),n},p3=(e,t)=>{var n=rM(e.size,t.style),r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var a=_n(e.numer,s,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height0?b=3*m:b=7*m,x=t.fontMetrics().denom1):(h>0?(g=t.fontMetrics().num2,b=m):(g=t.fontMetrics().num3,b=3*m),x=t.fontMetrics().denom2);var E;if(f){var y=t.fontMetrics().axisHeight;g-a.depth-(y+.5*h){var n=new tt.MathNode("mfrac",[Kn(e.numer,t),Kn(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=gr(e.barSize,t);n.setAttribute("linethickness",ct(r))}var i=rM(e.size,t.style);if(i.size!==t.style.size){n=new tt.MathNode("mstyle",[n]);var s=i.size===Ht.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",s),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var a=[];if(e.leftDelim!=null){var o=new tt.MathNode("mo",[new tt.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(n),e.rightDelim!=null){var l=new tt.MathNode("mo",[new tt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return s3(a)}return n};mt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1],a,o=null,l=null,u="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:l,size:u,barSize:null}},htmlBuilder:p3,mathmlBuilder:m3});mt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});mt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var x9=["display","text","script","scriptscript"],b9=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};mt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=$p(t[0]),a=s.type==="atom"&&s.family==="open"?b9(s.text):null,o=$p(t[1]),l=o.type==="atom"&&o.family==="close"?b9(o.text):null,u=ln(t[2],"size"),f,h=null;u.isBlank?f=!0:(h=u.value,f=h.number>0);var m="auto",g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=ln(g.body[0],"textord");m=x9[Number(b.text)]}}else g=ln(g,"textord"),m=x9[Number(g.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:f,barSize:h,leftDelim:a,rightDelim:l,size:m}},htmlBuilder:p3,mathmlBuilder:m3});mt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:ln(t[0],"size").value,token:i}}});mt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=hue(ln(t[1],"infix").size),a=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:p3,mathmlBuilder:m3});var iM=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?_n(e.sup,t.havingStyle(n.sup()),t):_n(e.sub,t.havingStyle(n.sub()),t),i=ln(e.base,"horizBrace")):i=ln(e,"horizBrace");var s=_n(i.base,t.havingBaseStyle(Ht.DISPLAY)),a=mo.svgSpan(i,t),o;if(i.isOver?(o=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]}),o.children[0].children[0].children[1].classes.push("svg-align")):(o=Ae.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]}),o.children[0].children[0].children[0].classes.push("svg-align")),r){var l=Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t);i.isOver?o=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Ae.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Ae.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t)},Rce=(e,t)=>{var n=mo.mathMLnode(e.label);return new tt.MathNode(e.isOver?"mover":"munder",[Kn(e.base,t),n])};mt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:iM,mathmlBuilder:Rce});mt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=ln(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:_r(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=li(e.body,t,!1);return Ae.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=ul(e.body,t);return n instanceof bs||(n=new bs("mrow",[n])),n.setAttribute("href",e.href),n}});mt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=ln(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:n,funcName:r,token:i}=e,s=ln(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var u=s.split(","),f=0;f{var n=li(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Ae.makeSpan(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>ul(e.body,t)});mt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:_r(t[0]),mathml:_r(t[1])}},htmlBuilder:(e,t)=>{var n=li(e.html,t,!1);return Ae.makeFragment(n)},mathmlBuilder:(e,t)=>ul(e.mathml,t)});var C2=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ft("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!Rue(r))throw new Ft("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};mt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(n[0])for(var l=ln(n[0],"raw").string,u=l.split(","),f=0;f{var n=gr(e.height,t),r=0;e.totalheight.number>0&&(r=gr(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=gr(e.width,t));var s={height:ct(n+r)};i>0&&(s.width=ct(i)),r>0&&(s.verticalAlign=ct(-r));var a=new Iue(e.src,e.alt,s);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new tt.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=gr(e.height,t),i=0;if(e.totalheight.number>0&&(i=gr(e.totalheight,t)-r,n.setAttribute("valign",ct(-i))),n.setAttribute("height",ct(r+i)),e.width.number>0){var s=gr(e.width,t);n.setAttribute("width",ct(s))}return n.setAttribute("src",e.src),n}});mt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=ln(t[0],"size");if(n.settings.strict){var s=r[1]==="m",a=i.value.unit==="mu";s?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Ae.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=gr(e.dimension,t);return new tt.SpaceNode(n)}});mt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Ae.makeSpan([],[_n(e.body,t)]),n=Ae.makeSpan(["inner"],[n],t)):n=Ae.makeSpan(["inner"],[_n(e.body,t)]);var r=Ae.makeSpan(["fix"],[]),i=Ae.makeSpan([e.alignment],[n,r],t),s=Ae.makeSpan(["strut"]);return s.style.height=ct(i.height+i.depth),i.depth&&(s.style.verticalAlign=ct(-i.depth)),i.children.unshift(s),i=Ae.makeSpan(["thinbox"],[i],t),Ae.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new tt.MathNode("mpadded",[Kn(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});mt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",a=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}});mt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ft("Mismatched "+e.funcName)}});var w9=(e,t)=>{switch(t.style.size){case Ht.DISPLAY.size:return e.display;case Ht.TEXT.size:return e.text;case Ht.SCRIPT.size:return e.script;case Ht.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};mt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:_r(t[0]),text:_r(t[1]),script:_r(t[2]),scriptscript:_r(t[3])}},htmlBuilder:(e,t)=>{var n=w9(e,t),r=li(n,t,!1);return Ae.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=w9(e,t);return ul(n,t)}});var sM=(e,t,n,r,i,s,a)=>{e=Ae.makeSpan([],[e]);var o=n&&$t.isCharacterBox(n),l,u;if(t){var f=_n(t,r.havingStyle(i.sup()),r);u={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-f.depth)}}if(n){var h=_n(n,r.havingStyle(i.sub()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var m;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;m=Ae.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ct(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-a;m=Ae.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ct(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var x=e.depth+a;m=Ae.makeVList({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ct(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var E=[m];if(l&&s!==0&&!o){var C=Ae.makeSpan(["mspace"],[],r);C.style.marginRight=ct(s),E.unshift(C)}return Ae.makeSpan(["mop","op-limits"],E,r)},aM=["\\smallint"],Jc=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=ln(e.base,"op"),i=!0):s=ln(e,"op");var a=t.style,o=!1;a.size===Ht.DISPLAY.size&&s.symbol&&!$t.contains(aM,s.name)&&(o=!0);var l;if(s.symbol){var u=o?"Size2-Regular":"Size1-Regular",f="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(f=s.name.slice(1),s.name=f==="oiint"?"\\iint":"\\iiint"),l=Ae.makeSymbol(s.name,u,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),f.length>0){var h=l.italic,m=Ae.staticSvg(f+"Size"+(o?"2":"1"),t);l=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:m,shift:o?.08:0}]}),s.name="\\"+f,l.classes.unshift("mop"),l.italic=h}}else if(s.body){var g=li(s.body,t,!0);g.length===1&&g[0]instanceof Na?(l=g[0],l.classes[0]="mop"):l=Ae.makeSpan(["mop"],g,t)}else{for(var b=[],x=1;x{var n;if(e.symbol)n=new bs("mo",[_s(e.name,e.mode)]),$t.contains(aM,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new bs("mo",ls(e.body,t));else{n=new bs("mi",[new Ca(e.name.slice(1))]);var r=new bs("mo",[_s("⁡","text")]);e.parentIsSupSub?n=new bs("mrow",[n,r]):n=MI([n,r])}return n},Fce={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};mt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=Fce[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Jc,mathmlBuilder:nd});mt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:_r(r)}},htmlBuilder:Jc,mathmlBuilder:nd});var Ice={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};mt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Jc,mathmlBuilder:nd});mt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Jc,mathmlBuilder:nd});mt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=Ice[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Jc,mathmlBuilder:nd});var oM=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=ln(e.base,"operatorname"),i=!0):s=ln(e,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(h=>{var m=h.text;return typeof m=="string"?{type:"textord",mode:h.mode,text:m}:h}),l=li(o,t.withFont("mathrm"),!0),u=0;u{for(var n=ls(e.body,t.withFont("mathrm")),r=!0,i=0;if.toText()).join("");n=[new tt.TextNode(o)]}var l=new tt.MathNode("mi",n);l.setAttribute("mathvariant","normal");var u=new tt.MathNode("mo",[_s("⁡","text")]);return e.parentIsSupSub?new tt.MathNode("mrow",[l,u]):tt.newDocumentFragment([l,u])};mt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:_r(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:oM,mathmlBuilder:Mce});Q("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");vu({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ae.makeFragment(li(e.body,t,!1)):Ae.makeSpan(["mord"],li(e.body,t,!0),t)},mathmlBuilder(e,t){return ul(e.body,t,!0)}});mt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=_n(e.body,t.havingCrampedStyle()),r=Ae.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]});return Ae.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new tt.MathNode("mo",[new tt.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new tt.MathNode("mover",[Kn(e.body,t),n]);return r.setAttribute("accent","true"),r}});mt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:_r(r)}},htmlBuilder:(e,t)=>{var n=li(e.body,t.withPhantom(),!1);return Ae.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=ls(e.body,t);return new tt.MathNode("mphantom",n)}});mt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ae.makeSpan([],[_n(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=ls(_r(e.body),t),r=new tt.MathNode("mphantom",n),i=new tt.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});mt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ae.makeSpan(["inner"],[_n(e.body,t.withPhantom())]),r=Ae.makeSpan(["fix"],[]);return Ae.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=ls(_r(e.body),t),r=new tt.MathNode("mphantom",n),i=new tt.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});mt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=ln(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=_n(e.body,t),r=gr(e.dy,t);return Ae.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new tt.MathNode("mpadded",[Kn(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});mt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});mt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=ln(t[0],"size"),a=ln(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&ln(i,"size").value,width:s.value,height:a.value}},htmlBuilder(e,t){var n=Ae.makeSpan(["mord","rule"],[],t),r=gr(e.width,t),i=gr(e.height,t),s=e.shift?gr(e.shift,t):0;return n.style.borderRightWidth=ct(r),n.style.borderTopWidth=ct(i),n.style.bottom=ct(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=gr(e.width,t),r=gr(e.height,t),i=e.shift?gr(e.shift,t):0,s=t.color&&t.getColor()||"black",a=new tt.MathNode("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",ct(n)),a.setAttribute("height",ct(r));var o=new tt.MathNode("mpadded",[a]);return i>=0?o.setAttribute("height",ct(i)):(o.setAttribute("height",ct(i)),o.setAttribute("depth",ct(-i))),o.setAttribute("voffset",ct(i)),o}});function lM(e,t,n){for(var r=li(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s{var n=t.havingSize(e.size);return lM(e.body,n,t)};mt({type:"sizing",names:E9,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:E9.indexOf(r)+1,body:s}},htmlBuilder:Lce,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=ls(e.body,n),i=new tt.MathNode("mstyle",r);return i.setAttribute("mathsize",ct(n.sizeMultiplier)),i}});mt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,a=n[0]&&ln(n[0],"ordgroup");if(a)for(var o="",l=0;l{var n=Ae.makeSpan([],[_n(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new tt.MathNode("mpadded",[Kn(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});mt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=_n(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ae.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.idn.height+n.depth+a&&(a=(a+h-n.height-n.depth)/2);var m=l.height-n.height-a-u;n.style.paddingLeft=ct(f);var g=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var b=t.havingStyle(Ht.SCRIPTSCRIPT),x=_n(e.index,b,t),E=.6*(g.height-g.depth),C=Ae.makeVList({positionType:"shift",positionData:-E,children:[{type:"elem",elem:x}]}),y=Ae.makeSpan(["root"],[C]);return Ae.makeSpan(["mord","sqrt"],[y,g],t)}else return Ae.makeSpan(["mord","sqrt"],[g],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new tt.MathNode("mroot",[Kn(n,t),Kn(r,t)]):new tt.MathNode("msqrt",[Kn(n,t)])}});var C9={display:Ht.DISPLAY,text:Ht.TEXT,script:Ht.SCRIPT,scriptscript:Ht.SCRIPTSCRIPT};mt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(e,t){var n=C9[e.style],r=t.havingStyle(n).withFont("");return lM(e.body,r,t)},mathmlBuilder(e,t){var n=C9[e.style],r=t.havingStyle(n),i=ls(e.body,r),s=new tt.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var zce=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===Ht.DISPLAY.size||r.alwaysHandleSupSub);return i?Jc:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===Ht.DISPLAY.size||r.limits);return s?oM:null}else{if(r.type==="accent")return $t.isCharacterBox(r.base)?l3:null;if(r.type==="horizBrace"){var a=!t.sub;return a===r.isOver?iM:null}else return null}else return null};vu({type:"supsub",htmlBuilder(e,t){var n=zce(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,a=_n(r,t),o,l,u=t.fontMetrics(),f=0,h=0,m=r&&$t.isCharacterBox(r);if(i){var g=t.havingStyle(t.style.sup());o=_n(i,g,t),m||(f=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(s){var b=t.havingStyle(t.style.sub());l=_n(s,b,t),m||(h=a.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier)}var x;t.style===Ht.DISPLAY?x=u.sup1:t.style.cramped?x=u.sup3:x=u.sup2;var E=t.sizeMultiplier,C=ct(.5/u.ptPerEm/E),y=null;if(l){var _=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(a instanceof Na||_)&&(y=ct(-a.italic))}var O;if(o&&l){f=Math.max(f,x,o.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var S=u.defaultRuleThickness,w=4*S;if(f-o.depth-(l.height-h)0&&(f+=A,h-=A)}var T=[{type:"elem",elem:l,shift:h,marginRight:C,marginLeft:y},{type:"elem",elem:o,shift:-f,marginRight:C}];O=Ae.makeVList({positionType:"individualShift",children:T})}else if(l){h=Math.max(h,u.sub1,l.height-.8*u.xHeight);var P=[{type:"elem",elem:l,marginLeft:y,marginRight:C}];O=Ae.makeVList({positionType:"shift",positionData:h,children:P})}else if(o)f=Math.max(f,x,o.depth+.25*u.xHeight),O=Ae.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:o,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var M=a4(a,"right")||"mord";return Ae.makeSpan([M],[a,Ae.makeSpan(["msupsub"],[O])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[Kn(e.base,t)];e.sub&&s.push(Kn(e.sub,t)),e.sup&&s.push(Kn(e.sup,t));var a;if(n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Ht.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Ht.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Ht.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Ht.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Ht.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Ht.DISPLAY)?a="mover":a="msup"}return new tt.MathNode(a,s)}});vu({type:"atom",htmlBuilder(e,t){return Ae.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new tt.MathNode("mo",[_s(e.text,e.mode)]);if(e.family==="bin"){var r=a3(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var uM={mi:"italic",mn:"normal",mtext:"normal"};vu({type:"mathord",htmlBuilder(e,t){return Ae.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new tt.MathNode("mi",[_s(e.text,e.mode,t)]),r=a3(e,t)||"italic";return r!==uM[n.type]&&n.setAttribute("mathvariant",r),n}});vu({type:"textord",htmlBuilder(e,t){return Ae.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=_s(e.text,e.mode,t),r=a3(e,t)||"normal",i;return e.mode==="text"?i=new tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new tt.MathNode("mn",[n]):e.text==="\\prime"?i=new tt.MathNode("mo",[n]):i=new tt.MathNode("mi",[n]),r!==uM[i.type]&&i.setAttribute("mathvariant",r),i}});var k2={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},D2={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};vu({type:"spacing",htmlBuilder(e,t){if(D2.hasOwnProperty(e.text)){var n=D2[e.text].className||"";if(e.mode==="text"){var r=Ae.makeOrd(e,t,"textord");return r.classes.push(n),r}else return Ae.makeSpan(["mspace",n],[Ae.mathsym(e.text,e.mode,t)],t)}else{if(k2.hasOwnProperty(e.text))return Ae.makeSpan(["mspace",k2[e.text]],[],t);throw new Ft('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(D2.hasOwnProperty(e.text))n=new tt.MathNode("mtext",[new tt.TextNode(" ")]);else{if(k2.hasOwnProperty(e.text))return new tt.MathNode("mspace");throw new Ft('Unknown type of space "'+e.text+'"')}return n}});var k9=()=>{var e=new tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};vu({type:"tag",mathmlBuilder(e,t){var n=new tt.MathNode("mtable",[new tt.MathNode("mtr",[k9(),new tt.MathNode("mtd",[ul(e.body,t)]),k9(),new tt.MathNode("mtd",[ul(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var D9={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},S9={"\\textbf":"textbf","\\textmd":"textmd"},jce={"\\textit":"textit","\\textup":"textup"},_9=(e,t)=>{var n=e.font;if(n){if(D9[n])return t.withTextFontFamily(D9[n]);if(S9[n])return t.withTextFontWeight(S9[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(jce[n])};mt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:_r(i),font:r}},htmlBuilder(e,t){var n=_9(e,t),r=li(e.body,n,!0);return Ae.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=_9(e,t);return ul(e.body,n)}});mt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_n(e.body,t),r=Ae.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Ae.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]});return Ae.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new tt.MathNode("mo",[new tt.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new tt.MathNode("munder",[Kn(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});mt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=_n(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Ae.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){return new tt.MathNode("mpadded",[Kn(e.body,t)],["vcenter"])}});mt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=A9(e),r=[],i=t.havingStyle(t.style.text()),s=0;se.body.replace(/ /g,e.star?"␣":" "),qce=FI;Q("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});Q("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});Q("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});Q("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});Q("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});Q("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Q("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var T9={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Q("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ft("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=T9[t.text],r==null||r>=n)throw new Ft("Invalid base-"+n+" digit "+t.text);for(var i;(i=T9[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Ft("\\newcommand's first argument must be a macro name");var s=i[0].text,a=e.isDefined(s);if(a&&!t)throw new Ft("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!n)throw new Ft("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ft("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return a&&r||e.macros.set(s,{tokens:i,numArgs:o}),""};Q("\\newcommand",e=>g3(e,!1,!0,!1));Q("\\renewcommand",e=>g3(e,!0,!1,!1));Q("\\providecommand",e=>g3(e,!0,!0,!0));Q("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});Q("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});Q("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),qce[n],Ar.math[n],Ar.text[n]),""});Q("\\bgroup","{");Q("\\egroup","}");Q("~","\\nobreakspace");Q("\\lq","`");Q("\\rq","'");Q("\\aa","\\r a");Q("\\AA","\\r A");Q("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");Q("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Q("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");Q("ℬ","\\mathscr{B}");Q("ℰ","\\mathscr{E}");Q("ℱ","\\mathscr{F}");Q("ℋ","\\mathscr{H}");Q("ℐ","\\mathscr{I}");Q("ℒ","\\mathscr{L}");Q("ℳ","\\mathscr{M}");Q("ℛ","\\mathscr{R}");Q("ℭ","\\mathfrak{C}");Q("ℌ","\\mathfrak{H}");Q("ℨ","\\mathfrak{Z}");Q("\\Bbbk","\\Bbb{k}");Q("·","\\cdotp");Q("\\llap","\\mathllap{\\textrm{#1}}");Q("\\rlap","\\mathrlap{\\textrm{#1}}");Q("\\clap","\\mathclap{\\textrm{#1}}");Q("\\mathstrut","\\vphantom{(}");Q("\\underbar","\\underline{\\text{#1}}");Q("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');Q("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");Q("\\ne","\\neq");Q("≠","\\neq");Q("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");Q("∉","\\notin");Q("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");Q("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");Q("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");Q("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");Q("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");Q("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");Q("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");Q("⟂","\\perp");Q("‼","\\mathclose{!\\mkern-0.8mu!}");Q("∌","\\notni");Q("⌜","\\ulcorner");Q("⌝","\\urcorner");Q("⌞","\\llcorner");Q("⌟","\\lrcorner");Q("©","\\copyright");Q("®","\\textregistered");Q("️","\\textregistered");Q("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Q("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Q("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Q("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Q("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Q("⋮","\\vdots");Q("\\varGamma","\\mathit{\\Gamma}");Q("\\varDelta","\\mathit{\\Delta}");Q("\\varTheta","\\mathit{\\Theta}");Q("\\varLambda","\\mathit{\\Lambda}");Q("\\varXi","\\mathit{\\Xi}");Q("\\varPi","\\mathit{\\Pi}");Q("\\varSigma","\\mathit{\\Sigma}");Q("\\varUpsilon","\\mathit{\\Upsilon}");Q("\\varPhi","\\mathit{\\Phi}");Q("\\varPsi","\\mathit{\\Psi}");Q("\\varOmega","\\mathit{\\Omega}");Q("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Q("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Q("\\boxed","\\fbox{$\\displaystyle{#1}$}");Q("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Q("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Q("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Q("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Q("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var N9={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Q("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in N9?t=N9[n]:(n.slice(0,4)==="\\not"||n in Ar.math&&$t.contains(["bin","rel"],Ar.math[n].group))&&(t="\\dotsb"),t});var v3={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Q("\\dotso",function(e){var t=e.future().text;return t in v3?"\\ldots\\,":"\\ldots"});Q("\\dotsc",function(e){var t=e.future().text;return t in v3&&t!==","?"\\ldots\\,":"\\ldots"});Q("\\cdots",function(e){var t=e.future().text;return t in v3?"\\@cdots\\,":"\\@cdots"});Q("\\dotsb","\\cdots");Q("\\dotsm","\\cdots");Q("\\dotsi","\\!\\cdots");Q("\\dotsx","\\ldots\\,");Q("\\DOTSI","\\relax");Q("\\DOTSB","\\relax");Q("\\DOTSX","\\relax");Q("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Q("\\,","\\tmspace+{3mu}{.1667em}");Q("\\thinspace","\\,");Q("\\>","\\mskip{4mu}");Q("\\:","\\tmspace+{4mu}{.2222em}");Q("\\medspace","\\:");Q("\\;","\\tmspace+{5mu}{.2777em}");Q("\\thickspace","\\;");Q("\\!","\\tmspace-{3mu}{.1667em}");Q("\\negthinspace","\\!");Q("\\negmedspace","\\tmspace-{4mu}{.2222em}");Q("\\negthickspace","\\tmspace-{5mu}{.277em}");Q("\\enspace","\\kern.5em ");Q("\\enskip","\\hskip.5em\\relax");Q("\\quad","\\hskip1em\\relax");Q("\\qquad","\\hskip2em\\relax");Q("\\tag","\\@ifstar\\tag@literal\\tag@paren");Q("\\tag@paren","\\tag@literal{({#1})}");Q("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Q("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Q("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Q("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Q("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Q("\\newline","\\\\\\relax");Q("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var cM=ct(no["Main-Regular"][84][1]-.7*no["Main-Regular"][65][1]);Q("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+cM+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Q("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+cM+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Q("\\hspace","\\@ifstar\\@hspacer\\@hspace");Q("\\@hspace","\\hskip #1\\relax");Q("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Q("\\ordinarycolon",":");Q("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Q("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Q("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Q("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Q("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Q("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Q("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Q("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Q("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Q("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Q("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Q("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Q("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Q("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Q("∷","\\dblcolon");Q("∹","\\eqcolon");Q("≔","\\coloneqq");Q("≕","\\eqqcolon");Q("⩴","\\Coloneqq");Q("\\ratio","\\vcentcolon");Q("\\coloncolon","\\dblcolon");Q("\\colonequals","\\coloneqq");Q("\\coloncolonequals","\\Coloneqq");Q("\\equalscolon","\\eqqcolon");Q("\\equalscoloncolon","\\Eqqcolon");Q("\\colonminus","\\coloneq");Q("\\coloncolonminus","\\Coloneq");Q("\\minuscolon","\\eqcolon");Q("\\minuscoloncolon","\\Eqcolon");Q("\\coloncolonapprox","\\Colonapprox");Q("\\coloncolonsim","\\Colonsim");Q("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Q("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Q("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Q("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Q("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");Q("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Q("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Q("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Q("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Q("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Q("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Q("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Q("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Q("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");Q("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");Q("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");Q("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");Q("\\nleqq","\\html@mathml{\\@nleqq}{≰}");Q("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");Q("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");Q("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");Q("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");Q("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");Q("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");Q("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");Q("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");Q("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");Q("\\imath","\\html@mathml{\\@imath}{ı}");Q("\\jmath","\\html@mathml{\\@jmath}{ȷ}");Q("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");Q("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");Q("⟦","\\llbracket");Q("⟧","\\rrbracket");Q("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");Q("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");Q("⦃","\\lBrace");Q("⦄","\\rBrace");Q("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");Q("⦵","\\minuso");Q("\\darr","\\downarrow");Q("\\dArr","\\Downarrow");Q("\\Darr","\\Downarrow");Q("\\lang","\\langle");Q("\\rang","\\rangle");Q("\\uarr","\\uparrow");Q("\\uArr","\\Uparrow");Q("\\Uarr","\\Uparrow");Q("\\N","\\mathbb{N}");Q("\\R","\\mathbb{R}");Q("\\Z","\\mathbb{Z}");Q("\\alef","\\aleph");Q("\\alefsym","\\aleph");Q("\\Alpha","\\mathrm{A}");Q("\\Beta","\\mathrm{B}");Q("\\bull","\\bullet");Q("\\Chi","\\mathrm{X}");Q("\\clubs","\\clubsuit");Q("\\cnums","\\mathbb{C}");Q("\\Complex","\\mathbb{C}");Q("\\Dagger","\\ddagger");Q("\\diamonds","\\diamondsuit");Q("\\empty","\\emptyset");Q("\\Epsilon","\\mathrm{E}");Q("\\Eta","\\mathrm{H}");Q("\\exist","\\exists");Q("\\harr","\\leftrightarrow");Q("\\hArr","\\Leftrightarrow");Q("\\Harr","\\Leftrightarrow");Q("\\hearts","\\heartsuit");Q("\\image","\\Im");Q("\\infin","\\infty");Q("\\Iota","\\mathrm{I}");Q("\\isin","\\in");Q("\\Kappa","\\mathrm{K}");Q("\\larr","\\leftarrow");Q("\\lArr","\\Leftarrow");Q("\\Larr","\\Leftarrow");Q("\\lrarr","\\leftrightarrow");Q("\\lrArr","\\Leftrightarrow");Q("\\Lrarr","\\Leftrightarrow");Q("\\Mu","\\mathrm{M}");Q("\\natnums","\\mathbb{N}");Q("\\Nu","\\mathrm{N}");Q("\\Omicron","\\mathrm{O}");Q("\\plusmn","\\pm");Q("\\rarr","\\rightarrow");Q("\\rArr","\\Rightarrow");Q("\\Rarr","\\Rightarrow");Q("\\real","\\Re");Q("\\reals","\\mathbb{R}");Q("\\Reals","\\mathbb{R}");Q("\\Rho","\\mathrm{P}");Q("\\sdot","\\cdot");Q("\\sect","\\S");Q("\\spades","\\spadesuit");Q("\\sub","\\subset");Q("\\sube","\\subseteq");Q("\\supe","\\supseteq");Q("\\Tau","\\mathrm{T}");Q("\\thetasym","\\vartheta");Q("\\weierp","\\wp");Q("\\Zeta","\\mathrm{Z}");Q("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Q("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Q("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Q("\\bra","\\mathinner{\\langle{#1}|}");Q("\\ket","\\mathinner{|{#1}\\rangle}");Q("\\braket","\\mathinner{\\langle{#1}\\rangle}");Q("\\Bra","\\left\\langle#1\\right|");Q("\\Ket","\\left|#1\\right\\rangle");var fM=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=h=>m=>{e&&(m.macros.set("|",a),i.length&&m.macros.set("\\|",o));var g=h;if(!h&&i.length){var b=m.future();b.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,f=t.expandTokens([...s,...u,...n]);return t.macros.endGroup(),{tokens:f.reverse(),numArgs:0}};Q("\\bra@ket",fM(!1));Q("\\bra@set",fM(!0));Q("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Q("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Q("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Q("\\angln","{\\angl n}");Q("\\blue","\\textcolor{##6495ed}{#1}");Q("\\orange","\\textcolor{##ffa500}{#1}");Q("\\pink","\\textcolor{##ff00af}{#1}");Q("\\red","\\textcolor{##df0030}{#1}");Q("\\green","\\textcolor{##28ae7b}{#1}");Q("\\gray","\\textcolor{gray}{#1}");Q("\\purple","\\textcolor{##9d38bd}{#1}");Q("\\blueA","\\textcolor{##ccfaff}{#1}");Q("\\blueB","\\textcolor{##80f6ff}{#1}");Q("\\blueC","\\textcolor{##63d9ea}{#1}");Q("\\blueD","\\textcolor{##11accd}{#1}");Q("\\blueE","\\textcolor{##0c7f99}{#1}");Q("\\tealA","\\textcolor{##94fff5}{#1}");Q("\\tealB","\\textcolor{##26edd5}{#1}");Q("\\tealC","\\textcolor{##01d1c1}{#1}");Q("\\tealD","\\textcolor{##01a995}{#1}");Q("\\tealE","\\textcolor{##208170}{#1}");Q("\\greenA","\\textcolor{##b6ffb0}{#1}");Q("\\greenB","\\textcolor{##8af281}{#1}");Q("\\greenC","\\textcolor{##74cf70}{#1}");Q("\\greenD","\\textcolor{##1fab54}{#1}");Q("\\greenE","\\textcolor{##0d923f}{#1}");Q("\\goldA","\\textcolor{##ffd0a9}{#1}");Q("\\goldB","\\textcolor{##ffbb71}{#1}");Q("\\goldC","\\textcolor{##ff9c39}{#1}");Q("\\goldD","\\textcolor{##e07d10}{#1}");Q("\\goldE","\\textcolor{##a75a05}{#1}");Q("\\redA","\\textcolor{##fca9a9}{#1}");Q("\\redB","\\textcolor{##ff8482}{#1}");Q("\\redC","\\textcolor{##f9685d}{#1}");Q("\\redD","\\textcolor{##e84d39}{#1}");Q("\\redE","\\textcolor{##bc2612}{#1}");Q("\\maroonA","\\textcolor{##ffbde0}{#1}");Q("\\maroonB","\\textcolor{##ff92c6}{#1}");Q("\\maroonC","\\textcolor{##ed5fa6}{#1}");Q("\\maroonD","\\textcolor{##ca337c}{#1}");Q("\\maroonE","\\textcolor{##9e034e}{#1}");Q("\\purpleA","\\textcolor{##ddd7ff}{#1}");Q("\\purpleB","\\textcolor{##c6b9fc}{#1}");Q("\\purpleC","\\textcolor{##aa87ff}{#1}");Q("\\purpleD","\\textcolor{##7854ab}{#1}");Q("\\purpleE","\\textcolor{##543b78}{#1}");Q("\\mintA","\\textcolor{##f5f9e8}{#1}");Q("\\mintB","\\textcolor{##edf2df}{#1}");Q("\\mintC","\\textcolor{##e0e5cc}{#1}");Q("\\grayA","\\textcolor{##f6f7f7}{#1}");Q("\\grayB","\\textcolor{##f0f1f2}{#1}");Q("\\grayC","\\textcolor{##e3e5e6}{#1}");Q("\\grayD","\\textcolor{##d6d8da}{#1}");Q("\\grayE","\\textcolor{##babec2}{#1}");Q("\\grayF","\\textcolor{##888d93}{#1}");Q("\\grayG","\\textcolor{##626569}{#1}");Q("\\grayH","\\textcolor{##3b3e40}{#1}");Q("\\grayI","\\textcolor{##21242c}{#1}");Q("\\kaBlue","\\textcolor{##314453}{#1}");Q("\\kaGreen","\\textcolor{##71B307}{#1}");typeof document<"u"&&document.compatMode!=="CSS1Compat"&&typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.");const $ce=un(tue),Vce=un(nue),Uce=e=>{try{return e!==decodeURIComponent(e)?e:encodeURI(e)}catch(t){if(t instanceof URIError)return e;throw t}},y3=(e,t)=>{const{allowedSchemes:n,dangerouslySkipSanitization:r,defaultLinkAttributes:i}=e.getOptions({key:ee.link}),s={...i},a=r?t.url:CN(t.url,{allowedSchemes:n})||void 0;return a!==void 0&&(s.href=a),"target"in t&&t.target!==void 0&&(s.target=t.target),s},Hce=e=>{try{return decodeURI(e)}catch(t){if(t instanceof URIError)return e;throw t}},Wce=/\s/,Kce=(e,t)=>{const{allowedSchemes:n,dangerouslySkipSanitization:r,isUrl:i}=e.getOptions(dM),s=i&&i!==Oc?i:void 0;return(t.startsWith("/")||t.startsWith("#"))&&Wce.test(t)?!1:t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?s?s(t):!0:!(i&&!i(t)||!r&&!CN(t,{allowedSchemes:n,permitInvalid:!0}))},Gce=({editor:e,tf:{normalizeNode:t},type:n})=>({transforms:{normalizeNode([r,i]){if(r.type===n){const s=e.selection?.focus,a=s?e.api.node(s.path):void 0,o=!!a&&(!Pn.isText(a[0])||(s?.offset??0)<=a[0].text.length),l=e.api.end(i);if(s&&e.api.isCollapsed()&&o&&l&&fo.equals(s,l)&&!e.api.start(i,{next:!0})){const u=Ye.next(i);e.tf.insertNodes({text:""},{at:u}),e.tf.select(u)}}t([r,i])}}}),dM=Wn({key:ee.link,node:{dangerouslyAllowAttributes:["target"],isElement:!0,isInline:!0,props:({editor:e,element:t})=>y3(e,t)},options:{allowedSchemes:["http","https","mailto","tel"],dangerouslySkipSanitization:!1,defaultLinkAttributes:{},isUrl:Oc,keepSelectedTextOnPaste:!0,rangeBeforeOptions:{afterMatch:!0,matchBlockStart:!0,matchString:" ",skipInvalid:!0}},parsers:{html:{deserializer:{rules:[{validNodeName:"A"}],parse:({editor:e,element:t,type:n})=>{const r=t.getAttribute("href");if(r&&Kce(e,r))return{target:t.getAttribute("target")||"_blank",type:n,url:r}}}}},rules:{normalize:{removeEmpty:!0},selection:{affinity:"directional"}}}).overrideEditor(Gce),fu=YE(dM,{options:{isEditing:!1,mode:"",mouseDown:!1,newTab:!1,openEditorId:null,text:"",triggerFloatingLinkHotkeys:"meta+k, ctrl+k",updated:!1,url:""}}).extendEditorApi(({editor:e})=>({link:{getAttributes:Ce(y3,e)}})).extendEditorApi(({setOptions:e})=>({floatingLink:{hide:()=>{e({isEditing:!1,mode:"",mouseDown:!1,newTab:!1,openEditorId:null,text:"",updated:!1,url:""})},reset:()=>{e({isEditing:!1,mode:"",mouseDown:!1,newTab:!1,text:"",updated:!1,url:""})},show:(t,n)=>{e({isEditing:!1,mode:t,openEditorId:n})}}})).extendSelectors(({getOptions:e})=>({isOpen:t=>e().openEditorId===t})),Yce=()=>{const e=Zt.c(7),{getOptions:t}=Y0(fu),n=QE(fu,"updated"),r=ae.useRef(null);let i;e[0]!==t?(i=t(),e[0]=t,e[1]=i):i=e[1];const[s,a]=ae.useState(i.newTab);let o,l;e[2]!==n?(o=()=>{r.current&&n&&setTimeout(()=>{r.current?.focus()},0)},l=[n],e[2]=n,e[3]=o,e[4]=l):(o=e[3],l=e[4]),ae.useEffect(o,l);let u;return e[5]!==s?(u={checked:s,ref:r,setChecked:a},e[5]=s,e[6]=u):u=e[6],u},Jce=e=>{const t=Zt.c(9),{checked:n,ref:r,setChecked:i}=e,{setOption:s}=Y0(fu);let a;t[0]!==i||t[1]!==s?(a=f=>{i(f.target.checked),s("newTab",f.target.checked)},t[0]=i,t[1]=s,t[2]=a):a=t[2];const o=a;let l;t[3]!==n||t[4]!==o?(l={checked:n,type:"checkbox",onChange:o},t[3]=n,t[4]=o,t[5]=l):l=t[5];let u;return t[6]!==r||t[7]!==l?(u={props:l,ref:r},t[6]=r,t[7]=l,t[8]=u):u=t[8],u};gu("input")({propsHook:Jce,stateHook:Yce});const Xce=()=>{const e=Zt.c(5),{getOptions:t}=Y0(fu),n=QE(fu,"updated"),r=ae.useRef(null),i=ae.useRef(!1);let s,a;e[0]!==t||e[1]!==n?(s=()=>{r.current&&n&&setTimeout(()=>{const l=r.current;if(!l||i.current)return;i.current=!0;const u=t().url;l.focus(),l.value=u?Hce(u):""},0)},a=[t,n],e[0]=t,e[1]=n,e[2]=s,e[3]=a):(s=e[2],a=e[3]),ae.useEffect(s,a);let o;return e[4]===Symbol.for("react.memo_cache_sentinel")?(o={ref:r},e[4]=o):o=e[4],o},Qce=e=>{const t=Zt.c(10),{getOptions:n,setOption:r}=Y0(fu);let i;t[0]!==r?(i=u=>{r("url",Uce(u.target.value))},t[0]=r,t[1]=i):i=t[1];const s=i;let a;t[2]!==n?(a=n(),t[2]=n,t[3]=a):a=t[3];let o;t[4]!==s||t[5]!==a.url?(o={defaultValue:a.url,onChange:s},t[4]=s,t[5]=a.url,t[6]=o):o=t[6];let l;return t[7]!==e.ref||t[8]!==o?(l={props:o,ref:e.ref},t[7]=e.ref,t[8]=o,t[9]=l):l=t[9],l};gu("input")({propsHook:Qce,stateHook:Xce});const Zce=()=>{const e=vr(),t=Wie(),n=ae.useMemo(()=>e.api.node({match:{type:e.getType(ee.link)}}),[e,t]);if(!n)return{};const[r]=n;return{element:r}},efe=e=>{const t=Zt.c(6),{element:n}=e,r=vr();if(!n){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o={props:{}},t[0]=o):o=t[0],o}let i;t[1]!==r||t[2]!==n?(i=y3(r,n),t[1]=r,t[2]=n,t[3]=i):i=t[3];const s=i;let a;return t[4]!==s?(a={props:{...s,"aria-label":"Open link in a new tab",target:"_blank",onMouseOver:tfe}},t[4]=s,t[5]=a):a=t[5],a};gu("a")({propsHook:efe,stateHook:Zce});function tfe(e){e.stopPropagation()}const nfe=Jt({key:ee.audio,node:{isElement:!0,isVoid:!0}}),rfe=Jt({key:ee.file,node:{isElement:!0,isVoid:!0}}),ife=Jt({key:ee.video,node:{dangerouslyAllowAttributes:["width","height"],isElement:!0,isVoid:!0}}),hM=(e,t,n={})=>{const r={children:[{text:""}],type:e.getType(ee.img),url:t};e.tf.insertNodes(r,{nextBlock:!0,...n})},pM=(e,t,n={})=>{for(const r of t){const i=new FileReader,[s]=r.type.split("/");s==="image"&&(i.addEventListener("load",async()=>{if(!i.result)return;const a=e.getOptions(mM).uploadImage;hM(e,a?await a(i.result):i.result,n)}),i.readAsDataURL(r))}},sfe=new Set(["3dv","ai","amf","art","art","ase","awg","blp","bmp","bw","bw","cd5","cdr","cgm","cit","cmx","cpt","cr2","cur","cut","dds","dib","djvu","dxf","e2d","ecw","egt","egt","emf","eps","exif","fs","gbr","gif","gpl","grf","hdp","icns","ico","iff","iff","int","int","inta","jfif","jng","jp2","jpeg","jpg","jps","jxr","lbm","lbm","liff","max","miff","mng","msp","nitf","nrrd","odg","ota","pam","pbm","pc1","pc2","pc3","pcf","pct","pcx","pcx","pdd","pdn","pgf","pgm","PI1","PI2","PI3","pict","png","pnm","pns","ppm","psb","psd","psp","px","pxm","pxr","qfx","ras","raw","rgb","rgb","rgba","rle","sct","sgi","sgi","sid","stl","sun","svg","sxd","tga","tga","tif","tiff","v2d","vnd","vrml","vtf","wdp","webp","wmf","x3d","xar","xbm","xcf","xpm"]),afe=e=>{if(!Oc(e))return!1;const t=new URL(e).pathname.split(".").pop();return sfe.has(t)},ofe=({editor:e,getOptions:t,tf:{insertData:n}})=>({transforms:{insertData(r){if(t().disableEmbedInsert)return n(r);const i=r.getData("text/plain");if(afe(i)){hM(e,i);return}n(r)}}}),lfe=({editor:e,getOptions:t,plugin:n,tf:{insertData:r}})=>({transforms:{insertData(i){if(t().disableUploadInsert)return r(i);const s="text/plain",a=i.getData(s),{files:o}=i;if(!a&&o&&o.length>0){if(!CP(e,DE(e,n),{data:a,dataTransfer:i,mimeType:s}))return r(i);pM(e,o)}else return r(i)}}}),mM=Wn({key:ee.img,node:{dangerouslyAllowAttributes:["alt","width","height"],isElement:!0,isVoid:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"IMG"}],parse:({element:e,type:t})=>({type:t,url:e.getAttribute("src")})}}}}).overrideEditor(lfe).overrideEditor(ofe).extendEditorTransforms(({editor:e})=>({insert:{imageFromFiles:Ce(pM,e)}})),ufe=new Set(["http:","https:"]),cfe=(e,{urlParsers:t})=>{const n=(()=>{for(const r of t){const i=r(e);if(i)return i}})();if(n?.url)try{const{protocol:r}=new URL(n.url);if(!ufe.has(r))return}catch{console.warn(`Could not parse URL: ${n.url}`);return}return n},ffe=/]*\bsrc="([^"]*)"/i,dfe=/"([^"]*)"/,hfe=/https?:\/\/(?:twitter|x)\.com\/(?:#!\/)?\w+\/status(?:es)?\/\d+/,pfe=e=>{if(!e.startsWith("http")){const t=e.match(hfe)?.[0];if(t)return t;const n=ffe.exec(e)?.[0]?.match(dfe)?.[1];if(n)return n}return e},mfe=Wn({key:ee.mediaEmbed,node:{isElement:!0,isVoid:!0},options:{transformUrl:pfe},parsers:{html:{deserializer:{rules:[{validNodeName:"IFRAME"}],parse:({element:e,type:t})=>{const n=e.getAttribute("src");if(n)return{type:t,url:n}}}}}}),gfe=/^https?:\/\/(?:twitter|x)\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/,vfe=3,yfe=e=>{const t=gfe.exec(e);if(t)return{id:t[vfe],provider:"twitter",sourceKind:"url",url:e}},xfe="https://www.youtube.com/embed/",bfe="https://player.vimeo.com/video/",wfe="https://www.dailymotion.com/embed/video/",Efe="https://coub.com/embed/",Cfe="https://player.youku.com/embed/",gM=["youtube","vimeo","dailymotion","youku","coub"];[...gM];const kfe={coub:Efe,dailymotion:wfe,vimeo:bfe,youku:Cfe,youtube:xfe},Dfe=e=>{if(Oc(e))try{return new URL(e)}catch{return}},rd=e=>e.pathname.split("/").filter(Boolean),Ks=(e,t)=>{const n=e.indexOf(t);return n>=0?e[n+1]:void 0},zm=e=>e.length>0&&[...e].every(t=>{const n=t.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122}),Sfe=e=>e.length>0&&[...e].every(t=>{const n=t.charCodeAt(0);return n>=48&&n<=57}),S2=e=>e?.length===11&&[...e].every(t=>{const n=t.charCodeAt(0);return t==="-"||t==="_"||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122}),vM=e=>{if(!e)return;const t=[...e].findIndex(n=>!zm(n));return t===-1?e:e.slice(0,t)},_fe=e=>{const t=e.hostname.toLowerCase(),n=rd(e);if(t==="youtu.be"){const s=n[0];return S2(s)?s:void 0}if(t!=="youtube.com"&&!t.endsWith(".youtube.com"))return;const r=e.searchParams.get("v")??e.searchParams.get("ci");if(S2(r??void 0))return r;const i=Ks(n,"embed")??Ks(n,"v")??Ks(n,"vi")??Ks(n,"videos")??Ks(n,"shorts")??Ks(n,"live");return S2(i)?i:void 0},Afe=e=>{const t=e.hostname.toLowerCase();if(!(t!=="vimeo.com"&&!t.endsWith(".vimeo.com")&&t!=="vimeopro.com"&&!t.endsWith(".vimeopro.com")))return[...rd(e)].reverse().find(Sfe)},Tfe=e=>{const t=e.hostname.toLowerCase();if(t!=="dai.ly"&&t!=="dailymotion.com"&&!t.endsWith(".dailymotion.com"))return;const n=rd(e),r=vM(t==="dai.ly"?n[0]:Ks(n,"video"));return r&&zm(r)?r:void 0},Nfe=e=>{const t=e.hostname.toLowerCase();if(t!=="youku.com"&&!t.endsWith(".youku.com"))return;const n=rd(e),r=e.searchParams.get("VideoIDS")??void 0,i=Ks(n,"embed")??Ks(n,"sid")??n.find(a=>a.startsWith("id_"))?.slice(3).split(".")[0],s=vM(r??i);return s&&zm(s)?s:void 0},Ofe=e=>{const t=e.hostname.toLowerCase();if(t!=="coub.com"&&!t.endsWith(".coub.com"))return;const n=rd(e),r=Ks(n,"view")??Ks(n,"embed");return r&&zm(r)?r:void 0},Bfe={coub:Ofe,dailymotion:Tfe,vimeo:Afe,youku:Nfe,youtube:_fe},Pfe=e=>{const t=Dfe(e);if(t)for(const n of gM){const r=Bfe[n](t);if(!r)continue;const i=`${kfe[n]}${r}`;return{id:r,provider:n,sourceKind:"url",sourceUrl:i===e?void 0:e,url:i}}},jm=(e,t,n)=>{e.tf.withoutNormalizing(()=>e.tf.insertNodes({children:[{text:""}],mediaType:t,type:e.getType(ee.placeholder)},n))},Rfe=(e,t)=>jm(e,ee.img,t),Ffe=(e,t)=>jm(e,ee.video,t),Ife=(e,t)=>jm(e,ee.audio,t),Mfe=(e,t)=>jm(e,ee.file,t),Lfe=Wn({key:ee.placeholder,node:{isElement:!0,isVoid:!0}}).extendEditorTransforms(({editor:e})=>({insert:{audioPlaceholder:Ce(Ife,e),filePlaceholder:Ce(Mfe,e),imagePlaceholder:Ce(Rfe,e),videoPlaceholder:Ce(Ffe,e)}})),zfe=un(mM);un(mfe);un(nfe);un(rfe);un(ife);const rl=Em({boundingClientRect:{},currentPreview:null,isEditingScale:!1,openEditorId:null,previewList:[],scale:1,translate:{x:0,y:0}},{mutative:!0,name:"imagePreview"}).extendActions(({set:e})=>({close:()=>{e("currentPreview",null),e("previewList",[]),e("openEditorId",null),e("scale",1),e("translate",{x:0,y:0}),e("isEditingScale",!1)}})).extendSelectors(({get:e})=>({isOpen:t=>e("openEditorId")===t})),{useValue:ap}=rl,jfe=e=>{const t=e.api.nodes({at:[],match:n=>n.type===ee.img});return Array.from(t,n=>({id:n[0].id,url:n[0].url}))},qfe=(e,t)=>{const{id:n,url:r}=t,i=jfe(e);rl.set("openEditorId",e.id),rl.set("currentPreview",{id:n,url:r}),rl.set("previewList",i)},$fe=()=>{const e=Zt.c(7),t=ap("scale");let n;e[0]!==t?(n=()=>{if(t>=2)return;const o=[0,.5,1,1.5,2].find(l=>t{if(t<=0)return;const o=[0,.5,1,1.5,2].reverse().find(l=>t>l);o===1&&rl.set("translate",{x:0,y:0}),o!==void 0&&rl.set("scale",o)},e[2]=t,e[3]=i):i=e[3];const s=i;let a;return e[4]!==r||e[5]!==s?(a={zoomIn:r,zoomOut:s},e[4]=r,e[5]=s,e[6]=a):a=e[6],a},Vfe=()=>{const e=Zt.c(6),t=ZE(),n=vr();let r;e[0]!==n||e[1]!==t?(r=()=>{qfe(n,t)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i;return e[3]!==t.url||e[4]!==r?(i={props:{draggable:!0,src:t.url,onDoubleClickCapture:r}},e[3]=t.url,e[4]=r,e[5]=i):i=e[5],i};gu("img")({propsHook:Vfe});const Ufe=()=>{const e=Zt.c(17),t=ap("currentPreview"),n=ap("translate"),r=ap("scale"),i=ae.useRef(null),s=r<=1,{zoomIn:a,zoomOut:o}=$fe();let l;e[0]!==r?(l=()=>{if(r<=1)return;const E=i.current?.getBoundingClientRect();E&&rl.set("boundingClientRect",E)},e[0]=r,e[1]=l):l=e[1];let u;e[2]!==r||e[3]!==n.x||e[4]!==n.y?(u=[n.x,n.y,r],e[2]=r,e[3]=n.x,e[4]=n.y,e[5]=u):u=e[5],te.useEffect(l,u);const f=t?.url,h=s?"zoom-in":"zoom-out",m=`scale(${r}) translate(${`${n.x}px`}, ${`${n.y}px`})`;let g;e[6]!==h||e[7]!==m?(g={cursor:h,transform:m},e[6]=h,e[7]=m,e[8]=g):g=e[8];let b;e[9]!==s||e[10]!==a||e[11]!==o?(b=E=>{E.stopPropagation(),s?a():o()},e[9]=s,e[10]=a,e[11]=o,e[12]=b):b=e[12];let x;return e[13]!==f||e[14]!==g||e[15]!==b?(x={props:{draggable:!1,ref:i,src:f,style:g,onClick:b}},e[13]=f,e[14]=g,e[15]=b,e[16]=x):x=e[16],x};gu("img")({propsHook:Ufe});Vc({showCaption:!1},{name:"media"});const Ta=Em({isEditing:!1,url:""},{mutative:!0,name:"floatingMedia"}).extendActions(({set:e})=>({reset:()=>{e("url",""),e("isEditing",!1)}})),{useState:N2e,useValue:O2e}=Ta,Hfe=()=>{const e=Zt.c(5),t=ZE();let n;e[0]!==t.sourceUrl||e[1]!==t.url?(n=()=>{Ta.set("url",t.sourceUrl??t.url),Ta.set("isEditing",!0)},e[0]=t.sourceUrl,e[1]=t.url,e[2]=n):n=e[2];const r=n;let i;return e[3]!==r?(i={props:{onClick:r}},e[3]=r,e[4]=i):i=e[4],i};gu("button")({propsHook:Hfe});const Wfe=(e,{element:t,plugin:n})=>{let r=Ta.get("url");if(r===t.url)return Ta.actions.reset(),!0;const{isUrl:i=Oc,transformUrl:s}=e.getOptions(n);if(s&&(r=s(r)),!i(r))return;const a=cfe(r,{urlParsers:[yfe,Pfe]});return e.tf.setNodes({id:a?.id,provider:a?.provider,sourceUrl:a?.sourceUrl,url:a?.url??r}),Ta.actions.reset(),e.tf.focus({at:e.selection}),!0},Kfe=e=>{const t=Zt.c(11),{plugin:n}=e,r=vr(),i=ZE();let s;t[0]!==r||t[1]!==i||t[2]!==n?(s=m=>{Wfe(r,{element:i,plugin:n})&&m.preventDefault()},t[0]=r,t[1]=i,t[2]=n,t[3]=s):s=t[3];let a,o;t[4]===Symbol.for("react.memo_cache_sentinel")?(a={enableOnFormTags:["INPUT"]},o=[],t[4]=a,t[5]=o):(a=t[4],o=t[5]),Vw("enter",s,a,o);let l;t[6]!==r?(l=()=>{Ta.get("isEditing")&&(Ta.actions.reset(),r.tf.focus({at:r.selection}))},t[6]=r,t[7]=l):l=t[7];let u,f;t[8]===Symbol.for("react.memo_cache_sentinel")?(u={enableOnContentEditable:!0,enableOnFormTags:["INPUT"]},f=[],t[8]=u,t[9]=f):(u=t[8],f=t[9]),Vw("escape",l,u,f);let h;return t[10]===Symbol.for("react.memo_cache_sentinel")?(h={defaultValue:Ta.get("url")},t[10]=h):h=t[10],h},Gfe=e=>{const t=Zt.c(2),{defaultValue:n}=e,r=Yfe;let i;return t[0]!==n?(i={props:{autoFocus:!0,defaultValue:n,onChange:r}},t[0]=n,t[1]=i):i=t[1],i};gu("input")({propsHook:Gfe,stateHook:Kfe});function Yfe(e){Ta.set("url",e.target.value)}const il={INVALID_FILE_TYPE:400,TOO_MANY_FILES:402,INVALID_FILE_SIZE:403,TOO_LESS_FILES:405,TOO_LARGE:413},sl=(e,t)=>({code:e,data:t}),Jfe=e=>typeof e=="object"&&e!==null&&"code"in e&&"data"in e&&typeof e.data=="object"&&e.data!==null&&"files"in e.data&&Array.isArray(e.data.files),Xfe={"application/andrew-inset":{extensions:["ez"],source:"iana"},"application/applixware":{extensions:["aw"],source:"apache"},"application/atom+xml":{extensions:["atom"],source:"iana"},"application/atomcat+xml":{extensions:["atomcat"],source:"iana"},"application/atomdeleted+xml":{extensions:["atomdeleted"],source:"iana"},"application/atomsvc+xml":{extensions:["atomsvc"],source:"iana"},"application/atsc-dwd+xml":{extensions:["dwd"],source:"iana"},"application/atsc-held+xml":{extensions:["held"],source:"iana"},"application/atsc-rsat+xml":{extensions:["rsat"],source:"iana"},"application/calendar+xml":{extensions:["xcs"],source:"iana"},"application/ccxml+xml":{extensions:["ccxml"],source:"iana"},"application/cdfx+xml":{extensions:["cdfx"],source:"iana"},"application/cdmi-capability":{extensions:["cdmia"],source:"iana"},"application/cdmi-container":{extensions:["cdmic"],source:"iana"},"application/cdmi-domain":{extensions:["cdmid"],source:"iana"},"application/cdmi-object":{extensions:["cdmio"],source:"iana"},"application/cdmi-queue":{extensions:["cdmiq"],source:"iana"},"application/cpl+xml":{extensions:["cpl"],source:"iana"},"application/cu-seeme":{extensions:["cu"],source:"apache"},"application/dash+xml":{extensions:["mpd"],source:"iana"},"application/dash-patch+xml":{extensions:["mpp"],source:"iana"},"application/davmount+xml":{extensions:["davmount"],source:"iana"},"application/dicom":{extensions:["dcm"],source:"iana"},"application/docbook+xml":{extensions:["dbk"],source:"apache"},"application/dssc+der":{extensions:["dssc"],source:"iana"},"application/dssc+xml":{extensions:["xdssc"],source:"iana"},"application/ecmascript":{extensions:["es","ecma"],source:"iana"},"application/emma+xml":{extensions:["emma"],source:"iana"},"application/emotionml+xml":{extensions:["emotionml"],source:"iana"},"application/epub+zip":{extensions:["epub"],source:"iana"},"application/exi":{extensions:["exi"],source:"iana"},"application/express":{extensions:["exp"],source:"iana"},"application/fdt+xml":{extensions:["fdt"],source:"iana"},"application/font-tdpfr":{extensions:["pfr"],source:"iana"},"application/geo+json":{extensions:["geojson"],source:"iana"},"application/gml+xml":{extensions:["gml"],source:"iana"},"application/gpx+xml":{extensions:["gpx"],source:"apache"},"application/gxf":{extensions:["gxf"],source:"apache"},"application/gzip":{extensions:["gz"],source:"iana"},"application/hyperstudio":{extensions:["stk"],source:"iana"},"application/inkml+xml":{extensions:["ink","inkml"],source:"iana"},"application/ipfix":{extensions:["ipfix"],source:"iana"},"application/its+xml":{extensions:["its"],source:"iana"},"application/java-archive":{extensions:["jar","war","ear"],source:"apache"},"application/java-serialized-object":{extensions:["ser"],source:"apache"},"application/java-vm":{extensions:["class"],source:"apache"},"application/javascript":{charset:"UTF-8",extensions:["js","mjs"],source:"iana"},"application/json":{charset:"UTF-8",extensions:["json","map"],source:"iana"},"application/jsonml+json":{extensions:["jsonml"],source:"apache"},"application/ld+json":{extensions:["jsonld"],source:"iana"},"application/lgr+xml":{extensions:["lgr"],source:"iana"},"application/lost+xml":{extensions:["lostxml"],source:"iana"},"application/mac-binhex40":{extensions:["hqx"],source:"iana"},"application/mac-compactpro":{extensions:["cpt"],source:"apache"},"application/mads+xml":{extensions:["mads"],source:"iana"},"application/manifest+json":{charset:"UTF-8",extensions:["webmanifest"],source:"iana"},"application/marc":{extensions:["mrc"],source:"iana"},"application/marcxml+xml":{extensions:["mrcx"],source:"iana"},"application/mathematica":{extensions:["ma","nb","mb"],source:"iana"},"application/mathml+xml":{extensions:["mathml"],source:"iana"},"application/mbox":{extensions:["mbox"],source:"iana"},"application/media-policy-dataset+xml":{extensions:["mpf"],source:"iana"},"application/mediaservercontrol+xml":{extensions:["mscml"],source:"iana"},"application/metalink4+xml":{extensions:["meta4"],source:"iana"},"application/metalink+xml":{extensions:["metalink"],source:"apache"},"application/mets+xml":{extensions:["mets"],source:"iana"},"application/mmt-aei+xml":{extensions:["maei"],source:"iana"},"application/mmt-usd+xml":{extensions:["musd"],source:"iana"},"application/mods+xml":{extensions:["mods"],source:"iana"},"application/mp4":{extensions:["mp4s","m4p"],source:"iana"},"application/mp21":{extensions:["m21","mp21"],source:"iana"},"application/msword":{extensions:["doc","dot"],source:"iana"},"application/mxf":{extensions:["mxf"],source:"iana"},"application/n-quads":{extensions:["nq"],source:"iana"},"application/n-triples":{extensions:["nt"],source:"iana"},"application/node":{extensions:["cjs"],source:"iana"},"application/octet-stream":{extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],source:"iana"},"application/oda":{extensions:["oda"],source:"iana"},"application/oebps-package+xml":{extensions:["opf"],source:"iana"},"application/ogg":{extensions:["ogx"],source:"iana"},"application/omdoc+xml":{extensions:["omdoc"],source:"apache"},"application/onenote":{extensions:["onetoc","onetoc2","onetmp","onepkg"],source:"apache"},"application/oxps":{extensions:["oxps"],source:"iana"},"application/p2p-overlay+xml":{extensions:["relo"],source:"iana"},"application/patch-ops-error+xml":{extensions:["xer"],source:"iana"},"application/pdf":{extensions:["pdf"],source:"iana"},"application/pgp-encrypted":{extensions:["pgp"],source:"iana"},"application/pgp-keys":{extensions:["asc"],source:"iana"},"application/pgp-signature":{extensions:["asc","sig"],source:"iana"},"application/pics-rules":{extensions:["prf"],source:"apache"},"application/pkcs7-mime":{extensions:["p7m","p7c"],source:"iana"},"application/pkcs7-signature":{extensions:["p7s"],source:"iana"},"application/pkcs8":{extensions:["p8"],source:"iana"},"application/pkcs10":{extensions:["p10"],source:"iana"},"application/pkix-attr-cert":{extensions:["ac"],source:"iana"},"application/pkix-cert":{extensions:["cer"],source:"iana"},"application/pkix-crl":{extensions:["crl"],source:"iana"},"application/pkix-pkipath":{extensions:["pkipath"],source:"iana"},"application/pkixcmp":{extensions:["pki"],source:"iana"},"application/pls+xml":{extensions:["pls"],source:"iana"},"application/postscript":{extensions:["ai","eps","ps"],source:"iana"},"application/provenance+xml":{extensions:["provx"],source:"iana"},"application/prs.cww":{extensions:["cww"],source:"iana"},"application/pskc+xml":{extensions:["pskcxml"],source:"iana"},"application/rdf+xml":{extensions:["rdf","owl"],source:"iana"},"application/reginfo+xml":{extensions:["rif"],source:"iana"},"application/relax-ng-compact-syntax":{extensions:["rnc"],source:"iana"},"application/resource-lists+xml":{extensions:["rl"],source:"iana"},"application/resource-lists-diff+xml":{extensions:["rld"],source:"iana"},"application/rls-services+xml":{extensions:["rs"],source:"iana"},"application/route-apd+xml":{extensions:["rapd"],source:"iana"},"application/route-s-tsid+xml":{extensions:["sls"],source:"iana"},"application/route-usd+xml":{extensions:["rusd"],source:"iana"},"application/rpki-ghostbusters":{extensions:["gbr"],source:"iana"},"application/rpki-manifest":{extensions:["mft"],source:"iana"},"application/rpki-roa":{extensions:["roa"],source:"iana"},"application/rsd+xml":{extensions:["rsd"],source:"apache"},"application/rss+xml":{extensions:["rss"],source:"apache"},"application/rtf":{extensions:["rtf"],source:"iana"},"application/sbml+xml":{extensions:["sbml"],source:"iana"},"application/scvp-cv-request":{extensions:["scq"],source:"iana"},"application/scvp-cv-response":{extensions:["scs"],source:"iana"},"application/scvp-vp-request":{extensions:["spq"],source:"iana"},"application/scvp-vp-response":{extensions:["spp"],source:"iana"},"application/sdp":{extensions:["sdp"],source:"iana"},"application/senml+xml":{extensions:["senmlx"],source:"iana"},"application/sensml+xml":{extensions:["sensmlx"],source:"iana"},"application/set-payment-initiation":{extensions:["setpay"],source:"iana"},"application/set-registration-initiation":{extensions:["setreg"],source:"iana"},"application/shf+xml":{extensions:["shf"],source:"iana"},"application/sieve":{extensions:["siv","sieve"],source:"iana"},"application/smil+xml":{extensions:["smi","smil"],source:"iana"},"application/sparql-query":{extensions:["rq"],source:"iana"},"application/sparql-results+xml":{extensions:["srx"],source:"iana"},"application/srgs":{extensions:["gram"],source:"iana"},"application/srgs+xml":{extensions:["grxml"],source:"iana"},"application/sru+xml":{extensions:["sru"],source:"iana"},"application/ssdl+xml":{extensions:["ssdl"],source:"apache"},"application/ssml+xml":{extensions:["ssml"],source:"iana"},"application/swid+xml":{extensions:["swidtag"],source:"iana"},"application/tei+xml":{extensions:["tei","teicorpus"],source:"iana"},"application/thraud+xml":{extensions:["tfi"],source:"iana"},"application/timestamped-data":{extensions:["tsd"],source:"iana"},"application/trig":{extensions:["trig"],source:"iana"},"application/ttml+xml":{extensions:["ttml"],source:"iana"},"application/urc-ressheet+xml":{extensions:["rsheet"],source:"iana"},"application/urc-targetdesc+xml":{extensions:["td"],source:"iana"},"application/vnd.3gpp2.tcap":{extensions:["tcap"],source:"iana"},"application/vnd.3gpp.pic-bw-large":{extensions:["plb"],source:"iana"},"application/vnd.3gpp.pic-bw-small":{extensions:["psb"],source:"iana"},"application/vnd.3gpp.pic-bw-var":{extensions:["pvb"],source:"iana"},"application/vnd.3m.post-it-notes":{extensions:["pwn"],source:"iana"},"application/vnd.1000minds.decision-model+xml":{extensions:["1km"],source:"iana"},"application/vnd.accpac.simply.aso":{extensions:["aso"],source:"iana"},"application/vnd.accpac.simply.imp":{extensions:["imp"],source:"iana"},"application/vnd.acucobol":{extensions:["acu"],source:"iana"},"application/vnd.acucorp":{extensions:["atc","acutc"],source:"iana"},"application/vnd.adobe.air-application-installer-package+zip":{extensions:["air"],source:"apache"},"application/vnd.adobe.formscentral.fcdt":{extensions:["fcdt"],source:"iana"},"application/vnd.adobe.fxp":{extensions:["fxp","fxpl"],source:"iana"},"application/vnd.adobe.xdp+xml":{extensions:["xdp"],source:"iana"},"application/vnd.adobe.xfdf":{extensions:["xfdf"],source:"iana"},"application/vnd.age":{extensions:["age"],source:"iana"},"application/vnd.ahead.space":{extensions:["ahead"],source:"iana"},"application/vnd.airzip.filesecure.azf":{extensions:["azf"],source:"iana"},"application/vnd.airzip.filesecure.azs":{extensions:["azs"],source:"iana"},"application/vnd.amazon.ebook":{extensions:["azw"],source:"apache"},"application/vnd.americandynamics.acc":{extensions:["acc"],source:"iana"},"application/vnd.amiga.ami":{extensions:["ami"],source:"iana"},"application/vnd.android.package-archive":{extensions:["apk"],source:"apache"},"application/vnd.anser-web-certificate-issue-initiation":{extensions:["cii"],source:"iana"},"application/vnd.anser-web-funds-transfer-initiation":{extensions:["fti"],source:"apache"},"application/vnd.antix.game-component":{extensions:["atx"],source:"iana"},"application/vnd.apple.installer+xml":{extensions:["mpkg"],source:"iana"},"application/vnd.apple.keynote":{extensions:["key"],source:"iana"},"application/vnd.apple.mpegurl":{extensions:["m3u8"],source:"iana"},"application/vnd.apple.numbers":{extensions:["numbers"],source:"iana"},"application/vnd.apple.pages":{extensions:["pages"],source:"iana"},"application/vnd.aristanetworks.swi":{extensions:["swi"],source:"iana"},"application/vnd.astraea-software.iota":{extensions:["iota"],source:"iana"},"application/vnd.audiograph":{extensions:["aep"],source:"iana"},"application/vnd.balsamiq.bmml+xml":{extensions:["bmml"],source:"iana"},"application/vnd.blueice.multipass":{extensions:["mpm"],source:"iana"},"application/vnd.bmi":{extensions:["bmi"],source:"iana"},"application/vnd.businessobjects":{extensions:["rep"],source:"iana"},"application/vnd.chemdraw+xml":{extensions:["cdxml"],source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{extensions:["mmd"],source:"iana"},"application/vnd.cinderella":{extensions:["cdy"],source:"iana"},"application/vnd.citationstyles.style+xml":{extensions:["csl"],source:"iana"},"application/vnd.claymore":{extensions:["cla"],source:"iana"},"application/vnd.cloanto.rp9":{extensions:["rp9"],source:"iana"},"application/vnd.clonk.c4group":{extensions:["c4g","c4d","c4f","c4p","c4u"],source:"iana"},"application/vnd.cluetrust.cartomobile-config":{extensions:["c11amc"],source:"iana"},"application/vnd.cluetrust.cartomobile-config-pkg":{extensions:["c11amz"],source:"iana"},"application/vnd.commonspace":{extensions:["csp"],source:"iana"},"application/vnd.contact.cmsg":{extensions:["cdbcmsg"],source:"iana"},"application/vnd.cosmocaller":{extensions:["cmc"],source:"iana"},"application/vnd.crick.clicker":{extensions:["clkx"],source:"iana"},"application/vnd.crick.clicker.keyboard":{extensions:["clkk"],source:"iana"},"application/vnd.crick.clicker.palette":{extensions:["clkp"],source:"iana"},"application/vnd.crick.clicker.template":{extensions:["clkt"],source:"iana"},"application/vnd.crick.clicker.wordbank":{extensions:["clkw"],source:"iana"},"application/vnd.criticaltools.wbs+xml":{extensions:["wbs"],source:"iana"},"application/vnd.ctc-posml":{extensions:["pml"],source:"iana"},"application/vnd.cups-ppd":{extensions:["ppd"],source:"iana"},"application/vnd.curl.car":{extensions:["car"],source:"apache"},"application/vnd.curl.pcurl":{extensions:["pcurl"],source:"apache"},"application/vnd.dart":{extensions:["dart"],source:"iana"},"application/vnd.data-vision.rdz":{extensions:["rdz"],source:"iana"},"application/vnd.dbf":{extensions:["dbf"],source:"iana"},"application/vnd.dece.data":{extensions:["uvf","uvvf","uvd","uvvd"],source:"iana"},"application/vnd.dece.ttml+xml":{extensions:["uvt","uvvt"],source:"iana"},"application/vnd.dece.unspecified":{extensions:["uvx","uvvx"],source:"iana"},"application/vnd.dece.zip":{extensions:["uvz","uvvz"],source:"iana"},"application/vnd.denovo.fcselayout-link":{extensions:["fe_launch"],source:"iana"},"application/vnd.dna":{extensions:["dna"],source:"iana"},"application/vnd.dolby.mlp":{extensions:["mlp"],source:"apache"},"application/vnd.dpgraph":{extensions:["dpg"],source:"iana"},"application/vnd.dreamfactory":{extensions:["dfac"],source:"iana"},"application/vnd.ds-keypoint":{extensions:["kpxx"],source:"apache"},"application/vnd.dvb.ait":{extensions:["ait"],source:"iana"},"application/vnd.dvb.service":{extensions:["svc"],source:"iana"},"application/vnd.dynageo":{extensions:["geo"],source:"iana"},"application/vnd.ecowin.chart":{extensions:["mag"],source:"iana"},"application/vnd.enliven":{extensions:["nml"],source:"iana"},"application/vnd.epson.esf":{extensions:["esf"],source:"iana"},"application/vnd.epson.msf":{extensions:["msf"],source:"iana"},"application/vnd.epson.quickanime":{extensions:["qam"],source:"iana"},"application/vnd.epson.salt":{extensions:["slt"],source:"iana"},"application/vnd.epson.ssf":{extensions:["ssf"],source:"iana"},"application/vnd.eszigno3+xml":{extensions:["es3","et3"],source:"iana"},"application/vnd.ezpix-album":{extensions:["ez2"],source:"iana"},"application/vnd.ezpix-package":{extensions:["ez3"],source:"iana"},"application/vnd.fdf":{extensions:["fdf"],source:"iana"},"application/vnd.fdsn.mseed":{extensions:["mseed"],source:"iana"},"application/vnd.fdsn.seed":{extensions:["seed","dataless"],source:"iana"},"application/vnd.flographit":{extensions:["gph"],source:"iana"},"application/vnd.fluxtime.clip":{extensions:["ftc"],source:"iana"},"application/vnd.framemaker":{extensions:["fm","frame","maker","book"],source:"iana"},"application/vnd.frogans.fnc":{extensions:["fnc"],source:"iana"},"application/vnd.frogans.ltf":{extensions:["ltf"],source:"iana"},"application/vnd.fsc.weblaunch":{extensions:["fsc"],source:"iana"},"application/vnd.fujitsu.oasys":{extensions:["oas"],source:"iana"},"application/vnd.fujitsu.oasys2":{extensions:["oa2"],source:"iana"},"application/vnd.fujitsu.oasys3":{extensions:["oa3"],source:"iana"},"application/vnd.fujitsu.oasysgp":{extensions:["fg5"],source:"iana"},"application/vnd.fujitsu.oasysprs":{extensions:["bh2"],source:"iana"},"application/vnd.fujixerox.ddd":{extensions:["ddd"],source:"iana"},"application/vnd.fujixerox.docuworks":{extensions:["xdw"],source:"iana"},"application/vnd.fujixerox.docuworks.binder":{extensions:["xbd"],source:"iana"},"application/vnd.fuzzysheet":{extensions:["fzs"],source:"iana"},"application/vnd.genomatix.tuxedo":{extensions:["txd"],source:"iana"},"application/vnd.geogebra.file":{extensions:["ggb"],source:"iana"},"application/vnd.geogebra.tool":{extensions:["ggt"],source:"iana"},"application/vnd.geometry-explorer":{extensions:["gex","gre"],source:"iana"},"application/vnd.geonext":{extensions:["gxt"],source:"iana"},"application/vnd.geoplan":{extensions:["g2w"],source:"iana"},"application/vnd.geospace":{extensions:["g3w"],source:"iana"},"application/vnd.gmx":{extensions:["gmx"],source:"iana"},"application/vnd.google-earth.kml+xml":{extensions:["kml"],source:"iana"},"application/vnd.google-earth.kmz":{extensions:["kmz"],source:"iana"},"application/vnd.grafeq":{extensions:["gqf","gqs"],source:"iana"},"application/vnd.groove-account":{extensions:["gac"],source:"iana"},"application/vnd.groove-help":{extensions:["ghf"],source:"iana"},"application/vnd.groove-identity-message":{extensions:["gim"],source:"iana"},"application/vnd.groove-injector":{extensions:["grv"],source:"iana"},"application/vnd.groove-tool-message":{extensions:["gtm"],source:"iana"},"application/vnd.groove-tool-template":{extensions:["tpl"],source:"iana"},"application/vnd.groove-vcard":{extensions:["vcg"],source:"iana"},"application/vnd.hal+xml":{extensions:["hal"],source:"iana"},"application/vnd.handheld-entertainment+xml":{extensions:["zmm"],source:"iana"},"application/vnd.hbci":{extensions:["hbci"],source:"iana"},"application/vnd.hhe.lesson-player":{extensions:["les"],source:"iana"},"application/vnd.hp-hpgl":{extensions:["hpgl"],source:"iana"},"application/vnd.hp-hpid":{extensions:["hpid"],source:"iana"},"application/vnd.hp-hps":{extensions:["hps"],source:"iana"},"application/vnd.hp-jlyt":{extensions:["jlt"],source:"iana"},"application/vnd.hp-pcl":{extensions:["pcl"],source:"iana"},"application/vnd.hp-pclxl":{extensions:["pclxl"],source:"iana"},"application/vnd.hydrostatix.sof-data":{extensions:["sfd-hdstx"],source:"iana"},"application/vnd.ibm.minipay":{extensions:["mpy"],source:"iana"},"application/vnd.ibm.modcap":{extensions:["afp","listafp","list3820"],source:"iana"},"application/vnd.ibm.rights-management":{extensions:["irm"],source:"iana"},"application/vnd.ibm.secure-container":{extensions:["sc"],source:"iana"},"application/vnd.iccprofile":{extensions:["icc","icm"],source:"iana"},"application/vnd.igloader":{extensions:["igl"],source:"iana"},"application/vnd.immervision-ivp":{extensions:["ivp"],source:"iana"},"application/vnd.immervision-ivu":{extensions:["ivu"],source:"iana"},"application/vnd.insors.igm":{extensions:["igm"],source:"iana"},"application/vnd.intercon.formnet":{extensions:["xpw","xpx"],source:"iana"},"application/vnd.intergeo":{extensions:["i2g"],source:"iana"},"application/vnd.intu.qbo":{extensions:["qbo"],source:"iana"},"application/vnd.intu.qfx":{extensions:["qfx"],source:"iana"},"application/vnd.ipunplugged.rcprofile":{extensions:["rcprofile"],source:"iana"},"application/vnd.irepository.package+xml":{extensions:["irp"],source:"iana"},"application/vnd.is-xpr":{extensions:["xpr"],source:"iana"},"application/vnd.isac.fcs":{extensions:["fcs"],source:"iana"},"application/vnd.jam":{extensions:["jam"],source:"iana"},"application/vnd.jcp.javame.midlet-rms":{extensions:["rms"],source:"iana"},"application/vnd.jisp":{extensions:["jisp"],source:"iana"},"application/vnd.joost.joda-archive":{extensions:["joda"],source:"iana"},"application/vnd.kahootz":{extensions:["ktz","ktr"],source:"iana"},"application/vnd.kde.karbon":{extensions:["karbon"],source:"iana"},"application/vnd.kde.kchart":{extensions:["chrt"],source:"iana"},"application/vnd.kde.kformula":{extensions:["kfo"],source:"iana"},"application/vnd.kde.kivio":{extensions:["flw"],source:"iana"},"application/vnd.kde.kontour":{extensions:["kon"],source:"iana"},"application/vnd.kde.kpresenter":{extensions:["kpr","kpt"],source:"iana"},"application/vnd.kde.kspread":{extensions:["ksp"],source:"iana"},"application/vnd.kde.kword":{extensions:["kwd","kwt"],source:"iana"},"application/vnd.kenameaapp":{extensions:["htke"],source:"iana"},"application/vnd.kidspiration":{extensions:["kia"],source:"iana"},"application/vnd.kinar":{extensions:["kne","knp"],source:"iana"},"application/vnd.koan":{extensions:["skp","skd","skt","skm"],source:"iana"},"application/vnd.kodak-descriptor":{extensions:["sse"],source:"iana"},"application/vnd.las.las+xml":{extensions:["lasxml"],source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{extensions:["lbd"],source:"iana"},"application/vnd.llamagraphics.life-balance.exchange+xml":{extensions:["lbe"],source:"iana"},"application/vnd.lotus-1-2-3":{extensions:["123"],source:"iana"},"application/vnd.lotus-approach":{extensions:["apr"],source:"iana"},"application/vnd.lotus-freelance":{extensions:["pre"],source:"iana"},"application/vnd.lotus-notes":{extensions:["nsf"],source:"iana"},"application/vnd.lotus-organizer":{extensions:["org"],source:"iana"},"application/vnd.lotus-screencam":{extensions:["scm"],source:"iana"},"application/vnd.lotus-wordpro":{extensions:["lwp"],source:"iana"},"application/vnd.macports.portpkg":{extensions:["portpkg"],source:"iana"},"application/vnd.mapbox-vector-tile":{extensions:["mvt"],source:"iana"},"application/vnd.mcd":{extensions:["mcd"],source:"iana"},"application/vnd.medcalcdata":{extensions:["mc1"],source:"iana"},"application/vnd.mediastation.cdkey":{extensions:["cdkey"],source:"iana"},"application/vnd.mfer":{extensions:["mwf"],source:"iana"},"application/vnd.mfmp":{extensions:["mfm"],source:"iana"},"application/vnd.micrografx.flo":{extensions:["flo"],source:"iana"},"application/vnd.micrografx.igx":{extensions:["igx"],source:"iana"},"application/vnd.mif":{extensions:["mif"],source:"iana"},"application/vnd.mobius.daf":{extensions:["daf"],source:"iana"},"application/vnd.mobius.dis":{extensions:["dis"],source:"iana"},"application/vnd.mobius.mbk":{extensions:["mbk"],source:"iana"},"application/vnd.mobius.mqy":{extensions:["mqy"],source:"iana"},"application/vnd.mobius.msl":{extensions:["msl"],source:"iana"},"application/vnd.mobius.plc":{extensions:["plc"],source:"iana"},"application/vnd.mobius.txf":{extensions:["txf"],source:"iana"},"application/vnd.mophun.application":{extensions:["mpn"],source:"iana"},"application/vnd.mophun.certificate":{extensions:["mpc"],source:"iana"},"application/vnd.mozilla.xul+xml":{extensions:["xul"],source:"iana"},"application/vnd.ms-artgalry":{extensions:["cil"],source:"iana"},"application/vnd.ms-cab-compressed":{extensions:["cab"],source:"iana"},"application/vnd.ms-excel":{extensions:["xls","xlm","xla","xlc","xlt","xlw"],source:"iana"},"application/vnd.ms-excel.addin.macroenabled.12":{extensions:["xlam"],source:"iana"},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{extensions:["xlsb"],source:"iana"},"application/vnd.ms-excel.sheet.macroenabled.12":{extensions:["xlsm"],source:"iana"},"application/vnd.ms-excel.template.macroenabled.12":{extensions:["xltm"],source:"iana"},"application/vnd.ms-fontobject":{extensions:["eot"],source:"iana"},"application/vnd.ms-htmlhelp":{extensions:["chm"],source:"iana"},"application/vnd.ms-ims":{extensions:["ims"],source:"iana"},"application/vnd.ms-lrm":{extensions:["lrm"],source:"iana"},"application/vnd.ms-officetheme":{extensions:["thmx"],source:"iana"},"application/vnd.ms-pki.seccat":{extensions:["cat"],source:"apache"},"application/vnd.ms-pki.stl":{extensions:["stl"],source:"apache"},"application/vnd.ms-powerpoint":{extensions:["ppt","pps","pot"],source:"iana"},"application/vnd.ms-powerpoint.addin.macroenabled.12":{extensions:["ppam"],source:"iana"},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{extensions:["pptm"],source:"iana"},"application/vnd.ms-powerpoint.slide.macroenabled.12":{extensions:["sldm"],source:"iana"},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{extensions:["ppsm"],source:"iana"},"application/vnd.ms-powerpoint.template.macroenabled.12":{extensions:["potm"],source:"iana"},"application/vnd.ms-project":{extensions:["mpp","mpt"],source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{extensions:["docm"],source:"iana"},"application/vnd.ms-word.template.macroenabled.12":{extensions:["dotm"],source:"iana"},"application/vnd.ms-works":{extensions:["wps","wks","wcm","wdb"],source:"iana"},"application/vnd.ms-wpl":{extensions:["wpl"],source:"iana"},"application/vnd.ms-xpsdocument":{extensions:["xps"],source:"iana"},"application/vnd.mseq":{extensions:["mseq"],source:"iana"},"application/vnd.musician":{extensions:["mus"],source:"iana"},"application/vnd.muvee.style":{extensions:["msty"],source:"iana"},"application/vnd.mynfc":{extensions:["taglet"],source:"iana"},"application/vnd.neurolanguage.nlu":{extensions:["nlu"],source:"iana"},"application/vnd.nitf":{extensions:["ntf","nitf"],source:"iana"},"application/vnd.noblenet-directory":{extensions:["nnd"],source:"iana"},"application/vnd.noblenet-sealer":{extensions:["nns"],source:"iana"},"application/vnd.noblenet-web":{extensions:["nnw"],source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{extensions:["ac"],source:"iana"},"application/vnd.nokia.n-gage.data":{extensions:["ngdat"],source:"iana"},"application/vnd.nokia.n-gage.symbian.install":{extensions:["n-gage"],source:"iana"},"application/vnd.nokia.radio-preset":{extensions:["rpst"],source:"iana"},"application/vnd.nokia.radio-presets":{extensions:["rpss"],source:"iana"},"application/vnd.novadigm.edm":{extensions:["edm"],source:"iana"},"application/vnd.novadigm.edx":{extensions:["edx"],source:"iana"},"application/vnd.novadigm.ext":{extensions:["ext"],source:"iana"},"application/vnd.oasis.opendocument.chart":{extensions:["odc"],source:"iana"},"application/vnd.oasis.opendocument.chart-template":{extensions:["otc"],source:"iana"},"application/vnd.oasis.opendocument.database":{extensions:["odb"],source:"iana"},"application/vnd.oasis.opendocument.formula":{extensions:["odf"],source:"iana"},"application/vnd.oasis.opendocument.formula-template":{extensions:["odft"],source:"iana"},"application/vnd.oasis.opendocument.graphics":{extensions:["odg"],source:"iana"},"application/vnd.oasis.opendocument.graphics-template":{extensions:["otg"],source:"iana"},"application/vnd.oasis.opendocument.image":{extensions:["odi"],source:"iana"},"application/vnd.oasis.opendocument.image-template":{extensions:["oti"],source:"iana"},"application/vnd.oasis.opendocument.presentation":{extensions:["odp"],source:"iana"},"application/vnd.oasis.opendocument.presentation-template":{extensions:["otp"],source:"iana"},"application/vnd.oasis.opendocument.spreadsheet":{extensions:["ods"],source:"iana"},"application/vnd.oasis.opendocument.spreadsheet-template":{extensions:["ots"],source:"iana"},"application/vnd.oasis.opendocument.text":{extensions:["odt"],source:"iana"},"application/vnd.oasis.opendocument.text-master":{extensions:["odm"],source:"iana"},"application/vnd.oasis.opendocument.text-template":{extensions:["ott"],source:"iana"},"application/vnd.oasis.opendocument.text-web":{extensions:["oth"],source:"iana"},"application/vnd.olpc-sugar":{extensions:["xo"],source:"iana"},"application/vnd.oma.dd2+xml":{extensions:["dd2"],source:"iana"},"application/vnd.openblox.game+xml":{extensions:["obgx"],source:"iana"},"application/vnd.openofficeorg.extension":{extensions:["oxt"],source:"apache"},"application/vnd.openstreetmap.data+xml":{extensions:["osm"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{extensions:["pptx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{extensions:["sldx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{extensions:["ppsx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{extensions:["potx"],source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{extensions:["xlsx"],source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{extensions:["xltx"],source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{extensions:["docx"],source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{extensions:["dotx"],source:"iana"},"application/vnd.osgeo.mapguide.package":{extensions:["mgp"],source:"iana"},"application/vnd.osgi.dp":{extensions:["dp"],source:"iana"},"application/vnd.osgi.subsystem":{extensions:["esa"],source:"iana"},"application/vnd.palm":{extensions:["pdb","pqa","oprc"],source:"iana"},"application/vnd.pawaafile":{extensions:["paw"],source:"iana"},"application/vnd.pg.format":{extensions:["str"],source:"iana"},"application/vnd.pg.osasli":{extensions:["ei6"],source:"iana"},"application/vnd.picsel":{extensions:["efif"],source:"iana"},"application/vnd.pmi.widget":{extensions:["wg"],source:"iana"},"application/vnd.pocketlearn":{extensions:["plf"],source:"iana"},"application/vnd.powerbuilder6":{extensions:["pbd"],source:"iana"},"application/vnd.previewsystems.box":{extensions:["box"],source:"iana"},"application/vnd.proteus.magazine":{extensions:["mgz"],source:"iana"},"application/vnd.publishare-delta-tree":{extensions:["qps"],source:"iana"},"application/vnd.pvi.ptid1":{extensions:["ptid"],source:"iana"},"application/vnd.quark.quarkxpress":{extensions:["qxd","qxt","qwd","qwt","qxl","qxb"],source:"iana"},"application/vnd.rar":{extensions:["rar"],source:"iana"},"application/vnd.realvnc.bed":{extensions:["bed"],source:"iana"},"application/vnd.recordare.musicxml":{extensions:["mxl"],source:"iana"},"application/vnd.recordare.musicxml+xml":{extensions:["musicxml"],source:"iana"},"application/vnd.rig.cryptonote":{extensions:["cryptonote"],source:"iana"},"application/vnd.rim.cod":{extensions:["cod"],source:"apache"},"application/vnd.rn-realmedia":{extensions:["rm"],source:"apache"},"application/vnd.rn-realmedia-vbr":{extensions:["rmvb"],source:"apache"},"application/vnd.route66.link66+xml":{extensions:["link66"],source:"iana"},"application/vnd.sailingtracker.track":{extensions:["st"],source:"iana"},"application/vnd.seemail":{extensions:["see"],source:"iana"},"application/vnd.sema":{extensions:["sema"],source:"iana"},"application/vnd.semd":{extensions:["semd"],source:"iana"},"application/vnd.semf":{extensions:["semf"],source:"iana"},"application/vnd.shana.informed.formdata":{extensions:["ifm"],source:"iana"},"application/vnd.shana.informed.formtemplate":{extensions:["itp"],source:"iana"},"application/vnd.shana.informed.interchange":{extensions:["iif"],source:"iana"},"application/vnd.shana.informed.package":{extensions:["ipk"],source:"iana"},"application/vnd.simtech-mindmapper":{extensions:["twd","twds"],source:"iana"},"application/vnd.smaf":{extensions:["mmf"],source:"iana"},"application/vnd.smart.teacher":{extensions:["teacher"],source:"iana"},"application/vnd.software602.filler.form+xml":{extensions:["fo"],source:"iana"},"application/vnd.solent.sdkm+xml":{extensions:["sdkm","sdkd"],source:"iana"},"application/vnd.spotfire.dxp":{extensions:["dxp"],source:"iana"},"application/vnd.spotfire.sfs":{extensions:["sfs"],source:"iana"},"application/vnd.stardivision.calc":{extensions:["sdc"],source:"apache"},"application/vnd.stardivision.draw":{extensions:["sda"],source:"apache"},"application/vnd.stardivision.impress":{extensions:["sdd"],source:"apache"},"application/vnd.stardivision.math":{extensions:["smf"],source:"apache"},"application/vnd.stardivision.writer":{extensions:["sdw","vor"],source:"apache"},"application/vnd.stardivision.writer-global":{extensions:["sgl"],source:"apache"},"application/vnd.stepmania.package":{extensions:["smzip"],source:"iana"},"application/vnd.stepmania.stepchart":{extensions:["sm"],source:"iana"},"application/vnd.sun.wadl+xml":{extensions:["wadl"],source:"iana"},"application/vnd.sun.xml.calc":{extensions:["sxc"],source:"apache"},"application/vnd.sun.xml.calc.template":{extensions:["stc"],source:"apache"},"application/vnd.sun.xml.draw":{extensions:["sxd"],source:"apache"},"application/vnd.sun.xml.draw.template":{extensions:["std"],source:"apache"},"application/vnd.sun.xml.impress":{extensions:["sxi"],source:"apache"},"application/vnd.sun.xml.impress.template":{extensions:["sti"],source:"apache"},"application/vnd.sun.xml.math":{extensions:["sxm"],source:"apache"},"application/vnd.sun.xml.writer":{extensions:["sxw"],source:"apache"},"application/vnd.sun.xml.writer.global":{extensions:["sxg"],source:"apache"},"application/vnd.sun.xml.writer.template":{extensions:["stw"],source:"apache"},"application/vnd.sus-calendar":{extensions:["sus","susp"],source:"iana"},"application/vnd.svd":{extensions:["svd"],source:"iana"},"application/vnd.symbian.install":{extensions:["sis","sisx"],source:"apache"},"application/vnd.syncml+xml":{charset:"UTF-8",extensions:["xsm"],source:"iana"},"application/vnd.syncml.dm+wbxml":{charset:"UTF-8",extensions:["bdm"],source:"iana"},"application/vnd.syncml.dm+xml":{charset:"UTF-8",extensions:["xdm"],source:"iana"},"application/vnd.syncml.dmddf+xml":{charset:"UTF-8",extensions:["ddf"],source:"iana"},"application/vnd.tao.intent-module-archive":{extensions:["tao"],source:"iana"},"application/vnd.tcpdump.pcap":{extensions:["pcap","cap","dmp"],source:"iana"},"application/vnd.tmobile-livetv":{extensions:["tmo"],source:"iana"},"application/vnd.trid.tpt":{extensions:["tpt"],source:"iana"},"application/vnd.triscape.mxs":{extensions:["mxs"],source:"iana"},"application/vnd.trueapp":{extensions:["tra"],source:"iana"},"application/vnd.ufdl":{extensions:["ufd","ufdl"],source:"iana"},"application/vnd.uiq.theme":{extensions:["utz"],source:"iana"},"application/vnd.umajin":{extensions:["umj"],source:"iana"},"application/vnd.unity":{extensions:["unityweb"],source:"iana"},"application/vnd.uoml+xml":{extensions:["uoml"],source:"iana"},"application/vnd.vcx":{extensions:["vcx"],source:"iana"},"application/vnd.visio":{extensions:["vsd","vst","vss","vsw"],source:"iana"},"application/vnd.visionary":{extensions:["vis"],source:"iana"},"application/vnd.vsf":{extensions:["vsf"],source:"iana"},"application/vnd.wap.wbxml":{charset:"UTF-8",extensions:["wbxml"],source:"iana"},"application/vnd.wap.wmlc":{extensions:["wmlc"],source:"iana"},"application/vnd.wap.wmlscriptc":{extensions:["wmlsc"],source:"iana"},"application/vnd.webturbo":{extensions:["wtb"],source:"iana"},"application/vnd.wolfram.player":{extensions:["nbp"],source:"iana"},"application/vnd.wordperfect":{extensions:["wpd"],source:"iana"},"application/vnd.wqd":{extensions:["wqd"],source:"iana"},"application/vnd.wt.stf":{extensions:["stf"],source:"iana"},"application/vnd.xara":{extensions:["xar"],source:"iana"},"application/vnd.xfdl":{extensions:["xfdl"],source:"iana"},"application/vnd.yamaha.hv-dic":{extensions:["hvd"],source:"iana"},"application/vnd.yamaha.hv-script":{extensions:["hvs"],source:"iana"},"application/vnd.yamaha.hv-voice":{extensions:["hvp"],source:"iana"},"application/vnd.yamaha.openscoreformat":{extensions:["osf"],source:"iana"},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{extensions:["osfpvg"],source:"iana"},"application/vnd.yamaha.smaf-audio":{extensions:["saf"],source:"iana"},"application/vnd.yamaha.smaf-phrase":{extensions:["spf"],source:"iana"},"application/vnd.yellowriver-custom-menu":{extensions:["cmp"],source:"iana"},"application/vnd.zul":{extensions:["zir","zirz"],source:"iana"},"application/vnd.zzazz.deck+xml":{extensions:["zaz"],source:"iana"},"application/voicexml+xml":{extensions:["vxml"],source:"iana"},"application/wasm":{extensions:["wasm"],source:"iana"},"application/watcherinfo+xml":{extensions:["wif"],source:"iana"},"application/widget":{extensions:["wgt"],source:"iana"},"application/winhlp":{extensions:["hlp"],source:"apache"},"application/wsdl+xml":{extensions:["wsdl"],source:"iana"},"application/wspolicy+xml":{extensions:["wspolicy"],source:"iana"},"application/x-7z-compressed":{extensions:["7z"],source:"apache"},"application/x-abiword":{extensions:["abw"],source:"apache"},"application/x-ace-compressed":{extensions:["ace"],source:"apache"},"application/x-apple-diskimage":{extensions:["dmg"],source:"apache"},"application/x-authorware-bin":{extensions:["aab","x32","u32","vox"],source:"apache"},"application/x-authorware-map":{extensions:["aam"],source:"apache"},"application/x-authorware-seg":{extensions:["aas"],source:"apache"},"application/x-bcpio":{extensions:["bcpio"],source:"apache"},"application/x-bittorrent":{extensions:["torrent"],source:"apache"},"application/x-blorb":{extensions:["blb","blorb"],source:"apache"},"application/x-bzip":{extensions:["bz"],source:"apache"},"application/x-bzip2":{extensions:["bz2","boz"],source:"apache"},"application/x-cbr":{extensions:["cbr","cba","cbt","cbz","cb7"],source:"apache"},"application/x-cdlink":{extensions:["vcd"],source:"apache"},"application/x-cfs-compressed":{extensions:["cfs"],source:"apache"},"application/x-chat":{extensions:["chat"],source:"apache"},"application/x-chess-pgn":{extensions:["pgn"],source:"apache"},"application/x-cocoa":{extensions:["cco"],source:"nginx"},"application/x-conference":{extensions:["nsc"],source:"apache"},"application/x-cpio":{extensions:["cpio"],source:"apache"},"application/x-csh":{extensions:["csh"],source:"apache"},"application/x-debian-package":{extensions:["deb","udeb"],source:"apache"},"application/x-dgc-compressed":{extensions:["dgc"],source:"apache"},"application/x-director":{extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],source:"apache"},"application/x-doom":{extensions:["wad"],source:"apache"},"application/x-dtbncx+xml":{extensions:["ncx"],source:"apache"},"application/x-dtbook+xml":{extensions:["dtb"],source:"apache"},"application/x-dtbresource+xml":{extensions:["res"],source:"apache"},"application/x-dvi":{extensions:["dvi"],source:"apache"},"application/x-envoy":{extensions:["evy"],source:"apache"},"application/x-eva":{extensions:["eva"],source:"apache"},"application/x-font-bdf":{extensions:["bdf"],source:"apache"},"application/x-font-ghostscript":{extensions:["gsf"],source:"apache"},"application/x-font-linux-psf":{extensions:["psf"],source:"apache"},"application/x-font-pcf":{extensions:["pcf"],source:"apache"},"application/x-font-snf":{extensions:["snf"],source:"apache"},"application/x-font-type1":{extensions:["pfa","pfb","pfm","afm"],source:"apache"},"application/x-freearc":{extensions:["arc"],source:"apache"},"application/x-futuresplash":{extensions:["spl"],source:"apache"},"application/x-gca-compressed":{extensions:["gca"],source:"apache"},"application/x-glulx":{extensions:["ulx"],source:"apache"},"application/x-gnumeric":{extensions:["gnumeric"],source:"apache"},"application/x-gramps-xml":{extensions:["gramps"],source:"apache"},"application/x-gtar":{extensions:["gtar"],source:"apache"},"application/x-hdf":{extensions:["hdf"],source:"apache"},"application/x-install-instructions":{extensions:["install"],source:"apache"},"application/x-iso9660-image":{extensions:["iso"],source:"apache"},"application/x-java-archive-diff":{extensions:["jardiff"],source:"nginx"},"application/x-java-jnlp-file":{extensions:["jnlp"],source:"apache"},"application/x-latex":{extensions:["latex"],source:"apache"},"application/x-lzh-compressed":{extensions:["lzh","lha"],source:"apache"},"application/x-makeself":{extensions:["run"],source:"nginx"},"application/x-mie":{extensions:["mie"],source:"apache"},"application/x-mobipocket-ebook":{extensions:["prc","mobi"],source:"apache"},"application/x-ms-application":{extensions:["application"],source:"apache"},"application/x-ms-shortcut":{extensions:["lnk"],source:"apache"},"application/x-ms-wmd":{extensions:["wmd"],source:"apache"},"application/x-ms-wmz":{extensions:["wmz"],source:"apache"},"application/x-ms-xbap":{extensions:["xbap"],source:"apache"},"application/x-msaccess":{extensions:["mdb"],source:"apache"},"application/x-msbinder":{extensions:["obd"],source:"apache"},"application/x-mscardfile":{extensions:["crd"],source:"apache"},"application/x-msclip":{extensions:["clp"],source:"apache"},"application/x-msdownload":{extensions:["exe","dll","com","bat","msi"],source:"apache"},"application/x-msmediaview":{extensions:["mvb","m13","m14"],source:"apache"},"application/x-msmetafile":{extensions:["wmf","wmz","emf","emz"],source:"apache"},"application/x-msmoney":{extensions:["mny"],source:"apache"},"application/x-mspublisher":{extensions:["pub"],source:"apache"},"application/x-msschedule":{extensions:["scd"],source:"apache"},"application/x-msterminal":{extensions:["trm"],source:"apache"},"application/x-mswrite":{extensions:["wri"],source:"apache"},"application/x-netcdf":{extensions:["nc","cdf"],source:"apache"},"application/x-nzb":{extensions:["nzb"],source:"apache"},"application/x-perl":{extensions:["pl","pm"],source:"nginx"},"application/x-pilot":{extensions:["prc","pdb"],source:"nginx"},"application/x-pkcs7-certificates":{extensions:["p7b","spc"],source:"apache"},"application/x-pkcs7-certreqresp":{extensions:["p7r"],source:"apache"},"application/x-pkcs12":{extensions:["p12","pfx"],source:"apache"},"application/x-rar-compressed":{extensions:["rar"],source:"apache"},"application/x-redhat-package-manager":{extensions:["rpm"],source:"nginx"},"application/x-research-info-systems":{extensions:["ris"],source:"apache"},"application/x-sea":{extensions:["sea"],source:"nginx"},"application/x-sh":{extensions:["sh"],source:"apache"},"application/x-shar":{extensions:["shar"],source:"apache"},"application/x-shockwave-flash":{extensions:["swf"],source:"apache"},"application/x-silverlight-app":{extensions:["xap"],source:"apache"},"application/x-sql":{extensions:["sql"],source:"apache"},"application/x-stuffit":{extensions:["sit"],source:"apache"},"application/x-stuffitx":{extensions:["sitx"],source:"apache"},"application/x-subrip":{extensions:["srt"],source:"apache"},"application/x-sv4cpio":{extensions:["sv4cpio"],source:"apache"},"application/x-sv4crc":{extensions:["sv4crc"],source:"apache"},"application/x-t3vm-image":{extensions:["t3"],source:"apache"},"application/x-tads":{extensions:["gam"],source:"apache"},"application/x-tar":{extensions:["tar"],source:"apache"},"application/x-tcl":{extensions:["tcl","tk"],source:"apache"},"application/x-tex":{extensions:["tex"],source:"apache"},"application/x-tex-tfm":{extensions:["tfm"],source:"apache"},"application/x-texinfo":{extensions:["texinfo","texi"],source:"apache"},"application/x-tgif":{extensions:["obj"],source:"apache"},"application/x-ustar":{extensions:["ustar"],source:"apache"},"application/x-wais-source":{extensions:["src"],source:"apache"},"application/x-x509-ca-cert":{extensions:["der","crt","pem"],source:"iana"},"application/x-xfig":{extensions:["fig"],source:"apache"},"application/x-xliff+xml":{extensions:["xlf"],source:"apache"},"application/x-xpinstall":{extensions:["xpi"],source:"apache"},"application/x-xz":{extensions:["xz"],source:"apache"},"application/x-zmachine":{extensions:["z1","z2","z3","z4","z5","z6","z7","z8"],source:"apache"},"application/xaml+xml":{extensions:["xaml"],source:"apache"},"application/xcap-att+xml":{extensions:["xav"],source:"iana"},"application/xcap-caps+xml":{extensions:["xca"],source:"iana"},"application/xcap-diff+xml":{extensions:["xdf"],source:"iana"},"application/xcap-el+xml":{extensions:["xel"],source:"iana"},"application/xcap-ns+xml":{extensions:["xns"],source:"iana"},"application/xenc+xml":{extensions:["xenc"],source:"iana"},"application/xhtml+xml":{extensions:["xhtml","xht"],source:"iana"},"application/xliff+xml":{extensions:["xlf"],source:"iana"},"application/xml":{extensions:["xml","xsl","xsd","rng"],source:"iana"},"application/xml-dtd":{extensions:["dtd"],source:"iana"},"application/xop+xml":{extensions:["xop"],source:"iana"},"application/xproc+xml":{extensions:["xpl"],source:"apache"},"application/xslt+xml":{extensions:["xsl","xslt"],source:"iana"},"application/xspf+xml":{extensions:["xspf"],source:"apache"},"application/xv+xml":{extensions:["mxml","xhvml","xvml","xvm"],source:"iana"},"application/yaml":{extensions:["yaml","yml"],source:"iana"},"application/yang":{extensions:["yang"],source:"iana"},"application/yin+xml":{extensions:["yin"],source:"iana"},"application/zip":{extensions:["zip"],source:"iana"}},Qfe={"audio/3gpp":{extensions:["3gpp"],source:"iana"},"audio/adpcm":{extensions:["adp"],source:"apache"},"audio/amr":{extensions:["amr"],source:"iana"},"audio/basic":{extensions:["au","snd"],source:"iana"},"audio/midi":{extensions:["mid","midi","kar","rmi"],source:"apache"},"audio/mobile-xmf":{extensions:["mxmf"],source:"iana"},"audio/mp4":{extensions:["m4a","mp4a"],source:"iana"},"audio/mpeg":{extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"],source:"iana"},"audio/ogg":{extensions:["oga","ogg","spx","opus"],source:"iana"},"audio/s3m":{extensions:["s3m"],source:"apache"},"audio/silk":{extensions:["sil"],source:"apache"},"audio/vnd.dece.audio":{extensions:["uva","uvva"],source:"iana"},"audio/vnd.digital-winds":{extensions:["eol"],source:"iana"},"audio/vnd.dra":{extensions:["dra"],source:"iana"},"audio/vnd.dts":{extensions:["dts"],source:"iana"},"audio/vnd.dts.hd":{extensions:["dtshd"],source:"iana"},"audio/vnd.lucent.voice":{extensions:["lvp"],source:"iana"},"audio/vnd.ms-playready.media.pya":{extensions:["pya"],source:"iana"},"audio/vnd.nuera.ecelp4800":{extensions:["ecelp4800"],source:"iana"},"audio/vnd.nuera.ecelp7470":{extensions:["ecelp7470"],source:"iana"},"audio/vnd.nuera.ecelp9600":{extensions:["ecelp9600"],source:"iana"},"audio/vnd.rip":{extensions:["rip"],source:"iana"},"audio/webm":{extensions:["weba"],source:"apache"},"audio/x-aac":{extensions:["aac"],source:"apache"},"audio/x-aiff":{extensions:["aif","aiff","aifc"],source:"apache"},"audio/x-caf":{extensions:["caf"],source:"apache"},"audio/x-flac":{extensions:["flac"],source:"apache"},"audio/x-gsm":{extensions:["gsm"],source:"apache"},"audio/x-m4a":{extensions:["m4a"],source:"nginx"},"audio/x-matroska":{extensions:["mka"],source:"apache"},"audio/x-mpegurl":{extensions:["m3u"],source:"apache"},"audio/x-ms-wax":{extensions:["wax"],source:"apache"},"audio/x-ms-wma":{extensions:["wma"],source:"apache"},"audio/x-pn-realaudio":{extensions:["ram","ra"],source:"apache"},"audio/x-pn-realaudio-plugin":{extensions:["rmp"],source:"apache"},"audio/x-realaudio":{extensions:["ra"],source:"nginx"},"audio/x-wav":{extensions:["wav"],source:"apache"},"audio/xm":{extensions:["xm"],source:"apache"}},Zfe={"image/aces":{extensions:["exr"],source:"iana"},"image/avci":{extensions:["avci"],source:"iana"},"image/avcs":{extensions:["avcs"],source:"iana"},"image/avif":{extensions:["avif"],source:"iana"},"image/bmp":{extensions:["bmp"],source:"iana"},"image/cgm":{extensions:["cgm"],source:"iana"},"image/dicom-rle":{extensions:["drle"],source:"iana"},"image/emf":{extensions:["emf"],source:"iana"},"image/fits":{extensions:["fits"],source:"iana"},"image/g3fax":{extensions:["g3"],source:"iana"},"image/gif":{extensions:["gif"],source:"iana"},"image/heic":{extensions:["heic"],source:"iana"},"image/heic-sequence":{extensions:["heics"],source:"iana"},"image/heif":{extensions:["heif"],source:"iana"},"image/heif-sequence":{extensions:["heifs"],source:"iana"},"image/hej2k":{extensions:["hej2"],source:"iana"},"image/hsj2":{extensions:["hsj2"],source:"iana"},"image/ief":{extensions:["ief"],source:"iana"},"image/jls":{extensions:["jls"],source:"iana"},"image/jp2":{extensions:["jp2","jpg2"],source:"iana"},"image/jpeg":{extensions:["jpeg","jpg","jpe","jfif","pjpeg","pjp"],source:"iana"},"image/jph":{extensions:["jph"],source:"iana"},"image/jphc":{extensions:["jhc"],source:"iana"},"image/jpm":{extensions:["jpm"],source:"iana"},"image/jpx":{extensions:["jpx","jpf"],source:"iana"},"image/jxr":{extensions:["jxr"],source:"iana"},"image/jxra":{extensions:["jxra"],source:"iana"},"image/jxrs":{extensions:["jxrs"],source:"iana"},"image/jxs":{extensions:["jxs"],source:"iana"},"image/jxsc":{extensions:["jxsc"],source:"iana"},"image/jxsi":{extensions:["jxsi"],source:"iana"},"image/jxss":{extensions:["jxss"],source:"iana"},"image/ktx":{extensions:["ktx"],source:"iana"},"image/ktx2":{extensions:["ktx2"],source:"iana"},"image/png":{extensions:["png"],source:"iana"},"image/prs.btif":{extensions:["btif"],source:"iana"},"image/prs.pti":{extensions:["pti"],source:"iana"},"image/sgi":{extensions:["sgi"],source:"apache"},"image/svg+xml":{extensions:["svg","svgz"],source:"iana"},"image/t38":{extensions:["t38"],source:"iana"},"image/tiff":{extensions:["tif","tiff"],source:"iana"},"image/tiff-fx":{extensions:["tfx"],source:"iana"},"image/vnd.adobe.photoshop":{extensions:["psd"],source:"iana"},"image/vnd.airzip.accelerator.azv":{extensions:["azv"],source:"iana"},"image/vnd.dece.graphic":{extensions:["uvi","uvvi","uvg","uvvg"],source:"iana"},"image/vnd.djvu":{extensions:["djvu","djv"],source:"iana"},"image/vnd.dvb.subtitle":{extensions:["sub"],source:"iana"},"image/vnd.dwg":{extensions:["dwg"],source:"iana"},"image/vnd.dxf":{extensions:["dxf"],source:"iana"},"image/vnd.fastbidsheet":{extensions:["fbs"],source:"iana"},"image/vnd.fpx":{extensions:["fpx"],source:"iana"},"image/vnd.fst":{extensions:["fst"],source:"iana"},"image/vnd.fujixerox.edmics-mmr":{extensions:["mmr"],source:"iana"},"image/vnd.fujixerox.edmics-rlc":{extensions:["rlc"],source:"iana"},"image/vnd.microsoft.icon":{extensions:["ico"],source:"iana"},"image/vnd.ms-modi":{extensions:["mdi"],source:"iana"},"image/vnd.ms-photo":{extensions:["wdp"],source:"apache"},"image/vnd.net-fpx":{extensions:["npx"],source:"iana"},"image/vnd.pco.b16":{extensions:["b16"],source:"iana"},"image/vnd.tencent.tap":{extensions:["tap"],source:"iana"},"image/vnd.valve.source.texture":{extensions:["vtf"],source:"iana"},"image/vnd.wap.wbmp":{extensions:["wbmp"],source:"iana"},"image/vnd.xiff":{extensions:["xif"],source:"iana"},"image/vnd.zbrush.pcx":{extensions:["pcx"],source:"iana"},"image/webp":{extensions:["webp"],source:"apache"},"image/wmf":{extensions:["wmf"],source:"iana"},"image/x-3ds":{extensions:["3ds"],source:"apache"},"image/x-cmu-raster":{extensions:["ras"],source:"apache"},"image/x-cmx":{extensions:["cmx"],source:"apache"},"image/x-freehand":{extensions:["fh","fhc","fh4","fh5","fh7"],source:"apache"},"image/x-icon":{extensions:["ico"],source:"apache"},"image/x-jng":{extensions:["jng"],source:"nginx"},"image/x-mrsid-image":{extensions:["sid"],source:"apache"},"image/x-ms-bmp":{extensions:["bmp"],source:"nginx"},"image/x-pcx":{extensions:["pcx"],source:"apache"},"image/x-pict":{extensions:["pic","pct"],source:"apache"},"image/x-portable-anymap":{extensions:["pnm"],source:"apache"},"image/x-portable-bitmap":{extensions:["pbm"],source:"apache"},"image/x-portable-graymap":{extensions:["pgm"],source:"apache"},"image/x-portable-pixmap":{extensions:["ppm"],source:"apache"},"image/x-rgb":{extensions:["rgb"],source:"apache"},"image/x-tga":{extensions:["tga"],source:"apache"},"image/x-xbitmap":{extensions:["xbm"],source:"apache"},"image/x-xpixmap":{extensions:["xpm"],source:"apache"},"image/x-xwindowdump":{extensions:["xwd"],source:"apache"}},e0e={"chemical/x-cdx":{extensions:["cdx"],source:"apache"},"chemical/x-cif":{extensions:["cif"],source:"apache"},"chemical/x-cmdf":{extensions:["cmdf"],source:"apache"},"chemical/x-cml":{extensions:["cml"],source:"apache"},"chemical/x-csml":{extensions:["csml"],source:"apache"},"chemical/x-xyz":{extensions:["xyz"],source:"apache"},"font/collection":{extensions:["ttc"],source:"iana"},"font/otf":{extensions:["otf"],source:"iana"},"font/ttf":{extensions:["ttf"],source:"iana"},"font/woff":{extensions:["woff"],source:"iana"},"font/woff2":{extensions:["woff2"],source:"iana"},"message/disposition-notification":{extensions:["disposition-notification"],source:"iana"},"message/global":{extensions:["u8msg"],source:"iana"},"message/global-delivery-status":{extensions:["u8dsn"],source:"iana"},"message/global-disposition-notification":{extensions:["u8mdn"],source:"iana"},"message/global-headers":{extensions:["u8hdr"],source:"iana"},"message/rfc822":{extensions:["eml","mime"],source:"iana"},"message/vnd.wfa.wsc":{extensions:["wsc"],source:"iana"},"model/3mf":{extensions:["3mf"],source:"iana"},"model/gltf+json":{extensions:["gltf"],source:"iana"},"model/gltf-binary":{extensions:["glb"],source:"iana"},"model/iges":{extensions:["igs","iges"],source:"iana"},"model/mesh":{extensions:["msh","mesh","silo"],source:"iana"},"model/mtl":{extensions:["mtl"],source:"iana"},"model/obj":{extensions:["obj"],source:"iana"},"model/step":{extensions:[".p21",".stp",".step",".stpnc",".210"],source:"iana"},"model/step+xml":{extensions:["stpx"],source:"iana"},"model/step+zip":{extensions:["stpz"],source:"iana"},"model/step-xml+zip":{extensions:["stpxz"],source:"iana"},"model/stl":{extensions:["stl"],source:"iana"},"model/vnd.collada+xml":{extensions:["dae"],source:"iana"},"model/vnd.dwf":{extensions:["dwf"],source:"iana"},"model/vnd.gdl":{extensions:["gdl"],source:"iana"},"model/vnd.gtw":{extensions:["gtw"],source:"iana"},"model/vnd.mts":{extensions:["mts"],source:"iana"},"model/vnd.opengex":{extensions:["ogex"],source:"iana"},"model/vnd.parasolid.transmit.binary":{extensions:["x_b"],source:"iana"},"model/vnd.parasolid.transmit.text":{extensions:["x_t"],source:"iana"},"model/vnd.sap.vds":{extensions:["vds"],source:"iana"},"model/vnd.usdz+zip":{extensions:["usdz"],source:"iana"},"model/vnd.valve.source.compiled-map":{extensions:["bsp"],source:"iana"},"model/vnd.vtu":{extensions:["vtu"],source:"iana"},"model/vrml":{extensions:["wrl","vrml"],source:"iana"},"model/x3d+binary":{extensions:["x3db","x3dbz"],source:"apache"},"model/x3d+fastinfoset":{extensions:["x3db"],source:"iana"},"model/x3d+vrml":{extensions:["x3dv","x3dvz"],source:"apache"},"model/x3d+xml":{extensions:["x3d","x3dz"],source:"iana"},"model/x3d-vrml":{extensions:["x3dv"],source:"iana"},"x-conference/x-cooltalk":{extensions:["ice"],source:"apache"}},t0e={"video/3gpp":{extensions:["3gp","3gpp"],source:"iana"},"video/3gpp2":{extensions:["3g2"],source:"iana"},"video/h261":{extensions:["h261"],source:"iana"},"video/h263":{extensions:["h263"],source:"iana"},"video/h264":{extensions:["h264"],source:"iana"},"video/iso.segment":{extensions:["m4s"],source:"iana"},"video/jpeg":{extensions:["jpgv"],source:"iana"},"video/jpm":{extensions:["jpm","jpgm"],source:"apache"},"video/mj2":{extensions:["mj2","mjp2"],source:"iana"},"video/mp2t":{extensions:["ts"],source:"iana"},"video/mp4":{extensions:["mp4","mp4v","mpg4"],source:"iana"},"video/mpeg":{extensions:["mpeg","mpg","mpe","m1v","m2v"],source:"iana"},"video/ogg":{extensions:["ogv"],source:"iana"},"video/quicktime":{extensions:["qt","mov"],source:"iana"},"video/vnd.dece.hd":{extensions:["uvh","uvvh"],source:"iana"},"video/vnd.dece.mobile":{extensions:["uvm","uvvm"],source:"iana"},"video/vnd.dece.pd":{extensions:["uvp","uvvp"],source:"iana"},"video/vnd.dece.sd":{extensions:["uvs","uvvs"],source:"iana"},"video/vnd.dece.video":{extensions:["uvv","uvvv"],source:"iana"},"video/vnd.dvb.file":{extensions:["dvb"],source:"iana"},"video/vnd.fvt":{extensions:["fvt"],source:"iana"},"video/vnd.mpegurl":{extensions:["mxu","m4u"],source:"iana"},"video/vnd.ms-playready.media.pyv":{extensions:["pyv"],source:"iana"},"video/vnd.uvvu.mp4":{extensions:["uvu","uvvu"],source:"iana"},"video/vnd.vivo":{extensions:["viv"],source:"iana"},"video/webm":{extensions:["webm"],source:"apache"},"video/x-f4v":{extensions:["f4v"],source:"apache"},"video/x-fli":{extensions:["fli"],source:"apache"},"video/x-flv":{extensions:["flv"],source:"apache"},"video/x-m4v":{extensions:["m4v"],source:"apache"},"video/x-matroska":{extensions:["mkv","mk3d","mks"],source:"apache"},"video/x-mng":{extensions:["mng"],source:"apache"},"video/x-ms-asf":{extensions:["asf","asx"],source:"apache"},"video/x-ms-vob":{extensions:["vob"],source:"apache"},"video/x-ms-wm":{extensions:["wm"],source:"apache"},"video/x-ms-wmv":{extensions:["wmv"],source:"apache"},"video/x-ms-wmx":{extensions:["wmx"],source:"apache"},"video/x-ms-wvx":{extensions:["wvx"],source:"apache"},"video/x-msvideo":{extensions:["avi"],source:"apache"},"video/x-sgi-movie":{extensions:["movie"],source:"apache"},"video/x-smv":{extensions:["smv"],source:"apache"}},n0e={"text/cache-manifest":{extensions:["appcache","manifest"],source:"iana"},"text/calendar":{extensions:["ics","ifb"],source:"iana"},"text/css":{charset:"UTF-8",extensions:["css"],source:"iana"},"text/csv":{extensions:["csv"],source:"iana"},"text/html":{extensions:["html","htm","shtml"],source:"iana"},"text/markdown":{extensions:["markdown","md"],source:"iana"},"text/mathml":{extensions:["mml"],source:"nginx"},"text/n3":{charset:"UTF-8",extensions:["n3"],source:"iana"},"text/plain":{extensions:["txt","text","conf","def","list","log","in","ini"],source:"iana"},"text/prs.lines.tag":{extensions:["dsc"],source:"iana"},"text/richtext":{extensions:["rtx"],source:"iana"},"text/rtf":{extensions:["rtf"],source:"iana"},"text/sgml":{extensions:["sgml","sgm"],source:"iana"},"text/shex":{extensions:["shex"],source:"iana"},"text/spdx":{extensions:["spdx"],source:"iana"},"text/tab-separated-values":{extensions:["tsv"],source:"iana"},"text/troff":{extensions:["t","tr","roff","man","me","ms"],source:"iana"},"text/turtle":{charset:"UTF-8",extensions:["ttl"],source:"iana"},"text/uri-list":{extensions:["uri","uris","urls"],source:"iana"},"text/vcard":{extensions:["vcard"],source:"iana"},"text/vnd.curl":{extensions:["curl"],source:"iana"},"text/vnd.curl.dcurl":{extensions:["dcurl"],source:"apache"},"text/vnd.curl.mcurl":{extensions:["mcurl"],source:"apache"},"text/vnd.curl.scurl":{extensions:["scurl"],source:"apache"},"text/vnd.dvb.subtitle":{extensions:["sub"],source:"iana"},"text/vnd.familysearch.gedcom":{extensions:["ged"],source:"iana"},"text/vnd.fly":{extensions:["fly"],source:"iana"},"text/vnd.fmi.flexstor":{extensions:["flx"],source:"iana"},"text/vnd.graphviz":{extensions:["gv"],source:"iana"},"text/vnd.in3d.3dml":{extensions:["3dml"],source:"iana"},"text/vnd.in3d.spot":{extensions:["spot"],source:"iana"},"text/vnd.sun.j2me.app-descriptor":{charset:"UTF-8",extensions:["jad"],source:"iana"},"text/vnd.wap.wml":{extensions:["wml"],source:"iana"},"text/vnd.wap.wmlscript":{extensions:["wmls"],source:"iana"},"text/vtt":{charset:"UTF-8",extensions:["vtt"],source:"iana"},"text/x-asm":{extensions:["s","asm"],source:"apache"},"text/x-c":{extensions:["c","cc","cxx","cpp","h","hh","dic"],source:"apache"},"text/x-component":{extensions:["htc"],source:"nginx"},"text/x-fortran":{extensions:["f","for","f77","f90"],source:"apache"},"text/x-java-source":{extensions:["java"],source:"apache"},"text/x-nfo":{extensions:["nfo"],source:"apache"},"text/x-opml":{extensions:["opml"],source:"apache"},"text/x-pascal":{extensions:["p","pas"],source:"apache"},"text/x-setext":{extensions:["etx"],source:"apache"},"text/x-sfv":{extensions:["sfv"],source:"apache"},"text/x-uuencode":{extensions:["uu"],source:"apache"},"text/x-vcalendar":{extensions:["vcs"],source:"apache"},"text/x-vcard":{extensions:["vcf"],source:"apache"},"text/xml":{extensions:["xml"],source:"iana"}},r0e={...Xfe,...Qfe,...Zfe,...n0e,...t0e,...e0e};function i0e(e){if(!e||typeof e!="string")return!1;const t=l0e(`x.${e}`).toLowerCase().slice(1);return t&&a0e()[t]||!1}const s0e={},O9={};function a0e(){return o0e(s0e,O9),O9}const _2=r0e;let B9=!1;function o0e(e,t){if(B9)return;B9=!0;const n=["nginx","apache",void 0,"iana"];Object.keys(_2).forEach(r=>{const i=_2[r],s=i.extensions;if(s?.length){e[r]=s;for(const a of s){if(t[a]){const o=n.indexOf(_2[t[a]].source),l=n.indexOf(i.source);if(t[a]!=="application/octet-stream"&&(o>l||o===l&&t[a].startsWith("application/")))continue}t[a]=r}}})}function l0e(e){const t=e.lastIndexOf(".");return t===-1?"":e.slice(Math.max(0,t))}const yM=(e,t)=>{const n=e.type||i0e(e.name);if(!n){if(t.includes("blob"))return"blob";throw sl(il.INVALID_FILE_TYPE,{allowedTypes:t,files:[e]})}if(t.some(i=>i.includes("/"))&&t.includes(n))return n;const r=n.toLowerCase()==="application/pdf"?"pdf":n.split("/")[0];if(!t.includes(r)){if(t.includes("blob"))return"blob";throw sl(il.INVALID_FILE_TYPE,{allowedTypes:t,files:[e]})}return r},u0e=(e,t)=>t[yM(e,Object.keys(t))].mediaType,u4=new WeakMap,c0e=(e,t)=>{const n=xM(e);u4.set(e,!0),t(),u4.set(e,n)},xM=e=>u4.get(e)??!1,f0e=(e,t)=>{const n={audio:[],blob:[],image:[],pdf:[],text:[],video:[]};for(const r of e)n[yM(r,Object.keys(t))].push(r);return n},P9=["B","KB","MB","GB"],d0e=(e,t)=>{const n=new RegExp(`^(\\d+)(\\.\\d+)?\\s*(${P9.join("|")})$`,"i").exec(e);if(!n)throw sl(il.INVALID_FILE_SIZE,{files:[t]});const r=Number.parseFloat(n[1]),i=n[3].toUpperCase(),s=r*1024**P9.indexOf(i);return Math.floor(s)},h0e=(e,t,n)=>{const{maxFileCount:r=Number.POSITIVE_INFINITY,maxFileSize:i,minFileCount:s=1}=t;if(e.lengthr)throw sl(il.TOO_MANY_FILES,{files:e,fileType:n,maxFileCount:r});for(const a of e){const o=d0e(i,a);if(a.size>o)throw sl(il.TOO_LARGE,{files:[a],fileType:n,maxFileSize:i})}return!0},p0e=(e,t)=>{const n=f0e(e,t),r=Object.keys(n);for(const i of r){const s=t[i],a=n[i];a.length!==0&&h0e(a,s,i)}},m0e=(e,t,n)=>{const r=e.getApi(Ho),i=e.getOption(Ho,"uploadConfig"),s=e.getOption(Ho,"multiple");try{p0e(t,i)}catch(h){if(!Jfe(h))throw h;return e.setOption(Ho,"error",h)}if(!s&&t.length>1)return e.setOption(Ho,"error",sl(il.TOO_MANY_FILES,{files:Array.from(t),fileType:null,maxFileCount:1}));const a=e.getOption(Ho,"maxFileCount")??3;if(t.length>a)return e.setOption(Ho,"error",sl(il.TOO_MANY_FILES,{files:Array.from(t),fileType:null,maxFileCount:a}));let o;const{at:l,nextBlock:u=!0,...f}=n??{};Array.from(t).forEach((h,m)=>{m===0?l&&(o=l):o=o?Ye.next(o):void 0;const g=p0();r.placeholder.addUploadingFile(g,h);const b=()=>{e.tf.insertNodes({id:g,children:[{text:""}],mediaType:u0e(h,i),type:e.getType(ee.placeholder)},{at:o,nextBlock:u,...f})};e.getOption(Ho,"disableEmptyPlaceholder")?e.tf.withoutMerging(()=>{c0e(e,b)}):e.tf.withoutNormalizing(b)})},Ho=YE(Lfe,{options:{disableEmptyPlaceholder:!1,disableFileDrop:!1,error:null,maxFileCount:5,multiple:!0,uploadConfig:{audio:{maxFileCount:1,maxFileSize:"8MB",mediaType:ee.audio,minFileCount:1},blob:{maxFileCount:1,maxFileSize:"8MB",mediaType:ee.file,minFileCount:1},image:{maxFileCount:3,maxFileSize:"4MB",mediaType:ee.img,minFileCount:1},pdf:{maxFileCount:1,maxFileSize:"4MB",mediaType:ee.file,minFileCount:1},text:{maxFileCount:1,maxFileSize:"64KB",mediaType:ee.file,minFileCount:1},video:{maxFileCount:1,maxFileSize:"16MB",mediaType:ee.video,minFileCount:1}},uploadingFiles:{}}}).overrideEditor(({editor:e,tf:{writeHistory:t}})=>({transforms:{writeHistory(n,r){if(xM(e)){t(n,{...r,[ee.placeholder]:!0});return}return t(n,r)}}})).extendEditorTransforms(({editor:e})=>({insert:{media:Ce(m0e,e)}})).extendApi(({getOption:e,setOption:t})=>({addUploadingFile:(n,r)=>{t("uploadingFiles",{...e("uploadingFiles"),[n]:r})},getUploadingFile:n=>e("uploadingFiles")[n],removeUploadingFile:n=>{const r=e("uploadingFiles");delete r[n],t("uploadingFiles",r)}})).extend(({getOption:e})=>({handlers:{onDrop:({editor:t,event:n,tf:r})=>{if(!e("disableFileDrop"))return;const{files:i}=n.dataTransfer;return i.length===0||(n.preventDefault(),n.stopPropagation(),!t.api.findEventRange(n))?!1:(r.insert.media(i),!0)},onPaste:({editor:t,event:n,tf:r})=>{const{files:i,types:s}=n.clipboardData;if(i.length>0&&!s.includes("text/html")){n.preventDefault(),n.stopPropagation();let a=!1;const o=t.api.block({highest:!0});if(o){const[l,u]=o;dt.string(l).length===0&&(t.tf.removeNodes({at:u}),r.insert.media(i,{at:u,nextBlock:!1}),a=!0)}return a||r.insert.media(i,{nextBlock:!1}),!0}return!1}}}));Vc({isUploading:!1,progresses:{},size:null,updatedFiles:[]},{name:"placeholder"});function g0e(){return{enter:{mdxFlowExpression:y0e,mdxTextExpression:x0e},exit:{mdxFlowExpression:R9,mdxFlowExpressionChunk:F9,mdxTextExpression:R9,mdxTextExpressionChunk:F9}}}function v0e(){return{handlers:{mdxFlowExpression:I9,mdxTextExpression:I9},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function y0e(e){this.enter({type:"mdxFlowExpression",value:""},e),this.buffer()}function x0e(e){this.enter({type:"mdxTextExpression",value:""},e),this.buffer()}function R9(e){const t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type==="mdxFlowExpression"||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function F9(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function I9(e,t,n){const r=e.value||"";return"{"+n.indentLines(r,function(s,a,o){return(a===0||o?"":" ")+s})+"}"}function Vp(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const b0e=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],M9={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function bM(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function w0e(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function E0e(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function L9(e){return E0e(e)||bM(e)}const z9=document.createElement("i");function T0(e){const t="&"+e+";";z9.innerHTML=t;const n=z9.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const C0e=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function k0e(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,a=-1,o="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let f=(l?l.line:0)||1,h=(l?l.column:0)||1,m=b(),g;for(s--;++s<=e.length;)if(g===10&&(h=(u?u[a]:0)||1),g=e.charCodeAt(s),g===38){const C=e.charCodeAt(s+1);if(C===9||C===10||C===12||C===32||C===38||C===60||Number.isNaN(C)||r&&C===r){o+=String.fromCharCode(g),h++;continue}const y=s+1;let _=y,O=y,S;if(C===35){O=++_;const $=e.charCodeAt(O);$===88||$===120?(S="hexadecimal",O=++_):S="decimal"}else S="named";let w="",A="",T="";const P=S==="named"?L9:S==="decimal"?bM:w0e;for(O--;++O<=e.length;){const $=e.charCodeAt(O);if(!P($))break;T+=String.fromCharCode($),S==="named"&&b0e.includes(T)&&(w=T,A=T0(T))}let M=e.charCodeAt(O)===59;if(M){O++;const $=S==="named"?T0(T):!1;$&&(w=T,A=$)}let F=1+O-y,z="";if(!(!M&&n.nonTerminated===!1))if(!T)S!=="named"&&x(4,F);else if(S==="named"){if(M&&!A)x(5,1);else if(w!==T&&(O=_+w.length,F=1+O-_,M=!1),!M){const $=w?1:3;if(n.attribute){const Y=e.charCodeAt(O);Y===61?(x($,F),A=""):L9(Y)?A="":x($,F)}else x($,F)}z=A}else{M||x(2,F);let $=Number.parseInt(T,S==="hexadecimal"?16:10);if(D0e($))x(7,F),z="�";else if($ in M9)x(6,F),z=M9[$];else{let Y="";S0e($)&&x(6,F),$>65535&&($-=65536,Y+=String.fromCharCode($>>>10|55296),$=56320|$&1023),z=Y+String.fromCharCode($)}}if(z){E(),m=b(),s=O-1,h+=O-y+1,i.push(z);const $=b();$.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,z,{start:m,end:$},e.slice(y-1,O)),m=$}else T=e.slice(y-1,O),o+=T,h+=T.length,s=O-1}else g===10&&(f++,a++,h=0),Number.isNaN(g)?E():(o+=String.fromCharCode(g),h++);return i.join("");function b(){return{line:f,column:h,offset:s+((l?l.offset:0)||0)}}function x(C,y){let _;n.warning&&(_=b(),_.column+=y,_.offset+=y,n.warning.call(n.warningContext||void 0,C0e[C],_,C))}function E(){o&&(i.push(o),n.text&&n.text.call(n.textContext||void 0,o,{start:m,end:b()}),o="")}}function D0e(e){return e>=55296&&e<=57343||e>1114111}function S0e(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const _0e=/["&'<>`]/g,A0e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,T0e=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,N0e=/[|\\{}()[\]^$+*?.]/g,j9=new WeakMap;function O0e(e,t){if(e=e.replace(t.subset?B0e(t.subset):_0e,r),t.subset||t.escapeOnly)return e;return e.replace(A0e,n).replace(T0e,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function B0e(e){let t=j9.get(e);return t||(t=P0e(e),j9.set(e,t)),t}function P0e(e){const t=[];let n=-1;for(;++n"}}function M0e(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,s=t.printWidth||Number.POSITIVE_INFINITY,a=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return o.peek=z0e,{handlers:{mdxJsxFlowElement:o,mdxJsxTextElement:o},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function o(l,u,f,h){const m=l.type==="mdxJsxFlowElement",g=l.name?!l.children||l.children.length===0:!1,b=EM(f),x=CM(b),E=f.createTracker(h),C=f.createTracker(h),y=[],_=(m?x:"")+"<"+(l.name||""),O=f.enter(l.type);if(E.move(_),C.move(_),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let P=-1;for(;++PVp(z,a)?a:n;Y=Z+F0e(z,{subset:[Z]})+Z}F=$+(Y?"=":"")+Y}y.push(F)}}let S=!1;const w=y.join(" ");m&&(/\r?\n|\r/.test(w)||E.current().now.column+w.length+(g?i?2:3:1)>s)&&(S=!0);let A=E,T=_;if(S){A=C;let P=-1;for(;++P"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?T+=A.move(f.containerPhrasing(l,{...A.current(),before:">",after:"<"})):(A.shift(2),T+=A.move(` -`),T+=A.move(L0e(l,f,A.current())),T+=A.move(` -`))),g||(T+=A.move((m?x:"")+"")),O(),T}}function L0e(e,t,n){const r=t.indexStack,i=e.children,s=t.createTracker(n),a=CM(EM(t)),o=[];let l=-1;for(r.push(-1);++l-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function CM(e){return wM.repeat(e)}function z0e(){return"<"}function j0e(){return{enter:{mdxjsEsm:$0e},exit:{mdxjsEsm:V0e,mdxjsEsmData:U0e}}}function q0e(){return{handlers:{mdxjsEsm:H0e}}}function $0e(e){this.enter({type:"mdxjsEsm",value:""},e),this.buffer()}function V0e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);const r=e.estree;n.value=t,r&&(n.data={estree:r})}function U0e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function H0e(e){return e.value||""}function kM(){return[g0e(),I0e(),j0e()]}function DM(e){return{extensions:[v0e(),M0e(e),q0e()]}}var W0e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],SM=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],K0e="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",_M="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",A2={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},T2="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",G0e={5:T2,"5module":T2+" export import",6:T2+" const class extends export import super"},AM=/^in(stanceof)?$/,Y0e=new RegExp("["+_M+"]"),J0e=new RegExp("["+_M+K0e+"]");function f4(e,t){for(var n=65536,r=0;re)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Oa(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Y0e.test(String.fromCharCode(e)):t===!1?!1:f4(e,SM)}function go(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&J0e.test(String.fromCharCode(e)):t===!1?!1:f4(e,SM)||f4(e,W0e)}var Sn=function(t,n){n===void 0&&(n={}),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function gs(e,t){return new Sn(e,{beforeExpr:!0,binop:t})}var vs={beforeExpr:!0},ji={startsExpr:!0},x3={};function bn(e,t){return t===void 0&&(t={}),t.keyword=e,x3[e]=new Sn(e,t)}var J={num:new Sn("num",ji),regexp:new Sn("regexp",ji),string:new Sn("string",ji),name:new Sn("name",ji),privateId:new Sn("privateId",ji),eof:new Sn("eof"),bracketL:new Sn("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Sn("]"),braceL:new Sn("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Sn("}"),parenL:new Sn("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Sn(")"),comma:new Sn(",",vs),semi:new Sn(";",vs),colon:new Sn(":",vs),dot:new Sn("."),question:new Sn("?",vs),questionDot:new Sn("?."),arrow:new Sn("=>",vs),template:new Sn("template"),invalidTemplate:new Sn("invalidTemplate"),ellipsis:new Sn("...",vs),backQuote:new Sn("`",ji),dollarBraceL:new Sn("${",{beforeExpr:!0,startsExpr:!0}),eq:new Sn("=",{beforeExpr:!0,isAssign:!0}),assign:new Sn("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Sn("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Sn("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:gs("||",1),logicalAND:gs("&&",2),bitwiseOR:gs("|",3),bitwiseXOR:gs("^",4),bitwiseAND:gs("&",5),equality:gs("==/!=/===/!==",6),relational:gs("/<=/>=",7),bitShift:gs("<>/>>>",8),plusMin:new Sn("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:gs("%",10),star:gs("*",10),slash:gs("/",10),starstar:new Sn("**",{beforeExpr:!0}),coalesce:gs("??",1),_break:bn("break"),_case:bn("case",vs),_catch:bn("catch"),_continue:bn("continue"),_debugger:bn("debugger"),_default:bn("default",vs),_do:bn("do",{isLoop:!0,beforeExpr:!0}),_else:bn("else",vs),_finally:bn("finally"),_for:bn("for",{isLoop:!0}),_function:bn("function",ji),_if:bn("if"),_return:bn("return",vs),_switch:bn("switch"),_throw:bn("throw",vs),_try:bn("try"),_var:bn("var"),_const:bn("const"),_while:bn("while",{isLoop:!0}),_with:bn("with"),_new:bn("new",{beforeExpr:!0,startsExpr:!0}),_this:bn("this",ji),_super:bn("super",ji),_class:bn("class",ji),_extends:bn("extends",vs),_export:bn("export"),_import:bn("import",ji),_null:bn("null",ji),_true:bn("true",ji),_false:bn("false",ji),_in:bn("in",{beforeExpr:!0,binop:7}),_instanceof:bn("instanceof",{beforeExpr:!0,binop:7}),_typeof:bn("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:bn("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:bn("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Hi=/\r\n?|\n|\u2028|\u2029/,X0e=new RegExp(Hi.source,"g");function Xc(e){return e===10||e===13||e===8232||e===8233}function TM(e,t,n){n===void 0&&(n=e.length);for(var r=t;r>10)+55296,(e&1023)+56320))}var ede=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,N0=function(t,n){this.line=t,this.column=n};N0.prototype.offset=function(t){return new N0(this.line,this.column+t)};var qm=function(t,n,r){this.start=n,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function BM(e,t){for(var n=1,r=0;;){var i=TM(e,r,t);if(i<0)return new N0(n,t-r);++n,r=i}}var d4={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},H9=!1;function tde(e){var t={};for(var n in d4)t[n]=e&&Qc(e,n)?e[n]:d4[n];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!H9&&typeof console=="object"&&console.warn&&(H9=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),V9(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(V9(t.onComment)&&(t.onComment=nde(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function nde(e,t){return function(n,r,i,s,a,o){var l={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(l.loc=new qm(this,a,o)),e.ranges&&(l.range=[i,s]),t.push(l)}}var du=1,yu=2,b3=4,PM=8,w3=16,RM=32,$m=64,FM=128,xu=256,id=512,IM=1024,Vm=du|yu|xu;function E3(e,t){return yu|(e?b3:0)|(t?PM:0)}var Up=0,C3=1,wo=2,MM=3,LM=4,zM=5,Rr=function(t,n,r){this.options=t=tde(t),this.sourceFile=t.sourceFile,this.keywords=el(G0e[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=A2[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=el(i);var s=(i?i+" ":"")+A2.strict;this.reservedWordsStrict=el(s),this.reservedWordsStrictBind=el(s+" "+A2.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=r||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):r?(this.lineStart=this.input.lastIndexOf(` -`,r-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(Hi).length)):this.lineStart=0,this.type=J.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?yu:du),this.regexpState=null,this.privateNameStack=[]},Ns={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Rr.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};Ns.inFunction.get=function(){return(this.currentVarScope().flags&yu)>0};Ns.inGenerator.get=function(){return(this.currentVarScope().flags&PM)>0};Ns.inAsync.get=function(){return(this.currentVarScope().flags&b3)>0};Ns.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(xu|id))return!1;if(n&yu)return(n&b3)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ns.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&du)};Ns.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&$m)>0||this.options.allowSuperOutsideMethod};Ns.allowDirectSuper.get=function(){return(this.currentThisScope().flags&FM)>0};Ns.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ns.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(xu|id)||n&yu&&!(n&w3))return!0}return!1};Ns.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&IM||!this.inModule&&t&du)};Ns.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xu)>0};Rr.extend=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var r=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="="||i==="i"&&ide(this,r))}e+=t[0].length,Jr.lastIndex=e,e+=Jr.exec(this.input)[0].length,this.input[e]===";"&&e++}};function ide(e,t){for(var n=t+1,r=Math.min(e.input.length,t+11);n-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}};vi.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};vi.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case J._class:return e&&this.unexpected(),this.parseClass(i,!0);case J._if:return this.parseIfStatement(i);case J._return:return this.parseReturnStatement(i);case J._switch:return this.parseSwitchStatement(i);case J._throw:return this.parseThrowStatement(i);case J._try:return this.parseTryStatement(i);case J._const:case J._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case J._while:return this.parseWhileStatement(i);case J._with:return this.parseWithStatement(i);case J.braceL:return this.parseBlock(!0,i);case J.semi:return this.parseEmptyStatement(i);case J._export:case J._import:if(this.options.ecmaVersion>10&&r===J._import){Jr.lastIndex=this.pos;var a=Jr.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===J._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var f=this.value,h=this.parseExpression();return r===J.name&&h.type==="Identifier"&&this.eat(J.colon)?this.parseLabeledStatement(i,f,h,e):this.parseExpressionStatement(i,h)}};_t.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next(),this.eat(J.semi)||this.insertSemicolon()?e.label=null:this.type!==J.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(J.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};_t.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(k3),this.enterScope(0),this.expect(J.parenL),this.type===J.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===J._var||this.type===J._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),o==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var u=this.containsEsc,f=new Um,h=this.start,m=t>-1?this.parseExprSubscripts(f,"await"):this.parseExpression(!0,f);return this.type===J._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===J._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(m.start===h&&!u&&m.type==="Identifier"&&m.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&a&&this.raise(m.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(m,!1,f),this.checkLValPattern(m),this.parseForIn(e,m)):(this.checkExpressionErrors(f,!0),t>-1&&this.unexpected(t),this.parseFor(e,m))};_t.parseForAfterInit=function(e,t,n){return(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===J._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))};_t.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,s0|(n?0:h4),!1,t)};_t.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(J._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};_t.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(J.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};_t.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(J.braceL),this.labels.push(sde),this.enterScope(IM);for(var t,n=!1;this.type!==J.braceR;)if(this.type===J._case||this.type===J._default){var r=this.type===J._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(J.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};_t.parseThrowStatement=function(e){return this.next(),Hi.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ade=[];_t.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?RM:0),this.checkLValPattern(e,t?LM:wo),this.expect(J.parenR),e};_t.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===J._catch){var t=this.startNode();this.next(),this.eat(J.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(J._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};_t.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};_t.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(k3),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};_t.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};_t.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};_t.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i=0;l--){var u=this.labels[l];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};_t.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};_t.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(J.braceL),e&&this.enterScope(0);this.type!==J.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};_t.parseFor=function(e,t){return e.init=t,this.expect(J.semi),e.test=this.type===J.semi?null:this.parseExpression(),this.expect(J.semi),e.update=this.type===J.parenR?null:this.parseExpression(),this.expect(J.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};_t.parseForIn=function(e,t){var n=this.type===J._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(J.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};_t.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(J.eq)?i.init=this.parseMaybeAssign(t):!r&&n==="const"&&!(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==J._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!r&&i.id.type!=="Identifier"&&!(t&&(this.type===J._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(J.comma))break}return e};_t.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?C3:wo,!1)};var s0=1,h4=2,jM=4;_t.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===J.star&&t&h4&&this.unexpected(),e.generator=this.eat(J.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&s0&&(e.id=t&jM&&this.type!==J.name?null:this.parseIdent(),e.id&&!(t&h4)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?C3:wo:MM));var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(E3(e.async,e.generator)),t&s0||(e.id=this.type===J.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&s0?"FunctionDeclaration":"FunctionExpression")};_t.parseFunctionParams=function(e){this.expect(J.parenL),e.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};_t.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(J.braceL);this.type!==J.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&a.key.type==="PrivateIdentifier"&&ode(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};_t.parseClassElement=function(e){if(this.eat(J.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(J.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===J.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===J.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(J.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===J.parenL||a!=="method"||i||s){var u=!n.static&&Hp(n,"constructor"),f=u&&e;u&&a!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=u?"constructor":a,this.parseClassMethod(n,i,s,f)}else this.parseClassField(n);return n};_t.isClassElementNameStart=function(){return this.type===J.name||this.type===J.privateId||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword};_t.parseClassElementName=function(e){this.type===J.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};_t.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Hp(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};_t.parseClassField=function(e){return Hp(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Hp(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(J.eq)?(this.enterScope(id|$m),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};_t.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(xu|$m);this.type!==J.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};_t.parseClassId=function(e,t){this.type===J.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,wo,!1)):(t===!0&&this.unexpected(),e.id=null)};_t.parseClassSuper=function(e){e.superClass=this.eat(J._extends)?this.parseExprSubscripts(null,!1):null};_t.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};_t.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};_t.parseExport=function(e,t){if(this.next(),this.eat(J.star))return this.parseExportAllDeclaration(e,t);if(this.eat(J._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};_t.parseExportDeclaration=function(e){return this.parseStatement(null)};_t.parseExportDefaultDeclaration=function(){var e;if(this.type===J._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,s0|jM,!1,e)}else if(this.type===J._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};_t.checkExport=function(e,t,n){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Qc(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)};_t.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};_t.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,wo),this.finishNode(e,"ImportSpecifier")};_t.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,wo),this.finishNode(e,"ImportDefaultSpecifier")};_t.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,wo),this.finishNode(e,"ImportNamespaceSpecifier")};_t.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===J.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(J.comma)))return e;if(this.type===J.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(J.braceL);!this.eat(J.braceR);){if(t)t=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;e.push(this.parseImportSpecifier())}return e};_t.parseWithClause=function(){var e=[];if(!this.eat(J._with))return e;this.expect(J.braceL);for(var t={},n=!0;!this.eat(J.braceR);){if(n)n=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;Qc(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e};_t.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(J.colon),this.type!==J.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};_t.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===J.string){var e=this.parseLiteral(this.value);return ede.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};_t.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Os=Rr.prototype;Os.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(J._function))return this.overrideContext(ur.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(J.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===J.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(J.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case J.regexp:var u=this.value;return r=this.parseLiteral(u.value),r.regex={pattern:u.pattern,flags:u.flags},r;case J.num:case J.string:return this.parseLiteral(this.value);case J._null:case J._true:case J._false:return r=this.startNode(),r.value=this.type===J._null?null:this.type===J._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case J.parenL:var f=this.start,h=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=f),e.parenthesizedBind<0&&(e.parenthesizedBind=f)),h;case J.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(J.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case J.braceL:return this.overrideContext(ur.b_expr),this.parseObj(!1,e);case J._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case J._class:return this.parseClass(this.startNode(),!1);case J._new:return this.parseNew();case J.backQuote:return this.parseTemplate();case J._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};en.parseExprAtomDefault=function(){this.unexpected()};en.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===J.parenL&&!e)return this.parseDynamicImport(t);if(this.type===J.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};en.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(J.parenR)?e.options=null:(this.expect(J.comma),this.afterTrailingComma(J.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(J.parenR)||(this.expect(J.comma),this.afterTrailingComma(J.parenR)||this.unexpected())));else if(!this.eat(J.parenR)){var t=this.start;this.eat(J.comma)&&this.eat(J.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};en.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};en.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};en.parseParenExpression=function(){this.expect(J.parenL);var e=this.parseExpression();return this.expect(J.parenR),e};en.shouldParseArrow=function(e){return!this.canInsertSemicolon()};en.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,l=[],u=!0,f=!1,h=new Um,m=this.yieldPos,g=this.awaitPos,b;for(this.yieldPos=0,this.awaitPos=0;this.type!==J.parenR;)if(u?u=!1:this.expect(J.comma),s&&this.afterTrailingComma(J.parenR,!0)){f=!0;break}else if(this.type===J.ellipsis){b=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===J.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var x=this.lastTokEnd,E=this.lastTokEndLoc;if(this.expect(J.parenR),e&&this.shouldParseArrow(l)&&this.eat(J.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=m,this.awaitPos=g,this.parseParenArrowList(n,r,l,t);(!l.length||f)&&this.unexpected(this.lastTokStart),b&&this.unexpected(b),this.checkExpressionErrors(h,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=g||this.awaitPos,l.length>1?(i=this.startNodeAt(a,o),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",x,E)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var C=this.startNodeAt(n,r);return C.expression=i,this.finishNode(C,"ParenthesizedExpression")}else return i};en.parseParenItem=function(e){return e};en.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var lde=[];en.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===J.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(r,"Invalid use of 'super'"),this.eat(J.parenL)?e.arguments=this.parseExprList(J.parenR,this.options.ecmaVersion>=8,!1):e.arguments=lde,this.finishNode(e,"NewExpression")};en.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===J.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,` -`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),n.tail=this.type===J.backQuote,this.finishNode(n,"TemplateElement")};en.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===J.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(J.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(J.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")};en.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===J.name||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===J.star)&&!Hi.test(this.input.slice(this.lastTokEnd,this.start))};en.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(J.braceR);){if(r)r=!1;else if(this.expect(J.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(J.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};en.parseProperty=function(e,t){var n=this.startNode(),r,i,s,a;if(this.options.ecmaVersion>=9&&this.eat(J.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===J.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,t),this.type===J.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(s=this.start,a=this.startLoc),e||(r=this.eat(J.star)));var o=this.containsEsc;return this.parsePropertyName(n),!e&&!o&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(J.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,s,a,t,o),this.finishNode(n,"Property")};en.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};en.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===J.colon&&this.unexpected(),this.eat(J.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===J.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==J.comma&&this.type!==J.braceR&&this.type!==J.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===J.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};en.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(J.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(J.bracketR),e.key;e.computed=!1}return e.key=this.type===J.num||this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};en.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};en.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(E3(t,r.generator)|$m|(n?FM:0)),this.expect(J.parenL),r.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")};en.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(E3(n,!1)|w3),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};en.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==J.braceL,s=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||o)&&(a=this.strictDirective(this.end),a&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,zM),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};en.isSimpleParamList=function(e){for(var t=0,n=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&du&&delete this.undefinedExports[e]}else if(t===LM){var s=this.currentScope();s.lexical.push(e)}else if(t===MM){var a=this.currentScope();this.treatFunctionsAsVar?r=a.lexical.indexOf(e)>-1:r=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var l=this.scopeStack[o];if(l.lexical.indexOf(e)>-1&&!(l.flags&RM&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&du&&delete this.undefinedExports[e],l.flags&Vm)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};dl.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};dl.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};dl.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Vm|id|xu))return t}};dl.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Vm|id|xu)&&!(t.flags&w3))return t}};var Hm=function(t,n,r){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new qm(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[n,0])},sd=Rr.prototype;sd.startNode=function(){return new Hm(this,this.start,this.startLoc)};sd.startNodeAt=function(e,t){return new Hm(this,e,t)};function $M(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}sd.finishNode=function(e,t){return $M.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};sd.finishNodeAt=function(e,t,n,r){return $M.call(this,e,t,n,r)};sd.copyNode=function(e){var t=new Hm(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var cde="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",VM="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",UM=VM+" Extended_Pictographic",HM=UM,WM=HM+" EBase EComp EMod EPres ExtPict",KM=WM,fde=KM,dde={9:VM,10:UM,11:HM,12:WM,13:KM,14:fde},hde="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",pde={9:"",10:"",11:"",12:"",13:"",14:hde},W9="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",GM="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",YM=GM+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",JM=YM+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",XM=JM+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",QM=XM+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",mde=QM+" "+cde,gde={9:GM,10:YM,11:JM,12:XM,13:QM,14:mde},ZM={};function vde(e){var t=ZM[e]={binary:el(dde[e]+" "+W9),binaryOfStrings:el(pde[e]),nonBinary:{General_Category:el(W9),Script:el(gde[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var N2=0,K9=[9,10,11,12,13,14];N2=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ZM[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Ia.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,s=r.indexOf("u")!==-1;this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};Ia.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Ia.prototype.at=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return-1;var s=r.charCodeAt(t);if(!(n||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var a=r.charCodeAt(t+1);return a>=56320&&a<=57343?(s<<10)+a-56613888:s};Ia.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return i;var s=r.charCodeAt(t),a;return!(n||this.switchU)||s<=55295||s>=57344||t+1>=i||(a=r.charCodeAt(t+1))<56320||a>57343?t+1:t+2};Ia.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};Ia.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};Ia.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};Ia.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t?(this.advance(n),!0):!1};Ia.prototype.eatChars=function(t,n){n===void 0&&(n=!1);for(var r=this.pos,i=0,s=t;i-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(r=!0),a==="v"&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")};function xde(e){for(var t in e)return!0;return!1}St.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&xde(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};St.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=16;for(t&&(e.branchID=new Kp(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};St.regexp_alternative=function(e){for(;e.pos=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1};St.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};St.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};St.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);!n&&!a&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var o=0;o-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};St.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};St.regexp_eatModifiers=function(e){for(var t="",n=0;(n=e.current())!==-1&&bde(n);)t+=vo(n),e.advance();return t};function bde(e){return e===105||e===109||e===115}St.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};St.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};St.regexp_eatSyntaxCharacter=function(e){var t=e.current();return eL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function eL(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}St.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!eL(n);)e.advance();return e.pos!==t};St.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};St.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),wde(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function wde(e){return Oa(e,!0)||e===36||e===95}St.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ede(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ede(e){return go(e,!0)||e===36||e===95||e===8204||e===8205}St.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};St.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};St.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};St.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};St.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};St.regexp_eatZero=function(e){return e.current()===48&&!Wm(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};St.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};St.regexp_eatControlLetter=function(e){var t=e.current();return tL(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function tL(e){return e>=65&&e<=90||e>=97&&e<=122}St.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Cde(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1};function Cde(e){return e>=0&&e<=1114111}St.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};St.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var nL=0,yo=1,ws=2;St.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(kde(t))return e.lastIntValue=-1,e.advance(),yo;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===ws&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return nL};function kde(e){return e===100||e===68||e===115||e===83||e===119||e===87}St.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),yo}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return nL};St.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Qc(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")};St.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return yo;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return ws;e.raise("Invalid property name")};St.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";rL(t=e.current());)e.lastStringValue+=vo(t),e.advance();return e.lastStringValue!==""};function rL(e){return tL(e)||e===95}St.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Dde(t=e.current());)e.lastStringValue+=vo(t),e.advance();return e.lastStringValue!==""};function Dde(e){return rL(e)||Wm(e)}St.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};St.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===ws&&e.raise("Negated character class may contain strings"),!0}return!1};St.regexp_classContents=function(e){return e.current()===93?yo:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),yo)};St.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise("Invalid character class"),t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class")}}};St.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||aL(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};St.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};St.regexp_classSetExpression=function(e){var t=yo,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===ws&&(t=ws);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==ws&&(t=yo);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===ws&&(t=ws)}};St.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};St.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?yo:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};St.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===ws&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};St.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};St.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ws&&(t=ws);return t};St.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?yo:ws};St.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Sde(n)||_de(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Sde(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function _de(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}St.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Ade(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Ade(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}St.regexp_eatClassControlLetter=function(e){var t=e.current();return Wm(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};St.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};St.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Wm(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Wm(e){return e>=48&&e<=57}St.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;iL(n=e.current());)e.lastIntValue=16*e.lastIntValue+sL(n),e.advance();return e.pos!==t};function iL(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function sL(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}St.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};St.regexp_eatOctalDigit=function(e){var t=e.current();return aL(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function aL(e){return e>=48&&e<=55}St.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length)return this.finishToken(J.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};vn.readToken=function(e){return Oa(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};vn.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};vn.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};vn.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=TM(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};vn.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&NM.test(String.fromCharCode(e)))++this.pos;else break e}}};vn.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)};vn.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(J.ellipsis)):(++this.pos,this.finishToken(J.dot))};vn.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(J.assign,2):this.finishOp(J.slash,1)};vn.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?J.star:J.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=J.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(J.assign,n+1):this.finishOp(r,n)};vn.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(J.assign,3)}return this.finishOp(e===124?J.logicalOR:J.logicalAND,2)}return t===61?this.finishOp(J.assign,2):this.finishOp(e===124?J.bitwiseOR:J.bitwiseAND,1)};vn.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(J.assign,2):this.finishOp(J.bitwiseXOR,1)};vn.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Hi.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(J.incDec,2):t===61?this.finishOp(J.assign,2):this.finishOp(J.plusMin,1)};vn.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(J.assign,n+1):this.finishOp(J.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(J.relational,n))};vn.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(J.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(J.arrow)):this.finishOp(e===61?J.eq:J.prefix,1)};vn.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(J.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(J.assign,3)}return this.finishOp(J.coalesce,2)}}return this.finishOp(J.question,1)};vn.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Oa(t,!0)||t===92))return this.finishToken(J.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+vo(t)+"'")};vn.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(J.parenL);case 41:return++this.pos,this.finishToken(J.parenR);case 59:return++this.pos,this.finishToken(J.semi);case 44:return++this.pos,this.finishToken(J.comma);case 91:return++this.pos,this.finishToken(J.bracketL);case 93:return++this.pos,this.finishToken(J.bracketR);case 123:return++this.pos,this.finishToken(J.braceL);case 125:return++this.pos,this.finishToken(J.braceR);case 58:return++this.pos,this.finishToken(J.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(J.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(J.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+vo(e)+"'")};vn.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};vn.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Hi.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new Ia(this));o.reset(n,i,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(i,a)}catch{}return this.finishToken(J.regexp,{pattern:i,flags:a,value:l})};vn.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0,l=0,u=t??1/0;l=97?h=f-97+10:f>=65?h=f-65+10:f>=48&&f<=57?h=f-48:h=1/0,h>=e)break;o=f,a=a*e+h}return r&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:a};function Tde(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function oL(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}vn.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=oL(this.input.slice(t,this.pos)),++this.pos):Oa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(J.num,n)};vn.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=oL(this.input.slice(t,this.pos));return++this.pos,Oa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(J.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),Oa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Tde(this.input.slice(t,this.pos),n);return this.finishToken(J.num,s)};vn.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};vn.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Xc(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(J.string,t)};var lL={};vn.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===lL)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};vn.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw lL;this.raise(e,t)};vn.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===J.template||this.type===J.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(J.dollarBraceL)):(++this.pos,this.finishToken(J.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(J.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Xc(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` -`;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};vn.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Xc(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};vn.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,"Bad character escape sequence"),n};vn.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),B2}var Gf={exports:{}},Bde=Gf.exports,Y9;function J9(){return Y9||(Y9=1,(function(e,t){(function(n,r){r(t)})(Bde,(function(n){var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],s="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:l,"5module":l+" export import",6:l+" const class extends export import super"},f=/^in(stanceof)?$/,h=new RegExp("["+a+"]"),m=new RegExp("["+a+s+"]");function g(p,D){for(var j=65536,U=0;Up)return!1;if(j+=D[U+1],j>=p)return!0}return!1}function b(p,D){return p<65?p===36:p<91?!0:p<97?p===95:p<123?!0:p<=65535?p>=170&&h.test(String.fromCharCode(p)):D===!1?!1:g(p,i)}function x(p,D){return p<48?p===36:p<58?!0:p<65?!1:p<91?!0:p<97?p===95:p<123?!0:p<=65535?p>=170&&m.test(String.fromCharCode(p)):D===!1?!1:g(p,i)||g(p,r)}var E=function(D,j){j===void 0&&(j={}),this.label=D,this.keyword=j.keyword,this.beforeExpr=!!j.beforeExpr,this.startsExpr=!!j.startsExpr,this.isLoop=!!j.isLoop,this.isAssign=!!j.isAssign,this.prefix=!!j.prefix,this.postfix=!!j.postfix,this.binop=j.binop||null,this.updateContext=null};function C(p,D){return new E(p,{beforeExpr:!0,binop:D})}var y={beforeExpr:!0},_={startsExpr:!0},O={};function S(p,D){return D===void 0&&(D={}),D.keyword=p,O[p]=new E(p,D)}var w={num:new E("num",_),regexp:new E("regexp",_),string:new E("string",_),name:new E("name",_),privateId:new E("privateId",_),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",y),semi:new E(";",y),colon:new E(":",y),dot:new E("."),question:new E("?",y),questionDot:new E("?."),arrow:new E("=>",y),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",y),backQuote:new E("`",_),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:C("||",1),logicalAND:C("&&",2),bitwiseOR:C("|",3),bitwiseXOR:C("^",4),bitwiseAND:C("&",5),equality:C("==/!=/===/!==",6),relational:C("/<=/>=",7),bitShift:C("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:C("%",10),star:C("*",10),slash:C("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:C("??",1),_break:S("break"),_case:S("case",y),_catch:S("catch"),_continue:S("continue"),_debugger:S("debugger"),_default:S("default",y),_do:S("do",{isLoop:!0,beforeExpr:!0}),_else:S("else",y),_finally:S("finally"),_for:S("for",{isLoop:!0}),_function:S("function",_),_if:S("if"),_return:S("return",y),_switch:S("switch"),_throw:S("throw",y),_try:S("try"),_var:S("var"),_const:S("const"),_while:S("while",{isLoop:!0}),_with:S("with"),_new:S("new",{beforeExpr:!0,startsExpr:!0}),_this:S("this",_),_super:S("super",_),_class:S("class",_),_extends:S("extends",y),_export:S("export"),_import:S("import",_),_null:S("null",_),_true:S("true",_),_false:S("false",_),_in:S("in",{beforeExpr:!0,binop:7}),_instanceof:S("instanceof",{beforeExpr:!0,binop:7}),_typeof:S("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:S("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:S("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},A=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(A.source,"g");function P(p){return p===10||p===13||p===8232||p===8233}function M(p,D,j){j===void 0&&(j=p.length);for(var U=D;U>10)+55296,(p&1023)+56320))}var X=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ne=function(D,j){this.line=D,this.column=j};ne.prototype.offset=function(D){return new ne(this.line,this.column+D)};var W=function(D,j,U){this.start=j,this.end=U,D.sourceFile!==null&&(this.source=D.sourceFile)};function Te(p,D){for(var j=1,U=0;;){var se=M(p,U,D);if(se<0)return new ne(j,D-U);++j,U=se}}var je={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},$e=!1;function Me(p){var D={};for(var j in je)D[j]=p&&ve(p,j)?p[j]:je[j];if(D.ecmaVersion==="latest"?D.ecmaVersion=1e8:D.ecmaVersion==null?(!$e&&typeof console=="object"&&console.warn&&($e=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),D.ecmaVersion=11):D.ecmaVersion>=2015&&(D.ecmaVersion-=2009),D.allowReserved==null&&(D.allowReserved=D.ecmaVersion<5),(!p||p.allowHashBang==null)&&(D.allowHashBang=D.ecmaVersion>=14),me(D.onToken)){var U=D.onToken;D.onToken=function(se){return U.push(se)}}if(me(D.onComment)&&(D.onComment=pe(D,D.onComment)),D.sourceType==="commonjs"&&D.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return D}function pe(p,D){return function(j,U,se,Ee,ke,qe){var rt={type:j?"Block":"Line",value:U,start:se,end:Ee};p.locations&&(rt.loc=new W(this,ke,qe)),p.ranges&&(rt.range=[se,Ee]),D.push(rt)}}var Oe=1,Ie=2,ze=4,le=8,Se=16,Ne=32,Be=64,He=128,Ge=256,ut=512,Qe=1024,ot=Oe|Ie|Ge;function ht(p,D){return Ie|(p?ze:0)|(D?le:0)}var Wt=0,kt=1,gt=2,Ln=3,on=4,be=5,G=function(D,j,U){this.options=D=Me(D),this.sourceFile=D.sourceFile,this.keywords=de(u[D.ecmaVersion>=6?6:D.sourceType==="module"?"5module":5]);var se="";D.allowReserved!==!0&&(se=o[D.ecmaVersion>=6?6:D.ecmaVersion===5?5:3],D.sourceType==="module"&&(se+=" await")),this.reservedWords=de(se);var Ee=(se?se+" ":"")+o.strict;this.reservedWordsStrict=de(Ee),this.reservedWordsStrictBind=de(Ee+" "+o.strictBind),this.input=String(j),this.containsEsc=!1,this.pos=U||0,this.curLine=1,D.startLocation?(this.lineStart=this.pos-D.startLocation.column,this.curLine=D.startLocation.line):U?(this.lineStart=this.input.lastIndexOf(` -`,U-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(A).length)):this.lineStart=0,this.type=w.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=D.sourceType==="module",this.strict=this.inModule||D.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&D.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ie:Oe),this.regexpState=null,this.privateNameStack=[]},ft={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var D=this,j=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return D.parseTopLevel(j)})},ft.inFunction.get=function(){return(this.currentVarScope().flags&Ie)>0},ft.inGenerator.get=function(){return(this.currentVarScope().flags&le)>0},ft.inAsync.get=function(){return(this.currentVarScope().flags&ze)>0},ft.canAwait.get=function(){for(var p=this.scopeStack.length-1;p>=0;p--){var D=this.scopeStack[p],j=D.flags;if(j&(Ge|ut))return!1;if(j&Ie)return(j&ze)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},ft.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Oe)},ft.allowSuper.get=function(){var p=this.currentThisScope(),D=p.flags;return(D&Be)>0||this.options.allowSuperOutsideMethod},ft.allowDirectSuper.get=function(){return(this.currentThisScope().flags&He)>0},ft.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},ft.allowNewDotTarget.get=function(){for(var p=this.scopeStack.length-1;p>=0;p--){var D=this.scopeStack[p],j=D.flags;if(j&(Ge|ut)||j&Ie&&!(j&Se))return!0}return!1},ft.allowUsing.get=function(){var p=this.currentScope(),D=p.flags;return!(D&Qe||!this.inModule&&D&Oe)},ft.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ge)>0},G.extend=function(){for(var D=[],j=arguments.length;j--;)D[j]=arguments[j];for(var U=this,se=0;se=,?^&]/.test(se)||se==="!"&&this.input.charAt(U+1)==="="||se==="i"&&rn(this,U))}p+=D[0].length,z.lastIndex=p,p+=z.exec(this.input)[0].length,this.input[p]===";"&&p++}};function rn(p,D){for(var j=D+1,U=Math.min(p.input.length,D+11);j-1&&this.raiseRecoverable(p.trailingComma,"Comma is not permitted after the rest element");var j=D?p.parenthesizedAssign:p.parenthesizedBind;j>-1&&this.raiseRecoverable(j,D?"Assigning to rvalue":"Parenthesized pattern")}},lt.checkExpressionErrors=function(p,D){if(!p)return!1;var j=p.shorthandAssign,U=p.doubleProto;if(!D)return j>=0||U>=0;j>=0&&this.raise(j,"Shorthand property assignments are valid only in destructuring patterns"),U>=0&&this.raiseRecoverable(U,"Redefinition of __proto__ property")},lt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(se,!1,!p);case w._class:return p&&this.unexpected(),this.parseClass(se,!0);case w._if:return this.parseIfStatement(se);case w._return:return this.parseReturnStatement(se);case w._switch:return this.parseSwitchStatement(se);case w._throw:return this.parseThrowStatement(se);case w._try:return this.parseTryStatement(se);case w._const:case w._var:return Ee=Ee||this.value,p&&Ee!=="var"&&this.unexpected(),this.parseVarStatement(se,Ee);case w._while:return this.parseWhileStatement(se);case w._with:return this.parseWithStatement(se);case w.braceL:return this.parseBlock(!0,se);case w.semi:return this.parseEmptyStatement(se);case w._export:case w._import:if(this.options.ecmaVersion>10&&U===w._import){z.lastIndex=this.pos;var ke=z.exec(this.input),qe=this.pos+ke[0].length,rt=this.input.charCodeAt(qe);if(rt===40||rt===46)return this.parseExpressionStatement(se,this.parseExpression())}return this.options.allowImportExportEverywhere||(D||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),U===w._import?this.parseImport(se):this.parseExport(se,j);default:if(this.isAsyncFunction())return p&&this.unexpected(),this.next(),this.parseFunctionStatement(se,!0,!p);var It=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(It)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),p&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),It==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(se,!1,It),this.semicolon(),this.finishNode(se,"VariableDeclaration");var Kt=this.value,Mn=this.parseExpression();return U===w.name&&Mn.type==="Identifier"&&this.eat(w.colon)?this.parseLabeledStatement(se,Kt,Mn,p):this.parseExpressionStatement(se,Mn)}},Ke.parseBreakContinueStatement=function(p,D){var j=D==="break";this.next(),this.eat(w.semi)||this.insertSemicolon()?p.label=null:this.type!==w.name?this.unexpected():(p.label=this.parseIdent(),this.semicolon());for(var U=0;U=6?this.eat(w.semi):this.semicolon(),this.finishNode(p,"DoWhileStatement")},Ke.parseForStatement=function(p){this.next();var D=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(qr),this.enterScope(0),this.expect(w.parenL),this.type===w.semi)return D>-1&&this.unexpected(D),this.parseFor(p,null);var j=this.isLet();if(this.type===w._var||this.type===w._const||j){var U=this.startNode(),se=j?"let":this.value;return this.next(),this.parseVar(U,!0,se),this.finishNode(U,"VariableDeclaration"),this.parseForAfterInit(p,U,D)}var Ee=this.isContextual("let"),ke=!1,qe=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(qe){var rt=this.startNode();return this.next(),qe==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(rt,!0,qe),this.finishNode(rt,"VariableDeclaration"),this.parseForAfterInit(p,rt,D)}var It=this.containsEsc,Kt=new Lt,Mn=this.start,Vr=D>-1?this.parseExprSubscripts(Kt,"await"):this.parseExpression(!0,Kt);return this.type===w._in||(ke=this.options.ecmaVersion>=6&&this.isContextual("of"))?(D>-1?(this.type===w._in&&this.unexpected(D),p.await=!0):ke&&this.options.ecmaVersion>=8&&(Vr.start===Mn&&!It&&Vr.type==="Identifier"&&Vr.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(p.await=!1)),Ee&&ke&&this.raise(Vr.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Vr,!1,Kt),this.checkLValPattern(Vr),this.parseForIn(p,Vr)):(this.checkExpressionErrors(Kt,!0),D>-1&&this.unexpected(D),this.parseFor(p,Vr))},Ke.parseForAfterInit=function(p,D,j){return(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&D.declarations.length===1?(this.type===w._in?((D.kind==="using"||D.kind==="await using")&&!D.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&j>-1&&this.unexpected(j)):this.options.ecmaVersion>=9&&(p.await=j>-1),this.parseForIn(p,D)):(j>-1&&this.unexpected(j),this.parseFor(p,D))},Ke.parseFunctionStatement=function(p,D,j){return this.next(),this.parseFunction(p,ui|(j?0:Oi),!1,D)},Ke.parseIfStatement=function(p){return this.next(),p.test=this.parseParenExpression(),p.consequent=this.parseStatement("if"),p.alternate=this.eat(w._else)?this.parseStatement("if"):null,this.finishNode(p,"IfStatement")},Ke.parseReturnStatement=function(p){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(w.semi)||this.insertSemicolon()?p.argument=null:(p.argument=this.parseExpression(),this.semicolon()),this.finishNode(p,"ReturnStatement")},Ke.parseSwitchStatement=function(p){this.next(),p.discriminant=this.parseParenExpression(),p.cases=[],this.expect(w.braceL),this.labels.push(Ki),this.enterScope(Qe);for(var D,j=!1;this.type!==w.braceR;)if(this.type===w._case||this.type===w._default){var U=this.type===w._case;D&&this.finishNode(D,"SwitchCase"),p.cases.push(D=this.startNode()),D.consequent=[],this.next(),U?D.test=this.parseExpression():(j&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),j=!0,D.test=null),this.expect(w.colon)}else D||this.unexpected(),D.consequent.push(this.parseStatement(null));return this.exitScope(),D&&this.finishNode(D,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(p,"SwitchStatement")},Ke.parseThrowStatement=function(p){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),p.argument=this.parseExpression(),this.semicolon(),this.finishNode(p,"ThrowStatement")};var Gi=[];Ke.parseCatchClauseParam=function(){var p=this.parseBindingAtom(),D=p.type==="Identifier";return this.enterScope(D?Ne:0),this.checkLValPattern(p,D?on:gt),this.expect(w.parenR),p},Ke.parseTryStatement=function(p){if(this.next(),p.block=this.parseBlock(),p.handler=null,this.type===w._catch){var D=this.startNode();this.next(),this.eat(w.parenL)?D.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),D.param=null,this.enterScope(0)),D.body=this.parseBlock(!1),this.exitScope(),p.handler=this.finishNode(D,"CatchClause")}return p.finalizer=this.eat(w._finally)?this.parseBlock():null,!p.handler&&!p.finalizer&&this.raise(p.start,"Missing catch or finally clause"),this.finishNode(p,"TryStatement")},Ke.parseVarStatement=function(p,D,j){return this.next(),this.parseVar(p,!1,D,j),this.semicolon(),this.finishNode(p,"VariableDeclaration")},Ke.parseWhileStatement=function(p){return this.next(),p.test=this.parseParenExpression(),this.labels.push(qr),p.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(p,"WhileStatement")},Ke.parseWithStatement=function(p){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),p.object=this.parseParenExpression(),p.body=this.parseStatement("with"),this.finishNode(p,"WithStatement")},Ke.parseEmptyStatement=function(p){return this.next(),this.finishNode(p,"EmptyStatement")},Ke.parseLabeledStatement=function(p,D,j,U){for(var se=0,Ee=this.labels;se=0;rt--){var It=this.labels[rt];if(It.statementStart===p.start)It.statementStart=this.start,It.kind=qe;else break}return this.labels.push({name:D,kind:qe,statementStart:this.start}),p.body=this.parseStatement(U?U.indexOf("label")===-1?U+"label":U:"label"),this.labels.pop(),p.label=j,this.finishNode(p,"LabeledStatement")},Ke.parseExpressionStatement=function(p,D){return p.expression=D,this.semicolon(),this.finishNode(p,"ExpressionStatement")},Ke.parseBlock=function(p,D,j){for(p===void 0&&(p=!0),D===void 0&&(D=this.startNode()),D.body=[],this.expect(w.braceL),p&&this.enterScope(0);this.type!==w.braceR;){var U=this.parseStatement(null);D.body.push(U)}return j&&(this.strict=!1),this.next(),p&&this.exitScope(),this.finishNode(D,"BlockStatement")},Ke.parseFor=function(p,D){return p.init=D,this.expect(w.semi),p.test=this.type===w.semi?null:this.parseExpression(),this.expect(w.semi),p.update=this.type===w.parenR?null:this.parseExpression(),this.expect(w.parenR),p.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(p,"ForStatement")},Ke.parseForIn=function(p,D){var j=this.type===w._in;return this.next(),D.type==="VariableDeclaration"&&D.declarations[0].init!=null&&(!j||this.options.ecmaVersion<8||this.strict||D.kind!=="var"||D.declarations[0].id.type!=="Identifier")&&this.raise(D.start,(j?"for-in":"for-of")+" loop variable declaration may not have an initializer"),p.left=D,p.right=j?this.parseExpression():this.parseMaybeAssign(),this.expect(w.parenR),p.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(p,j?"ForInStatement":"ForOfStatement")},Ke.parseVar=function(p,D,j,U){for(p.declarations=[],p.kind=j;;){var se=this.startNode();if(this.parseVarId(se,j),this.eat(w.eq)?se.init=this.parseMaybeAssign(D):!U&&j==="const"&&!(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!U&&(j==="using"||j==="await using")&&this.options.ecmaVersion>=17&&this.type!==w._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+j+" declaration"):!U&&se.id.type!=="Identifier"&&!(D&&(this.type===w._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):se.init=null,p.declarations.push(this.finishNode(se,"VariableDeclarator")),!this.eat(w.comma))break}return p},Ke.parseVarId=function(p,D){p.id=D==="using"||D==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(p.id,D==="var"?kt:gt,!1)};var ui=1,Oi=2,fr=4;Ke.parseFunction=function(p,D,j,U,se){this.initFunction(p),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!U)&&(this.type===w.star&&D&Oi&&this.unexpected(),p.generator=this.eat(w.star)),this.options.ecmaVersion>=8&&(p.async=!!U),D&ui&&(p.id=D&fr&&this.type!==w.name?null:this.parseIdent(),p.id&&!(D&Oi)&&this.checkLValSimple(p.id,this.strict||p.generator||p.async?this.treatFunctionsAsVar?kt:gt:Ln));var Ee=this.yieldPos,ke=this.awaitPos,qe=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ht(p.async,p.generator)),D&ui||(p.id=this.type===w.name?this.parseIdent():null),this.parseFunctionParams(p),this.parseFunctionBody(p,j,!1,se),this.yieldPos=Ee,this.awaitPos=ke,this.awaitIdentPos=qe,this.finishNode(p,D&ui?"FunctionDeclaration":"FunctionExpression")},Ke.parseFunctionParams=function(p){this.expect(w.parenL),p.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ke.parseClass=function(p,D){this.next();var j=this.strict;this.strict=!0,this.parseClassId(p,D),this.parseClassSuper(p);var U=this.enterClassBody(),se=this.startNode(),Ee=!1;for(se.body=[],this.expect(w.braceL);this.type!==w.braceR;){var ke=this.parseClassElement(p.superClass!==null);ke&&(se.body.push(ke),ke.type==="MethodDefinition"&&ke.kind==="constructor"?(Ee&&this.raiseRecoverable(ke.start,"Duplicate constructor in the same class"),Ee=!0):ke.key&&ke.key.type==="PrivateIdentifier"&&ei(U,ke)&&this.raiseRecoverable(ke.key.start,"Identifier '#"+ke.key.name+"' has already been declared"))}return this.strict=j,this.next(),p.body=this.finishNode(se,"ClassBody"),this.exitClassBody(),this.finishNode(p,D?"ClassDeclaration":"ClassExpression")},Ke.parseClassElement=function(p){if(this.eat(w.semi))return null;var D=this.options.ecmaVersion,j=this.startNode(),U="",se=!1,Ee=!1,ke="method",qe=!1;if(this.eatContextual("static")){if(D>=13&&this.eat(w.braceL))return this.parseClassStaticBlock(j),j;this.isClassElementNameStart()||this.type===w.star?qe=!0:U="static"}if(j.static=qe,!U&&D>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===w.star)&&!this.canInsertSemicolon()?Ee=!0:U="async"),!U&&(D>=9||!Ee)&&this.eat(w.star)&&(se=!0),!U&&!Ee&&!se){var rt=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?ke=rt:U=rt)}if(U?(j.computed=!1,j.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),j.key.name=U,this.finishNode(j.key,"Identifier")):this.parseClassElementName(j),D<13||this.type===w.parenL||ke!=="method"||se||Ee){var It=!j.static&&tr(j,"constructor"),Kt=It&&p;It&&ke!=="method"&&this.raise(j.key.start,"Constructor can't have get/set modifier"),j.kind=It?"constructor":ke,this.parseClassMethod(j,se,Ee,Kt)}else this.parseClassField(j);return j},Ke.isClassElementNameStart=function(){return this.type===w.name||this.type===w.privateId||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword},Ke.parseClassElementName=function(p){this.type===w.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),p.computed=!1,p.key=this.parsePrivateIdent()):this.parsePropertyName(p)},Ke.parseClassMethod=function(p,D,j,U){var se=p.key;p.kind==="constructor"?(D&&this.raise(se.start,"Constructor can't be a generator"),j&&this.raise(se.start,"Constructor can't be an async method")):p.static&&tr(p,"prototype")&&this.raise(se.start,"Classes may not have a static property named prototype");var Ee=p.value=this.parseMethod(D,j,U);return p.kind==="get"&&Ee.params.length!==0&&this.raiseRecoverable(Ee.start,"getter should have no params"),p.kind==="set"&&Ee.params.length!==1&&this.raiseRecoverable(Ee.start,"setter should have exactly one param"),p.kind==="set"&&Ee.params[0].type==="RestElement"&&this.raiseRecoverable(Ee.params[0].start,"Setter cannot use rest params"),this.finishNode(p,"MethodDefinition")},Ke.parseClassField=function(p){return tr(p,"constructor")?this.raise(p.key.start,"Classes can't have a field named 'constructor'"):p.static&&tr(p,"prototype")&&this.raise(p.key.start,"Classes can't have a static field named 'prototype'"),this.eat(w.eq)?(this.enterScope(ut|Be),p.value=this.parseMaybeAssign(),this.exitScope()):p.value=null,this.semicolon(),this.finishNode(p,"PropertyDefinition")},Ke.parseClassStaticBlock=function(p){p.body=[];var D=this.labels;for(this.labels=[],this.enterScope(Ge|Be);this.type!==w.braceR;){var j=this.parseStatement(null);p.body.push(j)}return this.next(),this.exitScope(),this.labels=D,this.finishNode(p,"StaticBlock")},Ke.parseClassId=function(p,D){this.type===w.name?(p.id=this.parseIdent(),D&&this.checkLValSimple(p.id,gt,!1)):(D===!0&&this.unexpected(),p.id=null)},Ke.parseClassSuper=function(p){p.superClass=this.eat(w._extends)?this.parseExprSubscripts(null,!1):null},Ke.enterClassBody=function(){var p={declared:Object.create(null),used:[]};return this.privateNameStack.push(p),p.declared},Ke.exitClassBody=function(){var p=this.privateNameStack.pop(),D=p.declared,j=p.used;if(this.options.checkPrivateFields)for(var U=this.privateNameStack.length,se=U===0?null:this.privateNameStack[U-1],Ee=0;Ee=11&&(this.eatContextual("as")?(p.exported=this.parseModuleExportName(),this.checkExport(D,p.exported,this.lastTokStart)):p.exported=null),this.expectContextual("from"),this.type!==w.string&&this.unexpected(),p.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(p.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(p,"ExportAllDeclaration")},Ke.parseExport=function(p,D){if(this.next(),this.eat(w.star))return this.parseExportAllDeclaration(p,D);if(this.eat(w._default))return this.checkExport(D,"default",this.lastTokStart),p.declaration=this.parseExportDefaultDeclaration(),this.finishNode(p,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())p.declaration=this.parseExportDeclaration(p),p.declaration.type==="VariableDeclaration"?this.checkVariableExport(D,p.declaration.declarations):this.checkExport(D,p.declaration.id,p.declaration.id.start),p.specifiers=[],p.source=null,this.options.ecmaVersion>=16&&(p.attributes=[]);else{if(p.declaration=null,p.specifiers=this.parseExportSpecifiers(D),this.eatContextual("from"))this.type!==w.string&&this.unexpected(),p.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(p.attributes=this.parseWithClause());else{for(var j=0,U=p.specifiers;j=16&&(p.attributes=[])}this.semicolon()}return this.finishNode(p,"ExportNamedDeclaration")},Ke.parseExportDeclaration=function(p){return this.parseStatement(null)},Ke.parseExportDefaultDeclaration=function(){var p;if(this.type===w._function||(p=this.isAsyncFunction())){var D=this.startNode();return this.next(),p&&this.next(),this.parseFunction(D,ui|fr,!1,p)}else if(this.type===w._class){var j=this.startNode();return this.parseClass(j,"nullableID")}else{var U=this.parseMaybeAssign();return this.semicolon(),U}},Ke.checkExport=function(p,D,j){p&&(typeof D!="string"&&(D=D.type==="Identifier"?D.name:D.value),ve(p,D)&&this.raiseRecoverable(j,"Duplicate export '"+D+"'"),p[D]=!0)},Ke.checkPatternExport=function(p,D){var j=D.type;if(j==="Identifier")this.checkExport(p,D,D.start);else if(j==="ObjectPattern")for(var U=0,se=D.properties;U=16&&(p.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(p,"ImportDeclaration")},Ke.parseImportSpecifier=function(){var p=this.startNode();return p.imported=this.parseModuleExportName(),this.eatContextual("as")?p.local=this.parseIdent():(this.checkUnreserved(p.imported),p.local=p.imported),this.checkLValSimple(p.local,gt),this.finishNode(p,"ImportSpecifier")},Ke.parseImportDefaultSpecifier=function(){var p=this.startNode();return p.local=this.parseIdent(),this.checkLValSimple(p.local,gt),this.finishNode(p,"ImportDefaultSpecifier")},Ke.parseImportNamespaceSpecifier=function(){var p=this.startNode();return this.next(),this.expectContextual("as"),p.local=this.parseIdent(),this.checkLValSimple(p.local,gt),this.finishNode(p,"ImportNamespaceSpecifier")},Ke.parseImportSpecifiers=function(){var p=[],D=!0;if(this.type===w.name&&(p.push(this.parseImportDefaultSpecifier()),!this.eat(w.comma)))return p;if(this.type===w.star)return p.push(this.parseImportNamespaceSpecifier()),p;for(this.expect(w.braceL);!this.eat(w.braceR);){if(D)D=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;p.push(this.parseImportSpecifier())}return p},Ke.parseWithClause=function(){var p=[];if(!this.eat(w._with))return p;this.expect(w.braceL);for(var D={},j=!0;!this.eat(w.braceR);){if(j)j=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;var U=this.parseImportAttribute(),se=U.key.type==="Identifier"?U.key.name:U.key.value;ve(D,se)&&this.raiseRecoverable(U.key.start,"Duplicate attribute key '"+se+"'"),D[se]=!0,p.push(U)}return p},Ke.parseImportAttribute=function(){var p=this.startNode();return p.key=this.type===w.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(w.colon),this.type!==w.string&&this.unexpected(),p.value=this.parseExprAtom(),this.finishNode(p,"ImportAttribute")},Ke.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===w.string){var p=this.parseLiteral(this.value);return X.test(p.value)&&this.raise(p.start,"An export name cannot include a lone surrogate."),p}return this.parseIdent(!0)},Ke.adaptDirectivePrologue=function(p){for(var D=0;D=5&&p.type==="ExpressionStatement"&&p.expression.type==="Literal"&&typeof p.expression.value=="string"&&(this.input[p.start]==='"'||this.input[p.start]==="'")};var yr=G.prototype;yr.toAssignable=function(p,D,j){if(this.options.ecmaVersion>=6&&p)switch(p.type){case"Identifier":this.inAsync&&p.name==="await"&&this.raise(p.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":p.type="ObjectPattern",j&&this.checkPatternErrors(j,!0);for(var U=0,se=p.properties;U=8&&!qe&&rt.name==="async"&&!this.canInsertSemicolon()&&this.eat(w._function))return this.overrideContext(Re.f_expr),this.parseFunction(this.startNodeAt(Ee,ke),0,!1,!0,D);if(se&&!this.canInsertSemicolon()){if(this.eat(w.arrow))return this.parseArrowExpression(this.startNodeAt(Ee,ke),[rt],!1,D);if(this.options.ecmaVersion>=8&&rt.name==="async"&&this.type===w.name&&!qe&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return rt=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(w.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(Ee,ke),[rt],!0,D)}return rt;case w.regexp:var It=this.value;return U=this.parseLiteral(It.value),U.regex={pattern:It.pattern,flags:It.flags},U;case w.num:case w.string:return this.parseLiteral(this.value);case w._null:case w._true:case w._false:return U=this.startNode(),U.value=this.type===w._null?null:this.type===w._true,U.raw=this.type.keyword,this.next(),this.finishNode(U,"Literal");case w.parenL:var Kt=this.start,Mn=this.parseParenAndDistinguishExpression(se,D);return p&&(p.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Mn)&&(p.parenthesizedAssign=Kt),p.parenthesizedBind<0&&(p.parenthesizedBind=Kt)),Mn;case w.bracketL:return U=this.startNode(),this.next(),U.elements=this.parseExprList(w.bracketR,!0,!0,p),this.finishNode(U,"ArrayExpression");case w.braceL:return this.overrideContext(Re.b_expr),this.parseObj(!1,p);case w._function:return U=this.startNode(),this.next(),this.parseFunction(U,0);case w._class:return this.parseClass(this.startNode(),!1);case w._new:return this.parseNew();case w.backQuote:return this.parseTemplate();case w._import:return this.options.ecmaVersion>=11?this.parseExprImport(j):this.unexpected();default:return this.parseExprAtomDefault()}},Xe.parseExprAtomDefault=function(){this.unexpected()},Xe.parseExprImport=function(p){var D=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===w.parenL&&!p)return this.parseDynamicImport(D);if(this.type===w.dot){var j=this.startNodeAt(D.start,D.loc&&D.loc.start);return j.name="import",D.meta=this.finishNode(j,"Identifier"),this.parseImportMeta(D)}else this.unexpected()},Xe.parseDynamicImport=function(p){if(this.next(),p.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(w.parenR)?p.options=null:(this.expect(w.comma),this.afterTrailingComma(w.parenR)?p.options=null:(p.options=this.parseMaybeAssign(),this.eat(w.parenR)||(this.expect(w.comma),this.afterTrailingComma(w.parenR)||this.unexpected())));else if(!this.eat(w.parenR)){var D=this.start;this.eat(w.comma)&&this.eat(w.parenR)?this.raiseRecoverable(D,"Trailing comma is not allowed in import()"):this.unexpected(D)}return this.finishNode(p,"ImportExpression")},Xe.parseImportMeta=function(p){this.next();var D=this.containsEsc;return p.property=this.parseIdent(!0),p.property.name!=="meta"&&this.raiseRecoverable(p.property.start,"The only valid meta property for import is 'import.meta'"),D&&this.raiseRecoverable(p.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(p.start,"Cannot use 'import.meta' outside a module"),this.finishNode(p,"MetaProperty")},Xe.parseLiteral=function(p){var D=this.startNode();return D.value=p,D.raw=this.input.slice(this.start,this.end),D.raw.charCodeAt(D.raw.length-1)===110&&(D.bigint=D.value!=null?D.value.toString():D.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(D,"Literal")},Xe.parseParenExpression=function(){this.expect(w.parenL);var p=this.parseExpression();return this.expect(w.parenR),p},Xe.shouldParseArrow=function(p){return!this.canInsertSemicolon()},Xe.parseParenAndDistinguishExpression=function(p,D){var j=this.start,U=this.startLoc,se,Ee=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ke=this.start,qe=this.startLoc,rt=[],It=!0,Kt=!1,Mn=new Lt,Vr=this.yieldPos,wl=this.awaitPos,la;for(this.yieldPos=0,this.awaitPos=0;this.type!==w.parenR;)if(It?It=!1:this.expect(w.comma),Ee&&this.afterTrailingComma(w.parenR,!0)){Kt=!0;break}else if(this.type===w.ellipsis){la=this.start,rt.push(this.parseParenItem(this.parseRestBinding())),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else rt.push(this.parseMaybeAssign(!1,Mn,this.parseParenItem));var $a=this.lastTokEnd,ua=this.lastTokEndLoc;if(this.expect(w.parenR),p&&this.shouldParseArrow(rt)&&this.eat(w.arrow))return this.checkPatternErrors(Mn,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Vr,this.awaitPos=wl,this.parseParenArrowList(j,U,rt,D);(!rt.length||Kt)&&this.unexpected(this.lastTokStart),la&&this.unexpected(la),this.checkExpressionErrors(Mn,!0),this.yieldPos=Vr||this.yieldPos,this.awaitPos=wl||this.awaitPos,rt.length>1?(se=this.startNodeAt(ke,qe),se.expressions=rt,this.finishNodeAt(se,"SequenceExpression",$a,ua)):se=rt[0]}else se=this.parseParenExpression();if(this.options.preserveParens){var Va=this.startNodeAt(j,U);return Va.expression=se,this.finishNode(Va,"ParenthesizedExpression")}else return se},Xe.parseParenItem=function(p){return p},Xe.parseParenArrowList=function(p,D,j,U){return this.parseArrowExpression(this.startNodeAt(p,D),j,!1,U)};var bt=[];Xe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var p=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===w.dot){var D=this.startNodeAt(p.start,p.loc&&p.loc.start);D.name="new",p.meta=this.finishNode(D,"Identifier"),this.next();var j=this.containsEsc;return p.property=this.parseIdent(!0),p.property.name!=="target"&&this.raiseRecoverable(p.property.start,"The only valid meta property for new is 'new.target'"),j&&this.raiseRecoverable(p.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(p.start,"'new.target' can only be used in functions and class static block"),this.finishNode(p,"MetaProperty")}var U=this.start,se=this.startLoc;return p.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),U,se,!0,!1),p.callee.type==="Super"&&this.raiseRecoverable(U,"Invalid use of 'super'"),this.eat(w.parenL)?p.arguments=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1):p.arguments=bt,this.finishNode(p,"NewExpression")},Xe.parseTemplateElement=function(p){var D=p.isTagged,j=this.startNode();return this.type===w.invalidTemplate?(D||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),j.value={raw:this.value.replace(/\r\n?/g,` -`),cooked:null}):j.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),j.tail=this.type===w.backQuote,this.finishNode(j,"TemplateElement")},Xe.parseTemplate=function(p){p===void 0&&(p={});var D=p.isTagged;D===void 0&&(D=!1);var j=this.startNode();this.next(),j.expressions=[];var U=this.parseTemplateElement({isTagged:D});for(j.quasis=[U];!U.tail;)this.type===w.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(w.dollarBraceL),j.expressions.push(this.parseExpression()),this.expect(w.braceR),j.quasis.push(U=this.parseTemplateElement({isTagged:D}));return this.next(),this.finishNode(j,"TemplateLiteral")},Xe.isAsyncProp=function(p){return!p.computed&&p.key.type==="Identifier"&&p.key.name==="async"&&(this.type===w.name||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===w.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},Xe.parseObj=function(p,D){var j=this.startNode(),U=!0,se={};for(j.properties=[],this.next();!this.eat(w.braceR);){if(U)U=!1;else if(this.expect(w.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(w.braceR))break;var Ee=this.parseProperty(p,D);p||this.checkPropClash(Ee,se,D),j.properties.push(Ee)}return this.finishNode(j,p?"ObjectPattern":"ObjectExpression")},Xe.parseProperty=function(p,D){var j=this.startNode(),U,se,Ee,ke;if(this.options.ecmaVersion>=9&&this.eat(w.ellipsis))return p?(j.argument=this.parseIdent(!1),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(j,"RestElement")):(j.argument=this.parseMaybeAssign(!1,D),this.type===w.comma&&D&&D.trailingComma<0&&(D.trailingComma=this.start),this.finishNode(j,"SpreadElement"));this.options.ecmaVersion>=6&&(j.method=!1,j.shorthand=!1,(p||D)&&(Ee=this.start,ke=this.startLoc),p||(U=this.eat(w.star)));var qe=this.containsEsc;return this.parsePropertyName(j),!p&&!qe&&this.options.ecmaVersion>=8&&!U&&this.isAsyncProp(j)?(se=!0,U=this.options.ecmaVersion>=9&&this.eat(w.star),this.parsePropertyName(j)):se=!1,this.parsePropertyValue(j,p,U,se,Ee,ke,D,qe),this.finishNode(j,"Property")},Xe.parseGetterSetter=function(p){var D=p.key.name;this.parsePropertyName(p),p.value=this.parseMethod(!1),p.kind=D;var j=p.kind==="get"?0:1;if(p.value.params.length!==j){var U=p.value.start;p.kind==="get"?this.raiseRecoverable(U,"getter should have no params"):this.raiseRecoverable(U,"setter should have exactly one param")}else p.kind==="set"&&p.value.params[0].type==="RestElement"&&this.raiseRecoverable(p.value.params[0].start,"Setter cannot use rest params")},Xe.parsePropertyValue=function(p,D,j,U,se,Ee,ke,qe){(j||U)&&this.type===w.colon&&this.unexpected(),this.eat(w.colon)?(p.value=D?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ke),p.kind="init"):this.options.ecmaVersion>=6&&this.type===w.parenL?(D&&this.unexpected(),p.method=!0,p.value=this.parseMethod(j,U),p.kind="init"):!D&&!qe&&this.options.ecmaVersion>=5&&!p.computed&&p.key.type==="Identifier"&&(p.key.name==="get"||p.key.name==="set")&&this.type!==w.comma&&this.type!==w.braceR&&this.type!==w.eq?((j||U)&&this.unexpected(),this.parseGetterSetter(p)):this.options.ecmaVersion>=6&&!p.computed&&p.key.type==="Identifier"?((j||U)&&this.unexpected(),this.checkUnreserved(p.key),p.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=se),D?p.value=this.parseMaybeDefault(se,Ee,this.copyNode(p.key)):this.type===w.eq&&ke?(ke.shorthandAssign<0&&(ke.shorthandAssign=this.start),p.value=this.parseMaybeDefault(se,Ee,this.copyNode(p.key))):p.value=this.copyNode(p.key),p.kind="init",p.shorthand=!0):this.unexpected()},Xe.parsePropertyName=function(p){if(this.options.ecmaVersion>=6){if(this.eat(w.bracketL))return p.computed=!0,p.key=this.parseMaybeAssign(),this.expect(w.bracketR),p.key;p.computed=!1}return p.key=this.type===w.num||this.type===w.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Xe.initFunction=function(p){p.id=null,this.options.ecmaVersion>=6&&(p.generator=p.expression=!1),this.options.ecmaVersion>=8&&(p.async=!1)},Xe.parseMethod=function(p,D,j){var U=this.startNode(),se=this.yieldPos,Ee=this.awaitPos,ke=this.awaitIdentPos;return this.initFunction(U),this.options.ecmaVersion>=6&&(U.generator=p),this.options.ecmaVersion>=8&&(U.async=!!D),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ht(D,U.generator)|Be|(j?He:0)),this.expect(w.parenL),U.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(U,!1,!0,!1),this.yieldPos=se,this.awaitPos=Ee,this.awaitIdentPos=ke,this.finishNode(U,"FunctionExpression")},Xe.parseArrowExpression=function(p,D,j,U){var se=this.yieldPos,Ee=this.awaitPos,ke=this.awaitIdentPos;return this.enterScope(ht(j,!1)|Se),this.initFunction(p),this.options.ecmaVersion>=8&&(p.async=!!j),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,p.params=this.toAssignableList(D,!0),this.parseFunctionBody(p,!0,!1,U),this.yieldPos=se,this.awaitPos=Ee,this.awaitIdentPos=ke,this.finishNode(p,"ArrowFunctionExpression")},Xe.parseFunctionBody=function(p,D,j,U){var se=D&&this.type!==w.braceL,Ee=this.strict,ke=!1;if(se)p.body=this.parseMaybeAssign(U),p.expression=!0,this.checkParams(p,!1);else{var qe=this.options.ecmaVersion>=7&&!this.isSimpleParamList(p.params);(!Ee||qe)&&(ke=this.strictDirective(this.end),ke&&qe&&this.raiseRecoverable(p.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var rt=this.labels;this.labels=[],ke&&(this.strict=!0),this.checkParams(p,!Ee&&!ke&&!D&&!j&&this.isSimpleParamList(p.params)),this.strict&&p.id&&this.checkLValSimple(p.id,be),p.body=this.parseBlock(!1,void 0,ke&&!Ee),p.expression=!1,this.adaptDirectivePrologue(p.body.body),this.labels=rt}this.exitScope()},Xe.isSimpleParamList=function(p){for(var D=0,j=p;D-1||se.functions.indexOf(p)>-1||se.var.indexOf(p)>-1,se.lexical.push(p),this.inModule&&se.flags&Oe&&delete this.undefinedExports[p]}else if(D===on){var Ee=this.currentScope();Ee.lexical.push(p)}else if(D===Ln){var ke=this.currentScope();this.treatFunctionsAsVar?U=ke.lexical.indexOf(p)>-1:U=ke.lexical.indexOf(p)>-1||ke.var.indexOf(p)>-1,ke.functions.push(p)}else for(var qe=this.scopeStack.length-1;qe>=0;--qe){var rt=this.scopeStack[qe];if(rt.lexical.indexOf(p)>-1&&!(rt.flags&Ne&&rt.lexical[0]===p)||!this.treatFunctionsAsVarInScope(rt)&&rt.functions.indexOf(p)>-1){U=!0;break}if(rt.var.push(p),this.inModule&&rt.flags&Oe&&delete this.undefinedExports[p],rt.flags&ot)break}U&&this.raiseRecoverable(j,"Identifier '"+p+"' has already been declared")},Nt.checkLocalExport=function(p){this.scopeStack[0].lexical.indexOf(p.name)===-1&&this.scopeStack[0].var.indexOf(p.name)===-1&&(this.undefinedExports[p.name]=p)},Nt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Nt.currentVarScope=function(){for(var p=this.scopeStack.length-1;;p--){var D=this.scopeStack[p];if(D.flags&(ot|ut|Ge))return D}},Nt.currentThisScope=function(){for(var p=this.scopeStack.length-1;;p--){var D=this.scopeStack[p];if(D.flags&(ot|ut|Ge)&&!(D.flags&Se))return D}};var Tn=function(D,j,U){this.type="",this.start=j,this.end=0,D.options.locations&&(this.loc=new W(D,U)),D.options.directSourceFile&&(this.sourceFile=D.options.directSourceFile),D.options.ranges&&(this.range=[j,0])},ci=G.prototype;ci.startNode=function(){return new Tn(this,this.start,this.startLoc)},ci.startNodeAt=function(p,D){return new Tn(this,p,D)};function Bs(p,D,j,U){return p.type=D,p.end=j,this.options.locations&&(p.loc.end=U),this.options.ranges&&(p.range[1]=j),p}ci.finishNode=function(p,D){return Bs.call(this,p,D,this.lastTokEnd,this.lastTokEndLoc)},ci.finishNodeAt=function(p,D,j,U){return Bs.call(this,p,D,j,U)},ci.copyNode=function(p){var D=new Tn(this,p.start,this.startLoc);for(var j in p)D[j]=p[j];return D};var La="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",bu="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Co=bu+" Extended_Pictographic",wu=Co,us=wu+" EBase EComp EMod EPres ExtPict",pl=us,ml=pl,ko={9:bu,10:Co,11:wu,12:us,13:pl,14:ml},Eu="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Cu={9:"",10:"",11:"",12:"",13:"",14:Eu},gl="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Bi="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",vl=Bi+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",yl=vl+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Gn=yl+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ku=Gn+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",xl=ku+" "+La,za={9:Bi,10:vl,11:yl,12:Gn,13:ku,14:xl},ja={};function Ze(p){var D=ja[p]={binary:de(ko[p]+" "+gl),binaryOfStrings:de(Cu[p]),nonBinary:{General_Category:de(gl),Script:de(za[p])}};D.nonBinary.Script_Extensions=D.nonBinary.Script,D.nonBinary.gc=D.nonBinary.General_Category,D.nonBinary.sc=D.nonBinary.Script,D.nonBinary.scx=D.nonBinary.Script_Extensions}for(var At=0,sn=[9,10,11,12,13,14];At=6?"uy":"")+(D.options.ecmaVersion>=9?"s":"")+(D.options.ecmaVersion>=13?"d":"")+(D.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ja[D.options.ecmaVersion>=14?14:D.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Er.prototype.reset=function(D,j,U){var se=U.indexOf("v")!==-1,Ee=U.indexOf("u")!==-1;this.start=D|0,this.source=j+"",this.flags=U,se&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=Ee&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=Ee&&this.parser.options.ecmaVersion>=9)},Er.prototype.raise=function(D){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+D)},Er.prototype.at=function(D,j){j===void 0&&(j=!1);var U=this.source,se=U.length;if(D>=se)return-1;var Ee=U.charCodeAt(D);if(!(j||this.switchU)||Ee<=55295||Ee>=57344||D+1>=se)return Ee;var ke=U.charCodeAt(D+1);return ke>=56320&&ke<=57343?(Ee<<10)+ke-56613888:Ee},Er.prototype.nextIndex=function(D,j){j===void 0&&(j=!1);var U=this.source,se=U.length;if(D>=se)return se;var Ee=U.charCodeAt(D),ke;return!(j||this.switchU)||Ee<=55295||Ee>=57344||D+1>=se||(ke=U.charCodeAt(D+1))<56320||ke>57343?D+1:D+2},Er.prototype.current=function(D){return D===void 0&&(D=!1),this.at(this.pos,D)},Er.prototype.lookahead=function(D){return D===void 0&&(D=!1),this.at(this.nextIndex(this.pos,D),D)},Er.prototype.advance=function(D){D===void 0&&(D=!1),this.pos=this.nextIndex(this.pos,D)},Er.prototype.eat=function(D,j){return j===void 0&&(j=!1),this.current(j)===D?(this.advance(j),!0):!1},Er.prototype.eatChars=function(D,j){j===void 0&&(j=!1);for(var U=this.pos,se=0,Ee=D;se-1&&this.raise(p.start,"Duplicate regular expression flag"),ke==="u"&&(U=!0),ke==="v"&&(se=!0)}this.options.ecmaVersion>=15&&U&&se&&this.raise(p.start,"Invalid regular expression flag")};function Do(p){for(var D in p)return!0;return!1}st.validateRegExpPattern=function(p){this.regexp_pattern(p),!p.switchN&&this.options.ecmaVersion>=9&&Do(p.groupNames)&&(p.switchN=!0,this.regexp_pattern(p))},st.regexp_pattern=function(p){p.pos=0,p.lastIntValue=0,p.lastStringValue="",p.lastAssertionIsQuantifiable=!1,p.numCapturingParens=0,p.maxBackReference=0,p.groupNames=Object.create(null),p.backReferenceNames.length=0,p.branchID=null,this.regexp_disjunction(p),p.pos!==p.source.length&&(p.eat(41)&&p.raise("Unmatched ')'"),(p.eat(93)||p.eat(125))&&p.raise("Lone quantifier brackets")),p.maxBackReference>p.numCapturingParens&&p.raise("Invalid escape");for(var D=0,j=p.backReferenceNames;D=16;for(D&&(p.branchID=new $n(p.branchID,null)),this.regexp_alternative(p);p.eat(124);)D&&(p.branchID=p.branchID.sibling()),this.regexp_alternative(p);D&&(p.branchID=p.branchID.parent),this.regexp_eatQuantifier(p,!0)&&p.raise("Nothing to repeat"),p.eat(123)&&p.raise("Lone quantifier brackets")},st.regexp_alternative=function(p){for(;p.pos=9&&(j=p.eat(60)),p.eat(61)||p.eat(33))return this.regexp_disjunction(p),p.eat(41)||p.raise("Unterminated group"),p.lastAssertionIsQuantifiable=!j,!0}return p.pos=D,!1},st.regexp_eatQuantifier=function(p,D){return D===void 0&&(D=!1),this.regexp_eatQuantifierPrefix(p,D)?(p.eat(63),!0):!1},st.regexp_eatQuantifierPrefix=function(p,D){return p.eat(42)||p.eat(43)||p.eat(63)||this.regexp_eatBracedQuantifier(p,D)},st.regexp_eatBracedQuantifier=function(p,D){var j=p.pos;if(p.eat(123)){var U=0,se=-1;if(this.regexp_eatDecimalDigits(p)&&(U=p.lastIntValue,p.eat(44)&&this.regexp_eatDecimalDigits(p)&&(se=p.lastIntValue),p.eat(125)))return se!==-1&&se=16){var j=this.regexp_eatModifiers(p),U=p.eat(45);if(j||U){for(var se=0;se-1&&p.raise("Duplicate regular expression modifiers")}if(U){var ke=this.regexp_eatModifiers(p);!j&&!ke&&p.current()===58&&p.raise("Invalid regular expression modifiers");for(var qe=0;qe-1||j.indexOf(rt)>-1)&&p.raise("Duplicate regular expression modifiers")}}}}if(p.eat(58)){if(this.regexp_disjunction(p),p.eat(41))return!0;p.raise("Unterminated group")}}p.pos=D}return!1},st.regexp_eatCapturingGroup=function(p){if(p.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(p):p.current()===63&&p.raise("Invalid group"),this.regexp_disjunction(p),p.eat(41))return p.numCapturingParens+=1,!0;p.raise("Unterminated group")}return!1},st.regexp_eatModifiers=function(p){for(var D="",j=0;(j=p.current())!==-1&&ti(j);)D+=I(j),p.advance();return D};function ti(p){return p===105||p===109||p===115}st.regexp_eatExtendedAtom=function(p){return p.eat(46)||this.regexp_eatReverseSolidusAtomEscape(p)||this.regexp_eatCharacterClass(p)||this.regexp_eatUncapturingGroup(p)||this.regexp_eatCapturingGroup(p)||this.regexp_eatInvalidBracedQuantifier(p)||this.regexp_eatExtendedPatternCharacter(p)},st.regexp_eatInvalidBracedQuantifier=function(p){return this.regexp_eatBracedQuantifier(p,!0)&&p.raise("Nothing to repeat"),!1},st.regexp_eatSyntaxCharacter=function(p){var D=p.current();return $r(D)?(p.lastIntValue=D,p.advance(),!0):!1};function $r(p){return p===36||p>=40&&p<=43||p===46||p===63||p>=91&&p<=94||p>=123&&p<=125}st.regexp_eatPatternCharacters=function(p){for(var D=p.pos,j=0;(j=p.current())!==-1&&!$r(j);)p.advance();return p.pos!==D},st.regexp_eatExtendedPatternCharacter=function(p){var D=p.current();return D!==-1&&D!==36&&!(D>=40&&D<=43)&&D!==46&&D!==63&&D!==91&&D!==94&&D!==124?(p.advance(),!0):!1},st.regexp_groupSpecifier=function(p){if(p.eat(63)){this.regexp_eatGroupName(p)||p.raise("Invalid group");var D=this.options.ecmaVersion>=16,j=p.groupNames[p.lastStringValue];if(j)if(D)for(var U=0,se=j;U=11,U=p.current(j);return p.advance(j),U===92&&this.regexp_eatRegExpUnicodeEscapeSequence(p,j)&&(U=p.lastIntValue),qa(U)?(p.lastIntValue=U,!0):(p.pos=D,!1)};function qa(p){return b(p,!0)||p===36||p===95}st.regexp_eatRegExpIdentifierPart=function(p){var D=p.pos,j=this.options.ecmaVersion>=11,U=p.current(j);return p.advance(j),U===92&&this.regexp_eatRegExpUnicodeEscapeSequence(p,j)&&(U=p.lastIntValue),na(U)?(p.lastIntValue=U,!0):(p.pos=D,!1)};function na(p){return x(p,!0)||p===36||p===95||p===8204||p===8205}st.regexp_eatAtomEscape=function(p){return this.regexp_eatBackReference(p)||this.regexp_eatCharacterClassEscape(p)||this.regexp_eatCharacterEscape(p)||p.switchN&&this.regexp_eatKGroupName(p)?!0:(p.switchU&&(p.current()===99&&p.raise("Invalid unicode escape"),p.raise("Invalid escape")),!1)},st.regexp_eatBackReference=function(p){var D=p.pos;if(this.regexp_eatDecimalEscape(p)){var j=p.lastIntValue;if(p.switchU)return j>p.maxBackReference&&(p.maxBackReference=j),!0;if(j<=p.numCapturingParens)return!0;p.pos=D}return!1},st.regexp_eatKGroupName=function(p){if(p.eat(107)){if(this.regexp_eatGroupName(p))return p.backReferenceNames.push(p.lastStringValue),!0;p.raise("Invalid named reference")}return!1},st.regexp_eatCharacterEscape=function(p){return this.regexp_eatControlEscape(p)||this.regexp_eatCControlLetter(p)||this.regexp_eatZero(p)||this.regexp_eatHexEscapeSequence(p)||this.regexp_eatRegExpUnicodeEscapeSequence(p,!1)||!p.switchU&&this.regexp_eatLegacyOctalEscapeSequence(p)||this.regexp_eatIdentityEscape(p)},st.regexp_eatCControlLetter=function(p){var D=p.pos;if(p.eat(99)){if(this.regexp_eatControlLetter(p))return!0;p.pos=D}return!1},st.regexp_eatZero=function(p){return p.current()===48&&!sa(p.lookahead())?(p.lastIntValue=0,p.advance(),!0):!1},st.regexp_eatControlEscape=function(p){var D=p.current();return D===116?(p.lastIntValue=9,p.advance(),!0):D===110?(p.lastIntValue=10,p.advance(),!0):D===118?(p.lastIntValue=11,p.advance(),!0):D===102?(p.lastIntValue=12,p.advance(),!0):D===114?(p.lastIntValue=13,p.advance(),!0):!1},st.regexp_eatControlLetter=function(p){var D=p.current();return ra(D)?(p.lastIntValue=D%32,p.advance(),!0):!1};function ra(p){return p>=65&&p<=90||p>=97&&p<=122}st.regexp_eatRegExpUnicodeEscapeSequence=function(p,D){D===void 0&&(D=!1);var j=p.pos,U=D||p.switchU;if(p.eat(117)){if(this.regexp_eatFixedHexDigits(p,4)){var se=p.lastIntValue;if(U&&se>=55296&&se<=56319){var Ee=p.pos;if(p.eat(92)&&p.eat(117)&&this.regexp_eatFixedHexDigits(p,4)){var ke=p.lastIntValue;if(ke>=56320&&ke<=57343)return p.lastIntValue=(se-55296)*1024+(ke-56320)+65536,!0}p.pos=Ee,p.lastIntValue=se}return!0}if(U&&p.eat(123)&&this.regexp_eatHexDigits(p)&&p.eat(125)&&nf(p.lastIntValue))return!0;U&&p.raise("Invalid unicode escape"),p.pos=j}return!1};function nf(p){return p>=0&&p<=1114111}st.regexp_eatIdentityEscape=function(p){if(p.switchU)return this.regexp_eatSyntaxCharacter(p)?!0:p.eat(47)?(p.lastIntValue=47,!0):!1;var D=p.current();return D!==99&&(!p.switchN||D!==107)?(p.lastIntValue=D,p.advance(),!0):!1},st.regexp_eatDecimalEscape=function(p){p.lastIntValue=0;var D=p.current();if(D>=49&&D<=57){do p.lastIntValue=10*p.lastIntValue+(D-48),p.advance();while((D=p.current())>=48&&D<=57);return!0}return!1};var Du=0,yi=1,ni=2;st.regexp_eatCharacterClassEscape=function(p){var D=p.current();if(ia(D))return p.lastIntValue=-1,p.advance(),yi;var j=!1;if(p.switchU&&this.options.ecmaVersion>=9&&((j=D===80)||D===112)){p.lastIntValue=-1,p.advance();var U;if(p.eat(123)&&(U=this.regexp_eatUnicodePropertyValueExpression(p))&&p.eat(125))return j&&U===ni&&p.raise("Invalid property name"),U;p.raise("Invalid property name")}return Du};function ia(p){return p===100||p===68||p===115||p===83||p===119||p===87}st.regexp_eatUnicodePropertyValueExpression=function(p){var D=p.pos;if(this.regexp_eatUnicodePropertyName(p)&&p.eat(61)){var j=p.lastStringValue;if(this.regexp_eatUnicodePropertyValue(p)){var U=p.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(p,j,U),yi}}if(p.pos=D,this.regexp_eatLoneUnicodePropertyNameOrValue(p)){var se=p.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(p,se)}return Du},st.regexp_validateUnicodePropertyNameAndValue=function(p,D,j){ve(p.unicodeProperties.nonBinary,D)||p.raise("Invalid property name"),p.unicodeProperties.nonBinary[D].test(j)||p.raise("Invalid property value")},st.regexp_validateUnicodePropertyNameOrValue=function(p,D){if(p.unicodeProperties.binary.test(D))return yi;if(p.switchV&&p.unicodeProperties.binaryOfStrings.test(D))return ni;p.raise("Invalid property name")},st.regexp_eatUnicodePropertyName=function(p){var D=0;for(p.lastStringValue="";Ps(D=p.current());)p.lastStringValue+=I(D),p.advance();return p.lastStringValue!==""};function Ps(p){return ra(p)||p===95}st.regexp_eatUnicodePropertyValue=function(p){var D=0;for(p.lastStringValue="";Pi(D=p.current());)p.lastStringValue+=I(D),p.advance();return p.lastStringValue!==""};function Pi(p){return Ps(p)||sa(p)}st.regexp_eatLoneUnicodePropertyNameOrValue=function(p){return this.regexp_eatUnicodePropertyValue(p)},st.regexp_eatCharacterClass=function(p){if(p.eat(91)){var D=p.eat(94),j=this.regexp_classContents(p);return p.eat(93)||p.raise("Unterminated character class"),D&&j===ni&&p.raise("Negated character class may contain strings"),!0}return!1},st.regexp_classContents=function(p){return p.current()===93?yi:p.switchV?this.regexp_classSetExpression(p):(this.regexp_nonEmptyClassRanges(p),yi)},st.regexp_nonEmptyClassRanges=function(p){for(;this.regexp_eatClassAtom(p);){var D=p.lastIntValue;if(p.eat(45)&&this.regexp_eatClassAtom(p)){var j=p.lastIntValue;p.switchU&&(D===-1||j===-1)&&p.raise("Invalid character class"),D!==-1&&j!==-1&&D>j&&p.raise("Range out of order in character class")}}},st.regexp_eatClassAtom=function(p){var D=p.pos;if(p.eat(92)){if(this.regexp_eatClassEscape(p))return!0;if(p.switchU){var j=p.current();(j===99||aa(j))&&p.raise("Invalid class escape"),p.raise("Invalid escape")}p.pos=D}var U=p.current();return U!==93?(p.lastIntValue=U,p.advance(),!0):!1},st.regexp_eatClassEscape=function(p){var D=p.pos;if(p.eat(98))return p.lastIntValue=8,!0;if(p.switchU&&p.eat(45))return p.lastIntValue=45,!0;if(!p.switchU&&p.eat(99)){if(this.regexp_eatClassControlLetter(p))return!0;p.pos=D}return this.regexp_eatCharacterClassEscape(p)||this.regexp_eatCharacterEscape(p)},st.regexp_classSetExpression=function(p){var D=yi,j;if(!this.regexp_eatClassSetRange(p))if(j=this.regexp_eatClassSetOperand(p)){j===ni&&(D=ni);for(var U=p.pos;p.eatChars([38,38]);){if(p.current()!==38&&(j=this.regexp_eatClassSetOperand(p))){j!==ni&&(D=yi);continue}p.raise("Invalid character in character class")}if(U!==p.pos)return D;for(;p.eatChars([45,45]);)this.regexp_eatClassSetOperand(p)||p.raise("Invalid character in character class");if(U!==p.pos)return D}else p.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(p)){if(j=this.regexp_eatClassSetOperand(p),!j)return D;j===ni&&(D=ni)}},st.regexp_eatClassSetRange=function(p){var D=p.pos;if(this.regexp_eatClassSetCharacter(p)){var j=p.lastIntValue;if(p.eat(45)&&this.regexp_eatClassSetCharacter(p)){var U=p.lastIntValue;return j!==-1&&U!==-1&&j>U&&p.raise("Range out of order in character class"),!0}p.pos=D}return!1},st.regexp_eatClassSetOperand=function(p){return this.regexp_eatClassSetCharacter(p)?yi:this.regexp_eatClassStringDisjunction(p)||this.regexp_eatNestedClass(p)},st.regexp_eatNestedClass=function(p){var D=p.pos;if(p.eat(91)){var j=p.eat(94),U=this.regexp_classContents(p);if(p.eat(93))return j&&U===ni&&p.raise("Negated character class may contain strings"),U;p.pos=D}if(p.eat(92)){var se=this.regexp_eatCharacterClassEscape(p);if(se)return se;p.pos=D}return null},st.regexp_eatClassStringDisjunction=function(p){var D=p.pos;if(p.eatChars([92,113])){if(p.eat(123)){var j=this.regexp_classStringDisjunctionContents(p);if(p.eat(125))return j}else p.raise("Invalid escape");p.pos=D}return null},st.regexp_classStringDisjunctionContents=function(p){for(var D=this.regexp_classString(p);p.eat(124);)this.regexp_classString(p)===ni&&(D=ni);return D},st.regexp_classString=function(p){for(var D=0;this.regexp_eatClassSetCharacter(p);)D++;return D===1?yi:ni},st.regexp_eatClassSetCharacter=function(p){var D=p.pos;if(p.eat(92))return this.regexp_eatCharacterEscape(p)||this.regexp_eatClassSetReservedPunctuator(p)?!0:p.eat(98)?(p.lastIntValue=8,!0):(p.pos=D,!1);var j=p.current();return j<0||j===p.lookahead()&&bl(j)||xn(j)?!1:(p.advance(),p.lastIntValue=j,!0)};function bl(p){return p===33||p>=35&&p<=38||p>=42&&p<=44||p===46||p>=58&&p<=64||p===94||p===96||p===126}function xn(p){return p===40||p===41||p===45||p===47||p>=91&&p<=93||p>=123&&p<=125}st.regexp_eatClassSetReservedPunctuator=function(p){var D=p.current();return Gt(D)?(p.lastIntValue=D,p.advance(),!0):!1};function Gt(p){return p===33||p===35||p===37||p===38||p===44||p===45||p>=58&&p<=62||p===64||p===96||p===126}st.regexp_eatClassControlLetter=function(p){var D=p.current();return sa(D)||D===95?(p.lastIntValue=D%32,p.advance(),!0):!1},st.regexp_eatHexEscapeSequence=function(p){var D=p.pos;if(p.eat(120)){if(this.regexp_eatFixedHexDigits(p,2))return!0;p.switchU&&p.raise("Invalid escape"),p.pos=D}return!1},st.regexp_eatDecimalDigits=function(p){var D=p.pos,j=0;for(p.lastIntValue=0;sa(j=p.current());)p.lastIntValue=10*p.lastIntValue+(j-48),p.advance();return p.pos!==D};function sa(p){return p>=48&&p<=57}st.regexp_eatHexDigits=function(p){var D=p.pos,j=0;for(p.lastIntValue=0;nr(j=p.current());)p.lastIntValue=16*p.lastIntValue+Nn(j),p.advance();return p.pos!==D};function nr(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function Nn(p){return p>=65&&p<=70?10+(p-65):p>=97&&p<=102?10+(p-97):p-48}st.regexp_eatLegacyOctalEscapeSequence=function(p){if(this.regexp_eatOctalDigit(p)){var D=p.lastIntValue;if(this.regexp_eatOctalDigit(p)){var j=p.lastIntValue;D<=3&&this.regexp_eatOctalDigit(p)?p.lastIntValue=D*64+j*8+p.lastIntValue:p.lastIntValue=D*8+j}else p.lastIntValue=D;return!0}return!1},st.regexp_eatOctalDigit=function(p){var D=p.current();return aa(D)?(p.lastIntValue=D-48,p.advance(),!0):(p.lastIntValue=0,!1)};function aa(p){return p>=48&&p<=55}st.regexp_eatFixedHexDigits=function(p,D){var j=p.pos;p.lastIntValue=0;for(var U=0;U=this.input.length)return this.finishToken(w.eof);if(p.override)return p.override(this);this.readToken(this.fullCharCodeAtPos())},tn.readToken=function(p){return b(p,this.options.ecmaVersion>=6)||p===92?this.readWord():this.getTokenFromCode(p)},tn.fullCharCodeAt=function(p){var D=this.input.charCodeAt(p);if(D<=55295||D>=56320)return D;var j=this.input.charCodeAt(p+1);return j<=56319||j>=57344?D:(D<<10)+j-56613888},tn.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},tn.skipBlockComment=function(){var p=this.options.onComment&&this.curPosition(),D=this.pos,j=this.input.indexOf("*/",this.pos+=2);if(j===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=j+2,this.options.locations)for(var U=void 0,se=D;(U=M(this.input,se,this.pos))>-1;)++this.curLine,se=this.lineStart=U;this.options.onComment&&this.options.onComment(!0,this.input.slice(D+2,j),D,this.pos,p,this.curPosition())},tn.skipLineComment=function(p){for(var D=this.pos,j=this.options.onComment&&this.curPosition(),U=this.input.charCodeAt(this.pos+=p);this.pos8&&p<14||p>=5760&&F.test(String.fromCharCode(p)))++this.pos;else break e}}},tn.finishToken=function(p,D){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var j=this.type;this.type=p,this.value=D,this.updateContext(j)},tn.readToken_dot=function(){var p=this.input.charCodeAt(this.pos+1);if(p>=48&&p<=57)return this.readNumber(!0);var D=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&p===46&&D===46?(this.pos+=3,this.finishToken(w.ellipsis)):(++this.pos,this.finishToken(w.dot))},tn.readToken_slash=function(){var p=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):p===61?this.finishOp(w.assign,2):this.finishOp(w.slash,1)},tn.readToken_mult_modulo_exp=function(p){var D=this.input.charCodeAt(this.pos+1),j=1,U=p===42?w.star:w.modulo;return this.options.ecmaVersion>=7&&p===42&&D===42&&(++j,U=w.starstar,D=this.input.charCodeAt(this.pos+2)),D===61?this.finishOp(w.assign,j+1):this.finishOp(U,j)},tn.readToken_pipe_amp=function(p){var D=this.input.charCodeAt(this.pos+1);if(D===p){if(this.options.ecmaVersion>=12){var j=this.input.charCodeAt(this.pos+2);if(j===61)return this.finishOp(w.assign,3)}return this.finishOp(p===124?w.logicalOR:w.logicalAND,2)}return D===61?this.finishOp(w.assign,2):this.finishOp(p===124?w.bitwiseOR:w.bitwiseAND,1)},tn.readToken_caret=function(){var p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(w.assign,2):this.finishOp(w.bitwiseXOR,1)},tn.readToken_plus_min=function(p){var D=this.input.charCodeAt(this.pos+1);return D===p?D===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||A.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(w.incDec,2):D===61?this.finishOp(w.assign,2):this.finishOp(w.plusMin,1)},tn.readToken_lt_gt=function(p){var D=this.input.charCodeAt(this.pos+1),j=1;return D===p?(j=p===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+j)===61?this.finishOp(w.assign,j+1):this.finishOp(w.bitShift,j)):D===33&&p===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(D===61&&(j=2),this.finishOp(w.relational,j))},tn.readToken_eq_excl=function(p){var D=this.input.charCodeAt(this.pos+1);return D===61?this.finishOp(w.equality,this.input.charCodeAt(this.pos+2)===61?3:2):p===61&&D===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(w.arrow)):this.finishOp(p===61?w.eq:w.prefix,1)},tn.readToken_question=function(){var p=this.options.ecmaVersion;if(p>=11){var D=this.input.charCodeAt(this.pos+1);if(D===46){var j=this.input.charCodeAt(this.pos+2);if(j<48||j>57)return this.finishOp(w.questionDot,2)}if(D===63){if(p>=12){var U=this.input.charCodeAt(this.pos+2);if(U===61)return this.finishOp(w.assign,3)}return this.finishOp(w.coalesce,2)}}return this.finishOp(w.question,1)},tn.readToken_numberSign=function(){var p=this.options.ecmaVersion,D=35;if(p>=13&&(++this.pos,D=this.fullCharCodeAtPos(),b(D,!0)||D===92))return this.finishToken(w.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+I(D)+"'")},tn.getTokenFromCode=function(p){switch(p){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(w.parenL);case 41:return++this.pos,this.finishToken(w.parenR);case 59:return++this.pos,this.finishToken(w.semi);case 44:return++this.pos,this.finishToken(w.comma);case 91:return++this.pos,this.finishToken(w.bracketL);case 93:return++this.pos,this.finishToken(w.bracketR);case 123:return++this.pos,this.finishToken(w.braceL);case 125:return++this.pos,this.finishToken(w.braceR);case 58:return++this.pos,this.finishToken(w.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(w.backQuote);case 48:var D=this.input.charCodeAt(this.pos+1);if(D===120||D===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(D===111||D===79)return this.readRadixNumber(8);if(D===98||D===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(p);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(p);case 124:case 38:return this.readToken_pipe_amp(p);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(p);case 60:case 62:return this.readToken_lt_gt(p);case 61:case 33:return this.readToken_eq_excl(p);case 63:return this.readToken_question();case 126:return this.finishOp(w.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+I(p)+"'")},tn.finishOp=function(p,D){var j=this.input.slice(this.pos,this.pos+D);return this.pos+=D,this.finishToken(p,j)},tn.readRegexp=function(){for(var p,D,j=this.pos;;){this.pos>=this.input.length&&this.raise(j,"Unterminated regular expression");var U=this.input.charAt(this.pos);if(A.test(U)&&this.raise(j,"Unterminated regular expression"),p)p=!1;else{if(U==="[")D=!0;else if(U==="]"&&D)D=!1;else if(U==="/"&&!D)break;p=U==="\\"}++this.pos}var se=this.input.slice(j,this.pos);++this.pos;var Ee=this.pos,ke=this.readWord1();this.containsEsc&&this.unexpected(Ee);var qe=this.regexpState||(this.regexpState=new Er(this));qe.reset(j,se,ke),this.validateRegExpFlags(qe),this.validateRegExpPattern(qe);var rt=null;try{rt=new RegExp(se,ke)}catch{}return this.finishToken(w.regexp,{pattern:se,flags:ke,value:rt})},tn.readInt=function(p,D,j){for(var U=this.options.ecmaVersion>=12&&D===void 0,se=j&&this.input.charCodeAt(this.pos)===48,Ee=this.pos,ke=0,qe=0,rt=0,It=D??1/0;rt=97?Mn=Kt-97+10:Kt>=65?Mn=Kt-65+10:Kt>=48&&Kt<=57?Mn=Kt-48:Mn=1/0,Mn>=p)break;qe=Kt,ke=ke*p+Mn}return U&&qe===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===Ee||D!=null&&this.pos-Ee!==D?null:ke};function oa(p,D){return D?parseInt(p,8):parseFloat(p.replace(/_/g,""))}function at(p){return typeof BigInt!="function"?null:BigInt(p.replace(/_/g,""))}tn.readRadixNumber=function(p){var D=this.pos;this.pos+=2;var j=this.readInt(p);return j==null&&this.raise(this.start+2,"Expected number in radix "+p),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(j=at(this.input.slice(D,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,j)},tn.readNumber=function(p){var D=this.pos;!p&&this.readInt(10,void 0,!0)===null&&this.raise(D,"Invalid number");var j=this.pos-D>=2&&this.input.charCodeAt(D)===48;j&&this.strict&&this.raise(D,"Invalid number");var U=this.input.charCodeAt(this.pos);if(!j&&!p&&this.options.ecmaVersion>=11&&U===110){var se=at(this.input.slice(D,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,se)}j&&/[89]/.test(this.input.slice(D,this.pos))&&(j=!1),U===46&&!j&&(++this.pos,this.readInt(10),U=this.input.charCodeAt(this.pos)),(U===69||U===101)&&!j&&(U=this.input.charCodeAt(++this.pos),(U===43||U===45)&&++this.pos,this.readInt(10)===null&&this.raise(D,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var Ee=oa(this.input.slice(D,this.pos),j);return this.finishToken(w.num,Ee)},tn.readCodePoint=function(){var p=this.input.charCodeAt(this.pos),D;if(p===123){this.options.ecmaVersion<6&&this.unexpected();var j=++this.pos;D=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,D>1114111&&this.invalidStringToken(j,"Code point out of bounds")}else D=this.readHexChar(4);return D},tn.readString=function(p){for(var D="",j=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var U=this.input.charCodeAt(this.pos);if(U===p)break;U===92?(D+=this.input.slice(j,this.pos),D+=this.readEscapedChar(!1),j=this.pos):U===8232||U===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(P(U)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return D+=this.input.slice(j,this.pos++),this.finishToken(w.string,D)};var vt={};tn.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(p){if(p===vt)this.readInvalidTemplateToken();else throw p}this.inTemplateElement=!1},tn.invalidStringToken=function(p,D){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw vt;this.raise(p,D)},tn.readTmplToken=function(){for(var p="",D=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var j=this.input.charCodeAt(this.pos);if(j===96||j===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===w.template||this.type===w.invalidTemplate)?j===36?(this.pos+=2,this.finishToken(w.dollarBraceL)):(++this.pos,this.finishToken(w.backQuote)):(p+=this.input.slice(D,this.pos),this.finishToken(w.template,p));if(j===92)p+=this.input.slice(D,this.pos),p+=this.readEscapedChar(!0),D=this.pos;else if(P(j)){switch(p+=this.input.slice(D,this.pos),++this.pos,j){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:p+=` -`;break;default:p+=String.fromCharCode(j);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),D=this.pos}else++this.pos}},tn.readInvalidTemplateToken=function(){for(;this.pos=48&&D<=55){var U=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],se=parseInt(U,8);return se>255&&(U=U.slice(0,-1),se=parseInt(U,8)),this.pos+=U.length-1,D=this.input.charCodeAt(this.pos),(U!=="0"||D===56||D===57)&&(this.strict||p)&&this.invalidStringToken(this.pos-1-U.length,p?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(se)}return P(D)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(D)}},tn.readHexChar=function(p){var D=this.pos,j=this.readInt(16,p);return j===null&&this.invalidStringToken(D,"Bad character escape sequence"),j},tn.readWord1=function(){this.containsEsc=!1;for(var p="",D=!0,j=this.pos,U=this.options.ecmaVersion>=6;this.pos...",!0,!0),E={tc_oTag:g,tc_cTag:b,tc_expr:x},C={jsxName:new m("jsxName"),jsxText:new m("jsxText",{beforeExpr:!0}),jsxTagStart:new m("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new m("jsxTagEnd")};C.jsxTagStart.updateContext=function(){this.context.push(x),this.context.push(g),this.exprAllowed=!1},C.jsxTagEnd.updateContext=function(y){let _=this.context.pop();_===g&&y===f.slash||_===b?(this.context.pop(),this.exprAllowed=this.curContext()===x):this.exprAllowed=!0},u={tokContexts:E,tokTypes:C},i.set(l,u)}return u}function a(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return a(l.object)+"."+a(l.property)}e.exports=function(l){return l=l||{},function(u){return o({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},u)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(J9()).tokTypes},configurable:!0,enumerable:!0});function o(l,u){const f=u.acorn||J9(),h=s(f),m=f.tokTypes,g=h.tokTypes,b=f.tokContexts,x=h.tokContexts.tc_oTag,E=h.tokContexts.tc_cTag,C=h.tokContexts.tc_expr,y=f.isNewLine,_=f.isIdentifierStart,O=f.isIdentifierChar;return class extends u{static get acornJsx(){return h}jsx_readToken(){let S="",w=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let A=this.input.charCodeAt(this.pos);switch(A){case 60:case 123:return this.pos===this.start?A===60&&this.exprAllowed?(++this.pos,this.finishToken(g.jsxTagStart)):this.getTokenFromCode(A):(S+=this.input.slice(w,this.pos),this.finishToken(g.jsxText,S));case 38:S+=this.input.slice(w,this.pos),S+=this.jsx_readEntity(),w=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(A===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:y(A)?(S+=this.input.slice(w,this.pos),S+=this.jsx_readNewLine(!0),w=this.pos):++this.pos}}}jsx_readNewLine(S){let w=this.input.charCodeAt(this.pos),A;return++this.pos,w===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,A=S?` -`:`\r -`):A=String.fromCharCode(w),this.options.locations&&(++this.curLine,this.lineStart=this.pos),A}jsx_readString(S){let w="",A=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let T=this.input.charCodeAt(this.pos);if(T===S)break;T===38?(w+=this.input.slice(A,this.pos),w+=this.jsx_readEntity(),A=this.pos):y(T)?(w+=this.input.slice(A,this.pos),w+=this.jsx_readNewLine(!1),A=this.pos):++this.pos}return w+=this.input.slice(A,this.pos++),this.finishToken(m.string,w)}jsx_readEntity(){let S="",w=0,A,T=this.input[this.pos];T!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;for(;this.pos")}let F=P.name?"Element":"Fragment";return A["opening"+F]=P,A["closing"+F]=M,A.children=T,this.type===m.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(A,"JSX"+F)}jsx_parseText(){let S=this.parseLiteral(this.value);return S.type="JSXText",S}jsx_parseElement(){let S=this.start,w=this.startLoc;return this.next(),this.jsx_parseElementAt(S,w)}parseExprAtom(S){return this.type===g.jsxText?this.jsx_parseText():this.type===g.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(S)}readToken(S){let w=this.curContext();if(w===C)return this.jsx_readToken();if(w===x||w===E){if(_(S))return this.jsx_readWord();if(S==62)return++this.pos,this.finishToken(g.jsxTagEnd);if((S===34||S===39)&&w==x)return this.jsx_readString(S)}return S===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(g.jsxTagStart)):super.readToken(S)}updateContext(S){if(this.type==m.braceL){var w=this.curContext();w==x?this.context.push(b.b_expr):w==C?this.context.push(b.b_tmpl):super.updateContext(S),this.exprAllowed=!0}else if(this.type===m.slash&&S===g.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(S)}}}})(O2)),O2.exports}var Rde=Pde();const uL=Nr(Rde),Xr=hl(/[A-Za-z]/),Ti=hl(/[\dA-Za-z]/),Fde=hl(/[#-'*+\--9=?A-Z^-~]/);function Gp(e){return e!==null&&(e<32||e===127)}const m4=hl(/\d/),Ide=hl(/[\dA-Fa-f]/),cL=hl(/[!-/:-@[-`{-~]/);function wt(e){return e!==null&&e<-2}function Cn(e){return e!==null&&(e<0||e===32)}function nn(e){return e===-2||e===-1||e===32}const Km=hl(new RegExp("\\p{P}|\\p{S}","u")),Di=hl(/\s/);function hl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hn(e,t,n,r){const i=r?r-1:1/0;let s=0;return a;function a(l){return nn(l)?(e.enter(n),o(l)):t(l)}function o(l){return nn(l)&&s++=i?t(f):n(f)}}const Mde={}.hasOwnProperty,Lde=Symbol("continue"),P2=Symbol("exit"),zde=Symbol("skip");function jde(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(s,a,o,l){return R2(s)&&(u.displayName="node ("+s.type+")"),u;function u(){const f=n?Q9(n(s,a,o,l)):[];if(f[0]===P2)return f;if(f[0]!==zde){let h;for(h in s)if(Mde.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const m=l.concat(s),g=s[h];if(Array.isArray(g)){const b=g;let x=0;for(;x>-1&&x0)}function S3(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),s=[],a=[],o=i.onComment,l=i.onToken;let u=!1,f,h;const m=Object.assign({},i,{onComment:s,preserveParens:!0});l&&(m.onToken=a);const g=qde(e,t.tokenTypes),b=g.value,x=n+b+r,E=t.expression&&Z9(b);if(E&&!t.allowEmpty)throw new In("Unexpected empty expression",{place:y(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{f=t.expression&&!E?t.acorn.parseExpressionAt(x,0,m):t.acorn.parse(x,m)}catch(_){const O=_,S=y(O.pos);O.message=String(O.message).replace(/ \(\d+:\d+\)$/,""),O.pos=S.offset,O.loc={line:S.line,column:S.column-1},h=O,u=O.raisedAt>=n.length+b.length||O.message==="Unterminated comment"}if(f&&t.expression&&!E)if(Z9(x.slice(f.end,x.length-r.length)))f={type:"Program",start:0,end:n.length+b.length,body:[{type:"ExpressionStatement",expression:f,start:0,end:n.length+b.length}],sourceType:"module",comments:[]};else{const _=y(f.end),O=new Error("Unexpected content after expression");O.pos=_.offset,O.loc={line:_.line,column:_.column-1},h=O,f=void 0}if(f){if(f.comments=s,jde(f,function(_,O,S,w){let A=w[w.length-1],T=O;_.type==="ParenthesizedExpression"&&A&&T&&(typeof S=="number"&&(A=A[T],T=S),A[T]=_.expression),C(_)}),Array.isArray(o))o.push(...s);else if(typeof o=="function")for(const _ of s)o(_.type==="Block",_.value,_.start,_.end,_.loc.start,_.loc.end);for(const _ of a)_.end<=n.length||_.start-n.length>=b.length||(C(_),Array.isArray(l)?l.push(_):l(_))}return{estree:f,error:h,swallow:u};function C(_){const O=y(_.start),S=y(_.end);_.start=O.offset,_.end=S.offset,_.loc={start:{line:O.line,column:O.column-1,offset:O.offset},end:{line:S.line,column:S.column-1,offset:S.offset}},_.range=[_.start,_.end]}function y(_){let O=_-n.length;O<0?O=0:O>b.length&&(O=b.length);let S=$de(g.stops,O);return S||(S={line:t.start.line,column:t.start.column,offset:t.start.offset}),S}}function Z9(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function qde(e,t){const n={value:"",stops:[]};let r=-1;for(;++r0&&a[0]===-1;)a.shift();const o=Vde(a);n.stops.push([n.value.length,i[1].start]),n.value+=o,n.stops.push([n.value.length,i[1].end])}}}return n}function $de(e,t){let n=0;for(;n-1?e:void 0}const Ude=2,dc="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",Hde="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",Wde="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",tT="#unexpected-type-in-code-expected-an-object-spread-spread",Kde="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",Gde="#could-not-parse-expression-with-acorn";function Yp(e,t,n,r,i,s,a,o,l,u,f){const h=this,m=this.events.length+3;let g=0,b,x;return E;function E(O){return e.enter(n),e.enter(r),e.consume(O),e.exit(r),b=h.now(),C}function C(O){if(O===null){if(x)throw x;const S=new In("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw S.url=dc+Hde,S}if(wt(O))return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),_;if(O===125&&g===0){const S=s?Yde.call(h,s,a,i,m,b,u||!1,l||!1):{type:"ok",estree:void 0};if(S.type==="ok"){e.enter(r),e.consume(O),e.exit(r);const w=e.exit(n);return o&&S.estree&&Object.assign(w,{estree:S.estree}),t}return x=S.message,e.enter(i),e.consume(O),y}return e.enter(i),y(O)}function y(O){return O===125&&g===0||O===null||wt(O)?(e.exit(i),C(O)):(O===123&&!s?g+=1:O===125&&(g-=1),e.consume(O),y)}function _(O){const S=h.now();if(S.line!==b.line&&!f&&h.parser.lazy[S.line]){const w=new In("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw w.url=dc+Wde,w}return nn(O)?hn(e,C,"linePrefix",Ude+1)(O):C(O)}}function Yde(e,t,n,r,i,s,a){const o=S3(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:s,prefix:a?"({":"",suffix:a?"})":""}),l=o.estree;if(a&&l){const u=l.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const f=op(u),h=new In("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:f.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=dc+tT,h}if(u.expression.properties[1]){const f=op(u.expression.properties[1]),h=new In("Unexpected extra content in spread: only a single spread is supported",{place:f.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=dc+Kde,h}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const f=op(u.expression.properties[0]),h=new In("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:f.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=dc+tT,h}}if(o.error){const u=new In("Could not parse expression with acorn",{cause:o.error,place:{line:o.error.loc.line,column:o.error.loc.column+1,offset:o.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=dc+Gde,{type:"nok",message:u}}return{type:"ok",estree:l}}function Jde(e){const t=e||{},n=t.addResult,r=t.acorn,i=t.spread;let s=t.allowEmpty,a;if(s==null&&(s=!0),r){if(!r.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");a=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions)}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:o,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function o(u,f,h){const m=this;return g;function g(C){return b(C)}function b(C){return Yp.call(m,u,x,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",r,a,n,i,s)(C)}function x(C){return nn(C)?hn(u,E,"whitespace")(C):E(C)}function E(C){const y=m.parser.constructs.flow[60],O=(Array.isArray(y)?y:y?[y]:[]).find(function(S){return S.name==="mdxJsxFlowTag"});return C===60&&O?u.attempt(O,E,h)(C):C===null||wt(C)?f(C):h(C)}}function l(u,f){const h=this;return m;function m(g){return Yp.call(h,u,f,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",r,a,n,i,s,!0)(g)}}}const Xde=/[$_\p{ID_Start}]/u,Qde=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Zde=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,ehe={};function $s(e){return e?Xde.test(String.fromCodePoint(e)):!1}function Mf(e,t){const r=(t||ehe).jsx?Zde:Qde;return e?r.test(String.fromCodePoint(e)):!1}const nT="https://github.com/micromark/micromark-extension-mdx-jsx";function dL(e,t,n,r,i,s,a,o,l,u,f,h,m,g,b,x,E,C,y,_,O,S,w,A,T,P,M,F,z,$,Y,Z){const ve=this;let me,re;return de;function de(G){return e.enter(o),e.enter(l),e.consume(G),e.exit(l),I}function I(G){return Cn(G)?n(G):(me=X,gt(G))}function X(G){if(G===47)return e.enter(u),e.consume(G),e.exit(u),me=ne,gt;if(G===62)return kt(G);if(G!==null&&G>=0&&$s(G))return e.enter(h),e.enter(m),e.consume(G),W;be(G,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(G===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ne(G){if(G===62)return kt(G);if(G!==null&&G>=0&&$s(G))return e.enter(h),e.enter(m),e.consume(G),W;be(G,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(G===42||G===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function W(G){if(G!==null&&G>=0&&Mf(G,{jsx:!0}))return e.consume(G),W;if(G===46||G===47||G===58||G===62||G===123||Cn(G)||Di(G))return e.exit(m),me=Te,gt(G);be(G,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(G===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function Te(G){if(G===46)return e.enter(g),e.consume(G),e.exit(g),me=je,gt;if(G===58)return e.enter(x),e.consume(G),e.exit(x),me=pe,gt;if(G===47||G===62||G===123||G!==null&&G>=0&&$s(G))return e.exit(h),ze(G);be(G,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function je(G){if(G!==null&&G>=0&&$s(G))return e.enter(b),e.consume(G),$e;be(G,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function $e(G){if(G!==null&&G>=0&&Mf(G,{jsx:!0}))return e.consume(G),$e;if(G===46||G===47||G===62||G===123||Cn(G)||Di(G))return e.exit(b),me=Me,gt(G);be(G,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(G===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function Me(G){if(G===46)return e.enter(g),e.consume(G),e.exit(g),me=je,gt;if(G===47||G===62||G===123||G!==null&&G>=0&&$s(G))return e.exit(h),ze(G);be(G,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(G){if(G!==null&&G>=0&&$s(G))return e.enter(E),e.consume(G),Oe;be(G,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(G===43||G!==null&&G>46&&G<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function Oe(G){if(G!==null&&G>=0&&Mf(G,{jsx:!0}))return e.consume(G),Oe;if(G===47||G===62||G===123||Cn(G)||Di(G))return e.exit(E),me=Ie,gt(G);be(G,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Ie(G){if(G===47||G===62||G===123||G!==null&&G>=0&&$s(G))return e.exit(h),ze(G);be(G,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ze(G){if(G===47)return e.enter(f),e.consume(G),e.exit(f),me=Wt,gt;if(G===62)return kt(G);if(G===123)return Yp.call(ve,e,le,C,y,_,r,i,s,!0,!1,a)(G);if(G!==null&&G>=0&&$s(G))return e.enter(O),e.enter(S),e.enter(w),e.consume(G),Se;be(G,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function le(G){return me=ze,gt(G)}function Se(G){if(G!==null&&G>=0&&Mf(G,{jsx:!0}))return e.consume(G),Se;if(G===47||G===58||G===61||G===62||G===123||Cn(G)||Di(G))return e.exit(w),me=Ne,gt(G);be(G,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Ne(G){if(G===58)return e.enter(A),e.consume(G),e.exit(A),me=Be,gt;if(G===61)return e.exit(S),e.enter(P),e.consume(G),e.exit(P),me=ut,gt;if(G===47||G===62||G===123||Cn(G)||Di(G)||G!==null&&G>=0&&$s(G))return e.exit(S),e.exit(O),me=ze,gt(G);be(G,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Be(G){if(G!==null&&G>=0&&$s(G))return e.enter(T),e.consume(G),He;be(G,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function He(G){if(G!==null&&G>=0&&Mf(G,{jsx:!0}))return e.consume(G),He;if(G===47||G===61||G===62||G===123||Cn(G)||Di(G))return e.exit(T),e.exit(S),me=Ge,gt(G);be(G,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Ge(G){if(G===61)return e.enter(P),e.consume(G),e.exit(P),me=ut,gt;if(G===47||G===62||G===123||G!==null&&G>=0&&$s(G))return e.exit(O),ze(G);be(G,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ut(G){if(G===34||G===39)return e.enter(M),e.enter(F),e.consume(G),e.exit(F),re=G,ot;if(G===123)return Yp.call(ve,e,Qe,$,Y,Z,r,i,s,!1,!1,a)(G);be(G,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(G===60?" (note: to use an element or fragment as a prop value in MDX, use `{}`)":""))}function Qe(G){return e.exit(O),me=ze,gt(G)}function ot(G){return G===null&&be(G,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(re)+"`"),G===re?(e.enter(F),e.consume(G),e.exit(F),e.exit(M),e.exit(O),re=void 0,me=ze,gt):wt(G)?(me=ot,gt(G)):(e.enter(z),ht(G))}function ht(G){return G===null||G===re||wt(G)?(e.exit(z),ot(G)):(e.consume(G),ht)}function Wt(G){if(G===62)return kt(G);be(G,"after self-closing slash","`>` to end the tag"+(G===42||G===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function kt(G){return e.enter(l),e.consume(G),e.exit(l),e.exit(o),t}function gt(G){return wt(G)?(e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),on):nn(G)||Di(G)?(e.enter("esWhitespace"),Ln(G)):me(G)}function Ln(G){return wt(G)?(e.exit("esWhitespace"),gt(G)):nn(G)||Di(G)?(e.consume(G),Ln):(e.exit("esWhitespace"),me(G))}function on(G){if(!a&&ve.parser.lazy[ve.now().line]){const ft=new In("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ve.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw ft.url=nT+"#unexpected-lazy-line-in-container-expected-line-to-be",ft}return gt(G)}function be(G,ft,lt){const cn=new In("Unexpected "+(G===null?"end of file":"character `"+(G===96?"` ` `":String.fromCodePoint(G))+"` ("+the(G)+")")+" "+ft+", expected "+lt,ve.now(),"micromark-extension-mdx-jsx:unexpected-"+(G===null?"eof":"character"));throw cn.url=nT+(G===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),cn}}function the(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function nhe(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,s){return dL.call(this,r,i,s,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function rhe(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,s){const a=this;return o;function o(h){return l(h)}function l(h){return dL.call(a,r,u,s,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function u(h){return nn(h)?hn(r,f,"whitespace")(h):f(h)}function f(h){const m=a.parser.constructs.flow[123],g=Array.isArray(m)?m:m?[m]:[];let b;for(const x of g)if(x.name==="mdxFlowExpression"){b=x;break}return h===60?o(h):h===123&&b?r.attempt(b,f,s)(h):h===null||wt(h)?i(h):s(h)}}}function ihe(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:rhe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:nhe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function she(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}function Ys(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s0?(Ys(e,e.length,0,t),e):t}function Ba(e){if(e===null||Cn(e)||Di(e))return 1;if(Km(e))return 2}function Gm(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={...e[i][1].end},o={...e[n][1].start};rT(a,-s),rT(o,s);const l={type:s>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},f={type:s>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},h={type:s>1?"strong":"emphasis",start:{...l.start},end:{...u.end}};e[i][1].end={...l.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=xs(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=xs(r,[["enter",h,t],["enter",l,t],["exit",l,t],["enter",f,t]]),r=xs(r,Gm(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=xs(r,[["exit",f,t],["enter",u,t],["exit",u,t],["exit",h,t]]);let m=0;e[n][1].end.offset-e[n][1].start.offset&&(m=2,r=xs(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Ys(e,i-1,n-i+3,r),n=i+r.length-m-2;break}}for(n=-1;++n0&&nn(w)?hn(e,y,"linePrefix",s+1)(w):y(w)}function y(w){return w===null||wt(w)?e.check(v4,x,O)(w):(e.enter("codeFlowValue"),_(w))}function _(w){return w===null||wt(w)?(e.exit("codeFlowValue"),y(w)):(e.consume(w),_)}function O(w){return e.exit("codeFenced"),t(w)}function S(w,A,T){let P=0;return M;function M(Z){return w.enter("lineEnding"),w.consume(Z),w.exit("lineEnding"),F}function F(Z){return w.enter("codeFencedFence"),nn(Z)?hn(w,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):z(Z)}function z(Z){return Z===o?(w.enter("codeFencedFenceSequence"),$(Z)):T(Z)}function $(Z){return Z===o?(P++,w.consume(Z),$):P>=a?(w.exit("codeFencedFenceSequence"),nn(Z)?hn(w,Y,"whitespace")(Z):Y(Z)):T(Z)}function Y(Z){return Z===null||wt(Z)?(w.exit("codeFencedFence"),A(Z)):T(Z)}}}const I2={name:"codeIndented",tokenize:yhe},vhe={partial:!0,tokenize:xhe};function yhe(e,t,n){return r;function r(o){return e.enter("codeIndented"),fL(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?a(o):wt(o)?e.attempt(vhe,i,a)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||wt(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),s)}function a(o){return e.exit("codeIndented"),t(o)}}function xhe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):wt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):fL(e,t,s,"linePrefix",4,4)(a)}function s(a){return wt(a)?i(a):n(a)}}const bhe={name:"codeText",previous:Ehe,resolve:whe,tokenize:Che};function whe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Lf(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Lf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Lf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function vL(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(C){return C===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(C),e.exit(s),m):C===null||C===32||C===41||Gp(C)?n(C):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),x(C))}function m(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===62?(e.exit("chunkString"),e.exit(o),m(C)):C===null||C===60||wt(C)?n(C):(e.consume(C),C===92?b:g)}function b(C){return C===60||C===62||C===92?(e.consume(C),g):g(C)}function x(C){return!f&&(C===null||C===41||Cn(C))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(C)):f999||g===null||g===91||g===93&&!l||g===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(s),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):wt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||wt(g)||o++>999?(e.exit("chunkString"),f(g)):(e.consume(g),l||(l=!nn(g)),g===92?m:h)}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function xL(e,t,n,r,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):n(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),u(m))}function u(m){return m===a?(e.exit(s),l(a)):m===null?n(m):wt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),hn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||wt(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?h:f)}function h(m){return m===a||m===92?(e.consume(m),f):f(m)}}function a0(e,t){let n;return r;function r(i){return wt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nn(i)?hn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Js(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ohe={name:"definition",tokenize:Phe},Bhe={partial:!0,tokenize:Rhe};function Phe(e,t,n){const r=this;let i;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return yL.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return i=Js(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),l):n(g)}function l(g){return Cn(g)?a0(e,u)(g):u(g)}function u(g){return vL(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function f(g){return e.attempt(Bhe,h,h)(g)}function h(g){return nn(g)?hn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||wt(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function Rhe(e,t,n){return r;function r(o){return Cn(o)?a0(e,i)(o):n(o)}function i(o){return xL(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return nn(o)?hn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||wt(o)?t(o):n(o)}}const Fhe={name:"hardBreakEscape",tokenize:Ihe};function Ihe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return wt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Mhe={name:"headingAtx",resolve:Lhe,tokenize:zhe};function Lhe(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};Ys(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])}return e}function zhe(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Cn(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||wt(f)?(e.exit("atxHeading"),t(f)):nn(f)?hn(e,o,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),o(f))}function u(f){return f===null||f===35||Cn(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),u)}}const bL=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],y4=["pre","script","style","textarea"],jhe={concrete:!0,name:"htmlFlow",resolveTo:$he,tokenize:Vhe},qhe={partial:!0,tokenize:Uhe};function $he(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vhe(e,t,n){const r=this;let i,s,a,o,l;return u;function u(W){return f(W)}function f(W){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(W),h}function h(W){return W===33?(e.consume(W),m):W===47?(e.consume(W),s=!0,x):W===63?(e.consume(W),i=3,r.interrupt?t:I):Xr(W)?(e.consume(W),a=String.fromCharCode(W),E):n(W)}function m(W){return W===45?(e.consume(W),i=2,g):W===91?(e.consume(W),i=5,o=0,b):Xr(W)?(e.consume(W),i=4,r.interrupt?t:I):n(W)}function g(W){return W===45?(e.consume(W),r.interrupt?t:I):n(W)}function b(W){const Te="CDATA[";return W===Te.charCodeAt(o++)?(e.consume(W),o===Te.length?r.interrupt?t:z:b):n(W)}function x(W){return Xr(W)?(e.consume(W),a=String.fromCharCode(W),E):n(W)}function E(W){if(W===null||W===47||W===62||Cn(W)){const Te=W===47,je=a.toLowerCase();return!Te&&!s&&y4.includes(je)?(i=1,r.interrupt?t(W):z(W)):bL.includes(a.toLowerCase())?(i=6,Te?(e.consume(W),C):r.interrupt?t(W):z(W)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(W):s?y(W):_(W))}return W===45||Ti(W)?(e.consume(W),a+=String.fromCharCode(W),E):n(W)}function C(W){return W===62?(e.consume(W),r.interrupt?t:z):n(W)}function y(W){return nn(W)?(e.consume(W),y):M(W)}function _(W){return W===47?(e.consume(W),M):W===58||W===95||Xr(W)?(e.consume(W),O):nn(W)?(e.consume(W),_):M(W)}function O(W){return W===45||W===46||W===58||W===95||Ti(W)?(e.consume(W),O):S(W)}function S(W){return W===61?(e.consume(W),w):nn(W)?(e.consume(W),S):_(W)}function w(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(e.consume(W),l=W,A):nn(W)?(e.consume(W),w):T(W)}function A(W){return W===l?(e.consume(W),l=null,P):W===null||wt(W)?n(W):(e.consume(W),A)}function T(W){return W===null||W===34||W===39||W===47||W===60||W===61||W===62||W===96||Cn(W)?S(W):(e.consume(W),T)}function P(W){return W===47||W===62||nn(W)?_(W):n(W)}function M(W){return W===62?(e.consume(W),F):n(W)}function F(W){return W===null||wt(W)?z(W):nn(W)?(e.consume(W),F):n(W)}function z(W){return W===45&&i===2?(e.consume(W),ve):W===60&&i===1?(e.consume(W),me):W===62&&i===4?(e.consume(W),X):W===63&&i===3?(e.consume(W),I):W===93&&i===5?(e.consume(W),de):wt(W)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qhe,ne,$)(W)):W===null||wt(W)?(e.exit("htmlFlowData"),$(W)):(e.consume(W),z)}function $(W){return e.check(v4,Y,ne)(W)}function Y(W){return e.enter("lineEnding"),e.consume(W),e.exit("lineEnding"),Z}function Z(W){return W===null||wt(W)?$(W):(e.enter("htmlFlowData"),z(W))}function ve(W){return W===45?(e.consume(W),I):z(W)}function me(W){return W===47?(e.consume(W),a="",re):z(W)}function re(W){if(W===62){const Te=a.toLowerCase();return y4.includes(Te)?(e.consume(W),X):z(W)}return Xr(W)&&a.length<8?(e.consume(W),a+=String.fromCharCode(W),re):z(W)}function de(W){return W===93?(e.consume(W),I):z(W)}function I(W){return W===62?(e.consume(W),X):W===45&&i===2?(e.consume(W),I):z(W)}function X(W){return W===null||wt(W)?(e.exit("htmlFlowData"),ne(W)):(e.consume(W),X)}function ne(W){return e.exit("htmlFlow"),t(W)}}function Uhe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ef,t,n)}}const Hhe={name:"htmlText",tokenize:Whe};function Whe(e,t,n){const r=this;let i,s,a;return o;function o(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),l}function l(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),S):I===63?(e.consume(I),_):Xr(I)?(e.consume(I),T):n(I)}function u(I){return I===45?(e.consume(I),f):I===91?(e.consume(I),s=0,b):Xr(I)?(e.consume(I),y):n(I)}function f(I){return I===45?(e.consume(I),g):n(I)}function h(I){return I===null?n(I):I===45?(e.consume(I),m):wt(I)?(a=h,me(I)):(e.consume(I),h)}function m(I){return I===45?(e.consume(I),g):h(I)}function g(I){return I===62?ve(I):I===45?m(I):h(I)}function b(I){const X="CDATA[";return I===X.charCodeAt(s++)?(e.consume(I),s===X.length?x:b):n(I)}function x(I){return I===null?n(I):I===93?(e.consume(I),E):wt(I)?(a=x,me(I)):(e.consume(I),x)}function E(I){return I===93?(e.consume(I),C):x(I)}function C(I){return I===62?ve(I):I===93?(e.consume(I),C):x(I)}function y(I){return I===null||I===62?ve(I):wt(I)?(a=y,me(I)):(e.consume(I),y)}function _(I){return I===null?n(I):I===63?(e.consume(I),O):wt(I)?(a=_,me(I)):(e.consume(I),_)}function O(I){return I===62?ve(I):_(I)}function S(I){return Xr(I)?(e.consume(I),w):n(I)}function w(I){return I===45||Ti(I)?(e.consume(I),w):A(I)}function A(I){return wt(I)?(a=A,me(I)):nn(I)?(e.consume(I),A):ve(I)}function T(I){return I===45||Ti(I)?(e.consume(I),T):I===47||I===62||Cn(I)?P(I):n(I)}function P(I){return I===47?(e.consume(I),ve):I===58||I===95||Xr(I)?(e.consume(I),M):wt(I)?(a=P,me(I)):nn(I)?(e.consume(I),P):ve(I)}function M(I){return I===45||I===46||I===58||I===95||Ti(I)?(e.consume(I),M):F(I)}function F(I){return I===61?(e.consume(I),z):wt(I)?(a=F,me(I)):nn(I)?(e.consume(I),F):P(I)}function z(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,$):wt(I)?(a=z,me(I)):nn(I)?(e.consume(I),z):(e.consume(I),Y)}function $(I){return I===i?(e.consume(I),i=void 0,Z):I===null?n(I):wt(I)?(a=$,me(I)):(e.consume(I),$)}function Y(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Cn(I)?P(I):(e.consume(I),Y)}function Z(I){return I===47||I===62||Cn(I)?P(I):n(I)}function ve(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function me(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),re}function re(I){return nn(I)?hn(e,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):de(I)}function de(I){return e.enter("htmlTextData"),a(I)}}const A3={name:"labelEnd",resolveAll:Jhe,resolveTo:Xhe,tokenize:Qhe},Khe={tokenize:Zhe},Ghe={tokenize:epe},Yhe={tokenize:tpe};function Jhe(e){let t=-1;const n=[];for(;++t0&&i[i.length-1]._balanced;)i.pop();s=i[i.length-1]}return o;function o(m){return s?s._inactive?h(m):(a=r.parser.defined.includes(Js(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(Khe,f,a?f:h)(m):m===91?e.attempt(Ghe,f,a?u:h)(m):a?f(m):h(m)}function u(m){return e.attempt(Yhe,f,h)(m)}function f(m){return i.pop(),t(m)}function h(m){return s._balanced=!0,n(m)}}function Zhe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Cn(h)?a0(e,s)(h):s(h)}function s(h){return h===41?f(h):vL(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Cn(h)?a0(e,l)(h):f(h)}function o(h){return n(h)}function l(h){return h===34||h===39||h===40?xL(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Cn(h)?a0(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function epe(e,t,n){const r=this;return i;function i(o){return yL.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Js(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function tpe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const npe={name:"labelStartImage",resolveAll:A3.resolveAll,tokenize:rpe};function rpe(e,t,n){const r=this;let i;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const ipe={name:"labelStartLink",resolveAll:A3.resolveAll,tokenize:spe};function spe(e,t,n){const r=this;let i;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const M2={name:"lineEnding",tokenize:ape};function ape(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),hn(e,t,"linePrefix")}}const lp={name:"thematicBreak",tokenize:ope};function ope(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||wt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),nn(u)?hn(e,o,"whitespace")(u):o(u))}}const Ci={continuation:{tokenize:fpe},exit:hpe,name:"list",tokenize:cpe},lpe={partial:!0,tokenize:ppe},upe={partial:!0,tokenize:dpe};function cpe(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(g){const b=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:m4(g)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(lp,n,u)(g):u(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(g)}return n(g)}function l(g){return m4(g)&&++a<10?(e.consume(g),l):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),u(g)):n(g)}function u(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(ef,r.interrupt?n:f,e.attempt(lpe,m,h))}function f(g){return r.containerState.initialBlankLine=!0,s++,m(g)}function h(g){return nn(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function fpe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ef,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,hn(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!nn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(upe,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,hn(e,e.attempt(Ci,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function dpe(e,t,n){const r=this;return hn(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function hpe(e){e.exit(this.containerState.type)}function ppe(e,t,n){const r=this;return hn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!nn(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}let Jp=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){sT(this,t,n,r,!1)}addBefore(t,n,r){sT(this,t,n,r,!0)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}};function sT(e,t,n,r,i){if(n===0&&r.length===0)return;const s=e.index.get(t);if(s){s[1]+=n,i?(r.push(...s[2]),s[2]=r):s[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}const aT={name:"setextUnderline",resolveTo:mpe,tokenize:gpe};function mpe(e,t){const n=new Jp;let r=e.length,i,s,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(n.add(s,0,[["enter",o,t]]),n.add(a+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[a][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function gpe(e,t,n){const r=this;let i;return s;function s(u){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),nn(u)?hn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||wt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const vpe={tokenize:bpe,partial:!0},oT="https://github.com/micromark/micromark-extension-mdxjs-esm",ype=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function xpe(e){const t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(s,a,o){const l=this,u=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),f=this.events.length+1;let h="";return l.interrupt?o:m;function m(y){return l.now().column>1?o(y):(s.enter("mdxjsEsm"),s.enter("mdxjsEsmData"),s.consume(y),h+=String.fromCharCode(y),g)}function g(y){return Xr(y)?(s.consume(y),h+=String.fromCharCode(y),g):(h==="import"||h==="export")&&y===32?(s.consume(y),b):o(y)}function b(y){return y===null||wt(y)?(s.exit("mdxjsEsmData"),x(y)):(s.consume(y),b)}function x(y){return y===null?C(y):wt(y)?s.check(vpe,C,E)(y):(s.enter("mdxjsEsmData"),b(y))}function E(y){return s.enter("lineEnding"),s.consume(y),s.exit("lineEnding"),x}function C(y){const _=S3(l.events.slice(f),{acorn:n,acornOptions:r,tokenTypes:["mdxjsEsmData"],prefix:u.length>0?"var "+u.join(",")+` -`:""});if(_.error){if(y!==null&&_.swallow)return E(y);const S=new In("Could not parse import/exports with acorn",{cause:_.error,place:{line:_.error.loc.line,column:_.error.loc.column+1,offset:_.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw S.url=oT+"#could-not-parse-importexports-with-acorn",S}u.length>0&&_.estree.body.shift();let O=-1;for(;++O<_.estree.body.length;){const S=_.estree.body[O];if(!ype.has(S.type)){const w=new In("Unexpected `"+S.type+"` in code: only import/exports are supported",{place:op(S),ruleId:"non-esm",source:"micromark-extension-mdxjs-esm"});throw w.url=oT+"#unexpected-type-in-code-only-importexports-are-supported",w}if(S.type==="ImportDeclaration"&&!l.interrupt){let w=-1;for(;++w "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),Ppe);return i(),a}function Ppe(e,t,n){return">"+(n?"":" ")+e}function CL(e,t){return fT(e,t.inConstruct,!0)&&!fT(e,t.notInConstruct,!1)}function fT(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ra&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function x4(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Rpe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Fpe(e,t,n,r){const i=Rpe(n),s=e.value||"";if(x4(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(s,Ipe);return h(),m}const a=n.createTracker(r),o=i.repeat(Math.max(kL(s,i)+1,3)),l=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let f=a.move(o);if(e.lang){const h=n.enter(`codeFencedLang${u}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${u}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:` -`,encode:["`"],...a.current()})),h()}return f+=a.move(` -`),s&&(f+=a.move(s+` -`)),f+=a.move(o),l(),f}function Ipe(e,t,n){return(n?"":" ")+e}function O3(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Mpe(e,t,n,r){const i=O3(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":` -`,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function Lpe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}B3.attention=zpe;B3.peek=jpe;function B3(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function zpe(e,t){return{construct:"emphasis",markers:Lpe(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function jpe(e,t,n){return n.options.emphasis||"*"}function P3(e){return"&#x"+e.toString(16).toUpperCase()+";"}const DL=[],qpe=!0,b4=!1,$pe="skip";function SL(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Jm(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,f){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=DL,b,x,E;if((!t||s(l,u,f[f.length-1]||void 0))&&(g=Vpe(n(l,f)),g[0]===b4))return g;if("children"in l&&l.children){const C=l;if(C.children&&g[0]!==$pe)for(x=(r?C.children.length:-1)+a,E=f.concat(C);x>-1&&x",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function Gpe(){return"!"}OL.peek=Ype;function OL(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const f=n.stack;n.stack=f.filter(function(m){return m!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!u||u!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Ype(){return"!"}BL.peek=Jpe;function BL(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s\u007F]/.test(e.url))}RL.peek=Xpe;function RL(e,t,n,r){const i=O3(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);if(PL(e,n)){const f=n.stack;n.stack=f.filter(function(g){return g!=="phrasing"});const h=n.enter("autolink");let m=a.move("<");return m+=a.move(n.containerPhrasing(e,{before:m,after:">",...a.current()})),m+=a.move(">"),h(),n.stack=f,m}const o=n.enter("link");let l=n.enter("label"),u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function Xpe(e,t,n){return PL(e,n)?"<":"["}FL.peek=Qpe;function FL(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const f=n.stack;n.stack=f.filter(function(m){return m!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!u||u!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function Qpe(){return"["}function F3(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Zpe(e){const t=F3(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function eme(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function IL(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function tme(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?eme(n):F3(n);const o=e.ordered?a==="."?")":".":Zpe(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),IL(n)===a&&f){let h=-1;for(;++h-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),f);return l(),u;function f(h,m,g){return m?(g?"":" ".repeat(a))+h:(g?s:s+" ".repeat(a-s.length))+h}}function ime(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}function sme(e,t,n,r){if(!e.children.some(function(o){return wL(o)}))return n.containerFlow(e,r);const s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),a}function ame(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}I3.attention=ome;I3.peek=lme;function I3(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function ome(e,t){return{construct:"strong",markers:ame(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function lme(e,t,n){return n.options.strong||"*"}function ume(e,t,n,r){const i=t?t.children:[],s=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[s+1],beforeNode:i[s-1]})}function cme(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function fme(e,t,n){const r=(IL(n)+(n.options.ruleSpaces?" ":"")).repeat(cme(n));return n.options.ruleSpaces?r.slice(0,-1):r}const M3={blockquote:Bpe,break:dT,code:Fpe,definition:Mpe,emphasis:B3,hardBreak:dT,heading:Wpe,html:TL,image:NL,imageReference:OL,inlineCode:BL,link:RL,linkReference:FL,list:tme,listItem:rme,paragraph:ime,root:sme,strong:I3,text:ume,thematicBreak:fme};function E4(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const o=e.charCodeAt(2);return o===45?2:o===91?5:Xr(o)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,s=e.charCodeAt(i);if(!Xr(s))return;for(;s===45||Ti(s);)s=e.charCodeAt(++i);const a=e.slice(r,i).toLowerCase();return!n&&s!==47&&y4.includes(a)?1:bL.includes(a)?6:7}const dme=[hme];function hme(e,t,n,r){if(t.type==="code"&&x4(t,r)&&(e.type==="list"||e.type===t.type&&x4(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean"){if(e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&AL(t,r)))return;if(e.type==="html"){const i=E4(e.value);if(i===void 0||i===6||i===7)return 1}if(e.type==="paragraph"&&t.type==="html"){const i=E4(t.value);if(i===void 0||i===7)return 1}return n.spread?1:0}}const jl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],ML=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` -`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\r",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\r",after:"\\r",inConstruct:"phrasing"},{character:` -`,before:"\\n",inConstruct:"phrasing"},{character:` -`,after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:jl},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r -]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:jl},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r -*])`},{character:"*",inConstruct:"phrasing",notInConstruct:jl},{atBreak:!0,character:"+",after:`(?:[ \r -])`},{atBreak:!0,character:"-",after:`(?:[ \r --])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r -]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:jl},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:jl},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:jl},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:jl},{atBreak:!0,character:"~"},{character:"<",inConstruct:"autolink"},{character:">",inConstruct:"autolink"},{character:"",inConstruct:"autolink"}];let pT=-1;for(;++pT<33;)ML.push({character:String.fromCharCode(pT),inConstruct:"autolink"});function LL(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const pme=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zL(e){return e.replace(pme,mme)}function mme(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return LL(n.slice(s?2:1),s?16:10)}return T0(n)||e}function gme(e){return e.label||!e.identifier?e.label||"":zL(e.identifier)}function vme(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((e.beforeNode?"^":t?"("+t+")":"")+(/[$()*+.?[\\\]^{|}]/.test(e.character)?"\\":"")+e.character+(e.afterNode?"$":e.after?"(?:"+e.after+")":""),e.unicode?"gu":"g")}return e._compiled}function Xp(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function o0(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function mT(e,t,n){const r=Ba(e),i=Ba(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}const yme=new Map([["*",!1],["_",!0]]);function xme(e,t,n){const r=new Set;for(const s of e){const a=n.get(s);if(a&&s.attention&&t.some(o=>o.attention===s.attention))for(const o of a.tokens)r.add(o.attention)}const i=[];for(const s of e)s.attention&&r.delete(s.attention)&&i.push(s.attention);return i.reverse(),i}function jL(e,t,n){const r=[],i=new Map,s=new Map;let a=0;for(;an.index)return{chosen:l,mistake:f,tokens:u}}}}function Eme(e,t){let n=0;for(;n1&&s>1?2:1:s,f=o.markers.slice(o.end-u,o.end),h=r.markers.slice(r.start,r.start+u),m=f[0],g=h[0];if(m===f[u-1]&&m.value.length===u&&g===h[u-1]&&g.value.length===u&&m.attention===g.attention)t.delete(m),t.delete(g);else{const b=[...new Set([...f,...h])];for(const x of b){const E=t.get(x);E&&E.push(...b)}}o.end-=u,r.start+=u;break}}(a===-1||r.start===r.end)&&n++}}function Cme(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!cL(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const s of n)r.push(i.repeat(s))}return r}function qL(e,t,n){const r=t.indexStack,i=e.children||[],s=[];let a=-1,o=n.before;r.push(-1);let l=t.createTracker(n);for(;++a0?b[0].value:"",E=mT(m.charCodeAt(m.length-1),x.charCodeAt(0),f);E.inside&&Rh(b,!0);const C=b.length>0?o0(b[b.length-1].value):"",y=mT(g.charCodeAt(0),C.charCodeAt(C.length-1),f);y.inside&&Rh(b,!1),E.outside&&m!==` -`&&m!=="\r"&&Rh(i,!1),y.outside&&(s=g),i.push({value:u,attention:l},...b,{value:u,attention:l}),a=u.charAt(u.length-1)}return i}function C4(e,t,n){let r=new Map;const i=L3(e,r,t,n);let s=i,a=jL(s,t,n);for(;a;){const l=wme(e,r,a,t,n);if(!l){s=i;break}r=l.chosen,s=l.tokens,a=l.mistake}let o="";for(const l of s)o+=l.value;return o}function kme(e,t,n){const r=t.indexStack,i=e.children||[],s=t.createTracker(n),a=[];let o=-1;for(r.push(-1);++o - -`}return` - -`}const Sme=/\r?\n|\r/g;function _me(e,t){const n=[];let r=0,i=0,s;for(;s=Sme.exec(e);)a(e.slice(r,s.index)),n.push(s[0]),r=s.index+s[0].length,i++;return a(e.slice(r)),n.join("");function a(o){n.push(t(o,i,!o))}}const L2={}.hasOwnProperty;function Ame(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],s=[],a={},o=e.stack.includes("autolink"),l=n.before?n.before.length:0,u=r.length-(n.after?n.after.length:0);let f=-1;for(;++f=u)){if(r.charAt(g)==="_"&&g>0&&Ba(r.charCodeAt(g-1))===void 0&&!L2.call(a,g-1)&&!(g-1===l&&/[*_]/.test(r.charAt(l-1)))){let b=g+1;for(;b"u"||e.call(u,m)},a=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},o=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return z2=function l(){var u,f,h,m,g,b,x=arguments[0],E=1,C=arguments.length,y=!1;for(typeof x=="boolean"&&(y=x,x=arguments[1]||{},E=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});Ea.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const f=u;if(o&&n)throw f;return i(f)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const ya={basename:$me,dirname:Vme,extname:Ume,join:Hme,sep:"/"};function $me(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ad(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Vme(e){if(ad(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ume(e){ad(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Hme(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Kme(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function ad(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Gme={cwd:Yme};function Yme(){return"/"}function D4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Jme(e){if(typeof e=="string")e=new URL(e);else if(!D4(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Xme(e)}function Xme(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[g,...b]=f;const x=r[m][1];k4(x)&&k4(g)&&(g=j2(!0,x,g)),r[m]=[u,g,...b]}}}}const Qm=new z3().freeze();function U2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function H2(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function W2(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wT(e){if(!k4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ET(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Fh(e){return n1e(e)?e:new Qme(e)}function n1e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function r1e(e){return typeof e=="string"||i1e(e)}function i1e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VL=/^\d{4}-\d{2}-\d{2}$/,s1e=/^[A-Z][a-z]{2} [A-Z][a-z]{2} \d{2} \d{4}$/,S4=e=>!Number.isNaN(e.getTime()),CT=e=>String(e).padStart(2,"0"),kT=e=>`${e.getFullYear()}-${CT(e.getMonth()+1)}-${CT(e.getDate())}`,a1e=e=>{if(!VL.test(e))return;const[t,n,r]=e.split("-"),i=Number(t),s=Number(n),a=Number(r),o=new Date(i,s-1,a,12);if(S4(o)&&!(o.getFullYear()!==i||o.getMonth()!==s-1||o.getDate()!==a))return o},UL=e=>{if(e instanceof Date)return S4(e)?{date:kT(e)}:{};if(!e)return{};const t=e.trim();if(!t)return{};if(VL.test(t))return a1e(t)?{date:t}:{rawDate:t};if(s1e.test(t)){const n=new Date(t);if(S4(n))return{date:kT(n)}}return{rawDate:t}},o1e=(e,{date:t,...n}={})=>{const r=UL(t??new Date);e.tf.insertNodes([{children:[{text:""}],...r,type:e.getType(ee.date)},{text:" "}],n)};Jt({key:ee.date,node:{isElement:!0,isInline:!0,isVoid:!0}}).extendEditorTransforms(({editor:e})=>({insert:{date:Ce(o1e,e)}}));const l1e={tokenize:u1e};function u1e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),hn(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return wt(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const c1e={tokenize:f1e},DT={tokenize:d1e};function f1e(e){const t=this,n=[];let r=0,i,s,a;return o;function o(_){if(ra))return;const A=t.events.length;let T=A,P,M;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(P){M=t.events[T][1].end;break}P=!0}for(C(r),w=A;w_;){const S=n[O];t.containerState=S[1],S[0].exit.call(t,e)}n.length=_}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function d1e(e,t,n){return hn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const h1e={tokenize:p1e};function p1e(e){const t=this,n=e.attempt(ef,r,e.attempt(this.parser.constructs.flowInitial,i,hn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(She,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const m1e={resolveAll:WL()},g1e=HL("string"),v1e=HL("text");function HL(e){return{resolveAll:WL(e==="text"?y1e:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(f){return u(f)?s(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const h=i[f];let m=-1;if(h)for(;++m-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function O1e(e,t){let n=-1;const r=[];let i;for(;++n0&&i(t.beforeEnter,{...ft,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1]),KL.call(Lt,be[rn][1].type)&&Lt[be[rn][1].type].call({...ft,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1]),be[rn][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...ft,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1])}if(ft.tokenStack.length>0){const Lt=ft.tokenStack[ft.tokenStack.length-1];(Lt[1]||_T).call(ft,void 0,Lt[0])}for(G.position={start:Wo(be.length>0?be[0][1].start:{line:1,column:1,offset:0}),end:Wo(be.length>0?be[be.length-2][1].end:{line:1,column:1,offset:0})},rn=-1;++rn{const n=I1e[t];return ai(e,n)??n??t},M1e=e=>e?.rules?Object.entries(e.rules).filter(([t,n])=>n?.mark).map(([t])=>t):[];function bc(e){const t={};return e&&e.length>0&&e.forEach(n=>{if(n.name&&n.value!==void 0){let r=n.value;try{r=JSON.parse(n.value)}catch{r=n.value}t[n.name]=r}}),t}function B0(e){return Object.entries(e).map(([t,n])=>({name:t,type:"mdxJsxAttribute",value:typeof n=="string"||n?.type==="mdxJsxAttributeValueExpression"?n:JSON.stringify(n)}))}const L1e={column:{deserialize:(e,t,n)=>{const r=bc(e.attributes);return{children:mr(e.children,{...t},n),type:Bt(n.editor,ee.column),...r}},serialize:(e,t)=>{const{id:n,children:r,type:i,...s}=e;return{attributes:B0(s),children:Gr(r,t),name:i,type:"mdxJsxFlowElement"}}},column_group:{deserialize:(e,t,n)=>{const r=bc(e.attributes);return{children:mr(e.children,{...t},n),type:Bt(n.editor,ee.columnGroup),...r}},serialize:(e,t)=>{const{id:n,children:r,type:i,...s}=e;return{attributes:B0(s),children:Gr(r,t),name:i,type:"mdxJsxFlowElement"}}}};function zf(e){const t=HB(e);return{mark:!0,serialize:n=>({attributes:[{name:"style",type:"mdxJsxAttribute",value:`${t}: ${n[e]};`}],children:[{type:"text",value:n.text}],name:"span",type:"mdxJsxTextElement"})}}const z1e={backgroundColor:zf("backgroundColor"),color:zf("color"),fontFamily:zf("fontFamily"),fontSize:zf("fontSize"),fontWeight:zf("fontWeight"),span:{mark:!0,deserialize:(e,t,n)=>{const r=jf(e,"font-family"),i=jf(e,"font-size"),s=jf(e,"font-weight"),a=jf(e,"color"),o=jf(e,"background-color");return mr(e.children,{...t,backgroundColor:o,color:a,fontFamily:r,fontSize:i,fontWeight:s},n)}}};function Ih(){return{deserialize:e=>{const{src:t,...n}=bc(e.attributes);return{children:[{text:""}],type:e.name,url:t,...n}},serialize:(e,t)=>{const{children:n,type:r,url:i,...s}=e;return{attributes:B0({...s,src:i}),children:Gr(n,t),name:r,type:"mdxJsxFlowElement"}}}}const j1e={audio:Ih(),file:Ih(),media_embed:Ih(),video:Ih()},q1e=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i,plainMarks:s,remarkPlugins:a,remarkStringifyOptions:o,rules:l}=e.getOptions(tl),u={...Zm(e),...t?.rules??l};return{allowedNodes:t?.allowedNodes??n,allowNode:t?.allowNode??r,disallowedNodes:t?.disallowedNodes??i,editor:e,plainMarks:t?.plainMarks??s,preserveEmptyParagraphs:t?.preserveEmptyParagraphs,remarkPlugins:t?.remarkPlugins??a??[],remarkStringifyOptions:t?.remarkStringifyOptions??o,rules:u,spread:t?.spread,value:t?.value??e.children,withBlockId:t?.withBlockId??!1}},JL=(e,t)=>{const n=t.rules,r=Zm(t.editor);return n?.[e]?.serialize===void 0?r[e]?.serialize:n?.[e]?.serialize},$1e=e=>{console.warn(`Unreachable code: ${JSON.stringify(e)}`)},AT=["italic","bold","strikethrough","code"],TT=(e,t,n)=>{const r=M1e(t),i=[],s=[];let a=[],o="";for(let l=0;l!AT.includes(x))].forEach(x=>{const E=Bt(t.editor,x);if(u[E]){if(t.plainMarks?.includes(x))return;m?.[E]||s.push(x),g?.[E]||a.push(x)}});const b=s.reduce((x,E,C)=>(a.includes(E)&&x.push({key:E,index:C}),x),[]);if(s.length>0){let x="",E="";if(b.length===1&&(f.toString()!==s.toString()||h.includes("italic")&&a.includes("bold"))&&s.length-b.length===0){for(;o.startsWith(" ");)x+=" ",o=o.slice(1);for(;o.endsWith(" ");)E+=" ",o=o.slice(0,-1)}let C={type:"text",value:o};o="",s.slice().reverse().forEach(_=>{const O=JL(_,t);switch(O&&(C={...O(u,t),children:[C]}),_){case"bold":C={children:[C],type:"strong"};break;case"code":{let S=C;for(;S.type!=="text"&&S.type!=="inlineCode";)S=S.children[0];S.type="inlineCode";break}case"italic":C={children:[C],type:"emphasis"};break;case"strikethrough":C={children:[C],type:"delete"};break}});const y=[];x.length>0&&y.push({type:"text",value:x}),y.push(C),E.length>0&&y.push({type:"text",value:E}),i.push(...y)}b.length>0?b.reverse().forEach(x=>{s.splice(x.index,1)}):(i.push({type:"text",value:o}),o="")}return o&&(i.push({type:"text",value:o}),o=""),QL(i).map(l=>XL(l)?l:{type:"text",value:""})},XL=e=>{if(e.type==="inlineCode"||e.type==="text")return e.value!=="";if(e.children?.length>0){for(const t of e.children)if(t.type!=="emphasis"&&t.type!=="strong"&&t.type!=="inlineCode"&&t.type!=="delete"&&t.type!=="text"||XL(t))return!0}return!1},QL=e=>{const t=[];for(const n of e){const r=t.at(-1);if(r&&r.type===n.type)r.type==="text"||r.type==="inlineCode"?r.value+=n.value:r.children=QL(r.children.concat(n.children));else{if(n.type==="text"&&n.value==="")continue;t.push(n)}}return t},ZL=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i}=t;if(!e.type)return!0;if(n&&i&&n.length>0&&i.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");if(n){if(!n.includes(e.type))return!1}else if(i?.includes(e.type))return!1;return r?.serialize?r.serialize(e):!0},ez=(e,t)=>({attributes:[{name:"id",type:"mdxJsxAttribute",value:String(t)}],children:[e],data:{_mdxExplicitJsx:!0},name:"block",type:"mdxJsxFlowElement"});function V1e(e,t,n=!1){if(e.length===0)throw new Error("Cannot create a list from empty nodes");if(t.withBlockId&&n&&e.some(s=>s.id))return U1e(e,t);const r={children:[],ordered:e[0].listStyleType==="decimal",spread:t.spread??!1,start:e[0].listStart,type:"list"},i=[{indent:e[0].indent,list:r,parent:null,styleType:e[0].listStyleType}];for(let s=0;s1&&i.at(-1).indent>o;)i.pop();let l=i.at(-1);if(!l)throw new Error("Stack should never be empty");if(l.indent===o&&l.styleType!==a.listStyleType&&l.parent){const h={children:[],ordered:a.listStyleType==="decimal",spread:t.spread??!1,start:a.listStart,type:"list"};l.parent.children.push(h),i[i.length-1]={indent:o,list:h,parent:l.parent,styleType:a.listStyleType},l=i.at(-1)}const u={checked:null,children:[{children:Gr(a.children,t),type:"paragraph"}],spread:t.spread??!1,type:"listItem"};a.listStyleType==="todo"&&a.checked!==void 0&&(u.checked=a.checked),l.list.children.push(u);const f=e[s+1];if(f&&f.indent>o){const h={children:[],ordered:f.listStyleType==="decimal",spread:t.spread??!1,start:f.listStart,type:"list"};u.children.push(h),i.push({indent:f.indent,list:h,parent:u,styleType:f.listStyleType})}}return r}function U1e(e,t){const n=[];for(let r=0;r{const r=[];let i=[];const s=[];for(let a=0;a<=e.length;a++){const o=e[a];if(o&&Pn.isText(o)&&o.rawHtml)i.length>0&&(r.push(...TT(i,t)),i=[]),r.push({type:"html",value:o.text});else if(o&&Pn.isText(o))H1e(o,t)&&i.push(o);else{if(i.length>0&&r.push(...TT(i,t)),i=[],!o||!ZL(o,t))continue;const l=Bt(t.editor,ee.p)??ee.p;if(o?.type===l&&"listStyleType"in o){s.push(o);const u=e[a+1],f=u&&u.type===l&&"listStyleType"in u,h=s.at(0),m=f&&h&&u.listStyleType!==h.listStyleType&&u.indent===h.indent;if(!f||m){const g=V1e(s,t,n);g.type==="fragment"?r.push(...g.children):r.push(g),s.length=0}}else{const u=tz(o,t,n);u&&r.push(u)}}}return r},tz=(e,t,n=!1)=>{const r=t.editor;let i=ai(r,e.type)??e.type;ee.heading.includes(i)&&(i="heading"),(i===ee.olClassic||i===ee.ulClassic)&&(i="list");const s=JL(i,t);if(s){const a=s(e,t);return t.withBlockId&&e.id&&n?ez(a,e.id):a}$1e(e)},H1e=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i}=t;if(n&&i&&n.length>0&&i.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");for(const[s,a]of Object.entries(e))if(s!=="text"){if(n){if(!n.includes(s)&&a)return!1}else if(i?.includes(s)&&a)return!1}return r?.serialize?r.serialize(e):!0},W1e=(e,t)=>{const n=q1e(e,t),{remarkPlugins:r,value:i}=n,s=Qm().use(r??[]).use($L,{emphasis:"_",resourceLink:!1,...n?.remarkStringifyOptions}),a=K1e({children:i,options:n});return s.stringify(a)},K1e=({children:e,options:t})=>({children:Gr(e,t,!0),type:"root"}),nz=(e,{allowedNodes:t,disallowedNodes:n})=>{if(t&&n&&t.length>0&&n.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");return t?t.includes(e):!n?.includes(e)},Qp=(e,t)=>{if(!e.type)return!0;const n=od(t.editor,e.type);return nz(n,t)?t.allowNode?.deserialize?t.allowNode.deserialize({...e,type:n}):!0:!1},G1e=/^ /,Y1e=/^\d+$/,J1e=["li","ol","ul"],P0=(e,t)=>(e?.type==="mdxJsxTextElement"||e?.type==="mdxJsxFlowElement")&&t.includes(e.name),rz=e=>e?.type==="text"&&e.value.trim()==="",q3=(e,t)=>e.attributes.find(n=>n.name===t),$3=(e,t)=>e.attributes.every(n=>t.includes(n.name)),NT=(e,t)=>[void 0,null,"true"].includes(q3(e,t)?.value),iz=e=>{const t=q3(e,"start");if(!t)return 1;const n=typeof t.value=="string"&&Y1e.test(t.value)?Number(t.value):0;return Number.isSafeInteger(n)&&n>=1?n:void 0},sz=e=>P0(e,["input"])&&$3(e,["checked","disabled","type"])&&q3(e,"type")?.value==="checkbox"&&NT(e,"checked")&&NT(e,"disabled"),hu=e=>P0(e,["ol","ul"])&&$3(e,e.name==="ol"?["start"]:[])&&iz(e)!==void 0&&e.children.every(t=>rz(t)||X1e(t,e.name==="ul")),X1e=(e,t)=>{if(!P0(e,["li"])||!$3(e,[]))return!1;const n=e.children.findIndex(hu);return e.children.every((r,i)=>P0(r,["input"])?i===0&&t&&sz(r):n===-1||i<=n||rz(r)||hu(r))},az=(e,t)=>e[t]?.name==="ol"&&e.slice(0,t).some(n=>hu(n)&&n.name==="ol"),oz=(e,t,n,r=1,i=!1)=>{if(!Qp(e,n))return[];const s=e.name==="ol",a=iz(e),o=Bt(n.editor,s?ee.ol:ee.ul);return e.children.filter(l=>P0(l,["li"])).flatMap((l,u)=>Qp(l,n)?Q1e(l,t,n,{indent:r,listRestart:s&&u===0&&i?a:void 0,listRestartPolite:s&&u===0&&!i&&a>1?a:void 0,listStart:s?a+u:void 0,listStyleType:o}):[])},Q1e=(e,t,n,{indent:r,listRestart:i,listRestartPolite:s,listStart:a,listStyleType:o})=>{const[l,...u]=e.children,f=sz(l),[h,...m]=u,g=h?.type==="text"?[{...h,value:h.value.replace(G1e,"")},...m]:u,b={children:mr((f?g:e.children).filter(x=>!hu(x)),t,n).map(x=>x.text==="​"?{...x,text:""}:x),indent:r,listStyleType:f?Bt(n.editor,ee.listTodo):o,type:Bt(n.editor,ee.p)};return f&&(b.checked=l.attributes.some(x=>x.name==="checked")),a!==void 0&&(b.listStart=a),i!==void 0&&(b.listRestart=i),s!==void 0&&(b.listRestartPolite=s),[b,...e.children.filter(hu).flatMap((x,E,C)=>oz(x,t,n,r+1,az(C,E)))]},Z1e=(e,t)=>t.some(n=>n.children?.some(r=>Rt.isElement(r)&&!e.api.isInline(r))),ege=(e,t,n)=>!n.editor?.plugins.list||!nz(od(n.editor,"list"),n)||J1e.some(r=>n.rules?.[r])||!e.some(hu)?mr(e,t,n):e.flatMap((r,i)=>{if(!hu(r))return mr([r],t,n);const s=oz(r,t,n,1,az(e,i));return Z1e(n.editor,s)?mr([r],t,n):s}),V3=e=>e.map(t=>t.type==="break"?{type:"html",value:"
"}:t.type==="html"?{...t,value:t.value.replaceAll(` -`,"")}:t.type==="paragraph"?{...t,children:V3(t.children)}:t),tge=(e,t)=>{const n=[],r=[],i=a=>({type:"html",value:a}),s=()=>{n.push(i(``))};for(const a of e){const{checked:o,indent:l,listRestart:u,listStart:f,listStyleType:h}=a,m=h===ee.ol?"ol":"ul";for(;r.length>0&&r.at(-1).indent>l;)s();const g=r.at(-1),b=g?.indent===l&&g.name===m,x=u??f??(b?g.nextStart:1);if(g?.indent===l&&(!b||m==="ol"&&(u!==void 0||x!==g.nextStart))&&s(),r.at(-1)?.indent===l)n.push(i("
  • "));else{const C=m==="ol"&&x!==1?` start="${x}"`:"";n.push(i(`<${m}${C}>
  • `)),r.push({indent:l,name:m,nextStart:x})}r.at(-1).nextStart=x+1,h===ee.listTodo&&n.push(i(o?' ':' '));const E=tz(a,t);n.push(...V3(E.children))}for(;r.length>0;)s();return n},OT=(e,t)=>{const n=Bt(t.editor,ee.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:tge(i,t),isList:!0}),i=[])};for(const o of e.children){if(o.type===n&&"listStyleType"in o){ZL(o,t)&&i.push(o);continue}s();const l=Gr([o],t);l.length>0&&r.push({children:V3(l),isList:!1})}s();const a=[];return r.forEach((o,l)=>{l>0&&!o.isList&&!r[l-1].isList&&a.push({type:"html",value:"
    "}),a.push(...o.children)}),{children:a,type:"tableCell"}},nge={table:{deserialize:(e,t,n)=>{const r=Bt(n.editor,ee.p);return{children:e.children?.map((i,s)=>({children:i.children?.map(a=>{const o=s===0?"th":"td",l=ege(a.children,t,n),u=[];let f=[];for(const h of l)!h.type||h.type===ee.inlineEquation||n.editor.api.isInline(h)?f.push(h):(f.length>0&&(u.push({children:f,type:r}),f=[]),u.push(h));return f.length>0&&u.push({children:f,type:r}),{children:u.length>0?u:[{children:[{text:""}],type:r}],type:Bt(n.editor,o)}})||[],type:Bt(n.editor,ee.tr)}))||[],type:Bt(n.editor,ee.table)}},serialize:(e,t)=>({children:Gr(e.children,t),type:"table"})},td:{serialize:OT},th:{serialize:OT},tr:{serialize:(e,t)=>({children:Gr(e.children,t),type:"tableRow"})}},rge=/^https?:\/\/[^\s<>\\]+$/i,ige=/^\n/;function sge(e){return e===!0||e===!1||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Boolean]"}const BT=(e,t=[])=>({children:t.length>0?t:[{text:""}],type:Bt(e,ee.lic)}),PT=(e,t,n)=>{const r=Bt(n.editor,ee.lic),i=e.map(s=>s.type==="paragraph"?BT(n.editor,mr(s.children,t,n)):mr([s],t,n)[0]).filter(Boolean);return i.some(s=>s.type===r)||i.unshift(BT(n.editor)),i},RT=(e,t=[])=>{const n=Bt(e,ee.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:i,type:n}),i=[])};return t.forEach(a=>{if(Rt.isElement(a)&&!e.api.isInline(a)&&e.api.isBlock(a)){s(),r.push(a);return}i.push(a)}),s(),r.length>0?r:[{children:[{text:""}],type:n}]},age=/^\/\*([\s\S]*)\*\/$/,FT=e=>{const t=age.exec((e??"").trim());return t?``:null},oge=(e,t)=>e.flatMap(n=>{const r=n.text;return n.rawHtml?[n]:r===""&&e.length===1&&t.preserveEmptyParagraphs!==!1?[{...n,text:"​"}]:typeof r!="string"||!r.includes(` -`)?[n]:r.split(` -`).flatMap((i,s,a)=>{const o=[];return i&&o.push({...n,text:i}),s({children:mr(e.children,t,n),type:Bt(n.editor,ee.a),url:e.url??e.attributes?.find(r=>r.name==="href"&&typeof r.value=="string")?.value}),serialize:(e,t)=>{const n=Gr(e.children,t);if(n.length===1&&n[0]?.type==="text"&&n[0].value===e.url&&t.remarkStringifyOptions?.resourceLink!==!0&&rge.test(e.url??"")){const r=t$.lexInline(e.url,{gfm:!0}),i=r[0];if(r.length===1&&i?.type==="link"&&i.href===e.url&&i.text===e.url)return{type:"html",value:e.url}}return{children:n,type:"link",url:e.url}}},blockquote:{deserialize:(e,t,n)=>({children:RT(n.editor,wc(e.children,t,n)),type:Bt(n.editor,ee.blockquote)}),serialize:(e,t)=>({children:Gr(RT(t.editor,e.children),t),type:"blockquote"})},bold:{mark:!0,deserialize:(e,t,n)=>K2(e,t,n)},br:{deserialize(){return[{text:` -`}]}},break:{deserialize:(e,t)=>({text:` -`}),serialize:()=>({type:"break"})},callout:{deserialize:(e,t,n)=>{const r=bc(e.attributes);return{children:mr(e.children,t,n),type:Bt(n.editor,ee.callout),...r}},serialize(e,t){const{children:n,type:r,...i}=e;return{attributes:B0(i),children:Gr(n,t),name:"callout",type:"mdxJsxFlowElement"}}},code:{mark:!0,deserialize:(e,t,n)=>({...t,[Bt(n.editor,ee.code)]:!0,text:e.value})},code_block:{deserialize:(e,t,n)=>({children:(e.value||"").split(` -`).map(r=>({children:[{text:r}],type:Bt(n.editor,ee.codeLine)})),lang:e.lang??void 0,type:Bt(n.editor,ee.codeBlock)}),serialize:e=>({lang:e.lang,type:"code",value:e.children.map(t=>t?.children===void 0?t.text:t.children.map(n=>n.text).join("")).join(` -`)})},comment:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.comment)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"comment",type:"mdxJsxTextElement"}}},date:{deserialize(e,t,n){const r=bc(e.attributes);return{children:[{text:""}],...UL(typeof r.value=="string"?r.value:e.children?.[0]?.value||""),type:Bt(n.editor,ee.date)}},serialize({date:e,rawDate:t}){return e&&!t?{attributes:B0({value:e}),children:[],name:"date",type:"mdxJsxTextElement"}:{attributes:[],children:[{type:"text",value:t??e??""}],name:"date",type:"mdxJsxTextElement"}}},del:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.strikethrough)]:!0,...t},n)},equation:{deserialize:(e,t,n)=>({children:[{text:""}],texExpression:e.value,type:Bt(n.editor,ee.equation)}),serialize:e=>({type:"math",value:e.texExpression})},footnoteDefinition:{deserialize:(e,t,n)=>{const r=Bt(n.editor,ee.p),i=wc(e.children,t,n).map(a=>a.type===r?a:{children:[a],type:r}),s=e.identifier;return i.length===0?{children:[{children:[{text:""}],type:r}],identifier:s,type:Bt(n.editor,"footnoteDefinition")}:{children:i,identifier:s,type:Bt(n.editor,"footnoteDefinition")}},serialize:(e,t)=>({children:Gr(e.children,t),identifier:e.identifier,type:"footnoteDefinition"})},footnoteReference:{deserialize:(e,t,n)=>({children:[{text:""}],identifier:e.identifier??"",type:Bt(n.editor,"footnoteReference")}),serialize:e=>({identifier:e.identifier??e.children?.map(t=>t.text??"").join("")??"",type:"footnoteReference"})},heading:{deserialize:(e,t,n)=>{const r={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[e.depth],i=Bt(n.editor,r);return{children:mr(e.children,t,n),type:i}},serialize:(e,t)=>{const n=ai(t.editor,e.type)??e.type;return{children:Gr(e.children,t),depth:{h1:1,h2:2,h3:3,h4:4,h5:5,h6:6}[n],type:"heading"}}},highlight:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.highlight)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"mark",type:"mdxJsxTextElement"}}},hr:{deserialize:(e,t,n)=>({children:[{text:""}],type:Bt(n.editor,ee.hr)}),serialize:()=>({type:"thematicBreak"})},html:{deserialize:(e,t,n)=>e.value==="
    "?{text:` -`}:{rawHtml:!0,text:e.value||""}},mdxFlowExpression:{deserialize:(e,t,n)=>{const r=FT(e.value);return r===null?[]:{children:[{rawHtml:!0,text:r}],type:Bt(n.editor,ee.p)}}},mdxTextExpression:{deserialize:e=>{const t=FT(e.value);return t===null?[]:{rawHtml:!0,text:t}}},img:{deserialize:(e,t,n)=>{const{alt:r,attributes:i,title:s,url:a}=e,{alt:o,src:l,...u}=i?bc(i):{};return{caption:[{text:o||r||""}],children:[{text:""}],...s&&{title:s},type:Bt(n.editor,ee.img),url:l||a,...u}},serialize:({caption:e,title:t,url:n})=>({children:[{alt:e?e.map(r=>r.text).join(""):void 0,title:typeof t=="string"?t:void 0,type:"image",url:n}],type:"paragraph"})},inline_equation:{deserialize(e,t,n){return{children:[{text:""}],texExpression:e.value,type:Bt(n.editor,ee.inlineEquation)}},serialize:e=>({type:"inlineMath",value:e.texExpression})},italic:{mark:!0,deserialize:(e,t,n)=>K2(e,t,n)},kbd:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.kbd)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"kbd",type:"mdxJsxTextElement"}}},list:{deserialize:(e,t,n)=>{if(!n.editor?.plugins.list)return{children:e.children.map(i=>i.type==="listItem"?{children:PT(i.children,t,n),type:Bt(n.editor,ee.li)}:mr([i],t,n)[0]),type:Bt(n.editor,e.ordered?ee.olClassic:ee.ulClassic)};const r=(i,s=1,a=1)=>{const o=[],l=!!i.ordered;let u=l?Bt(n.editor,ee.ol):Bt(n.editor,ee.ul);return i.children?.forEach((f,h)=>{if(f.type!=="listItem")return;const m=sge(f.checked);m&&(u=Bt(n.editor,ee.listTodo));const[g,...b]=f.children||[],x=g?Zp(g,t,n):{children:[{text:""}],type:Bt(n.editor,ee.p)};(Array.isArray(x)?x:[x]).forEach((E,C)=>{const y={...E,indent:s,type:E.type===Bt(n.editor,ee.img)?E.type:Bt(n.editor,ee.p)};y.listStyleType=u,m&&(y.checked=f.checked),l&&(y.listStart=a+h,h===0&&C===0&&y.listStart>1&&(y.listRestartPolite=y.listStart)),o.push(y)}),b.forEach(E=>{if(E.type==="list"){const C=E.start||1,y=r(E,s+1,C);o.push(...y)}else{const C=Zp(E,t,n);Array.isArray(C)?o.push(...C.map(y=>({...y,indent:s+1}))):o.push({...C,indent:s+1})}})}),o};return r(e,1,e.start||1)},serialize:(e,t)=>{const n=t.editor,r=ai(n,e.type)===ee.olClassic,i=s=>{const a=[];let o=null;for(const l of s)if(ai(n,l.type)==="li"){o&&a.push(o),o={children:[],spread:!1,type:"listItem"};for(const u of l.children)ai(n,u.type)==="lic"?o.children.push({children:Gr(u.children,t),type:"paragraph"}):(ai(n,u.type)==="ol"||ai(n,u.type)==="ul")&&o.children.push({children:i(u.children),ordered:ai(n,u.type)==="ol",spread:!1,type:"list"})}return o&&a.push(o),a};return{children:i(e.children),ordered:r,spread:!1,type:"list"}}},listItem:{deserialize:(e,t,n)=>({children:PT(e.children,t,n),type:Bt(n.editor,ee.li)}),serialize:(e,t)=>({children:Gr(e.children,t),type:"listItem"})},mention:{deserialize:(e,t,n)=>({children:[{text:""}],type:Bt(n.editor,ee.mention),value:e.displayText||e.username,...e.displayText&&{key:e.username}}),serialize:e=>{const t=e.key||e.value,n=e.value,r=encodeURIComponent(String(t)).replace(/\(/g,"%28").replace(/\)/g,"%29");return{children:[{type:"text",value:n}],type:"link",url:`mention:${r}`}}},p:{deserialize:(e,t,n)=>{const r=n.splitLineBreaks,i=mr(e.children,t,n),s=new Set(["img"]),a=[];let o=[];const l=()=>{o.length>0&&(a.push({children:o,type:Bt(n.editor,ee.p)}),o=[])};return i.forEach(u=>{u.text==="​"&&(u.text="")}),i.forEach((u,f,h)=>{const{type:m}=u;if(m&&s.has(m))l(),a.push(u);else if(r&&"text"in u&&typeof u.text=="string"){const g=u.text.split(` -`);if(u.text===` -`&&o.length===0){o.push({...u,text:""}),l();return}g.forEach((b,x,E)=>{const C=x>0,y=x1&&f===h.length-1||o.push(u)}),l(),a.length===1?a[0]:a},serialize:(e,t)=>{const n=oge(e.children,t),r=Gr(n,t);return r.length>0&&n.at(-1).type==="break"&&(r.at(-1).type="html",r.at(-1).value=` -
    `),{children:r,type:"paragraph"}}},strikethrough:{mark:!0,deserialize:(e,t,n)=>K2(e,t,n)},subscript:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.sub)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"sub",type:"mdxJsxTextElement"}}},suggestion:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.suggestion)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"suggestion",type:"mdxJsxTextElement"}}},superscript:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.sup)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"sup",type:"mdxJsxTextElement"}}},text:{deserialize:(e,t)=>({...t,text:e.value.replace(ige,"")})},toc:{deserialize:(e,t,n)=>({children:mr(e.children,t,n),type:Bt(n.editor,ee.toc)}),serialize:(e,t)=>({attributes:[],children:Gr(e.children,t),name:"toc",type:"mdxJsxFlowElement"})},underline:{mark:!0,deserialize:(e,t,n)=>mr(e.children,{[Bt(n.editor,ee.underline)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"u",type:"mdxJsxTextElement"}}},...z1e,...j1e,...L1e,...nge},Zm=e=>{const t=Object.keys(IT),n={};return t.forEach(r=>{const i=ai(e,r);n[i??r]=IT[r]}),n},lz=(e,t)=>{const n=t.rules;return n?.[e]?.deserialize===void 0?Zm(t.editor)[e]?.deserialize:n?.[e]?.deserialize},lge={className:"class",htmlFor:"for"},uz=new Set(["blockquote","code","heading","html","list","paragraph","table","thematicBreak"]),uge=/\n$/,cge=Qm().use($L).use(Ym),MT=e=>{if(e?.type==="mdxJsxTextElement"||e?.type==="mdxJsxFlowElement")return _4(e);if(!e?.type)return"";const t={children:uz.has(e.type)?[e]:[{children:[e],type:"paragraph"}],type:"root"};return cge.stringify(t).replace(uge,"")},fge=e=>{if(!e?.length)return"";const t=e.map(n=>{const r=lge[n.name]??n.name;return n.value===void 0||n.value===null?r:typeof n.value=="object"&&n.value?.type==="mdxJsxAttributeValueExpression"?`${r}={${n.value.value}}`:`${r}="${String(n.value)}"`});return t.length>0?` ${t.join(" ")}`:""},_4=e=>{const t=fge(e.attributes),n=`<${e.name}${t}`;if(!e.children?.length)return`${n} />`;if(e.type==="mdxJsxFlowElement"){const r=e.children.some(i=>i.type!=="html"&&uz.has(i.type))?` - -`:` -`;return`${n}>${r}${e.children.map(MT).join(r)}${r}`}return`${n}>${e.children.map(MT).join("")}`},dge=(e,t,n)=>{const r=e.name,i=ai(n.editor,r)??e.name;if(i){const s=od(n.editor,i),a=lz(s,n);if(a)return n.disallowedNodes?.includes(s)?[]:a(e,t,n)}else console.warn("This MDX node does not have a parser for deserialization",e);if(e.type==="mdxJsxTextElement")return[{rawHtml:!0,text:_4(e)}];if(e.type==="mdxJsxFlowElement")return[{children:[{rawHtml:!0,text:_4(e)}],type:Bt(n.editor,ee.p)}]},hge=e=>{let t=e;return t=t.replaceAll(/^#{1,6}\s+/gm,""),t=t.replaceAll(/^\s*>\s?/gm,""),t=t.replaceAll(/^([*_-]){3,}\s*$/gm,""),t=t.replaceAll(/^(\s*)([*+-]|\d+\.)\s/gm,"$1"),t=t.replaceAll(/^```[\S\s]*?^```/gm,""),t=t.replaceAll("
    ",` -`),t},pge=/^\s*/,mge=/\s*$/,cz=(e,t,n)=>{const r=t.trim(),i=pge.exec(t)?.[0]||"",s=mge.exec(t)?.[0]||"",a=hge(r);if(!a)return t?[{text:t}]:[];const o=[];i&&o.push({text:i});const l=e.getApi(tl).markdown.deserialize(a,n)[0];if(l){const u=Rt.isElement(l)?l.children:[l];o.push(...u)}return s&&o.push({text:s}),o},fz="remarkMdx",gge=e=>e.filter(t=>t!==Ym&&!("__pluginTag"in t&&t.__pluginTag===fz)),vge=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i,remarkPlugins:s,rules:a}=e.getOptions(tl),o={...Zm(e),...t?.rules??a},l=t?.remarkPlugins??s??[];return{allowedNodes:t?.allowedNodes??n,allowNode:t?.allowNode??r,disallowedNodes:t?.disallowedNodes??i,editor:e,memoize:t?.memoize,parser:t?.parser,remarkPlugins:t?.withoutMdx?gge(l):l,rules:o,splitLineBreaks:t?.splitLineBreaks}},jf=(e,t)=>{const n=e.attributes.find(i=>"name"in i&&i.name==="style");if(!n?.value)return;const r=n.value.split(";");for(const i of r){const[s,a]=i.split(":").map(o=>o.trim());if(s===t)return a}},yge=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xge=new Map([["checked","checked"],["disabled","disabled"],["readonly","readOnly"],["required","required"],["multiple","multiple"],["hidden","hidden"]]),bge=Array.from(xge.entries()).map(([e,t])=>({jsxAttr:t,reg:new RegExp(`(\\s|^)${e}(\\s|/?>|$)`,"gi")})),wge=[[/(\s)class=/g,"$1className="],[/(\s)for=/g,"$1htmlFor="]],dz=(e,t)=>!e||typeof e!="string"?e:e.replace(//g,"{/*$1*/}").replace(/<([a-zA-Z0-9]+)\b([^>]*?)(\/?)>/gi,(n,r,i,s)=>{if(t?.(n))return n;let a=i;wge.forEach(([l,u])=>{a=a.replace(l,u)}),a=a.replace(/(^|\s)([a-zA-Z0-9_-]+)=([^{ \t\n\r"'>]+?)(?=\s|\/?>|$)/g,'$1$2="$3"');for(const{reg:l,jsxAttr:u}of bge)a=a.replace(l,`$1${u}="true"$2`);const o=yge.has(r.toLowerCase())?" /":s;return`<${r}${a.trimEnd()}${o}>`}),Ege=O0();function Cge(e){return Ege.text().write(j3()(e,void 0,!0)).some(([t,n])=>t==="exit"&&n.type==="autolink"&&n.start.offset===0&&n.end.offset===e.length)}const kge=e=>dz(e,Cge),hz=e=>e.referenceType==="full"?`][${e.label??e.identifier}]`:e.referenceType==="collapsed"?"][]":"]",Dge=(e,t)=>t?[{children:e.children,title:t.title,type:"link",url:t.url}]:[{type:"text",value:"["},...e.children,{type:"text",value:hz(e)}],Sge=(e,t)=>t?[{alt:e.alt,title:t.title,type:"image",url:t.url}]:[{type:"text",value:`![${e.alt??""}${hz(e)}`}],_ge=e=>{const t=new Map;w4(e,"definition",n=>{t.has(n.identifier)||t.set(n.identifier,n)}),w4(e,(n,r,i)=>{if(!i||r===void 0||n.type!=="linkReference"&&n.type!=="imageReference")return;const s=t.get(n.identifier),a=n.type==="linkReference"?Dge(n,s):Sge(n,s);return i.children.splice(r,1,...a),r+a.length})},Age=(e,t)=>Tge(e,t),Tge=(e,t)=>{if(_ge(e),!t.splitLineBreaks)return e.children=e.children.map(s=>s.type==="html"&&s.value==="
    "?{children:[{type:"text",value:` -`}],type:"paragraph"}:s),wc(e.children,{},t);const n=[];let r=e.position?.start.line??1;const i=s=>{s>0&&n.push(...Array.from({length:s}).map(()=>({children:[{text:""}],type:t.editor?ai(t.editor,ee.p)??ee.p:ee.p})))};return e.children?.forEach((s,a)=>{const o=a===0,l=a===e.children.length-1;if(s.position){i(s.position.start.line-(o?r:r+1));const u=wc([s],{},t);n.push(...u),l&&i(e.position.end.line-s.position.end.line-1),r=s.position.end.line}else{const u=wc([s],{},t);n.push(...u)}}),n};var Mh=class{result;constructor(e){this.result=e}};function LT(e){return typeof e=="object"&&e!==null&&"source"in e&&typeof e.source=="string"&&"ruleId"in e&&typeof e.ruleId=="string"}const pz={...hL,name:"plateAutolink"};function Nge(e,t,n){const r={acorn:Rr.extend(uL()),acornOptions:{ecmaVersion:2024,sourceType:"module"},addResult:!0,...t};r.acornOptions={ecmaVersion:2024,sourceType:"module",...r.acornOptions,locations:!0,onToken:void 0,onComment:void 0,onTrailingComma:void 0,onInsertedSemicolon:void 0};const i=N3(r),s=Object.values(i.text??{}).flat().find(A=>A?.name==="mdxJsxTextTag");if(!s)throw new Error("MDX JSX text syntax is missing");const{source:a,entries:o}=e,l=a.lastIndexOf("}"),u=a.lastIndexOf("*/");function f(A){const T=A.events,P=T.findLastIndex(Z=>Z[0]==="enter"&&(Z[1].type==="mdxJsxTextTagExpressionAttribute"||Z[1].type==="mdxJsxTextTagAttributeValueExpression"));if(P<0||T.some(Z=>Z[0]==="exit"&&Z[1]===T[P][1]))return;const M=A.now(),F=T[P][1].type==="mdxJsxTextTagExpressionAttribute",z=F?"mdxJsxTextTagExpressionAttributeValue":"mdxJsxTextTagAttributeValueExpressionValue",$=T.slice(P).filter(Z=>Z[1].type===z||Z[1].type==="lineEnding").map(Z=>Z[1].end?Z:[Z[0],{...Z[1],end:M},Z[2]]),Y=r.acorn;if(Y)try{return{open:T[P][1],...S3($,{...r,acorn:Y,expression:!0,allowEmpty:!F,prefix:F?"({":"",suffix:F?"})":"",tokenTypes:[z],start:T[P][1].start})}}catch{return}}function h(A){return!!(A?.error&&(!A.swallow||A.error.message==="Unterminated comment"&&u=F){F=(M.now().offset-z)*2;const Z=f(M);if(Z?.error&&!Z.swallow)throw new Mh({ok:!1,context:M})}}};return A.tokenize.call(M,$,()=>{throw new Mh({ok:!0,context:M,start:z})},()=>{throw new Mh({ok:!1,context:M})})}}}const b=O0({extensions:[{text:{60:g(pz)}}]}),x=O0({extensions:[{text:{60:g(s,!0)}}]});let E,C=[];const y=new Map,_=(A,T)=>{let P=0,M=A.length;for(;P>1;A[F]<=T?P=F+1:M=F}return P};function O(A){if(t?.acorn||A?.error?.message!=="Unterminated comment")return;if(!E){E=[];for(let z=a.indexOf("*/");z>=0;z=a.indexOf("*/",z+1))E.push(z);C=Array.from(a.matchAll(/[\r\n\u2028\u2029]/g),z=>z.index)}let T=E[_(E,A.error.pos+1)];if(T===void 0)return;const P=/\s*\/\*/y,M=[];for(;!y.has(T)&&(M.push(T),P.lastIndex=T+2,!!P.exec(a));){const z=E[_(E,P.lastIndex-1)];if(z===void 0)break;T=z}T=y.get(T)??T;for(const z of M)y.set(z,T);const F=C[_(C,A.error.pos)];return{start:A.error.pos+2,end:T,lineBreak:F!==void 0&&F>1;o[de].end<=P.offset?me=de+1:re=de}try{for(let de=me;de=M)break;if(F&&!z&&I.line!==Y){Y=I.line;const X=F.get(I.line),ne=F.get(I.line+1);X&&$.defineSkip(X),ne&&$.defineSkip(ne)}if(typeof I.chunk=="string"){const X=F?.get(I.line)?.offset??0,ne=Math.max(Z,I.start,X)-I.start;let W=Math.min(M,I.end)-I.start;z&&!ve&&I.end>z.start&&I.start=(F?.get(I.line)?.offset??0)&&$.write([I.chunk]);if(z&&!ve&&I.end>=z.start&&I.start>1;o[W].end<=z.end?X=W+1:ne=W}de=X-1,Z=z.end,ve=!0}}return $.write([null]),{ok:!1,context:$}}catch(de){if(de instanceof Mh){const I=de.result;return I.ok&&I.start!==P.offset?{ok:!1,context:I.context}:I}return{ok:!1,error:de,context:$}}}function w(A,T){const P=S(b,"text",A);if(!P.ok)return{kind:"ordinary"};const M=T&&n?.(T);if(T&&n&&!M)return{kind:"ordinary"};const F=M?.end??a.length;if(P.context.now().offset>F)return{kind:"ordinary"};const z=S(x,"text",A,P.context.now().offset);let $;if(z.ok)$={kind:"jsx"};else{const Y=z.error;let Z,ve=LT(Y)&&Y.source==="micromark-extension-mdx-jsx"&&Y.ruleId==="unexpected-character"||LT(Y)&&Y.source==="micromark-extension-mdx-expression"&&["non-spread","spread-extra","unexpected-empty-expression"].includes(Y.ruleId);ve||(Z=f(z.context),Z&&(ve=m(Z,P.context.now().offset)));const me=M?.skips,re=O(Z);!t?.acorn&&Z?.error?.message==="Unterminated comment"&&(!re||re.end>=F)&&(ve=!0);const de=re&&re.endzT(S,{continuation:S.continuation&&zT(S.continuation,{tokenize(w,A,T){const P=this.containerState,M=this.now().line;return S.continuation.tokenize.call(this,w,F=>(g(P,M,"continued"),A(F)),F=>(g(P,M,"failed"),T(F)))}}),tokenize(w,A,T){const P=this.containerState;return S.tokenize.call(this,{...w,enter(M,F){const z=w.enter(M,F);return z._container&&P&&l.set(z,{construct:S,state:P}),z}},A,T)}}),x=b(_3),E=b(Ci),C={document:{62:x,42:E,43:E,45:E}};for(let S=48;S<=57;S++)C.document[S]=E;const y={partial:!0,tokenize(S,w,A){if(!s){s=this,a.add(this),t(this.parser);for(const T of["flow","content","text"]){const P=this.parser[T];this.parser[T]=M=>{if(T==="text"&&M&&!o.has(M.offset))for(const z of a)for(const[$,Y]of z.events)$==="enter"&&Y.contentType==="text"&&o.set(Y.start.offset,Y);const F=P(M);if(a.add(F),T==="text"&&f.add(F),T==="text"&&M){let z=o.get(M.offset);if(z){const $=new Map;let Y=z.end.offset;for(;z;)$.set(z.start.line,z.start),Y=z.end.offset,z=z.next;u.set(F,{end:Y,skips:$})}}return F}}}return A}},_={document:Object.fromEntries([...i].map(S=>[S,y]))};function O(S){if(!s)return;const w=[];for(const[I,X]of s.events)X._container&&(I==="enter"?w.push(X):w.pop());const A=S.now();let T=S;for(;T&&!a.has(T);)T=Object.getPrototypeOf(T);const P=s.events.findLast(I=>I[0]==="enter"&&I[1].type==="chunkFlow"&&I[1]._tokenizer===T&&I[1].start.line===A.line)?.[1]?.start.offset??A.offset,M=S.parser.lazy[A.line]&&S.events.some(I=>I[1].start.offsetP)),F=[];for(const I of w){const X=l.get(I);if(!X)return;const ne=m.get(X.state)?.get(A.line)==="continued";if(I.start.line!==A.line&&!ne&&!M)break;F.push(X)}const z=F.map(I=>({...I.state})),$=new Map;let Y=n.length;const Z=r[A.line]?.start??n.length;if(Z>=n.length||!F.length)return{end:Y,skips:$};class ve{}const me={tokenize(I){let X=0,ne=Z;const W=()=>{throw Y=ne,new ve},Te=$e=>{if(X&&z[X-1]._closeFlow)return W();if(X{if($e===null)throw I.exit("data"),new ve;return I.consume($e),$e===-3||$e===-4||$e===-5?(I.exit("data"),X=0,ne=this.now().offset,Te):je};return Te}},re=r[A.line].chunks.find(I=>typeof I!="string"||I.length),de=O0({extensions:[{text:{[typeof re=="string"?re.charCodeAt(0):re??"null"]:me},disable:{null:[...S.parser.constructs.disable.null??[]]}}]});try{const I=de.text({offset:Z,line:A.line+1,column:1});for(let X=A.line;XE=>(f=!0,x(E)),m={...i,enter(x,...E){if(x==="mdxJsxFlowTag"&&o.classify(l.now(),l).kind==="autolink")throw u;return i.enter(x,...E)}};let g=n.call(l,m,h(s),h(a));function b(x){try{const E=g(x);return f||!E?E:(g=E,b)}catch(E){if(E===u)return a(x);throw E}}return b}),e}function Pge(e,t,n){const r=Oge(e),i=new Map,s=Bge(r,a=>A4.set(a,i));for(const a of n)i.set(a,Nge(r,a.options,o=>s.view(o)));return[s.observer,...t,s.initializer]}const Rge=function(){const e=this.parser;if(!e)return;const t={owners:[],parser:void 0};this.parser=(n,r)=>{const i=t.owners.filter(l=>!Object.hasOwn(l.options,"acorn"));if(!i.length)return e(n,r);const s={...this.data("settings")},a=this.data("micromarkExtensions")||[],o=this.data("fromMarkdownExtensions")||[];return Qm().data({settings:s,fromMarkdownExtensions:o,micromarkExtensions:Pge(n,a,i)}).use(YL).parse(n)},t.parser=this.parser,U3.set(this,t)},mz=function(e){const t=U3.get(this);if(!t)return Ym.call(this,e);const n={};let r=!0;const i=e&&new Proxy({},{ownKeys(){return Reflect.ownKeys(e)},getOwnPropertyDescriptor(b,x){const E=Reflect.getOwnPropertyDescriptor(e,x);return E&&{...E,configurable:!0}},get(b,x){const E=Reflect.get(e,x,e);if(!r||(x==="acorn"&&(n.acorn=E),x==="addResult"&&(n.addResult=E),x!=="acornOptions"))return E;if(!E||typeof E!="object"&&typeof E!="function")return n.acornOptions=E,E;let C={ecmaVersion:2024};return n.acornOptions=C,new Proxy({},{ownKeys(){const y=Reflect.ownKeys(E);return C={ecmaVersion:2024},n.acornOptions=C,y},getOwnPropertyDescriptor(y,_){const O=Reflect.getOwnPropertyDescriptor(E,_);return O&&{...O,configurable:!0}},get(y,_){const O=Reflect.get(E,_,E);return r&&Reflect.set(C,_,O),O}})}}),s=this.data();let a=s.micromarkExtensions;a||(a=[],s.micromarkExtensions=a);let o=s.fromMarkdownExtensions;o||(o=[],s.fromMarkdownExtensions=o);let l=s.toMarkdownExtensions;l||(l=[],s.toMarkdownExtensions=l);const u=a.push;let f;try{f=N3(i)}finally{r=!1}const h={options:n};for(const b of["text","flow"]){const x=f[b],E=x?.[60];x&&E&&(x[60]=Array.isArray(E)?E.map(C=>jT(C,h)):jT(E,h))}Reflect.apply(u,a,[f]);const m=o.push;Reflect.apply(m,o,[kM()]);const g=l.push;Reflect.apply(g,l,[DM(e||{})]),t.owners.push(h)};function Fge(e,t){e.freeze();const n=U3.get(e);return n&&n.parser===e.parser?kge(t):dz(t)}const Ige=e=>e===Ym?mz:e,H3=(e,t,n)=>{const r=vge(e,n),i=Qm().use(YL).use(Rge).use((r.remarkPlugins??[]).map(Ige)).use(Lge,r),s=n?.withoutMdx?t:Fge(i,t);return n?.memoize?Wge(s,n.parser).flatMap(a=>a.type==="space"?{...e.api.create.block(),_memo:a.raw}:i.processSync(a.raw).result.map(o=>({_memo:a.raw,...o}))):i.processSync(s).result},Mge=(e,t,n)=>{let r=null;try{r=H3(e,t,n)}catch(i){n?.onError?.(i),n?.withoutMdx||(r=Hge(e,t,n))}return r?r.map(i=>Pn.isText(i)?{children:[i],type:ai(e,ee.p)??ee.p}:i):[]},Lge=function(e={}){this.compiler=t=>Age(t,e)},zge=/^]*>/i,jge=e=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===36||e===45||e===46||e===95||e===58,qge=e=>e===47||e===62||e===9||e===10||e===12||e===13||e===32,$ge=e=>{const t=[],n=e.length;let r=0,i=-1;for(;r=n){i=s;break}let o=!1;e[r]==="/"&&(o=!0,r++);const l=r;for(;r"){m=!0,g=e[r-1]==="/",r++;break}r++}if(!m){i=s;break}if(!g)if(o){for(let b=t.length-1;b>=0;b--)if(t[b].name===u){t.splice(b,1);break}}else t.push({name:u,pos:s})}if(t.length>0){const s=t[0].pos;i=i===-1?s:Math.min(i,s)}return i===-1?e:[e.slice(0,i),e.slice(i)]},qT=e=>Pn.isText(e)&&Object.keys(e).every(t=>t==="text"),Vge=e=>e.slice(e.lastIndexOf(` -`)+1).includes("|"),T4=(e,t,n)=>H3(e,t,{...n,withoutMdx:!0}),Uge=(e,t,n)=>{try{return H3(e,t,n)}catch{return T4(e,t,n)}},gz=(e,t,n)=>{if(!Rt.isElement(t)||e.api.isVoid(t))return!1;const r=Bt(e,ee.p);if(t.type===r||t.children.some(i=>Pn.isText(i))){const i=t.children.at(-1);return qT(i)&&n.every(s=>qT(s))?(i.text+=n.map(s=>s.text).join(""),!0):(t.children.push(...n),!0)}for(let i=t.children.length-1;i>=0;i--)if(gz(e,t.children[i],n))return!0;return!1},Hge=(e,t,n)=>{const r=$ge(t);if(!Array.isArray(r))return T4(e,t,n);const[i,s]=r,a=cz(e,s,{...n,withoutMdx:!0}),o=Uge(e,i,n),l={children:a,type:Bt(e,ee.p)};if(o.length===0)return[l];const u=o.at(-1);if(Rt.isElement(u)&&e.api.isVoid(u))return[...o,l];const f=Bt(e,ee.table);if(Rt.isElement(u)&&u.type===f){if(Vge(i)){const h=T4(e,t,n),m=o.filter(x=>Rt.isElement(x)&&x.type===f).indexOf(u);let g=-1,b=-1;for(const[x,E]of h.entries())if(Rt.isElement(E)&&E.type===f&&(b+=1,b===m)){g=x;break}if(g!==-1)return[...o.slice(0,-1),...h.slice(g)]}return[...o,l]}return Rt.isElement(u)&&gz(e,u,a),o},Wge=(e,{exclude:t=["space"],trim:n=!0}={})=>{let r=[...e$.lexer(e)];return t.length>0&&(r=r.filter(i=>!t.includes(i.type))),n&&(r=r.map(i=>({...i,raw:i.raw.trimEnd()}))),r},wc=(e,t,n)=>e.reduce((r,i)=>(Qp(i,n)&&r.push(...Zp(i,t,n)),r),[]),Zp=(e,t,n)=>{if(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement"){const i=dge(e,t,n);return Array.isArray(i)?i:[i]}const r=lz(od(n.editor,e.type),n);if(r){const i=r(e,t,n);return Array.isArray(i)?i:[i]}return[]},mr=(e,t,n)=>e.length===0?[{text:""}]:wc(e,t,n),K2=(e,t,n)=>e.children.reduce((r,i)=>{const s=od(n.editor,e.type),a=Bt(n.editor,s);return Qp(i,n)&&r.push(...Zp(i,{...t,[a]:!0},n)),r},[]),tl=Wn({key:ee.markdown,options:{allowedNodes:null,disallowedNodes:null,plainMarks:null,remarkPlugins:[],remarkStringifyOptions:null,rules:null}}).extendApi(({editor:e})=>({deserialize:Ce(Mge,e),deserializeInline:Ce(cz,e),serialize:Ce(W1e,e)})).extend(({api:e})=>({parser:{format:"text/plain",deserialize:({data:t})=>e.markdown.deserialize(t),query:({data:t,dataTransfer:n})=>{if(n.getData("text/html"))return!1;const{files:r}=n;return!(!r?.length&&Oc(t))}}}));Object.assign(function(...e){return mz.apply(this,e)},{__pluginTag:fz});const N4=` -`;function Kge(e){const t=e.trim();return t.startsWith("```")||t.startsWith("~~~")}function Gge(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t}function W3(e){return Gge(e).split("|").map(t=>t.trim())}function Yge(e){let t=e;if(t.startsWith(":")&&(t=t.slice(1)),t.endsWith(":")&&(t=t.slice(0,-1)),!t.length)return!1;for(let n=0;n=2&&t.push({start:s,end:a}),r=a}else r++}return t}function Jge(e){return W3(e).map(t=>{if(!Yge(t))return null;const n=t.startsWith(":"),r=t.endsWith(":");return n&&r?"center":r?"right":n?"left":null})}function Xge(e,t){const n=[];for(let r=0;r{const r=W3(t[n]||"").length,i=Jge(t[n+1]||""),s=[];for(let a=0;a{if(Array.isArray(r)){for(const i of r)if(!(!i||typeof i!="object")){if(i.type==="table"){const s=Array.isArray(i.align)?i.align:[];t.push(s.map(a=>a==="left"||a==="center"||a==="right"?a:null))}Array.isArray(i.children)&&n(i.children)}}};return n(e),t}function eve(e,t){if(!Array.isArray(t)||!t.length)return;let n=0;const r=i=>{if(Array.isArray(i)){for(const s of i)if(!(!s||typeof s!="object")){if(s.type==="table"){const a=t[n++];if(a&&a.some(o=>o)){s.align=a.map(l=>l??null);const o=Array.isArray(s.children)?s.children:[];for(const l of o)(Array.isArray(l.children)?l.children:[]).forEach((f,h)=>{const m=a[h];m?f.align=m:delete f.align})}}Array.isArray(s.children)&&r(s.children)}}};r(e)}function tve(e,t){if(!Array.isArray(t)||!t.length)return e;const n=String(e||"").split(N4),r=vz(n);let i=!1;return r.forEach(({start:s},a)=>{const o=t[a];if(!o||!o.some(u=>u))return;const l=W3(n[s]||"").length;l&&(n[s+1]=Xge(o,l),i=!0)}),i?n.join(N4):e}function $T(e){let t=String(e||"").trim().toLowerCase();for(t.startsWith("mailto:")&&(t=t.slice(7)),t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7)),t.startsWith("www.")&&(t=t.slice(4));t.endsWith("/");)t=t.slice(0,-1);return t}function yz(e){const t=Array.isArray(e.children)?e.children:[];let n="";for(const r of t)typeof r.text=="string"?n+=r.text:Array.isArray(r.children)&&(n+=yz(r));return n}function VT(e){if(!Array.isArray(e))return e;const t=n=>{const r=[];for(const i of n){if(!i||typeof i!="object"){r.push(i);continue}const s=Array.isArray(i.children)?t(i.children):void 0;if((i.type==="a"||i.type==="link")&&i.url){const o=yz(i);if(o&&$T(o)===$T(String(i.url))){s&&s.length?r.push(...s):r.push({text:o});continue}r.push({...i,children:s});continue}r.push(s?{...i,children:s}:i)}return r};return t(e)}const Zu="\\",ec=` -`,nve=["com","cn","net","org","io","dev","me","live","co","app","info","xyz","top","cc","tv","site","online","tech","ai"],rve=["```","~~~"];function ive(e){const t=e.trim();return rve.some(n=>t.startsWith(n))}function sve(e){let t=e;t=t.split(Zu+"@").join("@"),t=t.split("http"+Zu+"://").join("http://"),t=t.split("https"+Zu+"://").join("https://"),t=t.split(Zu+"://").join("://"),t=t.split("www"+Zu+".").join("www.");for(const n of nve)t=t.split(Zu+"."+n).join("."+n);return t}function ave(e){const t=String(e||"");if(!t)return t;const n=t.split(ec);let r=!1;const i=[];for(const a of n){if(ive(a)){r=!r,i.push(a);continue}i.push(r?a:sve(a))}let s=i.join(ec);for(;s.endsWith(ec+ec);)s=s.slice(0,-1);return s.endsWith(ec)||(s+=ec),s}function ove(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lve(e,t,n){const i=Jm((n||{}).ignore||[]),s=uve(t);let a=-1;for(;++a0?{type:"text",value:A}:void 0),A===!1)m.lastIndex=S+1;else{if(b!==S&&O({type:"text",value:u.value.slice(b,S)}),Array.isArray(A))for(const T of A)O(T);else A&&O(A);b=S+_[0].length,C=!0}if(!m.global)break;_=m.exec(u.value)}return C?(b?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Vp(e,"(");let s=Vp(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function xz(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Di(n)||Km(n))&&(!t||n!==47)}bz.peek=Bve;function kve(){this.buffer()}function Dve(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Sve(){this.buffer()}function _ve(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ave(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Js(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tve(e){this.exit(e)}function Nve(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Js(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ove(e){this.exit(e)}function Bve(){return"["}function bz(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function Pve(){return{enter:{gfmFootnoteCallString:kve,gfmFootnoteCall:Dve,gfmFootnoteDefinitionLabelString:Sve,gfmFootnoteDefinition:_ve},exit:{gfmFootnoteCallString:Ave,gfmFootnoteCall:Tve,gfmFootnoteDefinitionLabelString:Nve,gfmFootnoteDefinition:Ove}}}function Rve(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bz},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),f=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),f(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?` -`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?wz:Fve))),u(),l}}function Fve(e,t,n){return t===0?e:wz(e,t,n)}function wz(e,t,n){return(n?"":" ")+e}const Ive=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];K3.attention=qve;K3.peek=$ve;function Mve(){return{canContainEols:["delete"],enter:{strikethrough:zve},exit:{strikethrough:jve}}}function Lve(){return{handlers:{delete:K3},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ive}]}}function zve(e){this.enter({type:"delete",children:[],position:void 0},e)}function jve(e){this.exit(e)}function K3(e,t,n,r){const i=n.createTracker(r),s=n.stack.includes("strikethrough")?"~":"~~",a=n.enter("strikethrough");let o=i.move(s);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move(s),a(),o}function qve(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function $ve(){return"~"}function Vve(e){return e.length}function Uve(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Vve,s=[],a=[],o=[],l=[];let u=0,f=-1;for(;++fu&&(u=e[f].length);++Cl[C])&&(l[C]=_)}x.push(y)}a[f]=x,o[f]=E}let h=-1;if(typeof r=="object"&&"length"in r)for(;++hl[h]&&(l[h]=y),g[h]=y),m[h]=_}a.splice(1,0,m),o.splice(1,0,g),f=-1;const b=[];for(;++f0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const gye={tokenize:kye,partial:!0};function vye(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:wye,continuation:{tokenize:Eye},exit:Cye}},text:{91:{name:"gfmFootnoteCall",tokenize:bye},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yye,resolveTo:xye}}}}function yye(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const u=Js(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function xye(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function bye(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!a||h===null||h===91||Cn(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(Js(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Cn(h)||(a=!0),s++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function wye(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(a>999||b===93&&!o||b===null||b===91||Cn(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=Js(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Cn(b)||(o=!0),a++,e.consume(b),b===92?h:f}function h(b){return b===91||b===92||b===93?(e.consume(b),a++,f):f(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(s)||i.push(s),hn(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return t(b)}}function Eye(e,t,n){return e.check(ef,t,e.attempt(gye,t,n))}function Cye(e){e.exit("gfmFootnoteDefinition")}function kye(e,t,n){const r=this;return hn(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Dye(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l1?l(b):(a.consume(b),h++,g);if(h<2&&!n)return l(b);const E=a.exit("strikethroughSequenceTemporary"),C=Ba(b);return E._open=!C||C===2&&!!x,E._close=!x||x===2&&!!C,o(b)}}}class Sye{constructor(){this.map=[],this.index=new Map}add(t,n,r){_ye(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}}function _ye(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}function Aye(e,t){let n=!1;const r=[];for(;t-1;){const{type:Y}=r.events[F][1];if(Y==="lineEnding"||Y==="linePrefix")F--;else break}const z=F>-1?r.events[F][1].type:null,$=z==="tableHead"||z==="tableRow"?w:l;return $===w&&r.parser.lazy[r.now().line]?n(M):$(M)}function l(M){return e.enter("tableHead"),e.enter("tableRow"),u(M)}function u(M){return M===124||(a=!0,s+=1),f(M)}function f(M){return M===null?n(M):wt(M)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),g):n(M):nn(M)?hn(e,f,"whitespace")(M):(s+=1,a&&(a=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(M)))}function h(M){return M===null||M===124||Cn(M)?(e.exit("data"),f(M)):(e.consume(M),M===92?m:h)}function m(M){return M===92||M===124?(e.consume(M),h):h(M)}function g(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),a=!1,nn(M)?hn(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):b(M))}function b(M){return M===45||M===58?E(M):M===124?(a=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),x):S(M)}function x(M){return nn(M)?hn(e,E,"whitespace")(M):E(M)}function E(M){return M===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),C):M===45?(s+=1,C(M)):M===null||wt(M)?O(M):S(M)}function C(M){return M===45?(e.enter("tableDelimiterFiller"),y(M)):S(M)}function y(M){return M===45?(e.consume(M),y):M===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(M))}function _(M){return nn(M)?hn(e,O,"whitespace")(M):O(M)}function O(M){return M===124?b(M):M===null||wt(M)?!a||i!==s?S(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):S(M)}function S(M){return n(M)}function w(M){return e.enter("tableRow"),A(M)}function A(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),A):M===null||wt(M)?(e.exit("tableRow"),t(M)):nn(M)?hn(e,A,"whitespace")(M):(e.enter("data"),T(M))}function T(M){return M===null||M===124||Cn(M)?(e.exit("data"),A(M)):(e.consume(M),M===92?P:T)}function P(M){return M===92||M===124?(e.consume(M),T):T(M)}}function Oye(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,f,h;const m=new Sye;for(;++nn[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},ac(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function KT(e,t,n,r,i){const s=[],a=ac(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function ac(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Bye={name:"tasklistCheck",tokenize:Rye};function Pye(){return{text:{91:Bye}}}function Rye(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Cn(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return wt(l)?t(l):nn(l)?e.check({tokenize:Fye},t,n)(l):n(l)}}function Fye(e,t,n){return hn(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Iye(e){return T3([oye(),vye(),Dye(e),Tye(),Pye()])}const Mye={};function Lye(e){const t=this,n=e||Mye,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Iye(n)),s.push(rye()),a.push(iye(n))}function zye(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function t(){this.buffer()}function n(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];f.type,this.exit(l),f.value=u;const h=f.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function s(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),f=this.stack[this.stack.length-1];f.type,this.exit(l),f.value=u,f.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function jye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` -`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(s,a,o,l){const u=s.value||"",f=o.createTracker(l),h="$".repeat(Math.max(kL(u,"$")+1,2)),m=o.enter("mathFlow");let g=f.move(h);if(s.meta){const b=o.enter("mathFlowMeta");g+=f.move(o.safe(s.meta,{after:` -`,before:g,encode:["$"],...f.current()})),b()}return g+=f.move(` -`),u&&(g+=f.move(u+` -`)),g+=f.move(h),m(),g}function r(s,a,o){let l=s.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const f="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h{const o=new RegExp("\\s"+s+`\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);return o?o[1]!==void 0?o[1]:o[2]!==void 0?o[2]:o[3]||"":""},n=t("src").trim();if(!n)return null;const r={url:n,alt:t("alt")},i=t("width").trim();return/^\d+(\.\d+)?$/.test(i)?r.width=Math.round(Number(i)):/^\d+(\.\d+)?%$/.test(i)&&(r.widthPct=i),r}const Qye=[{re:new RegExp(Fn[ka][0]+"([^"+Fn[ka][1]+"]*)"+Fn[ka][1],"g"),field:ka},{re:new RegExp(Fn[Da][0]+"([^"+Fn[Da][1]+"]*)"+Fn[Da][1],"g"),field:Da},{re:new RegExp(Fn[io][0]+"([^"+Fn[io][1]+"]*)"+Fn[io][1],"g"),field:io},{re:new RegExp(Fn[nl][0]+"([^"+Fn[nl][1]+"]*)"+Fn[nl][1],"g"),field:nl}];function Zye(e){let t=[{...e}];for(const{re:n,field:r}of Qye){const i=[];for(const s of t){const a=typeof s.text=="string"?s.text:"";if(!a||s[r]){i.push(s);continue}n.lastIndex=0;let o=0,l,u=!1;for(;l=n.exec(a);)u=!0,l.index>o&&i.push({...s,text:a.slice(o,l.index)}),i.push({...s,text:l[1],[r]:!0}),o=l.index+l[0].length;u?otypeof n.text=="string"&&n.text.length>0)}function Oz(e){if(typeof e.text=="string")return Zye(e);if(e.type&&Jye.has(e.type))return[e];if(Array.isArray(e.children)){const t=[];for(const n of e.children)for(const r of Oz(n))t.push(r);return[{...e,children:t}]}return[e]}function JT(e){return e&&String(e).split(/(```[\s\S]*?```|~~~[\s\S]*?~~~|\$\$[\s\S]*?\$\$|`+[^`]*`+|\$[^$\n]+\$)/g).map((n,r)=>r%2===1?n:n.replace(/]*>/gi,s=>Y3+encodeURIComponent(s)+B4).replace(/([^<]*)<\/kbd>/gi,(s,a)=>"`"+a+"`").replace(/([^<]*)<\/sup>/gi,(s,a)=>"^"+a+"^").replace(/([^<]*)<\/sub>/gi,(s,a)=>"~"+a+"~").replace(/]*>([^<]*)<\/abbr>/gi,"$1").replace(/([^<]*)<\/mark>/gi,(s,a)=>"=="+a+"==").replace(/([^<]*)<\/u>/gi,(s,a)=>Fn[nl][0]+a+Fn[nl][1]).replace(//gi,Nz).replace(/\[TOC\]/gi,R0).replace(/\[\[([^\[\]\n]+)\]\]/g,(s,a)=>F0+a+e1).replace(/([^<]*)<\/mark>/gi,(s,a)=>Fn[ka][0]+a+Fn[ka][1]).replace(/([^<]*)<\/sup>/gi,(s,a)=>Fn[Da][0]+a+Fn[Da][1]).replace(/([^<]*)<\/sub>/gi,(s,a)=>Fn[io][0]+a+Fn[io][1]).replace(/<\/?(kbd|small|big|ins|del|font|span)(\s[^>]*)?>/gi,"").replace(/==([^=\n]+?)==/g,(s,a)=>Fn[ka][0]+a+Fn[ka][1]).replace(/\^([^^\n]+?)\^/g,(s,a)=>Fn[Da][0]+a+Fn[Da][1]).replace(/(?Fn[io][0]+a+Fn[io][1])).join("")}function Bz(e){if(typeof e.text=="string"){const t=e.text.replace(/[\uE000-\uE007]/g,"");return t===e.text?e:{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Bz)}:e}function P4(e){const t=[];for(const n of e)if(!(!n||typeof n!="object")){if(String(n.type||"").startsWith("mdx")){String(n.name||"").toLowerCase()==="br"?t.push({text:` -`}):Array.isArray(n.children)&&t.push(...P4(n.children));continue}Array.isArray(n.children)?t.push({...n,children:P4(n.children)}):t.push(n)}return t}function Pz(e){if(typeof e.text=="string"){if(!e.text.includes(R0)&&!e.text.includes(F0))return e;const t=e.text.split(R0).join("[TOC]").split(F0).join("[[").split(e1).join("]]");return{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Pz)}:e}function Rz(e){if(typeof e.text=="string"){if(!/\[TOC\]|\[\[/i.test(e.text))return e;const t=e.text.replace(/\[TOC\]/gi,R0).replace(/\[\[([^\[\]\n]+)\]\]/g,(n,r)=>F0+r+e1);return{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Rz)}:e}function exe(e,t){const n=Object.keys(e).filter(i=>i!=="text").sort(),r=Object.keys(t).filter(i=>i!=="text").sort();if(n.join(",")!==r.join(","))return!1;for(const i of n)if(i!=="children"&&e[i]!==t[i])return!1;return!0}function txe(e){const t=[];for(const n of e){if(typeof n.text!="string"){t.push(n);continue}const r=n.text;if(r===""&&Object.keys(n).every(s=>s==="text"))continue;const i=t[t.length-1];if(i&&exe(i,n)){t[t.length-1]={...i,text:String(i.text||"")+r};continue}t.push(n)}return t.length?t:[{text:""}]}function XT(e){if(!Array.isArray(e))return e;const t=[];for(const s of e)for(const a of Oz(s))t.push(a);const n=P4(t).map(Bz),r=s=>{if(typeof s.text=="string"||!Array.isArray(s.children))return s;const a=s.children.map(r),l=a.length>0&&a.every(u=>typeof u.text=="string")?txe(a):a;return l.length===a.length&&l.every((u,f)=>u===a[f])?s:{...s,children:l}},i=n.map(r).map(Pz);return axe(i)}function nxe(e){const n=(typeof e.text=="string"?e.text:"").replace(/\u200b/g,"");if(!n){const a={...e};for(const o of Object.keys(Fn))a[o]&&delete a[o];return a.text="",a}let r=n;const i={...e};let s=!1;for(const a of Object.keys(Fn)){if(!e[a])continue;const[o,l]=Fn[a];r=o+r+l,delete i[a],s=!0}return s?(i.text=r,i):e}function Fz(e){return typeof e.text=="string"?nxe(e):Array.isArray(e.children)?{...e,children:e.children.map(Fz)}:e}function rxe(e){return e.map(t=>Rz(t))}function ixe(e){return Array.isArray(e)?e.map(Fz):e}function sxe(e){if(!e)return e;let t=e;for(const n of Object.keys(Fn)){const[r,i]=Fn[n],s=new RegExp(r+"([^"+i+"]*)"+i,"g");if(n===nl){t=t.replace(s,(l,u)=>""+u+"");continue}const a=n===ka?"==":n===Da?"^":"~",o=a;t=t.replace(s,(l,u)=>a+u+o)}return t=t.split(Nz).join("
    "),t=t.split(R0).join("[TOC]"),t=t.split(F0).join("[[").split(e1).join("]]"),t=t.split(` -`).map(n=>/^[\u200b\s]*\u200b[\u200b\s]*$/.test(n)?"":n).join(` -`),t=t.replace(/ /g," "),t.replace(/[\uE000-\uE007]/g,"")}function axe(e){if(!Array.isArray(e))return e;const t=s=>{let a="";try{a=decodeURIComponent(s)}catch{return null}const o=Xye(a);if(!o)return null;const l={type:String(ee.img),url:o.url,caption:[{text:o.alt||""}],children:[{text:""}]};return o.width&&(l.width=o.width),o.widthPct&&(l.widthPct=o.widthPct),l},n=s=>{const a=typeof s.text=="string"?s.text:"";if(!a||a.indexOf(Y3)<0)return[s];const o=[];YT.lastIndex=0;let l=0,u;for(;u=YT.exec(a);){u.index>l&&o.push({...s,text:a.slice(l,u.index)});const f=t(u[1]);o.push(f||{...s,text:u[0]}),l=u.index+u[0].length}return l!(typeof f.text=="string"&&f.text===""))},r=s=>{if(typeof s.text=="string")return n(s);if(!Array.isArray(s.children))return[s];const a=[];for(const o of s.children)a.push(...r(o));return[{...s,children:a}]},i=[];for(const s of e)for(const a of r(s)){if(a.type===String(ee.p)&&Array.isArray(a.children)){const o=a.children.filter(l=>!(typeof l.text=="string"&&!l.text.trim()));if(o.length===1&&o[0]&&o[0].type===String(ee.img)){i.push(o[0]);continue}}i.push(a)}return i}function oxe({kind:e,code:t}){const n=te.useRef(null),[r,i]=te.useState(""),[s,a]=te.useState(0);return te.useEffect(()=>{const o=()=>a(l=>l+1);return window.addEventListener("cmark-theme",o),()=>window.removeEventListener("cmark-theme",o)},[]),te.useEffect(()=>{let o=!0,l=null,u=null;return(async()=>{if(n.current)try{if(e==="mermaid"){const f=(await f6(async()=>{const{default:b}=await import("./mermaid-C_q9pug0.js").then(x=>x.be);return{default:b}},__vite__mapDeps([0,1]),import.meta.url)).default,h=document.documentElement.getAttribute("data-theme")==="dark";f.initialize({startOnLoad:!1,securityLevel:"loose",theme:h?"base":"default",themeVariables:h?{darkMode:!0,background:"#21262d",primaryColor:"#1f2a37",primaryTextColor:"#e6edf3",primaryBorderColor:"#58a6ff",secondaryColor:"#21262d",tertiaryColor:"#161b22",mainBkg:"#1f2a37",nodeBorder:"#58a6ff",nodeTextColor:"#e6edf3",lineColor:"#c9d1d9",textColor:"#e6edf3",titleColor:"#e6edf3",edgeLabelBackground:"#161b22",clusterBkg:"#161b22",clusterBorder:"#30363d",fontSize:"14px"}:{}});const m="mmd-"+Math.random().toString(36).slice(2,9),{svg:g}=await f.render(m,t);o&&n.current&&(n.current.innerHTML=g)}else{const f=await f6(()=>import("./echarts-BAPDkhe3.js"),[],import.meta.url);if(!o||!n.current)return;const h=n.current,m=f.getInstanceByDom(h);m&&m.dispose();const g=document.documentElement.getAttribute("data-theme")==="dark",b=g?"cmark-echarts-dark":"cmark-echarts-light",x=g?"#7d8894":"#b8c2cc",E=g?"rgba(255,255,255,0.20)":"#dbe1e8",C=g?"#b1bac4":"#4a5560",y=g?"#e6edf3":"#1f2328";f.registerTheme(b,{backgroundColor:"transparent",textStyle:{color:y},title:{textStyle:{color:y,fontWeight:600}},legend:{textStyle:{color:C}},tooltip:{backgroundColor:g?"#1c2128":"#ffffff",borderColor:g?"#30363d":"#d0d7de",textStyle:{color:y}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:x}},axisTick:{lineStyle:{color:x}},axisLabel:{color:C},splitLine:{show:!0,lineStyle:{color:E,type:"dashed"}}},valueAxis:{axisLine:{show:!0,lineStyle:{color:x}},axisTick:{lineStyle:{color:x}},axisLabel:{color:C},splitLine:{show:!0,lineStyle:{color:E,type:"dashed"}}},logarithmicAxis:{axisLine:{lineStyle:{color:x}},axisLabel:{color:C},splitLine:{lineStyle:{color:E,type:"dashed"}}}});const _=f.init(h,b,{renderer:"svg"}),O=JSON.parse(t);delete O.height,delete O.width,_.setOption(O),l=_;const S=()=>{if(o)try{const A=h.clientWidth,T=h.clientHeight;if(!A||!T)return;const P=_;(P.getWidth()!==A||P.getHeight()!==T)&&_.resize({width:A,height:T})}catch{}};setTimeout(S,0),setTimeout(S,150);const w=new ResizeObserver(()=>{if(o)try{const A=h.clientWidth,T=h.clientHeight;A&&T&&_.resize({width:A,height:T})}catch{}});w.observe(h),u=w}o&&i("")}catch(f){o&&i(f?.message||"渲染失败")}})(),()=>{o=!1;try{u?.disconnect()}catch{}if(l){try{l.dispose()}catch{}l=null}}},[e,t,s]),V.jsxs(V.Fragment,{children:[V.jsx("div",{className:"diagram-canvas",ref:n,style:e==="echarts"?{width:"100%",height:320}:void 0}),r?V.jsx("div",{className:"diagram-err",children:r}):null]})}const em=new Set;let up=null;function J3(e){if(em.size===0){up=e;return}em.forEach(t=>t(e))}function lxe(){const[e,t]=te.useState(null),[n,r]=te.useState(""),i=te.useRef(null),s=te.useRef(null);s.current=e,te.useEffect(()=>{const u=f=>{t(f),r(f.tex||"")};return em.add(u),up&&(u(up),up=null),()=>{em.delete(u)}},[]),te.useEffect(()=>{if(!e)return;const u=setTimeout(()=>{i.current?.focus();const f=i.current?.value.length||0;i.current?.setSelectionRange(f,f)},30);return()=>clearTimeout(u)},[e]);const a=()=>t(null),o=()=>{const u=s.current;if(u)try{u.onApply(n)}catch(f){console.error("[equation-dialog]",f)}t(null)};te.useEffect(()=>{if(!e)return;const u=f=>{f.key==="Escape"&&(f.stopPropagation(),f.preventDefault(),t(null))};return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[e]);let l="";if(e)try{l=I4.renderToString(n.trim()||"\\;",{throwOnError:!1,displayMode:!0})}catch{l=""}return e?nm.createPortal(V.jsx("div",{className:"eq-mask",onMouseDown:a,children:V.jsxs("div",{className:"eq-dialog",onMouseDown:u=>u.stopPropagation(),children:[V.jsxs("div",{className:"eq-head",children:[V.jsx("span",{className:"eq-title",children:e.title||"编辑公式"}),V.jsx("button",{type:"button",className:"eq-x",onClick:a,title:"关闭",children:V.jsx("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:V.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]}),V.jsx("div",{className:"eq-preview",dangerouslySetInnerHTML:{__html:l}}),n.trim()?null:V.jsx("div",{className:"eq-empty",children:"上方会实时显示公式效果"}),V.jsx("textarea",{ref:i,className:"eq-input",value:n,spellCheck:!1,placeholder:"在这里输入 LaTeX,例如 \\frac{a}{b} 或 \\int_0^1 x^2\\,dx",onChange:u=>r(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.ctrlKey||u.metaKey)&&(u.preventDefault(),o())}}),V.jsxs("div",{className:"eq-foot",children:[V.jsx("span",{className:"eq-hint",children:"Ctrl+Enter 确定 · Esc 取消"}),V.jsx("button",{type:"button",className:"eq-btn",onClick:a,children:"取消"}),V.jsx("button",{type:"button",className:"eq-btn primary",onClick:o,children:"确定"})]})]})}),document.body):null}/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uxe=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */function cxe(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:uxe(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fxe=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dxe=e=>{const t=fxe(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */function Q2(e){return e!=null}function hxe(e,t={}){const n=t.attributeNames??{},r=m=>n[m]??m,i=e.size??e.width??$l.width,s=e.size??e.height??$l.height,a=e.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],o=[...e.name?[`lucide-${e.name}`]:[],...a],l=t.className?.split(" ").filter(Boolean)??[],u=t.includeDefaultClasses===!1?R4(...l):R4("lucide",...o,...l),f=t.absoluteStrokeWidth?Number(t.strokeWidth??$l["stroke-width"])*Number(e.size??e.width??$l.width)/Number(t.size??t.width??$l.width):t.strokeWidth??$l["stroke-width"];return["svg",{...Object.entries($l).reduce((m,[g,b])=>(m[r(g)]=b,m),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&Q2(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&Q2(t.width)&&{[r("width")]:t.width},..."height"in t&&Q2(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:f,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${i} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[g,b,x]=m,E=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...b}:b;return x?[g,E,x]:[g,E]})]}/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */function pxe(e,t={}){return hxe(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mxe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},gxe=te.createContext({}),vxe=()=>te.useContext(gxe),yxe=te.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:s,nonScalingStroke:a,className:o="",children:l,iconNode:u=[],icon:f={node:u,aliases:[],size:24},...h},m)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:x=!1,nonScalingStroke:E=!1,color:C="currentColor",className:y=""}=vxe()??{},_=!!l||mxe(h),[O,S,w=[]]=pxe(f,{color:e??C,width:n??t??g,height:r??t??g,strokeWidth:i??b,absoluteStrokeWidth:s??x,nonScalingStroke:a??E,className:R4(y,o),hasA11yProp:_,attributes:h});return te.createElement(O,{ref:m,...S},[...w.map(([A,T])=>te.createElement(A,T)),...Array.isArray(l)?l:[l]])});/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */function An(e,t=[],n=[]){const r=typeof e=="string"?cxe(e,t,n):e,i=te.forwardRef(({className:s,...a},o)=>te.createElement(yxe,{ref:o,icon:r,className:s,...a}));return r.name&&(i.displayName=dxe(r.name)),i}/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iz={name:"arrow-down-to-line",size:24,node:[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]};Iz.node;const xxe=An(Iz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mz={name:"arrow-left-to-line",size:24,node:[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]]};Mz.node;const bxe=An(Mz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lz={name:"arrow-right-to-line",size:24,node:[["path",{d:"M17 12H3",key:"8awo09"}],["path",{d:"m11 18 6-6-6-6",key:"8c2y43"}],["path",{d:"M21 5v14",key:"nzette"}]]};Lz.node;const wxe=An(Lz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zz={name:"arrow-up-to-line",size:24,node:[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]};zz.node;const Exe=An(zz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jz={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};jz.node;const Cxe=An(jz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qz={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};qz.node;const kxe=An(qz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $z={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};$z.node;const Dxe=An($z);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vz={name:"columns-3",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],aliases:["panels-left-right"]};Vz.node;const Sxe=An(Vz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Uz={name:"heading-1",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]};Uz.node;const _xe=An(Uz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hz={name:"heading-2",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]};Hz.node;const Axe=An(Hz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wz={name:"heading-3",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]};Wz.node;const Txe=An(Wz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kz={name:"highlighter",size:24,node:[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]};Kz.node;const Nxe=An(Kz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gz={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};Gz.node;const Oxe=An(Gz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yz={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};Yz.node;const Bxe=An(Yz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jz={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};Jz.node;const Pxe=An(Jz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xz={name:"list-ordered",size:24,node:[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]};Xz.node;const Rxe=An(Xz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qz={name:"list-todo",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]};Qz.node;const Fxe=An(Qz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zz={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};Zz.node;const Ixe=An(Zz);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ej={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};ej.node;const Mxe=An(ej);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tj={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};tj.node;const Lxe=An(tj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nj={name:"rows-3",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],aliases:["panels-top-bottom"]};nj.node;const zxe=An(nj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rj={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};rj.node;const jxe=An(rj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ij={name:"sigma",size:24,node:[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]};ij.node;const qxe=An(ij);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sj={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};sj.node;const $xe=An(sj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aj={name:"square-code",size:24,node:[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],aliases:["code-square"]};aj.node;const Vxe=An(aj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oj={name:"square-function",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],aliases:["function-square"]};oj.node;const Uxe=An(oj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lj={name:"strikethrough",size:24,node:[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]};lj.node;const Hxe=An(lj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uj={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};uj.node;const Wxe=An(uj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cj={name:"text-align-center",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],aliases:["align-center"]};cj.node;const Kxe=An(cj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fj={name:"text-align-end",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],aliases:["align-right"]};fj.node;const Gxe=An(fj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dj={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};dj.node;const Yxe=An(dj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hj={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};hj.node;const Jxe=An(hj);/** - * @license lucide-react v1.61.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pj={name:"underline",size:24,node:[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]};pj.node;const Xxe=An(pj);function Qxe(e){const t=String(e||"").replace(/\r/g,"").split(` -`).filter(f=>f.trim());if(t.length<2)return null;const n=f=>f.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(h=>h.trim()),r=n(t[0]);if(!r.length)return null;const i=/^\s*\|?[\s:|-]+\|?\s*$/.test(t[1])&&t[1].includes("-"),a=(i?n(t[1]):[]).map(f=>{const h=f.startsWith(":"),m=f.endsWith(":");return h&&m?"center":m?"right":h?"left":void 0}),o=i?t.slice(2):t.slice(1),l=[r,...o.map(n)],u=Math.max(...l.map(f=>f.length));return{type:"table",...a.some(Boolean)?{align:a.map(f=>f??null)}:{},children:l.map((f,h)=>({type:"tr",children:Array.from({length:u}).map((m,g)=>({type:h===0?"th":"td",...a[g]?{align:a[g]}:{},children:[{type:"p",children:[{text:f[g]??""}]}]}))}))}}let tc=null;function Zxe({tableNode:e,onOpenChange:t}){const{editor:n,tf:r}=Y0($F),[i,s]=te.useState(!1),[a,o]=te.useState(""),[l,u]=te.useState(!1),[f,h]=te.useState(""),m=te.useRef(null),g=()=>{const y=au(n),_=y?y[1]:null,O=Qxe(a);if(!O){h("解析失败:至少要两行,第一行是表头,格式 | a | b |");return}if(!_){h("没有定位到表格,请先把光标放到表格里");return}try{n.tf.removeNodes({at:_}),n.tf.insertNodes(O,{at:_}),h(""),u(!1)}catch(S){h("写回失败:"+(S?.message||""))}},b=()=>{s(!1);try{t?.(!1)}catch{}tc===b&&(tc=null)};te.useEffect(()=>{if(!i)return;const y=m.current;if(!y)return;y.style.height="auto";const _=Math.max(120,Math.round(window.innerHeight*.6)),O=Math.min(y.scrollHeight+2,_);y.style.height=O+"px",y.style.overflowY=y.scrollHeight+2>_?"auto":"hidden"},[a,i]);const x=()=>{if(i){b();return}if(tc){try{tc()}catch{}tc=null}let y="";try{const _=au(n),O=e||(_?_[0]:void 0);O?(y=String(n.getApi(tl).markdown.serialize({value:[O]})||""),y.trim()||(y="(这个表格没有可序列化的内容)")):y="(没有定位到表格,请先把光标放到表格里再点)"}catch(_){y="(读取表格代码失败:"+(_&&_.message?_.message:"未知错误")+")",console.error("[table-code]",_)}o(y.replace(/\n+$/,"")),s(!0);try{t?.(!0)}catch{}tc=b},E=y=>{try{const _=au(n),O=n.selection;if(!_||!O)return;const[S,w]=_,T=O.anchor.path.slice(w.length)[1];if(typeof T!="number")return;const P=(S.children||[]).length,M=S,F=Array.isArray(M.align)?[...M.align]:[];F[T]=y;try{n.tf.setNodes({align:F},{at:w})}catch{}for(let z=0;zr.insert.tableRow({before:!0})},{k:"rowDown",tip:"下方插入行",icon:V.jsx(xxe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableRow()},{k:"delRow",tip:"删除行",icon:V.jsx(zxe,{size:15,strokeWidth:1.8}),run:()=>r.remove.tableRow(),danger:!0},{k:"colLeft",tip:"左侧插入列",icon:V.jsx(bxe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableColumn({before:!0})},{k:"colRight",tip:"右侧插入列",icon:V.jsx(wxe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableColumn()},{k:"delCol",tip:"删除列",icon:V.jsx(Sxe,{size:15,strokeWidth:1.8}),run:()=>r.remove.tableColumn(),sep:!0,danger:!0},{k:"alignLeft",tip:"列左对齐",icon:V.jsx(Yxe,{size:15,strokeWidth:1.8}),run:()=>E("left")},{k:"alignCenter",tip:"列居中对齐",icon:V.jsx(Kxe,{size:15,strokeWidth:1.8}),run:()=>E("center")},{k:"alignRight",tip:"列右对齐",icon:V.jsx(Gxe,{size:15,strokeWidth:1.8}),run:()=>E("right"),sep:!0},{k:"delTable",tip:"删除整个表格",icon:V.jsx(Jxe,{size:15,strokeWidth:1.8}),run:()=>r.remove.table(),danger:!0},...i&&l?[{k:"saveCode",tip:"保存表格代码",icon:V.jsx(jxe,{size:15,strokeWidth:1.8}),run:()=>{},cls:"tc-right is-dirty"}]:[],{k:"viewCode",tip:"查看/隐藏表格代码",icon:V.jsx(kxe,{size:15,strokeWidth:1.8}),run:()=>{},cls:"tc-right"+(i?" is-on":"")}];return V.jsxs(te.Fragment,{children:[i?V.jsxs("div",{className:"table-code-panel",contentEditable:!1,onMouseDown:y=>{y.stopPropagation();const _=y.target;_&&!_.closest("textarea, input, button")&&y.preventDefault()},onMouseUp:y=>y.stopPropagation(),onPointerDown:y=>y.stopPropagation(),onClick:y=>y.stopPropagation(),onDoubleClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),children:[V.jsx("textarea",{ref:m,className:"table-code-body",value:a,spellCheck:!1,onChange:y=>{o(y.target.value),u(!0)}}),f?V.jsx("div",{className:"table-code-err",children:f}):null]}):null,C.map((y,_)=>{const O=y.cls?.includes("tc-right")&&C.findIndex(S=>S.cls?.includes("tc-right"))===_;return V.jsxs(te.Fragment,{children:[V.jsx("button",{type:"button",title:y.tip,className:"tc-btn"+(y.danger?" danger":"")+(y.cls?" "+y.cls:"")+(O?" tc-right-first":""),onMouseDown:S=>S.preventDefault(),onClick:S=>{if(y.k==="viewCode"){S.preventDefault();try{x()}catch(w){console.error("[table-toolbar] viewCode",w)}return}if(y.k==="saveCode"){S.preventDefault();try{g()}catch(w){console.error("[table-toolbar] saveCode",w)}return}try{y.run(),n.tf.focus()}catch(w){console.error("[table-toolbar]",y.k,w)}},children:y.icon}),y.sep?V.jsx("span",{}):null]},y.k)})]})}function ebe({attributes:e,children:t,element:n,editor:r}){const i=n;return i.checked!==void 0?V.jsxs("div",{...e,className:"p task-list-item"+(i.checked?" task-checked":""),children:[V.jsx("span",{className:"task-list-checkbox",contentEditable:!1,children:V.jsx("input",{type:"checkbox",checked:!!i.checked,onChange:s=>{const a=r.api.findPath(n);a&&r.tf.setNodes({checked:s.target.checked},{at:a})}})}),V.jsx("span",{className:"task-list-text",children:t})]}):V.jsx("div",{...e,className:"p",children:t})}function tf(e){return function({attributes:n,children:r}){return V.jsx("div",{...n,className:"h"+e,children:r})}}const tbe=tf(1),nbe=tf(2),rbe=tf(3),ibe=tf(4),sbe=tf(5),abe=tf(6);function obe({attributes:e,children:t}){return V.jsx("blockquote",{...e,className:"blockquote",children:t})}function lbe({attributes:e,children:t,element:n}){const r=t1(n);return V.jsxs("div",{...e,className:"hr void-wrap",contentEditable:!1,onClick:r,children:[V.jsx(I0,{}),t]})}const Z2=10;function ube(e,t,n){const r=e,i=cl(r,t);if(!i)return;const s=n==="before"?i.slice():[i[0]+1],a=o=>{const l=o;return!!l&&l.type===ee.p&&Array.isArray(l.children)&&l.children.every(u=>typeof u.text=="string")};try{const o=r.api?.node?.(s);o&&a(o[0])?(r.tf?.select)({path:[...s,0],offset:0}):((r.tf?.insertNodes)({type:ee.p,children:[{text:""}]},{at:s}),(r.tf?.select)({path:[...s,0],offset:0})),r.tf?.focus?.()}catch(o){console.error("[void-gap]",o)}}function I0(){const e=t=>{t.preventDefault(),t.stopPropagation()};return V.jsxs(V.Fragment,{children:[V.jsx("span",{className:"void-gap void-gap-top",contentEditable:!1,"aria-hidden":"true",onMouseDown:e,onPointerDown:e}),V.jsx("span",{className:"void-gap void-gap-bottom",contentEditable:!1,"aria-hidden":"true",onMouseDown:e,onPointerDown:e})]})}function t1(e){const t=vr();return n=>{const r=n.target;if(r&&typeof r.closest=="function"&&r.closest(".code-lang, .code-editor-copy, .code-lang-list"))return;const i=n.currentTarget.getBoundingClientRect(),s=n.clientY-i.top;s>Z2&&sT.locked),l=t1(n),[u,f]=te.useState(!1),[h,m]=te.useState(!1),[g,b]=te.useState({top:0,left:0}),x=te.useRef(null),E=te.useRef(null),C=te.useRef(null),y=ew.includes(s)?ew:[s,...ew];te.useEffect(()=>{if(!u)return;const T=M=>{const F=M.target;x.current&&x.current.contains(F)||E.current&&E.current.contains(F)||f(!1)},P=M=>{M.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",T),document.addEventListener("keydown",P),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("keydown",P)}},[u]);const _=(i.lang||"").toLowerCase(),O=_==="mermaid"||_==="echarts",S=T=>(T||[]).map(P=>{const M=P;if(typeof M.text=="string")return M.text;const F=M.children?S(M.children):"";return M.type==="code_line",F}).join(` -`),w=S(i.children||[]).split(` -`).map(T=>T.replace(/\n+$/,"")).join(` -`).replace(/\n{3,}/g,` - -`).replace(/^\n+|\n+$/g,""),A=()=>{try{navigator.clipboard.writeText(w)}catch{}};return V.jsxs("div",{className:"code-block-wrap void-wrap"+(a?" active":"")+(O&&w.trim()&&!h?" is-source-hidden":"")+(u?" is-lang-open":""),onClick:l,children:[V.jsx(I0,{}),V.jsx("button",{ref:x,type:"button",className:"code-lang"+(o?" is-locked":""),contentEditable:!1,disabled:o,onMouseDown:T=>{T.preventDefault()},onClick:T=>{if(T.stopPropagation(),!o){f(P=>!P);try{const P=r;C.current=P.api?.findPath?.(n)||cl(r,n)}catch(P){C.current=cl(r,n),console.error("[code-lang findPath]",P)}try{const P=x.current?.getBoundingClientRect(),z=x.current?.closest(".code-block-wrap")?.querySelector(":scope > .code-editor-copy")?.getBoundingClientRect(),$=150,Y=6;if(P&&z){let Z=z.left-$-Y;Z<8&&(Z=Math.max(8,P.left)),b({top:P.bottom+4,left:Z})}else P&&b({top:P.bottom+4,left:P.left})}catch(P){console.error("[code-lang rect]",P)}}},title:"切换代码语言",children:s}),V.jsx("button",{type:"button",className:"code-editor-copy",contentEditable:!1,onClick:T=>{T.stopPropagation(),A()},title:"复制代码",children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),V.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),u&&!o?nm.createPortal(V.jsx("div",{ref:E,className:"code-lang-list",contentEditable:!1,style:{top:g.top,left:g.left},onMouseDown:T=>T.preventDefault(),children:y.map(T=>V.jsx("div",{className:"code-lang-item"+(T===s?" on":""),onMouseDown:P=>{P.preventDefault(),P.stopPropagation();const M=C.current,F=r;if(M)try{F.tf?.setNodes?.({lang:T},{at:M})}catch(z){console.error("[code-lang]",z)}f(!1)},children:T},T))}),document.body):null,V.jsx("pre",{...e,className:"code-editor"+(O&&w.trim()?h?"":" is-source-hidden":""),"data-lang":i.lang||"",children:t}),O&&w.trim()?V.jsxs("div",{className:"diagram-box",contentEditable:!1,children:[V.jsx("button",{type:"button",className:"diagram-code-toggle"+(h?" is-on":""),contentEditable:!1,onMouseDown:T=>T.preventDefault(),onClick:T=>{T.stopPropagation(),m(P=>!P)},title:h?"隐藏源码":"显示源码",children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"m18 16 4-4-4-4"}),V.jsx("path",{d:"m6 8-4 4 4 4"}),V.jsx("path",{d:"m14.5 4-5 16"})]})}),V.jsx("div",{className:"diagram-canvas"+(_==="echarts"?" is-full":""),children:V.jsx(oxe,{kind:_,code:w})})]}):null]})}function fbe({attributes:e,children:t}){return V.jsx("div",{...e,className:"code-line",children:t})}const dbe={"hljs-built_in":"builtin","hljs-regexp":"regex","hljs-attr":"attr-name","hljs-attribute":"attr-name","hljs-literal":"boolean","hljs-selector-tag":"selector","hljs-selector-class":"selector","hljs-selector-id":"selector","hljs-meta":"important","hljs-section":"property","hljs-params":"variable"};function hbe(e){const t=[];for(const r of String(e||"").split(/\s+/).filter(Boolean))if(r==="hljs-title")t.push("function");else if(r==="class_"||r==="hljs-class")t.push("class-name");else{if(r.endsWith("_"))continue;t.push(dbe[r]??(r.startsWith("hljs-")?r.slice(5):r))}const n=[...new Set(t)];return n.includes("class-name")?n.filter(r=>r!=="function").join(" "):n.join(" ")}function pbe({attributes:e,children:t,leaf:n}){const r=n.className||"",i=hbe(r),s=e?.className,a=i?["token",i,s].filter(Boolean).join(" "):s;return V.jsx("span",{...e,className:a,children:t})}function mbe({attributes:e,children:t,element:n}){const r=et(u=>u.locked),i=t1(n),s=te.useRef(null),[a,o]=te.useState(!1);te.useEffect(()=>{const u=s.current,f=u?.closest(".table-wrap");if(!u||!f)return;let h=0;const m=()=>{u.classList.remove("is-pinned"),u.style.position="",u.style.top="",u.style.left="",u.style.width=""},g=()=>{cancelAnimationFrame(h),h=requestAnimationFrame(()=>{let b=f.parentElement;for(;b&&b!==document.body;){const y=getComputedStyle(b);if(/(auto|scroll)/.test(y.overflowY))break;b=b.parentElement}if(!b||b===document.body){m();return}const x=f.getBoundingClientRect(),E=b.getBoundingClientRect(),C=u.offsetHeight||30;x.topE.top+C?(u.classList.add("is-pinned"),u.style.position="fixed",u.style.top=Math.round(E.top)+"px",u.style.left=Math.round(x.left)+"px",u.style.width=Math.round(x.width)+"px"):m()})};return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{cancelAnimationFrame(h),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[]);const l=cF(u=>{try{const f=au(u);if(!f)return!1;const h=u.api.findPath?.(n);return h?f[1].join(",")===h.join(","):!1}catch{return!1}},[n]);return V.jsxs("div",{className:"table-wrap void-wrap"+((l||a)&&!r?" is-bar-open":""),onClick:i,children:[V.jsx(I0,{}),V.jsx("div",{ref:s,className:"table-sticky-bar"+((l||a)&&!r?"":" is-hidden"),contentEditable:!1,"aria-hidden":!l||r,onClick:u=>u.stopPropagation(),onMouseDown:u=>u.stopPropagation(),onPointerDown:u=>u.stopPropagation(),children:V.jsx(Zxe,{tableNode:n,onOpenChange:o})}),V.jsx("table",{...e,className:"table",children:V.jsx("tbody",{children:t})})]})}function gbe({attributes:e,children:t}){return V.jsx("tr",{...e,className:"table-row",children:t})}function QT({attributes:e,children:t,element:n}){const r=n,i=!!r.header||String(r.type||"")==="th";return V.jsx("td",{...e,className:"table-cell"+(i?" is-header":""),style:r.align?{textAlign:r.align}:void 0,children:t})}function vbe({attributes:e,children:t,element:n}){const r=t1(n),i=vr(),s=et(F=>F.locked),a=te.useRef(null),o=n,l=(()=>{const F=Number(o.width);return Number.isFinite(F)&&F>0?Math.round(F):0})(),u=te.useRef(null),[f,h]=te.useState(null),[,m]=te.useState(0),g=f??l,b=(()=>{const F=u.current?.naturalWidth||0;return!g||!F?100:Math.min(100,Math.max(10,Math.round(g/F*100)))})(),x=te.useRef(null),E=F=>{x.current&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>{try{const z=cl(i,n);if(!z)return;const $=u.current?.naturalWidth||0,Y=i.tf;F>=100?Y?.setNodes?.({width:null},{at:z}):$>0&&Y?.setNodes?.({width:Math.round($*F/100)},{at:z})}catch(z){console.error("[img-zoom]",z)}},300)},C=o.caption,y=(()=>{if(!C)return"";if(typeof C=="string")return C;if(Array.isArray(C))return C.map(z=>{const $=z;return typeof $.text=="string"?$.text:Array.isArray($.children)?$.children.map(Y=>String(Y?.text||"")).join(""):""}).join("");const F=C;return typeof F.text=="string"?F.text:""})(),_=o.alt||y,O=window.__CMARK;let S=o.url||"";try{const F=et.getState().currentRel;O?.resolveImageUrl&&(S=O.resolveImageUrl(o.url||"",F))}catch{}const w=F=>decodeURIComponent(F.replace(/^file:\/\/\/?/i,"")).replace(/\//g,"\\"),A=F=>{F.stopPropagation();const z=Math.min(100,Math.max(10,Number(F.target.value)||100)),$=u.current?.naturalWidth||0;h(z>=100||!$?null:Math.max(1,Math.round($*z/100))),E(z)},T=F=>{F.stopPropagation(),F.preventDefault();try{const z=window.ztools;/^file:/i.test(S)?z?.shellOpenPath?.(w(S)):/^https?:/i.test(S)&&z?.shellOpenExternal?.(S)}catch(z){console.error("[img-open]",z)}},P=()=>{a.current=cl(i,n);const F=a.current;if(F)try{i.tf?.removeNodes?.({at:F})}catch(z){console.error("[img-del]",z)}},M=s?null:V.jsxs("div",{className:"img-handle",contentEditable:!1,onClick:F=>F.stopPropagation(),children:[V.jsxs("span",{className:"img-zoom",title:"拖动调整图片大小",children:[V.jsx("input",{type:"range",className:"img-zoom-range",min:10,max:100,step:5,value:b,onChange:A,onClick:F=>F.stopPropagation(),onMouseDown:F=>F.stopPropagation()}),V.jsxs("span",{className:"img-zoom-val",children:[b,"%"]})]}),V.jsx("button",{type:"button",title:"打开图片",onClick:T,children:V.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M9.5 2.5h4v4"}),V.jsx("path",{d:"M13.5 2.5L7.5 8.5"}),V.jsx("path",{d:"M12 9.5v3a1.5 1.5 0 01-1.5 1.5h-6A1.5 1.5 0 013 12.5v-6A1.5 1.5 0 014.5 5h3"})]})}),V.jsx("button",{type:"button",className:"danger",title:"删除图片",onClick:P,children:V.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M3 4.5h10"}),V.jsx("path",{d:"M6.5 4.5V3h3v1.5"}),V.jsx("path",{d:"M4.5 4.5l.6 8a1 1 0 001 .9h3.8a1 1 0 001-.9l.6-8"})]})})]});return S?V.jsxs("div",{...e,className:"block-img void-wrap",onClick:r,children:[V.jsx(I0,{}),V.jsx("img",{ref:u,src:S,alt:_,style:g?{width:g+"px",maxWidth:"100%"}:void 0,onLoad:()=>m(F=>F+1),contentEditable:!1,draggable:!1,onClick:F=>{F.stopPropagation()},title:s?"":"点击显示图片操作"}),M,t]}):V.jsxs("div",{...e,className:"block-img is-broken void-wrap",contentEditable:!1,onClick:F=>{r(F)},children:[V.jsx(I0,{}),V.jsxs("span",{className:"img-missing",children:["图片附件找不到:",_||o.url||"(无 URL)"]}),M,t]})}function ybe({attributes:e,children:t,element:n}){const r=n,i=vr(),s=r.texExpression||r.value||"";let a="";try{a=I4.renderToString(s,{throwOnError:!1,displayMode:!0})}catch{a=""}const o=()=>{const u=cl(i,n);if(u)try{i.tf?.select?.(u)}catch(f){console.error("[equation-select]",f)}},l=()=>{const u=cl(i,n);J3({tex:s,title:"编辑公式",onApply:f=>{if(!u)return;const h=i;try{h.tf?.setNodes?.({texExpression:f},{at:u})}catch(m){console.error("[equation-edit]",m)}}})};return V.jsxs("div",{...e,className:"math-leaf",contentEditable:!1,onClick:u=>{u.stopPropagation(),o()},children:[V.jsxs("div",{className:"math-canvas",children:[V.jsx("button",{type:"button",className:"math-toggle",contentEditable:!1,onMouseDown:u=>u.preventDefault(),onClick:u=>{u.stopPropagation(),l()},title:"编辑公式",children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"m9 6-6 6 6 6"}),V.jsx("path",{d:"m15 6 6 6-6 6"})]})}),V.jsx("div",{className:"math-render",dangerouslySetInnerHTML:{__html:a}})]}),t]})}function xbe({attributes:e,children:t,element:n}){const r=n,i=r.texExpression||r.value||"";let s="";try{s=I4.renderToString(i,{throwOnError:!1,displayMode:!1})}catch{s=""}const a=vr(),o=()=>{const l=cl(a,n);J3({tex:i,title:"编辑行内公式",onApply:u=>{if(!l)return;const f=a;try{f.tf?.setNodes?.({texExpression:u},{at:l})}catch(h){console.error("[inline-equation-edit]",h)}}})};return V.jsxs("span",{...e,className:"math-inline",contentEditable:!1,children:[V.jsx("span",{className:"math-inline-body",dangerouslySetInnerHTML:{__html:s}}),V.jsx("button",{type:"button",className:"math-inline-toggle",contentEditable:!1,onMouseDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),o()},title:"编辑行内公式",children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"m9 6-6 6 6 6"}),V.jsx("path",{d:"m15 6 6 6-6 6"})]})}),t]})}function bbe({attributes:e,children:t}){return V.jsx("mark",{...e,className:"search-hit-mark",children:t})}function wbe({attributes:e,children:t,element:n}){const i=n.url||"";return V.jsx("a",{...e,className:"link",href:i,title:i,onClick:s=>{s.preventDefault(),window.__CMARK?.openExternal?.(i)},children:t})}const ZT=Dle(ble),tw=e=>String(e).replace(/&/g,"&").replace(/"/g,""").replace(//g,">"),Ebe={hard:!1,bullet:"-",rule:"-",emphasis:"*",strong:"*",fences:!0};let mj="";function Cbe(e){mj=String(e||"")}const kbe=Sm({key:"searchHit",node:{isLeaf:!0},render:{leaf:bbe},decorate:({entry:e})=>{const t=mj.trim().toLowerCase();if(!t)return[];const n=e;let r,i;if(Array.isArray(n))r=n[0],i=n[1];else if(n&&typeof n=="object"){const l=n;r=l.node,i=l.path}if(!Array.isArray(i))return[];if(!kn.isText(r))return[];const s=(r.text||"").toLowerCase();if(!s)return[];const a=[];let o=s.indexOf(t);for(;o>=0;)a.push({anchor:{path:i,offset:o},focus:{path:i,offset:o+t.length},searchHit:!0}),o=s.indexOf(t,o+t.length);return a}}),Dbe=[{type:ee.p,children:[{text:""}]}];function Sbe(){const e=et(S=>S.content),t=et(S=>S.currentRel),n=et(S=>S.setContent),r=et(S=>S.locked),i=et(S=>S.bodyFontSize),s=et(S=>S.sourceMode),a=et(S=>S.searchTerm),o=et(S=>S.setEditorApi),l=et(S=>S.setActive),u=et(S=>S.loadRevision),f=te.useRef(null),[h,m]=te.useState(0),g=te.useMemo(()=>Math.max(2,String(Math.max(1,String(e||"").split(` -`).length)).length)*8+10,[e]),b=te.useMemo(()=>{const S=Math.max(1,String(e||"").split(` -`).length);return Array.from({length:S},(w,A)=>A+1)},[e]),x=async S=>{try{const w=await new Promise((T,P)=>{const M=new FileReader;M.onload=()=>T(String(M.result||"")),M.onerror=()=>P(new Error("read failed")),M.readAsDataURL(S)}),A=window.__CMARK?.saveImageToWorkspace?.("",w,et.getState().currentRel);if(!A||!A.ok||!A.rel){et.getState().setMessage(A?.message||"图片保存失败",2400);return}y.tf.insertNodes({type:"img",url:A.rel,caption:[{text:S.name.replace(/\.[^.]+$/,"")}],children:[{text:""}]})}catch{et.getState().setMessage("图片插入失败",2400)}},E=te.useRef(!1),C=te.useMemo(()=>[eF.configure({render:{node:ebe}}),Ase.configure({render:{node:tbe}}),Tse.configure({render:{node:nbe}}),Nse.configure({render:{node:rbe}}),Ose.configure({render:{node:ibe}}),Bse.configure({render:{node:sbe}}),Pse.configure({render:{node:abe}}),_F.configure({render:{node:obe}}),AF.configure({render:{node:lbe}}),qse,$se,$F.configure({render:{node:mbe}}),zF.configure({render:{node:gbe}}),jF.configure({render:{node:QT}}),qF.configure({render:{node:QT}}),Xae.configure({options:{lowlight:ZT,defaultLanguage:"text"},render:{node:cbe}}),JF.configure({render:{node:fbe}}),YF.configure({options:{lowlight:ZT},render:{leaf:pbe}}),Jle,$ce.configure({render:{node:ybe}}),Vce.configure({render:{node:xbe}}),fu.configure({render:{node:wbe}}),zfe.configure({render:{node:vbe}}),kbe,tl.configure({options:{remarkPlugins:[Lye,Yye],remarkStringifyOptions:Ebe,rules:{img:{serialize:(S=>{const w=String(S.url||""),T=(Array.isArray(S.caption)?S.caption:[]).map(z=>String(z&&z.text||"")).join(""),P=Number(S.width),M=typeof S.widthPct=="string"?S.widthPct:"";let F="";return Number.isFinite(P)&&P>0?F=' width="'+Math.round(P)+'"':M&&(F=' width="'+tw(M)+'"'),F?{type:"html",value:''+tw(T)+'"}:{type:"paragraph",children:[{type:"image",url:w,alt:T||void 0,title:typeof S.title=="string"?S.title:void 0}]}})}}}})],[]),y=lse({plugins:C}),_=te.useRef(y);_.current=y,te.useEffect(()=>{const S=w=>{if(r)return;const A=_.current;if(!A?.api||!A?.tf)return;const T=w.target;if(T&&!T.closest(".plate-content")||w.isComposing)return;if(w.key==="ArrowDown"&&!w.shiftKey&&!w.ctrlKey&&!w.metaKey)try{const $=A.api.block(),Y=$?.[0];if(Y&&Y.type==="code_line"){const Z=$[1],ve=A.api.parent(Z);if(ve){const[me,re]=ve,de=Array.isArray(me.children)?me.children:[],I=Z[Z.length-1]===de.length-1,X=(Y.children||[]).map(Te=>String(Te.text||"")).join(""),ne=A.selection,W=!!ne?.focus&&ne.focus.offset>=X.length;if(I&&W){w.preventDefault(),w.stopPropagation();const Te=re.slice();Te[Te.length-1]=Te[Te.length-1]+1,A.api.node(Te)||A.tf.insertNodes({type:ee.p,children:[{text:""}]},{at:Te}),A.tf.select({path:[...Te,0],offset:0});return}}}}catch($){console.error("[code-escape]",$)}if(w.altKey||!(w.ctrlKey||w.metaKey))return;const F=et.getState().editorApi;if(!F)return;const z=w.key.toLowerCase();if(w.shiftKey){z==="k"?(w.preventDefault(),F.insertNode("codeblock")):z==="q"?(w.preventDefault(),F.toggleBlock("blockquote")):z==="o"?(w.preventDefault(),F.toggleBlock("task-list")):w.code==="BracketLeft"||z==="{"?(w.preventDefault(),F.toggleBlock("numbered-list")):(w.code==="BracketRight"||z==="}")&&(w.preventDefault(),F.toggleBlock("bulleted-list"));return}z==="t"?(w.preventDefault(),F.insertNode("table")):z==="0"?(w.preventDefault(),F.toggleBlock("paragraph")):/^[1-6]$/.test(z)&&(w.preventDefault(),F.toggleBlock("heading",Number(z)))};return window.addEventListener("keydown",S,!0),()=>window.removeEventListener("keydown",S,!0)},[r]),te.useEffect(()=>{if(!String(a||"").trim()||!t)return;const S=window.setTimeout(()=>{const w=document.querySelector(".search-hit-mark");if(w instanceof HTMLElement)try{w.scrollIntoView({block:"center",inline:"nearest"})}catch{}},380);return()=>window.clearTimeout(S)},[t,a,e]),te.useEffect(()=>{Cbe(a);try{y.api.redecorate?.()}catch{}},[a,y]),te.useEffect(()=>{if(t)try{const S=e||"",w=XT(y.getApi(tl).markdown.deserialize(JT(S)));let A=w;try{A=VT(w)}catch{}try{eve(A,Qge(S))}catch{}const T=A;E.current=!0,y.tf.setValue(T&&T.length?T:Dbe),window.setTimeout(()=>{E.current=!1},0)}catch(S){console.error("[cmark] deserialize 失败",S),E.current=!1}},[t,s,u]);const O=te.useMemo(()=>({"--cmark-body-font-size":i+"px"}),[i]);return te.useEffect(()=>{const S={bold:ee.bold,italic:ee.italic,underline:ee.underline,code:ee.code,strike:ee.strikethrough,highlight:ee.highlight};return o({toggleMark(w){const A=S[w];if(A)try{const T=!!y.api.mark(A);if(A==="highlight"&&!T){y.tf.setNodes({[A]:!0},{match:F=>kn.isText(F),split:!0}),y.tf.collapse({edge:"focus"});const P=y.selection;if(P){const F=[...P.focus.path];F[F.length-1]+=1;try{const z=F.slice(0,F.length-1),$=y.api.node(z)?.[0],Y=F[F.length-1];$&&Array.isArray($.children)&&Y<$.children.length&&y.tf.select({path:F,offset:0})}catch(z){console.error("[highlight-next]",z)}}const M=y;M.marks={};return}y.tf.toggleMark(A)}catch{}},setLink(w){try{const A=y.selection;if(!A)return;A.anchor.offset===A.focus.offset&&A.anchor.path.join()===A.focus.path.join()?y.tf.insertNodes({type:ee.link,url:w,children:[{text:w}]}):y.tf.wrapNodes({type:ee.link,url:w,children:[]},{split:!0})}catch(A){console.error("[setLink]",A)}},toggleBlock(w,A){try{if(w==="heading"){const T=ee["h"+(A||1)];y.tf.toggleBlock(T)}else w==="blockquote"?y.tf.toggleBlock(ee.blockquote):w==="paragraph"?y.tf.toggleBlock(ee.p):Kle(y,w==="numbered-list"?"decimal":w==="task-list"?"todo":"disc")}catch{}},insertNode(w){try{if(w==="codeblock"){y.tf.insertNodes([{type:ee.codeBlock,lang:"js",children:[{type:ee.codeLine,children:[{text:""}]}]},{type:ee.p,children:[{text:""}]}]);const A=y.children.findIndex(T=>T.type===ee.codeBlock);A>=0&&y.tf.select({path:[A,0,0],offset:0})}else w==="table"?y.tf.insertNodes([{type:ee.table,children:[{type:ee.tr,children:[{type:ee.th,children:[{type:ee.p,children:[{text:"列一"}]}]},{type:ee.th,children:[{type:ee.p,children:[{text:"列二"}]}]}]},{type:ee.tr,children:[{type:ee.td,children:[{type:ee.p,children:[{text:""}]}]},{type:ee.td,children:[{type:ee.p,children:[{text:""}]}]}]}]},{type:ee.p,children:[{text:""}]}]):w==="hr"?y.tf.insertNodes({type:ee.hr,children:[{text:""}]}):w==="math"&&J3({tex:"",title:"插入公式",onApply:A=>{try{y.tf.insertNodes({type:ee.equation,texExpression:A,children:[{text:""}]})}catch(T){console.error("[insert-equation]",T)}}})}catch{}},insertText(w){try{y.tf.insertText(w)}catch{}},insertImage(w,A){try{y.tf.insertNodes({type:"img",url:w,caption:[{text:A||""}],children:[{text:""}]})}catch{}},insertMarkdown(w){try{const A=XT(y.getApi(tl).markdown.deserialize(JT(w)));y.tf.insertNodes(A)}catch{}},focus(){try{y.tf.focus()}catch{}}}),()=>o(null)},[y,o,s]),te.useEffect(()=>{s&&o(null)},[s,o]),s?V.jsxs("div",{className:"plate-host is-source"+(r?" is-locked":""),style:O,children:[V.jsx("div",{className:"source-gutter",style:{width:g},"aria-hidden":"true",children:V.jsx("div",{className:"source-gutter-inner",style:{transform:`translateY(-${h}px)`},children:b.map(S=>V.jsx("div",{className:"source-ln",children:S},S))})}),V.jsx("textarea",{ref:f,className:"source-editor",value:e,spellCheck:!1,readOnly:r,onChange:S=>n(S.target.value),onScroll:()=>m(f.current?.scrollTop||0)})]}):V.jsxs("div",{className:"plate-host"+(r?" is-locked":""),style:O,children:[V.jsx(lxe,{}),V.jsx(rse,{editor:y,onValueChange:({value:S})=>{if(!E.current){try{try{let w=gj(S);try{w=VT(w)}catch{}const A=ixe(rxe(w)),T=y.getApi(tl).markdown.serialize({value:A});let P=sxe(T);try{P=tve(P,Zge(S))}catch{}try{P=ave(P)}catch{}n(P)}catch(w){console.error("[serialize]",w),et.getState().setMessage("保存失败:"+(w?.message||"序列化出错"),5e3)}}catch{}try{const w=y.api.marks(),A=y.api.block(),T=String(A?.type||"p");let P={type:"paragraph"};/^h[1-6]$/.test(T)?P={type:"heading",level:Number(T[1])}:T==="blockquote"?P={type:"blockquote"}:T==="code_block"?P={type:"codeblock"}:T==="equation"?P={type:"math"}:T==="p"&&(A?.checked!==void 0?P={type:"list-item",checked:!!A.checked}:A?.listStyleType==="disc"?P={type:"bulleted-list"}:A?.listStyleType==="decimal"&&(P={type:"numbered-list"})),l({bold:!!w?.bold,italic:!!w?.italic,underline:!!w?.underline,code:!!w?.code,strike:!!w?.strikethrough,highlight:!!w?.highlight,link:!!(w?.link||w?.url)},P)}catch{}}},children:V.jsx(fF,{className:"plate-content",readOnly:r,spellCheck:!1,onPaste:S=>{const w=S.clipboardData;if(!w)return;let A=null;if(w.files&&w.files.length){for(const T of Array.from(w.files))if(T.type.startsWith("image/")){A=T;break}}if(!A&&w.items){for(const T of Array.from(w.items))if(T.kind==="file"&&T.type.startsWith("image/")){const P=T.getAsFile();if(P){A=P;break}}}A&&(S.preventDefault(),S.stopPropagation(),x(A))}})})]})}function gj(e){const t=[];for(const n of Array.isArray(e)?e:[])n&&n.synthetic||(Array.isArray(n?.children)?t.push({...n,children:gj(n.children)}):t.push(n));return t}const kr={size:15,strokeWidth:1.8,absoluteStrokeWidth:!1};function _be(){const e=et(x=>x.editorApi),t=et(x=>x.sourceMode),n=et(x=>x.setMessage),r=et(x=>x.activeMarks),i=et(x=>x.activeBlock),s=et(x=>x.toolbarHidden),a=et(x=>x.setAiOpen),[o,l]=te.useState(!1),u=x=>()=>e?.toggleMark(x),f=x=>()=>e?.toggleBlock(x),h=x=>()=>e?.toggleBlock("heading",x),m=x=>()=>e?.insertNode(x),g=[[{key:"ai",title:"AI 生成",node:V.jsx($xe,{...kr}),run:()=>a(!0)},{key:"codeblock",title:"插入代码块 Ctrl+Shift+K",node:V.jsx(Vxe,{...kr}),run:m("codeblock")},{key:"table",title:"插入表格 Ctrl+T",node:V.jsx(Wxe,{...kr}),run:m("table")},{key:"image",title:"插入图片文件",node:V.jsx(Oxe,{...kr}),run:()=>{const x=window.__CMARK?.pickImageFile?.();if(!x||!x.ok||!x.path){if(x&&x.canceled)return;n(x?.message||"无法打开文件选择器",2400);return}const E=window.__CMARK?.saveImageToWorkspace?.(x.path,void 0,et.getState().currentRel);if(!E||!E.ok||!E.rel){n(E?.message||"图片插入失败",2400);return}const C=String(x.path).split(/[\\/]/).pop()||"";e?.insertImage(E.rel,C.replace(/\.[^.]+$/,""))}}],[{key:"ol",title:"有序列表 Ctrl+Shift+[",node:V.jsx(Rxe,{...kr}),run:f("numbered-list")},{key:"ul",title:"无序列表 Ctrl+Shift+]",node:V.jsx(Ixe,{...kr}),run:f("bulleted-list")},{key:"task",title:"任务列表 Ctrl+Shift+O",node:V.jsx(Fxe,{...kr}),run:f("task-list")},{key:"quote",title:"引用 Ctrl+Shift+Q",node:V.jsx(Lxe,{...kr}),run:f("blockquote")}],[{key:"h1",title:"一级标题 Ctrl+1",node:V.jsx(_xe,{...kr}),run:h(1)},{key:"h2",title:"二级标题 Ctrl+2",node:V.jsx(Axe,{...kr}),run:h(2)},{key:"h3",title:"三级标题 Ctrl+3",node:V.jsx(Txe,{...kr}),run:h(3)},{key:"hr",title:"分割线",node:V.jsx(Mxe,{...kr}),run:m("hr")},{key:"link",title:"超链接 Ctrl+K",node:V.jsx(Pxe,{...kr}),run:()=>l(!0)},{key:"mathBlock",title:"公式块",node:V.jsx(qxe,{...kr}),run:m("math")},{key:"mathInline",title:"内联公式",node:V.jsx(Uxe,{...kr}),run:()=>e?.insertText("$$")}],[{key:"bold",title:"加粗 Ctrl+B",node:V.jsx(Cxe,{...kr}),run:u("bold")},{key:"italic",title:"斜体 Ctrl+I",node:V.jsx(Bxe,{...kr}),run:u("italic")},{key:"underline",title:"下划线 Ctrl+U",node:V.jsx(Xxe,{...kr}),run:u("underline")},{key:"code",title:"内联代码",node:V.jsx(Dxe,{...kr}),run:u("code")},{key:"strike",title:"删除线",node:V.jsx(Hxe,{...kr}),run:u("strike")},{key:"highlight",title:"高亮",node:V.jsx(Nxe,{...kr}),run:u("highlight")}]],b=x=>{switch(x){case"bold":case"italic":case"underline":case"code":case"strike":case"highlight":case"link":return!!r[x];case"h1":return i.type==="heading"&&i.level===1;case"h2":return i.type==="heading"&&i.level===2;case"h3":return i.type==="heading"&&i.level===3;case"ol":return i.type==="numbered-list";case"ul":return i.type==="bulleted-list";case"task":return i.type==="list-item"&&i.checked!==void 0;case"quote":return i.type==="blockquote";case"codeblock":return i.type==="codeblock";case"mathBlock":return i.type==="math";default:return!1}};return s?null:V.jsxs(V.Fragment,{children:[o&&V.jsx(bN,{title:"插入链接",defaultValue:"https://",placeholder:"https://",maxLength:2048,onSubmit:x=>{l(!1);const E=String(x||"").trim();E&&e?.setLink(E)},onCancel:()=>l(!1)}),V.jsx("div",{className:"editor-toolbar",title:t?"源码模式下为纯文本编辑,格式化按钮不可用":void 0,children:g.map((x,E)=>V.jsxs("div",{className:"tb-group",children:[E>0&&V.jsx("span",{className:"tb-sep"}),x.map(C=>V.jsx("button",{className:"tb-btn"+(b(C.key)?" is-on":""),title:C.title,disabled:!e||t,onMouseDown:y=>y.preventDefault(),onClick:C.run,children:C.node},C.key))]},E))})]})}function M0(e){"@babel/helpers - typeof";return M0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M0(e)}function Abe(e,t){if(M0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(M0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tbe(e){var t=Abe(e,"string");return M0(t)=="symbol"?t:t+""}function vj(e,t,n){return(t=Tbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yj=globalThis.Node,Nbe=globalThis.Text;const xj=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,Obe=e=>tm(e)&&e.nodeType===8,Qs=e=>tm(e)&&e.nodeType===1,tm=e=>{const t=xj(e);return!!t&&e instanceof t.Node},eN=e=>{const t=e&&e.anchorNode&&xj(e.anchorNode);return!!t&&e instanceof t.Selection},Bbe=e=>{let[t,n]=e;if(Qs(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=bj(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},bj=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(Obe(i)||Qs(i)&&i.childNodes.length===0||Qs(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},Rbe=(e,t,n)=>{const[r]=bj(e,t,n);return r},tN=e=>e.getSelection!=null?e.getSelection():document.getSelection(),wj=(e,t,n)=>{const{target:r}=t;if(Qs(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:i}=Ut.getWindow(e);if(l0(i,r))return Ut.hasDOMNode(e,r,{editable:!0});const s=n.find(({addedNodes:a,removedNodes:o})=>{for(const l of a)if(l===r||l0(l,r))return!0;for(const l of o)if(l===r||l0(l,r))return!0});return!s||s===t?!1:wj(e,s,n)},nN=(e,t)=>!!(e.compareDocumentPosition(t)&yj.DOCUMENT_POSITION_PRECEDING),Fbe=(e,t)=>!!(e.compareDocumentPosition(t)&yj.DOCUMENT_POSITION_FOLLOWING),Vl=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},l0=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var nw,rw;const rN=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),iw=typeof navigator<"u"&&/Android/.test(navigator.userAgent),zh=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ibe=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((nw=navigator.userAgent.match(/Version\/(\d+)/))!==null&&nw!==void 0&&nw[1]&&parseInt((rw=navigator.userAgent.match(/Version\/(\d+)/))===null||rw===void 0?void 0:rw[1],10)<17);let Mbe=0;class Lbe{constructor(){vj(this,"id",void 0),this.id=`${Mbe++}`}}const zbe=new WeakMap,jbe=new WeakMap,iN=new WeakMap,sN=new WeakMap,aN=new WeakMap,oN=new WeakMap,lN=new WeakMap,uN=new WeakMap,jh=new WeakMap,qbe=new WeakMap,$be=new WeakMap,Vbe=new WeakMap;function cN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hc(e){for(var t=1;tVbe.get(e),androidScheduleFlush:e=>{var t;(t=$be.get(e))===null||t===void 0||t()},blur:e=>{const t=Ut.toDOMNode(e,e),n=Ut.findDocumentOrShadowRoot(e);jh.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Ut.findDocumentOrShadowRoot(e),r=tN(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Fe.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Ut.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Ut.toSlateNode(e,t.target)}catch(x){if(r)return null;throw x}let l;try{l=Ut.findPath(e,o)}catch(x){if(r)return null;throw x}if(ie.isElement(o)&&L.isVoid(e,o)){const x=a.getBoundingClientRect(),E=e.isInline(o)?i-x.left{if(!x)return null;const E=f.createRange();return E.setStart(x.offsetNode,x.offset),E.setEnd(x.offsetNode,x.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Ut.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=oN.get(t);return n||(n=new Lbe,oN.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=jbe.get(r);if(s==null){if(r===e)return n;break}const a=zbe.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Jn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(jh.get(e)||!Ut.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Ut.focus(e,{retries:t.retries-1})},10);return}const n=Ut.toDOMNode(e,e),r=Ut.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Ut.toDOMRange(e,e.selection):null;if(e.selection||Fe.select(e,L.start(e,[])),jh.set(e,!0),n.focus({preventScroll:!0}),i){const s=tN(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=iN.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Ut.isMounted(e))return!1;const i=Ut.toDOMNode(e,e);let s;try{s=Qs(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||Vl(s,"[data-slate-editor]")!==i)return!1;const a=Vl(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?Vl(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&Vl(o,"[data-slate-editor]")===i){var l;const u=(l=Vl(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||Vl(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&Vl(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>tm(t)&&Ut.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Ut.hasEditableTarget(e,t)||Ut.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>tm(t)&&Ut.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!qbe.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Ut.isComposing(e)?Ube(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,hc(hc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!jh.get(e),isMounted:e=>!!sN.get(e),isReadOnly:e=>!!uN.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(uN.get(e)||!Ut.hasTarget(e,t))return!1;const n=Ut.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{const n=Ut.resolveDOMNode(e,t);if(!n)throw new Error(`Cannot resolve a DOM node from Slate node: ${Jn.stringify(t)}`);return n},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=lN.get(e))===null||n===void 0?void 0:n.get(Ut.findKey(e,ie.get(e,t.path)));return r?dN(e,r,t):null},resolveDOMRange:(e,t)=>{var n,r;const i=Ut.resolveDOMPoint(e,t.anchor);if(!i)return null;const s=we.isCollapsed(t)?i:Ut.resolveDOMPoint(e,t.focus),a=(n=iN.get(e))!==null&&n!==void 0?n:(r=i[0].ownerDocument)===null||r===void 0?void 0:r.defaultView;if(!s||!a)return null;try{return hN(a,i,s,we.isBackward(t))}catch{return null}},resolveEventRange:(e,t)=>Ut.findEventRange(e,t,{suppressThrow:!0}),resolveDOMNode:(e,t)=>{var n,r;return(n=t===e?sN.get(e):(r=lN.get(e))===null||r===void 0?void 0:r.get(Ut.findKey(e,t)))!==null&&n!==void 0?n:null},resolveSlateNode:(e,t)=>{var n;const r=fN(t);return(n=r&&aN.get(r))!==null&&n!==void 0?n:null},resolveSlatePoint:(e,t,n={})=>{try{var r;return Ut.toSlatePoint(e,t,{exactMatch:(r=n.exactMatch)!==null&&r!==void 0?r:!1,searchDirection:n.searchDirection,suppressThrow:!0})}catch{return null}},resolveSlateRange:(e,t,n={})=>{try{var r;return Ut.toSlateRange(e,t,{exactMatch:(r=n.exactMatch)!==null&&r!==void 0?r:!1,suppressThrow:!0})}catch{return null}},toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Ut.toDOMNode(e,n),i=dN(e,r,t);if(!i)throw new Error(Hbe(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Ut.toDOMPoint(e,n),s=we.isCollapsed(t)?i:Ut.toDOMPoint(e,r);return hN(Ut.getWindow(e),i,s,we.isBackward(t))},toSlateNode:(e,t)=>{const n=fN(t),r=n?aN.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:Bbe(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Ut.toDOMNode(e,e),y=o.closest('[data-slate-void="true"]'),_=y&&l0(C,y)?y:null,O=o.closest('[contenteditable="false"]'),S=O&&l0(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),A=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Ut.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` -`?0:a);const M=P.cloneContents();[...Array.prototype.slice.call(M.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(M.querySelectorAll("[contenteditable=false]"))].forEach(z=>{if(iw&&!r&&z.hasAttribute("data-slate-zero-width")&&z.textContent.length>0&&z.textContext!=="\uFEFF"){z.textContent.startsWith("\uFEFF")&&(z.textContent=z.textContent.slice(1));return}z.parentNode.removeChild(z)}),f=M.textContent.length,A=u}}else if(_){const T=_.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(S){const T=M=>M?M.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=S.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...T(P?.previousElementSibling),...T(P)].findLast(F=>nN(S,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...T(P),...T(P?.nextElementSibling)].find(F=>Fbe(S,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),A=w,l==="forward"?f=0:(f=A.textContent.length,A.querySelectorAll("[data-slate-zero-width]").forEach(M=>{f-=M.textContent.length})))}A&&f===A.textContent.length&&iw&&A.getAttribute("data-slate-zero-width")==="z"&&(h=A.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||zh&&(m=A.textContent)!==null&&m!==void 0&&m.endsWith(` - -`))&&f--}if(iw&&o&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Ut.hasDOMNode(e,C,{editable:!0})){const y=Ut.toSlateNode(e,C);let _;try{_=Ut.findPath(e,y)}catch(w){if(i)return null;throw w}let{path:O,offset:S}=L.start(e,_);return C.querySelector("[data-slate-leaf]")||(S=a),{path:O,offset:S}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let x;try{x=Ut.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Ut.findPath(e,x)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=eN(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(eN(t)){if(zh&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),y=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&y.startContainer instanceof HTMLTableRowElement){let _=function(T){return T.childElementCount>0?_(T.children[0]):T};const O=C.startContainer,S=y.startContainer,w=_(O.children[C.startOffset]),A=_(S.children[y.startOffset]);h=0,A.childNodes.length>0?l=A.childNodes[0]:l=A,w.childNodes.length>0?f=w.childNodes[0]:f=w,A instanceof HTMLElement?u=A.innerHTML.length:u=0}else C.startContainer===f?(l=y.endContainer,u=y.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=y.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;Ibe&&Pbe(l)||zh?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);zh&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` - -`)&&h===f.textContent.length&&h--;const g=Ut.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=nN(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?hc(hc({},r),{},{text:n}):hc(hc({},r),{},{children:Ej(r.children,t.slice(1),n)})),Ube=e=>{var t;const n=Ut.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Ut.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Ut.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=z0();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=Ej(e.children,r.path,s),{view:a,point:r}},fN=e=>{var t;const n=Qs(e)?e:e.parentElement;return n!=null&&n.hasAttribute("data-slate-node")?n:(t=n?.closest("[data-slate-node]"))!==null&&t!==void 0?t:null},Hbe=e=>`Cannot resolve a DOM point from Slate point: ${Jn.stringify(e)}`,dN=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const i=e.document.createRange(),[s,a]=r?n:t,[o,l]=r?t:n,f=!!(Qs(s)?s:s.parentElement).getAttribute("data-slate-zero-width"),m=!!(Qs(o)?o:o.parentElement).getAttribute("data-slate-zero-width");return i.setStart(s,f?1:a),i.setEnd(o,m?1:l),i},Wbe={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},Kbe={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Gbe={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},lr=e=>{const t=Wbe[e],n=Kbe[e],r=Gbe[e],i=t&&ks.isHotkey(t),s=n&&ks.isHotkey(n),a=r&&ks.isHotkey(r);return o=>!!(i&&i(o)||rN&&s&&s(o)||!rN&&a&&a(o))};lr("bold"),lr("compose"),lr("moveBackward"),lr("moveForward"),lr("deleteBackward"),lr("deleteForward"),lr("deleteLineBackward"),lr("deleteLineForward"),lr("deleteWordBackward"),lr("deleteWordForward"),lr("extendBackward"),lr("extendForward"),lr("extendLineBackward"),lr("extendLineForward"),lr("italic"),lr("moveLineBackward"),lr("moveLineForward"),lr("moveWordBackward"),lr("moveWordForward"),lr("redo"),lr("insertSoftBreak"),lr("splitBlock"),lr("transposeCharacter"),lr("undo");function L0(e){"@babel/helpers - typeof";return L0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L0(e)}function Ybe(e,t){if(L0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(L0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jbe(e){var t=Ybe(e,"string");return L0(t)=="symbol"?t:t+""}function cp(e,t,n){return(t=Jbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xbe=te.createContext(null),pN=Ut,Qbe=e=>Qs(e)&&e.hasAttribute("data-slate-placeholder"),Zbe=({addedNodes:e,removedNodes:t})=>{const n=[...Array.from(e),...Array.from(t)];return n.length>0&&n.every(Qbe)},e2e=(e,t)=>{let n=[];const r=()=>{n=[]},i=a=>{if(!t.current)return;const o=a.filter(l=>!Zbe(l)&&wj(e,l,a));n.push(...o)};function s(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),r())}return{registerMutations:i,restoreDOM:s,clear:r}},t2e={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class n2e extends te.Component{constructor(...t){super(...t),cp(this,"context",null),cp(this,"manager",null),cp(this,"mutationObserver",null)}observe(){var t;const{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,t2e)}componentDidMount(){const{receivedUserInput:t}=this.props,n=this.context;this.manager=e2e(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r;const i=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}cp(n2e,"contextType",Xbe);parseInt(ae.version.split(".")[0],10);function r2e({open:e,onClose:t,editor:n}){const[r,i]=te.useState(""),[s,a]=te.useState("note"),[o,l]=te.useState([]),[u,f]=te.useState(0),[h,m]=te.useState(0),g=et(w=>w.openNote),b=et(w=>w.setSearchTerm),x=et(w=>w.currentRel),E=te.useRef(null);te.useEffect(()=>{e&&(b(""),i(""),l([]),f(0),m(0),window.setTimeout(()=>E.current?.focus(),30))},[e]);const C=te.useCallback((w,A,T=!1)=>{if(!w||!x){m(0);return}const P=w.toLowerCase(),M=[];for(const[z,$]of ie.nodes(n)){if(!("text"in z)||typeof z.text!="string")continue;const Y=z.text.toLowerCase();let Z=0;for(;;){const ve=Y.indexOf(P,Z);if(ve<0)break;M.push({path:$,offset:ve}),Z=ve+P.length}}if(m(M.length),!M.length)return;const F=M[Math.max(0,Math.min(M.length-1,A))];try{const z={anchor:{path:F.path,offset:F.offset},focus:{path:F.path,offset:F.offset+w.length}};Fe.select(n,z),T&&pN.focus(n);const $=pN.toDOMRange(n,z)}catch{}},[n,x]),y=te.useCallback(w=>{if(f(0),!w.trim()){l([]),m(0);return}if(s==="note")C(w,0,!1);else{const T=window.__CMARK?.searchNotes?.(w,80);l(T?.ok&&Array.isArray(T.data)?T.data:[])}},[s,C]),_=te.useCallback(w=>{if(s!=="note"||h===0)return;const A=(u+w+h)%h;f(A),C(r,A,!0)},[s,u,h,r,C]),O=te.useCallback(()=>{b(""),t()},[t,b]),S=te.useCallback(w=>{if(w.key==="Escape"){w.preventDefault(),b(""),t();return}if(w.key==="Enter"){w.preventDefault(),w.shiftKey?_(-1):_(1);return}w.key==="Tab"&&(w.preventDefault(),a(A=>A==="note"?"all":"note"))},[t,_]);return te.useEffect(()=>{e&&r&&y(r)},[s]),e?V.jsx("div",{className:"search-mask",onClick:O,children:V.jsxs("div",{className:"search-box",onClick:w=>w.stopPropagation(),children:[V.jsxs("div",{className:"search-head",children:[V.jsx("input",{ref:E,className:"search-input",value:r,placeholder:s==="note"?"在当前笔记中查找":"在所有笔记中查找",onChange:w=>{const A=w.target.value;i(A),b(s==="note"?A:""),y(A)},onKeyDown:S}),V.jsx("span",{className:"search-count",children:s==="note"?h?`${u+1} / ${h}`:"无结果":o.length?`${o.length} 篇`:"无结果"}),V.jsx("button",{className:"search-scope"+(s==="note"?" on":""),type:"button",title:"仅当前笔记(Tab 切换)",onClick:()=>a("note"),children:"当前笔记"}),V.jsx("button",{className:"search-scope"+(s==="all"?" on":""),type:"button",title:"所有笔记(Tab 切换)",onClick:()=>{a("all"),b("")},children:"所有笔记"}),V.jsx("button",{className:"gp-close",type:"button",title:"关闭",onClick:O,style:{position:"static"},children:"×"})]}),s==="all"&&o.length?V.jsx("div",{className:"search-list",children:o.map(w=>V.jsxs("button",{type:"button",className:"search-hit",onClick:()=>{g(w.rel),t()},children:[V.jsx("span",{className:"search-name",children:w.name}),V.jsx("span",{className:"search-badge",children:w.count}),V.jsx("span",{className:"search-snip",children:w.snippet})]},w.rel))}):null,V.jsx("div",{className:"search-foot",children:s==="note"?"Enter 下一个 · Shift+Enter 上一个 · Tab 切换范围 · Esc 关闭":"点击结果打开笔记 · Tab 切换范围 · Esc 关闭"})]})}):null}function Cj(){const e=window;return e.__CMARK||e.services}const i2e=[".void-gap",".code-head",".code-lang",".code-lang-list",".code-editor-copy",".table-caption",".table-float-toolbar",".img-handle",".img-tools",".math-edit-pop",".diagram-err",".search-hit-mark",".diagram-code-toggle",".math-toggle",".math-source",".math-inline-toggle",".table-code-panel"],s2e=["color","background-color","background-image","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-decoration-line","text-transform","white-space","word-break","overflow-wrap","vertical-align","list-style-type","list-style-position","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","border-collapse","border-spacing","display","box-sizing","max-width","min-width","max-height","min-height","width","height","opacity","zoom","position","top","left","right","bottom","z-index","float","overflow","overflow-x","overflow-y","justify-content","align-items","align-self","flex-direction","flex-wrap","flex-grow","flex-shrink","gap","row-gap","column-gap","table-layout","text-overflow"],a2e=new Set(["","none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent"]);function kj(e,t=!1){if(!(!t&&e.closest(".katex"))){try{const n=window.getComputedStyle(e);let r="";for(const i of s2e){const s=n.getPropertyValue(i);!s||a2e.has(s)||t&&(i==="display"||i==="width"||i==="height"||i==="max-width")||t&&(i==="white-space"||i==="overflow-wrap"||i==="word-break")||(r+=i+":"+s+";")}r?e.setAttribute("style",r):e.removeAttribute("style")}catch{}for(const n of Array.from(e.children))n instanceof HTMLElement&&kj(n)}}function o2e(e){const t=document.querySelector(".plate-content");if(!t)return{html:"",ok:!1,message:"编辑区未就绪,请先打开笔记"};const n=t.cloneNode(!0),r=Array.from(t.querySelectorAll("canvas"));if(r.length){const u=Array.from(n.querySelectorAll("canvas"));r.forEach((f,h)=>{const m=u[h];if(!m)return;let g="";try{g=f.toDataURL("image/png")}catch{return}if(!g||g==="data:,")return;const b=window.getComputedStyle(f),x=document.createElement("img");x.setAttribute("src",g),x.setAttribute("alt",f.getAttribute("aria-label")||"chart"),f.width&&x.setAttribute("width",String(f.width)),f.height&&x.setAttribute("height",String(f.height)),x.setAttribute("style","display:block;width:"+b.width+";height:"+b.height+";"),m.replaceWith(x)})}for(const u of i2e)n.querySelectorAll(u).forEach(f=>f.remove());n.querySelectorAll(".diagram-box").forEach(u=>{let f=u.previousElementSibling;for(;f;){const h=f.className||"";if(typeof h=="string"&&/code-block-wrap|code-editor/.test(h)){f.remove();break}f=f.previousElementSibling}});const i=[n,...Array.from(n.querySelectorAll("*"))].filter(u=>u instanceof HTMLElement);for(const u of i)for(const f of Array.from(u.attributes))/^(data-slate|contenteditable|spellcheck|autocapitalize|autocorrect|role|translate|zindex)/i.test(f.name)&&u.removeAttribute(f.name);const s=window.__CMARK;n.querySelectorAll("img").forEach(u=>{const f=u.getAttribute("src")||"";if(!f||/^(https?:|data:)/i.test(f))return;const h=/^file:/i.test(f)?f:s?.resolveImageUrl?.(f,e),m=h?s?.readFileAsDataUri?.(h):null;m?u.setAttribute("src",m):h&&u.setAttribute("src",h)});const a=Array.from(n.querySelectorAll(".diagram-canvas svg, .diagram-box svg"));for(const u of a){const f=parseFloat(u.getAttribute("width")||""),h=parseFloat(u.getAttribute("height")||"");!f||!h||u.getAttribute("viewBox")||(u.setAttribute("viewBox","0 0 "+f+" "+h),u.removeAttribute("width"),u.removeAttribute("height"),u.setAttribute("style","display:block;width:100%;height:auto;max-width:100%;"))}const o=t.getBoundingClientRect(),l=document.createElement("div");l.setAttribute("style","position:fixed;left:-99999px;top:0;width:"+Math.max(200,Math.round(o.width))+"px;pointer-events:none;visibility:hidden;z-index:-1"),l.appendChild(n),document.body.appendChild(l);try{const u=[t],f=[n],h=(g,b)=>{for(const x of Array.from(g.children))x instanceof HTMLElement&&(b.push(x),h(x,b))};h(t,u),h(n,f);const m=Math.min(u.length,f.length);for(let g=0;g"+f+""+u.html:u.html,m=/class="katex/.test(h);if(e==="html"){const g=mN();if(g===null){i("已取消导出",1600);return}const b=a.writeHtmlFile?.(g,o,h,[],m,!0,l);if(!b){i("导出失败:宿主未实现 writeHtmlFile",3600);return}if(b.canceled){i("已取消导出",1600);return}if(!b.ok){i("导出失败:"+(b.message||"未知错误"),3600);return}i("已导出 HTML",2e3);return}await new Promise(g=>{const b=(E,C)=>{i(E,C),g()},x=a.exportFile;if(!x){b("导出失败:宿主未实现 exportFile",3600);return}x(e,h,"",(E,C)=>{if(E){b("导出失败:"+E.message,3600);return}if(!C){b("导出失败:渲染窗口没有返回文件",3600);return}try{a.dialogSaveExportFile?.(C,o,e==="image"?"png":"pdf")}catch(y){b("导出失败:"+(y?.message||""),3600);return}g()},void 0,l)})}catch(u){i("导出失败:"+(u?.message||""),3600)}finally{s?.(null)}}const u2e=[{size:12,label:"紧凑"},{size:13,label:"偏小"},{size:14,label:"默认"},{size:15,label:"偏大"},{size:16,label:"舒适"}];function c2e(){const[e,t]=te.useState(!1),[n,r]=te.useState(null),i=te.useRef(null),s=et(b=>b.currentRel),a=et(b=>b.content),o=et(b=>b.setMessage),l=et(b=>b.sourceMode),u=et(b=>b.toolbarHidden),f=et(b=>b.toggleToolbar),h=et(b=>b.bodyFontSize),m=et(b=>b.setBodyFontSize);te.useEffect(()=>{if(!e)return;const b=E=>{i.current&&!i.current.contains(E.target)&&t(!1)},x=E=>{E.key==="Escape"&&t(!1)};return window.addEventListener("mousedown",b),window.addEventListener("keydown",x),()=>{window.removeEventListener("mousedown",b),window.removeEventListener("keydown",x)}},[e]);const g=te.useCallback(async b=>{s&&(t(!1),await l2e(b,{rel:s,content:a,setMessage:o,setBusy:r}))},[s,a,o]);return s?V.jsxs("div",{className:"more-wrap",ref:i,children:[V.jsx("button",{className:"iconbtn"+(e?" on":""),type:"button",title:"更多",onClick:()=>t(b=>!b),disabled:!!n,children:n?V.jsx("span",{className:"export-spin"}):V.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"currentColor",children:[V.jsx("circle",{cx:"8",cy:"3",r:"1.35"}),V.jsx("circle",{cx:"8",cy:"8",r:"1.35"}),V.jsx("circle",{cx:"8",cy:"13",r:"1.35"})]})}),e?V.jsxs("div",{className:"more-menu",children:[l?null:V.jsxs(V.Fragment,{children:[V.jsx("button",{type:"button",className:"more-item",onClick:()=>{t(!1),f()},children:u?"显示编辑工具栏":"隐藏编辑工具栏"}),V.jsxs("div",{className:"more-fontsize",children:[V.jsx("span",{className:"more-flabel",children:"正文字号"}),V.jsx("div",{className:"more-seg",children:u2e.map(b=>V.jsx("button",{type:"button",className:"more-segbtn"+(h===b.size?" on":""),title:b.label+" "+b.size+"px",onClick:()=>m(b.size),children:b.label},b.size))})]})]}),V.jsx("div",{className:"more-divider"}),V.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("md"),children:"导出为 Markdown 文件"}),V.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("html"),children:"导出为 Html 文件"}),V.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("pdf"),children:"导出为 PDF 文件"}),V.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("image"),children:"导出为图像文件"})]}):null]}):null}const Dj=()=>window.__znotesGit;function gN(){try{const t=window.__CMARK_GIT?.get?.();if(t===!0||t===!1)return t}catch{}try{return localStorage.getItem("cmark-git-enabled")!=="0"}catch{return!0}}function f2e(e){try{const t=window.__CMARK?.absOf?.(e);return t&&Dj()?.relOf?.(t)||null}catch{return null}}function d2e({onOpen:e}){const t=et(h=>h.currentRel),[n,r]=te.useState(!1),[i,s]=te.useState(!1),[a,o]=te.useState(gN);te.useEffect(()=>{const h=()=>o(gN());return window.addEventListener("cmark-git-changed",h),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("cmark-git-changed",h),document.removeEventListener("visibilitychange",h)}},[]);const l=te.useCallback(async()=>{const h=Dj();if(h){try{const m=await h.remoteInfo?.();r(!!(m?.ok&&m.data?.hasRemote))}catch{}try{const m=await h.state?.();if(m?.ok&&m.data){const g=m.data,b=t?f2e(t):null,x=b?(g.files||[]).some(E=>E.path===b):!1;s(!!g.ahead||x)}else s(!1)}catch{}}},[t]);if(te.useEffect(()=>{l();const h=window.setInterval(()=>void l(),1e4);return()=>window.clearInterval(h)},[l]),!a||!t)return null;const u=n&&i,f=u?"有改动尚未推送到远程仓库,点击查看并同步":n?"当前笔记与远端一致,点击查看变更记录":"查看这篇笔记的变更记录";return V.jsx("button",{className:"iconbtn"+(u?" warn-on":""),type:"button",title:f,onClick:e,children:V.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"M4.6 11.4a2.9 2.9 0 0 1-.3-5.78 3.9 3.9 0 0 1 7.5-.4 2.7 2.7 0 0 1 .6 5.3"}),V.jsx("path",{d:"M8 13.6V7.9"}),V.jsx("path",{d:"M6.2 9.6 8 7.8l1.8 1.8"})]})})}const sw=()=>window.__CMARK,vN=()=>window.__znotesGit;function h2e(){const[e,t]=te.useState(!1),[n,r]=te.useState(0),[i,s]=te.useState(""),[a,o]=te.useState(0),[l,u]=te.useState(!1),[f,h]=te.useState(!1),m=et(C=>C.refreshTree);te.useEffect(()=>{const C=window.__ZNOTES;let y=!1;try{y=!!C?.onboardGet?.()?.done}catch{}if(y)return;const _=sw()?.getConfig?.();if(_?.initialized&&_.workspaceExists){b();return}t(!0),s(_?.workspace||""),g()},[]);const g=te.useCallback(()=>{const C=sw();try{const y=C?.countMarkdown?.();o(y?.markdown||0)}catch{}try{const y=vN()?.inspect?.();u(!!y?.isRepo)}catch{}},[]),b=te.useCallback(()=>{try{window.__ZNOTES?.onboardSet?.({done:!0,at:Date.now()})}catch{}},[]),x=te.useCallback(()=>{const C=sw()?.pickWorkspace?.();C?.ok&&(s(C.workspace||""),g())},[g]),E=te.useCallback(()=>{b(),t(!1),m(),window.setTimeout(()=>window.location.reload(),200)},[b,m]);return e?V.jsx("div",{className:"onboard-mask",children:V.jsxs("div",{className:"onboard",children:[V.jsxs("div",{className:"ob-head",children:[V.jsx("span",{className:"ob-title",children:"开始使用 CMark"}),V.jsxs("span",{className:"ob-step",children:[n+1," / 3"]})]}),V.jsx("div",{className:"ob-body",children:n===0?V.jsxs(V.Fragment,{children:[V.jsx("p",{className:"ob-lead",children:"笔记以纯 Markdown 文件保存在你这个目录里,随时可以用其它编辑器打开。"}),V.jsxs("div",{className:"ob-ws",children:[V.jsx("span",{className:"ob-ws-icon",children:V.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:V.jsx("path",{d:"M1.8 4.2h4.4l1.2 1.6h6.8v6.4H1.8z"})})}),V.jsx("span",{className:"ob-ws-path",title:i,children:i||"尚未选择"}),V.jsx("button",{type:"button",className:"gp-b",onClick:x,children:i?"更换":"选择目录"})]}),V.jsx("p",{className:"ob-hint",children:"默认会用文档目录下的 CMark 文件夹。"})]}):n===1?V.jsxs(V.Fragment,{children:[V.jsx("p",{className:"ob-lead",children:a>0?`这里已经有 ${a} 篇 Markdown 笔记,会直接读进来。`:"这个目录还是空的,可以从头开始。"}),V.jsxs("ul",{className:"ob-list",children:[V.jsxs("li",{children:[V.jsx("b",{children:a})," 篇笔记"]}),V.jsxs("li",{children:["版本控制 ",V.jsx("b",{children:l?"已启用":"未启用"})]})]}),l?null:V.jsx("p",{className:"ob-hint",children:"启用后每次改动都会留有历史,可以回溯任意版本;不启用也能正常写笔记,之后在设置里随时可以开。"})]}):V.jsxs(V.Fragment,{children:[V.jsx("p",{className:"ob-lead",children:"准备就绪。"}),V.jsxs("ul",{className:"ob-list",children:[V.jsx("li",{children:"左侧目录树右键可以新建笔记与文件夹"}),V.jsx("li",{children:"Ctrl+F 搜索,Ctrl+B 加粗,Ctrl+1/2/3 标题"}),V.jsx("li",{children:"顶部工具栏可以插入表格、代码块、图片"})]})]})}),V.jsxs("div",{className:"ob-acts",children:[n>0?V.jsx("button",{type:"button",className:"gp-b",onClick:()=>r(C=>C-1),children:"上一步"}):null,V.jsx("span",{style:{flex:1}}),V.jsx("button",{type:"button",className:"gp-b",onClick:E,children:"跳过"}),n===1&&!l?V.jsx("button",{type:"button",className:"gp-b",disabled:f||!i,onClick:async()=>{h(!0);try{(await vN()?.initRepo?.())?.ok&&u(!0)}finally{h(!1)}},children:"启用版本控制"}):null,V.jsx("button",{type:"button",className:"gp-b primary",disabled:n===0&&!i,onClick:()=>n<2?r(C=>C+1):E(),children:n<2?"下一步":"开始使用"})]})]})}):null}function p2e(e){return(Array.isArray(e)?e:[]).map(n=>{const r=n,i=String(r.value??r.id??r.modelId??""),s=String(r.label??r.name??i);return{value:i,label:s}}).filter(n=>n.value!=="")}const qh=()=>window.ztools,yN={mermaid:` - ## 定位 - - 智能助手名称 : Mermaid 图表生成助手 - - 主要功能 :根据用户输入的内容生成 Mermaid 图表代码 - - Mermaid 版本 : 11.12.0 - - ## 要求 - - 生成的代码要符合 Mermaid 语法,准确表达用户需求 - - 根据用户输入的内容绘制最合适的图表类型 - - 确保生成的 Mermaid 代码可以正确渲染 - - 输出不要包含任何解释或其他内容 - - ## 输出格式: - \`\`\`mermaid - Mermaid 图表代码 - \`\`\` - `,echarts:` - ## 定位 - - 智能助手名称 :ECharts 统计图表生成助手 - - 主要功能 :根据用户输入的内容生成 JSON 格式的 ECharts 配置代码 - - ECharts 版本 : 6.0.0 - - ## 要求 - - 只支持 ECharts 基础图表类型:柱状图(bar)、折线图(line)、饼图(pie)、散点图(scatter) - - 根据用户输入的内容选择最合适的图表类型 - - 默认图表高度是 300, 可根据图表内容设置合适的图表高度:返回的 JSON 增加 "height" 字段,例如 { "height": 300, ... } - - 不理解内容或数据格式错误时,返回一个空的 ECharts 配置代码 - - 输出不要包含任何解释或其他内容 - - ## 输出格式: - \`\`\`echarts - JSON 格式的 ECharts 配置代码 - \`\`\` - `,table:` - ## 定位 - - 智能助手名称 : Markdown 表格生成助手 - - 主要功能 :根据用户输入的内容生成 Markdown 表格 - - ## 要求 - - 确保生成的 Markdown 表格可以正确渲染 - - ## 输出 - - 只能返回一个 Markdown 表格 - - 不要包含任何解释或其他内容 - - 不理解用户内容或用户内容无法转为表格时,输出 "fail" - `},m2e=[{key:"mermaid",label:"生成 Mermaid 流程图表",d:"M14 9v2h-3V9H8.5V7H11V1H4v6h2.5v2H4v6h2.5v2H4v6h7v-6H8.5v-2H11v-2h3v2h7V9z"},{key:"echarts",label:"生成 ECharts 统计图表",d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"},{key:"table",label:"生成表格",d:"M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z"}];function g2e(e){try{const n=window.__ZNOTES?.toNodes?.(e);return Array.isArray(n)?n:[]}catch{return[]}}function v2e({open:e,onClose:t}){const[n,r]=te.useState([]),[i,s]=te.useState(""),[a,o]=te.useState(!1),[l,u]=te.useState(""),[f,h]=te.useState(!1),[m,g]=te.useState(null),[b,x]=te.useState(""),E=et(_=>_.editorApi),C=et(_=>_.setMessage);te.useEffect(()=>{e&&(x(""),(async()=>{const _=qh(),O=typeof _?.ai=="function"||typeof _?.aiChat=="function";o(O);let S=[];try{S=p2e(await Promise.resolve(_?.allAiModels?.()).catch(()=>[]))}catch{S=[]}if(!S.length&&O&&(S=[{value:"",label:"默认模型"}]),r(S),!O){x("当前宿主没有可用的 AI 能力。uTools 需要先在开发者中心为插件开通 AI,ZTools 需要在设置里配置模型。");return}let w="";try{w=window.localStorage.getItem("cmark-ai-model")||""}catch{w=""}const A=S.find(T=>T.value===w)||S[0];s(A?A.value:"")})())},[e]);const y=te.useCallback(async _=>{if(!l.trim()){x("请输入内容");return}const O=qh();if(typeof O?.ai!="function"&&typeof O?.aiChat!="function"){x("当前宿主没有提供 AI 接口。uTools 需要在开发者中心为插件开通 AI 能力,ZTools 需要在设置里配置模型。");return}try{window.localStorage.setItem("cmark-ai-model",i)}catch{}h(!0),x(""),g(_);try{let S="";if(O.ai){const w=await O.ai({...i?{model:i}:{},messages:[{role:"system",content:yN[_]},{role:"user",content:l}]});S=String(w?.content||"")}else{const w=await O.aiChat({...i?{model:i}:{},messages:[{role:"system",content:yN[_]},{role:"user",content:l}],temperature:.2});S=String(w?.content||"")}if(S=S.trim(),!S){x("模型没有返回内容");return}if(_==="table"){const w=g2e(S);if(!(w.length===1&&w[0].type==="table")){x("未能正确生成表格");return}E?.insertMarkdown(S)}else{const w=S.replace(/^```(?:echarts|mermaid|json)/i,"").replace(/```$/,"").trim();E?.insertMarkdown("```"+_+` -`+w+"\n```")}t(),C("已插入正文",1600)}catch(S){x("生成失败:"+(S?.message||""))}finally{h(!1),g(null)}},[l,i,E,t,C]);return e?V.jsx("div",{className:"ai-mask",onClick:t,children:V.jsxs("div",{className:"ai-panel",onClick:_=>_.stopPropagation(),children:[V.jsxs("div",{className:"ai-head",children:[V.jsx("span",{className:"ai-spark","aria-hidden":"true",children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"currentColor",children:[V.jsx("path",{d:"M12 2.2l2.36 5.44L20 10l-5.64 2.36L12 17.8l-2.36-5.44L4 10l5.64-2.36L12 2.2z"}),V.jsx("path",{d:"M18.6 15.2l1.1 2.5 2.6 1.1-2.6 1.1-1.1 2.5-1.1-2.5-2.6-1.1 2.6-1.1 1.1-2.5z",opacity:".55"})]})}),V.jsx("span",{className:"ai-title",children:"AI 生成"}),V.jsx("button",{className:"ai-close",type:"button",title:"关闭 (Esc)",onClick:t,children:V.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:V.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})})})]}),V.jsxs("div",{className:"ai-modelrow",children:[V.jsx("span",{className:"ai-mlabel",children:"模型"}),V.jsxs("select",{className:"ai-model",value:i,onChange:_=>s(_.target.value),title:"选择模型",children:[n.length===0?V.jsx("option",{value:"",children:"(没有可用模型)"}):null,n.map(_=>V.jsx("option",{value:_.value,children:_.label},_.value))]}),typeof qh()?.redirectAiModelsSetting=="function"?V.jsx("button",{type:"button",className:"ai-link",onClick:()=>qh()?.redirectAiModelsSetting?.(),title:"在 ZTools 设置里管理模型",children:"模型设置"}):null]}),V.jsx("div",{className:"ai-body",children:V.jsx("textarea",{className:"ai-input",value:l,placeholder:"描述你要生成的内容,例如:把本周各渠道的成交量整理成柱状图",autoFocus:!0,onChange:_=>u(_.target.value)})}),f?V.jsx("div",{className:"ai-out",children:"正在生成,请稍候…"}):null,b?V.jsx("div",{className:"ai-err",children:b}):null,V.jsx("div",{className:"ai-dialog-btns",children:m2e.map(_=>V.jsxs("button",{type:"button",className:"ai-preset-btn",disabled:f||!i&&!a,title:_.label,onClick:()=>void y(_.key),children:[V.jsx("span",{className:"ai-preset-ico","aria-hidden":"true",children:V.jsx("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"currentColor",children:V.jsx("path",{d:_.d})})}),V.jsx("span",{className:"ai-preset-txt",children:m===_.key?"生成中…":_.label})]},_.key))})]})}):null}function y2e(){const e=et($=>$.currentRel),t=et($=>$.content),n=et($=>$.savedContent),r=et($=>$.save),i=et($=>$.message),s=et($=>$.buildIndex),a=et($=>$.searchNotes),o=et($=>$.refreshTree);te.useEffect(()=>{try{window.__CMARK_THEME?.apply?.()}catch{}},[]),te.useEffect(()=>{const $=()=>{const Y=window.__zgsOpen;Y&&Y()};return window.addEventListener("cmark-open-settings",$),()=>window.removeEventListener("cmark-open-settings",$)},[]);const[l,u]=te.useState(!1),f=et($=>$.conflict),h=et($=>$.forceSave),m=et($=>$.reloadFromDisk),g=et($=>$.sourceMode),b=et($=>$.toggleSourceMode),x=et($=>$.aiOpen),E=et($=>$.setAiOpen),C=et($=>$.bodyFontSize),y=et($=>$.locked),_=et($=>$.toggleLocked),O=et($=>$.near),S=et($=>$.toggleNear),w=et($=>$.editor),[A,T]=te.useState(!1);te.useEffect(()=>{if(!e||t===n)return;const $=window.setTimeout(()=>r(),600);return()=>window.clearTimeout($)},[t,n,e,r]),te.useEffect(()=>{const $=()=>{const Y=et.getState();Y.currentRel&&Y.content!==Y.savedContent&&Y.save()};return window.addEventListener("beforeunload",$),()=>window.removeEventListener("beforeunload",$)},[]),te.useEffect(()=>{window.__CMARK&&window.__CMARK.onWorkspaceChange&&window.__CMARK.onWorkspaceChange(()=>{window.setTimeout(()=>o(),250)})},[o]),te.useEffect(()=>{const $=Y=>{Y.ctrlKey&&Y.altKey&&Y.key===","&&(Y.preventDefault(),T(Z=>!Z)),(Y.ctrlKey||Y.metaKey)&&Y.key.toLowerCase()==="f"&&(Y.preventDefault(),u(!0))};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[]),te.useEffect(()=>{const $=window.ztools;if(!$?.setSubInput)return;const Y=de=>{if(window.__cmarkSyncing)return;const I=de;let X="";typeof I=="string"?X=I:I&&typeof I=="object"&&"text"in I&&(X=String(I.text??"")),a(X)};try{$.setSubInput(Y,"搜索所有笔记"),window.setTimeout(()=>{try{$.subInputFocus?.()}catch{}},150)}catch{}const Z=()=>{const de=document.activeElement;if(de&&(de.tagName==="TEXTAREA"||de.tagName==="INPUT"||de.closest&&de.closest(".plate-content")))return;let I=0;const X=()=>{I++;const ne=document.activeElement;if(!(ne&&(ne.tagName==="TEXTAREA"||ne.closest&&ne.closest(".plate-content")))){try{$.subInputFocus?.()}catch{}I<2&&window.setTimeout(X,220)}};X()},ve=de=>{try{et.getState().openNote(de)}catch{}window.setTimeout(()=>{try{et.getState().currentRel!==de&&et.getState().openNote(de)}catch{}},400)},me=de=>{const I=String(de?.code||"");if(I.startsWith("note/")){const X=I.slice(5);if(X){ve(X);return}}Z()};let re;try{re=window.ztools?.onPluginEnter?.(me)||void 0}catch{}return()=>{try{re?.()}catch{}try{$.removeSubInput?.()}catch{}}},[a]),te.useEffect(()=>{const $=Y=>{const Z=et.getState();if(!Z.searchTerm.trim())return;const ve=document.activeElement;if(!!ve&&(ve.isContentEditable||!!(ve.closest&&(ve.closest(".plate-content")||ve.closest(".editor-card")))))return;const re=Z.hitOrder.length?Z.hitOrder:Object.keys(Z.searchHits);if(!re.length)return;const de=re.indexOf(Z.currentRel);if(Y.key==="ArrowDown"||Y.key==="ArrowUp"){Y.preventDefault(),Y.stopPropagation();const I=Y.key==="ArrowDown"?1:-1,X=de<0?0:(de+I+re.length)%re.length;try{Z.openNote(re[X])}catch{}}else if(Y.key==="Escape"){Y.preventDefault(),Z.searchNotes("");try{const I=window.ztools;window.__cmarkSyncing=!0,I?.setSubInputValue?.(""),window.setTimeout(()=>{window.__cmarkSyncing=!1},50)}catch{}}};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[]),te.useEffect(()=>{s()},[s]),te.useEffect(()=>{const $=window.setTimeout(()=>{try{et.getState().syncNearFeatures()}catch{}},2500);return()=>window.clearTimeout($)},[]),te.useEffect(()=>{document.documentElement.style.setProperty("--body-font-size",C+"px");try{window.localStorage.setItem("cmark-dev-body-font-size",String(C))}catch{}},[C]);const P=te.useCallback($=>{let Y="";try{const Z=window.__CMARK_BOOT_ERRORS;Array.isArray(Z)&&Z.length?Y=":"+String(Z[0]).split(` -`)[0].slice(0,120):Y="(控制台可查 window.__CMARK_BOOT_ERRORS)"}catch{}try{et.getState().setMessage($+" 没有加载成功"+Y,8e3)}catch{}},[]),M=te.useCallback($=>{const Y=window.__zgpToggle;if(typeof Y=="function"){Y($);return}P("Git 面板")},[P]),F=te.useCallback(()=>{const $=window.__zgsToggle;if(typeof $=="function"){$();return}P("设置面板")},[P]);te.useEffect(()=>{window.__cmarkHost=()=>({currentRel:e,flushSave:()=>et.getState().save(),reloadNote:$=>et.getState().openNote($),refreshTree:()=>et.getState().refreshTree(),pickDir:()=>{window.__CMARK.pickWorkspace?.()?.ok&&window.setTimeout(()=>window.location.reload(),400)}})},[e]);const z=e?e.split("/").pop().replace(/\.(md|markdown)$/i,""):"";return V.jsxs("div",{className:"app"+(A?" sidebar-hidden":""),children:[A?null:V.jsx(C$,{onOpenGitPanel:()=>M("global"),onOpenSettings:F}),V.jsxs("main",{className:"main",children:[e?V.jsxs("div",{className:"header",children:[V.jsx("div",{className:"menu-toggle",children:V.jsx("button",{className:"iconbtn",title:"隐藏侧边栏 Ctrl+Alt+,",onClick:()=>T($=>!$),children:V.jsx(b$,{})})}),V.jsx("div",{className:"title",children:e?V.jsx("input",{type:"text",readOnly:!0,value:z,placeholder:"",spellCheck:!1,title:"文件名请在左侧目录树中右键重命名"}):V.jsx("span",{className:"title-empty",children:"未打开笔记"})}),V.jsxs("div",{className:"handle",style:e?void 0:{display:"none"},children:[V.jsx(d2e,{onOpen:()=>M("file")}),V.jsx("button",{className:"iconbtn"+(y?" on":""),title:y?"笔记当前只读,点击恢复编辑":"禁止编辑(设为只读)",onClick:_,children:y?V.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:[V.jsx("rect",{x:"3.2",y:"7",width:"9.6",height:"6.6",rx:"1.4"}),V.jsx("path",{d:"M5.6 7V5.2a2.4 2.4 0 0 1 4.8 0V7"})]}):V.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:[V.jsx("rect",{x:"3.2",y:"7",width:"9.6",height:"6.6",rx:"1.4"}),V.jsx("path",{d:"M5.6 7V5.2a2.4 2.4 0 0 1 4.7-.6"})]})}),V.jsx("button",{className:"iconbtn"+(O?" on":""),title:O?"已是全局搜索指令,点击取消":"设为全局搜索",onClick:S,children:V.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:V.jsx("path",{d:"M9.6 1.9 8.3 3.2l.6.6-3.4 3.4H3.4l-.7.7 2.9 2.9-3.3 3.3a.5.5 0 0 0 .7.7l3.3-3.3 2.9 2.9.7-.7v-2.1l3.4-3.4.6.6 1.3-1.3z"})})}),V.jsx("button",{className:"iconbtn"+(g?" on":""),title:g?"源码模式(点击回到富文本)":"源码模式(直接编辑 Markdown)",onClick:b,children:V.jsxs("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[V.jsx("path",{d:"m18 16 4-4-4-4"}),V.jsx("path",{d:"m6 8-4 4 4 4"}),V.jsx("path",{d:"m14.5 4-5 16"})]})}),V.jsx(c2e,{})]})]}):null,f?V.jsxs("div",{className:"conflict-bar",children:[V.jsxs("svg",{className:"cf-ico",viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[V.jsx("path",{d:"M8 2.1 1.5 13.5h13z"}),V.jsx("path",{d:"M8 6.2v3.1"}),V.jsx("path",{d:"M8 11.5v.1"})]}),V.jsxs("span",{className:"cf-text",children:[f,",自动保存已暂停"]}),V.jsxs("span",{className:"cf-actions",children:[V.jsx("button",{type:"button",className:"cf-btn",onClick:m,children:"载入磁盘版本"}),V.jsx("button",{type:"button",className:"cf-btn danger",onClick:h,children:"用当前内容覆盖磁盘"})]})]}):null,e?V.jsx(_be,{}):null,V.jsx("div",{className:"content",children:e?V.jsx("div",{className:"editor-card",children:V.jsx(Sbe,{})}):V.jsxs("div",{className:"note-empty",children:[V.jsxs("svg",{viewBox:"0 0 48 48",width:"44",height:"44",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[V.jsx("path",{d:"M11 7h18l8 8v26a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2z"}),V.jsx("path",{d:"M29 7v8h8"}),V.jsx("path",{d:"M16 24h16M16 31h11"})]}),V.jsx("div",{className:"note-empty-title",children:"还没有打开笔记"}),V.jsx("div",{className:"note-empty-desc",children:"从左侧目录树里选一篇,或者右键新建"})]})})]}),V.jsx(h2e,{}),V.jsx(v2e,{open:x,onClose:()=>E(!1)}),w?V.jsx(r2e,{open:l,onClose:()=>u(!1),editor:w}):null,i&&V.jsx("div",{className:"toast",children:i})]})}const F4="cmark-mock-v1",Sj={"欢迎.md":["# 欢迎使用 CMark","","这是浏览器预览模式,数据存在 localStorage 里,不会碰磁盘。","","## 能试的操作","","- 左侧新建笔记 / 新建文件夹 / 右键重命名、删除",'- 编辑区改内容,600ms 后自动"保存"',"- 右侧实时预览:**粗体**、*斜体*、~~删除线~~、`行内代码`","","## 表格","","| 项目 | 状态 | 说明 |","| --- | --- | --- |","| 目录树 | 完成 | 递归、展开、右键 |","| 编辑器 | 完成 | CodeMirror 6 |","| 预览 | 完成 | marked + KaTeX |","","## 代码块","","```js","const note = {",' rel: "欢迎.md",'," readonly: false,","}","","console.log('saving', note.rel)","```","","## 公式","","行内公式 $E = mc^2$,块级公式:","","$$","\\int_{0}^{\\infty} e^{-x^2} \\, dx = \\frac{\\sqrt{\\pi}}{2}","$$","","> 引用块:段落之间恰好空一行,反复保存不会累积空白。",""].join(` -`),"技术/CodeMirror 6.md":["# CodeMirror 6","","V1.1.0 用它替代了原版的 Ace Editor。","","## 为什么换","","1. 体积小得多(488 KB vs 8.4 MB)","2. 扩展体系现代,markdown 语言包开箱可用","3. 直接编辑源码,保存零风险","","## 已挂的扩展","","- `lineNumbers()` 行号","- `markdown()` 语法高亮与标题折叠","- `history()` 撤销重做","- `searchKeymap` 查找替换(Ctrl+F)","- `EditorView.lineWrapping` 软换行",""].join(` -`),"技术/git 工作流.md":["# git 工作流","","同步 = 提交 + 拉取 + 推送;推送 = 提交 + 推送;拉取 = 仅拉取。","","## 元数据在仓库根","","```",".cmark/","├── order.txt 目录顺序,一行一个 id","├── locked.txt 只读标记,一行一个 md5(id)","└── attachments/ 图片附件,文件名是内容 md5","```","","## 提交范围","","`git add` 必须同时包含工作区子目录**和**仓库根的 `.cmark/`,","否则排序和只读状态永远提交不上去。",""].join(` -`),"生活/清单.md":["# 待办清单","","- [x] 工程骨架","- [x] 目录树","- [x] 编辑器 + 预览","- [ ] git 界面接线","- [ ] 工具栏与表格操作","- [ ] 图片附件粘贴","- [ ] 全局搜索","- [ ] 设置面板",""].join(` -`)};function x2e(){try{const t=localStorage.getItem(F4);if(t)return JSON.parse(t)}catch{}const e=Object.assign({},Sj);return localStorage.setItem(F4,JSON.stringify(e)),e}function Ul(e){try{localStorage.setItem(F4,JSON.stringify(e))}catch{}}let wn=x2e();function b2e(e){const t=[],n=new Map,r=s=>{if(n.has(s))return n.get(s);const a=s.split("/"),o=a[a.length-1],l=a.slice(0,-1).join("/"),u=l?r(l):t,f={id:s,name:o,type:"folder",rel:s,children:[]};return u.push(f),n.set(s,f.children),f.children};for(const s of Object.keys(e)){const o=s.split("/").slice(0,-1).join("/");(o?r(o):t).push({id:s,name:s.split("/").pop().replace(/\.(md|markdown)$/i,""),type:"note",rel:s})}const i=s=>(s.sort((a,o)=>a.type!==o.type?a.type==="folder"?-1:1:a.name.localeCompare(o.name,"zh")),s.forEach(a=>a.children&&i(a.children)),s);return i(t)}function Ko(e){return Object.assign({ok:!0},e)}function $h(e){return{ok:!1,message:e}}function w2e(){if(typeof window>"u"||window.__CMARK)return;const e=[],t=()=>e.forEach(r=>r()),n={configPath:"(浏览器预览模式)",getConfig(){return{workspace:"browser://mock",initialized:!0,workspaceExists:!0}},pickWorkspace(){return $h("浏览器预览模式不支持更换目录")},countMarkdown(){return{markdown:Object.keys(wn).length,folders:new Set(Object.keys(wn).map(i=>i.split("/").slice(0,-1).join("/"))).size}},rescan(){return t(),{ok:!0}},onWorkspaceChange(r){e.push(r)},shellShowWorkspace(){},absOf(r){return"browser://mock/"+r},readNote(r){return wn[r]??""},writeNote(r,i){return r in wn?(wn[r]=i,Ul(wn),Ko()):$h("笔记不存在")},createNote(r,i,s){const a=String(i||"未命名").replace(/[\\/:*?"<>|]/g,"").trim()||"未命名";let o=(r?r+"/":"")+a+".md",l=2;for(;o in wn;)o=(r?r+"/":"")+a+" "+l+".md",l++;return wn[o]=s??"# "+a+` -`,Ul(wn),t(),Ko({rel:o})},createFolder(r,i){const s=String(i||"新建文件夹").replace(/[\\/:*?"<>|]/g,"").trim()||"新建文件夹",a=(r?r+"/":"")+s,o=a+"/.keep.md";return o in wn||(wn[o]="# "+s+` -`,Ul(wn)),t(),Ko({rel:a})},renameNode(r,i){const s=String(i||"").replace(/[\\/:*?"<>|]/g,"").trim();if(!s)return $h("名称不能为空");const a=/\.(md|markdown)$/i.test(r),o=r.includes("/")?r.slice(0,r.lastIndexOf("/")):"",l=(o?o+"/":"")+s+(a?".md":"");return l===r?Ko({rel:r}):l in wn?$h("同名已存在"):(a?(wn[l]=wn[r],delete wn[r]):Object.keys(wn).filter(f=>f.startsWith(r+"/")).forEach(f=>{wn[l+f.slice(r.length)]=wn[f],delete wn[f]}),Ul(wn),t(),Ko({rel:l}))},deleteNode(r){return r in wn?delete wn[r]:Object.keys(wn).filter(i=>i.startsWith(r+"/")).forEach(i=>delete wn[i]),Ul(wn),t(),Ko()},countInDir(r){return Object.keys(wn).filter(i=>(r?i.startsWith(r+"/"):!0)&&/\.md$/i.test(i)).length},moveNode(r,i){const s=r.split("/").pop(),a=(i?i+"/":"")+s;return a===r?Ko({rel:r}):(wn[a]=wn[r],delete wn[r],Ul(wn),t(),Ko({rel:a}))},listTree(){return{workspace:"browser://mock",children:b2e(wn),truncated:!1,count:Object.keys(wn).length}}};window.__CMARK=n,window.__CMARK_RESET=()=>{wn=Object.assign({},Sj),Ul(wn),t(),location.reload()}}w2e();function X3(e,t){const n=t instanceof Error?`${t.message} -${(t.stack||"").split(` -`).slice(0,8).join(` -`)}`:String(t);console.error("[cmark]",e,n);try{const r=localStorage.getItem("cmark:lastError")||"";localStorage.setItem("cmark:lastError",`${new Date().toISOString()} ${e} -${n} - ----prev--- -${r.slice(0,2e3)}`)}catch{}}window.addEventListener("error",e=>X3("window.error",e.error||e.message));window.addEventListener("unhandledrejection",e=>X3("unhandledrejection",e.reason));class E2e extends te.Component{state={err:null};static getDerivedStateFromError(t){return{err:t}}componentDidCatch(t){X3("render",t)}render(){return this.state.err?V.jsx("div",{style:{padding:24,fontFamily:"Consolas, monospace",fontSize:12,color:"#cf222e",whiteSpace:"pre-wrap"},children:`渲染失败: - -`+this.state.err.message+` - -`+(this.state.err.stack||"").split(` -`).slice(0,12).join(` -`)}):this.props.children}}window.addEventListener("load",()=>{const e=localStorage.getItem("cmark:lastError");e&&console.warn("[cmark] 上次错误:",e)});f$.createRoot(document.getElementById("root")).render(V.jsx(E2e,{children:V.jsx(y2e,{})})); diff --git a/plugins/cmark/assets/index-D0glt-_3.css b/plugins/cmark/assets/index-D0glt-_3.css new file mode 100644 index 000000000..948428732 --- /dev/null +++ b/plugins/cmark/assets/index-D0glt-_3.css @@ -0,0 +1 @@ +@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}:root{--sb-bg: #f6f8fa;--sb-border: #d8dee4;--work-bg: #eaeef2;--card-bg: #ffffff;--editor-bg: #ffffff;--hover-bg: var(--accent-soft);--hover-fg: var(--accent);--fg: #212121;--fg-dim: #57606a;--fg-weak: #6e7781;--line: #d8dee4;--accent: #0969da;--danger: #d32f2f;--bg-card: #ffffff;--bg-subtle: #f6f8fa;--bg-sunken: #eef1f4;--fg-strong: #111111;--fg-mute: #8b949e;--fg-on-strong: #ffffff;--bd: #d0d7de;--bd-soft: #e4e8ec;--accent-bg: #f0f7ff;--ok: #1a7f37;--danger-bg: #ffebe9;--warn-bg: #fff8c5;--bg-hover: #eef1f4;--accent-soft: #ddf4ff;--accent-strong: #0550ae;--warn-soft: #fff8c5;--warn: #bf8700;--fg-icon: #666666;--table-bd: #d0d7de;--insert-line: rgba(33, 33, 33, .28);--table-head-bg: #eef1f5;--table-row-base: #f2f4f7;--table-row-alt: #ffffff;--table-head-bd: #b0b9c3;--code-bg: #f6f8fa;--code-border: #e3e7ec;--code-inline-bg: rgba(27, 31, 35, .05);--mark-bg: #fff3b8;--mark-fg: #6b4a00;--code-punc: #24292e;--code-keyword: #cf222e;--code-string: #032f62;--code-number: #005cc5;--code-function: #6f42c1;--code-variable: #953800;--code-comment: #6e7781;--code-tag: #22863a;color-scheme:light}:root[data-theme=dark]{--sb-bg: #0d1117;--sb-border: #1b2129;--work-bg: #161b22;--editor-bg: #1c2128;--hover-bg: rgba(88, 166, 255, .22);--hover-fg: #b6e3ff;--card-bg: #22272e;--fg: #e6edf3;--fg-dim: #b1bac4;--fg-weak: #a3adb9;--line: #30363d;--accent: #58a6ff;--danger: #f85149;--bg-card: #22272e;--bg-subtle: #262c36;--bg-sunken: #1b2129;--fg-strong: #f0f6fc;--fg-mute: #7d8590;--fg-on-strong: #ffffff;--bd: #30363d;--bd-soft: #262c36;--accent-bg: #12233d;--ok: #3fb950;--danger-bg: #2d1214;--warn-bg: #3a2d00;--bg-hover: #22272e;--accent-soft: #1f2d42;--accent-strong: #8fbcff;--warn-soft: #3a2d00;--warn: #d29922;--fg-icon: #b9c1cc;--table-bd: #5a6472;--insert-line: #58a6ff;--table-head-bg: #000000;--table-row-base: #0d1117;--table-row-alt: #262c36;--table-head-bd: #8b95a1;--code-bg: #0d1117;--code-border: #3d444d;--code-inline-bg: rgba(110, 118, 129, .24);--mark-bg: #6b5200;--mark-fg: #ffe08a;--code-punc: #c9d1d9;--code-keyword: #ff7b72;--code-string: #a5d6ff;--code-number: #79c0ff;--code-function: #d2a8ff;--code-variable: #ffa657;--code-comment: #8b949e;--code-tag: #7ee787;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--card-bg);color:var(--fg);font:14px/1.45 system-ui,-apple-system,Segoe UI,Microsoft YaHei,sans-serif;overflow:hidden;-webkit-font-smoothing:antialiased}.app{display:flex;height:100%}.sidebar{position:relative;width:200px;flex:0 0 200px;background:var(--sb-bg);border-right:1px solid var(--sb-border);display:flex;flex-direction:column;min-height:0;user-select:none}.branchbar{height:36px;flex:0 0 36px;display:flex;align-items:center;gap:2px;padding:0 6px 0 8px;border-bottom:1px solid var(--sb-border);overflow:hidden}.branchbar .bname{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 6px;border-radius:5px;font-size:12px;color:#444;cursor:pointer;max-width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.branchbar .bname:hover{background:var(--work-bg)}.branchbar .spacer{flex:1}.branchbar .bbtn{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:5px;cursor:pointer;color:var(--fg-dim);padding:0}.branchbar .bbtn:hover{background:var(--work-bg);color:var(--fg-strong)}.branchbar .bbtn:disabled{opacity:.35;cursor:default;background:none}.branchbar .dirty{width:5px;height:5px;border-radius:50%;background:#ef8f2f;flex:0 0 5px}.tree-hitbar{display:flex;align-items:center;gap:6px;padding:4px 10px;font-size:11px;line-height:1.6;color:var(--muted-foreground);border-bottom:1px solid var(--border);flex:0 0 auto;user-select:none}.tree-hitbar-count{font-variant-numeric:tabular-nums;font-weight:600;color:var(--accent)}.tree-hitbar-tip{opacity:.75}.tree,.tree:focus,.tree:focus-visible{outline:none!important}.tree{flex:1;overflow:auto;padding:4px 0;min-height:0}.tree-empty{padding:20px 12px;color:var(--fg-dim);font-size:12.5px;line-height:1.6}.row{position:relative;display:flex;align-items:center;height:28px;margin:1px 6px;padding-right:6px;border-radius:6px;cursor:pointer;white-space:nowrap;overflow:hidden;transition:background .12s ease}.row:hover{background:var(--bg-hover)}.row.active{background:var(--accent-soft)}.row.active:before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:2px;border-radius:2px;background:var(--accent)}.row.active .label{color:var(--accent-strong)}.row .caret{width:18px;flex:0 0 18px;display:inline-flex;align-items:center;justify-content:center;color:var(--fg)}.row .caret svg{display:block}.row .label{font-size:13px;overflow:hidden;text-overflow:ellipsis;color:var(--fg)}.row .lock{margin-left:auto;color:var(--fg-weak);font-size:11px;flex:0 0 auto}.footer{height:43px;flex:0 0 43px;border-top:1px solid var(--sb-border);display:flex;align-items:center;padding:0 8px}.footer button{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 8px;border:0;background:none;border-radius:5px;color:var(--fg-dim);font-size:12.5px;cursor:pointer}.footer button:hover{background:var(--work-bg);color:var(--fg-strong)}.main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--work-bg)}.header{height:40px;flex:0 0 40px;display:flex;align-items:center;gap:6px;padding:0 8px;border-bottom:1px solid var(--line);background:var(--card-bg)}.header .menu-toggle{display:inline-flex;align-items:center}.header .title{flex:1;min-width:0}.header .title input{width:100%;border:0;background:none;font:inherit;font-size:14px;color:var(--fg);padding:4px 2px;outline:none;cursor:default}.header .handle{display:flex;align-items:center;gap:2px;flex:0 0 auto}.iconbtn{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:5px;color:var(--fg-icon);cursor:pointer;padding:0}.iconbtn:hover{background:var(--bg-sunken);color:var(--fg-strong)}.iconbtn:disabled{opacity:.4;cursor:default;background:none}.iconbtn.on{background:#e8f0fe;color:var(--accent)}.iconbtn.on:hover{background:var(--accent-soft)}.iconbtn.warn-on{background:#fff4e5;color:#b25e09}.iconbtn.warn-on:hover{background:var(--warn-soft)}.editor-toolbar{height:35px;flex:0 0 35px;display:flex;align-items:center;padding:5px 8px;background:var(--card-bg);border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.editor-toolbar::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bd);background-clip:padding-box;border:2px solid transparent;border-radius:6px}::-webkit-scrollbar-thumb:hover{background:var(--fg-weak);background-clip:padding-box}.no-scrollbar::-webkit-scrollbar{display:none}.tb-group{display:flex;align-items:center;gap:2px;flex:0 0 auto}:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-radius:4px}.tb-sep{width:1px;height:18px;background:var(--bd-soft);margin:0 4px;flex:0 0 auto}.tb-btn svg{width:15px;height:15px}.tb-btn{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:4px;color:var(--fg-dim);cursor:pointer;padding:0;flex:0 0 24px}.tb-btn:hover{background:var(--bg-sunken);color:var(--fg-strong)}.tb-btn:active{background:var(--work-bg)}.tb-btn:disabled{opacity:.35;cursor:default;background:none}.content{flex:1;min-height:0;background:var(--work-bg);overflow:auto}.editor-card{min-height:100%;box-sizing:border-box;display:flex;flex-direction:column;max-width:none;color:var(--fg);font-size:14.5px;line-height:1.72;word-wrap:break-word;word-break:break-all;tab-size:4}.editor-card p{position:relative;margin-top:0;margin-bottom:.85em}.editor-card blockquote{margin:0 0 1rem;padding:0 1em;color:var(--fg-mute);border-left:.25em solid var(--bd-soft)}.editor-card code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85em}.editor-card mark{display:inline-flex;background-color:var(--mark-bg);color:var(--mark-fg);border-radius:3px;padding:0 2px;font-weight:500}.editor-card a{color:var(--accent)}.editor-card s{display:inline-flex}.editor-card img{vertical-align:middle;font-size:12px;color:#59ae39}.editor-card ol,.editor-card ul{padding-left:2em;margin-top:0;margin-bottom:1rem}.editor-card ul ul,.editor-card ul ol,.editor-card ol ol,.editor-card ol ul{margin-bottom:0}.editor-card li{position:relative;margin-top:0;margin-bottom:5px}.editor-card ol ol,.editor-card ul ol{list-style-type:lower-roman}.editor-card ol ol ol,.editor-card ol ul ol,.editor-card ul ol ol,.editor-card ul ul ol{list-style-type:lower-alpha}.editor-card pre{margin:0 0 1rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;padding:12px;font-size:.9em;overflow:auto;line-height:1.42;background-color:var(--code-bg);border-radius:4px;letter-spacing:normal}.editor-card table{margin:0 0 1rem;border-spacing:0;border-collapse:collapse;width:100%;overflow:auto;position:relative}.editor-card table tr{background-color:var(--bg-card)}.editor-card table tr:first-child{background-color:var(--bg-card);font-weight:600}.editor-card table td{padding:6px 13px;border:1px solid var(--table-bd);vertical-align:middle}.editor-card table caption{user-select:none;box-sizing:border-box;position:sticky;top:0;z-index:25;background-color:var(--bg-sunken);border-top-left-radius:2px;border-top-right-radius:2px;text-align:left;box-shadow:0 1px 0 var(--bd-soft)}.editor-card table caption>button{margin-left:10px}.editor-card table caption>span{position:relative;display:inline-flex;align-items:center;align-self:center;height:16px;margin-left:10px}.editor-card table caption>span:after{content:"";position:absolute;top:50%;left:0;transform:translateY(-50%);width:1px;height:14px;background-color:#dfe2e5}.editor-card .punctuation{color:var(--fg-mute)}.editor-card .hr{display:flex;overflow:hidden;color:var(--fg-mute)}.editor-card .hr:before,.editor-card .hr:after{content:"";flex:1;height:2px;margin-top:8px;background-color:var(--bg-sunken)}.editor-card .h1,.editor-card .h2,.editor-card .h3,.editor-card .h4,.editor-card .h5,.editor-card .h6{font-weight:600}.editor-card h1,.editor-card h2{margin:0 0 1rem;border-bottom:1px solid #eaecef;line-height:1.68}.editor-card .h1,.editor-card .h2{line-height:1.68}.editor-card .h1:after,.editor-card .h2:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--bg-sunken)}.editor-card h1,.editor-card .h1{font-size:32px}.editor-card h2,.editor-card .h2{font-size:24px}.editor-card .h3{font-size:20px}.editor-card .h4{font-size:16px}.editor-card .h5{font-size:14px}.editor-card .h6{font-size:12px;color:var(--fg-mute)}.editor-card .math-leaf{user-select:none}.editor-card .math-leaf .katex-display{margin:0;padding:1em 0}.editor-card .block-img{width:100%;display:block;text-align:center}.editor-card .inline-img{display:inline-block}.editor-card .block-img,.editor-card .inline-img{position:relative;user-select:none}.editor-card .block-img img,.editor-card .inline-img img{max-width:100%;display:inline-block!important;user-select:none}.editor-card .block-img .img-handle,.editor-card .inline-img .img-handle{user-select:none;position:absolute;right:8px;top:8px;display:none;align-items:center;gap:2px;padding:0;gap:4px;background:transparent;border:0;box-shadow:none;z-index:9}.editor-card .block-img .img-handle>button,.editor-card .inline-img .img-handle>button{margin:0;padding:0;width:26px;height:26px;min-height:26px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;background:#0003;backdrop-filter:blur(12px) saturate(1.15);color:#fffffff2;cursor:pointer;transition:background .12s ease,color .12s ease}.editor-card .block-img .img-handle>button:hover,.editor-card .inline-img .img-handle>button:hover{background:#0000006b;color:var(--fg-on-strong)}.editor-card .block-img .img-handle>button.danger:hover,.editor-card .inline-img .img-handle>button.danger:hover{background:#c828288c;color:var(--fg-on-strong)}.editor-card .block-img .img-handle>button>svg,.editor-card .inline-img .img-handle>button>svg{width:15px;height:15px;color:inherit}.editor-card .block-img:hover .img-handle,.editor-card .inline-img:hover .img-handle{display:inline-flex}.editor-card .task-list-item{list-style-type:none}.editor-card .task-list-item .task-list-checkbox{user-select:none;position:absolute;left:-31px;top:-3px}.editor-card .task-list-item .task-list-checkbox .MuiCheckbox-root{padding:4px}.editor-card .task-list-item .task-list-checkbox svg{font-size:1.25em}.editor-card .task-checked{text-decoration-line:line-through;color:#6e6e6e}.editor-card .blockcode,.editor-card .htmlcode{color:var(--fg-mute)}.editor-card .code-editor{margin:0 0 1rem;position:relative}.editor-card .code-editor>div:first-child{padding-left:0;height:0}.editor-card .code-editor>div:last-child{display:flex;flex-direction:column;user-select:none}.editor-card .code-editor iframe{background-color:var(--code-bg);border:none;width:100%;height:34px;border-radius:4px}.editor-card .code-editor .code-editor-copy{position:absolute;top:-12px;right:0;display:none;min-height:24px;width:24px;height:24px}.editor-card .code-editor .code-editor-copy>svg{width:16px;color:var(--fg)}.editor-card .code-editor .code-mermaid-render,.editor-card .code-editor .code-echarts-render{width:100%;display:flex;justify-content:center}.editor-card .code-lang{position:absolute;z-index:1;right:32px;top:-11px;background-color:var(--bg-card);border:1px solid var(--line);border-radius:4px;user-select:none}.editor-card .code-lang>div:first-child{display:flex}.editor-card .code-lang input{border:none;outline:none;width:150px;height:20px;font-size:12px;background:transparent;padding:0 8px;box-sizing:border-box;color:var(--fg)}.editor-card .code-lang input:active{outline:none}.editor-card .code-lang .code-lang-list{box-sizing:border-box;width:150px;max-height:200px;overflow-x:hidden;overflow-y:auto;font-size:12px;user-select:none;background-color:var(--code-bg)}.editor-card .code-lang .code-lang-list>div{cursor:pointer;padding:2px 8px;box-sizing:border-box}.editor-card .code-lang .code-lang-list .Mui-focused{background-color:#1976d214}.editor-card .urlreference{color:#999;font-size:12px}.editor-card h1,.editor-card h2{border-color:#495057}.editor-card .h1:after,.editor-card .h2:after{background-color:#495057}.editor-card .hr:before,.editor-card .hr:after{background-color:#666}.code-editor{margin:0 0 1rem;position:relative}.code-editor>div:first-child{padding-left:0;height:0}.code-editor>div:last-child{display:flex;flex-direction:column;user-select:none}.code-editor iframe{background-color:var(--code-bg);border:none;width:100%;height:34px;border-radius:4px}.code-editor .code-editor-copy{position:absolute;top:-12px;right:0;display:none;min-height:24px;width:24px;height:24px}.code-editor .code-editor-copy>svg{width:16px;color:var(--fg)}.code-editor:hover .code-editor-copy{display:flex}.code-editor .code-mermaid-render,.code-editor .code-echarts-render{width:100%;display:flex;justify-content:center}.editor-host{min-height:100%}.editor-card .editor-host>div[data-slate-editor]{outline:none}.editor-card .editor-host div[data-slate-editor]{white-space:pre-wrap}.editor-card code span[data-slate-string]{padding:2px 4px;background-color:var(--code-inline-bg);border-radius:3px}.editor-card .diagram-box{margin:0 0 1rem;text-align:center}.editor-card .diagram-box svg{max-width:100%}.tb-btn.is-on{background:#e4e4e4;color:var(--fg-strong)}.tb-letter{display:inline-flex;align-items:center;justify-content:center;min-width:16px;font-family:-apple-system,Segoe UI,Microsoft YaHei,sans-serif;letter-spacing:0}.editor-card pre.code-block{position:relative;padding:0;background:var(--code-bg);border:1px solid var(--bd);border-radius:4px;overflow:hidden;color:var(--fg)}.editor-card pre.code-block .code-head{display:flex;align-items:center;justify-content:space-between;padding:3px 8px;background:var(--bg-sunken);border-bottom:1px solid var(--bd);user-select:none}.editor-card pre.code-block .code-lang{font-size:11px;line-height:18px;color:var(--fg-dim);background:transparent;border:none;outline:none;cursor:pointer;font-family:inherit}.editor-card pre.code-block .code-copy{font-size:11px;line-height:18px;color:var(--fg-dim);background:transparent;border:1px solid transparent;border-radius:3px;padding:0 6px;cursor:pointer;font-family:inherit}.editor-card pre.code-block .code-copy:hover{background:var(--bg-sunken);color:var(--fg)}.editor-card pre.code-block code{display:block;padding:10px 12px;font-family:Consolas,Courier New,monospace;font-size:12.5px;line-height:1.55;white-space:pre-wrap;word-break:break-word}.editor-card .image-block{margin:0 0 1rem;text-align:center}.editor-card .image-block .image-wrap{position:relative;display:inline-block;max-width:100%;line-height:0}.editor-card .image-block img{display:block;max-width:100%;border-radius:3px}.editor-card .image-block .image-resize{position:absolute;right:-4px;bottom:-4px;width:10px;height:10px;border:1px solid var(--bd);background:#8c8c8c;border-radius:2px;cursor:nwse-resize;opacity:0;transition:opacity .12s}.editor-card .image-block:hover .image-resize{opacity:1}.editor-card .image-block .image-caption{display:block;margin-top:4px;font-size:12px;color:#8c8c8c}.editor-card .math-block{margin:0 0 1rem;padding:8px 10px;background:var(--bg-subtle);border:1px dashed var(--bd);border-radius:4px}.editor-card .math-block .math-render{display:block;text-align:center;overflow-x:auto}.editor-card .math-block .math-source{display:block;margin-top:4px;font-size:11.5px;color:var(--fg-mute);font-family:Consolas,monospace}.editor-card .editor-readonly{cursor:default}.table-menu{position:fixed;z-index:3000;min-width:152px;padding:4px;background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;box-shadow:0 6px 20px #00000024;font-size:13px}.table-menu .tm-item{display:block;width:100%;padding:5px 10px;text-align:left;background:none;border:none;border-radius:4px;color:var(--fg);font-size:13px;font-family:inherit;cursor:pointer}.table-menu .tm-item:hover{background:var(--bg-sunken)}.table-menu .tm-item.tm-danger{color:#c0392b}.table-menu .tm-item.tm-danger:hover{background:var(--danger-bg)}.table-menu .tm-sep{height:1px;margin:4px 6px;background:var(--bg-sunken)}.table-menu .tm-label{padding:4px 10px 2px;font-size:11.5px;color:var(--fg-mute)}.table-menu .tm-row{display:flex;gap:4px;padding:2px 6px 4px}.table-menu .tm-mini{flex:1;padding:3px 0;font-size:12px;color:var(--fg);background:#f6f6f6;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;font-family:inherit}.table-menu .tm-mini:hover{background:var(--bg-sunken)}.branch-bar{flex:0 0 36px;height:36px;display:flex;align-items:center;gap:4px;padding:0 8px;box-sizing:border-box;--bfg: var(--fg);--bbd: var(--bd);--bsoft: var(--bg-hover)}.branch-bar .zbb-branch{flex:1;min-width:0;display:flex;align-items:center;gap:5px;height:26px;padding:0 7px;border:1px solid var(--bbd);border-radius:7px;background:transparent;color:var(--bfg);font-size:12px;font-family:inherit;cursor:pointer;transition:background .14s,border-color .14s}.branch-bar .zbb-branch:hover{background:var(--bsoft)}.branch-bar .zbb-branch svg{flex:0 0 auto;opacity:.75}.branch-bar .zbb-bname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.branch-bar .zbb-dirty{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:#e0a03a;display:none}.branch-bar .zbb-dirty.on{display:block}.branch-bar .zbb-btn{flex:0 0 auto;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bbd);border-radius:7px;background:transparent;color:var(--bfg);cursor:pointer;opacity:.8;transition:background .14s,opacity .14s}.branch-bar .zbb-btn:hover{background:var(--bsoft);opacity:1}.branch-bar .zbb-btn:disabled{opacity:.35;cursor:default}.branch-bar .zbb-btn.busy svg{animation:zbb-spin 1s linear infinite}@keyframes zbb-spin{to{transform:rotate(360deg)}}.git-panel{position:fixed;top:0;right:0;width:520px;max-width:96vw;height:100%;z-index:99998;display:flex;flex-direction:column;background:var(--bg-card);color:var(--fg);box-shadow:-8px 0 32px #1f232824,-2px 0 8px #1f232814;font-size:13px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,system-ui,sans-serif;animation:zgp-in .22s cubic-bezier(.2,.8,.2,1)}@keyframes zgp-in{0%{transform:translate(24px);opacity:0}to{transform:none;opacity:1}}.git-panel .zgp-head{padding:14px 16px 10px;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-head-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.git-panel .zgp-title{font-size:14px;font-weight:600;letter-spacing:.2px;display:flex;align-items:center;gap:7px;flex:1;min-width:0;overflow:hidden}.git-panel .zgp-title>svg{width:16px;height:16px;flex:0 0 16px;fill:currentColor}.git-panel .zgp-title>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.git-panel .zgp-close{border:none;background:none;color:var(--fg-weak);cursor:pointer;font-size:20px;line-height:1;flex:0 0 auto;padding:2px 6px;border-radius:6px}.git-panel .zgp-close:hover{background:var(--bg-sunken);color:var(--fg)}.git-panel .zgp-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}.git-panel .zgp-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0;flex:1 1 auto}.git-panel .zgp-acts,.git-panel .zgp-fileact{display:flex;align-items:center;gap:6px;flex:0 0 auto}.git-panel .zgp-fileact .zgp-b{padding:3px 9px;font-size:11px}.git-panel .zgp-fileact .zgp-count{font-size:11px;color:var(--fg-dim);white-space:nowrap}.git-panel .zgp-acts .zgp-b{padding:3px 9px;font-size:11px}.git-panel .zgp-chip{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;background:var(--bg-subtle);border:1px solid var(--bd-soft);color:var(--fg-dim);white-space:nowrap}.git-panel .zgp-chip b{font-weight:600;color:var(--fg)}.git-panel .zgp-chip.ok{border-color:#1a7f37;color:var(--ok)}.git-panel .zgp-chip.warn{border-color:#bf8700;color:var(--warn)}.git-panel .zgp-chip.err{border-color:var(--danger);color:var(--danger)}.git-panel .zgp-chip.acc{border-color:var(--accent);color:var(--accent)}.git-panel .zgp-spin{width:9px;height:9px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:zgp-rot .7s linear infinite}@keyframes zgp-rot{to{transform:rotate(360deg)}}.git-panel .zgp-tabs{display:flex;gap:2px;padding:8px 12px 0;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-tab{padding:7px 14px 9px;font-size:12.5px;font-weight:500;color:var(--fg-dim);cursor:pointer;border:none;background:none;border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s;display:flex;align-items:center;gap:6px;font-family:inherit}.git-panel .zgp-tab:hover{color:var(--fg)}.git-panel .zgp-tab.on{color:var(--accent);border-bottom-color:var(--accent)}.git-panel .zgp-tab .zgp-badge{min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--bg-sunken);color:var(--fg-dim);font-size:10px;display:none;align-items:center;justify-content:center;font-weight:600}.git-panel .zgp-tab .zgp-badge.on{display:inline-flex}.git-panel .zgp-tab.on .zgp-badge{background:var(--accent-bg);color:var(--accent)}.git-panel .zgp-body{flex:1;overflow:auto;overscroll-behavior:contain}.git-panel .zgp-pane{display:none;padding:0}.git-panel .zgp-pane.on{display:block}.git-panel .zgp-sec{padding:12px 16px;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-sec:last-child{border-bottom:none}.git-panel .zgp-sec h5{margin:0 0 8px;font-size:11px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:var(--fg-weak)}.git-panel .zgp-row{display:flex;gap:8px}.git-panel .zgp-hint{font-size:11px;color:var(--fg-weak);margin-top:8px;line-height:1.6}.git-panel .zgp-file{display:flex;align-items:center;gap:8px;padding:7px 16px;cursor:default;border-bottom:1px solid var(--bd-soft);transition:background .12s}.git-panel .zgp-file:hover{background:var(--bg-subtle)}.git-panel .zgp-file.cur{background:var(--accent-bg);box-shadow:inset 3px 0 #2563eb}.git-panel .zgp-st{width:18px;height:18px;flex:0 0 18px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;font-family:Consolas,Menlo,monospace}.git-panel .zgp-st.M{background:#fff4ce;color:#9a6700}.git-panel .zgp-st.A{background:#e6ffec;color:var(--ok)}.git-panel .zgp-st.D{background:var(--danger-bg);color:var(--danger)}.git-panel .zgp-st.Q{background:var(--bg-sunken);color:var(--fg-weak)}.git-panel .zgp-st.U{background:var(--danger-bg);color:var(--danger)}.git-panel .zgp-fp{flex:1;min-width:0;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,Menlo,monospace}.git-panel .zgp-fp span{unicode-bidi:normal}.git-panel .zgp-ops{display:flex;gap:3px;opacity:0;transition:opacity .12s}.git-panel .zgp-file:hover .zgp-ops{opacity:1}.git-panel .zgp-ic{border:1px solid var(--bd);background:var(--bg-card);color:var(--fg-dim);cursor:pointer;width:24px;height:24px;border-radius:5px;display:flex;align-items:center;justify-content:center;padding:0;flex:0 0 auto}.git-panel .zgp-ic:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.git-panel .zgp-ic.danger:hover{background:var(--danger-bg);border-color:var(--danger);color:var(--danger)}.git-panel .zgp-ic svg{width:13px;height:13px;fill:currentColor}.git-panel .zgp-cm{padding:9px 16px;border-bottom:1px solid var(--bd-soft);cursor:pointer;transition:background .12s}.git-panel .zgp-cm:hover,.git-panel .zgp-cm.open{background:var(--bg-subtle)}.git-panel .zgp-cm1{display:flex;align-items:baseline;gap:8px}.git-panel .zgp-cm-sub{flex:1;min-width:0;font-size:12.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg)}.git-panel .zgp-cm-meta{font-size:11px;color:var(--fg-weak);margin-top:3px;font-family:Consolas,Menlo,monospace}.git-panel .zgp-hash{font-size:10.5px;font-family:Consolas,Menlo,monospace;padding:1px 5px;border-radius:4px;background:var(--bg-sunken);color:var(--fg-dim);flex:0 0 auto}.git-panel .zgp-cmbody{display:none;margin-top:7px;padding-left:4px;border-left:2px solid var(--bd)}.git-panel .zgp-cm.open .zgp-cmbody{display:block}.git-panel .zgp-cmf{display:flex;align-items:center;gap:7px;padding:3px 0 3px 8px;font-size:11.5px;font-family:Consolas,Menlo,monospace;color:var(--fg-dim);cursor:pointer;border-radius:4px}.git-panel .zgp-cmf:hover{background:var(--bg-sunken);color:var(--fg)}.git-panel .zgp-cmf .zgp-fs{font-weight:700;width:12px;flex:0 0 12px}.git-panel .zgp-cmf .zgp-fs.A{color:var(--ok)}.git-panel .zgp-cmf .zgp-fs.D{color:var(--danger)}.git-panel .zgp-cmf .zgp-fs.M{color:var(--warn)}.git-panel .zgp-empty{padding:34px 20px;text-align:center;color:var(--fg-weak);font-size:12.5px;line-height:1.9}.git-panel .zgp-empty b{display:block;color:var(--fg-dim);font-size:13px;margin-bottom:4px;font-weight:500}.git-panel .zgp-b{padding:6px 14px;font-size:12.5px;font-weight:500;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg);transition:all .15s;display:inline-flex;align-items:center;gap:6px;font-family:inherit}.git-panel .zgp-b:hover{background:var(--bg-sunken)}.git-panel .zgp-b:disabled{opacity:.5;cursor:not-allowed}.git-panel .zgp-b.primary{background:var(--accent);border-color:var(--accent);color:var(--fg-on-strong)}.git-panel .zgp-b.primary:hover{filter:brightness(1.08)}.git-panel .zgp-b.danger{background:var(--danger);border-color:var(--danger);color:var(--fg-on-strong)}.git-panel .zgp-b svg{width:13px;height:13px;fill:currentColor}.git-panel .zgp-cf-ov{position:absolute;inset:0;background:#00000061;display:flex;align-items:center;justify-content:center;z-index:20;padding:20px}.git-panel .zgp-cf-card{background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:10px;padding:16px 16px 12px;width:100%;max-width:340px;box-shadow:0 8px 32px #1f232824}.git-panel .zgp-cf-msg{font-size:12.5px;line-height:1.75;white-space:pre-wrap;color:var(--fg);margin-bottom:14px;word-break:break-word}.git-panel .zgp-cf-btns{display:flex;justify-content:flex-end;gap:8px}.zgp-toast{position:fixed;left:50%;bottom:36px;transform:translate(-50%) translateY(12px);background:#1f2328;color:var(--fg-on-strong);padding:9px 18px;border-radius:8px;font-size:12.5px;z-index:100002;opacity:0;pointer-events:none;transition:all .22s;box-shadow:0 6px 24px #0000004d;max-width:70vw}.zgp-toast.on{opacity:1;transform:translate(-50%) translateY(0)}.zgp-toast.err{background:var(--danger)}.zgp-toast.ok{background:var(--ok)}.zgp-view-mask{position:fixed;inset:0;background:#00000080;z-index:100001;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(2px)}.zgp-vbox{background:var(--bg-card);color:var(--fg);width:min(1000px,96vw);height:min(82vh,860px);border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 32px #1f232824,0 2px 8px #1f232814}.zgp-vhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--bd-soft);background:var(--bg-subtle)}.zgp-vtitle{font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,Menlo,monospace}.zgp-vhead .zgp-b{padding:6px 14px;font-size:12.5px;font-weight:500;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg);flex:0 0 auto}.zgp-vhead .zgp-b:hover{background:var(--bg-sunken)}.zgp-vbody{flex:1;overflow:auto;margin:0;font-family:Consolas,Cascadia Mono,Menlo,monospace;font-size:12px;line-height:1.6}.zgp-dl{display:block;padding:0 8px 0 0;white-space:pre-wrap;word-break:break-word}.zgp-dl.add{background:#e6ffec;color:var(--ok)}.zgp-dl.del{background:var(--danger-bg);color:var(--danger)}.zgp-dl.hunk{background:#ddf4ff;color:var(--accent);font-weight:600}.zgp-dl.meta{color:var(--fg-weak)}.zgp-dl.ctx{color:var(--fg)}.zgp-dl.plain{padding:8px 14px;white-space:pre-wrap}.zgp-fbody{display:block;max-height:calc(100vh - 260px);overflow:auto;font-family:Consolas,Cascadia Mono,Menlo,monospace;font-size:12px;line-height:1.6}.zgp-ln{display:inline-block;width:42px;padding-right:10px;text-align:right;color:var(--fg-weak);opacity:.7;user-select:none;font-variant-numeric:tabular-nums}.zgp-dl.add .zgp-ln{color:var(--ok);opacity:.85}.zgp-dl.del .zgp-ln{color:var(--danger);opacity:.85}.zgp-dl.oldno .zgp-ln{opacity:.45;font-style:italic}.zgp-jumpbar{position:sticky;top:0;z-index:3;display:flex;justify-content:flex-end;padding:4px 8px 3px;background:var(--bg-card)}.zgp-jumpbar button{padding:3px 10px;font-size:11.5px;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg-dim)}.zgp-jumpbar button:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.zgp-dl.zgp-flash{outline:none!important;border:none!important;background:#0969da29!important}[data-theme=dark] .zgp-dl.zgp-flash{background:#58a6ff4d!important}.settings-panel{position:fixed;top:0;right:0;width:520px;max-width:96vw;height:100%;z-index:99998;display:flex;flex-direction:column;background:var(--bg-card);color:var(--fg);font-size:13px;line-height:1.5;box-shadow:-8px 0 32px #1f232824,-2px 0 8px #1f232814;animation:gp-in .22s cubic-bezier(.2,.8,.2,1)}.settings-panel .gp-head{position:relative;padding:0 16px;height:44px;display:flex;align-items:center;border-bottom:1px solid var(--bd-soft)}.settings-panel .gp-title{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:600;color:var(--fg)}.settings-panel .gp-title svg{width:15px;height:15px;opacity:.85}.settings-panel .gp-close{position:absolute;top:9px;right:12px;width:26px;height:26px;border:none;background:none;color:var(--fg-weak);font-size:20px;line-height:1;border-radius:5px;cursor:pointer}.settings-panel .gp-close:hover{background:var(--bg-sunken);color:var(--fg)}.settings-panel .sp-body{flex:1;overflow-y:auto;padding:4px 0 18px}.settings-panel .zgp-sec{padding:16px;border-bottom:1px solid var(--bd-soft)}.settings-panel .zgp-sec:last-child{border-bottom:none}.settings-panel .zgp-sec h5{margin:0 0 8px;font-size:12.5px;font-weight:600;letter-spacing:.02em;color:var(--fg);opacity:.95}.settings-panel .zgs-kv{display:grid;grid-template-columns:64px 1fr;gap:7px 12px;align-items:baseline;margin:0}.settings-panel .zgs-kv dt{font-size:11.5px;color:var(--fg-weak)}.settings-panel .zgs-kv dd{margin:0;font-size:12.5px;color:var(--fg);line-height:1.5;word-break:break-all}.settings-panel .zgs-kv dd.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px}.settings-panel .zgs-kv-url{word-break:break-all}.settings-panel .zgs-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--ok);margin-right:6px;vertical-align:1px}.settings-panel .zgs-dot.off{background:#7c7c85}.settings-panel .zgp-field{margin-bottom:13px}.settings-panel .zgp-field:last-child{margin-bottom:0}.settings-panel .zgp-lab{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.settings-panel .zgp-lab>span{font-size:12.5px;color:var(--fg)}.settings-panel .zgs-lab{display:block;font-size:11.5px;color:var(--fg-weak);margin:0 0 5px}.settings-panel .zgp-desc{font-size:11px;color:var(--fg-weak);margin-top:4px;line-height:1.5}.settings-panel .zgp-row{display:flex;gap:8px}.settings-panel .zgp-in,.settings-panel .zgp-sel{width:100%;box-sizing:border-box;height:34px;padding:0 12px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;outline:none}.settings-panel .zgp-sel{padding:0 9px}.settings-panel .zgp-in:focus,.settings-panel .zgp-sel:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.settings-panel .zgp-b{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:6px 14px;font-size:12.5px;font-weight:500;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;cursor:pointer}.settings-panel .zgp-b:hover{background:var(--bg-sunken);color:var(--fg)}.settings-panel .zgp-b:disabled{opacity:.5;cursor:not-allowed}.settings-panel .zgp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.settings-panel .zgp-b.primary:hover{filter:brightness(1.08);background:var(--accent)}.settings-panel .zgp-b.danger{color:var(--danger);border-color:#f3b8b8}.settings-panel .zgp-b.danger:hover{background:var(--danger-bg)}.settings-panel .zgp-sw{position:relative;display:inline-block;width:36px;height:20px;flex:0 0 36px}.settings-panel .zgp-sw input{opacity:0;width:0;height:0;position:absolute}.settings-panel .zgp-sw i{position:absolute;inset:0;background:#d0d7de;border-radius:999px;transition:.18s;cursor:pointer}.settings-panel .zgp-sw i:after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:var(--bg-card);box-shadow:0 1px 2px #0000002e;transition:.18s}.settings-panel .zgp-sw input:checked+i{background:var(--accent)}.settings-panel .zgp-sw input:checked+i:after{transform:translate(16px)}.settings-panel .zgp-sw input:disabled+i{opacity:.5;cursor:not-allowed}.settings-panel .zgp-drawer{padding:10px 12px;background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:8px}.zgs-mask{position:fixed;inset:0;z-index:99999;background:#00000052;display:flex;align-items:center;justify-content:center}.zgs-dlg{width:440px;max-width:92vw;padding:18px 20px 14px;background:var(--bg-card);color:var(--fg);border-radius:10px;box-shadow:0 16px 48px #00000038}.zgs-dlg-msg{font-size:12.5px;line-height:1.8;color:var(--fg-dim);word-break:break-word;white-space:normal}.zgs-dlg-in{margin-top:12px}.zgs-dlg-err{display:none;margin-top:9px;font-size:11.5px;line-height:1.5;color:var(--danger);background:#cf222e14;border-radius:6px;padding:6px 9px;word-break:break-all}.zgs-dlg-row{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.zgs-dlg .zgp-b{display:inline-flex;align-items:center;min-height:30px;padding:6px 14px;font-size:12.5px;font-weight:500;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;cursor:pointer}.zgs-dlg .zgp-b:hover{background:var(--bg-sunken);color:var(--fg)}.zgs-dlg .zgp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.zgs-dlg .zgp-b:disabled{opacity:.5;cursor:not-allowed}.zgs-dlg .zgp-in{width:100%;box-sizing:border-box;height:34px;padding:0 12px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;outline:none}.zgs-dlg .zgp-in:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.more-wrap{position:relative;display:inline-flex}.more-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:214px;background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:8px;box-shadow:0 8px 28px #1f232829,0 2px 6px #1f232814;padding:5px;z-index:9999}.more-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:7px 10px;font-size:13px;color:var(--fg);background:none;border:none;border-radius:5px;cursor:pointer;text-align:left;font-family:inherit;white-space:nowrap}.more-item:hover{background:var(--bg-subtle)}.more-kbd{font-size:11px;color:var(--fg-weak);font-family:Consolas,Menlo,monospace}.more-fontsize{padding:5px 10px 8px}.more-flabel{display:block;font-size:11px;color:var(--fg-weak);margin-bottom:6px}.more-seg{display:flex;gap:2px;background:var(--bg-subtle);border-radius:6px;padding:2px}.more-segbtn{flex:1;padding:4px 2px;font-size:11.5px;color:var(--fg-dim);background:none;border:none;border-radius:4px;cursor:pointer;font-family:inherit;white-space:nowrap}.more-segbtn:hover{color:var(--fg)}.more-segbtn.on{background:var(--bg-card);color:var(--accent);box-shadow:0 1px 2px #1f23281a}.more-divider{height:1px;background:#e3e6ea;margin:5px 8px}:root{--body-font-size: 14px;--body-line-height: 1.45}.editor-card [data-slate-editor],.editor-card p,.editor-card li,.editor-card td,.editor-card blockquote{font-size:var(--body-font-size)}.settings-panel .sp-seg{display:inline-flex;border:1px solid var(--bd);border-radius:6px;overflow:hidden}.settings-panel .sp-seg-b{padding:3px 14px;font-size:12.5px;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:none;border-right:1px solid var(--bd);cursor:pointer}.settings-panel .sp-seg-b:last-child{border-right:none}.settings-panel .sp-seg-b.on{background:var(--accent-bg);color:var(--accent);font-weight:600}.header .word-count{font-size:11.5px;color:var(--fg-mute);margin-right:6px;white-space:nowrap;user-select:none}.onboard-mask{position:fixed;inset:0;z-index:10500;display:flex;align-items:center;justify-content:center;background:#1f23284d}.onboard{width:520px;max-width:92vw;background:var(--bg-card);border-radius:12px;box-shadow:0 20px 60px #0000003d;overflow:hidden}.onboard .ob-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--bd-soft)}.onboard .ob-title{font-size:15px;font-weight:600;color:var(--fg)}.onboard .ob-step{font-size:11.5px;color:var(--fg-mute)}.onboard .ob-body{padding:18px 20px 8px;min-height:148px}.onboard .ob-lead{margin:0 0 14px;font-size:13px;line-height:1.7;color:var(--fg)}.onboard .ob-ws{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:8px}.onboard .ob-ws-icon{color:var(--fg-weak);display:inline-flex}.onboard .ob-ws-path{flex:1;min-width:0;font-size:12px;font-family:Consolas,monospace;color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.onboard .ob-hint{margin:10px 0 0;font-size:11.5px;line-height:1.7;color:var(--fg-weak)}.onboard .ob-list{margin:0;padding-left:18px;font-size:12.5px;line-height:2;color:var(--fg-dim)}.onboard .ob-list b{color:var(--fg);font-weight:600}.onboard .ob-acts{display:flex;align-items:center;gap:8px;padding:12px 20px 16px}.onboard .gp-b{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:5px 12px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;cursor:pointer}.onboard .gp-b:hover{background:var(--bg-sunken)}.onboard .gp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.onboard .gp-b:disabled{opacity:.45;cursor:default}.title-empty{font-size:13px;color:var(--fg-weak);padding-left:2px;user-select:none}.content:has(>.note-empty){position:relative}.note-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#b3bac2;user-select:none}.note-empty svg{opacity:.5;margin-bottom:6px}.note-empty-title{font-size:14px;color:var(--fg-weak)}.note-empty-desc{font-size:12.5px;color:#a8b0b8}.ai-mask{position:fixed;inset:0;z-index:10300;display:flex;align-items:flex-start;justify-content:center;padding:76px 20px 40px;background:#1f232842;backdrop-filter:blur(2px)}.ai-panel{width:600px;max-width:94vw;background:var(--bg-card);border:1px solid rgba(31,35,40,.06);border-radius:16px;box-shadow:0 24px 64px #0f172a38,0 2px 8px #0f172a14;overflow:hidden;animation:ai-in .18s cubic-bezier(.2,.8,.2,1)}@keyframes ai-in{0%{opacity:0;transform:translateY(-8px) scale(.985)}to{opacity:1;transform:none}}.ai-panel .ai-head{display:flex;align-items:center;gap:9px;padding:16px 18px 13px}.ai-panel .ai-spark{width:26px;height:26px;flex:0 0 26px;display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--accent);background:linear-gradient(135deg,#eef4ff,#e3ecff)}.ai-panel .ai-title{flex:1;min-width:0;font-size:14.5px;font-weight:600;letter-spacing:.1px;color:var(--fg)}.ai-panel .ai-close{width:28px;height:28px;flex:0 0 28px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:var(--fg-weak);border-radius:7px;cursor:pointer}.ai-panel .ai-close:hover{background:var(--bg-subtle);color:var(--fg)}.ai-panel .ai-modelrow{display:flex;align-items:center;gap:8px;padding:0 18px 12px}.ai-panel .ai-mlabel{flex:0 0 auto;font-size:11.5px;color:var(--fg-weak)}.ai-panel .ai-model{flex:0 1 250px;min-width:0;height:30px;padding:0 9px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:7px;outline:none;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}.ai-panel .ai-model:hover{background:#f2f4f7}.ai-panel .ai-model:focus{background:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px #2563eb1a}.ai-panel .ai-link{margin-left:auto;padding:4px 7px;font-size:11.5px;font-family:inherit;color:var(--accent);background:none;border:none;border-radius:5px;cursor:pointer;white-space:nowrap}.ai-panel .ai-link:hover{background:var(--accent-bg)}.ai-panel .ai-body{padding:0 18px}.ai-panel .ai-input{display:block;width:100%;box-sizing:border-box;min-height:168px;padding:13px 14px;font-size:13px;line-height:1.65;font-family:inherit;color:var(--fg);background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:11px;outline:none;resize:vertical;transition:background .15s,border-color .15s,box-shadow .15s}.ai-panel .ai-input::placeholder{color:var(--fg-weak)}.ai-panel .ai-input:focus{background:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px #2563eb1a}.ai-panel .ai-out{margin:10px 18px 0;padding:9px 12px;font-size:12.5px;color:var(--fg-dim);background:#f2f6ff;border-radius:8px}.ai-panel .ai-err{margin:10px 18px 0;padding:9px 12px;font-size:12px;line-height:1.6;color:var(--danger);background:var(--danger-bg);border-radius:8px}.ai-panel .ai-dialog-btns{display:flex;flex-wrap:wrap;gap:9px;padding:14px 18px 18px}.ai-panel .ai-preset-btn{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:7px 11px;font-size:12.5px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:11px;cursor:pointer;text-align:left;transition:border-color .15s,box-shadow .15s,transform .15s,background .15s}.ai-panel .ai-preset-btn:hover:not(:disabled){background:var(--bg-card);border-color:var(--accent);box-shadow:0 4px 14px #2563eb1a;transform:translateY(-1px)}.ai-panel .ai-preset-btn:active:not(:disabled){transform:translateY(0);box-shadow:none}.ai-panel .ai-preset-btn:disabled{opacity:.5;cursor:not-allowed}.ai-panel .ai-preset-ico{width:24px;height:24px;flex:0 0 24px;display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--accent);background:var(--accent-bg)}.ai-panel .ai-preset-ico svg{width:15px;height:15px}.ai-panel .ai-preset-txt{flex:0 0 auto;line-height:1.35;white-space:nowrap}.conflict-bar{flex:0 0 auto;display:flex;align-items:center;gap:8px;height:34px;padding:0 14px 0 12px;box-sizing:border-box;background:#fff8e5;border-bottom:1px solid #f0e0b4;color:#7a5c00;font-size:12px;line-height:1}.conflict-bar .cf-ico{flex:0 0 auto;color:#b8870b}.conflict-bar .cf-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.1px}.conflict-bar .cf-actions{flex:0 0 auto;display:flex;align-items:center;gap:8px}.conflict-bar .cf-btn{flex:0 0 auto;height:22px;padding:0 10px;font-size:11.5px;font-family:inherit;border:1px solid #e8d49a;border-radius:5px;background:var(--bg-card);color:#7a5c00;cursor:pointer;transition:background-color .12s,border-color .12s}.conflict-bar .cf-btn:hover{background:var(--warn-soft);border-color:var(--warn)}.conflict-bar .cf-btn:active{background:var(--warn-soft)}.conflict-bar .cf-btn.danger{color:var(--danger);border-color:#f0c4c4}.conflict-bar .cf-btn.danger:hover{background:var(--danger-bg);border-color:var(--danger)}.source-editor{width:100%;min-height:calc(100vh - 160px);box-sizing:border-box;padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--fg);font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;tab-size:4}.export-wrap{position:relative;display:inline-flex}.export-menu{position:absolute;top:30px;right:0;z-index:500;width:208px;padding:4px;background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:8px;box-shadow:0 10px 28px #1f232829}.export-item{display:block;width:100%;padding:6px 9px;text-align:left;border:none;background:none;border-radius:5px;cursor:pointer;font-family:inherit}.export-item:hover{background:var(--bg-subtle)}.export-lab{display:block;font-size:12.5px;color:var(--fg)}.export-hint{display:block;font-size:11px;color:var(--fg-mute);margin-top:1px}.export-spin{display:inline-block;width:13px;height:13px;border:1.6px solid #c8ced6;border-top-color:var(--accent);border-radius:50%;animation:export-spin .8s linear infinite}@keyframes export-spin{to{transform:rotate(360deg)}}.search-mask{position:fixed;inset:0;z-index:10100;display:flex;justify-content:center;padding-top:90px;background:#1f232833}.search-box{width:620px;max-width:92vw;max-height:62vh;display:flex;flex-direction:column;background:var(--bg-card);border-radius:10px;box-shadow:0 16px 48px #0003;overflow:hidden}.search-head{display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid var(--bd-soft)}.search-input{flex:1;min-width:0;padding:5px 9px;font-size:13px;font-family:inherit;color:var(--fg);border:1px solid var(--bd);border-radius:6px;outline:none}.search-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.search-count{flex:0 0 auto;font-size:11.5px;color:var(--fg-weak);min-width:44px;text-align:right}.search-scope{flex:0 0 auto;font-size:11.5px;padding:3px 8px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;cursor:pointer}.search-scope.on{background:var(--accent-bg);border-color:var(--accent-soft);color:var(--accent)}.search-list{flex:1;overflow-y:auto;padding:6px}.search-hit{display:block;width:100%;padding:7px 10px;text-align:left;border:none;background:none;border-radius:6px;cursor:pointer;font-family:inherit}.search-hit:hover{background:var(--bg-subtle)}.search-name{font-size:12.5px;font-weight:600;color:var(--fg);margin-right:6px}.search-badge{display:inline-block;font-size:10.5px;color:var(--accent);background:var(--accent-bg);border-radius:8px;padding:0 5px;line-height:15px;margin-right:6px}.search-snip{display:block;margin-top:2px;font-size:11.5px;color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-foot{padding:7px 12px;border-top:1px solid var(--bd-soft);font-size:11px;color:var(--fg-mute);background:var(--bg-subtle)}.editor-card pre.code-block .diagram-box{border-top:1px dashed var(--bd);padding:10px 12px;background:var(--bg-card);overflow-x:auto}.editor-card pre.code-block .diagram-canvas{display:flex;justify-content:center;min-height:40px}.editor-card pre.code-block .diagram-canvas svg{max-width:100%;height:auto}.editor-card pre.code-block .diagram-err{font-size:11.5px;color:var(--danger);background:var(--danger-bg);border-radius:4px;padding:4px 8px;margin-top:6px}.zctx{position:fixed;z-index:2147483000;min-width:158px;padding:4px;border-radius:8px;border:1px solid rgba(128,128,128,.28);background:var(--bg-card);color:var(--fg);box-shadow:0 8px 24px #0000002e;font-size:12.5px}.zctx button{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;border-radius:6px;background:transparent;color:inherit;font-size:12.5px;font-family:inherit;text-align:left;cursor:pointer;white-space:nowrap}.zctx button:hover{background:#80808029}.zctx button svg{width:14px;height:14px;flex:0 0 14px;fill:currentColor;opacity:.8}.zctx button.danger{color:var(--danger)}.zctx button.danger svg{fill:currentColor;opacity:.9}.zctx-sep{height:1px;margin:4px 6px;background:#80808038}.zdlg-mask{position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;background:#00000047}.zdlg-card{width:340px;max-width:86vw;padding:16px 18px 14px;border-radius:10px;background:var(--bg-card);color:var(--fg);font-size:13px;box-shadow:0 16px 40px #00000047}.zdlg-title{font-size:13.5px;font-weight:600;margin-bottom:10px}.zdlg-msg{font-size:12.5px;line-height:1.75;white-space:pre-wrap;word-break:break-word;margin-bottom:2px}.zdlg-input{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid rgba(128,128,128,.42);border-radius:6px;background:transparent;color:inherit;font-size:13px;font-family:inherit;outline:none}.zdlg-input:focus{border-color:var(--accent)}.zdlg-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.zdlg-btn{padding:6px 14px;border-radius:6px;border:1px solid rgba(128,128,128,.36);background:transparent;color:inherit;font-size:12.5px;font-family:inherit;cursor:pointer}.zdlg-btn:hover{background:#8080801a}.zdlg-btn.primary{background:#3f7ef7;border-color:var(--accent);color:var(--fg-on-strong)}.zdlg-btn.primary:hover{filter:brightness(1.06)}.zdlg-btn.primary.danger{background:var(--danger);border-color:var(--danger)}.zdlg-btn:disabled{opacity:.45;cursor:not-allowed}.editor-card .h1,.editor-card .h2{margin:0 0 1rem!important;line-height:1.68!important;position:relative!important;padding-bottom:.3em!important;border-bottom:0!important}.editor-card .h1:after,.editor-card .h2:after{content:""!important;position:absolute!important;bottom:0!important;left:0!important;width:100%!important;height:1px!important;background-color:var(--bg-sunken)!important}.editor-card .h3,.editor-card .h4,.editor-card .h5,.editor-card .h6{margin:0 0 1rem!important}.editor-card code>span,.editor-card code[data-slate-void]>span{padding:2px 4px!important;background-color:var(--code-inline-bg)!important;border-radius:3px!important}.editor-card .hr{display:flex!important;align-items:center;overflow:hidden;color:var(--fg-mute);margin:1rem 0!important;min-height:18px;user-select:none}.editor-card .hr:before,.editor-card .hr:after{content:""!important;flex:1;height:2px;background-color:var(--bg-sunken)}.editor-card .hr:before{margin-right:10px}.editor-card .hr:after{margin-left:10px}.editor-card table{width:100%!important;border-collapse:collapse;margin:0 0 1rem}.editor-card table tr{background-color:var(--bg-card);border-top:1px solid var(--table-bd)}.editor-card table tr:nth-child(2n){background-color:var(--bg-subtle)}.editor-card table th,.editor-card table td{padding:6px 13px;border:1px solid var(--table-bd)}.editor-card table th{font-weight:600}.editor-card .code-editor{position:relative}.editor-card .code-editor .code-head{position:absolute;top:0;left:0;right:0;height:0;overflow:visible;z-index:2}.editor-card .code-editor:hover .code-editor-copy{display:flex}.editor-card .code-editor .code-lang select{appearance:none;border:1px solid rgba(128,128,128,.3);border-radius:4px;background:var(--bg-card);color:var(--fg-dim);font-size:11px;font-family:inherit;padding:1px 6px;cursor:pointer;outline:none}.editor-card .code-editor .code-lang select:hover{border-color:#8080808c}.editor-card .code-editor .code-head{position:absolute!important;top:6px!important;right:8px!important;left:auto!important;height:auto!important;display:flex!important;align-items:center;gap:6px;overflow:visible!important;z-index:3;opacity:0;transition:opacity .12s}.editor-card .code-editor:hover .code-head{opacity:1}.editor-card .code-editor .code-lang,.editor-card .code-editor .code-lang select{position:static!important;top:auto!important;right:auto!important}.editor-card .code-editor .code-editor-copy{position:static!important;top:auto!important;right:auto!important;display:flex!important;align-items:center;padding:1px 7px;border:1px solid rgba(128,128,128,.3);border-radius:4px;background:var(--bg-card);color:var(--fg-dim);font-size:11px;font-family:inherit;cursor:pointer}.editor-card .code-editor .code-editor-copy:hover{border-color:#8080808c;color:var(--fg)}.editor-card .diagram-box{margin:8px 0 14px;padding:12px;border-radius:6px;background:var(--code-bg);border:1px solid var(--bd-soft);overflow:hidden}.editor-card .diagram-canvas{display:block;min-height:0}.editor-card .diagram-box svg{max-width:100%;height:auto}.editor-card .diagram-err{color:var(--danger);font-size:12px;font-family:Consolas,monospace;white-space:pre-wrap}.plate-host{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--editor-bg)}.plate-host>div{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg-card)}.plate-content{flex:1;min-height:0;overflow-y:auto;padding:20px 20px 60px;outline:none;color:var(--fg);font-size:var(--cmark-body-font-size, 14px);line-height:1.45;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;word-break:break-word;tab-size:4}.plate-content .p{margin:0 0 14px;min-height:1em}.plate-content .p:empty:before{content:"";display:inline-block}.plate-content ul,.plate-content ol{padding-left:28px;margin:0 0 14px}.plate-content li{margin-bottom:5px}.plate-content .li{list-style:inherit}.plate-content .task-list-item{list-style:none;display:flex;align-items:flex-start;gap:6px}.plate-content .task-list-checkbox{flex:0 0 auto;margin-top:3px}.plate-content .task-list-checkbox input{margin:0;cursor:pointer}.plate-content .code-editor{margin:0 0 14px;padding:12px;background:var(--code-bg);border:1px solid var(--code-border);border-radius:6px;font-family:Consolas,Courier New,monospace;font-size:12.6px;line-height:1.42;overflow-x:auto;color:var(--fg)}.plate-content .code-line{min-height:1.42em;white-space:pre-wrap}.plate-content .table{width:100%;border-collapse:collapse;margin:0 0 14px;table-layout:auto}.plate-content .table-row{background:var(--bg-card)}.plate-content .table-row:nth-child(2n){background:var(--bg-subtle)}.plate-content .table-cell{padding:6px 13px;border:1px solid var(--table-bd);position:relative;vertical-align:middle}.plate-content .table-cell.is-header{font-weight:600}.plate-content .block-img{margin:0 0 14px;text-align:center}.plate-content .block-img img{max-width:100%;height:auto;border-radius:4px}.plate-content .blockquote{margin:0 0 14px;padding:0 14px;color:var(--fg-mute);border-left:3px solid var(--bd-soft)}.plate-content .h1,.plate-content .h2{position:relative;padding-bottom:.3em;margin:0 0 14px;line-height:1.68;font-weight:600}.plate-content .h1{font-size:32px}.plate-content .h2{font-size:24px}.plate-content .h3{font-size:20px;margin:0 0 14px;font-weight:600}.plate-content .h4{font-size:16px;margin:0 0 14px;font-weight:600}.plate-content .h5{font-size:14px;margin:0 0 14px;font-weight:600}.plate-content .h6{font-size:12px;margin:0 0 14px;font-weight:600;color:var(--fg-mute)}.plate-content .h1:after,.plate-content .h2:after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;background:var(--bg-sunken)}.plate-content .hr{display:flex;align-items:center;margin:14px 0;min-height:18px;user-select:none}.plate-content .hr:before,.plate-content .hr:after{content:"";flex:1;height:2px;background:var(--bg-sunken)}.plate-content .hr:before{margin-right:10px}.plate-content .hr:after{margin-left:10px}.plate-content code{font-family:Consolas,Courier New,monospace;font-size:.85em;padding:2px 4px;background:var(--code-inline-bg);border-radius:3px}.plate-content mark{background:var(--mark-bg);color:var(--mark-fg);border-radius:3px;padding:0 2px;font-weight:500}.plate-content .link{color:var(--accent);text-decoration:none;cursor:pointer}.plate-content .link:hover{text-decoration:underline}.plate-host.is-locked .plate-content{caret-color:transparent}.plate-content .p.task-list-item{display:flex;align-items:flex-start;gap:6px;list-style:none}.plate-content .p.task-list-item .task-list-checkbox{flex:0 0 auto;margin-top:3px}.plate-content .p.task-list-item .task-list-checkbox input{margin:0;cursor:pointer}.plate-content .task-list-text{flex:1;min-width:0}.plate-content .p.task-checked .task-list-text{color:var(--fg-weak);text-decoration:line-through}.plate-content .math-leaf{margin:0 0 14px;text-align:center}.plate-content .math-render .katex-display{margin:0}.plate-content .code-block-wrap{margin:0 0 14px}.plate-content .code-block-wrap>.code-editor{margin:0}.plate-content .code-block-wrap .diagram-box{margin-top:8px;padding:12px;border-radius:6px;background:var(--code-bg);border:1px solid var(--bd-soft);overflow:hidden}.plate-content .diagram-canvas{display:block}.plate-content .diagram-box svg{max-width:100%;height:auto}.plate-content .diagram-err{margin-top:6px;color:var(--danger);font-size:12px;font-family:Consolas,monospace;white-space:pre-wrap}.toast{position:fixed;left:50%;bottom:36px;transform:translate(-50%);z-index:100002;max-width:70vw;padding:9px 18px;border-radius:8px;background:#1f2328;color:var(--fg-on-strong);font-size:12.5px;line-height:1.5;box-shadow:0 6px 24px #0000004d;pointer-events:none;animation:cmark-toast-in .22s ease-out}@keyframes cmark-toast-in{0%{opacity:0;transform:translate(-50%) translateY(12px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.search-hl{background:var(--mark-bg);color:var(--mark-fg);border-radius:2px;padding:0 1px}.search-hit-mark{background:var(--mark-bg);color:var(--mark-fg);border-radius:2px;box-shadow:0 0 0 1px #ffd50080}.plate-content .ul,.plate-content .ol{padding-left:28px;margin:0 0 14px}.plate-host.is-source{flex:1;min-height:0;padding:20px;box-sizing:border-box;overflow-y:auto}.plate-host.is-source .source-editor{flex:1;width:100%;min-height:calc(100vh - 200px);padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--fg);font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;tab-size:2;white-space:pre-wrap;word-break:break-word}.app{display:flex;flex-direction:row}.tree-collapse-fab{position:absolute;right:10px;bottom:58px;z-index:12;display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid rgba(128,128,128,.3);border-radius:50%;background:#fffffff5;color:var(--fg-dim);box-shadow:0 2px 8px #00000024;cursor:pointer;opacity:.5;transition:background .12s,color .12s,box-shadow .12s,opacity .12s}.tree-collapse-fab:hover{background:var(--bg-card);color:var(--fg);opacity:1;box-shadow:0 3px 12px #0003}.tree-collapse-fab:active{transform:translateY(1px)}.tree .row{position:relative}.tree .row .row-actions-slot{position:absolute;right:1px;top:0;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:1px;z-index:3}.tree .row .row-actions{display:flex;align-items:center;gap:1px}.tree .row .row-actions button{display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;line-height:1;border:none;border-radius:4px;background:transparent;color:#6b7280;cursor:pointer;opacity:.75;transition:background .1s,color .1s,opacity .1s}.tree .row .row-actions button:hover{background:#80808033;color:var(--fg);opacity:1}.plate-content .table-wrap{position:relative;margin:0 0 14px}.plate-content .table-wrap>.table{margin:0}.table-toolbar{position:absolute;top:-30px;left:0;z-index:20;display:flex;align-items:center;gap:1px;padding:3px;border-radius:6px;background:var(--bg-card);border:1px solid rgba(128,128,128,.28);box-shadow:0 3px 12px #00000024}.table-toolbar .tt-btn{display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--fg-dim);cursor:pointer}.table-toolbar .tt-btn:hover{background:#80808029;color:var(--fg)}.table-toolbar .tt-btn.danger{color:var(--danger)}.table-toolbar .tt-btn.danger:hover{background:#cf222e1a}.table-float-toolbar button{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;padding:0!important}.table-float-toolbar button svg{width:15px!important;height:15px!important}.plate-content table.table>caption.table-caption[hidden]{display:none}.table-caption .tc-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;padding:0;margin:0;border:none;background:transparent;color:var(--fg-dim);cursor:pointer;vertical-align:middle;border-radius:0}.table-caption .tc-btn svg{width:15px;height:15px}.table-caption .tc-btn:hover{background:#8080802e;color:var(--fg)}.table-caption .tc-btn.danger:hover{color:var(--danger);background:#cf222e1a}.plate-content table.table>caption.table-caption{line-height:0;padding:2px 0 0 2px}.plate-content table.table>caption.table-caption>button{margin-left:0}.plate-content table.table>caption.table-caption>span{margin:0;width:0;height:16px;display:inline-flex;align-items:center;align-self:center;flex:0 0 0;position:relative}.plate-content table.table>caption.table-caption>span:after{top:50%;transform:translateY(-50%);height:14px}.code-block-wrap .code-head{position:absolute;top:6px;right:8px;display:flex;align-items:center;gap:6px;padding:2px 6px;font-size:11px;line-height:1;color:#6b7280;background:#f6f8faeb;border-radius:4px;user-select:none;z-index:3;opacity:.85}.code-block-wrap:hover .code-head{opacity:1;background:var(--bg-sunken)}.code-block-wrap pre.code-editor{padding-right:76px}.code-block-wrap .code-lang{letter-spacing:.2px}.code-block-wrap .code-copy{padding:0;border:none;background:transparent;color:var(--fg-weak);font-size:11px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s}.code-block-wrap:hover .code-copy{opacity:1}.code-block-wrap .code-copy:hover{color:var(--accent)}.block-img.is-broken{display:flex;align-items:center;justify-content:center;min-height:64px;margin:0 0 14px;padding:12px;border:1px dashed var(--bd);border-radius:4px;background:var(--bg-subtle)}.block-img .img-missing{font-size:12px;color:var(--fg-weak);word-break:break-all}.code-editor .token.comment,.code-editor .token.prolog,.code-editor .token.doctype,.code-editor .token.cdata{color:var(--fg-mute)}.code-editor .token.punctuation{color:var(--code-punc)}.code-editor .token.property,.code-editor .token.tag,.code-editor .token.boolean,.code-editor .token.number,.code-editor .token.constant,.code-editor .token.symbol,.code-editor .token.deleted{color:var(--code-number)}.code-editor .token.selector,.code-editor .token.attr-name,.code-editor .token.string,.code-editor .token.char,.code-editor .token.builtin,.code-editor .token.inserted{color:var(--code-string)}.code-editor .token.operator,.code-editor .token.entity,.code-editor .token.url,.code-editor .language-css .token.string,.code-editor .style .token.string{color:var(--code-keyword)}.code-editor .token.atrule,.code-editor .token.attr-value,.code-editor .token.keyword{color:var(--code-keyword);font-weight:600}.code-editor .token.function,.code-editor .token.class-name{color:var(--code-function)}.code-editor .token.regex,.code-editor .token.important,.code-editor .token.variable{color:var(--code-variable)}.code-editor[data-lang=mermaid] .token,.code-editor[data-lang=echarts] .token{color:inherit;font-weight:400}.code-editor .code-line,.code-block-wrap .code-line{padding:0;margin:0}.code-block-wrap .code-lang{position:absolute;z-index:2;right:44px;top:14px;height:26px;padding:0 9px;display:none;align-items:center;justify-content:center;box-sizing:border-box;background-color:var(--bg-card);border:1px solid var(--line);border-radius:4px;font-size:11px;line-height:24px;font-family:inherit;color:var(--fg);white-space:nowrap;word-break:keep-all;cursor:pointer;user-select:none;outline:none}.code-block-wrap:hover .code-lang,.code-block-wrap:focus-within .code-lang,.code-block-wrap.is-lang-open .code-lang{display:inline-flex}.code-block-wrap .code-lang:hover{border-color:var(--bd);color:var(--fg)}.code-block-wrap .code-lang:disabled,.code-block-wrap .code-lang.is-locked{color:var(--fg-weak);border-color:#f0f0f0;background-color:var(--code-bg);cursor:default;pointer-events:none}.code-lang-list{position:fixed;z-index:9999;box-sizing:border-box;width:150px;max-height:200px;overflow-x:hidden;overflow-y:auto;padding:2px 0;font-size:12px;background-color:var(--code-bg);border:1px solid var(--line);border-radius:4px;box-shadow:0 4px 14px #0000001a;user-select:none}.code-lang-list .code-lang-item{cursor:pointer;padding:3px 8px;box-sizing:border-box;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.code-lang-list .code-lang-item:hover,.code-lang-list .code-lang-item.on{background-color:#1976d214}.code-lang-list::-webkit-scrollbar{width:8px}.code-lang-list::-webkit-scrollbar-thumb{background:#00000029;border-radius:4px}.code-block-wrap .code-editor-copy{position:absolute;top:-12px;right:0;z-index:2;display:flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:24px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--fg-weak);cursor:pointer;opacity:0;transition:opacity .14s,background-color .14s,color .14s}.code-block-wrap:hover .code-editor-copy,.code-block-wrap.active .code-editor-copy{opacity:1}.code-block-wrap .code-editor-copy:hover{background:#0000000f;color:var(--fg-dim)}.void-wrap{padding-top:10px;padding-bottom:10px;cursor:text}.code-block-wrap.void-wrap{padding-top:6px;padding-bottom:10px}.block-img.void-wrap,.hr.void-wrap{padding-top:10px;padding-bottom:10px}.void-wrap{position:relative}.void-gap{position:absolute;left:0;right:0;height:10px;z-index:1;cursor:text}.void-gap-top{top:0}.void-gap-bottom{bottom:0}.void-gap:before{content:"";position:absolute;left:0;right:0;height:2px;border-radius:1px;background-color:var(--insert-line);opacity:0;transition:opacity .1s ease}.void-gap-top:before{top:4px}.void-gap-bottom:before{bottom:4px}.void-gap:hover:before{opacity:1}.void-wrap.is-locked .void-gap:hover:before{opacity:0}.plate-host.is-source{display:flex;flex-direction:row;align-items:stretch}.plate-host.is-source .source-gutter{flex:0 0 auto;padding:0 6px 0 0;box-sizing:border-box;overflow:hidden;text-align:right;user-select:none;font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;color:#b8bec6;background:transparent}.source-gutter-inner{will-change:transform}.source-ln{line-height:1.65;font-size:13px;white-space:nowrap}.plate-host.is-source .source-editor{padding-left:10px;border-left:1px solid #eceff2}.math-leaf{position:relative;cursor:pointer}.math-leaf:hover .math-render{background:#00000005;border-radius:4px}.block-img{position:relative}.block-img img{cursor:pointer}.img-tools{position:absolute;z-index:60;top:8px;left:8px;display:flex;align-items:center;gap:6px;padding:6px 8px;background:#fffffff7;border:1px solid var(--bd);border-radius:7px;box-shadow:0 6px 20px #00000024}.img-tools-input{width:180px;height:24px;padding:0 8px;box-sizing:border-box;border:1px solid var(--bd);border-radius:5px;outline:none;font-size:12px;font-family:inherit;color:var(--fg)}.img-tools-input:focus{border-color:#0969da}.img-tools-btn{height:24px;padding:0 10px;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);font-size:12px;font-family:inherit;color:var(--fg);cursor:pointer;white-space:nowrap}.img-tools-btn:hover{background:var(--bg-subtle)}.img-tools-btn.danger{color:var(--danger);border-color:#f0c4c4}.img-tools-btn.danger:hover{background:var(--danger-bg)}.editor-card .block-img .img-zoom,.editor-card .inline-img .img-zoom{display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;background:#0003;backdrop-filter:blur(12px) saturate(1.15);border:0;border-radius:6px}.editor-card .img-zoom-range{width:76px;height:14px;margin:0;cursor:pointer;accent-color:#ffffff}.editor-card .img-zoom-val{font-size:11px;line-height:1;color:#ffffffe6;min-width:32px;text-align:right;font-variant-numeric:tabular-nums;user-select:none}:root[data-theme=dark] .code-mermaid-render svg .node rect,:root[data-theme=dark] .code-mermaid-render svg .node polygon,:root[data-theme=dark] .code-mermaid-render svg .node circle,:root[data-theme=dark] .code-mermaid-render svg .node ellipse,:root[data-theme=dark] .code-mermaid-render svg .actor{fill:#21262d!important;stroke:#58a6ff!important}:root[data-theme=dark] .code-mermaid-render svg text,:root[data-theme=dark] .code-mermaid-render svg .nodeLabel,:root[data-theme=dark] .code-mermaid-render svg .label,:root[data-theme=dark] .code-mermaid-render svg tspan{fill:#e6edf3!important;color:#e6edf3!important}:root[data-theme=dark] .code-mermaid-render svg .edgePath path,:root[data-theme=dark] .code-mermaid-render svg path.flowchart-link,:root[data-theme=dark] .code-mermaid-render svg .messageLine0,:root[data-theme=dark] .code-mermaid-render svg .messageLine1,:root[data-theme=dark] .code-mermaid-render svg .relation,:root[data-theme=dark] .code-mermaid-render svg line{stroke:#8b949e!important}:root[data-theme=dark] .code-mermaid-render svg marker path,:root[data-theme=dark] .code-mermaid-render svg .arrowheadPath,:root[data-theme=dark] .code-mermaid-render svg .marker{fill:#8b949e!important;stroke:#8b949e!important}:root[data-theme=dark] .code-mermaid-render svg .edgeLabel rect,:root[data-theme=dark] .code-mermaid-render svg .cluster rect,:root[data-theme=dark] .code-mermaid-render svg .note{fill:#161b22!important;stroke:#30363d!important}:root[data-theme=dark] .code-mermaid-render svg .cluster span,:root[data-theme=dark] .code-mermaid-render svg .cluster-label text{fill:#9aa4b2!important}.code-editor.is-source-hidden{display:none}.diagram-box{position:relative;text-align:center;display:flex;justify-content:center}.diagram-canvas{position:relative;display:inline-block;max-width:100%;text-align:center}.diagram-canvas.is-full{display:block;width:100%}.diagram-canvas.is-full>svg,.diagram-canvas.is-full .diagram-box>svg{width:100%}.diagram-canvas>svg,.diagram-box>svg,.code-mermaid-render svg{display:block;margin:0 auto;max-width:100%}.diagram-canvas>div{display:block}.diagram-code-toggle{position:absolute;top:6px;right:8px;z-index:4;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--bd-soft);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);line-height:1;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .15s,background .15s,color .15s,border-color .15s;box-shadow:0 1px 4px #0000002e}.diagram-code-toggle.is-on{opacity:1;pointer-events:auto;color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}.diagram-box:hover .diagram-code-toggle,.code-block-wrap:hover .diagram-code-toggle,.diagram-code-toggle:focus-visible{opacity:1;pointer-events:auto}.diagram-box:hover .diagram-code-toggle.is-on{color:var(--accent);background:var(--accent-soft)}.diagram-code-toggle:hover{background:var(--bg-hover);color:var(--fg);border-color:var(--accent)}.code-block-wrap .diagram-box .diagram-code-toggle+*{margin-top:0}.editor-card table th,.plate-content .table-cell[data-header=true]{background:var(--bg-subtle);font-weight:600}.math-canvas{position:relative;display:inline-block;max-width:100%;text-align:center}.math-toggle{position:absolute;top:-9px;right:-8px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s,background .12s,color .12s,border-color .12s;box-shadow:0 1px 4px #0000002e}.math-canvas:hover .math-toggle,.math-toggle:focus-visible{opacity:1;pointer-events:auto}.math-toggle:hover{background:var(--accent);border-color:var(--accent);color:#fff}.math-source{display:block;width:100%;min-width:260px;max-width:100%;box-sizing:border-box;margin:8px 0 0;padding:8px 10px;border:1px solid var(--bd);border-radius:6px;background:var(--code-bg);color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.55;text-align:left;resize:vertical;outline:none}.math-source:focus{border-color:var(--accent)}.math-leaf.is-editing .math-render{opacity:.55}.editor-card table tr:first-child td,.plate-content .table tr:first-child .table-cell{background:var(--table-row-base);font-weight:600}.editor-card table th{background:var(--table-head-bg);border-bottom:2px solid var(--table-head-bd);color:var(--fg-strong);letter-spacing:.01em}.eq-mask{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;background:#0000006b;animation:eq-fade .12s ease}@keyframes eq-fade{0%{opacity:0}to{opacity:1}}.eq-dialog{width:560px;max-width:calc(100vw - 48px);max-height:calc(100vh - 80px);display:flex;flex-direction:column;background:var(--bg-card);border:1px solid var(--bd);border-radius:10px;box-shadow:0 16px 48px #00000061;overflow:hidden}.eq-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--bd-soft)}.eq-title{font-size:13px;font-weight:600;color:var(--fg)}.eq-x{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--fg-dim);cursor:pointer}.eq-x:hover{background:var(--bg-hover);color:var(--fg)}.eq-preview{position:relative;min-height:78px;margin:12px 14px 0;padding:14px 16px;display:flex;align-items:center;justify-content:center;background:var(--code-bg);border:1px solid var(--bd-soft);border-radius:8px;color:var(--fg);overflow-x:auto}.eq-preview .katex-display{margin:0}.eq-empty{position:absolute;font-size:12px;color:var(--fg-weak);pointer-events:none}.eq-input{display:block;box-sizing:border-box;width:calc(100% - 28px);min-height:92px;margin:10px 14px 0;padding:10px 12px;background:var(--code-bg);border:1px solid var(--bd);border-radius:8px;color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.6;resize:vertical;outline:none}.eq-input:focus{border-color:var(--accent)}.eq-foot{display:flex;align-items:center;gap:8px;padding:12px 14px}.eq-hint{margin-right:auto;font-size:11.5px;color:var(--fg-weak)}.eq-btn{height:28px;padding:0 14px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg);font-family:inherit;font-size:12.5px;cursor:pointer}.eq-btn:hover{background:var(--bg-hover)}.eq-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.eq-btn.primary:hover{filter:brightness(1.08)}.math-inline{position:relative;display:inline-block}.math-inline-toggle{position:absolute;top:-15px;right:-7px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;padding:0;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s,background .12s,color .12s}.math-inline:hover .math-inline-toggle,.math-inline-toggle:focus-visible{opacity:1;pointer-events:auto}.math-inline-toggle:hover{background:var(--accent);border-color:var(--accent);color:#fff}.table-code-panel{position:absolute;top:calc(100% + 2px);left:0;right:0;width:auto;z-index:50;border-color:var(--table-bd);display:flex;flex-direction:column;max-height:300px;background:var(--bg-card);border:1px solid var(--bd);border-radius:8px;box-shadow:0 12px 32px #0000004d;overflow:hidden}.table-code-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-bottom:1px solid var(--bd-soft);font-size:11.5px;color:var(--fg-dim)}.table-code-acts{display:inline-flex;gap:6px}.tcp-btn{height:22px;padding:0 8px;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;font-size:11px;cursor:pointer}.tcp-btn:hover{background:var(--bg-hover);color:var(--fg)}.table-code-body{display:block;box-sizing:border-box;width:100%;min-height:72px;max-height:60vh;margin:0;padding:10px 12px;border:none;outline:none;resize:none;background:var(--code-bg);color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12px;line-height:1.6;white-space:pre;overflow:auto}.table-code-err{padding:6px 12px 8px;color:var(--danger);font-size:11.5px}.tcp-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.tcp-btn.primary:hover{filter:brightness(1.08)}.tcp-btn:disabled{opacity:.45;cursor:default;filter:none}:is(.table-caption,.table-sticky-bar) .tc-btn.tc-right-first,.tc-btn.tc-right-first{margin-left:auto}.tc-btn.tc-right{margin-left:0;margin-right:0}.editor-card table tr:nth-child(odd) td,.plate-content .table tr:nth-child(odd) .table-cell{background:var(--table-row-base)}.editor-card table tr:nth-child(2n) td,.plate-content .table tr:nth-child(2n) .table-cell{background:var(--table-row-alt)}.editor-card table td .p,.editor-card table th .p,.editor-card table td>p,.editor-card table th>p,.plate-content .table-cell .p,.plate-content .table-cell>p{margin:0;line-height:1.55}.editor-card table td,.editor-card table th,.plate-content .table-cell{vertical-align:middle}.table-wrap{padding-top:10px}.table-sticky-bar.is-hidden{display:none}.table-sticky-bar.is-active{background:var(--bg-subtle)}.table-sticky-bar.is-pinned{z-index:40;box-shadow:0 2px 8px #0000002e}.table-sticky-bar{position:absolute;top:-20px;left:0;right:0;z-index:25;display:flex;align-items:center;height:30px;margin-bottom:2px;box-sizing:border-box;background:var(--bg-sunken);border-radius:6px 6px 0 0;box-shadow:0 1px 0 var(--bd-soft);user-select:none}.slate-editor.plate-content{overflow:visible}:is(.table-caption,.table-sticky-bar) .tc-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;padding:0;margin:0;border:none;background:transparent;color:var(--fg-dim);cursor:pointer;border-radius:4px}:is(.table-caption,.table-sticky-bar) .tc-btn svg{width:15px;height:15px}:is(.table-caption,.table-sticky-bar) .tc-btn:hover{background:#8080802e;color:var(--fg)}:is(.table-caption,.table-sticky-bar) .tc-btn.danger:hover{color:var(--danger);background:#cf222e1a}.table-sticky-bar>span,.editor-card table caption>span{display:block;position:static;width:1px;min-width:1px;height:16px;min-height:16px;max-height:16px;margin:0 5px;padding:0;align-self:center;flex:0 0 1px;background-color:var(--bd);overflow:hidden}.table-sticky-bar>span:after,.editor-card table caption>span:after{content:none;display:none}.tc-btn.is-dirty{color:var(--accent)}.tc-btn.is-dirty:hover{background:var(--accent-soft);color:var(--accent)}.tc-btn.is-on{color:var(--accent);background:var(--accent-soft)}.table-code-panel{padding:0}.table-code-body{border-radius:8px}.table-wrap.is-bar-open .void-gap:before{opacity:0!important}.code-block-wrap{position:relative}.code-block-wrap>.code-editor-copy{position:absolute;top:14px;right:10px;display:none;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--bd-soft);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;z-index:4}.code-block-wrap:hover>.code-editor-copy,.code-block-wrap:focus-within>.code-editor-copy,.code-block-wrap.is-lang-open>.code-editor-copy{display:inline-flex}.code-block-wrap>.code-editor-copy:hover{color:var(--accent);border-color:var(--accent)}.code-block-wrap>.code-editor-copy>svg{width:15px;height:15px;color:inherit}.code-block-wrap.is-source-hidden>.code-editor-copy,.code-block-wrap.is-source-hidden>.code-lang{display:none!important}.code-lang-list .code-lang-item:hover{background-color:var(--accent-soft);color:var(--accent)}.code-lang-list .code-lang-item.on{background-color:var(--accent-soft);color:var(--accent);font-weight:500;box-shadow:inset 2px 0 0 var(--accent)}[data-theme=dark] .code-lang-list .code-lang-item:hover{background-color:#58a6ff38;color:#b6e3ff}[data-theme=dark] .code-lang-list .code-lang-item.on{background-color:#58a6ff29;color:#8ed0ff;box-shadow:inset 2px 0 #58a6ff}[data-theme=dark] .code-lang-list{border-color:#3d444d;box-shadow:0 8px 24px #0000008c}[data-theme=dark] .sidebar{border-right-color:#1b2129;box-shadow:inset -14px 0 20px -16px #000000a6}[data-theme=dark] .plate-host{box-shadow:inset 0 1px #ffffff09}[data-theme=dark] .main{border-top-color:#1b2129}[data-theme=dark] ::-webkit-scrollbar{width:10px;height:10px}[data-theme=dark] ::-webkit-scrollbar-track{background:transparent}[data-theme=dark] ::-webkit-scrollbar-thumb{background:#2b333d;border:2px solid transparent;border-radius:6px;background-clip:padding-box}[data-theme=dark] ::-webkit-scrollbar-thumb:hover{background:#3d4650;background-clip:padding-box}[data-theme=dark] ::-webkit-scrollbar-corner{background:transparent}.sidebar .row:not(.active):hover,.sidebar .iconbtn:not(.on):hover,.sidebar .footer button:hover,.sidebar .tree-collapse-fab:hover,.branch-bar .zbb-btn:hover,.branch-bar .zbb-branch:hover,.header .iconbtn:not(.on):hover,.tb-btn:not(.on):hover{background:var(--accent-soft);color:var(--accent)}.sidebar .row:not(.active):hover svg,.sidebar .iconbtn:not(.on):hover svg,.sidebar .footer button:hover svg,.branch-bar .zbb-btn:hover svg,.branch-bar .zbb-branch:hover svg,.header .iconbtn:not(.on):hover svg,.tb-btn:not(.on):hover svg{color:currentColor}[data-theme=dark] .branch-bar .zbb-btn:hover svg,[data-theme=dark] .branch-bar .zbb-branch:hover svg{color:#b6e3ff}[data-theme=dark] .branch-bar .zbb-branch:hover .zbb-bname{color:#b6e3ff}.branch-bar .zbb-branch:hover .zbb-bname{color:var(--accent)}.tree .row .row-actions button:hover{background:#58a6ff4d;color:var(--accent)}[data-theme=dark] .tree .row .row-actions button:hover{background:#58a6ff61;color:#d6efff}.zgp-b:not(.primary):not(.danger):hover,.gp-close:hover,.zgp-close:hover,.zgp-file:hover,.zgp-cm:hover,.zgp-cmf:hover,.zgp-jumpbar button:hover,.zgp-ic:hover{background:var(--hover-bg);color:var(--hover-fg)}.zgp-tab:hover,.zgs-tab:hover{color:var(--hover-fg);background:var(--hover-bg)}.zgp-pane .more-segbtn:hover,.zgp-pane .zgs-seg button:hover,.zgp-chip:hover,.zgp-pane .zgs-kv button:hover{background:var(--hover-bg);color:var(--hover-fg)}.settings-panel .zgp-drawer.open,#zgs-root .zgp-drawer.open{max-height:6000px}#zgs-body{padding-bottom:28px}.app-toast{position:fixed;left:50%;bottom:34px;transform:translate(-50%);z-index:100002;max-width:min(520px,86vw);padding:9px 16px;border-radius:9px;background:#1f2328f5;color:#f0f6fc;font-size:12.5px;line-height:1.5;box-shadow:0 8px 26px #00000061;pointer-events:none;animation:app-toast-in .18s cubic-bezier(.2,.8,.2,1)}.app-toast.err{background:#7a2024f5}@keyframes app-toast-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.row.drop-before{box-shadow:inset 0 2px 0 var(--accent, #0969da)}.row.drop-after{box-shadow:inset 0 -2px 0 var(--accent, #0969da)}.row.drop-inside{background:var(--accent-soft, rgba(9, 105, 218, .14))!important;box-shadow:inset 0 0 0 1px var(--accent, #0969da)}.row.dragging{opacity:.45} diff --git a/plugins/cmark/assets/index-eB_q_VA3.css b/plugins/cmark/assets/index-eB_q_VA3.css deleted file mode 100644 index dcf2226b6..000000000 --- a/plugins/cmark/assets/index-eB_q_VA3.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}:root{--sb-bg: #f6f8fa;--sb-border: #d8dee4;--work-bg: #eaeef2;--card-bg: #ffffff;--editor-bg: #ffffff;--hover-bg: var(--accent-soft);--hover-fg: var(--accent);--fg: #212121;--fg-dim: #57606a;--fg-weak: #6e7781;--line: #d8dee4;--accent: #0969da;--danger: #d32f2f;--bg-card: #ffffff;--bg-subtle: #f6f8fa;--bg-sunken: #eef1f4;--fg-strong: #111111;--fg-mute: #8b949e;--fg-on-strong: #ffffff;--bd: #d0d7de;--bd-soft: #e4e8ec;--accent-bg: #f0f7ff;--ok: #1a7f37;--danger-bg: #ffebe9;--warn-bg: #fff8c5;--bg-hover: #eef1f4;--accent-soft: #ddf4ff;--accent-strong: #0550ae;--warn-soft: #fff8c5;--warn: #bf8700;--fg-icon: #666666;--table-bd: #d0d7de;--insert-line: rgba(33, 33, 33, .28);--table-head-bg: #eef1f5;--table-row-base: #f2f4f7;--table-row-alt: #ffffff;--table-head-bd: #b0b9c3;--code-bg: #f6f8fa;--code-border: #e3e7ec;--code-inline-bg: rgba(27, 31, 35, .05);--mark-bg: #fff3b8;--mark-fg: #6b4a00;--code-punc: #24292e;--code-keyword: #cf222e;--code-string: #032f62;--code-number: #005cc5;--code-function: #6f42c1;--code-variable: #953800;--code-comment: #6e7781;--code-tag: #22863a;color-scheme:light}:root[data-theme=dark]{--sb-bg: #0d1117;--sb-border: #1b2129;--work-bg: #161b22;--editor-bg: #1c2128;--hover-bg: rgba(88, 166, 255, .22);--hover-fg: #b6e3ff;--card-bg: #22272e;--fg: #e6edf3;--fg-dim: #b1bac4;--fg-weak: #a3adb9;--line: #30363d;--accent: #58a6ff;--danger: #f85149;--bg-card: #22272e;--bg-subtle: #262c36;--bg-sunken: #1b2129;--fg-strong: #f0f6fc;--fg-mute: #7d8590;--fg-on-strong: #ffffff;--bd: #30363d;--bd-soft: #262c36;--accent-bg: #12233d;--ok: #3fb950;--danger-bg: #2d1214;--warn-bg: #3a2d00;--bg-hover: #22272e;--accent-soft: #1f2d42;--accent-strong: #8fbcff;--warn-soft: #3a2d00;--warn: #d29922;--fg-icon: #b9c1cc;--table-bd: #5a6472;--insert-line: #58a6ff;--table-head-bg: #000000;--table-row-base: #0d1117;--table-row-alt: #262c36;--table-head-bd: #8b95a1;--code-bg: #0d1117;--code-border: #3d444d;--code-inline-bg: rgba(110, 118, 129, .24);--mark-bg: #6b5200;--mark-fg: #ffe08a;--code-punc: #c9d1d9;--code-keyword: #ff7b72;--code-string: #a5d6ff;--code-number: #79c0ff;--code-function: #d2a8ff;--code-variable: #ffa657;--code-comment: #8b949e;--code-tag: #7ee787;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--card-bg);color:var(--fg);font:14px/1.45 system-ui,-apple-system,Segoe UI,Microsoft YaHei,sans-serif;overflow:hidden;-webkit-font-smoothing:antialiased}.app{display:flex;height:100%}.sidebar{position:relative;width:200px;flex:0 0 200px;background:var(--sb-bg);border-right:1px solid var(--sb-border);display:flex;flex-direction:column;min-height:0;user-select:none}.branchbar{height:36px;flex:0 0 36px;display:flex;align-items:center;gap:2px;padding:0 6px 0 8px;border-bottom:1px solid var(--sb-border);overflow:hidden}.branchbar .bname{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 6px;border-radius:5px;font-size:12px;color:#444;cursor:pointer;max-width:88px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.branchbar .bname:hover{background:var(--work-bg)}.branchbar .spacer{flex:1}.branchbar .bbtn{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:5px;cursor:pointer;color:var(--fg-dim);padding:0}.branchbar .bbtn:hover{background:var(--work-bg);color:var(--fg-strong)}.branchbar .bbtn:disabled{opacity:.35;cursor:default;background:none}.branchbar .dirty{width:5px;height:5px;border-radius:50%;background:#ef8f2f;flex:0 0 5px}.tree{flex:1;overflow:auto;padding:4px 0;min-height:0}.tree-empty{padding:20px 12px;color:var(--fg-dim);font-size:12.5px;line-height:1.6}.row{position:relative;display:flex;align-items:center;height:28px;margin:1px 6px;padding-right:6px;border-radius:6px;cursor:pointer;white-space:nowrap;overflow:hidden;transition:background .12s ease}.row:hover{background:var(--bg-hover)}.row.active{background:var(--accent-soft)}.row.active:before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:2px;border-radius:2px;background:var(--accent)}.row.active .label{color:var(--accent-strong)}.row .caret{width:18px;flex:0 0 18px;display:inline-flex;align-items:center;justify-content:center;color:var(--fg)}.row .caret svg{display:block}.row .label{font-size:13px;overflow:hidden;text-overflow:ellipsis;color:var(--fg)}.row .lock{margin-left:auto;color:var(--fg-weak);font-size:11px;flex:0 0 auto}.footer{height:43px;flex:0 0 43px;border-top:1px solid var(--sb-border);display:flex;align-items:center;padding:0 8px}.footer button{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 8px;border:0;background:none;border-radius:5px;color:var(--fg-dim);font-size:12.5px;cursor:pointer}.footer button:hover{background:var(--work-bg);color:var(--fg-strong)}.main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--work-bg)}.header{height:40px;flex:0 0 40px;display:flex;align-items:center;gap:6px;padding:0 8px;border-bottom:1px solid var(--line);background:var(--card-bg)}.header .menu-toggle{display:inline-flex;align-items:center}.header .title{flex:1;min-width:0}.header .title input{width:100%;border:0;background:none;font:inherit;font-size:14px;color:var(--fg);padding:4px 2px;outline:none;cursor:default}.header .handle{display:flex;align-items:center;gap:2px;flex:0 0 auto}.iconbtn{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:5px;color:var(--fg-icon);cursor:pointer;padding:0}.iconbtn:hover{background:var(--bg-sunken);color:var(--fg-strong)}.iconbtn:disabled{opacity:.4;cursor:default;background:none}.iconbtn.on{background:#e8f0fe;color:var(--accent)}.iconbtn.on:hover{background:var(--accent-soft)}.iconbtn.warn-on{background:#fff4e5;color:#b25e09}.iconbtn.warn-on:hover{background:var(--warn-soft)}.editor-toolbar{height:35px;flex:0 0 35px;display:flex;align-items:center;padding:5px 8px;background:var(--card-bg);border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.editor-toolbar::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bd);background-clip:padding-box;border:2px solid transparent;border-radius:6px}::-webkit-scrollbar-thumb:hover{background:var(--fg-weak);background-clip:padding-box}.no-scrollbar::-webkit-scrollbar{display:none}.tb-group{display:flex;align-items:center;gap:2px;flex:0 0 auto}:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-radius:4px}.tb-sep{width:1px;height:18px;background:var(--bd-soft);margin:0 4px;flex:0 0 auto}.tb-btn svg{width:15px;height:15px}.tb-btn{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:0;background:none;border-radius:4px;color:var(--fg-dim);cursor:pointer;padding:0;flex:0 0 24px}.tb-btn:hover{background:var(--bg-sunken);color:var(--fg-strong)}.tb-btn:active{background:var(--work-bg)}.tb-btn:disabled{opacity:.35;cursor:default;background:none}.content{flex:1;min-height:0;background:var(--work-bg);overflow:auto}.editor-card{min-height:100%;box-sizing:border-box;display:flex;flex-direction:column;max-width:none;color:var(--fg);font-size:14.5px;line-height:1.72;word-wrap:break-word;word-break:break-all;tab-size:4}.editor-card p{position:relative;margin-top:0;margin-bottom:.85em}.editor-card blockquote{margin:0 0 1rem;padding:0 1em;color:var(--fg-mute);border-left:.25em solid var(--bd-soft)}.editor-card code{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.85em}.editor-card mark{display:inline-flex;background-color:var(--mark-bg);color:var(--mark-fg);border-radius:3px;padding:0 2px;font-weight:500}.editor-card a{color:var(--accent)}.editor-card s{display:inline-flex}.editor-card img{vertical-align:middle;font-size:12px;color:#59ae39}.editor-card ol,.editor-card ul{padding-left:2em;margin-top:0;margin-bottom:1rem}.editor-card ul ul,.editor-card ul ol,.editor-card ol ol,.editor-card ol ul{margin-bottom:0}.editor-card li{position:relative;margin-top:0;margin-bottom:5px}.editor-card ol ol,.editor-card ul ol{list-style-type:lower-roman}.editor-card ol ol ol,.editor-card ol ul ol,.editor-card ul ol ol,.editor-card ul ul ol{list-style-type:lower-alpha}.editor-card pre{margin:0 0 1rem;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;padding:12px;font-size:.9em;overflow:auto;line-height:1.42;background-color:var(--code-bg);border-radius:4px;letter-spacing:normal}.editor-card table{margin:0 0 1rem;border-spacing:0;border-collapse:collapse;width:100%;overflow:auto;position:relative}.editor-card table tr{background-color:var(--bg-card)}.editor-card table tr:first-child{background-color:var(--bg-card);font-weight:600}.editor-card table td{padding:6px 13px;border:1px solid var(--table-bd);vertical-align:middle}.editor-card table caption{user-select:none;box-sizing:border-box;position:sticky;top:0;z-index:25;background-color:var(--bg-sunken);border-top-left-radius:2px;border-top-right-radius:2px;text-align:left;box-shadow:0 1px 0 var(--bd-soft)}.editor-card table caption>button{margin-left:10px}.editor-card table caption>span{position:relative;margin-left:10px}.editor-card table caption>span:after{content:"";position:absolute;top:3px;left:0;width:1px;height:16px;background-color:#dfe2e5}.editor-card .punctuation{color:var(--fg-mute)}.editor-card .hr{display:flex;overflow:hidden;color:var(--fg-mute)}.editor-card .hr:before,.editor-card .hr:after{content:"";flex:1;height:2px;margin-top:8px;background-color:var(--bg-sunken)}.editor-card .h1,.editor-card .h2,.editor-card .h3,.editor-card .h4,.editor-card .h5,.editor-card .h6{font-weight:600}.editor-card h1,.editor-card h2{margin:0 0 1rem;border-bottom:1px solid #eaecef;line-height:1.68}.editor-card .h1,.editor-card .h2{line-height:1.68}.editor-card .h1:after,.editor-card .h2:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--bg-sunken)}.editor-card h1,.editor-card .h1{font-size:32px}.editor-card h2,.editor-card .h2{font-size:24px}.editor-card .h3{font-size:20px}.editor-card .h4{font-size:16px}.editor-card .h5{font-size:14px}.editor-card .h6{font-size:12px;color:var(--fg-mute)}.editor-card .math-leaf{user-select:none}.editor-card .math-leaf .katex-display{margin:0;padding:1em 0}.editor-card .block-img{width:100%;display:block;text-align:center}.editor-card .inline-img{display:inline-block}.editor-card .block-img,.editor-card .inline-img{position:relative;user-select:none}.editor-card .block-img img,.editor-card .inline-img img{max-width:100%;display:inline-block!important;user-select:none}.editor-card .block-img .img-handle,.editor-card .inline-img .img-handle{user-select:none;position:absolute;right:8px;top:8px;display:none;align-items:center;gap:2px;padding:0;gap:4px;background:transparent;border:0;box-shadow:none;z-index:9}.editor-card .block-img .img-handle>button,.editor-card .inline-img .img-handle>button{margin:0;padding:0;width:26px;height:26px;min-height:26px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;background:#0003;backdrop-filter:blur(12px) saturate(1.15);color:#fffffff2;cursor:pointer;transition:background .12s ease,color .12s ease}.editor-card .block-img .img-handle>button:hover,.editor-card .inline-img .img-handle>button:hover{background:#0000006b;color:var(--fg-on-strong)}.editor-card .block-img .img-handle>button.danger:hover,.editor-card .inline-img .img-handle>button.danger:hover{background:#c828288c;color:var(--fg-on-strong)}.editor-card .block-img .img-handle>button>svg,.editor-card .inline-img .img-handle>button>svg{width:15px;height:15px;color:inherit}.editor-card .block-img:hover .img-handle,.editor-card .inline-img:hover .img-handle{display:inline-flex}.editor-card .task-list-item{list-style-type:none}.editor-card .task-list-item .task-list-checkbox{user-select:none;position:absolute;left:-31px;top:-3px}.editor-card .task-list-item .task-list-checkbox .MuiCheckbox-root{padding:4px}.editor-card .task-list-item .task-list-checkbox svg{font-size:1.25em}.editor-card .task-checked{text-decoration-line:line-through;color:#6e6e6e}.editor-card .blockcode,.editor-card .htmlcode{color:var(--fg-mute)}.editor-card .code-editor{margin:0 0 1rem;position:relative}.editor-card .code-editor>div:first-child{padding-left:0;height:0}.editor-card .code-editor>div:last-child{display:flex;flex-direction:column;user-select:none}.editor-card .code-editor iframe{background-color:var(--code-bg);border:none;width:100%;height:34px;border-radius:4px}.editor-card .code-editor .code-editor-copy{position:absolute;top:-12px;right:0;display:none;min-height:24px;width:24px;height:24px}.editor-card .code-editor .code-editor-copy>svg{width:16px;color:var(--fg)}.editor-card .code-editor .code-mermaid-render,.editor-card .code-editor .code-echarts-render{width:100%;display:flex;justify-content:center}.editor-card .code-lang{position:absolute;z-index:1;right:32px;top:-11px;background-color:var(--bg-card);border:1px solid var(--line);border-radius:4px;user-select:none}.editor-card .code-lang>div:first-child{display:flex}.editor-card .code-lang input{border:none;outline:none;width:150px;height:20px;font-size:12px;background:transparent;padding:0 8px;box-sizing:border-box;color:var(--fg)}.editor-card .code-lang input:active{outline:none}.editor-card .code-lang .code-lang-list{box-sizing:border-box;width:150px;max-height:200px;overflow-x:hidden;overflow-y:auto;font-size:12px;user-select:none;background-color:var(--code-bg)}.editor-card .code-lang .code-lang-list>div{cursor:pointer;padding:2px 8px;box-sizing:border-box}.editor-card .code-lang .code-lang-list .Mui-focused{background-color:#1976d214}.editor-card .urlreference{color:#999;font-size:12px}.editor-card h1,.editor-card h2{border-color:#495057}.editor-card .h1:after,.editor-card .h2:after{background-color:#495057}.editor-card .hr:before,.editor-card .hr:after{background-color:#666}.code-editor{margin:0 0 1rem;position:relative}.code-editor>div:first-child{padding-left:0;height:0}.code-editor>div:last-child{display:flex;flex-direction:column;user-select:none}.code-editor iframe{background-color:var(--code-bg);border:none;width:100%;height:34px;border-radius:4px}.code-editor .code-editor-copy{position:absolute;top:-12px;right:0;display:none;min-height:24px;width:24px;height:24px}.code-editor .code-editor-copy>svg{width:16px;color:var(--fg)}.code-editor:hover .code-editor-copy{display:flex}.code-editor .code-mermaid-render,.code-editor .code-echarts-render{width:100%;display:flex;justify-content:center}.editor-host{min-height:100%}.editor-card .editor-host>div[data-slate-editor]{outline:none}.editor-card .editor-host div[data-slate-editor]{white-space:pre-wrap}.editor-card code span[data-slate-string]{padding:2px 4px;background-color:var(--code-inline-bg);border-radius:3px}.editor-card .diagram-box{margin:0 0 1rem;text-align:center}.editor-card .diagram-box svg{max-width:100%}.tb-btn.is-on{background:#e4e4e4;color:var(--fg-strong)}.tb-letter{display:inline-flex;align-items:center;justify-content:center;min-width:16px;font-family:-apple-system,Segoe UI,Microsoft YaHei,sans-serif;letter-spacing:0}.editor-card pre.code-block{position:relative;padding:0;background:var(--code-bg);border:1px solid var(--bd);border-radius:4px;overflow:hidden;color:var(--fg)}.editor-card pre.code-block .code-head{display:flex;align-items:center;justify-content:space-between;padding:3px 8px;background:var(--bg-sunken);border-bottom:1px solid var(--bd);user-select:none}.editor-card pre.code-block .code-lang{font-size:11px;line-height:18px;color:var(--fg-dim);background:transparent;border:none;outline:none;cursor:pointer;font-family:inherit}.editor-card pre.code-block .code-copy{font-size:11px;line-height:18px;color:var(--fg-dim);background:transparent;border:1px solid transparent;border-radius:3px;padding:0 6px;cursor:pointer;font-family:inherit}.editor-card pre.code-block .code-copy:hover{background:var(--bg-sunken);color:var(--fg)}.editor-card pre.code-block code{display:block;padding:10px 12px;font-family:Consolas,Courier New,monospace;font-size:12.5px;line-height:1.55;white-space:pre-wrap;word-break:break-word}.editor-card .image-block{margin:0 0 1rem;text-align:center}.editor-card .image-block .image-wrap{position:relative;display:inline-block;max-width:100%;line-height:0}.editor-card .image-block img{display:block;max-width:100%;border-radius:3px}.editor-card .image-block .image-resize{position:absolute;right:-4px;bottom:-4px;width:10px;height:10px;border:1px solid var(--bd);background:#8c8c8c;border-radius:2px;cursor:nwse-resize;opacity:0;transition:opacity .12s}.editor-card .image-block:hover .image-resize{opacity:1}.editor-card .image-block .image-caption{display:block;margin-top:4px;font-size:12px;color:#8c8c8c}.editor-card .math-block{margin:0 0 1rem;padding:8px 10px;background:var(--bg-subtle);border:1px dashed var(--bd);border-radius:4px}.editor-card .math-block .math-render{display:block;text-align:center;overflow-x:auto}.editor-card .math-block .math-source{display:block;margin-top:4px;font-size:11.5px;color:var(--fg-mute);font-family:Consolas,monospace}.editor-card .editor-readonly{cursor:default}.table-menu{position:fixed;z-index:3000;min-width:152px;padding:4px;background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;box-shadow:0 6px 20px #00000024;font-size:13px}.table-menu .tm-item{display:block;width:100%;padding:5px 10px;text-align:left;background:none;border:none;border-radius:4px;color:var(--fg);font-size:13px;font-family:inherit;cursor:pointer}.table-menu .tm-item:hover{background:var(--bg-sunken)}.table-menu .tm-item.tm-danger{color:#c0392b}.table-menu .tm-item.tm-danger:hover{background:var(--danger-bg)}.table-menu .tm-sep{height:1px;margin:4px 6px;background:var(--bg-sunken)}.table-menu .tm-label{padding:4px 10px 2px;font-size:11.5px;color:var(--fg-mute)}.table-menu .tm-row{display:flex;gap:4px;padding:2px 6px 4px}.table-menu .tm-mini{flex:1;padding:3px 0;font-size:12px;color:var(--fg);background:#f6f6f6;border:1px solid #e8e8e8;border-radius:4px;cursor:pointer;font-family:inherit}.table-menu .tm-mini:hover{background:var(--bg-sunken)}.branch-bar{flex:0 0 36px;height:36px;display:flex;align-items:center;gap:4px;padding:0 8px;box-sizing:border-box;--bfg: var(--fg);--bbd: var(--bd);--bsoft: var(--bg-hover)}.branch-bar .zbb-branch{flex:1;min-width:0;display:flex;align-items:center;gap:5px;height:26px;padding:0 7px;border:1px solid var(--bbd);border-radius:7px;background:transparent;color:var(--bfg);font-size:12px;font-family:inherit;cursor:pointer;transition:background .14s,border-color .14s}.branch-bar .zbb-branch:hover{background:var(--bsoft)}.branch-bar .zbb-branch svg{flex:0 0 auto;opacity:.75}.branch-bar .zbb-bname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.branch-bar .zbb-dirty{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:#e0a03a;display:none}.branch-bar .zbb-dirty.on{display:block}.branch-bar .zbb-btn{flex:0 0 auto;width:26px;height:26px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bbd);border-radius:7px;background:transparent;color:var(--bfg);cursor:pointer;opacity:.8;transition:background .14s,opacity .14s}.branch-bar .zbb-btn:hover{background:var(--bsoft);opacity:1}.branch-bar .zbb-btn:disabled{opacity:.35;cursor:default}.branch-bar .zbb-btn.busy svg{animation:zbb-spin 1s linear infinite}@keyframes zbb-spin{to{transform:rotate(360deg)}}.git-panel{position:fixed;top:0;right:0;width:520px;max-width:96vw;height:100%;z-index:99998;display:flex;flex-direction:column;background:var(--bg-card);color:var(--fg);box-shadow:-8px 0 32px #1f232824,-2px 0 8px #1f232814;font-size:13px;line-height:1.5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,system-ui,sans-serif;animation:zgp-in .22s cubic-bezier(.2,.8,.2,1)}@keyframes zgp-in{0%{transform:translate(24px);opacity:0}to{transform:none;opacity:1}}.git-panel .zgp-head{padding:14px 16px 10px;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-head-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.git-panel .zgp-title{font-size:14px;font-weight:600;letter-spacing:.2px;display:flex;align-items:center;gap:7px;flex:1;min-width:0;overflow:hidden}.git-panel .zgp-title>svg{width:16px;height:16px;flex:0 0 16px;fill:currentColor}.git-panel .zgp-title>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.git-panel .zgp-close{border:none;background:none;color:var(--fg-weak);cursor:pointer;font-size:20px;line-height:1;flex:0 0 auto;padding:2px 6px;border-radius:6px}.git-panel .zgp-close:hover{background:var(--bg-sunken);color:var(--fg)}.git-panel .zgp-status{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px}.git-panel .zgp-chips{display:flex;flex-wrap:wrap;gap:6px;min-width:0;flex:1 1 auto}.git-panel .zgp-acts,.git-panel .zgp-fileact{display:flex;align-items:center;gap:6px;flex:0 0 auto}.git-panel .zgp-fileact .zgp-b{padding:3px 9px;font-size:11px}.git-panel .zgp-fileact .zgp-count{font-size:11px;color:var(--fg-dim);white-space:nowrap}.git-panel .zgp-acts .zgp-b{padding:3px 9px;font-size:11px}.git-panel .zgp-chip{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;background:var(--bg-subtle);border:1px solid var(--bd-soft);color:var(--fg-dim);white-space:nowrap}.git-panel .zgp-chip b{font-weight:600;color:var(--fg)}.git-panel .zgp-chip.ok{border-color:#1a7f37;color:var(--ok)}.git-panel .zgp-chip.warn{border-color:#bf8700;color:var(--warn)}.git-panel .zgp-chip.err{border-color:var(--danger);color:var(--danger)}.git-panel .zgp-chip.acc{border-color:var(--accent);color:var(--accent)}.git-panel .zgp-spin{width:9px;height:9px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:zgp-rot .7s linear infinite}@keyframes zgp-rot{to{transform:rotate(360deg)}}.git-panel .zgp-tabs{display:flex;gap:2px;padding:8px 12px 0;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-tab{padding:7px 14px 9px;font-size:12.5px;font-weight:500;color:var(--fg-dim);cursor:pointer;border:none;background:none;border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s;display:flex;align-items:center;gap:6px;font-family:inherit}.git-panel .zgp-tab:hover{color:var(--fg)}.git-panel .zgp-tab.on{color:var(--accent);border-bottom-color:var(--accent)}.git-panel .zgp-tab .zgp-badge{min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--bg-sunken);color:var(--fg-dim);font-size:10px;display:none;align-items:center;justify-content:center;font-weight:600}.git-panel .zgp-tab .zgp-badge.on{display:inline-flex}.git-panel .zgp-tab.on .zgp-badge{background:var(--accent-bg);color:var(--accent)}.git-panel .zgp-body{flex:1;overflow:auto;overscroll-behavior:contain}.git-panel .zgp-pane{display:none;padding:0}.git-panel .zgp-pane.on{display:block}.git-panel .zgp-sec{padding:12px 16px;border-bottom:1px solid var(--bd-soft)}.git-panel .zgp-sec:last-child{border-bottom:none}.git-panel .zgp-sec h5{margin:0 0 8px;font-size:11px;font-weight:600;letter-spacing:.6px;text-transform:uppercase;color:var(--fg-weak)}.git-panel .zgp-row{display:flex;gap:8px}.git-panel .zgp-hint{font-size:11px;color:var(--fg-weak);margin-top:8px;line-height:1.6}.git-panel .zgp-file{display:flex;align-items:center;gap:8px;padding:7px 16px;cursor:default;border-bottom:1px solid var(--bd-soft);transition:background .12s}.git-panel .zgp-file:hover{background:var(--bg-subtle)}.git-panel .zgp-file.cur{background:var(--accent-bg);box-shadow:inset 3px 0 #2563eb}.git-panel .zgp-st{width:18px;height:18px;flex:0 0 18px;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;font-family:Consolas,Menlo,monospace}.git-panel .zgp-st.M{background:#fff4ce;color:#9a6700}.git-panel .zgp-st.A{background:#e6ffec;color:var(--ok)}.git-panel .zgp-st.D{background:var(--danger-bg);color:var(--danger)}.git-panel .zgp-st.Q{background:var(--bg-sunken);color:var(--fg-weak)}.git-panel .zgp-st.U{background:var(--danger-bg);color:var(--danger)}.git-panel .zgp-fp{flex:1;min-width:0;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,Menlo,monospace}.git-panel .zgp-fp span{unicode-bidi:normal}.git-panel .zgp-ops{display:flex;gap:3px;opacity:0;transition:opacity .12s}.git-panel .zgp-file:hover .zgp-ops{opacity:1}.git-panel .zgp-ic{border:1px solid var(--bd);background:var(--bg-card);color:var(--fg-dim);cursor:pointer;width:24px;height:24px;border-radius:5px;display:flex;align-items:center;justify-content:center;padding:0;flex:0 0 auto}.git-panel .zgp-ic:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.git-panel .zgp-ic.danger:hover{background:var(--danger-bg);border-color:var(--danger);color:var(--danger)}.git-panel .zgp-ic svg{width:13px;height:13px;fill:currentColor}.git-panel .zgp-cm{padding:9px 16px;border-bottom:1px solid var(--bd-soft);cursor:pointer;transition:background .12s}.git-panel .zgp-cm:hover,.git-panel .zgp-cm.open{background:var(--bg-subtle)}.git-panel .zgp-cm1{display:flex;align-items:baseline;gap:8px}.git-panel .zgp-cm-sub{flex:1;min-width:0;font-size:12.5px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg)}.git-panel .zgp-cm-meta{font-size:11px;color:var(--fg-weak);margin-top:3px;font-family:Consolas,Menlo,monospace}.git-panel .zgp-hash{font-size:10.5px;font-family:Consolas,Menlo,monospace;padding:1px 5px;border-radius:4px;background:var(--bg-sunken);color:var(--fg-dim);flex:0 0 auto}.git-panel .zgp-cmbody{display:none;margin-top:7px;padding-left:4px;border-left:2px solid var(--bd)}.git-panel .zgp-cm.open .zgp-cmbody{display:block}.git-panel .zgp-cmf{display:flex;align-items:center;gap:7px;padding:3px 0 3px 8px;font-size:11.5px;font-family:Consolas,Menlo,monospace;color:var(--fg-dim);cursor:pointer;border-radius:4px}.git-panel .zgp-cmf:hover{background:var(--bg-sunken);color:var(--fg)}.git-panel .zgp-cmf .zgp-fs{font-weight:700;width:12px;flex:0 0 12px}.git-panel .zgp-cmf .zgp-fs.A{color:var(--ok)}.git-panel .zgp-cmf .zgp-fs.D{color:var(--danger)}.git-panel .zgp-cmf .zgp-fs.M{color:var(--warn)}.git-panel .zgp-empty{padding:34px 20px;text-align:center;color:var(--fg-weak);font-size:12.5px;line-height:1.9}.git-panel .zgp-empty b{display:block;color:var(--fg-dim);font-size:13px;margin-bottom:4px;font-weight:500}.git-panel .zgp-b{padding:6px 14px;font-size:12.5px;font-weight:500;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg);transition:all .15s;display:inline-flex;align-items:center;gap:6px;font-family:inherit}.git-panel .zgp-b:hover{background:var(--bg-sunken)}.git-panel .zgp-b:disabled{opacity:.5;cursor:not-allowed}.git-panel .zgp-b.primary{background:var(--accent);border-color:var(--accent);color:var(--fg-on-strong)}.git-panel .zgp-b.primary:hover{filter:brightness(1.08)}.git-panel .zgp-b.danger{background:var(--danger);border-color:var(--danger);color:var(--fg-on-strong)}.git-panel .zgp-b svg{width:13px;height:13px;fill:currentColor}.git-panel .zgp-cf-ov{position:absolute;inset:0;background:#00000061;display:flex;align-items:center;justify-content:center;z-index:20;padding:20px}.git-panel .zgp-cf-card{background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:10px;padding:16px 16px 12px;width:100%;max-width:340px;box-shadow:0 8px 32px #1f232824}.git-panel .zgp-cf-msg{font-size:12.5px;line-height:1.75;white-space:pre-wrap;color:var(--fg);margin-bottom:14px;word-break:break-word}.git-panel .zgp-cf-btns{display:flex;justify-content:flex-end;gap:8px}.zgp-toast{position:fixed;left:50%;bottom:36px;transform:translate(-50%) translateY(12px);background:#1f2328;color:var(--fg-on-strong);padding:9px 18px;border-radius:8px;font-size:12.5px;z-index:100002;opacity:0;pointer-events:none;transition:all .22s;box-shadow:0 6px 24px #0000004d;max-width:70vw}.zgp-toast.on{opacity:1;transform:translate(-50%) translateY(0)}.zgp-toast.err{background:var(--danger)}.zgp-toast.ok{background:var(--ok)}.zgp-view-mask{position:fixed;inset:0;background:#00000080;z-index:100001;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(2px)}.zgp-vbox{background:var(--bg-card);color:var(--fg);width:min(1000px,96vw);height:min(82vh,860px);border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 8px 32px #1f232824,0 2px 8px #1f232814}.zgp-vhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--bd-soft);background:var(--bg-subtle)}.zgp-vtitle{font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,Menlo,monospace}.zgp-vhead .zgp-b{padding:6px 14px;font-size:12.5px;font-weight:500;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg);flex:0 0 auto}.zgp-vhead .zgp-b:hover{background:var(--bg-sunken)}.zgp-vbody{flex:1;overflow:auto;margin:0;font-family:Consolas,Cascadia Mono,Menlo,monospace;font-size:12px;line-height:1.6}.zgp-dl{display:block;padding:0 8px 0 0;white-space:pre-wrap;word-break:break-word}.zgp-dl.add{background:#e6ffec;color:var(--ok)}.zgp-dl.del{background:var(--danger-bg);color:var(--danger)}.zgp-dl.hunk{background:#ddf4ff;color:var(--accent);font-weight:600}.zgp-dl.meta{color:var(--fg-weak)}.zgp-dl.ctx{color:var(--fg)}.zgp-dl.plain{padding:8px 14px;white-space:pre-wrap}.zgp-fbody{display:block;max-height:calc(100vh - 260px);overflow:auto;font-family:Consolas,Cascadia Mono,Menlo,monospace;font-size:12px;line-height:1.6}.zgp-ln{display:inline-block;width:42px;padding-right:10px;text-align:right;color:var(--fg-weak);opacity:.7;user-select:none;font-variant-numeric:tabular-nums}.zgp-dl.add .zgp-ln{color:var(--ok);opacity:.85}.zgp-dl.del .zgp-ln{color:var(--danger);opacity:.85}.zgp-dl.oldno .zgp-ln{opacity:.45;font-style:italic}.zgp-jumpbar{position:sticky;top:0;z-index:3;display:flex;justify-content:flex-end;padding:4px 8px 3px;background:var(--bg-card)}.zgp-jumpbar button{padding:3px 10px;font-size:11.5px;border-radius:6px;cursor:pointer;border:1px solid var(--bd);background:var(--bg-card);color:var(--fg-dim)}.zgp-jumpbar button:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}.zgp-dl.zgp-flash{outline:none!important;border:none!important;background:#0969da29!important}[data-theme=dark] .zgp-dl.zgp-flash{background:#58a6ff4d!important}.settings-panel{position:fixed;top:0;right:0;width:520px;max-width:96vw;height:100%;z-index:99998;display:flex;flex-direction:column;background:var(--bg-card);color:var(--fg);font-size:13px;line-height:1.5;box-shadow:-8px 0 32px #1f232824,-2px 0 8px #1f232814;animation:gp-in .22s cubic-bezier(.2,.8,.2,1)}.settings-panel .gp-head{position:relative;padding:0 16px;height:44px;display:flex;align-items:center;border-bottom:1px solid var(--bd-soft)}.settings-panel .gp-title{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:600;color:var(--fg)}.settings-panel .gp-title svg{width:15px;height:15px;opacity:.85}.settings-panel .gp-close{position:absolute;top:9px;right:12px;width:26px;height:26px;border:none;background:none;color:var(--fg-weak);font-size:20px;line-height:1;border-radius:5px;cursor:pointer}.settings-panel .gp-close:hover{background:var(--bg-sunken);color:var(--fg)}.settings-panel .sp-body{flex:1;overflow-y:auto;padding:4px 0 18px}.settings-panel .zgp-sec{padding:16px;border-bottom:1px solid var(--bd-soft)}.settings-panel .zgp-sec:last-child{border-bottom:none}.settings-panel .zgp-sec h5{margin:0 0 8px;font-size:12.5px;font-weight:600;letter-spacing:.02em;color:var(--fg);opacity:.95}.settings-panel .zgs-kv{display:grid;grid-template-columns:64px 1fr;gap:7px 12px;align-items:baseline;margin:0}.settings-panel .zgs-kv dt{font-size:11.5px;color:var(--fg-weak)}.settings-panel .zgs-kv dd{margin:0;font-size:12.5px;color:var(--fg);line-height:1.5;word-break:break-all}.settings-panel .zgs-kv dd.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px}.settings-panel .zgs-kv-url{word-break:break-all}.settings-panel .zgs-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--ok);margin-right:6px;vertical-align:1px}.settings-panel .zgs-dot.off{background:#7c7c85}.settings-panel .zgp-field{margin-bottom:13px}.settings-panel .zgp-field:last-child{margin-bottom:0}.settings-panel .zgp-lab{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.settings-panel .zgp-lab>span{font-size:12.5px;color:var(--fg)}.settings-panel .zgs-lab{display:block;font-size:11.5px;color:var(--fg-weak);margin:0 0 5px}.settings-panel .zgp-desc{font-size:11px;color:var(--fg-weak);margin-top:4px;line-height:1.5}.settings-panel .zgp-row{display:flex;gap:8px}.settings-panel .zgp-in,.settings-panel .zgp-sel{width:100%;box-sizing:border-box;height:34px;padding:0 12px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;outline:none}.settings-panel .zgp-sel{padding:0 9px}.settings-panel .zgp-in:focus,.settings-panel .zgp-sel:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.settings-panel .zgp-b{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:6px 14px;font-size:12.5px;font-weight:500;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;cursor:pointer}.settings-panel .zgp-b:hover{background:var(--bg-sunken);color:var(--fg)}.settings-panel .zgp-b:disabled{opacity:.5;cursor:not-allowed}.settings-panel .zgp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.settings-panel .zgp-b.primary:hover{filter:brightness(1.08);background:var(--accent)}.settings-panel .zgp-b.danger{color:var(--danger);border-color:#f3b8b8}.settings-panel .zgp-b.danger:hover{background:var(--danger-bg)}.settings-panel .zgp-sw{position:relative;display:inline-block;width:36px;height:20px;flex:0 0 36px}.settings-panel .zgp-sw input{opacity:0;width:0;height:0;position:absolute}.settings-panel .zgp-sw i{position:absolute;inset:0;background:#d0d7de;border-radius:999px;transition:.18s;cursor:pointer}.settings-panel .zgp-sw i:after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:var(--bg-card);box-shadow:0 1px 2px #0000002e;transition:.18s}.settings-panel .zgp-sw input:checked+i{background:var(--accent)}.settings-panel .zgp-sw input:checked+i:after{transform:translate(16px)}.settings-panel .zgp-sw input:disabled+i{opacity:.5;cursor:not-allowed}.settings-panel .zgp-drawer{padding:10px 12px;background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:8px}.zgs-mask{position:fixed;inset:0;z-index:99999;background:#00000052;display:flex;align-items:center;justify-content:center}.zgs-dlg{width:440px;max-width:92vw;padding:18px 20px 14px;background:var(--bg-card);color:var(--fg);border-radius:10px;box-shadow:0 16px 48px #00000038}.zgs-dlg-msg{font-size:12.5px;line-height:1.8;color:var(--fg-dim);word-break:break-word;white-space:normal}.zgs-dlg-in{margin-top:12px}.zgs-dlg-err{display:none;margin-top:9px;font-size:11.5px;line-height:1.5;color:var(--danger);background:#cf222e14;border-radius:6px;padding:6px 9px;word-break:break-all}.zgs-dlg-row{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.zgs-dlg .zgp-b{display:inline-flex;align-items:center;min-height:30px;padding:6px 14px;font-size:12.5px;font-weight:500;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;cursor:pointer}.zgs-dlg .zgp-b:hover{background:var(--bg-sunken);color:var(--fg)}.zgs-dlg .zgp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.zgs-dlg .zgp-b:disabled{opacity:.5;cursor:not-allowed}.zgs-dlg .zgp-in{width:100%;box-sizing:border-box;height:34px;padding:0 12px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd);border-radius:6px;outline:none}.zgs-dlg .zgp-in:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.more-wrap{position:relative;display:inline-flex}.more-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:214px;background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:8px;box-shadow:0 8px 28px #1f232829,0 2px 6px #1f232814;padding:5px;z-index:9999}.more-item{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:7px 10px;font-size:13px;color:var(--fg);background:none;border:none;border-radius:5px;cursor:pointer;text-align:left;font-family:inherit;white-space:nowrap}.more-item:hover{background:var(--bg-subtle)}.more-kbd{font-size:11px;color:var(--fg-weak);font-family:Consolas,Menlo,monospace}.more-fontsize{padding:5px 10px 8px}.more-flabel{display:block;font-size:11px;color:var(--fg-weak);margin-bottom:6px}.more-seg{display:flex;gap:2px;background:var(--bg-subtle);border-radius:6px;padding:2px}.more-segbtn{flex:1;padding:4px 2px;font-size:11.5px;color:var(--fg-dim);background:none;border:none;border-radius:4px;cursor:pointer;font-family:inherit;white-space:nowrap}.more-segbtn:hover{color:var(--fg)}.more-segbtn.on{background:var(--bg-card);color:var(--accent);box-shadow:0 1px 2px #1f23281a}.more-divider{height:1px;background:#e3e6ea;margin:5px 8px}:root{--body-font-size: 14px;--body-line-height: 1.45}.editor-card [data-slate-editor],.editor-card p,.editor-card li,.editor-card td,.editor-card blockquote{font-size:var(--body-font-size)}.settings-panel .sp-seg{display:inline-flex;border:1px solid var(--bd);border-radius:6px;overflow:hidden}.settings-panel .sp-seg-b{padding:3px 14px;font-size:12.5px;font-family:inherit;color:var(--fg-dim);background:var(--bg-card);border:none;border-right:1px solid var(--bd);cursor:pointer}.settings-panel .sp-seg-b:last-child{border-right:none}.settings-panel .sp-seg-b.on{background:var(--accent-bg);color:var(--accent);font-weight:600}.header .word-count{font-size:11.5px;color:var(--fg-mute);margin-right:6px;white-space:nowrap;user-select:none}.onboard-mask{position:fixed;inset:0;z-index:10500;display:flex;align-items:center;justify-content:center;background:#1f23284d}.onboard{width:520px;max-width:92vw;background:var(--bg-card);border-radius:12px;box-shadow:0 20px 60px #0000003d;overflow:hidden}.onboard .ob-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--bd-soft)}.onboard .ob-title{font-size:15px;font-weight:600;color:var(--fg)}.onboard .ob-step{font-size:11.5px;color:var(--fg-mute)}.onboard .ob-body{padding:18px 20px 8px;min-height:148px}.onboard .ob-lead{margin:0 0 14px;font-size:13px;line-height:1.7;color:var(--fg)}.onboard .ob-ws{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:8px}.onboard .ob-ws-icon{color:var(--fg-weak);display:inline-flex}.onboard .ob-ws-path{flex:1;min-width:0;font-size:12px;font-family:Consolas,monospace;color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.onboard .ob-hint{margin:10px 0 0;font-size:11.5px;line-height:1.7;color:var(--fg-weak)}.onboard .ob-list{margin:0;padding-left:18px;font-size:12.5px;line-height:2;color:var(--fg-dim)}.onboard .ob-list b{color:var(--fg);font-weight:600}.onboard .ob-acts{display:flex;align-items:center;gap:8px;padding:12px 20px 16px}.onboard .gp-b{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:5px 12px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;cursor:pointer}.onboard .gp-b:hover{background:var(--bg-sunken)}.onboard .gp-b.primary{color:var(--fg-on-strong);background:var(--accent);border-color:var(--accent)}.onboard .gp-b:disabled{opacity:.45;cursor:default}.title-empty{font-size:13px;color:var(--fg-weak);padding-left:2px;user-select:none}.content:has(>.note-empty){position:relative}.note-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#b3bac2;user-select:none}.note-empty svg{opacity:.5;margin-bottom:6px}.note-empty-title{font-size:14px;color:var(--fg-weak)}.note-empty-desc{font-size:12.5px;color:#a8b0b8}.ai-mask{position:fixed;inset:0;z-index:10300;display:flex;align-items:flex-start;justify-content:center;padding:76px 20px 40px;background:#1f232842;backdrop-filter:blur(2px)}.ai-panel{width:600px;max-width:94vw;background:var(--bg-card);border:1px solid rgba(31,35,40,.06);border-radius:16px;box-shadow:0 24px 64px #0f172a38,0 2px 8px #0f172a14;overflow:hidden;animation:ai-in .18s cubic-bezier(.2,.8,.2,1)}@keyframes ai-in{0%{opacity:0;transform:translateY(-8px) scale(.985)}to{opacity:1;transform:none}}.ai-panel .ai-head{display:flex;align-items:center;gap:9px;padding:16px 18px 13px}.ai-panel .ai-spark{width:26px;height:26px;flex:0 0 26px;display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--accent);background:linear-gradient(135deg,#eef4ff,#e3ecff)}.ai-panel .ai-title{flex:1;min-width:0;font-size:14.5px;font-weight:600;letter-spacing:.1px;color:var(--fg)}.ai-panel .ai-close{width:28px;height:28px;flex:0 0 28px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:var(--fg-weak);border-radius:7px;cursor:pointer}.ai-panel .ai-close:hover{background:var(--bg-subtle);color:var(--fg)}.ai-panel .ai-modelrow{display:flex;align-items:center;gap:8px;padding:0 18px 12px}.ai-panel .ai-mlabel{flex:0 0 auto;font-size:11.5px;color:var(--fg-weak)}.ai-panel .ai-model{flex:0 1 250px;min-width:0;height:30px;padding:0 9px;font-size:12px;font-family:inherit;color:var(--fg);background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:7px;outline:none;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}.ai-panel .ai-model:hover{background:#f2f4f7}.ai-panel .ai-model:focus{background:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px #2563eb1a}.ai-panel .ai-link{margin-left:auto;padding:4px 7px;font-size:11.5px;font-family:inherit;color:var(--accent);background:none;border:none;border-radius:5px;cursor:pointer;white-space:nowrap}.ai-panel .ai-link:hover{background:var(--accent-bg)}.ai-panel .ai-body{padding:0 18px}.ai-panel .ai-input{display:block;width:100%;box-sizing:border-box;min-height:168px;padding:13px 14px;font-size:13px;line-height:1.65;font-family:inherit;color:var(--fg);background:var(--bg-subtle);border:1px solid var(--bd-soft);border-radius:11px;outline:none;resize:vertical;transition:background .15s,border-color .15s,box-shadow .15s}.ai-panel .ai-input::placeholder{color:var(--fg-weak)}.ai-panel .ai-input:focus{background:var(--bg-card);border-color:var(--accent);box-shadow:0 0 0 3px #2563eb1a}.ai-panel .ai-out{margin:10px 18px 0;padding:9px 12px;font-size:12.5px;color:var(--fg-dim);background:#f2f6ff;border-radius:8px}.ai-panel .ai-err{margin:10px 18px 0;padding:9px 12px;font-size:12px;line-height:1.6;color:var(--danger);background:var(--danger-bg);border-radius:8px}.ai-panel .ai-dialog-btns{display:flex;flex-wrap:wrap;gap:9px;padding:14px 18px 18px}.ai-panel .ai-preset-btn{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:7px 11px;font-size:12.5px;font-family:inherit;color:var(--fg);background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:11px;cursor:pointer;text-align:left;transition:border-color .15s,box-shadow .15s,transform .15s,background .15s}.ai-panel .ai-preset-btn:hover:not(:disabled){background:var(--bg-card);border-color:var(--accent);box-shadow:0 4px 14px #2563eb1a;transform:translateY(-1px)}.ai-panel .ai-preset-btn:active:not(:disabled){transform:translateY(0);box-shadow:none}.ai-panel .ai-preset-btn:disabled{opacity:.5;cursor:not-allowed}.ai-panel .ai-preset-ico{width:24px;height:24px;flex:0 0 24px;display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--accent);background:var(--accent-bg)}.ai-panel .ai-preset-ico svg{width:15px;height:15px}.ai-panel .ai-preset-txt{flex:0 0 auto;line-height:1.35;white-space:nowrap}.conflict-bar{flex:0 0 auto;display:flex;align-items:center;gap:8px;height:34px;padding:0 14px 0 12px;box-sizing:border-box;background:#fff8e5;border-bottom:1px solid #f0e0b4;color:#7a5c00;font-size:12px;line-height:1}.conflict-bar .cf-ico{flex:0 0 auto;color:#b8870b}.conflict-bar .cf-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:.1px}.conflict-bar .cf-actions{flex:0 0 auto;display:flex;align-items:center;gap:8px}.conflict-bar .cf-btn{flex:0 0 auto;height:22px;padding:0 10px;font-size:11.5px;font-family:inherit;border:1px solid #e8d49a;border-radius:5px;background:var(--bg-card);color:#7a5c00;cursor:pointer;transition:background-color .12s,border-color .12s}.conflict-bar .cf-btn:hover{background:var(--warn-soft);border-color:var(--warn)}.conflict-bar .cf-btn:active{background:var(--warn-soft)}.conflict-bar .cf-btn.danger{color:var(--danger);border-color:#f0c4c4}.conflict-bar .cf-btn.danger:hover{background:var(--danger-bg);border-color:var(--danger)}.source-editor{width:100%;min-height:calc(100vh - 160px);box-sizing:border-box;padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--fg);font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;tab-size:4}.export-wrap{position:relative;display:inline-flex}.export-menu{position:absolute;top:30px;right:0;z-index:500;width:208px;padding:4px;background:var(--bg-card);border:1px solid var(--bd-soft);border-radius:8px;box-shadow:0 10px 28px #1f232829}.export-item{display:block;width:100%;padding:6px 9px;text-align:left;border:none;background:none;border-radius:5px;cursor:pointer;font-family:inherit}.export-item:hover{background:var(--bg-subtle)}.export-lab{display:block;font-size:12.5px;color:var(--fg)}.export-hint{display:block;font-size:11px;color:var(--fg-mute);margin-top:1px}.export-spin{display:inline-block;width:13px;height:13px;border:1.6px solid #c8ced6;border-top-color:var(--accent);border-radius:50%;animation:export-spin .8s linear infinite}@keyframes export-spin{to{transform:rotate(360deg)}}.search-mask{position:fixed;inset:0;z-index:10100;display:flex;justify-content:center;padding-top:90px;background:#1f232833}.search-box{width:620px;max-width:92vw;max-height:62vh;display:flex;flex-direction:column;background:var(--bg-card);border-radius:10px;box-shadow:0 16px 48px #0003;overflow:hidden}.search-head{display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid var(--bd-soft)}.search-input{flex:1;min-width:0;padding:5px 9px;font-size:13px;font-family:inherit;color:var(--fg);border:1px solid var(--bd);border-radius:6px;outline:none}.search-input:focus{border-color:var(--accent);box-shadow:0 0 0 2px #2563eb1f}.search-count{flex:0 0 auto;font-size:11.5px;color:var(--fg-weak);min-width:44px;text-align:right}.search-scope{flex:0 0 auto;font-size:11.5px;padding:3px 8px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;cursor:pointer}.search-scope.on{background:var(--accent-bg);border-color:var(--accent-soft);color:var(--accent)}.search-list{flex:1;overflow-y:auto;padding:6px}.search-hit{display:block;width:100%;padding:7px 10px;text-align:left;border:none;background:none;border-radius:6px;cursor:pointer;font-family:inherit}.search-hit:hover{background:var(--bg-subtle)}.search-name{font-size:12.5px;font-weight:600;color:var(--fg);margin-right:6px}.search-badge{display:inline-block;font-size:10.5px;color:var(--accent);background:var(--accent-bg);border-radius:8px;padding:0 5px;line-height:15px;margin-right:6px}.search-snip{display:block;margin-top:2px;font-size:11.5px;color:var(--fg-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.search-foot{padding:7px 12px;border-top:1px solid var(--bd-soft);font-size:11px;color:var(--fg-mute);background:var(--bg-subtle)}.editor-card pre.code-block .diagram-box{border-top:1px dashed var(--bd);padding:10px 12px;background:var(--bg-card);overflow-x:auto}.editor-card pre.code-block .diagram-canvas{display:flex;justify-content:center;min-height:40px}.editor-card pre.code-block .diagram-canvas svg{max-width:100%;height:auto}.editor-card pre.code-block .diagram-err{font-size:11.5px;color:var(--danger);background:var(--danger-bg);border-radius:4px;padding:4px 8px;margin-top:6px}.zctx{position:fixed;z-index:2147483000;min-width:158px;padding:4px;border-radius:8px;border:1px solid rgba(128,128,128,.28);background:var(--bg-card);color:var(--fg);box-shadow:0 8px 24px #0000002e;font-size:12.5px}.zctx button{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;border-radius:6px;background:transparent;color:inherit;font-size:12.5px;font-family:inherit;text-align:left;cursor:pointer;white-space:nowrap}.zctx button:hover{background:#80808029}.zctx button svg{width:14px;height:14px;flex:0 0 14px;fill:currentColor;opacity:.8}.zctx button.danger{color:var(--danger)}.zctx button.danger svg{fill:currentColor;opacity:.9}.zctx-sep{height:1px;margin:4px 6px;background:#80808038}.zdlg-mask{position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;background:#00000047}.zdlg-card{width:340px;max-width:86vw;padding:16px 18px 14px;border-radius:10px;background:var(--bg-card);color:var(--fg);font-size:13px;box-shadow:0 16px 40px #00000047}.zdlg-title{font-size:13.5px;font-weight:600;margin-bottom:10px}.zdlg-msg{font-size:12.5px;line-height:1.75;white-space:pre-wrap;word-break:break-word;margin-bottom:2px}.zdlg-input{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid rgba(128,128,128,.42);border-radius:6px;background:transparent;color:inherit;font-size:13px;font-family:inherit;outline:none}.zdlg-input:focus{border-color:var(--accent)}.zdlg-btns{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.zdlg-btn{padding:6px 14px;border-radius:6px;border:1px solid rgba(128,128,128,.36);background:transparent;color:inherit;font-size:12.5px;font-family:inherit;cursor:pointer}.zdlg-btn:hover{background:#8080801a}.zdlg-btn.primary{background:#3f7ef7;border-color:var(--accent);color:var(--fg-on-strong)}.zdlg-btn.primary:hover{filter:brightness(1.06)}.zdlg-btn.primary.danger{background:var(--danger);border-color:var(--danger)}.zdlg-btn:disabled{opacity:.45;cursor:not-allowed}.editor-card .h1,.editor-card .h2{margin:0 0 1rem!important;line-height:1.68!important;position:relative!important;padding-bottom:.3em!important;border-bottom:0!important}.editor-card .h1:after,.editor-card .h2:after{content:""!important;position:absolute!important;bottom:0!important;left:0!important;width:100%!important;height:1px!important;background-color:var(--bg-sunken)!important}.editor-card .h3,.editor-card .h4,.editor-card .h5,.editor-card .h6{margin:0 0 1rem!important}.editor-card code>span,.editor-card code[data-slate-void]>span{padding:2px 4px!important;background-color:var(--code-inline-bg)!important;border-radius:3px!important}.editor-card .hr{display:flex!important;align-items:center;overflow:hidden;color:var(--fg-mute);margin:1rem 0!important;min-height:18px;user-select:none}.editor-card .hr:before,.editor-card .hr:after{content:""!important;flex:1;height:2px;background-color:var(--bg-sunken)}.editor-card .hr:before{margin-right:10px}.editor-card .hr:after{margin-left:10px}.editor-card table{width:100%!important;border-collapse:collapse;margin:0 0 1rem}.editor-card table tr{background-color:var(--bg-card);border-top:1px solid var(--table-bd)}.editor-card table tr:nth-child(2n){background-color:var(--bg-subtle)}.editor-card table th,.editor-card table td{padding:6px 13px;border:1px solid var(--table-bd)}.editor-card table th{font-weight:600}.editor-card .code-editor{position:relative}.editor-card .code-editor .code-head{position:absolute;top:0;left:0;right:0;height:0;overflow:visible;z-index:2}.editor-card .code-editor:hover .code-editor-copy{display:flex}.editor-card .code-editor .code-lang select{appearance:none;border:1px solid rgba(128,128,128,.3);border-radius:4px;background:var(--bg-card);color:var(--fg-dim);font-size:11px;font-family:inherit;padding:1px 6px;cursor:pointer;outline:none}.editor-card .code-editor .code-lang select:hover{border-color:#8080808c}.editor-card .code-editor .code-head{position:absolute!important;top:6px!important;right:8px!important;left:auto!important;height:auto!important;display:flex!important;align-items:center;gap:6px;overflow:visible!important;z-index:3;opacity:0;transition:opacity .12s}.editor-card .code-editor:hover .code-head{opacity:1}.editor-card .code-editor .code-lang,.editor-card .code-editor .code-lang select{position:static!important;top:auto!important;right:auto!important}.editor-card .code-editor .code-editor-copy{position:static!important;top:auto!important;right:auto!important;display:flex!important;align-items:center;padding:1px 7px;border:1px solid rgba(128,128,128,.3);border-radius:4px;background:var(--bg-card);color:var(--fg-dim);font-size:11px;font-family:inherit;cursor:pointer}.editor-card .code-editor .code-editor-copy:hover{border-color:#8080808c;color:var(--fg)}.editor-card .diagram-box{margin:8px 0 14px;padding:12px;border-radius:6px;background:var(--code-bg);border:1px solid var(--bd-soft);overflow:hidden}.editor-card .diagram-canvas{display:block;min-height:0}.editor-card .diagram-box svg{max-width:100%;height:auto}.editor-card .diagram-err{color:var(--danger);font-size:12px;font-family:Consolas,monospace;white-space:pre-wrap}.plate-host{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--editor-bg)}.plate-host>div{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg-card)}.plate-content{flex:1;min-height:0;overflow-y:auto;padding:20px 20px 60px;outline:none;color:var(--fg);font-size:var(--cmark-body-font-size, 14px);line-height:1.45;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;word-break:break-word;tab-size:4}.plate-content .p{margin:0 0 14px;min-height:1em}.plate-content .p:empty:before{content:"";display:inline-block}.plate-content ul,.plate-content ol{padding-left:28px;margin:0 0 14px}.plate-content li{margin-bottom:5px}.plate-content .li{list-style:inherit}.plate-content .task-list-item{list-style:none;display:flex;align-items:flex-start;gap:6px}.plate-content .task-list-checkbox{flex:0 0 auto;margin-top:3px}.plate-content .task-list-checkbox input{margin:0;cursor:pointer}.plate-content .code-editor{margin:0 0 14px;padding:12px;background:var(--code-bg);border:1px solid var(--code-border);border-radius:6px;font-family:Consolas,Courier New,monospace;font-size:12.6px;line-height:1.42;overflow-x:auto;color:var(--fg)}.plate-content .code-line{min-height:1.42em;white-space:pre-wrap}.plate-content .table{width:100%;border-collapse:collapse;margin:0 0 14px;table-layout:auto}.plate-content .table-row{background:var(--bg-card)}.plate-content .table-row:nth-child(2n){background:var(--bg-subtle)}.plate-content .table-cell{padding:6px 13px;border:1px solid var(--table-bd);position:relative;vertical-align:middle}.plate-content .table-cell.is-header{font-weight:600}.plate-content .block-img{margin:0 0 14px;text-align:center}.plate-content .block-img img{max-width:100%;height:auto;border-radius:4px}.plate-content .blockquote{margin:0 0 14px;padding:0 14px;color:var(--fg-mute);border-left:3px solid var(--bd-soft)}.plate-content .h1,.plate-content .h2{position:relative;padding-bottom:.3em;margin:0 0 14px;line-height:1.68;font-weight:600}.plate-content .h1{font-size:32px}.plate-content .h2{font-size:24px}.plate-content .h3{font-size:20px;margin:0 0 14px;font-weight:600}.plate-content .h4{font-size:16px;margin:0 0 14px;font-weight:600}.plate-content .h5{font-size:14px;margin:0 0 14px;font-weight:600}.plate-content .h6{font-size:12px;margin:0 0 14px;font-weight:600;color:var(--fg-mute)}.plate-content .h1:after,.plate-content .h2:after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;background:var(--bg-sunken)}.plate-content .hr{display:flex;align-items:center;margin:14px 0;min-height:18px;user-select:none}.plate-content .hr:before,.plate-content .hr:after{content:"";flex:1;height:2px;background:var(--bg-sunken)}.plate-content .hr:before{margin-right:10px}.plate-content .hr:after{margin-left:10px}.plate-content code{font-family:Consolas,Courier New,monospace;font-size:.85em;padding:2px 4px;background:var(--code-inline-bg);border-radius:3px}.plate-content mark{background:var(--mark-bg);color:var(--mark-fg);border-radius:3px;padding:0 2px;font-weight:500}.plate-content .link{color:var(--accent);text-decoration:none;cursor:pointer}.plate-content .link:hover{text-decoration:underline}.plate-host.is-locked .plate-content{caret-color:transparent}.plate-content .p.task-list-item{display:flex;align-items:flex-start;gap:6px;list-style:none}.plate-content .p.task-list-item .task-list-checkbox{flex:0 0 auto;margin-top:3px}.plate-content .p.task-list-item .task-list-checkbox input{margin:0;cursor:pointer}.plate-content .task-list-text{flex:1;min-width:0}.plate-content .p.task-checked .task-list-text{color:var(--fg-weak);text-decoration:line-through}.plate-content .math-leaf{margin:0 0 14px;text-align:center}.plate-content .math-render .katex-display{margin:0}.plate-content .code-block-wrap{margin:0 0 14px}.plate-content .code-block-wrap>.code-editor{margin:0}.plate-content .code-block-wrap .diagram-box{margin-top:8px;padding:12px;border-radius:6px;background:var(--code-bg);border:1px solid var(--bd-soft);overflow:hidden}.plate-content .diagram-canvas{display:block}.plate-content .diagram-box svg{max-width:100%;height:auto}.plate-content .diagram-err{margin-top:6px;color:var(--danger);font-size:12px;font-family:Consolas,monospace;white-space:pre-wrap}.toast{position:fixed;left:50%;bottom:36px;transform:translate(-50%);z-index:100002;max-width:70vw;padding:9px 18px;border-radius:8px;background:#1f2328;color:var(--fg-on-strong);font-size:12.5px;line-height:1.5;box-shadow:0 6px 24px #0000004d;pointer-events:none;animation:cmark-toast-in .22s ease-out}@keyframes cmark-toast-in{0%{opacity:0;transform:translate(-50%) translateY(12px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.search-hit-mark{background:var(--mark-bg);color:var(--mark-fg);border-radius:2px;box-shadow:0 0 0 1px #ffd50080}.plate-content .ul,.plate-content .ol{padding-left:28px;margin:0 0 14px}.plate-host.is-source{flex:1;min-height:0;padding:20px;box-sizing:border-box;overflow-y:auto}.plate-host.is-source .source-editor{flex:1;width:100%;min-height:calc(100vh - 200px);padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--fg);font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;tab-size:2;white-space:pre-wrap;word-break:break-word}.search-bar{flex:0 0 auto;display:flex;align-items:center;gap:8px;height:48px;padding:0 14px;box-sizing:border-box;background:var(--bg-subtle);border-bottom:1px solid var(--bd-soft)}.search-bar-icon{display:flex;align-items:center;color:var(--fg-weak);flex:0 0 auto}.search-bar-input{flex:1;min-width:0;height:30px;padding:0 2px;border:none;outline:none;background:transparent;color:var(--fg);font-size:13px;font-family:inherit}.search-bar-input::placeholder{color:var(--fg-weak)}.search-bar-count{flex:0 0 auto;font-size:11.5px;color:var(--fg-weak);font-variant-numeric:tabular-nums}.search-bar-clear{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--fg-weak);cursor:pointer}.search-bar-clear:hover{background:#80808029;color:var(--fg)}.app{display:flex;flex-direction:row}.app:has(>.search-bar){flex-direction:column}.app:has(>.search-bar)>.app-body{flex:1;min-height:0;display:flex;flex-direction:row}.tree-collapse-fab{position:absolute;right:10px;bottom:58px;z-index:12;display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid rgba(128,128,128,.3);border-radius:50%;background:#fffffff5;color:var(--fg-dim);box-shadow:0 2px 8px #00000024;cursor:pointer;opacity:.5;transition:background .12s,color .12s,box-shadow .12s,opacity .12s}.tree-collapse-fab:hover{background:var(--bg-card);color:var(--fg);opacity:1;box-shadow:0 3px 12px #0003}.tree-collapse-fab:active{transform:translateY(1px)}.tree .row{position:relative}.tree .row .row-actions-slot{position:absolute;right:1px;top:0;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:1px;z-index:3}.tree .row .row-actions{display:flex;align-items:center;gap:1px}.tree .row .row-actions button{display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;line-height:1;border:none;border-radius:4px;background:transparent;color:#6b7280;cursor:pointer;opacity:.75;transition:background .1s,color .1s,opacity .1s}.tree .row .row-actions button:hover{background:#80808033;color:var(--fg);opacity:1}.plate-content .table-wrap{position:relative;margin:0 0 14px}.plate-content .table-wrap>.table{margin:0}.table-toolbar{position:absolute;top:-30px;left:0;z-index:20;display:flex;align-items:center;gap:1px;padding:3px;border-radius:6px;background:var(--bg-card);border:1px solid rgba(128,128,128,.28);box-shadow:0 3px 12px #00000024}.table-toolbar .tt-btn{display:flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--fg-dim);cursor:pointer}.table-toolbar .tt-btn:hover{background:#80808029;color:var(--fg)}.table-toolbar .tt-btn.danger{color:var(--danger)}.table-toolbar .tt-btn.danger:hover{background:#cf222e1a}.table-float-toolbar button{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;padding:0!important}.table-float-toolbar button svg{width:15px!important;height:15px!important}.plate-content table.table>caption.table-caption[hidden]{display:none}.table-caption .tc-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;padding:0;margin:0;border:none;background:transparent;color:var(--fg-dim);cursor:pointer;vertical-align:middle;border-radius:0}.table-caption .tc-btn svg{width:15px;height:15px}.table-caption .tc-btn:hover{background:#8080802e;color:var(--fg)}.table-caption .tc-btn.danger:hover{color:var(--danger);background:#cf222e1a}.plate-content table.table>caption.table-caption{line-height:0;padding:2px 0 0 2px}.plate-content table.table>caption.table-caption>button{margin-left:0}.plate-content table.table>caption.table-caption>span{margin:0;width:0}.code-block-wrap .code-head{position:absolute;top:6px;right:8px;display:flex;align-items:center;gap:6px;padding:2px 6px;font-size:11px;line-height:1;color:#6b7280;background:#f6f8faeb;border-radius:4px;user-select:none;z-index:3;opacity:.85}.code-block-wrap:hover .code-head{opacity:1;background:var(--bg-sunken)}.code-block-wrap pre.code-editor{padding-right:76px}.code-block-wrap .code-lang{letter-spacing:.2px}.code-block-wrap .code-copy{padding:0;border:none;background:transparent;color:var(--fg-weak);font-size:11px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s}.code-block-wrap:hover .code-copy{opacity:1}.code-block-wrap .code-copy:hover{color:var(--accent)}.block-img.is-broken{display:flex;align-items:center;justify-content:center;min-height:64px;margin:0 0 14px;padding:12px;border:1px dashed var(--bd);border-radius:4px;background:var(--bg-subtle)}.block-img .img-missing{font-size:12px;color:var(--fg-weak);word-break:break-all}.code-editor .token.comment,.code-editor .token.prolog,.code-editor .token.doctype,.code-editor .token.cdata{color:var(--fg-mute)}.code-editor .token.punctuation{color:var(--code-punc)}.code-editor .token.property,.code-editor .token.tag,.code-editor .token.boolean,.code-editor .token.number,.code-editor .token.constant,.code-editor .token.symbol,.code-editor .token.deleted{color:var(--code-number)}.code-editor .token.selector,.code-editor .token.attr-name,.code-editor .token.string,.code-editor .token.char,.code-editor .token.builtin,.code-editor .token.inserted{color:var(--code-string)}.code-editor .token.operator,.code-editor .token.entity,.code-editor .token.url,.code-editor .language-css .token.string,.code-editor .style .token.string{color:var(--code-keyword)}.code-editor .token.atrule,.code-editor .token.attr-value,.code-editor .token.keyword{color:var(--code-keyword);font-weight:600}.code-editor .token.function,.code-editor .token.class-name{color:var(--code-function)}.code-editor .token.regex,.code-editor .token.important,.code-editor .token.variable{color:var(--code-variable)}.code-editor[data-lang=mermaid] .token,.code-editor[data-lang=echarts] .token{color:inherit;font-weight:400}.code-editor .code-line,.code-block-wrap .code-line{padding:0;margin:0}.code-block-wrap .code-lang{position:absolute;z-index:2;right:44px;top:14px;height:26px;padding:0 9px;display:none;align-items:center;justify-content:center;box-sizing:border-box;background-color:var(--bg-card);border:1px solid var(--line);border-radius:4px;font-size:11px;line-height:24px;font-family:inherit;color:var(--fg);white-space:nowrap;word-break:keep-all;cursor:pointer;user-select:none;outline:none}.code-block-wrap:hover .code-lang,.code-block-wrap:focus-within .code-lang,.code-block-wrap.is-lang-open .code-lang{display:inline-flex}.code-block-wrap .code-lang:hover{border-color:var(--bd);color:var(--fg)}.code-block-wrap .code-lang:disabled,.code-block-wrap .code-lang.is-locked{color:var(--fg-weak);border-color:#f0f0f0;background-color:var(--code-bg);cursor:default;pointer-events:none}.code-lang-list{position:fixed;z-index:9999;box-sizing:border-box;width:150px;max-height:200px;overflow-x:hidden;overflow-y:auto;padding:2px 0;font-size:12px;background-color:var(--code-bg);border:1px solid var(--line);border-radius:4px;box-shadow:0 4px 14px #0000001a;user-select:none}.code-lang-list .code-lang-item{cursor:pointer;padding:3px 8px;box-sizing:border-box;color:var(--fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.code-lang-list .code-lang-item:hover,.code-lang-list .code-lang-item.on{background-color:#1976d214}.code-lang-list::-webkit-scrollbar{width:8px}.code-lang-list::-webkit-scrollbar-thumb{background:#00000029;border-radius:4px}.code-block-wrap .code-editor-copy{position:absolute;top:-12px;right:0;z-index:2;display:flex;align-items:center;justify-content:center;width:24px;height:24px;min-height:24px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--fg-weak);cursor:pointer;opacity:0;transition:opacity .14s,background-color .14s,color .14s}.code-block-wrap:hover .code-editor-copy,.code-block-wrap.active .code-editor-copy{opacity:1}.code-block-wrap .code-editor-copy:hover{background:#0000000f;color:var(--fg-dim)}.void-wrap{padding-top:10px;padding-bottom:10px;cursor:text}.code-block-wrap.void-wrap{padding-top:6px;padding-bottom:10px}.block-img.void-wrap,.hr.void-wrap{padding-top:10px;padding-bottom:10px}.void-wrap{position:relative}.void-gap{position:absolute;left:0;right:0;height:10px;z-index:1;cursor:text}.void-gap-top{top:0}.void-gap-bottom{bottom:0}.void-gap:before{content:"";position:absolute;left:0;right:0;height:2px;border-radius:1px;background-color:var(--insert-line);opacity:0;transition:opacity .1s ease}.void-gap-top:before{top:4px}.void-gap-bottom:before{bottom:4px}.void-gap:hover:before{opacity:1}.void-wrap.is-locked .void-gap:hover:before{opacity:0}.plate-host.is-source{display:flex;flex-direction:row;align-items:stretch}.plate-host.is-source .source-gutter{flex:0 0 auto;padding:0 6px 0 0;box-sizing:border-box;overflow:hidden;text-align:right;user-select:none;font-family:Consolas,Courier New,monospace;font-size:13px;line-height:1.65;color:#b8bec6;background:transparent}.source-gutter-inner{will-change:transform}.source-ln{line-height:1.65;font-size:13px;white-space:nowrap}.plate-host.is-source .source-editor{padding-left:10px;border-left:1px solid #eceff2}.math-leaf{position:relative;cursor:pointer}.math-leaf:hover .math-render{background:#00000005;border-radius:4px}.block-img{position:relative}.block-img img{cursor:pointer}.img-tools{position:absolute;z-index:60;top:8px;left:8px;display:flex;align-items:center;gap:6px;padding:6px 8px;background:#fffffff7;border:1px solid var(--bd);border-radius:7px;box-shadow:0 6px 20px #00000024}.img-tools-input{width:180px;height:24px;padding:0 8px;box-sizing:border-box;border:1px solid var(--bd);border-radius:5px;outline:none;font-size:12px;font-family:inherit;color:var(--fg)}.img-tools-input:focus{border-color:#0969da}.img-tools-btn{height:24px;padding:0 10px;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);font-size:12px;font-family:inherit;color:var(--fg);cursor:pointer;white-space:nowrap}.img-tools-btn:hover{background:var(--bg-subtle)}.img-tools-btn.danger{color:var(--danger);border-color:#f0c4c4}.img-tools-btn.danger:hover{background:var(--danger-bg)}.editor-card .block-img .img-zoom,.editor-card .inline-img .img-zoom{display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;background:#0003;backdrop-filter:blur(12px) saturate(1.15);border:0;border-radius:6px}.editor-card .img-zoom-range{width:76px;height:14px;margin:0;cursor:pointer;accent-color:#ffffff}.editor-card .img-zoom-val{font-size:11px;line-height:1;color:#ffffffe6;min-width:32px;text-align:right;font-variant-numeric:tabular-nums;user-select:none}:root[data-theme=dark] .code-mermaid-render svg .node rect,:root[data-theme=dark] .code-mermaid-render svg .node polygon,:root[data-theme=dark] .code-mermaid-render svg .node circle,:root[data-theme=dark] .code-mermaid-render svg .node ellipse,:root[data-theme=dark] .code-mermaid-render svg .actor{fill:#21262d!important;stroke:#58a6ff!important}:root[data-theme=dark] .code-mermaid-render svg text,:root[data-theme=dark] .code-mermaid-render svg .nodeLabel,:root[data-theme=dark] .code-mermaid-render svg .label,:root[data-theme=dark] .code-mermaid-render svg tspan{fill:#e6edf3!important;color:#e6edf3!important}:root[data-theme=dark] .code-mermaid-render svg .edgePath path,:root[data-theme=dark] .code-mermaid-render svg path.flowchart-link,:root[data-theme=dark] .code-mermaid-render svg .messageLine0,:root[data-theme=dark] .code-mermaid-render svg .messageLine1,:root[data-theme=dark] .code-mermaid-render svg .relation,:root[data-theme=dark] .code-mermaid-render svg line{stroke:#8b949e!important}:root[data-theme=dark] .code-mermaid-render svg marker path,:root[data-theme=dark] .code-mermaid-render svg .arrowheadPath,:root[data-theme=dark] .code-mermaid-render svg .marker{fill:#8b949e!important;stroke:#8b949e!important}:root[data-theme=dark] .code-mermaid-render svg .edgeLabel rect,:root[data-theme=dark] .code-mermaid-render svg .cluster rect,:root[data-theme=dark] .code-mermaid-render svg .note{fill:#161b22!important;stroke:#30363d!important}:root[data-theme=dark] .code-mermaid-render svg .cluster span,:root[data-theme=dark] .code-mermaid-render svg .cluster-label text{fill:#9aa4b2!important}.code-editor.is-source-hidden{display:none}.diagram-box{position:relative;text-align:center;display:flex;justify-content:center}.diagram-canvas{position:relative;display:inline-block;max-width:100%;text-align:center}.diagram-canvas.is-full{display:block;width:100%}.diagram-canvas.is-full>svg,.diagram-canvas.is-full .diagram-box>svg{width:100%}.diagram-canvas>svg,.diagram-box>svg,.code-mermaid-render svg{display:block;margin:0 auto;max-width:100%}.diagram-canvas>div{display:block}.diagram-code-toggle{position:absolute;top:6px;right:8px;z-index:4;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--bd-soft);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);line-height:1;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .15s,background .15s,color .15s,border-color .15s;box-shadow:0 1px 4px #0000002e}.diagram-code-toggle.is-on{opacity:1;pointer-events:auto;color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}.diagram-box:hover .diagram-code-toggle,.code-block-wrap:hover .diagram-code-toggle,.diagram-code-toggle:focus-visible{opacity:1;pointer-events:auto}.diagram-box:hover .diagram-code-toggle.is-on{color:var(--accent);background:var(--accent-soft)}.diagram-code-toggle:hover{background:var(--bg-hover);color:var(--fg);border-color:var(--accent)}.code-block-wrap .diagram-box .diagram-code-toggle+*{margin-top:0}.editor-card table th,.plate-content .table-cell[data-header=true]{background:var(--bg-subtle);font-weight:600}.math-canvas{position:relative;display:inline-block;max-width:100%;text-align:center}.math-toggle{position:absolute;top:-9px;right:-8px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s,background .12s,color .12s,border-color .12s;box-shadow:0 1px 4px #0000002e}.math-canvas:hover .math-toggle,.math-toggle:focus-visible{opacity:1;pointer-events:auto}.math-toggle:hover{background:var(--accent);border-color:var(--accent);color:#fff}.math-source{display:block;width:100%;min-width:260px;max-width:100%;box-sizing:border-box;margin:8px 0 0;padding:8px 10px;border:1px solid var(--bd);border-radius:6px;background:var(--code-bg);color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.55;text-align:left;resize:vertical;outline:none}.math-source:focus{border-color:var(--accent)}.math-leaf.is-editing .math-render{opacity:.55}.editor-card table tr:first-child td,.plate-content .table tr:first-child .table-cell{background:var(--table-row-base);font-weight:600}.editor-card table th{background:var(--table-head-bg);border-bottom:2px solid var(--table-head-bd);color:var(--fg-strong);letter-spacing:.01em}.eq-mask{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;background:#0000006b;animation:eq-fade .12s ease}@keyframes eq-fade{0%{opacity:0}to{opacity:1}}.eq-dialog{width:560px;max-width:calc(100vw - 48px);max-height:calc(100vh - 80px);display:flex;flex-direction:column;background:var(--bg-card);border:1px solid var(--bd);border-radius:10px;box-shadow:0 16px 48px #00000061;overflow:hidden}.eq-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--bd-soft)}.eq-title{font-size:13px;font-weight:600;color:var(--fg)}.eq-x{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--fg-dim);cursor:pointer}.eq-x:hover{background:var(--bg-hover);color:var(--fg)}.eq-preview{position:relative;min-height:78px;margin:12px 14px 0;padding:14px 16px;display:flex;align-items:center;justify-content:center;background:var(--code-bg);border:1px solid var(--bd-soft);border-radius:8px;color:var(--fg);overflow-x:auto}.eq-preview .katex-display{margin:0}.eq-empty{position:absolute;font-size:12px;color:var(--fg-weak);pointer-events:none}.eq-input{display:block;box-sizing:border-box;width:calc(100% - 28px);min-height:92px;margin:10px 14px 0;padding:10px 12px;background:var(--code-bg);border:1px solid var(--bd);border-radius:8px;color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.6;resize:vertical;outline:none}.eq-input:focus{border-color:var(--accent)}.eq-foot{display:flex;align-items:center;gap:8px;padding:12px 14px}.eq-hint{margin-right:auto;font-size:11.5px;color:var(--fg-weak)}.eq-btn{height:28px;padding:0 14px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);color:var(--fg);font-family:inherit;font-size:12.5px;cursor:pointer}.eq-btn:hover{background:var(--bg-hover)}.eq-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.eq-btn.primary:hover{filter:brightness(1.08)}.math-inline{position:relative;display:inline-block}.math-inline-toggle{position:absolute;top:-15px;right:-7px;z-index:5;display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;padding:0;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s,background .12s,color .12s}.math-inline:hover .math-inline-toggle,.math-inline-toggle:focus-visible{opacity:1;pointer-events:auto}.math-inline-toggle:hover{background:var(--accent);border-color:var(--accent);color:#fff}.table-code-panel{position:absolute;top:calc(100% + 2px);left:0;right:0;width:auto;z-index:50;border-color:var(--table-bd);display:flex;flex-direction:column;max-height:300px;background:var(--bg-card);border:1px solid var(--bd);border-radius:8px;box-shadow:0 12px 32px #0000004d;overflow:hidden}.table-code-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-bottom:1px solid var(--bd-soft);font-size:11.5px;color:var(--fg-dim)}.table-code-acts{display:inline-flex;gap:6px}.tcp-btn{height:22px;padding:0 8px;border:1px solid var(--bd);border-radius:5px;background:var(--bg-card);color:var(--fg-dim);font-family:inherit;font-size:11px;cursor:pointer}.tcp-btn:hover{background:var(--bg-hover);color:var(--fg)}.table-code-body{display:block;box-sizing:border-box;width:100%;min-height:72px;max-height:60vh;margin:0;padding:10px 12px;border:none;outline:none;resize:none;background:var(--code-bg);color:var(--fg);font-family:Cascadia Code,Consolas,Courier New,monospace;font-size:12px;line-height:1.6;white-space:pre;overflow:auto}.table-code-err{padding:6px 12px 8px;color:var(--danger);font-size:11.5px}.tcp-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.tcp-btn.primary:hover{filter:brightness(1.08)}.tcp-btn:disabled{opacity:.45;cursor:default;filter:none}:is(.table-caption,.table-sticky-bar) .tc-btn.tc-right-first,.tc-btn.tc-right-first{margin-left:auto}.tc-btn.tc-right{margin-left:0;margin-right:0}.editor-card table tr:nth-child(odd) td,.plate-content .table tr:nth-child(odd) .table-cell{background:var(--table-row-base)}.editor-card table tr:nth-child(2n) td,.plate-content .table tr:nth-child(2n) .table-cell{background:var(--table-row-alt)}.editor-card table td .p,.editor-card table th .p,.editor-card table td>p,.editor-card table th>p,.plate-content .table-cell .p,.plate-content .table-cell>p{margin:0;line-height:1.55}.editor-card table td,.editor-card table th,.plate-content .table-cell{vertical-align:middle}.table-wrap{padding-top:10px}.table-sticky-bar.is-hidden{display:none}.table-sticky-bar.is-active{background:var(--bg-subtle)}.table-sticky-bar.is-pinned{z-index:40;box-shadow:0 2px 8px #0000002e}.table-sticky-bar{position:absolute;top:-20px;left:0;right:0;z-index:25;display:flex;align-items:center;height:30px;margin-bottom:2px;box-sizing:border-box;background:var(--bg-sunken);border-radius:6px 6px 0 0;box-shadow:0 1px 0 var(--bd-soft);user-select:none}.slate-editor.plate-content{overflow:visible}:is(.table-caption,.table-sticky-bar) .tc-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;padding:0;margin:0;border:none;background:transparent;color:var(--fg-dim);cursor:pointer;border-radius:4px}:is(.table-caption,.table-sticky-bar) .tc-btn svg{width:15px;height:15px}:is(.table-caption,.table-sticky-bar) .tc-btn:hover{background:#8080802e;color:var(--fg)}:is(.table-caption,.table-sticky-bar) .tc-btn.danger:hover{color:var(--danger);background:#cf222e1a}.table-sticky-bar>span,.editor-card table caption>span{position:relative;margin-left:8px}.table-sticky-bar>span:after,.editor-card table caption>span:after{content:"";position:absolute;top:4px;left:0;width:1px;height:16px;background-color:var(--bd)}.tc-btn.is-dirty{color:var(--accent)}.tc-btn.is-dirty:hover{background:var(--accent-soft);color:var(--accent)}.tc-btn.is-on{color:var(--accent);background:var(--accent-soft)}.table-code-panel{padding:0}.table-code-body{border-radius:8px}.table-wrap.is-bar-open .void-gap:before{opacity:0!important}.code-block-wrap{position:relative}.code-block-wrap>.code-editor-copy{position:absolute;top:14px;right:10px;display:none;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--bd-soft);border-radius:6px;background:var(--bg-card);color:var(--fg-dim);cursor:pointer;z-index:4}.code-block-wrap:hover>.code-editor-copy,.code-block-wrap:focus-within>.code-editor-copy,.code-block-wrap.is-lang-open>.code-editor-copy{display:inline-flex}.code-block-wrap>.code-editor-copy:hover{color:var(--accent);border-color:var(--accent)}.code-block-wrap>.code-editor-copy>svg{width:15px;height:15px;color:inherit}.code-block-wrap.is-source-hidden>.code-editor-copy,.code-block-wrap.is-source-hidden>.code-lang{display:none!important}.code-lang-list .code-lang-item:hover{background-color:var(--accent-soft);color:var(--accent)}.code-lang-list .code-lang-item.on{background-color:var(--accent-soft);color:var(--accent);font-weight:500;box-shadow:inset 2px 0 0 var(--accent)}[data-theme=dark] .code-lang-list .code-lang-item:hover{background-color:#58a6ff38;color:#b6e3ff}[data-theme=dark] .code-lang-list .code-lang-item.on{background-color:#58a6ff29;color:#8ed0ff;box-shadow:inset 2px 0 #58a6ff}[data-theme=dark] .code-lang-list{border-color:#3d444d;box-shadow:0 8px 24px #0000008c}[data-theme=dark] .sidebar{border-right-color:#1b2129;box-shadow:inset -14px 0 20px -16px #000000a6}[data-theme=dark] .plate-host{box-shadow:inset 0 1px #ffffff09}[data-theme=dark] .main{border-top-color:#1b2129}[data-theme=dark] ::-webkit-scrollbar{width:10px;height:10px}[data-theme=dark] ::-webkit-scrollbar-track{background:transparent}[data-theme=dark] ::-webkit-scrollbar-thumb{background:#2b333d;border:2px solid transparent;border-radius:6px;background-clip:padding-box}[data-theme=dark] ::-webkit-scrollbar-thumb:hover{background:#3d4650;background-clip:padding-box}[data-theme=dark] ::-webkit-scrollbar-corner{background:transparent}.sidebar .row:not(.active):hover,.sidebar .iconbtn:not(.on):hover,.sidebar .footer button:hover,.sidebar .tree-collapse-fab:hover,.branch-bar .zbb-btn:hover,.branch-bar .zbb-branch:hover,.header .iconbtn:not(.on):hover,.tb-btn:not(.on):hover{background:var(--accent-soft);color:var(--accent)}.sidebar .row:not(.active):hover svg,.sidebar .iconbtn:not(.on):hover svg,.sidebar .footer button:hover svg,.branch-bar .zbb-btn:hover svg,.branch-bar .zbb-branch:hover svg,.header .iconbtn:not(.on):hover svg,.tb-btn:not(.on):hover svg{color:currentColor}[data-theme=dark] .branch-bar .zbb-btn:hover svg,[data-theme=dark] .branch-bar .zbb-branch:hover svg{color:#b6e3ff}[data-theme=dark] .branch-bar .zbb-branch:hover .zbb-bname{color:#b6e3ff}.branch-bar .zbb-branch:hover .zbb-bname{color:var(--accent)}.tree .row .row-actions button:hover{background:#58a6ff4d;color:var(--accent)}[data-theme=dark] .tree .row .row-actions button:hover{background:#58a6ff61;color:#d6efff}.zgp-b:not(.primary):not(.danger):hover,.gp-close:hover,.zgp-close:hover,.zgp-file:hover,.zgp-cm:hover,.zgp-cmf:hover,.zgp-jumpbar button:hover,.zgp-ic:hover{background:var(--hover-bg);color:var(--hover-fg)}.zgp-tab:hover,.zgs-tab:hover{color:var(--hover-fg);background:var(--hover-bg)}.zgp-pane .more-segbtn:hover,.zgp-pane .zgs-seg button:hover,.zgp-chip:hover,.zgp-pane .zgs-kv button:hover{background:var(--hover-bg);color:var(--hover-fg)}.settings-panel .zgp-drawer.open,#zgs-root .zgp-drawer.open{max-height:6000px}#zgs-body{padding-bottom:28px}.app-toast{position:fixed;left:50%;bottom:34px;transform:translate(-50%);z-index:100002;max-width:min(520px,86vw);padding:9px 16px;border-radius:9px;background:#1f2328f5;color:#f0f6fc;font-size:12.5px;line-height:1.5;box-shadow:0 8px 26px #00000061;pointer-events:none;animation:app-toast-in .18s cubic-bezier(.2,.8,.2,1)}.app-toast.err{background:#7a2024f5}@keyframes app-toast-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}} diff --git a/plugins/cmark/assets/index-gXcPZzff.js b/plugins/cmark/assets/index-gXcPZzff.js new file mode 100644 index 000000000..6949ba389 --- /dev/null +++ b/plugins/cmark/assets/index-gXcPZzff.js @@ -0,0 +1,758 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid-C_q9pug0.js","./markdown-DVehI1Sg.js"])))=>i.map(i=>d[i]); +import{aL as Rr,aK as ph,aD as kk}from"./mermaid-C_q9pug0.js";import{m as x$,_ as b$,k as G4}from"./markdown-DVehI1Sg.js";function w$(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var jg={exports:{}},Mf={},qg={exports:{}},yn={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Dk;function E$(){if(Dk)return yn;Dk=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function m(Q){return Q===null||typeof Q!="object"?null:(Q=h&&Q[h]||Q["@@iterator"],typeof Q=="function"?Q:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function E(Q,re,K){this.props=Q,this.context=re,this.refs=y,this.updater=K||g}E.prototype.isReactComponent={},E.prototype.setState=function(Q,re){if(typeof Q!="object"&&typeof Q!="function"&&Q!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Q,re,"setState")},E.prototype.forceUpdate=function(Q){this.updater.enqueueForceUpdate(this,Q,"forceUpdate")};function C(){}C.prototype=E.prototype;function x(Q,re,K){this.props=Q,this.context=re,this.refs=y,this.updater=K||g}var S=x.prototype=new C;S.constructor=x,b(S,E.prototype),S.isPureReactComponent=!0;var O=Array.isArray,_=Object.prototype.hasOwnProperty,w={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function A(Q,re,K){var Be,ze={},$e=null,je=null;if(re!=null)for(Be in re.ref!==void 0&&(je=re.ref),re.key!==void 0&&($e=""+re.key),re)_.call(re,Be)&&!T.hasOwnProperty(Be)&&(ze[Be]=re[Be]);var Fe=arguments.length-2;if(Fe===1)ze.children=K;else if(1>>1,re=ne[Q];if(0>>1;Qi(ze,j))$ei(je,ze)?(ne[Q]=je,ne[$e]=j,Q=$e):(ne[Q]=ze,ne[Be]=j,Q=Be);else if($ei(je,j))ne[Q]=je,ne[$e]=j,Q=$e;else break e}}return me}function i(ne,me){var j=ne.sortIndex-me.sortIndex;return j!==0?j:ne.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],f=1,h=null,m=3,g=!1,b=!1,y=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(ne){for(var me=n(u);me!==null;){if(me.callback===null)r(u);else if(me.startTime<=ne)r(u),me.sortIndex=me.expirationTime,t(l,me);else break;me=n(u)}}function O(ne){if(y=!1,S(ne),!b)if(n(l)!==null)b=!0,fe(_);else{var me=n(u);me!==null&&ue(O,me.startTime-ne)}}function _(ne,me){b=!1,y&&(y=!1,C(A),A=-1),g=!0;var j=m;try{for(S(me),h=n(l);h!==null&&(!(h.expirationTime>me)||ne&&!F());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,m=h.priorityLevel;var re=Q(h.expirationTime<=me);me=e.unstable_now(),typeof re=="function"?h.callback=re:h===n(l)&&r(l),S(me)}else r(l);h=n(l)}if(h!==null)var K=!0;else{var Be=n(u);Be!==null&&ue(O,Be.startTime-me),K=!1}return K}finally{h=null,m=j,g=!1}}var w=!1,T=null,A=-1,P=5,I=-1;function F(){return!(e.unstable_now()-Ine||125Q?(ne.sortIndex=j,t(u,ne),n(l)===null&&ne===n(u)&&(y?(C(A),A=-1):y=!0,ue(O,j-Q))):(ne.sortIndex=re,t(l,ne),b||g||(b=!0,fe(_))),ne},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(ne){var me=m;return function(){var j=m;m=me;try{return ne.apply(this,arguments)}finally{m=j}}}})(Ug)),Ug}var Nk;function _$(){return Nk||(Nk=1,Vg.exports=S$()),Vg.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ok;function A$(){if(Ok)return Vi;Ok=1;var e=Mc(),t=_$();function n(c){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;v"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function m(c){return l.call(h,c)?!0:l.call(f,c)?!1:u.test(c)?h[c]=!0:(f[c]=!0,!1)}function g(c,d,v,k){if(v!==null&&v.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return k?!1:v!==null?!v.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function b(c,d,v,k){if(d===null||typeof d>"u"||g(c,d,v,k))return!0;if(k)return!1;if(v!==null)switch(v.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function y(c,d,v,k,N,R,G){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=k,this.attributeNamespace=N,this.mustUseProperty=v,this.propertyName=c,this.type=d,this.sanitizeURL=R,this.removeEmptyString=G}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){E[c]=new y(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var d=c[0];E[d]=new y(d,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){E[c]=new y(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){E[c]=new y(c,2,!1,c,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){E[c]=new y(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){E[c]=new y(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){E[c]=new y(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){E[c]=new y(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){E[c]=new y(c,5,!1,c.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function x(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var d=c.replace(C,x);E[d]=new y(d,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var d=c.replace(C,x);E[d]=new y(d,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var d=c.replace(C,x);E[d]=new y(d,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){E[c]=new y(c,1,!1,c.toLowerCase(),null,!1,!1)}),E.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){E[c]=new y(c,1,!1,c.toLowerCase(),null,!0,!0)});function S(c,d,v,k){var N=E.hasOwnProperty(d)?E[d]:null;(N!==null?N.type!==0:k||!(2ce||N[G]!==R[ce]){var ve=` +`+N[G].replace(" at new "," at ");return c.displayName&&ve.includes("")&&(ve=ve.replace("",c.displayName)),ve}while(1<=G&&0<=ce);break}}}finally{K=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?re(c):""}function ze(c){switch(c.tag){case 5:return re(c.type);case 16:return re("Lazy");case 13:return re("Suspense");case 19:return re("SuspenseList");case 0:case 2:case 15:return c=Be(c.type,!1),c;case 11:return c=Be(c.type.render,!1),c;case 1:return c=Be(c.type,!0),c;default:return""}}function $e(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case T:return"Fragment";case w:return"Portal";case P:return"Profiler";case A:return"StrictMode";case W:return"Suspense";case ee:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case F:return(c.displayName||"Context")+".Consumer";case I:return(c._context.displayName||"Context")+".Provider";case M:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case U:return d=c.displayName||null,d!==null?d:$e(c.type)||"Memo";case fe:d=c._payload,c=c._init;try{return $e(c(d))}catch{}}return null}function je(c){var d=c.type;switch(c.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=d.render,c=c.displayName||c.name||"",d.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(d);case 8:return d===A?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function Fe(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function Me(c){var d=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function ge(c){var d=Me(c)?"checked":"value",v=Object.getOwnPropertyDescriptor(c.constructor.prototype,d),k=""+c[d];if(!c.hasOwnProperty(d)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var N=v.get,R=v.set;return Object.defineProperty(c,d,{configurable:!0,get:function(){return N.call(this)},set:function(G){k=""+G,R.call(this,G)}}),Object.defineProperty(c,d,{enumerable:v.enumerable}),{getValue:function(){return k},setValue:function(G){k=""+G},stopTracking:function(){c._valueTracker=null,delete c[d]}}}}function Oe(c){c._valueTracker||(c._valueTracker=ge(c))}function se(c){if(!c)return!1;var d=c._valueTracker;if(!d)return!0;var v=d.getValue(),k="";return c&&(k=Me(c)?c.checked?"true":"false":c.value),c=k,c!==v?(d.setValue(c),!0):!1}function we(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function _e(c,d){var v=d.checked;return j({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??c._wrapperState.initialChecked})}function Ee(c,d){var v=d.defaultValue==null?"":d.defaultValue,k=d.checked!=null?d.checked:d.defaultChecked;v=Fe(d.value!=null?d.value:v),c._wrapperState={initialChecked:k,initialValue:v,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function qe(c,d){d=d.checked,d!=null&&S(c,"checked",d,!1)}function Ue(c,d){qe(c,d);var v=Fe(d.value),k=d.type;if(v!=null)k==="number"?(v===0&&c.value===""||c.value!=v)&&(c.value=""+v):c.value!==""+v&&(c.value=""+v);else if(k==="submit"||k==="reset"){c.removeAttribute("value");return}d.hasOwnProperty("value")?rt(c,d.type,v):d.hasOwnProperty("defaultValue")&&rt(c,d.type,Fe(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(c.defaultChecked=!!d.defaultChecked)}function tt(c,d,v){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var k=d.type;if(!(k!=="submit"&&k!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+c._wrapperState.initialValue,v||d===c.value||(c.value=d),c.defaultValue=d}v=c.name,v!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,v!==""&&(c.name=v)}function rt(c,d,v){(d!=="number"||we(c.ownerDocument)!==c)&&(v==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+v&&(c.defaultValue=""+v))}var lt=Array.isArray;function ut(c,d,v,k){if(c=c.options,d){d={};for(var N=0;N"+d.valueOf().toString()+"",d=Y.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;d.firstChild;)c.appendChild(d.firstChild)}});function ct(c,d){if(d){var v=c.firstChild;if(v&&v===c.lastChild&&v.nodeType===3){v.nodeValue=d;return}}c.textContent=d}var dn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rn=["Webkit","ms","Moz","O"];Object.keys(dn).forEach(function(c){rn.forEach(function(d){d=d+c.charAt(0).toUpperCase()+c.substring(1),dn[d]=dn[c]})});function Lt(c,d,v){return d==null||typeof d=="boolean"||d===""?"":v||typeof d!="number"||d===0||dn.hasOwnProperty(c)&&dn[c]?(""+d).trim():d+"px"}function Ye(c,d){c=c.style;for(var v in d)if(d.hasOwnProperty(v)){var k=v.indexOf("--")===0,N=Lt(v,d[v],k);v==="float"&&(v="cssFloat"),k?c.setProperty(v,N):c[v]=N}}var Hr=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xi(c,d){if(d){if(Hr[c]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,c));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function Qi(c,d){if(c.indexOf("-")===-1)return typeof d.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hi=null;function Fi(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var pr=null,ii=null,ir=null;function Er(c){if(c=Ef(c)){if(typeof pr!="function")throw Error(n(280));var d=c.stateNode;d&&(d=T0(d),pr(c.stateNode,c.type,d))}}function pe(c){ii?ir?ir.push(c):ir=[c]:ii=c}function Re(){if(ii){var c=ii,d=ir;if(ir=ii=null,Er(c),d)for(c=0;c>>=0,c===0?32:31-(Sr(c)/Oo|0)|0}var Wr=64,Ha=4194304;function aa(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function oa(c,d){var v=c.pendingLanes;if(v===0)return 0;var k=0,N=c.suspendedLanes,R=c.pingedLanes,G=v&268435455;if(G!==0){var ce=G&~N;ce!==0?k=aa(ce):(R&=G,R!==0&&(k=aa(R)))}else G=v&~N,G!==0?k=aa(G):R!==0&&(k=aa(R));if(k===0)return 0;if(d!==0&&d!==k&&(d&N)===0&&(N=k&-k,R=d&-d,N>=R||N===16&&(R&4194240)!==0))return d;if((k&4)!==0&&(k|=v&16),d=c.entangledLanes,d!==0)for(c=c.entanglements,d&=k;0v;v++)d.push(c);return d}function Ms(c,d,v){c.pendingLanes|=d,d!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,d=31-Hn(d),c[d]=v}function Mi(c,d){var v=c.pendingLanes&~d;c.pendingLanes=d,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=d,c.mutableReadLanes&=d,c.entangledLanes&=d,d=c.entanglements;var k=c.eventTimes;for(c=c.expirationTimes;0=hf),vC=" ",yC=!1;function xC(c,d){switch(c){case"keyup":return pq.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bC(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Pu=!1;function gq(c,d){switch(c){case"compositionend":return bC(d);case"keypress":return d.which!==32?null:(yC=!0,vC);case"textInput":return c=d.data,c===vC&&yC?null:c;default:return null}}function vq(c,d){if(Pu)return c==="compositionend"||!b1&&xC(c,d)?(c=fC(),y0=p1=Bo=null,Pu=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:v,offset:d-c};c=k}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=_C(v)}}function TC(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?TC(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function NC(){for(var c=window,d=we();d instanceof c.HTMLIFrameElement;){try{var v=typeof d.contentWindow.location.href=="string"}catch{v=!1}if(v)c=d.contentWindow;else break;d=we(c.document)}return d}function C1(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}function Sq(c){var d=NC(),v=c.focusedElem,k=c.selectionRange;if(d!==v&&v&&v.ownerDocument&&TC(v.ownerDocument.documentElement,v)){if(k!==null&&C1(v)){if(d=k.start,c=k.end,c===void 0&&(c=d),"selectionStart"in v)v.selectionStart=d,v.selectionEnd=Math.min(c,v.value.length);else if(c=(d=v.ownerDocument||document)&&d.defaultView||window,c.getSelection){c=c.getSelection();var N=v.textContent.length,R=Math.min(k.start,N);k=k.end===void 0?R:Math.min(k.end,N),!c.extend&&R>k&&(N=k,k=R,R=N),N=AC(v,R);var G=AC(v,k);N&&G&&(c.rangeCount!==1||c.anchorNode!==N.node||c.anchorOffset!==N.offset||c.focusNode!==G.node||c.focusOffset!==G.offset)&&(d=d.createRange(),d.setStart(N.node,N.offset),c.removeAllRanges(),R>k?(c.addRange(d),c.extend(G.node,G.offset)):(d.setEnd(G.node,G.offset),c.addRange(d)))}}for(d=[],c=v;c=c.parentNode;)c.nodeType===1&&d.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,Ru=null,k1=null,vf=null,D1=!1;function OC(c,d,v){var k=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;D1||Ru==null||Ru!==we(k)||(k=Ru,"selectionStart"in k&&C1(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),vf&&gf(vf,k)||(vf=k,k=S0(k1,"onSelect"),0zu||(c.current=M1[zu],M1[zu]=null,zu--)}function Qn(c,d){zu++,M1[zu]=c.current,c.current=d}var Io={},mi=Fo(Io),Li=Fo(!1),Al=Io;function ju(c,d){var v=c.type.contextTypes;if(!v)return Io;var k=c.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===d)return k.__reactInternalMemoizedMaskedChildContext;var N={},R;for(R in v)N[R]=d[R];return k&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=d,c.__reactInternalMemoizedMaskedChildContext=N),N}function zi(c){return c=c.childContextTypes,c!=null}function N0(){tr(Li),tr(mi)}function WC(c,d,v){if(mi.current!==Io)throw Error(n(168));Qn(mi,d),Qn(Li,v)}function KC(c,d,v){var k=c.stateNode;if(d=d.childContextTypes,typeof k.getChildContext!="function")return v;k=k.getChildContext();for(var N in k)if(!(N in d))throw Error(n(108,je(c)||"Unknown",N));return j({},v,k)}function O0(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Io,Al=mi.current,Qn(mi,c),Qn(Li,Li.current),!0}function GC(c,d,v){var k=c.stateNode;if(!k)throw Error(n(169));v?(c=KC(c,d,Al),k.__reactInternalMemoizedMergedChildContext=c,tr(Li),tr(mi),Qn(mi,c)):tr(Li),Qn(Li,v)}var Ya=null,B0=!1,L1=!1;function YC(c){Ya===null?Ya=[c]:Ya.push(c)}function Lq(c){B0=!0,YC(c)}function Mo(){if(!L1&&Ya!==null){L1=!0;var c=0,d=En;try{var v=Ya;for(En=1;c>=G,N-=G,Ja=1<<32-Hn(d)+N|v<Xt?(Jr=jt,jt=null):Jr=jt.sibling;var Pn=We(Ae,jt,Te[Xt],nt);if(Pn===null){jt===null&&(jt=Jr);break}c&&jt&&Pn.alternate===null&&d(Ae,jt),xe=R(Pn,xe,Xt),zt===null?Ot=Pn:zt.sibling=Pn,zt=Pn,jt=Jr}if(Xt===Te.length)return v(Ae,jt),or&&Nl(Ae,Xt),Ot;if(jt===null){for(;XtXt?(Jr=jt,jt=null):Jr=jt.sibling;var Wo=We(Ae,jt,Pn.value,nt);if(Wo===null){jt===null&&(jt=Jr);break}c&&jt&&Wo.alternate===null&&d(Ae,jt),xe=R(Wo,xe,Xt),zt===null?Ot=Wo:zt.sibling=Wo,zt=Wo,jt=Jr}if(Pn.done)return v(Ae,jt),or&&Nl(Ae,Xt),Ot;if(jt===null){for(;!Pn.done;Xt++,Pn=Te.next())Pn=Xe(Ae,Pn.value,nt),Pn!==null&&(xe=R(Pn,xe,Xt),zt===null?Ot=Pn:zt.sibling=Pn,zt=Pn);return or&&Nl(Ae,Xt),Ot}for(jt=k(Ae,jt);!Pn.done;Xt++,Pn=Te.next())Pn=xt(jt,Ae,Xt,Pn.value,nt),Pn!==null&&(c&&Pn.alternate!==null&&jt.delete(Pn.key===null?Xt:Pn.key),xe=R(Pn,xe,Xt),zt===null?Ot=Pn:zt.sibling=Pn,zt=Pn);return c&&jt.forEach(function(y$){return d(Ae,y$)}),or&&Nl(Ae,Xt),Ot}function _r(Ae,xe,Te,nt){if(typeof Te=="object"&&Te!==null&&Te.type===T&&Te.key===null&&(Te=Te.props.children),typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case _:e:{for(var Ot=Te.key,zt=xe;zt!==null;){if(zt.key===Ot){if(Ot=Te.type,Ot===T){if(zt.tag===7){v(Ae,zt.sibling),xe=N(zt,Te.props.children),xe.return=Ae,Ae=xe;break e}}else if(zt.elementType===Ot||typeof Ot=="object"&&Ot!==null&&Ot.$$typeof===fe&&t5(Ot)===zt.type){v(Ae,zt.sibling),xe=N(zt,Te.props),xe.ref=Cf(Ae,zt,Te),xe.return=Ae,Ae=xe;break e}v(Ae,zt);break}else d(Ae,zt);zt=zt.sibling}Te.type===T?(xe=Ll(Te.props.children,Ae.mode,nt,Te.key),xe.return=Ae,Ae=xe):(nt=ah(Te.type,Te.key,Te.props,null,Ae.mode,nt),nt.ref=Cf(Ae,xe,Te),nt.return=Ae,Ae=nt)}return G(Ae);case w:e:{for(zt=Te.key;xe!==null;){if(xe.key===zt)if(xe.tag===4&&xe.stateNode.containerInfo===Te.containerInfo&&xe.stateNode.implementation===Te.implementation){v(Ae,xe.sibling),xe=N(xe,Te.children||[]),xe.return=Ae,Ae=xe;break e}else{v(Ae,xe);break}else d(Ae,xe);xe=xe.sibling}xe=Fg(Te,Ae.mode,nt),xe.return=Ae,Ae=xe}return G(Ae);case fe:return zt=Te._init,_r(Ae,xe,zt(Te._payload),nt)}if(lt(Te))return Dt(Ae,xe,Te,nt);if(me(Te))return Tt(Ae,xe,Te,nt);I0(Ae,Te)}return typeof Te=="string"&&Te!==""||typeof Te=="number"?(Te=""+Te,xe!==null&&xe.tag===6?(v(Ae,xe.sibling),xe=N(xe,Te),xe.return=Ae,Ae=xe):(v(Ae,xe),xe=Rg(Te,Ae.mode,nt),xe.return=Ae,Ae=xe),G(Ae)):v(Ae,xe)}return _r}var Uu=n5(!0),r5=n5(!1),M0=Fo(null),L0=null,Hu=null,U1=null;function H1(){U1=Hu=L0=null}function W1(c){var d=M0.current;tr(M0),c._currentValue=d}function K1(c,d,v){for(;c!==null;){var k=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,k!==null&&(k.childLanes|=d)):k!==null&&(k.childLanes&d)!==d&&(k.childLanes|=d),c===v)break;c=c.return}}function Wu(c,d){L0=c,U1=Hu=null,c=c.dependencies,c!==null&&c.firstContext!==null&&((c.lanes&d)!==0&&(ji=!0),c.firstContext=null)}function gs(c){var d=c._currentValue;if(U1!==c)if(c={context:c,memoizedValue:d,next:null},Hu===null){if(L0===null)throw Error(n(308));Hu=c,L0.dependencies={lanes:0,firstContext:c}}else Hu=Hu.next=c;return d}var Ol=null;function G1(c){Ol===null?Ol=[c]:Ol.push(c)}function i5(c,d,v,k){var N=d.interleaved;return N===null?(v.next=v,G1(d)):(v.next=N.next,N.next=v),d.interleaved=v,Qa(c,k)}function Qa(c,d){c.lanes|=d;var v=c.alternate;for(v!==null&&(v.lanes|=d),v=c,c=c.return;c!==null;)c.childLanes|=d,v=c.alternate,v!==null&&(v.childLanes|=d),v=c,c=c.return;return v.tag===3?v.stateNode:null}var Lo=!1;function Y1(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function s5(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function Za(c,d){return{eventTime:c,lane:d,tag:0,payload:null,callback:null,next:null}}function zo(c,d,v){var k=c.updateQueue;if(k===null)return null;if(k=k.shared,(_n&2)!==0){var N=k.pending;return N===null?d.next=d:(d.next=N.next,N.next=d),k.pending=d,Qa(c,v)}return N=k.interleaved,N===null?(d.next=d,G1(k)):(d.next=N.next,N.next=d),k.interleaved=d,Qa(c,v)}function z0(c,d,v){if(d=d.updateQueue,d!==null&&(d=d.shared,(v&4194240)!==0)){var k=d.lanes;k&=c.pendingLanes,v|=k,d.lanes=v,Dl(c,v)}}function a5(c,d){var v=c.updateQueue,k=c.alternate;if(k!==null&&(k=k.updateQueue,v===k)){var N=null,R=null;if(v=v.firstBaseUpdate,v!==null){do{var G={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};R===null?N=R=G:R=R.next=G,v=v.next}while(v!==null);R===null?N=R=d:R=R.next=d}else N=R=d;v={baseState:k.baseState,firstBaseUpdate:N,lastBaseUpdate:R,shared:k.shared,effects:k.effects},c.updateQueue=v;return}c=v.lastBaseUpdate,c===null?v.firstBaseUpdate=d:c.next=d,v.lastBaseUpdate=d}function j0(c,d,v,k){var N=c.updateQueue;Lo=!1;var R=N.firstBaseUpdate,G=N.lastBaseUpdate,ce=N.shared.pending;if(ce!==null){N.shared.pending=null;var ve=ce,Pe=ve.next;ve.next=null,G===null?R=Pe:G.next=Pe,G=ve;var Ge=c.alternate;Ge!==null&&(Ge=Ge.updateQueue,ce=Ge.lastBaseUpdate,ce!==G&&(ce===null?Ge.firstBaseUpdate=Pe:ce.next=Pe,Ge.lastBaseUpdate=ve))}if(R!==null){var Xe=N.baseState;G=0,Ge=Pe=ve=null,ce=R;do{var We=ce.lane,xt=ce.eventTime;if((k&We)===We){Ge!==null&&(Ge=Ge.next={eventTime:xt,lane:0,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null});e:{var Dt=c,Tt=ce;switch(We=d,xt=v,Tt.tag){case 1:if(Dt=Tt.payload,typeof Dt=="function"){Xe=Dt.call(xt,Xe,We);break e}Xe=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=Tt.payload,We=typeof Dt=="function"?Dt.call(xt,Xe,We):Dt,We==null)break e;Xe=j({},Xe,We);break e;case 2:Lo=!0}}ce.callback!==null&&ce.lane!==0&&(c.flags|=64,We=N.effects,We===null?N.effects=[ce]:We.push(ce))}else xt={eventTime:xt,lane:We,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null},Ge===null?(Pe=Ge=xt,ve=Xe):Ge=Ge.next=xt,G|=We;if(ce=ce.next,ce===null){if(ce=N.shared.pending,ce===null)break;We=ce,ce=We.next,We.next=null,N.lastBaseUpdate=We,N.shared.pending=null}}while(!0);if(Ge===null&&(ve=Xe),N.baseState=ve,N.firstBaseUpdate=Pe,N.lastBaseUpdate=Ge,d=N.shared.interleaved,d!==null){N=d;do G|=N.lane,N=N.next;while(N!==d)}else R===null&&(N.shared.lanes=0);Rl|=G,c.lanes=G,c.memoizedState=Xe}}function o5(c,d,v){if(c=d.effects,d.effects=null,c!==null)for(d=0;dv?v:4,c(!0);var k=eg.transition;eg.transition={};try{c(!1),d()}finally{En=v,eg.transition=k}}function S5(){return vs().memoizedState}function $q(c,d,v){var k=Vo(c);if(v={lane:k,action:v,hasEagerState:!1,eagerState:null,next:null},_5(c))A5(d,v);else if(v=i5(c,d,v,k),v!==null){var N=Di();Vs(v,c,k,N),T5(v,d,k)}}function Vq(c,d,v){var k=Vo(c),N={lane:k,action:v,hasEagerState:!1,eagerState:null,next:null};if(_5(c))A5(d,N);else{var R=c.alternate;if(c.lanes===0&&(R===null||R.lanes===0)&&(R=d.lastRenderedReducer,R!==null))try{var G=d.lastRenderedState,ce=R(G,v);if(N.hasEagerState=!0,N.eagerState=ce,Ls(ce,G)){var ve=d.interleaved;ve===null?(N.next=N,G1(d)):(N.next=ve.next,ve.next=N),d.interleaved=N;return}}catch{}finally{}v=i5(c,d,N,k),v!==null&&(N=Di(),Vs(v,c,k,N),T5(v,d,k))}}function _5(c){var d=c.alternate;return c===gr||d!==null&&d===gr}function A5(c,d){_f=V0=!0;var v=c.pending;v===null?d.next=d:(d.next=v.next,v.next=d),c.pending=d}function T5(c,d,v){if((v&4194240)!==0){var k=d.lanes;k&=c.pendingLanes,v|=k,d.lanes=v,Dl(c,v)}}var W0={readContext:gs,useCallback:gi,useContext:gi,useEffect:gi,useImperativeHandle:gi,useInsertionEffect:gi,useLayoutEffect:gi,useMemo:gi,useReducer:gi,useRef:gi,useState:gi,useDebugValue:gi,useDeferredValue:gi,useTransition:gi,useMutableSource:gi,useSyncExternalStore:gi,useId:gi,unstable_isNewReconciler:!1},Uq={readContext:gs,useCallback:function(c,d){return ga().memoizedState=[c,d===void 0?null:d],c},useContext:gs,useEffect:y5,useImperativeHandle:function(c,d,v){return v=v!=null?v.concat([c]):null,U0(4194308,4,w5.bind(null,d,c),v)},useLayoutEffect:function(c,d){return U0(4194308,4,c,d)},useInsertionEffect:function(c,d){return U0(4,2,c,d)},useMemo:function(c,d){var v=ga();return d=d===void 0?null:d,c=c(),v.memoizedState=[c,d],c},useReducer:function(c,d,v){var k=ga();return d=v!==void 0?v(d):d,k.memoizedState=k.baseState=d,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:d},k.queue=c,c=c.dispatch=$q.bind(null,gr,c),[k.memoizedState,c]},useRef:function(c){var d=ga();return c={current:c},d.memoizedState=c},useState:g5,useDebugValue:og,useDeferredValue:function(c){return ga().memoizedState=c},useTransition:function(){var c=g5(!1),d=c[0];return c=qq.bind(null,c[1]),ga().memoizedState=c,[d,c]},useMutableSource:function(){},useSyncExternalStore:function(c,d,v){var k=gr,N=ga();if(or){if(v===void 0)throw Error(n(407));v=v()}else{if(v=d(),Yr===null)throw Error(n(349));(Pl&30)!==0||f5(k,d,v)}N.memoizedState=v;var R={value:v,getSnapshot:d};return N.queue=R,y5(h5.bind(null,k,R,c),[c]),k.flags|=2048,Nf(9,d5.bind(null,k,R,v,d),void 0,null),v},useId:function(){var c=ga(),d=Yr.identifierPrefix;if(or){var v=Xa,k=Ja;v=(k&~(1<<32-Hn(k)-1)).toString(32)+v,d=":"+d+"R"+v,v=Af++,0<\/script>",c=c.removeChild(c.firstChild)):typeof k.is=="string"?c=G.createElement(v,{is:k.is}):(c=G.createElement(v),v==="select"&&(G=c,k.multiple?G.multiple=!0:k.size&&(G.size=k.size))):c=G.createElementNS(c,v),c[pa]=d,c[wf]=k,Y5(c,d,!1,!1),d.stateNode=c;e:{switch(G=Qi(v,k),v){case"dialog":er("cancel",c),er("close",c),N=k;break;case"iframe":case"object":case"embed":er("load",c),N=k;break;case"video":case"audio":for(N=0;NXu&&(d.flags|=128,k=!0,Of(R,!1),d.lanes=4194304)}else{if(!k)if(c=q0(G),c!==null){if(d.flags|=128,k=!0,v=c.updateQueue,v!==null&&(d.updateQueue=v,d.flags|=4),Of(R,!0),R.tail===null&&R.tailMode==="hidden"&&!G.alternate&&!or)return vi(d),null}else 2*Xn()-R.renderingStartTime>Xu&&v!==1073741824&&(d.flags|=128,k=!0,Of(R,!1),d.lanes=4194304);R.isBackwards?(G.sibling=d.child,d.child=G):(v=R.last,v!==null?v.sibling=G:d.child=G,R.last=G)}return R.tail!==null?(d=R.tail,R.rendering=d,R.tail=d.sibling,R.renderingStartTime=Xn(),d.sibling=null,v=mr.current,Qn(mr,k?v&1|2:v&1),d):(vi(d),null);case 22:case 23:return Og(),k=d.memoizedState!==null,c!==null&&c.memoizedState!==null!==k&&(d.flags|=8192),k&&(d.mode&1)!==0?(ns&1073741824)!==0&&(vi(d),d.subtreeFlags&6&&(d.flags|=8192)):vi(d),null;case 24:return null;case 25:return null}throw Error(n(156,d.tag))}function Qq(c,d){switch(j1(d),d.tag){case 1:return zi(d.type)&&N0(),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return Ku(),tr(Li),tr(mi),Z1(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 5:return X1(d),null;case 13:if(tr(mr),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(n(340));Vu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return tr(mr),null;case 4:return Ku(),null;case 10:return W1(d.type._context),null;case 22:case 23:return Og(),null;case 24:return null;default:return null}}var J0=!1,yi=!1,Zq=typeof WeakSet=="function"?WeakSet:Set,kt=null;function Yu(c,d){var v=c.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(k){kr(c,d,k)}else v.current=null}function xg(c,d,v){try{v()}catch(k){kr(c,d,k)}}var Q5=!1;function e$(c,d){if(O1=zn,c=NC(),C1(c)){if("selectionStart"in c)var v={start:c.selectionStart,end:c.selectionEnd};else e:{v=(v=c.ownerDocument)&&v.defaultView||window;var k=v.getSelection&&v.getSelection();if(k&&k.rangeCount!==0){v=k.anchorNode;var N=k.anchorOffset,R=k.focusNode;k=k.focusOffset;try{v.nodeType,R.nodeType}catch{v=null;break e}var G=0,ce=-1,ve=-1,Pe=0,Ge=0,Xe=c,We=null;t:for(;;){for(var xt;Xe!==v||N!==0&&Xe.nodeType!==3||(ce=G+N),Xe!==R||k!==0&&Xe.nodeType!==3||(ve=G+k),Xe.nodeType===3&&(G+=Xe.nodeValue.length),(xt=Xe.firstChild)!==null;)We=Xe,Xe=xt;for(;;){if(Xe===c)break t;if(We===v&&++Pe===N&&(ce=G),We===R&&++Ge===k&&(ve=G),(xt=Xe.nextSibling)!==null)break;Xe=We,We=Xe.parentNode}Xe=xt}v=ce===-1||ve===-1?null:{start:ce,end:ve}}else v=null}v=v||{start:0,end:0}}else v=null;for(B1={focusedElem:c,selectionRange:v},zn=!1,kt=d;kt!==null;)if(d=kt,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,kt=c;else for(;kt!==null;){d=kt;try{var Dt=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var Tt=Dt.memoizedProps,_r=Dt.memoizedState,Ae=d.stateNode,xe=Ae.getSnapshotBeforeUpdate(d.elementType===d.type?Tt:js(d.type,Tt),_r);Ae.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var Te=d.stateNode.containerInfo;Te.nodeType===1?Te.textContent="":Te.nodeType===9&&Te.documentElement&&Te.removeChild(Te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(nt){kr(d,d.return,nt)}if(c=d.sibling,c!==null){c.return=d.return,kt=c;break}kt=d.return}return Dt=Q5,Q5=!1,Dt}function Bf(c,d,v){var k=d.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var N=k=k.next;do{if((N.tag&c)===c){var R=N.destroy;N.destroy=void 0,R!==void 0&&xg(d,v,R)}N=N.next}while(N!==k)}}function X0(c,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var v=d=d.next;do{if((v.tag&c)===c){var k=v.create;v.destroy=k()}v=v.next}while(v!==d)}}function bg(c){var d=c.ref;if(d!==null){var v=c.stateNode;switch(c.tag){case 5:c=v;break;default:c=v}typeof d=="function"?d(c):d.current=c}}function Z5(c){var d=c.alternate;d!==null&&(c.alternate=null,Z5(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&(delete d[pa],delete d[wf],delete d[I1],delete d[Iq],delete d[Mq])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function ek(c){return c.tag===5||c.tag===3||c.tag===4}function tk(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||ek(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function wg(c,d,v){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?v.nodeType===8?v.parentNode.insertBefore(c,d):v.insertBefore(c,d):(v.nodeType===8?(d=v.parentNode,d.insertBefore(c,v)):(d=v,d.appendChild(c)),v=v._reactRootContainer,v!=null||d.onclick!==null||(d.onclick=A0));else if(k!==4&&(c=c.child,c!==null))for(wg(c,d,v),c=c.sibling;c!==null;)wg(c,d,v),c=c.sibling}function Eg(c,d,v){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?v.insertBefore(c,d):v.appendChild(c);else if(k!==4&&(c=c.child,c!==null))for(Eg(c,d,v),c=c.sibling;c!==null;)Eg(c,d,v),c=c.sibling}var oi=null,qs=!1;function jo(c,d,v){for(v=v.child;v!==null;)nk(c,d,v),v=v.sibling}function nk(c,d,v){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(sn,v)}catch{}switch(v.tag){case 5:yi||Yu(v,d);case 6:var k=oi,N=qs;oi=null,jo(c,d,v),oi=k,qs=N,oi!==null&&(qs?(c=oi,v=v.stateNode,c.nodeType===8?c.parentNode.removeChild(v):c.removeChild(v)):oi.removeChild(v.stateNode));break;case 18:oi!==null&&(qs?(c=oi,v=v.stateNode,c.nodeType===8?F1(c.parentNode,v):c.nodeType===1&&F1(c,v),It(c)):F1(oi,v.stateNode));break;case 4:k=oi,N=qs,oi=v.stateNode.containerInfo,qs=!0,jo(c,d,v),oi=k,qs=N;break;case 0:case 11:case 14:case 15:if(!yi&&(k=v.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){N=k=k.next;do{var R=N,G=R.destroy;R=R.tag,G!==void 0&&((R&2)!==0||(R&4)!==0)&&xg(v,d,G),N=N.next}while(N!==k)}jo(c,d,v);break;case 1:if(!yi&&(Yu(v,d),k=v.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=v.memoizedProps,k.state=v.memoizedState,k.componentWillUnmount()}catch(ce){kr(v,d,ce)}jo(c,d,v);break;case 21:jo(c,d,v);break;case 22:v.mode&1?(yi=(k=yi)||v.memoizedState!==null,jo(c,d,v),yi=k):jo(c,d,v);break;default:jo(c,d,v)}}function rk(c){var d=c.updateQueue;if(d!==null){c.updateQueue=null;var v=c.stateNode;v===null&&(v=c.stateNode=new Zq),d.forEach(function(k){var N=u$.bind(null,c,k);v.has(k)||(v.add(k),k.then(N,N))})}}function $s(c,d){var v=d.deletions;if(v!==null)for(var k=0;kN&&(N=G),k&=~R}if(k=N,k=Xn()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*n$(k/1960))-k,10c?16:c,$o===null)var k=!1;else{if(c=$o,$o=null,nh=0,(_n&6)!==0)throw Error(n(331));var N=_n;for(_n|=4,kt=c.current;kt!==null;){var R=kt,G=R.child;if((kt.flags&16)!==0){var ce=R.deletions;if(ce!==null){for(var ve=0;veXn()-Dg?Il(c,0):kg|=v),$i(c,d)}function gk(c,d){d===0&&((c.mode&1)===0?d=1:(d=Ha,Ha<<=1,(Ha&130023424)===0&&(Ha=4194304)));var v=Di();c=Qa(c,d),c!==null&&(Ms(c,d,v),$i(c,v))}function l$(c){var d=c.memoizedState,v=0;d!==null&&(v=d.retryLane),gk(c,v)}function u$(c,d){var v=0;switch(c.tag){case 13:var k=c.stateNode,N=c.memoizedState;N!==null&&(v=N.retryLane);break;case 19:k=c.stateNode;break;default:throw Error(n(314))}k!==null&&k.delete(d),gk(c,v)}var vk;vk=function(c,d,v){if(c!==null)if(c.memoizedProps!==d.pendingProps||Li.current)ji=!0;else{if((c.lanes&v)===0&&(d.flags&128)===0)return ji=!1,Jq(c,d,v);ji=(c.flags&131072)!==0}else ji=!1,or&&(d.flags&1048576)!==0&&JC(d,R0,d.index);switch(d.lanes=0,d.tag){case 2:var k=d.type;Y0(c,d),c=d.pendingProps;var N=ju(d,mi.current);Wu(d,v),N=ng(null,d,k,c,N,v);var R=rg();return d.flags|=1,typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,zi(k)?(R=!0,O0(d)):R=!1,d.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,Y1(d),N.updater=K0,d.stateNode=N,N._reactInternals=d,ug(d,k,c,v),d=hg(null,d,k,!0,R,v)):(d.tag=0,or&&R&&z1(d),ki(null,d,N,v),d=d.child),d;case 16:k=d.elementType;e:{switch(Y0(c,d),c=d.pendingProps,N=k._init,k=N(k._payload),d.type=k,N=d.tag=f$(k),c=js(k,c),N){case 0:d=dg(null,d,k,c,v);break e;case 1:d=V5(null,d,k,c,v);break e;case 11:d=L5(null,d,k,c,v);break e;case 14:d=z5(null,d,k,js(k.type,c),v);break e}throw Error(n(306,k,""))}return d;case 0:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:js(k,N),dg(c,d,k,N,v);case 1:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:js(k,N),V5(c,d,k,N,v);case 3:e:{if(U5(d),c===null)throw Error(n(387));k=d.pendingProps,R=d.memoizedState,N=R.element,s5(c,d),j0(d,k,null,v);var G=d.memoizedState;if(k=G.element,R.isDehydrated)if(R={element:k,isDehydrated:!1,cache:G.cache,pendingSuspenseBoundaries:G.pendingSuspenseBoundaries,transitions:G.transitions},d.updateQueue.baseState=R,d.memoizedState=R,d.flags&256){N=Gu(Error(n(423)),d),d=H5(c,d,k,v,N);break e}else if(k!==N){N=Gu(Error(n(424)),d),d=H5(c,d,k,v,N);break e}else for(ts=Ro(d.stateNode.containerInfo.firstChild),es=d,or=!0,zs=null,v=r5(d,null,k,v),d.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(Vu(),k===N){d=eo(c,d,v);break e}ki(c,d,k,v)}d=d.child}return d;case 5:return l5(d),c===null&&$1(d),k=d.type,N=d.pendingProps,R=c!==null?c.memoizedProps:null,G=N.children,P1(k,N)?G=null:R!==null&&P1(k,R)&&(d.flags|=32),$5(c,d),ki(c,d,G,v),d.child;case 6:return c===null&&$1(d),null;case 13:return W5(c,d,v);case 4:return J1(d,d.stateNode.containerInfo),k=d.pendingProps,c===null?d.child=Uu(d,null,k,v):ki(c,d,k,v),d.child;case 11:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:js(k,N),L5(c,d,k,N,v);case 7:return ki(c,d,d.pendingProps,v),d.child;case 8:return ki(c,d,d.pendingProps.children,v),d.child;case 12:return ki(c,d,d.pendingProps.children,v),d.child;case 10:e:{if(k=d.type._context,N=d.pendingProps,R=d.memoizedProps,G=N.value,Qn(M0,k._currentValue),k._currentValue=G,R!==null)if(Ls(R.value,G)){if(R.children===N.children&&!Li.current){d=eo(c,d,v);break e}}else for(R=d.child,R!==null&&(R.return=d);R!==null;){var ce=R.dependencies;if(ce!==null){G=R.child;for(var ve=ce.firstContext;ve!==null;){if(ve.context===k){if(R.tag===1){ve=Za(-1,v&-v),ve.tag=2;var Pe=R.updateQueue;if(Pe!==null){Pe=Pe.shared;var Ge=Pe.pending;Ge===null?ve.next=ve:(ve.next=Ge.next,Ge.next=ve),Pe.pending=ve}}R.lanes|=v,ve=R.alternate,ve!==null&&(ve.lanes|=v),K1(R.return,v,d),ce.lanes|=v;break}ve=ve.next}}else if(R.tag===10)G=R.type===d.type?null:R.child;else if(R.tag===18){if(G=R.return,G===null)throw Error(n(341));G.lanes|=v,ce=G.alternate,ce!==null&&(ce.lanes|=v),K1(G,v,d),G=R.sibling}else G=R.child;if(G!==null)G.return=R;else for(G=R;G!==null;){if(G===d){G=null;break}if(R=G.sibling,R!==null){R.return=G.return,G=R;break}G=G.return}R=G}ki(c,d,N.children,v),d=d.child}return d;case 9:return N=d.type,k=d.pendingProps.children,Wu(d,v),N=gs(N),k=k(N),d.flags|=1,ki(c,d,k,v),d.child;case 14:return k=d.type,N=js(k,d.pendingProps),N=js(k.type,N),z5(c,d,k,N,v);case 15:return j5(c,d,d.type,d.pendingProps,v);case 17:return k=d.type,N=d.pendingProps,N=d.elementType===k?N:js(k,N),Y0(c,d),d.tag=1,zi(k)?(c=!0,O0(d)):c=!1,Wu(d,v),O5(d,k,N),ug(d,k,N,v),hg(null,d,k,!0,c,v);case 19:return G5(c,d,v);case 22:return q5(c,d,v)}throw Error(n(156,d.tag))};function yk(c,d){return wl(c,d)}function c$(c,d,v,k){this.tag=c,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xs(c,d,v,k){return new c$(c,d,v,k)}function Pg(c){return c=c.prototype,!(!c||!c.isReactComponent)}function f$(c){if(typeof c=="function")return Pg(c)?1:0;if(c!=null){if(c=c.$$typeof,c===M)return 11;if(c===U)return 14}return 2}function Ho(c,d){var v=c.alternate;return v===null?(v=xs(c.tag,d,c.key,c.mode),v.elementType=c.elementType,v.type=c.type,v.stateNode=c.stateNode,v.alternate=c,c.alternate=v):(v.pendingProps=d,v.type=c.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=c.flags&14680064,v.childLanes=c.childLanes,v.lanes=c.lanes,v.child=c.child,v.memoizedProps=c.memoizedProps,v.memoizedState=c.memoizedState,v.updateQueue=c.updateQueue,d=c.dependencies,v.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},v.sibling=c.sibling,v.index=c.index,v.ref=c.ref,v}function ah(c,d,v,k,N,R){var G=2;if(k=c,typeof c=="function")Pg(c)&&(G=1);else if(typeof c=="string")G=5;else e:switch(c){case T:return Ll(v.children,N,R,d);case A:G=8,N|=8;break;case P:return c=xs(12,v,d,N|2),c.elementType=P,c.lanes=R,c;case W:return c=xs(13,v,d,N),c.elementType=W,c.lanes=R,c;case ee:return c=xs(19,v,d,N),c.elementType=ee,c.lanes=R,c;case ue:return oh(v,N,R,d);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case I:G=10;break e;case F:G=9;break e;case M:G=11;break e;case U:G=14;break e;case fe:G=16,k=null;break e}throw Error(n(130,c==null?c:typeof c,""))}return d=xs(G,v,d,N),d.elementType=c,d.type=k,d.lanes=R,d}function Ll(c,d,v,k){return c=xs(7,c,k,d),c.lanes=v,c}function oh(c,d,v,k){return c=xs(22,c,k,d),c.elementType=ue,c.lanes=v,c.stateNode={isHidden:!1},c}function Rg(c,d,v){return c=xs(6,c,null,d),c.lanes=v,c}function Fg(c,d,v){return d=xs(4,c.children!==null?c.children:[],c.key,d),d.lanes=v,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}function d$(c,d,v,k,N){this.tag=d,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=k,this.onRecoverableError=N,this.mutableSourceEagerHydrationData=null}function Ig(c,d,v,k,N,R,G,ce,ve){return c=new d$(c,d,v,ce,ve),d===1?(d=1,R===!0&&(d|=8)):d=0,R=xs(3,null,null,d),c.current=R,R.stateNode=c,R.memoizedState={element:k,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Y1(R),c}function h$(c,d,v){var k=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$g.exports=A$(),$g.exports}var Pk;function T$(){if(Pk)return mh;Pk=1;var e=RN();return mh.createRoot=e.createRoot,mh.hydrateRoot=e.hydrateRoot,mh}var N$=T$();const Rk=e=>{let t;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const m=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,m))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,i,o);return o},Y4=(e=>e?Rk(e):Rk),O$=e=>e;function B$(e,t=O$){const n=oe.useSyncExternalStore(e.subscribe,oe.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return oe.useDebugValue(n),n}const Fk=e=>{const t=Y4(e),n=r=>B$(t,r);return Object.assign(n,t),n},P$=(e=>e?Fk(e):Fk);function vo(e){if(!(typeof window>"u"))return window[e]}function pn(){return vo("__CMARK")||{}}function J4(){return!!vo("__CMARK")}function io(){return vo("__ZNOTES")}function R$(){return vo("__NDB")}function id(){return vo("__znotesGit")}function su(){return vo("__ztools")||vo("__utools")}function F$(){return vo("services")}function Ik(){return vo("__ZNOTES_WS")||""}let vw=null;const I$=new Set;function M$(e){vw=e,I$.forEach(t=>{try{t(e)}catch(n){console.error("[cmark] ports listener failed",n)}})}function jn(){if(!vw)throw new Error("runtime 未装配:请先在入口调用 installPorts(createXxxPorts())");return vw}let Hg;function FN(e,t=[]){for(const n of e||[])n.type==="folder"?FN(n.children,t):n.rel&&t.push(n.rel);return t}function Mk(e,t){const n=t().hitOrder||[];if(!n.length)return;const r=String(t().currentRel||"").toLowerCase(),i=n.findIndex(o=>String(o).toLowerCase()===r),s=i<0?e>0?0:n.length-1:(i+e+n.length)%n.length,a=n[s];if(a)try{t().openNote(a)}catch{}}const Le=P$((e,t)=>({workspace:"",tree:[],truncated:!1,currentRel:"",content:"",savedContent:"",saving:!1,message:"",editorApi:null,editor:null,activeMarks:{},activeBlock:{type:"paragraph"},locked:!1,loadRevision:0,near:!1,toolbarHidden:!1,sourceMode:!1,bodyFontSize:14,aiOpen:!1,searchTerm:"",findTerm:"",notesIndex:[],searchHits:{},hitOrder:[],diskMtime:0,conflict:"",refreshTree(){(async()=>{const n=await jn().ws.listTree();e({workspace:n.workspace??void 0,tree:n.children,truncated:n.truncated})})()},openNote(n){const r=String(n??"").replace(/\\/g,"/").replace(/^\.\//,"").trim();if(!r)return;const i=(t().loadRevision||0)+1;e({loadRevision:i}),(async()=>{const s=t();if(s.currentRel&&s.content!==s.savedContent){await s.save();const l=t();if(l.content!==l.savedContent){l.setMessage("当前笔记未保存,已暂停切换",3600);return}}const a=await jn().ws.read(r);if(t().loadRevision!==i)return;if(!a.ok){if(String(a.code)==="ENOENT"||/ENOENT/i.test(String(a.message||""))){e({currentRel:"",content:"",savedContent:"",conflict:"",message:"这篇笔记已不存在"});try{t().refreshTree()}catch{}return}e({conflict:"",message:`打开失败:${a.message||a.code||"无法读取文件"}`});return}const o=await jn().ws.noteState(r);t().loadRevision===i&&e({currentRel:r,content:a.value.text,savedContent:a.value.text,diskMtime:a.value.mtime,conflict:"",locked:!!(o.ok&&o.value.locked),near:!!(o.ok&&o.value.near)})})()},setContent(n){e({content:n})},async save(){const{currentRel:n,content:r,savedContent:i,locked:s}=t();if(!n||r===i)return;if(s){t().setMessage("该笔记已设为只读,未保存",2600);return}const a=jn().ws;if(!await a.exists(n)){e({savedContent:r,conflict:"文件已不在原位置(可能被移动或删除)"}),t().setMessage("这篇笔记已不在原位置,内容未保存",5e3);return}const o=await a.stat(n),l=t().diskMtime;if(o.ok&&l&&o.value.mtime&&o.value.mtime!==l){e({conflict:"磁盘上的文件已被其它程序修改"}),t().setMessage("这篇笔记在磁盘上被改过,已暂停保存",5e3);return}e({saving:!0});const u=await a.write(n,r);if(e({saving:!1}),!u.ok){t().setMessage("保存失败:"+(u.message||"未知错误"),4e3);return}const f=await a.stat(n);e({savedContent:r,diskMtime:f.ok?f.value.mtime:l,conflict:""});try{const h=t().notesIndex||[],m=h.findIndex(g=>g.rel===n);if(m>=0){const g=h.slice();g[m]={rel:n,text:r},e({notesIndex:g})}else e({notesIndex:h.concat([{rel:n,text:r}])})}catch{}},setMessage(n,r=2500){e({message:n}),Hg&&window.clearTimeout(Hg),Hg=window.setTimeout(()=>e({message:""}),r)},setEditorApi(n){e({editorApi:n})},setEditor(n){e({editor:n})},markClean(n){e({content:n,savedContent:n})},setActive(n,r){e({activeMarks:n,activeBlock:r})},toggleToolbar(){e({toolbarHidden:!t().toolbarHidden})},toggleSourceMode(){e({sourceMode:!t().sourceMode})},async forceSave(){const{currentRel:n,content:r}=t();if(!n)return;const i=await jn().ws.write(n,r);if(!i.ok){t().setMessage("保存失败:"+(i.message||""),4e3);return}const s=await jn().ws.stat(n);e({conflict:"",savedContent:r,diskMtime:s.ok?s.value.mtime:0})},reloadFromDisk(){const{currentRel:n}=t();n&&(e({conflict:""}),t().openNote(n),t().setMessage("已重新载入磁盘上的版本",2400))},async buildIndex(){try{e({notesIndex:await jn().ws.readAll()})}catch{e({notesIndex:[]})}},searchNotes(n){const r=String(n??"").trim().toLowerCase();if(!r){e({searchTerm:"",searchHits:{},hitOrder:[],findTerm:""});return}const i={},s=t().notesIndex.length?t().notesIndex:(()=>{const u=pn();let f=[];try{f=u?.loadAllNotes?.()||[]}catch{}return f.length&&e({notesIndex:f}),f})();for(const u of s){if((u.rel.split("/").pop()||u.rel).replace(/\.md$/i,"").toLowerCase().includes(r)){i[u.rel]={field:"title",snippet:""};continue}const m=u.text.toLowerCase().indexOf(r);if(m>=0){const g=Math.max(0,m-30),b=u.text.slice(g,m+r.length+40).replace(/\s+/g," ").trim();i[u.rel]={field:"content",snippet:b}}}const a=[],o=u=>{for(const f of u)f.type==="folder"?o(f.children||[]):Object.prototype.hasOwnProperty.call(i,f.rel)&&a.push(f.rel)};o(t().tree||[]);for(const u of Object.keys(i))a.includes(u)||a.push(u);e({searchTerm:n,searchHits:i,hitOrder:a,findTerm:n});const l=a;if(l.length){const u=l[0],f=t().currentRel;setTimeout(()=>{if(t().searchTerm===n&&t().currentRel===f)try{t().openNote(u),window.setTimeout(()=>{try{window.dispatchEvent(new CustomEvent("cmark-focus-tree"))}catch{}},60)}catch{}},350)}},setSearchTerm(n){e({searchTerm:n})},stepNote(n){const{hitOrder:r,searchTerm:i,tree:s,currentRel:a,openNote:o}=t(),l=String(i||"").trim().length>0,u=l?r:FN(s);if(!u.length)return;const f=String(a||"").toLowerCase(),h=u.findIndex(b=>String(b).toLowerCase()===f),m=h<0?n>0?0:u.length-1:(h+n+u.length)%u.length,g=u[m];if(g){if(!l)try{window.dispatchEvent(new CustomEvent("cmark-reveal-note",{detail:g}))}catch{}try{o(g)}catch{}}},nextHit(){Mk(1,t)},prevHit(){Mk(-1,t)},clearSearch(){e({searchTerm:"",searchHits:{},hitOrder:[],findTerm:""})},setFindTerm(n){e({findTerm:n})},clearCurrent(){e({currentRel:"",content:"",savedContent:"",locked:!1,near:!1})},async toggleNear(){const{currentRel:n,near:r,setMessage:i}=t();if(!n)return;const s=!r,a=await jn().ws.setNoteNear(n,s);if(!a.ok){i("设置失败:"+(a.message||"未知原因"),3200);return}const o=n.split("/").pop().replace(/\.(md|markdown)$/i,"");try{const l=su(),u="note/"+n;s?l?.setFeature?.({code:u,icon:"logo.png",explain:"打开笔记「"+o+"」",cmds:[o]}):l?.removeFeature?.(u)}catch{}e({near:s}),i(s?"已设为全局搜索:「"+o+"」":"已取消全局搜索",2400)},async syncNearFeatures(){try{const n=R$(),r=io(),i=su();if(!n?.allDocs||!i?.setFeature)return;const s=n.allDocs("note/")||[];let a=0;for(const o of s){const l=String(o?._id||"");if(!l.startsWith("note/"))continue;const u=l.slice(5);if(!r?.readNoteState?.(u)?.near)continue;const f=u.split("/").pop().replace(/\.(md|markdown)$/i,"");i.setFeature({code:l,icon:"logo.png",explain:"打开笔记「"+f+"」",cmds:[f]}),a++}try{console.log("[cmark] syncNearFeatures 注册 "+a+" 条(共 "+s.length+" 篇候选)")}catch{}return a}catch{}},setAiOpen(n){e({aiOpen:n})},setBodyFontSize(n){const r=Math.min(16,Math.max(12,Math.round(Number(n)||14)));e({bodyFontSize:r});try{window.localStorage.setItem("cmark-dev-body-font-size",String(r))}catch{}},async toggleLocked(){const{currentRel:n,locked:r,setMessage:i}=t();if(!n)return;const s=await jn().ws.setNoteLocked(n,!r);s.ok?(e({locked:!r}),i(r?"已取消只读":"已设为只读",1800)):i("设置只读失败:"+(s.message||"接口不可用"),3600)}}));function IN({title:e,defaultValue:t="",placeholder:n="",maxLength:r=120,okText:i="确定",onSubmit:s,onCancel:a}){const[o,l]=Z.useState(t),u=Z.useRef(null);return Z.useEffect(()=>{const f=window.setTimeout(()=>{const h=u.current;h&&(h.focus(),h.select())},20);return()=>window.clearTimeout(f)},[]),Z.useEffect(()=>{const f=h=>{if(h.key==="Escape")h.preventDefault(),h.stopPropagation(),a();else if(h.key==="Enter"){h.preventDefault(),h.stopPropagation();const m=o.trim();m&&s(m)}};return window.addEventListener("keydown",f,!0),()=>window.removeEventListener("keydown",f,!0)},[o,s,a]),$.jsx("div",{className:"zdlg-mask",onMouseDown:f=>f.target===f.currentTarget&&a(),children:$.jsxs("div",{className:"zdlg-card",onMouseDown:f=>f.stopPropagation(),children:[$.jsx("div",{className:"zdlg-title",children:e}),$.jsx("input",{ref:u,className:"zdlg-input",type:"text",value:o,maxLength:r,spellCheck:!1,placeholder:n,onChange:f=>l(f.target.value)}),$.jsxs("div",{className:"zdlg-btns",children:[$.jsx("button",{type:"button",className:"zdlg-btn",onClick:a,children:"取消"}),$.jsx("button",{type:"button",className:"zdlg-btn primary",disabled:!o.trim(),onClick:()=>{const f=o.trim();f&&s(f)},children:i})]})]})})}function L$({message:e,okText:t="确定",danger:n,onOk:r,onCancel:i}){return Z.useEffect(()=>{const s=a=>{a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[i]),$.jsx("div",{className:"zdlg-mask",onMouseDown:s=>s.target===s.currentTarget&&i(),children:$.jsxs("div",{className:"zdlg-card",onMouseDown:s=>s.stopPropagation(),children:[$.jsx("div",{className:"zdlg-msg",children:e}),$.jsxs("div",{className:"zdlg-btns",children:[$.jsx("button",{type:"button",className:"zdlg-btn",onClick:i,children:"取消"}),$.jsx("button",{type:"button",className:"zdlg-btn primary"+(n?" danger":""),onClick:r,children:t})]})]})})}var pm=RN();const MN=Rr(pm);function Lk(){return id()}const gh={branch:$.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"currentColor",children:$.jsx("path",{d:"M5 3.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0zM3.75 5.9a2.75 2.75 0 1 0-1.5 0v4.2a2.75 2.75 0 1 0 1.5 0V8.5h3.5a2.5 2.5 0 0 0 2.5-2.5V5.9a2.75 2.75 0 1 0-1.5 0v.1a1 1 0 0 1-1 1h-3.5zM12.25 5.15a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zM4.5 13.05a1.25 1.25 0 1 0-1.5-1.24v1.24z"})}),pull:$.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"currentColor",children:$.jsx("path",{d:"M8 1.5a.75.75 0 0 1 .75.75v6.94l2.22-2.22a.75.75 0 1 1 1.06 1.06l-3.5 3.5a.75.75 0 0 1-1.06 0l-3.5-3.5a.75.75 0 1 1 1.06-1.06l2.22 2.22V2.25A.75.75 0 0 1 8 1.5zM2.5 12.5a.75.75 0 0 1 .75.75v.25h9.5v-.25a.75.75 0 0 1 1.5 0v1a.75.75 0 0 1-.75.75H2.5a.75.75 0 0 1-.75-.75v-1a.75.75 0 0 1 .75-.75z"})}),push:$.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"currentColor",children:$.jsx("path",{d:"M8 14.5a.75.75 0 0 1-.75-.75V6.81L5.03 9.03a.75.75 0 0 1-1.06-1.06l3.5-3.5a.75.75 0 0 1 1.06 0l3.5 3.5a.75.75 0 1 1-1.06 1.06L8.75 6.81v6.94a.75.75 0 0 1-.75.75zM2.5 2.5a.75.75 0 0 1 .75-.75h9.5a.75.75 0 0 1 .75.75v1a.75.75 0 0 1-1.5 0v-.25h-9.5v.25a.75.75 0 0 1-1.5 0v-1z"})}),sync:$.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor",children:$.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})})};function z$({onOpenPanel:e}){const[t,n]=Z.useState("—"),[r,i]=Z.useState(!1),[s,a]=Z.useState(0),[o,l]=Z.useState(null),u=Z.useRef(!0),f=Z.useCallback(async()=>{const y=Lk();if(!y?.state){n("git");return}try{const E=await y.state();if(!u.current)return;const C=!!(E&&E.ok&&E.data);i(!!(C&&E.data?.isRepo)),n(C&&E.data?.branch?String(E.data.branch):C&&E.data?.isRepo?"(无分支)":"git"),a(C?Number(E.data?.dirty||0):0)}catch{}},[]);Z.useEffect(()=>{u.current=!0,f();const y=window.setInterval(()=>void f(),3e4);return()=>{u.current=!1,window.clearInterval(y)}},[f]);const{hint:h,show:m}=j$(),g=Z.useCallback(async y=>{const E=Lk(),C=y==="pull"?E?.pull:y==="push"?E?.push:E?.sync;if(C){l(y);try{const x=await C.call(E),S=y==="pull"?"已拉取":y==="push"?"已推送":"已同步",O=y==="pull"?"拉取失败:":y==="push"?"推送失败:":"同步失败:";if(x&&x.ok){const _=y==="sync"&&x.data?.local?"已提交到本机(未配置远程仓库)":S;m(_,!1)}else m(O+(x&&x.message||"未知原因"),!0)}catch(x){m("操作失败:"+(x?.message||""),!0)}finally{l(null),f()}}},[f,m]),b=r?`当前分支:${t},点击查看改动与历史`:"这个文件夹还不是 git 仓库,点击查看";return $.jsxs($.Fragment,{children:[$.jsxs("div",{className:"branch-bar",children:[$.jsxs("button",{className:"zbb-branch",type:"button",title:b,onClick:e,children:[gh.branch,$.jsx("span",{className:"zbb-bname",children:t}),$.jsx("span",{className:"zbb-dirty"+(s>0?" on":""),title:"有未提交的改动"})]}),$.jsx("button",{className:"zbb-btn",type:"button",title:"拉取(git pull)",disabled:!!o,onClick:()=>void g("pull"),children:gh.pull}),$.jsx("button",{className:"zbb-btn",type:"button",title:"推送(git push)",disabled:!!o,onClick:()=>void g("push"),children:gh.push}),$.jsx("button",{className:"zbb-btn"+(o==="sync"?" busy":""),type:"button",title:"同步(拉取然后推送)",disabled:!!o,onClick:()=>void g("sync"),children:gh.sync})]}),h?pm.createPortal($.jsx("div",{className:"app-toast"+(h.err?" err":""),children:h.text}),document.body):null]})}function j$(){const[e,t]=Z.useState(null),n=Z.useRef(null),r=Z.useCallback((i,s)=>{t({text:i,err:s}),n.current&&window.clearTimeout(n.current),n.current=window.setTimeout(()=>t(null),2600)},[]);return Z.useEffect(()=>()=>{n.current&&window.clearTimeout(n.current)},[]),{hint:e,show:r}}function q$(){return $.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[$.jsx("circle",{cx:"8",cy:"8",r:"2.2"}),$.jsx("path",{d:"M8 1.6v1.6M8 12.8v1.6M1.6 8h1.6M12.8 8h1.6M3.5 3.5l1.1 1.1M11.4 11.4l1.1 1.1M12.5 3.5l-1.1 1.1M4.6 11.4l-1.1 1.1",strokeLinecap:"round"})]})}function $$(e){return $.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:$.jsx("path",{d:e.open?"M3.5 6.5L8 11l4.5-4.5":"M6.5 3.5L11 8l-4.5 4.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function V$(){return $.jsx("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:$.jsx("path",{d:"M2 4.5h12M2 8h8M2 11.5h12",strokeLinecap:"round"})})}function LN(e,t){const n=r=>r.reduce((i,s)=>i+(s.type==="note"?1:n(s.children||[])),0);for(const r of e){if(r.rel===t)return n(r.children||[]);if(r.children?.length){const i=LN(r.children,t);if(i>0)return i}}return 0}const hc=e=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";function U$(e){const{node:t,depth:n,open:r,toggle:i,active:s,onPick:a,onMenu:o}=e,l=t.type==="folder",u=r.has(t.id),f=e.dragOver?.rel===t.rel&&e.dragRel!==t.rel?e.dragOver.zone:null,h=e.dragRel===t.rel,m=Z.useRef(null),[g,b]=Z.useState(!1);return Z.useEffect(()=>{if(s!==t.rel)return;const y=m.current;if(y)try{y.scrollIntoView({block:"nearest"})}catch{}},[s,t.rel]),$.jsxs("div",{ref:m,className:"row"+(s===t.rel?" active":"")+(f?" drop-"+f:"")+(h?" dragging":""),style:{paddingLeft:4+n*14},draggable:!0,onDragStart:y=>{e.setDragRel(t.rel),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",t.rel)},onDragOver:y=>{if(!e.dragRel||e.dragRel===t.rel)return;y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="move";const E=y.currentTarget.getBoundingClientRect(),C=(y.clientY-E.top)/Math.max(E.height,1),x=l?C<.28?"before":C>.72?"after":"inside":C<.5?"before":"after";(e.dragOver?.rel!==t.rel||e.dragOver?.zone!==x)&&e.setDragOver({rel:t.rel,zone:x})},onDragLeave:()=>{e.dragOver?.rel===t.rel&&e.setDragOver(null)},onDrop:y=>{y.preventDefault(),y.stopPropagation();const E=e.dragRel||y.dataTransfer.getData("text/plain"),C=e.dragOver?.rel===t.rel?e.dragOver.zone:l?"inside":"after";if(e.setDragOver(null),e.setDragRel(null),!E||E===t.rel)return;const x=hc(t.rel);if(C==="inside"&&l){e.onDrop(E,t.rel);return}if(hc(E)!==x){e.onDrop(E,x);return}e.onReorder?.(E,t.rel,C==="inside"?"after":C)},onDragEnd:()=>{e.setDragRel(null),e.setDragOver(null)},onClick:()=>l?i(t.id):a(t.rel),onContextMenu:y=>o(y,t),title:t.rel,children:[$.jsx("span",{className:"caret",children:l?$.jsx($$,{open:u}):null}),$.jsx("span",{className:"label",children:t.name}),$.jsx("span",{className:"row-actions-slot"+(g?" is-open":""),style:{width:l?42:21},onMouseOver:()=>b(!0),onMouseOut:y=>{const E=y.relatedTarget;E&&y.currentTarget.contains(E)||b(!1)},children:g?$.jsx("span",{className:"row-actions",children:l?$.jsxs($.Fragment,{children:[$.jsx("button",{type:"button",title:"新建文件夹",onClick:y=>{y.stopPropagation(),e.onQuickNewFolder?.(t.rel)},children:$.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M2 4.5A1.5 1.5 0 0 1 3.5 3h2.6l1.2 1.5h5.2A1.5 1.5 0 0 1 14 6v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 12z"}),$.jsx("path",{d:"M8 7.5v3M6.5 9h3"})]})}),$.jsx("button",{type:"button",title:"新建笔记",onClick:y=>{y.stopPropagation(),e.onQuickNewNote?.(t.rel)},children:$.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M9.5 2.5H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5z"}),$.jsx("path",{d:"M9.5 2.5v3h3"}),$.jsx("path",{d:"M8 8.5v3M6.5 10h3"})]})})]}):$.jsx("button",{type:"button",title:"在浏览器中打开",onClick:y=>{y.stopPropagation(),e.onQuickOpenBrowser?.(t.rel)},children:$.jsxs("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("circle",{cx:"8",cy:"8",r:"5.7"}),$.jsx("path",{d:"M2.4 8h11.2M8 2.3c1.6 1.7 2.4 3.6 2.4 5.7S9.6 12 8 13.7C6.4 12 5.6 10.1 5.6 8S6.4 4 8 2.3z"})]})})}):null})]})}function zN(e){const{nodes:t,depth:n,...r}=e;return $.jsx($.Fragment,{children:t.map(i=>$.jsxs("div",{children:[$.jsx(U$,{node:i,depth:n,...r}),i.type==="folder"&&r.open.has(i.id)&&i.children&&i.children.length>0&&$.jsx(zN,{nodes:i.children,depth:n+1,...r})]},i.id))})}const Us={folder:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.31c.46 0 .9.18 1.22.5l1.06 1.06h4.41A1.75 1.75 0 0 1 14.25 4.5v8A1.75 1.75 0 0 1 12.5 14.25h-9A1.75 1.75 0 0 1 1.75 12.5V3zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .14.11.25.25.25h9a.25.25 0 0 0 .25-.25V4.5a.25.25 0 0 0-.25-.25H7.88L6.5 2.88a.25.25 0 0 0-.18-.07H3.5z"})}),open:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M1.75 3A1.75 1.75 0 0 1 3.5 1.25h2.31c.46 0 .9.18 1.22.5l1.06 1.06h4.41A1.75 1.75 0 0 1 14.25 4.5v1.2c-.28-.1-.58-.16-.9-.16H1.75V3zm0 4.29h11.5l.29.03v.02l-1.9 5.7a1.2 1.2 0 0 1-1.14.81H3.5a1.75 1.75 0 0 1-1.75-1.75V7.29z"})}),note:$.jsxs("svg",{viewBox:"0 0 16 16",children:[$.jsx("path",{d:"M2.75 1A1.75 1.75 0 0 0 1 2.75v10.5C1 14.22 1.78 15 2.75 15h6.6a4.5 4.5 0 0 1-1.3-6.28 4.5 4.5 0 0 1 5.2-1.6V2.75A1.75 1.75 0 0 0 11.5 1H2.75zm0 1.5h8.75a.25.25 0 0 1 .25.25v2.4a4.5 4.5 0 0 0-1.5-.26V4.25A.75.75 0 0 0 9.5 3.5H4.25a.75.75 0 0 0 0 1.5h4v3.9a4.5 4.5 0 0 0-2.4 3.35H2.75a.25.25 0 0 1-.25-.25V2.75c0-.14.11-.25.25-.25z"}),$.jsx("path",{d:"M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7zm.75 1.5v1.75H14a.75.75 0 0 1 0 1.5h-1.25V15a.75.75 0 0 1-1.5 0v-1.75H10a.75.75 0 0 1 0-1.5h1.25V10a.75.75 0 0 1 1.5 0z"})]}),rename:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M11.7 1.3a1.5 1.5 0 0 1 2.1 0l.9.9a1.5 1.5 0 0 1 0 2.1L5.9 13.1l-3.4.9a.6.6 0 0 1-.7-.7l.9-3.4L11.7 1.3zm.9 1.2L3.4 11.7l-.5 1.9 1.9-.5L14 3.9l-1.4-1.4z"})}),copy:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M5 1.75A1.75 1.75 0 0 1 6.75 0h5.5A1.75 1.75 0 0 1 14 1.75v7.5A1.75 1.75 0 0 1 12.25 11h-1v1.25A1.75 1.75 0 0 1 9.5 14h-5.5A1.75 1.75 0 0 1 2.25 12.25v-7.5A1.75 1.75 0 0 1 4 3h1V1.75zM4 4.5a.25.25 0 0 0-.25.25v7.5c0 .14.11.25.25.25h5.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25H4zm3-3a.25.25 0 0 0-.25.25V3h2.75A1.75 1.75 0 0 1 11.25 4.75V9.5h1a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25H7z"})}),lock:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M8 1a3 3 0 0 0-3 3v2H4.5A1.5 1.5 0 0 0 3 7.5v6A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-6A1.5 1.5 0 0 0 11.5 6H11V4a3 3 0 0 0-3-3zm0 1.5A1.5 1.5 0 0 1 9.5 4v2h-3V4A1.5 1.5 0 0 1 8 2.5zM4.5 7.5h7v6h-7v-6z"})}),trash:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M6 1.75A.75.75 0 0 1 6.75 1h2.5a.75.75 0 0 1 .75.75V2.5h2.75a.75.75 0 0 1 0 1.5h-.53l-.66 9.3A1.75 1.75 0 0 1 9.82 15H6.18a1.75 1.75 0 0 1-1.74-1.7L3.78 4h-.53a.75.75 0 0 1 0-1.5H6v-.75zM5.29 4l.64 9.13a.25.25 0 0 0 .25.24h3.64a.25.25 0 0 0 .25-.24L10.71 4H5.29z"})}),collapse:$.jsx("svg",{viewBox:"0 0 16 16",children:$.jsx("path",{d:"M2 3.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.25zm0 9.5a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75zM8 5.6l3.1 3.1a.75.75 0 0 1-1.06 1.06L8 7.72l-2.04 2.04A.75.75 0 1 1 4.9 8.7L8 5.6z"})})};function H$(e,t,n){const r=String(n??"").trim().toLowerCase();if(!r)return{nodes:e,expand:[]};const i=new Set,s=o=>!!o&&Object.prototype.hasOwnProperty.call(t,o),a=o=>o.map(l=>{const u=l.name.toLowerCase().includes(r);if(l.type==="folder"){if(u)return i.add(l.id),l;const f=a(l.children||[]);return f.length?(i.add(l.id),{...l,children:f}):null}return s(l.rel)||u?l:null}).filter(Boolean);return{nodes:a(e),expand:[...i]}}function W$({onOpenGitPanel:e,onOpenSettings:t}){const n=Le(ge=>ge.tree),r=Le(ge=>ge.searchTerm),i=Le(ge=>ge.searchHits),s=Le(ge=>ge.hitOrder),a=Le(ge=>ge.buildIndex),o=Z.useMemo(()=>H$(n,i,r),[n,i,r]),l=o.expand.join("|"),u=Z.useRef("");Z.useEffect(()=>{if(!String(r||"").trim()){u.current="";return}if(!l||l===u.current)return;u.current=l;const ge=l.split("|").filter(Boolean);C(Oe=>{const se=new Set(Oe);let we=!1;for(const _e of ge)se.has(_e)||(se.add(_e),we=!0);return we?se:Oe})},[l,r]);const f=Le(ge=>ge.currentRel),h=Le(ge=>ge.refreshTree),m=Le(ge=>ge.openNote),g=Le(ge=>ge.setMessage),b=Le(ge=>ge.locked),y=Le(ge=>ge.clearCurrent),[E,C]=Z.useState(new Set),[x,S]=Z.useState(null),[O,_]=Z.useState(null),[w,T]=Z.useState(null),[A,P]=Z.useState(null);Z.useEffect(()=>{h()},[h]);const I=ge=>C(Oe=>{const se=new Set(Oe);return se.has(ge)?se.delete(ge):se.add(ge),se}),F=Z.useMemo(()=>x?.node?x.node.type==="folder"?x.node.rel:hc(x.node.rel):"",[x]);Z.useEffect(()=>{if(!x)return;const ge=_e=>{if(_e.button===2)return;const Ee=_e.target;Ee&&Ee.closest&&Ee.closest(".zctx")||S(null)},Oe=_e=>{_e.key==="Escape"&&S(null)},se=()=>S(null),we=()=>S(null);return document.addEventListener("mousedown",ge,!0),window.addEventListener("keydown",Oe,!0),document.addEventListener("scroll",se,!0),window.addEventListener("resize",we),window.addEventListener("blur",we),()=>{document.removeEventListener("mousedown",ge,!0),window.removeEventListener("keydown",Oe,!0),document.removeEventListener("scroll",se,!0),window.removeEventListener("resize",we),window.removeEventListener("blur",we)}},[x]);const M=(ge,Oe)=>{const se=Oe!==void 0?Oe:F;S(null),_({kind:"prompt",title:ge==="note"?"新建笔记":"新建文件夹",value:ge==="note"?"未命名":"新建文件夹",onSubmit:we=>{_(null),(async()=>{const _e=String(we||"").replace(/[\\/:*?"<>|]/g,"").trim();if(!_e){g("名称不能为空");return}const Ee=(se?se+"/":"")+_e,qe=ge==="note"&&!/\.(md|markdown)$/i.test(_e)?Ee+".md":Ee,Ue=await jn().ws.create(qe,ge==="note"?"note":"folder","");if(!Ue.ok){g(Ue.message||"创建失败");return}h(),window.setTimeout(()=>{a()},120),ge==="note"&&m(Ue.value.rel);try{const tt=Le.getState().searchNotes;tt&&Le.getState().searchTerm&&tt("")}catch{}se&&C(tt=>{if(tt.has(se))return tt;const rt=new Set(tt);return rt.add(se),rt})})()}})},W=()=>{const ge=x?.node;S(null),ge&&_({kind:"prompt",title:ge.type==="note"?"重命名笔记":"重命名文件夹",value:ge.name,onSubmit:Oe=>{_(null),ee(ge,Oe)}})},ee=(ge,Oe)=>{!Oe||Oe===ge.name||(async()=>{if(ge.rel===f){const we=Le.getState();if(we.content!==we.savedContent&&(await we.save(),Le.getState().content!==Le.getState().savedContent)){g("当前笔记还有未保存的改动,改名已取消",3600);return}}const se=await jn().ws.rename(ge.rel,Oe);if(!se.ok){g(se.message||"重命名失败");return}if(h(),ge.type==="note"){try{const we=window.ztools;we?.removeFeature?.("note/"+ge.rel);const _e=await jn().ws.noteState(se.value.rel);if(_e.ok&&_e.value.near){const Ee=se.value.rel.split("/").pop().replace(/\.(md|markdown)$/i,"");we?.setFeature?.({code:"note/"+se.value.rel,icon:"logo.png",explain:"打开笔记「"+Ee+"」",cmds:[Ee]})}}catch{}m(se.value.rel)}window.setTimeout(()=>{a()},120)})()},U=()=>{const ge=x?.node;S(null),ge&&(async()=>{if(ge.type==="folder"){const se=LN(n,ge.rel);if(se>0){g(`文件夹内仍有 ${se} 篇笔记,请先移出或删除后再试`,4e3);return}}const Oe=ge.type==="note"?`删除笔记「${ge.name}」? +删除后将无法恢复,请确认是否继续。`:`删除文件夹「${ge.name}」?`;_({kind:"confirm",message:Oe,okText:"删除",danger:!0,onOk:()=>{_(null),(async()=>{ge.rel===f&&y();const se=await jn().ws.remove(ge.rel);if(!se.ok){g(se.message||"删除失败");return}h();try{window.ztools?.removeFeature?.("note/"+ge.rel)}catch{}window.setTimeout(()=>{a()},120)})()}})})()},fe=()=>{const ge=x?.node;S(null),ge&&(async()=>{const Oe=await jn().ws.duplicate(ge.rel);if(!Oe.ok){g(Oe.message||"复制失败");return}h(),g("已复制一份",1600)})()},ue=()=>{const ge=x?.node;S(null),ge&&jn().shell.revealInFolder(ge.rel)},ne=()=>{const ge=x?.node;if(S(null),!ge||ge.type!=="note")return;const Oe=Le.getState(),se=io()?.readNoteState?.(ge.rel)?.locked;if(ge.rel===Oe.currentRel){Oe.toggleLocked();return}const we=io()?.setNoteLocked?.(ge.rel,!se);g(we?.ok?se?"已取消只读":"已设为只读":we?.message||"操作失败",1800)},me=(ge,Oe)=>{hc(ge)!==Oe&&(async()=>{const se=Le.getState(),we=!!f&&(f===ge||f.startsWith(ge+"/")),_e=f===ge;if(we&&se.content!==se.savedContent){await se.save();const qe=Le.getState();if(qe.content!==qe.savedContent){g("有未保存的改动,已暂停移动,请稍后重试",2600);return}}const Ee=await jn().ws.move(ge,Oe);if(!Ee.ok){g(Ee.message||"移动失败");return}if(we&&f){const qe=_e?Ee.value.rel:Ee.value.rel+f.slice(ge.length);Le.getState().openNote(qe)}h()})()},j=(ge,Oe,se="after")=>{if(ge===Oe)return;const we=structuredClone(n),_e=ut=>hc(ut),Ee=_e(Oe);if(_e(ge)!==Ee)return;const qe=(ut,Ht)=>{for(const vt of ut)if(vt.type==="folder"){if(vt.rel===Ht)return vt.children||[];const mt=qe(vt.children||[],Ht);if(mt)return mt}return Ht===""?ut:null},Ue=qe(we,Ee);if(!Ue)return;const tt=Ue.findIndex(ut=>ut.rel===ge);if(tt<0||Ue.findIndex(ut=>ut.rel===Oe)<0)return;const[rt]=Ue.splice(tt,1),lt=Ue.findIndex(ut=>ut.rel===Oe);lt<0||(Ue.splice(se==="before"?lt:lt+1,0,rt),(async()=>{const ut=await jn().ws.saveOrder(we);ut.ok||g(ut.message||"排序保存失败"),h()})())},Q=ge=>{ge.preventDefault();const Oe=w||ge.dataTransfer.getData("text/plain");P(null),T(null),Oe&&hc(Oe)!==""&&me(Oe,"")},re=()=>C(new Set),K=ge=>M("note",ge),Be=ge=>M("folder",ge),ze=ge=>{jn().shell.revealInFolder(ge)},$e=ge=>{try{const Oe=pn().openNoteInBrowser?.(ge);Oe?Oe.ok||g(Oe.message||"打开失败"):g("打开失败:宿主接口不可用")}catch(Oe){g("在浏览器中打开失败:"+Oe.message)}},je=Z.useRef(null);Z.useEffect(()=>{const ge=()=>{try{je.current?.focus({preventScroll:!0})}catch{}};return window.addEventListener("cmark-focus-tree",ge),()=>window.removeEventListener("cmark-focus-tree",ge)},[]),Z.useEffect(()=>{const ge=Oe=>{const se=String(Oe.detail||"");if(!se)return;const we=se.split("/");if(we.pop(),!we.length)return;const _e=[];let Ee="";for(const qe of we)Ee=Ee?Ee+"/"+qe:qe,_e.push(Ee);C(qe=>{if(_e.every(tt=>qe.has(tt)))return qe;const Ue=new Set(qe);for(const tt of _e)Ue.add(tt);return Ue})};return window.addEventListener("cmark-reveal-note",ge),()=>window.removeEventListener("cmark-reveal-note",ge)},[]);const[Fe,Me]=Z.useState(!1);return Z.useEffect(()=>{const ge=je.current;if(!ge)return;const Oe=()=>{try{Me(ge.scrollHeight>ge.clientHeight+4)}catch{}};Oe();let se=null;try{se=new ResizeObserver(Oe),se.observe(ge)}catch{}return window.addEventListener("resize",Oe),()=>{try{se?.disconnect()}catch{}window.removeEventListener("resize",Oe)}},[n,E,r]),$.jsxs("aside",{className:"sidebar",children:[$.jsx(z$,{onOpenPanel:e}),String(r||"").trim()?$.jsxs("div",{className:"tree-hitbar",children:[$.jsx("span",{className:"tree-hitbar-count",children:s.length?`${s.indexOf(f)<0?0:s.indexOf(f)+1}/${s.length}`:"0/0"}),$.jsx("span",{className:"tree-hitbar-tip",children:"↑↓ 切换命中 · Esc 清除搜索"})]}):null,$.jsx("div",{className:"tree",ref:je,tabIndex:0,onContextMenu:ge=>{ge.target===ge.currentTarget&&(ge.preventDefault(),S({x:ge.clientX,y:ge.clientY,node:null}))},onDragOver:ge=>{w&&(ge.preventDefault(),A&&P(null))},onDrop:Q,children:String(r||"").trim()&&o.nodes.length===0?$.jsxs("div",{className:"tree-empty",children:["没有匹配「",r,"」的笔记"]}):n.length===0?$.jsx("div",{className:"tree-empty",children:"右键新建笔记"}):$.jsx(zN,{nodes:o.nodes,depth:0,open:E,toggle:I,onQuickNewNote:K,onQuickNewFolder:Be,onQuickOpenBrowser:$e,onQuickReveal:ze,active:f,onPick:m,onMenu:(ge,Oe)=>{ge.preventDefault(),ge.stopPropagation(),S({x:ge.clientX,y:ge.clientY,node:Oe})},dragRel:w,dragOver:A,setDragRel:T,setDragOver:P,onDrop:me,onReorder:j})}),$.jsx("div",{className:"footer",children:$.jsxs("button",{onClick:t,children:[$.jsx(q$,{}),"设置"]})}),E.size>0&&Fe?$.jsx("button",{type:"button",className:"tree-collapse-fab",title:"折叠全部目录",onClick:re,children:$.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M4 9.5 8 5.5l4 4"}),$.jsx("path",{d:"M4 13 8 9l4 4"})]})}):null,x&&$.jsx("div",{className:"zctx",style:{left:Math.min(x.x,window.innerWidth-160),top:Math.min(x.y,window.innerHeight-300)},onMouseDown:ge=>ge.stopPropagation(),onClick:ge=>ge.stopPropagation(),children:x.node?$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:()=>M("note"),children:[Us.note,$.jsx("span",{children:"新建笔记"})]}),$.jsxs("button",{type:"button",onClick:()=>M("folder"),children:[Us.folder,$.jsx("span",{children:"新建文件夹"})]}),$.jsx("div",{className:"zctx-sep"}),$.jsxs("button",{type:"button",onClick:W,children:[Us.rename,$.jsx("span",{children:"重命名"})]}),$.jsxs("button",{type:"button",onClick:fe,children:[Us.copy,$.jsx("span",{children:"复制一份"})]}),$.jsxs("button",{type:"button",onClick:ue,children:[Us.open,$.jsx("span",{children:"在资源管理器中打开"})]}),x.node.type==="note"?$.jsxs("button",{type:"button",onClick:ne,children:[Us.lock,$.jsx("span",{children:b&&x.node.rel===f?"取消只读":"设为只读"})]}):null,$.jsx("div",{className:"zctx-sep"}),$.jsxs("button",{type:"button",className:"danger",onClick:U,children:[Us.trash,$.jsx("span",{children:"删除"})]})]}):$.jsxs($.Fragment,{children:[$.jsxs("button",{type:"button",onClick:()=>M("folder"),children:[Us.folder,$.jsx("span",{children:"新建文件夹"})]}),$.jsxs("button",{type:"button",onClick:()=>M("note"),children:[Us.note,$.jsx("span",{children:"新建笔记"})]}),$.jsx("div",{className:"zctx-sep"}),$.jsxs("button",{type:"button",onClick:ue,children:[Us.open,$.jsx("span",{children:"在资源管理器中打开"})]}),$.jsx("div",{className:"zctx-sep"}),$.jsxs("button",{type:"button",onClick:re,children:[Us.collapse,$.jsx("span",{children:"折叠全部"})]})]})}),O?.kind==="prompt"?$.jsx(IN,{title:O.title,defaultValue:O.value,onSubmit:ge=>O.onSubmit(ge),onCancel:()=>_(null)}):null,O?.kind==="confirm"?$.jsx(L$,{message:O.message,okText:O.okText,danger:O.danger,onOk:()=>O.onOk(),onCancel:()=>_(null)}):null]})}const zk=typeof navigator<"u"&&navigator.userAgent.includes("Mac OS X"),yw=(e,t)=>!e||e.nodeName===t?e:yw(e.parentElement,t),K$=/^(?:\w+:)?\/\/(\S+)$/,G$=/mailto:([^?\\]+)/,Y$=/^localhost[\d:?]*(?:[^\d:?]\S*)?$/,J$=/^[^\s.]+\.\S{2,}$/,Lc=e=>{if(typeof e!="string")return!1;const t=K$.exec(e),n=G$.exec(e),r=t||n;if(!r)return!1;const i=r[1];if(!i)return!1;try{new URL(e)}catch{return!1}return Y$.test(i)||J$.test(i)},jN=(e,{allowedSchemes:t,permitInvalid:n=!1})=>{if(!e)return null;if(e.startsWith("/")||e.startsWith("#"))return e;let r=null;try{r=new URL(e)}catch{return n?e:null}return t&&!t.includes(r.protocol.slice(0,-1))?null:r.href},X$=e=>e===void 0,Q$=e=>e===null,Z$=e=>X$(e)||Q$(e),Mr=e=>!Z$(e);function De(e,t){return(...n)=>e(t,...n)}const eV={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=le.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},tV={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=an.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},nV={transform(e,t){const{current:n,affinity:r}=e;if(n==null)return;const i=Ce.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}},xd=new WeakMap,sd=new WeakMap,ad=new WeakMap,qN=new WeakMap,jk=new WeakMap,qk=new WeakMap,$k=new WeakMap,Lf=new WeakMap,le={ancestors(e,t={}){const{reverse:n=!1}=t;let r=le.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){const n=[];for(let r=0;rt[r])return 1}return 0},endsAfter(e,t){const n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),s=e[n],a=t[n];return le.equals(r,i)&&s>a},endsAt(e,t){const n=e.length,r=e.slice(0,n),i=t.slice(0,n);return le.equals(r,i)},endsBefore(e,t){const n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),s=e[n],a=t[n];return le.equals(r,i)&&sn===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return le.compare(e,t)===1},isAncestor(e,t){return e.lengtht.length&&le.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&le.compare(e,t)===0},isPath(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")},isSibling(e,t){if(e.length!==t.length)return!1;const n=e.slice(0,-1),r=t.slice(0,-1),i=e[e.length-1],s=t[t.length-1];return i!==s&&le.equals(n,r)},levels(e,t={}){const{reverse:n=!1}=t,r=[];for(let i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error(`Cannot get the next path of a root path [${e}], because it has no next index.`);const t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error(`Cannot get the parent path of the root path [${e}].`);return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error(`Cannot get the previous path of a root path [${e}], because it has no previous index.`);const t=e[e.length-1];if(t<=0)throw new Error(`Cannot get the previous path of a first child path [${e}] because it would result in a negative index.`);return e.slice(0,-1).concat(t-1)},relative(e,t){if(!le.isAncestor(t,e)&&!le.equals(e,t))throw new Error(`Cannot get the relative path of [${e}] inside ancestor [${t}], because it is not above or equal to the path.`);return e.slice(t.length)},transform(e,t,n={}){if(!e)return null;const r=[...e],{affinity:i="forward"}=n;if(e.length===0)return r;switch(t.type){case"insert_node":{const{path:s}=t;(le.equals(s,r)||le.endsBefore(s,r)||le.isAncestor(s,r))&&(r[s.length-1]+=1);break}case"remove_node":{const{path:s}=t;if(le.equals(s,r)||le.isAncestor(s,r))return null;le.endsBefore(s,r)&&(r[s.length-1]-=1);break}case"merge_node":{const{path:s,position:a}=t;le.equals(s,r)||le.endsBefore(s,r)?r[s.length-1]-=1:le.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=a);break}case"split_node":{const{path:s,position:a}=t;if(le.equals(s,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else le.endsBefore(s,r)?r[s.length-1]+=1:le.isAncestor(s,r)&&e[s.length]>=a&&(r[s.length-1]+=1,r[s.length]-=a);break}case"move_node":{const{path:s,newPath:a}=t;if(le.equals(s,a))return r;if(le.isAncestor(s,r)||le.equals(s,r)){const o=a.slice();return le.endsBefore(s,a)&&s.length0?"forward":t<0?"backward":"collapsed"},edges(e,t={}){const{reverse:n=!1}=t,{anchor:r,focus:i}=e;return Ce.isBackward(e)===n?[r,i]:[i,r]},end(e){const[,t]=Ce.edges(e);return t},equals(e,t){return an.equals(e.anchor,t.anchor)&&an.equals(e.focus,t.focus)},surrounds(e,t){const n=Ce.intersection(e,t);return n?Ce.equals(n,t):!1},includes(e,t){if(Qt.isRange(t)){if(Ce.includes(e,t.anchor)||Ce.includes(e,t.focus))return!0;const[a,o]=Ce.edges(e),[l,u]=Ce.edges(t);return an.isBefore(a,l)&&an.isAfter(o,u)}const[n,r]=Ce.edges(e);let i=!1,s=!1;return Qt.isPoint(t)?(i=an.compare(t,n)>=0,s=an.compare(t,r)<=0):(i=le.compare(t,n.path)>=0,s=le.compare(t,r.path)<=0),i&&s},intersection(e,t){const{anchor:n,focus:r}=e,i=Na(e,aV),[s,a]=Ce.edges(e),[o,l]=Ce.edges(t),u=an.isBefore(s,o)?o:s,f=an.isBefore(a,l)?a:l;return an.isBefore(f,u)?null:oV({anchor:u,focus:f},i)},isBackward(e){const{anchor:t,focus:n}=e;return an.isAfter(t,n)},isCollapsed(e){const{anchor:t,focus:n}=e;return an.equals(t,n)},isExpanded(e){return!Ce.isCollapsed(e)},isForward(e){return!Ce.isBackward(e)},isRange(e){return Zr(e)&&an.isPoint(e.anchor)&&an.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){const[t]=Ce.edges(e);return t},transform(e,t,n={}){if(e===null)return null;const{affinity:r="inward"}=n;let i,s;if(r==="inward"){const l=Ce.isCollapsed(e);Ce.isForward(e)?(i="forward",s=l?i:"backward"):(i="backward",s=l?i:"forward")}else r==="outward"?Ce.isForward(e)?(i="backward",s="forward"):(i="forward",s="backward"):(i=r,s=r);const a=an.transform(e.anchor,t,{affinity:i}),o=an.transform(e.focus,t,{affinity:s});return!a||!o?null:{anchor:a,focus:o}}},Uk=(e,{deep:t=!1}={})=>!Zr(e)||typeof e.apply=="function"?!1:t?ie.isNodeList(e.children):Array.isArray(e.children),Nr={isAncestor(e,{deep:t=!1}={}){return Zr(e)&&ie.isNodeList(e.children,{deep:t})},isElement:Uk,isElementList(e,{deep:t=!1}={}){return Array.isArray(e)&&e.every(n=>Nr.isElement(n,{deep:t}))},isElementProps(e){return e.children!==void 0},isElementType:(e,t,n="type")=>Uk(e)&&e[n]===t,matches(e,t){for(const n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},lV=["text"],uV=["children"];function Hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zu(e){for(var t=1;t=0:aZu(Zu({},h),{},{path:[h.path[0]-i,...h.path.slice(1)]}),o=a(n),l=a(r),u={anchor:o,focus:l},f=ie.nodes(s,{reverse:!0,pass:([,h])=>!Ce.includes(u,h)});for(const[,h]of f){if(!Ce.includes(u,h)){const m=h[h.length-1];Jl(s,le.parent(h),g=>xw(g,m,1))}le.equals(h,l.path)&&Dp(s,h,m=>{const g=m.text.slice(0,l.offset);return Zu(Zu({},m),{},{text:g})}),le.equals(h,o.path)&&Dp(s,h,m=>{const g=m.text.slice(o.offset);return Zu(Zu({},m),{},{text:g})})}return s.children},findPath(e,t){for(const[n,r]of ie.nodes(e))if(n===t)return r},get(e,t){const n=ie.getIf(e,t);if(n===void 0)throw new Error(`Cannot find a descendant at path [${t}] in node: ${Zn.stringify(e)}`);return n},getIf(e,t){let n=e;for(let r=0;rie.isNode(n,{deep:t}))},isText(e){return typeof e.text=="string"},last(e,t){const n=t.slice();let r=ie.get(e,n);for(;r&&!(ie.isText(r)||r.children.length===0);){const i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){const n=ie.get(e,t);if(!ie.isText(n))throw new Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Zn.stringify(n)}`);return n},*levels(e,t,n={}){for(const r of le.levels(t,n))yield[ie.get(e,r),r]},matches(e,t){return ie.isElement(e)&&Nr.isElementProps(t)&&Nr.matches(e,t)||ie.isText(e)&&Sn.isTextProps(t)&&Sn.matches(e,t)},*nodes(e,t={}){const{pass:n,reverse:r=!1}=t,{from:i=[],to:s}=t,a=new Set;let o=[],l=e;for(;!(s&&(r?le.isBefore(o,s):le.isAfter(o,s)));){if(a.has(l)||(yield[l,o]),!a.has(l)&&!ie.isText(l)&&l.children.length!==0&&(n==null||n([l,o])===!1)){a.add(l);let u=r?l.children.length-1:0;le.isAncestor(o,i)&&(u=i[o.length]),o=o.concat(u),l=ie.get(e,o);continue}if(o.length===0)break;if(!r){const u=le.next(o);if(ie.has(e,u)){o=u,l=ie.get(e,o);continue}}if(r&&o[o.length-1]!==0){o=le.previous(o),l=ie.get(e,o);continue}o=le.parent(o),l=ie.get(e,o),a.add(l)}},parent(e,t){const n=le.parent(t),r=ie.get(e,n);if(ie.isText(r))throw new Error(`Cannot get the parent of path [${t}] because it does not exist in the root.`);return r},string(e){return ie.isText(e)?e.text:e.children.map(ie.string).join("")},*texts(e,t={}){for(const[n,r]of ie.nodes(e,t))ie.isText(n)&&(yield[n,r])}};function Wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lr(e){for(var t=1;tpc.isOperation(t))},isSelectionOperation(e){return pc.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return pc.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return lr(lr({},e),{},{type:"remove_node"});case"insert_text":return lr(lr({},e),{},{type:"remove_text"});case"merge_node":return lr(lr({},e),{},{type:"split_node",path:le.previous(e.path)});case"move_node":{const{newPath:t,path:n}=e;if(le.equals(t,n))return e;if(le.isSibling(n,t))return lr(lr({},e),{},{path:t,newPath:n});const r=le.transform(n,e),i=le.transform(le.next(n),e);return lr(lr({},e),{},{path:r,newPath:i})}case"remove_node":return lr(lr({},e),{},{type:"insert_node"});case"remove_text":return lr(lr({},e),{},{type:"insert_text"});case"set_node":{const{properties:t,newProperties:n}=e;return lr(lr({},e),{},{properties:n,newProperties:t})}case"set_selection":{const{properties:t,newProperties:n}=e;return t==null?lr(lr({},e),{},{properties:n,newProperties:null}):n==null?lr(lr({},e),{},{properties:null,newProperties:t}):lr(lr({},e),{},{properties:n,newProperties:t})}case"split_node":return lr(lr({},e),{},{type:"merge_node",path:le.next(e.path)})}}},Zr=e=>typeof e=="object"&&e!==null,co=(e,t)=>{if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;ne.selection?e.selection:e.children.length>0?L.end(e,[]):[0],zc=(e,t)=>{const[n]=L.node(e,t);return r=>r===n},wd=(e,t=!1)=>{const n=!t,r=t?mV(e):e;let i=Mt.None,s=Mt.None,a=0,o=null,l=null,u=null;for(const f of r){const h=f.codePointAt(0);if(!h)break;const m=NV(f,h);if([i,s]=n?[s,m]:[m,i],el(i,Mt.ZWJ)&&el(s,Mt.ExtPict)&&(n?o=Kk(e.substring(0,a)):o=Kk(e.substring(0,e.length-a)),!o)||el(i,Mt.RI)&&el(s,Mt.RI)&&(l!==null?l=!l:n?l=!0:l=IV(e.substring(0,e.length-a)),!l)||el(i,Mt.InCBLinker|Mt.InCBExtend)&&el(s,Mt.InCBConsonant)&&(n?u=Gk(e.substring(0,a)):u=Gk(e.substring(0,e.length-a)),!u)||i!==Mt.None&&s!==Mt.None&&BV(i,s))break;a+=f.length}return a||1},cV=/\s/,fV=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,dV=/['\u2018\u2019]/,$N=e=>typeof Intl>"u"||typeof Intl.Segmenter!="function"?void 0:new Intl.Segmenter(void 0,{granularity:"word"}).segment(e),hV=(e,t=!1,n)=>{var r;let i=0,s=-1,a=e;for(;a.length>0;){const u=wd(a,t),[f,h]=Ed(a,u,t);if(n?n(f):Q4(f,h,t))s<0&&(s=i);else if(s>=0)break;i+=u,a=h}if(n||s<0)return i;const o=t?e.slice(e.length-i,e.length-s):e.slice(s,i),l=(r=$N(o))===null||r===void 0?void 0:r.containing(t?o.length-1:0);return l!=null&&l.isWordLike?t?s+o.length-l.index:s+l.segment.length:i},pV=(e,t,n)=>{const r=(h,m,g)=>n?n(h):Q4(h,m,g);let i=t,s=e.slice(0,t);for(;s.length>0;){const h=wd(s,!0),[m,g]=Ed(s,h,!0);if(!r(m,g,!0))break;i-=h,s=g}let a=t,o=e.slice(t);for(;o.length>0;){const h=wd(o),[m,g]=Ed(o,h);if(!r(m,g,!1))break;a+=h,o=g}if(n||i===a)return[i,a];const l=$N(e.slice(i,a)),u=t-i,f=[u>0?l?.containing(u-1):void 0,uh?.isWordLike);return f?[i+f.index,i+f.index+f.segment.length]:[i,a]},Ed=(e,t,n)=>{if(n){const r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},Q4=(e,t,n=!1)=>{if(cV.test(e))return!1;if(dV.test(e)){const r=wd(t,n),[i,s]=Ed(t,r,n);if(Q4(i,s,n))return!0}return!fV.test(e)},mV=function*(t){const n=t.length-1;for(let r=0;re>=55296&&e<=56319,vV=e=>e>=56320&&e<=57343;var Mt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any",e[e.InCBConsonant=4096]="InCBConsonant",e[e.InCBExtend=8192]="InCBExtend",e[e.InCBLinker=16384]="InCBLinker"})(Mt||(Mt={}));const yV=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AF0\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDECB-\uDECF\uDEF0-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDDF0\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDE50-\uDE52\uDE5B\uDE5C\uDE5F\uDE80\uDE81]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,xV=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,bV=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,wV=/^[\u1100-\u115F\uA960-\uA97C]$/,EV=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,CV=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,kV=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,DV=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,SV=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCCF\uDCD0\uDCF6-\uDCFF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAF-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDE5F\uDE66-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFA]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDEE5\uDEE9\uDEEB-\uDEF0\uDEF3-\uDEFF\uDFDC-\uDFF0]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE58-\uDE5F\uDE6E-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,_V=/^(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])$/,AV=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D1\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42\u1B43\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAA\u1BAC\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD32\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE\uDFCF\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3D\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF41\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,TV=/^(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)$/,NV=(e,t)=>{let n=Mt.Any;return e.search(yV)!==-1&&(n|=Mt.Extend),t===8205&&(n|=Mt.ZWJ),t>=127462&&t<=127487&&(n|=Mt.RI),e.search(xV)!==-1&&(n|=Mt.Prepend),e.search(bV)!==-1&&(n|=Mt.SpacingMark),e.search(wV)!==-1&&(n|=Mt.L),e.search(EV)!==-1&&(n|=Mt.V),e.search(CV)!==-1&&(n|=Mt.T),e.search(kV)!==-1&&(n|=Mt.LV),e.search(DV)!==-1&&(n|=Mt.LVT),e.search(SV)!==-1&&(n|=Mt.ExtPict),e.search(_V)!==-1&&(n|=Mt.InCBConsonant),e.search(AV)!==-1&&(n|=Mt.InCBExtend),e.search(TV)!==-1&&(n|=Mt.InCBLinker),n};function el(e,t){return(e&t)!==0}const OV=[[Mt.L,Mt.L|Mt.V|Mt.LV|Mt.LVT],[Mt.LV|Mt.V,Mt.V|Mt.T],[Mt.LVT|Mt.T,Mt.T],[Mt.Any,Mt.Extend|Mt.ZWJ],[Mt.Any,Mt.SpacingMark],[Mt.Prepend,Mt.Any],[Mt.InCBLinker|Mt.InCBExtend,Mt.InCBConsonant],[Mt.ZWJ,Mt.ExtPict],[Mt.RI,Mt.RI]];function BV(e,t){return OV.findIndex(n=>el(e,n[0])&&el(t,n[1]))===-1}const PV=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCCF\uDCD0\uDCF6-\uDCFF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAF-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDE5F\uDE66-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFA]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDEE5\uDEE9\uDEEB-\uDEF0\uDEF3-\uDEFF\uDFDC-\uDFF0]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCBC-\uDCBF\uDCC2-\uDCCF\uDCD9-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE58-\uDE5F\uDE6E-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AF0\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDECB-\uDECF\uDEF0-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDDF0\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD27\uDD28\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDE50-\uDE52\uDE5B\uDE5C\uDE5F\uDE80\uDE81]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Kk=e=>e.search(PV)!==-1,RV=/(?:[\u0915-\u0939\u0958-\u095F\u0978-\u097F\u0995-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09DC\u09DD\u09DF\u09F0\u09F1\u0A95-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0AF9\u0B15-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B5C\u0B5D\u0B5F\u0B71\u0C15-\u0C28\u0C2A-\u0C39\u0C58-\u0C5A\u0D15-\u0D3A\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1780-\u17B3\u1A20-\u1A54\u1B0B\u1B0C\u1B13-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBB-\u1BBD\uA989-\uA98B\uA98F-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA60-\uAA6F\uAA71-\uAA73\uAA7A\uAA7E\uAA7F\uAAE0-\uAAEA\uABC0-\uABDA]|\uD802[\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35]|\uD804[\uDD03-\uDD26\uDD44\uDD47\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5]|\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDE00\uDE0B-\uDE32\uDE50\uDE5C-\uDE83]|\uD807[\uDF04-\uDF10\uDF12-\uDF33])(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*(?:[\u094D\u09CD\u0ACD\u0B4D\u0C4D\u0D4D\u1039\u17D2\u1A60\u1B44\u1BAB\uA9C0\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807\uDF42)(?:(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC0\u0CC2\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B03\u1B34-\u1B3D\u1B42-\u1B44\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF3\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA953\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9C0\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC0\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34-\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF4D\uDF57\uDF66-\uDF6C\uDF70-\uDF74\uDFB8\uDFBB-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFC9\uDFCE-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB7\uDF1D\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B-\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99\uDF60\uDF62-\uDF64\uDF66]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD29\uDD2D-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]))*$/,Gk=e=>e.search(RV)!==-1,FV=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,IV=e=>{const t=e.match(FV);return t===null?!1:t[0].length/2%2===1},VN=(e,{deep:t=!1}={})=>Zr(e)?typeof e.above=="function"&&typeof e.addMark=="function"&&typeof e.after=="function"&&typeof e.apply=="function"&&typeof e.before=="function"&&typeof e.collapse=="function"&&typeof e.delete=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.deselect=="function"&&typeof e.edges=="function"&&typeof e.elementReadOnly=="function"&&typeof e.end=="function"&&typeof e.first=="function"&&typeof e.fragment=="function"&&typeof e.getDirtyPaths=="function"&&typeof e.getFragment=="function"&&typeof e.getMarks=="function"&&typeof e.hasBlocks=="function"&&typeof e.hasInlines=="function"&&typeof e.hasPath=="function"&&typeof e.hasRange=="function"&&typeof e.hasTexts=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertNodes=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertText=="function"&&typeof e.isBlock=="function"&&typeof e.isEdge=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isEmpty=="function"&&typeof e.isEnd=="function"&&typeof e.isInline=="function"&&typeof e.isNormalizing=="function"&&typeof e.isSelectable=="function"&&typeof e.isStart=="function"&&typeof e.isVoid=="function"&&typeof e.last=="function"&&typeof e.leaf=="function"&&typeof e.levels=="function"&&typeof e.liftNodes=="function"&&typeof e.markableVoid=="function"&&typeof e.mergeNodes=="function"&&typeof e.move=="function"&&typeof e.moveNodes=="function"&&typeof e.next=="function"&&typeof e.node=="function"&&typeof e.nodes=="function"&&typeof e.normalize=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.parent=="function"&&typeof e.path=="function"&&typeof e.pathRef=="function"&&typeof e.pathRefs=="function"&&typeof e.point=="function"&&typeof e.pointRef=="function"&&typeof e.pointRefs=="function"&&typeof e.positions=="function"&&typeof e.previous=="function"&&typeof e.range=="function"&&typeof e.rangeRef=="function"&&typeof e.rangeRefs=="function"&&typeof e.removeMark=="function"&&typeof e.removeNodes=="function"&&typeof e.select=="function"&&typeof e.setNodes=="function"&&typeof e.setNormalizing=="function"&&typeof e.setPoint=="function"&&typeof e.setSelection=="function"&&typeof e.shouldMergeNodesRemovePrevNode=="function"&&typeof e.shouldNormalize=="function"&&typeof e.splitNodes=="function"&&typeof e.start=="function"&&typeof e.string=="function"&&typeof e.unhangRange=="function"&&typeof e.unsetNodes=="function"&&typeof e.unwrapNodes=="function"&&typeof e.void=="function"&&typeof e.withoutNormalizing=="function"&&typeof e.wrapNodes=="function"&&(e.marks===null||Zr(e.marks))&&(e.selection===null||Ce.isRange(e.selection))&&(t?ie.isNodeList(e.children)&&pc.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations)):!1,L={above(e,t){return e.above(t)},addMark(e,t,n){e.addMark(t,n)},after(e,t,n){return e.after(t,n)},before(e,t,n){return e.before(t,n)},deleteBackward(e,t={}){const{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e,t={}){const{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e,t={}){return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasRange(e,t){return e.hasRange(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,n){return e.isEdge(t,n)},isEditor:VN,isElementReadOnly(e,t){return e.isElementReadOnly(t)},insertionPoint(e,t){return e.insertionPoint(t)},isIsolated(e,t){return e.isIsolated(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,n){return e.isEnd(t,n)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isRemoteChange(e){return Lf.get(e)===!0},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,n){return e.isStart(t,n)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,n){return e.leaf(t,n)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,n){return e.node(t,n)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,n){return e.parent(t,n)},path(e,t,n){return e.path(t,n)},pathRef(e,t,n){return e.pathRef(t,n)},pathRefs(e){return e.pathRefs()},point(e,t,n){return e.point(t,n)},pointRef(e,t,n){return e.pointRef(t,n)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,n){return e.range(t,n)},rangeRef(e,t,n){return e.rangeRef(t,n)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,n){return e.string(t,n)},unhangRange(e,t,n){return e.unhangRange(t,n)},void(e,t){return e.void(t)},word(e,t){return e.word(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},withRemoteChanges(e,t){const n=Lf.get(e);Lf.set(e,!0);try{t()}finally{n===void 0?Lf.delete(e):Lf.set(e,n)}},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},Qt={isLocation(e){return le.isPath(e)||an.isPoint(e)||Ce.isRange(e)},isPath(e){return Array.isArray(e)},isPoint(e){return"offset"in e},isRange(e){return"anchor"in e},isSpan(e){return Array.isArray(e)&&Array.isArray(e[0])}},MV={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(le.isPath)}};function Yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;tt.offset?1:0:n},isAfter(e,t){return an.compare(e,t)===1},isBefore(e,t){return an.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&le.equals(e.path,t.path)},isPoint(e){return Zr(e)&&typeof e.offset=="number"&&le.isPath(e.path)},transform(e,t,n={}){if(e===null)return null;const{affinity:r="forward"}=n;let{path:i,offset:s}=e;switch(t.type){case"insert_node":case"move_node":{i=le.transform(i,t,n);break}case"insert_text":{le.equals(t.path,i)&&(t.offset{let{text:t}=e;return Na(e,LV)},Sn={equals(e,t,n={}){const{loose:r=!1,ignore:i=[]}=n;if(i.length===0)return r?co(Zk(e),Zk(t)):co(e,t);const s=a=>Object.fromEntries(Object.entries(a).filter(([o])=>!(r&&o==="text")&&!i.includes(o)));return co(s(e),s(t))},isText(e){return Zr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Sn.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(const n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){let n=[{leaf:no({},e)}];for(const r of t){const{anchor:i,focus:s,merge:a}=r,o=Na(r,zV),[l,u]=Ce.edges(r),f=[];let h=0;const m=l.offset,g=u.offset,b=a??Object.assign;for(const{leaf:y}of n){const{length:E}=y.text,C=h;if(h+=E,m<=C&&h<=g){b(y,o),f.push({leaf:y});continue}if(m!==g&&(m===h||g===C)||m>h||gC){const _=m-C;S={leaf:no(no({},x),{},{text:x.text.slice(0,_)})},x=no(no({},x),{},{text:x.text.slice(_)})}b(x,o),S&&f.push(S),f.push({leaf:x}),O&&f.push(O)}n=f}if(n.length>1){let r=0;for(const[i,s]of n.entries()){const a=r,o=a+s.leaf.text.length,l={start:a,end:o};i===0&&(l.isFirst=!0),i===n.length-1&&(l.isLast=!0),s.position=l,r=o}}return n}};function e6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cp(e){for(var t=1;tkp(e,t,0,...n),kp=(e,t,n,...r)=>{const i=e.slice();return i.splice(t,n,...r),i},n6=(e,t,n)=>{const r=e.slice();return r[t]=n,r},xw=kp,Z4=(e,t,n)=>{if(t.length===0)throw new Error("Cannot modify the editor");const r=ie.get(e,t),i=t.slice();let s=n(r);for(;i.length>1;){const o=i.pop(),l=ie.get(e,i);s=Cp(Cp({},l),{},{children:n6(l.children,o,s)})}const a=i[0];e.children=n6(e.children,a,s)},Jl=(e,t,n)=>{t.length===0?e.children=n(e.children):Z4(e,t,r=>{if(ie.isText(r))throw new Error(`Cannot get the element at path [${t}] because it refers to a leaf node: ${Zn.stringify(r)}`);return Cp(Cp({},r),{},{children:n(r.children)})})},Dp=(e,t,n)=>Z4(e,t,r=>{if(!ie.isText(r))throw new Error(`Cannot get the leaf node at path [${t}] because it refers to a non-leaf node: ${Zn.stringify(r)}`);return n(r)});function r6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t{const a=r[r.length-1];if(a>s.length)throw new Error(`Cannot apply an "insert_node" operation at path [${r}] because the destination is past the end of the node.`);return t6(s,a,i)}),n=!0;break}case"insert_text":{const{path:r,offset:i,text:s}=t;if(s.length===0)break;Dp(e,r,a=>{const o=a.text.slice(0,i),l=a.text.slice(i);return ui(ui({},a),{},{text:o+s+l})}),n=!0;break}case"merge_node":{const{path:r}=t,i=r[r.length-1],s=le.previous(r),a=s[s.length-1];if(r.length===0)throw new Error(`Cannot apply a "merge_node" operation at path [${r}] because the root node cannot be merged.`);if(typeof i!="number"||typeof a!="number")throw new Error("Index must be number");Jl(e,le.parent(r),o=>{const l=o[i],u=o[a];let f;if(ie.isText(l)&&ie.isText(u))f=ui(ui({},u),{},{text:u.text+l.text});else if(ie.isElement(l)&&ie.isElement(u))f=ui(ui({},u),{},{children:u.children.concat(l.children)});else throw new Error(`Cannot apply a "merge_node" operation at path [${r}] to nodes of different interfaces: ${Zn.stringify(l)} ${Zn.stringify(u)}`);return kp(o,a,2,f)}),n=!0;break}case"move_node":{const{path:r,newPath:i}=t,s=r[r.length-1];if(le.isAncestor(r,i))throw new Error(`Cannot move a path [${r}] to new path [${i}] because the destination is inside itself.`);const a=ie.get(e,r);Jl(e,le.parent(r),u=>xw(u,s,1));const o=le.transform(r,t),l=o[o.length-1];Jl(e,le.parent(o),u=>t6(u,l,a)),n=!0;break}case"remove_node":{const{path:r}=t,i=r[r.length-1];if(Jl(e,le.parent(r),s=>xw(s,i,1)),e.selection){let s=ui({},e.selection);for(const[a,o]of Ce.points(s)){const l=an.transform(a,t);if(s!=null&&l!=null)s[o]=l;else{let u,f;for(const[m,g]of ie.texts(e))if(le.compare(g,r)===-1)u=[m,g];else{f=[m,g];break}let h=!1;u&&f&&(le.isSibling(u[1],r)?h=!1:le.equals(f[1],r)?h=!0:h=le.common(u[1],r).length{const o=a.text.slice(0,i),l=a.text.slice(i+s.length);return ui(ui({},a),{},{text:o+l})}),n=!0;break}case"set_node":{const{path:r,properties:i,newProperties:s}=t;if(r.length===0)throw new Error("Cannot set properties on the root node!");Z4(e,r,a=>{const o=ui({},a);for(const l in s){if(Tc.includes(l))throw new Error(`Cannot set the "${l}" property of nodes!`);const u=s[l];if(l==="then"&&typeof u=="function")throw new Error('Cannot set the "then" property of a node to a function');u==null?delete o[l]:o[l]=u}for(const l in i)Object.hasOwn(s,l)||delete o[l];return o});break}case"set_selection":{const{newProperties:r}=t;if(r==null){e.selection=null;break}if(e.selection==null){if(!(r.anchor&&r.focus))throw new Error(`Cannot apply an incomplete "set_selection" operation properties ${Zn.stringify(r)} when there is no current selection.`);e.selection=ui({},r);break}const i=ui({},e.selection);for(const s in r){if(UN.includes(s))throw new Error(`Cannot set the "${s}" property of the selection!`);const a=r[s];if(s==="then"&&typeof a=="function")throw new Error('Cannot set the "then" property of the selection to a function');if(a==null){if(s==="anchor"||s==="focus")throw new Error(`Cannot remove the "${s}" selection property`);delete i[s]}else i[s]=a}e.selection=i;break}case"split_node":{const{path:r,position:i,properties:s}=t,a=r[r.length-1];if(r.length===0)throw new Error(`Cannot apply a "split_node" operation at path [${r}] because the root node cannot be split.`);if(typeof a!="number")throw new Error("Index must be number");Jl(e,le.parent(r),o=>{const l=o[a];let u,f;if(ie.isText(l)){const h=l.text.slice(0,i),m=l.text.slice(i);u=ui(ui({},l),{},{text:h}),f={text:m}}else{const h=l.children.slice(0,i),m=l.children.slice(i);u=ui(ui({},l),{},{children:h}),f={children:m}}for(const h in s){if(Tc.includes(h))throw new Error(`Cannot set the "${h}" property of nodes!`);const m=s[h];if(h==="then"&&typeof m=="function")throw new Error('Cannot set the "then" property of a node to a function');m!=null&&(f[h]=m)}return kp(o,a,1,u,f)}),n=!0;break}}if(n&&e.selection){const r=ui({},e.selection),i=L.isRemoteChange(e)&&Ce.isExpanded(r)?Ce.transform(r,t,{affinity:"inward"}):null;for(const[s,a]of Ce.points(r))r[a]=i?i[a]:an.transform(s,t);Ce.equals(r,e.selection)||(e.selection=r)}}},qV={setChildren(e,t){e.setChildren(t)},insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},$V={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},VV={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t,n={}){L.withoutNormalizing(e,()=>{const{voids:r=!1,select:i=!1}=n;let{at:s=X4(e)}=n;if(Qt.isPath(s)&&(s=L.range(e,s)),Qt.isRange(s))if(Ce.isCollapsed(s))s=s.anchor;else{const f=Ce.end(s);if(!r&&L.void(e,{at:f}))return;const h=Ce.start(s),m=L.pointRef(e,h),g=L.pointRef(e,f);Ie.delete(e,{at:s,voids:r});const b=m.unref(),y=g.unref();s=b||y,n.select!==!1&&Ie.setSelection(e,{anchor:s,focus:s})}if(!r&&L.void(e,{at:s})||L.elementReadOnly(e,{at:s}))return;const a=i?L.pointRef(e,s):void 0,{path:o,offset:l}=s;t.length>0&&e.apply({type:"insert_text",path:o,offset:l,text:t});const u=a?.unref();u&&Ie.select(e,u)})}};function i6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vh(e){for(var t=1;ttp.get(e)||!1,HN=(e,t,n)=>{const r=tp.get(e)||!1;tp.set(e,!0);try{t(),n()}finally{tp.set(e,r)}},s6=8;function eE(e,t,n,r=!1){let i=xd.get(e)||[],s=sd.get(e);const a=o=>{if(o){const l=o.join(",");s.has(l)||(s.add(l),i.push(o))}};if(n){const o=i;if(i=[],r){s=void 0;for(const l of o){const u=n(l);u&&i.push(u)}}else{s=new Set;for(const l of o)a(n(l))}}!s&&(t.length>s6||!n&&i.length>s6)&&(s=new Set(i.map(o=>o.join(","))));for(const o of t)s?a(o):i.some(l=>le.equals(l,o))||i.push(o);xd.set(e,i),s?sd.set(e,s):sd.delete(e)}const WN=(e,t)=>{for(const n of L.pathRefs(e))eV.transform(n,t);for(const n of L.pointRefs(e))tV.transform(n,t);for(const n of L.rangeRefs(e))nV.transform(n,t);if(!UV(e)){const n=le.operationCanTransformPath(t)?r=>le.transform(r,t):void 0;eE(e,e.getDirtyPaths(t),n,t.type!=="merge_node")}Ie.transform(e,t),e.operations.push(t),L.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),ad.get(e)||(ad.set(e,!0),Promise.resolve().then(()=>{ad.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},KN=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{const{path:n}=t;return le.levels(n)}case"insert_node":{const{node:n,path:r}=t,i=le.levels(r),s=ie.isText(n)?[]:Array.from(ie.nodes(n),([,a])=>r.concat(a));return[...i,...s]}case"merge_node":{const{path:n}=t,r=le.ancestors(n),i=le.previous(n);return[...r,i]}case"move_node":{const{path:n,newPath:r}=t;if(le.equals(n,r))return[];const i=[],s=[];for(const u of le.ancestors(n)){const f=le.transform(u,t);i.push(f)}for(const u of le.ancestors(r)){const f=le.transform(u,t);s.push(f)}const a=s[s.length-1],o=r[r.length-1],l=a.concat(o);return[...i,...s,l]}case"remove_node":{const{path:n}=t;return[...le.ancestors(n)]}case"split_node":{const{path:n}=t,r=le.levels(n),i=le.next(n);return[...r,i]}default:return[]}},GN=e=>{const{selection:t}=e;return t?ie.fragment(e,t):[]},HV=(e,t)=>ie.extractProps(t),YN=(e,t,n)=>{const[r,i]=t;if(ie.isText(r))return;"children"in r||(r.children=[]);let s=r;if(s!==e&&s.children.length===0){const o={text:""};Ie.insertNodes(e,o,{at:i.concat(0),voids:!0}),s=ie.get(e,i)}if(s!==e&&(e.isInline(s)||ie.isText(s.children[0])||e.isInline(s.children[0])))for(let o=0;o{const i=n*42;if(t>i)throw new Error(`Could not completely normalize the editor after ${i} iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. Next dirty path: [${r[r.length-1]}]. Check the normalizeNode logic for this node and its ancestors.`);return!0},XN=(e,t={})=>{const{voids:n=!1,mode:r="lowest",at:i=e.selection,match:s}=t;if(!i)return;let a=L.path(e,i);if(!Qt.isRange(i)||le.equals(i.focus.path,i.anchor.path)){if(a.length===0)return;a=le.parent(a)}const o=r==="lowest",[l]=L.levels(e,{at:a,voids:n,match:s,reverse:o});return l};function a6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o6(e){for(var t=1;t{const{selection:r}=e;if(r){const i=(o,l)=>{if(!ie.isText(o))return!1;const[u,f]=L.parent(e,l);return!e.isVoid(u)||e.markableVoid(u)},s=Ce.isExpanded(r);let a=!1;if(!s){const[o,l]=L.node(e,r);if(o&&i(o,l)){const[u]=L.parent(e,l);a=u&&e.markableVoid(u)}}if(s||a)Ie.setNodes(e,{[t]:n},{match:i,split:!0,voids:!0});else{const o=o6(o6({},L.marks(e)||{}),{},{[t]:n});e.marks=o,ad.get(e)||e.onChange()}}};function l6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function u6(e){for(var t=1;t{const r=L.point(e,t,{edge:"end"}),i=L.end(e,[]),s={anchor:r,focus:i},{distance:a=1}=n;let o=0,l;for(const u of L.positions(e,u6(u6({},n),{},{at:s}))){if(o>a)break;o!==0&&(l=u),o++}return l};function c6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f6(e){for(var t=1;t{const r=L.start(e,[]),i=L.point(e,t,{edge:"start"}),s={anchor:r,focus:i},{distance:a=1}=n;let o=0,l;for(const u of L.positions(e,f6(f6({},n),{},{at:s,reverse:!0}))){if(o>a)break;o!==0&&(l=u),o++}return l},eO=(e,t)=>{const{selection:n}=e;n&&Ce.isCollapsed(n)&&Ie.delete(e,{unit:t,reverse:!0})},tO=(e,t)=>{const{selection:n}=e;n&&Ce.isCollapsed(n)&&Ie.delete(e,{unit:t})},nO=(e,{direction:t="forward"}={})=>{const{selection:n}=e;if(n&&Ce.isExpanded(n)){const[r,i]=Ce.edges(n),s=u=>{var f;return(f=L.above(e,{at:u,match:h=>ie.isElement(h)&&L.isBlock(e,h)}))===null||f===void 0?void 0:f[1]},a=s(r),o=s(i);if(!L.above(e,{at:r,match:u=>ie.isElement(u)&&e.isIsolated(u)})&&a&&o&&a.length===1&&le.isSibling(a,o)&&le.isBefore(a,o)&&!L.isVoid(e,ie.get(e,o))&&L.isStart(e,r,a)&&L.isStart(e,i,o)){const u=L.pathRef(e,o);L.withoutNormalizing(e,()=>{for(let h=o[o.length-1]-1;h>=a[a.length-1];h--)Ie.removeNodes(e,{at:[...le.parent(a),h]})});const f=u.unref();f&&Ie.select(e,L.start(e,f));return}Ie.delete(e,{reverse:t==="backward"})}},rO=(e,t)=>[L.start(e,t),L.end(e,t)];function d6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h6(e){for(var t=1;tL.above(e,h6(h6({},t),{},{match:n=>ie.isElement(n)&&L.isElementReadOnly(e,n)})),ww=(e,t)=>L.point(e,t,{edge:"end"}),sO=(e,t)=>{const n=L.path(e,t,{edge:"start"});return L.node(e,n)},aO=(e,t)=>{const n=L.range(e,t);return ie.fragment(e,n)};function p6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m6(e){for(var t=1;tL.above(e,m6(m6({},t),{},{match:n=>ie.isElement(n)&&L.isVoid(e,n)})),lO=(e,t)=>t.children.some(n=>ie.isElement(n)&&L.isBlock(e,n)),uO=(e,t)=>t.children.some(n=>ie.isText(n)||L.isInline(e,n)),cO=(e,t)=>ie.has(e,t),fO=(e,t)=>{const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},dO=(e,t)=>t.children.every(n=>ie.isText(n)),hO=e=>{Ie.splitNodes(e,{always:!0})},WV=(e,t,n)=>{Ie.insertNodes(e,t,n)},KV=e=>{Ie.splitNodes(e,{always:!0})};function g6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function GV(e){for(var t=1;t{const{selection:r,marks:i}=e;if(r){if(n.at==null&&Ce.isCollapsed(r)){const s=L.insertionPoint(e,r.anchor);an.equals(s,r.anchor)||Ie.select(e,s)}if(i){const s=GV({text:t},i);Ie.insertNodes(e,s,{at:n.at,voids:n.voids})}else Ie.insertText(e,t,n);e.marks=null}},JV=(e,t)=>{const n=L.above(e,{at:t,match:(f,h)=>Nr.isElement(f)&&e.isInline(f)&&L.isEdge(e,t,h),mode:"highest",voids:!0});let r=t;if(n){const[,f]=n;if(L.isStart(e,t,f)&&le.hasPrevious(f)){const h=le.previous(f);if(!Sn.isText(ie.getIf(e,h)))return null;r=L.end(e,h)}else if(L.isEnd(e,t,f)){const h=le.next(f);if(!Sn.isText(ie.getIf(e,h)))return null;r=L.start(e,h)}else return null}const i=ie.parent(e,r.path);let s=r.path[r.path.length-1];const a=f=>Nr.isElement(f)&&e.isInline(f)&&!e.isVoid(f)&&ie.string(f)==="";for(;r.offset===0&&s>1&&a(i.children[s-1])&&Sn.isText(i.children[s-2]);)s-=2,r=L.end(e,le.parent(r.path).concat(s));const o=[],l=i.children[s-1];r.offset===0&&Nr.isElement(l)&&e.isInline(l)&&o.push([l,le.previous(r.path),"end"]);let[u]=L.leaf(e,r);if(r.offset===u.text.length)for(;s+1{var n,r;if(!Sn.isText(ie.getIf(e,t.path)))return{point:t,affinity:!1,inlineAffinity:null};const i=JV(e,t);let s=(n=i?.point)!==null&&n!==void 0?n:t,a=i!==null;const[o]=L.leaf(e,s),l=ie.parent(e,s.path).children,u=s.path[s.path.length-1],f=l[u-1],h=l[u+1];let m;if(s.offset===0&&Sn.isText(f)?m=[f,o,le.previous(s.path),s.path]:s.offset===o.text.length&&Sn.isText(h)&&(m=[o,h,s.path,le.next(s.path)]),m){const[g,b,y,E]=m,C=e.leafEdgeAffinity(g,b);C!==null&&(a=!0,s=C==="backward"?{path:y,offset:g.text.length}:{path:E,offset:0})}return{point:s,affinity:a,inlineAffinity:(r=i?.affinity)!==null&&r!==void 0?r:null}},XV=(e,t)=>tE(e,t).point,pO=(e,t)=>!e.isInline(t),mO=(e,t,n)=>L.isStart(e,t,n)||L.isEnd(e,t,n),Yf=(e,t)=>{const{children:n}=t,[r]=n;return n.length===0||n.length===1&&ie.isText(r)&&r.text===""&&!e.isVoid(t)},gO=(e,t,n)=>{const r=L.end(e,n);return an.equals(t,r)},vO=e=>{const t=qN.get(e);return t===void 0?!0:t},yO=(e,t,n)=>{if(t.offset!==0)return!1;const r=L.start(e,n);return an.equals(t,r)},xO=(e,t)=>{const n=L.path(e,t,{edge:"end"});return L.node(e,n)},bO=(e,t,n={})=>{const r=L.path(e,t,n);return[ie.leaf(e,r),r]};function*wO(e,t={}){const{at:n=e.selection,reverse:r=!1,voids:i=!1}=t;let{match:s}=t;if(s==null&&(s=()=>!0),!n)return;const a=[],o=L.path(e,n);for(const[l,u]of ie.levels(e,o))if(s(l,u)&&(a.push([l,u]),!i&&ie.isElement(l)&&L.isVoid(e,l)))break;r&&a.reverse(),yield*a}const QV=["text"],ZV=["text"],eU=["text"],EO=(e,t={})=>{const{marks:n,selection:r}=e;if(!r)return null;let{anchor:i,focus:s}=r;if(n)return n;if(Ce.isExpanded(r)){if(Ce.isBackward(r)&&([s,i]=[i,s]),L.isEnd(e,i,i.path)){const b=L.after(e,i);b&&(i=b)}const[g]=L.nodes(e,{match:ie.isText,at:{anchor:i,focus:s}});if(g){const[b]=g,{text:y}=b;return Na(b,QV)}else return{}}const a=tE(e,i);if(a.affinity){const[h]=L.leaf(e,a.point),{text:m}=h;return Na(h,ZV)}const{path:o}=i;let[l]=L.leaf(e,o);if(i.offset===0){const h=L.previous(e,{at:o,match:ie.isText});if(!L.above(e,{match:g=>ie.isElement(g)&&L.isVoid(e,g)&&e.markableVoid(g)})){const g=L.above(e,{match:b=>ie.isElement(b)&&L.isBlock(e,b)});if(h&&g){const[b,y]=h,[,E]=g;le.isAncestor(E,y)&&(l=b)}}}const{text:u}=l;return Na(l,eU)},tU=(e,t={})=>{const{mode:n="lowest",voids:r=!1}=t;let{match:i,at:s=e.selection}=t;if(!s)return;const a=L.after(e,s,{voids:r});if(!a)return;const[,o]=L.last(e,[]),l=[a.path,o];if(Qt.isPath(s)&&s.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(Qt.isPath(s)){const[f]=L.parent(e,s);i=h=>f.children.includes(h)}else i=()=>!0;const[u]=L.nodes(e,{at:l,match:i,mode:n,voids:r});return u},CO=(e,t,n={})=>{const r=L.path(e,t,n);return[ie.get(e,r),r]};function*nU(e,t={}){const{at:n=e.selection,mode:r="all",universal:i=!1,reverse:s=!1,voids:a=!1,pass:o}=t;let{match:l}=t;if(l||(l=()=>!0),!n)return;let u,f;if(Qt.isSpan(n))u=n[0],f=n[1];else{const b=L.path(e,n,{edge:"start"}),y=L.path(e,n,{edge:"end"});u=s?y:b,f=s?b:y}const h=ie.nodes(e,{reverse:s,from:u,to:f,pass:([b,y])=>o&&o([b,y])?!0:ie.isElement(b)?!!(!a&&(L.isVoid(e,b)||L.isElementReadOnly(e,b))):!1}),m=[];let g;for(const[b,y]of h){const E=g&&le.compare(y,g[1])===0;if(r==="highest"&&E)continue;if(!l(b,y)){if(i&&!E&&ie.isText(b))return;continue}if(r==="lowest"&&E){g=[b,y];continue}const C=r==="lowest"?g:[b,y];C&&(i?m.push(C):yield C),g=[b,y]}r==="lowest"&&g&&(i?m.push(g):yield g),i&&(yield*m)}const kO=(e,t={})=>{const{force:n=!1,operation:r}=t,i=o=>xd.get(o)||[],s=o=>sd.get(o)||new Set,a=o=>{const l=i(o).pop(),u=l.join(",");return s(o).delete(u),l};if(L.isNormalizing(e)){if(n){const o=Array.from(ie.nodes(e),([,u])=>u),l=new Set(o.map(u=>u.join(",")));xd.set(e,o),sd.set(e,l)}i(e).length!==0&&L.withoutNormalizing(e,()=>{for(const f of i(e))if(ie.has(e,f)){const h=L.node(e,f),[m,g]=h;ie.isElement(m)&&m.children.length===0&&e.normalizeNode(h,{operation:r,force:n})}let o=i(e);const l=o.length;let u=0;for(;o.length!==0;){if(!e.shouldNormalize({dirtyPaths:o,iteration:u,initialDirtyPathsLength:l,operation:r}))return;const f=a(e);if(ie.has(e,f)){const h=L.node(e,f);e.normalizeNode(h,{operation:r,force:n})}u++,o=i(e)}})}},DO=(e,t,n={})=>{const r=L.path(e,t,n),i=le.parent(r);return L.node(e,i)},nE=()=>{var e;return(e=Symbol.dispose)!==null&&e!==void 0?e:Symbol.for("Symbol.dispose")},SO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[nE()](){i.unref()},unref(){const{current:a}=i;return L.pathRefs(e).delete(i),i.current=null,a}};return L.pathRefs(e).add(i),i},_O=e=>{let t=jk.get(e);return t||(t=new Set,jk.set(e,t)),t},AO=(e,t,n={})=>{const{depth:r,edge:i}=n;if(Qt.isPath(t)){if(i==="start"){const[,s]=ie.first(e,t);t=s}else if(i==="end"){const[,s]=ie.last(e,t);t=s}}return Qt.isRange(t)&&(i==="start"?t=Ce.start(t):i==="end"?t=Ce.end(t):t=le.common(t.anchor.path,t.focus.path)),Qt.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},TO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[nE()](){i.unref()},unref(){const{current:a}=i;return L.pointRefs(e).delete(i),i.current=null,a}};return L.pointRefs(e).add(i),i},NO=e=>{let t=qk.get(e);return t||(t=new Set,qk.set(e,t)),t},OO=(e,t,n={})=>{const{edge:r="start"}=n;if(Qt.isPath(t)){let i;if(r==="end"){const[,a]=ie.last(e,t);i=a}else{const[,a]=ie.first(e,t);i=a}const s=ie.get(e,i);if(!ie.isText(s))throw new Error(`Cannot get the ${r} point in the node at path [${t}] because it has no ${r} text node.`);return{path:i,offset:r==="end"?s.text.length:0}}if(Qt.isRange(t)){const[i,s]=Ce.edges(t);return r==="start"?i:s}return t};function*BO(e,t={}){const{at:n=e.selection,unit:r="offset",isWordCharacter:i,reverse:s=!1,voids:a=!1}=t;if(!n)return;const o=L.range(e,n),[l,u]=Ce.edges(o),f=s?u:l;let h=!1,m="",g=0,b=0,y=0;const E=[],C=O=>!L.above(e,{at:O,voids:!0,match:_=>ie.isElement(_)&&!e.isSelectable(_)}),x=(O,_)=>{for(const[,w]of ie.texts(O)){const T={path:[..._,...w],offset:0};if(C(T))return T}};for(const[O,_]of L.nodes(e,{at:n,reverse:s,voids:a})){const w=E.some(A=>le.isAncestor(A,_));function*T(A){w||(yield A)}if(ie.isElement(O)){if(!e.isSelectable(O))if(E.push(_),s){if(le.hasPrevious(_)){const A=L.end(e,le.previous(_));C(A)&&(yield*T(A))}continue}else{const A=le.next(_);if(L.hasPath(e,A)){const P=L.start(e,A);C(P)&&(yield*T(P))}continue}if(!a&&(e.isVoid(O)||e.isElementReadOnly(O))){const A=x(O,_);if(A&&(yield*T(A)),e.isInline(O)){const[,P]=L.above(e,{at:_,match:F=>ie.isElement(F)&&L.isBlock(e,F)}),I=s?le.isAncestor(P,l.path)?l:L.start(e,P):le.isAncestor(P,u.path)?u:L.end(e,P);m=L.string(e,{anchor:L.start(e,_),focus:I},{voids:a}),g=0}h=!0;continue}if(e.isInline(O))continue;if(L.hasInlines(e,O)){const A=le.isAncestor(_,u.path)?u:L.end(e,_),P=le.isAncestor(_,l.path)?l:L.start(e,_);m=L.string(e,{anchor:P,focus:A},{voids:a}),h=!0}}if(ie.isText(O)){const A=le.equals(_,f.path);for(A?(b=s?f.offset:O.text.length-f.offset,y=f.offset):(b=O.text.length,y=s?b:0),(A||h||r==="offset")&&(yield*T({path:_,offset:y}),h=!1);;){if(g===0){if(m==="")break;g=S(m,r,s),m=Ed(m,g,s)[1]}if(y=s?y-g:y+g,b=b-g,b<0){g=-b;break}g=0,yield*T({path:_,offset:y})}}}function S(O,_,w){return _==="character"?wd(O,w):_==="word"?hV(O,w,i):_==="line"||_==="block"?O.length:1}}const rU=(e,t={})=>{const{mode:n="lowest",voids:r=!1}=t;let{match:i,at:s=e.selection}=t;if(!s)return;const a=L.before(e,s,{voids:r});if(!a)return;const[,o]=L.first(e,[]),l=[a.path,o];if(Qt.isPath(s)&&s.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(Qt.isPath(s)){const[f]=L.parent(e,s);i=h=>f.children.includes(h)}else i=()=>!0;const[u]=L.nodes(e,{reverse:!0,at:l,match:i,mode:n,voids:r});return u},PO=(e,t,n={})=>{const{affinity:r="forward"}=n,i={current:t,affinity:r,[nE()](){i.unref()},unref(){const{current:a}=i;return L.rangeRefs(e).delete(i),i.current=null,a}};return L.rangeRefs(e).add(i),i},RO=e=>{let t=$k.get(e);return t||(t=new Set,$k.set(e,t)),t},FO=(e,t,n)=>{if(Qt.isRange(t)&&!n)return t;const r=L.start(e,t),i=L.end(e,n||t);return{anchor:r,focus:i}};function v6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iU(e){for(var t=1;t{const{selection:n}=e;if(n){const r=(a,o)=>{if(!ie.isText(a))return!1;const[l,u]=L.parent(e,o);return!e.isVoid(l)||e.markableVoid(l)},i=Ce.isExpanded(n);let s=!1;if(!i){const[a,o]=L.node(e,n);if(a&&r(a,o)){const[l]=L.parent(e,o);s=l&&e.markableVoid(l)}}if(i||s)Ie.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{const a=iU({},L.marks(e)||{});delete a[t],e.marks=a,ad.get(e)||e.onChange()}}},MO=(e,t)=>{qN.set(e,t)},Ew=(e,t)=>L.point(e,t,{edge:"start"}),LO=(e,t,n={})=>{const{voids:r=!1}=n,i=L.range(e,t),[s,a]=Ce.edges(i);let o="";for(const[l,u]of L.nodes(e,{at:i,match:ie.isText,voids:r})){let f=l.text;le.equals(u,a.path)&&(f=f.slice(0,a.offset)),le.equals(u,s.path)&&(f=f.slice(s.offset)),o+=f}return o},zO=(e,t,n={})=>{const{voids:r=!1}=n;let[i,s]=Ce.edges(t);if(i.offset!==0||s.offset!==0||Ce.isCollapsed(t)||le.hasPrevious(s.path))return t;const a=L.above(e,{at:s,match:h=>ie.isElement(h)&&L.isBlock(e,h),voids:r}),o=a?a[1]:[],u={anchor:L.start(e,i),focus:s};let f=!0;for(const[h,m]of L.nodes(e,{at:u,match:ie.isText,reverse:!0,voids:r})){if(f){f=!1;continue}if(h.text!==""||le.isBefore(m,o)){s={path:m,offset:h.text.length};break}}return{anchor:i,focus:s}},jO=(e,t)=>{const n=L.isNormalizing(e);L.setNormalizing(e,!1);try{t()}finally{L.setNormalizing(e,n)}L.normalize(e)},sU=(e,[t,n],[r,i])=>ie.isElement(t)&&L.isEmpty(e,t)&&le.isSibling(n,i)||ie.isText(t)&&t.text===""&&n[n.length-1]!==0,aU=(e,t={})=>{const{at:n=e.selection,isWordCharacter:r}=t;if(!n)return;const i=Qt.isPoint(n)?n:n.focus,s=L.above(e,{at:i,match:m=>Nr.isElement(m)&&L.isBlock(e,m)});if(!s||L.isVoid(e,s[0]))return;let a="",o=[],l=-1;for(const[m,g]of L.nodes(e,{at:s[1],match:Sn.isText,voids:!0})){if(L.above(e,{at:g,match:y=>Nr.isElement(y)&&L.isVoid(e,y),voids:!0})){if(le.equals(g,i.path))return;if(l>=0)break;a="",o=[];continue}le.equals(g,i.path)&&(l=a.length+i.offset),o.push({path:g,start:a.length,end:a.length+m.text.length}),a+=m.text}if(l<0)return;const[u,f]=pV(a,l,r);if(u===f)return;const h=(m,g)=>{const b=g?o.find(C=>m>=C.start&&mm>C.start&&m<=C.end),{path:y,start:E}=b;return{path:y,offset:m-E}};return{anchor:h(u,!0),focus:h(f,!1)}},oU=(e,t,n)=>{const r=L.above(e,{at:t,match:l=>ie.isElement(l)&&L.isBlock(e,l)});if(!r)return;const[i,s]=r;if(!ie.isElement(i)||L.isVoid(e,i)||!L.isEmpty(e,i)||n&&!le.hasPrevious(s))return;const a=n?le.previous(s):le.next(s);if(!ie.has(e,a))return;const o=ie.get(e,a);if(!(!ie.isElement(o)||!L.isBlock(e,o)||!L.isVoid(e,o)))return[s,a]},y6=(e,t)=>ie.isElement(t)&&L.isInline(e,t)&&!L.isVoid(e,t)&&L.isEmpty(e,t),lU=(e,t,n)=>{const r=le.parent(t.path);if(r.length>0&&y6(e,ie.get(e,r)))return r;const i=ie.get(e,t.path);if(!(n?t.offset===0:ie.isText(i)&&t.offset===i.text.length)||n&&!le.hasPrevious(t.path))return;const a=n?le.previous(t.path):le.next(t.path);if(ie.has(e,a)&&y6(e,ie.get(e,a)))return a},Cw=(e,t)=>{var n;return(n=L.above(e,{at:t,match:r=>ie.isElement(r)&&L.isIsolated(e,r),voids:!0}))===null||n===void 0?void 0:n[1]},qO=(e,t,n)=>{const r=Cw(e,t),i=Cw(e,n);return r&&i?le.equals(r,i):r===i},uU=(e,t,n,r)=>{if(qO(e,t,n))return n;const i=Cw(e,t);if(!(!i||le.isAncestor(i,n.path)))return r?L.start(e,i):L.end(e,i)},cU=(e,t={})=>{L.withoutNormalizing(e,()=>{var n,r;const{reverse:i=!1,unit:s="character",distance:a=1,voids:o=!1}=t;let{at:l=e.selection,hanging:u=!1}=t;if(!l)return;let f=!1;if(Qt.isRange(l)&&Ce.isCollapsed(l)&&(f=!0,l=l.anchor),Qt.isPoint(l)){const M=!o&&(s==="character"||s==="word")&&a===1?oU(e,l,i):void 0;if(M){const[U,fe]=M,ue=L.pathRef(e,fe);Ie.removeNodes(e,{at:U});const ne=ue.unref();ne&&t.at==null&&Ie.select(e,i?L.end(e,ne):L.start(e,ne));return}const W=L.void(e,{at:l,mode:"highest"}),ee=s==="character"&&a===1?lU(e,l,i):void 0;if(!o&&W){const[,U]=W;l=U}else if(ee)l=ee;else{const U={unit:s,distance:a},fe=uU(e,l,i?L.before(e,l,U)||L.start(e,[]):L.after(e,l,U)||L.end(e,[]),i);if(!fe)return;l={anchor:l,focus:fe},u=!0}}if(Qt.isPath(l)){const M=t.at==null&&i?L.before(e,l):void 0,W=M&&le.isAncestor(le.parent(l),M.path)?L.pointRef(e,M):void 0;if(Ie.removeNodes(e,{at:l,voids:o}),e.children.length===0&&t.at==null){W?.unref(),Ie.insertNodes(e,{children:[{text:""}]},{at:[0],select:!0});return}const ee=W&&W.unref();ee&&Ie.select(e,ee);return}if(Ce.isCollapsed(l))return;if(!u){const[,M]=Ce.edges(l),W=L.end(e,[]);an.equals(M,W)||(l=L.unhangRange(e,l,{voids:o}))}let[h,m]=Ce.edges(l);const g=L.above(e,{match:M=>ie.isElement(M)&&L.isBlock(e,M),at:h,voids:o}),b=L.above(e,{match:M=>ie.isElement(M)&&L.isBlock(e,M),at:m,voids:o}),y=g&&b&&!le.equals(g[1],b[1]),E=le.equals(h.path,m.path),C=o?null:(n=L.void(e,{at:h,mode:"highest"}))!==null&&n!==void 0?n:L.elementReadOnly(e,{at:h,mode:"highest"}),x=o?null:(r=L.void(e,{at:m,mode:"highest"}))!==null&&r!==void 0?r:L.elementReadOnly(e,{at:m,mode:"highest"});if(C){const M=L.before(e,h);M&&g&&le.isAncestor(g[1],M.path)&&(h=M)}if(x){const M=L.after(e,m);M&&b&&le.isAncestor(b[1],M.path)&&(m=M)}const S=[];let O;for(const M of L.nodes(e,{at:l,voids:o})){const[W,ee]=M;O&&le.compare(ee,O)===0||(!o&&ie.isElement(W)&&(L.isVoid(e,W)||L.isElementReadOnly(e,W))||!le.isCommon(ee,h.path)&&!le.isCommon(ee,m.path))&&(S.push(M),O=ee)}const _=Array.from(S,([,M])=>L.pathRef(e,M)),w=L.pointRef(e,h),T=L.pointRef(e,m);let A="";if(!E&&!C){const M=w.current,[W]=L.leaf(e,M),{path:ee}=M,{offset:U}=h,fe=W.text.slice(U);fe.length>0&&(e.apply({type:"remove_text",path:ee,offset:U,text:fe}),A=fe)}if(_.reverse().map(M=>M.unref()).filter(M=>M!==null).forEach(M=>Ie.removeNodes(e,{at:M,voids:o})),!x){const M=T.current,[W]=L.leaf(e,M),{path:ee}=M,U=E?h.offset:0,fe=W.text.slice(U,m.offset);fe.length>0&&(e.apply({type:"remove_text",path:ee,offset:U,text:fe}),A=fe)}!E&&y&&T.current&&w.current&&qO(e,w.current,T.current)&&Ie.mergeNodes(e,{at:T.current,hanging:!0,voids:o}),f&&i&&s==="character"&&A.length>1&&A.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Ie.insertText(e,A.slice(0,A.length-a));const P=w.unref(),I=T.unref(),F=i?P||I:I||P;t.at==null&&F&&Ie.select(e,F)})};function x6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function b6(e){for(var t=1;t{L.withoutNormalizing(e,()=>{var r,i,s;const{hanging:a=!1,voids:o=!1,select:l=n.at==null,filter:u}=n;let f;t.length&&n.at==null&&e.selection&&Ce.isCollapsed(e.selection)&&(f=tE(e,e.selection.anchor),an.equals(f.point,e.selection.anchor)||Ie.select(e,f.point));let{at:h=X4(e),batchDirty:m=!0}=n;if(!t.length)return;if(Qt.isRange(h)){if(!a){const[,re]=Ce.edges(h),K=L.end(e,[]);an.equals(re,K)||(h=L.unhangRange(e,h,{voids:o}))}if(Ce.isCollapsed(h))h=h.anchor;else{const[re,K]=Ce.edges(h);if(!o&&L.void(e,{at:K}))return;const Be=L.pointRef(e,re),ze=L.pointRef(e,K);Ie.delete(e,{at:h,voids:o});const $e=Be.unref(),je=ze.unref();h=$e??je}}else Qt.isPath(h)&&(h=L.start(e,h));if(!o&&L.void(e,{at:h}))return;const g=L.above(e,{at:h,match:re=>ie.isElement(re)&&L.isInline(e,re),mode:"highest",voids:o});if(g&&((r=f)===null||r===void 0?void 0:r.inlineAffinity)!=="inside"){const[,re]=g,K=ie.parent(e,re),Be=re[re.length-1];if(L.isEnd(e,h,re)){const ze=le.next(re);Sn.isText(K.children[Be+1])||Ie.insertNodes(e,{text:""},{at:ze,voids:o}),h=L.start(e,ze)}else L.isStart(e,h,re)&&(Sn.isText(K.children[Be-1])?h=L.end(e,le.previous(re)):(Ie.insertNodes(e,{text:""},{at:re,voids:o}),h=L.start(e,re)))}const b=L.above(e,{match:re=>ie.isElement(re)&&L.isBlock(e,re),at:h,voids:o}),[,y]=b,E={blockEntry:b},C=re=>{if(!u)return re;if(ie.isText(re))return u(re,E)?re:null;if(ie.isElement(re)){if(!u(re,E))return null;const K=re.children.map(C).filter(Be=>Be!==null);return K.length===0&&!e.isVoid(re)?null:b6(b6({},re),{},{children:K})}return re},x=u?t.map(C).filter(re=>re!==null):t;if(!x.length)return;t=x;const S=L.isStart(e,h,y),O=L.isEnd(e,h,y),_=S&&O,[,w]=ie.first({children:t},[]),[,T]=ie.last({children:t},[]),A=([re,K])=>K.length===0?!1:_?!0:!(!S&&le.isAncestor(K,w)&&ie.isElement(re)&&!e.isVoid(re)&&!e.isInline(re)||!O&&le.isAncestor(K,T)&&ie.isElement(re)&&!e.isVoid(re)&&!e.isInline(re));let P=!0;const I=[],F=[],M=[];for(const re of ie.nodes({children:t},{pass:A})){const[K,Be]=re;P&&ie.isElement(K)&&!e.isInline(K)&&!le.isAncestor(Be,w)&&(P=!1),A(re)&&(ie.isElement(K)&&!e.isInline(K)?(P=!1,F.push(K)):P?I.push(K):M.push(K))}const[W]=L.nodes(e,{at:h,match:re=>ie.isText(re)||L.isInline(e,re),mode:((i=f)===null||i===void 0?void 0:i.inlineAffinity)==="inside"?"lowest":"highest",voids:o}),[,ee]=W,U=L.isStart(e,h,ee),fe=L.isEnd(e,h,ee),ue=L.pathRef(e,O&&!M.length?le.next(y):y),ne=L.pathRef(e,fe?le.next(ee):ee),me=F.length>0&&!S&&!O,j=M.length>0||me;Ie.splitNodes(e,{at:h,match:re=>j?ie.isElement(re)&&L.isBlock(e,re):ie.isText(re)||L.isInline(e,re),mode:j||((s=f)===null||s===void 0?void 0:s.inlineAffinity)==="inside"?"lowest":"highest",always:j&&(!S||I.length>0)&&(!O||M.length>0),voids:o});const Q=L.pathRef(e,!U||U&&fe?le.next(ee):ee);if(Ie.insertNodes(e,I,{at:Q.current,match:re=>ie.isText(re)||L.isInline(e,re),mode:"highest",voids:o,batchDirty:m}),_&&!I.length&&F.length&&!M.length&&Ie.removeNodes(e,{at:y,voids:o}),Ie.insertNodes(e,F,{at:ue.current,match:re=>ie.isElement(re)&&L.isBlock(e,re),mode:"lowest",voids:o,batchDirty:m}),Ie.insertNodes(e,M,{at:ne.current,match:re=>ie.isText(re)||L.isInline(e,re),mode:"highest",voids:o,batchDirty:m}),l){let re;if(M.length>0&&ne.current?re=le.previous(ne.current):F.length>0&&ue.current?re=le.previous(ue.current):Q.current&&(re=le.previous(Q.current)),re){const K=ie.get(e,re),Be=me&&!M.length&&ie.isElement(K)&&L.isVoid(e,K)?L.start(e,le.next(re)):L.end(e,re);Ie.select(e,Be)}}Q.unref(),ue.unref(),ne.unref()})},VO=(e,t={})=>{const{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")Ie.select(e,r.anchor);else if(n==="focus")Ie.select(e,r.focus);else if(n==="start"){const[i]=Ce.edges(r);Ie.select(e,i)}else if(n==="end"){const[,i]=Ce.edges(r);Ie.select(e,i)}}else return},UO=e=>{const{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},HO=(e,t={})=>{const{selection:n}=e,{distance:r=1,unit:i="character",reverse:s=!1}=t;let{edge:a=null}=t;if(!n)return;a==="start"&&(a=Ce.isBackward(n)?"focus":"anchor"),a==="end"&&(a=Ce.isBackward(n)?"anchor":"focus");const{anchor:o,focus:l}=n,u={distance:r,unit:i},f={};if(a==null||a==="anchor"){const h=s?L.before(e,o,u):L.after(e,o,u);h&&(f.anchor=h)}if(a==null||a==="focus"){const h=s?L.before(e,l,u):L.after(e,l,u);h&&(f.focus=h)}Ie.setSelection(e,f)},np=(e,t)=>{const{selection:n}=e;if(t=L.range(e,t),n){Ie.setSelection(e,t);return}if(!Qt.isRange(t))throw new Error(`When setting the selection and the current selection is \`null\` you must provide at least an \`anchor\` and \`focus\`, but you passed: ${Zn.stringify(t)}`);e.apply({type:"set_selection",properties:n,newProperties:t})};function w6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E6(e){for(var t=1;t{const{selection:r}=e;let{edge:i="both"}=n;if(!r)return;i==="start"&&(i=Ce.isBackward(r)?"focus":"anchor"),i==="end"&&(i=Ce.isBackward(r)?"anchor":"focus");const{anchor:s,focus:a}=r,o=i==="anchor"?s:a;Ie.setSelection(e,{[i==="anchor"?"anchor":"focus"]:E6(E6({},o),t)})},KO=(e,t)=>{const{selection:n}=e,r={},i={};if(n){for(const s in t){if(UN.includes(s))continue;const a=Object.hasOwn(n,s)?n[s]:void 0,o=t[s];fU(s,a,o)&&(r[s]=n[s],i[s]=t[s])}Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}};function fU(e,t,n){return(e==="anchor"||e==="focus")&&an.isPoint(t)&&an.isPoint(n)?!an.equals(t,n):t!==n}const GO=(e,t,n={})=>{L.withoutNormalizing(e,()=>{const{hanging:r=!1,voids:i=!1,mode:s="lowest",batchDirty:a=!0}=n;let{at:o,match:l,select:u}=n;if(ie.isNode(t)&&(t=[t]),t.length===0)return;const[f]=t;if(!o){if(ie.isElement(f)&&e.isInline(f)&&e.selection&&Ce.isCollapsed(e.selection)){const y=L.insertionPoint(e,e.selection.anchor);an.equals(y,e.selection.anchor)||Ie.select(e,y)}o=X4(e),u!==!1&&(u=!0)}if(u==null&&(u=!1),Qt.isRange(o))if(r||(o=L.unhangRange(e,o,{voids:i})),Ce.isCollapsed(o))o=o.anchor;else{var h,m;const[y,E]=Ce.edges(o),C=L.pointRef(e,y),x=L.pointRef(e,E),S=L.before(e,y,{voids:i}),O=S&&L.pointRef(e,S);Ie.delete(e,{at:o});const _=C.unref(),w=x.unref(),T=O?O.unref():null;o=(h=(m=w??_)!==null&&m!==void 0?m:T)!==null&&h!==void 0?h:L.start(e,[])}if(Qt.isPoint(o)){l==null&&(ie.isText(f)?l=E=>ie.isText(E):e.isInline(f)?l=E=>ie.isText(E)||L.isInline(e,E):l=E=>ie.isElement(E)&&L.isBlock(e,E));const[y]=L.nodes(e,{at:o.path,match:l,mode:s,voids:i});if(y){const[,E]=y,C=L.pathRef(e,E),x=L.isEnd(e,o,E);Ie.splitNodes(e,{at:o,match:l,mode:s,voids:i});const S=C.unref();o=x?le.next(S):S}else return}const g=le.parent(o);let b=o[o.length-1];if(!(!i&&L.void(e,{at:g}))){if(a){const y=[],E=le.levels(g);HN(e,()=>{for(const C of t){const x=g.concat(b);b++;const S={type:"insert_node",path:x,node:C};e.apply(S),o=le.next(o),y.push(S),ie.isText(C)?E.push(x):E.push(...Array.from(ie.nodes(C),([,O])=>x.concat(O)))}},()=>{eE(e,E,C=>{let x=C;for(const S of y)if(le.operationCanTransformPath(S)&&(x=le.transform(x,S),!x))return null;return x})})}else for(const y of t){const E=g.concat(b);b++,e.apply({type:"insert_node",path:E,node:y}),o=le.next(o)}if(o=le.previous(o),u){const y=L.end(e,o);y&&Ie.select(e,y)}}})},YO=(e,t={})=>{const{height:n=1}=t;if(!Number.isInteger(n)||n<0)throw new Error("The height of a lift must be a non-negative integer.");n!==0&&L.withoutNormalizing(e,()=>{const{at:r=e.selection,mode:i="lowest",voids:s=!1}=t;let{match:a}=t;if(!r)return;a==null&&(a=Qt.isPath(r)?zc(e,r):u=>ie.isElement(u)&&L.isBlock(e,u));const o=L.nodes(e,{at:r,match:a,mode:i,voids:s}),l=Array.from(o,([,u])=>L.pathRef(e,u));try{for(const u of l){for(let f=0;f0&&h.length<2)break;if(h.length<2)throw new Error(`Cannot lift node at a path [${h}] because it has a depth of less than \`2\`.`);const m=L.node(e,le.parent(h)),[g,b]=m,y=h[h.length-1],{length:E}=g.children;if(E===1){const C=le.next(b);Ie.moveNodes(e,{at:h,to:C,voids:s}),Ie.removeNodes(e,{at:b,voids:s})}else if(y===0)Ie.moveNodes(e,{at:h,to:b,voids:s});else if(y===E-1){const C=le.next(b);Ie.moveNodes(e,{at:h,to:C,voids:s})}else{const C=le.next(h),x=le.next(b);Ie.splitNodes(e,{at:C,voids:s}),Ie.moveNodes(e,{at:h,to:x,voids:s})}}t.select&&u.current&&Ie.select(e,L.end(e,u.current))}}finally{for(const u of l)u.unref()}})},dU=["text"],hU=["children"],JO=(e,t)=>t!==e&&(ie.isText(t)||L.isVoid(e,t)||t.children.length===1&&JO(e,t.children[0])),pU=(e,t={})=>{L.withoutNormalizing(e,()=>{let{match:n,at:r=e.selection}=t;const{hanging:i=!1,voids:s=!1,mode:a="lowest"}=t;if(!r)return;const o=Qt.isPath(r),l=o?r:null,u=n==null&&o;if(n==null)if(o){const[I]=L.parent(e,r);n=F=>I.children.includes(F)}else n=I=>ie.isElement(I)&&L.isBlock(e,I);if(!i&&Qt.isRange(r)&&(r=L.unhangRange(e,r,{voids:s})),Qt.isRange(r))if(Ce.isCollapsed(r))r=r.anchor;else{const[,I]=Ce.edges(r),F=L.pointRef(e,I);Ie.delete(e,{at:r}),r=F.unref(),t.at==null&&Ie.select(e,r)}const[f]=L.nodes(e,{at:r,match:n,voids:s,mode:a}),h=u&&l&&le.hasPrevious(l)?le.previous(l):null,m=h?L.node(e,h):L.previous(e,{at:r,match:n,voids:s,mode:a});if(!f||!m)return;const[g,b]=f,[y,E]=m;if(b.length===0||E.length===0)return;const C=le.next(E),x=le.common(b,E),S=le.isSibling(b,E),O=Array.from(L.levels(e,{at:b}),([I])=>I).slice(x.length).slice(0,-1),_=L.above(e,{at:b,mode:"highest",match:I=>O.includes(I)&&JO(e,I)});let w,T,A;if(ie.isText(g)&&ie.isText(y)){const{text:I}=g,F=Na(g,dU);T=y.text.length,w=F}else if(ie.isElement(g)&&ie.isElement(y)){if(g.children.length>0&&y.children.length>0&&L.hasInlines(e,g)!==L.hasInlines(e,y)&&(A=L.shouldMergeNodesRemovePrevNode(e,m,f),!A))throw new Error(`Cannot merge the node at path [${b}] with the previous node at path [${E}] because their children are not the same kind: one contains blocks and the other contains text or inline nodes.`);const{children:I}=g,F=Na(g,hU);T=y.children.length,w=F}else throw new Error(`Cannot merge the node at path [${b}] with the previous sibling because it is not the same kind: ${Zn.stringify(g)} ${Zn.stringify(y)}`);const P=_&&L.pathRef(e,_[1]);S||Ie.moveNodes(e,{at:b,to:C,voids:s}),P&&Ie.removeNodes(e,{at:P.current,voids:s}),A??L.shouldMergeNodesRemovePrevNode(e,m,f)?Ie.removeNodes(e,{at:E,voids:s}):e.apply({type:"merge_node",path:C,position:T,properties:w}),P&&P.unref()})},kw=(e,t)=>{L.withoutNormalizing(e,()=>{const{to:n,at:r=e.selection,mode:i="lowest",select:s=!1,voids:a=!1}=t;let{match:o}=t;if(!r)return;o==null&&(o=Qt.isPath(r)?zc(e,r):g=>ie.isElement(g)&&L.isBlock(e,g));const l=L.pathRef(e,n),u=L.nodes(e,{at:r,match:o,mode:i,voids:a}),f=Array.from(u,([,g])=>L.pathRef(e,g));let h;for(const g of f){const b=g.unref(),y=l.current;if(b.length!==0){var m;e.apply({type:"move_node",path:b,newPath:y}),h=(m=le.transform(b,{type:"move_node",path:b,newPath:y}))!==null&&m!==void 0?m:void 0}l.current&&le.isSibling(y,b)&&le.isAfter(y,b)&&(l.current=le.next(l.current))}l.unref(),s&&h&&Ie.select(e,L.end(e,h))})},XO=(e,t={})=>{L.withoutNormalizing(e,()=>{const{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t;let{at:s=e.selection,match:a}=t;if(!s)return;a==null&&(a=Qt.isPath(s)?zc(e,s):u=>ie.isElement(u)&&L.isBlock(e,u)),!n&&Qt.isRange(s)&&(s=L.unhangRange(e,s,{voids:r}));const o=L.nodes(e,{at:s,match:a,mode:i,voids:r}),l=Array.from(o,([,u])=>L.pathRef(e,u));for(const u of l){const f=u.unref();if(f){const[h]=L.node(e,f);e.apply({type:"remove_node",path:f,node:h})}}})},Dw=(e,t,n={})=>{L.withoutNormalizing(e,()=>{let{match:r,at:i=e.selection,compare:s,merge:a}=n;const{hanging:o=!1,mode:l="lowest",replace:u=!1,split:f=!1,voids:h=!1}=n;if(i){if(r==null&&(r=Qt.isPath(i)?zc(e,i):m=>ie.isElement(m)&&L.isBlock(e,m)),!o&&Qt.isRange(i)&&(i=L.unhangRange(e,i,{voids:h})),f&&Qt.isRange(i)){if(Ce.isCollapsed(i)&&L.leaf(e,i.anchor)[0].text.length>0)return;const m=L.rangeRef(e,i,{affinity:"inward"}),[g,b]=Ce.edges(i),y=l==="lowest"?"lowest":"highest",E=L.isEnd(e,b,b.path);Ie.splitNodes(e,{at:b,match:r,mode:y,voids:h,always:!E});const C=L.isStart(e,g,g.path);Ie.splitNodes(e,{at:g,match:r,mode:y,voids:h,always:!C}),i=m.unref(),n.at==null&&Ie.select(e,i)}s||(s=(m,g)=>m!==g);for(const[m,g]of L.nodes(e,{at:i,match:r,mode:l,voids:h})){const b={},y={};if(g.length===0)continue;let E=!1;const C=typeof t=="function"?t(m,g):t;for(const x in C){if(Tc.includes(x))continue;const S=Object.hasOwn(m,x)?m[x]:void 0,O=C[x];s(O,S)&&(E=!0,Object.hasOwn(m,x)&&(b[x]=S),a?O!=null&&(y[x]=a(S,O)):O!=null&&(y[x]=O))}if(u)for(const x in m)Object.hasOwn(m,x)&&!Object.hasOwn(C,x)&&!Tc.includes(x)&&(E=!0,b[x]=m[x]);E&&e.apply({type:"set_node",path:g,properties:b,newProperties:y})}}})};function C6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function k6(e){for(var t=1;te===t||co(e,t),S6=(e,t)=>{let n=0,r=0;for(;n{if(t===e.children)return;const n={node:e},r=O=>(O.children||(O.children=Sn.isText(O.node)?[]:O.node.children.map(_=>({node:_,parent:O}))),O.children),i=O=>{let _=n;for(const w of O)_=_&&r(_)[w];return _},s=O=>{const _=[];for(;O!==n;){const w=O.parent;if(!w)return null;_.push(r(w).indexOf(O)),O=w}return _.reverse()},a=new Map,o=new Set,l=new Set,u=[],f=new Set;for(const O of(h=xd.get(e))!==null&&h!==void 0?h:[]){var h;const _=i(O);_&&f.add(_)}const m=O=>{const _=e.getDirtyPaths(O),w=i(O.path),T=O.path.length?i(le.parent(O.path)):n,A=O.type==="move_node"?i(le.parent(O.newPath)):void 0;if(T&&r(T),A&&r(A),e.apply(O),O.type==="insert_node")r(T).splice(O.path[O.path.length-1],0,{node:O.node,parent:T});else if(O.type==="remove_node")r(T).splice(O.path[O.path.length-1],1),w.parent=void 0;else if(O.type==="move_node"){const P=le.transform(O.path,O);r(T).splice(O.path[O.path.length-1],1),r(A).splice(P[P.length-1],0,w),w.parent=A}for(const P of _){const I=i(P);I&&f.add(I)}},g=O=>{l.add(O);for(const _ of r(O))g(_)},b=O=>{for(const[_]of ie.nodes(O))L.isEditor(_)||o.add(_)},y=(O,_,w)=>{const{start:T,suffix:A}=S6(_,w),P=Math.max(_.length,w.length)-A;for(let I=T;I{for(const[_]of ie.nodes(O))L.isEditor(_)||a.delete(_)},C=O=>{for(const[_]of ie.nodes(O))if(!L.isEditor(_)&&o.has(_)&&a.has(_))return!0;return!1},x=(O,_,w)=>{const T=new Map(Object.entries(ie.extractProps(O))),A=new Map(Object.entries(ie.extractProps(_))),P=[...new Set([...T.keys(),...A.keys()])].filter(I=>!Tc.includes(I)&&!co(T.get(I),A.get(I)));P.length&&m({type:"set_node",path:w,properties:Object.fromEntries(P.map(I=>[I,T.get(I)])),newProperties:Object.fromEntries(P.map(I=>[I,A.get(I)]))})},S=(O,_)=>{const w=ie.ancestor(e,s(O)).children,{start:T,suffix:A}=S6(w,_);if(!(T===w.length&&T===_.length)){(w.length>_.length||a.size>0)&&u.push({parent:O,length:_.length,suffix:A});for(let P=T;P<_.length-A;P++){let I=s(O).concat(P);const F=_[P],M=a.get(F),W=M&&s(M);if(W){le.equals(W,I)||m({type:"move_node",path:W,newPath:I}),E(F);continue}const ee=ie.ancestor(e,s(O)).children,U=P{var me,j;return ne==="text"||ne==="children"||co((me=Object.getOwnPropertyDescriptor(U,ne))===null||me===void 0?void 0:me.value,(j=Object.getOwnPropertyDescriptor(F,ne))===null||j===void 0?void 0:j.value)});if(U&&!fe&&ue){if(co(U,F))continue;if(x(U,F,I),Sn.isText(U)&&Sn.isText(F)){let ne=0,me=0;for(;ne{HN(e,()=>{S(n,t);for(const{parent:O,length:_,suffix:w}of u.reverse()){const T=s(O);for(;ie.ancestor(e,T).children.length>_;){const A=T.concat(_-w);m({type:"remove_node",path:A,node:ie.descendant(e,A)})}}},()=>{const O=new Map,_=(T,A)=>{var P;O.set(T,A),(P=T.children)===null||P===void 0||P.forEach((I,F)=>_(I,A.concat(F)))};_(n,[]);const w=[];for(const T of f){const A=O.get(T);A&&w.push(A)}eE(e,w,()=>null)})})},gU=(e,t)=>{if(Ce.isCollapsed(t))return t.anchor;{const[,n]=Ce.edges(t),r=L.pointRef(e,n);return Ie.delete(e,{at:t}),r.unref()}},QO=(e,t={})=>{L.withoutNormalizing(e,()=>{const{mode:n="lowest",voids:r=!1,select:i=t.at==null}=t;let{match:s,at:a=e.selection,height:o=0,always:l=!1}=t;if(!a)return;const u=s==null&&!Qt.isPath(a);if(s==null&&(s=g=>ie.isElement(g)&&L.isBlock(e,g)),Qt.isRange(a)&&(a=gU(e,a),!a))return;if(Qt.isPath(a)){const g=a,b=L.point(e,g),[y]=L.parent(e,g);s=E=>E===y,o=b.path.length-g.length+1,a=b,l=!0}const f=L.pointRef(e,a,{affinity:"backward"});let h;try{const[g]=L.nodes(e,{at:a,match:s,mode:n,voids:r});if(!g)return;const b=L.void(e,{at:a,mode:"highest"}),y=0;if(!r&&b){const[O,_]=b;if(e.isInline(O)){let T=L.after(e,_);if(!T){const A={text:""},P=le.next(_);Ie.insertNodes(e,A,{at:P,voids:r}),T=L.point(e,P)}a=T,l=!0}o=a.path.length-_.length+1,l=!0}h=L.pointRef(e,a);const E=a.path.length-o,[,C]=g,x=a.path.slice(0,E);let S=o===0?a.offset:a.path[E]+y;for(const[O,_]of L.levels(e,{at:x,reverse:!0,voids:r})){let w=!1;if(_.length{Array.isArray(t)||(t=[t]);const r={};for(const i of t)r[i]=null;Ie.setNodes(e,r,n)},eB=(e,t={})=>{L.withoutNormalizing(e,()=>{const{mode:n="lowest",hanging:r=!1,split:i=!1,voids:s=!1}=t;let{at:a=e.selection,match:o}=t;if(!a)return;if(!r&&Ce.isRange(a)&&(a=L.unhangRange(e,a,{voids:s})),o==null&&(o=Qt.isPath(a)?zc(e,a):h=>ie.isElement(h)&&L.isBlock(e,h)),i&&Ce.isRange(a)&&Ce.isExpanded(a)){const h=L.rangeRef(e,a,{affinity:"inward"}),[m,g]=Ce.edges(a),b=(C,x)=>ie.isElement(C)&&L.isInline(e,C)&&o(C,x),y=n==="all"?"highest":n,E=e.operations.length;Ie.splitNodes(e,{at:g,match:b,mode:y,voids:s}),Ie.splitNodes(e,{at:m,match:b,mode:y,voids:s}),a=h.unref(),t.at==null&&e.operations.length>E&&Ie.select(e,a)}Qt.isPath(a)&&(a=L.range(e,a));const l=Qt.isRange(a)?L.rangeRef(e,a):null,u=L.nodes(e,{at:a,match:o,mode:n,voids:s}),f=Array.from(u,([,h])=>L.pathRef(e,h)).reverse();for(const h of f){const m=h.unref(),[g]=L.node(e,m);let b=L.range(e,m);i&&l&&(b=Ce.intersection(l.current,b)),Ie.liftNodes(e,{at:b,match:y=>!ie.isText(g)&&g.children.includes(y),voids:s})}l&&l.unref()})};function _6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yh(e){for(var t=1;t{L.withoutNormalizing(e,()=>{const{mode:r="lowest",hanging:i=!1,split:s=!1,voids:a=!1}=n;let{match:o,at:l=e.selection}=n;if(!l)return;if(!i&&Ce.isRange(l)&&(l=L.unhangRange(e,l,{voids:a})),o==null&&(Qt.isPath(l)?o=zc(e,l):e.isInline(t)?o=f=>ie.isElement(f)&&L.isInline(e,f)||ie.isText(f):o=f=>ie.isElement(f)&&L.isBlock(e,f)),s&&Qt.isRange(l)){const[f,h]=Ce.edges(l),m=le.equals(f.path,h.path)?le.parent(f.path):le.common(f.path,h.path),g=L.rangeRef(e,l,{affinity:"inward"}),b=x=>{const S=L.above(e,{at:x,match:O=>ie.isElement(O)&&L.isBlock(e,O)});return S&&L.isEdge(e,x,S[1])},y=Ce.isBackward(l),E=Ce.isCollapsed(l),C=(x,S)=>{const[O]=L.nodes(e,{at:x,match:o,mode:"lowest",voids:a});if(!e.isInline(t)||E||!O||!ie.isText(O[0])){Ie.splitNodes(e,{at:x,match:o,voids:a,always:!b(x)});return}Ie.splitNodes(e,{at:x,match:ie.isText,voids:a,always:!b(x)});const _=S==="start"?y?"focus":"anchor":y?"anchor":"focus",w=Math.min(m.length+1,O[1].length),T=A=>!ie.isText(A)||A.text!=="";for(let A=x.path.length-1;A>=w;A--){const P=g.current[_],I=P.path.slice(0,A),F=ie.get(e,I);if(!ie.isElement(F)||!e.isInline(F))continue;const M=P.path[A]+(S==="end"?1:0),W=F.children.slice(0,M).some(T),ee=F.children.slice(M).some(T);if(W&&ee)e.apply({type:"split_node",path:I,position:M,properties:e.getSplitProperties(F,I)});else if(S==="start"?W:ee){const U=S==="start"?L.after(e,I,{voids:a}):L.before(e,I,{voids:a});U&&(g.current=yh(yh({},g.current),{},{[_]:U}))}}};C(h,"end"),C(f,"start"),l=g.unref(),n.at==null&&Ie.select(e,l)}const u=Array.from(L.nodes(e,{at:l,match:e.isInline(t)?f=>ie.isElement(f)&&L.isBlock(e,f):f=>ie.isEditor(f),mode:"lowest",voids:a}));for(const[,f]of u){const h=Qt.isRange(l)?Ce.intersection(l,L.range(e,f)):l;if(!h)continue;const m=Array.from(L.nodes(e,{at:h,match:o,mode:r,voids:a}));if(m.length>0){const[g]=m,b=m[m.length-1],[,y]=g,[,E]=b;if(y.length===0&&E.length===0)continue;const C=le.equals(y,E)?le.parent(y):le.common(y,E),x=L.range(e,y,E),S=L.node(e,C),[O]=S,_=C.length+1,w=le.next(E.slice(0,_)),T=yh(yh({},t),{},{children:[]});Ie.insertNodes(e,T,{at:w,voids:a}),Ie.moveNodes(e,{at:x,match:A=>!ie.isText(O)&&O.children.includes(A),to:w.concat(0),voids:a})}}})},Yd=()=>{const e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isIsolated:()=>!1,inlineEdgeAffinity:()=>null,leafEdgeAffinity:()=>null,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:(...t)=>WN(e,...t),addMark:(...t)=>QN(e,...t),deleteBackward:(...t)=>eO(e,...t),deleteForward:(...t)=>tO(e,...t),deleteFragment:(...t)=>nO(e,...t),getFragment:(...t)=>GN(e,...t),insertBreak:(...t)=>hO(e,...t),insertSoftBreak:(...t)=>KV(e,...t),insertFragment:(...t)=>$O(e,...t),insertNode:(...t)=>WV(e,...t),insertText:(...t)=>YV(e,...t),normalizeNode:(...t)=>YN(e,...t),removeMark:(...t)=>IO(e,...t),getDirtyPaths:(...t)=>KN(e,...t),getSplitProperties:(...t)=>HV(e,...t),shouldNormalize:(...t)=>JN(e,...t),above:(...t)=>XN(e,...t),after:(...t)=>ZN(e,...t),before:(...t)=>bw(e,...t),collapse:(...t)=>VO(e,...t),delete:(...t)=>cU(e,...t),deselect:(...t)=>UO(e,...t),edges:(...t)=>rO(e,...t),elementReadOnly:(...t)=>iO(e,...t),end:(...t)=>ww(e,...t),first:(...t)=>sO(e,...t),fragment:(...t)=>aO(e,...t),getMarks:(...t)=>EO(e,...t),hasBlocks:(...t)=>lO(e,...t),hasInlines:(...t)=>uO(e,...t),hasPath:(...t)=>cO(e,...t),hasRange:(...t)=>fO(e,...t),hasTexts:(...t)=>dO(e,...t),insertNodes:(...t)=>GO(e,...t),insertionPoint:(...t)=>XV(e,...t),isBlock:(...t)=>pO(e,...t),isEdge:(...t)=>mO(e,...t),isEmpty:(...t)=>Yf(e,...t),isEnd:(...t)=>gO(e,...t),isNormalizing:(...t)=>vO(e,...t),isStart:(...t)=>yO(e,...t),last:(...t)=>xO(e,...t),leaf:(...t)=>bO(e,...t),levels:(...t)=>wO(e,...t),liftNodes:(...t)=>YO(e,...t),mergeNodes:(...t)=>pU(e,...t),move:(...t)=>HO(e,...t),moveNodes:(...t)=>kw(e,...t),next:(...t)=>tU(e,...t),node:(...t)=>CO(e,...t),nodes:(...t)=>nU(e,...t),normalize:(...t)=>kO(e,...t),parent:(...t)=>DO(e,...t),path:(...t)=>AO(e,...t),pathRef:(...t)=>SO(e,...t),pathRefs:(...t)=>_O(e,...t),point:(...t)=>OO(e,...t),pointRef:(...t)=>TO(e,...t),pointRefs:(...t)=>NO(e,...t),positions:(...t)=>BO(e,...t),previous:(...t)=>rU(e,...t),range:(...t)=>FO(e,...t),rangeRef:(...t)=>PO(e,...t),rangeRefs:(...t)=>RO(e,...t),removeNodes:(...t)=>XO(e,...t),select:(...t)=>np(e,...t),setChildren:(...t)=>mU(e,...t),setNodes:(...t)=>Dw(e,...t),setNormalizing:(...t)=>MO(e,...t),setPoint:(...t)=>WO(e,...t),setSelection:(...t)=>KO(e,...t),splitNodes:(...t)=>QO(e,...t),start:(...t)=>Ew(e,...t),string:(...t)=>LO(e,...t),unhangRange:(...t)=>zO(e,...t),unsetNodes:(...t)=>ZO(e,...t),unwrapNodes:(...t)=>eB(e,...t),void:(...t)=>oO(e,...t),word:(...t)=>aU(e,...t),withoutNormalizing:(...t)=>jO(e,...t),wrapNodes:(...t)=>Sw(e,...t),shouldMergeNodesRemovePrevNode:(...t)=>sU(e,...t)};return e};var Hs={},A6;function vU(){if(A6)return Hs;A6=1,Object.defineProperty(Hs,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=1;i<20;i++)r["f"+i]=111+i;function s(m,g,b){g&&!("byKey"in g)&&(b=g,g=null),Array.isArray(m)||(m=[m]);var y=m.map(function(x){return l(x,g)}),E=function(S){return y.some(function(O){return u(O,S)})},C=b==null?E:E(b);return C}function a(m,g){return s(m,g)}function o(m,g){return s(m,{byKey:!0},g)}function l(m,g){var b=g&&g.byKey,y={};m=m.replace("++","+add");var E=m.split("+"),C=E.length;for(var x in t)y[t[x]]=!1;var S=!0,O=!1,_=void 0;try{for(var w=E[Symbol.iterator](),T;!(S=(T=w.next()).done);S=!0){var A=T.value,P=A.endsWith("?")&&A.length>1;P&&(A=A.slice(0,-1));var I=h(A),F=t[I];if(A.length>1&&!F&&!n[A]&&!r[I])throw new TypeError('Unknown modifier: "'+A+'"');(C===1||!F)&&(b?y.key=I:y.which=f(A)),F&&(y[F]=P?null:!0)}}catch(M){O=!0,_=M}finally{try{!S&&w.return&&w.return()}finally{if(O)throw _}}return y}function u(m,g){for(var b in m){var y=m[b],E=void 0;if(y!=null&&(b==="key"&&g.key!=null?E=g.key.toLowerCase():b==="which"?E=y===91&&g.which===93?91:g.which:E=g[b],!(E==null&&y===!1)&&E!==y))return!1}return!0}function f(m){m=h(m);var g=r[m]||m.toUpperCase().charCodeAt(0);return g}function h(m){return m=m.toLowerCase(),m=n[m]||m,m}return Hs.default=s,Hs.isHotkey=s,Hs.isCodeHotkey=a,Hs.isKeyHotkey=o,Hs.parseHotkey=l,Hs.compareHotkey=u,Hs.toKeyCode=f,Hs.toKeyName=h,Hs}var As=vU();function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}function yU(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xU(e){var t=yU(e,"string");return Cd(t)=="symbol"?t:t+""}function tB(e,t,n){return(t=xU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nB=globalThis.Node,bU=globalThis.Text;const rB=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,wU=e=>Sp(e)&&e.nodeType===8,fo=e=>Sp(e)&&e.nodeType===1,Sp=e=>{const t=rB(e);return!!t&&e instanceof t.Node},T6=e=>{const t=e&&e.anchorNode&&rB(e.anchorNode);return!!t&&e instanceof t.Selection},EU=e=>{let[t,n]=e;if(fo(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=iB(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},iB=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(wU(i)||fo(i)&&i.childNodes.length===0||fo(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},kU=(e,t,n)=>{const[r]=iB(e,t,n);return r},N6=e=>e.getSelection!=null?e.getSelection():document.getSelection(),O6=(e,t)=>!!(e.compareDocumentPosition(t)&nB.DOCUMENT_POSITION_PRECEDING),DU=(e,t)=>!!(e.compareDocumentPosition(t)&nB.DOCUMENT_POSITION_FOLLOWING),zl=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},B6=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var Wg,Kg;const P6=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Gg=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Jf=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),SU=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Wg=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Wg!==void 0&&Wg[1]&&parseInt((Kg=navigator.userAgent.match(/Version\/(\d+)/))===null||Kg===void 0?void 0:Kg[1],10)<17);let _U=0,AU=class{constructor(){tB(this,"id",void 0),this.id=`${_U++}`}};const TU=new WeakMap,NU=new WeakMap,OU=new WeakMap,BU=new WeakMap,_w=new WeakMap,PU=new WeakMap,R6=new WeakMap,F6=new WeakMap,I6=new WeakMap,xh=new WeakMap,RU=new WeakMap,FU=new WeakMap,sB=new WeakMap,IU=new WeakMap,M6=Symbol("placeholder");function L6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mc(e){for(var t=1;tsB.get(e),androidScheduleFlush:e=>{var t;(t=FU.get(e))===null||t===void 0||t()},blur:e=>{const t=Ct.toDOMNode(e,e),n=Ct.findDocumentOrShadowRoot(e);xh.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Ct.findDocumentOrShadowRoot(e),r=N6(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Ie.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Ct.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Ct.toSlateNode(e,t.target)}catch(y){if(r)return null;throw y}let l;try{l=Ct.findPath(e,o)}catch(y){if(r)return null;throw y}if(ie.isElement(o)&&L.isVoid(e,o)){const y=a.getBoundingClientRect(),E=e.isInline(o)?i-y.left{if(!y)return null;const E=f.createRange();return E.setStart(y.offsetNode,y.offset),E.setEnd(y.offsetNode,y.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Ct.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=R6.get(t);return n||(n=new AU,R6.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=OU.get(r);if(s==null){if(r===e)return n;break}const a=NU.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Zn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(xh.get(e)||!Ct.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Ct.focus(e,{retries:t.retries-1})},10);return}const n=Ct.toDOMNode(e,e),r=Ct.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Ct.toDOMRange(e,e.selection):null;if(e.selection||Ie.select(e,L.start(e,[])),xh.set(e,!0),n.focus({preventScroll:!0}),i){const s=N6(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=BU.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Ct.isMounted(e))return!1;const i=Ct.toDOMNode(e,e);let s;try{s=fo(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||zl(s,"[data-slate-editor]")!==i)return!1;const a=zl(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?zl(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&zl(o,"[data-slate-editor]")===i){var l;const u=(l=zl(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||zl(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&zl(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>Sp(t)&&Ct.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Ct.hasEditableTarget(e,t)||Ct.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Sp(t)&&Ct.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!RU.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Ct.isComposing(e)?MU(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,mc(mc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!xh.get(e),isMounted:e=>!!_w.get(e),isReadOnly:e=>!!I6.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(I6.get(e)||!Ct.hasTarget(e,t))return!1;const n=Ct.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n;const r=t===e?_w.get(e):(n=F6.get(e))===null||n===void 0?void 0:n.get(Ct.findKey(e,t));if(!r)throw new Error(`Cannot resolve a DOM node from Slate node: ${Zn.stringify(t)}`);return r},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=F6.get(e))===null||n===void 0?void 0:n.get(Ct.findKey(e,ie.get(e,t.path))),i=r?j6(e,r,t):null;return!i&&LU(e)&&e.onDOMError(new Error(z6(t))),i},resolveDOMRange:(e,t)=>{const n=Ct.resolveDOMPoint(e,t.anchor),r=Ce.isCollapsed(t)?n:Ct.resolveDOMPoint(e,t.focus);return n&&r?q6(e,n,r,Ce.isBackward(t)):null},resolveEventRange:(e,t)=>Ct.findEventRange(e,t,{suppressThrow:!0}),toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Ct.toDOMNode(e,n),i=j6(e,r,t);if(!i)throw new Error(z6(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Ct.toDOMPoint(e,n),s=Ce.isCollapsed(t)?i:Ct.toDOMPoint(e,r);return q6(e,i,s,Ce.isBackward(t))},toSlateNode:(e,t)=>{let n=fo(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?PU.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:EU(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Ct.toDOMNode(e,e),x=o.closest('[data-slate-void="true"]'),S=x&&B6(C,x)?x:null,O=o.closest('[contenteditable="false"]'),_=O&&B6(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),T=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Ct.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` +`?0:a);const I=P.cloneContents();[...Array.prototype.slice.call(I.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(I.querySelectorAll("[contenteditable=false]"))].forEach(M=>{if(Gg&&!r&&M.hasAttribute("data-slate-zero-width")&&M.textContent.length>0&&M.textContext!=="\uFEFF"){M.textContent.startsWith("\uFEFF")&&(M.textContent=M.textContent.slice(1));return}M.parentNode.removeChild(M)}),f=I.textContent.length,T=u}}else if(S){const A=S.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(_){const A=I=>I?I.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=_.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...A(P?.previousElementSibling),...A(P)].findLast(F=>O6(_,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...A(P),...A(P?.nextElementSibling)].find(F=>DU(_,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),T=w,l==="forward"?f=0:(f=T.textContent.length,T.querySelectorAll("[data-slate-zero-width]").forEach(I=>{f-=I.textContent.length})))}T&&f===T.textContent.length&&Gg&&T.getAttribute("data-slate-zero-width")==="z"&&(h=T.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||Jf&&(m=T.textContent)!==null&&m!==void 0&&m.endsWith(` + +`))&&f--}if(Gg&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Ct.hasDOMNode(e,C,{editable:!0})){const x=Ct.toSlateNode(e,C);let S;try{S=Ct.findPath(e,x)}catch(w){if(i)return null;throw w}let{path:O,offset:_}=L.start(e,S);return C.querySelector("[data-slate-leaf]")||(_=a),{path:O,offset:_}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let y;try{y=Ct.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Ct.findPath(e,y)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=T6(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(T6(t)){if(Jf&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),x=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&x.startContainer instanceof HTMLTableRowElement){let S=function(A){return A.childElementCount>0?S(A.children[0]):A};const O=C.startContainer,_=x.startContainer,w=S(O.children[C.startOffset]),T=S(_.children[x.startOffset]);h=0,T.childNodes.length>0?l=T.childNodes[0]:l=T,w.childNodes.length>0?f=w.childNodes[0]:f=w,T instanceof HTMLElement?u=T.innerHTML.length:u=0}else C.startContainer===f?(l=x.endContainer,u=x.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=x.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;SU&&CU(l)||Jf?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);Jf&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` + +`)&&h===f.textContent.length&&h--;const g=Ct.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=O6(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?mc(mc({},r),{},{text:n}):mc(mc({},r),{},{children:aB(r.children,t.slice(1),n)})),MU=e=>{var t;const n=Ct.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Ct.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Ct.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=Yd();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=aB(e.children,r.path,s),{view:a,point:r}},LU=e=>{var t,n;return!!((t=_w.get(e))!==null&&t!==void 0&&t.isConnected)&&!TU.get(e)&&!((n=sB.get(e))!==null&&n!==void 0&&n.length)&&!IU.get(e)},z6=e=>`Cannot resolve a DOM point from Slate point: ${Zn.stringify(e)}`,j6=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const s=Ct.getWindow(e).document.createRange(),[a,o]=r?n:t,[l,u]=r?t:n,h=!!(fo(a)?a:a.parentElement).getAttribute("data-slate-zero-width"),g=!!(fo(l)?l:l.parentElement).getAttribute("data-slate-zero-width");return s.setStart(a,h?1:o),s.setEnd(l,g?1:u),s};function zU(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $6(e,t){if(e==null)return{};var n,r,i=zU(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r{const t=jU[e],n=qU[e],r=$U[e],i=t&&As.isHotkey(t),s=n&&As.isHotkey(n),a=r&&As.isHotkey(r);return o=>!!(i&&i(o)||P6&&s&&s(o)||!P6&&a&&a(o))};ur("bold"),ur("compose"),ur("moveBackward"),ur("moveForward"),ur("deleteBackward"),ur("deleteForward"),ur("deleteLineBackward"),ur("deleteLineForward"),ur("deleteWordBackward"),ur("deleteWordForward"),ur("extendBackward"),ur("extendForward"),ur("extendLineBackward"),ur("extendLineForward"),ur("italic"),ur("moveLineBackward"),ur("moveLineForward"),ur("moveWordBackward"),ur("moveWordForward"),ur("redo"),ur("insertSoftBreak"),ur("splitBlock"),ur("transposeCharacter"),ur("undo");const VU=["anchor","focus"],UU=["anchor","focus"],HU=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),oB=(e,t)=>{const{anchor:n,focus:r}=e,i=$6(e,VU),{anchor:s,focus:a}=t,o=$6(t,UU);return e[M6]===t[M6]&&HU(i,o)},WU=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n-1}return hv=t,hv}var pv,lD;function iH(){if(lD)return pv;lD=1;var e=gm();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return pv=t,pv}var mv,uD;function vm(){if(uD)return mv;uD=1;var e=eH(),t=tH(),n=nH(),r=rH(),i=iH();function s(a){var o=-1,l=a==null?0:a.length;for(this.clear();++og))return!1;var y=h.get(a),E=h.get(o);if(y&&E)return y==o&&E==a;var C=-1,x=!0,S=l&i?new e:void 0;for(h.set(a,o),h.set(o,a);++C-1&&r%1==0&&r-1&&n%1==0&&n<=e}return dy=t,dy}var hy,l7;function LH(){if(l7)return hy;l7=1;var e=qc(),t=cE(),n=Do(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",E="[object ArrayBuffer]",C="[object DataView]",x="[object Float32Array]",S="[object Float64Array]",O="[object Int8Array]",_="[object Int16Array]",w="[object Int32Array]",T="[object Uint8Array]",A="[object Uint8ClampedArray]",P="[object Uint16Array]",I="[object Uint32Array]",F={};F[x]=F[S]=F[O]=F[_]=F[w]=F[T]=F[A]=F[P]=F[I]=!0,F[r]=F[i]=F[E]=F[s]=F[C]=F[a]=F[o]=F[l]=F[u]=F[f]=F[h]=F[m]=F[g]=F[b]=F[y]=!1;function M(W){return n(W)&&t(W.length)&&!!F[e(W)]}return hy=M,hy}var py,u7;function fE(){if(u7)return py;u7=1;function e(t){return function(n){return t(n)}}return py=e,py}var Qf={exports:{}};Qf.exports;var c7;function dE(){return c7||(c7=1,(function(e,t){var n=lB(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s&&n.process,o=(function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=o})(Qf,Qf.exports)),Qf.exports}var my,f7;function hE(){if(f7)return my;f7=1;var e=LH(),t=fE(),n=dE(),r=n&&n.isTypedArray,i=r?t(r):e;return my=i,my}var gy,d7;function mB(){if(d7)return gy;d7=1;var e=FH(),t=wm(),n=ls(),r=Em(),i=Cm(),s=hE(),a=Object.prototype,o=a.hasOwnProperty;function l(u,f){var h=n(u),m=!h&&t(u),g=!h&&!m&&r(u),b=!h&&!m&&!g&&s(u),y=h||m||g||b,E=y?e(u.length,String):[],C=E.length;for(var x in u)(f||o.call(u,x))&&!(y&&(x=="length"||g&&(x=="offset"||x=="parent")||b&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,C)))&&E.push(x);return E}return gy=l,gy}var vy,h7;function pE(){if(h7)return vy;h7=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return vy=t,vy}var yy,p7;function zH(){if(p7)return yy;p7=1;var e=uB(),t=e(Object.keys,Object);return yy=t,yy}var xy,m7;function jH(){if(m7)return xy;m7=1;var e=pE(),t=zH(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var a=[];for(var o in Object(s))r.call(s,o)&&o!="constructor"&&a.push(o);return a}return xy=i,xy}var by,g7;function Vc(){if(g7)return by;g7=1;var e=sE(),t=cE();function n(r){return r!=null&&t(r.length)&&!e(r)}return by=n,by}var wy,v7;function Jd(){if(v7)return wy;v7=1;var e=mB(),t=jH(),n=Vc();function r(i){return n(i)?e(i):t(i)}return wy=r,wy}var Ey,y7;function gB(){if(y7)return Ey;y7=1;var e=hB(),t=uE(),n=Jd();function r(i){return e(i,n,t)}return Ey=r,Ey}var Cy,x7;function qH(){if(x7)return Cy;x7=1;var e=gB(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,a,o,l,u,f){var h=o&t,m=e(s),g=m.length,b=e(a),y=b.length;if(g!=y&&!h)return!1;for(var E=g;E--;){var C=m[E];if(!(h?C in a:r.call(a,C)))return!1}var x=f.get(s),S=f.get(a);if(x&&S)return x==a&&S==s;var O=!0;f.set(s,a),f.set(a,s);for(var _=h;++Etypeof e=="object"&&e!=null&&e.nodeType===1,aS=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",bh=(e,t)=>{if(e.clientHeight{const i=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightst||s>e&&a=t&&o>=n?s-e-r:a>t&&on?a-t+i:0,mW=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},oS=(e,t)=>{var n,r,i,s;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:u,skipOverflowHiddenElements:f}=t,h=typeof u=="function"?u:fe=>fe!==u;if(!sS(e))throw new TypeError("Invalid target");const m=document.scrollingElement||document.documentElement,g=[];let b=e;for(;sS(b)&&h(b);){if(b=mW(b),b===m){g.push(b);break}b!=null&&b===document.body&&bh(b)&&!bh(document.documentElement)||b!=null&&bh(b,f)&&g.push(b)}const y=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,E=(s=(i=window.visualViewport)==null?void 0:i.height)!=null?s:innerHeight,{scrollX:C,scrollY:x}=window,{height:S,width:O,top:_,right:w,bottom:T,left:A}=e.getBoundingClientRect(),{top:P,right:I,bottom:F,left:M}=(fe=>{const ue=window.getComputedStyle(fe);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(e);let W=o==="start"||o==="nearest"?_-P:o==="end"?T+F:_+S/2-P+F,ee=l==="center"?A+O/2-M+I:l==="end"?w+I:A-M;const U=[];for(let fe=0;fe=0&&A>=0&&T<=E&&w<=y&&(ue===m&&!bh(ue)||_>=j&&T<=re&&A>=K&&w<=Q))return U;const Be=getComputedStyle(ue),ze=parseInt(Be.borderLeftWidth,10),$e=parseInt(Be.borderTopWidth,10),je=parseInt(Be.borderRightWidth,10),Fe=parseInt(Be.borderBottomWidth,10);let Me=0,ge=0;const Oe="offsetWidth"in ue?ue.offsetWidth-ue.clientWidth-ze-je:0,se="offsetHeight"in ue?ue.offsetHeight-ue.clientHeight-$e-Fe:0,we="offsetWidth"in ue?ue.offsetWidth===0?0:me/ue.offsetWidth:0,_e="offsetHeight"in ue?ue.offsetHeight===0?0:ne/ue.offsetHeight:0;if(m===ue)Me=o==="start"?W:o==="end"?W-E:o==="nearest"?wh(x,x+E,E,$e,Fe,x+W,x+W+S,S):W-E/2,ge=l==="start"?ee:l==="center"?ee-y/2:l==="end"?ee-y:wh(C,C+y,y,ze,je,C+ee,C+ee+O,O),Me=Math.max(0,Me+x),ge=Math.max(0,ge+C);else{Me=o==="start"?W-j-$e:o==="end"?W-re+Fe+se:o==="nearest"?wh(j,re,ne,$e,Fe+se,W,W+S,S):W-(j+ne/2)+se/2,ge=l==="start"?ee-K-ze:l==="center"?ee-(K+me/2)+Oe/2:l==="end"?ee-Q+je+Oe:wh(K,Q,me,ze,je+Oe,ee,ee+O,O);const{scrollLeft:Ee,scrollTop:qe}=ue;Me=_e===0?0:Math.max(0,Math.min(qe+Me/_e,ue.scrollHeight-ne/_e+se)),ge=we===0?0:Math.max(0,Math.min(Ee+ge/we,ue.scrollWidth-me/we+Oe)),W+=qe-Me,ee+=Ee-ge}U.push({el:ue,top:Me,left:ge})}return U},gW=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function wB(e,t){if(!e.isConnected||!(i=>{let s=i;for(;s&&s.parentNode;){if(s.parentNode===document)return!0;s=s.parentNode instanceof ShadowRoot?s.parentNode.host:s.parentNode}return!1})(e))return;const n=(i=>{const s=window.getComputedStyle(i);return{top:parseFloat(s.scrollMarginTop)||0,right:parseFloat(s.scrollMarginRight)||0,bottom:parseFloat(s.scrollMarginBottom)||0,left:parseFloat(s.scrollMarginLeft)||0}})(e);if((i=>typeof i=="object"&&typeof i.behavior=="function")(t))return t.behavior(oS(e,t));const r=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:i,top:s,left:a}of oS(e,gW(t))){const o=s-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:o,left:l,behavior:r})}}const Rt={...Nr},Je={...le,child:(e,t)=>e.concat([t]),firstChild:e=>Je.child(e,0),lastIndex:e=>e.at(-1)??-1,next:e=>{try{return le.next(e)}catch{return e}},parent:e=>{try{return le.parent(e)}catch{return e}},previous:e=>{if(e.length===0)return;const t=e.at(-1);if(!(t<=0))return e.slice(0,-1).concat(t-1)}},vW={*children(e,t,n={}){const{from:r,reverse:i=!1,to:s}=n,a=ht.ancestor(e,t);if(!a)return;const{children:o}=a;let l=i?o.length-1:0;const u=s??(i?0:o.length);for(r!==void 0&&(l=r);i?l>=u:lVN(e),isLastChild(e,t){if(t.length===0)return!1;const n=ht.parent(e,t);return n?t.at(-1)===n.children.length-1:!1},lastChild(e,t){return ht.children(e,t,{reverse:!0}).next().value}},Fn=Sn,ht={...ie,isAncestor:Rt.isAncestor,ancestor:(...e)=>{try{return ie.ancestor(...e)}catch{}},common:(...e)=>{try{return ie.common(...e)}catch{}},descendant:(...e)=>{try{return ie.descendant(...e)}catch{}},first:(...e)=>{try{return ie.first(...e)}catch{}},fragment:(...e)=>{try{const t=ie.fragment;return t(...e)}catch{return[]}},get:(...e)=>{try{return ie.get(...e)}catch{}},hasSingleChild:e=>Fn.isText(e)?!0:e.children.length===1&&ht.hasSingleChild(e.children[0]),isDescendant:e=>Rt.isElement(e)||Fn.isText(e),last:(...e)=>{try{return ie.last(...e)}catch{}},leaf:(...e)=>{try{return ie.leaf(...e)}catch{}},parent:(...e)=>{try{return ie.parent(...e)}catch{}},...vW},EB={...Qt,isAt:e=>EB.isLocation(e)||ht.isNode(e)},CB=MV,Zl=pc,mn={...Ce,contains:(e,t)=>{const[n,r]=mn.edges(t);return mn.includes(e,n)&&mn.includes(e,r)},isCollapsed:e=>!!e&&Ce.isCollapsed(e),isExpanded:e=>!!e&&Ce.isExpanded(e)},yo={...an,get:(e,{focus:t}={})=>{let n;return mn.isRange(e)&&(n=t?e.focus:e.anchor),yo.isPoint(e)&&(n=e),Je.isPath(e)&&(n={offset:0,path:e}),n}},yW=e=>Ct.blur(e),lS=e=>Ct.deselect(e),xW=e=>{try{return Ct.findDocumentOrShadowRoot(e)}catch{}},bW=(e,t)=>{try{return Ct.findEventRange(e,t)}catch{}},wW=(e,t)=>{try{return Ct.findKey(e,t)}catch{}},EW=(e,t,n)=>{const r=()=>e.api.node({...n,at:[],match:i=>i===t})?.[1];if(n)return r();try{return Ct.findPath(e,t)}catch{return r()}},CW=(e,{at:t,edge:n,retries:r=5}={})=>{const i=s=>{e.tf.withoutNormalizing(()=>{e.tf.deselect(),e.tf.select(s)})};if(n){const s=n==="startEditor"||n==="endEditor"?[]:t??e.selection;s&&i(n==="start"?e.api.start(s):e.api.end(s))}else t&&i(t);try{Ct.focus(e,{retries:r})}catch(s){console.error(s)}},kW=e=>{try{return Ct.getWindow(e)}catch{}},DW=(e,t,n)=>{try{return Ct.hasDOMNode(e,t,n)}catch{}return!1},SW=(e,t)=>{try{return Ct.hasEditableTarget(e,t)}catch{}return!1},uS=(e,t)=>{try{return fO(e,t)}catch{}return!1},_W=(e,t)=>{try{return Ct.hasSelectableTarget(e,t)}catch{}return!1},AW=(e,t)=>{try{return Ct.hasTarget(e,t)}catch{}return!1},TW=e=>Ct.isComposing(e),NW=e=>Ct.isFocused(e),OW=e=>Ct.isReadOnly(e),BW=(e,t)=>{try{return Ct.isTargetInsideNonReadonlyVoid(e,t)}catch{}return!1},PW=(e,t)=>{try{return Ct.toDOMNode(e,t)}catch{}},RW=(e,t)=>{try{return Ct.toDOMPoint(e,t)}catch{}},FW=(e,t)=>{try{return Ct.toDOMRange(e,t)}catch{}},IW=(e,t)=>{try{return Ct.toSlateNode(e,t)}catch{}},MW=(e,t,n)=>{try{return Ct.toSlatePoint(e,t,n)}catch{}},LW=(e,t,n)=>{try{return Ct.toSlateRange(e,t,n)}catch{}},kn=(e,t)=>t&&XU(t)&&ht.isNode(t)?e.api.findPath(t):t??void 0;function zW(e){return Array.isArray(e)?e:[e]}const kB=(e,t,n)=>n?typeof n=="object"?Object.entries(n).every(([r,i])=>zW(i).includes(e[r])):n(e,t):!0,Wc=(e,{id:t,block:n,empty:r,match:i,text:s}={})=>{let a=!1,o=()=>!0;return s!==void 0&&(a=!0,o=tl(o,l=>Fn.isText(l)===s)),r!==void 0&&(a=!0,o=tl(o,l=>Fn.isText(l)?l.text.length>0==!r:e.api.isEmpty(l)===r)),n!==void 0&&(a=!0,o=tl(o,l=>e.api.isBlock(l)===n)),t!==void 0&&(a=!0,o=tl(o,l=>t===!0&&!!l.id||l.id===t)),typeof i=="object"?(a=!0,o=tl(o,(l,u)=>kB(l,u,i))):typeof i=="function"&&(a=!0,o=tl(o,i)),a?o:void 0},bi=(e,{id:t,empty:n,match:r,text:i,...s}={})=>{const{at:a,block:o}=s;return{...s,at:kn(e,a),match:Wc(e,{id:t,block:o,empty:n,match:r,text:i})}},tl=(e,t)=>(n,r)=>e(n,r)&&(!t||t(n,r)),DB=(e,t,n)=>(r,i)=>{const s=Wc(e,n);return(!t||t(r,i))&&(!s||s(r,i))},jW=(e,t,n)=>(r,i)=>{const a=(()=>{if(!n?.match){if(n?.at&&Je.isPath(n.at)){const[o]=e.api.node(n.at)??[];return l=>l===o}return o=>Rt.isElement(o)&&e.api.isBlock(o)}return Wc(e,n)})();return(!t||t(r,i))&&(!a||a(r,i))},qW=(e,t)=>{try{return XN(e,bi(e,t))}catch{return}},$W=(e,t,n)=>QN(e,t,n),VW=(e,t,n)=>SO(e,t,n),UW=(e,t,n)=>TO(e,t,n),HW=(e,t,n)=>PO(e,t,n),WW=(e,t="character")=>{eO(e,t)},KW=(e,t="character")=>{tO(e,t)},GW=(e,t)=>nO(e,t),SB=new Set(["addMark","apply","blur","collapse","delete","deleteBackward","deleteForward","deleteFragment","deselect","deselectDOM","focus","insertBreak","insertData","insertFragment","insertFragmentData","insertNode","insertNodes","insertSoftBreak","insertText","insertTextData","liftNodes","mergeNodes","move","moveNodes","normalize","normalizeNode","redo","removeMark","removeNodes","select","setFragmentData","setNodes","setChildren","setNodesBatch","setPoint","setSelection","setSplittingOnce","splitNodes","undo","unsetNodes","unwrapNodes","withMerging","withNewBatch","withoutMerging","withoutNormalizing","withoutSaving","wrapNodes","writeHistory"]),_B=new Set(["above","after","before","edges","elementReadOnly","end","findDocumentOrShadowRoot","findEventRange","findKey","findPath","first","fragment","getDirtyPaths","getFragment","getMarks","getWindow","hasBlocks","hasDOMNode","hasEditableTarget","hasInlines","hasPath","hasRange","hasSelectableTarget","hasTarget","hasTexts","highestBlock","isBlock","isComposing","isEdge","isElementReadOnly","isEmpty","isEnd","isFocused","isInline","isMerging","isNormalizing","isReadOnly","isSaving","isSelectable","isSplittingOnce","isStart","isTargetInsideNonReadonlyVoid","isVoid","last","leaf","levels","markableVoid","next","node","nodes","normalize","onChange","operations","parent","path","pathRef","pathRefs","point","pointRef","pointRefs","positions","previous","range","rangeRef","rangeRefs","selection","setNormalizing","shouldMergeNodes","shouldNormalize","start","string","toDOMNode","toDOMPoint","toDOMRange","toSlateNode","toSlatePoint","toSlateRange","unhangRange","void"]),cS=(e,t)=>{if(!t)return;const n=e,r=Object.entries(t).reduce((i,[s,a])=>(SB.has(s)&&(i[s]=a),i),{});Object.assign(n,r)},fS=(e,t)=>{if(!t)return;const n=e,r=Object.entries(t).reduce((i,[s,a])=>(_B.has(s)&&(i[s]=a),i),{});Object.assign(n,r),t.marks&&(n.getMarks=t.marks)},bE=e=>{const t=e;_B.forEach(n=>{t[n]&&(n==="getMarks"?t.api.marks=t.getMarks:t.api[n]=t[n])}),SB.forEach(n=>{t[n]&&(t.tf[n]=t[n])})},YW=(e,t,n={})=>{try{if(n.previous){const r=e.api.previous({at:kn(e,t)});return r?ww(e,r[1]):void 0}return ww(e,kn(e,t))}catch{}},JW=(e,t,n)=>{try{return bO(e,kn(e,t),n)}catch{}},XW=(e,t,n)=>{try{return ZN(e,kn(e,t),n)}catch{}},QW=(e,t,n)=>{if(!n||!n.match&&!n.matchString){try{return bw(e,kn(e,t),n)}catch{}return}const r=!n.unit||n.unit==="offset",i=n.matchString?ho(n.matchString):[""],s=n.matchByRegex??!1;let a;return i.some(o=>{let l=t,u=e.api.point(t,{edge:"end"});const f=o.length+1,h=Array.from({length:f});let m=0;for(;;){const g=bw(e,kn(e,l),n);if(!g||e.api.isAt({at:{anchor:g,focus:u},blocks:!0}))return n.matchBlockStart&&(a=u),!1;const b=e.api.string({anchor:g,focus:u});let y=b;if(r&&f&&(h.unshift({point:g,text:b}),h.pop(),y=pW(h.slice(0,-1),"text").join("")),(s?o.match(y):y===o)||n.match?.({at:t,beforePoint:g,beforeString:y}))return n.afterMatch?f&&r?(a=h.at(-1)?.point,!!a):(a=u,!0):(a=g,!0);if(u=g,l=g,m+=1,!n.skipInvalid&&(!o||m>=o.length))return!1}return!1}),a},ZW=(e,t,n={})=>{try{if(n.next){const r=e.api.next({at:kn(e,t)});return r?Ew(e,r[1]):void 0}return Ew(e,kn(e,t))}catch{}},eK=(e,t)=>oO(e,{...t,at:kn(e,t?.at)}),tK=(e,t)=>Rt.isElement(t)&&pO(e,t);function*nK(e,t={}){const n=bi(e,t),{ignoreNonSelectable:r=!1,mode:i="all",reverse:s=!1,universal:a=!1,voids:o=!1}=n,l=kn(e,n.at)??e.selection;let u=Wc(e,n);if(u||(u=()=>!0),!l)return;let f,h;if(CB.isSpan(l))f=l[0],h=l[1];else{const y=e.api.path(l,{edge:"start"}),E=e.api.path(l,{edge:"end"});if(f=s?E:y,h=s?y:E,!y||!E)return}const m=ht.nodes(e,{from:f,reverse:s,to:h,pass:([y])=>Rt.isElement(y)?!!(!o&&(e.api.isVoid(y)||e.api.isElementReadOnly(y))||r&&!e.api.isSelectable(y)):!1}),g=[];let b;for(const[y,E]of m){if(r&&Rt.isElement(y)&&!e.api.isSelectable(y))continue;const C=b&&Je.compare(E,b[1])===0;if(i==="highest"&&C)continue;if(!u(y,E)){if(a&&!C&&Fn.isText(y))return;continue}if(i==="lowest"&&C){b=[y,E];continue}const x=i==="lowest"?b:[y,E];x&&(a?g.push(x):yield x),b=[y,E]}i==="lowest"&&b&&(a?g.push(b):yield b),a&&(yield*g)}const rK=(e,t)=>{let n=!1;return jO(e,()=>{n=!!t()}),n},iK=(e,t,n={})=>{const{edge:r,focus:i,next:s,previous:a}=n;if(i&&e.tf.focus(),s||a){const l=kn(e,t)??e.selection;if(!l)return;const u=e.api.path(l);if(!u)return;const f=a?e.api.end(u,{previous:!0}):e.api.start(u,{next:!0});if(!f)return;np(e,f);return}if(r){const l=kn(e,t)??e.selection;if(!l)return;const u=Je.isPath(l)?l:e.api.node({at:l,block:!0})?.[1];if(!u)return;const f=r==="end"?e.api.end(u):e.api.start(u);if(!f)return;np(e,f);return}const o=kn(e,t);o&&np(e,o)};function ux(e){return Array.isArray(e)?e:[e]}const au=(e,{allow:t,exclude:n,filter:r,level:i,maxLevel:s}={})=>{if(!e)return!1;const[a,o]=e;if(i&&!ux(i).includes(o.length)||s&&o.length>s||r&&!r(e))return!1;if(t){const l=ux(t);if(l.length>0&&!l.includes(a.type))return!1}if(n){const l=ux(n);if(l.length>0&&l.includes(a.type))return!1}return!0},sK=(e,t,n)=>{try{if(EB.isAt(t))return CO(e,kn(e,t),n);const r=t;return e.api.nodes(r).next().value}catch{return}},aK=(e,t,n)=>{try{return AO(e,kn(e,t),n)}catch{}},oK=(e,t)=>{try{return rO(e,kn(e,t))}catch{}},lK=(e,t=e.selection,n)=>{if(!t)return"";try{return LO(e,kn(e,t),n)}catch{return""}},uK=(e,t)=>{try{return sO(e,kn(e,t))}catch{}},cK=(e,t)=>{const n=(r,i=[])=>(r.forEach(s=>{t?.includes(s.type)?n(s.children,i):i.push(s)}),i);return n(e)},dS=(e,t,n)=>{if(t===null)return[];try{const r=t===void 0?GN(e):aO(e,kn(e,t));return r.length>0&&n?.unwrap&&n.unwrap.length>0?cK(r,n.unwrap):r}catch{return[]}},fK=(e,t)=>wO(e,bi(e,t)),dK=e=>EO(e),hK=e=>_O(e),pK=(e,t,n)=>{try{return OO(e,kn(e,t),n)}catch{}},mK=e=>NO(e),gK=(e,t)=>BO(e,{...t,at:kn(e,t?.at)}),vK=e=>RO(e),yK=(e,t)=>lO(e,t),xK=(e,t)=>uO(e,t),bK=(e,t)=>dO(e,t),wK=e=>hO(e),EK=(e,t,n)=>e.tf.insertNodes(t,n),CK=(e,t,n)=>mO(e,t,n),kK=e=>vO(e),DK=(e,t)=>iO(e,t),SK=(e,t=[],n)=>{let r=t;if(r===null)return!0;if(Je.isPath(r)&&r.length===0||ht.isEditor(r))return e.children.length===1&&Yf(e,e.children[0]);if(n?.after){const i=e.api.block({above:!0,at:r});if(!i)return!1;const s=e.api.point(r),a=e.api.parent(r);if(!a)return!1;const[,o]=a;if(!e.api.isEnd(s,o))return!1;const l=Array.from(ht.children(e,i[1],{from:Je.lastIndex(s.path)+1})).map(([u])=>u);if(l.length>0){for(const u of l)if(Fn.isText(u)&&u.text)return!1}else return e.api.isEnd(s,i[1]);return!0}if(Je.isPath(r))return Yf(e,e.api.node(r)?.[0]);if(n?.block){const i=e.api.block({at:r});if(!i)return!1;r=i[0]}if(!ht.isNode(r)){const i=e.api.nodes({at:r,...n});for(const s of i)if(!Yf(e,s[0]))return!1;return!0}return Yf(e,r)},_K=(e,t,n)=>!!t&&gO(e,t,n),AK=(e,t,n)=>!!t&&yO(e,t,n),TK=(e,[t,n],r)=>{const i=n.slice(0,r+1),s=e.api.node(i);return s||[t,n]},NK=(e,t,n={})=>{try{const{level:r}=n,i=xO(e,kn(e,t));return i&&typeof r=="number"?e.children.length===0?void 0:TK(e,i,r):i}catch{}},OK=(e,t={})=>{const{from:n="after",mode:r=n==="child"?"all":"lowest",voids:i=!1}=t;let s=Wc(e,t);const a=kn(e,t.at)??e.selection;if(!a)return;let o;if(n==="child"&&Je.isPath(a)){const h=Je.firstChild(a);e.api.node(h)&&(o=h,s=tl((m,g)=>!Je.isAncestor(g,a)&&!Je.equals(g,a),s))}if(!o){const h=e.api.after(a,{voids:i});if(!h)return;o=h.path}const[,l]=e.api.last([]),u=[o,l];if(Je.isPath(a)&&a.length===0)return;if(s==null)if(Je.isPath(a)){const[h]=e.api.parent(a);s=m=>h.children.includes(m)}else s=()=>!0;const[f]=e.api.nodes({at:u,match:s,mode:r,voids:i});return f},BK=(e,t)=>kO(e,t),PK=(e,t,n)=>{const r=e.meta.isNormalizing;e.meta.isNormalizing=!0,YN(e,t,n),e.meta.isNormalizing=r},RK=(e,t,n)=>{try{return DO(e,kn(e,t),n)}catch{}},FK=(e,t)=>{const{from:n="after",mode:r="lowest",voids:i=!1}=t;let s=Wc(e,t);const a=kn(e,t.at)??e.selection;if(!a)return;let o;if(n==="parent"&&Je.isPath(a)&&a.length>1&&(o=a,s=tl((h,m)=>!Je.isAfter(m,a)&&!Je.equals(m,a),s)),!o){const h=e.api.before(a,{voids:i});if(!h)return;o=h.path}const[,l]=e.api.first([]),u=[o,l];if(Je.isPath(a)&&a.length===0)return;if(s==null)if(Je.isPath(a)){const[h]=e.api.parent(a);s=m=>h.children.includes(m)}else s=()=>!0;const[f]=e.api.nodes({at:u,match:s,mode:r,reverse:!0,voids:i});return f},IK=(e,t)=>{const n=i=>{try{return FK(e,i)}catch{}};if(t?.sibling){const i=bi(e,t).at;if(!i)return;const s=Je.previous(i);return s?e.api.node(s):void 0}if(!(t?.id&&t?.block))return n(t);const r=e.api.node({id:t.id,at:[]});if(r)return n({at:r[1],block:!0})},MK=(e,t,n,r)=>{let i=kn(e,t);if(mn.isRange(i)&&!n)return i;if(i==="start"){const s=e.api.block({at:n})?.[1];if(!s)return;const a=e.api.start(s);if(!a)return;const o=yo.get(n);return o?{anchor:a,focus:o}:void 0}return n&&i==="before"&&(i=e.api.before(n,r?.before)??kn(e,n)),FO(e,i,kn(e,n))},LK=(e,t)=>IO(e,t),zK=(e,t,n)=>{const[r,i]=t;return Rt.isElement(r)&&e.api.isEmpty(r)||Fn.isText(r)&&r.text===""&&i.at(-1)!==0?(e.tf.removeNodes({at:i}),!1):!0},jK=(e,t,n={})=>{const{character:r,unhang:i=!0,voids:s}=n;if(!mn.isRange(t))return t;if(r){let[a,o]=mn.edges(t);if(!Je.equals(a.path,o.path))if(o.offset===0){const l=e.api.after(a);l&&(o=l)}else{const l=e.api.before(o);l&&(a=l)}return{anchor:a,focus:o}}return i?zO(e,t,{voids:s}):t},qK=(e,{at:t,...n}={})=>{const r=t??e.selection;if(!r)return null;const[i,s]=e.api.edges(r??e.selection),a=e.api.block({at:i,...n});if(!a)return null;const o=e.api.block({at:s,...n});return o?[a,o]:null},$K=(e,{above:t,highest:n,...r}={})=>{if(n){const i=r.at??e.selection;if(!i)return;const s=e.api.path(i)?.[0];return s===void 0?void 0:e.api.node([s])}return t?e.api.above({...r,block:!0}):e.api.node({...r,block:!0,mode:"lowest"})},VK=(e,t)=>[...e.api.nodes({...t,block:!0})],UK=(e,t)=>{try{const{at:n=e.selection,match:r,reverse:i=!1,voids:s=!1}=t;if(!n)return;let a,o;if(CB.isSpan(n))[a,o]=n;else if(mn.isRange(n)){const f=e.api.path(n,{edge:"start"}),h=e.api.path(n,{edge:"end"});a=i?h:f,o=i?f:h}let l=[e,[]];Je.isPath(n)&&(l=e.api.node(n));const u=ht.descendants(l[0],{from:a,reverse:i,to:o,pass:([f])=>s?!1:e.api.isVoid(f)});for(const[f,h]of u)if(kB(f,h,r))return[f,Je.isPath(n)?n.concat(h):h]}catch{return}},HK=(e,t)=>e.api.marks()?.[t],WK=(e,t)=>!!e.api.mark(t),KK=(e,t,n={})=>{const{contains:r=!1}=n;if(!e.selection)return!1;const i=mn.isRange(t)?t:e.api.range(t);return i?r?mn.contains(e.selection,i):!!mn.intersection(e.selection,i):!1},GK=/^(?:\s|$)/,YK=(e,{at:t=e.selection,block:n,blocks:r,end:i,start:s,text:a,word:o,...l}={})=>{if(!t)return!1;if(yo.isPoint(t)){if(o&&i){const u=e.api.after(t);if(!u)return!0;const f=e.api.range(t,u),h=e.api.string(f);return GK.test(h)}if(s||i){const u=e.api.block({at:t,...l});if(!u)return!1;if(s)return e.api.isStart(t,u[1]);if(i)return e.api.isEnd(t,u[1])}return!1}if(mn.isRange(t)){const[u,f]=mn.edges(t);if(a)return Je.equals(u.path,f.path);const h=e.api.block({at:u,...l}),m=e.api.block({at:f,...l});if(r)return!h&&!m?!1:!h||!m?!0:!Je.equals(h[1],m[1]);if(!h||!m)return!1;if(n)return Je.equals(h[1],m[1]);if(s)return e.api.isStart(u,h[1])||mn.isExpanded(t)&&e.api.isStart(f,h[1]);if(i)return e.api.isEnd(f,m[1])}return!1},JK=e=>{if(e.selection){const t=e.selection.focus,n=e.api.end([]);return n.offset===0&&e.api.isEnd(t,t)&&Je.equals(Je.next(Je.parent(t.path)),n.path)}return!1},XK=(e,t)=>{const n=e.api.node(t)?.[0];return Fn.isText(n)},QK=(e,t)=>{if(t.length===0)return;const n=t[0][1],r=t.at(-1)[1];return e.api.range(n,r)};function ZK({key:e,defaultValue:t,getProp:n,mode:r="block",nodes:i}){if(i.length===0)return t;const s=n??(o=>o[e]);let a;for(const o of i){if(r==="block"||r==="all"){const l=s(o);if(l!==void 0){if(a===void 0)a=l;else if(a!==l)return;if(r==="block")continue}else if(r==="block")return t}if(r==="text"||r==="all"){const l=Array.from(ht.texts(o));for(const[u]of l){const f=s(u);if(f!==void 0){if(a===void 0)a=f;else if(a!==f)return}else if(r==="text")return t}}}return a}const eG={scrollMode:"if-needed"};function tG(e,t,n=eG){requestAnimationFrame(()=>{let r;if(yo.isPoint(t)){const{offset:s=0,path:a}=t;r=e.api.toDOMRange({anchor:{offset:s,path:a},focus:{offset:s,path:a}})}else r=t;if(!r)return;const i=r.startContainer.parentElement;i.getBoundingClientRect=r.getBoundingClientRect.bind(r),wB(i,n),setTimeout(()=>{i.getBoundingClientRect=void 0},0)})}const nG=(e,t)=>!!e.api.node(t),rG=(e,t)=>{VO(e,t)},iG=/[\u0E00-\u0E7F]+/,sG=(e,t={})=>{let n=kn(e,t?.at)??e.selection;e.tf.withoutNormalizing(()=>{const{distance:r=1,reverse:i=!1,unit:s="character",voids:a=!1}=t;let{hanging:o=!1}=t;if(!n)return;let l=!1;if(mn.isRange(n)&&mn.isCollapsed(n)&&(l=!0,n=n.anchor),yo.isPoint(n)){const F=e.api.void({at:n,mode:"highest"});if(!a&&F){const[,M]=F;n=M}else{const M={distance:r,unit:s},W=i?e.api.before(n,M)||e.api.start([]):e.api.after(n,M)||e.api.end([]);n={anchor:n,focus:W},o=!0}}if(Je.isPath(n)){e.tf.removeNodes({at:n,voids:a});return}if(mn.isCollapsed(n))return;if(!o){const[,F]=mn.edges(n),M=e.api.end([]);yo.equals(F,M)||(n=e.api.unhangRange(n,{voids:a}))}let[u,f]=mn.edges(n);const h=e.api.above({at:u,voids:a,match:F=>Rt.isElement(F)&&e.api.isBlock(F)}),m=e.api.above({at:f,voids:a,match:F=>Rt.isElement(F)&&e.api.isBlock(F)}),g=h&&m&&!Je.equals(h[1],m[1]),b=Je.equals(u.path,f.path),y=a?null:e.api.void({at:u,mode:"highest"})??e.api.elementReadOnly({at:u,mode:"highest"}),E=a?null:e.api.void({at:f,mode:"highest"})??e.api.elementReadOnly({at:f,mode:"highest"});if(y){const F=e.api.before(u);F&&h&&Je.isAncestor(h[1],F.path)&&(u=F)}if(E){const F=e.api.after(f);F&&m&&Je.isAncestor(m[1],F.path)&&(f=F)}const C=[];let x;for(const F of e.api.nodes({at:n,voids:a})){const[M,W]=F;x&&Je.compare(W,x)===0||(!a&&Rt.isElement(M)&&e.api.isElementReadOnly(M)||!Je.isCommon(W,u.path)&&!Je.isCommon(W,f.path))&&(C.push(F),x=W)}const S=Array.from(C,([,F])=>e.api.pathRef(F)),O=e.api.pointRef(u),_=e.api.pointRef(f);let w="";if(!b&&!y){const F=O.current,[M]=e.api.leaf(F),{path:W}=F,{offset:ee}=u,U=M.text.slice(ee);U.length>0&&(e.tf.apply({offset:ee,path:W,text:U,type:"remove_text"}),w=U)}const T=S.reverse().map(F=>F.unref()).filter(F=>F!==null);for(const F of T)e.tf.removeNodes({at:F,voids:a});if(!E){const F=_.current,[M]=e.api.leaf(F),{path:W}=F,ee=b?u.offset:0,U=M.text.slice(ee,f.offset);U.length>0&&(e.tf.apply({offset:ee,path:W,text:U,type:"remove_text"}),w=U)}!b&&g&&_.current&&O.current&&e.tf.mergeNodes({at:_.current,hanging:!0,reverse:!i,voids:a}),l&&i&&s==="character"&&w.length>1&&iG.exec(w)&&e.tf.insertText(w.slice(0,w.length-r));const A=O.unref(),P=_.unref(),I=i?A||P:P||A;t?.at==null&&I&&e.tf.select(I)})},aG=e=>{UO(e)},oG=(e,t,n)=>{$O(e,t,{...n,at:kn(e,n?.at)})},lG=(e,t,{nextBlock:n,removeEmpty:r,...i}={})=>{i=bi(e,i),e.tf.withoutNormalizing(()=>{if(r){const s=e.api.above({at:i.at});if(s){const a=r===!0?{allow:["p"]}:r,{filter:o}=a;a.filter=([l,u])=>ht.string(l)||l.children.some(f=>e.api.isInline(f))?!1:!o||o([l,u]),au(s,a)&&(e.tf.removeNodes({at:s[1]}),n=!1)}}if(n){const{at:s=e.selection}=i;if(s){const a=e.api.end(s),o=e.api.above({at:a,block:!0});o&&(i.at=Je.next(o[1]))}}GO(e,t,i)})},uG=e=>{e.tf.withoutNormalizing(()=>{e.api.isExpanded()&&e.tf.delete(),e.tf.insertText(` +`)})},cG=(e,t,{marks:n=!0,...r}={})=>{const i=kn(e,r.at);if(i){Ie.insertText(e,t,{...r,at:i});return}if(e.selection)if(n&&e.marks){const s={text:t,...e.marks};e.tf.insertNodes(s,{voids:r.voids}),e.marks=null}else Ie.insertText(e,t,r)},fG=(e,t)=>YO(e,bi(e,t)),AB=(e,t)=>{if(Rt.isElement(t)){const n=t;return e.api.isVoid(t)?!0:n.children.length===1?AB(e,n.children[0]):!1}return!ht.isEditor(t)},dG=(e,t={})=>{const n=bi(e,t);e.tf.withoutNormalizing(()=>{let{at:r=e.selection,match:i}=n;const{hanging:s=!1,mode:a="lowest",voids:o=!1}=n;if(!r)return;if(i==null)if(Je.isPath(r)){const[A]=e.api.parent(r);i=P=>A.children.includes(P)}else i=A=>Rt.isElement(A)&&e.api.isBlock(A);if(!s&&mn.isRange(r)&&(r=e.api.unhangRange(r)),mn.isRange(r))if(mn.isCollapsed(r))r=r.anchor;else{const[,A]=mn.edges(r),P=e.api.pointRef(A);e.tf.delete({at:r}),r=P.unref(),n.at==null&&e.tf.select(r)}const l=e.api.nodes({at:r,match:i,mode:a,voids:o}),[u]=Array.from(l),f=e.api.previous({at:r,match:i,mode:a,voids:o});if(!u||!f)return;const[h,m]=u,[g,b]=f;if(m.length===0||b.length===0)return;const y=Je.next(b),E=Je.common(m,b),C=Je.isSibling(m,b),x=e.api.levels({at:m}),S=new Set(Array.from(x,([A])=>A).slice(E.length).slice(0,-1)),O=e.api.above({at:m,mode:"highest",match:A=>S.has(A)&&AB(e,A)}),_=O&&e.api.pathRef(O[1]);let w,T;if(Fn.isText(h)&&Fn.isText(g)){const{text:A,...P}=h;T=g.text.length,w=P}else if(Rt.isElement(h)&&Rt.isElement(g)){const{children:A,...P}=h;T=g.children.length,w=P}else throw new TypeError(`Cannot merge the node at path [${m}] with the previous sibling because it is not the same kind: ${JSON.stringify(h)} ${JSON.stringify(g)}`);e.api.shouldMergeNodes(f,u,{reverse:n.reverse})&&(C||e.tf.moveNodes({at:m,to:y,voids:o}),_&&e.tf.removeNodes({at:_.current,event:{type:"mergeNodes"},voids:o}),_&&_.unref(),e.tf.apply({path:y,position:T,properties:w,type:"merge_node"}))})},hG=(e,{children:t,fromIndex:n=0,...r})=>{const i=bi(e,r);let s=!1;if(t){if(!i.at)return s;const a=e.api.node(i.at);if(!a)return s;const[o,l]=a;if(!e.api.isBlock(o))return s;for(let u=o.children.length-1;u>=n;u--){const f=[...l,u],h=ht.get(e,f);(!i.match||h&&i.match(h,f))&&(kw(e,{...i,at:f}),s=!0)}return s}return kw(e,i)},pG=(e,t)=>{HO(e,t)},mG=(e,{children:t,previousEmptyBlock:n,...r}={})=>{const i=bi(e,r);e.tf.withoutNormalizing(()=>{if(n){const s=e.api.block({at:i.at});if(!s)return;const a=e.api.previous({at:s[1],sibling:!0});if(!a)return;const[o,l]=a;e.api.isEmpty(o)&&e.tf.removeNodes({at:l});return}if(t&&i.at){for(const[,s]of ht.children(e,i.at,{reverse:!0}))e.tf.removeNodes({...i,at:s});return}return XO(e,bi(e,i))})},gG=(e,t,{marks:n,...r}={})=>{if(n){let i=kn(e,r.at)??e.selection;if(!i||(Je.isPath(i)&&(i=e.api.range(i)),!mn.isRange(i)))return;const s=(l,u)=>{if(!Fn.isText(l))return!1;const f=e.api.parent(u);if(!f)return!1;const[h]=f;return!e.api.isVoid(h)||e.api.markableVoid(h)},a=mn.isExpanded(i);let o=!1;if(!a){const l=e.api.node(i);if(!l)return;const[u,f]=l;if(u&&s(u,f)){const h=e.api.parent(f);if(!h)return;const[m]=h;o=m&&e.api.markableVoid(m)}}if(a||o)return Dw(e,t,bi(e,{...r,at:i,match:s,split:!0,voids:!0}))}return Dw(e,t,bi(e,r))},TB=(e,t)=>{const n=[];for(const{at:r,props:i}of t){if(r.length===0)throw new Error("Cannot set properties on the root node.");const s=ht.get(e,r);if(!s||!ht.isDescendant(s))throw new Error(`Cannot build batched set_node operations because path [${r.join(",")}] does not exist.`);const a={},o={};let l=!1;for(const u in i){if(!Object.hasOwn(i,u)||u==="children"||u==="text")continue;const f=i[u],h=s[u];f!==h&&(l=!0,Object.hasOwn(s,u)&&(a[u]=h),f!=null&&(o[u]=f))}l&&n.push({type:"set_node",path:r,properties:a,newProperties:o})}return n},NB=(e,t)=>{if(t.length===0)return;const n=new Set;for(const r of t){if(r.path.length===0)throw new Error("Cannot set properties on the root node.");const i=r.path.join(",");if(n.has(i))throw new Error(`setNodesBatch does not support duplicate update paths. Duplicate path: [${r.path.join(",")}]`);n.add(i)}e.tf.withoutNormalizing(()=>{for(const r of t)e.apply(r)})},vG=(e,t)=>{NB(e,TB(e,t))},yG=(e,t,n)=>{WO(e,t,n)},xG=(e,t)=>{KO(e,t)},bG=(e,t)=>QO(e,bi(e,t)),wG=(e,t,n)=>ZO(e,t,bi(e,n)),EG=(e,t)=>{eB(e,bi(e,t))},CG=(e,t,{children:n,...r}={})=>{const i=bi(e,r);if(i.at&&(i.at=e.api.unhangRange(i.at,i)),n){const s=e.api.path(i.at);if(!s)return;const a=ht.get(e,s);if(!a?.children)return;e.tf.withoutNormalizing(()=>{const o=Je.firstChild(s);Sw(e,t,{...i,at:o}),a.children.length>1&&e.tf.moveNodes({at:s,children:!0,fromIndex:1,to:Je.child(o,1)})});return}Sw(e,t,i)},kG=(e,t,{remove:n}={})=>{e.selection&&e.tf.withoutNormalizing(()=>{e.tf.removeMarks([...ho(n),...Object.keys(t)]),Object.entries(t).forEach(([r,i])=>{e.tf.addMark(r,i)})})},DG=(e,{block:t,nodes:n,...r}={})=>{const i=kn(e,r.at)??e.selection;if(!n&&!t)return;const s=n??(i?e.api.blocks({at:i}):[]);if(s.length===0)return;const a=s.at(-1),o=Je.next(a[1]),l=s.map(([u])=>u);e.tf.insertNodes(l,{at:o,...r})},SG=(e,t,{at:n,shouldChange:r=!0,...i}={})=>{const s=n??e.selection;if(!s)return;const a=(u,f)=>{if(!Fn.isText(u))return!1;const[h]=e.api.parent(f);return!e.api.isVoid(h)||e.api.markableVoid(h)},o=mn.isExpanded(s);let l=!1;if(!o){const[u,f]=e.api.node(s);if(u&&a(u,f)){const[h]=e.api.parent(f);l=h&&e.api.markableVoid(h)}}if(t&&(o||l)){const u=ho(t);e.tf.unsetNodes(u,{at:s,match:a,split:!0,voids:!0,...i})}else if(!n){const u={...e.api.marks()};t?(ho(t).forEach(f=>{delete u[f]}),e.marks=u):e.marks={},r&&e.api.onChange()}},_G=(e,t,{at:n,children:r,removeNodes:i,...s})=>{e.tf.withoutNormalizing(()=>{if(r){if(!n)return;n=kn(e,n);const a=e.api.path(n);if(!a)return;e.tf.removeNodes({...i,at:a,children:!0}),e.tf.insertNodes(t,{...s,at:a.concat([0])})}else e.tf.removeNodes({...i,at:n}),e.tf.insertNodes(t,{...s,at:n})})},AG=(e,t={})=>{e.tf.replaceNodes(e.api.create.value(),{at:[],children:!0,...t}),t.children||(e.operations=[],e.marks=null,e.history?.undos&&(e.history.undos=[],e.history.redos=[]))},TG=(e,t,{defaultType:n,someOptions:r,wrap:i,...s}={})=>{const a=s.at??e.selection;if(!a)return;const o=e.api.some({at:a,...r,match:{type:t}});if(i){o?e.tf.unwrapNodes({at:a,match:{type:t}}):e.tf.wrapNodes({children:[],type:t},{at:a});return}const l=n??e.api.create.block().type??"p";o&&t===l||e.tf.setNodes({type:o?l:t},{at:a,...s})},NG=(e,t,{remove:n}={})=>{e.selection&&e.tf.withoutNormalizing(()=>{if(e.api.hasMark(t)){e.tf.removeMark(t);return}e.tf.removeMarks([...ho(n),t]),e.tf.addMark(t,!0)})},cx=new WeakMap,jl=new WeakMap,Eh=new WeakMap,Ko={isMerging(e){return jl.get(e)},isSaving(e){return cx.get(e)},isSplittingOnce(e){return Eh.get(e)},setSplittingOnce(e,t){Eh.set(e,t)},withMerging(e,t){const n=e.api.isMerging();jl.set(e,!0);try{t()}finally{jl.set(e,n)}},withNewBatch(e,t){const n=e.api.isMerging(),r=e.api.isSplittingOnce();jl.set(e,!0),Eh.set(e,!0);try{t()}finally{jl.set(e,n),r||Eh.delete(e)}},withoutMerging(e,t){const n=e.api.isMerging();jl.set(e,!1);try{t()}finally{jl.set(e,n)}},withoutSaving(e,t){const n=e.api.isSaving();cx.set(e,!1);try{t()}finally{cx.set(e,n)}}},ql=(e,t)=>()=>(console.warn(`[OVERRIDE_MISSING] The method editor.${e}() has not been implemented or overridden. This may cause unexpected behavior. Please ensure that all required editor methods are properly defined.`),t),OG=({children:e,selection:t}={})=>{const n=Yd();e&&(n.children=e),t&&(n.selection=t),Object.assign(n,{apply:De(WN,n),isElementReadOnly:n.isElementReadOnly,isInline:n.isInline,isSelectable:n.isSelectable,isVoid:n.isVoid,markableVoid:n.markableVoid,onChange:n.onChange}),Object.assign(n,{addMark:De($W,n),deleteBackward:De(WW,n),deleteForward:De(KW,n),deleteFragment:De(GW,n),getDirtyPaths:De(KN,n),getFragment:De(dS,n),insertBreak:De(wK,n),insertFragment:De(oG,n),insertNode:De(EK,n),insertSoftBreak:De(uG,n),insertText:De(cG,n),normalizeNode:De(PK,n),removeMark:De(LK,n),shouldNormalize:De(JN,n)}),Object.assign(n,{above:De(qW,n),after:De(XW,n),before:De(QW,n),collapse:De(rG,n),delete:De(sG,n),deselect:De(aG,n),deselectDOM:De(lS,n),edges:De(oK,n),elementReadOnly:De(DK,n),end:De(YW,n),first:De(uK,n),fragment:De(dS,n),getMarks:De(dK,n),hasBlocks:De(yK,n),hasInlines:De(xK,n),hasPath:De(cO,n),hasRange:De(uS,n),hasTexts:De(bK,n),insertNodes:De(lG,n),isBlock:De(tK,n),isEdge:De(CK,n),isEmpty:De(SK,n),isEnd:De(_K,n),isNormalizing:De(kK,n),isStart:De(AK,n),last:De(NK,n),leaf:De(JW,n),levels:De(fK,n),liftNodes:De(fG,n),mergeNodes:De(dG,n),move:De(pG,n),moveNodes:De(hG,n),next:De(OK,n),node:De(sK,n),nodes:De(nK,n),normalize:De(BK,n),parent:De(RK,n),path:De(aK,n),pathRef:De(VW,n),pathRefs:De(hK,n),point:De(pK,n),pointRef:De(UW,n),pointRefs:De(mK,n),positions:De(gK,n),previous:De(IK,n),range:De(MK,n),rangeRef:De(HW,n),rangeRefs:De(vK,n),removeNodes:De(mG,n),select:De(iK,n),setNodes:De(gG,n),setNodesBatch:De(vG,n),setNormalizing:De(MO,n),setPoint:De(yG,n),setSelection:De(xG,n),shouldMergeNodes:De(zK,n),splitNodes:De(bG,n),start:De(ZW,n),string:De(lK,n),unhangRange:De(jK,n),unsetNodes:De(wG,n),unwrapNodes:De(EG,n),void:De(eK,n),withoutNormalizing:De(rK,n),wrapNodes:De(CG,n)}),Object.assign(n,{history:{redos:[],undos:[]},meta:{isNormalizing:!1},redo:ql("redo"),undo:ql("undo"),writeHistory:ql("writeHistory")}),Object.assign(n,{insertData:ql("insertData"),insertFragmentData:ql("insertFragmentData",!1),insertTextData:ql("insertTextData",!1),setFragmentData:ql("setFragmentData")});const r={block:De($K,n),blocks:De(VK,n),create:{block:s=>({children:[{text:""}],type:"p",...s}),value:()=>[r.create.block()]},descendant:De(UK,n),edgeBlocks:De(qK,n),findDocumentOrShadowRoot:De(xW,n),findEventRange:De(bW,n),findKey:De(wW,n),findPath:De(EW,n),getWindow:De(kW,n),hasDOMNode:De(DW,n),hasEditableTarget:De(SW,n),hasMark:De(WK,n),hasRange:De(uS,n),hasSelectableTarget:De(_W,n),hasTarget:De(AW,n),isAt:De(YK,n),isComposing:De(TW,n),isEditorEnd:De(JK,n),isFocused:De(NW,n),isMerging:De(Ko.isMerging,n),isReadOnly:De(OW,n),isSaving:De(Ko.isSaving,n),isSelected:De(KK,n),isSplittingOnce:De(Ko.isSplittingOnce,n),isTargetInsideNonReadonlyVoid:De(BW,n),isText:De(XK,n),mark:De(HK,n),nodesRange:De(QK,n),prop:ZK,scrollIntoView:De(tG,n),some:De(nG,n),toDOMNode:De(PW,n),toDOMPoint:De(RW,n),toDOMRange:De(FW,n),toSlateNode:De(IW,n),toSlatePoint:De(MW,n),toSlateRange:De(LW,n),isCollapsed:()=>mn.isCollapsed(n.selection),isExpanded:()=>mn.isExpanded(n.selection),shouldNormalizeNode:()=>!0},i={addMarks:De(kG,n),blur:De(yW,n),deselectDOM:De(lS,n),duplicateNodes:De(DG,n),focus:De(CW,n),removeMarks:De(SG,n),replaceNodes:De(_G,n),reset:De(AG,n),setSplittingOnce:De(Ko.setSplittingOnce,n),toggleBlock:De(TG,n),toggleMark:De(NG,n),withMerging:De(Ko.withMerging,n),withNewBatch:De(Ko.withNewBatch,n),withoutMerging:De(Ko.withoutMerging,n),withoutSaving:De(Ko.withoutSaving,n),escape:()=>!1,moveLine:()=>!1,selectAll:()=>!1,tab:()=>!1};return n.api=r,n.tf=i,n.transforms=i,bE(n),n},fx=(e,t)=>e.length===t.length+1&&Je.isParent(t,e),gc=(e,t)=>Je.transform(e,t),hS=(e,t)=>(t.type==="remove_node"||t.type==="merge_node")&&Je.equals(t.path,e)?e:t.type==="move_node"&&Je.equals(t.path,e)?Je.transform(e,{node:{text:""},path:t.newPath,type:"insert_node"}):gc(e,t),rp=({offset:e,path:t},n,r)=>{if(n.type==="set_selection"||n.type==="set_node")return{offset:e,path:t};if((n.type==="insert_node"||n.type==="remove_node"||n.type==="split_node"||n.type==="merge_node")&&fx(n.path,t)){const s=n.path.at(-1);if(n.type==="insert_node"||n.type==="split_node"){const o=n.type==="split_node"?s+1:s;(o{const n=e.offset+e.text.length;if(t.type!=="set_selection"&&Je.equals(t.path,e.path)){if(t.type==="insert_text"&&t.offset>e.offset&&t.offset=s)&&(a+=e.text[l-e.offset]);if(!a)return[];const o=e.offset-Math.max(0,Math.min(e.offset,s)-i);return[{...e,offset:o,text:a}]}if(t.type==="split_node"&&t.position>e.offset&&t.position{switch(e.type){case"insert_node":{if(t.type==="insert_node"&&Je.equals(t.path,e.path)&&n==="before")return[e];const r=hS(e.path,t);return r?[{...e,path:r}]:[]}case"insert_text":{const r=rp({offset:e.offset,path:e.path},t,n);return r?[{...e,offset:r.offset,path:r.path}]:[]}case"merge_node":{const r=gc(e.path,t),i=Je.previous(e.path);if(!r||!i)return null;const s=rp({offset:e.position,path:i},t,"after"),a=Je.previous(r);return!s||!a||!Je.equals(s.path,a)?null:[{...e,path:r,position:s.offset}]}case"move_node":{const r=gc(e.path,t);if(!r)return[];const i=hS(e.newPath,t);return i?[{...e,newPath:i,path:r}]:null}case"remove_node":case"set_node":{const r=gc(e.path,t);return r?[{...e,path:r}]:[]}case"remove_text":return BG(e,t);case"set_selection":return[e];case"split_node":{if(!gc(e.path,t))return[];const r=rp({offset:e.position,path:e.path},t,"before");return r?[{...e,path:r.path,position:r.offset}]:null}}},RG=(e,t)=>{const n=e,r=t;return n.text===r.text&&n.offset===r.offset&&n.position===r.position&&(n.path===r.path||Je.equals(n.path,r.path))&&(n.newPath===r.newPath||Je.equals(n.newPath,r.newPath))},pS=(e,t,n)=>{const r=PG(e,t,n);return r?.length===1&&RG(e,r[0])?[e]:r},FG=e=>e==="after"?"before":"after",vc=(e,t,n)=>{if(e.length===0||t.length===0)return[e,t];if(e.length>1){const s=vc([e[0]],t,n);if(!s)return null;const a=vc(e.slice(1),s[1],n);return a?[s[0].concat(a[0]),a[1]]:null}if(t.length>1){const s=vc(e,[t[0]],n);if(!s)return null;const a=vc(s[0],t.slice(1),n);return a?[a[0],s[1].concat(a[1])]:null}const r=pS(e[0],t[0],n),i=pS(t[0],e[0],FG(n));return r&&i?[r,i]:null},Aw=(e,t)=>{let n=e??null;for(const r of t){if(!n)return null;n=mn.transform(n,r,{affinity:"inward"})}return n},OB=(e,t)=>e.length===t.length&&e.every((n,r)=>n===t[r]),IG=(e,t)=>{let n=[t];for(let r=e.length-1;r>=0&&n.length>0;r--){const i=e[r],s=vc(i.operations,n,"after");if(!s||s[0].length===0){e.splice(0,r+1);return}i.selectionBefore=Aw(i.selectionBefore,n),OB(s[0],i.operations)||(i.operations=s[0]),n=s[1],i.selectionAfter!==void 0&&(i.selectionAfter=Aw(i.selectionAfter,n))}},MG=(e,t)=>{let n=[t];for(let r=e.length-1;r>=0&&n.length>0;r--){const i=e[r],s=i.operations.map(Zl.inverse).reverse(),a=vc(s,n,"after");if(!a){n=i.operations.concat(n),e.splice(r,1);continue}if(n=a[1],a[0].length===0){e.splice(r,1);continue}OB(a[0],s)||(i.operations=a[0].map(Zl.inverse).reverse()),i.selectionBefore=Aw(i.selectionBefore,n)}},LG=(e,t)=>{IG(e.redos,t),MG(e.undos,t)},zG=e=>e?{anchor:{...e.anchor},focus:{...e.focus}}:null,jG=e=>{const t=e,{apply:n,setChildren:r}=t,i=t,{normalize:s}=i;let a=!0,o=!1;return t.history={redos:[],undos:[]},t.redo=()=>{const{history:l}=t,{redos:u}=l;if(u.length>0){const f=u.at(-1);o=!0;try{t.tf.withoutSaving(()=>{t.tf.withoutNormalizing(()=>{for(const m of f.operations)t.apply(m)})})}finally{o=!1}const h=f.selectionAfter??f.selectionBefore;h&&t.tf.select(h),l.redos.pop(),t.writeHistory("undos",f)}},t.undo=()=>{const{history:l}=t,{undos:u}=l;if(u.length>0){const f=u.at(-1),h=zG(t.selection);o=!0;try{t.tf.withoutSaving(()=>{t.tf.withoutNormalizing(()=>{const m=f.operations.map(Zl.inverse).reverse();for(const g of m)t.apply(g);f.selectionBefore&&t.tf.select(f.selectionBefore)})})}finally{o=!1}t.writeHistory("redos",{...f,selectionAfter:h}),l.undos.pop()}},t.apply=l=>{const{history:u,operations:f}=t,{undos:h}=u,m=h.at(-1),g=m?.operations.at(-1);let b=t.api.isSaving(),y=t.api.isMerging();if(b==null&&(b=$G(l)),b){if(y==null&&(m==null?y=!1:g&&f.includes(g)?y=!0:y=qG(l,g)),!y&&!a&&m&&g&&f.includes(g)&&(y=!0),t.api.isSplittingOnce()&&(y=!1,t.tf.setSplittingOnce(void 0)),m&&y)m.operations.push(l);else{const E={operations:[l],selectionBefore:t.selection};t.writeHistory("undos",E)}for(;h.length>100;)h.shift();u.redos=[]}else!o&&l.type!=="set_selection"&&LG(u,l);a=!1,n(l)},i.normalize=l=>{s(l),t.api.isNormalizing()&&(a=!0)},t.setNodesBatch=l=>{NB(t,TB(t,l))},r&&(t.setChildren=l=>{const u=t.history.undos.at(-1),f=u?.operations.length;t.tf.withNewBatch(()=>r(l));const h=t.history.undos.at(-1);(h!==u||h?.operations.length!==f)&&t.tf.setSplittingOnce(!0)}),t.writeHistory=(l,u)=>{t.history[l].push(u)},bE(t),t},qG=(e,t)=>!!(t&&e.type==="insert_text"&&t.type==="insert_text"&&e.offset===t.offset+t.text.length&&Je.equals(e.path,t.path)||t&&e.type==="remove_text"&&t.type==="remove_text"&&e.offset+e.text.length===t.offset&&Je.equals(e.path,t.path)),$G=(e,t)=>e.type!=="set_selection";let VG="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kd=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=VG[n[e]&63];return t};var dx,mS;function BB(){if(mS)return dx;mS=1;var e=bu(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return dx=t,dx}var hx,gS;function wE(){if(gS)return hx;gS=1;var e=BB();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return hx=t,hx}var px,vS;function PB(){if(vS)return px;vS=1;var e=wE(),t=$c();function n(r,i,s){(s!==void 0&&!t(r[i],s)||s===void 0&&!(i in r))&&e(r,i,s)}return px=n,px}var Zf={exports:{}};Zf.exports;var yS;function RB(){return yS||(yS=1,(function(e,t){var n=ra(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,a=s?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var h=u.length,m=o?o(h):new u.constructor(h);return u.copy(m),m}e.exports=l})(Zf,Zf.exports)),Zf.exports}var mx,xS;function EE(){if(xS)return mx;xS=1;var e=dB();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return mx=t,mx}var gx,bS;function FB(){if(bS)return gx;bS=1;var e=EE();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return gx=t,gx}var vx,wS;function IB(){if(wS)return vx;wS=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return Rx=r,Rx}var Fx,zS;function qB(){if(zS)return Fx;zS=1;var e=XG(),t=QG(),n=t(e);return Fx=n,Fx}var Ix,jS;function DE(){if(jS)return Ix;jS=1;var e=yE(),t=jB(),n=qB();function r(i,s){return n(t(i,s,e),i+"")}return Ix=r,Ix}var Mx,qS;function $B(){if(qS)return Mx;qS=1;var e=$c(),t=Vc(),n=Cm(),r=Ji();function i(s,a,o){if(!r(o))return!1;var l=typeof a;return(l=="number"?t(o)&&n(a,o.length):l=="string"&&a in o)?e(o[a],s):!1}return Mx=i,Mx}var Lx,$S;function VB(){if($S)return Lx;$S=1;var e=DE(),t=$B();function n(r){return e(function(i,s){var a=-1,o=s.length,l=o>1?s[o-1]:void 0,u=o>2?s[2]:void 0;for(l=r.length>3&&typeof l=="function"?(o--,l):void 0,u&&t(s[0],s[1],u)&&(l=o<3?void 0:l,o=1),i=Object(i);++a!!e.dispatchFromDevtools&&typeof e.dispatch=="function",Nc=new Map,Ch=e=>{const t=Nc.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},tY=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Nc.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Nc.set(n.name,i),{type:"tracked",store:e,...i}},nY=(e,t,n)=>{if(t===void 0)return;const r=Nc.get(e);r?.stores[t]===n&&(delete r.stores[t],Object.keys(r.stores).length===0&&Nc.delete(e))},rY=/^at (?:new |async )?(.+?) \(/,iY=/^([^@]+)@/;function sY(e){var t,n,r;if(!e)return;const i=e.split(` +`),s=i.findIndex(o=>o.includes("api.setState"));if(s<0)return;const a=((t=i[s+1])==null?void 0:t.trim())||"";return((n=rY.exec(a))==null?void 0:n[1])||((r=iY.exec(a))==null?void 0:r[1])}const aY=(e,t={})=>(n,r,i)=>{const{enabled:s,anonymousActionType:a,store:o,...l}=t;let u;try{u=(s??(US?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);const{connection:f,...h}=tY(o,u,l);let m=!0;i.setState=((E,C,x)=>{const S=n(E,C);if(!m)return S;const O=x===void 0?{type:a||sY(new Error().stack)||"anonymous"}:typeof x=="string"?{type:x}:x;return o===void 0?(f?.send(O,r()),S):(f?.send({...O,type:`${o}/${O.type}`},{...Ch(l.name),[o]:i.getState()}),S)});let g;i.devtools={cleanup:()=>{g?.(),g=void 0,nY(l.name,o,i),(o===void 0||!Nc.has(l.name))&&f&&typeof f.unsubscribe=="function"&&f.unsubscribe()}};const b=(...E)=>{const C=m;m=!1,n(...E),m=C},y=e(i.setState,r,i);if(h.type==="untracked"?f?.init(y):(h.stores[h.store]=i,f?.init(Object.fromEntries(Object.entries(h.stores).map(([E,C])=>[E,E===h.store?y:C.getState()])))),HS(i)){let E=!1;const C=i.dispatch;i.dispatch=(...x)=>{(US?"production":void 0)!=="production"&&x[0].type==="__setState"&&!E&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),E=!0),C(...x)}}return g=f.subscribe(E=>{var C;const x=typeof l.serialize=="object"?l.serialize.reviver:void 0;switch(E.type){case"ACTION":if(typeof E.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return jx(E.payload,x,S=>{if(S.type==="__setState"){if(o===void 0){b(S.state);return}Object.keys(S.state).length!==1&&console.error(` + [zustand devtools middleware] Unsupported __setState action format. + When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), + and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } + `);const O=S.state[o];if(O==null)return;JSON.stringify(i.getState())!==JSON.stringify(O)&&b(O);return}HS(i)&&i.dispatch(S)});case"DISPATCH":switch(E.payload.type){case"RESET":return b(y),o===void 0?f?.init(i.getState()):f?.init(Ch(l.name));case"COMMIT":if(o===void 0){f?.init(i.getState());return}return f?.init(Ch(l.name));case"ROLLBACK":return jx(E.state,x,S=>{if(o===void 0){b(S),f?.init(i.getState());return}b(S[o]),f?.init(Ch(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return jx(E.state,x,S=>{if(o===void 0){b(S);return}JSON.stringify(i.getState())!==JSON.stringify(S[o])&&b(S[o])});case"IMPORT_STATE":{const{nextLiftedState:S}=E.payload,O=(C=S.computedStates.slice(-1)[0])==null?void 0:C.state;if(!O)return;b(o===void 0?O:O[o]),f?.send(null,S);return}case"PAUSE_RECORDING":return m=!m}return}}),y},oY=aY,jx=(e,t,n)=>{let r;try{r=JSON.parse(e,t)}catch(i){console.error("[zustand devtools middleware] Could not parse the received json",i)}r!==void 0&&n(r)},lY=e=>(t,n,r)=>{const i=r.subscribe;return r.subscribe=((a,o,l)=>{let u=a;if(o){const f=l?.equalityFn||Object.is;let h=a(r.getState());u=m=>{const g=a(m);if(!f(h,g)){const b=h;o(h=g,b)}},l?.fireImmediately&&o(h,h)}return i(u)}),e(t,n,r)},uY=lY;function cY(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var s;const a=l=>l===null?null:JSON.parse(l,void 0),o=(s=n.getItem(i))!=null?s:null;return o instanceof Promise?o.then(a):a(o)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const Tw=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Tw(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Tw(r)(n)}}}},fY=(e,t)=>(n,r,i)=>{let s={storage:cY(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,C)=>({...C,...E}),...t},a=!1,o=0;const l=new Set,u=new Set;let f=s.storage;if(!f)return e((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...E)},r,i);const h=()=>{const E=s.partialize({...r()});return f.setItem(s.name,{state:E,version:s.version})},m=i.setState;i.setState=(...E)=>(m(...E),h());const g=e((...E)=>(n(...E),h()),r,i);i.getInitialState=()=>g;let b;const y=()=>{var E,C;if(!f)return;const x=++o;a=!1,l.forEach(O=>{var _;return O((_=r())!=null?_:g)});const S=((C=s.onRehydrateStorage)==null?void 0:C.call(s,(E=r())!=null?E:g))||void 0;return Tw(f.getItem.bind(f))(s.name).then(O=>{if(O)if(typeof O.version=="number"&&O.version!==s.version){if(s.migrate){const _=s.migrate(O.state,O.version);return _ instanceof Promise?_.then(w=>[!0,w]):[!0,_]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,O.state];return[!1,void 0]}).then(O=>{var _;if(x!==o)return;const[w,T]=O;if(b=s.merge(T,(_=r())!=null?_:g),n(b,!0),w)return h()}).then(()=>{x===o&&(S?.(r(),void 0),b=r(),a=!0,u.forEach(O=>O(b)))}).catch(O=>{x===o&&S?.(void 0,O)})};return i.persist={setOptions:E=>{s={...s,...E},E.storage&&(f=E.storage)},clearStorage:()=>{++o,f?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:E=>(l.add(E),()=>{l.delete(E)}),onFinishHydration:E=>(u.add(E),()=>{u.delete(E)})},s.skipHydration||y(),b||g},dY=fY;var UB=Symbol.for("immer-nothing"),WS=Symbol.for("immer-draftable"),os=Symbol.for("immer-state");function Qs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Dd=Object.getPrototypeOf;function Oc(e){return!!e&&!!e[os]}function hu(e){return e?HB(e)||Array.isArray(e)||!!e[WS]||!!e.constructor?.[WS]||Xd(e)||Am(e):!1}var hY=Object.prototype.constructor.toString(),KS=new WeakMap;function HB(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=KS.get(n);return r===void 0&&(r=Function.toString.call(n),KS.set(n,r)),r===hY}function _p(e,t,n=!0){_m(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function _m(e){const t=e[os];return t?t.type_:Array.isArray(e)?1:Xd(e)?2:Am(e)?3:0}function Nw(e,t){return _m(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function WB(e,t,n){const r=_m(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function pY(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xd(e){return e instanceof Map}function Am(e){return e instanceof Set}function Xl(e){return e.copy_||e.base_}function Ow(e,t){if(Xd(e))return new Map(e);if(Am(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=HB(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[os];let i=Reflect.ownKeys(r);for(let s=0;s1&&Object.defineProperties(e,{set:kh,add:kh,clear:kh,delete:kh}),Object.freeze(e),t&&Object.values(e).forEach(n=>SE(n,!0))),e}function mY(){Qs(2)}var kh={value:mY};function Tm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var gY={};function pu(e){const t=gY[e];return t||Qs(0,e),t}var Sd;function KB(){return Sd}function vY(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function GS(e,t){t&&(pu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bw(e){Pw(e),e.drafts_.forEach(yY),e.drafts_=null}function Pw(e){e===Sd&&(Sd=e.parent_)}function YS(e){return Sd=vY(Sd,e)}function yY(e){const t=e[os];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function JS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[os].modified_&&(Bw(t),Qs(4)),hu(e)&&(e=Ap(t,e),t.parent_||Tp(t,e)),t.patches_&&pu("Patches").generateReplacementPatches_(n[os].base_,e,t.patches_,t.inversePatches_)):e=Ap(t,n,[]),Bw(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==UB?e:void 0}function Ap(e,t,n){if(Tm(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[os];if(!i)return _p(t,(s,a)=>XS(e,i,t,s,a,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return Tp(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const s=i.copy_;let a=s,o=!1;i.type_===3&&(a=new Set(s),s.clear(),o=!0),_p(a,(l,u)=>XS(e,i,s,l,u,n,o),r),Tp(e,s,!1),n&&e.patches_&&pu("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function XS(e,t,n,r,i,s,a){if(i==null||typeof i!="object"&&!a)return;const o=Tm(i);if(!(o&&!a)){if(Oc(i)){const l=s&&t&&t.type_!==3&&!Nw(t.assigned_,r)?s.concat(r):void 0,u=Ap(e,i,l);if(WB(n,r,u),Oc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(hu(i)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&o)return;Ap(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Xd(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Tp(e,i)}}}function Tp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&SE(t,n)}function xY(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:KB(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=_E;n&&(i=[r],s=_d);const{revoke:a,proxy:o}=Proxy.revocable(i,s);return r.draft_=o,r.revoke_=a,o}var _E={get(e,t){if(t===os)return e;const n=Xl(e);if(!Nw(n,t))return bY(e,n,t);const r=n[t];return e.finalized_||!hu(r)?r:r===qx(e.base_,t)?($x(e),e.copy_[t]=Fw(r,e)):r},has(e,t){return t in Xl(e)},ownKeys(e){return Reflect.ownKeys(Xl(e))},set(e,t,n){const r=GB(Xl(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=qx(Xl(e),t),s=i?.[os];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(pY(n,i)&&(n!==void 0||Nw(e.base_,t)))return!0;$x(e),Rw(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return qx(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$x(e),Rw(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qs(11)},getPrototypeOf(e){return Dd(e.base_)},setPrototypeOf(){Qs(12)}},_d={};_p(_E,(e,t)=>{_d[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});_d.deleteProperty=function(e,t){return _d.set.call(this,e,t,void 0)};_d.set=function(e,t,n){return _E.set.call(this,e[0],t,n,e[0])};function qx(e,t){const n=e[os];return(n?Xl(n):e)[t]}function bY(e,t,n){const r=GB(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function GB(e,t){if(!(t in e))return;let n=Dd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Dd(n)}}function Rw(e){e.modified_||(e.modified_=!0,e.parent_&&Rw(e.parent_))}function $x(e){e.copy_||(e.copy_=Ow(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wY=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(l=s,...u){return a.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&Qs(6),r!==void 0&&typeof r!="function"&&Qs(7);let i;if(hu(t)){const s=YS(this),a=Fw(t,void 0);let o=!0;try{i=n(a),o=!1}finally{o?Bw(s):Pw(s)}return GS(s,r),JS(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===UB&&(i=void 0),this.autoFreeze_&&SE(i,!0),r){const s=[],a=[];pu("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else Qs(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...o)=>this.produceWithPatches(a,l=>t(l,...o));let r,i;return[this.produce(t,n,(a,o)=>{r=a,i=o}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){hu(e)||Qs(8),Oc(e)&&(e=EY(e));const t=YS(this),n=Fw(e,void 0);return n[os].isManual_=!0,Pw(t),n}finishDraft(e,t){const n=e&&e[os];(!n||!n.isManual_)&&Qs(9);const{scope_:r}=n;return GS(r,t),JS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=pu("Patches").applyPatches_;return Oc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Fw(e,t){const n=Xd(e)?pu("MapSet").proxyMap_(e,t):Am(e)?pu("MapSet").proxySet_(e,t):xY(e,t);return(t?t.scope_:KB()).drafts_.push(n),n}function EY(e){return Oc(e)||Qs(10,e),YB(e)}function YB(e){if(!hu(e)||Tm(e))return e;const t=e[os];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ow(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ow(e,!0);return _p(n,(i,s)=>{WB(n,i,YB(s))},r),t&&(t.finalized_=!1),n}var CY=new wY,kY=CY.produce;const Tr={Remove:"remove",Replace:"replace",Add:"add"},JB=Symbol.for("__MUTATIVE_PROXY_DRAFT__"),DY=Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"),ip=Symbol.iterator,is={mutable:"mutable",immutable:"immutable"},AE={};function od(e,t){return e instanceof Map?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function QS(e,t){if(t in e){let n=Reflect.getPrototypeOf(e);for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Reflect.getPrototypeOf(n)}}}function TE(e){return Object.getPrototypeOf(e)===Set.prototype}function NE(e){return Object.getPrototypeOf(e)===Map.prototype}function rs(e){var t;return(t=e.copy)!==null&&t!==void 0?t:e.original}function mu(e){return!!wn(e)}function wn(e){return typeof e!="object"?null:e?.[JB]}function OE(e){var t;const n=wn(e);return n?(t=n.copy)!==null&&t!==void 0?t:n.original:e}function ta(e,t){if(!e||typeof e!="object")return!1;let n;return Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e)||e instanceof Map||e instanceof Set||!!t?.mark&&((n=t.mark(e,is))===is.immutable||typeof n=="function")}function XB(e,t=[]){if(Object.hasOwnProperty.call(e,"key")){const n=e.parent.copy,r=wn(xo(n,e.key));if(r!==null&&r?.original!==e.original)return null;const i=e.parent.type===3,s=i?Array.from(e.parent.setMap.keys()).indexOf(e.key):e.key;if(!(i&&n.size>s||od(n,s)))return null;t.push(s)}if(e.parent)return XB(e.parent,t);t.reverse();try{SY(e.copy,t)}catch{return null}return t}function wu(e){return Array.isArray(e)?1:e instanceof Map?2:e instanceof Set?3:0}function xo(e,t){return wu(e)===2?e.get(t):e[t]}function Qd(e,t,n){wu(e)===2?e.set(t,n):e[t]=n}function Vx(e,t){const n=wn(e);return(n?rs(n):e)[t]}function po(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Iw(e){if(e)for(;e.finalities.revoke.length>0;)e.finalities.revoke.pop()()}function eu(e,t){return t?e:[""].concat(e).map(n=>{const r=`${n}`;return r.indexOf("/")===-1&&r.indexOf("~")===-1?r:r.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")}function SY(e,t){for(let n=0;n{let r=Reflect.getOwnPropertyDescriptor(e,n);if(r.enumerable&&r.configurable&&r.writable){t[n]=e[n];return}r.writable||(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(r={configurable:!0,writable:!0,enumerable:r.enumerable,value:e[n]}),Reflect.defineProperty(t,n,r)}),t}const AY=Object.prototype.propertyIsEnumerable;function QB(e,t){let n;if(Array.isArray(e))return Array.prototype.concat.call(e);if(e instanceof Set){if(!TE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(e.values())}return Set.prototype.difference?Set.prototype.difference.call(e,new Set):new Set(e.values())}else if(e instanceof Map){if(!NE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(e)}return new Map(e)}else if(t?.mark&&(n=t.mark(e,is),n!==void 0)&&n!==is.mutable){if(n===is.immutable)return _Y(e);if(typeof n=="function"){if(t.enablePatches||t.enableAutoFreeze)throw new Error("You can't use mark and patches or auto freeze together.");return n()}throw new Error(`Unsupported mark result: ${n}`)}else if(typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i]}),Object.getOwnPropertySymbols(e).forEach(i=>{AY.call(e,i)&&(r[i]=e[i])}),r}else throw new Error("Please check mark() to ensure that it is a stable marker draftable function.")}function Ni(e){e.copy||(e.copy=QB(e.original,e.options))}function ed(e){if(!ta(e))return OE(e);if(Array.isArray(e))return e.map(ed);if(e instanceof Map){const n=Array.from(e.entries()).map(([r,i])=>[r,ed(i)]);if(!NE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(n)}return new Map(n)}if(e instanceof Set){const n=Array.from(e).map(ed);if(!TE(e)){const r=Object.getPrototypeOf(e).constructor;return new r(n)}return new Set(n)}const t=Object.create(Object.getPrototypeOf(e));for(const n in e)t[n]=ed(e[n]);return t}function sp(e){return mu(e)?ed(e):e}function Oa(e){var t;e.assignedMap=(t=e.assignedMap)!==null&&t!==void 0?t:new Map,e.operated||(e.operated=!0,e.parent&&Oa(e.parent))}function ZS(){throw new Error("Cannot modify frozen object")}function lc(e,t,n,r,i){{n=n??new WeakMap,r=r??[],i=i??[];const a=n.has(e)?n.get(e):e;if(r.length>0){const o=r.indexOf(a);if(a&&typeof a=="object"&&o!==-1)throw r[0]===a?new Error("Forbids circular reference"):new Error(`Forbids circular reference: ~/${i.slice(0,o).map((l,u)=>{if(typeof l=="symbol")return`[${l.toString()}]`;const f=r[u];return typeof l=="object"&&(f instanceof Map||f instanceof Set)?Array.from(f.keys()).indexOf(l):l}).join("/")}`);r.push(a),i.push(t)}else r.push(a)}if(Object.isFrozen(e)||mu(e)){r.pop(),i.pop();return}switch(wu(e)){case 2:for(const[o,l]of e)lc(o,o,n,r,i),lc(l,o,n,r,i);e.set=e.clear=e.delete=ZS;break;case 3:for(const o of e)lc(o,o,n,r,i);e.add=e.clear=e.delete=ZS;break;case 1:Object.freeze(e);let a=0;for(const o of e)lc(o,a,n,r,i),a+=1;break;default:Object.freeze(e),Object.keys(e).forEach(o=>{const l=e[o];lc(l,o,n,r,i)})}r.pop(),i.pop()}function BE(e,t){const n=wu(e);if(n===0)Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)});else if(n===1){let r=0;for(const i of e)t(r,i,e),r+=1}else e.forEach((r,i)=>t(i,r,e))}function ZB(e,t,n){if(mu(e)||!ta(e,n)||t.has(e)||Object.isFrozen(e))return;const r=e instanceof Set,i=r?new Map:void 0;if(t.add(e),BE(e,(s,a)=>{var o;if(mu(a)){const l=wn(a);Ni(l);const u=!((o=l.assignedMap)===null||o===void 0)&&o.size||l.operated?l.copy:l.original;Qd(r?i:e,s,u)}else ZB(a,t,n)}),i){const s=e,a=Array.from(s);s.clear(),a.forEach(o=>{s.add(i.has(o)?i.get(o):o)})}}function TY(e,t){const n=e.type===3?e.setMap:e.copy;e.finalities.revoke.length>1&&e.assignedMap.get(t)&&n&&ZB(xo(n,t),e.finalities.handledSet,e.options)}function Mw(e){e.type===3&&e.copy&&(e.copy.clear(),e.setMap.forEach(t=>{e.copy.add(OE(t))}))}function Lw(e,t,n,r){if(e.operated&&e.assignedMap&&e.assignedMap.size>0&&!e.finalized){if(n&&r){const s=XB(e);s&&t(e,s,n,r)}e.finalized=!0}}function PE(e,t,n,r){const i=wn(n);i&&(i.callbacks||(i.callbacks=[]),i.callbacks.push((s,a)=>{var o;const l=e.type===3?e.setMap:e.copy;if(po(xo(l,t),n)){let u=i.original;i.copy&&(u=i.copy),Mw(e),Lw(e,r,s,a),e.options.enableAutoFreeze&&(e.options.updatedValues=(o=e.options.updatedValues)!==null&&o!==void 0?o:new WeakMap,e.options.updatedValues.set(u,i.original)),Qd(l,t,u)}}),e.options.enableAutoFreeze&&i.finalities!==e.finalities&&(e.options.enableAutoFreeze=!1)),ta(n,e.options)&&e.finalities.draft.push(()=>{const s=e.type===3?e.setMap:e.copy;po(xo(s,t),n)&&TY(e,t)})}function NY(e,t,n,r,i){let{original:s,assignedMap:a,options:o}=e,l=e.copy;l.length{const u=xo(e,l),f=sp(xo(t,l)),h=o?od(e,l)?Tr.Replace:Tr.Add:Tr.Remove;if(po(u,f)&&h===Tr.Replace)return;const m=r.concat(l),g=eu(m,a);i.push(h===Tr.Remove?{op:h,path:g}:{op:h,path:g,value:f}),s.push(h===Tr.Add?{op:Tr.Remove,path:g}:h===Tr.Remove?{op:Tr.Add,path:g,value:u}:{op:Tr.Replace,path:g,value:u})})}function BY({original:e,copy:t},n,r,i,s){let a=0;e.forEach(o=>{if(!t.has(o)){const l=n.concat([a]),u=eu(l,s);r.push({op:Tr.Remove,path:u,value:o}),i.unshift({op:Tr.Add,path:u,value:o})}a+=1}),a=0,t.forEach(o=>{if(!e.has(o)){const l=n.concat([a]),u=eu(l,s);r.push({op:Tr.Add,path:u,value:o}),i.unshift({op:Tr.Remove,path:u,value:o})}a+=1})}function Ad(e,t,n,r){const{pathAsArray:i=!0}=e.options.enablePatches;switch(e.type){case 0:case 2:return OY(e,t,n,r,i);case 1:return NY(e,t,n,r,i);case 3:return BY(e,t,n,r,i)}}const Np=(e,t,n=!1)=>{if(typeof e=="object"&&e!==null&&(!ta(e,t)||n))throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.")},zw={get size(){return rs(wn(this)).size},has(e){return rs(wn(this)).has(e)},set(e,t){const n=wn(this),r=rs(n);return(!r.has(e)||!po(r.get(e),t))&&(Ni(n),Oa(n),n.assignedMap.set(e,!0),n.copy.set(e,t),PE(n,e,t,Ad)),this},delete(e){if(!this.has(e))return!1;const t=wn(this);return Ni(t),Oa(t),t.original.has(e)?t.assignedMap.set(e,!1):t.assignedMap.delete(e),t.copy.delete(e),!0},clear(){const e=wn(this);if(this.size){Ni(e),Oa(e),e.assignedMap=new Map;for(const[t]of e.original)e.assignedMap.set(t,!1);e.copy.clear()}},forEach(e,t){const n=wn(this);rs(n).forEach((r,i)=>{e.call(t,this.get(i),i,this)})},get(e){var t,n;const r=wn(this),i=rs(r).get(e),s=((n=(t=r.options).mark)===null||n===void 0?void 0:n.call(t,i,is))===is.mutable;if(r.options.strict&&Np(i,r.options,s),s||r.finalized||!ta(i,r.options)||i!==r.original.get(e))return i;const a=AE.createDraft({original:i,parentDraft:r,key:e,finalities:r.finalities,options:r.options});return Ni(r),r.copy.set(e,a),a},keys(){return rs(wn(this)).keys()},values(){const e=this.keys();return{[ip]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}},entries(){const e=this.keys();return{[ip]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const n=this.get(t.value);return{done:!1,value:[t.value,n]}}}},[ip](){return this.entries()}},PY=Reflect.ownKeys(zw),e8=(e,t,{isValuesIterator:n})=>()=>{var r,i;const s=t.next();if(s.done)return s;const a=s.value;let o=e.setMap.get(a);const l=wn(o),u=((i=(r=e.options).mark)===null||i===void 0?void 0:i.call(r,o,is))===is.mutable;if(e.options.strict&&Np(a,e.options,u),!u&&!l&&ta(a,e.options)&&!e.finalized&&e.original.has(a)){const f=AE.createDraft({original:a,parentDraft:e,key:a,finalities:e.finalities,options:e.options});e.setMap.set(a,f),o=f}else l&&(o=l.proxy);return{done:!1,value:n?o:[o,o]}},Op={get size(){return wn(this).setMap.size},has(e){const t=wn(this);if(t.setMap.has(e))return!0;Ni(t);const n=wn(e);return!!(n&&t.setMap.has(n.original))},add(e){const t=wn(this);return this.has(e)||(Ni(t),Oa(t),t.assignedMap.set(e,!0),t.setMap.set(e,e),PE(t,e,e,Ad)),this},delete(e){if(!this.has(e))return!1;const t=wn(this);Ni(t),Oa(t);const n=wn(e);return n&&t.setMap.has(n.original)?(t.assignedMap.set(n.original,!1),t.setMap.delete(n.original)):(!n&&t.setMap.has(e)?t.assignedMap.set(e,!1):t.assignedMap.delete(e),t.setMap.delete(e))},clear(){if(!this.size)return;const e=wn(this);Ni(e),Oa(e);for(const t of e.original)e.assignedMap.set(t,!1);e.setMap.clear()},values(){const e=wn(this);Ni(e);const t=e.setMap.keys();return{[Symbol.iterator]:()=>this.values(),next:e8(e,t,{isValuesIterator:!0})}},entries(){const e=wn(this);Ni(e);const t=e.setMap.keys();return{[Symbol.iterator]:()=>this.entries(),next:e8(e,t,{isValuesIterator:!1})}},keys(){return this.values()},[ip](){return this.values()},forEach(e,t){const n=this.values();let r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}};Set.prototype.difference&&Object.assign(Op,{intersection(e){return Set.prototype.intersection.call(new Set(this.values()),e)},union(e){return Set.prototype.union.call(new Set(this.values()),e)},difference(e){return Set.prototype.difference.call(new Set(this.values()),e)},symmetricDifference(e){return Set.prototype.symmetricDifference.call(new Set(this.values()),e)},isSubsetOf(e){return Set.prototype.isSubsetOf.call(new Set(this.values()),e)},isSupersetOf(e){return Set.prototype.isSupersetOf.call(new Set(this.values()),e)},isDisjointFrom(e){return Set.prototype.isDisjointFrom.call(new Set(this.values()),e)}});const RY=Reflect.ownKeys(Op),eP=new WeakSet,tP={get(e,t,n){var r,i;const s=(r=e.copy)===null||r===void 0?void 0:r[t];if(s&&eP.has(s))return s;if(t===JB)return e;let a;if(e.options.mark){const u=t==="size"&&(e.original instanceof Map||e.original instanceof Set)?Reflect.get(e.original,t):Reflect.get(e.original,t,n);if(a=e.options.mark(u,is),a===is.mutable)return e.options.strict&&Np(u,e.options,!0),u}const o=rs(e);if(o instanceof Map&&PY.includes(t)){if(t==="size")return Object.getOwnPropertyDescriptor(zw,"size").get.call(e.proxy);const u=zw[t];if(u)return u.bind(e.proxy)}if(o instanceof Set&&RY.includes(t)){if(t==="size")return Object.getOwnPropertyDescriptor(Op,"size").get.call(e.proxy);const u=Op[t];if(u)return u.bind(e.proxy)}if(!od(o,t)){const u=QS(o,t);return u?"value"in u?u.value:(i=u.get)===null||i===void 0?void 0:i.call(e.proxy):void 0}const l=o[t];if(e.options.strict&&Np(l,e.options),e.finalized||!ta(l,e.options))return l;if(l===Vx(e.original,t)){if(Ni(e),e.copy[t]=RE({original:e.original[t],parentDraft:e,key:e.type===1?Number(t):t,finalities:e.finalities,options:e.options}),typeof a=="function"){const u=wn(e.copy[t]);return Ni(u),Oa(u),u.copy}return e.copy[t]}return l},set(e,t,n){var r;if(e.type===3||e.type===2)throw new Error("Map/Set draft does not support any property assignment.");let i;if(e.type===1&&t!=="length"&&!(Number.isInteger(i=Number(t))&&i>=0&&(t===0||i===0||String(i)===String(t))))throw new Error("Only supports setting array indices and the 'length' property.");const s=QS(rs(e),t);if(s?.set)return s.set.call(e.proxy,n),!0;const a=Vx(rs(e),t),o=wn(a);return o&&po(o.original,n)?(e.copy[t]=n,e.assignedMap=(r=e.assignedMap)!==null&&r!==void 0?r:new Map,e.assignedMap.set(t,!1),!0):(po(n,a)&&(n!==void 0||od(e.original,t))||(Ni(e),Oa(e),od(e.original,t)&&po(n,e.original[t])?e.assignedMap.delete(t):e.assignedMap.set(t,!0),e.copy[t]=n,PE(e,t,n,Ad)),!0)},has(e,t){return t in rs(e)},ownKeys(e){return Reflect.ownKeys(rs(e))},getOwnPropertyDescriptor(e,t){const n=rs(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},getPrototypeOf(e){return Reflect.getPrototypeOf(e.original)},setPrototypeOf(){throw new Error("Cannot call 'setPrototypeOf()' on drafts")},defineProperty(){throw new Error("Cannot call 'defineProperty()' on drafts")},deleteProperty(e,t){var n;return e.type===1?tP.set.call(this,e,t,void 0,e.proxy):(Vx(e.original,t)!==void 0||t in e.original?(Ni(e),Oa(e),e.assignedMap.set(t,!1)):(e.assignedMap=(n=e.assignedMap)!==null&&n!==void 0?n:new Map,e.assignedMap.delete(t)),e.copy&&delete e.copy[t],!0)}};function RE(e){const{original:t,parentDraft:n,key:r,finalities:i,options:s}=e,a=wu(t),o={type:a,finalized:!1,parent:n,original:t,copy:null,proxy:null,finalities:i,options:s,setMap:a===3?new Map(t.entries()):void 0};(r||"key"in e)&&(o.key=r);const{proxy:l,revoke:u}=Proxy.revocable(a===1?Object.assign([],o):o,tP);if(i.revoke.push(u),eP.add(l),o.proxy=l,n){const f=n;f.finalities.draft.push((h,m)=>{var g,b;const y=wn(l);let E=f.type===3?f.setMap:f.copy;const C=xo(E,r),x=wn(C);if(x){let S=x.original;x.operated&&(S=OE(C)),Mw(x),Lw(x,Ad,h,m),f.options.enableAutoFreeze&&(f.options.updatedValues=(g=f.options.updatedValues)!==null&&g!==void 0?g:new WeakMap,f.options.updatedValues.set(S,x.original)),Qd(E,r,S)}(b=y.callbacks)===null||b===void 0||b.forEach(S=>{S(h,m)})})}else{const f=wn(l);f.finalities.draft.push((h,m)=>{Mw(f),Lw(f,Ad,h,m)})}return l}AE.createDraft=RE;function FY(e,t,n,r,i){var s;const a=wn(e),o=(s=a?.original)!==null&&s!==void 0?s:e,l=!!t.length;if(a?.operated)for(;a.finalities.draft.length>0;)a.finalities.draft.pop()(n,r);const u=l?t[0]:a?a.operated?a.copy:a.original:e;return a&&Iw(a),i&&lc(u,u,a?.options.updatedValues),[u,n&&l?[{op:Tr.Replace,path:[],value:t[0]}]:n,r&&l?[{op:Tr.Replace,path:[],value:o}]:r]}function IY(e,t){var n;const r={draft:[],revoke:[],handledSet:new WeakSet};let i,s;t.enablePatches&&(i=[],s=[]);const o=((n=t.mark)===null||n===void 0?void 0:n.call(t,e,is))===is.mutable||!ta(e,t)?e:RE({original:e,parentDraft:null,finalities:r,options:t});return[o,(l=[])=>{const[u,f,h]=FY(o,l,i,s,t.enableAutoFreeze);return t.enablePatches?[u,f,h]:u}]}function jw(e){const{rootDraft:t,value:n,useRawReturn:r=!1,isRoot:i=!0}=e;BE(n,(s,a,o)=>{const l=wn(a);if(l&&t&&l.finalities===t.finalities){e.isContainDraft=!0;const u=l.original;if(o instanceof Set){const f=Array.from(o);o.clear(),f.forEach(h=>o.add(s===h?u:h))}else Qd(o,s,u)}else typeof a=="object"&&a!==null&&(e.value=a,e.isRoot=!1,jw(e))}),i&&(e.isContainDraft||console.warn("The return value does not contain any draft, please use 'rawReturn()' to wrap the return value to improve performance."),r&&console.warn("The return value contains drafts, please don't use 'rawReturn()' to wrap the return value."))}function nP(e){var t;const n=wn(e);if(!ta(e,n?.options))return e;const r=wu(e);if(n&&!n.operated)return n.original;let i;function s(){i=r===2?NE(e)?new Map(e):new(Object.getPrototypeOf(e)).constructor(e):r===3?Array.from(n.setMap.values()):QB(e,n?.options)}if(n){n.finalized=!0;try{s()}finally{n.finalized=!1}}else i=e;if(BE(i,(a,o)=>{if(n&&po(xo(n.original,a),o))return;const l=nP(o);l!==o&&(i===e&&s(),Qd(i,a,l))}),r===3){const a=(t=n?.original)!==null&&t!==void 0?t:i;return TE(a)?new Set(i):new(Object.getPrototypeOf(a)).constructor(i)}return i}function t8(e){if(!mu(e))throw new Error(`current() is only used for Draft, parameter: ${e}`);return nP(e)}const MY=e=>function t(n,r,i){var s,a,o;if(typeof n=="function"&&typeof r!="function")return function(_,...w){return t(_,T=>n.call(this,T,...w),r)};const l=n,u=r;let f=i;if(typeof r!="function"&&(f=r),f!==void 0&&Object.prototype.toString.call(f)!=="[object Object]")throw new Error(`Invalid options: ${f}, 'options' should be an object.`);f=Object.assign(Object.assign({},e),f);const h=mu(l)?t8(l):l,m=Array.isArray(f.mark)?((_,w)=>{for(const T of f.mark){if(typeof T!="function")throw new Error(`Invalid mark: ${T}, 'mark' should be a function.`);const A=T(_,w);if(A)return A}}):f.mark,g=(s=f.enablePatches)!==null&&s!==void 0?s:!1,b=(a=f.strict)!==null&&a!==void 0?a:!1,E={enableAutoFreeze:(o=f.enableAutoFreeze)!==null&&o!==void 0?o:!1,mark:m,strict:b,enablePatches:g};if(!ta(h,E)&&typeof h=="object"&&h!==null)throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");const[C,x]=IY(h,E);if(typeof r!="function"){if(!ta(h,E))throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");return[C,x]}let S;try{S=u(C)}catch(_){throw Iw(wn(C)),_}const O=_=>{const w=wn(C);if(!mu(_)){if(_!==void 0&&!po(_,C)&&w?.operated)throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");const A=_?.[DY];if(A){const P=A[0];return E.strict&&typeof _=="object"&&_!==null&&jw({rootDraft:w,value:_,useRawReturn:!0}),x([P])}if(_!==void 0)return typeof _=="object"&&_!==null&&jw({rootDraft:w,value:_}),x([_])}if(_===C||_===void 0)return x([]);const T=wn(_);if(E===T.options){if(T.operated)throw new Error("Cannot return a modified child draft.");return x([t8(_)])}return x([_])};return S instanceof Promise?S.then(O,_=>{throw Iw(wn(C)),_}):O(S)},LY=MY();Object.prototype.constructor.toString();var zY=e=>(t,n,r)=>(r.setState=(i,s,...a)=>{const o=typeof i=="function"?kY(i):i;return t(o,typeof s=="boolean"?s:!0,...a)},e(r.setState,n,r)),jY=zY,qY=(e,t)=>(n,r,i)=>(i.setState=(s,a,...o)=>{const l=typeof s=="function"?LY(s,t&&{...t,enablePatches:!1}):s;return n(l,typeof a=="boolean"?a:!0,...o)},e(i.setState,r,i)),$Y=qY,Dh=(e,t=!1)=>{const n=typeof e=="boolean",{enabled:r,...i}=n?{}:e||{};return{enabled:(n?e:r)??t,...i}},rP=(e,t)=>{const n=e(t),r={...t.actions,...n};return{...t,actions:r,set:(i,...s)=>{if(i in r){const a=r[i];return a?.(...s)}return t.set(i,s[0])}}},VY=e=>e,iP=(e,t,n)=>{const r=t.get.bind(t),i=t.subscribe.bind(t),s=e(t),a={...t.selectors,...s},o={...t,selectors:a,get:(l,...u)=>{if(l in a){const f=a[l];return f?.(...u)}return r(l)},subscribe:(l,...u)=>{if(l in a){const f=[...u];let h,m=VY;typeof f.at(-1)!="function"&&(h=f.pop());const b=f.pop();typeof f.at(-1)=="function"&&(m=f.pop());const E=f;return i("state",()=>m(a[l](...E)),b,h)}return i(l,...u)}};if(n?.selectWithStore){const l=n.selectWithStore;o.useValue=(u,...f)=>{if(u in a){const h=a[u],m=f.at(-1),g=typeof m=="function"?m:void 0,b=g?f.slice(0,-1):f;return l(()=>h?.(...b),g)}return t.useValue?.(u,...f)}}return o},sP=(e,t)=>{const{name:n,devtools:r,immer:i,mutative:s,persist:a,isMutativeState:o}=t,l=[],u=Dh(r);u.enabled&&l.push(y=>oY(y,{...u,name:u?.name??n}));const f=Dh(a);f.enabled&&l.push(y=>dY(y,{...f,name:f.name??n}));const h=Dh(i);h.enabled&&l.push(y=>jY(y));const m=Dh(s);m.enabled&&l.push(y=>$Y(y,m));const g=l.reverse().reduce((y,E)=>E(y),typeof e=="function"?e:()=>e),b=o||h.enabled||m.enabled;return{stateCreator:uY(g),isMutative:b,name:n}},aP=(e,{name:t,isMutative:n})=>({get:a=>a==="state"?e.getState():e.getState()[a],set:(a,o)=>{if(a==="state")return e.setState(o);const l=a,u=e.getState()[l];if(typeof o=="function"&&u!==void 0&&u!==null&&typeof u!="function"&&(o=o(u)),u===o)return;const h=a.replace(/^\S/,g=>g.toUpperCase()),m=t?`@@${t}/set${h}`:void 0;e.setState(n?g=>{g[l]=o}:{[l]:o},void 0,m)},subscribe:(a,o,l,u)=>{if(a==="state")return l?e.subscribe(o,l,u):e.subscribe(o);let f,h,m;return l?(f=g=>o(g[a]),h=l,m=u):(f=g=>g[a],h=o,m=u),e.subscribe(f,h,m)},store:e,name:t,actions:{},selectors:{}}),Bp=(e,t)=>{const n=t?.extendSelectors??iP,r=t?.extendActions??rP;return{...e,actions:e.actions||{},extendSelectors:i=>Bp(n(i,e),t),extendActions:i=>Bp(r(i,e),t)}},UY=(e,t)=>{const n=sP(e,t),r=Y4(n.stateCreator),i=aP(r,{name:n.name,isMutative:n.isMutative});return Bp(i)},Ux,n8;function oP(){if(n8)return Ux;n8=1;var e=kE(),t=VB(),n=t(function(r,i,s,a){e(r,i,s,a)});return Ux=n,Ux}var HY=oP();const WY=Rr(HY);var Hx,r8;function KY(){if(r8)return Hx;r8=1;function e(t,n,r,i){var s=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++s]);++s0&&s(f)?i>1?n(f,i-1,s,a,o):e(o,f):a||(o[o.length]=f)}return o}return sb=n,sb}var ab,y8;function lJ(){if(y8)return ab;y8=1;var e=oJ();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return ab=t,ab}var ob,x8;function cP(){if(x8)return ob;x8=1;var e=lJ(),t=jB(),n=qB();function r(i){return n(t(i,void 0,e),i+"")}return ob=r,ob}var lb,b8;function uJ(){if(b8)return lb;b8=1;var e=sJ(),t=cP(),n=t(function(r,i){return r==null?{}:e(r,i)});return lb=n,lb}var cJ=uJ();const fJ=Rr(cJ);var ub,w8;function dJ(){if(w8)return ub;w8=1;var e=mE();function t(n,r){return e(n,r)}return ub=t,ub}var hJ=dJ();const pJ=Rr(hJ);var cb,E8;function mJ(){if(E8)return cb;E8=1;function e(t){return t===void 0}return cb=e,cb}var gJ=mJ();const fb=Rr(gJ);var db,C8;function vJ(){if(C8)return db;C8=1;var e="Expected a function";function t(n){if(typeof n!="function")throw new TypeError(e);return function(){var r=arguments;switch(r.length){case 0:return!n.call(this);case 1:return!n.call(this,r[0]);case 2:return!n.call(this,r[0],r[1]);case 3:return!n.call(this,r[0],r[1],r[2])}return!n.apply(this,r)}}return db=t,db}var hb,k8;function fP(){if(k8)return hb;k8=1;var e=lE(),t=rE(),n=uE(),r=pB(),i=Object.getOwnPropertySymbols,s=i?function(a){for(var o=[];a;)e(o,n(a)),a=t(a);return o}:r;return hb=s,hb}var pb,D8;function FE(){if(D8)return pb;D8=1;var e=hB(),t=fP(),n=Gc();function r(i){return e(i,n,t)}return pb=r,pb}var mb,S8;function yJ(){if(S8)return mb;S8=1;var e=mm(),t=xE(),n=uP(),r=FE();function i(s,a){if(s==null)return{};var o=e(r(s),function(l){return[l]});return a=t(a),n(s,o,function(l,u){return a(l,u[0])})}return mb=i,mb}var gb,_8;function xJ(){if(_8)return gb;_8=1;var e=xE(),t=vJ(),n=yJ();function r(i,s){return n(i,t(e(s)))}return gb=r,gb}var bJ=xJ();const vb=Rr(bJ);function wJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function EJ(e,t){if(e==null)return{};var n,r,i=wJ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;rnew Zd(Bc(Bc({},r),{},{offset:n}))):[]}function _J(e,t){const n=e.text.length;let r=$w.get(e);r||(r=new Set,$w.set(e,r)),r.add([n,t])}function AJ(e){const t=$w.get(e);return t?Array.from(t.values(),([n,r])=>new e0(Bc(Bc({},r),{},{offset:n}))):[]}function TJ(e,t){const n=e.text.length;let r=Vw.get(e);r||(r=new Set,Vw.set(e,r)),r.add([n,t])}function NJ(e){const t=Vw.get(e);return t?Array.from(t.values(),([n,r])=>new IE(Bc(Bc({},r),{},{offset:n}))):[]}function T8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Uw(e){for(var t=1;ts instanceof Zd),i=n.find(s=>s instanceof e0);if(!r||r.offset==null||r.path==null)throw new Error("The hyperscript tag must have an tag as a child with `path` and `offset` attributes defined.");if(!i||i.offset==null||i.path==null)throw new Error("The hyperscript tag must have a tag as a child with `path` and `offset` attributes defined.");return Uw({anchor:{offset:r.offset,path:r.path},focus:{offset:i.offset,path:i.path}},t)}function MJ(e,t,n){const r=Om(n);if(r.length>1)throw new Error("The hyperscript tag must only contain a single node's worth of children.");let[i]=r;if(i==null&&(i={text:""}),!Sn.isText(i))throw new Error(` + The hyperscript tag can only contain text content as children.`);return ap.delete(i),Object.assign(i,t),i}const LJ=e=>(t,n,r)=>{const i=[];let s;for(const u of r)Ce.isRange(u)?s=u:i.push(u);const a=Om(i),o={},l=e();Object.assign(l,n),l.children=a;for(const[u,f]of ie.texts(l)){for(const{ref:h=o,offset:m}of SJ(u))m!=null&&(h.anchor={path:f,offset:m});for(const{ref:h=o,offset:m}of AJ(u))m!=null&&(h.focus={path:f,offset:m});for(const{ref:h,offset:m}of NJ(u))h&&(h.offset=m,h.path=f)}if(o.anchor&&!o.focus)throw new Error("Slate hyperscript ranges must have both `` and `` defined if one is defined, but you only defined ``. For collapsed selections, use `` instead.");if(!o.anchor&&o.focus)throw new Error("Slate hyperscript ranges must have both `` and `` defined if one is defined, but you only defined ``. For collapsed selections, use `` instead.");return s!=null?l.selection=s:Ce.isRange(o)&&(l.selection=o),l},zJ=["__self","__source"];function N8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ec(e){for(var t=1;t{const{elements:t={}}=e,n=VJ(t),r=Ec(Ec(Ec({},jJ),n),e.creators);return $J(r)},$J=e=>(n,r,...i)=>{if(Zr(r)){const{__self:o,__source:l}=r;r=EJ(r,zJ)}if(typeof n=="function")return n(Ec({children:i},r));const s=e[n];if(!s)throw new Error(`No hyperscript creator found for tag: <${n}>`);return r==null&&(r={}),Zr(r)||(i=[r].concat(i),r={}),i=i.filter(o=>!!o).flat(),s(n,r,i)},VJ=e=>{const t={};for(const n in e){const r=e[n];if(typeof r!="object")throw new Error(`Properties specified for a hyperscript shorthand should be an object, but for the custom element <${n}> tag you passed: ${r}`);t[n]=(i,s,a)=>dP("element",Ec(Ec({},r),s),a)}return t},ME=qJ();var yb,O8;function UJ(){if(O8)return yb;O8=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r{if(Array.isArray(r))return r;if(i==="options")return{...n,...r}})}function Jt(e={}){let t,n;ec(e)?(t={key:""},n=s=>e(s)):t=e;const r=t.key??"",i=Ba({key:r,__apiExtensions:[],__configuration:null,__extensions:n?[n]:[],__selectorExtensions:[],api:{},dependencies:[],editor:{},handlers:{},inject:{},node:{type:r},options:{},override:{},parser:{},parsers:{},plugins:[],priority:100,render:{},rules:{},shortcuts:{},inputRules:[],transforms:{}},e);return i.node.isLeaf&&!Mr(i.node.isDecoration)&&(i.node.isDecoration=!0),i.configure=s=>{const a={...i};return a.__configuration=o=>ec(s)?s(o):s,Jt(a)},i.configurePlugin=(s,a)=>{const o={...i},l=u=>{let f=!1;const h=u.map(m=>{if(m.key===s.key)return f=!0,Jt({...m,__configuration:g=>ec(a)?a(g):a});if(m.plugins&&m.plugins.length>0){const g=l(m.plugins);if(g.found)return f=!0,{...m,plugins:g.plugins}}return m});return{found:f,plugins:h}};return o.plugins=l(o.plugins).plugins,Jt(o)},i.extendEditorApi=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!1}],Jt(a)},i.extendSelectors=s=>{const a={...i};return a.__selectorExtensions=[...a.__selectorExtensions,s],Jt(a)},i.extendApi=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!0}],Jt(a)},i.extendEditorTransforms=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!1,isTransform:!0}],Jt(a)},i.extendTransforms=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isPluginSpecific:!0,isTransform:!0}],Jt(a)},i.overrideEditor=s=>{const a={...i};return a.__apiExtensions=[...a.__apiExtensions,{extension:s,isOverride:!0,isPluginSpecific:!1,isTransform:!0}],Jt(a)},i.extend=s=>{let a={...i};return ec(s)?a.__extensions=[...a.__extensions,s]:a=Ba(a,s),Jt(a)},i.clone=()=>Ba(i),i.extendPlugin=(s,a)=>{const o={...i},l=f=>{let h=!1;const m=f.map(g=>{if(g.key===s.key)return h=!0,Jt({...g,__extensions:[...g.__extensions,b=>ec(a)?a(b):a]});if(g.plugins&&g.plugins.length>0){const b=l(g.plugins);if(b.found)return h=!0,{...g,plugins:b.plugins}}return g});return{found:h,plugins:m}},u=l(o.plugins);return o.plugins=u.plugins,u.found||o.plugins.push(Jt({key:s.key,__extensions:[f=>ec(a)?a(f):a]})),Jt(o)},i.withComponent=s=>i.extend({node:{component:s},render:{node:s}}),i}function Yn(e={}){return Jt(e)}function vn(e,t){const n=e.getPlugin(t);return{api:e.api,editor:e,plugin:n,setOption:((r,i)=>e.setOption(n,r,i)),setOptions:(r=>e.setOptions(n,r)),tf:e.transforms,type:n.node.type,getOption:(r,...i)=>e.getOption(n,r,...i),getOptions:()=>e.getOptions(n)}}const K8=e=>{if(e===void 0)return[];if(Array.isArray(e))return[...e];throw new Error("inputRules config must be an array of explicit rule instances.")},pP=(e,t)=>{let n=Ba({},t);if(n.__resolved=!0,n.__configuration){const{inputRules:s,...a}=n.__configuration(vn(e,n));if(s!==void 0){const o=K8(s);n.__configuredInputRules=[...K8(n.__configuredInputRules),...o]}n=Ba(n,a),n.__configuration=void 0}if(n.__extensions&&n.__extensions.length>0){for(const s of n.__extensions)n=Ba(n,s(vn(e,n)));n.__extensions=[]}const r=n.inject?.targetPluginToInject,i=n.inject?.targetPlugins;return r&&i&&i.length>0&&(n.inject=n.inject||{},n.inject.plugins=Hi({},n.inject.plugins,Object.fromEntries(i.map(s=>[s,r({...vn(e,n),targetPlugin:s})])))),n.node?.component&&(n.render.node=n.node.component),n.render?.node&&(n.node.component=n.render.node),aX(e,n),n},aX=(e,t)=>{t.__extensions||e.api.debug.error(`Invalid plugin '${t.key}', you should use createSlatePlugin.`,"USE_CREATE_PLUGIN"),t.node.isElement&&t.node.isLeaf&&e.api.debug.error(`Plugin ${t.key} cannot be both an element and a leaf.`,"PLUGIN_NODE_TYPE")};function oX(e,t){let n=t;const r=e.plugins[t.key];return r||(n.node||(n=Jt(n)),n.__resolved?n:pP(e,n))}function Bt(e,t){const n=e.getPlugin({key:t});return n.node.type??n.key??""}const lX=(e,t)=>t.map(n=>e.getType(n)),ci=(e,t)=>e.meta.pluginCache.node.types[t],uX=(e,t)=>t.map(n=>ci(e,n)??n).filter(Boolean),Oi=(e,t)=>{const n=ci(e,t);return n?e.getPlugin({key:n}):null};const cX=/\S+/,fX=(e,t)=>{const n=e.api.range("before",t);if(!n)return!0;const r=e.api.string(n);return r?!cX.exec(r):!0},dX=(e,{end:t="",start:n})=>{const{selection:r}=e;if(!r)return;let i=r.anchor;if(t&&(i=e.api.before(r,{matchString:t}),!i))return;const s=e.api.before(i,{afterMatch:!0,matchString:n,skipInvalid:!0});if(!s)return;const a=e.api.before(i,{matchString:n,skipInvalid:!0});if(a&&fX(e,a))return{afterStartMatchPoint:s,beforeEndMatchPoint:i,beforeStartMatchPoint:a}},hX=e=>({enabled:e.enabled,priority:e.priority,target:"insertText",trigger:e.trigger,resolve:({editor:t,text:n})=>{if(n!==e.trigger||!t.selection||!t.api.isCollapsed())return;const r=dX(t,{end:e.end,start:e.start});if(!r)return;const i={anchor:r.afterStartMatchPoint,focus:r.beforeEndMatchPoint},s=t.api.string(i);if(!(e.trim!=="allow"&&s.trim()!==s))return{...r,end:e.end}},apply:({editor:t,pluginKey:n},r)=>{const i=e.marks?[...e.marks]:[e.mark??n];return r.beforeEndMatchPoint!==t.selection?.anchor&&t.tf.delete({at:{anchor:r.beforeEndMatchPoint,focus:t.selection.anchor}}),t.tf.select({anchor:r.afterStartMatchPoint,focus:r.beforeEndMatchPoint}),i.forEach(s=>{t.tf.addMark(t.getType(s),!0)}),t.tf.collapse({edge:"end"}),t.tf.removeMarks(i.map(s=>t.getType(s)),{shouldChange:!1}),t.tf.delete({at:{anchor:r.beforeStartMatchPoint,focus:r.afterStartMatchPoint}}),!0}}),pX=(e,t)=>{if(!e.isCollapsed)return;const n=typeof t.match=="function"?t.match(e):t.match;if(!n)return;const r=e.getBlockStartRange(),i=e.getBlockStartText();if(!r||i===void 0)return;const s={range:r,text:i};if(typeof n=="string"){if(i!==n)return;if(t.resolveMatch){const o=t.resolveMatch({match:n,range:r,text:i});return o===void 0?void 0:{...s,...o}}return s}const a=i.match(n);if(a){if(t.resolveMatch){const o=t.resolveMatch({match:a,range:r,text:i});return o===void 0?void 0:{...s,...o}}return s}},mX=e=>({enabled:e.enabled,priority:e.priority,target:"insertText",trigger:e.trigger,resolve:t=>pX(t,e),apply:(t,n)=>{if(e.apply)return e.apply(t,n);const{editor:r,pluginKey:i}=t,s=n;e.removeMatchedText!==!1&&r.tf.delete({at:s.range});const a=r.getType(e.node??i);return e.mode==="wrap"?(r.tf.toggleBlock(a,{wrap:!0}),!0):e.mode==="toggle"?(r.tf.toggleBlock(a),!0):(r.tf.setNodes({type:a},{match:o=>r.api.isBlock(o)}),!0)}}),G8=(e,t)=>{const{editor:n}=e,{selection:r}=n;if(!e.isCollapsed||!r)return;const i=e.getBlockEntry();if(!i)return;const[s,a]=i,o=n.api.end(a);if(t.block&&s.type!==n.getType(t.block)||!o||!n.api.isEnd(r.focus,a))return;const l=e.getBlockStartRange(),u=e.getBlockStartText();if(!(!l||u===void 0||u!==t.fence))return t.resolveMatch?t.resolveMatch({fence:t.fence,path:a,range:l,text:u}):{path:a,range:l,text:u}};function gX(e){if(e.on==="break")return{priority:e.priority,target:"insertBreak",enabled:e.enabled,resolve:n=>G8(n,{block:e.block,fence:e.fence,resolveMatch:e.resolveMatch}),apply:e.apply};const t=e.fence.at(-1);if(!t)throw new Error("createBlockFenceInputRule requires a non-empty fence.");return{priority:e.priority,target:"insertText",enabled:e.enabled,trigger:t,resolve:n=>{if(n.text===t)return G8(n,{block:e.block,fence:e.fence.slice(0,-t.length),resolveMatch:e.resolveMatch})},apply:e.apply}}const vX=()=>({blockFence:e=>gX(e),blockStart:e=>mX(e),insertBreak:e=>e,insertData:e=>e,insertText:e=>e,mark:e=>hX(e)}),yX=(e,t=[],n=UY)=>{e.plugins={},e.meta.pluginList=[],e.meta.inputRules={insertBreak:[],insertData:[],insertText:{all:[],byTrigger:{}},plugins:{}},e.meta.shortcuts={},e.meta.components={},e.meta.pluginCache={decorate:[],handlers:{onChange:[],onNodeChange:[],onTextChange:[]},inject:{nodeProps:[]},node:{isContainer:[],isLeaf:[],isMetadataProp:[],isText:[],leafProps:[],textProps:[],types:{}},transformInitialValue:[],render:{aboveEditable:[],aboveNodes:[],aboveSlate:[],afterContainer:[],afterEditable:[],beforeContainer:[],beforeEditable:[],belowNodes:[],belowRootNodes:[]},rules:{match:[]},useHooks:[]};const r=DX(e,t);return SX(e,r),_X(e),xX(e,n),e.meta.pluginList.forEach(i=>{i.extendEditor&&(e=i.extendEditor(vn(e,i)),bE(e)),bX(e,i),i.node?.isContainer&&e.meta.pluginCache.node.isContainer.push(i.key),i.node?.isMetadataProp&&e.meta.pluginCache.node.isMetadataProp.push(i.key),e.meta.pluginCache.node.types[i.node.type]=i.key,i.inject?.nodeProps&&e.meta.pluginCache.inject.nodeProps.push(i.key),i.render?.node&&(e.meta.components[i.key]=i.render.node),i.node?.isLeaf&&(i.node?.isDecoration===!0||i.render.leaf)&&e.meta.pluginCache.node.isLeaf.push(i.key),i.node.isLeaf&&i.node.isDecoration===!1&&e.meta.pluginCache.node.isText.push(i.key),i.node?.leafProps&&e.meta.pluginCache.node.leafProps.push(i.key),i.node.textProps&&e.meta.pluginCache.node.textProps.push(i.key),i.render.aboveEditable&&e.meta.pluginCache.render.aboveEditable.push(i.key),i.render.aboveSlate&&e.meta.pluginCache.render.aboveSlate.push(i.key),i.render.afterEditable&&e.meta.pluginCache.render.afterEditable.push(i.key),i.render.beforeEditable&&e.meta.pluginCache.render.beforeEditable.push(i.key),i.rules?.match&&e.meta.pluginCache.rules.match.push(i.key),i.render.afterContainer&&e.meta.pluginCache.render.afterContainer.push(i.key),i.render.beforeContainer&&e.meta.pluginCache.render.beforeContainer.push(i.key),i.render.belowRootNodes&&e.meta.pluginCache.render.belowRootNodes.push(i.key),(i.transformInitialValue||i.normalizeInitialValue)&&e.meta.pluginCache.transformInitialValue.push(i.key),i.decorate&&e.meta.pluginCache.decorate.push(i.key),i.render.aboveNodes&&e.meta.pluginCache.render.aboveNodes.push(i.key),i.render.belowNodes&&e.meta.pluginCache.render.belowNodes.push(i.key),i.useHooks&&e.meta.pluginCache.useHooks.push(i.key),i.handlers?.onChange&&e.meta.pluginCache.handlers.onChange.push(i.key),i.handlers?.onNodeChange&&e.meta.pluginCache.handlers.onNodeChange.push(i.key),i.handlers?.onTextChange&&e.meta.pluginCache.handlers.onTextChange.push(i.key)}),wX(e),EX(e),CX(e),e},xX=(e,t)=>{e.meta.pluginList.forEach(n=>{let r=t(n.options,{mutative:!0,name:n.key});n.__selectorExtensions&&n.__selectorExtensions.length>0&&n.__selectorExtensions.forEach(i=>{const s=i(vn(e,n));r=r.extendSelectors(()=>s)}),n.optionsStore=r})},bX=(e,t)=>{Object.entries(t.api).forEach(([n,r])=>{e.api[n]=r}),t.__apiExtensions&&t.__apiExtensions.length>0&&(t.__apiExtensions.forEach(({extension:n,isOverride:r,isPluginSpecific:i,isTransform:s})=>{const a=n(vn(e,t));r?(a.api&&(Hi(e.api,a.api),Hi(t.api,a.api),fS(e,e.api)),a.transforms&&(Hi(e.transforms,a.transforms),Hi(t.transforms,a.transforms),cS(e,a.transforms))):s?i?(e.transforms[t.key]||(e.transforms[t.key]={}),t.transforms[t.key]||(t.transforms[t.key]={}),Hi(e.transforms[t.key],a),Hi(t.transforms[t.key],a)):(Hi(e.transforms,a),Hi(t.transforms,a),cS(e,a)):i?(e.api[t.key]||(e.api[t.key]={}),t.api[t.key]||(t.api[t.key]={}),Hi(e.api[t.key],a),Hi(t.api[t.key],a)):(Hi(e.api,a),Hi(t.api,a),fS(e,e.api))}),t.__apiExtensions=void 0)},wX=e=>{e.meta.shortcuts={},e.meta.pluginList.forEach(t=>{Object.entries(t.shortcuts).forEach(([n,r])=>{const i=`${t.key}.${n}`;if(r===null)delete e.meta.shortcuts[i];else if(r&&typeof r=="object"){const s={...r};if(!s.handler){const a=t.transforms?.[t.key],o=t.api?.[t.key];a?.[n]?s.handler=()=>a[n]():o?.[n]&&(s.handler=()=>o[n]())}s.priority=s.priority??t.priority,e.meta.shortcuts[i]=s}})})},EX=e=>{const t={insertBreak:[],insertData:[],insertText:{all:[],byTrigger:{}},plugins:{}};e.meta.pluginList.forEach((r,i)=>{const s=r.key,a=r.inputRules,o=typeof a=="function"?a({rule:vX()}):a??[],l=r.__configuredInputRules??[],u=[...o,...l];t.plugins[s]={rules:[]},u.forEach((f,h)=>{if(!f)return;const m=Ba({},f),g={...m,id:`${s}.${h}`,pluginIndex:i,pluginKey:s,priority:m.priority??r.priority,ruleIndex:h};if(t.plugins[s].rules.push(g),g.target==="insertText"){const b=Array.isArray(g.trigger)?[...g.trigger]:[g.trigger];t.insertText.all.push(g),b.forEach(y=>{t.insertText.byTrigger[y]||(t.insertText.byTrigger[y]=[]),t.insertText.byTrigger[y].push(g)})}else g.target==="insertBreak"?t.insertBreak.push(g):g.target==="insertData"&&t.insertData.push(g)})});const n=(r,i)=>i.priority!==r.priority?i.priority-r.priority:r.pluginIndex!==i.pluginIndex?r.pluginIndex-i.pluginIndex:r.ruleIndex-i.ruleIndex;t.insertBreak.sort(n),t.insertData.sort(n),t.insertText.all.sort(n),Object.values(t.insertText.byTrigger).forEach(r=>{r.sort(n)}),e.meta.inputRules=t},CX=e=>{const t=!!e.plugins.autoformat,n=e.meta.inputRules.insertBreak.length>0||e.meta.inputRules.insertData.length>0||e.meta.inputRules.insertText.all.length>0;if(t&&n)throw new Error(["AutoformatPlugin cannot be used with plugin-owned input rules.","Remove AutoformatPlugin from your editor plugins.","Enable inputRules on the feature plugins you use instead."].join(" "))},kX=(e,t)=>{const n=new Map,r=i=>{const s=pP(e,i);if(s.key){const a=n.get(s.key);a?n.set(s.key,Ba(a,s)):n.set(s.key,s)}s.plugins&&s.plugins.length>0&&s.plugins.forEach(r)};return t.forEach(r),n},DX=(e,t)=>{const n=kX(e,t),r=Array.from(n.values()).filter(o=>o.enabled!==!1);r.sort((o,l)=>l.priority-o.priority);const i=[],s=new Set,a=o=>{s.has(o.key)||(s.add(o.key),o.dependencies?.forEach(l=>{const u=n.get(l);u?a(u):e.api.debug.warn(`Plugin "${o.key}" depends on missing plugin "${l}"`,"PLUGIN_DEPENDENCY_MISSING")}),i.push(o))};return r.forEach(a),i},SX=(e,t)=>{e.meta.pluginList=t,e.plugins=Object.fromEntries(t.map(n=>[n.key,n]))},_X=e=>{const t=n=>{let r=[...n];const i={},s={},a={};for(const o of n)o.override.enabled&&Object.assign(i,o.override.enabled),o.override.components&&Object.entries(o.override.components).forEach(([l,u])=>{(!s[l]||o.priority>s[l].priority)&&(s[l]={component:u,priority:o.priority})}),o.override.plugins&&Object.entries(o.override.plugins).forEach(([l,u])=>{a[l]=Ba(a[l],u),u.enabled!==void 0&&(i[l]=u.enabled)});return r=r.map(o=>{let l={...o};a[o.key]&&(l=Ba(l,a[o.key])),s[o.key]&&(!o.render.node&&!o.node.component||s[o.key].priority>o.priority)&&(l.render.node=s[o.key].component,l.node.component=s[o.key].component);const u=i[o.key]??l.enabled;return Mr(u)&&(l.enabled=u),l}),r.filter(o=>o.enabled!==!1).map(o=>({...o,plugins:t(o.plugins||[])}))};e.meta.pluginList=t(e.meta.pluginList),e.plugins=Object.fromEntries(e.meta.pluginList.map(n=>[n.key,n]))},AX=Jt({key:"ast",parser:{format:"application/x-slate-fragment",deserialize:({data:e})=>{const t=decodeURIComponent(window.atob(e));let n;try{n=JSON.parse(t)}catch{}return n}}}),TX=({editor:e})=>jG(e),NX=Jt({key:"history",extendEditor:TX}),t0=Jt({key:"p",node:{isElement:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"P"}],query:({element:e})=>e.style.fontFamily!=="Consolas"}}},rules:{merge:{removeEmpty:!0}}}),OX=e=>{const{editor:t,tf:{insertBreak:n}}=e,r=(s,a,o)=>{const l=t.meta.pluginCache.rules.match;for(const u of l){const f=t.getPlugin({key:u});if(f.rules?.break&&f.rules?.match?.({...e,node:a,path:o,rule:s}))return f}return null},i=(s,a,o)=>s==="reset"?(t.tf.resetBlock({at:a}),!0):s==="exit"?(t.tf.insertExitBreak(),!0):s==="deleteExit"?(t.tf.deleteBackward("character"),t.tf.insertExitBreak(),!0):s==="lineBreak"?(t.tf.insertSoftBreak(),!0):s==="lift"&&o?!!t.tf.liftBlock({at:a,match:{type:o}}):!1;return{transforms:{insertBreak(){if(t.selection){const s=t.api.block();if(s){const[a,o]=s,l=Oi(t,a.type)?.rules.break;if(t.api.isCollapsed()&&t.api.isEmpty(t.selection,{block:!0})){const m=r("break.empty",a,o),g=(m?.rules.break??l)?.empty,b=m?.node.type;if(i(g,o,b))return}if(t.api.isCollapsed()&&!t.api.isEmpty(t.selection,{block:!0})&&t.api.isAt({end:!0})){const m=t.api.range("before",t.selection);if(m&&t.api.string(m)===` +`){const g=r("break.emptyLineEnd",a,o),b=(g?.rules.break??l)?.emptyLineEnd,y=g?.node.type;if(i(b,o,y))return}}const u=r("break.default",a,o),f=(u?.rules.break??l)?.default,h=u?.node.type;if(i(f,o,h))return;if((r("break.splitReset",a,o)?.rules.break?.splitReset??l?.splitReset)&&!t.api.isAt({blocks:!0})){const m=t.api.isAt({start:!0});n(),t.tf.resetBlock({at:m?o:Je.next(o)});return}}}n()}}}},BX=e=>{const{editor:t,tf:{deleteBackward:n,deleteForward:r,deleteFragment:i}}=e,s=()=>{t.api.isAt({start:!0})&&t.tf.removeMarks()},a=(l,u,f)=>{const h=t.meta.pluginCache.rules.match;for(const m of h){const g=t.getPlugin({key:m});if(g.rules?.delete&&g.rules?.match?.({...e,node:u,path:f,rule:l}))return g}return null},o=(l,u,f)=>l==="reset"?(t.tf.resetBlock({at:u}),!0):l==="lift"&&f?!!t.tf.liftBlock({at:u,match:{type:f}}):!1;return{transforms:{deleteBackward(l){if(t.selection&&t.api.isCollapsed()){const u=t.api.block();if(u){const[f,h]=u,m=Oi(t,f.type)?.rules.delete;if(t.api.isAt({start:!0})){const g=a("delete.start",f,h),b=(g?.rules.delete??m)?.start,y=g?.node.type;if(o(b,h,y))return}if(t.api.isEmpty(t.selection,{block:!0})){const g=a("delete.empty",f,h),b=(g?.rules.delete??m)?.empty,y=g?.node.type;if(o(b,h,y))return}}if(yo.equals(t.selection.anchor,t.api.start([]))){t.tf.resetBlock({at:[0]});return}}n(l),s()},deleteForward(l){r(l),s()},deleteFragment(l){if(t.selection&&mn.equals(t.selection,t.api.range([]))){t.tf.reset({children:!0,select:!0});return}i(l),s()}}}},PX=e=>{const{editor:t,tf:{removeNodes:n}}=e,r=(i,s,a)=>{const o=t.meta.pluginCache.rules.match;for(const l of o){const u=t.getPlugin({key:l});if(u.rules.merge&&u.rules?.match?.({...e,node:s,path:a,rule:i}))return u.rules.merge}return null};return{api:{shouldMergeNodes(i,s,{reverse:a}={}){const[o,l]=i,[,u]=s,[f,h]=a?i:s,[m,g]=a?s:i;if(Fn.isText(o)&&o.text===""&&l.at(-1)!==0)return t.tf.removeNodes({at:l}),!1;const b=(y,E)=>{const C=Oi(t,y.type);return C?!(!C.rules.merge?.removeEmpty||r("merge.removeEmpty",y,E)?.removeEmpty===!1):!0};return Rt.isElement(m)&&t.api.isVoid(m)?(b(m,g)?t.tf.removeNodes({at:l}):Rt.isElement(f)&&t.api.isEmpty(f)&&t.tf.removeNodes({at:h}),!1):Rt.isElement(o)&&t.api.isEmpty(o)&&Je.isSibling(l,u)&&b(o,l)?(t.tf.removeNodes({at:l}),!1):!0}},transforms:{removeNodes(i={}){if(i.event?.type==="mergeNodes"&&i.at){const s=t.api.node(i.at);if(s){const[a,o]=s;if(Rt.isElement(a)){const l=Oi(t,a.type);if(l){const u=l.rules.merge;if(r("merge.removeEmpty",a,o)?.removeEmpty===!1||u?.removeEmpty===!1)return}}}}n(i)}}}},RX=e=>{const{editor:t,tf:{normalizeNode:n}}=e,r=(i,s,a)=>{const o=t.meta.pluginCache.rules.match;for(const l of o){const u=t.getPlugin({key:l});if(u.rules?.normalize&&u.rules?.match?.({...e,node:s,path:a,rule:i}))return u.rules.normalize}return null};return{transforms:{normalizeNode([i,s]){if(Rt.isElement(i)&&i.type){const a=Oi(t,i.type)?.rules.normalize;if((r("normalize.removeEmpty",i,s)||a)?.removeEmpty&&t.api.isEmpty(i)){t.tf.removeNodes({at:s});return}}n([i,s])}}}},FX=({api:{isInline:e,isSelectable:t,isVoid:n,markableVoid:r},editor:i})=>({api:{create:{block:s=>({children:[{text:""}],type:i.getType(t0.key),...s})},isInline(s){return Oi(i,s.type)?.node.isInline?!0:e(s)},isSelectable(s){return Oi(i,s.type)?.node.isSelectable===!1?!1:t(s)},isVoid(s){return Oi(i,s.type)?.node.isVoid?!0:n(s)},markableVoid(s){return Oi(i,s.type)?.node.isMarkableVoid?!0:r(s)}}}),IX=Jt({key:"override"}).overrideEditor(FX).overrideEditor(OX).overrideEditor(BX).overrideEditor(PX).overrideEditor(RX),MX=(e,t,{fragment:n,...r})=>{e.tf.withoutNormalizing(()=>{t.some(i=>i.parser?.preInsert?.({...vn(e,i),fragment:n,...r})===!0),e.tf.insertFragment(n)})},LX=(e,t,{data:n,...r})=>(t.forEach(i=>{const s=i.parser?.transformData;s&&(n=s({...vn(e,i),data:n,...r}))}),n),zX=(e,t,{fragment:n,...r})=>(t.forEach(i=>{const s=i.parser?.transformFragment;s&&(n=s({fragment:n,...r,...vn(e,i)}))}),n),mP=({apply:e,node:t,path:n=[],query:r,source:i})=>{au([t,n],r)&&(typeof i=="function"?e(t,i()):e(t,i)),ht.isAncestor(t)&&t.children.forEach((s,a)=>{mP({apply:e,node:s,path:n.concat([a]),query:r,source:i})})},gP=e=>e.dataset.slateVoid==="true",jX=e=>e.dataset.slateNode==="element",qX=e=>e.dataset.slateNode==="text",$X=e=>e.dataset.slateString==="true",vP=e=>e.dataset.slateLeaf==="true",Pp=e=>vP(e)||jX(e)||gP(e)||$X(e)||qX(e),VX=(e,t)=>e.classList.contains(`slate-${t}`),Rp=(e,t)=>(n,r)=>{const{inject:{excludeBelowPlugins:i,excludePlugins:s,isBlock:a,isElement:o,isLeaf:l,maxLevel:u,targetPlugins:f}}=t,h=Rt.isElement(n)?n:void 0;if(o&&!h||a&&(!h||!e.api.isBlock(h))||l&&h||h?.type&&(s?.includes(ci(e,h.type))||f&&!f.includes(ci(e,h.type))))return!1;if(i||u){if(!r||u&&r.length>u)return!1;if(i){const m=uX(e,i);if(e.api.above({at:r,match:g=>Rt.isElement(g)&&m.includes(g.type)}))return!1}}return!0},LE=(e,t)=>{const n=[];return[...e.meta.pluginList].reverse().forEach(r=>{const i=r.inject.plugins?.[t.key];i&&n.push(i)}),[t,...n]},UX=e=>Object.keys(e).filter(t=>typeof e[t]!="object"&&(!Fn.isText(e)||t!=="text")).map(t=>yP(t)),yP=e=>`data-slate-${lP(e)}`,xP=({attributes:e,node:t,plugin:n,props:r})=>{const i={...r,attributes:{...r.attributes}};if(n?.node.props){const s=(typeof n.node.props=="function"?n.node.props(i):n.node.props)??{};i.attributes={...i.attributes,...s}}return e&&n&&(i.attributes={...i.attributes,...fJ(e,...n.node.dangerouslyAllowAttributes??[],[...t?UX(t):[]])}),Object.keys(i.attributes).forEach(s=>{i.attributes?.[s]===void 0&&delete i.attributes?.[s]}),i},fl=e=>e?`slate-${e}`:"",HX=e=>{mP({...e,apply:Hi})},Sh=e=>{if(!e.api.isCollapsed())return null;const t=e.selection.anchor,n=e.api.range(t.path);if(!n)return null;const r=e.api.isStart(t,n)?"start":e.api.isEnd(t,n)?"end":null;if(!r)return null;const i=ht.parent(e,t.path)??null,s=(()=>{if(!i||!Rt.isElement(i))return!1;const f=Oi(e,i.type)?.rules.selection?.affinity;return f==="hard"||f==="directional"})(),a=s?[i,Je.parent(t.path)]:[ht.get(e,t.path),t.path];if(r==="start"&&t.path.at(-1)===0&&!s)return[null,a];const o=r==="end"?le.next(a[1]):le.previous(a[1]),l=ht.get(e,o),u=l?[l,o]:null;return r==="end"?[a,u]:[u,a]},WX=(e,t)=>{const{marks:n,selection:r}=e;if(!r)return;const i=u=>n&&pJ(ht.extractProps(u),n)&&Object.keys(n).length>1,[s,a]=t;if(!s||!a){const u=s||a;return!n||i(u[0])?u===s?"backward":"forward":void 0}const o=n&&(s&&i(s[0])?"backward":a&&i(a[0])?"forward":null),l=r.anchor.offset===0?"forward":"backward";return l==="backward"&&o==="forward"||Jf&&l==="forward"&&o!=="backward"?"forward":"backward"},Y8=(e,t,n)=>{const r=Object.keys(ht.extractProps(t));return(Rt.isElement(t)?[t.type]:r).some(i=>Oi(e,i)?.rules.selection?.affinity===n)},Rb=(e,t,n)=>{const[r,i]=t;return r&&Y8(e,r[0],n)||i&&Y8(e,i[0],n)},Fb=(e,t,n)=>{const r=o=>{e.marks=o,e.api.onChange()},i=o=>{e.tf.setSelection({anchor:o,focus:o})},[s,a]=t;if(n==="backward"){if(s===null){r({});return}const o=e.api.end(s[1]);if(o&&i(o),Rt.isElement(s[0]))return;r(null);return}if(s===null){r(null);return}if(a===null){r({});return}i(e.api.end(s[1])),!Rt.isElement(a[0])&&r(ht.extractProps(a[0]))},KX=Yn({key:"affinity"}).overrideEditor(({editor:e,tf:{deleteBackward:t,insertText:n,move:r}})=>({transforms:{deleteBackward:i=>{(()=>{if(i==="character"&&e.api.isCollapsed()){const[a]=Sh(e)??[null],o=a&&(Fn.isText(a[0])?a[0].text:ht.string(a[0]));t(i);const l=Sh(e);return l&&Rb(e,l,"directional")&&!J8(l)&&Fb(e,l,o&&o.length>1?"backward":"forward"),!0}})()||t(i)},insertText(i,s){return(()=>{if(!e.selection||e.api.isExpanded())return;const o=e.selection.focus.path,l=ht.get(e,o);if(!l)return;const u=Object.keys(ht.extractProps(l)).filter(g=>Oi(e,g)?.rules.selection?.affinity==="outward");if(!u.length||!e.api.isEnd(e.selection.focus,o))return;const f=e.api.start(o,{next:!0}),h=[];let m=null;if(f){const g=f.path;m=ht.get(e,g)||null}for(const g of u)l[g]&&(m?.[g]||h.push(g));h.length>0&&e.tf.removeMarks(h)})(),n(i,s)},move:i=>{(()=>{const{distance:a=1,reverse:o=!1,unit:l="character"}=i||{};if(l==="character"&&a===1&&e.api.isCollapsed()){const u=Sh(e);if(u&&Rb(e,u,"hard"))return u&&u[o?0:1]===null&&WX(e,u)===(o?"forward":"backward")?(Fb(e,u,o?"backward":"forward"),!0):(r({...i,unit:"offset"}),!0);r(i);const f=Sh(e);return f&&Rb(e,f,"directional")&&!J8(f)&&Fb(e,f,o?"forward":"backward"),!0}})()||r(i)}}})),J8=e=>{const[t,n]=e;return t&&Rt.isElement(t[0])||n&&Rt.isElement(n[0])},GX=({editor:e,getOptions:t})=>{const{chunkSize:n,query:r}=t();return e.getChunkSize=i=>r(i)?n:null,{}},bP=Yn({key:"chunking",options:{chunkSize:1e3,contentVisibilityAuto:!0,query:ht.isEditor}}).overrideEditor(GX),YX=Yn({key:"debug",options:{isProduction:!0,logger:{error:(e,t,n)=>console.error(`${t?`[${t}] `:""}${e}`,n),info:(e,t,n)=>console.info(`${t?`[${t}] `:""}${e}`,n),log:(e,t,n)=>console.log(`${t?`[${t}] `:""}${e}`,n),warn:(e,t,n)=>console.warn(`${t?`[${t}] `:""}${e}`,n)},logLevel:"error",throwErrors:!0}}).extendEditorApi(({getOptions:e})=>{const t=(n,r,i,s)=>{};return{debug:{error:(n,r,i)=>t(),info:(n,r,i)=>t(),log:(n,r,i)=>t(),warn:(n,r,i)=>t()}}}),JX=(e,t,n)=>{const r=e.getOptions(Cc),i=op.get(e)??!1;if(n){const s=typeof n.scrollOptions=="object"&&n.scrollOptions?{...typeof r.scrollOptions=="object"?r.scrollOptions:{},...vb(n.scrollOptions,fb)}:n.scrollOptions??r.scrollOptions,a={...r,scrollOperations:{...r.scrollOperations,...vb(n.operations??{},fb)},scrollOptions:s,...vb({scrollMode:n.mode},fb)};e.setOptions(Cc,a)}op.set(e,!0);try{t()}finally{op.set(e,i),e.setOptions(Cc,r)}},op=new WeakMap,Cc=Yn({key:"dom",options:{scrollMode:"last",scrollOperations:{insert_node:!0,insert_text:!0},scrollOptions:{scrollMode:"if-needed"}}}).extendEditorApi(({editor:e})=>({isScrolling:()=>op.get(e)??!1})).extendEditorTransforms(({editor:e})=>({withScrolling:De(JX,e)})).overrideEditor(({api:e,editor:t,getOption:n,tf:{apply:r}})=>({transforms:{apply(i){if(e.isScrolling()){r(i);const s=n("scrollOperations");if(!s[i.type])return;const a=t.operations.filter(m=>!!s[m.type]);if(a.length===0)return;const o=n("scrollMode")==="first"?a[0]:a.at(-1);if(!o)return;const{offset:l,path:u}=o.path?o:{};if(!u)return;const f=n("scrollOptions"),h={offset:l??0,path:u};e.scrollIntoView(h,f);return}return r(i)}}})).overrideEditor(({editor:e,tf:{apply:t}})=>({transforms:{apply(n){if(n.type==="set_selection"){const{properties:r}=n;e.dom.prevSelection=r,t(n),e.dom.currentKeyboardEvent=null;return}t(n)}}})),n0=e=>e.nodeType===Node.ELEMENT_NODE,wP=e=>e.nodeType===Node.TEXT_NODE,XX=new Set(["A","ABBR","ACRONYM","B","BDI","BDO","BIG","BR","BUTTON","CANVAS","CITE","CODE","CONTENT","DATA","DEL","DFN","EM","EMBED","FONT","I","IFRAME","IMG","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","MARQUEE","math","MENUITEM","METER","NOBR","OBJECT","OUTPUT","PICTURE","PORTAL","PROGRESS","Q","S","SAMP","SELECT","SHADOW","SMALL","SOURCE","SPAN","STRIKE","STRONG","SUB","SUP","svg","TEXTAREA","TIME","TRACK","TT","U","VAR","VIDEO","WBR"]),zE=e=>{if(!n0(e))return!1;const t=e,n=XX.has(t.tagName),r=t.style.display.split(" ")[0];return r===""?n:r.startsWith("inline")?!0:r==="inherit"&&t.parentElement?zE(t.parentElement):["contents","initial","none","revert","revert-layer","unset"].includes(r)?n:!1},Hw=e=>n0(e)?!zE(e):!1,QX=/^\s+/,ZX=/\n$/,eQ=(e,{shouldCollapseWhiteSpace:t=!0,trimEnd:n="collapse",trimStart:r="collapse",whiteSpaceIncludesNewlines:i=!0}={})=>{let s=e;return r==="all"&&(s=s.replace(QX,"")),n==="single-newline"&&(s=s.replace(ZX,"")),t&&(i?s=s.replaceAll(/\s+/g," "):(s=s.replaceAll(/[^\S\n\r]+/g," "),s=s.replaceAll(/^[^\S\n\r]+/gm,""),s=s.replaceAll(/[^\S\n\r]+$/gm,""))),s},tQ=e=>{let t=e;for(;;){if(t.nextSibling)t=t.nextSibling;else{if(t=t.parentElement,t&&Hw(t))return!0;t=t?.nextSibling||null}if(!t||Hw(t))return!0;if((t.textContent||"").length>0)return!1}},nQ=e=>{e.inlineFormattingContext?e.inlineFormattingContext.atStart=!1:e.inlineFormattingContext={atStart:!0,lastHasTrailingWhiteSpace:!1}},X8=e=>{e.inlineFormattingContext=null},rQ=(e,t)=>{const n=e.textContent||"",r=n.trim()==="";(t.inlineFormattingContext||!r)&&nQ(t);const{whiteSpaceRule:i}=t,s=i!=="normal"?"collapse":!t.inlineFormattingContext||t.inlineFormattingContext.atStart||t.inlineFormattingContext.lastHasTrailingWhiteSpace?"all":"collapse",a=i==="normal"?"collapse":tQ(e)?"single-newline":"collapse",o={normal:!0,pre:!1,"pre-line":!0}[i],l=eQ(n||"",{shouldCollapseWhiteSpace:o,trimEnd:a,trimStart:s,whiteSpaceIncludesNewlines:i!=="pre-line"});t.inlineFormattingContext&&o&&(t.inlineFormattingContext.lastHasTrailingWhiteSpace=l.endsWith(" ")),e.textContent=l},iQ=(e,t)=>{if(n0(e)){CP(e,t);return}if(wP(e)){rQ(e,t);return}EP(e,t)},EP=(e,t)=>{const n=Array.from(e.childNodes);for(const r of n)iQ(r,t)},sQ=e=>{const t=e.style.whiteSpace;switch(t){case"break-spaces":case"pre":case"pre-wrap":return"pre";case"normal":case"nowrap":return"normal";case"pre-line":return"pre-line"}return e.tagName==="PRE"?"pre":t==="initial"?"normal":null},CP=(e,t)=>{const n=zE(e),r=t.whiteSpaceRule,i=sQ(e);i&&(t.whiteSpaceRule=i),n||X8(t),EP(e,t),n||X8(t),t.whiteSpaceRule=r},aQ=e=>{const t=e.cloneNode(!0);return CP(t,{inlineFormattingContext:null,whiteSpaceRule:"normal"}),t},Bm=(e,t,n=!1)=>Array.from(t.childNodes).flatMap(r=>r.nodeType===1&&!Pp(r)&&n?Bm(e,r,n):DP(e)(r)),oQ=(e,t)=>{if(t.nodeName==="BODY")return ME("fragment",{},Bm(e,t))},lQ=e=>{if(e.nodeName==="BR")return` +`},uQ=({element:e,type:t})=>{if(!VX(e,t)&&!vP(e))return;const n={};if(Object.entries(e.dataset).forEach(([r,i])=>{if(r.startsWith("slate")&&i&&!["slateInline","slateLeaf","slateNode","slateVoid"].includes(r)){const s=r.slice(5).charAt(0).toLowerCase()+r.slice(6);if(i===void 0)return;let a=i;i==="true"?a=!0:i==="false"?a=!1:Number.isNaN(Number(i))||(a=Number(i)),n[s]=a}}),Object.keys(n).length>0)return n},cQ=({editor:e,element:t,plugin:n})=>{const r=n.parsers.html?.deserializer?.toNodeProps,i=n.parsers.html?.deserializer?.disableDefaultNodeProps??!1?{}:uQ({...vn(e,n),element:t});if(!r)return i;const s=r({...vn(e,n),element:t})??{};return{...i,...s}},fQ=e=>{let t=e.parsers?.html?.deserializer;const n=t?.rules??[],r=n.some(i=>i.validClassName?.includes(`slate-${e.key}`))?n:[{validClassName:`slate-${e.key}`,validNodeName:"*"},...n];return t||(t={rules:r}),t.rules=r,t},kP=(e,t,{deserializeLeaf:n,element:r})=>{const{node:{isElement:i,isLeaf:s}}=t,a=fQ(t);if(!a)return;const{attributeNames:o,isElement:l,isLeaf:u,query:f,rules:h}=a;let{parse:m}=a;const g=l||i,b=u||s;if(!n&&!g||n&&!b||h&&!h.some(({validAttribute:x,validClassName:S,validNodeName:O="*",validStyle:_})=>{if(O){const w=ho(O);if(w.length>0&&!w.includes(r.nodeName)&&O!=="*")return!1}if(S&&!r.classList.contains(S))return!1;if(_)for(const[w,T]of Object.entries(_)){if(!ho(T).includes(r.style[w])&&T!=="*"||T==="*"&&!r.style[w])return!1;const A=t.inject.nodeProps?.defaultNodeValue;if(A&&A===r.style[w])return!1}if(x)if(typeof x=="string"){if(!r.getAttributeNames().includes(x))return!1}else for(const[w,T]of Object.entries(x)){const A=ho(T),P=r.getAttribute(w);if(!Mr(P)||!A.includes(P))return!1}return!0})||f&&!f({...vn(e,t),element:r}))return;if(!m)if(g)m=({type:x})=>({type:x});else if(b)m=({type:x})=>({[x]:!0});else return;const y=Pp(r)?{}:m({...vn(e,t),element:r,node:{}})??{},E=cQ({editor:e,element:r,plugin:t});let C={...y,...E};if(Object.keys(C).length!==0){if(LE(e,t).forEach(x=>{const S=x.parsers?.html?.deserializer?.parse?.({...vn(e,t),element:r,node:C});S&&!Pp(r)&&(C={...C,...S})}),o){const x={},S=r.getAttributeNames();for(const O of S)o.includes(O)&&(x[O]=r.getAttribute(O));Object.keys(x).length>0&&(C.attributes=x)}return{...a,node:C}}},dQ=(e,t)=>{let n;return[...e.meta.pluginList].reverse().some(r=>(n=kP(e,r,{element:t}),!!n)),n},hQ=(e,t,n=!1)=>{const r=dQ(e,t);if(r){const{node:i,withoutChildren:s}=r;let a=i.children??Bm(e,t,n);return(a.length===0||s||gP(t))&&(a=[{text:""}]),ME("element",i,a)}},pQ=(e,t)=>{let n={};return[...e.meta.pluginList].reverse().forEach(r=>{const i=kP(e,r,{deserializeLeaf:!0,element:t});i&&(n={...n,...i.node})}),n},mQ=(e,t)=>{const n=pQ(e,t);return Bm(e,t).reduce((r,i)=>{if(!i)return r;if(Rt.isElement(i))Object.keys(n).length>0&&HX({node:i,query:{filter:([s])=>Fn.isText(s)},source:n}),r.push(i);else{const s={...n};Fn.isText(i)&&i.text&&Object.keys(s).forEach(a=>{s[a]&&i[a]&&(s[a]=i[a])}),r.push(ME("text",s,i))}return r},[])},gQ=e=>{if(wP(e))return e.parentElement?.dataset.platePreventDeserialization?"":e.textContent||""},vQ=e=>{if(e.nodeName!=="BR"||e.className==="Apple-interchange-newline")return!1;const t=e.parentElement;return!(!t||t.tagName==="P"||t.tagName==="SPAN"||(()=>{let r=e.previousSibling;for(;r;){if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return!0;r=r.previousSibling}for(r=e.nextSibling;r;){if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return!0;r=r.nextSibling}return!1})())},DP=e=>t=>{const n=gQ(t);if(n)return n;if(!n0(t))return null;if(vQ(t))return{children:[{text:""}],type:e.getType("p")};if(t.nodeName==="BR"&&t.className==="Apple-interchange-newline")return null;const r=lQ(t);if(r)return r;const i=oQ(e,t);if(i)return i;const s=hQ(e,t,Pp(t));return s||mQ(e,t)},yQ=(e,t)=>DP(e)(t),SP=e=>new DOMParser().parseFromString(e,"text/html"),xQ=e=>SP(e).body,bQ=(e,{collapseWhiteSpace:t=!0,defaultElementPlugin:n,element:r})=>(typeof r=="string"&&(r=xQ(r)),t&&(r=aQ(r)),HQ(e,{defaultElementPlugin:n,descendants:yQ(e,r)})),wQ=Jt({key:"html"}).extendApi(({editor:e})=>({deserialize:De(bQ,e)})).extend({parser:{format:"text/html",deserialize:({api:e,data:t})=>{const n=SP(t);return e.html.deserialize({element:n.body})}}}),Q8=Yn({key:"length"}).overrideEditor(({editor:e,getOptions:t,tf:{apply:n}})=>{let r=!1,i=!1;const s=a=>{const o=e.selection?.focus;if(!o)return;const l=e.api.before(o,{distance:a,unit:"character"})??e.api.start([]);if(!l)return;if(Je.equals(l.path,o.path)){e.tf.delete({at:{anchor:l,focus:o}});return}if(o.offset>0){e.tf.delete({at:{anchor:{offset:0,path:o.path},focus:o}});return}const u=e.api.block({at:o});if(u&&u[1].length===1&&e.api.isEmpty(u[0])){e.tf.removeNodes({at:u[1]});return}const f=e.api.previous({at:o,match:Fn.isText});f&&e.tf.select(e.api.end(f[1]))};return{transforms:{apply(a){e.tf.withoutNormalizing(()=>{n(a);const o=t();if(o.maxLength){if(r){i=!0;return}r=!0;try{do{i=!1;const l=e.api.string([]).length-o.maxLength;if(l<=0)return;s(l)}while(i)}finally{r=!1,i=!1}}})}}}}),_P="navigationFeedback",kc={key:_P},Ww=new WeakMap,Z8=new WeakMap,EQ=["data-nav-cycle","data-nav-highlight","data-nav-pulse","data-nav-target"],AP=e=>{e?.pathRef.unref()},Fp=e=>{const t=e?.pathRef.current;if(!e||!t)return null;const{pathRef:n,...r}=e;return{...r,path:t}},TP=(e,t)=>{const n=ht.get(e,t.path);if(n)try{return e.api.toDOMNode(n)}catch{return}},NP=(e,t)=>{if(!t)return;const n=TP(e,t);if(n){for(const r of EQ)n.removeAttribute(r);n.style.removeProperty("--plate-nav-feedback-duration")}},CQ=(e,t)=>{const n=TP(e,t);n&&(n.setAttribute("data-nav-cycle",String(t.cycle)),n.setAttribute("data-nav-highlight",t.variant),n.setAttribute("data-nav-pulse",String(t.pulse)),n.setAttribute("data-nav-target","true"),n.style.setProperty("--plate-nav-feedback-duration",`${t.duration}ms`))},OP=e=>{const t=Ww.get(e);t&&(clearTimeout(t),Ww.delete(e))},kQ=e=>{const t=(Z8.get(e)??0)+1;return Z8.set(e,t),t},lp=(e,t)=>{const n=e.getOption(kc,"activeTarget"),r=Fp(n);return!n||t!==void 0&&n.pulse!==t?!1:(OP(e),NP(e,r),AP(n),e.setOption(kc,"activeTarget",null),!0)},BP=(e,{duration:t,target:n,variant:r="navigated"})=>{if(!e.api.node(n.path))return!1;const i=kQ(e),s=t??e.getOption(kc,"duration")??800,a=e.getOption(kc,"activeTarget");OP(e),NP(e,Fp(a)),AP(a);const o=e.api.pathRef(n.path),l={cycle:i%2,duration:s,pathRef:o,pulse:i,type:n.type,variant:r};e.setOption(kc,"activeTarget",l),CQ(e,Fp(l)??{cycle:l.cycle,duration:l.duration,path:n.path,pulse:l.pulse,type:l.type,variant:l.variant});const u=setTimeout(()=>{lp(e,i)},s);return Ww.set(e,u),!0},DQ=(e,{scrollTarget:t,select:n,target:r})=>t||(n&&"focus"in n&&n.focus?n.focus:n&&"anchor"in n&&n.anchor?n.anchor:n&&"path"in n?n:e.api.start(r.path)),SQ=(e,{flash:t,focus:n=!0,scroll:r=!0,scrollTarget:i,select:s,target:a})=>{if(!e.api.node(a.path))return!1;if(s&&("focus"in s?e.tf.select(s):e.tf.select({anchor:s,focus:s})),n&&e.tf.focus(),r){const o=DQ(e,{scrollTarget:i,select:s,target:a});o&&e.api.scrollIntoView(o)}return t!==!1&&BP(e,{duration:t?.duration,target:a,variant:t?.variant}),!0},PP=Yn({key:_P,options:{activeTarget:null,duration:1600}}).extendEditorApi(({editor:e})=>{const t=()=>{const n=e.getOption(kc,"activeTarget"),r=Fp(n);return!r&&n?(lp(e),null):r};return{navigation:{activeTarget:t,clear:()=>lp(e),isTarget:n=>{const r=t();return!!r&&Je.equals(r.path,n)}}}}).extendEditorTransforms(({editor:e})=>({navigation:{clear:()=>lp(e),flashTarget:t=>BP(e,t),navigate:t=>SQ(e,t)}})),e_=()=>globalThis.performance?.now()??Date.now(),_Q=({editor:e,getOptions:t,tf:{apply:n,insertNode:r,insertNodes:i}})=>{const s=()=>({[t().idKey??""]:t().idCreator()}),a=u=>{const{filter:f,filterText:h}=t();return f(u)&&(!h||u[0]?.type!==void 0)},o=({disableInsertOverrides:u,idKey:f,nodeEntry:h,query:m})=>{const g=new Set,b=y=>{const[E,C]=y;au(y,m)&&(E[f]!==void 0&&g.add(E[f]),!u&&Mr(E._id)&&g.add(E._id));const x=E.children;x&&x.forEach((S,O)=>{b([S,[...C,O]])})};return b(h),g},l=({duplicateCandidateIds:u,idKey:f})=>{if(u.size===0)return new Set;const h=new Set,m=e_();let g=0;for(const[b]of ht.nodes(e)){g+=1;const y=b?.[f];if(!(y===void 0||!u.has(y))&&(h.add(y),h.size===u.size))break}return t().onDuplicateIdScan?.({candidateCount:u.size,duration:e_()-m,existingCount:h.size,visitedCount:g}),h};return{transforms:{apply(u){const{allow:f,disableInsertOverrides:h,exclude:m,idCreator:g,idKey:b="",reuseId:y}=t(),E={allow:f,exclude:m,filter:a};if(u.type==="insert_node"){const C=Ts(u.node),x=l({duplicateCandidateIds:o({disableInsertOverrides:h,idKey:b,nodeEntry:[C,u.path],query:E}),idKey:b}),S=_=>x.has(_),O=_=>{const[w,T]=_;if(au(_,E)&&(w[b]!==void 0&&S(w[b])&&delete w[b],w[b]===void 0&&Object.assign(w,s()),!h&&Mr(w._id))){const P=w._id;delete w._id,S(P)||(w[b]=P)}const A=w.children;A&&A.forEach((P,I)=>{O([P,[...T,I]])})};return O([C,u.path]),n({...u,node:C})}if(u.type==="split_node"){const C=u.properties;let x=u.properties[b];if(au([C,u.path],E))return(!y||x===void 0||e.api.some({at:[],match:{[b]:x}}))&&(x=g()),n({...u,properties:{...u.properties,[b]:x}});x&&delete u.properties[b]}return n(u)},insertNode(u){const{disableInsertOverrides:f,idKey:h=""}=t();!f&&u[h]&&(Object.isExtensible(u)||(u=Ts(u)),u._id=u[h]),r(u)},insertNodes(u,f){const h=ho(u).filter(b=>!!b);if(h.length===0)return;const{disableInsertOverrides:m,idKey:g=""}=t();i(h.map(b=>(!m&&b[g]&&(Object.isExtensible(b)||(b=Ts(b)),b._id=b[g]),b)),f)}}}},RP=()=>!0,FP=({allow:e,exclude:t,filter:n,filterInline:r=!0,filterText:i=!0})=>e===void 0&&t===void 0&&(n===void 0||n===RP)&&r&&i,IP=(e,t)=>Rt.isElement(e)&&(t?t(e):e.inline!==!0),MP=(e,t={})=>{const{allow:n,exclude:r,filter:i=()=>!0,filterInline:s=!0,filterText:a=!0,isBlock:o,idKey:l="id"}=t,[u,f]=e;return!u[l]&&au([u,f],{allow:n,exclude:r,filter:h=>{const[m]=h;return a&&!Rt.isElement(m)||s&&Rt.isElement(m)&&!(o?o(m):m.inline!==!0)?!1:i(h)}})},AQ=e=>e.initialValueIds!==void 0?e.initialValueIds:e.normalizeInitialValue===null?!1:e.normalizeInitialValue===!0?"always":"if-needed",TQ=(e,t={})=>{const{idCreator:n=()=>kd(10),idKey:r="id"}=t;if(FP(t)){const o=f=>{if(!Rt.isElement(f)||!IP(f,t.isBlock))return f;let h;return f.children.forEach((m,g)=>{const b=o(m);b!==m&&(h||(h=[...f.children]),h[g]=b)}),f[r]?h?{...f,children:h}:f:{...f,...h?{children:h}:{},[r]:n()}};let l=!1;const u=e.map(f=>{const h=o(f);return h!==f&&(l=!0),h});return l?u:e}const i=(o,l)=>{let u=o,f=!1;if(MP([o,l],t)&&(u={...o,[r]:n()}),Rt.isElement(o)){const h=o.children.map((m,g)=>{const b=i(m,[...l,g]);return b!==m&&(f=!0),b});f&&(u=u===o?{...o,children:h}:{...u,children:h})}return u};let s=!1;const a=e.map((o,l)=>{const u=i(o,[l]);return u!==o&&(s=!0),u});return s?a:e},NQ=(e,t,n={})=>TQ(t,{...n,isBlock:e.api.isBlock}),LP=Yn({key:"nodeId",options:{filterInline:!0,filterText:!0,idKey:"id",filter:RP,idCreator:()=>kd(10)}}).extend(({getOptions:e})=>({node:{isMetadataProp:({key:t})=>t===(e().idKey??"id")}})).extendTransforms(({editor:e,getOptions:t})=>({normalize(){const n=t(),{idCreator:r,idKey:i}=n,s=[];if(FP({...n,isBlock:e.api.isBlock})){const o=[],l=u=>{Rt.isElement(u)&&IP(u,e.api.isBlock)&&(u[i]||s.push({at:[...o],props:{[i]:r()}}),u.children.forEach((f,h)=>{o.push(h),l(f),o.pop()}))};if(e.children.forEach((u,f)=>{o.push(f),l(u),o.pop()}),s.length===0)return;e.tf.withoutSaving(()=>{e.tf.setNodesBatch(s)});return}const a=o=>{const[l,u]=o;MP(o,{...n,isBlock:e.api.isBlock})&&s.push({at:u,props:{[i]:r()}}),Rt.isElement(l)&&l.children.forEach((f,h)=>{a([f,[...u,h]])})};e.children.forEach((o,l)=>{a([o,[l]])}),s.length!==0&&e.tf.withoutSaving(()=>{e.tf.setNodesBatch(s)})}})).extend({transformInitialValue:({editor:e,getOptions:t,value:n})=>{const r=t(),{idKey:i="id"}=r,s=AQ(r);if(s===!1)return n;if(s==="if-needed"){const a=n[0],o=n.at(-1);if(a?.[i]&&o?.[i])return n}return NQ(e,n,r)}}).overrideEditor(_Q),OQ=(e,t,n,r)=>e.meta.pluginCache.handlers.onNodeChange.some(i=>{const s=e.getPlugin({key:i});if(!s||e.dom?.readOnly)return!1;const a=s.handlers?.onNodeChange;if(!a)return!1;const o=a({editor:e,node:t,operation:r,plugin:s,prevNode:n});return o??!1}),BQ=(e,t,n,r,i)=>e.meta.pluginCache.handlers.onTextChange.some(s=>{const a=e.getPlugin({key:s});if(!a||e.dom?.readOnly)return!1;const o=a.handlers?.onTextChange;if(!o)return!1;const l=o({editor:e,node:t,operation:i,plugin:a,prevText:r,text:n});return l??!1}),Ib={handlers:!0,inject:!0,transformInitialValue:!1,render:!0},ri=(e,t,n)=>{if(!e)return!1;const r=n==="normalizeInitialValue"?"transformInitialValue":n;return t.editOnly===!0?Ib[r]:typeof t.editOnly=="object"?t.editOnly[r]!==void 0?t.editOnly[r]:r==="transformInitialValue"?t.editOnly.normalizeInitialValue??Ib.transformInitialValue:Ib[r]:!1},PQ=e=>{const t=e.meta.isNormalizing;e.meta.isNormalizing=!0,e.meta.pluginCache.transformInitialValue.forEach(n=>{const r=e.getPlugin({key:n});if(ri(e.dom.readOnly,r,"transformInitialValue")||!r.transformInitialValue&&!r.normalizeInitialValue)return;const i={...vn(e,r),value:e.children};if(r.transformInitialValue){const a=r.transformInitialValue(i);if(a===void 0)throw new Error(`Plugin "${n}" transformInitialValue must return the next value.`);e.children=a;return}const s=r.normalizeInitialValue?.(i);s!==void 0&&(e.children=s)}),e.meta.isNormalizing=t},RQ=(e,{autoSelect:t,selection:n,shouldNormalizeEditor:r,value:i,onReady:s})=>{const a=(o=!1)=>{if((!e.children||e.children?.length===0)&&(e.children=e.api.create.value()),n)e.selection=n;else if(t){const l=(t==="start"?"start":"end")=="start"?e.api.start([]):e.api.end([]);e.tf.select(l)}e.children.length>0&&PQ(e),r&&e.tf.normalize({force:!0}),s&&s({editor:e,isAsync:o,value:e.children})};if(i===null)a();else if(typeof i=="string")e.children=e.api.html.deserialize({element:i}),a();else if(typeof i=="function"){const o=i(e);o&&typeof o.then=="function"?o.then(l=>{e.children=l,a(!0)}):(e.children=o,a())}else i&&(e.children=i),a()},FQ=(e,{match:t,reverse:n}={})=>{if(!e.selection||!e.api.isCollapsed())return;const r=e.api.block();if(!r)return;const i=e.api.above({at:r[1],match:DB(e,(a,o)=>o.length===1||o.length>1&&!!a.type&&!Oi(e,a.type)?.node.isStrictSiblings,{match:t})})?.[1]??r[1],s=n?i:Je.next(i);if(s)return e.tf.insertNodes(e.api.create.block(),{at:s,select:!0}),!0},IQ=(e,{at:t,match:n}={})=>{const r=e.api.block({at:t});if(!r||!n)return;const[,i]=r;if(e.api.above({at:i,match:DB(e,(s,a)=>a.length{const n=e.api.block({at:t});if(!n?.[0])return;const[r,i]=n,s=e.getOptions(LP).idKey??"id";return e.tf.withoutNormalizing(()=>{const{type:a,...o}=ht.extractProps(r);delete o[s],Object.keys(o).forEach(u=>{e.tf.unsetNodes(u,{at:i})});const l=e.getType(t0.key);r.type!==l&&e.tf.setNodes({type:l},{at:i})}),!0},LQ=(e,t)=>{let n=t;typeof t=="string"?n=e.api.html.deserialize({element:t}):(!t||t.length===0)&&(n=e.api.create.value()),e.tf.replaceNodes(n,{at:[],children:!0})},t_=()=>{},n_=()=>{},zQ=(e,t)=>{const n=ht.extractProps(t);return Object.entries(n).every(([r,i])=>r==="type"?!0:e.meta.pluginCache.node.isMetadataProp.some(s=>{const a=e.plugins[s];return a.node.isMetadataProp?.({...vn(e,a),key:r,node:t,value:i})}))},Ip=Yn({api:{redecorate:()=>{}},key:"slateExtension",options:{onNodeChange:t_,onTextChange:n_}}).extendEditorApi(({editor:e})=>({isElementStateEmpty:De(zQ,e)})).extendEditorTransforms(({editor:e,getOption:t,tf:n})=>{const r=n?.apply??e.tf.apply;return{init:De(RQ,e),insertExitBreak:De(FQ,e),liftBlock:De(IQ,e),resetBlock:De(MQ,e),setValue:De(LQ,e),apply(i){const s=e.meta.pluginCache.handlers.onNodeChange.length>0||t("onNodeChange")!==t_,a=e.meta.pluginCache.handlers.onTextChange.length>0||t("onTextChange")!==n_;if(!s&&!a){r(i);return}let o,l,u,f,h;if(Zl.isNodeOperation(i)&&s)switch(i.type){case"insert_node":o=i.node,l=i.node;break;case"merge_node":case"move_node":case"set_node":case"split_node":o=ht.get(e,i.path);break;case"remove_node":o=i.node,l=i.node;break}else if(Zl.isTextOperation(i)&&a){const m=Je.parent(i.path);h=ht.get(e,m),u=ht.get(e,i.path).text}if(r(i),Zl.isNodeOperation(i)&&s){switch(i.type){case"insert_node":case"remove_node":break;case"merge_node":{const m=Je.previous(i.path);m&&(l=ht.get(e,m));break}case"move_node":l=ht.get(e,i.newPath);break;case"set_node":l=ht.get(e,i.path);break;case"split_node":l=ht.get(e,i.path);break}l||(l=o),OQ(e,l,o,i)||t("onNodeChange")({editor:e,node:l,operation:i,prevNode:o})}if(Zl.isTextOperation(i)&&a){const m=ht.get(e,i.path);m&&(f=m.text),BQ(e,h,f,u,i)||t("onTextChange")({editor:e,node:h,operation:i,prevText:u,text:f})}}}}),jQ=e=>t=>Fn.isText(t)||Rt.isElement(t)&&e.api.isInline(t),qQ=e=>()=>({children:[],type:e}),$Q=(e,t)=>e.some((n,r,i)=>{const s=i[r-1];return r!==0?t(n)!==t(s):!1}),VQ=(e,t,n,r)=>{const i=r||$Q(e,t),{fragment:s}=e.reduce((a,o)=>{if(i&&t(o)){let l=a.precedingBlock;l||(l=n(),a.precedingBlock=l,a.fragment.push(l)),l.children.push(o)}else a.fragment.push(o),a.precedingBlock=null;return a},{fragment:[],precedingBlock:null});return s},UQ=e=>e.length===0?[{text:""}]:e,zP=(e,t,n,r)=>(e=UQ(e),e=VQ(e,t,n,r),e=e.map(i=>Rt.isElement(i)?{...i,children:zP(i.children,t,n,!1)}:i),e),HQ=(e,{defaultElementPlugin:t=t0,descendants:n})=>zP(n,jQ(e),qQ(e.getType(t.key)),!0),jP=(e,t,n)=>t.every(r=>{const i=r.parser?.query;return!i||i({...vn(e,r),...n})}),WQ=Jt({key:"parser"}).overrideEditor(({editor:e,tf:{insertData:t}})=>({transforms:{insertData(n){[...e.meta.pluginList].reverse().some(r=>{const i=r.parser;if(!i)return!1;const s=LE(e,r),{deserialize:a,format:o,mimeTypes:l}=i;if(!o&&!l)return!1;const u=l||(Array.isArray(o)?o:o?[o]:[]).map(f=>f.includes("/")?f:`text/${f}`);for(const f of u){let h=n.getData(f);if(f!=="Files"&&!h||f==="Files"&&n.files.length===0||!jP(e,s,{data:h,dataTransfer:n,mimeType:f}))continue;h=LX(e,s,{data:h,dataTransfer:n,mimeType:f});let m=a?.({...vn(e,r),data:h,dataTransfer:n,mimeType:f});if(m?.length&&(m=zX(e,s,{data:h,dataTransfer:n,fragment:m,mimeType:f}),m.length!==0))return MX(e,s,{data:h,dataTransfer:n,fragment:m,mimeType:f}),!0}return!1})||t(n)}}})),tc=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},Mb=({editor:e})=>{const{selection:t}=e,n=!!t&&e.api.isCollapsed(),r=tc(()=>{if(t)return e.api.range("start",t)}),i=tc(()=>{const s=r();return s?e.api.string(s):void 0});return{editor:e,getBlockEntry:tc(()=>{if(t)return e.api.block({at:t})}),getBlockStartRange:r,getBlockStartText:i,getBlockTextBeforeSelection:tc(()=>i()??""),getCharAfter:tc(()=>{if(!t||!n)return;const s=e.api.after(t,{distance:1,unit:"character"});if(s)return e.api.string({anchor:t.anchor,focus:s})||void 0}),getCharBefore:tc(()=>{if(!t||!n)return;const s=e.api.before(t,{distance:1,unit:"character"});if(s)return e.api.string({anchor:s,focus:t.anchor})||void 0}),isCollapsed:n}},KQ=(e,t)=>Array.isArray(e)?e.includes(t):e===t,GQ=Yn({editOnly:!0,key:"inputRules"}).overrideEditor(({editor:e,tf:{insertBreak:t,insertData:n,insertText:r}})=>({transforms:{insertBreak(){const i=Mb({editor:e});let s=!1;for(const a of e.meta.inputRules.insertBreak){const o={cause:"insertBreak",insertBreak:t,pluginKey:a.pluginKey,...i};if(a.enabled?.(o)===!1)continue;const l=a.resolve?a.resolve(o):!0;if(l!==void 0&&a.apply(o,l)!==!1){s=!0;break}}s||t()},insertData(i){const s=i.getData("text/plain")||null,a=Mb({editor:e});let o=!1;for(const l of e.meta.inputRules.insertData){const u={cause:"insertData",data:i,insertData:n,pluginKey:l.pluginKey,text:s,...a};if(l.enabled?.(u)===!1||l.mimeTypes&&l.mimeTypes.length>0&&!l.mimeTypes.some(h=>!!u.data.getData(h)))continue;const f=l.resolve?l.resolve(u):!0;if(f!==void 0&&l.apply(u,f)!==!1){o=!0;break}}o||n(i)},insertText(i,s){const a=e.meta.inputRules.insertText.byTrigger[i]??[],o=Mb({editor:e});let l=!1;for(const u of a){const f={cause:"insertText",insertText:r,options:s,pluginKey:u.pluginKey,text:i,...o};if(!KQ(u.trigger,f.text)||u.enabled?.(f)===!1)continue;const h=u.resolve?u.resolve(f):!0;if(h!==void 0&&u.apply(f,h)!==!1){l=!0;break}}l||r(i,s)}}})),YQ=({affinity:e,chunking:t,maxLength:n,navigationFeedback:r,nodeId:i,plugins:s=[]})=>{let a=i,o=[YX,Ip,Cc,PP.configure({enabled:r!==!1,options:typeof r=="boolean"?void 0:r}),NX,GQ,IX,WQ,n?Q8.configure({options:{maxLength:n}}):Q8,wQ,AX,LP.configure({enabled:a!==!1,options:a===!1?void 0:a}),KX.configure({enabled:e}),t0,bP.configure({enabled:t!==!1,options:typeof t=="boolean"?void 0:t})];const l=new Map(s.map(u=>[u.key,u]));return o=o.map(u=>{const f=l.get(u.key);if(f){const h=s.findIndex(m=>m.key===u.key);return h!==-1&&s.splice(h,1),f}return u}),o},JQ=(e,{id:t,affinity:n=!0,autoSelect:r,chunking:i=!0,maxLength:s,navigationFeedback:a,nodeId:o,optionsStoreFactory:l,plugins:u=[],readOnly:f=!1,rootPlugin:h,selection:m,shouldNormalizeEditor:g,skipInitialization:b,userId:y,value:E,onReady:C,...x}={})=>{const S=e;S.id=t??S.id??kd(),S.meta.key=S.meta.key??kd(),S.meta.isFallback=!1,S.meta.userId=y,S.dom={composing:!1,currentKeyboardEvent:null,focused:!1,prevSelection:null,readOnly:f},S.getApi=()=>S.api,S.getTransforms=()=>S.transforms,S.getPlugin=T=>oX(S,T),S.getType=T=>Bt(S,T),S.getInjectProps=T=>{const A=S.getPlugin(T).inject?.nodeProps??{};return A.nodeKey=A.nodeKey??S.getType(T.key),A.styleKey=A.styleKey??A.nodeKey,A},S.getOptionsStore=T=>S.getPlugin(T).optionsStore,S.getOptions=T=>S.getOptionsStore(T)?S.getOptionsStore(T).get("state"):S.getPlugin(T).options,S.getOption=(T,A,...P)=>{const I=S.getOptionsStore(T);if(!I)return S.getPlugin(T).options[A];if(!(A in I.get("state"))&&!(A in I.selectors)){S.api.debug.error(`editor.getOption: ${A} option is not defined in plugin ${T.key}.`,"OPTION_UNDEFINED");return}return I.get(A,...P)},S.setOption=(T,A,...P)=>{const I=S.getOptionsStore(T);if(I){if(!(A in I.get("state"))){S.api.debug.error(`editor.setOption: ${A} option is not defined in plugin ${T.key}.`,"OPTION_UNDEFINED");return}I.set(A,...P)}},S.setOptions=(T,A)=>{const P=S.getOptionsStore(T);P&&(typeof A=="object"?P.set("state",I=>{Object.assign(I,A)}):typeof A=="function"&&P.set("state",A))};const O=YQ({affinity:n,chunking:i,maxLength:s,navigationFeedback:a,nodeId:o,plugins:u});let _=Jt({key:"root",priority:1e4,...x,override:{...x.override,components:{...x.components,...x.override?.components}},plugins:[...O,...u]});h&&(_=h(_)),yX(S,[_],l);const w=S.tf.normalizeNode;return S.tf.normalizeNode=(...T)=>{if(S.api.shouldNormalizeNode(T[0]))return w(...T)},S.normalizeNode=S.tf.normalizeNode,b||S.tf.init({autoSelect:r,selection:m,shouldNormalizeEditor:g,value:E,onReady:C}),S},XQ={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",escape:"escape",extendBackward:"shift+left",extendDownward:"shift+down",extendForward:"shift+right",extendUpward:"shift+up",insertSoftBreak:"shift+enter",italic:"mod+i",moveBackward:"left",moveDownward:"down",moveForward:"right",moveUpward:"up",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",selectAll:"mod+a",splitBlock:"enter",tab:"tab",undo:"mod+z",untab:"shift+tab"},QQ={deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},ZQ={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},In=e=>{const t=XQ[e],n=QQ[e],r=ZQ[e],i=t&&As.isKeyHotkey(t),s=n&&As.isKeyHotkey(n),a=r&&As.isKeyHotkey(r);return o=>!!(i?.(o)||zk&&s?.(o)||!zk&&a?.(o))},r_=e=>(t,n,{composing:r}={})=>!(!In(e)(n)||!!r!==t.api.isComposing()),Ys={isBold:In("bold"),isCompose:In("compose"),isDeleteBackward:In("deleteBackward"),isDeleteForward:In("deleteForward"),isDeleteLineBackward:In("deleteLineBackward"),isDeleteLineForward:In("deleteLineForward"),isDeleteWordBackward:In("deleteWordBackward"),isDeleteWordForward:In("deleteWordForward"),isEscape:In("escape"),isExtendBackward:In("extendBackward"),isExtendDownward:In("extendDownward"),isExtendForward:In("extendForward"),isExtendLineBackward:In("extendLineBackward"),isExtendLineForward:In("extendLineForward"),isExtendUpward:In("extendUpward"),isItalic:In("italic"),isMoveBackward:In("moveBackward"),isMoveDownward:In("moveDownward"),isMoveForward:In("moveForward"),isMoveLineBackward:In("moveLineBackward"),isMoveLineForward:In("moveLineForward"),isMoveUpward:In("moveUpward"),isMoveWordBackward:In("moveWordBackward"),isMoveWordForward:In("moveWordForward"),isRedo:In("redo"),isSelectAll:In("selectAll"),isSoftBreak:In("insertSoftBreak"),isSplitBlock:In("splitBlock"),isTab:r_("tab"),isTransposeCharacter:In("transposeCharacter"),isUndo:In("undo"),isUntab:r_("untab")};function qP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const{key:i,inject:{excludeBelowPlugins:s,maxLevel:a,nodeProps:o}}=t,{element:l,text:u}=n,f=l??u;if(!f||!o)return;const{classNames:h,defaultNodeValue:m,nodeKey:g=e.getType(i),query:b,styleKey:y=g,transformClassName:E,transformNodeValue:C,transformProps:x,transformStyle:S,validNodeValues:O}=o;if(!Rp(e,t)(f,s||a?r(f):void 0))return;const _=b?.({...o,...vn(e,t),nodeProps:n});if(b&&!_)return;const w=f[g];if(!x&&(!Mr(w)||O&&!O.includes(w)||w===m))return;const T={...n,...vn(e,t),nodeValue:w},A=C?.(T)??w;T.value=A;let P={};return l&&g&&w&&(P.className=`slate-${g}-${w}`),(h?.[w]||E)&&(P.className=E?.(T)??h?.[A]),y&&(P.style=S?.(T)??{[y]:A}),x&&(P=x({...T,props:P})??P),P},jE=(e,t,n,r=!1)=>(e.meta.pluginCache.inject.nodeProps.forEach(i=>{const s=e.getPlugin({key:i}),a=eZ(e,s,t,n);if(ri(r,s,"inject")||!a)return;const o=t.attributes;t.attributes={...o,...a,className:Ns(o?.className,a.className)||void 0,style:{...o?.style,...a.style}}}),t),tZ=(e,t)=>{if(!(e.meta.pluginCache.decorate.length===0&&!t))return n=>{let r=[];const i=s=>{s?.length&&(r=[...r,...s])};return e.meta.pluginCache.decorate.forEach(s=>{const a=e.getPlugin({key:s});i(a.decorate({...vn(e,a),entry:n}))}),t&&i(t({editor:e,entry:n})),r}},nZ=e=>e?.ownerDocument?.defaultView||null,rZ=e=>$P(e)&&e.nodeType===1,$P=e=>{const t=nZ(e);return!!t&&e instanceof t.Node},iZ=e=>$P(e)&&e.nodeType===3,VP=e=>{let t="";if(iZ(e)&&e.nodeValue)return e.nodeValue;if(rZ(e)){for(const r of Array.from(e.childNodes))t+=VP(r);const n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=` +`)}return t},i_=e=>{const t=window.getSelection();if(!t||t.rangeCount===0)return[];const n=t.getRangeAt(0).cloneContents().querySelectorAll('[data-slate-node="element"][data-slate-id]'),r=Array.from(n);if(r.length===0)return[];const i=[];return r.forEach((s,a)=>{const o=s.dataset.slateId,l=e.api.node({id:o,at:[]});if(!(!l||l[1].length!==1))if((a===0||a===r.length-1)&&s.textContent?.trim()!==ht.string(l[0])&&Rt.isElement(l[0])&&!e.api.isVoid(l[0])){const u=document.createElement("div");u.append(s);const f=e.api.html.deserialize({element:u});i.push(f[0])}else i.push(l[0])}),i},UP=()=>{const e=window.getSelection();if(!e||e.rangeCount===0)return;const t=e.getRangeAt(0).cloneContents(),n=document.createElement("div");return n.append(t),n},sZ=e=>{const t=e??UP();return t?!!t?.querySelector('[data-slate-editor="true"]'):!1};Cc.extendEditorApi(({editor:e})=>({getFragment(){return i_(e)}})).overrideEditor(({editor:e,tf:{setFragmentData:t}})=>({transforms:{setFragmentData(n,r){if(r!=="copy")return t(n,r);const i=i_(e),s=UP();if(!(!s||!i)&&!sZ(s)&&i.length>0){const a=JSON.stringify(i),o=window.btoa(encodeURIComponent(a));n.setData("application/x-slate-fragment",o),n.setData("text/html",s.innerHTML),n.setData("text/plain",VP(s))}}}}));const qE=(e,t)=>({...e.attributes,className:Ns(e.attributes.className,e.className)||void 0,ref:t,style:{...e.attributes.style,...e.style}}),HP=oe.forwardRef(function({as:t="div",children:n,...r},i){const s=qE(r,i),a=!!r.element.id&&!!r.editor.api.isBlock(r.element);return oe.createElement(t,{"data-slate-node":"element","data-slate-inline":s["data-slate-inline"],"data-block-id":a?r.element.id:void 0,...s,style:{position:"relative",...s?.style}},n)}),WP=oe.forwardRef(({as:e="span",children:t,...n},r)=>{const i=qE(n,r);return oe.createElement(e,i,t)}),s_=()=>oe.createElement("span",{style:{fontSize:0,lineHeight:0},contentEditable:!1},String.fromCodePoint(160)),KP=oe.forwardRef(({as:e="span",children:t,inset:n,...r},i)=>{const s=qE(r,i);return n?oe.createElement(oe.Fragment,null,oe.createElement(s_,null),oe.createElement(e,s,t,oe.createElement(s_,null))):oe.createElement(e,s,t)}),$E=(e,t,{isElement:n,isLeaf:r,isText:i})=>Object.keys(t).reduce((s,a)=>{if(typeof t[a]=="object"||n&&a==="children"||(r||i)&&a==="text")return s;const o=e.getPlugin({key:a});if(r&&o?.node.isLeaf&&o?.node.isDecoration!==!0||i&&o?.node.isLeaf&&o?.node.isDecoration!==!1)return s;const l=yP(a);return s[l]=t[a],s},{}),aZ=(e,t,n)=>{const r=t.node.isElement,i=$E(e,n,{isElement:r,isLeaf:t.node.isLeaf&&t.node.isDecoration===!0,isText:t.node.isLeaf&&t.node.isDecoration===!1}),s=t.node.toDataAttributes?.({...t?vn(e,t):{},node:n})??{};return{...i,...s}},Yc=({attributes:e,editor:t,node:n,path:r,plugin:i,props:s})=>{let a={...s,...i?vn(t,i):{api:t.api,editor:t,tf:t.transforms}};const{className:o}=s,l=xP({attributes:e,node:n,plugin:i,props:a});return a={...l,attributes:{...l.attributes,className:Ns(fl(i?.node.type),o)||void 0}},a=jE(t,a,r?()=>r:u=>t.api.findPath(u)),a.style&&Object.keys(a.style).length===0&&(a.style=void 0),a},oZ=(e,t)=>function(r){const i=r.element,s=e.meta.components?.[t.key],a=s??HP;let{children:o}=r;const l=aZ(e,t,i);r=Yc({attributes:{...i.attributes,...l},editor:e,node:i,path:r.path,plugin:t,props:r}),e.meta.pluginCache.render.belowNodes.forEach(h=>{const m=e.getPlugin({key:h}).render.belowNodes({...r,key:h});m&&(o=m({...r,children:o}))});const u=s?{}:{as:t.render?.as};let f=oe.createElement(a,{...u,...r},o,e.meta.pluginCache.render.belowRootNodes.map(h=>{const m=e.getPlugin({key:h}).render.belowRootNodes;return oe.createElement(m,{key:h,...u,...r})}));return e.meta.pluginCache.render.aboveNodes.forEach(h=>{const m=e.getPlugin({key:h}).render.aboveNodes({...r,key:h});m&&(f=m({...r,children:f}))}),f},lZ=(e,{renderElement:t}={})=>function(r){const i=Oi(e,r.element.type);if(i?.node.isElement)return oZ(e,i)(r);if(t)return t(r);const s=Yc({editor:e,path:r.path,props:{...r}});return oe.createElement(HP,s,r.children,e.meta.pluginCache.render.belowRootNodes.map(a=>{const o=e.getPlugin({key:a}).render.belowRootNodes;return oe.createElement(o,{key:a,...s})}))},uZ=(e,t)=>function(r){const{children:i,text:s}=r;if(s[t.node.type??t.key]){const a=e.meta.components?.[t.key],o=a??WP,l=Yc({attributes:{...s.attributes},editor:e,node:s,path:r.path,plugin:t,props:r}),u=a?{}:{as:t.render?.as};return oe.createElement(o,{...u,...l},i)}return i},cZ=(e,{renderText:t}={})=>{const n=[],r=[];return e.meta.pluginCache.node.isText.forEach(i=>{const s=e.getPlugin({key:i});s&&n.push(uZ(e,s))}),e.meta.pluginCache.node.textProps.forEach(i=>{const s=e.getPlugin({key:i});s&&r.push(s)}),function({attributes:s,...a}){if(n.forEach(f=>{const h=f(a);h!==void 0&&(a.children=h)}),r.forEach(f=>{if(a.text[f.node.type??f.key]){const h=typeof f.node.textProps=="function"?f.node.textProps(a):f.node.textProps??{};h.className&&(h.className=Ns(a.className,h.className)),s={...s,...h}}}),t)return t({attributes:s,...a});const o=Yc({editor:e,path:a.path,props:{attributes:s,...a}}),l=o.text,u=$E(e,l,{isText:!0});return oe.createElement(WP,{...o,attributes:{...o.attributes,...u}})}};function fZ({decorate:e,decorations:t,editor:n,element:r={children:[],type:""},path:i}){const s=lZ(n),a={"data-slate-node":"element",ref:null};let o=oe.createElement(a_,{decorate:e,decorations:t,editor:n,parentPath:i},r.children);return n.api.isVoid(r)&&(a["data-slate-void"]=!0,o=oe.createElement("span",{style:{color:"transparent",height:"0",outline:"none",position:"absolute"},"data-slate-spacer":!0},oe.createElement(a_,{decorate:e,decorations:t,editor:n,parentPath:i},r.children))),n.api.isInline(r)&&(a["data-slate-inline"]=!0),oe.createElement(oe.Fragment,null,s?.({attributes:a,children:o,element:r,path:i}))}const dZ=oe.memo(fZ,(e,t)=>(e.element===t.element||e.element._memo!==void 0&&e.element._memo===t.element._memo)&&WU(e.decorations,t.decorations));function hZ({decorations:e,editor:t,path:n,text:r={text:""}}){const i=vZ(t),s=cZ(t),a=Fn.decorations(r,e).map(({leaf:o,position:l},u)=>{const f=i({attributes:{"data-slate-leaf":!0},children:oe.createElement("span",{"data-slate-string":!0},o.text===""?"\uFEFF":o.text),leaf:o,leafPosition:l,path:n,text:o});return oe.createElement(oe.Fragment,{key:u},f)});return s({attributes:{"data-slate-node":"text",ref:null},children:a,path:n,text:r})}const pZ=oe.memo(hZ,(e,t)=>Fn.equals(t.text,e.text)&&KU(t.decorations,e.decorations)),mZ=()=>[];function a_({children:e=[],decorate:t=mZ,decorations:n=[],editor:r,parentPath:i=[]}){return oe.createElement(oe.Fragment,null,e.map((s,a)=>{const o=[...i,a];let l=[];const u=r.api.range(o);if(u){l=t([s,o]);for(const f of n){const h=mn.intersection(f,u);h&&l.push(h)}}return Rt.isElement(s)?oe.createElement(dZ,{key:a,decorate:t,decorations:l,editor:r,element:s,path:o}):oe.createElement(pZ,{key:a,decorations:l,editor:r,path:o,text:s})}))}const gZ=(e,t)=>function(r){const{children:i,leaf:s}=r;if(s[t.node.type]){const a=t.render.leaf??e.meta.components?.[t.key],o=a??KP,l=Yc({attributes:{...s.attributes},editor:e,node:s,path:r.path,plugin:t,props:r}),u=a?{}:{as:t.render?.as};return oe.createElement(o,{...u,...l},i)}return i},vZ=(e,{renderLeaf:t}={})=>{const n=[],r=[];return e.meta.pluginCache.node.isLeaf.forEach(i=>{const s=e.getPlugin({key:i});s&&n.push(gZ(e,s))}),e.meta.pluginCache.node.leafProps.forEach(i=>{const s=e.getPlugin({key:i});s&&r.push(s)}),function({attributes:s,...a}){if(n.forEach(f=>{const h=f(a);h!==void 0&&(a.children=h)}),r.forEach(f=>{if(a.leaf[f.node.type]){const h=typeof f.node.leafProps=="function"?f.node.leafProps(a):f.node.leafProps??{};h.className&&(h.className=Ns(a.className,h.className)),s={...s,...h}}}),t)return t({attributes:s,...a});const o=Yc({editor:e,path:a.path,props:{attributes:s,...a}}),l=o.leaf,u=$E(e,l,{isLeaf:!0});return oe.createElement(KP,{...o,attributes:{...o.attributes,...u}})}};var Lb,o_;function yZ(){if(o_)return Lb;o_=1,Lb=i;var e="֑-߿יִ-﷽ﹰ-ﻼ",t="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",n=new RegExp("^[^"+t+"]*["+e+"]"),r=new RegExp("^[^"+e+"]*["+t+"]");function i(s){return s=String(s||""),n.test(s)?"rtl":r.test(s)?"ltr":"neutral"}return Lb}var xZ=yZ();const VE=Rr(xZ);var zb,l_;function bZ(){if(l_)return zb;l_=1;var e=ra(),t=function(){return e.Date.now()};return zb=t,zb}var jb,u_;function wZ(){if(u_)return jb;u_=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return jb=t,jb}var qb,c_;function EZ(){if(c_)return qb;c_=1;var e=wZ(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return qb=n,qb}var $b,f_;function CZ(){if(f_)return $b;f_=1;var e=EZ(),t=Ji(),n=Dm(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var h=s.test(u);return h||a.test(u)?o(u.slice(2),h?2:8):i.test(u)?r:+u}return $b=l,$b}var Vb,d_;function GP(){if(d_)return Vb;d_=1;var e=Ji(),t=bZ(),n=CZ(),r="Expected a function",i=Math.max,s=Math.min;function a(o,l,u){var f,h,m,g,b,y,E=0,C=!1,x=!1,S=!0;if(typeof o!="function")throw new TypeError(r);l=n(l)||0,e(u)&&(C=!!u.leading,x="maxWait"in u,m=x?i(n(u.maxWait)||0,l):m,S="trailing"in u?!!u.trailing:S);function O(W){var ee=f,U=h;return f=h=void 0,E=W,g=o.apply(U,ee),g}function _(W){return E=W,b=setTimeout(A,l),C?O(W):g}function w(W){var ee=W-y,U=W-E,fe=l-ee;return x?s(fe,m-U):fe}function T(W){var ee=W-y,U=W-E;return y===void 0||ee>=l||ee<0||x&&U>=m}function A(){var W=t();if(T(W))return P(W);b=setTimeout(A,w(W))}function P(W){return b=void 0,S&&f?O(W):(f=h=void 0,g)}function I(){b!==void 0&&clearTimeout(b),E=0,f=y=h=b=void 0}function F(){return b===void 0?g:P(t())}function M(){var W=t(),ee=T(W);if(f=arguments,h=this,y=W,ee){if(b===void 0)return _(y);if(x)return clearTimeout(b),b=setTimeout(A,l),O(y)}return b===void 0&&(b=setTimeout(A,l)),g}return M.cancel=I,M.flush=F,M}return Vb=a,Vb}var kZ=GP();const DZ=Rr(kZ);var Ub,h_;function SZ(){if(h_)return Ub;h_=1;var e=GP(),t=Ji(),n="Expected a function";function r(i,s,a){var o=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return t(a)&&(o="leading"in a?!!a.leading:o,l="trailing"in a?!!a.trailing:l),e(i,s,{leading:o,maxWait:s,trailing:l})}return Ub=r,Ub}var _Z=SZ();const AZ=Rr(_Z);function Nd(e){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}function TZ(e,t){if(Nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NZ(e){var t=TZ(e,"string");return Nd(t)=="symbol"?t:t+""}function r0(e,t,n){return(t=NZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var YP=globalThis.Node,OZ=globalThis.Text;const UE=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,BZ=e=>ss(e)&&e.nodeType===8,Ki=e=>ss(e)&&e.nodeType===1,ss=e=>{const t=UE(e);return!!t&&e instanceof t.Node},Mp=e=>{const t=e&&e.anchorNode&&UE(e.anchorNode);return!!t&&e instanceof t.Selection},JP=e=>ss(e)&&e.nodeType===3,PZ=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,RZ=e=>{let[t,n]=e;if(Ki(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=XP(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},XP=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(BZ(i)||Ki(i)&&i.childNodes.length===0||Ki(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},IZ=(e,t,n)=>{const[r]=XP(e,t,n);return r},QP=e=>{let t="";if(JP(e)&&e.nodeValue)return e.nodeValue;if(Ki(e)){var n;if(e.hasAttribute("data-slate-spacer")||e.tagName==="BR"&&((n=e.parentElement)===null||n===void 0?void 0:n.getAttribute("data-slate-zero-width"))==="n")return t;for(const a of Array.from(e.childNodes))t+=QP(a);const r=getComputedStyle(e).getPropertyValue("display"),i=r==="block"||r==="list",s=!!e.closest('[data-slate-inline="true"]');(e.tagName==="BR"||i&&!s)&&(t+=` +`)}return t},MZ=/<[^>]*\sdata-slate-fragment="([^"]+)"/m,LZ=e=>{const t=e.getData("text/html"),[,n]=t.match(MZ)||[];return n},Gs=e=>e.getSelection!=null?e.getSelection():document.getSelection(),HE=(e,t,n)=>{const{target:r}=t;if(Ki(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:i}=Pt.getWindow(e);if(ou(i,r))return Pt.hasDOMNode(e,r,{editable:!0});const s=n.find(({addedNodes:a,removedNodes:o})=>{for(const l of a)if(l===r||ou(l,r))return!0;for(const l of o)if(l===r||ou(l,r))return!0});return!s||s===t?!1:HE(e,s,n)},zZ=()=>{let e=document.activeElement;for(;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(n=e.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var t,n,r;e=(r=e)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return e},p_=(e,t)=>!!(e.compareDocumentPosition(t)&YP.DOCUMENT_POSITION_PRECEDING),jZ=(e,t)=>!!(e.compareDocumentPosition(t)&YP.DOCUMENT_POSITION_FOLLOWING),$l=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},ou=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var Hb,Wb;const qZ=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m_=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),fi=typeof navigator<"u"&&/Android/.test(navigator.userAgent),so=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),xa=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),$Z=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ld=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),ZP=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),VZ=fi&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),g_=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),UZ=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),HZ=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent)&&(!ld||ZP),up=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Hb=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Hb!==void 0&&Hb[1]&&parseInt((Wb=navigator.userAgent.match(/Version\/(\d+)/))===null||Wb===void 0?void 0:Wb[1],10)<17);const Go=!ZP&&!VZ&&!$Z&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function";let WZ=0,eR=class{constructor(){r0(this,"id",void 0),this.id=`${WZ++}`}};const nl=new WeakMap,tu=new WeakMap,lu=new WeakMap,tR=new WeakMap,nu=new WeakMap,Kw=new WeakMap,Od=new WeakMap,uu=new WeakMap,Lp=new WeakMap,Bd=new WeakMap,Gw=new WeakMap,rl=new WeakMap,Sa=new WeakMap,ud=new WeakMap,cp=new WeakMap,WE=new WeakMap,Ss=new WeakMap,ao=new WeakMap,$r=new WeakMap,ka=new WeakMap,Ca=new WeakMap,fp=new WeakMap,Pc=Symbol("placeholder"),nR=Symbol("mark-placeholder");function v_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yc(e){for(var t=1;t$r.get(e),androidScheduleFlush:e=>{var t;(t=WE.get(e))===null||t===void 0||t()},blur:e=>{const t=Pt.toDOMNode(e,e),n=Pt.findDocumentOrShadowRoot(e);rl.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Pt.findDocumentOrShadowRoot(e),r=Gs(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Ie.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Pt.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Pt.toSlateNode(e,t.target)}catch(y){if(r)return null;throw y}let l;try{l=Pt.findPath(e,o)}catch(y){if(r)return null;throw y}if(ie.isElement(o)&&L.isVoid(e,o)){const y=a.getBoundingClientRect(),E=e.isInline(o)?i-y.left{if(!y)return null;const E=f.createRange();return E.setStart(y.offsetNode,y.offset),E.setEnd(y.offsetNode,y.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Pt.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=Lp.get(t);return n||(n=new eR,Lp.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=lu.get(r);if(s==null){if(r===e)return n;break}const a=tu.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Zn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(rl.get(e)||!Pt.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Pt.focus(e,{retries:t.retries-1})},10);return}const n=Pt.toDOMNode(e,e),r=Pt.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Pt.toDOMRange(e,e.selection):null;if(e.selection||Ie.select(e,L.start(e,[])),rl.set(e,!0),n.focus({preventScroll:!0}),i){const s=Gs(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=tR.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Pt.isMounted(e))return!1;const i=Pt.toDOMNode(e,e);let s;try{s=Ki(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||$l(s,"[data-slate-editor]")!==i)return!1;const a=$l(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?$l(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&$l(o,"[data-slate-editor]")===i){var l;const u=(l=$l(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||$l(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&$l(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>ss(t)&&Pt.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Pt.hasEditableTarget(e,t)||Pt.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>ss(t)&&Pt.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Sa.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Pt.isComposing(e)?KZ(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,yc(yc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!rl.get(e),isMounted:e=>!!nu.get(e),isReadOnly:e=>!!Gw.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(Gw.get(e)||!Pt.hasTarget(e,t))return!1;const n=Pt.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{var n;const r=t===e?nu.get(e):(n=Bd.get(e))===null||n===void 0?void 0:n.get(Pt.findKey(e,t));if(!r)throw new Error(`Cannot resolve a DOM node from Slate node: ${Zn.stringify(t)}`);return r},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=Bd.get(e))===null||n===void 0?void 0:n.get(Pt.findKey(e,ie.get(e,t.path))),i=r?x_(e,r,t):null;return!i&&GZ(e)&&e.onDOMError(new Error(y_(t))),i},resolveDOMRange:(e,t)=>{const n=Pt.resolveDOMPoint(e,t.anchor),r=Ce.isCollapsed(t)?n:Pt.resolveDOMPoint(e,t.focus);return n&&r?b_(e,n,r,Ce.isBackward(t)):null},resolveEventRange:(e,t)=>Pt.findEventRange(e,t,{suppressThrow:!0}),toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Pt.toDOMNode(e,n),i=x_(e,r,t);if(!i)throw new Error(y_(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Pt.toDOMPoint(e,n),s=Ce.isCollapsed(t)?i:Pt.toDOMPoint(e,r);return b_(e,i,s,Ce.isBackward(t))},toSlateNode:(e,t)=>{let n=Ki(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));const r=n?Od.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:RZ(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Pt.toDOMNode(e,e),x=o.closest('[data-slate-void="true"]'),S=x&&ou(C,x)?x:null,O=o.closest('[contenteditable="false"]'),_=O&&ou(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),T=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Pt.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` +`?0:a);const I=P.cloneContents();[...Array.prototype.slice.call(I.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(I.querySelectorAll("[contenteditable=false]"))].forEach(M=>{if(fi&&!r&&M.hasAttribute("data-slate-zero-width")&&M.textContent.length>0&&M.textContext!=="\uFEFF"){M.textContent.startsWith("\uFEFF")&&(M.textContent=M.textContent.slice(1));return}M.parentNode.removeChild(M)}),f=I.textContent.length,T=u}}else if(S){const A=S.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(_){const A=I=>I?I.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=_.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...A(P?.previousElementSibling),...A(P)].findLast(F=>p_(_,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...A(P),...A(P?.nextElementSibling)].find(F=>jZ(_,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),T=w,l==="forward"?f=0:(f=T.textContent.length,T.querySelectorAll("[data-slate-zero-width]").forEach(I=>{f-=I.textContent.length})))}T&&f===T.textContent.length&&fi&&T.getAttribute("data-slate-zero-width")==="z"&&(h=T.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||so&&(m=T.textContent)!==null&&m!==void 0&&m.endsWith(` + +`))&&f--}if(fi&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Pt.hasDOMNode(e,C,{editable:!0})){const x=Pt.toSlateNode(e,C);let S;try{S=Pt.findPath(e,x)}catch(w){if(i)return null;throw w}let{path:O,offset:_}=L.start(e,S);return C.querySelector("[data-slate-leaf]")||(_=a),{path:O,offset:_}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let y;try{y=Pt.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Pt.findPath(e,y)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=Mp(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(Mp(t)){if(so&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),x=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&x.startContainer instanceof HTMLTableRowElement){let S=function(A){return A.childElementCount>0?S(A.children[0]):A};const O=C.startContainer,_=x.startContainer,w=S(O.children[C.startOffset]),T=S(_.children[x.startOffset]);h=0,T.childNodes.length>0?l=T.childNodes[0]:l=T,w.childNodes.length>0?f=w.childNodes[0]:f=w,T instanceof HTMLElement?u=T.innerHTML.length:u=0}else C.startContainer===f?(l=x.endContainer,u=x.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=x.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;ld&&FZ(l)||so?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);so&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` + +`)&&h===f.textContent.length&&h--;const g=Pt.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=p_(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?yc(yc({},r),{},{text:n}):yc(yc({},r),{},{children:rR(r.children,t.slice(1),n)})),KZ=e=>{var t;const n=Pt.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Pt.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Pt.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=Yd();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=rR(e.children,r.path,s),{view:a,point:r}},GZ=e=>{var t,n;return!!((t=nu.get(e))!==null&&t!==void 0&&t.isConnected)&&!nl.get(e)&&!((n=$r.get(e))!==null&&n!==void 0&&n.length)&&!ka.get(e)},y_=e=>`Cannot resolve a DOM point from Slate point: ${Zn.stringify(e)}`,x_=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const s=Pt.getWindow(e).document.createRange(),[a,o]=r?n:t,[l,u]=r?t:n,h=!!(Ki(a)?a:a.parentElement).getAttribute("data-slate-zero-width"),g=!!(Ki(l)?l:l.parentElement).getAttribute("data-slate-zero-width");return s.setStart(a,h?1:o),s.setEnd(l,g?1:u),s};function YZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Pd(e,t){if(e==null)return{};var n,r,i=YZ(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;rn.slice(0,r.start)+r.text+n.slice(r.end),e)}function XZ(e,t){const n=Math.min(e.length,t.length);for(let r=0;rn.start?n.text.length:0)-i),o=s.slice(r,a),l=Math.max(t.end,n.end-t.text.length+(t.end-t.start));return sR(e,{start:r,end:l,text:o})}function eee(e){const{path:t,diff:n}=e;return{anchor:{path:t,offset:n.start},focus:{path:t,offset:n.end}}}function Yw(e,t){let{path:n,offset:r}=t;if(!L.hasPath(e,n))return null;let i=ie.get(e,n);if(!ie.isText(i))return null;const s=L.above(e,{match:a=>ie.isElement(a)&&L.isBlock(e,a),at:n});if(!s)return null;for(;r>i.text.length;){const a=L.next(e,{at:n,match:ie.isText});if(!a||!le.isDescendant(a[1],s[1]))return null;r-=i.text.length,i=a[0],n=a[1]}return{path:n,offset:r}}function w_(e,t){const n=Yw(e,t.anchor);if(!n)return null;if(Ce.isCollapsed(t))return{anchor:n,focus:n};const r=Yw(e,t.focus);return r?{anchor:n,focus:r}:null}function Jw(e,t,n){const r=$r.get(e),i=r?.find(({path:l})=>le.equals(l,t.path));if(!i||t.offset<=i.diff.start)return an.transform(t,n,{affinity:"backward"});const{diff:s}=i;if(n.type==="insert_node"&&Sn.isText(n.node)&&n.node.text===s.text&&s.start===s.end&&le.equals(n.path,le.next(t.path))&&t.offset<=s.start+s.text.length&&ie.leaf(e,t.path).text.length===s.start)return{path:n.path,offset:t.offset-s.start};if(t.offset<=s.start+s.text.length){const l={path:t.path,offset:s.start},u=an.transform(l,n,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-s.start}:null}const a={path:t.path,offset:t.offset-s.text.length+s.end-s.start},o=an.transform(a,n,{affinity:"backward"});return o?n.type==="split_node"&&le.equals(n.path,t.path)&&a.offset=r.end?e:t.offset<=r.start?{diff:{start:t.text.length+r.start,end:t.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+t.text.length,text:r.text},id:i,path:n};case"remove_text":return!le.equals(t.path,n)||t.offset>=r.end?e:t.offset+t.text.length<=r.start?{diff:{start:r.start-t.text.length,end:r.end-t.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-t.text.length,text:r.text},id:i,path:n};case"split_node":return!le.equals(t.path,n)||t.position>=r.end?{diff:r,id:i,path:le.transform(n,t,{affinity:"backward"})}:t.position>r.start?{diff:{start:r.start,end:Math.min(t.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-t.position,end:r.end-t.position,text:r.text},id:i,path:le.transform(n,t,{affinity:"forward"})};case"merge_node":return le.equals(t.path,n)?{diff:{start:r.start+t.position,end:r.end+t.position,text:r.text},id:i,path:le.transform(n,t)}:{diff:r,id:i,path:le.transform(n,t)}}const s=le.transform(n,t);return s?{diff:r,path:s,id:i}:null}const C_=(e,t)=>{const n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},k_=(e,t,n)=>{try{const r=Pt.toDOMRange(e,t),i=Pt.toDOMRange(e,n),s=r.getBoundingClientRect(),a=i.getBoundingClientRect();return C_(s,a)&&C_(a,s)}catch{return!1}},nee=(e,t)=>{const n=L.range(e,Ce.end(t)),r=Array.from(L.positions(e,{at:t}));let i=0,s=r.length,a=Math.floor(s/2);if(k_(e,L.range(e,r[i]),n))return L.range(e,r[i],n);if(r.length<2)return L.range(e,r[r.length-1],n);for(;a!==r.length&&a!==i;)k_(e,L.range(e,r[a]),n)?s=a:i=a,a=Math.floor((i+s)/2);return L.range(e,r[i],n)};function D_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kb(e){for(var t=1;tlu.has(e)||aR.has(e)||ie.isElement(e)&&e.children.some(oR),lR=e=>ie.isElement(e)?Kb(Kb({},e),{},{children:e.children.map(lR)}):Kb({},e),uR=e=>{aR.add(e),ie.isElement(e)&&e.children.forEach(uR)},Xw=e=>{const t=oR(e)?lR(e):e;return uR(t),t},ree=["children"],iee=["children"],see=["children"];function S_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Es(e){for(var t=1;t{const i=e.querySelector("li")!==null;let s=e;for(let a=Ki(t)?t:t.parentElement;a&&a!==n;a=a.parentElement)if(i&&["OL","UL","LI"].includes(a.nodeName)||r&&a.getAttribute("data-slate-inline")==="true"&&!a.hasAttribute("data-slate-void")){const o=a.cloneNode(!1);o.appendChild(s),s=a.ownerDocument.createDocumentFragment(),s.appendChild(o)}return s},oee=(e,t="x-slate-fragment")=>{const n=e,{apply:r,onChange:i,deleteBackward:s,addMark:a,removeMark:o,insertNodes:l}=n;return n.insertNodes=(u,f)=>{l(ie.isNode(u)?Xw(u):u.map(Xw),f)},Bd.set(n,new WeakMap),n.addMark=(u,f)=>{var h,m;(h=WE.get(n))===null||h===void 0||h(),!Ss.get(n)&&(m=$r.get(n))!==null&&m!==void 0&&m.length&&Ss.set(n,null),ao.delete(n),a(u,f)},n.removeMark=u=>{var f;!Ss.get(n)&&(f=$r.get(n))!==null&&f!==void 0&&f.length&&Ss.set(n,null),ao.delete(n),o(u)},n.deleteBackward=u=>{if(u!=="line")return s(u);if(n.selection&&Ce.isCollapsed(n.selection)){const f=L.above(n,{match:h=>ie.isElement(h)&&L.isBlock(n,h),at:n.selection});if(f){const[,h]=f,m=L.range(n,h,n.selection.anchor),g=nee(n,m);Ce.isCollapsed(g)?s("character"):Ie.delete(n,{at:g})}}},n.apply=u=>{const f=[],h=[],m=$r.get(n);if(m!=null&&m.length){const E=m.map(C=>tee(C,u)).filter(Boolean);$r.set(n,E)}const g=Ca.get(n);g&&Ca.set(n,E_(n,g,u));const b=ka.get(n);if(b!=null&&b.at){const E=Qt.isPoint(b?.at)?Jw(n,b.at,u):E_(n,b.at,u);ka.set(n,E?Es(Es({},b),{},{at:E}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...nc(n,u.path));break}case"set_selection":{var y;(y=ud.get(n))===null||y===void 0||y.unref(),ud.delete(n);break}case"insert_node":case"remove_node":{f.push(...nc(n,le.parent(u.path)));break}case"merge_node":{const E=le.previous(u.path);f.push(...nc(n,E));break}case"move_node":{const E=le.common(le.parent(u.path),le.parent(u.newPath));f.push(...nc(n,E));let C;le.isBefore(u.path,u.newPath)?(f.push(...nc(n,le.parent(u.path))),C=u.newPath):(f.push(...nc(n,le.parent(u.newPath))),C=u.path);const x=ie.get(e,le.parent(C)),S=Pt.findKey(n,x),O=L.pathRef(n,le.parent(C));h.push([O,S]);break}}switch(r(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":case"insert_text":case"remove_text":case"set_selection":nl.set(n,!0)}for(const[E,C]of f){const[x]=L.node(n,E);Lp.set(x,C)}for(const[E,C]of h){if(E.current){const[x]=L.node(n,E.current);Lp.set(x,C)}E.unref()}},n.onDOMError=u=>{typeof globalThis.reportError=="function"?globalThis.reportError(u):setTimeout(()=>{throw u})},n.setFragmentData=u=>{const{selection:f}=n;if(!f)return;const[h,m]=Ce.edges(f),g=L.void(n,{at:h.path}),b=L.void(n,{at:m.path});if(Ce.isCollapsed(f)&&!g)return;const y=Pt.toDOMRange(n,f);let E=y.cloneContents(),C=y.commonAncestorContainer,x=E.childNodes[0];if(E.childNodes.forEach(T=>{T.textContent&&T.textContent.trim()!==""&&(x=T)}),b){const[T]=b,A=y.cloneRange(),P=Pt.toDOMNode(n,T);A.setEndAfter(P),E=A.cloneContents(),C=A.commonAncestorContainer}if(g&&(x=E.querySelector("[data-slate-spacer]")),Array.from(E.querySelectorAll("[data-slate-zero-width]")).forEach(T=>{const A=T.getAttribute("data-slate-zero-width")==="n";T.textContent="",A&&T.appendChild(T.ownerDocument.createElement("br"))}),JP(x)){const T=x.ownerDocument.createElement("span");T.style.whiteSpace="pre",T.appendChild(x),E.appendChild(T),x=T}const S=n.getFragment(),O=JSON.stringify(S),_=window.btoa(encodeURIComponent(O));x.setAttribute("data-slate-fragment",_),u.setData(`application/${t}`,_),E=aee(E,C,Pt.toDOMNode(n,n),!g&&!b);const w=E.ownerDocument.createElement("div");return w.appendChild(E),w.setAttribute("hidden","true"),E.ownerDocument.body.appendChild(w),u.setData("text/html",w.innerHTML),u.setData("text/plain",QP(w)),E.ownerDocument.body.removeChild(w),u},n.insertData=u=>{n.insertFragmentData(u)||n.insertTextData(u)},n.insertFragmentData=u=>{const f=u.getData(`application/${t}`)||LZ(u);if(f){const h=decodeURIComponent(window.atob(f)),m=JSON.parse(h);return n.insertFragment(m),!0}return!1},n.insertTextData=u=>{const f=u.getData("text/plain");if(!f)return!1;const h=f.split(/\r\n|\r|\n/);if(h.length===1)return n.insertText(f),!0;if(lee(n))return uee(n,h),!0;const m=cee(n,h);return m&&n.insertFragment(m),!0},n.onChange=u=>{const f=cp.get(n);f&&f(u),i(u)},n},nc=(e,t)=>{const n=[];for(const[r,i]of L.levels(e,{at:t})){const s=Pt.findKey(e,r);n.push([i,s])}return n},lee=e=>!!e.selection&&!!L.above(e,{at:Ce.start(e.selection),match:t=>Nr.isElement(t)&&L.isInline(e,t)}),uee=(e,t)=>{var n;const r=(n=L.marks(e))!==null&&n!==void 0?n:{},i=t.slice(1,-1);if(e.insertText(t[0]),Ie.splitNodes(e,{always:!0}),i.length&&e.selection){const{anchor:s}=e.selection,[[a,o]]=L.nodes(e,{at:s,match:m=>Nr.isElement(m)&&L.isBlock(e,m),mode:"lowest"}),{children:l}=a,u=Pd(a,ree),f=Array.from(L.nodes(e,{at:s,match:m=>Nr.isElement(m)&&L.isInline(e,m)}),([m])=>{let{children:g}=m;return Pd(m,iee)}),h=m=>f.reduceRight((g,b)=>Es(Es({},b),{},{children:[g]}),Es(Es({},r),{},{text:m}));Ie.insertNodes(e,i.map(m=>Es(Es({},u),{},{children:[h(m)]})),{at:o,select:!1})}e.insertText(t[t.length-1])},cee=(e,t)=>{var n;if(!e.selection)return null;const r=L.above(e,{at:Ce.start(e.selection),match:l=>Nr.isElement(l)&&L.isBlock(e,l),mode:"lowest"});if(!r)return null;const[i]=r,{children:s}=i,a=Pd(i,see),o=(n=L.marks(e))!==null&&n!==void 0?n:{};return t.map(l=>Es(Es({},a),{},{children:[Es(Es({},o),{},{text:l})]}))},fee=3,dee={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},hee={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},pee={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},cr=e=>{const t=dee[e],n=hee[e],r=pee[e],i=t&&As.isHotkey(t),s=n&&As.isHotkey(n),a=r&&As.isHotkey(r);return o=>!!(i&&i(o)||m_&&s&&s(o)||!m_&&a&&a(o))};var Wn={isBold:cr("bold"),isCompose:cr("compose"),isMoveBackward:cr("moveBackward"),isMoveForward:cr("moveForward"),isDeleteBackward:cr("deleteBackward"),isDeleteForward:cr("deleteForward"),isDeleteLineBackward:cr("deleteLineBackward"),isDeleteLineForward:cr("deleteLineForward"),isDeleteWordBackward:cr("deleteWordBackward"),isDeleteWordForward:cr("deleteWordForward"),isExtendBackward:cr("extendBackward"),isExtendForward:cr("extendForward"),isExtendLineBackward:cr("extendLineBackward"),isExtendLineForward:cr("extendLineForward"),isItalic:cr("italic"),isMoveLineBackward:cr("moveLineBackward"),isMoveLineForward:cr("moveLineForward"),isMoveWordBackward:cr("moveWordBackward"),isMoveWordForward:cr("moveWordForward"),isRedo:cr("redo"),isSoftBreak:cr("insertSoftBreak"),isSplitBlock:cr("splitBlock"),isTransposeCharacter:cr("transposeCharacter"),isUndo:cr("undo")};const mee=["anchor","focus"],gee=["anchor","focus"];function __(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function A_(e){for(var t=1;tObject.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),cR=(e,t)=>{const{anchor:n,focus:r}=e,i=Pd(e,mee),{anchor:s,focus:a}=t,o=Pd(t,gee);return e[Pc]===t[Pc]&&vee(i,o)},KE=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n{const r=Array.from(t.children,()=>[]);if(n.length===0)return r;const i=Pt.findPath(e,t),s=i.length,a=L.range(e,i),o=new Array(t.children.length),l=u=>{const f=o[u];if(f)return f;const h=L.range(e,[...i,u]);return o[u]=h,h};for(const u of n){const f=Ce.intersection(a,u);if(!f)continue;const[h,m]=Ce.edges(f),g=h.path[s],b=m.path[s];for(let y=g;y<=b;y++){const E=r[y];if(!E)continue;const C=l(y),x=Ce.intersection(C,u);x&&E.push(A_(A_({},u),x))}}return r};var cu=[],xee=function(){return cu.some(function(e){return e.activeTargets.length>0})},bee=function(){return cu.some(function(e){return e.skippedTargets.length>0})},T_="ResizeObserver loop completed with undelivered notifications.",wee=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:T_}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=T_),window.dispatchEvent(e)},Rd;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Rd||(Rd={}));var fu=function(e){return Object.freeze(e)},Eee=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,fu(this)}return e})(),dR=(function(){function e(t,n,r,i){return this.x=t,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,fu(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,i=t.top,s=t.right,a=t.bottom,o=t.left,l=t.width,u=t.height;return{x:n,y:r,top:i,right:s,bottom:a,left:o,width:l,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),GE=function(e){return e instanceof SVGElement&&"getBBox"in e},hR=function(e){if(GE(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,s=i.offsetWidth,a=i.offsetHeight;return!(s||a||e.getClientRects().length)},N_=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Cee=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},cd=typeof window<"u"?window:{},_h=new WeakMap,O_=/auto|scroll/,kee=/^tb|vertical/,Dee=/msie|trident/i.test(cd.navigator&&cd.navigator.userAgent),ya=function(e){return parseFloat(e||"0")},Dc=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new Eee((n?t:e)||0,(n?e:t)||0)},B_=fu({devicePixelContentBoxSize:Dc(),borderBoxSize:Dc(),contentBoxSize:Dc(),contentRect:new dR(0,0,0,0)}),pR=function(e,t){if(t===void 0&&(t=!1),_h.has(e)&&!t)return _h.get(e);if(hR(e))return _h.set(e,B_),B_;var n=getComputedStyle(e),r=GE(e)&&e.ownerSVGElement&&e.getBBox(),i=!Dee&&n.boxSizing==="border-box",s=kee.test(n.writingMode||""),a=!r&&O_.test(n.overflowY||""),o=!r&&O_.test(n.overflowX||""),l=r?0:ya(n.paddingTop),u=r?0:ya(n.paddingRight),f=r?0:ya(n.paddingBottom),h=r?0:ya(n.paddingLeft),m=r?0:ya(n.borderTopWidth),g=r?0:ya(n.borderRightWidth),b=r?0:ya(n.borderBottomWidth),y=r?0:ya(n.borderLeftWidth),E=h+u,C=l+f,x=y+g,S=m+b,O=o?e.offsetHeight-S-e.clientHeight:0,_=a?e.offsetWidth-x-e.clientWidth:0,w=i?E+x:0,T=i?C+S:0,A=r?r.width:ya(n.width)-w-_,P=r?r.height:ya(n.height)-T-O,I=A+E+_+x,F=P+C+O+S,M=fu({devicePixelContentBoxSize:Dc(Math.round(A*devicePixelRatio),Math.round(P*devicePixelRatio),s),borderBoxSize:Dc(I,F,s),contentBoxSize:Dc(A,P,s),contentRect:new dR(h,l,A,P)});return _h.set(e,M),M},mR=function(e,t,n){var r=pR(e,n),i=r.borderBoxSize,s=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Rd.DEVICE_PIXEL_CONTENT_BOX:return a;case Rd.BORDER_BOX:return i;default:return s}},See=(function(){function e(t){var n=pR(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=fu([n.borderBoxSize]),this.contentBoxSize=fu([n.contentBoxSize]),this.devicePixelContentBoxSize=fu([n.devicePixelContentBoxSize])}return e})(),gR=function(e){if(hR(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},_ee=function(){var e=1/0,t=[];cu.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(u){var f=new See(u.target),h=gR(u.target);o.push(f),u.lastReportedSize=mR(u.target,u.observedBox),he?n.activeTargets.push(i):n.skippedTargets.push(i))})})},Aee=function(){var e=0;for(P_(e);xee();)e=_ee(),P_(e);return bee()&&wee(),e>0},Gb,vR=[],Tee=function(){return vR.splice(0).forEach(function(e){return e()})},Nee=function(e){if(!Gb){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Tee()}).observe(n,r),Gb=function(){n.textContent="".concat(t?t--:t++)}}vR.push(e),Gb()},Oee=function(e){Nee(function(){requestAnimationFrame(e)})},dp=0,Bee=function(){return!!dp},Pee=250,Ree={attributes:!0,characterData:!0,childList:!0,subtree:!0},R_=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],F_=function(e){return e===void 0&&(e=0),Date.now()+e},Yb=!1,Fee=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=Pee),!Yb){Yb=!0;var r=F_(t);Oee(function(){var i=!1;try{i=Aee()}finally{if(Yb=!1,t=r-F_(),!Bee())return;i?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ree)};document.body?n():cd.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),R_.forEach(function(n){return cd.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),R_.forEach(function(n){return cd.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),Qw=new Fee,I_=function(e){!dp&&e>0&&Qw.start(),dp+=e,!dp&&Qw.stop()},Iee=function(e){return!GE(e)&&!Cee(e)&&getComputedStyle(e).display==="inline"},Mee=(function(){function e(t,n){this.target=t,this.observedBox=n||Rd.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=mR(this.target,this.observedBox,!0);return Iee(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Lee=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),Ah=new WeakMap,M_=function(e,t){for(var n=0;n=0&&(s&&cu.splice(cu.indexOf(r),1),r.observationTargets.splice(i,1),I_(-1))},e.disconnect=function(t){var n=this,r=Ah.get(t);r.observationTargets.slice().forEach(function(i){return n.unobserve(t,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e})(),zee=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Th.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!N_(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Th.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!N_(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Th.unobserve(this,t)},e.prototype.disconnect=function(){Th.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();function jee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function zp(e,t){if(e==null)return{};var n,r,i=jee(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r{const e=Z.useContext(YE);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the component's context.");return e},Ve=Pt;function L_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nh(e){for(var t=1;t{},Gee=e=>e?.constructor.name==="DataTransfer",yR=new WeakMap;function Yee({editor:e,scheduleOnDOMSelectionChange:t,onDOMSelectionChange:n}){let r=!1,i=!1,s=null,a=null,o=null,l=0,u=!1,f=!1,h=0,m=!1;const g=()=>{const j=Ca.get(e);if(Ca.delete(e),j){const{selection:Q}=e,re=w_(e,j);re&&(!Q||!Ce.equals(re,Q))&&Ie.select(e,re)}},b=()=>{const{children:j}=e;if(y(),f&&e.children===j){var Q;(Q=fp.get(e))===null||Q===void 0||Q()}f=!1},y=()=>{const j=ka.get(e);if(ka.delete(e),!!j){if(j.at){const Q=Qt.isPoint(j.at)?Yw(e,j.at):w_(e,j.at);if(!Q)return;const re=L.range(e,Q);(!e.selection||!Ce.equals(e.selection,re))&&Ie.select(e,Q)}j.run()}},E=()=>{if(!Sa.get(e)||u)return!1;try{const j=Ve.toDOMNode(e,e),{activeElement:Q}=Ve.getWindow(e).document;if(Q!==j&&!j.contains(Q))return!1}catch{}return Date.now()-l{var j;return!!((j=$r.get(e))!==null&&j!==void 0&&j.some(({path:Q})=>{try{return ie.leaf(e,Q).text.length===0}catch{return!1}}))},x=()=>C()||M()&&Ss.get(e)!==void 0,S=()=>{if(a&&(clearTimeout(a),a=null),o&&(clearTimeout(o),o=null),!i&&E()&&x()){a=setTimeout(S,Wee);return}if(!M()&&!F()){g();return}r||(r=!0,setTimeout(()=>r=!1)),F()&&(r="action");const j=e.selection&&L.rangeRef(e,e.selection,{affinity:"forward"});ao.set(e,e.marks),Kee("flush",ka.get(e),$r.get(e));let Q=M(),re;for(;re=(K=$r.get(e))===null||K===void 0?void 0:K[0];){var K,Be;const je=Ss.get(e);je!==void 0&&(Ss.delete(e),e.marks=je),je&&m===!1&&(m=null);const Fe=eee(re);(!e.selection||!Ce.equals(e.selection,Fe))&&Ie.select(e,Fe),re.diff.text?L.insertText(e,re.diff.text):L.deleteFragment(e),$r.set(e,(Be=$r.get(e))===null||Be===void 0?void 0:Be.filter(({id:Me})=>Me!==re.id)),JZ(e,re)||(Q=!1,ka.delete(e),ao.delete(e),r="action",Ca.delete(e),t.cancel(),n.cancel(),j?.unref())}const ze=j?.unref();if(ze&&!Ca.get(e)&&(!e.selection||!Ce.equals(ze,e.selection))&&Ie.select(e,ze),F()){b();return}Q&&t(),t.flush(),n.flush(),g();const $e=ao.get(e);ao.delete(e),$e!==void 0&&$e!==e.marks&&(e.marks=$e,e.onChange())},O=()=>{if(!(r||!E()||!x())){i=!0;try{S()}finally{i=!1}}},_=j=>{if(s&&clearTimeout(s),x()&&!r){MN.flushSync(()=>{Sa.set(e,!1),S()}),T();return}s=setTimeout(()=>{if(Sa.set(e,!1),S(),u){var Q;(Q=fp.get(e))===null||Q===void 0||Q()}T()},Vee)},w=j=>{Sa.set(e,!0),l=Date.now(),u=!1,s&&(clearTimeout(s),s=null)},T=(j=!1)=>{const Q=Kw.get(e);if(Q){if(M()||j){Q.style.display="none";return}Q.style.removeProperty("display")}},A=(j,Q)=>{var re;const K=(re=$r.get(e))!==null&&re!==void 0?re:[];$r.set(e,K);const Be=ie.leaf(e,j),ze=K.findIndex(je=>le.equals(je.path,j));if(ze<0){sR(Be.text,Q)&&K.push({path:j,diff:Q,id:h++}),T();return}const $e=ZZ(Be.text,K[ze].diff,Q);if(!$e){K.splice(ze,1),T();return}K[ze]=Nh(Nh({},K[ze]),{},{diff:$e})},P=(j,{at:Q}={})=>{m=!1,Ca.delete(e),t.cancel(),n.cancel(),F()&&S(),o&&clearTimeout(o),ka.set(e,{at:Q,run:j}),o=setTimeout(S)},I=j=>{a&&(clearTimeout(a),a=null);const Q=nl.get(e),{inputType:re}=j;if(re==="insertCompositionText"||re==="deleteCompositionText")if(l=Date.now(),j.data)u=!1;else{u=!0;const Oe=$r.get(e);Oe!=null&&Oe.length&&Oe.every(({path:we})=>{try{return ie.leaf(e,we).text.length===0}catch{return!1}})&&($r.set(e,[]),Ca.delete(e))}let K=null;const Be=j.dataTransfer||j.data||void 0;m!==!1&&re!=="insertText"&&re!=="insertCompositionText"&&(m=!1);let[ze]=j.getTargetRanges();ze&&!Q&&(K=Ve.toSlateRange(e,ze,{exactMatch:!1,suppressThrow:!0}));const je=Ve.getWindow(e).getSelection();if(!K&&je&&!Q&&(ze=je,K=Ve.toSlateRange(e,je,{exactMatch:!1,suppressThrow:!0})),K=K??e.selection,!K)return;let Fe=!0;if(re.startsWith("delete")){const Oe=re.endsWith("Backward")?"backward":"forward";let[se,we]=Ce.edges(K),[_e,Ee]=L.leaf(e,se.path);if(Ce.isExpanded(K)&&_e.text.length===se.offset&&we.offset===0){const ut=L.next(e,{at:se.path,match:ie.isText});ut&&le.equals(ut[1],we.path)&&(Oe==="backward"?(K={anchor:we,focus:we},se=we,[_e,Ee]=ut):(K={anchor:se,focus:se},we=se))}const qe={text:"",start:se.offset,end:we.offset},Ue=$r.get(e),tt=Ue?.find(ut=>le.equals(ut.path,Ee)),rt=tt?[tt.diff,qe]:[qe];if(iR(_e.text,...rt).length===0&&(Fe=!1),Ce.isExpanded(K)){if(Fe&&le.equals(K.anchor.path,K.focus.path)){const ut={path:K.anchor.path,offset:se.offset},Ht=L.range(e,ut,ut);U(Ht),A(K.anchor.path,{text:"",end:we.offset,start:se.offset}),re==="deleteContentBackward"&&ne();return}return P(()=>L.deleteFragment(e,{direction:Oe}),{at:K})}}switch(re){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return P(()=>L.deleteFragment(e),{at:K});case"deleteContent":case"deleteContentForward":{const{anchor:Oe}=K;if(Fe&&Ce.isCollapsed(K)){const se=ie.leaf(e,Oe.path);if(Oe.offsetL.deleteForward(e),{at:K})}case"deleteContentBackward":{var Me;const{anchor:Oe}=K,se=Mp(ze)?ze.isCollapsed:!!((Me=ze)!==null&&Me!==void 0&&Me.collapsed);if(Fe&&se&&Ce.isCollapsed(K)&&Oe.offset>0){A(Oe.path,{text:"",start:Oe.offset-1,end:Oe.offset}),ne();return}return P(()=>L.deleteBackward(e),{at:K})}case"deleteEntireSoftLine":return P(()=>{L.deleteBackward(e,{unit:"line"}),L.deleteForward(e,{unit:"line"})},{at:K});case"deleteHardLineBackward":return P(()=>L.deleteBackward(e,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return P(()=>L.deleteBackward(e,{unit:"line"}),{at:K});case"deleteHardLineForward":return P(()=>L.deleteForward(e,{unit:"block"}),{at:K});case"deleteSoftLineForward":return P(()=>L.deleteForward(e,{unit:"line"}),{at:K});case"deleteWordBackward":return P(()=>L.deleteBackward(e,{unit:"word"}),{at:K});case"deleteWordForward":return P(()=>L.deleteForward(e,{unit:"word"}),{at:K});case"insertLineBreak":return P(()=>L.insertSoftBreak(e),{at:K});case"insertParagraph":return P(()=>L.insertBreak(e),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(Gee(Be))return P(()=>Ve.insertData(e,Be),{at:K});let Oe=Be??"";if(Ss.get(e)&&(Oe=Oe.replace("\uFEFF","")),re==="insertText"&&/.*\n.*\n$/.test(Oe)&&(Oe=Oe.slice(0,-1)),Oe.includes(` +`))return P(()=>{const se=Oe.split(` +`);se.forEach((we,_e)=>{we&&L.insertText(e,we),_e!==se.length-1&&L.insertSoftBreak(e)})},{at:K});if(re==="insertText"&&!Ve.isComposing(e)&&Ce.isCollapsed(K)&&typeof L.insertionPoint=="function"&&!an.equals(L.insertionPoint(e,K.anchor),K.anchor)){var ge;const se=Mp(ze)?ze.anchorNode:(ge=ze)===null||ge===void 0?void 0:ge.startContainer,we=ss(se)&&se.nodeType===3?{node:se,text:se.textContent}:null;return j.preventDefault(),P(()=>{we&&we.node.isConnected&&we.node.textContent!==we.text&&(we.node.textContent=we.text),L.insertText(e,Oe)},{at:K})}if(le.equals(K.anchor.path,K.focus.path)){const[se,we]=Ce.edges(K),_e={start:se.offset,end:we.offset,text:Oe};if(Oe&&m&&re==="insertCompositionText"){const Ee=m.start+m.text.search(/\S|$/);_e.start+_e.text.search(/\S|$/)===Ee+1&&_e.end===m.start+m.text.length?(_e.start-=1,m=null,ne()):m=!1}else re==="insertText"?m===null?m=_e:m&&Ce.isCollapsed(K)&&m.end+m.text.length===se.offset?m=Nh(Nh({},m),{},{text:m.text+Oe}):m=!1:m=!1;if(Fe){const Ee=e.selection;if(A(se.path,_e),Ee){const qe={path:se.path,offset:se.offset+Oe.length};P(()=>{},{at:qe})}return}}return P(()=>L.insertText(e,Oe),{at:K})}}},F=()=>!!ka.get(e),M=()=>{var j;return!!((j=$r.get(e))!==null&&j!==void 0&&j.length)},W=()=>F()||M(),ee=()=>r,U=j=>{Ca.set(e,j),a&&(clearTimeout(a),a=null);const{selection:Q}=e;if(!j)return;const re=!Q||!le.equals(Q.anchor.path,j.anchor.path),K=!Q||!le.equals(Q.anchor.path.slice(0,-1),j.anchor.path.slice(0,-1));(re&&m||K)&&(m=!1),(re||M())&&(a=setTimeout(S,Uee))},fe=()=>{(F()||!M())&&S()},ue=j=>{M()||(T(!0),setTimeout(T))},ne=()=>{F()||(o&&clearTimeout(o),o=setTimeout(S))};return{flush:S,flushDeferredDiffs:O,scheduleFlush:ne,hasPendingDiffs:M,hasPendingAction:F,hasPendingChanges:W,isFlushing:ee,handleUserSelect:U,handleCompositionEnd:_,handleCompositionStart:w,handleDOMBeforeInput:I,handleKeyDown:ue,handleDomMutations:j=>{var Q;if(!M()&&j.some(re=>HE(e,re,j))){if(F()){f=!0;return}(Q=fp.get(e))===null||Q===void 0||Q()}},handleInput:fe}}function Jee(){const e=Z.useRef(!1);return Z.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}const as=up?Z.useLayoutEffect:Z.useEffect;function Xee(e,t,n){const[r]=Z.useState(()=>new MutationObserver(t));as(()=>{r.takeRecords()}),Z.useEffect(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(e.current,n),()=>r.disconnect()},[r,e,n])}const Qee=["node"];function z_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zee(e){for(var t=1;t{let{node:t}=e,n=zp(e,Qee);if(!fi)return null;const r=Bs(),i=Jee(),[s]=Z.useState(()=>Yee(Zee({editor:r},n)));return Xee(t,s.handleDomMutations,ete),WE.set(r,s.scheduleFlush),yR.set(r,s.flushDeferredDiffs),i&&s.flush(),s}:()=>null;function j_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nte(e){for(var t=1;t{const{isLast:t,leaf:n,parent:r,text:i}=e,s=Bs(),a=Ve.findPath(s,i),o=le.parent(a),l=!!n[nR];return s.isVoid(r)?oe.createElement(Jb,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!s.isInline(r)&&L.string(s,o)===""?oe.createElement(Jb,{isLineBreak:!0,isMarkPlaceholder:l}):n.text===""?oe.createElement(Jb,{isMarkPlaceholder:l}):t&&n.text.slice(-1)===` +`?oe.createElement(q_,{isTrailing:!0,text:n.text}):oe.createElement(q_,{text:n.text})},q_=e=>{const{text:t,isTrailing:n=!1}=e,r=Bs(),i=Z.useRef(null),s=()=>`${t??""}${n?` +`:""}`,[a]=Z.useState(s);return as(()=>{var o,l;const u=s();if(i.current&&i.current.textContent!==u){if(fi&&Sa.get(r)){var f;const g=(f=Ve.getWindow(r).getSelection())===null||f===void 0?void 0:f.anchorNode;if(g&&i.current.contains(g))return}i.current.textContent=u}if(so){var h;(h=i.current)===null||h===void 0||h.toggleAttribute("data-slate-trailing",n)}const m=(o=i.current)===null||o===void 0?void 0:o.firstChild;so&&n&&((l=i.current)===null||l===void 0?void 0:l.childNodes.length)===1&&m?.nodeType===3&&m.splitText(t.length)}),oe.createElement(ite,{ref:i},a)},ite=Z.memo(Z.forwardRef((e,t)=>oe.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Jb=e=>{const{length:t=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=e,i={"data-slate-zero-width":n?"n":"z","data-slate-length":t};return r&&(i["data-slate-mark-placeholder"]=!0),oe.createElement("span",nte({},i),"\uFEFF",n?oe.createElement("br",null):null)},ste=(e,t)=>{const n=Object.keys(e).filter(i=>i!=="children"),r=Object.keys(t).filter(i=>i!=="children");return n.length===r.length&&n.every(i=>i in t&&e[i]===t[i])},$_=(e,t)=>e.children[e.children.length-1]===t,xR=(e,t,n,r)=>e===t?!0:ste(e,t)&&$_(e,n)===$_(t,r)&&(r.text!==""||ie.string(e)===""==(ie.string(t)===""));function V_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bR(e){for(var t=1;toe.createElement(fte,bR({},e)),ute=e=>{const{leaf:t,isLast:n,text:r,parent:i,renderPlaceholder:s,renderLeaf:a=lte,leafPosition:o}=e,l=Bs(),u=Z.useRef(null),f=Z.useRef(null),[h,m]=Z.useState(!1),g=Z.useRef(null),b=Z.useCallback(x=>{if(ote(u,x==null),x==null){var S;Kw.delete(l),(S=t.onPlaceholderResize)===null||S===void 0||S.call(t,null)}else{if(Kw.set(l,x),!u.current){const O=window.ResizeObserver||zee;u.current=new O(()=>{var _;(_=t.onPlaceholderResize)===null||_===void 0||_.call(t,x)})}u.current.observe(x),f.current=x}},[f,t,l]);let y=oe.createElement(rte,{isLast:n,leaf:t,parent:i,text:r});const E=!!t[Pc];if(Z.useEffect(()=>(E?g.current||(g.current=setTimeout(()=>{m(!0),g.current=null},ate)):(U_(g),m(!1)),()=>U_(g)),[E,m]),E&&h){const x={children:t.placeholder,attributes:{"data-slate-placeholder":!0,"aria-hidden":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",WebkitUserSelect:"none",textDecoration:"none",WebkitUserModify:xa?"inherit":void 0},contentEditable:!1,ref:b}};y=oe.createElement(oe.Fragment,null,y,s(x))}return a({attributes:{"data-slate-leaf":!0},children:y,leaf:t,text:r,leafPosition:o})},cte=oe.memo(ute,(e,t)=>xR(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Sn.equals(t.leaf,e.leaf)&&t.leaf[Pc]===e.leaf[Pc]),fte=e=>{const{attributes:t,children:n}=e;return oe.createElement("span",bR({},t),n)};function wR(e,t){const[,n]=Z.useReducer(l=>l+1,0),r=Z.useRef(void 0),i=Z.useRef(()=>null),s=Z.useRef(null);let a;try{if(e!==i.current||r.current){const l=e();t(s.current,l)?a=s.current:a=l}else a=s.current}catch(l){throw r.current&&dte(l)&&(l.message+=` +The error may be correlated with this previous error: +${r.current.stack} + +`),l}i.current=e,s.current=a,r.current=void 0;const o=Z.useCallback(()=>{try{const l=i.current();if(t(s.current,l))return;s.current=l}catch(l){l instanceof Error?r.current=l:r.current=new Error(String(l))}n()},[]);return[a,o]}function dte(e){return e instanceof Error}const ER=Z.createContext({}),CR=(e,t)=>{const n=Bs(),{decorate:r,addEventListener:i}=Z.useContext(ER),s=()=>{const u=Ve.findPath(n,e),f=r([e,u]);if(ie.isText(e)){const h=L.range(n,u);return f.flatMap(m=>{const g=Ce.intersection(m,h);return g?[g]:[]})}return f},a=ie.isText(e)?fR:KE,[o,l]=wR(s,a);return as(()=>{const u=i(l);return l(),u},[i,l]),Z.useMemo(()=>[...o,...t],[o,t])},hte=e=>{const[,t]=Z.useReducer(o=>o+1,0),n=Z.useRef(new Set),r=Z.useRef(!1),i=Z.useRef(e);as(()=>{if(i.current=e,n.current.forEach(o=>o()),!r.current){r.current=!0;return}t()},[e]);const s=Z.useCallback(o=>i.current(o),[]),a=Z.useCallback(o=>(n.current.add(o),()=>{n.current.delete(o)}),[]);return Z.useMemo(()=>({decorate:s,addEventListener:a}),[s,a])};function H_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kR(e){for(var t=1;toe.createElement(gte,kR({},e)),mte=e=>{const{decorations:t,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:s,renderText:a=pte,text:o}=e,l=Bs(),u=Z.useRef(null),f=CR(o,t),h=Sn.decorations(o,f),m=Ve.findKey(l,o),g=[];for(let E=0;E{const C=Bd.get(l);E?(C?.set(m,E),uu.set(o,E),Od.set(E,o)):(C?.delete(m),uu.delete(o),u.current&&Od.delete(u.current)),u.current=E},[u,l,m,o])};return a({text:o,children:g,attributes:y})},DR=oe.memo(mte,(e,t)=>xR(e.parent,t.parent,e.text,t.text)&&t.isLast===e.isLast&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&fR(t.decorations,e.decorations)),gte=e=>{const{attributes:t,children:n}=e;return oe.createElement("span",kR({},t),n)};function W_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zw(e){for(var t=1;t{for(const t of e){const n=VE(ie.string(t));if(n!=="neutral")return n}},vte=e=>{var t;const n=lu.get(e),r=tu.get(e);if(!n||r===void 0)return;const i=n.children.slice(0,r).reverse(),s=n.children.slice(r+1);return(t=K_(i))!==null&&t!==void 0?t:K_(s)},yte=e=>oe.createElement(wte,Zw({},e)),xte=e=>{const{decorations:t,element:n,renderElement:r=yte,renderChunk:i,renderPlaceholder:s,renderLeaf:a,renderText:o}=e,l=Bs(),u=ia(),f=l.isInline(n),h=CR(n,t),m=Ve.findKey(l,n),g=Z.useCallback(E=>{const C=Bd.get(l);E?(C?.set(m,E),uu.set(n,E),Od.set(E,n)):(C?.delete(m),uu.delete(n))},[l,m,n]);let b=TR({decorations:h,node:n,renderElement:r,renderChunk:i,renderPlaceholder:s,renderLeaf:a,renderText:o});const y={"data-slate-node":"element",ref:g};if(f&&(y["data-slate-inline"]=!0),!f&&L.hasInlines(l,n)){const E=ie.string(n),C=E===""?vte(n):VE(E);C==="rtl"&&(y.dir=C)}if(L.isVoid(l,n)){y["data-slate-void"]=!0,!u&&f&&(y.contentEditable=!1);const E=f?"span":"div",[[C]]=ie.texts(n);b=oe.createElement(E,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute",userSelect:"none",WebkitUserSelect:"none"}},oe.createElement(DR,{renderPlaceholder:s,decorations:[],isLast:!1,parent:n,text:C})),tu.set(C,0),lu.set(C,n)}return r({attributes:y,children:b,element:n})},bte=oe.memo(xte,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&e.renderText===t.renderText&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&KE(e.decorations,t.decorations)),wte=e=>{const{attributes:t,children:n,element:r}=e,s=Bs().isInline(r)?"span":"div";return oe.createElement(s,Zw(Zw({},t),{},{style:{position:"relative"}}),n)};class Ete{constructor(t,{chunkSize:n,debug:r}){nr(this,"root",void 0),nr(this,"chunkSize",void 0),nr(this,"debug",void 0),nr(this,"reachedEnd",void 0),nr(this,"pointerChunk",void 0),nr(this,"pointerIndex",void 0),nr(this,"pointerIndexStack",void 0),nr(this,"cachedPointerNode",void 0),this.root=t,this.chunkSize=n,this.debug=r??!1,this.pointerChunk=t,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.validateState()}readLeaf(){if(this.reachedEnd)return null;for(;;)if(this.pointerIndex+1=1){this.pointerIndex--,this.cachedPointerNode=void 0;break}else if(this.pointerChunk.type==="root"){this.pointerIndex=-1;return}else this.exitChunk();this.validateState(),this.enterChunkUntilLeaf(!0)}insertBefore(t){this.returnToPreviousLeaf(),this.insertAfter(t),this.readLeaf()}insertAfter(t){if(t.length===0)return;let n=0,r=0;for(;this.pointerChunk.type==="chunk"&&this.pointerIndex===this.pointerSiblings.length-1;){const o=this.chunkSize-this.pointerSiblings.length,l=Math.min(o,t.length);if(l>0){const u=t.splice(0,l);this.rawInsertAfter(u,n)}this.exitChunk(),n++}if(t.length===0)return;const i=this.savePointer();let s=null;if(this.readLeaf())for(;this.pointerChunk.type==="chunk"&&this.pointerIndex===0;){const o=this.chunkSize-this.pointerSiblings.length,l=Math.min(o,t.length);if(l>0){const u=t.splice(-l,l);this.pointerIndex=-1,this.cachedPointerNode=void 0,this.rawInsertAfter(u,r),s||(s=this.savePointer())}this.exitChunk(),r++}this.restorePointer(i);const a=Math.max(n,r);this.rawInsertAfter(t,a),s&&this.restorePointer(s),this.validateState()}remove(){this.pointerSiblings.splice(this.pointerIndex--,1),this.cachedPointerNode=void 0,this.pointerSiblings.length===0&&this.pointerChunk.type==="chunk"?(this.exitChunk(),this.remove()):this.invalidateChunk(),this.validateState()}invalidateChunk(){for(let t=this.pointerChunk;t.type==="chunk";t=t.parent)this.root.modifiedChunks.add(t)}get atStart(){return this.pointerChunk.type==="root"&&this.pointerIndex===-1}get pointerSiblings(){return this.pointerChunk.children}getPointerNode(){return this.reachedEnd||this.pointerIndex===-1?null:this.pointerSiblings[this.pointerIndex]}get pointerNode(){if(this.cachedPointerNode!==void 0)return this.cachedPointerNode;const t=this.getPointerNode();return this.cachedPointerNode=t,t}getChunkPath(t){const n=[];for(let r=t;r.type==="chunk";r=r.parent){const i=r.parent.children.indexOf(r);if(i===-1)return null;n.unshift(i)}return n}savePointer(){if(this.atStart)return"start";if(!this.pointerNode)throw new Error("Cannot save pointer when pointerNode is null");return{chunk:this.pointerChunk,node:this.pointerNode}}restorePointer(t){if(t==="start"){this.pointerChunk=this.root,this.pointerIndex=-1,this.pointerIndexStack=[],this.reachedEnd=!1,this.cachedPointerNode=void 0;return}const{chunk:n,node:r}=t,i=n.children.indexOf(r);if(i===-1)throw new Error("Cannot restore point because saved node is no longer in saved chunk");const s=this.getChunkPath(n);if(!s)throw new Error("Cannot restore point because saved chunk is no longer connected to root");this.pointerChunk=n,this.pointerIndex=i,this.pointerIndexStack=s,this.reachedEnd=!1,this.cachedPointerNode=r,this.validateState()}enterChunk(t){var n;if(((n=this.pointerNode)===null||n===void 0?void 0:n.type)!=="chunk")throw new Error("Cannot enter non-chunk");if(this.pointerIndexStack.push(this.pointerIndex),this.pointerChunk=this.pointerNode,this.pointerIndex=t?this.pointerSiblings.length-1:0,this.cachedPointerNode=void 0,this.validateState(),this.pointerChunk.children.length===0)throw new Error("Cannot enter empty chunk")}enterChunkUntilLeaf(t){for(;((n=this.pointerNode)===null||n===void 0?void 0:n.type)==="chunk";){var n;this.enterChunk(t)}}exitChunk(){if(this.pointerChunk.type==="root")throw new Error("Cannot exit root");const t=this.pointerChunk;this.pointerChunk=t.parent,this.pointerIndex=this.pointerIndexStack.pop(),this.cachedPointerNode=void 0,this.validateState()}rawInsertAfter(t,n){if(t.length===0)return;const r=(u,f,h)=>{if(h===1)return u;const m=[];for(let g=0;g{if(r.type==="chunk"){const{parent:i,children:s}=r;if(!i.children.includes(r))throw new Error(`Debug: Chunk ${r.key.id} has an incorrect parent property`);s.forEach(t)}};if(this.root.children.forEach(t),this.cachedPointerNode!==void 0&&this.cachedPointerNode!==this.getPointerNode())throw new Error("Debug: The cached pointer is incorrect and has not been invalidated");const n=this.getChunkPath(this.pointerChunk);if(!n)throw new Error("Debug: The pointer chunk is not connected to the root");if(!le.equals(this.pointerIndexStack,n))throw new Error(`Debug: The cached index stack [${this.pointerIndexStack.join(", ")}] does not match the path of the pointer chunk [${n.join(", ")}]`)}}class Cte{constructor(t,n){nr(this,"editor",void 0),nr(this,"children",void 0),nr(this,"cachedKeys",void 0),nr(this,"pointerIndex",void 0),this.editor=t,this.children=n,this.cachedKeys=new Array(n.length),this.pointerIndex=0}read(t){if(t===1)return[this.children[this.pointerIndex++]];const n=this.remaining(t);return this.pointerIndex+=t,n}remaining(t){return t===void 0?this.children.slice(this.pointerIndex):this.children.slice(this.pointerIndex,this.pointerIndex+t)}get reachedEnd(){return this.pointerIndex>=this.children.length}lookAhead(t,n){const r=this.children.indexOf(t,this.pointerIndex);if(r>-1)return r-this.pointerIndex;for(let i=this.pointerIndex;i({type:"leaf",node:r,key:this.findKey(r,n+i),index:n+i}))}findKey(t,n){const r=this.cachedKeys[n];if(r)return r;const i=Ve.findKey(this.editor,t);return this.cachedKeys[n]=i,i}}const kte=(e,{chunkTree:t,children:n,chunkSize:r,rerenderChildren:i=[],onInsert:s,onUpdate:a,onIndexChange:o,debug:l})=>{const u=new Ete(t,{chunkSize:r,debug:l}),f=new Cte(e,n);let h;for(;h=u.readLeaf();){const m=f.lookAhead(h.node,h.key),g=m>0&&t.movedNodeKeys.has(h.key);if(m===-1||g){u.remove();continue}const b=f.pointerIndex,y=f.read(m+1),E=y.pop();if(y.length){const x=f.toChunkLeaves(y,b);u.insertBefore(x),y.forEach((S,O)=>{s?.(S,b+O)})}const C=f.pointerIndex-1;h.node!==E&&(h.node=E,u.invalidateChunk(),a?.(E,C)),h.index!==C&&(h.index=C,o?.(E,C)),i.includes(C)&&u.invalidateChunk()}if(!f.reachedEnd){const m=f.remaining(),g=f.toChunkLeaves(m,f.pointerIndex);u.returnToPreviousLeaf(),u.insertAfter(g),m.forEach((b,y)=>{s?.(b,f.pointerIndex+y)})}t.movedNodeKeys.clear()};function G_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dte(e){for(var t=1;t{const r=Ve.findKey(e,t);let i=Y_.get(r);return i||(i={type:"root",movedNodeKeys:new Set,modifiedChunks:new Set,children:[]},Y_.set(r,i)),n.reconcile&&kte(e,Dte({chunkTree:i,children:t.children},n.reconcile)),i};function J_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ste(e){for(var t=1;te,_R=e=>{const{root:t,ancestor:n,renderElement:r,renderChunk:i=_te}=e;return n.children.map(s=>{if(s.type==="chunk"){const o=s.key.id,l=i({highest:n===t,lowest:s.children.some(u=>u.type==="leaf"),attributes:{"data-slate-chunk":!0},children:oe.createElement(Tte,{root:t,ancestor:s,renderElement:r,renderChunk:i})});return oe.createElement(Z.Fragment,{key:o},l)}const a=s.node;return r(a,s.index,s.key)})},Ate=e=>(Z.useEffect(()=>{e.root.modifiedChunks.clear()}),oe.createElement(_R,Ste({},e))),Tte=oe.memo(_R,(e,t)=>e.root===t.root&&e.renderElement===t.renderElement&&e.renderChunk===t.renderChunk&&!t.root.modifiedChunks.has(t.ancestor)),AR=Z.createContext(null),Nte=()=>Z.useContext(AR),TR=e=>{const{decorations:t,node:n,renderElement:r,renderChunk:i,renderPlaceholder:s,renderText:a,renderLeaf:o}=e,l=Bs();nl.set(l,!1);const h=ie.isElement(n)&&!l.isInline(n)&&L.hasInlines(l,n)?null:l.getChunkSize(n),m=!!h,{decorationsByChild:g,childrenToRedecorate:b}=Ote(l,n,t);m||n.children.forEach((x,S)=>{tu.set(x,S),lu.set(x,n)});const y=Z.useCallback((x,S,O)=>{const _=O??Ve.findKey(l,x);return oe.createElement(AR.Provider,{key:`provider-${_.id}`,value:x},oe.createElement(bte,{decorations:g[S],element:x,key:_.id,renderElement:r,renderChunk:i,renderPlaceholder:s,renderLeaf:o,renderText:a}))},[l,g,r,i,s,o,a]),E=(x,S)=>{const O=Ve.findKey(l,x);return oe.createElement(DR,{decorations:g[S],key:O.id,isLast:S===n.children.length-1,parent:n,renderPlaceholder:s,renderLeaf:o,renderText:a,text:x})};if(!m)return n.children.map((x,S)=>ie.isText(x)?E(x,S):y(x,S));const C=SR(l,n,{reconcile:{chunkSize:h,rerenderChildren:b,onInsert:(x,S)=>{tu.set(x,S),lu.set(x,n)},onUpdate:(x,S)=>{tu.set(x,S),lu.set(x,n)},onIndexChange:(x,S)=>{tu.set(x,S)}}});return oe.createElement(Ate,{root:C,ancestor:C,renderElement:y,renderChunk:i})},Ote=(e,t,n)=>{const r=yee(e,t,n),i=Z.useRef(r).current,s=[];i.length=r.length;for(let o=0;oZ.useContext(NR),Pm=Z.createContext({}),Bte=(e,t)=>e===t;function Pte(e,t=Bte,{deferred:n}={}){const r=Z.useContext(Pm);if(!r)throw new Error("The `useSlateSelector` hook must be used inside the component's context.");const{addEventListener:i}=r,s=Bs(),a=Z.useCallback(()=>e(s),[s,e]),[o,l]=wR(a,t);return as(()=>{const u=i(l,{deferred:n});return l(),u},[i,l,n]),o}function Rte(){const e=Z.useRef(new Set),t=Z.useRef(new Set),n=Z.useCallback(()=>{e.current.forEach(a=>a())},[]),r=Z.useCallback(()=>{t.current.forEach(a=>a()),t.current.clear()},[]),i=Z.useCallback((a,{deferred:o=!1}={})=>{const l=o?()=>t.current.add(a):a;return e.current.add(l),()=>{e.current.delete(l)}},[]);return{selectorContext:Z.useMemo(()=>({addEventListener:i,flushDeferred:r}),[i,r]),onChange:n}}function Fte(){const{flushDeferred:e}=Z.useContext(Pm);as(e)}const Ite=()=>{const{addEventListener:e}=Z.useContext(Pm),[,t]=Z.useReducer(n=>n+1,0);if(!e)throw new Error("The `useSlate` hook must be used inside the component's context.");return as(()=>e(t),[e]),Bs()};function Mte(){const e=Bs(),t=Z.useRef(!1),n=Z.useRef(0),r=Z.useCallback(()=>{if(t.current)return;t.current=!0;const i=Ve.getWindow(e);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{t.current=!1})},[e]);return Z.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:t,onUserInput:r}}const Lte=e=>Ki(e)&&e.hasAttribute("data-slate-placeholder"),zte=({addedNodes:e,removedNodes:t})=>{const n=[...Array.from(e),...Array.from(t)];return n.length>0&&n.every(Lte)},OR=(e,t)=>{let n=[];const r=()=>{n=[]},i=a=>{if(!t.current)return;const o=a.filter(l=>!zte(l)&&HE(e,l,a));n.push(...o)};function s(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),r())}return{registerMutations:i,restoreDOM:s,clear:r}},jte=e=>{const t=Z.useMemo(()=>{const n=OR(e,{current:!0});let r=null;const i=()=>{var u;(u=r)===null||u===void 0||u.disconnect(),r=null,n.clear()},s=()=>{r??(r=new MutationObserver(n.registerMutations)),r.observe(Ve.toDOMNode(e,e),{childList:!0,subtree:!0})},a=u=>{!r&&!(u!=null&&u.includes(` +`))||s()},o=()=>{r&&(n.registerMutations(r.takeRecords()),r.disconnect())};return{observe:s,track:a,pause:o,restore:()=>{o(),n.restoreDOM()},clear:i}},[e]);return Z.useEffect(()=>()=>t.clear(),[t]),t},X_=(e,t)=>{const n=Ve.resolveDOMRange(e,{anchor:t,focus:t});if(!n)return null;const[r]=Array.from(n.getClientRects());return(r??n.getBoundingClientRect()).top},qte=(e,t)=>{const n=L.above(e,{at:t,match:o=>ie.isElement(o)&&L.isBlock(e,o)});if(!n)return null;const r=L.start(e,n[1]),i=L.before(e,r);if(!i||!L.leaf(e,i)[0].text.endsWith(` +`))return null;if(an.equals(t,r))return i;const s=X_(e,t),a=X_(e,r);return s===null||a===null||Math.abs(s-a)>2?null:i},Q_=(e,t,n)=>{const r=L.above(e,{at:t,match:a=>ie.isElement(a)&&e.isInline(a)});if(!r||e.isVoid(r[0])||e.isElementReadOnly(r[0])||!(n?L.isStart(e,t,r[1]):L.isEnd(e,t,r[1]))||n&&!le.hasPrevious(r[1]))return"character";const i=n?le.previous(r[1]):le.next(r[1]);if(!L.hasPath(e,i))return"character";const s=ie.get(e,i);return ie.isText(s)&&s.text===""?"offset":"character"},$te=e=>ss(e)&&e.nodeType===e.TEXT_NODE,Vte=(e,t)=>{const{selection:n}=e;if(!n||!Ce.isCollapsed(n))return;const r=Gs(Ve.findDocumentOrShadowRoot(e)),i=r?.anchorNode;if(!r||!$te(i))return;const s=r.anchorOffset,a=s-t.length;if(a<0||i.data.slice(a,s)!==t||!Ve.hasDOMNode(e,i,{editable:!0}))return;const o=Ve.findPath(e,Ve.toSlateNode(e,i));le.equals(o,n.anchor.path)&&!L.void(e,{at:n})||i.deleteData(a,t.length)},Z_=(e,t)=>{var n;return(n=L.above(e,{at:t,match:r=>ie.isElement(r)&&L.isBlock(e,r)}))===null||n===void 0?void 0:n[1]},BR=(e,t)=>{const[n,r]=Ce.edges(t),i=Z_(e,n),s=Z_(e,r);return!i||!s||i.length!==1||s.length!==1||i[0]>=s[0]||!L.isStart(e,n,i)||!L.isStart(e,r,s)?null:Array.from({length:s[0]-i[0]},(a,o)=>[i[0]+o])},Ute=(e,t)=>BR(e,t)?t:L.unhangRange(e,t),eA=(e,t)=>{if(Ce.isCollapsed(t)){const s=L.void(e,{at:t});s&&Ie.removeNodes(e,{at:s[1],voids:!0});return}const n=BR(e,t);if(!n){Ie.select(e,t),L.deleteFragment(e);return}const r=L.pathRef(e,le.next(n[n.length-1]));L.withoutNormalizing(e,()=>{for(const s of[...n].reverse())Ie.removeNodes(e,{at:s})});const i=r.unref();i&&Ie.select(e,L.start(e,i))},Hte={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};let PR=class extends Z.Component{constructor(...t){super(...t),nr(this,"context",null),nr(this,"manager",null),nr(this,"mutationObserver",null)}observe(){var t;const{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,Hte)}componentDidMount(){const{receivedUserInput:t}=this.props,n=this.context;this.manager=OR(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r;const i=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}};nr(PR,"contextType",YE);const Wte=fi?PR:({children:e})=>oe.createElement(oe.Fragment,null,e),e4=new WeakMap,RR=Z.createContext(!1),Kte=()=>Z.useContext(RR),Gte=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderChunk","renderLeaf","renderText","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Yte=["text"];function tA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ba(e){for(var t=1;tss(e)&&e.nodeType===3,Jte=(e,t,n)=>{if(!Ce.isCollapsed(t)||!Ce.isCollapsed(n))return!1;const[r,i]=le.isBefore(t.anchor.path,n.anchor.path)?[t.anchor,n.anchor]:[n.anchor,t.anchor];if(i.offset!==0||!le.equals(le.next(r.path),i.path))return!1;const s=ie.get(e,r.path);return ie.isText(s)&&r.offset===s.text.length},Xte=e=>oe.createElement(oe.Fragment,null,TR(e)),Qte=Z.forwardRef((e,t)=>{const n=Z.useCallback(se=>oe.createElement(ene,ba({},se)),[]),{autoFocus:r,decorate:i=tne,onDOMBeforeInput:s,placeholder:a,readOnly:o=!1,renderElement:l,renderChunk:u,renderLeaf:f,renderText:h,renderPlaceholder:m=n,scrollSelectionIntoView:g=nne,style:b={},as:y="div",disableDefaultStyles:E=!1}=e,C=zp(e,Gte),x=Ite(),[S,O]=Z.useState(!1);as(()=>(e4.set(x,S),()=>{e4.delete(x)}),[x,S]);const _=Z.useRef(null),w=Z.useRef(x.children),T=Z.useRef(x.selection),A=Z.useRef(!1),P=Z.useRef(!1),I=Z.useRef([]),F=Z.useRef(null),[M,W]=Z.useState(),ee=Z.useRef(!1),U=jte(x),fe=Z.useRef(!1),{onUserInput:ue,receivedUserInput:ne}=Mte(),[,me]=Z.useReducer(se=>se+1,0);fp.set(x,me),Gw.set(x,o);const j=Z.useMemo(()=>({isBlurring:!1,isDraggingInternally:!1,isTabbing:!1,pendingSelection:null,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Z.useEffect(()=>{!_.current||!r||(x.children.length>0?Ve.focus(x):_.current.focus())},[r,x]);const Q=Z.useRef(void 0),re=Z.useMemo(()=>AZ(()=>{if(nl.get(x)){re();return}j.pendingSelection=null;const we=Ve.toDOMNode(x,x).getRootNode();if(!ee.current&&xa&&we instanceof ShadowRoot){ee.current=!0,zZ()?document.execCommand("indent"):Ie.deselect(x),ee.current=!1;return}const _e=Q.current;if((fi||!Ve.isComposing(x))&&(!j.isUpdatingSelection||_e!=null&&_e.isFlushing())&&!j.isDraggingInternally){const Ee=Ve.findDocumentOrShadowRoot(x),{activeElement:qe}=Ee,Ue=Ve.toDOMNode(x,x),tt=Gs(Ee);if(qe===Ue?(j.latestElement=qe,rl.set(x,!0)):rl.delete(x),!tt)return Ie.deselect(x);const{anchorNode:rt,focusNode:lt}=tt,ut=Ve.hasEditableTarget(x,rt)||Ve.isTargetInsideNonReadonlyVoid(x,rt),Ht=Ve.hasTarget(x,lt),vt=ss(qe)&&Ue.contains(qe);if(ut&&Ht&&(o||vt||j.isBlurring)){const mt=Ve.toSlateRange(x,tt,{exactMatch:!1,suppressThrow:!0});mt&&(!Ve.isComposing(x)&&!(_e!=null&&_e.hasPendingChanges())&&!(_e!=null&&_e.isFlushing())?tt.isCollapsed&&!nA(rt)&&x.selection&&Ce.equals(mt,x.selection)?rA(x,tt,j):Ie.select(x,mt):_e?.handleUserSelect(mt))}o&&(!ut||!Ht)&&Ie.deselect(x)}},100),[x,o,j]),K=Z.useMemo(()=>DZ(re,0),[re]),Be=Z.useCallback(()=>{const se=Ve.toDOMNode(x,x).getRootNode();K.flush(),xa&&se instanceof ShadowRoot||re(),re.flush()},[x,re,K]);Q.current=tte({node:_,onDOMSelectionChange:re,scheduleOnDOMSelectionChange:K}),as(()=>{var se,we;let _e;_.current&&(_e=UE(_.current))?(tR.set(x,_e),nu.set(x,_.current),uu.set(x,_.current),Od.set(_.current,x)):uu.delete(x);const{selection:Ee}=x,qe=A.current;A.current=!1;const Ue=P.current;P.current=!1;const tt=(qe&&w.current!==x.children||Ue)&&!!Ee&&(!T.current||!Ce.equals(T.current,Ee));w.current=x.children,T.current=Ee;const rt=Ve.findDocumentOrShadowRoot(x),lt=Gs(rt);if(!lt||!Ve.isFocused(x)||(se=Q.current)!==null&&se!==void 0&&se.hasPendingAction())return;const ut=qn=>{const on=lt.type!=="None";if(!Ee&&!on)return;const be=lt.focusNode;let Y;if(so&<.rangeCount>1){const Ye=lt.getRangeAt(0),Hr=lt.getRangeAt(lt.rangeCount-1);Ye.startContainer===be?Y=Hr.endContainer:Y=Ye.startContainer}else Y=lt.anchorNode;const dt=nu.get(x);let ct=!1;if(ou(dt,Y)&&ou(dt,be)&&(ct=!0),on&&ct&&Ee&&!qn){var dn;const Ye=Ve.toSlateRange(x,lt,{exactMatch:!0,suppressThrow:!0});if(Ye&&Ce.equals(Ye,Ee)&&(!j.hasMarkPlaceholder||(dn=Y)!==null&&dn!==void 0&&(dn=dn.parentElement)!==null&&dn!==void 0&&dn.hasAttribute("data-slate-mark-placeholder"))){tt&&g(x,lt.getRangeAt(0));return}}if(Ee&&!Ve.hasRange(x,Ee)){x.selection=Ve.toSlateRange(x,lt,{exactMatch:!1,suppressThrow:!0});return}const rn=j.pendingSelection;if(j.pendingSelection=null,rn&&!qn&&rn.basedOn===Ee&&!(Ee&&Ce.equals(rn.range,Ee))){Ie.select(x,rn.range);return}j.isUpdatingSelection=!0;const Lt=Ee&&Ve.resolveDOMRange(x,Ee);return Lt?(Ve.isComposing(x)&&!fi?lt.rangeCount>0&<.collapseToEnd():Ce.isBackward(Ee)?lt.setBaseAndExtent(Lt.endContainer,Lt.endOffset,Lt.startContainer,Lt.startOffset):lt.setBaseAndExtent(Lt.startContainer,Lt.startOffset,Lt.endContainer,Lt.endOffset),g(x,Lt)):lt.removeAllRanges(),Lt};lt.rangeCount<=1&&ut();const Ht=((we=Q.current)===null||we===void 0?void 0:we.isFlushing())==="action";if(!fi||!Ht){setTimeout(()=>{j.isUpdatingSelection=!1});return}let vt=null;const mt=requestAnimationFrame(()=>{if(Ht){const qn=on=>{const be=nu.get(x);be&&(be.focus(),ut(on))};qn(),vt=setTimeout(()=>{qn(!0),j.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(mt),vt&&clearTimeout(vt)}});const ze=Z.useCallback(se=>{if(o){sA(se,s);return}if(!Ve.hasEditableTarget(x,se.target))return;aA(x,se);const _e=Ve.toDOMNode(x,x).getRootNode();if(ee!=null&&ee.current&&xa&&_e instanceof ShadowRoot){const lt=se.getTargetRanges()[0],ut=new window.Range;ut.setStart(lt.startContainer,lt.startOffset),ut.setEnd(lt.endContainer,lt.endOffset);const Ht=Ve.toSlateRange(x,ut,{exactMatch:!1,suppressThrow:!0});Ht&&Ie.select(x,Ht),se.preventDefault(),se.stopImmediatePropagation();return}if(ue(),A.current=!0,!sA(se,s)){var Ee;if(Q.current)return Q.current.handleDOMBeforeInput(se);Be();const{selection:rt}=x,{inputType:lt}=se,ut=se.dataTransfer||se.data||void 0,Ht=lt==="insertCompositionText"||lt==="deleteCompositionText";if(Ht&&Ve.isComposing(x)){(ld||fe.current)&&U.track(se.data);return}let vt=!1,mt=null;if(lt==="insertText"&&rt&&Ce.isCollapsed(rt)&&se.data&&se.data.length===1&&/[a-z ]/i.test(se.data)&&rt.anchor.offset!==0){vt=!0,(x.marks||typeof L.insertionPoint=="function"&&!an.equals(L.insertionPoint(x,rt.anchor),rt.anchor))&&(vt=!1);const on=Gs(Ve.findDocumentOrShadowRoot(x)),be=on?.anchorNode;if(nA(be)||(vt=!1),!nl.get(x)){const{anchor:Y}=rt,dt=Ve.resolveDOMPoint(x,Y);if(!dt)vt=!1;else{var qe,Ue;const[ct,dn]=dt,rn=(qe=ct.parentElement)===null||qe===void 0?void 0:qe.closest("a"),Lt=Ve.getWindow(x);if(vt&&rn&&Ve.hasDOMNode(x,rn)){var tt;const Ye=Lt?.document.createTreeWalker(rn,NodeFilter.SHOW_TEXT).lastChild();Ye===ct&&((tt=Ye.textContent)===null||tt===void 0?void 0:tt.length)===dn&&(vt=!1)}if(vt&&ct.parentElement&&(Lt==null||(Ue=Lt.getComputedStyle(ct.parentElement))===null||Ue===void 0?void 0:Ue.whiteSpace)==="pre"){const Ye=L.above(x,{at:Y.path,match:Hr=>ie.isElement(Hr)&&L.isBlock(x,Hr)});Ye&&ie.string(Ye[0]).includes(" ")&&(vt=!1)}vt&&Xb(ct)&&(mt=on!=null&&on.isCollapsed&&Xb(be)?[be,on.anchorOffset]:[ct,dn])}}}if((!lt.startsWith("delete")||lt.startsWith("deleteBy"))&&!nl.get(x)){const[on]=se.getTargetRanges();if(on){const be=Ve.toSlateRange(x,on,{exactMatch:!1,suppressThrow:!0});if(!be)vt=!1;else if(!rt||!Ce.equals(rt,be)){vt=!1;const Y=!Ht&&x.selection&&!Jte(x,x.selection,be)&&L.rangeRef(x,x.selection);Ie.select(x,be),Y&&ud.set(x,Y)}vt&&Xb(on.startContainer)&&(mt=[on.startContainer,on.startOffset])}}if(Ht)return;if(vt||(F.current=null,se.preventDefault()),rt&&Ce.isExpanded(rt)&<.startsWith("delete")){const on=lt.endsWith("Backward")?"backward":"forward";L.deleteFragment(x,{direction:on});return}switch(lt){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{L.deleteFragment(x);break}case"deleteContent":case"deleteContentForward":{L.deleteForward(x);break}case"deleteContentBackward":{L.deleteBackward(x);break}case"deleteEntireSoftLine":{L.deleteBackward(x,{unit:"line"}),L.deleteForward(x,{unit:"line"});break}case"deleteHardLineBackward":{L.deleteBackward(x,{unit:"block"});break}case"deleteSoftLineBackward":{L.deleteBackward(x,{unit:"line"});break}case"deleteHardLineForward":{L.deleteForward(x,{unit:"block"});break}case"deleteSoftLineForward":{L.deleteForward(x,{unit:"line"});break}case"deleteWordBackward":{L.deleteBackward(x,{unit:"word"});break}case"deleteWordForward":{L.deleteForward(x,{unit:"word"});break}case"insertLineBreak":L.insertSoftBreak(x);break;case"insertParagraph":{L.insertBreak(x);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(lt==="insertFromComposition"&&Ve.isComposing(x)&&(O(!1),Sa.set(x,!1)),ut?.constructor.name==="DataTransfer")Ve.insertData(x,ut);else if(typeof ut=="string")if(vt){if(F.current=null,mt&&rt){const[on]=L.leaf(x,rt.anchor),[be,Y]=mt;F.current={point:rt.anchor,text:on.text,domNode:be,domOffset:Y,domText:be.data,char:ut}}I.current.push(()=>L.insertText(x,ut))}else L.insertText(x,ut);break}}const qn=(Ee=ud.get(x))===null||Ee===void 0?void 0:Ee.unref();ud.delete(x),qn&&(!x.selection||!Ce.equals(x.selection,qn))&&Ie.select(x,qn)}},[x,ue,s,U,Be,o]),$e=Z.useCallback(se=>{se==null?(re.cancel(),K.cancel(),nu.delete(x),uu.delete(x),_.current&&Go&&_.current.removeEventListener("beforeinput",ze)):Go&&se.addEventListener("beforeinput",ze),_.current=se,typeof t=="function"?t(se):t&&(t.current=se)},[re,K,x,ze,t]);as(()=>{const se=Ve.getWindow(x),we=()=>{const tt=Q.current;if(j.isUpdatingSelection||j.isDraggingInternally||Ve.isComposing(x)||tt!=null&&tt.hasPendingChanges()||tt!=null&&tt.isFlushing()||nl.get(x))return null;const rt=Gs(Ve.findDocumentOrShadowRoot(x));if(!rt||!(Ve.hasEditableTarget(x,rt.anchorNode)||Ve.isTargetInsideNonReadonlyVoid(x,rt.anchorNode))||!Ve.hasTarget(x,rt.focusNode))return null;const lt=Ve.toSlateRange(x,rt,{exactMatch:!1,suppressThrow:!0});return lt?{range:lt,basedOn:x.selection}:null},_e=({target:tt})=>{const rt=tt instanceof HTMLElement?tt:null,lt=rt?.tagName;lt==="INPUT"||lt==="TEXTAREA"||(j.pendingSelection=we(),K())};se.document.addEventListener("selectionchange",_e);const Ee=tt=>{j.isTabbing=tt.key==="Tab"},qe=()=>{j.isTabbing=!1};se.document.addEventListener("keydown",Ee,!0),se.document.addEventListener("keyup",qe,!0),se.document.addEventListener("pointerdown",qe,!0);const Ue=()=>{j.isDraggingInternally=!1};return se.document.addEventListener("dragend",Ue),se.document.addEventListener("drop",Ue),()=>{se.document.removeEventListener("selectionchange",_e),se.document.removeEventListener("keydown",Ee,!0),se.document.removeEventListener("keyup",qe,!0),se.document.removeEventListener("pointerdown",qe,!0),se.document.removeEventListener("dragend",Ue),se.document.removeEventListener("drop",Ue)}},[x,K,j]);const je=i([x,[]]),Fe=hte(i),Me=a&&x.children.length===1&&Array.from(ie.texts(x)).length===1&&ie.string(x)===""&&!S,ge=Z.useCallback(se=>{if(se&&Me){var we;W((we=se.getBoundingClientRect())===null||we===void 0?void 0:we.height)}else W(void 0)},[Me]);if(Me){const se=L.start(x,[]);je.push({[Pc]:!0,placeholder:a,onPlaceholderResize:ge,anchor:se,focus:se})}const{marks:Oe}=x;if(j.hasMarkPlaceholder=!1,x.selection&&Ce.isCollapsed(x.selection)&&Oe){const{anchor:se}=x.selection,we=ie.leaf(x,se.path),{text:_e}=we,Ee=zp(we,Yte);if(!Sn.equals(we,Oe,{loose:!0})){j.hasMarkPlaceholder=!0;const qe=Object.fromEntries(Object.keys(Ee).map(Ue=>[Ue,null]));je.push(ba(ba(ba({[nR]:!0},qe),Oe),{},{anchor:se,focus:se}))}}return Z.useEffect(()=>{setTimeout(()=>{const{selection:se}=x;if(se){const{anchor:we}=se,_e=ie.leaf(x,we.path);if(Oe&&!Sn.equals(_e,Oe,{loose:!0})){Ss.set(x,Oe);return}}Ss.delete(x)})}),Fte(),oe.createElement(NR.Provider,{value:o},oe.createElement(RR.Provider,{value:S},oe.createElement(ER.Provider,{value:Fe},oe.createElement(Wte,{node:_,receivedUserInput:ne},oe.createElement(y,ba(ba({role:o?void 0:"textbox","aria-multiline":o?void 0:!0,"aria-placeholder":Me?a:void 0,translate:"no"},C),{},{spellCheck:Go||!up?C.spellCheck:!1,autoCorrect:Go||!up?C.autoCorrect:"false",autoCapitalize:Go||!up?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!o,zindex:-1,suppressContentEditableWarning:!0,ref:$e,style:ba(ba({},E?{}:ba({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},M?{minHeight:M}:{})),b),onBeforeInput:Z.useCallback(se=>{if(o){$n(se,C.onBeforeInput);return}if(!Go&&!$n(se,C.onBeforeInput)&&Ve.hasSelectableTarget(x,se.target)&&(se.preventDefault(),!Ve.isComposing(x))){const we=se.data;L.insertText(x,we)}},[C.onBeforeInput,x,o]),onInput:Z.useCallback(se=>{if(o){$n(se,C.onInput);return}if(!Ve.hasEditableTarget(x,se.target)||(U.pause(),$n(se,C.onInput)))return;if(Q.current){Q.current.handleInput();return}for(const Ee of I.current)Ee();I.current=[];const we=F.current;if(F.current=null,we){const{point:Ee,text:qe,domNode:Ue,domOffset:tt,domText:rt,char:lt}=we,ut=ie.getIf(x,Ee.path);if(Sn.isText(ut)&&ut.text===qe&&Ue.isConnected&&Ue.data===rt.slice(0,tt)+lt+rt.slice(tt)&&(Ue.deleteData(tt,lt.length),x.selection&&Ce.isCollapsed(x.selection)&&an.equals(x.selection.anchor,Ee))){var _e;(_e=Gs(Ve.findDocumentOrShadowRoot(x)))===null||_e===void 0||_e.collapse(Ue,tt)}}Ve.isFocused(x)||aA(x,se.nativeEvent)},[o,C.onInput,x,U]),onBlur:Z.useCallback(se=>{if(o){$n(se,C.onBlur);return}if(j.isUpdatingSelection||!Ve.hasSelectableTarget(x,se.target)||$n(se,C.onBlur))return;const we=Ve.findDocumentOrShadowRoot(x);if(j.latestElement===we.activeElement)return;const{relatedTarget:_e}=se,Ee=Ve.toDOMNode(x,x);if(_e!==Ee&&!(Ki(_e)&&_e.hasAttribute("data-slate-spacer"))){if(_e!=null&&ss(_e)&&Ve.hasDOMNode(x,_e)){const qe=Ve.toSlateNode(x,_e);if(ie.isElement(qe)&&!x.isVoid(qe))return}j.isBlurring=!0;try{Be()}finally{j.isBlurring=!1}if(xa){const qe=Gs(we);qe?.removeAllRanges()}rl.delete(x)}},[o,j,x,C.onBlur,Be]),onClick:Z.useCallback(se=>{if(Ve.hasTarget(x,se.target)&&Be(),Ve.hasTarget(x,se.target)&&!$n(se,C.onClick)&&ss(se.target)){const _e=Ve.toSlateNode(x,se.target);let Ee;try{Ee=Ve.findPath(x,_e)}catch{return}if(!L.hasPath(x,Ee)||ie.get(x,Ee)!==_e)return;if(se.detail===fee&&Ee.length>=1){let ut=Ee;if(!(ie.isElement(_e)&&L.isBlock(x,_e))){var we;const vt=L.above(x,{match:mt=>ie.isElement(mt)&&L.isBlock(x,mt),at:Ee});ut=(we=vt?.[1])!==null&&we!==void 0?we:Ee.slice(0,1)}const Ht=L.above(x,{at:L.start(x,ut),match:vt=>{var mt;return ie.isElement(vt)&&!!((mt=x.isIsolated)!==null&&mt!==void 0&&mt.call(x,vt))}});if(ut.length>1||Ht){const vt=L.range(x,ut);Ie.select(x,vt);return}}if(o)return;const qe=L.start(x,Ee),Ue=L.end(x,Ee),tt=L.void(x,{at:qe}),rt=L.void(x,{at:Ue}),lt=x.selection&&Ce.isCollapsed(x.selection)&&L.void(x,{at:x.selection.anchor});if(se.shiftKey&<&&!le.isAncestor(lt[1],Ee)&&!(tt&&le.equals(tt[1],lt[1]))){const ut=Ve.resolveEventRange(x,se);if(!ut)return;const Ht=L.start(x,lt[1]),vt=L.end(x,lt[1]),mt=an.isBefore(ut.anchor,Ht)?vt:Ht;Ie.select(x,{anchor:mt,focus:ut.anchor});return}if(tt&&rt&&le.equals(tt[1],rt[1])){if(se.shiftKey&&x.selection){const{anchor:Ht}=x.selection,vt=an.isBefore(Ht,qe)?Ue:qe;Ie.select(x,{anchor:Ht,focus:vt});return}const ut=L.range(x,qe);Ie.select(x,ut)}}},[x,C.onClick,o,Be]),onCompositionEnd:Z.useCallback(se=>{if(o){$n(se,C.onCompositionEnd);return}if(!zf(se)&&Ve.hasSelectableTarget(x,se.target)){var we;Promise.resolve().then(()=>{O(!1),Sa.set(x,!1)}),(we=Q.current)===null||we===void 0||we.handleCompositionEnd(se);const _e=fe.current;if(fe.current=!1,$n(se,C.onCompositionEnd)||fi){U.clear();return}if(_e&&!se.data&&(U.restore(),L.deleteFragment(x)),!xa&&!g_&&!qZ&&!HZ&&!UZ&&se.data){const Ee=Ss.get(x);Ss.delete(x),Ee!==void 0&&(ao.set(x,x.marks),x.marks=Ee),U.restore(),Vte(x,se.data),L.insertText(x,se.data);const qe=ao.get(x);ao.delete(x),qe!==void 0&&(x.marks=qe)}U.clear()}},[o,C.onCompositionEnd,x,U]),onCompositionUpdate:Z.useCallback(se=>{if(o){$n(se,C.onCompositionUpdate);return}Ve.hasSelectableTarget(x,se.target)&&!$n(se,C.onCompositionUpdate)&&!zf(se)&&(Ve.isComposing(x)||(O(!0),Sa.set(x,!0)))},[o,C.onCompositionUpdate,x]),onCompositionStart:Z.useCallback(se=>{if(o){$n(se,C.onCompositionStart);return}if(!zf(se)&&Ve.hasSelectableTarget(x,se.target)){var we;if((we=Q.current)===null||we===void 0||we.handleCompositionStart(se),$n(se,C.onCompositionStart)||fi)return;U.clear(),O(!0),Be();const{selection:_e}=x;if(_e&&Ce.isExpanded(_e)){if(so&&!g_){U.observe(),fe.current=!0;return}L.deleteFragment(x);return}}},[o,C.onCompositionStart,x,U,Be]),onCopy:Z.useCallback(se=>{Ve.hasSelectableTarget(x,se.target)&&!$n(se,C.onCopy)&&!zf(se)&&(se.preventDefault(),Ve.setFragmentData(x,se.clipboardData,"copy"))},[C.onCopy,x]),onCut:Z.useCallback(se=>{if(o){$n(se,C.onCut);return}if(Ve.hasSelectableTarget(x,se.target)&&!$n(se,C.onCut)&&!zf(se)){se.preventDefault(),iA(x),Ve.setFragmentData(x,se.clipboardData,"cut");const{selection:we}=x;if(we)if(Ce.isExpanded(we))eA(x,we);else{const _e=ie.parent(x,we.anchor.path);L.isVoid(x,_e)&&Ie.delete(x)}}},[o,x,C.onCut]),onDragOver:Z.useCallback(se=>{if(o){$n(se,C.onDragOver);return}if(Ve.hasTarget(x,se.target)&&!$n(se,C.onDragOver)){const we=Ve.toSlateNode(x,se.target);ie.isElement(we)&&L.isVoid(x,we)&&se.preventDefault()}},[o,C.onDragOver,x]),onDragStart:Z.useCallback(se=>{if(o){$n(se,C.onDragStart);return}if(Ve.hasTarget(x,se.target)&&!$n(se,C.onDragStart)){const we=Ve.toSlateNode(x,se.target),_e=Ve.findPath(x,we);if(ie.isElement(we)&&L.isVoid(x,we)||L.void(x,{at:_e,voids:!0})){const qe=L.range(x,_e);Ie.select(x,qe)}iA(x),j.isDraggingInternally=!0,Ve.setFragmentData(x,se.dataTransfer,"drag")}},[o,x,C.onDragStart,j]),onDrop:Z.useCallback(se=>{if(o){$n(se,C.onDrop);return}if(Ve.hasTarget(x,se.target)&&!$n(se,C.onDrop)){se.preventDefault();const we=x.selection,_e=Ve.findEventRange(x,se,{suppressThrow:!0}),Ee=se.dataTransfer;if(!_e&&j.isDraggingInternally)return;if(_e){if(Ie.select(x,_e),j.isDraggingInternally&&we){if(Ce.includes(we,_e.anchor))return;if(!L.void(x,{at:_e,voids:!0})){const qe=L.rangeRef(x,_e);eA(x,we);const Ue=qe.unref();Ue&&Ie.select(x,Ue)}}}else!x.selection&&x.children.length>0&&Ie.select(x,L.end(x,[]));Ve.insertData(x,Ee),Ve.isFocused(x)||Ve.focus(x)}},[o,x,C.onDrop,j]),onDragEnd:Z.useCallback(se=>{if(o){$n(se,C.onDragEnd);return}j.isDraggingInternally&&C.onDragEnd&&Ve.hasTarget(x,se.target)&&C.onDragEnd(se)},[o,j,C,x]),onFocus:Z.useCallback(se=>{if(o){$n(se,C.onFocus);return}if(!j.isUpdatingSelection&&Ve.hasEditableTarget(x,se.target)&&!$n(se,C.onFocus)){const we=Ve.toDOMNode(x,x),_e=Ve.findDocumentOrShadowRoot(x);if(j.latestElement=_e.activeElement,so&&se.target!==we){we.focus();return}if(rl.set(x,!0),j.isTabbing&&se.target===we){const Ee=Gs(_e);Ee&&x.selection&&(j.pendingSelection=null,rA(x,Ee,j)),j.isTabbing=!1}}},[o,j,x,C.onFocus]),onKeyDown:Z.useCallback(se=>{if(o){$n(se,C.onKeyDown);return}if(Ve.hasEditableTarget(x,se.target)){var we;(we=Q.current)===null||we===void 0||we.handleKeyDown(se);const{nativeEvent:_e}=se;if(Ve.isComposing(x)&&(_e.isComposing===!1||Zte(x,_e))&&(Sa.set(x,!1),O(!1)),$n(se,C.onKeyDown)||Ve.isComposing(x))return;P.current=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(_e.key);const{selection:Ee}=x,qe=x.children[Ee!==null?Ee.focus.path[0]:0],Ue=VE(ie.string(qe))==="rtl";if(Wn.isRedo(_e)){se.preventDefault();const rt=x;typeof rt.redo=="function"&&rt.redo();return}if(Wn.isUndo(_e)){se.preventDefault();const rt=x;typeof rt.undo=="function"&&rt.undo();return}if((ld||xa)&&_e.key==="ArrowUp"&&!_e.altKey&&!_e.ctrlKey&&!_e.metaKey&&Ee&&(_e.shiftKey||Ce.isCollapsed(Ee))){const rt=qte(x,Ee.focus);if(rt){se.preventDefault(),Ie.select(x,_e.shiftKey?{anchor:Ee.anchor,focus:rt}:rt);return}}if(Wn.isMoveLineBackward(_e)){se.preventDefault(),Ie.move(x,{unit:"line",reverse:!0});return}if(Wn.isMoveLineForward(_e)){se.preventDefault(),Ie.move(x,{unit:"line"});return}if(Wn.isExtendLineBackward(_e)){se.preventDefault(),Ie.move(x,{unit:"line",edge:"focus",reverse:!0});return}if(Wn.isExtendLineForward(_e)){se.preventDefault(),Ie.move(x,{unit:"line",edge:"focus"});return}if(Wn.isMoveBackward(_e)){se.preventDefault(),Ee&&Ce.isCollapsed(Ee)?Ie.move(x,{reverse:!Ue,unit:Q_(x,Ee.focus,!Ue)}):Ie.collapse(x,{edge:Ue?"end":"start"});return}if(Wn.isMoveForward(_e)){se.preventDefault(),Ee&&Ce.isCollapsed(Ee)?Ie.move(x,{reverse:Ue,unit:Q_(x,Ee.focus,Ue)}):Ie.collapse(x,{edge:Ue?"start":"end"});return}const tt=Wn.isMoveWordBackward(_e);if(tt||Wn.isMoveWordForward(_e)){se.preventDefault();const rt=Ve.findDocumentOrShadowRoot(x),lt=Gs(rt);if(lt!=null&<.modify){lt.modify("move",tt?"left":"right","word");const ut=Ve.toSlateRange(x,lt,{exactMatch:!1,suppressThrow:!0});if(ut){Ie.select(x,ut);return}}Ee&&Ce.isExpanded(Ee)&&Ie.collapse(x,{edge:"focus"}),Ie.move(x,{unit:"word",reverse:tt?!Ue:Ue});return}if(Go){if((ld||xa)&&Ee&&(Wn.isDeleteBackward(_e)||Wn.isDeleteForward(_e))&&Ce.isCollapsed(Ee)){const rt=ie.parent(x,Ee.anchor.path);if(ie.isElement(rt)&&L.isVoid(x,rt)&&(L.isInline(x,rt)||L.isBlock(x,rt))){se.preventDefault(),Wn.isDeleteForward(_e)?L.deleteForward(x,{unit:"block"}):L.deleteBackward(x,{unit:"block"});return}}if(xa&&Ee&&Ce.isCollapsed(Ee)){if(Wn.isDeleteBackward(_e)&&L.isStart(x,Ee.anchor,[])){se.preventDefault(),L.deleteBackward(x);return}if(Wn.isDeleteForward(_e)&&L.isEnd(x,Ee.anchor,[])){se.preventDefault(),L.deleteForward(x);return}}}else{if(Wn.isBold(_e)||Wn.isItalic(_e)||Wn.isTransposeCharacter(_e)){se.preventDefault();return}if(Wn.isSoftBreak(_e)){se.preventDefault(),L.insertSoftBreak(x);return}if(Wn.isSplitBlock(_e)){se.preventDefault(),L.insertBreak(x);return}if(Wn.isDeleteBackward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"backward"}):L.deleteBackward(x);return}if(Wn.isDeleteForward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"forward"}):L.deleteForward(x);return}if(Wn.isDeleteLineBackward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"backward"}):L.deleteBackward(x,{unit:"line"});return}if(Wn.isDeleteLineForward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"forward"}):L.deleteForward(x,{unit:"line"});return}if(Wn.isDeleteWordBackward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"backward"}):L.deleteBackward(x,{unit:"word"});return}if(Wn.isDeleteWordForward(_e)){se.preventDefault(),Ee&&Ce.isExpanded(Ee)?L.deleteFragment(x,{direction:"forward"}):L.deleteForward(x,{unit:"word"});return}}}},[o,x,C.onKeyDown]),onPaste:Z.useCallback(se=>{if(o){$n(se,C.onPaste);return}Ve.hasEditableTarget(x,se.target)&&!$n(se,C.onPaste)&&(!Go||PZ(se.nativeEvent)||xa)&&(se.preventDefault(),Ve.insertData(x,se.clipboardData))},[o,x,C.onPaste])}),oe.createElement(Xte,{decorations:je,node:x,renderElement:l,renderChunk:u,renderPlaceholder:m,renderLeaf:f,renderText:h}))))))}),Zte=(e,t)=>{const{selection:n}=e;return!!n&&Ce.isCollapsed(n)&&(Wn.isDeleteBackward(t)||Wn.isDeleteForward(t))&&!!L.void(e,{at:n})},nA=e=>{var t;return ss(e)&&e.nodeType===e.TEXT_NODE&&!!((t=e.parentElement)!==null&&t!==void 0&&t.closest("[data-slate-string], [data-slate-zero-width]"))},rA=(e,t,n)=>{if(!e.selection)return;const r=Ve.resolveDOMRange(e,e.selection);if(!r)return;const i=Ce.isBackward(e.selection);n.isUpdatingSelection=!0,t.setBaseAndExtent(i?r.endContainer:r.startContainer,i?r.endOffset:r.startOffset,i?r.startContainer:r.endContainer,i?r.startOffset:r.endOffset),setTimeout(()=>{n.isUpdatingSelection=!1})},iA=e=>{const{selection:t}=e;if(t&&Ce.isExpanded(t)){const n=Ute(e,t);Ce.equals(n,t)||Ie.select(e,n)}},ene=({attributes:e,children:t})=>oe.createElement("span",ba({},e),t,fi&&oe.createElement("br",null)),tne=()=>[],nne=(e,t)=>{const{selection:n}=e,r=!!n&&Ce.isBackward(n),i=n&&!r&&Ce.isExpanded(n)?L.unhangRange(e,n):n,s=i&&n&&!Ce.equals(i,n)?Ve.toDOMRange(e,i):t.cloneRange();if(s.collapse(r),s.getBoundingClientRect){const a=s.startContainer.parentElement,o=s.getBoundingClientRect();if(o.width===0&&o.height===0&&o.x===0&&o.y===0){const u=a.getBoundingClientRect();if(u.width>0||u.height>0)return}a.getBoundingClientRect=s.getBoundingClientRect.bind(s),wB(a,{scrollMode:"if-needed",block:"nearest",inline:"nearest"}),delete a.getBoundingClientRect}},$n=(e,t)=>{if(!t)return!1;const n=t(e);return n??(e.isDefaultPrevented()||e.isPropagationStopped())},zf=e=>ss(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),sA=(e,t)=>{if(!t)return!1;const n=t(e);return n??e.defaultPrevented},aA=(e,t)=>{const n=e;if(t.inputType==="historyUndo"&&typeof n.undo=="function"){n.undo();return}if(t.inputType==="historyRedo"&&typeof n.redo=="function"){n.redo();return}},FR=Z.createContext(!1),rne=()=>Z.useContext(FR),IR=parseInt(oe.version.split(".")[0],10),ine=["editor","children","onChange","onSelectionChange","onValueChange","initialValue","value"],sne=e=>{const{editor:t,children:n,onChange:r,onSelectionChange:i,onValueChange:s,initialValue:a,value:o}=e,l=zp(e,ine),u=Z.useRef(null),f=Z.useRef(void 0),h=Z.useRef(void 0),m=Z.useRef(void 0);if(o!==void 0&&a!==void 0)throw new Error("[Slate] value and initialValue cannot be used together.");if(o!==void 0&&!ie.isNodeList(o))throw new Error(`[Slate] value is invalid! Expected a list of elements but got: ${Zn.stringify(o)}`);if(u.current!==t){var g;if(!L.isEditor(t))throw new Error(`[Slate] editor is invalid! You passed: ${Zn.stringify(t)}`);if(a===void 0&&o===void 0&&t.children.length===0)throw new Error("[Slate] editor.children is empty and no initialValue was provided. If this is intentional, pass initialValue={[]} to the Slate component.");const _=(g=a??o)!==null&&g!==void 0?g:t.children;if(!ie.isNodeList(_))throw new Error(`[Slate] initialValue is invalid! Expected a list of elements but got: ${Zn.stringify(_)}`);const w=a===void 0&&o===void 0?_:_.map(Xw),T=w.every((A,P)=>A===_[P])?_:w;t.children=T.length>0?T:[{children:[{text:""}]}],Object.assign(t,l),u.current=t,f.current=void 0,h.current=o}const{selectorContext:b,onChange:y}=Rte(),E=Z.useCallback(()=>{const _=t.operations.some(T=>T.type!=="set_selection"),w=_&&t.children===m.current;m.current=void 0,_&&!w&&(f.current=t.children),r&&r(t.children),i&&t.operations.find(T=>T.type==="set_selection")&&i(t.selection),s&&_&&!w&&s(t.children),y()},[t,y,r,i,s]),C=o!==void 0,x=Z.useCallback(()=>{const _=()=>E();return cp.set(t,_),()=>{cp.get(t)===_&&cp.delete(t)}},[t,E]);Z.useEffect(()=>{if(!C)return x()},[C,x]),as(()=>{if(C)return x()},[C,x]),as(()=>{let _;const w=()=>{var T;if(o===void 0)return;if(o===f.current){h.current=o;return}if(o===h.current)return;if(Ve.isComposing(t)||e4.get(t)||ka.get(t)||(T=$r.get(t))!==null&&T!==void 0&&T.length){_=window.requestAnimationFrame(w);return}const A=t.children;h.current=o,Ie.setChildren(t,o),A!==t.children&&(m.current=t.children,y())};return w(),()=>{_!==void 0&&window.cancelAnimationFrame(_)}},[t,o,y]);const[S,O]=Z.useState(Ve.isFocused(t));return Z.useEffect(()=>{O(Ve.isFocused(t))},[t]),as(()=>{const _=()=>O(Ve.isFocused(t));return IR>=17?(document.addEventListener("focusin",_),document.addEventListener("focusout",_),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",_)}):(document.addEventListener("focus",_,!0),document.addEventListener("blur",_,!0),()=>{document.removeEventListener("focus",_,!0),document.removeEventListener("blur",_,!0)})},[t]),oe.createElement(Pm.Provider,{value:b},oe.createElement(YE.Provider,{value:t},oe.createElement(FR.Provider,{value:S},n)))},ane=({suppressThrow:e=!1}={})=>{const t=Nte();if(!t)return!1;const n=Z.useCallback(r=>{if(!r.selection)return!1;try{const i=Ve.findPath(r,t),s=L.range(r,i);return!!Ce.intersection(s,r.selection)}catch(i){if(e)return!1;throw i}},[t,e]);return Pte(n,void 0,{deferred:!0})},one=new Set(["insert_node","move_node","remove_node","set_node"]),lne=(e,t="x-slate-fragment")=>{let n=e;n=oee(n,t);const{onChange:r,apply:i,insertText:s}=n;return n.getChunkSize=()=>null,fi&&(n.insertText=(a,o)=>(Ca.delete(n),s(a,o))),n.onChange=a=>{(IR<18?MN.unstable_batchedUpdates:l=>l())(()=>{r(a)})},n.apply=a=>{if(fi&&one.has(a.type)){var o;(o=yR.get(n))===null||o===void 0||o()}if(a.type==="move_node"){const l=ie.parent(n,a.path);if(!!n.getChunkSize(l)){const f=ie.get(n,a.path),h=SR(n,l),m=Ve.findKey(n,f);h.movedNodeKeys.add(m)}}i(a)},n};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @lightSyntaxTransform + * @noflow + * @nolint + * @preventMunge + * @preserve-invariant-messages + */var Qb,oA;function une(){if(oA)return Qb;oA=1;var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,a=(ne,me)=>{for(var j in me)t(ne,j,{get:me[j],enumerable:!0})},o=(ne,me,j,Q)=>{if(me&&typeof me=="object"||typeof me=="function")for(let re of r(me))!s.call(ne,re)&&re!==j&&t(ne,re,{get:()=>me[re],enumerable:!(Q=n(me,re))||Q.enumerable});return ne},l=(ne,me,j)=>(j=ne!=null?e(i(ne)):{},o(!ne||!ne.__esModule?t(j,"default",{value:ne,enumerable:!0}):j,ne)),u=ne=>o(t({},"__esModule",{value:!0}),ne),f={};a(f,{$dispatcherGuard:()=>A,$makeReadOnly:()=>I,$reset:()=>P,$structuralCheck:()=>ue,c:()=>S,clearRenderCounterRegistry:()=>M,renderCounterRegistry:()=>F,useRenderCounter:()=>U}),Qb=u(f);var h=l(Mc()),{useRef:m,useEffect:g,isValidElement:b}=h,y,E=(y=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?y:h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for("react.memo_cache_sentinel"),x,S=typeof((x=h.__COMPILER_RUNTIME)==null?void 0:x.c)=="function"?h.__COMPILER_RUNTIME.c:function(me){return h.useMemo(()=>{const j=new Array(me);for(let Q=0;Q{O[ne]=()=>{throw new Error(`[React] Unexpected React hook call (${ne}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var _=null;O.useMemoCache=ne=>{if(_==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return _.useMemoCache(ne)};function w(ne){return E.ReactCurrentDispatcher.current=ne,E.ReactCurrentDispatcher.current}var T=[];function A(ne){const me=E.ReactCurrentDispatcher.current;if(ne===0){if(T.push(me),T.length===1&&(_=me),me===O)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");w(O)}else if(ne===1){const j=T.pop();if(j==null)throw new Error("React Compiler internal error: unexpected null in guard stack");T.length===0&&(_=null),w(j)}else if(ne===2)T.push(me),w(_);else if(ne===3){const j=T.pop();if(j==null)throw new Error("React Compiler internal error: unexpected null in guard stack");w(j)}else throw new Error("React Compiler internal error: unreachable block"+ne)}function P(ne){for(let me=0;me{me.count=0})}function W(ne,me){let j=F.get(ne);j==null&&(j=new Set,F.set(ne,j)),j.add(me)}function ee(ne,me){const j=F.get(ne);j?.delete(me)}function U(ne){const me=m(null);me.current!=null&&(me.current.count+=1),g(()=>{if(me.current==null){const j={count:0};W(ne,j),me.current=j}return()=>{me.current!==null&&ee(ne,me.current)}})}var fe=new Set;function ue(ne,me,j,Q,re,K){function Be(je,Fe,Me,ge){const Oe=`${Q}:${K} [${re}] ${j}${Me} changed from ${je} to ${Fe} at depth ${ge}`;fe.has(Oe)||(fe.add(Oe),console.error(Oe))}const ze=2;function $e(je,Fe,Me,ge){if(!(ge>ze)){if(je===Fe)return;if(typeof je!=typeof Fe)Be(`type ${typeof je}`,`type ${typeof Fe}`,Me,ge);else if(typeof je=="object"){const Oe=Array.isArray(je),se=Array.isArray(Fe);if(je===null&&Fe!==null)Be("null",`type ${typeof Fe}`,Me,ge);else if(Fe===null)Be(`type ${typeof je}`,"null",Me,ge);else if(je instanceof Map)if(!(Fe instanceof Map))Be("Map instance","other value",Me,ge);else if(je.size!==Fe.size)Be(`Map instance with size ${je.size}`,`Map instance with size ${Fe.size}`,Me,ge);else for(const[we,_e]of je)Fe.has(we)?$e(_e,Fe.get(we),`${Me}.get(${we})`,ge+1):Be(`Map instance with key ${we}`,`Map instance without key ${we}`,Me,ge);else if(Fe instanceof Map)Be("other value","Map instance",Me,ge);else if(je instanceof Set)if(!(Fe instanceof Set))Be("Set instance","other value",Me,ge);else if(je.size!==Fe.size)Be(`Set instance with size ${je.size}`,`Set instance with size ${Fe.size}`,Me,ge);else for(const we of Fe)je.has(we)||Be(`Set instance without element ${we}`,`Set instance with element ${we}`,Me,ge);else if(Fe instanceof Set)Be("other value","Set instance",Me,ge);else if(Oe||se)if(Oe!==se)Be(`type ${Oe?"array":"object"}`,`type ${se?"array":"object"}`,Me,ge);else if(je.length!==Fe.length)Be(`array with length ${je.length}`,`array with length ${Fe.length}`,Me,ge);else for(let we=0;weZ.useContext(cne);function MR(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&MR(e[r],t[r]),!0):e===t}const dne=Z.createContext({activeScopes:[],hotkeys:[],disableScope:()=>{},enableScope:()=>{},toggleScope:()=>{}}),hne=()=>Z.useContext(dne),LR=new Set(["alt","control","ctrl","meta","mod","shift"]),pne={AltLeft:"alt",AltRight:"alt",ControlLeft:"ctrl",ControlRight:"ctrl",down:"arrowdown",esc:"escape",left:"arrowleft",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",return:"enter",right:"arrowright",ShiftLeft:"shift",ShiftRight:"shift",up:"arrowup"},mne=/key|digit|numpad/;function Rc(e){return(pne[e.trim()]||e.trim()).toLowerCase().replace(mne,"")}function gne(e){return LR.has(e)}function Zb(e,t=","){return e.toLowerCase().split(t)}function e2(e,t="+",n=!1,r){const i=e.toLocaleLowerCase().split(t).map(o=>Rc(o)),s={alt:i.includes("alt"),ctrl:i.includes("ctrl")||i.includes("control"),meta:i.includes("meta"),mod:i.includes("mod"),shift:i.includes("shift"),useKey:n},a=i.filter(o=>!LR.has(o));return{...s,keys:a,description:r}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&jR([Rc(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&qR([Rc(e.code)])})),typeof window<"u"&&window.addEventListener("blur",()=>{il.clear()});const il=new Set;function zR(e){return Array.isArray(e)}function vne(e,t=","){return(zR(e)?e:e.split(t)).every(n=>il.has(n.trim().toLowerCase()))}function jR(e){const t=Array.isArray(e)?e:[e];if(il.has("meta"))for(const n of il)gne(n)||il.delete(n.toLowerCase());for(const n of t)il.add(n.toLowerCase())}function qR(e){const t=Array.isArray(e)?e:[e];if(e==="meta")il.clear();else for(const n of t)il.delete(n.toLowerCase())}const ru={Alt:"Alt",Mod:"Mod",Shift:"Shift"};function yne(e){const t=Z.useRef(void 0);return MR(t.current,e)||(t.current=e),t.current}function xne(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function bne(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function wne(e){return $R(e,["input","textarea","select"])}function $R({target:e},t=!1){const n=e&&e.tagName;return zR(t)?!!(n&&t?.some(r=>r.toLowerCase()===n.toLowerCase())):!!(n&&t&&t)}function Ene(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}const Cne=(e,t,n=!1)=>{const{keys:r,alt:i,ctrl:s,meta:a,mod:o,shift:l,useKey:u}=t,{key:f,altKey:h,code:m,ctrlKey:g,metaKey:b,shiftKey:y}=e,E=Rc(m);if(u&&r?.length===1&&r.includes(f))return!0;if(!r?.includes(E)&&!["alt","control","ctrl","meta","os","shift","unknown"].includes(E))return!1;if(!n){if(i!==h&&E!=="alt"||l!==y&&E!=="shift")return!1;if(o){if(!b&&!g)return!1}else if(a!==b&&E!=="meta"&&E!=="os"||s!==g&&E!=="ctrl"&&E!=="control")return!1}return r&&r.length===1&&r.includes(E)?!0:r?vne(r):!r},lA=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},kne=typeof window>"u"?Z.useEffect:Z.useLayoutEffect;function t4(e,t,n,r){const[i,s]=Z.useState(null),a=Z.useRef(!1),o=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=Z.useMemo(()=>Array.isArray(e)&&e.length>0&&Array.isArray(e[0])?e.map(y=>y.map(E=>E.toString()).join(o?.splitKey||"+")).join(o?.delimiter||","):Array.isArray(e)?e.join(o?.delimiter||","):e,[e,o?.splitKey,o?.delimiter]),u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,f=Z.useCallback(t,u??[]),h=Z.useRef(f);h.current=u?f:t;const m=yne(o),{activeScopes:g}=hne(),b=fne();return kne(()=>{if(m?.enabled===!1||!Ene(g,m?.scopes))return;const y=(S,O=!1)=>{if(!(wne(S)&&!$R(S,m?.enableOnFormTags))){if(i!==null){const _=i.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==i&&!i.contains(_.activeElement)){lA(S);return}}S.target?.isContentEditable&&!m?.enableOnContentEditable||Zb(l,m?.delimiter).forEach(_=>{const w=e2(_,m?.splitKey,m?.useKey);if(Cne(S,w,m?.ignoreModifiers)||w.keys?.includes("*")){if((m?.ignoreEventWhenPrevented??!0)&&S.defaultPrevented||m?.ignoreEventWhen?.(S)||O&&a.current)return;if(!bne(S,w,m?.enabled)){lA(S);return}h.current(S,w),xne(S,w,m?.preventDefault),O||(a.current=!0)}})}},E=S=>{S.code!==void 0&&(jR(Rc(S.code)),(m?.keydown===void 0&&m?.keyup!==!0||m?.keydown)&&y(S))},C=S=>{S.code!==void 0&&(qR(Rc(S.code)),a.current=!1,m?.keyup&&y(S,!0))},x=i||o?.document||document;if(x.addEventListener("keyup",C),x.addEventListener("keydown",E),b)for(const S of Zb(l,m?.delimiter))b.addHotkey(e2(S,m?.splitKey,m?.useKey,m?.description));return()=>{if(x.removeEventListener("keyup",C),x.removeEventListener("keydown",E),b)for(const S of Zb(l,m?.delimiter))b.removeHotkey(e2(S,m?.splitKey,m?.useKey,m?.description))}},[i,l,m,g]),s}const Xr={};let Dne=0;function Gi(e,t){const n=`atom${++Dne}`,r={toString:()=>n};return typeof e=="function"?r.read=e:(r.init=e,r.read=Sne,r.write=_ne),t&&(r.write=t),r}function Sne(e){return e(this)}function _ne(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}const t2=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,n2=e=>"init"in e,r2=e=>!!e.write,jp=new WeakMap,Ane=(e,t)=>{jp.set(e,t),e.catch(()=>{}).finally(()=>jp.delete(e))},uA=(e,t)=>{const n=jp.get(e);n&&(jp.delete(e),n(t))},cA=(e,t)=>{e.status="fulfilled",e.value=t},fA=(e,t)=>{e.status="rejected",e.reason=t},Tne=e=>typeof e?.then=="function",jf=(e,t)=>!!e&&"v"in e&&"v"in t&&Object.is(e.v,t.v),dA=(e,t)=>!!e&&"e"in e&&"e"in t&&Object.is(e.e,t.e),rc=e=>!!e&&"v"in e&&e.v instanceof Promise,Nne=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,Oh=e=>{if("e"in e)throw e.e;return e.v},VR=()=>{const e=new WeakMap,t=new WeakMap,n=[],r=new WeakMap;let i,s;(Xr?"production":void 0)!=="production"&&(i=new Set,s=new Set);const a=A=>e.get(A),o=(A,P)=>{P.d.forEach((I,F)=>{if(!r.has(F)){const M=a(F);r.set(F,[M,new Set]),M&&o(F,M)}r.get(F)[1].add(A)})},l=(A,P)=>{var I;(Xr?"production":void 0)!=="production"&&Object.freeze(P);const F=a(A);if(e.set(A,P),(I=n[n.length-1])==null||I.add(A),r.has(A)||(r.set(A,[F,new Set]),o(A,P)),rc(F)){const M="v"in P?P.v instanceof Promise?P.v:Promise.resolve(P.v):Promise.reject(P.e);F.v!==M&&uA(F.v,M)}},u=(A,P,I,F)=>{const M=new Map(F?P.d:null);let W=!1;I.forEach((ee,U)=>{!ee&&t2(A,U)&&(ee=P),ee?(M.set(U,ee),P.d.get(U)!==ee&&(W=!0)):(Xr?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(W||P.d.size!==M.size)&&(P.d=M)},f=(A,P,I,F)=>{const M=a(A),W={d:M?.d||new Map,v:P};if(I&&u(A,W,I,F),jf(M,W)&&M.d===W.d)return M;if(rc(M)&&rc(W)&&Nne(M,W)){if(M.d===W.d)return M;W.v=M.v}return l(A,W),W},h=(A,P,I,F)=>{if(Tne(P)){let M;const W=()=>{const U=a(A);if(!rc(U)||U.v!==ee)return;const fe=f(A,ee,I);t.has(A)&&U.d!==fe.d&&_(A,fe,U.d)},ee=new Promise((U,fe)=>{let ue=!1;P.then(ne=>{ue||(ue=!0,cA(ee,ne),U(ne),W())},ne=>{ue||(ue=!0,fA(ee,ne),fe(ne),W())}),M=ne=>{ue||(ue=!0,ne.then(me=>cA(ee,me),me=>fA(ee,me)),U(ne))}});return ee.orig=P,ee.status="pending",Ane(ee,U=>{U&&(M(U),F?.())}),f(A,ee,I,!0)}return f(A,P,I)},m=(A,P,I)=>{const F=a(A),M={d:F?.d||new Map,e:P};return I&&u(A,M,I),dA(F,M)&&F.d===M.d?F:(l(A,M),M)},g=(A,P)=>{const I=a(A);if(!P?.(A)&&I&&(t.has(A)||Array.from(I.d).every(([ue,ne])=>{if(ue===A)return!0;const me=g(ue,P);return me===ne||jf(me,ne)})))return I;const F=new Map;let M=!0;const W=ue=>{if(t2(A,ue)){const me=a(ue);if(me)return F.set(ue,me),Oh(me);if(n2(ue))return F.set(ue,void 0),ue.init;throw new Error("no atom init")}const ne=g(ue,P);return F.set(ue,ne),Oh(ne)};let ee,U;const fe={get signal(){return ee||(ee=new AbortController),ee.signal},get setSelf(){return(Xr?"production":void 0)!=="production"&&!r2(A)&&console.warn("setSelf function cannot be used with read-only atom"),!U&&r2(A)&&(U=(...ue)=>{if((Xr?"production":void 0)!=="production"&&M&&console.warn("setSelf function cannot be called in sync"),!M)return C(A,...ue)}),U}};try{const ue=A.read(W,fe);return h(A,ue,F,()=>ee?.abort())}catch(ue){return m(A,ue,F)}finally{M=!1}},b=A=>Oh(g(A)),y=A=>{const P=U=>{var fe,ue;const ne=new Set((fe=t.get(U))==null?void 0:fe.t);return(ue=r.get(U))==null||ue[1].forEach(me=>{ne.add(me)}),ne},I=new Array,F=new Set,M=U=>{if(!F.has(U)){F.add(U);for(const fe of P(U))U!==fe&&M(fe);I.push(U)}};M(A);const W=new Set([A]),ee=U=>F.has(U);for(let U=I.length-1;U>=0;--U){const fe=I[U],ue=a(fe);if(!ue)continue;let ne=!1;for(const me of ue.d.keys())if(me!==fe&&W.has(me)){ne=!0;break}if(ne){const me=g(fe,ee);o(fe,me),jf(ue,me)||W.add(fe)}F.delete(fe)}},E=(A,...P)=>{const I=W=>Oh(g(W)),F=(W,...ee)=>{const U=n.length>0;U||n.push(new Set([W]));let fe;if(t2(A,W)){if(!n2(W))throw new Error("atom not writable");const ue=a(W),ne=h(W,ee[0]);jf(ue,ne)||y(W)}else fe=E(W,...ee);if(!U){const ue=w(n.pop());(Xr?"production":void 0)!=="production"&&i.forEach(ne=>ne({type:"async-write",flushed:ue}))}return fe};return A.write(I,F,...P)},C=(A,...P)=>{n.push(new Set([A]));const I=E(A,...P),F=w(n.pop());return(Xr?"production":void 0)!=="production"&&i.forEach(M=>M({type:"write",flushed:F})),I},x=(A,P,I)=>{var F;const M=t.get(A);if(M)return P&&M.t.add(P),M;const W=I||[];(F=a(A))==null||F.d.forEach((U,fe)=>{fe!==A&&x(fe,A,W)}),g(A);const ee={t:new Set(P&&[P]),l:new Set};if(t.set(A,ee),(Xr?"production":void 0)!=="production"&&s.add(A),r2(A)&&A.onMount){const{onMount:U}=A;W.push(()=>{const fe=U((...ue)=>C(A,...ue));fe&&(ee.u=fe)})}return I||W.forEach(U=>U()),ee},S=(A,P)=>!P.l.size&&(!P.t.size||P.t.size===1&&P.t.has(A)),O=(A,P)=>{if(!S(A,P))return;const I=P.u;I&&I(),t.delete(A),(Xr?"production":void 0)!=="production"&&s.delete(A);const F=a(A);F?(rc(F)&&uA(F.v),F.d.forEach((M,W)=>{if(W!==A){const ee=t.get(W);ee&&(ee.t.delete(A),O(W,ee))}})):(Xr?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",A)},_=(A,P,I)=>{const F=new Set(P.d.keys()),M=new Set;I?.forEach((W,ee)=>{if(F.has(ee)){F.delete(ee);return}M.add(ee);const U=t.get(ee);U&&U.t.delete(A)}),F.forEach(W=>{x(W,A)}),M.forEach(W=>{const ee=t.get(W);ee&&O(W,ee)})},w=A=>{let P;(Xr?"production":void 0)!=="production"&&(P=new Set);const I=[],F=M=>{var W;if(!r.has(M))return;const[ee,U]=r.get(M);r.delete(M),I.push([M,ee]),U.forEach(F),(W=a(M))==null||W.d.forEach((fe,ue)=>F(ue))};if(A.forEach(F),I.forEach(([M,W])=>{const ee=a(M);if(!ee){(Xr?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(ee!==W){const U=t.get(M);U&&ee.d!==W?.d&&_(M,ee,W?.d),U&&!(!rc(W)&&(jf(W,ee)||dA(W,ee)))&&(U.l.forEach(fe=>fe()),(Xr?"production":void 0)!=="production"&&P.add(M))}}),(Xr?"production":void 0)!=="production")return P},T=(A,P)=>{const I=x(A),F=w([A]),M=I.l;return M.add(P),(Xr?"production":void 0)!=="production"&&i.forEach(W=>W({type:"sub",flushed:F})),()=>{M.delete(P),O(A,I),(Xr?"production":void 0)!=="production"&&i.forEach(W=>W({type:"unsub"}))}};return(Xr?"production":void 0)!=="production"?{get:b,set:C,sub:T,dev_subscribe_store:A=>(i.add(A),()=>{i.delete(A)}),dev_get_mounted_atoms:()=>s.values(),dev_get_atom_state:A=>e.get(A),dev_get_mounted:A=>t.get(A),dev_restore_atoms:A=>{n.push(new Set);for(const[I,F]of A)n2(I)&&(h(I,F),y(I));const P=w(n.pop());i.forEach(I=>I({type:"restore",flushed:P}))}}:{get:b,set:C,sub:T}};let qf;const One=()=>(qf||(qf=VR(),(Xr?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=qf),globalThis.__JOTAI_DEFAULT_STORE__!==qf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),qf),n4=VR,Ql=One,Bne={},Pne=Z.createContext(void 0),JE=e=>{const t=Z.useContext(Pne);return e?.store||t||Ql()},Rne=e=>typeof e?.then=="function",Fne=oe.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function UR(e,t){const n=JE(t),[[r,i,s],a]=Z.useReducer(u=>{const f=n.get(e);return Object.is(u[0],f)&&u[1]===n&&u[2]===e?u:[f,n,e]},void 0,()=>[n.get(e),n,e]);let o=r;(i!==n||s!==e)&&(a(),o=n.get(e));const l=t?.delay;return Z.useEffect(()=>{const u=n.sub(e,()=>{if(typeof l=="number"){setTimeout(a,l);return}a()});return a(),u},[n,e,l]),Z.useDebugValue(o),Rne(o)?Fne(o):o}function XE(e,t){const n=JE(t);return Z.useCallback((...i)=>{if((Bne?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function Ine(e,t){return[UR(e,t),XE(e,t)]}const Mne={},i2=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),Lne=new WeakMap,zne=(e,t,n,r)=>{const i=i2(()=>new WeakMap,Lne,t),s=i2(()=>new WeakMap,i,n);return i2(e,s,r)};function HR(e,t,n=Object.is){return zne(()=>{const r=Symbol(),i=([a,o])=>{if(o===r)return t(a);const l=t(a,o);return n(o,l)?o:l},s=Gi(a=>{const o=a(s),l=a(e);return i([l,o])});return s.init=r,s},e,t,n)}const jne=e=>typeof e?.then=="function";function qne(e=()=>{try{return window.localStorage}catch(n){(Mne?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const s={getItem:(l,u)=>{var f,h;const m=b=>{if(b=b||"",r!==b){try{i=JSON.parse(b,t?.reviver)}catch{return u}r=b}return i},g=(h=(f=e())==null?void 0:f.getItem(l))!=null?h:null;return jne(g)?g.then(m):m(g)},setItem:(l,u)=>{var f;return(f=e())==null?void 0:f.setItem(l,JSON.stringify(u,void 0))},removeItem:l=>{var u;return(u=e())==null?void 0:u.removeItem(l)}},a=l=>(u,f,h)=>l(u,m=>{let g;try{g=JSON.parse(m||"")}catch{g=h}f(g)});let o;try{o=(n=e())==null?void 0:n.subscribe}catch{}return!o&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(o=(l,u)=>{if(!(e()instanceof window.Storage))return()=>{};const f=h=>{h.storageArea===e()&&h.key===l&&u(h.newValue)};return window.addEventListener("storage",f),()=>{window.removeEventListener("storage",f)}}),o&&(s.subscribe=a(o)),s}qne();const hA=new WeakMap;function $ne(e,t){const n=JE(t),r=Vne(n);for(const[i,s]of e)(!r.has(i)||t?.dangerouslyForceHydrate)&&(r.add(i),n.set(i,s))}const Vne=e=>{let t=hA.get(e);return t||(t=new WeakSet,hA.set(e,t)),t};var Une=Object.defineProperty,qp=Object.getOwnPropertySymbols,WR=Object.prototype.hasOwnProperty,KR=Object.prototype.propertyIsEnumerable,pA=(e,t,n)=>t in e?Une(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$p=(e,t)=>{for(var n in t||(t={}))WR.call(t,n)&&pA(e,n,t[n]);if(qp)for(var n of qp(t))KR.call(t,n)&&pA(e,n,t[n]);return e},QE=(e,t)=>{var n={};for(var r in e)WR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qp)for(var r of qp(e))t.indexOf(r)<0&&KR.call(e,r)&&(n[r]=e[r]);return n},mA=e=>typeof e=="function"?{__fn:e}:e,Hne=e=>e&&typeof e=="object"&&"__fn"in e?e.__fn:e,Wne=e=>{const t=Gi(mA(e));return Gi(n=>Hne(n(t)),(n,r,i)=>r(t,mA(i)))},Kne=(e,t,n={})=>{const r=oe.useMemo(()=>{const i=[];for(const s of Object.keys(e)){const a=t[s];a!==void 0&&i.push([e[s],a])}return i},[e,t]);$ne(r,n)},Gne=(e,t,{skipInitialValues:n,store:r}={})=>{const i=oe.useMemo(()=>Object.entries(e),[e]),s=oe.useMemo(()=>Gi(null,(l,u,f)=>{const h=f.previousValues;for(const[m,g]of i){const b=f.values[m];b!=null&&(h&&Object.is(h[m],b)||u(g,b))}}),[i]),a=XE(s,{store:r}),o=oe.useRef(n);oe.useEffect(()=>{a({previousValues:o.current,values:t}),o.current=t},[a,t])},Vp=(e,t)=>`${e}:${t}`,r4="provider",i4=oe.createContext(new Map),Yne=(e,t=r4,n=!0)=>{var r;const i=oe.useContext(i4),s=(r=i.get(Vp(e,t)))!=null?r:i.get(Vp(e,r4));return!s&&n&&console.warn(`Tried to access jotai store '${e}' outside of a matching provider.`),s},Jne=e=>{var t=e,{initialValues:n,children:r,store:i,atoms:s}=t,a=QE(t,["initialValues","children","store","atoms"]);const o=$p($p({},n),a);return Kne(s,o,{store:i}),Gne(s,a,{store:i,skipInitialValues:a}),oe.createElement(oe.Fragment,null,r)},Xne=(e,t,n={})=>{const r=n.effect;return i=>{var s=i,{store:a,scope:o,children:l,resetKey:u}=s,f=QE(s,["store","scope","children","resetKey"]);const[h,m]=oe.useState(()=>a??n4()),g=a??h;oe.useEffect(()=>{!a&&u&&m(n4())},[u,a]);const b=oe.useContext(i4),y=oe.useMemo(()=>{const E=new Map(b);return o&&E.set(Vp(e,o),g),E.set(Vp(e,r4),g),E},[b,g,o]);return oe.createElement(i4.Provider,{value:y},oe.createElement(Jne,$p({store:g,atoms:t},f),!!r&&oe.createElement(r,null),l))}},gA=(e="")=>e.length>0?e[0].toUpperCase()+e.slice(1):"",Qne=e=>!!e&&typeof e=="object"&&"read"in e&&typeof e.read=="function",Bh=(e={})=>typeof e=="string"?{scope:e}:e,vA=e=>e,Jc=(e,{name:t,delay:n,effect:r,extend:i,suppressWarnings:s})=>{const a={},o={},l={};function u(F,M){this.options=F,this.store=M}for(const[F,M]of Object.entries(e)){const W=Qne(M)?M:Wne(M);a[F]=W;const ee="write"in W;l[F]=ee,ee&&(o[F]=W)}const f=$p({},a);if(i){const F=i(a);for(const[M,W]of Object.entries(F))f[M]=W,l[M]="write"in W}const h=(F={})=>{const{scope:M,store:W,warnIfNoStore:ee=!s}=Bh(F),U=Yne(t,M,!W&&ee);return W??U},m=(F,M,W,ee=vA,U,fe)=>{var ue,ne;const me=Bh(W),j=typeof U=="function"?U:void 0;fe=(ue=typeof U=="function"?fe:U)!=null?ue:[ee,j];const[Q,re]=oe.useMemo(()=>[ee,j],fe),K=oe.useMemo(()=>Q===vA&&!re?F:HR(F,Q,re),[F,Q,re]);return UR(K,{store:M,delay:(ne=me.delay)!=null?ne:n})},g=(F,M,W)=>(M??Ql()).get(F),b=(F,M,W)=>XE(F,{store:M}),y=(F,M,W)=>(...ee)=>(M??Ql()).set(F,...ee),E=(F,M,W)=>{const{delay:ee=n}=Bh(W);return Ine(F,{store:M,delay:ee})},C=(F,M,W)=>ee=>{M??(M=Ql());const U=M.sub(F,()=>{ee(M.get(F))});return()=>U()};for(const F of Object.keys(f)){const M=f[F],W=l[F],ee=gA(F);u.prototype[`use${ee}Value`]=function(U,fe,ue){return m(M,this.store,this.options,U,fe,ue)},u.prototype[`get${ee}`]=function(){return g(M,this.store,this.options)},u.prototype[`subscribe${ee}`]=function(U){return C(M,this.store,this.options)(U)},W&&(u.prototype[`useSet${ee}`]=function(){return b(M,this.store,this.options)},u.prototype[`set${ee}`]=function(...U){return y(M,this.store,this.options)(...U)},u.prototype[`use${ee}State`]=function(){return E(M,this.store,this.options)})}const x=(F,M,W,ee=W)=>{u.prototype[F]=function(U,...fe){const ue=f[U];return W(ue,this.store,this.options,...fe)},u.prototype[M]=function(U,...fe){return ee(U,this.store,this.options,...fe)}};x("useValue","useAtomValue",m),x("get","getAtom",g),x("useSet","useSetAtom",b),x("set","setAtom",(F,M,W,...ee)=>y(F,M)(...ee),y),x("useState","useAtomState",E),x("subscribe","subscribeAtom",(F,M,W,ee)=>C(F,M)(ee),C);const S=Xne(t,o,{effect:r}),O={atom:f,name:t},_=(F={})=>{const M=Bh(F),W=h(M);return Z.useMemo(()=>new u(M,W),[W,M.delay,M.scope,M.store,M.warnIfNoStore])},w=(F,M)=>{var W;const ee=(W=h(M))!=null?W:Ql();return E(f[F],ee,M)},T=(F,M={},W)=>{var ee=M,{equalityFn:U,selector:fe}=ee,ue=QE(ee,["equalityFn","selector"]),ne;const me=(ne=h(ue))!=null?ne:Ql();return m(f[F],me,ue,fe,U??W,U&&W)},A=(F,M)=>{var W;const ee=(W=h(M))!=null?W:Ql();return b(f[F],ee)},P=gA(t),I=t.length===0?"store":`${t}Store`;return{[`${P}Provider`]:S,[I]:O,[`use${P}Store`]:_,[`use${P}State`]:w,[`use${P}Value`]:T,[`use${P}Set`]:A,name:t}};function xi(e,t,n,r,i){return e.useValue(t,n,r,i)}function iu(e,t){return e.useSet(t)}function GR(e,t,n,r,i){return e.useAtomValue(t,n,r,i)}const Zne=Symbol(),YR=Symbol(),$f="a",hp="w";let ere=(e,t)=>new Proxy(e,t);const s4=Object.getPrototypeOf,yA=new WeakMap,tre=e=>e&&(yA.has(e)?yA.get(e):s4(e)===Object.prototype||s4(e)===Array.prototype),xA=e=>typeof e=="object"&&e!==null,nre=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(n=>{n.configurable=!0}),Object.create(s4(e),t)},JR=e=>e[YR]||e,XR=(e,t,n,r)=>{if(!tre(e))return e;let i=r&&r.get(e);if(!i){const l=JR(e);i=(u=>Object.values(Object.getOwnPropertyDescriptors(u)).some(f=>!f.configurable&&!f.writable))(l)?[l,nre(l)]:[l],r?.set(e,i)}const[s,a]=i;let o=n&&n.get(s);return o&&o[1].f===!!a||(o=((l,u)=>{const f={f:u};let h=!1;const m=(b,y)=>{if(!h){let E=f[$f].get(l);if(E||(E={},f[$f].set(l,E)),b===hp)E[hp]=!0;else{let C=E[b];C||(C=new Set,E[b]=C),C.add(y)}}},g={get:(b,y)=>y===YR?l:(m("k",y),XR(Reflect.get(b,y),f[$f],f.c,f.t)),has:(b,y)=>y===Zne?(h=!0,f[$f].delete(l),!0):(m("h",y),Reflect.has(b,y)),getOwnPropertyDescriptor:(b,y)=>(m("o",y),Reflect.getOwnPropertyDescriptor(b,y)),ownKeys:b=>(m(hp),Reflect.ownKeys(b))};return u&&(g.set=g.deleteProperty=()=>!1),[g,f]})(s,!!a),o[1].p=ere(a||s,o[0]),n&&n.set(s,o)),o[1][$f]=t,o[1].c=n,o[1].t=r,o[1].p},a4=(e,t,n,r,i=Object.is)=>{if(i(e,t))return!1;if(!xA(e)||!xA(t))return!0;const s=n.get(JR(e));if(!s)return!0;if(r){const o=r.get(e);if(o&&o.n===t)return o.g;r.set(e,{n:t,g:!1})}let a=null;try{for(const o of s.h||[])if(a=Reflect.has(e,o)!==Reflect.has(t,o),a)return a;if(s[hp]===!0){if(a=((o,l)=>{const u=Reflect.ownKeys(o),f=Reflect.ownKeys(l);return u.length!==f.length||u.some((h,m)=>h!==f[m])})(e,t),a)return a}else for(const o of s.o||[])if(a=!!Reflect.getOwnPropertyDescriptor(e,o)!=!!Reflect.getOwnPropertyDescriptor(t,o),a)return a;for(const o of s.k||[])if(a=a4(e[o],t[o],n,r,i),a)return a;return a===null&&(a=!0),a}finally{r&&r.set(e,{n:t,g:a})}},rre=e=>()=>{const[,n]=Z.useReducer(f=>f+1,0),r=new WeakMap,i=Z.useRef(),s=Z.useRef(),a=Z.useRef();Z.useEffect(()=>{i.current=r,s.current!==a.current&&a4(s.current,a.current,r,new WeakMap)&&(s.current=a.current,n())});const o=Z.useCallback(f=>(a.current=f,s.current&&s.current!==f&&i.current&&!a4(s.current,f,i.current,new WeakMap)?s.current:(s.current=f,f)),[]),l=e(o),u=Z.useMemo(()=>new WeakMap,[]);return XR(l,r,u)};var s2={exports:{}},a2={},o2={exports:{}},l2={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var bA;function ire(){if(bA)return l2;bA=1;var e=Mc();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function o(h,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),y=b[0].inst,E=b[1];return s(function(){y.value=g,y.getSnapshot=m,l(y)&&E({inst:y})},[h,g,m]),i(function(){return l(y)&&E({inst:y}),h(function(){l(y)&&E({inst:y})})},[h]),a(g),g}function l(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function u(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return l2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,l2}var wA;function sre(){return wA||(wA=1,o2.exports=ire()),o2.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var EA;function are(){if(EA)return a2;EA=1;var e=Mc(),t=sre();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return a2.useSyncExternalStoreWithSelector=function(u,f,h,m,g){var b=s(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=o(function(){function C(w){if(!x){if(x=!0,S=w,w=m(w),g!==void 0&&y.hasValue){var T=y.value;if(g(T,w))return O=T}return O=w}if(T=O,r(S,w))return T;var A=m(w);return g!==void 0&&g(T,A)?(S=w,T):(S=w,O=A)}var x=!1,S,O,_=h===void 0?null:h;return[function(){return C(f())},_===null?void 0:function(){return C(_())}]},[f,h,m,g]);var E=i(u,b[0],b[1]);return a(function(){y.hasValue=!0,y.value=E},[E]),l(E),E},a2}var CA;function ore(){return CA||(CA=1,s2.exports=are()),s2.exports}var lre=ore();const ure=Rr(lre),{useSyncExternalStoreWithSelector:cre}=ure,fre=e=>e;function dre(e,t=fre,n){const r=cre(e.subscribe,e.getState,e.getInitialState,t,n);return oe.useDebugValue(r),r}const kA=(e,t)=>{const n=Y4(e),r=(i,s=t)=>dre(n,i,s);return Object.assign(r,n),r},hre=((e,t)=>e?kA(e,t):kA);var pre=(e,t)=>iP(e,t,{selectWithStore:(n,r)=>t.useStore(n,r)}),mre=e=>Bp(e,{extendSelectors:(t,n)=>pre(t,n),extendActions:(t,n)=>rP(t,n)}),gre=(e,t)=>{const n=sP(e,t),r=hre(n.stateCreator),i=rre(r),s=f=>i()[f],a=aP(r,{name:n.name,isMutative:n.isMutative}),o=(f,h)=>r(m=>m[f],h),u={...a,store:r,useStore:r,useValue:o,useState:(f,h)=>[o(f,h),g=>a.set(f,g)],useTracked:s,useTrackedStore:i};return mre(u)},Rm=gre;function vre(e,t,...n){return e.useValue(t,...n)}var yre=(e,t,n)=>e.useStore(t,n),u2,DA;function xre(){if(DA)return u2;DA=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return u2=e,u2}var c2,SA;function bre(){if(SA)return c2;SA=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var a=Array(s);++i1),C}),i(m,o(m),b),y&&(b=t(b,l|u|f,s));for(var E=g.length;E--;)n(b,g[E]);return b});return p2=h,p2}var Dre=kre();const Sre=Rr(Dre);var OA=Object.prototype.hasOwnProperty;function BA(e,t,n){for(n of e.keys())if(fd(n,t))return n}function fd(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&fd(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=BA(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=BA(t,i),!i)||!fd(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(OA.call(e,n)&&++r&&!OA.call(t,n)||!(n in t)||!fd(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function _re(e){const t=oe.useRef(e),n=oe.useRef(0);return fd(e,t.current)||(t.current=e,n.current+=1),oe.useMemo(()=>t.current,[n.current])}function PA(e,t){return oe.useMemo(e,_re(t))}var Are=Object.defineProperty,ZE=(e,t)=>Are(e,"name",{value:t,configurable:!0});function o4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ZE(o4,"setRef");function QR(...e){return t=>{let n=!1;const r=e.map(i=>{const s=o4(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;iTre(e,"name",{value:t,configurable:!0});function eF(e){const t=Z.forwardRef((n,r)=>{let{children:i,...s}=n,a=null,o=!1;const l=[];i=aF(i),Z.Children.forEach(i,m=>{if(iF(m)){o=!0;const g=m;let b="child"in g.props?g.props.child:g.props.children;for(;e3(b)&&typeof Up=="function";)b=Up(b._payload);a=Bre(g,b),l.push(a?.props?.children)}else l.push(m)}),a?a=Z.cloneElement(a,void 0,l):!o&&Z.Children.count(i)===1&&Z.isValidElement(i)&&(a=i);const u=a?rF(a):void 0,f=ZR(r,u);if(!a){if(i||i===0)throw new Error(o?Fre(e):Rre(e));return i}const h=nF(s,a.props??{});return a.type!==Z.Fragment&&(h.ref=r?f:u),Z.cloneElement(a,h)});return t.displayName=`${e}.Slot`,t}us(eF,"createSlot");var Nre=eF("Slot"),tF=Symbol.for("radix.slottable");function Ore(e){const t=us(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=tF,t}us(Ore,"createSlottable");var Bre=us((e,t)=>"child"in e.props?Z.isValidElement(t)?Z.cloneElement(t,void 0,e.props.children(t.props.children)):null:Z.isValidElement(t)?t:null,"getSlottableElementFromSlottable");function nF(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"?n[r]=[i,s].filter(Boolean).join(" "):r==="aria-describedby"&&(n[r]=oF(s,i))}return{...e,...n}}us(nF,"mergeProps");function rF(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}us(rF,"getElementRef");function iF(e){return Z.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tF}us(iF,"isSlottable");var Pre=Symbol.for("react.lazy");function e3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pre&&"_payload"in e&&sF(e._payload)}us(e3,"isLazyComponent");function sF(e){return typeof e=="object"&&e!==null&&"then"in e}us(sF,"isPromiseLike");function aF(e){let t=e;for(;e3(t)&&typeof Up=="function";)t=Up(t._payload);return t}us(aF,"useUnwrappedLazy");function oF(...e){const t=new Set;for(const n of e)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}us(oF,"concatAriaDescribedby");var Rre=us(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Fre=us(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Up=D$[" use ".trim().toString()];const t3=e=>oe.forwardRef((t,n)=>{const r=Zt.c(8);let i,s,a;r[0]!==t?({as:i,asChild:a,...s}=t,r[0]=t,r[1]=i,r[2]=s,r[3]=a):(i=r[1],s=r[2],a=r[3]);const o=a!==void 0&&a?Nre:i||e;let l;return r[4]!==o||r[5]!==s||r[6]!==n?(l=oe.createElement(o,{ref:n,...s}),r[4]=o,r[5]=s,r[6]=n,r[7]=l):l=r[7],l});t3("div");oe.memo(e=>{const t=Zt.c(2),{children:n}=e;let r;return t[0]!==n?(r=oe.createElement(oe.Fragment,null,n),t[0]=n,t[1]=r):r=t[1],r});t3("span");const Ire=(e,t)=>{if(typeof e=="function")return e(t);e!=null&&(e.current=t)},Mre=(...e)=>t=>{const n=[];if(e.forEach(r=>{const i=Ire(r,t);typeof i=="function"&&n.push(i)}),n.length>0)return()=>{for(const r of n)r?.()}},Fm=(...e)=>oe.useCallback(Mre(...e),e),Eu=e=>{const t=t3(e);return({propsHook:n,stateHook:r}={})=>oe.forwardRef((i,s)=>{const a=Zt.c(17);let o,l,u,f,h,m,g;if(a[0]!==i){const{asChild:A,className:P,getClassName:I,options:F,setProps:M,state:W,style:ee,...U}=i;o=A,l=P,u=F,h=M,m=W,g=ee,f=U,a[0]=i,a[1]=o,a[2]=l,a[3]=u,a[4]=f,a[5]=h,a[6]=m,a[7]=g}else o=a[1],l=a[2],u=a[3],f=a[4],h=a[5],m=a[6],g=a[7];const b=Mr(m)?m:r?r(u):void 0,{hidden:y,props:E,ref:C}=n?n(b):{hidden:!1,props:{},ref:null},x=Fm(s,C),S=Mr(E?.className)||Mr(l)?Ns(E?.className,l):void 0,O=E?.style||g?{...E?.style,...g}:void 0;if(!o&&y)return null;const _=t,w=h?.(E??{})??{};let T;return a[8]!==_||a[9]!==x||a[10]!==o||a[11]!==S||a[12]!==E||a[13]!==f||a[14]!==O||a[15]!==w?(T=oe.createElement(_,{asChild:o,ref:x,...E,className:S,style:O,...f,...w}),a[8]=_,a[9]=x,a[10]=o,a[11]=S,a[12]=E,a[13]=f,a[14]=O,a[15]=w,a[16]=T):T=a[16],T})},Lre=typeof window<"u"&&window.document?.createElement!==void 0;Lre?oe.useLayoutEffect:oe.useEffect;const m2=(e,t=[])=>{const n=oe.useRef(e);return n.current=e,oe.useCallback((...r)=>n.current(...r),t)},bo=e=>e,n3=e=>({_tag:"Left",value:e}),Im=e=>({_tag:"Right",value:e}),zre=(e,t,n)=>n._tag==="Left"?e(n.value):t(n.value),lF={dimap:(e,t,n)=>r=>t(n(e(r))),first:e=>([t,n])=>[e(t),n],right:e=>t=>t._tag==="Left"?t:Im(e(t.value)),wander:e=>t=>t.map(e)},jre={empty:()=>{},foldMap:(e,t)=>{for(let n=0;n[],foldMap:(e,t)=>{let n=[];return t.forEach(r=>{n=n.concat(e(r))}),n}},r3=e=>({dimap:(t,n,r)=>i=>r(t(i)),first:t=>([n,r])=>t(n),right:t=>n=>n._tag==="Left"?e.empty():t(n.value),wander:t=>n=>e.foldMap(t,n)}),g2={Equivalence:{Equivalence:"Equivalence",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Iso:{Equivalence:"Iso",Iso:"Iso",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Lens:{Equivalence:"Lens",Iso:"Lens",Lens:"Lens",Prism:"Prism",Traversal:"Traversal",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Prism:{Equivalence:"Prism",Iso:"Prism",Lens:"Prism",Prism:"Prism",Traversal:"Traversal",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:"Setter"},Traversal:{Equivalence:"Traversal",Iso:"Traversal",Lens:"Traversal",Prism:"Traversal",Traversal:"Traversal",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:"Setter"},Getter:{Equivalence:"Getter",Iso:"Getter",Lens:"Getter",Prism:"AffineFold",Traversal:"Fold",Getter:"Getter",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},AffineFold:{Equivalence:"AffineFold",Iso:"AffineFold",Lens:"AffineFold",Prism:"AffineFold",Traversal:"Fold",Getter:"AffineFold",AffineFold:"AffineFold",Fold:"Fold",Setter:void 0},Fold:{Equivalence:"Fold",Iso:"Fold",Lens:"Fold",Prism:"Fold",Traversal:"Fold",Getter:"Fold",AffineFold:"Fold",Fold:"Fold",Setter:void 0},Setter:{Equivalence:void 0,Iso:void 0,Lens:void 0,Prism:void 0,Traversal:void 0,Getter:void 0,AffineFold:void 0,Fold:void 0,Setter:void 0}},Xc=(e,t)=>{const n=t;return n._tag=e,n},uF=e=>(e._removable=!0,e);function Rn(e,t,n){switch(arguments.length){case 2:{const r=(i,s)=>e(i,t(i,s));return r._tag=g2[e._tag][t._tag],r._removable=t._removable||!1,r}default:{const r=g2[e._tag][t._tag],i=(s,a)=>e(s,t(s,n(s,a)));return i._tag=g2[r][n._tag],i._removable=n._removable||!1,i}}}const $re=Xc("Equivalence",(e,t)=>t),Mm=(e,t)=>Xc("Iso",(n,r)=>n.dimap(e,t,r)),cs=(e,t)=>Xc("Lens",(n,r)=>n.dimap(i=>[e(i),i],t,n.first(r))),i3=(e,t)=>Xc("Prism",(n,r)=>n.dimap(e,i=>zre(bo,t,i),n.right(r))),s3=Xc("Traversal",(e,t)=>e.dimap(bo,bo,e.wander(t))),Vre=e=>Xc("Getter",(t,n)=>t.dimap(e,bo,n)),cF=(e,t,n)=>e(lF,t)(n),Ure=(e,t,n)=>e(lF,()=>t)(n),Hre=(e,t)=>e(r3({}),bo)(t),Wre=(e,t)=>e(r3(jre),bo)(t),fF=(e,t)=>e(r3(qre),n=>[n])(t),Kre=Mm(e=>e.map((t,n)=>[n,t]),e=>{const t=[...e].sort((r,i)=>r[0]-i[0]),n=[];for(let r=0;rcs(t=>t[e],([t,n])=>Object.assign(Object.assign({},n),{[e]:t})),Gre=e=>cs(t=>{const n={};for(const r of e)n[r]=t[r];return n},([t,n])=>{const r=Object.assign({},n);for(const i of e)delete r[i];return Object.assign(r,t)}),dF=e=>cs(t=>t[e],([t,n])=>{const r=n.slice();return r[e]=t,r}),a3=dF(0),o3=e=>i3(t=>e(t)?Im(t):n3(t),bo),Id=Symbol("__no_match__"),hF=o3(e=>e!==Id),pF=Symbol("__remove_me__"),v2=e=>uF(Rn(cs(t=>0<=e&&e{if(t===Id)return n;if(t===pF)return typeof n=="string"?n.substring(0,e)+n.substring(e+1):[...n.slice(0,e),...n.slice(e+1)];if(typeof n=="string")return e===0?t+n.substring(1):e===n.length?n.substring(0,e-1)+t:n.substring(0,e)+t+n.substring(e+1);{const r=n.slice();return r[e]=t,r}}),hF)),Yre=i3(e=>e===void 0?n3(void 0):Im(e),bo),Jre=e=>i3(t=>e(t)?Im(t):n3(t),bo),Xre=e=>uF(Rn(cs(t=>{const n=t.findIndex(e);return n===-1?[Id,-1]:[t[n],n]},([[t,n],r])=>{if(t===Id)return r;if(t===pF)return[...r.slice(0,n),...r.slice(n+1)];const i=r.slice();return i[n]=t,i}),a3,hF)),Qre=e=>Rn(cs(t=>{const n=t.map((r,i)=>e(r)?i:null).filter(r=>r!=null);return[n.map(r=>t[r]),n]},([[t,n],r])=>{const i=r.length,s=t.length;let a=0,o=0,l=0;const u=[];for(;acs(t=>t===void 0?e:t,([t,n])=>t),eie=e=>Rn(cs(t=>{const n=fF(e,t);return[n,n.length]},([[t,n],r])=>{if(t.length!==n)throw new Error("cannot add/remove elements through partsOf");let i=0;return cF(e,()=>t[i++],r)}),a3),tie=e=>cs(t=>e(t),([t,n])=>t),nie=e=>cs(t=>t,([t,n])=>e(t)),rie=cs(e=>{},([e,t])=>e===void 0?t:[e,...t]),iie=cs(e=>{},([e,t])=>e===void 0?t:[...t,e]),sie=Rn(Mm(e=>e.split(""),e=>e.join("")),s3),aie=Rn(Mm(e=>e.split(/\b/),e=>e.join("")),s3,o3(e=>!/\s+/.test(e)));class Kn{constructor(t){this._ref=t}get _tag(){return this._ref._tag}get _removable(){return this._ref._removable}compose(t){return new Kn(Rn(this._ref,t._ref))}iso(t,n){return new Kn(Rn(this._ref,Mm(t,n)))}lens(t,n){return new Kn(Rn(this._ref,cs(t,([r,i])=>n(i,r))))}indexed(){return new Kn(Rn(this._ref,Kre))}prop(t){return new Kn(Rn(this._ref,RA(t)))}path(...t){return t.length===1&&(t=t[0].split(".")),new Kn(t.reduce((n,r)=>Rn(n,RA(r)),this._ref))}pick(t){return new Kn(Rn(this._ref,Gre(t)))}nth(t){return new Kn(Rn(this._ref,dF(t)))}filter(t){return new Kn(Rn(this._ref,Qre(t)))}valueOr(t){return new Kn(Rn(this._ref,Zre(t)))}partsOf(t){const n=typeof t=="function"?t(mF):t;return new Kn(Rn(this._ref,eie(n._ref)))}reread(t){return new Kn(Rn(this._ref,tie(t)))}rewrite(t){return new Kn(Rn(this._ref,nie(t)))}optional(){return new Kn(Rn(this._ref,Yre))}guard_(){return t=>this.guard(t)}guard(t){return new Kn(Rn(this._ref,Jre(t)))}at(t){return new Kn(Rn(this._ref,v2(t)))}head(){return new Kn(Rn(this._ref,v2(0)))}index(t){return new Kn(Rn(this._ref,v2(t)))}find(t){return new Kn(Rn(this._ref,Xre(t)))}elems(){return new Kn(Rn(this._ref,s3))}to(t){return new Kn(Rn(this._ref,Vre(t)))}when(t){return new Kn(Rn(this._ref,o3(t)))}chars(){return new Kn(Rn(this._ref,sie))}words(){return new Kn(Rn(this._ref,aie))}prependTo(){return new Kn(Rn(this._ref,rie))}appendTo(){return new Kn(Rn(this._ref,iie))}}const mF=new Kn($re);function oie(){return mF}function lie(e){return t=>Hre(e._ref,t)}function uie(e){return t=>Wre(e._ref,t)}function cie(e){return t=>fF(e._ref,t)}function fie(e){return t=>n=>cF(e._ref,t,n)}function die(e){return t=>n=>Ure(e._ref,t,n)}const FA=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),hie=new WeakMap,pie=(e,t,n)=>{const r=FA(()=>new WeakMap,hie,t);return FA(e,r,n)},mie=e=>typeof e=="function";function gie(e,t){return pie(()=>{const n=t(oie());return Gi(i=>{const s=i(e);return s instanceof Promise?s.then(a=>IA(n,a)):IA(n,s)},(i,s,a)=>{const o=mie(a)?fie(n)(a):die(n)(a),l=i(e);return s(e,l instanceof Promise?l.then(o):o(l))})},e,t)}const IA=(e,t)=>e._tag==="Traversal"?cie(e)(t):e._tag==="Prism"?uie(e)(t):lie(e)(t),vie=e=>{const t=Zt.c(4),{attributes:n,children:r,lowest:i}=e;if(!i)return r;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={contentVisibility:"auto"},t[0]=s):s=t[0];let a;return t[1]!==n||t[2]!==r?(a=oe.createElement("div",{...n,style:s},r),t[1]=n,t[2]=r,t[3]=a):a=t[3],a},yie=["configure","configurePlugin","extendEditorApi","extendSelectors","extendApi","extendEditorTransforms","extendTransforms","overrideEditor","extend","extendPlugin"];function fn(e,t){const n={...e};return yie.forEach(r=>{const i=n[r];n[r]=(...s)=>fn(i(...s))}),t?n.extend(t):n}function l3(e,t){return fn(e,t)}const Lm=(e={})=>fn(Jt(e));function Qc(e,t){return vn(e,t)}function gF(e,t){return e.plugins[t.key]??Lm({key:t.key})}const xie=fn(Ip,{handlers:{onKeyDown:({editor:e,event:t})=>{t.persist(),e.dom.currentKeyboardEvent=t,Ys.isMoveUpward(t)?e.tf.moveLine({reverse:!0})&&(t.preventDefault(),t.stopPropagation()):Ys.isMoveDownward(t)?e.tf.moveLine({reverse:!1})&&(t.preventDefault(),t.stopPropagation()):Ys.isTab(e,t)||Ys.isUntab(e,t)?e.tf.tab({reverse:Ys.isUntab(e,t)})&&(t.preventDefault(),t.stopPropagation()):Ys.isSelectAll(t)?e.tf.selectAll()&&(t.preventDefault(),t.stopPropagation()):Ys.isEscape(t)&&e.tf.escape()&&(t.preventDefault(),t.stopPropagation())}}}).extendEditorApi(({editor:e})=>({redecorate:()=>{e.api.debug.warn("The method editor.api.redecorate() has not been overridden. This may cause unexpected behavior. Please ensure that all required editor methods are properly defined.","OVERRIDE_MISSING")}})).extendEditorTransforms(({editor:e,tf:{reset:t}})=>({reset(n){const r=e.api.isFocused();t(n),r&&e.tf.focus({edge:"startEditor"})}})).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{normalizeNode(n,r){if(Mr(n[0]._memo)){e.tf.unsetNodes("_memo",{at:n[1]});return}t(n,r)}}})),uc=Rm({blur:null,focus:null,last:null},{mutative:!0,name:"event-editor"}),{useValue:uwe}=uc,bie="focus-editor-event",wie="blur-editor-event",Eie=Lm({key:"eventEditor",handlers:{onBlur:({editor:e})=>{uc.get("focus")===e.id&&uc.set("focus",null),uc.set("blur",e.id),document.dispatchEvent(new CustomEvent(wie,{detail:{id:e.id}}))},onFocus:({editor:e})=>{uc.set("focus",e.id),uc.set("last",e.id),document.dispatchEvent(new CustomEvent(bie,{detail:{id:e.id}}))}}}),Cie=e=>{const t=oe.useRef(e);return t.current=e,_F(n=>{const r=n.api.navigation.activeTarget();if(!r)return null;const i=t.current;if(!i)return null;const s=Array.isArray(i)?i:n.api.findPath(i);return!s||!Je.equals(r.path,s)?null:r},[e])},kie=l3(PP,{inject:{isElement:!0,nodeProps:{transformProps:({element:e,props:t,text:n})=>{const r=Cie(e??n);return r?{...t,"data-nav-cycle":String(r.cycle),"data-nav-highlight":r.variant,"data-nav-pulse":String(r.pulse),"data-nav-target":"true",style:{...t.style??{},"--plate-nav-feedback-duration":`${r.duration}ms`}}:t}}}}),vF=fn(t0,({editor:e,type:t})=>({shortcuts:{toggleParagraph:{keys:[[ru.Mod,ru.Alt,"0"],[ru.Mod,ru.Shift,"0"]],preventDefault:!0,handler:()=>{e.tf.toggleBlock(t)}}}})),Die=({editor:e})=>lne(e),Sie=fn(Cc,{key:"dom",extendEditor:Die}),_ie=({navigationFeedback:e}={})=>[xie,Sie,Eie,kie.configure({enabled:e!==!1,options:typeof e=="boolean"?void 0:e}),vF],Aie=(e,t={})=>{const{navigationFeedback:n,optionsStoreFactory:r,plugins:i=[],...s}=t;return JQ(e,{navigationFeedback:n,...s,optionsStoreFactory:r??Rm,plugins:[..._ie({navigationFeedback:n}),...i]})},yF=({editor:e=OG(),...t}={})=>Aie(e,t),Tie=(e={})=>{const t=yF(e);return t.meta.isFallback=!0,t.apply=()=>{throw new Error("Cannot apply operations on the fallback editor. The fallback editor is used when a hook that depends on the Plate store was unable to locate a valid store. If you are using PlateController, use `useEditorMounted(id?: string)` or `!editor.meta.isFallback` to ensure that a valid Plate store is available before attempting to call operations on the editor.")},t},MA=["onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onDOMBeforeInput","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Zc=({attributes:e,disableInjectNodeProps:t,editor:n,plugin:r,pluginContext:i,props:s,readOnly:a})=>{const o=!t&&n.meta.pluginCache.inject.nodeProps.length>0,l=!o&&!r?.node.props&&!r?.node.dangerouslyAllowAttributes?.length,u=i||(r?Qc(n,r):{api:n.api,editor:n,tf:n.transforms}),{className:f}=s;let h={...s,...u};if(l)return h={...h,attributes:{...s.attributes,className:Ns(fl(r?.node.type),s.attributes?.className,f)||void 0}},h.attributes?.style&&Object.keys(h.attributes.style).length===0&&(h.attributes.style=void 0),h;const m=xP({attributes:e,plugin:r,props:h});return h={...m,attributes:{...m.attributes,className:Ns(fl(r?.node.type),m.attributes?.className,f)||void 0}},o&&(h=jE(n,h,g=>n.api.findPath(g),a)),h.attributes?.style&&Object.keys(h.attributes.style).length===0&&(h.attributes.style=void 0),h},Nie=e=>{let t=!1;return{...e,bubbles:e.bubbles,cancelable:e.cancelable,currentTarget:e.currentTarget,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,nativeEvent:e,target:e.target,timeStamp:e.timeStamp,type:e.type,isDefaultPrevented:()=>e.defaultPrevented,isPropagationStopped:()=>t,persist:()=>{throw new Error("persist is not implemented for synthetic events created using convertDomEventToSyntheticEvent")},preventDefault:()=>e.preventDefault(),stopPropagation:()=>{t=!0,e.stopPropagation()}}},Oie=(e,t)=>{if(!t)return!1;const n=t(e);return n??e.isPropagationStopped()},Bie=(e,{editableProps:t,handlerKey:n})=>{const r=t?.[n],i=e.meta.pluginList.filter(s=>s.handlers?.[n]);if(!(i.length===0&&!r))return s=>{const a=s instanceof Event?Nie(s):s;return i.some(o=>{if(ri(e.dom.readOnly,o,"handlers"))return!1;const l=o.handlers[n],u=l({...Qc(e,o),event:a});return u??!1})?!0:Oie(a,r)}},Pie=(e,t)=>e.meta.pluginCache.handlers.onChange.some(n=>{const r=gF(e,{key:n});if(ri(e.dom.readOnly,r,"handlers"))return!1;const i=r.handlers.onChange,s=i({...Qc(e,r),value:t});return s??!1}),Rie=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),u3=(e,t)=>{const n=Zt.c(11),r=e.attributes;let i;n[0]!==e.attributes||n[1]!==e.className?(i=Ns(e.attributes.className,e.className)||void 0,n[0]=e.attributes,n[1]=e.className,n[2]=i):i=n[2];const s=Fm(t,e.attributes.ref),a=e.attributes;let o;n[3]!==e.style||n[4]!==a.style?(o={...a.style,...e.style},n[3]=e.style,n[4]=a.style,n[5]=o):o=n[5];let l;return n[6]!==e.attributes||n[7]!==i||n[8]!==s||n[9]!==o?(l={...r,className:i,ref:s,style:o},n[6]=e.attributes,n[7]=i,n[8]=s,n[9]=o,n[10]=l):l=n[10],l},xF=e=>Rie.has(e),bF=(e,t)=>{const n=Zt.c(2);let r;return n[0]!==e?(r=i=>{i&&(e?i.setAttribute("data-block-id",String(e)):i.removeAttribute("data-block-id"))},n[0]=e,n[1]=r):r=n[1],Fm(r,t)},c3=oe.forwardRef(function(t,n){const r=Zt.c(15);let i,s,a,o,l;if(r[0]!==t){const{as:b,children:y,insetProp:E,...C}=t;s=y,a=E,o=C,i=b===void 0?"div":b,l=o.element.id&&o.editor.api.isBlock(o.element)?o.element.id:void 0,r[0]=t,r[1]=i,r[2]=s,r[3]=a,r[4]=o,r[5]=l}else i=r[1],s=r[2],a=r[3],o=r[4],l=r[5];const u=bF(l,n);let f;r[6]!==o.attributes||r[7]!==o.className||r[8]!==o.style?(f={attributes:o.attributes,className:o.className,style:o.style},r[6]=o.attributes,r[7]=o.className,r[8]=o.style,r[9]=f):f=r[9];const h=u3(f,u),m=a??o.plugin?.rules.selection?.affinity==="directional";let g;return r[10]!==i||r[11]!==h||r[12]!==s||r[13]!==m?(g=oe.createElement(Fie,{attributes:h,inset:m,tag:i},s),r[10]=i,r[11]=h,r[12]=s,r[13]=m,r[14]=g):g=r[14],g});function Fie(e){const t=Zt.c(17),{attributes:n,children:r,inset:i,tag:s}=e;let a;t[0]!==s?(a=xF(s),t[0]=s,t[1]=a):a=t[1];const o=a;let l;t[2]!==i?(l=i&&oe.createElement(dd,null),t[2]=i,t[3]=l):l=t[3];let u;t[4]!==s||t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==o?(u=o?oe.createElement("div",{"data-slate-node":"element","data-slate-inline":n["data-slate-inline"],...n,style:{position:"relative",...n?.style}},oe.createElement(s,{contentEditable:!1}),r):oe.createElement(s,{"data-slate-node":"element","data-slate-inline":n["data-slate-inline"],...n,style:{position:"relative",...n?.style}},r,i&&oe.createElement(dd,null)),t[4]=s,t[5]=n,t[6]=r,t[7]=i,t[8]=o,t[9]=u):u=t[9];let f;t[10]!==i||t[11]!==o?(f=i&&o&&oe.createElement(dd,null),t[10]=i,t[11]=o,t[12]=f):f=t[12];let h;return t[13]!==l||t[14]!==u||t[15]!==f?(h=oe.createElement(oe.Fragment,null,l,u,f),t[13]=l,t[14]=u,t[15]=f,t[16]=h):h=t[16],h}const wF=oe.forwardRef((e,t)=>{const n=Zt.c(8);let r,i,s;n[0]!==e?({as:s,children:r,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s):(r=n[1],i=n[2],s=n[3]);const a=s===void 0?"span":s,o=u3(i,t);let l;return n[4]!==a||n[5]!==o||n[6]!==r?(l=oe.createElement(a,o,r),n[4]=a,n[5]=o,n[6]=r,n[7]=l):l=n[7],l}),dd=()=>{const e=Zt.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={fontSize:0,lineHeight:0},e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=oe.createElement("span",{style:t,contentEditable:!1},String.fromCodePoint(160)),e[1]=n):n=e[1],n},EF=oe.forwardRef((e,t)=>{const n=Zt.c(15);let r,i,s,a;n[0]!==e?({as:a,children:r,inset:i,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=s,n[4]=a):(r=n[1],i=n[2],s=n[3],a=n[4]);const o=a===void 0?"span":a,l=u3(s,t);if(i??s.plugin?.rules.selection?.affinity==="hard"){let f;n[5]===Symbol.for("react.memo_cache_sentinel")?(f=oe.createElement(dd,null),n[5]=f):f=n[5];let h;n[6]===Symbol.for("react.memo_cache_sentinel")?(h=oe.createElement(dd,null),n[6]=h):h=n[6];let m;return n[7]!==o||n[8]!==l||n[9]!==r?(m=oe.createElement(oe.Fragment,null,f,oe.createElement(o,l,r,h)),n[7]=o,n[8]=l,n[9]=r,n[10]=m):m=n[10],m}let u;return n[11]!==o||n[12]!==l||n[13]!==r?(u=oe.createElement(o,l,r),n[11]=o,n[12]=l,n[13]=r,n[14]=u):u=n[14],u}),LA=String.fromCodePoint(160),zA={fontSize:0,lineHeight:0},Iie=(e,t)=>{if(!e.api.isCollapsed())return!1;const n=e.selection?.focus;return!n||ht.get(e,n.path)!==t?!1:n.offset===0||n.offset===t.text.length},jA=(e,t)=>{const n=e.attributes??e.leaf.attributes??{};return{...n,className:[t,n.className].filter(Boolean).join(" ")||void 0}},Mie=(e,t)=>function(r){const i=ia(),{render:{leaf:s,node:a}}=t,{children:o,leaf:l,text:u}=r,f=s??a;if(ri(i,t,"render"))return o;if(l[t.node.type]){const h=!f&&e.meta.pluginCache.inject.nodeProps.length===0&&!t.node.props&&!t.node.dangerouslyAllowAttributes?.length;if(h&&!t.rules.selection?.affinity){const y=t.render?.as??"span",E=jA(r,fl(t.node.type)||void 0);return oe.createElement(y,E,o)}if(h&&t.rules.selection?.affinity==="hard"){const y=t.render?.as??"span",E=jA(r,fl(t.node.type)||void 0);return Iie(e,u)?oe.createElement(oe.Fragment,null,oe.createElement("span",{contentEditable:!1,style:zA},LA),oe.createElement(y,E,o,oe.createElement("span",{contentEditable:!1,style:zA},LA))):oe.createElement(y,E,o)}const m=f??EF,g=Zc({attributes:l.attributes,editor:e,plugin:t,props:r,readOnly:i}),b=f?{}:{as:t.render?.as};return oe.createElement(m,{...b,...g},o)}return o},qA=String.fromCodePoint(160),$A={fontSize:0,lineHeight:0},Lie=(e,t)=>{if(!e.api.isCollapsed())return!1;const n=e.selection?.focus;return!n||ht.get(e,n.path)!==t?!1:n.offset===0||n.offset===t.text.length},zie=(e,t)=>{const n=[],r=new Map,i=[],s=new Map,a=[],o=e.meta.pluginCache.inject.nodeProps.length>0;if(e.meta.pluginCache.node.isLeaf.forEach(u=>{const f=e.getPlugin({key:u});if(f){const h=f.node.type??u;if(e.meta.pluginCache.inject.nodeProps.length===0&&!f.render?.leaf&&!f.render?.node&&!f.node.props&&!f.node.dangerouslyAllowAttributes?.length&&(!f.rules.selection?.affinity||f.rules.selection?.affinity==="hard")){const m={className:f.node.type?`slate-${f.node.type}`:void 0,editOnly:f.editOnly,key:h,selectionAffinity:f.rules.selection?.affinity,tag:f.render?.as??"span"};i.push(m),s.set(h,!0)}else{const m={key:h,renderLeaf:Mie(e,f)};n.push(m),r.set(h,m.renderLeaf)}}}),e.meta.pluginCache.node.leafProps.forEach(u=>{const f=e.getPlugin({key:u});f&&a.push(f)}),!o&&i.length===0&&n.length===0&&a.length===0)return t||function({attributes:f,...h}){return oe.createElement("span",f,h.children)};const l=!o&&!t&&a.length===0;return function({attributes:f,...h}){const m=ia(),g=h.leaf;let b=!1,y=!1;for(const C in g)if(Object.hasOwn(g,C)&&(!b&&s.has(C)&&(b=!0),!y&&r.has(C)&&(y=!0),b&&y))break;if(b){for(const{className:C,editOnly:x,key:S,selectionAffinity:O,tag:_}of i)if(g[S]&&!(x&&ri(m,{editOnly:x},"render"))){if(O==="hard"){if(!Lie(e,h.text)){h.children=oe.createElement(_,{className:C},h.children);continue}h.children=oe.createElement(oe.Fragment,null,oe.createElement("span",{contentEditable:!1,style:$A},qA),oe.createElement(_,{className:C},h.children,oe.createElement("span",{contentEditable:!1,style:$A},qA)));continue}h.children=oe.createElement(_,{className:C},h.children)}}if(y)for(const{key:C,renderLeaf:x}of n)g[C]&&(h.children=oe.createElement(x,h,h.children));if(a.forEach(C=>{if(h.leaf[C.node.type]){const x=typeof C.node.leafProps=="function"?C.node.leafProps(h):C.node.leafProps??{};x.className&&(x.className=Ns(h.className,x.className)),f={...f,...x}}}),l)return oe.createElement("span",f,h.children);if(t)return t({attributes:f,...h});const E=Zc({editor:e,props:{attributes:f,...h},readOnly:m});return oe.createElement(EF,E,h.children)}},jie=(e,t)=>{const n=e.attributes??{};return{...n,className:[t,n.className].filter(Boolean).join(" ")||void 0}},qie=(e,t)=>function(r){const i=ia(),{render:{node:s}}=t,{children:a,text:o}=r,l=t.node.type??t.key;if(ri(i,t,"render"))return a;if(o[l]){if(!s&&e.meta.pluginCache.inject.nodeProps.length===0&&!t.node.props&&!t.node.dangerouslyAllowAttributes?.length){const m=t.render?.as??"span",g=jie(r,fl(t.node.type)||void 0);return oe.createElement(m,g,a)}const u=s??wF,f=Zc({attributes:r.attributes,editor:e,plugin:t,props:r,readOnly:i}),h=s?{}:{as:t.render?.as};return oe.createElement(u,{...h,...f},a)}return a},$ie=(e,t)=>{const n=[],r=new Map,i=[],s=new Map,a=[],o=e.meta.pluginCache.inject.nodeProps.length>0;if(e.meta.pluginList.forEach(u=>{if(u.node.isLeaf&&u.node.isDecoration===!1)if(!u.render.node&&!u.node.component&&!u.node.props&&!u.node.dangerouslyAllowAttributes?.length){const f={className:fl(u.node.type)||void 0,plugin:u,tag:u.render?.as??"span",textKey:u.node.type??u.key};i.push(f),s.set(f.textKey,!0)}else{const f={renderText:qie(e,u),textKey:u.node.type??u.key};n.push(f),r.set(f.textKey,!0)}u.node.textProps&&a.push(u)}),!o&&i.length===0&&n.length===0&&a.length===0)return t||function({attributes:f,...h}){return oe.createElement("span",f,h.children)};const l=!o&&!t&&a.length===0;return function({attributes:f,...h}){const m=ia(),g=h.text;let b=!1,y=!1;for(const C in g)if(Object.hasOwn(g,C)&&(!b&&s.has(C)&&(b=!0),!y&&r.has(C)&&(y=!0),b&&y))break;if(b)for(const{className:C,plugin:x,tag:S,textKey:O}of i)g[O]&&(ri(m,x,"render")||(h.children=oe.createElement(S,{className:C},h.children)));if(y)for(const{renderText:C,textKey:x}of n)g[x]&&(h.children=oe.createElement(C,h,h.children));if(a.forEach(C=>{if(h.text[C.node.type??C.key]){const x=typeof C.node.textProps=="function"?C.node.textProps(h):C.node.textProps??{};x.className&&(x.className=Ns(h.className,x.className)),f={...f,...x}}}),l)return oe.createElement("span",f,h.children);if(t)return t({attributes:f,...h});const E=Zc({editor:e,props:{attributes:f,...h},readOnly:m});return oe.createElement(wF,E,h.children)}},Vie=({disabled:e,readOnly:t,...n}={})=>{const{id:r}=n,i=wr(r),s=Ps(r),a=xi(s,"versionDecorate"),o=xi(s,"decorate"),l=xi(s,"renderChunk"),u=xi(s,"renderElement"),f=xi(s,"renderLeaf"),h=xi(s,"renderText"),m=oe.useMemo(()=>tZ(i,o??n?.decorate),[n?.decorate,i,o]),g=oe.useMemo(()=>{if(!(!a||!m))return O=>m(O)},[m,a]),b=f3(bP,"contentVisibilityAuto")?vie:void 0,y=l??n?.renderChunk??b,E=oe.useMemo(()=>sse(i,u??n?.renderElement),[n?.renderElement,i,u]),C=oe.useMemo(()=>zie(i,f??n?.renderLeaf),[n?.renderLeaf,i,f]),x=oe.useMemo(()=>$ie(i,h??n?.renderText),[n?.renderText,i,h]),S=PA(()=>{const O={decorate:g,renderChunk:y,renderElement:E,renderLeaf:C,renderText:x};return MA.forEach(_=>{const w=Bie(i,{editableProps:n,handlerKey:_});w&&(O[_]=w)}),O},[g,n,y,E,C,x]);return PA(()=>({...Sre(n,[...MA,"renderChunk","renderElement","renderLeaf","renderText","decorate"]),...S,"aria-disabled":e,className:Ns("slate-editor","ignore-click-outside/toolbar",n.className),"data-readonly":t?"true":void 0,readOnly:t}),[n,S,t])},i0=e=>{const t=Zt.c(3),n=wr();let r;return t[0]!==n.api||t[1]!==e?(r=n.api.findPath(e),t[0]=n.api,t[1]=e,t[2]=r):r=t[2],r},Uie=e=>{const t=Zt.c(19),{id:n}=e,r=wr(n),i=Ps(n),s=xi(i,"onChange"),a=xi(i,"onValueChange"),o=xi(i,"onSelectionChange"),l=mp("versionEditor",n),u=mp("versionSelection",n),f=mp("versionValue",n);let h;t[0]!==r||t[1]!==s||t[2]!==l?(h=O=>{l(),Pie(r,O)||s?.({editor:r,value:O})},t[0]=r,t[1]=s,t[2]=l,t[3]=h):h=t[3];const m=h;let g;t[4]!==r||t[5]!==a||t[6]!==f?(g=O=>{f(),a?.({editor:r,value:O})},t[4]=r,t[5]=a,t[6]=f,t[7]=g):g=t[7];const b=g;let y;t[8]!==r||t[9]!==o||t[10]!==u?(y=O=>{u(),o?.({editor:r,selection:O})},t[8]=r,t[9]=o,t[10]=u,t[11]=y):y=t[11];const E=y,C=r,x=r.children;let S;return t[12]!==r.meta.key||t[13]!==m||t[14]!==E||t[15]!==b||t[16]!==C||t[17]!==x?(S={key:r.meta.key,editor:C,initialValue:x,onChange:m,onSelectionChange:E,onValueChange:b},t[12]=r.meta.key,t[13]=m,t[14]=E,t[15]=b,t[16]=C,t[17]=x,t[18]=S):S=t[18],S},Hie="element",{elementStore:y2}=Jc({element:null,entry:null,path:null},{name:"element",suppressWarnings:!0}),l4=oe.createContext(null),VA=oe.createContext(null);let Wie=null;const CF=(e,t,n)=>{(!n||!Object.is(n.element,t.element))&&e.set(y2.atom.element,t.element),(!n||!Object.is(n.entry,t.entry))&&e.set(y2.atom.entry,t.entry),(!n||!Object.is(n.path,t.path))&&e.set(y2.atom.path,t.path)},Kie=e=>{const t=n4();return CF(t,e),t},Gie=e=>{let t=null;const n=new Set;let r=e;return{getJotaiStore:()=>(t||(t=Kie(r)),t),getState:()=>r,setState:i=>{if(Object.is(r.element,i.element)&&Object.is(r.entry,i.entry)&&Object.is(r.path,i.path))return;const s=r;r=i,t&&CF(t,i,s),n.forEach(a=>{a()})},subscribe:i=>(n.add(i),()=>{n.delete(i)})}},Yie=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.scope===t)return n;n=n.parent}return e},UA=(e,t)=>{if(!e||!t)return e;let n=e;for(;n;){if(n.scope===t)return n;n=n.parent}return null},Jie=e=>{const t=Zt.c(8),n=oe.useContext(l4);let r;t[0]!==e?(r=UA(Wie,e),t[0]=e,t[1]=r):r=t[1];const i=r;if(i)return i;let s;t[2]!==n||t[3]!==e?(s=UA(n,e),t[2]=n,t[3]=e,t[4]=s):s=t[4];const a=s;if(a)return a;let o;return t[5]!==n||t[6]!==e?(o=Yie(n,e),t[5]=n,t[6]=e,t[7]=o):o=t[7],o};function zm({children:e,path:t,scope:n,...r}){const i=r.element??null,s=r.entry??null,a=t??null,[o]=oe.useState(()=>Gie({element:i,entry:s,path:a})),l=oe.useContext(l4),u=oe.useContext(VA),f=oe.useMemo(()=>({element:i,entry:s,parent:l,path:a,scope:n}),[i,a,s,l,n]),h=oe.useMemo(()=>({parent:u,runtime:o,scope:n,get store(){return o.getJotaiStore()}}),[u,o,n]);return oe.useLayoutEffect(()=>{o.setState({element:i,entry:s,path:a})},[i,a,s,o]),oe.createElement(VA.Provider,{value:h},oe.createElement(l4.Provider,{value:f},t&&Je.equals(t,[0])?oe.createElement(Xie,null):null,e))}function Xie(){const e=wr(),t=Ps(),n=Kte(),r=ia();return e.dom.readOnly=r,e.dom.composing=n,oe.useLayoutEffect(()=>{t.set("composing",n)},[n,t]),null}function Qie(e){const t=Zt.c(3),{editor:n,plugin:r,pluginContext:i,...s}=e;let a=s;const o=ia();if(ri(o,r,"render"))return null;const{children:l}=a,u=r.render?.node,f=u??c3;a=Zc({attributes:a.element.attributes,editor:n,plugin:r,pluginContext:i,props:a,readOnly:o});let h=l;n.meta.pluginCache.render.belowNodes.forEach(y=>{const E=n.getPlugin({key:y}),C=E.render.belowNodes,x=C({...a,key:y});x&&!ri(o,E,"render")&&(h=x({...a,children:h}))});let m;t[0]!==u||t[1]!==r.render?.as?(m=u?{}:{as:r.render?.as},t[0]=u,t[1]=r.render?.as,t[2]=m):m=t[2];const g=m;let b=oe.createElement(f,{...g,...a},h,oe.createElement(kF,{...g,...a}));return n.meta.pluginCache.render.aboveNodes.forEach(y=>{const E=n.getPlugin({key:y}),C=E.render.aboveNodes,x=C({...a,key:y});x&&!ri(o,E,"render")&&(b=x({...a,children:b}))}),b}function kF(e){const t=Zt.c(8);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];const r=wr(),i=ia();let s;t[2]!==r||t[3]!==n||t[4]!==i?(s=r.meta.pluginCache.render.belowRootNodes.map(o=>{const l=r.getPlugin({key:o});if(ri(i,l,"render"))return null;const u=l.render.belowRootNodes;return oe.createElement(u,{key:o,...n})}),t[2]=r,t[3]=n,t[4]=i,t[5]=s):s=t[5];let a;return t[6]!==s?(a=oe.createElement(oe.Fragment,null,s),t[6]=s,t[7]=a):a=t[7],a}const Zie=(e,t)=>{const n=Qc(e,t);return function(i){const{element:s,path:a}=i;return oe.createElement(zm,{element:s,entry:[s,a],path:a,scope:t.key},oe.createElement(Qie,{editor:e,plugin:t,pluginContext:n,...i}))}};function ese(e){const t=Zt.c(16),{attributes:n,children:r,editor:i,element:s,plugin:a}=e,o=i0(s);let l;t[0]!==s||t[1]!==o?(l=[s,o],t[0]=s,t[1]=o,t[2]=l):l=t[2];let u;t[3]!==n||t[4]!==r||t[5]!==i||t[6]!==s||t[7]!==o||t[8]!==a?(u=oe.createElement(tse,{attributes:n,editor:i,element:s,path:o,plugin:a},r),t[3]=n,t[4]=r,t[5]=i,t[6]=s,t[7]=o,t[8]=a,t[9]=u):u=t[9];let f;return t[10]!==s||t[11]!==o||t[12]!==a.key||t[13]!==l||t[14]!==u?(f=oe.createElement(zm,{element:s,entry:l,path:o,scope:a.key},u),t[10]=s,t[11]=o,t[12]=a.key,t[13]=l,t[14]=u,t[15]=f):f=t[15],f}function DF({attributes:e,editor:t,element:n,path:r,readOnly:i}){return t.meta.pluginCache.inject.nodeProps.length===0?e:jE(t,{attributes:e,element:n},s=>s===n?r:t.api.findPath(s),i).attributes}function tse(e){const t=Zt.c(16),{attributes:n,children:r,editor:i,element:s,path:a,plugin:o}=e,l=ia();let u;t[0]!==n||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==l?(u={attributes:n,editor:i,element:s,path:a,readOnly:l},t[0]=n,t[1]=i,t[2]=s,t[3]=a,t[4]=l,t[5]=u):u=t[5];const f=DF(u),h=o.render?.as;let m;t[6]!==r||t[7]!==i||t[8]!==s||t[9]!==f||t[10]!==a||t[11]!==o||t[12]!==h?(m={as:h,attributes:f,children:r,editor:i,element:s,path:a,plugin:o},t[6]=r,t[7]=i,t[8]=s,t[9]=f,t[10]=a,t[11]=o,t[12]=h,t[13]=m):m=t[13];const g=m;let b;return t[14]!==g?(b=oe.createElement(c3,g),t[14]=g,t[15]=b):b=t[15],b}function HA(e){const t=Zt.c(20),{attributes:n,blockId:r,children:i,editor:s,element:a,isVoidTag:o,plugin:l,renderBelowNodes:u,tag:f}=e,h=i0(a);let m;t[0]!==a||t[1]!==h?(m=[a,h],t[0]=a,t[1]=h,t[2]=m):m=t[2];let g;t[3]!==f||t[4]!==n||t[5]!==r||t[6]!==i||t[7]!==s||t[8]!==a||t[9]!==o||t[10]!==h||t[11]!==l||t[12]!==u?(g=oe.createElement(nse,{attributes:n,blockId:r,editor:s,element:a,isVoidTag:o,path:h,plugin:l,renderBelowNodes:u,tag:f},i),t[3]=f,t[4]=n,t[5]=r,t[6]=i,t[7]=s,t[8]=a,t[9]=o,t[10]=h,t[11]=l,t[12]=u,t[13]=g):g=t[13];let b;return t[14]!==a||t[15]!==h||t[16]!==l.key||t[17]!==m||t[18]!==g?(b=oe.createElement(zm,{element:a,entry:m,path:h,scope:l.key},g),t[14]=a,t[15]=h,t[16]=l.key,t[17]=m,t[18]=g,t[19]=b):b=t[19],b}function nse(e){const t=Zt.c(27),{attributes:n,blockId:r,children:i,editor:s,element:a,isVoidTag:o,path:l,plugin:u,renderBelowNodes:f,tag:h}=e,m=ia();let g;t[0]!==n||t[1]!==s||t[2]!==a||t[3]!==l||t[4]!==m?(g={attributes:n,editor:s,element:a,path:l,readOnly:m},t[0]=n,t[1]=s,t[2]=a,t[3]=l,t[4]=m,t[5]=g):g=t[5];const b=DF(g),y=bF(r,b.ref);let E;if(t[6]!==n||t[7]!==i||t[8]!==s||t[9]!==a||t[10]!==l||t[11]!==u||t[12]!==m||t[13]!==f){if(E=i,f){const T={attributes:n,children:i,editor:s,element:a,path:l,plugin:u};s.meta.pluginCache.render.belowNodes.forEach(A=>{const P=s.getPlugin({key:A});if(ri(m,P,"render"))return;const I=P.render.belowNodes({...T,key:A});I&&(E=I({...T,children:E}))})}t[6]=n,t[7]=i,t[8]=s,t[9]=a,t[10]=l,t[11]=u,t[12]=m,t[13]=f,t[14]=E}else E=t[14];const C=b["data-slate-inline"];let x;t[15]!==b.style?(x={position:"relative",...b.style},t[15]=b.style,t[16]=x):x=t[16];const S=x;let O;t[17]!==b||t[18]!==y||t[19]!==C||t[20]!==S?(O={"data-slate-inline":C,"data-slate-node":"element",...b,ref:y,style:S},t[17]=b,t[18]=y,t[19]=C,t[20]=S,t[21]=O):O=t[21];const _=O;let w;return t[22]!==h||t[23]!==E||t[24]!==_||t[25]!==o?(w=o?oe.createElement("div",_,oe.createElement(h,{contentEditable:!1}),E):oe.createElement(h,_,E),t[22]=h,t[23]=E,t[24]=_,t[25]=o,t[26]=w):w=t[26],w}function WA(e){const t=Zt.c(5),{editor:n,plugin:r,props:i}=e,s=i0(i.element);let a;return t[0]!==n||t[1]!==s||t[2]!==r||t[3]!==i?(a=Zie(n,r)({...i,path:s}),t[0]=n,t[1]=s,t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function rse(e){const t=Zt.c(4),{props:n,renderElementProp:r}=e,i=i0(n.element);let s;return t[0]!==i||t[1]!==n||t[2]!==r?(s=r({...n,path:i}),t[0]=i,t[1]=n,t[2]=r,t[3]=s):s=t[3],s}function ise(e){const t=Zt.c(20),{editor:n,props:r}=e,i=ia(),s=i0(r.element);let a;t[0]!==n||t[1]!==s||t[2]!==r||t[3]!==i?(a=Zc({disableInjectNodeProps:!0,editor:n,props:{...r,path:s},readOnly:i}),t[0]=n,t[1]=s,t[2]=r,t[3]=i,t[4]=a):a=t[4];const o=a;let l;t[5]!==o.element||t[6]!==s?(l=[o.element,s],t[5]=o.element,t[6]=s,t[7]=l):l=t[7];const u=o.element.type??"default";let f;t[8]!==o?(f=oe.createElement(kF,o),t[8]=o,t[9]=f):f=t[9];let h;t[10]!==o||t[11]!==r.children||t[12]!==f?(h=oe.createElement(c3,o,r.children,f),t[10]=o,t[11]=r.children,t[12]=f,t[13]=h):h=t[13];let m;return t[14]!==o.element||t[15]!==s||t[16]!==l||t[17]!==u||t[18]!==h?(m=oe.createElement(zm,{element:o.element,entry:l,path:s,scope:u},h),t[14]=o.element,t[15]=s,t[16]=l,t[17]=u,t[18]=h,t[19]=m):m=t[19],m}const sse=(e,t)=>{const n=e.meta.pluginCache.render.aboveNodes.length>0,r=e.meta.pluginCache.render.belowRootNodes.length>0;return function(s){const a=Oi(e,s.element.type);if(a?.node.isElement){if(!n&&!r&&!a.render.node&&!a.node.props&&!a.node.dangerouslyAllowAttributes?.length){const o=e.dom.readOnly;if(ri(o,a,"render"))return null;const l=s.element.id&&e.api.isBlock(s.element)?s.element.id:void 0,u=a.rules.selection?.affinity==="directional",f={...s.attributes,className:[fl(a.node.type),s.attributes?.className].filter(Boolean).join(" ")||void 0},h=a.render?.as??"div",m=typeof h=="string",g=h,b=m&&xF(g),y=e.meta.pluginCache.render.belowNodes.some(E=>!ri(o,e.getPlugin({key:E}),"render"));return!u&&!y&&m?oe.createElement(HA,{attributes:f,blockId:l,editor:e,element:s.element,isVoidTag:b,plugin:a,renderBelowNodes:!1,tag:g},s.children):!u&&y&&m?oe.createElement(HA,{attributes:f,blockId:l,editor:e,element:s.element,isVoidTag:b,plugin:a,renderBelowNodes:!0,tag:g},s.children):!y&&m?oe.createElement(ese,{attributes:f,editor:e,element:s.element,plugin:a},s.children):oe.createElement(WA,{editor:e,plugin:a,props:s})}return oe.createElement(WA,{editor:e,plugin:a,props:s})}return t?oe.createElement(rse,{props:s,renderElementProp:t}):oe.createElement(ise,{editor:e,props:s})}},{plateControllerStore:pp,usePlateControllerStore:ase}=Jc({activeId:Gi(null),editorStores:Gi({}),primaryEditorIds:Gi([])},{name:"plateController"}),hd=e=>ase({scope:void 0,warnIfNoStore:!1}),ose=()=>!!hd().store,lse=e=>{const t=Zt.c(2);let n;t[0]!==e?(n=Gi(i=>{const s=i(pp.atom.editorStores),a=l=>l?s[l]??null:null;if(e)return a(e);const o=[i(pp.atom.activeId),...i(pp.atom.primaryEditorIds)];for(const l of o){const u=a(l);if(u)return u}return null}),t[0]=e,t[1]=n):n=t[1];const r=n;return GR(hd(),r)},SF=({id:e,composing:t=!1,containerRef:n={current:null},decorate:r=null,editor:i,isMounted:s=!1,primary:a=!0,readOnly:o=null,renderChunk:l=null,renderElement:u=null,renderLeaf:f=null,renderText:h=null,scrollRef:m={current:null},versionDecorate:g=1,versionEditor:b=1,versionSelection:y=1,versionValue:E=1,onChange:C=null,onNodeChange:x=null,onSelectionChange:S=null,onTextChange:O=null,onValueChange:_=null,...w}={})=>Jc({composing:t,containerRef:n,decorate:r,editor:i,isMounted:s,primary:a,readOnly:o,renderChunk:l,renderElement:u,renderLeaf:f,renderText:h,scrollRef:m,versionDecorate:g,versionEditor:b,versionSelection:y,versionValue:E,onChange:C,onNodeChange:x,onSelectionChange:S,onTextChange:O,onValueChange:_,...w},{name:"plate",suppressWarnings:!0,extend:T=>({trackedEditor:Gi(A=>({editor:A(T.editor),version:A(T.versionEditor)})),trackedSelection:Gi(A=>({selection:A(T.editor).selection,version:A(T.versionSelection)})),trackedValue:Gi(A=>({value:A(T.editor).children,version:A(T.versionValue)}))})}),{PlateProvider:use,plateStore:cse,usePlateStore:fse}=SF(),{usePlateStore:dse}=SF(),Ps=e=>{const t=fse({scope:e,warnIfNoStore:!1})??null,[n]=oe.useState(!!t.store),r=n?t:lse(e),i=ose(),s=dse();if(!r){if(i)return s;throw new Error("Plate hooks must be used inside a Plate or PlateController")}return r},hse=()=>xi(Ps(),"editor").id,pse=e=>!!xi(Ps(e),"readOnly"),wr=e=>{const t=Ps(e),n=xi(t,"editor")??Tie();return n.store=t,n},mse=e=>Ps(e).useTrackedSelectionValue().selection,mp=(e,t)=>{const n=Zt.c(6),r=oe.useRef(1),i=Ps(t),s=iu(i,"versionDecorate"),a=iu(i,"versionSelection"),o=iu(i,"versionValue"),l=iu(i,"versionEditor");let u;return n[0]!==e||n[1]!==s||n[2]!==l||n[3]!==a||n[4]!==o?(u=()=>{const f=r.current+1;e:switch(e){case"versionDecorate":s(f);break e;case"versionEditor":l(f);break e;case"versionSelection":a(f);break e;case"versionValue":o(f)}r.current=f},n[0]=e,n[1]=s,n[2]=l,n[3]=a,n[4]=o,n[5]=u):u=n[5],u},gse=e=>{const t=Zt.c(2),n=mp("versionDecorate",e);let r;return t[0]!==n?(r=()=>{n()},t[0]=n,t[1]=r):r=t[1],r};function s0(e,t){const n=Zt.c(6),r=wr(t);let i;n[0]!==r||n[1]!==e?(i=Qc(r,e),n[0]=r,n[1]=e,n[2]=i):i=n[2];let s;return n[3]!==r.store||n[4]!==i?(s={...i,store:r.store},n[3]=r.store,n[4]=i,n[5]=s):s=n[5],s}const _F=(e,t,{id:n,equalityFn:r=(i,s)=>i===s}={})=>{const i=oe.useMemo(()=>HR(cse.atom.trackedEditor,({editor:s},a)=>e(s,a),r),t);return GR(Ps(n),i)};function f3(e,t,...n){return vse(wr(),e,t,...n)}function vse(e,t,n,...r){const i=e.getOptionsStore(t);if(i){if(n!=="state"&&!(n in i.get("state"))&&!(n in i.selectors)){e.api.debug.error(`usePluginOption: ${n} option is not defined in plugin ${t.key}`,"OPTION_UNDEFINED");return}return n==="state"?yre(i,s=>s,r[0]):vre(i,n,...r)}}const d3=e=>{const t=Zt.c(1),n=Hie,r=wr(),i=Jie(n)?.element;if(!i){r.api.debug.warn(`useElement(${n}) hook must be used inside the node component's context`,"USE_ELEMENT_CONTEXT");let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0],s}return i};function yse(e){const t=Zt.c(4),{id:n,editableRef:r}=e,i=wr(n);let s;return t[0]!==r||t[1]!==i.meta.shortcuts||t[2]!==n?(s=oe.createElement(oe.Fragment,null,Object.entries(i.meta.shortcuts).map(a=>{const[o,l]=a;return!l||!Mr(l.keys)||!l.handler?null:oe.createElement(xse,{id:n,key:o,editableRef:r,hotkeyConfig:l})})),t[0]=r,t[1]=i.meta.shortcuts,t[2]=n,t[3]=s):s=t[3],s}function xse(e){const t=Zt.c(15),{id:n,editableRef:r,hotkeyConfig:i}=e,s=wr(n);let a,o,l;t[0]!==i?({keys:o,handler:a,...l}=i,t[0]=i,t[1]=a,t[2]=o,t[3]=l):(a=t[1],o=t[2],l=t[3]);let u;t[4]!==s||t[5]!==a||t[6]!==l?(u=(y,E)=>{a({editor:s,event:y,eventDetails:E})!==!1&&!Mr(l.preventDefault)&&(y.preventDefault(),y.stopPropagation?.())},t[4]=s,t[5]=a,t[6]=l,t[7]=u):u=t[7];let f;t[8]!==l?(f={enableOnContentEditable:!0,...l},t[8]=l,t[9]=f):f=t[9];let h;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[10]=h):h=t[10];const m=t4(o,u,f,h);let g,b;return t[11]!==r||t[12]!==m?(g=()=>{r.current&&m(r.current)},b=[m,r],t[11]=r,t[12]=m,t[13]=g,t[14]=b):(g=t[13],b=t[14]),Z.useEffect(g,b),null}const bse=({id:e})=>{const t=wr(e),n=gse(e);return oe.useEffect(()=>{t.api.redecorate=n},[t,n]),null};function wse({id:e,plugin:t}){const n=wr(e);return t.useHooks?.(Qc(n,t)),null}function Ese({id:e}){const t=Ps(e),n=xi(t,"editor"),r=iu(t,"isMounted");return oe.useEffect(()=>(r(!0),()=>{r(!1)}),[r]),oe.createElement(oe.Fragment,null,n.meta.pluginCache.useHooks.map(i=>oe.createElement(wse,{id:e,key:i,plugin:gF(n,{key:i})})))}function Cse(){globalThis.__PLATE_INSTANCES__=(globalThis.__PLATE_INSTANCES__||0)+1}Cse();function kse(e){const t=Zt.c(3);let n,r;t[0]!==e?(n=()=>{!e&&globalThis.__PLATE_INSTANCES__&&globalThis.__PLATE_INSTANCES__>1&&console.warn("Detected multiple @platejs/core instances!")},r=[e],t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),oe.useEffect(n,r)}function Dse(e){const t=Zt.c(15),{children:n,containerRef:r,decorate:i,editor:s,primary:a,readOnly:o,renderElement:l,renderLeaf:u,scrollRef:f,onChange:h,onNodeChange:m,onSelectionChange:g,onTextChange:b,onValueChange:y}=e,E=o??s?.dom.readOnly;let C;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==s||t[4]!==h||t[5]!==m||t[6]!==g||t[7]!==b||t[8]!==y||t[9]!==a||t[10]!==l||t[11]!==u||t[12]!==f||t[13]!==E?(C=oe.createElement(use,{readOnly:E,onChange:h,onNodeChange:m,onSelectionChange:g,onTextChange:b,onValueChange:y,containerRef:r,decorate:i,editor:s,primary:a,renderElement:l,renderLeaf:u,scope:s.id,scrollRef:f},n),t[0]=n,t[1]=r,t[2]=i,t[3]=s,t[4]=h,t[5]=m,t[6]=g,t[7]=b,t[8]=y,t[9]=a,t[10]=l,t[11]=u,t[12]=f,t[13]=E,t[14]=C):C=t[14],C}function Sse(e){const t=Z.useId(),n=oe.useRef(null),r=oe.useRef(null);return kse(e.suppressInstanceWarning),e.editor?(e.editor.meta.uid=`e-${t.replaceAll(":","")}`,oe.createElement(Dse,{key:e.editor.meta.key,containerRef:n,scrollRef:r,...e})):null}const _se=e=>{const t=Zt.c(23),{id:n}=e,r=hse(),i=n??r;let s;t[0]!==i?(s=gie(pp.atom.editorStores,w=>w.prop(i)),t[0]=i,t[1]=s):s=t[1];const a=s,o=hd();let l;t[2]!==a||t[3]!==o?(l=o.setAtom(a),t[2]=a,t[3]=o,t[4]=l):l=t[4];let u;t[5]!==a?(u=[a],t[5]=a,t[6]=u):u=t[6];const f=m2(l,u),h=m2(iu(hd(),"primaryEditorIds")),m=m2(iu(hd(),"activeId")),g=Ps(i),b=xi(g,"primary"),y=rne();let E,C;t[7]!==i||t[8]!==m||t[9]!==f||t[10]!==g?(E=()=>(f(g??null),()=>{f(null),m(w=>w===i?null:w)}),C=[g,f,m,i],t[7]=i,t[8]=m,t[9]=f,t[10]=g,t[11]=E,t[12]=C):(E=t[11],C=t[12]),oe.useEffect(E,C);let x,S;t[13]!==i||t[14]!==b||t[15]!==h?(x=()=>{if(b)return h(w=>[...w,i]),()=>{h(w=>w.filter(T=>T!==i))}},S=[i,b,h],t[13]=i,t[14]=b,t[15]=h,t[16]=x,t[17]=S):(x=t[16],S=t[17]),oe.useEffect(x,S);let O,_;return t[18]!==y||t[19]!==i||t[20]!==m?(_=()=>{i&&y&&m(i)},O=[i,y,m],t[18]=y,t[19]=i,t[20]=m,t[21]=O,t[22]=_):(O=t[21],_=t[22]),oe.useEffect(_,O),null};function Ase(e){const t=Zt.c(11),{id:n,children:r}=e;let i;t[0]!==n?(i={id:n},t[0]=n,t[1]=i):i=t[1];const s=Uie(i),a=wr(n);let o;return t[2]!==r||t[3]!==a||t[4]!==s.editor||t[5]!==s.initialValue||t[6]!==s.key||t[7]!==s.onChange||t[8]!==s.onSelectionChange||t[9]!==s.onValueChange?(o=oe.createElement(sne,{key:s.key,editor:s.editor,initialValue:s.initialValue,onChange:s.onChange,onSelectionChange:s.onSelectionChange,onValueChange:s.onValueChange},r),a.meta.pluginCache.render.aboveSlate.forEach(l=>{const u=a.getPlugin({key:l}).render.aboveSlate;o=oe.createElement(u,null,o)}),t[2]=r,t[3]=a,t[4]=s.editor,t[5]=s.initialValue,t[6]=s.key,t[7]=s.onChange,t[8]=s.onSelectionChange,t[9]=s.onValueChange,t[10]=o):o=t[10],o}const AF=oe.forwardRef(({autoFocusOnEditable:e,readOnly:t,renderEditable:n,...r},i)=>{const{id:s}=r,a=wr(s),o=pse(),l=r.disabled?!0:t??o;if(a.dom.readOnly=l,!a)throw new Error("Editor not found. Please ensure that PlateContent is rendered below Plate.");const u=Vie({...r,readOnly:l}),f=Z.useRef(null),h=Fm(i,f);if(!a.children||a.children.length===0)return null;const m=oe.createElement(Qte,{ref:h,...u});let g=null,b=null;a.meta.pluginCache.render.beforeEditable.forEach(E=>{const C=a.getPlugin({key:E});if(ri(l,C,"render"))return;const x=C.render.beforeEditable;b=oe.createElement(oe.Fragment,null,b,oe.createElement(x,u))}),a.meta.pluginCache.render.afterEditable.forEach(E=>{const C=a.getPlugin({key:E});if(ri(l,C,"render"))return;const x=C.render.afterEditable;g=oe.createElement(oe.Fragment,null,g,oe.createElement(x,u))});let y=oe.createElement(oe.Fragment,null,n?n(m):m,oe.createElement(bse,{id:s}),oe.createElement(yse,{id:s,editableRef:f}),oe.createElement(Ese,{id:s}),oe.createElement(_se,{id:s}));return a.meta.pluginCache.render.aboveEditable.forEach(E=>{const C=a.getPlugin({key:E});if(ri(l,C,"render"))return;const x=C.render.aboveEditable;y=oe.createElement(x,null,y)}),oe.createElement(Ase,{id:s},oe.createElement(Tse,{id:s,disabled:r.disabled,readOnly:t,autoFocusOnEditable:e,editor:a}),b,y,g)});AF.displayName="PlateContent";function Tse(e){const t=Zt.c(25),{id:n,autoFocusOnEditable:r,disabled:i,editor:s,readOnly:a}=e,o=Ps(n);let l;t[0]!==i||t[1]!==a||t[2]!==o?(l=()=>{if(i){o.setReadOnly(!0);return}Mr(a)&&o.setReadOnly(a)},t[0]=i,t[1]=a,t[2]=o,t[3]=l):l=t[3];let u;t[4]!==i||t[5]!==s.dom||t[6]!==a||t[7]!==o?(u=[i,s.dom,a,o],t[4]=i,t[5]=s.dom,t[6]=a,t[7]=o,t[8]=u):u=t[8],oe.useLayoutEffect(l,u);const f=xi(o,"onNodeChange");let h,m;t[9]!==s||t[10]!==f?(h=()=>{f&&s.setOption(Ip,"onNodeChange",f)},m=[s,f],t[9]=s,t[10]=f,t[11]=h,t[12]=m):(h=t[11],m=t[12]),oe.useLayoutEffect(h,m);const g=xi(o,"onTextChange");let b,y;t[13]!==s||t[14]!==g?(b=()=>{g&&s.setOption(Ip,"onTextChange",g)},y=[s,g],t[13]=s,t[14]=g,t[15]=b,t[16]=y):(b=t[15],y=t[16]),oe.useLayoutEffect(b,y);const E=oe.useRef(a);let C;t[17]!==r||t[18]!==s.tf||t[19]!==a?(C=()=>{r&&E.current&&!a&&s.tf.focus({edge:"endEditor"}),E.current=a},t[17]=r,t[18]=s.tf,t[19]=a,t[20]=C):C=t[20];let x;return t[21]!==r||t[22]!==s||t[23]!==a?(x=[r,s,a],t[21]=r,t[22]=s,t[23]=a,t[24]=x):x=t[24],oe.useEffect(C,x),null}const TF=e=>Array.isArray(e.children)?{...e,children:e.children.map(TF)}:{...e},Nse=e=>e.map(TF);function Ose(e={},t=[]){const[,n]=oe.useState({}),r=oe.useRef(!1);return oe.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),oe.useMemo(()=>e.enabled===!1?null:yF({...e,value:Array.isArray(e.value)?Nse(e.value):e.value,onReady:i=>{i.isAsync&&r.current&&n({}),e.onReady?.(i)}}),[e.id,e.enabled,...t])}const Bse={a:"a",ai:"ai",aiChat:"aiChat",audio:"audio",blockquote:"blockquote",bold:"bold",callout:"callout",code:"code",codeBlock:"code_block",codeDrawing:"code_drawing",codeLine:"code_line",codeSyntax:"code_syntax",column:"column",columnGroup:"column_group",comment:"comment",date:"date",emojiInput:"emoji_input",equation:"equation",excalidraw:"excalidraw",file:"file",footnoteDefinition:"footnoteDefinition",footnoteInput:"footnoteInput",footnoteReference:"footnoteReference",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",highlight:"highlight",hr:"hr",img:"img",inlineEquation:"inline_equation",italic:"italic",kbd:"kbd",li:"li",lic:"lic",link:"a",listTodoClassic:"action_item",mediaEmbed:"media_embed",mention:"mention",mentionInput:"mention_input",olClassic:"ol",p:"p",searchHighlight:"search_highlight",slashInput:"slash_input",strikethrough:"strikethrough",sub:"subscript",suggestion:"suggestion",sup:"superscript",table:"table",tag:"tag",taskList:"taskList",td:"td",th:"th",toc:"toc",toggle:"toggle",tr:"tr",ulClassic:"ul",underline:"underline",video:"video"},Pse={backgroundColor:"backgroundColor",color:"color",fontFamily:"fontFamily",fontSize:"fontSize",fontWeight:"fontWeight",indent:"indent",lineHeight:"lineHeight",listType:"listStyleType",textAlign:"textAlign",textIndent:"textIndent"},te={...Bse,...Pse,autoformat:"autoformat",blockMenu:"blockMenu",blockPlaceholder:"blockPlaceholder",blockSelection:"blockSelection",caption:"caption",copilot:"copilot",csv:"csv",cursorOverlay:"cursorOverlay",delete:"delete",dnd:"dnd",docx:"docx",emoji:"emoji",exitBreak:"exitBreak",heading:["h1","h2","h3","h4","h5","h6"],html:"html",juice:"juice",list:"list",listChecked:"checked",listClassic:"listClassic",listRestart:"listRestart",listRestartPolite:"listRestartPolite",listStart:"listStart",listTodo:"todo",markdown:"markdown",nodeId:"nodeId",normalizeTypes:"normalizeTypes",ol:"decimal",placeholder:"placeholder",playwright:"playwright",removeEmptyNodes:"removeEmptyNodes",resetNode:"resetNode",singleBlock:"singleBlock",singleLine:"singleLine",slashCommand:"slash_command",softBreak:"softBreak",tabbable:"tabbable",trailingBlock:"trailingBlock",ul:"disc",yjs:"yjs"};var x2,KA;function Rse(){if(KA)return x2;KA=1;var e=DE(),t=$c(),n=$B(),r=Gc(),i=Object.prototype,s=i.hasOwnProperty,a=e(function(o,l){o=Object(o);var u=-1,f=l.length,h=f>2?l[2]:void 0;for(h&&n(l[0],l[1],h)&&(f=1);++u{if(!t(e))return;let n=e.firstChild;for(;n;){const r=n,i=n.previousSibling;n=n.nextSibling,NF(r,t),!r.previousSibling&&!r.nextSibling&&!r.parentNode&&n&&i!==n.previousSibling&&n.parentNode?n=i?i.nextSibling:e.firstChild:!r.previousSibling&&!r.nextSibling&&!r.parentNode&&n&&!n.previousSibling&&!n.nextSibling&&!n.parentNode&&(i?n=i.nextSibling?i.nextSibling.nextSibling:null:e.firstChild&&(n=e.firstChild.nextSibling))}},u4=(e,t)=>{NF(e,n=>n0(n)?t(n):!0)},Lse=(e,t)=>{let n=null;return u4(e,r=>t(r)?(n=r,!1):!0),n},jm=(e,t)=>!!Lse(e,t),zse=e=>`${e.trim().replaceAll(new RegExp(Mse,"g"),"")}`;Jt({key:te.exitBreak,editOnly:!0}).extendTransforms(({editor:e})=>({insert:t=>e.tf.insertExitBreak(t),insertBefore:t=>e.tf.insertExitBreak({...t,reverse:!0})}));const jse=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){const{rules:s,onError:a}=t();if(!(i.length===0&&s.some(({path:o,strictType:l,type:u})=>{const f=ht.get(e,o);if(f){if(l&&Rt.isElement(f)&&f.type!==l){const{children:h,...m}=e.api.create.block({type:l});return e.tf.setNodes(m,{at:o}),!0}}else try{return e.tf.insertNodes(e.api.create.block({type:l??u}),{at:o}),!0}catch(h){a?.(h)}return!1})))return n([r,i])}}});Yn({key:te.normalizeTypes,options:{rules:[]}}).overrideEditor(jse);Jt({key:te.singleBlock,override:{enabled:{[te.trailingBlock]:!1}}}).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{insertBreak(){e.tf.insertSoftBreak()},normalizeNode(n){const[r,i]=n;if(i.length===0&&e.children.length>1){e.tf.withoutNormalizing(()=>{for(;e.children.length>1;)e.tf.insertText(` +`,{at:e.api.start([1])}),e.tf.mergeNodes({at:[1],match:(s,a)=>a.length===1})});return}t(n)}}}));Jt({key:te.singleLine,override:{enabled:{[te.trailingBlock]:!1}}}).overrideEditor(({editor:e,tf:{normalizeNode:t}})=>({transforms:{insertBreak(){},insertSoftBreak(){},normalizeNode(n){const[r,i]=n;if(Fn.isText(r)){const s=r.text.replace(/[\r\n\u2028\u2029]/g,"");if(s!==r.text){e.tf.insertText(s,{at:i});return}}if(i.length===0&&e.children.length>1){e.tf.withoutNormalizing(()=>{for(;e.children.length>1;)e.tf.mergeNodes({at:[1],match:(s,a)=>a.length===1})});return}t(n)}}}));const qse=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){const{insert:s,level:a,type:o,...l}=t(),u=o??e.getType(te.p);if(i.length===0){const f=e.api.last([],{level:a}),h=f?.[0];if(!h||h.type!==u&&au(f,l)){const m=f?Je.next(f[1]):[0],g=()=>{e.tf.insertNodes(e.api.create.block({type:u},m),{at:m})};s?s(e,{at:m,insert:g,type:u}):g();return}}return n([r,i])}}});Yn({key:te.trailingBlock,options:{level:0}}).overrideEditor(qse).extend(({editor:e})=>({options:{type:e.getType(te.p)}}));const $se=(e,t=[])=>{const n=e.getType(te.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:i,type:n}),i=[])};return t.forEach(a=>{if(Rt.isElement(a)&&!e.api.isInline(a)&&e.api.isBlock(a)){s(),r.push(a);return}i.push(a)}),s(),r.length>0?r:[{children:[{text:""}],type:n}]},c4=(e,t,n,r)=>{const i=e.getType(te.p);return t.type!==i||t[te.listType]?!1:!!e.api.above({at:n,match:(s,a)=>a.length{if(!c4(e,t,n,r))return!1;if(!(e.selection&&e.api.isEmpty(e.selection,{block:!0})))return!0;const i=e.api.parent(n);return!i||i[0].type!==r?!0:!Je.hasPrevious(n)},Use=Jt({key:te.blockquote,node:{isElement:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"BLOCKQUOTE"}]}}},render:{as:"blockquote"},rules:{break:{empty:"lift"},delete:{start:"lift"},match:({editor:e,node:t,path:n,rule:r})=>{if(!["break.empty","delete.start"].includes(r)||!n)return!1;const i=e.getType(te.blockquote);return r==="delete.start"?Vse(e,t,n,i):c4(e,t,n,i)}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t,{wrap:!0})}})).overrideEditor(({editor:e,tf:{normalizeNode:t,tab:n},type:r})=>({transforms:{normalizeNode([i,s]){if(Rt.isElement(i)&&i.type===r){const a=$se(e,i.children);if(a.length!==i.children.length||a.some((o,l)=>o!==i.children[l])){e.tf.replaceNodes(a,{at:s,children:!0});return}}t([i,s])},tab(i){if(i.reverse){const s=e.api.blocks({mode:"lowest",match:(a,o)=>!a.indent&&c4(e,a,o,r)});if(s.length>0){const a=[...s].sort((o,l)=>l[1].length-o[1].length||l[1].join(".").localeCompare(o[1].join(".")));return e.tf.withoutNormalizing(()=>{for(const[,o]of a)e.tf.liftBlock({at:o,match:{type:r}})}),!0}}return n(i)}}})),ef={isElement:!0},tf={break:{splitReset:!0},delete:{start:"reset"},merge:{removeEmpty:!0}},OF=Yn({key:"h1",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H1"}]}}},render:{as:"h1"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),BF=Yn({key:"h2",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H2"}]}}},render:{as:"h2"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),PF=Yn({key:"h3",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H3"}]}}},render:{as:"h3"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),RF=Yn({key:"h4",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H4"}]}}},render:{as:"h4"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),FF=Yn({key:"h5",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H5"}]}}},render:{as:"h5"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),IF=Yn({key:"h6",node:ef,parsers:{html:{deserializer:{rules:[{validNodeName:"H6"}]}}},render:{as:"h6"},rules:tf}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleBlock(t)}})),Hse=Yn({key:"heading",options:{levels:[1,2,3,4,5,6]}}).extend(({plugin:e})=>{const{options:{levels:t}}=e,n={1:OF,2:BF,3:PF,4:RF,5:FF,6:IF};return{plugins:(Array.isArray(t)?t:Array.from({length:t||6},(r,i)=>i+1)).map(r=>n[r])}}),Wse=Jt({key:te.hr,node:{isElement:!0,isVoid:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"HR"}]}}},render:{as:"hr"}}),MF=Jt({key:te.bold,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["STRONG","B"]},{validStyle:{fontWeight:["600","700","bold"]}}],query:({element:e})=>!jm(e,t=>t.style.fontWeight==="normal")}}},render:{as:"strong"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),LF=Jt({key:te.code,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["CODE"]},{validStyle:{fontFamily:"Consolas"}}],query({element:e}){return yw(e,"P")?.style.fontFamily==="Consolas"?!1:!yw(e,"PRE")}}}},render:{as:"code"},rules:{selection:{affinity:"hard"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),zF=Jt({key:te.italic,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["EM","I"]},{validStyle:{fontStyle:"italic"}}],query:({element:e})=>!jm(e,t=>t.style.fontStyle==="normal")}}},render:{as:"em"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),jF=Jt({key:te.strikethrough,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["S","DEL","STRIKE"]},{validStyle:{textDecoration:"line-through"}}],query:({element:e})=>!jm(e,t=>t.style.textDecoration==="none")}}},render:{as:"s"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),qF=Jt({key:te.sub,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["SUB"]},{validStyle:{verticalAlign:"sub"}}]}}},render:{as:"sub"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t,{remove:e.getType(te.sup)})}})),$F=Jt({key:te.sup,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["SUP"]},{validStyle:{verticalAlign:"super"}}]}}},render:{as:"sup"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t,{remove:e.getType(te.sub)})}})),VF=Jt({key:te.underline,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["U"]},{validStyle:{textDecoration:["underline"]}}],query:({element:e})=>!jm(e,t=>t.style.textDecoration==="none")}}},render:{as:"u"}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),Kse=Jt({plugins:[MF,LF,zF,jF,qF,$F,VF]}),Gse=Jt({key:te.highlight,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["MARK"]}]}}},render:{as:"mark"},rules:{selection:{affinity:"directional"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),Yse=Jt({key:te.kbd,node:{isLeaf:!0},parsers:{html:{deserializer:{rules:[{validNodeName:["KBD"]}]}}},render:{as:"kbd"},rules:{selection:{affinity:"hard"}}}).extendTransforms(({editor:e,type:t})=>({toggle:()=>{e.tf.toggleMark(t)}})),UF=fn(Use),Jse=fn(Hse),Xse=fn(OF),Qse=fn(BF),Zse=fn(PF),eae=fn(RF),tae=fn(FF),nae=fn(IF),HF=fn(Wse);Lm({plugins:[UF,Jse,HF]});const rae=fn(MF,{shortcuts:{toggle:{keys:[[ru.Mod,"b"]]}}}),iae=fn(LF),sae=fn(zF,{shortcuts:{toggle:{keys:[[ru.Mod,"i"]]}}}),aae=fn(jF),oae=fn(qF),lae=fn($F),uae=fn(VF,{shortcuts:{toggle:{keys:[[ru.Mod,"u"]]}}}),cae=fn(Kse,{plugins:[rae,iae,sae,aae,oae,lae,uae]}),fae=fn(Gse);fn(Yse);const dae=(e,{children:t,header:n,row:r}={})=>(n=n??(r?r.children.every(i=>i.type===e.getType(te.th)):!1),{children:t??[e.api.create.block()],type:n?e.getType(te.th):e.getType(te.td)}),hae=(e,{colCount:t=1,...n}={})=>{const{api:r}=e.getPlugin({key:te.table});return{children:Array.from({length:t}).fill(t).map(()=>r.create.tableCell(n)),type:e.getType(te.tr)}},pae=(e,{colCount:t,header:n,rowCount:r=0,...i}={})=>{const{api:s}=e.getPlugin({key:te.table});return{children:Array.from({length:r}).fill(r).map((a,o)=>s.create.tableRow({colCount:t,...i,header:n&&o===0})),type:e.getType(te.table)}},qm=e=>e.colSpan||Number(e.attributes?.colspan)||1,h3=e=>e.rowSpan||Number(e.attributes?.rowspan)||1,gp=({col:e,row:t},n)=>({col:e+qm(n)-1,row:t+h3(n)-1});function $m(e,{all:t,cellNode:n,tableNode:r}){const{api:i,getOptions:s,setOption:a}=vn(e,{key:te.table});if(!r&&(!n||(r=e.api.above({at:n,match:{type:e.getType(te.table)}})?.[0],!r)))return;const{_cellIndices:o}=s(),l={...o};let u=!1;const f=[];let h;for(let m=0;m{const{getOption:n}=vn(e,{key:te.table});let r=n("cellIndices",t.id);return r||(r=$m(e,{cellNode:t}),r||e.api.debug.warn("No cell indices found for element. Make sure all table cells have an id.","TABLE_CELL_INDICES")),r??{col:0,row:0}},JA=e=>{const t=e.at(-2);if(t===void 0)throw new Error(`can not get rowIndex of path ${e}`);return t},Pr=e=>lX(e,[te.td,te.th]),mae=(e,{at:t=e.selection}={})=>{if(!t)return;const n=e.api.node({at:t,match:{type:Pr(e)}});if(!n)return;const[,r]=n,i=e.api.above({at:r,match:{type:e.getType(te.tr)}});if(!i)return;const[,s]=i,a=e.api.above({at:s,match:{type:e.getType(te.table)}});if(a)return{cell:n,row:i,table:a}},gae=(e,t)=>{const n=e.api.node(Je.next(t));if(!n)return;const[r,i]=n,s=r?.children?.[0],a=i.concat(0);if(s&&a)return e.api.node(a)},vae=(e,t)=>{const n=Je.previous(t);if(!n)return;const r=e.api.node(n);if(!r)return;const[i,s]=r,a=i?.children?.[i.children.length-1],o=s.concat(i.children.length-1);if(a&&o)return e.api.node(o)},yae=(e,t,n,r)=>{const i=e.api.node(Je.next(n));if(i)return i;const[,s]=r;return gae(e,s)},xae=(e,t,n,r)=>{const i=Je.previous(n);if(!i){const[,a]=r;return vae(e,a)}const s=e.api.node(i);if(s)return s},a0=(e,t,n,r)=>t.children.flatMap(i=>i.children).find(i=>{const s=rr(e,i),{col:a,row:o}=s,{col:l,row:u}=gp(s,i);return r>=a&&r<=l&&n>=o&&n<=u}),bae=(e,{at:t,format:n})=>{const{api:r,type:i}=vn(e,sa),s=e.api.node({at:t.anchor.path,match:{type:Pr(e)}}),a=e.api.node({at:t.focus.path,match:{type:Pr(e)}}),o=s[0],l=a[0],u=s[1].slice(0,-2),f=e.api.node({at:u,match:{type:i}})[0],{col:h,row:m}=gp(rr(e,o),o),{col:g,row:b}=gp(rr(e,l),l);let y=Math.min(m,b),E=Math.max(m,b),C=Math.min(h,g),x=Math.max(h,g);const S=E-y,O=x-C;let _=r.create.table({children:[],colCount:O+1,rowCount:S+1}),w=[],T=new WeakSet,A=y,P=C;for(;;){const F=a0(e,f,A,P);if(!F)break;const M=rr(e,F),{col:W,row:ee}=gp(M,F),{col:U,row:fe}=M;if(feE||Ux){T=new WeakSet,w=[],y=Math.min(y,fe),E=Math.max(E,ee),C=Math.min(C,U),x=Math.max(x,W),A=y,P=C;const ue=E-y,ne=x-C;_=r.create.table({children:[],colCount:ne+1,rowCount:ue+1});continue}if(!T.has(F)){T.add(F);const ue=_.children[A-y].children;ue[P-C]=F;const ne=e.api.findPath(F);w.push([F,ne])}if(P+1<=x)P+=1;else if(A+1<=E)P=C,A+=1;else break}const I=n||"table";return I==="cell"?w:(_.children?.forEach(F=>{const M=F;M.children=M.children?.filter(W=>{const ee=W;return r.table.getCellChildren(ee).length>0})}),I==="table"?[[_,u]]:{cellEntries:w,tableEntries:[[_,u]]})},wae=e=>!!e?.children.some(t=>t.children.some(n=>{const r=n;return qm(r)>1||h3(r)>1})),Eae=(e,{at:t,format:n="table"})=>{const{api:r}=e.getPlugin({key:te.table}),{disableMerge:i}=e.getOptions(sa),s=t.anchor.path,a=t.focus.path,o=s.slice(0,-2),l=ht.get(e,o);if(!i&&wae(l))return bae(e,{at:t,format:n});const u=s.at(-2),f=a.at(-2),h=s.at(-1),m=a.at(-1),g=Math.min(u,f),b=Math.max(u,f),y=Math.min(h,m),E=Math.max(h,m),C=b-g,x=E-y,S=r.create.table({children:[],colCount:x+1,rowCount:C+1});let O=g,_=y;const w=[];for(;;){const T=o.concat([O,_]),A=ht.get(e,T);if(!A)break;const P=S.children[O-g].children;if(P[_-y]=A,w.push([A,T]),_+1<=E)_+=1;else if(O+1<=b)_=y,O+=1;else break}return n==="cell"?w:[[S,o]]},ni=(e,{format:t="table",...n}={})=>{const{api:r}=e.getPlugin({key:te.table}),i=e.api.edgeBlocks({match:{type:Pr(e)},...n});if(i){const[s,a]=i;if(!Je.equals(s[1],a[1]))return Eae(e,{at:{anchor:{offset:0,path:s[1]},focus:{offset:0,path:a[1]}},format:t});if(t==="table"){const o=r.create.table({rowCount:1});return o.children[0].children=[s[0]],[[o,s[1].slice(0,-2)]]}return[s]}return[]},XA=new WeakMap,o0=e=>{const{selection:t}=e,{children:n}=e,r=XA.get(e);if(r&&r.children===n&&r.selection===t)return r;const i={children:n,selection:t};return XA.set(e,i),i},l0=e=>{const t=o0(e);if("cellEntries"in t)return t.cellEntries??[];const n=ni(e,{format:"cell"}),r=n.length>1?n:[];return t.cellEntries=r,r},QA=e=>{const t=o0(e);if("selectedCells"in t)return t.selectedCells??null;const n=l0(e);if(n.length===0)return t.selectedCells=null,null;const r=n.map(([i])=>i);return t.selectedCells=r,r},ZA=e=>{const t=o0(e);if("selectedCellIds"in t)return t.selectedCellIds??null;const n=l0(e).map(([i])=>i.id).filter(i=>!!i),r=n.length>0?n:null;return t.selectedCellIds=r,r},e9=e=>{const t=o0(e);if("selectedTableIds"in t)return t.selectedTableIds??null;const n=d4(e);if(!n)return t.selectedTableIds=null,null;const r=n.map(s=>s.id).filter(s=>!!s),i=r.length>0?r:null;return t.selectedTableIds=i,i},f4=(e,t)=>t?l0(e).find(([n])=>n.id===t)?.[0]??null:null,d4=e=>{const t=o0(e);if("selectedTables"in t)return t.selectedTables??null;if(l0(e).length===0)return t.selectedTables=null,null;const n=ni(e,{format:"table"}).map(([r])=>r);return t.selectedTables=n,n},t9=(e,t)=>!!f4(e,t),n9=e=>l0(e).length>0,du=(e,t)=>e.api.block({above:!0,match:{type:e.getType(te.table)},...t}),Cae=(e,{cellIndices:t,defaultBorder:n={size:1},element:r})=>{const i=e.api.findPath(r),[s,a]=e.api.parent(i)??[];if(!s||!a)return{bottom:n,right:n};const[o]=e.api.parent(a)??[],l=e.getType(te.table);if(!o||o.type!==l)return{bottom:n,right:n};const{col:u}=t??rr(e,r),f=u===0,h=o.children?.[0]===s,m=g=>{const b=r.borders?.[g];return{color:b?.color??n.color,size:b?.size??n.size,style:b?.style??n.style}};return{bottom:m("bottom"),left:f?m("left"):void 0,right:m("right"),top:h?m("top"):void 0}},kae=(e,{cellIndices:t,colSizes:n,element:r,rowSize:i})=>{const{api:s}=vn(e,{key:te.table}),a=e.api.findPath(r);if(!i){const[f]=e.api.parent(a)??[];if(!f||f.type!==e.getType(te.tr))return{minHeight:0,width:0};i=f.size??0}if(!n){const[,f]=e.api.parent(a)??[];if(!f)return{minHeight:i,width:0};const[h]=e.api.parent(f)??[];if(!h)return{minHeight:i,width:0};n=Dae(h)}const o=s.table.getColSpan(r),{col:l}=t??rr(e,r),u=(n??[]).slice(l,l+o).reduce((f,h)=>f+(h||0),0);return{minHeight:i,width:u}},u0=e=>e.children?.[0]?.children?e.children[0].children.map(t=>t.colSpan||t?.attributes?.colspan||1).reduce((t,n)=>Number(t)+Number(n)):0,Dae=(e,t)=>{const n=u0(e);return(e.colSizes?[...e.colSizes]:Array.from({length:n}).fill(0)).map((r,i)=>r)},WF=(e,t)=>{const[n,r]=mn.edges(e.selection),i=ht.child(t[0],0),s=ht.child(t[0],t[0].children.length-1),a=e.api.above({at:n,match:l=>l.type===te.tr}),o=e.api.above({at:r,match:l=>l.type===te.tr});!a||!o||i.id===a[0].id&&o[0].id===s.id&&Sae(e)},Sae=e=>{const t=ni(e,{format:"cell"}),n=[];t.forEach(([r,i])=>{n.push(e.api.pathRef(i))}),n.forEach(r=>{e.tf.removeNodes({at:r.unref()})})},Hp=(e,t,n,r)=>{const[i,s]=t,a=i.children[n].children.findIndex(o=>{const{col:l}=rr(e,o);return l===r});return s.concat([n,a])},KF=e=>e.children?.[0]?.children?.reduce((t,n)=>t+(qm(n)??1),0),_ae=e=>{const t=e.getType(te.table),n=e.api.above({match:{type:t}});n&&e.tf.withoutNormalizing(()=>{const{api:r}=vn(e,sa);if(e.api.isExpanded())return WF(e,n);const i=n[0],s=e.api.above({match:{type:Pr(e)}});if(!s)return;const a=s[0],{col:o}=rr(e,a),l=r.table.getColSpan(a);if(KF(i)<=l){e.tf.removeNodes({at:n[1]});return}const u=o+l-1,f=i.children.length,h=new Set;for(const y of Array.from({length:f},(E,C)=>C))for(const E of Array.from({length:l},(C,x)=>x)){const C=a0(e,i,y,o+E);C&&h.add(C)}const m=Array.from(h),{squizeColSpanCells:g}=m.reduce((y,E)=>{if(!E)return y;const C=E,{col:x}=rr(e,C),S=r.table.getColSpan(C);return(x1||S>1&&x+S-1>u)&&y.squizeColSpanCells.push(C),y},{squizeColSpanCells:[]});g.forEach(y=>{const E=y,{col:C,row:x}=rr(e,E),S=r.table.getColSpan(E),O=Hp(e,n,x,C),_=S-(Math.min(C+S-1,u)-o+1),w=Ts({...E,colSpan:_});w.attributes?.colspan&&(w.attributes.colspan=_.toString()),e.tf.setNodes(w,{at:O})});const b=e.api.above({match:{type:e.getType(te.tr)}});if(a&&b&&n&&b[0].children.length>1){const[y,E]=n,C=[];m.forEach(S=>{const O=S,{col:_,row:w}=rr(e,O);if(!g.includes(O)&&_>=o&&_<=u){const T=Hp(e,n,w,_);C[w]||(C[w]=[]),C[w].push(T)}}),C.forEach(S=>{const O=S[0];S.forEach(()=>{e.tf.removeNodes({at:O})})});const{colSizes:x}=y;if(x){const S=[...x];S.splice(o,1),e.tf.setNodes({colSizes:S},{at:E})}}})},GF=(e,[t,n])=>{const{api:r}=vn(e,sa),i=KF(t),s=ni(e,{format:"cell"}),a=JA(s[0][1]);if(a===null)return;let o=0,l=-1,u=0,f=0;if(s.forEach(([h,m])=>{m.at(-2)===a&&(o+=h.colSpan??1);const g=JA(m);if(l!==g){if(u!==0){u--;return}const b=r.table.getRowSpan(h);u=b&&b>1?b-1:0,f+=b??1}l=g}),o===i){const h=[];for(let m=a;m{e.tf.removeNodes({at:m.unref()})})}},Aae=e=>{const{api:t,tf:n,type:r}=vn(e,{key:te.table});if(e.api.some({match:{type:r}})){const i=e.api.above({match:{type:r}});if(!i)return;if(e.api.isExpanded())return GF(e,i);const s=i[0],a=e.api.above({match:{type:Pr(e)}});if(!a)return;const o=a[0],{row:l}=rr(e,o),u=t.table.getRowSpan(o),f=l+u-1,h=u0(s),m=new Set;for(const S of Array.from({length:h},(O,_)=>_))for(const O of Array.from({length:u},(_,w)=>w)){const _=a0(e,s,l+O,S);m.add(_)}const{moveToNextRowCells:g,squizeRowSpanCells:b}=Array.from(m).reduce((S,O)=>{if(!O)return S;const _=O,{row:w}=rr(e,_),T=t.table.getRowSpan(_);return w1?S.squizeRowSpanCells.push(_):T>1&&w+T-1>f&&S.moveToNextRowCells.push(_),S},{moveToNextRowCells:[],squizeRowSpanCells:[]}),y=l+u,E=s.children[y];if(E===void 0&&l===0){n.remove.table();return}if(E)for(let S=0;S{const{col:me}=rr(e,ne);return me>=_});if(A===-1){const ne=E.children.at(-1),me=e.api.findPath(ne),j=me.slice(0,-2),Q=me.at(-1)+S+1,re=[...j,y,Q],K=T-(f-w+1),Be=Ts({...O,rowSpan:K});Be.attributes?.rowspan&&(Be.attributes.rowspan=K.toString()),e.tf.insertNodes(Be,{at:re});continue}const P=E.children[A],{col:I}=rr(e,P);let F=S;I<_&&(F+=1);const M=e.api.findPath(P),W=M.slice(0,-2),ee=M.at(-1),U=[...W,y,ee+F],fe=T-(f-w+1),ue=Ts({...O,rowSpan:fe});ue.attributes?.rowspan&&(ue.attributes.rowspan=fe.toString()),e.tf.insertNodes(ue,{at:U})}b.forEach(S=>{const O=S,{row:_}=rr(e,O),w=t.table.getRowSpan(O),T=e.api.findPath(O),A=w-(Math.min(_+w-1,f)-l+1),P=Ts({...O,rowSpan:A});P.attributes?.rowspan&&(P.attributes.rowspan=A.toString()),e.tf.setNodes(P,{at:T})});const C=s.children[l],x=e.api.findPath(C);Array.from({length:u}).forEach(()=>{e.tf.removeNodes({at:x})})}},Tae=(e,{at:t,before:n,fromCell:r,header:i,select:s}={})=>{const{api:a,getOptions:o,type:l}=vn(e,sa),{initialTableWidth:u,minColumnWidth:f}=o();t&&!r&&ht.get(e,t)?.type===e.getType(te.table)&&(r=ht.lastChild(e,t.concat([0]))[1],t=void 0);const h=r?e.api.node({at:r,match:{type:Pr(e)}}):e.api.block({match:{type:Pr(e)}});if(!h)return;const[,m]=h,g=h[0],b=e.api.block({above:!0,at:m,match:{type:l}});if(!b)return;const[y,E]=b,{col:C}=rr(e,g),x=a.table.getColSpan(g);let S,O;Je.isPath(t)?(S=C,O=C-1):(S=n?C:C+x,O=n?C:C+x-1);const _=y.children.length,w=S<=0;let T=n?0:1;w&&(O=0,T=0);const A=new Set;Array.from({length:_},(P,I)=>I).forEach(P=>{const I=a0(e,y,P,O);I&&A.add(I)}),Array.from(A).forEach(P=>{const{col:I,row:F}=rr(e,P),M=a.table.getRowSpan(P),W=a.table.getColSpan(P),ee=Hp(e,b,F,I);if(I+W-1>=S&&!w&&!n){const U=W+1,fe=Ts({...P,colSpan:U});fe.attributes?.colspan&&(fe.attributes.colspan=U.toString()),e.tf.setNodes(fe,{at:ee})}else{const U=ee.slice(0,-1),fe=ee.at(-1),ue=[...U,n?fe:fe+T],ne=e.api.parent(ee)[0],me={...a.create.tableCell({header:i,row:ne}),colSpan:1,rowSpan:M};e.tf.insertNodes(me,{at:ue,select:s})}}),e.tf.withoutNormalizing(()=>{const{colSizes:P}=y;if(P){let I=[...P.slice(0,S),0,...P.slice(S)];if(u){I[S]=P[S]??P[S-1]??u/P.length;const F=P.reduce((ee,U)=>ee+U,0),M=I.reduce((ee,U)=>ee+U,0),W=Math.max(F,u);if(M>W){const ee=W/M;I=I.map(U=>Math.max(f??0,Math.floor(U*ee)))}}e.tf.setNodes({colSizes:I},{at:E})}})},Nae=(e,{at:t,before:n,fromRow:r,header:i,select:s}={})=>{const{api:a,type:o}=vn(e,sa);t&&!r&&ht.get(e,t)?.type===e.getType(te.table)&&(r=ht.lastChild(e,t)[1],t=void 0);const l=e.api.block({at:r,match:{type:e.getType(te.tr)}});if(!l)return;const[,u]=l,f=e.api.block({above:!0,at:u,match:{type:o}});if(!f)return;const h=f[0],m=e.api.node({at:r,match:{type:Pr(e)}});if(!m)return;const[g,b]=m,y=g,E=a.table.getRowSpan(y),{row:C}=rr(e,y),x=b.at(-2),S=b.slice(0,-2);let O,_,w;Je.isPath(t)?(O=t.at(-1),_=C-1,w=t):(O=n?C:C+E,_=n?C-1:C+E-1,w=[...S,n?x:x+E]);const T=O===0;T&&(_=0);const A=u0(h),P=new Set;Array.from({length:A},(M,W)=>W).forEach(M=>{const W=a0(e,h,_,M);W&&P.add(W)});const I=Array.from(P),F=[];I.forEach(M=>{if(!M)return;const W=M,{col:ee,row:U}=rr(e,W),fe=a.table.getRowSpan(W),ue=a.table.getColSpan(W),ne=Hp(e,f,U,ee);if(U+fe-1>=O&&!T){const me=fe+1,j=Ts({...W,rowSpan:me});j.attributes?.rowspan&&(j.attributes.rowspan=me.toString()),e.tf.setNodes(j,{at:ne})}else{const me=e.api.parent(ne)[0],j=a.create.tableCell({header:i,row:me});F.push({...j,colSpan:ue,rowSpan:1})}}),e.tf.withoutNormalizing(()=>{if(e.tf.insertNodes({children:F,type:e.getType(te.tr)},{at:w,select:!1}),s){const M=e.api.node({at:w,match:{type:Pr(e)}});if(M){const[,W]=M;e.tf.select(W)}}})},Oae=e=>{const{api:t}=vn(e,sa),n=ni(e,{format:"cell"});e.tf.withoutNormalizing(()=>{let r=0;for(const u of n){const[f,h]=u;if(h.at(-2)===n[0][1].at(-2)){const m=t.table.getColSpan(f);r+=m}}let i=0;const{col:s}=rr(e,n[0][0]);n.forEach(u=>{const f=u[0],{col:h}=rr(e,f);s===h&&(i+=t.table.getRowSpan(f))});const a=[];for(const u of n){const[f]=u,h=t.table.getCellChildren(f);(h.length!==1||!e.api.isEmpty(h[0]))&&a.push(...Ts(h))}const o={};n.forEach(([u,f])=>{const h=f.at(-2);o[h]?o[h].push(f):o[h]=[f]}),Object.values(o).forEach(u=>{u?.forEach(()=>{e.tf.removeNodes({at:u[0]})})});const l={...t.create.tableCell({children:a,header:n[0][0].type===e.getType(te.th)}),colSpan:r,rowSpan:i};e.tf.insertNodes(l,{at:n[0][1]})}),e.tf.select(e.api.end(n[0][1]))},Bae=e=>{const{api:t}=vn(e,sa),n=e.getType(te.tr),[[r,i]]=ni(e,{format:"cell"});e.tf.withoutNormalizing(()=>{const s=b=>({...t.create.tableCell({children:b,header:r.type===e.getType(te.th)}),colSpan:1,rowSpan:1}),a=i.slice(0,-2),[o,l]=i.slice(-2),u=t.table.getColSpan(r),f=t.table.getRowSpan(r),h=[];for(let b=0;b{const E=e.api.node({at:[...a,b],match:{type:n}});if(!E)return 0;const C=E[0];let x=[],S=Number.POSITIVE_INFINITY,O=!1;if(C.children.forEach(_=>{const w=_,{col:T}=rr(e,w),A=Math.abs(T-y);A0){const _=x.at(-1);return O?_+1:_}return 1};for(let b=0;b{const r=e.api.nodes({at:[],match:{type:t}});for(const[i]of r)$m(e,{tableNode:i});return n},Rae=e=>{const{getOptions:t,type:n}=vn(e,{key:te.table}),{disableMerge:r}=t(),i=e.api.above({match:{type:n}});i&&e.tf.withoutNormalizing(()=>{if(!r){_ae(e);return}if(e.api.isExpanded())return WF(e,i);const s=e.api.above({match:{type:Pr(e)}}),a=e.api.above({match:{type:e.getType(te.tr)}});if(s&&a&&u0(i[0])<=1){e.tf.removeNodes({at:i[1]});return}if(s&&a&&i&&a[0].children.length>1){const[o,l]=i,u=s[1],f=u.at(-1),h=u.slice(),m=h.length-2;o.children.forEach((b,y)=>{h[m]=y,!(b.children.length===1||f>b.children.length-1)&&e.tf.removeNodes({at:h})});const{colSizes:g}=o;if(g){const b=[...g];b.splice(f,1),e.tf.setNodes({colSizes:b},{at:l})}}})},Fae=e=>{const{getOptions:t,type:n}=vn(e,{key:te.table}),{disableMerge:r}=t();if(!r)return Aae(e);if(e.api.some({match:{type:n}})){const i=e.api.above({match:{type:n}});if(!i)return;if(e.api.isExpanded())return GF(e,i);const s=e.api.above({match:{type:e.getType(te.tr)}});s&&i&&i[0].children.length>1&&e.tf.removeNodes({at:s[1]})}},Iae=e=>{if(e.api.some({match:{type:e.getType(te.table)}})){const t=e.api.above({match:{type:e.getType(te.table)}});t&&e.tf.removeNodes({at:t[1]})}},Mae=(e,{colCount:t=2,header:n,rowCount:r=2}={},{select:i,...s}={})=>{const{api:a}=e.getPlugin({key:te.table}),o=e.getType(te.table);e.tf.withoutNormalizing(()=>{const l=a.create.table({colCount:t,header:n,rowCount:r});if(!s.at){const u=e.api.block({match:{type:o}});if(u){const[,f]=u,h=Je.next(f);e.tf.insertNodes(l,{at:h,...s}),e.selection&&e.tf.select(e.api.start(h));return}}if(e.tf.insertNodes(l,{nextBlock:!s.at,select:i,...s}),i){const u=e.api.node({at:s.at,match:{type:o}});if(!u)return;e.tf.select(e.api.start(u[1]))}})},Lae=(e,t={})=>{const{api:n,getOptions:r,type:i}=vn(e,sa),{disableMerge:s,initialTableWidth:a,minColumnWidth:o}=r();if(!s)return Tae(e,t);const{before:l,header:u,select:f}=t;let{at:h,fromCell:m}=t;h&&!m&&ht.get(e,h)?.type===e.getType(te.table)&&(m=ht.lastChild(e,h.concat([0]))[1],h=void 0);const g=e.api.block({at:m,match:{type:Pr(e)}});if(!g)return;const[,b]=g,y=e.api.block({above:!0,at:b,match:{type:i}});if(!y)return;const[E,C]=y;let x,S;Je.isPath(h)?(x=h,S=h.at(-1)):(x=l?b:Je.next(b),S=l?b.at(-1):b.at(-1)+1);const O=b.at(-2);e.tf.withoutNormalizing(()=>{E.children.forEach((w,T)=>{const A=[...x];Je.isPath(h)?A[h.length-2]=T:A[b.length-2]=T;const P=u===void 0?w.children.every(I=>I.type===e.getType(te.th)):u;e.tf.insertNodes(n.create.tableCell({header:P}),{at:A,select:f&&T===O})});const{colSizes:_}=E;if(_){let w=[..._.slice(0,S),0,..._.slice(S)];if(a){w[S]=_[S]??_[S-1]??a/_.length;const T=_.reduce((I,F)=>I+F,0),A=w.reduce((I,F)=>I+F,0),P=Math.max(T,a);if(A>P){const I=P/A;w=w.map(F=>Math.max(o??0,Math.floor(F*I)))}}e.tf.setNodes({colSizes:w},{at:C})}})},zae=(e,t={})=>{const{api:n,getOptions:r,type:i}=vn(e,sa),{disableMerge:s}=r();if(!s)return Nae(e,t);const{before:a,header:o,select:l}=t;let{at:u,fromRow:f}=t;u&&!f&&ht.get(e,u)?.type===e.getType(te.table)&&(f=ht.lastChild(e,u)[1],u=void 0);const h=e.api.block({at:f,match:{type:e.getType(te.tr)}});if(!h)return;const[m,g]=h,b=e.api.block({above:!0,at:g,match:{type:i}});if(!b)return;const y=()=>({children:m.children.map((E,C)=>{const x=b[0].children.length!==1&&b[0].children.every(S=>S.children[C].type===e.getType(te.th));return n.create.tableCell({header:o??x})}),type:e.getType(te.tr)});if(e.tf.withoutNormalizing(()=>{e.tf.insertNodes(y(),{at:Je.isPath(u)?u:a?g:Je.next(g)})}),l){const E=e.api.block({match:{type:Pr(e)}});if(!E)return;const[,C]=E;Je.isPath(u)?C[C.length-2]=u.at(-2):C[C.length-2]=a?C.at(-2):C.at(-2)+1,e.tf.select(C)}},h4=(e,{at:t,edge:n,fromOneCell:r,reverse:i}={})=>{if(n){const a=ni(e,{at:t,format:"cell"}),o=r?0:1;if(a.length>o){const[,l]=a[0],[,u]=a.at(-1),f=[...l],h=[...u];switch(n){case"bottom":h[h.length-2]+=1;break;case"left":f[f.length-1]-=1;break;case"right":h[h.length-1]+=1;break;case"top":f[f.length-2]-=1;break}return ht.has(e,f)&&ht.has(e,h)&&e.tf.select({anchor:e.api.start(f),focus:e.api.start(h)}),!0}return}const s=e.api.block({at:t,match:{type:Pr(e)}});if(s){const[,a]=s,o=[...a],l=i?-1:1;if(o[o.length-2]+=l,ht.has(e,o))e.tf.select(e.api.start(o));else{const u=a.slice(0,-2);i?e.tf.withoutNormalizing(()=>{e.tf.select(e.api.start(u)),e.tf.move({reverse:!0})}):e.tf.withoutNormalizing(()=>{e.tf.select(e.api.end(u)),e.tf.move()})}return!0}},r9=1,i9=e=>Array.from(e?.getClientRects?.()??[]).filter(t=>t.height>0),YF=(e,t=e.selection?.anchor)=>{if(!t||!e.api.isAt({block:!0,match:{type:Pr(e)}}))return;const n=e.api.block({at:t,match:{type:Pr(e)}}),r=e.api.block({at:t});if(!n||!r)return;const[,i]=n,[,s]=r;return{blockPath:s,cellPath:i,point:t}},JF=(e,{blockPath:t,cellPath:n,reverse:r})=>{const i=r?e.api.previous({at:t,block:!0}):e.api.next({at:t,block:!0});return!!i&&Je.isAncestor(n,i[1])},XF=(e,{blockPath:t,point:n,reverse:r})=>{const i=e.api.range(t),s=r?e.api.isStart(n,t):e.api.isEnd(n,t);if(!i)return s;const a=i9(e.api.toDOMRange({anchor:n,focus:n})),o=i9(e.api.toDOMRange(i));if(a.length===0||o.length===0)return s;const l=a.at(-1),u=r?Math.min(...o.map(f=>f.top)):Math.max(...o.map(f=>f.bottom));return r?l.top<=u+r9:l.bottom>=u-r9},jae=({api:e,editor:t,getOptions:n,tf:{apply:r},type:i})=>({transforms:{apply(s){if(s.type==="set_selection"&&s.newProperties){const u={...t.selection,...s.newProperties};if(mn.isRange(u)&&t.api.isAt({at:u,blocks:!0,match:f=>f.type===i})){const f=t.api.block({at:u.anchor,match:h=>h.type===i});if(f){const[,h]=f;mn.isBackward(u)?s.newProperties.focus=t.api.start(h):t.api.before(h)&&(s.newProperties.focus=t.api.end(h))}else{const h=t.api.block({at:u.focus,match:m=>m.type===i});if(h){const[,m]=h;if(mn.isBackward(u)){const g=t.api.start(m),b=t.api.before(g);s.newProperties.focus=b??g}else s.newProperties.focus=t.api.end(m)}}}}const a=s.type==="remove_node"?s.node.type:s.type==="move_node"?t.api.node(s.path)?.[0].type:void 0,o=(s.type==="remove_node"||s.type==="move_node")&&a&&[t.getType(te.tr),i,...Pr(t)].includes(a);if(o&&s.type==="remove_node"){const u=[...t.api.nodes({at:s.path,match:{type:Pr(t)}})],f=n()._cellIndices;u.forEach(([h])=>{delete f[h.id]})}r(s);let l;o&&a!==i&&(l=t.api.node({at:s.type==="move_node"?s.newPath:s.path,match:{type:i}})?.[0],l&&$m(t,{tableNode:l}))}}}),qae=({editor:e,tf:{deleteFragment:t},type:n})=>({transforms:{deleteFragment(r){if(e.api.isAt({block:!0,match:i=>i.type===n})){const i=ni(e,{format:"cell"});if(i.length>1){e.tf.withoutNormalizing(()=>{i.forEach(([,s])=>{e.tf.replaceNodes(e.api.create.block(),{at:s,children:!0})}),e.tf.select({anchor:e.api.start(i[0][1]),focus:e.api.end(i.at(-1)[1])})});return}}t(r)}}}),$ae=({api:e,api:{getFragment:t},editor:n,type:r})=>({api:{getFragment(){const i=t(),s=[];return i.forEach(a=>{if(a.type===r){const o=a.children,l=o.length;if(!l)return;const u=o[0].children.length;if(l<=1&&u<=1){const h=o[0],m=e.table.getCellChildren(h);s.push(...m[0].children);return}const f=ni(n);if(f.length>0){s.push(f[0][0]);return}}s.push(a)}),s}}}),Vae=({api:e,editor:t,getOptions:n,tf:{insert:r,insertFragment:i},type:s})=>({transforms:{insertFragment(a){const o=a.find(l=>l.type===s);if(!o&&du(t,{at:t.selection?.anchor})){const l=ni(t,{format:"cell"});if(l.length>1){l.forEach(u=>{if(u){const[,f]=u;t.tf.replaceNodes(Ts(a),{at:f,children:!0})}}),t.tf.select({anchor:t.api.start(l[0][1]),focus:t.api.end(l.at(-1)[1])});return}}if(o){if(du(t,{at:t.selection?.anchor})){const[l]=ni(t,{at:t.selection?.anchor,format:"cell"});if(l){t.tf.withoutNormalizing(()=>{const[,u]=l,f=[...u],h=f.at(-1);let m=null,g=!0;o.children.forEach(b=>{if(f[f.length-1]=h,!g){const C=f.slice(0,-1);if(f[f.length-2]+=1,!ht.has(t,f)){if(n().disableExpandOnInsert)return;r.tableRow({fromRow:C})}}g=!1;const y=b.children;let E=!0;y.forEach(C=>{if(!E){const S=[...f];if(f[f.length-1]+=1,!ht.has(t,f)){if(n().disableExpandOnInsert)return;r.tableColumn({fromCell:S})}}E=!1;const x=e.table.getCellChildren(C);t.tf.replaceNodes(Ts(x),{at:f,children:!0}),m=[...f]})}),m&&t.tf.select({anchor:t.api.start(u),focus:t.api.end(m)})});return}}else if(a.length===1&&a[0].type===te.table){t.tf.insertNodes(a[0]);return}}i(a)}}}),Uae=({editor:e,tf:{insertText:t}})=>({transforms:{insertText(n,r){e.api.isExpanded()&&du(e,{at:e.selection?.anchor})&&ni(e,{format:"cell"}).length>1&&e.tf.collapse({edge:"focus"}),t(n,r)}}}),Hae=({editor:e,getOption:t,getOptions:n,tf:{normalizeNode:r},type:i})=>({transforms:{normalizeNode([s,a]){const{enableUnsetSingleColSize:o,initialTableWidth:l}=n();if(Rt.isElement(s)){if(s.type===i){const u=s;if(!u.children.some(f=>Rt.isElement(f)&&f.type===e.getType(te.tr))){e.tf.removeNodes({at:a});return}if(u.colSizes&&u.colSizes.length>0&&o&&u0(u)<2){e.tf.unsetNodes("colSizes",{at:a});return}if(e.api.block({above:!0,at:a,match:{type:i}})){e.tf.unwrapNodes({at:a});return}if(l){const f=u,h=f.children[0]?.children?.length;if(h){const m=[];if(f.colSizes)f.colSizes.some(g=>!g)&&f.colSizes.forEach(g=>{m.push(g||l/h)});else for(let g=0;g0){e.tf.setNodes({colSizes:m},{at:a});return}}}}if(s.type===e.getType(te.tr)&&e.api.parent(a)?.[0].type!==i){e.tf.unwrapNodes({at:a});return}if(Pr(e).includes(s.type)){const u=s,f=t("cellIndices",u.id);u.id&&!f&&$m(e,{all:!0,cellNode:u});const{children:h}=u;if(e.api.parent(a)?.[0].type!==e.getType(te.tr)){e.tf.unwrapNodes({at:a});return}if(Fn.isText(h[0])){e.tf.wrapNodes(e.api.create.block({},a),{at:a,children:!0});return}}}r([s,a])}}}),Wae=({api:e,editor:t,plugin:n,tf:{setFragmentData:r}})=>({transforms:{setFragmentData(i,s){const a=ni(t,{format:"table"})?.[0],o=ni(t,{format:"cell"}),l=t.selection;if(!a||!l){r(i,s);return}const[u,f]=a,h=u.children;u.children=u.children.filter(x=>x.children.length>0);let m="",g="";const b=document.createElement("div"),y=document.createElement("table");if(a&&l&&o.length===1&&(s==="copy"||s==="cut")){r(i);return}t.tf.withoutNormalizing(()=>{h.forEach(S=>{const O=S.children,_=[],w=S.type===t.getType(te.th)?document.createElement("th"):document.createElement("tr");O.forEach(T=>{i.clearData();const A=t.api.findPath(T);t.tf.select({anchor:t.api.start(A),focus:t.api.end(A)}),r(i),_.push(i.getData("text/plain"));const P=document.createElement("td");P.colSpan=e.table.getColSpan(T),P.rowSpan=e.table.getRowSpan(T),P.innerHTML=i.getData("text/html"),w.append(P)}),y.append(w),m+=`${_.join(",")} +`,g+=`${_.join(" ")} +`});const x=t.api.node({at:f,match:{type:te.table}});if(x!=null&&x.length>0){const S=x[0];S.attributes!=null&&Object.entries(S.attributes).forEach(([O,_])=>{_!=null&&n.node.dangerouslyAllowAttributes?.includes(O)&&y.setAttribute(O,String(_))})}t.tf.select(l),b.append(y)}),i.setData("text/csv",m),i.setData("text/tsv",g),i.setData("text/plain",g),i.setData("text/html",b.innerHTML);const E=JSON.stringify([u]),C=window.btoa(encodeURIComponent(E));i.setData("application/x-slate-fragment",C)}}}),Kae=(e,t,n)=>{if(Je.isPath(t))return n.some(i=>Je.isCommon(i,t));const r=e.api.range(t);return r?n.some(i=>{const s=e.api.range(i);return s?mn.includes(s,r.anchor)||mn.includes(s,r.focus)||mn.includes(r,s):!1}):!1},Gae=({api:{marks:e},editor:t,tf:{addMark:n,removeMark:r,setNodes:i}})=>({api:{marks(){const a=(()=>{const{selection:o}=t;if(!o||t.api.isCollapsed())return;const l=ni(t,{format:"cell"});if(l.length<=1)return;const u={},f={};let h=0;return l.forEach(([m,g])=>{const b=t.api.nodes({at:g,match:y=>Fn.isText(y)});Array.from(b,y=>y[0]).forEach(y=>{h++;const E=Object.keys(y);E.length!==1&&(E.splice(E.indexOf("text"),1),E.forEach(C=>{u[C]=(u[C]||0)+1,f[C]=y[C]}))})}),Object.keys(u).forEach(m=>{u[m]!==h&&delete f[m]}),f})();return a||e()}},transforms:{addMark(s,a){if(!(()=>{const{selection:l}=t;if(!l||t.api.isCollapsed()||t.meta.isNormalizing)return;const u=ni(t,{format:"cell"});if(!(u.length<=1))return u.forEach(([f,h])=>{t.tf.setNodes({[s]:a},{at:h,split:!0,voids:!0,match:m=>Fn.isText(m)})}),!0})())return n(s,a)},removeMark(s){if(!(()=>{const{selection:o}=t;if(!o||t.api.isCollapsed()||t.meta.isNormalizing)return;const l=ni(t,{format:"cell"});if(!(l.length<=1))return l.forEach(([u,f])=>{t.tf.setNodes({[s]:null},{at:f,split:!0,voids:!0,match:h=>Fn.isText(h)})}),!0})())return r(s)},setNodes(s,a){if(!(()=>{const{selection:l}=t;if(!l||t.api.isCollapsed()||t.meta.isNormalizing)return;const u=ni(t,{format:"cell"});if(!(u.length<=1)){if(a?.at){const f=u.map(([,h])=>h);if(!Kae(t,a.at,f))return}return i(s,{...a,match:jW(t,(f,h)=>u.some(([m,g])=>Je.isCommon(g,h)),a)}),!0}})())return i(s,a)}}}),Yae=e=>{const{editor:t,tf:{moveLine:n,selectAll:r,tab:i},type:s}=e,a=Gae(e);return{api:{...$ae(e).api,...a.api},transforms:{moveLine:o=>(()=>{if(!t.api.isCollapsed())return;const u=YF(t);if(!u)return;const{blockPath:f,cellPath:h,point:m}=u;if(!JF(t,{blockPath:f,cellPath:h,reverse:o.reverse})&&XF(t,{blockPath:f,point:m,reverse:o.reverse}))return h4(t,{reverse:o.reverse})})()?!0:n(o),selectAll:()=>(()=>{const l=t.api.above({match:{type:s}});if(!l)return;const[,u]=l,f=t.api.range(u);if(f&&t.selection&&mn.equals(t.selection,f)){const h=t.api.range([]);return h&&t.tf.select(h),!0}return t.tf.select(u),!0})()?!0:r(),tab:o=>(()=>{if(t.selection&&t.api.isExpanded()&&Array.from(t.api.nodes({at:t.selection,match:{type:Pr(t)}})).length>1)return t.tf.collapse({edge:"end"}),!0;const u=mae(t);if(!u)return;const{cell:f,row:h}=u,[,m]=f;if(o.reverse){const g=xae(t,f,m,h);if(g){const[,b]=g;t.tf.select(b)}}else{const g=yae(t,f,m,h);if(g){const[,b]=g;t.tf.select(b)}}return!0})()?!0:i(o),...Hae(e).transforms,...qae(e).transforms,...Vae(e).transforms,...Uae(e).transforms,...jae(e).transforms,...Wae(e).transforms,...a.transforms}}},QF=({element:e,type:t})=>{const n=e.style.background||e.style.backgroundColor;return n?{background:n,type:t}:{type:t}},ZF=Jt({key:te.tr,node:{isContainer:!0,isElement:!0,isStrictSiblings:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"TR"}]}}}}),eI=Jt({key:te.td,node:{dangerouslyAllowAttributes:["colspan","rowspan"],isContainer:!0,isElement:!0,isStrictSiblings:!0,props:({element:e})=>({colSpan:e?.attributes?.colspan,rowSpan:e?.attributes?.rowspan})},parsers:{html:{deserializer:{attributeNames:["rowspan","colspan"],parse:QF,rules:[{validNodeName:"TD"}]}}},rules:{merge:{removeEmpty:!1}}}),tI=Jt({key:te.th,node:{dangerouslyAllowAttributes:["colspan","rowspan"],isContainer:!0,isElement:!0,isStrictSiblings:!0,props:({element:e})=>({colSpan:e?.attributes?.colspan,rowSpan:e?.attributes?.rowspan})},parsers:{html:{deserializer:{attributeNames:["rowspan","colspan"],parse:QF,rules:[{validNodeName:"TH"}]}}},rules:{merge:{removeEmpty:!1}}}),sa=Yn({key:te.table,node:{isContainer:!0,isElement:!0},transformInitialValue:Pae,options:{_cellIndices:{},_selectedCellIds:void 0,_selectedTableIds:void 0,_selectionVersion:0,disableMerge:!1,minColumnWidth:48,selectedCells:null,selectedTables:null},parsers:{html:{deserializer:{rules:[{validNodeName:"TABLE"}]}}},plugins:[ZF,eI,tI]}).extendSelectors(({editor:e,getOptions:t})=>({cellIndices:n=>t()._cellIndices[n],isCellSelected:n=>{const r=t()._selectedCellIds;return r!==void 0?!!n&&(r?.includes(n)??!1):t9(e,n)},isSelectingCell:()=>{const n=t()._selectedCellIds;return n!==void 0?!!n:n9(e)},selectedCell:n=>(t()._selectionVersion,f4(e,n)),selectedCellIds:()=>{const n=t()._selectedCellIds;return n!==void 0?n:ZA(e)},selectedCells:()=>(t()._selectionVersion,QA(e)),selectedTableIds:()=>{const n=t()._selectedTableIds;return n!==void 0?n:e9(e)},selectedTables:()=>(t()._selectionVersion,d4(e))})).extendEditorApi(({editor:e})=>({create:{table:De(pae,e),tableCell:De(dae,e),tableRow:De(hae,e)},table:{getCellBorders:De(Cae,e),getCellSize:De(kae,e),getSelectedCell:De(f4,e),getSelectedCellIds:De(ZA,e),getSelectedCells:De(QA,e),getSelectedTableIds:De(e9,e),getSelectedTables:De(d4,e),getColSpan:qm,getRowSpan:h3,getCellChildren:t=>t.children,isCellSelected:De(t9,e),isSelectingCell:De(n9,e)}})).extendEditorTransforms(({editor:e})=>({insert:{table:De(Mae,e),tableColumn:De(Lae,e),tableRow:De(zae,e)},remove:{table:De(Iae,e),tableColumn:De(Rae,e),tableRow:De(Fae,e)},table:{merge:De(Oae,e),split:De(Bae,e)}})).overrideEditor(Yae),s9={"shift+down":"bottom","shift+left":"left","shift+right":"right","shift+up":"top"},Jae=(e,t)=>{const n=YF(e,e.selection?.focus);if(!n)return!1;const{blockPath:r,cellPath:i,point:s}=n;return t==="shift+left"?e.api.isStart(s,i):t==="shift+right"?e.api.isEnd(s,i):JF(e,{blockPath:r,cellPath:i,reverse:t==="shift+up"})?!1:XF(e,{blockPath:r,point:s,reverse:t==="shift+up"})},Xae=({editor:e,event:t})=>{if(t.defaultPrevented)return;if(t.which===229&&e.selection&&e.api.isExpanded()&&Array.from(e.api.nodes({at:e.selection,match:{type:Pr(e)}})).length>1){e.tf.collapse({edge:"end"});return}const n={"shift+down":Ys.isExtendDownward(t),"shift+left":Ys.isExtendBackward(t),"shift+right":Ys.isExtendForward(t),"shift+up":Ys.isExtendUpward(t)};Object.keys(n).forEach(r=>{n[r]&&(h4(e,{edge:s9[r],reverse:r==="shift+up"})||Jae(e,r)&&h4(e,{at:e.selection,edge:s9[r],fromOneCell:!0,reverse:r==="shift+up"}))&&(t.preventDefault(),t.stopPropagation())})},nI=fn(ZF),rI=fn(eI),iI=fn(tI),sI=fn(sa,{handlers:{onKeyDown:Xae},plugins:[nI,rI,iI]});Jc({colSizeOverrides:Gi(new Map),marginLeftOverride:null,rowSizeOverrides:Gi(new Map)},{name:"table"});const Qae={rules:[{validNodeName:"PRE"},{validNodeName:"P",validStyle:{fontFamily:"Consolas"}}],parse:({element:e})=>{const t=[...e.childNodes].find(i=>i.nodeName==="SELECT")?.textContent||"",n=e.textContent?.replace(t,"")||"";let r=n.split(` +`);return r?.length||(r=[n]),{children:r.map(i=>({children:[{text:i}],type:te.codeLine})),type:te.codeBlock}}},p4=(e,{at:t=e.selection}={})=>{if(t&&e.api.some({at:t,match:{type:e.getType(te.codeLine)}})){const n=e.api.parent(t);if(!n)return;const[,r]=n,i=e.api.above({at:t,match:{type:e.getType(te.codeLine)}})||e.api.parent(r);if(!i)return;const[s,a]=i;if(Rt.isElement(s)&&s.type!==e.getType(te.codeLine))return;const o=e.api.parent(a);return o?{codeBlock:o,codeLine:i}:void 0}},Zae=/\S|$/,eoe=(e,{codeLine:t})=>{const[,n]=t;return e.api.string(n).search(Zae)},toe=e=>{const{codeBlock:t}=p4(e)??{};if(!t)return!1;const n=Array.from(ht.children(e,t[1]));if(n.length===0)return!0;if(n.length>1)return!1;const r=n[0][0];return!ht.string(r)},aI=["py","gyp","ipython"],a9=new WeakSet;function noe(e){return e?typeof e=="string"?e:e.source:null}function roe(e){return ioe("(?=",e,")")}function ioe(...e){return e.map(t=>noe(t)).join("")}function soe(e){const t={$pattern:/[A-Za-z]\w+|__\w+__/,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],keyword:["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},n={begin:/^(>>>|\.\.\.) /,className:"meta"},r={begin:/\{/,className:"subst",end:/\}/,illegal:/#/,keywords:t},i={begin:/\{\{/,relevance:0},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,contains:[e.BACKSLASH_ESCAPE,n],end:/'''/,relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,contains:[e.BACKSLASH_ESCAPE,n],end:/"""/,relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,contains:[e.BACKSLASH_ESCAPE,n,i,r],end:/'''/},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,contains:[e.BACKSLASH_ESCAPE,n,i,r],end:/"""/},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,contains:[e.BACKSLASH_ESCAPE,i,r],end:/'/},{begin:/([fF][rR]|[rR][fF]|[fF])"/,contains:[e.BACKSLASH_ESCAPE,i,r],end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a="[0-9](_?[0-9])*",o=`(\\b(${a}))?\\.(${a})|\\b(${a})\\.`,l={className:"number",relevance:0,variants:[{begin:`(\\b(${a})|(${o}))[eE][+-]?(${a})[jJ]?\\b`},{begin:`(${o})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${a})[jJ]\\b`}]},u={begin:roe(/# type:/),className:"comment",contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}],end:/$/,keywords:t},f={className:"params",variants:[{begin:/\(\s*\)/,className:"",skip:!0},{begin:/\(/,contains:["self",n,l,s,e.HASH_COMMENT_MODE],end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t}]};return r.contains=[s,l,n],{aliases:[...aI],contains:[n,l,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},s,u,e.HASH_COMMENT_MODE,{contains:[e.UNDERSCORE_TITLE_MODE,f,{begin:/->/,endsWithParent:!0,keywords:t}],end:/:/,illegal:/[${=;\n,]/,variants:[{beginKeywords:"def",className:"function"},{beginKeywords:"class",className:"class"}]},{begin:/^[\t ]*@/,className:"meta",contains:[l,f,s],end:/(?=#)|$/}],illegal:/(<\/|->|\?)|=>/,keywords:t,name:"Python"}}const aoe=(e,t)=>{t!=="python"||!e||a9.has(e)||typeof e.register=="function"&&(e.register("python",soe),typeof e.registerAlias=="function"&&e.registerAlias("python",[...aI]),a9.add(e))},Wp=new WeakMap;function ooe(e){return e.value||e.children||[]}function oI(e,t=[]){return e.flatMap(n=>{const r=[...t,...n.properties?n.properties.className:[]];return n.children?oI(n.children,r):{classes:r,text:n.value}})}function loe(e){const t=[[]];let n=t[0];for(const r of e){const i=r.text.split(` +`);for(let s=0;sht.string(g)).join(` +`),o=t.lang||r;aoe(s,o);let l;try{!o||o==="plaintext"?l={value:[]}:o==="auto"?l=s.highlightAuto(a):l=s.highlight(o,a)}catch(g){const b=s.listLanguages();o&&b.includes(o)?(e.api.debug.warn(`Could not highlight with Highlight.js for language "${o}". Falling back to plaintext`,"CODE_HIGHLIGHT",g),l={value:[]}):(e.api.debug.warn(`Language "${o}" is not registered. Falling back to plaintext`),l={value:[]})}const u=loe(oI(ooe(l))),f=t.children,h=new Map,m=Math.min(u.length,f.length);for(let g=0;g{Wp.delete(t)})}const foe=/\s/,o9=(e,{codeLine:t})=>{const[,n]=t,r=e.api.start(n),i=r&&e.api.after(r),s=i&&e.api.range(r,i),a=e.api.string(s);return foe.test(a)?(e.tf.delete({at:s}),!0):!1},doe=/\S/,l9=(e,{codeLine:t,indentDepth:n=2})=>{const[,r]=t,i=e.api.start(r),s=" ".repeat(n);if(!e.api.isExpanded()){const a=e.selection?.anchor,o=e.api.range(i,a),l=e.api.string(o);if(doe.test(l)){e.tf.insertText(s,{at:e.selection});return}}e.tf.insertText(s,{at:i})},hoe=(e,{codeBlock:t,codeLine:n})=>{o9(e,{codeLine:n})&&o9(e,{codeLine:n})},poe=e=>{if(!e.selection)return;const t=e.getType(te.codeBlock),n=e.getType(te.p);e.tf.withoutNormalizing(()=>{const r=e.api.nodes({at:e.selection,match:{type:t}}),i=Array.from(r).reverse();for(const s of i){const a=ht.children(e,s[1]);for(const[,o]of a)e.tf.setNodes({type:n},{at:o});e.tf.unwrapNodes({at:s[1],match:{type:t},split:!0})}})},moe=({editor:e,tf:{insertData:t},type:n})=>({transforms:{insertData(r){const i=r.getData("text/plain"),s=r.getData("vscode-editor-data"),a=e.getType(te.codeLine);if(s)try{const l=JSON.parse(s),u=i.split(` +`),[f]=e.api.block()??[];if(f&&[n,a].includes(f?.type)){if(u[0]&&e.tf.insertText(u[0]),u.length>1){const h=u.slice(1).map(m=>({children:[{text:m}],type:a}));e.tf.insertNodes(h)}}else{const h={children:u.map(m=>({children:[{text:m}],type:a})),lang:l?.mode,type:n};e.tf.insertNodes(h,{select:!0})}return}catch{}const[o]=e.api.block()??[];if(o&&[n,a].includes(o?.type)&&i?.includes(` +`)){const l=i.split(` +`);if(l[0]&&e.tf.insertText(l[0]),l.length>1){const u=l.slice(1).map(f=>({children:[{text:f}],type:a}));e.tf.insertNodes(u)}return}t(r)}}});function goe(e){return e.children}const voe=({editor:e,tf:{insertFragment:t},type:n})=>({transforms:{insertFragment(r){const[i]=e.api.block()??[],s=e.getType(te.codeLine);function a(o){return{children:[{text:ht.string(o)}],type:s}}return i&&[n,s].includes(i?.type)?t(r.flatMap(o=>{const l=o;return l.type===n?goe(l):a(l)})):t(r)}}}),yoe=({editor:e,getOptions:t,tf:{normalizeNode:n},type:r})=>({transforms:{normalizeNode([i,s]){if(i.type===r&&t().lowlight&&lI(e,[i,s]),n([i,s]),!Rt.isElement(i))return;const a=e.getType(te.codeBlock),o=e.getType(te.codeLine);if(i.type===a){const l=Array.from(ht.children(e,s)).find(([u])=>u.type!==o);l&&e.tf.setNodes({type:o},{at:l[1]})}}}}),xoe=e=>{const{editor:t,getOptions:n,tf:{apply:r,deleteBackward:i,insertBreak:s,resetBlock:a,selectAll:o,tab:l},type:u}=e;return{transforms:{apply(f){let h=!1;if(n().lowlight&&f.type==="set_node"){const m=t.api.node(f.path),g="lang"in(f.properties??{})||"lang"in(f.newProperties??{}),b=f.properties?.lang!==f.newProperties?.lang;m?.[0].type===u&&g&&b&&(coe(m[0]),h=!0)}r(f),h&&t.api.redecorate()},insertBreak(){(()=>{if(!t.selection)return;const h=p4(t,{});if(!h)return;const{codeBlock:m,codeLine:g}=h,b=eoe(t,{codeLine:g});return s(),l9(t,{codeLine:g,indentDepth:b}),!0})()||s()},deleteBackward(f){(()=>{if(!t.selection||t.api.isExpanded())return;const m=p4(t,{});if(!m)return;const{codeLine:g}=m,[,b]=g;if(!t.api.isStart(t.selection.anchor,b))return;const y=t.api.previous({at:b,match:{type:t.getType(te.codeLine)}}),E=t.api.string(b);if(!y)return E.length>0?!0:void 0;if(E.length>0)return;const C=t.api.end(y[1]);return t.tf.removeNodes({at:b}),C&&t.tf.select(C),!0})()||i(f)},resetBlock(f){if(t.api.block({at:f?.at,match:{type:u}})){poe(t);return}return a(f)},selectAll:()=>(()=>{const h=t.api.above({match:{type:u}});if(h&&!(t.api.isAt({end:!0})&&t.api.isAt({start:!0})))return t.tf.select(h[1]),!0})()?!0:o(),tab:f=>(()=>{const m=t.getType("code_line"),g=t.api.nodes({match:{type:m}}),b=Array.from(g);if(b.length>0){const[,y]=b[0],E=t.api.parent(y);return E?(t.tf.withoutNormalizing(()=>{for(const C of b)f.reverse?hoe(t,{codeBlock:E,codeLine:C}):l9(t,{codeLine:C})}),!0):void 0}})()?!0:l(f),...moe(e).transforms,...voe(e).transforms,...yoe(e).transforms}}},uI=Yn({key:te.codeLine,node:{isElement:!0,isStrictSiblings:!0}}),cI=Jt({key:te.codeSyntax,node:{isLeaf:!0}}),fI=Yn({key:te.codeBlock,inject:{plugins:{[te.html]:{parser:{query:({editor:e})=>!e.api.some({match:{type:e.getType(te.codeLine)}})}}}},node:{isElement:!0},options:{defaultLanguage:null,lowlight:null},parsers:{html:{deserializer:Qae}},plugins:[uI,cI],render:{as:"pre"},rules:{delete:{empty:"reset"},match:({editor:e,rule:t})=>["break.empty","delete.empty"].includes(t)&&toe(e)},decorate:({editor:e,entry:[t,n],getOptions:r,type:i})=>{if(!r().lowlight)return[];const s=e.getType(te.codeLine);return t.type===i&&!Wp.get(t.children[0])&&lI(e,[t,n]),t.type===s?Wp.get(t)||[]:[]}}).overrideEditor(xoe).extendTransforms(({editor:e})=>({toggle:()=>{e.tf.toggleBlock(e.getType(te.codeBlock))}})),dI=fn(cI),hI=fn(uI),boe=fn(fI,{plugins:[hI,dI]});function woe(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],y=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:y,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},_={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,`(?!${b.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[_,h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:w.concat([{begin:/\(/,end:/\)/,keywords:O,contains:w.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:O,relevance:0},{begin:g,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Eoe(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=woe(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Coe(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(o);const l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},f={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},m=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${m.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],E=["true","false"],C={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],S=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],_=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:E,built_in:[...x,...S,"set","shopt",...O,..._]},contains:[g,e.SHEBANG(),b,h,s,a,C,o,l,u,f,n]}}function koe(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",E={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},C=[h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:E,contains:C.concat([{begin:/\(/,end:/\)/,keywords:E,contains:C.concat(["self"]),relevance:0}]),relevance:0},S={begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:E,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:E,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(m,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:E,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:E,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:u,keywords:E}}}function Doe(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",a="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",o={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},f={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},m={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},g=t.optional(i)+e.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],y=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],E=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:y,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:E},_={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,`(?!${b.join("|")})`,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},w=[_,h,o,n,e.C_BLOCK_COMMENT_MODE,f,u],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:w.concat([{begin:/\(/,end:/\)/,keywords:O,contains:w.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+a+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:O,relevance:0},{begin:g,returnBegin:!0,contains:[m],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,f]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,f,o,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,f,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",o]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Soe(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:i.concat(s),built_in:t,literal:r},o=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9'_]+|(\\b[\\d'_]+(\\.[\\d'_]*)?|\\.[\\d'_]+)([eE][-+]?[\\d'_]+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},f={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(f,{illegal:/\n/}),m={className:"subst",begin:/\{/,end:/\}/,keywords:a},g=e.inherit(m,{illegal:/\n/}),b={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,g]},y={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},m]},E=e.inherit(y,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},g]});m.contains=[y,b,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],g.contains=[E,b,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const C={variants:[u,y,b,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},o]},S=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},C,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},o,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[o,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+S+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[C,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}const _oe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Aoe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Toe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Noe=[...Aoe,...Toe],Ooe=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Boe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Poe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Roe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Foe(e){const t=e.regex,n=_oe(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",o=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Boe.join("|")+")"},{begin:":(:)?("+Poe.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Roe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,n.UNICODE_RANGE,...o,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...o,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:Ooe.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...o,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Noe.join("|")+")\\b"}]}}function Ioe(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Moe(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"pI(e,t,n-1))}function joe(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+pI("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},f={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u9,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},u9,u]}}const c9="[A-Za-z$_][0-9A-Za-z$_]*",qoe=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],$oe=["true","false","null","undefined","NaN","Infinity"],mI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gI=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],vI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Voe=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Uoe=[].concat(vI,mI,gI);function Hoe(e){const t=e.regex,n=(ne,{after:me})=>{const j="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ne,me)=>{const j=ne[0].length+ne.index,Q=ne.input[j];if(Q==="<"||Q===","){me.ignoreMatch();return}Q===">"&&(n(ne,{after:j})||me.ignoreMatch());let re;const K=ne.input.substring(j);if(re=K.match(/^\s*=/)){me.ignoreMatch();return}if((re=K.match(/^\s+extends\s+/))&&re.index===0){me.ignoreMatch();return}}},o={$pattern:c9,keyword:qoe,literal:$oe,built_in:Uoe,"variable.language":Voe},l="[0-9](_?[0-9])*",u=`\\.(${l})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${f})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${f})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,y,E,{match:/\$\d+/},h];m.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});const O=[].concat(x,m.contains),_=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(O)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},T={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mI,...gI]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function M(ne){return t.concat("(?!",ne.join("|"),")")}const W={match:t.concat(/\b/,M([...vI,"super","import","await"].map(ne=>`${ne}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ee={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},fe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ue={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(fe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:A},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,y,E,x,{match:/\$\d+/},h,A,{scope:"attr",match:r+t.lookahead(":"),relevance:0},ue,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:fe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ee,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},W,F,T,U,{match:/\$[(.]/}]}}const Woe="([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",Koe={scope:"number",match:Woe,relevance:0};function Goe(e){const t={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:r},contains:[t,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,Koe,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var fc="[0-9](_*[0-9])*",Fh=`\\.(${fc})`,Ih="[0-9a-fA-F](_*[0-9a-fA-F])*",Yoe={className:"number",variants:[{begin:`(\\b(${fc})((${Fh})|\\.)?|(${Fh}))[eE][+-]?(${fc})[fFdD]?\\b`},{begin:`\\b(${fc})((${Fh})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Fh})[fFdD]?\\b`},{begin:`\\b(${fc})[fFdD]\\b`},{begin:`\\b0[xX]((${Ih})\\.?|(${Ih})?\\.(${Ih}))[pP][+-]?(${fc})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ih})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Joe(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(a);const o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},u=Yoe,f=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},m=h;return m.variants[1].contains=[h],h.variants[1].contains=[m],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,f,n,r,o,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,f],relevance:0},e.C_LINE_COMMENT_MODE,f,o,l,a,e.C_NUMBER_MODE]},f]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},o,l]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}const Xoe=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Qoe=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Zoe=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ele=[...Qoe,...Zoe],tle=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),yI=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xI=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nle=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),rle=yI.concat(xI).sort().reverse();function ile(e){const t=Xoe(e),n=rle,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",a=[],o=[],l=function(S){return{className:"string",begin:"~?"+S+".*?"+S}},u=function(S,O,_){return{className:S,begin:O,relevance:_}},f={$pattern:/[a-z-]+/,keyword:r,attribute:tle.join(" ")},h={begin:"\\(",end:"\\)",contains:o,keywords:f,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.UNICODE_RANGE,t.HEXCOLOR,h,u("variable","@@?"+i,10),u("variable","@\\{"+i+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const m=o.concat({begin:/\{/,end:/\}/,contains:a}),g={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(o)},b={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nle.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:o}}]},y={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:f,returnEnd:!0,contains:o,relevance:0}},E={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:m}},C={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,g,u("keyword","all\\b"),u("variable","@\\{"+i+"\\}"),{begin:"\\b("+ele.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",s,0),u("selector-id","#"+s),u("selector-class","\\."+s,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+yI.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+xI.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:m},{begin:"!important"},t.FUNCTION_DISPATCH]},x={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[C]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,E,x,b,C,g,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function sle(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function ale(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},o=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,o,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},f={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(u,{contains:[]}),m=e.inherit(f,{contains:[]});u.contains.push(m),f.contains.push(h);let g=[n,l];return[u,f,h,m].forEach(C=>{C.contains=C.contains.concat(g)}),g=g.concat(u,f),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,s,u,f,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},i,r,l,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function lle(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,o={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:o,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function ule(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},a={begin:/->\{/,end:/\}/},o={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[o]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},f=[e.BACKSLASH_ESCAPE,s,l],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],m=(y,E,C="\\1")=>{const x=C==="\\1"?C:t.concat(C,E);return t.concat(t.concat("(?:",y,")"),E,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,C,r)},g=(y,E,C)=>t.concat(t.concat("(?:",y,")"),E,/(?:\\.|[^\\\/])*?/,C,r),b=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:m("s|tr|y",t.either(...h,{capture:!0}))},{begin:m("s|tr|y","\\(","\\)")},{begin:m("s|tr|y","\\[","\\]")},{begin:m("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:g("(?:m|qr)?",/\//,/\//)},{begin:g("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:g("m|qr",/\(/,/\)/)},{begin:g("m|qr",/\[/,/\]/)},{begin:g("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,o,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=b,a.contains=b,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:b}}function cle(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+r},o={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),f=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(ee,U)=>{U.data._beginMatch=ee[1]||ee[2]},"on:end":(ee,U)=>{U.data._beginMatch!==ee[1]&&U.ignoreMatch()}},m=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),g=`[ +]`,b={scope:"string",variants:[f,u,h,m]},y={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},E=["false","null","true"],C=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:C,literal:(ee=>{const U=[];return ee.forEach(fe=>{U.push(fe),fe.toLowerCase()===fe?U.push(fe.toUpperCase()):U.push(fe.toLowerCase())}),U})(E),built_in:x},_=ee=>ee.map(U=>U.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,t.concat(g,"+"),t.concat("(?!",_(x).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},T=t.concat(r,"\\b(?!\\()"),A={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),T],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},P={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[P,a,A,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,y,w]},F={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",_(C).join("\\b|"),"|",_(x).join("\\b|"),"\\b)"),r,t.concat(g,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(F);const M=[P,A,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,y,w],W={begin:t.concat(/#\[\s*\\?/,t.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...M]},...M,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:O,contains:[W,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},o,{scope:"variable.language",match:/\$this\b/},a,F,A,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",W,a,A,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,b,y]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},b,y]}}function fle(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function dle(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function hle(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],o={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:o,illegal:/#/},f={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,f,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,f,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,f,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,f,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m="[0-9](_?[0-9])*",g=`(\\b(${m}))?\\.(${m})|\\b(${m})\\.`,b=`\\b|${r.join("|")}`,y={className:"number",relevance:0,variants:[{begin:`(\\b(${m})|(${g}))[eE][+-]?(${m})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${m})[jJ](?=${b})`}]},E={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:o,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:["self",l,y,h,e.HASH_COMMENT_MODE]}]};return u.contains=[h,y,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:o,illegal:/(<\/|\?)|=>/,contains:[l,y,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,E,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[y,C,h]}]}}function ple(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function mle(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function gle(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],f={className:"subst",begin:/#\{/,end:/\}/,keywords:a},h={className:"string",contains:[e.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,f]})]}]},m="[1-9](_?[0-9])*|0",g="[0-9](_?[0-9])*",b={className:"number",relevance:0,variants:[{begin:`\\b(${m})(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},y={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},w=[h,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:a},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:n}],relevance:0},b,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,f],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);f.contains=w,y.contains=w;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:w}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(u).concat(w)}}function vle(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",o=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],f=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:f,keyword:o,literal:l,built_in:u},illegal:""},s]}}const yle=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),xle=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ble=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],wle=[...xle,...ble],Ele=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Cle=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),kle=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Dle=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Sle(e){const t=yle(e),n=kle,r=Cle,i="@[a-z-]+",s="and or not only",o={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+wle.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Dle.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,t.UNICODE_RANGE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Ele.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function _le(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Ale(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],o=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],m=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=f,b=[...u,...l].filter(_=>!f.includes(_)),y={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},E={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},C={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function x(_){return t.concat(/\b/,t.either(..._.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}const S={scope:"keyword",match:x(m),relevance:0};function O(_,{exceptions:w,when:T}={}){const A=T;return w=w||[],_.map(P=>P.match(/\|\d+$/)||w.includes(P)?P:A(P)?`${P}|0`:P)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(b,{when:_=>_.length<3}),literal:s,type:o,built_in:h},contains:[{scope:"type",match:x(a)},S,C,y,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,E]}}function bI(e){return e?typeof e=="string"?e:e.source:null}function Vf(e){return Gn("(?=",e,")")}function Gn(...e){return e.map(n=>bI(n)).join("")}function Tle(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ai(...e){return"("+(Tle(e).capture?"":"?:")+e.map(r=>bI(r)).join("|")+")"}const p3=e=>Gn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),Nle=["Protocol","Type"].map(p3),f9=["init","self"].map(p3),Ole=["Any","Self"],E2=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d9=["false","nil","true"],Ble=["assignment","associativity","higherThan","left","lowerThan","none","right"],Ple=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],h9=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],wI=Ai(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),EI=Ai(wI,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),C2=Gn(wI,EI,"*"),CI=Ai(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Kp=Ai(CI,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),wa=Gn(CI,Kp,"*"),Mh=Gn(/[A-Z]/,Kp,"*"),Rle=["attached","autoclosure",Gn(/convention\(/,Ai("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Gn(/objc\(/,wa,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Fle=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Ile(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Ai(...Nle,...f9)],className:{2:"keyword"}},s={match:Gn(/\./,Ai(...E2)),relevance:0},a=E2.filter(qe=>typeof qe=="string").concat(["_|0"]),o=E2.filter(qe=>typeof qe!="string").concat(Ole).map(p3),l={variants:[{className:"keyword",match:Ai(...o,...f9)}]},u={$pattern:Ai(/\b\w+/,/#\w+/),keyword:a.concat(Ple),literal:d9},f=[i,s,l],h={match:Gn(/\./,Ai(...h9)),relevance:0},m={className:"built_in",match:Gn(/\b/,Ai(...h9),/(?=\()/)},g=[h,m],b={match:/->/,relevance:0},y={className:"operator",relevance:0,variants:[{match:C2},{match:`\\.(\\.|${EI})+`}]},E=[b,y],C="([0-9]_*)+",x="([0-9a-fA-F]_*)+",S={className:"number",relevance:0,variants:[{match:`\\b(${C})(\\.(${C}))?([eE][+-]?(${C}))?\\b`},{match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(${C}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(qe="")=>({className:"subst",variants:[{match:Gn(/\\/,qe,/[0\\tnr"']/)},{match:Gn(/\\/,qe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(qe="")=>({className:"subst",match:Gn(/\\/,qe,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(qe="")=>({className:"subst",label:"interpol",begin:Gn(/\\/,qe,/\(/),end:/\)/}),T=(qe="")=>({begin:Gn(qe,/"""/),end:Gn(/"""/,qe),contains:[O(qe),_(qe),w(qe)]}),A=(qe="")=>({begin:Gn(qe,/"/),end:Gn(/"/,qe),contains:[O(qe),w(qe)]}),P={className:"string",variants:[T(),T("#"),T("##"),T("###"),A(),A("#"),A("##"),A("###")]},I=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],F={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},M=qe=>{const Ue=Gn(qe,/\//),tt=Gn(/\//,qe);return{begin:Ue,end:tt,contains:[...I,{scope:"comment",begin:`#(?!.*${tt})`,end:/$/}]}},W={scope:"regexp",variants:[M("###"),M("##"),M("#"),F]},ee={match:Gn(/`/,wa,/`/)},U={className:"variable",match:/\$\d+/},fe={className:"variable",match:`\\$${Kp}+`},ue=[ee,U,fe],ne={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Fle,contains:[...E,S,P]}]}},me={scope:"keyword",match:Gn(/@/,Ai(...Rle),Vf(Ai(/\(/,/\s+/)))},j={scope:"meta",match:Gn(/@/,wa)},Q=[ne,me,j],re={match:Vf(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Gn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Kp,"+")},{className:"type",match:Mh,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Gn(/\s+&\s+/,Vf(Mh)),relevance:0}]},K={begin://,keywords:u,contains:[...r,...f,...Q,b,re]};re.contains.push(K);const Be={match:Gn(wa,/\s*:/),keywords:"_|0",relevance:0},ze={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Be,...r,W,...f,...g,...E,S,P,...ue,...Q,re]},$e={begin://,keywords:"repeat each",contains:[...r,re]},je={begin:Ai(Vf(Gn(wa,/\s*:/)),Vf(Gn(wa,/\s+/,wa,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:wa}]},Fe={begin:/\(/,end:/\)/,keywords:u,contains:[je,...r,...f,...E,S,P,...Q,re,ze],endsParent:!0,illegal:/["']/},Me={match:[/(func|macro)/,/\s+/,Ai(ee.match,wa,C2)],className:{1:"keyword",3:"title.function"},contains:[$e,Fe,t],illegal:[/\[/,/%/]},ge={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[$e,Fe,t],illegal:/\[|%/},Oe={match:[/operator/,/\s+/,C2],className:{1:"keyword",3:"title"}},se={begin:[/precedencegroup/,/\s+/,Mh],className:{1:"keyword",3:"title"},contains:[re],keywords:[...Ble,...d9],end:/}/},we={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},_e={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ee={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,wa,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[$e,...f,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Mh},...f],relevance:0}]};for(const qe of P.variants){const Ue=qe.contains.find(rt=>rt.label==="interpol");Ue.keywords=u;const tt=[...f,...g,...E,S,P,...ue];Ue.contains=[...tt,{begin:/\(/,end:/\)/,contains:["self",...tt]}]}return{name:"Swift",keywords:u,contains:[...r,Me,ge,we,_e,Ee,Oe,se,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},W,...f,...g,...E,S,P,...ue,...Q,re,ze]}}const Gp="[A-Za-z$_][0-9A-Za-z$_]*",kI=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],DI=["true","false","null","undefined","NaN","Infinity"],SI=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],_I=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],AI=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],TI=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],NI=[].concat(AI,SI,_I);function Mle(e){const t=e.regex,n=(ne,{after:me})=>{const j="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ne,me)=>{const j=ne[0].length+ne.index,Q=ne.input[j];if(Q==="<"||Q===","){me.ignoreMatch();return}Q===">"&&(n(ne,{after:j})||me.ignoreMatch());let re;const K=ne.input.substring(j);if(re=K.match(/^\s*=/)){me.ignoreMatch();return}if((re=K.match(/^\s+extends\s+/))&&re.index===0){me.ignoreMatch();return}}},o={$pattern:Gp,keyword:kI,literal:DI,built_in:NI,"variable.language":TI},l="[0-9](_?[0-9])*",u=`\\.(${l})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${f})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${f})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},m={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,m],subLanguage:"graphql"}},E={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,m]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,y,E,{match:/\$\d+/},h];m.contains=S.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(S)});const O=[].concat(x,m.contains),_=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(O)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_},T={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...SI,..._I]}},P={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},I={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},F={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function M(ne){return t.concat("(?!",ne.join("|"),")")}const W={match:t.concat(/\b/,M([...AI,"super","import","await"].map(ne=>`${ne}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ee={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},fe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ue={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(fe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:_,CLASS_REFERENCE:A},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),P,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,y,E,x,{match:/\$\d+/},h,A,{scope:"attr",match:r+t.lookahead(":"),relevance:0},ue,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:fe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:_}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},I,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},ee,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},W,F,T,U,{match:/\$[(.]/}]}}function Lle(e){const t=e.regex,n=Mle(e),r=Gp,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},o={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Gp,keyword:kI.concat(l),literal:DI,built_in:NI.concat(i),"variable.language":TI},f={className:"meta",begin:"@"+r},h=(y,E,C)=>{const x=y.contains.findIndex(S=>S.label===E);if(x===-1)throw new Error("can not find mode to replace");y.contains.splice(x,1,C)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(f);const m=n.contains.find(y=>y.scope==="attr"),g=Object.assign({},m,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,m,g]),n.contains=n.contains.concat([f,s,a,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",o);const b=n.contains.find(y=>y.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function zle(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,o=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,i),/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,i),/ +/,t.either(a,o),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},f={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),m=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,f,h,m,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[m]}]}}function jle(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},o={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,i,e.QUOTE_STRING_MODE,l,u,o]}}function qle(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,l,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,a,l,o]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function $le(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},o=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),m={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},g={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},b={begin:/\{/,end:/\}/,contains:[g],illegal:"\\n",relevance:0},y={begin:"\\[",end:"\\]",contains:[g],illegal:"\\n",relevance:0},E=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},m,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},b,y,s,a],C=[...E];return C.pop(),C.push(o),g.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:E}}const Vle={arduino:Eoe,bash:Coe,c:koe,cpp:Doe,csharp:Soe,css:Foe,diff:Ioe,go:Moe,graphql:Loe,ini:zoe,java:joe,javascript:Hoe,json:Goe,kotlin:Joe,less:ile,lua:sle,makefile:ale,markdown:ole,objectivec:lle,perl:ule,php:cle,"php-template":fle,plaintext:dle,python:hle,"python-repl":ple,r:mle,ruby:gle,rust:vle,scss:Sle,shell:_le,sql:Ale,swift:Ile,typescript:Lle,vbnet:zle,wasm:jle,xml:qle,yaml:$le};var k2,p9;function Ule(){if(p9)return k2;p9=1;function e(pe){return pe instanceof Map?pe.clear=pe.delete=pe.set=function(){throw new Error("map is read-only")}:pe instanceof Set&&(pe.add=pe.clear=pe.delete=function(){throw new Error("set is read-only")}),Object.freeze(pe),Object.getOwnPropertyNames(pe).forEach(Re=>{const st=pe[Re],Qe=typeof st;(Qe==="object"||Qe==="function")&&!Object.isFrozen(st)&&e(st)}),pe}class t{constructor(Re){Re.data===void 0&&(Re.data={}),this.data=Re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(pe){return pe.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function r(pe,...Re){const st=Object.create(null);for(const Qe in pe)st[Qe]=pe[Qe];return Re.forEach(function(Qe){for(const Vn in Qe)st[Vn]=Qe[Vn]}),st}const i="",s=pe=>!!pe.scope,a=(pe,{prefix:Re})=>{if(pe.startsWith("language:"))return pe.replace("language:","language-");if(pe.includes(".")){const st=pe.split(".");return[`${Re}${st.shift()}`,...st.map((Qe,Vn)=>`${Qe}${"_".repeat(Vn+1)}`)].join(" ")}return`${Re}${pe}`};class o{constructor(Re,st){this.buffer="",this.classPrefix=st.classPrefix,Re.walk(this)}addText(Re){this.buffer+=n(Re)}openNode(Re){if(!s(Re))return;const st=a(Re.scope,{prefix:this.classPrefix});this.span(st)}closeNode(Re){s(Re)&&(this.buffer+=i)}value(){return this.buffer}span(Re){this.buffer+=``}}const l=(pe={})=>{const Re={children:[]};return Object.assign(Re,pe),Re};class u{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Re){this.top.children.push(Re)}openNode(Re){const st=l({scope:Re});this.add(st),this.stack.push(st)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Re){return this.constructor._walk(Re,this.rootNode)}static _walk(Re,st){return typeof st=="string"?Re.addText(st):st.children&&(Re.openNode(st),st.children.forEach(Qe=>this._walk(Re,Qe)),Re.closeNode(st)),Re}static _collapse(Re){typeof Re!="string"&&Re.children&&(Re.children.every(st=>typeof st=="string")?Re.children=[Re.children.join("")]:Re.children.forEach(st=>{u._collapse(st)}))}}class f extends u{constructor(Re){super(),this.options=Re}addText(Re){Re!==""&&this.add(Re)}startScope(Re){this.openNode(Re)}endScope(){this.closeNode()}__addSublanguage(Re,st){const Qe=Re.root;st&&(Qe.scope=`language:${st}`),this.add(Qe)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(pe){return pe?typeof pe=="string"?pe:pe.source:null}function m(pe){return y("(?=",pe,")")}function g(pe){return y("(?:",pe,")*")}function b(pe){return y("(?:",pe,")?")}function y(...pe){return pe.map(st=>h(st)).join("")}function E(pe){const Re=pe[pe.length-1];return typeof Re=="object"&&Re.constructor===Object?(pe.splice(pe.length-1,1),Re):{}}function C(...pe){return"("+(E(pe).capture?"":"?:")+pe.map(Qe=>h(Qe)).join("|")+")"}function x(pe){return new RegExp(pe.toString()+"|").exec("").length-1}function S(pe,Re){const st=pe&&pe.exec(Re);return st&&st.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _(pe,{joinWith:Re}){let st=0;return pe.map(Qe=>{st+=1;const Vn=st;let Un=h(Qe),wt="";for(;Un.length>0;){const pt=O.exec(Un);if(!pt){wt+=Un;break}wt+=Un.substring(0,pt.index),Un=Un.substring(pt.index+pt[0].length),pt[0][0]==="\\"&&pt[1]?wt+="\\"+String(Number(pt[1])+Vn):(wt+=pt[0],pt[0]==="("&&st++)}return wt}).map(Qe=>`(${Qe})`).join(Re)}const w=/\b\B/,T="[a-zA-Z]\\w*",A="[a-zA-Z_]\\w*",P="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",M="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W=(pe={})=>{const Re=/^#![ ]*\//;return pe.binary&&(pe.begin=y(Re,/.*\b/,pe.binary,/\b.*/)),r({scope:"meta",begin:Re,end:/$/,relevance:0,"on:begin":(st,Qe)=>{st.index!==0&&Qe.ignoreMatch()}},pe)},ee={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ee]},fe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ee]},ue={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ne=function(pe,Re,st={}){const Qe=r({scope:"comment",begin:pe,end:Re,contains:[]},st);Qe.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Vn=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Qe.contains.push({begin:y(/[ ]+/,"(",Vn,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Qe},me=ne("//","$"),j=ne("/\\*","\\*/"),Q=ne("#","$"),re={scope:"number",begin:P,relevance:0},K={scope:"number",begin:I,relevance:0},Be={scope:"number",begin:F,relevance:0},ze={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ee,{begin:/\[/,end:/\]/,relevance:0,contains:[ee]}]},$e={scope:"title",begin:T,relevance:0},je={scope:"title",begin:A,relevance:0},Fe={begin:"\\.\\s*"+A,relevance:0};var ge=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:ee,BINARY_NUMBER_MODE:Be,BINARY_NUMBER_RE:F,COMMENT:ne,C_BLOCK_COMMENT_MODE:j,C_LINE_COMMENT_MODE:me,C_NUMBER_MODE:K,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(pe){return Object.assign(pe,{"on:begin":(Re,st)=>{st.data._beginMatch=Re[1]},"on:end":(Re,st)=>{st.data._beginMatch!==Re[1]&&st.ignoreMatch()}})},HASH_COMMENT_MODE:Q,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:Fe,NUMBER_MODE:re,NUMBER_RE:P,PHRASAL_WORDS_MODE:ue,QUOTE_STRING_MODE:fe,REGEXP_MODE:ze,RE_STARTERS_RE:M,SHEBANG:W,TITLE_MODE:$e,UNDERSCORE_IDENT_RE:A,UNDERSCORE_TITLE_MODE:je});function Oe(pe,Re){pe.input[pe.index-1]==="."&&Re.ignoreMatch()}function se(pe,Re){pe.className!==void 0&&(pe.scope=pe.className,delete pe.className)}function we(pe,Re){Re&&pe.beginKeywords&&(pe.begin="\\b("+pe.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",pe.__beforeBegin=Oe,pe.keywords=pe.keywords||pe.beginKeywords,delete pe.beginKeywords,pe.relevance===void 0&&(pe.relevance=0))}function _e(pe,Re){Array.isArray(pe.illegal)&&(pe.illegal=C(...pe.illegal))}function Ee(pe,Re){if(pe.match){if(pe.begin||pe.end)throw new Error("begin & end are not supported with match");pe.begin=pe.match,delete pe.match}}function qe(pe,Re){pe.relevance===void 0&&(pe.relevance=1)}const Ue=(pe,Re)=>{if(!pe.beforeMatch)return;if(pe.starts)throw new Error("beforeMatch cannot be used with starts");const st=Object.assign({},pe);Object.keys(pe).forEach(Qe=>{delete pe[Qe]}),pe.keywords=st.keywords,pe.begin=y(st.beforeMatch,m(st.begin)),pe.starts={relevance:0,contains:[Object.assign(st,{endsParent:!0})]},pe.relevance=0,delete st.beforeMatch},tt=["of","and","for","in","not","or","if","then","parent","list","value"],rt="keyword";function lt(pe,Re,st=rt){const Qe=Object.create(null);return typeof pe=="string"?Vn(st,pe.split(" ")):Array.isArray(pe)?Vn(st,pe):Object.keys(pe).forEach(function(Un){Object.assign(Qe,lt(pe[Un],Re,Un))}),Qe;function Vn(Un,wt){Re&&(wt=wt.map(pt=>pt.toLowerCase())),wt.forEach(function(pt){const Nt=pt.split("|");Qe[Nt[0]]=[Un,ut(Nt[0],Nt[1])]})}}function ut(pe,Re){return Re?Number(Re):Ht(pe)?0:1}function Ht(pe){return tt.includes(pe.toLowerCase())}const vt={},mt=pe=>{console.error(pe)},qn=(pe,...Re)=>{console.log(`WARN: ${pe}`,...Re)},on=(pe,Re)=>{vt[`${pe}/${Re}`]||(console.log(`Deprecated as of ${pe}. ${Re}`),vt[`${pe}/${Re}`]=!0)},be=new Error;function Y(pe,Re,{key:st}){let Qe=0;const Vn=pe[st],Un={},wt={};for(let pt=1;pt<=Re.length;pt++)wt[pt+Qe]=Vn[pt],Un[pt+Qe]=!0,Qe+=x(Re[pt-1]);pe[st]=wt,pe[st]._emit=Un,pe[st]._multi=!0}function dt(pe){if(Array.isArray(pe.begin)){if(pe.skip||pe.excludeBegin||pe.returnBegin)throw mt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),be;if(typeof pe.beginScope!="object"||pe.beginScope===null)throw mt("beginScope must be object"),be;Y(pe,pe.begin,{key:"beginScope"}),pe.begin=_(pe.begin,{joinWith:""})}}function ct(pe){if(Array.isArray(pe.end)){if(pe.skip||pe.excludeEnd||pe.returnEnd)throw mt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),be;if(typeof pe.endScope!="object"||pe.endScope===null)throw mt("endScope must be object"),be;Y(pe,pe.end,{key:"endScope"}),pe.end=_(pe.end,{joinWith:""})}}function dn(pe){pe.scope&&typeof pe.scope=="object"&&pe.scope!==null&&(pe.beginScope=pe.scope,delete pe.scope)}function rn(pe){dn(pe),typeof pe.beginScope=="string"&&(pe.beginScope={_wrap:pe.beginScope}),typeof pe.endScope=="string"&&(pe.endScope={_wrap:pe.endScope}),dt(pe),ct(pe)}function Lt(pe){function Re(wt,pt){return new RegExp(h(wt),"m"+(pe.case_insensitive?"i":"")+(pe.unicodeRegex?"u":"")+(pt?"g":""))}class st{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(pt,Nt){Nt.position=this.position++,this.matchIndexes[this.matchAt]=Nt,this.regexes.push([Nt,pt]),this.matchAt+=x(pt)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const pt=this.regexes.map(Nt=>Nt[1]);this.matcherRe=Re(_(pt,{joinWith:"|"}),!0),this.lastIndex=0}exec(pt){this.matcherRe.lastIndex=this.lastIndex;const Nt=this.matcherRe.exec(pt);if(!Nt)return null;const Cr=Nt.findIndex((pi,Is)=>Is>0&&pi!==void 0),On=this.matchIndexes[Cr];return Nt.splice(0,Cr),Object.assign(Nt,On)}}class Qe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(pt){if(this.multiRegexes[pt])return this.multiRegexes[pt];const Nt=new st;return this.rules.slice(pt).forEach(([Cr,On])=>Nt.addRule(Cr,On)),Nt.compile(),this.multiRegexes[pt]=Nt,Nt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(pt,Nt){this.rules.push([pt,Nt]),Nt.type==="begin"&&this.count++}exec(pt){const Nt=this.getMatcher(this.regexIndex);Nt.lastIndex=this.lastIndex;let Cr=Nt.exec(pt);if(this.resumingScanAtSamePosition()&&!(Cr&&Cr.index===this.lastIndex)){const On=this.getMatcher(0);On.lastIndex=this.lastIndex+1,Cr=On.exec(pt)}return Cr&&(this.regexIndex+=Cr.position+1,this.regexIndex===this.count&&this.considerAll()),Cr}}function Vn(wt){const pt=new Qe;return wt.contains.forEach(Nt=>pt.addRule(Nt.begin,{rule:Nt,type:"begin"})),wt.terminatorEnd&&pt.addRule(wt.terminatorEnd,{type:"end"}),wt.illegal&&pt.addRule(wt.illegal,{type:"illegal"}),pt}function Un(wt,pt){const Nt=wt;if(wt.isCompiled)return Nt;[se,Ee,rn,Ue].forEach(On=>On(wt,pt)),pe.compilerExtensions.forEach(On=>On(wt,pt)),wt.__beforeBegin=null,[we,_e,qe].forEach(On=>On(wt,pt)),wt.isCompiled=!0;let Cr=null;return typeof wt.keywords=="object"&&wt.keywords.$pattern&&(wt.keywords=Object.assign({},wt.keywords),Cr=wt.keywords.$pattern,delete wt.keywords.$pattern),Cr=Cr||/\w+/,wt.keywords&&(wt.keywords=lt(wt.keywords,pe.case_insensitive)),Nt.keywordPatternRe=Re(Cr,!0),pt&&(wt.begin||(wt.begin=/\B|\b/),Nt.beginRe=Re(Nt.begin),!wt.end&&!wt.endsWithParent&&(wt.end=/\B|\b/),wt.end&&(Nt.endRe=Re(Nt.end)),Nt.terminatorEnd=h(Nt.end)||"",wt.endsWithParent&&pt.terminatorEnd&&(Nt.terminatorEnd+=(wt.end?"|":"")+pt.terminatorEnd)),wt.illegal&&(Nt.illegalRe=Re(wt.illegal)),wt.contains||(wt.contains=[]),wt.contains=[].concat(...wt.contains.map(function(On){return Hr(On==="self"?wt:On)})),wt.contains.forEach(function(On){Un(On,Nt)}),wt.starts&&Un(wt.starts,pt),Nt.matcher=Vn(Nt),Nt}if(pe.compilerExtensions||(pe.compilerExtensions=[]),pe.contains&&pe.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return pe.classNameAliases=r(pe.classNameAliases||{}),Un(pe)}function Ye(pe){return pe?pe.endsWithParent||Ye(pe.starts):!1}function Hr(pe){return pe.variants&&!pe.cachedVariants&&(pe.cachedVariants=pe.variants.map(function(Re){return r(pe,{variants:null},Re)})),pe.cachedVariants?pe.cachedVariants:Ye(pe)?r(pe,{starts:pe.starts?r(pe.starts):null}):Object.isFrozen(pe)?r(pe):pe}var Xi="11.11.2";class Qi extends Error{constructor(Re,st){super(Re),this.name="HTMLInjectionError",this.html=st}}const hi=n,Fi=r,pr=Symbol("nomatch"),ii=7,ir=function(pe){const Re=Object.create(null),st=Object.create(null),Qe=[];let Vn=!0;const Un="Could not find the language '{}', did you forget to load/include a language module?",wt={disableAutodetect:!0,name:"Plain text",contains:[]};let pt={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function Nt(Ze){return pt.noHighlightRe.test(Ze)}function Cr(Ze){let At=Ze.className+" ";At+=Ze.parentNode?Ze.parentNode.className:"";const sn=pt.languageDetectRe.exec(At);if(sn){const hn=Ii(sn[1]);return hn||(qn(Un.replace("{}",sn[1])),qn("Falling back to no-highlight mode for this block.",Ze)),hn?sn[1]:"no-highlight"}return At.split(/\s+/).find(hn=>Nt(hn)||Ii(hn))}function On(Ze,At,sn){let hn="",at="";typeof At=="object"?(hn=Ze,sn=At.ignoreIllegals,at=At.language):(on("10.7.0","highlight(lang, code, ...args) has been deprecated."),on("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),at=Ze,hn=At),sn===void 0&&(sn=!0);const Hn={code:hn,language:at};Va("before:highlight",Hn);const Sr=Hn.result?Hn.result:pi(Hn.language,Hn.code,sn);return Sr.code=Hn.code,Va("after:highlight",Sr),Sr}function pi(Ze,At,sn,hn){const at=Object.create(null);function Hn(ot,yt){return ot.keywords[yt]}function Sr(){if(!Gt.keywords){sr.addText(Bn);return}let ot=0;Gt.keywordPatternRe.lastIndex=0;let yt=Gt.keywordPatternRe.exec(Bn),Vt="";for(;yt;){Vt+=Bn.substring(ot,yt.index);const xn=Mi.case_insensitive?yt[0].toLowerCase():yt[0],ar=Hn(Gt,xn);if(ar){const[Fr,p]=ar;if(sr.addText(Vt),Vt="",at[xn]=(at[xn]||0)+1,at[xn]<=ii&&(ca+=p),Fr.startsWith("_"))Vt+=yt[0];else{const D=Mi.classNameAliases[Fr]||Fr;Wr(yt[0],D)}}else Vt+=yt[0];ot=Gt.keywordPatternRe.lastIndex,yt=Gt.keywordPatternRe.exec(Bn)}Vt+=Bn.substring(ot),sr.addText(Vt)}function Oo(){if(Bn==="")return;let ot=null;if(typeof Gt.subLanguage=="string"){if(!Re[Gt.subLanguage]){sr.addText(Bn);return}ot=pi(Gt.subLanguage,Bn,!0,ua[Gt.subLanguage]),ua[Gt.subLanguage]=ot._top}else ot=$a(Bn,Gt.subLanguage.length?Gt.subLanguage:null);Gt.relevance>0&&(ca+=ot.relevance),sr.__addSublanguage(ot._emitter,ot.language)}function si(){Gt.subLanguage!=null?Oo():Sr(),Bn=""}function Wr(ot,yt){ot!==""&&(sr.startScope(yt),sr.addText(ot),sr.endScope())}function Ha(ot,yt){let Vt=1;const xn=yt.length-1;for(;Vt<=xn;){if(!ot._emit[Vt]){Vt++;continue}const ar=Mi.classNameAliases[ot[Vt]]||ot[Vt],Fr=yt[Vt];ar?Wr(Fr,ar):(Bn=Fr,Sr(),Bn=""),Vt++}}function aa(ot,yt){return ot.scope&&typeof ot.scope=="string"&&sr.openNode(Mi.classNameAliases[ot.scope]||ot.scope),ot.beginScope&&(ot.beginScope._wrap?(Wr(Bn,Mi.classNameAliases[ot.beginScope._wrap]||ot.beginScope._wrap),Bn=""):ot.beginScope._multi&&(Ha(ot.beginScope,yt),Bn="")),Gt=Object.create(ot,{parent:{value:Gt}}),Gt}function oa(ot,yt,Vt){let xn=S(ot.endRe,Vt);if(xn){if(ot["on:end"]){const ar=new t(ot);ot["on:end"](yt,ar),ar.isMatchIgnored&&(xn=!1)}if(xn){for(;ot.endsParent&&ot.parent;)ot=ot.parent;return ot}}if(ot.endsWithParent)return oa(ot.parent,yt,Vt)}function cf(ot){return Gt.matcher.regexIndex===0?(Bn+=ot[0],1):(fa=!0,0)}function Ou(ot){const yt=ot[0],Vt=ot.rule,xn=new t(Vt),ar=[Vt.__beforeBegin,Vt["on:begin"]];for(const Fr of ar)if(Fr&&(Fr(ot,xn),xn.isMatchIgnored))return cf(yt);return Vt.skip?Bn+=yt:(Vt.excludeBegin&&(Bn+=yt),si(),!Vt.returnBegin&&!Vt.excludeBegin&&(Bn=yt)),aa(Vt,ot),Vt.returnBegin?0:yt.length}function Ei(ot){const yt=ot[0],Vt=At.substring(ot.index),xn=oa(Gt,ot,Vt);if(!xn)return pr;const ar=Gt;Gt.endScope&&Gt.endScope._wrap?(si(),Wr(yt,Gt.endScope._wrap)):Gt.endScope&&Gt.endScope._multi?(si(),Ha(Gt.endScope,ot)):ar.skip?Bn+=yt:(ar.returnEnd||ar.excludeEnd||(Bn+=yt),si(),ar.excludeEnd&&(Bn=yt));do Gt.scope&&sr.closeNode(),!Gt.skip&&!Gt.subLanguage&&(ca+=Gt.relevance),Gt=Gt.parent;while(Gt!==xn.parent);return xn.starts&&aa(xn.starts,ot),ar.returnEnd?0:yt.length}function ai(){const ot=[];for(let yt=Gt;yt!==Mi;yt=yt.parent)yt.scope&&ot.unshift(yt.scope);ot.forEach(yt=>sr.openNode(yt))}let la={};function Ms(ot,yt){const Vt=yt&&yt[0];if(Bn+=ot,Vt==null)return si(),0;if(la.type==="begin"&&yt.type==="end"&&la.index===yt.index&&Vt===""){if(Bn+=At.slice(yt.index,yt.index+1),!Vn){const xn=new Error(`0 width match regex (${Ze})`);throw xn.languageName=Ze,xn.badRule=la.rule,xn}return 1}if(la=yt,yt.type==="begin")return Ou(yt);if(yt.type==="illegal"&&!sn){const xn=new Error('Illegal lexeme "'+Vt+'" for mode "'+(Gt.scope||"")+'"');throw xn.mode=Gt,xn}else if(yt.type==="end"){const xn=Ei(yt);if(xn!==pr)return xn}if(yt.type==="illegal"&&Vt==="")return yt.index===At.length||(Bn+=` +`),1;if(tn>1e5&&tn>yt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Bn+=Vt,Vt.length}const Mi=Ii(Ze);if(!Mi)throw mt(Un.replace("{}",Ze)),new Error('Unknown language: "'+Ze+'"');const Dl=Lt(Mi);let En="",Gt=hn||Dl;const ua={},sr=new pt.__emitter(pt);ai();let Bn="",ca=0,Ci=0,tn=0,fa=!1;try{if(Mi.__emitTokens)Mi.__emitTokens(At,sr);else{for(Gt.matcher.considerAll();;){tn++,fa?fa=!1:Gt.matcher.considerAll(),Gt.matcher.lastIndex=Ci;const ot=Gt.matcher.exec(At);if(!ot)break;const yt=At.substring(Ci,ot.index),Vt=Ms(yt,ot);Ci=ot.index+Vt}Ms(At.substring(Ci))}return sr.finalize(),En=sr.toHTML(),{language:Ze,value:En,relevance:ca,illegal:!1,_emitter:sr,_top:Gt}}catch(ot){if(ot.message&&ot.message.includes("Illegal"))return{language:Ze,value:hi(At),illegal:!0,relevance:0,_illegalBy:{message:ot.message,index:Ci,context:At.slice(Ci-100,Ci+100),mode:ot.mode,resultSoFar:En},_emitter:sr};if(Vn)return{language:Ze,value:hi(At),illegal:!1,relevance:0,errorRaised:ot,_emitter:sr,_top:Gt};throw ot}}function Is(Ze){const At={value:hi(Ze),illegal:!1,relevance:0,_top:wt,_emitter:new pt.__emitter(pt)};return At._emitter.addText(Ze),At}function $a(Ze,At){At=At||pt.languages||Object.keys(Re);const sn=Is(Ze),hn=At.filter(Ii).filter(Cl).map(si=>pi(si,Ze,!1));hn.unshift(sn);const at=hn.sort((si,Wr)=>{if(si.relevance!==Wr.relevance)return Wr.relevance-si.relevance;if(si.language&&Wr.language){if(Ii(si.language).supersetOf===Wr.language)return 1;if(Ii(Wr.language).supersetOf===si.language)return-1}return 0}),[Hn,Sr]=at,Oo=Hn;return Oo.secondBest=Sr,Oo}function Su(Ze,At,sn){const hn=At&&st[At]||sn;Ze.classList.add("hljs"),Ze.classList.add(`language-${hn}`)}function To(Ze){let At=null;const sn=Cr(Ze);if(Nt(sn))return;if(Va("before:highlightElement",{el:Ze,language:sn}),Ze.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Ze);return}if(Ze.children.length>0&&(pt.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Ze)),pt.throwUnescapedHTML))throw new Qi("One of your code blocks includes unescaped HTML.",Ze.innerHTML);At=Ze;const hn=At.textContent,at=sn?On(hn,{language:sn,ignoreIllegals:!0}):$a(hn);Ze.innerHTML=at.value,Ze.dataset.highlighted="yes",Su(Ze,sn,at.language),Ze.result={language:at.language,re:at.relevance,relevance:at.relevance},at.secondBest&&(Ze.secondBest={language:at.secondBest.language,relevance:at.secondBest.relevance}),Va("after:highlightElement",{el:Ze,result:at,text:hn})}function _u(Ze){pt=Fi(pt,Ze)}const hs=()=>{No(),on("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function xl(){No(),on("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let bl=!1;function No(){function Ze(){No()}if(document.readyState==="loading"){bl||window.addEventListener("DOMContentLoaded",Ze,!1),bl=!0;return}document.querySelectorAll(pt.cssSelector).forEach(To)}function Au(Ze,At){let sn=null;try{sn=At(pe)}catch(hn){if(mt("Language definition for '{}' could not be registered.".replace("{}",Ze)),Vn)mt(hn);else throw hn;sn=wt}sn.name||(sn.name=Ze),Re[Ze]=sn,sn.rawDefinition=At.bind(null,pe),sn.aliases&&El(sn.aliases,{languageName:Ze})}function Tu(Ze){delete Re[Ze];for(const At of Object.keys(st))st[At]===Ze&&delete st[At]}function wl(){return Object.keys(Re)}function Ii(Ze){return Ze=(Ze||"").toLowerCase(),Re[Ze]||Re[st[Ze]]}function El(Ze,{languageName:At}){typeof Ze=="string"&&(Ze=[Ze]),Ze.forEach(sn=>{st[sn.toLowerCase()]=At})}function Cl(Ze){const At=Ii(Ze);return At&&!At.disableAutodetect}function Xn(Ze){Ze["before:highlightBlock"]&&!Ze["before:highlightElement"]&&(Ze["before:highlightElement"]=At=>{Ze["before:highlightBlock"](Object.assign({block:At.el},At))}),Ze["after:highlightBlock"]&&!Ze["after:highlightElement"]&&(Ze["after:highlightElement"]=At=>{Ze["after:highlightBlock"](Object.assign({block:At.el},At))})}function Nu(Ze){Xn(Ze),Qe.push(Ze)}function kl(Ze){const At=Qe.indexOf(Ze);At!==-1&&Qe.splice(At,1)}function Va(Ze,At){const sn=Ze;Qe.forEach(function(hn){hn[sn]&&hn[sn](At)})}function Ua(Ze){return on("10.7.0","highlightBlock will be removed entirely in v12.0"),on("10.7.0","Please use highlightElement now."),To(Ze)}Object.assign(pe,{highlight:On,highlightAuto:$a,highlightAll:No,highlightElement:To,highlightBlock:Ua,configure:_u,initHighlighting:hs,initHighlightingOnLoad:xl,registerLanguage:Au,unregisterLanguage:Tu,listLanguages:wl,getLanguage:Ii,registerAliases:El,autoDetection:Cl,inherit:Fi,addPlugin:Nu,removePlugin:kl}),pe.debugMode=function(){Vn=!1},pe.safeMode=function(){Vn=!0},pe.versionString=Xi,pe.regex={concat:y,lookahead:m,either:C,optional:b,anyNumberOfTimes:g};for(const Ze in ge)typeof ge[Ze]=="object"&&e(ge[Ze]);return Object.assign(pe,ge),pe},Er=ir({});return Er.newInstance=()=>ir({}),k2=Er,Er.HighlightJS=Er,Er.default=Er,k2}var Hle=Ule();const Wle=Rr(Hle),m9={},Kle="hljs-";function Gle(e){const t=Wle.newInstance();return e&&s(e),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:a,registered:o};function n(l,u,f){const h=f||m9,m=typeof h.prefix=="string"?h.prefix:Kle;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:Yle,classPrefix:m});const g=t.highlight(u,{ignoreIllegals:!0,language:l});if(g.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:g.errorRaised});const b=g._emitter.root,y=b.data;return y.language=g.language,y.relevance=g.relevance,b}function r(l,u){const h=(u||m9).subset||i();let m=-1,g=0,b;for(;++mg&&(g=E.data.relevance,b=E)}return b||{type:"root",children:[],data:{language:void 0,relevance:g}}}function i(){return t.listLanguages()}function s(l,u){if(typeof l=="string")t.registerLanguage(l,u);else{let f;for(f in l)Object.hasOwn(l,f)&&t.registerLanguage(f,l[f])}}function a(l,u){if(typeof l=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let f;for(f in l)if(Object.hasOwn(l,f)){const h=l[f];t.registerAliases(typeof h=="string"?h:[...h],{languageName:f})}}}function o(l){return!!t.getLanguage(l)}}class Yle{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(a,o){return o?a+"_".repeat(o):n.options.classPrefix+a}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const c0=(e,{getNodesOptions:t,offset:n=1,setNodesProps:r,unsetNodesProps:i=[]})=>{const{nodeKey:s}=e.getInjectProps(Zle),a=e.api.nodes({block:!0,mode:"lowest",...t}),o=Array.from(a);e.tf.withoutNormalizing(()=>{o.forEach(([l,u])=>{const f=(l[s]??0)+n,h=r?.({indent:f})??{};f<=0?e.tf.unsetNodes([s,...i],{at:u}):e.tf.setNodes({[s]:f,...h},{at:u})})})},Jle=(e,t)=>{c0(e,{offset:1,...t})},Xle=(e,t)=>{c0(e,{offset:-1,...t})},Qle=({editor:e,getOptions:t,plugin:n,tf:{normalizeNode:r,tab:i}})=>({transforms:{normalizeNode([s,a]){const{indentMax:o}=t(),l=s,{type:u}=l,f=Rp(e,n);if(u){if(f(l,a)){if(o&&l.indent&&l.indent>o){e.tf.setNodes({indent:o},{at:a});return}}else if(l.indent){e.tf.unsetNodes("indent",{at:a});return}}return r([s,a])},tab:s=>(()=>{const o=Rp(e,n),l=e.api.block();if(!l)return;const[u,f]=l;if(o(u,f)){if(s.reverse){if(!u.indent)return e.api.above({at:f,match:(h,m)=>m.length{const{offset:n,unit:r}=e();return t*n+r}},targetPlugins:[te.p]},options:{offset:24,unit:"px"}}).overrideEditor(Qle),eue=(e,[t,n])=>{if(!Mr(t[te.indent])&&(t[te.listType]||t[te.listStart]))return e.tf.unsetNodes([te.listType,te.listStart],{at:n}),!0},tue=(e,t)=>{const n=e.getType;return typeof n=="function"?n.call(e,t):t},Yp=(e,t)=>{const n=t.type;return typeof n=="string"&&te.heading.some(r=>n===tue(e,r))},nue=(e,t,n)=>t[te.listType]===n[te.listType]&&Yp(e,t)===Yp(e,n),rue=(e,t,n)=>{const r=t[te.listType];return t[te.indent]===n[te.indent]&&r!=null&&r===n[te.listType]&&Yp(e,t)!==Yp(e,n)},OI=(e,t)=>{const{breakQuery:n,query:r,...i}=t??{};return{...i,breakQuery:(s,a)=>rue(e,s,a)||!!n?.(s,a),query:(s,a)=>nue(e,s,a)&&(r?!!r(s,a):!0)}},BI=(e,[t,n],{breakOnEqIndentNeqListStyleType:r=!0,breakOnListRestart:i=!1,breakOnLowerIndent:s=!0,breakQuery:a,eqIndent:o=!0,getNextEntry:l,getPreviousEntry:u,query:f})=>{if(!u&&!l)return;const h=l??u;let m=h([t,n]);for(;;){if(!m)return;const[g,b]=m,y=t[te.indent],E=g[te.indent];if(a?.(g,t)||!Mr(E)||i&&(u&&t[te.listRestart]||l&&g[te.listRestart])||s&&EBI(e,t,{getPreviousEntry:([,r])=>{const i=Je.previous(r);if(!i)return;const s=ht.get(e,i);if(s)return[s,i]},...n,getNextEntry:void 0}),Vr={Circle:"circle",Disc:"disc",DisclosureClosed:"disclosure-closed",DisclosureOpen:"disclosure-open",LowerAlpha:"lower-alpha",LowerRoman:"lower-roman",Square:"square",UpperAlpha:"upper-alpha",UpperRoman:"upper-roman"},PI=[Vr.Disc,Vr.Circle,Vr.Square,Vr.DisclosureOpen,Vr.DisclosureClosed],iue=(e,t)=>{const[n]=e,[r]=t??[null],i=n[te.listRestart]??null,s=n[te.listRestartPolite]??null;return i||(s&&!r?s:r?(r[te.listStart]??1)+1:1)},RI=(e,t,n)=>e.tf.withoutNormalizing(()=>{const[r,i]=t,s=r[te.listType],a=r[te.listStart];if(!s)return;if(PI.includes(s))return Mr(a)?(e.tf.unsetNodes(te.listStart,{at:i}),!0):void 0;const o=iue(t,Vm(e,t,OI(e,{breakOnEqIndentNeqListStyleType:!1,...n})));return Mr(a)&&o===1?(e.tf.unsetNodes(te.listStart,{at:i}),!0):a!==o&&o>1?(e.tf.setNodes({[te.listStart]:o},{at:i}),!0):!1}),sue=({editor:e,tf:{insertBreak:t}})=>({transforms:{insertBreak(){const n=e.api.above();if(!n)return t();const[r,i]=n;if(!Mr(r[te.listType])||r[te.listType]!==te.listTodo||e.api.isExpanded()||!e.api.isEnd(e.selection?.focus,i))return t();e.tf.withoutNormalizing(()=>{t();const s=e.api.above();s&&e.tf.setNodes({checked:!1},{at:s[1]})})}}}),FI=(e,t,n)=>BI(e,t,{getNextEntry:([,r])=>{const i=Je.next(r),s=ht.get(e,i);if(s)return[s,i]},...n,getPreviousEntry:void 0}),aue=(e,{listStyleType:t=Vr.Disc,...n}={})=>{c0(e,{offset:1,setNodesProps:()=>({[te.listType]:t}),...n})},oue=(e,{listStyleType:t=Vr.Disc,...n}={})=>{c0(e,{offset:1,setNodesProps:()=>({[te.listChecked]:!1,[te.listType]:t}),...n})},m4=(e,t={})=>{c0(e,{offset:-1,unsetNodesProps:[te.listType,te.listChecked],...t})},II=(e,{at:t,indent:n=0,listStyleType:r=Vr.Disc})=>{const i=n||n+1;e.tf.setNodes({[te.indent]:i,[te.listType]:r},{at:t})},MI=(e,{at:t,indent:n=0,listStyleType:r=te.listTodo})=>{const i=n||n+1;e.tf.setNodes({[te.indent]:i,[te.listChecked]:!1,[te.listType]:r},{at:t})},lue=(e,t,{listStyleType:n=Vr.Disc})=>{e.tf.withoutNormalizing(()=>{t.forEach(r=>{const[i,s]=r;let a=i[te.indent]??0;if(a=i[te.listType]||Object.hasOwn(i,te.listChecked)?a:a+1,n==="todo"){e.tf.unsetNodes(te.listType,{at:s}),MI(e,{at:s,indent:a,listStyleType:n});return}e.tf.unsetNodes(te.listChecked,{at:s}),II(e,{at:s,indent:a,listStyleType:n})})})},uue=(e,t,{current:n=!0,next:r=!0,previous:i=!0,...s}={})=>{const a=[],o=t[0];if(!o[te.listType]&&!Object.hasOwn(o,te.listChecked))return a;let l=t;if(i)for(;;){const u=Vm(e,l,s);if(!u)break;a.push(u),l=u}if(n&&a.push(t),r)for(l=t;;){const u=FI(e,l,s);if(!u)break;a.push(u),l=u}return a},cue=(e,t,{getSiblingListOptions:n,listStyleType:r=Vr.Disc})=>{e.tf.withoutNormalizing(()=>{uue(e,t,n).forEach(([i,s])=>{r===te.listTodo?(e.tf.unsetNodes(te.listType,{at:s}),MI(e,{at:s,indent:i[te.indent],listStyleType:r})):(e.tf.unsetNodes(te.listChecked,{at:s}),II(e,{at:s,indent:i[te.indent],listStyleType:r}))})})},fue=(e,t,{listStyleType:n=Vr.Disc})=>{let r=!0;for(const i of t){const[s]=i;if(n===te.listTodo){if(!Object.hasOwn(s,te.listChecked)){r=!1;break}continue}if(!s[te.listType]||s[te.listType]!==n){r=!1;break}}return r},due=(e,t)=>e.api.above({...t,match:n=>Mr(n[te.listType])});function hue(e){return!!e.listStyleType&&!PI.includes(e.listStyleType)}const pue=(e,[t,n],{listStyleType:r=Vr.Disc,...i})=>{if(!(Object.hasOwn(t,te.listChecked)||t[te.listType]))return r==="todo"?oue(e,{listStyleType:r,...i}):aue(e,{listStyleType:r,...i}),!0},mue=(e,[t,n],{listStyleType:r=Vr.Disc})=>{if(r===te.listTodo&&Object.hasOwn(t,te.listChecked))return e.tf.unsetNodes(te.listChecked,{at:n}),m4(e,{listStyleType:r}),!0;if(r===t[te.listType])return e.tf.unsetNodes([te.listType],{at:n}),m4(e,{listStyleType:r}),!0},gue=(e,t,n)=>{const{listRestart:r,listRestartPolite:i,listStyleType:s}=t,{getSiblingListOptions:a}=e.getOptions(LI),o={...a,...n},l=(()=>{if(e.api.isCollapsed()){const h=e.api.block();return h?pue(e,h,t)?!0:mue(e,h,{listStyleType:s})?!1:(cue(e,h,{getSiblingListOptions:o,listStyleType:s}),!0):null}if(e.api.isExpanded()){const h=Rp(e,e.getPlugin({key:te.list})),m=[...e.api.nodes({block:!0,match:h})];return fue(e,m,{listStyleType:s})?(e.tf.withoutNormalizing(()=>{m.forEach(g=>{const[b,y]=g,E=b[te.indent];e.tf.unsetNodes(te.listType,{at:y}),E>1?e.tf.setNodes({[te.indent]:E-1},{at:y}):e.tf.unsetNodes([te.indent,te.listChecked],{at:y})})}),!1):(lue(e,m,{listStyleType:s}),!0)}return null})(),u=r||i,f=!!r;if(l&&u){const h=due(e,{at:e.api.start(e.selection)});if(!h)return;const m=!Vm(e,h,OI(e,{breakOnEqIndentNeqListStyleType:!1,...o}));if(!f&&(!m||u<=0)||f&&u===1&&m)return;const g=f?te.listRestart:te.listRestartPolite;e.tf.setNodes({[g]:u},{at:h[1]})}},vue=({editor:e,getOptions:t,tf:{normalizeNode:n}})=>({transforms:{normalizeNode([r,i]){if(!e.tf.withoutNormalizing(()=>{if(eue(e,[r,i])||RI(e,[r,i],t().getSiblingListOptions))return!0}))return n([r,i])}}}),yue=e=>{const{editor:t,getOptions:n,tf:{apply:r,resetBlock:i}}=e;return{transforms:{resetBlock(s){if(t.api.block(s)?.[0]?.[te.listType]){m4(t);return}return i(s)},...vue(e).transforms,...sue(e).transforms,apply(s){const{getSiblingListOptions:a}=n();if(s.type==="insert_node"){const u=s.node[te.listType];if(u&&["lower-roman","upper-roman"].includes(u)){const f=Vm(t,[s.node,s.path],{breakOnEqIndentNeqListStyleType:!1,eqIndent:!1,...a});if(f){const h=f[0][te.listType];h===Vr.LowerAlpha&&u===Vr.LowerRoman?s.node[te.listType]=Vr.LowerAlpha:h===Vr.UpperAlpha&&u===Vr.UpperRoman&&(s.node[te.listType]=Vr.UpperAlpha)}}}s.type==="split_node"&&s.properties[te.listType]&&(delete s.properties[te.listRestart],delete s.properties[te.listRestartPolite]),r(s);const o=[];switch(s.type){case"insert_node":case"remove_node":case"set_node":o.push(s.path);break;case"merge_node":o.push(Je.previous(s.path));break;case"move_node":o.push(s.path,s.newPath);break;case"split_node":o.push(s.path,Je.next(s.path));break}const l=u=>te.listType in u;o.forEach(u=>{let f=t.api.node(u);if(f)for(l(f[0])||(f=t.api.node(Je.next(u)));f&&l(f[0])&&!RI(t,f,a);)f=FI(t,f,{...a,breakOnEqIndentNeqListStyleType:!1,breakOnLowerIndent:!1,eqIndent:!1})})}}}},LI=Yn({key:te.list,inject:{plugins:{[te.html]:{parser:{transformData:({data:e})=>{const{body:t}=new DOMParser().parseFromString(e,"text/html"),n=[];return u4(t,r=>{if(r.tagName==="LI"){const i=[];Array.from(r.children).forEach(s=>{(s.tagName==="UL"||s.tagName==="OL")&&i.push(s)}),i.length>0&&n.push({li:r,nestedLists:i})}return!0}),n.forEach(({li:r,nestedLists:i})=>{i.forEach(s=>{s.remove(),r.parentNode&&r.parentNode.insertBefore(s,r.nextSibling)})}),u4(t,r=>{if(r.tagName==="LI"){const i=r,{childNodes:s}=r,a=[];s.forEach(u=>{if(u.nodeType===Node.ELEMENT_NODE){const f=u;if(Hw(f)){a.push(...f.childNodes);return}}a.push(u)}),r.replaceChildren(...a);const o=r.getAttribute("aria-level");if(o)i.dataset.indent=o;else{let u=0,f=r.parentElement;for(;f&&f!==t;)(f.tagName==="UL"||f.tagName==="OL")&&u++,f=f.parentElement;u>0&&(i.dataset.indent=String(u))}const l=i.style.listStyleType;if(l)i.dataset.listStyleType=l;else{const u=r.closest("ul, ol");if(u){const f=u.style.listStyleType;f?i.dataset.listStyleType=f:u.tagName==="UL"?i.dataset.listStyleType="disc":u.tagName==="OL"&&(i.dataset.listStyleType="decimal")}}return!1}return!0}),zse(t.innerHTML)}}}},targetPlugins:[te.p]},options:{getListStyleType:e=>e.style.listStyleType},parsers:{html:{deserializer:{isElement:!0,rules:[{validNodeName:"LI"}],parse:({editor:e,element:t,getOptions:n})=>{const r=t.dataset.indent,i=t.getAttribute("aria-level"),s=Number(r||i),a=t.dataset.listStyleType||n().getListStyleType?.(t);return{indent:s||void 0,listStyleType:a||void 0,type:e.getType(te.p)}}}}},rules:{break:{empty:"reset",splitReset:!1},delete:{start:"reset"},merge:{removeEmpty:!1},match:({node:e})=>Mr(e[te.listType])}}).overrideEditor(yue),xue=fn(LI,{render:{belowNodes:e=>{if(e.element.listStyleType)return t=>oe.createElement(bue,t)}}});function bue(e){const t=Zt.c(9),{listStart:n,listStyleType:r}=e.element,i=hue(e.element)?"ol":"ul";let s;t[0]!==r?(s={listStyleType:r,margin:0,padding:0,position:"relative"},t[0]=r,t[1]=s):s=t[1];let a;t[2]!==e.children?(a=oe.createElement("li",null,e.children),t[2]=e.children,t[3]=a):a=t[3];let o;return t[4]!==i||t[5]!==n||t[6]!==s||t[7]!==a?(o=oe.createElement(i,{style:s,start:n},a),t[4]=i,t[5]=n,t[6]=s,t[7]=a,t[8]=o):o=t[8],o}const wue=(e,t)=>{e.tf.insertNodes({children:[{text:""}],texExpression:"",type:e.getType(te.equation)},t)},Eue=(e,t,n)=>{e.tf.insertNodes({children:[{text:""}],texExpression:t??e.api.string(e.selection),type:e.getType(te.inlineEquation)},n)},Cue=e=>typeof e.texExpression=="string"||typeof e.texExpression=="number"||typeof e.texExpression=="boolean"?String(e.texExpression):"",zI=({editor:e,tf:{normalizeNode:t},type:n})=>({transforms:{normalizeNode(r){const[i,s]=r;if(Rt.isElement(i)&&i.type===n&&typeof i.texExpression!="string"){e.tf.setNodes({texExpression:Cue({texExpression:i.texExpression})},{at:s});return}return t(r)}}}),kue=Jt({key:te.equation,node:{isElement:!0,isVoid:!0},parsers:{html:{deserializer:{toNodeProps:({element:e})=>({texExpression:e.getAttribute("data-slate-tex-expression")??""})}}}}).overrideEditor(zI).extendEditorTransforms(({editor:e})=>({insert:{equation:De(wue,e)}})),Due=Jt({key:te.inlineEquation,node:{isElement:!0,isInline:!0,isVoid:!0},parsers:{html:{deserializer:{toNodeProps:({element:e})=>({texExpression:e.getAttribute("data-slate-tex-expression")??""})}}}}).overrideEditor(zI).extendEditorTransforms(({editor:e})=>({insert:{inlineEquation:De(Eue,e)}}));let Sue=class jI{constructor(t,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=n,this.end=r}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new jI(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},_ue=class qI{constructor(t,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=n}range(t,n){return new qI(n,Sue.range(this,t))}};class Ft{constructor(t,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+t,i,s,a=n&&n.loc;if(a&&a.start<=a.end){var o=a.lexer.input;i=a.start,s=a.end,i===o.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ";var l=o.slice(i,s).replace(/[^]/g,"$&̲"),u;i>15?u="…"+o.slice(i-15,i):u=o.slice(0,i);var f;s+15":">","<":"<",'"':""","'":"'"},Pue=/[&><"']/g;function Rue(e){return String(e).replace(Pue,t=>Bue[t])}var $I=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Fue=function(t){var n=$I(t);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},Iue=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},Mue=function(t){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},$t={contains:Aue,deflt:Tue,escape:Rue,hyphenate:Oue,getBaseElem:$I,isCharacterBox:Fue,protocolFromUrl:Mue};class Yo{constructor(t,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=n,this.cramped=r}sup(){return Da[Lue[this.id]]}sub(){return Da[zue[this.id]]}fracNum(){return Da[jue[this.id]]}fracDen(){return Da[que[this.id]]}cramp(){return Da[$ue[this.id]]}text(){return Da[Vue[this.id]]}isTight(){return this.size>=2}}var m3=0,Jp=1,Sc=2,mo=3,Md=4,_s=5,Fc=6,Bi=7,Da=[new Yo(m3,0,!1),new Yo(Jp,0,!0),new Yo(Sc,1,!1),new Yo(mo,1,!0),new Yo(Md,2,!1),new Yo(_s,2,!0),new Yo(Fc,3,!1),new Yo(Bi,3,!0)],Lue=[Md,_s,Md,_s,Fc,Bi,Fc,Bi],zue=[_s,_s,_s,_s,Bi,Bi,Bi,Bi],jue=[Sc,mo,Md,_s,Fc,Bi,Fc,Bi],que=[mo,mo,_s,_s,Bi,Bi,Bi,Bi],$ue=[Jp,Jp,mo,mo,_s,_s,Bi,Bi],Vue=[m3,Jp,Sc,mo,Sc,mo,Sc,mo],Wt={DISPLAY:Da[m3],TEXT:Da[Sc],SCRIPT:Da[Md],SCRIPTSCRIPT:Da[Fc]},g4=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Uue(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var vp=[];g4.forEach(e=>e.blocks.forEach(t=>vp.push(...t)));function Hue(e){for(var t=0;t=vp[t]&&e<=vp[t+1])return!0;return!1}var ic=80,Wue=function(t,n){return"M95,"+(622+t+n)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Kue=function(t,n){return"M263,"+(601+t+n)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Gue=function(t,n){return"M983 "+(10+t+n)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+n+"h400000v"+(40+t)+"h-400000z"},Yue=function(t,n){return"M424,"+(2398+t+n)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+n+` +h400000v`+(40+t)+"h-400000z"},Jue=function(t,n){return"M473,"+(2713+t+n)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+n+"h400000v"+(40+t)+"H1017.7z"},Xue=function(t){var n=t/2;return"M400000 "+t+" H0 L"+n+" 0 l65 45 L145 "+(t-80)+" H400000z"},Que=function(t,n,r){var i=r-54-n-t;return"M702 "+(t+n)+"H400000"+(40+t)+` +H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+n+"H400000v"+(40+t)+"H742z"},Zue=function(t,n,r){n=1e3*n;var i="";switch(t){case"sqrtMain":i=Wue(n,ic);break;case"sqrtSize1":i=Kue(n,ic);break;case"sqrtSize2":i=Gue(n,ic);break;case"sqrtSize3":i=Yue(n,ic);break;case"sqrtSize4":i=Jue(n,ic);break;case"sqrtTall":i=Que(n,ic,r)}return i},ece=function(t,n){switch(t){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},g9={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},tce=function(t,n){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z +M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z +M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z +M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class f0{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return $t.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),n=0;nn.toText();return this.children.map(t).join("")}}var oo={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},v9={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function g3(e,t,n){if(!oo[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),i=oo[t][r];if(!i&&e[0]in v9&&(r=v9[e[0]].charCodeAt(0),i=oo[t][r]),!i&&n==="text"&&Hue(r)&&(i=oo[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var v4={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},nce={ex:!0,em:!0,mu:!0},rce=function(t){return typeof t!="string"&&(t=t.unit),t in v4||t in nce||t==="ex"},br=function(t,n){var r;if(t.unit in v4)r=v4[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var i;if(n.style.isTight()?i=n.havingStyle(n.style.text()):i=n,t.unit==="ex")r=i.fontMetrics().xHeight;else if(t.unit==="em")r=i.fontMetrics().quad;else throw new Ft("Invalid unit: '"+t.unit+"'");i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},ft=function(t){return+t.toFixed(4)+"em"},dl=function(t){return t.filter(n=>n).join(" ")},VI=function(t,n,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}},UI=function(t){var n=document.createElement(t);n.className=dl(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&n.setAttribute(i,this.attributes[i]);for(var s=0;s/=\x00-\x1f]/,HI=function(t){var n="<"+t;this.classes.length&&(n+=' class="'+$t.escape(dl(this.classes))+'"');var r="";for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=$t.hyphenate(i)+":"+this.style[i]+";");r&&(n+=' style="'+$t.escape(r)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(ice.test(s))throw new Ft("Invalid attribute name '"+s+"'");n+=" "+s+'="'+$t.escape(this.attributes[s])+'"'}n+=">";for(var a=0;a",n};class Um{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,VI.call(this,t,r,i),this.children=n||[]}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return $t.contains(this.classes,t)}toNode(){return UI.call(this,"span")}toMarkup(){return HI.call(this,"span")}}class WI{constructor(t,n,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,VI.call(this,n,i),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,n){this.attributes[t]=n}hasClass(t){return $t.contains(this.classes,t)}toNode(){return UI.call(this,"a")}toMarkup(){return HI.call(this,"a")}}class sce{constructor(t,n,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=n,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return $t.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);return t}toMarkup(){var t=''+$t.escape(this.alt)+'0&&(n=document.createElement("span"),n.style.marginRight=ft(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=dl(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(t),n):t}toMarkup(){var t=!1,n="0&&(r+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(r+=$t.hyphenate(i)+":"+this.style[i]+";");r&&(t=!0,n+=' style="'+$t.escape(r)+'"');var s=$t.escape(this.text);return t?(n+=">",n+=s,n+="",n):s}}class hl{constructor(t,n){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=n||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i':''}}class y9{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",n=document.createElementNS(t,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var t=" but got "+String(e)+".")}var lce={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Br={math:{},text:{}};function B(e,t,n,r,i,s){Br[e][i]={font:t,group:n,replace:r},s&&r&&(Br[e][r]=Br[e][i])}var q="math",Ke="text",H="main",de="ams",hr="accent-token",bt="bin",Ri="close",nf="inner",qt="mathord",zr="op-token",fs="open",Hm="punct",he="rel",So="spacing",ye="textord";B(q,H,he,"≡","\\equiv",!0);B(q,H,he,"≺","\\prec",!0);B(q,H,he,"≻","\\succ",!0);B(q,H,he,"∼","\\sim",!0);B(q,H,he,"⊥","\\perp");B(q,H,he,"⪯","\\preceq",!0);B(q,H,he,"⪰","\\succeq",!0);B(q,H,he,"≃","\\simeq",!0);B(q,H,he,"∣","\\mid",!0);B(q,H,he,"≪","\\ll",!0);B(q,H,he,"≫","\\gg",!0);B(q,H,he,"≍","\\asymp",!0);B(q,H,he,"∥","\\parallel");B(q,H,he,"⋈","\\bowtie",!0);B(q,H,he,"⌣","\\smile",!0);B(q,H,he,"⊑","\\sqsubseteq",!0);B(q,H,he,"⊒","\\sqsupseteq",!0);B(q,H,he,"≐","\\doteq",!0);B(q,H,he,"⌢","\\frown",!0);B(q,H,he,"∋","\\ni",!0);B(q,H,he,"∝","\\propto",!0);B(q,H,he,"⊢","\\vdash",!0);B(q,H,he,"⊣","\\dashv",!0);B(q,H,he,"∋","\\owns");B(q,H,Hm,".","\\ldotp");B(q,H,Hm,"⋅","\\cdotp");B(q,H,ye,"#","\\#");B(Ke,H,ye,"#","\\#");B(q,H,ye,"&","\\&");B(Ke,H,ye,"&","\\&");B(q,H,ye,"ℵ","\\aleph",!0);B(q,H,ye,"∀","\\forall",!0);B(q,H,ye,"ℏ","\\hbar",!0);B(q,H,ye,"∃","\\exists",!0);B(q,H,ye,"∇","\\nabla",!0);B(q,H,ye,"♭","\\flat",!0);B(q,H,ye,"ℓ","\\ell",!0);B(q,H,ye,"♮","\\natural",!0);B(q,H,ye,"♣","\\clubsuit",!0);B(q,H,ye,"℘","\\wp",!0);B(q,H,ye,"♯","\\sharp",!0);B(q,H,ye,"♢","\\diamondsuit",!0);B(q,H,ye,"ℜ","\\Re",!0);B(q,H,ye,"♡","\\heartsuit",!0);B(q,H,ye,"ℑ","\\Im",!0);B(q,H,ye,"♠","\\spadesuit",!0);B(q,H,ye,"§","\\S",!0);B(Ke,H,ye,"§","\\S");B(q,H,ye,"¶","\\P",!0);B(Ke,H,ye,"¶","\\P");B(q,H,ye,"†","\\dag");B(Ke,H,ye,"†","\\dag");B(Ke,H,ye,"†","\\textdagger");B(q,H,ye,"‡","\\ddag");B(Ke,H,ye,"‡","\\ddag");B(Ke,H,ye,"‡","\\textdaggerdbl");B(q,H,Ri,"⎱","\\rmoustache",!0);B(q,H,fs,"⎰","\\lmoustache",!0);B(q,H,Ri,"⟯","\\rgroup",!0);B(q,H,fs,"⟮","\\lgroup",!0);B(q,H,bt,"∓","\\mp",!0);B(q,H,bt,"⊖","\\ominus",!0);B(q,H,bt,"⊎","\\uplus",!0);B(q,H,bt,"⊓","\\sqcap",!0);B(q,H,bt,"∗","\\ast");B(q,H,bt,"⊔","\\sqcup",!0);B(q,H,bt,"◯","\\bigcirc",!0);B(q,H,bt,"∙","\\bullet",!0);B(q,H,bt,"‡","\\ddagger");B(q,H,bt,"≀","\\wr",!0);B(q,H,bt,"⨿","\\amalg");B(q,H,bt,"&","\\And");B(q,H,he,"⟵","\\longleftarrow",!0);B(q,H,he,"⇐","\\Leftarrow",!0);B(q,H,he,"⟸","\\Longleftarrow",!0);B(q,H,he,"⟶","\\longrightarrow",!0);B(q,H,he,"⇒","\\Rightarrow",!0);B(q,H,he,"⟹","\\Longrightarrow",!0);B(q,H,he,"↔","\\leftrightarrow",!0);B(q,H,he,"⟷","\\longleftrightarrow",!0);B(q,H,he,"⇔","\\Leftrightarrow",!0);B(q,H,he,"⟺","\\Longleftrightarrow",!0);B(q,H,he,"↦","\\mapsto",!0);B(q,H,he,"⟼","\\longmapsto",!0);B(q,H,he,"↗","\\nearrow",!0);B(q,H,he,"↩","\\hookleftarrow",!0);B(q,H,he,"↪","\\hookrightarrow",!0);B(q,H,he,"↘","\\searrow",!0);B(q,H,he,"↼","\\leftharpoonup",!0);B(q,H,he,"⇀","\\rightharpoonup",!0);B(q,H,he,"↙","\\swarrow",!0);B(q,H,he,"↽","\\leftharpoondown",!0);B(q,H,he,"⇁","\\rightharpoondown",!0);B(q,H,he,"↖","\\nwarrow",!0);B(q,H,he,"⇌","\\rightleftharpoons",!0);B(q,de,he,"≮","\\nless",!0);B(q,de,he,"","\\@nleqslant");B(q,de,he,"","\\@nleqq");B(q,de,he,"⪇","\\lneq",!0);B(q,de,he,"≨","\\lneqq",!0);B(q,de,he,"","\\@lvertneqq");B(q,de,he,"⋦","\\lnsim",!0);B(q,de,he,"⪉","\\lnapprox",!0);B(q,de,he,"⊀","\\nprec",!0);B(q,de,he,"⋠","\\npreceq",!0);B(q,de,he,"⋨","\\precnsim",!0);B(q,de,he,"⪹","\\precnapprox",!0);B(q,de,he,"≁","\\nsim",!0);B(q,de,he,"","\\@nshortmid");B(q,de,he,"∤","\\nmid",!0);B(q,de,he,"⊬","\\nvdash",!0);B(q,de,he,"⊭","\\nvDash",!0);B(q,de,he,"⋪","\\ntriangleleft");B(q,de,he,"⋬","\\ntrianglelefteq",!0);B(q,de,he,"⊊","\\subsetneq",!0);B(q,de,he,"","\\@varsubsetneq");B(q,de,he,"⫋","\\subsetneqq",!0);B(q,de,he,"","\\@varsubsetneqq");B(q,de,he,"≯","\\ngtr",!0);B(q,de,he,"","\\@ngeqslant");B(q,de,he,"","\\@ngeqq");B(q,de,he,"⪈","\\gneq",!0);B(q,de,he,"≩","\\gneqq",!0);B(q,de,he,"","\\@gvertneqq");B(q,de,he,"⋧","\\gnsim",!0);B(q,de,he,"⪊","\\gnapprox",!0);B(q,de,he,"⊁","\\nsucc",!0);B(q,de,he,"⋡","\\nsucceq",!0);B(q,de,he,"⋩","\\succnsim",!0);B(q,de,he,"⪺","\\succnapprox",!0);B(q,de,he,"≆","\\ncong",!0);B(q,de,he,"","\\@nshortparallel");B(q,de,he,"∦","\\nparallel",!0);B(q,de,he,"⊯","\\nVDash",!0);B(q,de,he,"⋫","\\ntriangleright");B(q,de,he,"⋭","\\ntrianglerighteq",!0);B(q,de,he,"","\\@nsupseteqq");B(q,de,he,"⊋","\\supsetneq",!0);B(q,de,he,"","\\@varsupsetneq");B(q,de,he,"⫌","\\supsetneqq",!0);B(q,de,he,"","\\@varsupsetneqq");B(q,de,he,"⊮","\\nVdash",!0);B(q,de,he,"⪵","\\precneqq",!0);B(q,de,he,"⪶","\\succneqq",!0);B(q,de,he,"","\\@nsubseteqq");B(q,de,bt,"⊴","\\unlhd");B(q,de,bt,"⊵","\\unrhd");B(q,de,he,"↚","\\nleftarrow",!0);B(q,de,he,"↛","\\nrightarrow",!0);B(q,de,he,"⇍","\\nLeftarrow",!0);B(q,de,he,"⇏","\\nRightarrow",!0);B(q,de,he,"↮","\\nleftrightarrow",!0);B(q,de,he,"⇎","\\nLeftrightarrow",!0);B(q,de,he,"△","\\vartriangle");B(q,de,ye,"ℏ","\\hslash");B(q,de,ye,"▽","\\triangledown");B(q,de,ye,"◊","\\lozenge");B(q,de,ye,"Ⓢ","\\circledS");B(q,de,ye,"®","\\circledR");B(Ke,de,ye,"®","\\circledR");B(q,de,ye,"∡","\\measuredangle",!0);B(q,de,ye,"∄","\\nexists");B(q,de,ye,"℧","\\mho");B(q,de,ye,"Ⅎ","\\Finv",!0);B(q,de,ye,"⅁","\\Game",!0);B(q,de,ye,"‵","\\backprime");B(q,de,ye,"▲","\\blacktriangle");B(q,de,ye,"▼","\\blacktriangledown");B(q,de,ye,"■","\\blacksquare");B(q,de,ye,"⧫","\\blacklozenge");B(q,de,ye,"★","\\bigstar");B(q,de,ye,"∢","\\sphericalangle",!0);B(q,de,ye,"∁","\\complement",!0);B(q,de,ye,"ð","\\eth",!0);B(Ke,H,ye,"ð","ð");B(q,de,ye,"╱","\\diagup");B(q,de,ye,"╲","\\diagdown");B(q,de,ye,"□","\\square");B(q,de,ye,"□","\\Box");B(q,de,ye,"◊","\\Diamond");B(q,de,ye,"¥","\\yen",!0);B(Ke,de,ye,"¥","\\yen",!0);B(q,de,ye,"✓","\\checkmark",!0);B(Ke,de,ye,"✓","\\checkmark");B(q,de,ye,"ℶ","\\beth",!0);B(q,de,ye,"ℸ","\\daleth",!0);B(q,de,ye,"ℷ","\\gimel",!0);B(q,de,ye,"ϝ","\\digamma",!0);B(q,de,ye,"ϰ","\\varkappa");B(q,de,fs,"┌","\\@ulcorner",!0);B(q,de,Ri,"┐","\\@urcorner",!0);B(q,de,fs,"└","\\@llcorner",!0);B(q,de,Ri,"┘","\\@lrcorner",!0);B(q,de,he,"≦","\\leqq",!0);B(q,de,he,"⩽","\\leqslant",!0);B(q,de,he,"⪕","\\eqslantless",!0);B(q,de,he,"≲","\\lesssim",!0);B(q,de,he,"⪅","\\lessapprox",!0);B(q,de,he,"≊","\\approxeq",!0);B(q,de,bt,"⋖","\\lessdot");B(q,de,he,"⋘","\\lll",!0);B(q,de,he,"≶","\\lessgtr",!0);B(q,de,he,"⋚","\\lesseqgtr",!0);B(q,de,he,"⪋","\\lesseqqgtr",!0);B(q,de,he,"≑","\\doteqdot");B(q,de,he,"≓","\\risingdotseq",!0);B(q,de,he,"≒","\\fallingdotseq",!0);B(q,de,he,"∽","\\backsim",!0);B(q,de,he,"⋍","\\backsimeq",!0);B(q,de,he,"⫅","\\subseteqq",!0);B(q,de,he,"⋐","\\Subset",!0);B(q,de,he,"⊏","\\sqsubset",!0);B(q,de,he,"≼","\\preccurlyeq",!0);B(q,de,he,"⋞","\\curlyeqprec",!0);B(q,de,he,"≾","\\precsim",!0);B(q,de,he,"⪷","\\precapprox",!0);B(q,de,he,"⊲","\\vartriangleleft");B(q,de,he,"⊴","\\trianglelefteq");B(q,de,he,"⊨","\\vDash",!0);B(q,de,he,"⊪","\\Vvdash",!0);B(q,de,he,"⌣","\\smallsmile");B(q,de,he,"⌢","\\smallfrown");B(q,de,he,"≏","\\bumpeq",!0);B(q,de,he,"≎","\\Bumpeq",!0);B(q,de,he,"≧","\\geqq",!0);B(q,de,he,"⩾","\\geqslant",!0);B(q,de,he,"⪖","\\eqslantgtr",!0);B(q,de,he,"≳","\\gtrsim",!0);B(q,de,he,"⪆","\\gtrapprox",!0);B(q,de,bt,"⋗","\\gtrdot");B(q,de,he,"⋙","\\ggg",!0);B(q,de,he,"≷","\\gtrless",!0);B(q,de,he,"⋛","\\gtreqless",!0);B(q,de,he,"⪌","\\gtreqqless",!0);B(q,de,he,"≖","\\eqcirc",!0);B(q,de,he,"≗","\\circeq",!0);B(q,de,he,"≜","\\triangleq",!0);B(q,de,he,"∼","\\thicksim");B(q,de,he,"≈","\\thickapprox");B(q,de,he,"⫆","\\supseteqq",!0);B(q,de,he,"⋑","\\Supset",!0);B(q,de,he,"⊐","\\sqsupset",!0);B(q,de,he,"≽","\\succcurlyeq",!0);B(q,de,he,"⋟","\\curlyeqsucc",!0);B(q,de,he,"≿","\\succsim",!0);B(q,de,he,"⪸","\\succapprox",!0);B(q,de,he,"⊳","\\vartriangleright");B(q,de,he,"⊵","\\trianglerighteq");B(q,de,he,"⊩","\\Vdash",!0);B(q,de,he,"∣","\\shortmid");B(q,de,he,"∥","\\shortparallel");B(q,de,he,"≬","\\between",!0);B(q,de,he,"⋔","\\pitchfork",!0);B(q,de,he,"∝","\\varpropto");B(q,de,he,"◀","\\blacktriangleleft");B(q,de,he,"∴","\\therefore",!0);B(q,de,he,"∍","\\backepsilon");B(q,de,he,"▶","\\blacktriangleright");B(q,de,he,"∵","\\because",!0);B(q,de,he,"⋘","\\llless");B(q,de,he,"⋙","\\gggtr");B(q,de,bt,"⊲","\\lhd");B(q,de,bt,"⊳","\\rhd");B(q,de,he,"≂","\\eqsim",!0);B(q,H,he,"⋈","\\Join");B(q,de,he,"≑","\\Doteq",!0);B(q,de,bt,"∔","\\dotplus",!0);B(q,de,bt,"∖","\\smallsetminus");B(q,de,bt,"⋒","\\Cap",!0);B(q,de,bt,"⋓","\\Cup",!0);B(q,de,bt,"⩞","\\doublebarwedge",!0);B(q,de,bt,"⊟","\\boxminus",!0);B(q,de,bt,"⊞","\\boxplus",!0);B(q,de,bt,"⋇","\\divideontimes",!0);B(q,de,bt,"⋉","\\ltimes",!0);B(q,de,bt,"⋊","\\rtimes",!0);B(q,de,bt,"⋋","\\leftthreetimes",!0);B(q,de,bt,"⋌","\\rightthreetimes",!0);B(q,de,bt,"⋏","\\curlywedge",!0);B(q,de,bt,"⋎","\\curlyvee",!0);B(q,de,bt,"⊝","\\circleddash",!0);B(q,de,bt,"⊛","\\circledast",!0);B(q,de,bt,"⋅","\\centerdot");B(q,de,bt,"⊺","\\intercal",!0);B(q,de,bt,"⋒","\\doublecap");B(q,de,bt,"⋓","\\doublecup");B(q,de,bt,"⊠","\\boxtimes",!0);B(q,de,he,"⇢","\\dashrightarrow",!0);B(q,de,he,"⇠","\\dashleftarrow",!0);B(q,de,he,"⇇","\\leftleftarrows",!0);B(q,de,he,"⇆","\\leftrightarrows",!0);B(q,de,he,"⇚","\\Lleftarrow",!0);B(q,de,he,"↞","\\twoheadleftarrow",!0);B(q,de,he,"↢","\\leftarrowtail",!0);B(q,de,he,"↫","\\looparrowleft",!0);B(q,de,he,"⇋","\\leftrightharpoons",!0);B(q,de,he,"↶","\\curvearrowleft",!0);B(q,de,he,"↺","\\circlearrowleft",!0);B(q,de,he,"↰","\\Lsh",!0);B(q,de,he,"⇈","\\upuparrows",!0);B(q,de,he,"↿","\\upharpoonleft",!0);B(q,de,he,"⇃","\\downharpoonleft",!0);B(q,H,he,"⊶","\\origof",!0);B(q,H,he,"⊷","\\imageof",!0);B(q,de,he,"⊸","\\multimap",!0);B(q,de,he,"↭","\\leftrightsquigarrow",!0);B(q,de,he,"⇉","\\rightrightarrows",!0);B(q,de,he,"⇄","\\rightleftarrows",!0);B(q,de,he,"↠","\\twoheadrightarrow",!0);B(q,de,he,"↣","\\rightarrowtail",!0);B(q,de,he,"↬","\\looparrowright",!0);B(q,de,he,"↷","\\curvearrowright",!0);B(q,de,he,"↻","\\circlearrowright",!0);B(q,de,he,"↱","\\Rsh",!0);B(q,de,he,"⇊","\\downdownarrows",!0);B(q,de,he,"↾","\\upharpoonright",!0);B(q,de,he,"⇂","\\downharpoonright",!0);B(q,de,he,"⇝","\\rightsquigarrow",!0);B(q,de,he,"⇝","\\leadsto");B(q,de,he,"⇛","\\Rrightarrow",!0);B(q,de,he,"↾","\\restriction");B(q,H,ye,"‘","`");B(q,H,ye,"$","\\$");B(Ke,H,ye,"$","\\$");B(Ke,H,ye,"$","\\textdollar");B(q,H,ye,"%","\\%");B(Ke,H,ye,"%","\\%");B(q,H,ye,"_","\\_");B(Ke,H,ye,"_","\\_");B(Ke,H,ye,"_","\\textunderscore");B(q,H,ye,"∠","\\angle",!0);B(q,H,ye,"∞","\\infty",!0);B(q,H,ye,"′","\\prime");B(q,H,ye,"△","\\triangle");B(q,H,ye,"Γ","\\Gamma",!0);B(q,H,ye,"Δ","\\Delta",!0);B(q,H,ye,"Θ","\\Theta",!0);B(q,H,ye,"Λ","\\Lambda",!0);B(q,H,ye,"Ξ","\\Xi",!0);B(q,H,ye,"Π","\\Pi",!0);B(q,H,ye,"Σ","\\Sigma",!0);B(q,H,ye,"Υ","\\Upsilon",!0);B(q,H,ye,"Φ","\\Phi",!0);B(q,H,ye,"Ψ","\\Psi",!0);B(q,H,ye,"Ω","\\Omega",!0);B(q,H,ye,"A","Α");B(q,H,ye,"B","Β");B(q,H,ye,"E","Ε");B(q,H,ye,"Z","Ζ");B(q,H,ye,"H","Η");B(q,H,ye,"I","Ι");B(q,H,ye,"K","Κ");B(q,H,ye,"M","Μ");B(q,H,ye,"N","Ν");B(q,H,ye,"O","Ο");B(q,H,ye,"P","Ρ");B(q,H,ye,"T","Τ");B(q,H,ye,"X","Χ");B(q,H,ye,"¬","\\neg",!0);B(q,H,ye,"¬","\\lnot");B(q,H,ye,"⊤","\\top");B(q,H,ye,"⊥","\\bot");B(q,H,ye,"∅","\\emptyset");B(q,de,ye,"∅","\\varnothing");B(q,H,qt,"α","\\alpha",!0);B(q,H,qt,"β","\\beta",!0);B(q,H,qt,"γ","\\gamma",!0);B(q,H,qt,"δ","\\delta",!0);B(q,H,qt,"ϵ","\\epsilon",!0);B(q,H,qt,"ζ","\\zeta",!0);B(q,H,qt,"η","\\eta",!0);B(q,H,qt,"θ","\\theta",!0);B(q,H,qt,"ι","\\iota",!0);B(q,H,qt,"κ","\\kappa",!0);B(q,H,qt,"λ","\\lambda",!0);B(q,H,qt,"μ","\\mu",!0);B(q,H,qt,"ν","\\nu",!0);B(q,H,qt,"ξ","\\xi",!0);B(q,H,qt,"ο","\\omicron",!0);B(q,H,qt,"π","\\pi",!0);B(q,H,qt,"ρ","\\rho",!0);B(q,H,qt,"σ","\\sigma",!0);B(q,H,qt,"τ","\\tau",!0);B(q,H,qt,"υ","\\upsilon",!0);B(q,H,qt,"ϕ","\\phi",!0);B(q,H,qt,"χ","\\chi",!0);B(q,H,qt,"ψ","\\psi",!0);B(q,H,qt,"ω","\\omega",!0);B(q,H,qt,"ε","\\varepsilon",!0);B(q,H,qt,"ϑ","\\vartheta",!0);B(q,H,qt,"ϖ","\\varpi",!0);B(q,H,qt,"ϱ","\\varrho",!0);B(q,H,qt,"ς","\\varsigma",!0);B(q,H,qt,"φ","\\varphi",!0);B(q,H,bt,"∗","*",!0);B(q,H,bt,"+","+");B(q,H,bt,"−","-",!0);B(q,H,bt,"⋅","\\cdot",!0);B(q,H,bt,"∘","\\circ",!0);B(q,H,bt,"÷","\\div",!0);B(q,H,bt,"±","\\pm",!0);B(q,H,bt,"×","\\times",!0);B(q,H,bt,"∩","\\cap",!0);B(q,H,bt,"∪","\\cup",!0);B(q,H,bt,"∖","\\setminus",!0);B(q,H,bt,"∧","\\land");B(q,H,bt,"∨","\\lor");B(q,H,bt,"∧","\\wedge",!0);B(q,H,bt,"∨","\\vee",!0);B(q,H,ye,"√","\\surd");B(q,H,fs,"⟨","\\langle",!0);B(q,H,fs,"∣","\\lvert");B(q,H,fs,"∥","\\lVert");B(q,H,Ri,"?","?");B(q,H,Ri,"!","!");B(q,H,Ri,"⟩","\\rangle",!0);B(q,H,Ri,"∣","\\rvert");B(q,H,Ri,"∥","\\rVert");B(q,H,he,"=","=");B(q,H,he,":",":");B(q,H,he,"≈","\\approx",!0);B(q,H,he,"≅","\\cong",!0);B(q,H,he,"≥","\\ge");B(q,H,he,"≥","\\geq",!0);B(q,H,he,"←","\\gets");B(q,H,he,">","\\gt",!0);B(q,H,he,"∈","\\in",!0);B(q,H,he,"","\\@not");B(q,H,he,"⊂","\\subset",!0);B(q,H,he,"⊃","\\supset",!0);B(q,H,he,"⊆","\\subseteq",!0);B(q,H,he,"⊇","\\supseteq",!0);B(q,de,he,"⊈","\\nsubseteq",!0);B(q,de,he,"⊉","\\nsupseteq",!0);B(q,H,he,"⊨","\\models");B(q,H,he,"←","\\leftarrow",!0);B(q,H,he,"≤","\\le");B(q,H,he,"≤","\\leq",!0);B(q,H,he,"<","\\lt",!0);B(q,H,he,"→","\\rightarrow",!0);B(q,H,he,"→","\\to");B(q,de,he,"≱","\\ngeq",!0);B(q,de,he,"≰","\\nleq",!0);B(q,H,So," ","\\ ");B(q,H,So," ","\\space");B(q,H,So," ","\\nobreakspace");B(Ke,H,So," ","\\ ");B(Ke,H,So," "," ");B(Ke,H,So," ","\\space");B(Ke,H,So," ","\\nobreakspace");B(q,H,So,null,"\\nobreak");B(q,H,So,null,"\\allowbreak");B(q,H,Hm,",",",");B(q,H,Hm,";",";");B(q,de,bt,"⊼","\\barwedge",!0);B(q,de,bt,"⊻","\\veebar",!0);B(q,H,bt,"⊙","\\odot",!0);B(q,H,bt,"⊕","\\oplus",!0);B(q,H,bt,"⊗","\\otimes",!0);B(q,H,ye,"∂","\\partial",!0);B(q,H,bt,"⊘","\\oslash",!0);B(q,de,bt,"⊚","\\circledcirc",!0);B(q,de,bt,"⊡","\\boxdot",!0);B(q,H,bt,"△","\\bigtriangleup");B(q,H,bt,"▽","\\bigtriangledown");B(q,H,bt,"†","\\dagger");B(q,H,bt,"⋄","\\diamond");B(q,H,bt,"⋆","\\star");B(q,H,bt,"◃","\\triangleleft");B(q,H,bt,"▹","\\triangleright");B(q,H,fs,"{","\\{");B(Ke,H,ye,"{","\\{");B(Ke,H,ye,"{","\\textbraceleft");B(q,H,Ri,"}","\\}");B(Ke,H,ye,"}","\\}");B(Ke,H,ye,"}","\\textbraceright");B(q,H,fs,"{","\\lbrace");B(q,H,Ri,"}","\\rbrace");B(q,H,fs,"[","\\lbrack",!0);B(Ke,H,ye,"[","\\lbrack",!0);B(q,H,Ri,"]","\\rbrack",!0);B(Ke,H,ye,"]","\\rbrack",!0);B(q,H,fs,"(","\\lparen",!0);B(q,H,Ri,")","\\rparen",!0);B(Ke,H,ye,"<","\\textless",!0);B(Ke,H,ye,">","\\textgreater",!0);B(q,H,fs,"⌊","\\lfloor",!0);B(q,H,Ri,"⌋","\\rfloor",!0);B(q,H,fs,"⌈","\\lceil",!0);B(q,H,Ri,"⌉","\\rceil",!0);B(q,H,ye,"\\","\\backslash");B(q,H,ye,"∣","|");B(q,H,ye,"∣","\\vert");B(Ke,H,ye,"|","\\textbar",!0);B(q,H,ye,"∥","\\|");B(q,H,ye,"∥","\\Vert");B(Ke,H,ye,"∥","\\textbardbl");B(Ke,H,ye,"~","\\textasciitilde");B(Ke,H,ye,"\\","\\textbackslash");B(Ke,H,ye,"^","\\textasciicircum");B(q,H,he,"↑","\\uparrow",!0);B(q,H,he,"⇑","\\Uparrow",!0);B(q,H,he,"↓","\\downarrow",!0);B(q,H,he,"⇓","\\Downarrow",!0);B(q,H,he,"↕","\\updownarrow",!0);B(q,H,he,"⇕","\\Updownarrow",!0);B(q,H,zr,"∐","\\coprod");B(q,H,zr,"⋁","\\bigvee");B(q,H,zr,"⋀","\\bigwedge");B(q,H,zr,"⨄","\\biguplus");B(q,H,zr,"⋂","\\bigcap");B(q,H,zr,"⋃","\\bigcup");B(q,H,zr,"∫","\\int");B(q,H,zr,"∫","\\intop");B(q,H,zr,"∬","\\iint");B(q,H,zr,"∭","\\iiint");B(q,H,zr,"∏","\\prod");B(q,H,zr,"∑","\\sum");B(q,H,zr,"⨂","\\bigotimes");B(q,H,zr,"⨁","\\bigoplus");B(q,H,zr,"⨀","\\bigodot");B(q,H,zr,"∮","\\oint");B(q,H,zr,"∯","\\oiint");B(q,H,zr,"∰","\\oiiint");B(q,H,zr,"⨆","\\bigsqcup");B(q,H,zr,"∫","\\smallint");B(Ke,H,nf,"…","\\textellipsis");B(q,H,nf,"…","\\mathellipsis");B(Ke,H,nf,"…","\\ldots",!0);B(q,H,nf,"…","\\ldots",!0);B(q,H,nf,"⋯","\\@cdots",!0);B(q,H,nf,"⋱","\\ddots",!0);B(q,H,ye,"⋮","\\varvdots");B(Ke,H,ye,"⋮","\\varvdots");B(q,H,hr,"ˊ","\\acute");B(q,H,hr,"ˋ","\\grave");B(q,H,hr,"¨","\\ddot");B(q,H,hr,"~","\\tilde");B(q,H,hr,"ˉ","\\bar");B(q,H,hr,"˘","\\breve");B(q,H,hr,"ˇ","\\check");B(q,H,hr,"^","\\hat");B(q,H,hr,"⃗","\\vec");B(q,H,hr,"˙","\\dot");B(q,H,hr,"˚","\\mathring");B(q,H,qt,"","\\@imath");B(q,H,qt,"","\\@jmath");B(q,H,ye,"ı","ı");B(q,H,ye,"ȷ","ȷ");B(Ke,H,ye,"ı","\\i",!0);B(Ke,H,ye,"ȷ","\\j",!0);B(Ke,H,ye,"ß","\\ss",!0);B(Ke,H,ye,"æ","\\ae",!0);B(Ke,H,ye,"œ","\\oe",!0);B(Ke,H,ye,"ø","\\o",!0);B(Ke,H,ye,"Æ","\\AE",!0);B(Ke,H,ye,"Œ","\\OE",!0);B(Ke,H,ye,"Ø","\\O",!0);B(Ke,H,hr,"ˊ","\\'");B(Ke,H,hr,"ˋ","\\`");B(Ke,H,hr,"ˆ","\\^");B(Ke,H,hr,"˜","\\~");B(Ke,H,hr,"ˉ","\\=");B(Ke,H,hr,"˘","\\u");B(Ke,H,hr,"˙","\\.");B(Ke,H,hr,"¸","\\c");B(Ke,H,hr,"˚","\\r");B(Ke,H,hr,"ˇ","\\v");B(Ke,H,hr,"¨",'\\"');B(Ke,H,hr,"˝","\\H");B(Ke,H,hr,"◯","\\textcircled");var KI={"--":!0,"---":!0,"``":!0,"''":!0};B(Ke,H,ye,"–","--",!0);B(Ke,H,ye,"–","\\textendash");B(Ke,H,ye,"—","---",!0);B(Ke,H,ye,"—","\\textemdash");B(Ke,H,ye,"‘","`",!0);B(Ke,H,ye,"‘","\\textquoteleft");B(Ke,H,ye,"’","'",!0);B(Ke,H,ye,"’","\\textquoteright");B(Ke,H,ye,"“","``",!0);B(Ke,H,ye,"“","\\textquotedblleft");B(Ke,H,ye,"”","''",!0);B(Ke,H,ye,"”","\\textquotedblright");B(q,H,ye,"°","\\degree",!0);B(Ke,H,ye,"°","\\degree");B(Ke,H,ye,"°","\\textdegree",!0);B(q,H,ye,"£","\\pounds");B(q,H,ye,"£","\\mathsterling",!0);B(Ke,H,ye,"£","\\pounds");B(Ke,H,ye,"£","\\textsterling",!0);B(q,de,ye,"✠","\\maltese");B(Ke,de,ye,"✠","\\maltese");var b9='0123456789/@."';for(var D2=0;D20)return Js(s,u,i,n,a.concat(f));if(l){var h,m;if(l==="boldsymbol"){var g=fce(s,i,n,a,r);h=g.fontName,m=[g.fontClass]}else o?(h=JI[l].fontName,m=[l]):(h=qh(l,n.fontWeight,n.fontShape),m=[l,n.fontWeight,n.fontShape]);if(Wm(s,h,i).metrics)return Js(s,h,i,n,a.concat(m));if(KI.hasOwnProperty(s)&&h.slice(0,10)==="Typewriter"){for(var b=[],y=0;y{if(dl(e.classes)!==dl(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var n=e.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},pce=e=>{for(var t=0;tn&&(n=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}t.height=n,t.depth=r,t.maxFontSize=i},Wi=function(t,n,r,i){var s=new Um(t,n,r,i);return v3(s),s},GI=(e,t,n,r)=>new Um(e,t,n,r),mce=function(t,n,r){var i=Wi([t],[],n);return i.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),i.style.borderBottomWidth=ft(i.height),i.maxFontSize=1,i},gce=function(t,n,r,i){var s=new WI(t,n,r,i);return v3(s),s},YI=function(t){var n=new f0(t);return v3(n),n},vce=function(t,n){return t instanceof f0?Wi([],[t],n):t},yce=function(t){if(t.positionType==="individualShift"){for(var n=t.children,r=[n[0]],i=-n[0].shift-n[0].elem.depth,s=i,a=1;a{var n=Wi(["mspace"],[],t),r=br(e,t);return n.style.marginRight=ft(r),n},qh=function(t,n,r){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var s;return n==="textbf"&&r==="textit"?s="BoldItalic":n==="textbf"?s="Bold":n==="textit"?s="Italic":s="Regular",i+"-"+s},JI={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},XI={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},wce=function(t,n){var[r,i,s]=XI[t],a=new gu(r),o=new hl([a],{width:ft(i),height:ft(s),style:"width:"+ft(i),viewBox:"0 0 "+1e3*i+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=GI(["overlay"],[o],n);return l.height=s,l.style.height=ft(s),l.style.width=ft(i),l},Ne={fontMap:JI,makeSymbol:Js,mathsym:cce,makeSpan:Wi,makeSvgSpan:GI,makeLineSpan:mce,makeAnchor:gce,makeFragment:YI,wrapFragment:vce,makeVList:xce,makeOrd:dce,makeGlue:bce,staticSvg:wce,svgData:XI,tryCombineChars:pce},vr={number:3,unit:"mu"},Ul={number:4,unit:"mu"},ro={number:5,unit:"mu"},Ece={mord:{mop:vr,mbin:Ul,mrel:ro,minner:vr},mop:{mord:vr,mop:vr,mrel:ro,minner:vr},mbin:{mord:Ul,mop:Ul,mopen:Ul,minner:Ul},mrel:{mord:ro,mop:ro,mopen:ro,minner:ro},mopen:{},mclose:{mop:vr,mbin:Ul,mrel:ro,minner:vr},mpunct:{mord:vr,mop:vr,mrel:ro,mopen:vr,mclose:vr,mpunct:vr,minner:vr},minner:{mord:vr,mop:vr,mbin:Ul,mrel:ro,mopen:vr,mpunct:vr,minner:vr}},Cce={mord:{mop:vr},mop:{mord:vr,mop:vr},mbin:{},mrel:{},mopen:{},mclose:{mop:vr},mpunct:{},minner:{mop:vr}},QI={},Qp={},Zp={};function gt(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l{var E=y.classes[0],C=b.classes[0];E==="mbin"&&$t.contains(Dce,C)?y.classes[0]="mord":C==="mbin"&&$t.contains(kce,E)&&(b.classes[0]="mord")},{node:h},m,g),S9(s,(b,y)=>{var E=y4(y),C=y4(b),x=E&&C?b.hasClass("mtight")?Cce[E][C]:Ece[E][C]:null;if(x)return Ne.makeGlue(x,u)},{node:h},m,g),s},S9=function e(t,n,r,i,s){i&&t.push(i);for(var a=0;am=>{t.splice(h+1,0,m),a++})(a)}i&&t.pop()},ZI=function(t){return t instanceof f0||t instanceof WI||t instanceof Um&&t.hasClass("enclosing")?t:null},Ace=function e(t,n){var r=ZI(t);if(r){var i=r.children;if(i.length){if(n==="right")return e(i[i.length-1],"right");if(n==="left")return e(i[0],"left")}}return t},y4=function(t,n){return t?(n&&(t=Ace(t,n)),_ce[t.classes[0]]||null):null},Ld=function(t,n){var r=["nulldelimiter"].concat(t.baseSizingClasses());return Ic(n.concat(r))},Tn=function(t,n,r){if(!t)return Ic();if(Qp[t.type]){var i=Qp[t.type](t,n);if(r&&n.size!==r.size){i=Ic(n.sizingClasses(r),[i],n);var s=n.sizeMultiplier/r.sizeMultiplier;i.height*=s,i.depth*=s}return i}else throw new Ft("Got group of unknown type: '"+t.type+"'")};function eM(e){return new f0(e)}class ks{constructor(t,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(t,n){this.attributes[t]=n}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&t.setAttribute(n,this.attributes[n]);this.classes.length>0&&(t.className=dl(this.classes));for(var r=0;r0&&(t+=' class ="'+$t.escape(dl(this.classes))+'"'),t+=">";for(var r=0;r",t}toText(){return this.children.map(t=>t.toText()).join("")}}class _a{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return $t.escape(this.toText())}toText(){return this.text}}class Tce{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",ft(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var et={MathNode:ks,TextNode:_a,SpaceNode:Tce,newDocumentFragment:eM},Os=function(t,n,r){return Br[n][t]&&Br[n][t].replace&&t.charCodeAt(0)!==55349&&!(KI.hasOwnProperty(t)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(t=Br[n][t].replace),new et.TextNode(t)},y3=function(t){return t.length===1?t[0]:new et.MathNode("mrow",t)},x3=function(t,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var i=t.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var s=t.text;if($t.contains(["\\imath","\\jmath"],s))return null;Br[i][s]&&Br[i][s].replace&&(s=Br[i][s].replace);var a=Ne.fontMap[r].fontName;return g3(s,a,i)?Ne.fontMap[r].variant:null};function T2(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof _a&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var n=e.children[0];return n instanceof _a&&n.text===","}else return!1}var ds=function(t,n,r){if(t.length===1){var i=Jn(t[0],n);return r&&i instanceof ks&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var s=[],a,o=0;o=1&&(a.type==="mn"||T2(a))){var u=l.children[0];u instanceof ks&&u.type==="mn"&&(u.children=[...a.children,...u.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var f=a.children[0];if(f instanceof _a&&f.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof _a&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),s.pop())}}}s.push(l),a=l}return s},pl=function(t,n,r){return y3(ds(t,n,r))},Jn=function(t,n){if(!t)return new et.MathNode("mrow");if(Zp[t.type]){var r=Zp[t.type](t,n);return r}else throw new Ft("Got group of unknown type: '"+t.type+"'")},Nce={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Oce=function(t){var n=new et.MathNode("mo",[new et.TextNode(Nce[t.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},Bce={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Pce=function(t){return t.type==="ordgroup"?t.body.length:1},Rce=function(t,n){function r(){var o=4e5,l=t.label.slice(1);if($t.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=t,f=Pce(u.base),h,m,g;if(f>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,g=.42,m=l+"4"):(h=312,o=2340,g=.34,m="tilde4");else{var b=[1,1,2,2,3,3][f];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],g=[0,.24,.3,.3,.36,.42][b],m=l+b):(o=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],g=[0,.26,.286,.3,.306,.34][b],m="tilde"+b)}var y=new gu(m),E=new hl([y],{width:"100%",height:ft(g),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Ne.makeSvgSpan([],[E],n),minWidth:0,height:g}}else{var C=[],x=Bce[l],[S,O,_]=x,w=_/1e3,T=S.length,A,P;if(T===1){var I=x[3];A=["hide-tail"],P=[I]}else if(T===2)A=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(T===3)A=["brace-left","brace-center","brace-right"],P=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+T+" children.");for(var F=0;F0&&(i.style.minWidth=ft(s)),i},Fce=function(t,n,r,i,s){var a,o=t.height+t.depth+r+i;if(/fbox|color|angl/.test(n)){if(a=Ne.makeSpan(["stretchy",n],[],s),n==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(n)&&u.push(new y9({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&u.push(new y9({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var f=new hl(u,{width:"100%",height:ft(o)});a=Ne.makeSvgSpan([],[f],s)}return a.height=o,a.style.height=ft(o),a},wo={encloseSpan:Fce,mathMLnode:Oce,svgSpan:Rce};function un(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function b3(e){var t=Km(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Km(e){return e&&(e.type==="atom"||lce.hasOwnProperty(e.type))?e:null}var w3=(e,t)=>{var n,r,i;e&&e.type==="supsub"?(r=un(e.base,"accent"),n=r.base,e.base=n,i=oce(Tn(e,t)),e.base=r):(r=un(e,"accent"),n=r.base);var s=Tn(n,t.havingCrampedStyle()),a=r.isShifty&&$t.isCharacterBox(n),o=0;if(a){var l=$t.getBaseElem(n),u=Tn(l,t.havingCrampedStyle());o=x9(u).skew}var f=r.label==="\\c",h=f?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight),m;if(r.isStretchy)m=wo.svgSpan(r,t),m=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ft(2*o)+")",marginLeft:ft(2*o)}:void 0}]});else{var g,b;r.label==="\\vec"?(g=Ne.staticSvg("vec",t),b=Ne.svgData.vec[1]):(g=Ne.makeOrd({mode:r.mode,text:r.label},t,"textord"),g=x9(g),g.italic=0,b=g.width,f&&(h+=g.depth)),m=Ne.makeSpan(["accent-body"],[g]);var y=r.label==="\\textcircled";y&&(m.classes.push("accent-full"),h=s.height);var E=o;y||(E-=b/2),m.style.left=ft(E),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-h},{type:"elem",elem:m}]})}var C=Ne.makeSpan(["mord","accent"],[m],t);return i?(i.children[0]=C,i.height=Math.max(C.height,i.height),i.classes[0]="mord",i):C},tM=(e,t)=>{var n=e.isStretchy?wo.mathMLnode(e.label):new et.MathNode("mo",[Os(e.label,e.mode)]),r=new et.MathNode("mover",[Jn(e.base,t),n]);return r.setAttribute("accent","true"),r},Ice=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=em(t[0]),r=!Ice.test(e.funcName),i=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:w3,mathmlBuilder:tM});gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:w3,mathmlBuilder:tM});gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Tn(e.base,t),r=wo.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,s=Ne.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:n}]});return Ne.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{var n=wo.mathMLnode(e.label),r=new et.MathNode("munder",[Jn(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var $h=e=>{var t=new et.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:"xArrow",mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Ne.wrapFragment(Tn(e.body,r,t),t),s=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(s+"-arrow-pad");var a;e.below&&(r=t.havingStyle(n.sub()),a=Ne.wrapFragment(Tn(e.below,r,t),t),a.classes.push(s+"-arrow-pad"));var o=wo.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*o.height,u=-t.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var f;if(a){var h=-t.fontMetrics().axisHeight+a.height+.5*o.height+.111;f=Ne.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l},{type:"elem",elem:a,shift:h}]})}else f=Ne.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:o,shift:l}]});return f.children[0].children[0].children[1].classes.push("svg-align"),Ne.makeSpan(["mrel","x-arrow"],[f],t)},mathmlBuilder(e,t){var n=wo.mathMLnode(e.label);n.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var i=$h(Jn(e.body,t));if(e.below){var s=$h(Jn(e.below,t));r=new et.MathNode("munderover",[n,s,i])}else r=new et.MathNode("mover",[n,i])}else if(e.below){var a=$h(Jn(e.below,t));r=new et.MathNode("munder",[n,a])}else r=$h(),r=new et.MathNode("mover",[n,r]);return r}});var Mce=Ne.makeSpan;function nM(e,t){var n=di(e.body,t,!0);return Mce([e.mclass],n,t)}function rM(e,t){var n,r=ds(e.body,t);return e.mclass==="minner"?n=new et.MathNode("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(n=r[0],n.type="mi"):n=new et.MathNode("mi",r):(e.isCharacterBox?(n=r[0],n.type="mo"):n=new et.MathNode("mo",r),e.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):e.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):e.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Or(i),isCharacterBox:$t.isCharacterBox(i)}},htmlBuilder:nM,mathmlBuilder:rM});var Gm=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Gm(t[0]),body:Or(t[1]),isCharacterBox:$t.isCharacterBox(t[1])}}});gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],s=t[0],a;r!=="\\stackrel"?a=Gm(i):a="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Or(i)},l={type:"supsub",mode:s.mode,base:o,sup:r==="\\underset"?null:s,sub:r==="\\underset"?s:null};return{type:"mclass",mode:n.mode,mclass:a,body:[l],isCharacterBox:$t.isCharacterBox(l)}},htmlBuilder:nM,mathmlBuilder:rM});gt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Gm(t[0]),body:Or(t[0])}},htmlBuilder(e,t){var n=di(e.body,t,!0),r=Ne.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=ds(e.body,t),r=new et.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Lce={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},_9=()=>({type:"styling",body:[],mode:"math",style:"display"}),A9=e=>e.type==="textord"&&e.text==="@",zce=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function jce(e,t,n){var r=Lce[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=n.callFunction("\\\\cdleft",[t[0]],[]),s={type:"atom",text:r,mode:"math",family:"rel"},a=n.callFunction("\\Big",[s],[]),o=n.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[i,a,o]};return n.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function qce(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n==="&"||n==="\\\\")e.consume();else if(n==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Ft("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],i=[r],s=0;s-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var m=!0,g=l+1;gAV=|." after @',a[l]);var b=jce(u,f,e),y={type:"styling",body:[b],mode:"math",style:"display"};r.push(y),o=_9()}s%2===0?r.push(o):r.shift(),r=[],i.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var E=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:E,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}gt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ne.wrapFragment(Tn(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=ft(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new et.MathNode("mrow",[Jn(e.label,t)]);return n=new et.MathNode("mpadded",[n]),n.setAttribute("width","0"),e.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new et.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});gt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ne.wrapFragment(Tn(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(e,t){return new et.MathNode("mrow",[Jn(e.fragment,t)])}});gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=un(t[0],"ordgroup"),i=r.body,s="",a=0;a=1114111)throw new Ft("\\@char with invalid code point "+s);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:n.mode,text:u}}});var iM=(e,t)=>{var n=di(e.body,t.withColor(e.color),!1);return Ne.makeFragment(n)},sM=(e,t)=>{var n=ds(e.body,t.withColor(e.color)),r=new et.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=un(t[0],"color-token").color,i=t[1];return{type:"color",mode:n.mode,color:r,body:Or(i)}},htmlBuilder:iM,mathmlBuilder:sM});gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=un(t[0],"color-token").color;n.gullet.macros.set("\\current@color",i);var s=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:i,body:s}},htmlBuilder:iM,mathmlBuilder:sM});gt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,s=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:s,size:i&&un(i,"size").value}},htmlBuilder(e,t){var n=Ne.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=ft(br(e.size,t)))),n},mathmlBuilder(e,t){var n=new et.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",ft(br(e.size,t)))),n}});var x4={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},aM=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Ft("Expected a control sequence",e);return t},$ce=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},oM=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i==null&&(n.noexpand=!0,i={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};gt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(x4[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=x4[r.text]),un(t.parseFunction(),"internal");throw new Ft("Invalid token after macro prefix",r)}});gt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Ft("Expected a control sequence",r);for(var s=0,a,o=[[]];t.gullet.future().text!=="{";)if(r=t.gullet.popToken(),r.text==="#"){if(t.gullet.future().text==="{"){a=t.gullet.future(),o[s].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Ft('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==s+1)throw new Ft('Argument number "'+r.text+'" out of order');s++,o.push([])}else{if(r.text==="EOF")throw new Ft("Expected a macro definition");o[s].push(r.text)}var{tokens:l}=t.gullet.consumeArg();return a&&l.unshift(a),(n==="\\edef"||n==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:s,delimiters:o},n===x4[n]),{type:"internal",mode:t.mode}}});gt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=aM(t.gullet.popToken());t.gullet.consumeSpaces();var i=$ce(t);return oM(t,r,i,n==="\\\\globallet"),{type:"internal",mode:t.mode}}});gt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=aM(t.gullet.popToken()),i=t.gullet.popToken(),s=t.gullet.popToken();return oM(t,r,s,n==="\\\\globalfuture"),t.gullet.pushToken(s),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var td=function(t,n,r){var i=Br.math[t]&&Br.math[t].replace,s=g3(i||t,n,r);if(!s)throw new Error("Unsupported symbol "+t+" and font size "+n+".");return s},E3=function(t,n,r,i){var s=r.havingBaseStyle(n),a=Ne.makeSpan(i.concat(s.sizingClasses(r)),[t],r),o=s.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},lM=function(t,n,r){var i=n.havingBaseStyle(r),s=(1-n.sizeMultiplier/i.sizeMultiplier)*n.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=ft(s),t.height-=s,t.depth+=s},Vce=function(t,n,r,i,s,a){var o=Ne.makeSymbol(t,"Main-Regular",s,i),l=E3(o,n,i,a);return r&&lM(l,i,n),l},Uce=function(t,n,r,i){return Ne.makeSymbol(t,"Size"+n+"-Regular",r,i)},uM=function(t,n,r,i,s,a){var o=Uce(t,n,s,i),l=E3(Ne.makeSpan(["delimsizing","size"+n],[o],i),Wt.TEXT,i,a);return r&&lM(l,i,Wt.TEXT),l},N2=function(t,n,r){var i;n==="Size1-Regular"?i="delim-size1":i="delim-size4";var s=Ne.makeSpan(["delimsizinginner",i],[Ne.makeSpan([],[Ne.makeSymbol(t,n,r)])]);return{type:"elem",elem:s}},O2=function(t,n,r){var i=oo["Size4-Regular"][t.charCodeAt(0)]?oo["Size4-Regular"][t.charCodeAt(0)][4]:oo["Size1-Regular"][t.charCodeAt(0)][4],s=new gu("inner",ece(t,Math.round(1e3*n))),a=new hl([s],{width:ft(i),height:ft(n),style:"width:"+ft(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),o=Ne.makeSvgSpan([],[a],r);return o.height=n,o.style.height=ft(n),o.style.width=ft(i),{type:"elem",elem:o}},b4=.008,Vh={type:"kern",size:-1*b4},Hce=["|","\\lvert","\\rvert","\\vert"],Wce=["\\|","\\lVert","\\rVert","\\Vert"],cM=function(t,n,r,i,s,a){var o,l,u,f,h="",m=0;o=u=f=t,l=null;var g="Size1-Regular";t==="\\uparrow"?u=f="⏐":t==="\\Uparrow"?u=f="‖":t==="\\downarrow"?o=u="⏐":t==="\\Downarrow"?o=u="‖":t==="\\updownarrow"?(o="\\uparrow",u="⏐",f="\\downarrow"):t==="\\Updownarrow"?(o="\\Uparrow",u="‖",f="\\Downarrow"):$t.contains(Hce,t)?(u="∣",h="vert",m=333):$t.contains(Wce,t)?(u="∥",h="doublevert",m=556):t==="["||t==="\\lbrack"?(o="⎡",u="⎢",f="⎣",g="Size4-Regular",h="lbrack",m=667):t==="]"||t==="\\rbrack"?(o="⎤",u="⎥",f="⎦",g="Size4-Regular",h="rbrack",m=667):t==="\\lfloor"||t==="⌊"?(u=o="⎢",f="⎣",g="Size4-Regular",h="lfloor",m=667):t==="\\lceil"||t==="⌈"?(o="⎡",u=f="⎢",g="Size4-Regular",h="lceil",m=667):t==="\\rfloor"||t==="⌋"?(u=o="⎥",f="⎦",g="Size4-Regular",h="rfloor",m=667):t==="\\rceil"||t==="⌉"?(o="⎤",u=f="⎥",g="Size4-Regular",h="rceil",m=667):t==="("||t==="\\lparen"?(o="⎛",u="⎜",f="⎝",g="Size4-Regular",h="lparen",m=875):t===")"||t==="\\rparen"?(o="⎞",u="⎟",f="⎠",g="Size4-Regular",h="rparen",m=875):t==="\\{"||t==="\\lbrace"?(o="⎧",l="⎨",f="⎩",u="⎪",g="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(o="⎫",l="⎬",f="⎭",u="⎪",g="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(o="⎧",f="⎩",u="⎪",g="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(o="⎫",f="⎭",u="⎪",g="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(o="⎧",f="⎭",u="⎪",g="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(o="⎫",f="⎩",u="⎪",g="Size4-Regular");var b=td(o,g,s),y=b.height+b.depth,E=td(u,g,s),C=E.height+E.depth,x=td(f,g,s),S=x.height+x.depth,O=0,_=1;if(l!==null){var w=td(l,g,s);O=w.height+w.depth,_=2}var T=y+S+O,A=Math.max(0,Math.ceil((n-T)/(_*C))),P=T+A*_*C,I=i.fontMetrics().axisHeight;r&&(I*=i.sizeMultiplier);var F=P/2-I,M=[];if(h.length>0){var W=P-y-S,ee=Math.round(P*1e3),U=tce(h,Math.round(W*1e3)),fe=new gu(h,U),ue=(m/1e3).toFixed(3)+"em",ne=(ee/1e3).toFixed(3)+"em",me=new hl([fe],{width:ue,height:ne,viewBox:"0 0 "+m+" "+ee}),j=Ne.makeSvgSpan([],[me],i);j.height=ee/1e3,j.style.width=ue,j.style.height=ne,M.push({type:"elem",elem:j})}else{if(M.push(N2(f,g,s)),M.push(Vh),l===null){var Q=P-y-S+2*b4;M.push(O2(u,Q,i))}else{var re=(P-y-S-O)/2+2*b4;M.push(O2(u,re,i)),M.push(Vh),M.push(N2(l,g,s)),M.push(Vh),M.push(O2(u,re,i))}M.push(Vh),M.push(N2(o,g,s))}var K=i.havingBaseStyle(Wt.TEXT),Be=Ne.makeVList({positionType:"bottom",positionData:F,children:M});return E3(Ne.makeSpan(["delimsizing","mult"],[Be],K),Wt.TEXT,i,a)},B2=80,P2=.08,R2=function(t,n,r,i,s){var a=Zue(t,i,r),o=new gu(t,a),l=new hl([o],{width:"400em",height:ft(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ne.makeSvgSpan(["hide-tail"],[l],s)},Kce=function(t,n){var r=n.havingBaseSizing(),i=pM("\\surd",t*r.sizeMultiplier,hM,r),s=r.sizeMultiplier,a=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),o,l=0,u=0,f=0,h;return i.type==="small"?(f=1e3+1e3*a+B2,t<1?s=1:t<1.4&&(s=.7),l=(1+a+P2)/s,u=(1+a)/s,o=R2("sqrtMain",l,f,a,n),o.style.minWidth="0.853em",h=.833/s):i.type==="large"?(f=(1e3+B2)*pd[i.size],u=(pd[i.size]+a)/s,l=(pd[i.size]+a+P2)/s,o=R2("sqrtSize"+i.size,l,f,a,n),o.style.minWidth="1.02em",h=1/s):(l=t+a+P2,u=t+a,f=Math.floor(1e3*t+a)+B2,o=R2("sqrtTall",l,f,a,n),o.style.minWidth="0.742em",h=1.056),o.height=u,o.style.height=ft(l),{span:o,advanceWidth:h,ruleWidth:(n.fontMetrics().sqrtRuleThickness+a)*s}},fM=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Gce=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],dM=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],pd=[0,1.2,1.8,2.4,3],Yce=function(t,n,r,i,s){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),$t.contains(fM,t)||$t.contains(dM,t))return uM(t,n,!1,r,i,s);if($t.contains(Gce,t))return cM(t,pd[n],!1,r,i,s);throw new Ft("Illegal delimiter: '"+t+"'")},Jce=[{type:"small",style:Wt.SCRIPTSCRIPT},{type:"small",style:Wt.SCRIPT},{type:"small",style:Wt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Xce=[{type:"small",style:Wt.SCRIPTSCRIPT},{type:"small",style:Wt.SCRIPT},{type:"small",style:Wt.TEXT},{type:"stack"}],hM=[{type:"small",style:Wt.SCRIPTSCRIPT},{type:"small",style:Wt.SCRIPT},{type:"small",style:Wt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Qce=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},pM=function(t,n,r,i){for(var s=Math.min(2,3-i.style.size),a=s;an)return r[a]}return r[r.length-1]},mM=function(t,n,r,i,s,a){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var o;$t.contains(dM,t)?o=Jce:$t.contains(fM,t)?o=hM:o=Xce;var l=pM(t,n,o,i);return l.type==="small"?Vce(t,l.style,r,i,s,a):l.type==="large"?uM(t,l.size,r,i,s,a):cM(t,n,r,i,s,a)},Zce=function(t,n,r,i,s,a){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,u=5/i.fontMetrics().ptPerEm,f=Math.max(n-o,r+o),h=Math.max(f/500*l,2*f-u);return mM(t,h,!0,i,s,a)},go={sqrtImage:Kce,sizedDelim:Yce,sizeToMaxHeight:pd,customSizedDelim:mM,leftRightDelim:Zce},T9={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},efe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ym(e,t){var n=Km(e);if(n&&$t.contains(efe,n.text))return n;throw n?new Ft("Invalid delimiter '"+n.text+"' after '"+t.funcName+"'",e):new Ft("Invalid delimiter type '"+e.type+"'",e)}gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=Ym(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:T9[e.funcName].size,mclass:T9[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim==="."?Ne.makeSpan([e.mclass]):go.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Os(e.delim,e.mode));var n=new et.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=ft(go.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function N9(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}gt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Ft("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ym(t[0],e).text,color:n}}});gt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Ym(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var s=un(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:i,left:n.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{N9(e);for(var n=di(e.body,t,!0,["mopen","mclose"]),r=0,i=0,s=!1,a=0;a{N9(e);var n=ds(e.body,t);if(e.left!=="."){var r=new et.MathNode("mo",[Os(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(e.right!=="."){var i=new et.MathNode("mo",[Os(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),n.push(i)}return y3(n)}});gt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Ym(t[0],e);if(!e.parser.leftrightDepth)throw new Ft("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if(e.delim===".")n=Ld(t,[]);else{n=go.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n=e.delim==="\\vert"||e.delim==="|"?Os("|","text"):Os(e.delim,e.mode),r=new et.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var C3=(e,t)=>{var n=Ne.wrapFragment(Tn(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,s,a=0,o=$t.isCharacterBox(e.body);if(r==="sout")s=Ne.makeSpan(["stretchy","sout"]),s.height=t.fontMetrics().defaultRuleThickness/i,a=-.5*t.fontMetrics().xHeight;else if(r==="phase"){var l=br({number:.6,unit:"pt"},t),u=br({number:.35,unit:"ex"},t),f=t.havingBaseSizing();i=i/f.sizeMultiplier;var h=n.height+n.depth+l+u;n.style.paddingLeft=ft(h/2+l);var m=Math.floor(1e3*h*i),g=Xue(m),b=new hl([new gu("phase",g)],{width:"400em",height:ft(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});s=Ne.makeSvgSpan(["hide-tail"],[b],t),s.style.height=ft(h),a=n.depth+l+u}else{/cancel/.test(r)?o||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var y=0,E=0,C=0;/box/.test(r)?(C=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=t.fontMetrics().fboxsep+(r==="colorbox"?0:C),E=y):r==="angl"?(C=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),y=4*C,E=Math.max(0,.25-n.depth)):(y=o?.2:0,E=y),s=wo.encloseSpan(n,r,y,E,t),/fbox|boxed|fcolorbox/.test(r)?(s.style.borderStyle="solid",s.style.borderWidth=ft(C)):r==="angl"&&C!==.049&&(s.style.borderTopWidth=ft(C),s.style.borderRightWidth=ft(C)),a=n.depth+E,e.backgroundColor&&(s.style.backgroundColor=e.backgroundColor,e.borderColor&&(s.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=Ne.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:n,shift:0}]});else{var S=/cancel|phase/.test(r)?["svg-align"]:[];x=Ne.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:S}]})}return/cancel/.test(r)&&(x.height=n.height,x.depth=n.depth),/cancel/.test(r)&&!o?Ne.makeSpan(["mord","cancel-lap"],[x],t):Ne.makeSpan(["mord"],[x],t)},k3=(e,t)=>{var n=0,r=new et.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Jn(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=un(t[0],"color-token").color,a=t[1];return{type:"enclose",mode:r.mode,label:i,backgroundColor:s,body:a}},htmlBuilder:C3,mathmlBuilder:k3});gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:i}=e,s=un(t[0],"color-token").color,a=un(t[1],"color-token").color,o=t[2];return{type:"enclose",mode:r.mode,label:i,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:C3,mathmlBuilder:k3});gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}});gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"enclose",mode:n.mode,label:r,body:i}},htmlBuilder:C3,mathmlBuilder:k3});gt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var gM={};function Ma(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:s,mathmlBuilder:a}=e,o={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new Ft("{"+e.envName+"} can be used only in display mode.")};function D3(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function gl(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:f,maxNumCols:h,leqno:m}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)a=1;else if(a=parseFloat(g),!a||a<0)throw new Ft("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var b=[],y=[b],E=[],C=[],x=l!=null?[]:void 0;function S(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function O(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new _ue("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(S(),C.push(O9(e));;){var _=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),_={type:"ordgroup",mode:e.mode,body:_},n&&(_={type:"styling",mode:e.mode,style:n,body:[_]}),b.push(_);var w=e.fetch().text;if(w==="&"){if(h&&b.length===h){if(u||o)throw new Ft("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(w==="\\end"){O(),b.length===1&&_.type==="styling"&&_.body[0].body.length===0&&(y.length>1||!f)&&y.pop(),C.length0&&(S+=.25),u.push({pos:S,isDashed:tt[rt]})}for(O(a[0]),r=0;r0&&(F+=x,Ttt))for(r=0;r=o)){var je=void 0;(i>0||t.hskipBeforeAndAfter)&&(je=$t.deflt(re.pregap,m),je!==0&&(U=Ne.makeSpan(["arraycolsep"],[]),U.style.width=ft(je),ee.push(U)));var Fe=[];for(r=0;r0){for(var se=Ne.makeLineSpan("hline",n,f),we=Ne.makeLineSpan("hdashline",n,f),_e=[{type:"elem",elem:l,shift:0}];u.length>0;){var Ee=u.pop(),qe=Ee.pos-M;Ee.isDashed?_e.push({type:"elem",elem:we,shift:qe}):_e.push({type:"elem",elem:se,shift:qe})}l=Ne.makeVList({positionType:"individualShift",children:_e})}if(ue.length===0)return Ne.makeSpan(["mord"],[l],n);var Ue=Ne.makeVList({positionType:"individualShift",children:ue});return Ue=Ne.makeSpan(["tag"],[Ue],n),Ne.makeFragment([l,Ue])},nfe={c:"center ",l:"left ",r:"right "},za=function(t,n){for(var r=[],i=new et.MathNode("mtd",[],["mtr-glue"]),s=new et.MathNode("mtd",[],["mml-eqn-num"]),a=0;a0){var b=t.cols,y="",E=!1,C=0,x=b.length;b[0].type==="separator"&&(m+="top ",C=1),b[b.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var S=C;S0?"left ":"",m+=A[A.length-1].length>0?"right ":"";for(var P=1;P-1?"alignat":"align",s=t.envName==="split",a=gl(t.parser,{cols:r,addJot:!0,autoTag:s?void 0:D3(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:s?2:void 0,leqno:t.parser.settings.leqno},"display"),o,l=0,u={type:"ordgroup",mode:t.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var f="",h=0;h0&&g&&(E=1),r[b]={type:"align",align:y,pregap:E,postgap:0}}return a.colSeparationType=g?"align":"alignat",a};Ma({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=Km(t[0]),r=n?[t[0]]:un(t[0],"ordgroup").body,i=r.map(function(a){var o=b3(a),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Ft("Unknown column alignment: "+l,a)}),s={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return gl(e.parser,s,S3(e.envName))},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,"lcr".indexOf(n)===-1)throw new Ft("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),r.cols=[{type:"align",align:n}]}}var s=gl(e.parser,r,S3(e.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},n=gl(e.parser,t,"script");return n.colSeparationType="small",n},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=Km(t[0]),r=n?[t[0]]:un(t[0],"ordgroup").body,i=r.map(function(a){var o=b3(a),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Ft("Unknown column alignment: "+l,a)});if(i.length>1)throw new Ft("{subarray} can contain only one column");var s={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=gl(e.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new Ft("{subarray} can contain only one column");return s},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=gl(e.parser,t,S3(e.envName));return{type:"leftright",mode:e.mode,body:[n],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:vM,htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){$t.contains(["gather","gather*"],e.envName)&&Jm(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:D3(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return gl(e.parser,t,"display")},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:vM,htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Jm(e);var t={autoTag:D3(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return gl(e.parser,t,"display")},htmlBuilder:La,mathmlBuilder:za});Ma({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Jm(e),qce(e.parser)},htmlBuilder:La,mathmlBuilder:za});X("\\nonumber","\\gdef\\@eqnsw{0}");X("\\notag","\\nonumber");gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Ft(e.funcName+" valid only within array environment")}});var B9=gM;gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!=="ordgroup")throw new Ft("Invalid environment name",i);for(var s="",a=0;a{var n=e.font,r=t.withFont(n);return Tn(e.body,r)},xM=(e,t)=>{var n=e.font,r=t.withFont(n);return Jn(e.body,r)},P9={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=em(t[0]),s=r;return s in P9&&(s=P9[s]),{type:"font",mode:n.mode,font:s.slice(1),body:i}},htmlBuilder:yM,mathmlBuilder:xM});gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],i=$t.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Gm(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:i}}});gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:s}=n,a=n.parseExpression(!0,i),o="math"+r.slice(1);return{type:"font",mode:s,font:o,body:{type:"ordgroup",mode:n.mode,body:a}}},htmlBuilder:yM,mathmlBuilder:xM});var bM=(e,t)=>{var n=t;return e==="display"?n=n.id>=Wt.SCRIPT.id?n.text():Wt.DISPLAY:e==="text"&&n.size===Wt.DISPLAY.size?n=Wt.TEXT:e==="script"?n=Wt.SCRIPT:e==="scriptscript"&&(n=Wt.SCRIPTSCRIPT),n},_3=(e,t)=>{var n=bM(e.size,t.style),r=n.fracNum(),i=n.fracDen(),s;s=t.havingStyle(r);var a=Tn(e.numer,s,t);if(e.continued){var o=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;a.height=a.height0?b=3*m:b=7*m,y=t.fontMetrics().denom1):(h>0?(g=t.fontMetrics().num2,b=m):(g=t.fontMetrics().num3,b=3*m),y=t.fontMetrics().denom2);var E;if(f){var x=t.fontMetrics().axisHeight;g-a.depth-(x+.5*h){var n=new et.MathNode("mfrac",[Jn(e.numer,t),Jn(e.denom,t)]);if(!e.hasBarLine)n.setAttribute("linethickness","0px");else if(e.barSize){var r=br(e.barSize,t);n.setAttribute("linethickness",ft(r))}var i=bM(e.size,t.style);if(i.size!==t.style.size){n=new et.MathNode("mstyle",[n]);var s=i.size===Wt.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",s),n.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var a=[];if(e.leftDelim!=null){var o=new et.MathNode("mo",[new et.TextNode(e.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),a.push(o)}if(a.push(n),e.rightDelim!=null){var l=new et.MathNode("mo",[new et.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),a.push(l)}return y3(a)}return n};gt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1],a,o=null,l=null,u="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:l,size:u,barSize:null}},htmlBuilder:_3,mathmlBuilder:A3});gt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:i,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:r}}});var R9=["display","text","script","scriptscript"],F9=function(t){var n=null;return t.length>0&&(n=t,n=n==="."?null:n),n};gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],s=em(t[0]),a=s.type==="atom"&&s.family==="open"?F9(s.text):null,o=em(t[1]),l=o.type==="atom"&&o.family==="close"?F9(o.text):null,u=un(t[2],"size"),f,h=null;u.isBlank?f=!0:(h=u.value,f=h.number>0);var m="auto",g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var b=un(g.body[0],"textord");m=R9[Number(b.text)]}}else g=un(g,"textord"),m=R9[Number(g.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:f,barSize:h,leftDelim:a,rightDelim:l,size:m}},htmlBuilder:_3,mathmlBuilder:A3});gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:un(t[0],"size").value,token:i}}});gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],s=Iue(un(t[1],"infix").size),a=t[2],o=s.number>0;return{type:"genfrac",mode:n.mode,numer:i,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_3,mathmlBuilder:A3});var wM=(e,t)=>{var n=t.style,r,i;e.type==="supsub"?(r=e.sup?Tn(e.sup,t.havingStyle(n.sup()),t):Tn(e.sub,t.havingStyle(n.sub()),t),i=un(e.base,"horizBrace")):i=un(e,"horizBrace");var s=Tn(i.base,t.havingBaseStyle(Wt.DISPLAY)),a=wo.svgSpan(i,t),o;if(i.isOver?(o=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]}),o.children[0].children[0].children[1].classes.push("svg-align")):(o=Ne.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]}),o.children[0].children[0].children[0].classes.push("svg-align")),r){var l=Ne.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t);i.isOver?o=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Ne.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Ne.makeSpan(["mord",i.isOver?"mover":"munder"],[o],t)},rfe=(e,t)=>{var n=wo.mathMLnode(e.label);return new et.MathNode(e.isOver?"mover":"munder",[Jn(e.base,t),n])};gt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:wM,mathmlBuilder:rfe});gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=un(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:n.mode,href:i,body:Or(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=di(e.body,t,!1);return Ne.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=pl(e.body,t);return n instanceof ks||(n=new ks("mrow",[n])),n.setAttribute("href",e.href),n}});gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=un(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var i=[],s=0;s{var{parser:n,funcName:r,token:i}=e,s=un(t[0],"raw").string,a=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=s,o={command:"\\htmlClass",class:s};break;case"\\htmlId":l.id=s,o={command:"\\htmlId",id:s};break;case"\\htmlStyle":l.style=s,o={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var u=s.split(","),f=0;f{var n=di(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Ne.makeSpan(r,n,t);for(var s in e.attributes)s!=="class"&&e.attributes.hasOwnProperty(s)&&i.setAttribute(s,e.attributes[s]);return i},mathmlBuilder:(e,t)=>pl(e.body,t)});gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Or(t[0]),mathml:Or(t[1])}},htmlBuilder:(e,t)=>{var n=di(e.html,t,!1);return Ne.makeFragment(n)},mathmlBuilder:(e,t)=>pl(e.mathml,t)});var F2=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new Ft("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!rce(r))throw new Ft("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(n[0])for(var l=un(n[0],"raw").string,u=l.split(","),f=0;f{var n=br(e.height,t),r=0;e.totalheight.number>0&&(r=br(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=br(e.width,t));var s={height:ft(n+r)};i>0&&(s.width=ft(i)),r>0&&(s.verticalAlign=ft(-r));var a=new sce(e.src,e.alt,s);return a.height=n,a.depth=r,a},mathmlBuilder:(e,t)=>{var n=new et.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=br(e.height,t),i=0;if(e.totalheight.number>0&&(i=br(e.totalheight,t)-r,n.setAttribute("valign",ft(-i))),n.setAttribute("height",ft(r+i)),e.width.number>0){var s=br(e.width,t);n.setAttribute("width",ft(s))}return n.setAttribute("src",e.src),n}});gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=un(t[0],"size");if(n.settings.strict){var s=r[1]==="m",a=i.value.unit==="mu";s?(a||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+i.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Ne.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var n=br(e.dimension,t);return new et.SpaceNode(n)}});gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment==="clap"?(n=Ne.makeSpan([],[Tn(e.body,t)]),n=Ne.makeSpan(["inner"],[n],t)):n=Ne.makeSpan(["inner"],[Tn(e.body,t)]);var r=Ne.makeSpan(["fix"],[]),i=Ne.makeSpan([e.alignment],[n,r],t),s=Ne.makeSpan(["strut"]);return s.style.height=ft(i.height+i.depth),i.depth&&(s.style.verticalAlign=ft(-i.depth)),i.children.unshift(s),i=Ne.makeSpan(["thinbox"],[i],t),Ne.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var n=new et.MathNode("mpadded",[Jn(e.body,t)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode("math");var s=n==="\\("?"\\)":"$",a=r.parseExpression(!1,s);return r.expect(s),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:a}}});gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Ft("Mismatched "+e.funcName)}});var I9=(e,t)=>{switch(t.style.size){case Wt.DISPLAY.size:return e.display;case Wt.TEXT.size:return e.text;case Wt.SCRIPT.size:return e.script;case Wt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Or(t[0]),text:Or(t[1]),script:Or(t[2]),scriptscript:Or(t[3])}},htmlBuilder:(e,t)=>{var n=I9(e,t),r=di(n,t,!1);return Ne.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=I9(e,t);return pl(n,t)}});var EM=(e,t,n,r,i,s,a)=>{e=Ne.makeSpan([],[e]);var o=n&&$t.isCharacterBox(n),l,u;if(t){var f=Tn(t,r.havingStyle(i.sup()),r);u={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-f.depth)}}if(n){var h=Tn(n,r.havingStyle(i.sub()),r);l={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-h.height)}}var m;if(u&&l){var g=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;m=Ne.makeVList({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ft(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ft(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var b=e.height-a;m=Ne.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ft(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var y=e.depth+a;m=Ne.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:ft(s)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var E=[m];if(l&&s!==0&&!o){var C=Ne.makeSpan(["mspace"],[],r);C.style.marginRight=ft(s),E.unshift(C)}return Ne.makeSpan(["mop","op-limits"],E,r)},CM=["\\smallint"],rf=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=un(e.base,"op"),i=!0):s=un(e,"op");var a=t.style,o=!1;a.size===Wt.DISPLAY.size&&s.symbol&&!$t.contains(CM,s.name)&&(o=!0);var l;if(s.symbol){var u=o?"Size2-Regular":"Size1-Regular",f="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(f=s.name.slice(1),s.name=f==="oiint"?"\\iint":"\\iiint"),l=Ne.makeSymbol(s.name,u,"math",t,["mop","op-symbol",o?"large-op":"small-op"]),f.length>0){var h=l.italic,m=Ne.staticSvg(f+"Size"+(o?"2":"1"),t);l=Ne.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:m,shift:o?.08:0}]}),s.name="\\"+f,l.classes.unshift("mop"),l.italic=h}}else if(s.body){var g=di(s.body,t,!0);g.length===1&&g[0]instanceof Ra?(l=g[0],l.classes[0]="mop"):l=Ne.makeSpan(["mop"],g,t)}else{for(var b=[],y=1;y{var n;if(e.symbol)n=new ks("mo",[Os(e.name,e.mode)]),$t.contains(CM,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new ks("mo",ds(e.body,t));else{n=new ks("mi",[new _a(e.name.slice(1))]);var r=new ks("mo",[Os("⁡","text")]);e.parentIsSupSub?n=new ks("mrow",[n,r]):n=eM([n,r])}return n},ife={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=ife[i]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:rf,mathmlBuilder:d0});gt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Or(r)}},htmlBuilder:rf,mathmlBuilder:d0});var sfe={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:rf,mathmlBuilder:d0});gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:rf,mathmlBuilder:d0});gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=sfe[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:rf,mathmlBuilder:d0});var kM=(e,t)=>{var n,r,i=!1,s;e.type==="supsub"?(n=e.sup,r=e.sub,s=un(e.base,"operatorname"),i=!0):s=un(e,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(h=>{var m=h.text;return typeof m=="string"?{type:"textord",mode:h.mode,text:m}:h}),l=di(o,t.withFont("mathrm"),!0),u=0;u{for(var n=ds(e.body,t.withFont("mathrm")),r=!0,i=0;if.toText()).join("");n=[new et.TextNode(o)]}var l=new et.MathNode("mi",n);l.setAttribute("mathvariant","normal");var u=new et.MathNode("mo",[Os("⁡","text")]);return e.parentIsSupSub?new et.MathNode("mrow",[l,u]):et.newDocumentFragment([l,u])};gt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:"operatorname",mode:n.mode,body:Or(i),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:kM,mathmlBuilder:afe});X("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Cu({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ne.makeFragment(di(e.body,t,!1)):Ne.makeSpan(["mord"],di(e.body,t,!0),t)},mathmlBuilder(e,t){return pl(e.body,t,!0)}});gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=Tn(e.body,t.havingCrampedStyle()),r=Ne.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]});return Ne.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){var n=new et.MathNode("mo",[new et.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new et.MathNode("mover",[Jn(e.body,t),n]);return r.setAttribute("accent","true"),r}});gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Or(r)}},htmlBuilder:(e,t)=>{var n=di(e.body,t.withPhantom(),!1);return Ne.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=ds(e.body,t);return new et.MathNode("mphantom",n)}});gt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ne.makeSpan([],[Tn(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r{var n=ds(Or(e.body),t),r=new et.MathNode("mphantom",n),i=new et.MathNode("mpadded",[r]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ne.makeSpan(["inner"],[Tn(e.body,t.withPhantom())]),r=Ne.makeSpan(["fix"],[]);return Ne.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=ds(Or(e.body),t),r=new et.MathNode("mphantom",n),i=new et.MathNode("mpadded",[r]);return i.setAttribute("width","0px"),i}});gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=un(t[0],"size").value,i=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Tn(e.body,t),r=br(e.dy,t);return Ne.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){var n=new et.MathNode("mpadded",[Jn(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}});gt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,i=n[0],s=un(t[0],"size"),a=un(t[1],"size");return{type:"rule",mode:r.mode,shift:i&&un(i,"size").value,width:s.value,height:a.value}},htmlBuilder(e,t){var n=Ne.makeSpan(["mord","rule"],[],t),r=br(e.width,t),i=br(e.height,t),s=e.shift?br(e.shift,t):0;return n.style.borderRightWidth=ft(r),n.style.borderTopWidth=ft(i),n.style.bottom=ft(s),n.width=r,n.height=i+s,n.depth=-s,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=br(e.width,t),r=br(e.height,t),i=e.shift?br(e.shift,t):0,s=t.color&&t.getColor()||"black",a=new et.MathNode("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",ft(n)),a.setAttribute("height",ft(r));var o=new et.MathNode("mpadded",[a]);return i>=0?o.setAttribute("height",ft(i)):(o.setAttribute("height",ft(i)),o.setAttribute("depth",ft(-i))),o.setAttribute("voffset",ft(i)),o}});function DM(e,t,n){for(var r=di(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,s=0;s{var n=t.havingSize(e.size);return DM(e.body,n,t)};gt({type:"sizing",names:M9,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!1,n);return{type:"sizing",mode:i.mode,size:M9.indexOf(r)+1,body:s}},htmlBuilder:ofe,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=ds(e.body,n),i=new et.MathNode("mstyle",r);return i.setAttribute("mathsize",ft(n.sizeMultiplier)),i}});gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,s=!1,a=n[0]&&un(n[0],"ordgroup");if(a)for(var o="",l=0;l{var n=Ne.makeSpan([],[Tn(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r{var n=new et.MathNode("mpadded",[Jn(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}});gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],s=t[0];return{type:"sqrt",mode:r.mode,body:s,index:i}},htmlBuilder(e,t){var n=Tn(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ne.wrapFragment(n,t);var r=t.fontMetrics(),i=r.defaultRuleThickness,s=i;t.style.idn.height+n.depth+a&&(a=(a+h-n.height-n.depth)/2);var m=l.height-n.height-a-u;n.style.paddingLeft=ft(f);var g=Ne.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var b=t.havingStyle(Wt.SCRIPTSCRIPT),y=Tn(e.index,b,t),E=.6*(g.height-g.depth),C=Ne.makeVList({positionType:"shift",positionData:-E,children:[{type:"elem",elem:y}]}),x=Ne.makeSpan(["root"],[C]);return Ne.makeSpan(["mord","sqrt"],[x,g],t)}else return Ne.makeSpan(["mord","sqrt"],[g],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new et.MathNode("mroot",[Jn(n,t),Jn(r,t)]):new et.MathNode("msqrt",[Jn(n,t)])}});var L9={display:Wt.DISPLAY,text:Wt.TEXT,script:Wt.SCRIPT,scriptscript:Wt.SCRIPTSCRIPT};gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,s=i.parseExpression(!0,n),a=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:a,body:s}},htmlBuilder(e,t){var n=L9[e.style],r=t.havingStyle(n).withFont("");return DM(e.body,r,t)},mathmlBuilder(e,t){var n=L9[e.style],r=t.havingStyle(n),i=ds(e.body,r),s=new et.MathNode("mstyle",i),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var lfe=function(t,n){var r=t.base;if(r)if(r.type==="op"){var i=r.limits&&(n.style.size===Wt.DISPLAY.size||r.alwaysHandleSupSub);return i?rf:null}else if(r.type==="operatorname"){var s=r.alwaysHandleSupSub&&(n.style.size===Wt.DISPLAY.size||r.limits);return s?kM:null}else{if(r.type==="accent")return $t.isCharacterBox(r.base)?w3:null;if(r.type==="horizBrace"){var a=!t.sub;return a===r.isOver?wM:null}else return null}else return null};Cu({type:"supsub",htmlBuilder(e,t){var n=lfe(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:s}=e,a=Tn(r,t),o,l,u=t.fontMetrics(),f=0,h=0,m=r&&$t.isCharacterBox(r);if(i){var g=t.havingStyle(t.style.sup());o=Tn(i,g,t),m||(f=a.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(s){var b=t.havingStyle(t.style.sub());l=Tn(s,b,t),m||(h=a.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier)}var y;t.style===Wt.DISPLAY?y=u.sup1:t.style.cramped?y=u.sup3:y=u.sup2;var E=t.sizeMultiplier,C=ft(.5/u.ptPerEm/E),x=null;if(l){var S=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(a instanceof Ra||S)&&(x=ft(-a.italic))}var O;if(o&&l){f=Math.max(f,y,o.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var _=u.defaultRuleThickness,w=4*_;if(f-o.depth-(l.height-h)0&&(f+=T,h-=T)}var A=[{type:"elem",elem:l,shift:h,marginRight:C,marginLeft:x},{type:"elem",elem:o,shift:-f,marginRight:C}];O=Ne.makeVList({positionType:"individualShift",children:A})}else if(l){h=Math.max(h,u.sub1,l.height-.8*u.xHeight);var P=[{type:"elem",elem:l,marginLeft:x,marginRight:C}];O=Ne.makeVList({positionType:"shift",positionData:h,children:P})}else if(o)f=Math.max(f,y,o.depth+.25*u.xHeight),O=Ne.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:o,marginRight:C}]});else throw new Error("supsub must have either sup or sub.");var I=y4(a,"right")||"mord";return Ne.makeSpan([I],[a,Ne.makeSpan(["msupsub"],[O])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var s=[Jn(e.base,t)];e.sub&&s.push(Jn(e.sub,t)),e.sup&&s.push(Jn(e.sup,t));var a;if(n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===Wt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===Wt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Wt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Wt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===Wt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===Wt.DISPLAY)?a="mover":a="msup"}return new et.MathNode(a,s)}});Cu({type:"atom",htmlBuilder(e,t){return Ne.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var n=new et.MathNode("mo",[Os(e.text,e.mode)]);if(e.family==="bin"){var r=x3(e,t);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else e.family==="punct"?n.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&n.setAttribute("stretchy","false");return n}});var SM={mi:"italic",mn:"normal",mtext:"normal"};Cu({type:"mathord",htmlBuilder(e,t){return Ne.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var n=new et.MathNode("mi",[Os(e.text,e.mode,t)]),r=x3(e,t)||"italic";return r!==SM[n.type]&&n.setAttribute("mathvariant",r),n}});Cu({type:"textord",htmlBuilder(e,t){return Ne.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var n=Os(e.text,e.mode,t),r=x3(e,t)||"normal",i;return e.mode==="text"?i=new et.MathNode("mtext",[n]):/[0-9]/.test(e.text)?i=new et.MathNode("mn",[n]):e.text==="\\prime"?i=new et.MathNode("mo",[n]):i=new et.MathNode("mi",[n]),r!==SM[i.type]&&i.setAttribute("mathvariant",r),i}});var I2={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},M2={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Cu({type:"spacing",htmlBuilder(e,t){if(M2.hasOwnProperty(e.text)){var n=M2[e.text].className||"";if(e.mode==="text"){var r=Ne.makeOrd(e,t,"textord");return r.classes.push(n),r}else return Ne.makeSpan(["mspace",n],[Ne.mathsym(e.text,e.mode,t)],t)}else{if(I2.hasOwnProperty(e.text))return Ne.makeSpan(["mspace",I2[e.text]],[],t);throw new Ft('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var n;if(M2.hasOwnProperty(e.text))n=new et.MathNode("mtext",[new et.TextNode(" ")]);else{if(I2.hasOwnProperty(e.text))return new et.MathNode("mspace");throw new Ft('Unknown type of space "'+e.text+'"')}return n}});var z9=()=>{var e=new et.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Cu({type:"tag",mathmlBuilder(e,t){var n=new et.MathNode("mtable",[new et.MathNode("mtr",[z9(),new et.MathNode("mtd",[pl(e.body,t)]),z9(),new et.MathNode("mtd",[pl(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var j9={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},q9={"\\textbf":"textbf","\\textmd":"textmd"},ufe={"\\textit":"textit","\\textup":"textup"},$9=(e,t)=>{var n=e.font;if(n){if(j9[n])return t.withTextFontFamily(j9[n]);if(q9[n])return t.withTextFontWeight(q9[n]);if(n==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(ufe[n])};gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:"text",mode:n.mode,body:Or(i),font:r}},htmlBuilder(e,t){var n=$9(e,t),r=di(e.body,n,!0);return Ne.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=$9(e,t);return pl(e.body,n)}});gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Tn(e.body,t),r=Ne.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,s=Ne.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n}]});return Ne.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){var n=new et.MathNode("mo",[new et.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new et.MathNode("munder",[Jn(e.body,t),n]);return r.setAttribute("accentunder","true"),r}});gt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Tn(e.body,t),r=t.fontMetrics().axisHeight,i=.5*(n.height-r-(n.depth+r));return Ne.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:n}]})},mathmlBuilder(e,t){return new et.MathNode("mpadded",[Jn(e.body,t)],["vcenter"])}});gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Ft("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=V9(e),r=[],i=t.havingStyle(t.style.text()),s=0;se.body.replace(/ /g,e.star?"␣":" "),cfe=QI;X("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});X("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});X("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});X("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});X("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});X("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");X("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var U9={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};X("\\char",function(e){var t=e.popToken(),n,r="";if(t.text==="'")n=8,t=e.popToken();else if(t.text==='"')n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")r=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Ft("\\char` missing argument");r=t.text.charCodeAt(0)}else n=10;if(n){if(r=U9[t.text],r==null||r>=n)throw new Ft("Invalid base-"+n+" digit "+t.text);for(var i;(i=U9[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Ft("\\newcommand's first argument must be a macro name");var s=i[0].text,a=e.isDefined(s);if(a&&!t)throw new Ft("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!n)throw new Ft("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Ft("Invalid number of arguments: "+l);o=parseInt(l),i=e.consumeArg().tokens}return a&&r||e.macros.set(s,{tokens:i,numArgs:o}),""};X("\\newcommand",e=>T3(e,!1,!0,!1));X("\\renewcommand",e=>T3(e,!0,!1,!1));X("\\providecommand",e=>T3(e,!0,!0,!0));X("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(n=>n.text).join("")),""});X("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(n=>n.text).join("")),""});X("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),cfe[n],Br.math[n],Br.text[n]),""});X("\\bgroup","{");X("\\egroup","}");X("~","\\nobreakspace");X("\\lq","`");X("\\rq","'");X("\\aa","\\r a");X("\\AA","\\r A");X("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");X("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");X("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");X("ℬ","\\mathscr{B}");X("ℰ","\\mathscr{E}");X("ℱ","\\mathscr{F}");X("ℋ","\\mathscr{H}");X("ℐ","\\mathscr{I}");X("ℒ","\\mathscr{L}");X("ℳ","\\mathscr{M}");X("ℛ","\\mathscr{R}");X("ℭ","\\mathfrak{C}");X("ℌ","\\mathfrak{H}");X("ℨ","\\mathfrak{Z}");X("\\Bbbk","\\Bbb{k}");X("·","\\cdotp");X("\\llap","\\mathllap{\\textrm{#1}}");X("\\rlap","\\mathrlap{\\textrm{#1}}");X("\\clap","\\mathclap{\\textrm{#1}}");X("\\mathstrut","\\vphantom{(}");X("\\underbar","\\underline{\\text{#1}}");X("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');X("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");X("\\ne","\\neq");X("≠","\\neq");X("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");X("∉","\\notin");X("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");X("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");X("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");X("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");X("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");X("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");X("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");X("⟂","\\perp");X("‼","\\mathclose{!\\mkern-0.8mu!}");X("∌","\\notni");X("⌜","\\ulcorner");X("⌝","\\urcorner");X("⌞","\\llcorner");X("⌟","\\lrcorner");X("©","\\copyright");X("®","\\textregistered");X("️","\\textregistered");X("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');X("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');X("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');X("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');X("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");X("⋮","\\vdots");X("\\varGamma","\\mathit{\\Gamma}");X("\\varDelta","\\mathit{\\Delta}");X("\\varTheta","\\mathit{\\Theta}");X("\\varLambda","\\mathit{\\Lambda}");X("\\varXi","\\mathit{\\Xi}");X("\\varPi","\\mathit{\\Pi}");X("\\varSigma","\\mathit{\\Sigma}");X("\\varUpsilon","\\mathit{\\Upsilon}");X("\\varPhi","\\mathit{\\Phi}");X("\\varPsi","\\mathit{\\Psi}");X("\\varOmega","\\mathit{\\Omega}");X("\\substack","\\begin{subarray}{c}#1\\end{subarray}");X("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");X("\\boxed","\\fbox{$\\displaystyle{#1}$}");X("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");X("\\implies","\\DOTSB\\;\\Longrightarrow\\;");X("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");X("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");X("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var H9={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};X("\\dots",function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in H9?t=H9[n]:(n.slice(0,4)==="\\not"||n in Br.math&&$t.contains(["bin","rel"],Br.math[n].group))&&(t="\\dotsb"),t});var N3={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};X("\\dotso",function(e){var t=e.future().text;return t in N3?"\\ldots\\,":"\\ldots"});X("\\dotsc",function(e){var t=e.future().text;return t in N3&&t!==","?"\\ldots\\,":"\\ldots"});X("\\cdots",function(e){var t=e.future().text;return t in N3?"\\@cdots\\,":"\\@cdots"});X("\\dotsb","\\cdots");X("\\dotsm","\\cdots");X("\\dotsi","\\!\\cdots");X("\\dotsx","\\ldots\\,");X("\\DOTSI","\\relax");X("\\DOTSB","\\relax");X("\\DOTSX","\\relax");X("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");X("\\,","\\tmspace+{3mu}{.1667em}");X("\\thinspace","\\,");X("\\>","\\mskip{4mu}");X("\\:","\\tmspace+{4mu}{.2222em}");X("\\medspace","\\:");X("\\;","\\tmspace+{5mu}{.2777em}");X("\\thickspace","\\;");X("\\!","\\tmspace-{3mu}{.1667em}");X("\\negthinspace","\\!");X("\\negmedspace","\\tmspace-{4mu}{.2222em}");X("\\negthickspace","\\tmspace-{5mu}{.277em}");X("\\enspace","\\kern.5em ");X("\\enskip","\\hskip.5em\\relax");X("\\quad","\\hskip1em\\relax");X("\\qquad","\\hskip2em\\relax");X("\\tag","\\@ifstar\\tag@literal\\tag@paren");X("\\tag@paren","\\tag@literal{({#1})}");X("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Ft("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});X("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");X("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");X("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");X("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");X("\\newline","\\\\\\relax");X("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var _M=ft(oo["Main-Regular"][84][1]-.7*oo["Main-Regular"][65][1]);X("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+_M+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");X("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+_M+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");X("\\hspace","\\@ifstar\\@hspacer\\@hspace");X("\\@hspace","\\hskip #1\\relax");X("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");X("\\ordinarycolon",":");X("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");X("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');X("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');X("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');X("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');X("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');X("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');X("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');X("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');X("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');X("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');X("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');X("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');X("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');X("∷","\\dblcolon");X("∹","\\eqcolon");X("≔","\\coloneqq");X("≕","\\eqqcolon");X("⩴","\\Coloneqq");X("\\ratio","\\vcentcolon");X("\\coloncolon","\\dblcolon");X("\\colonequals","\\coloneqq");X("\\coloncolonequals","\\Coloneqq");X("\\equalscolon","\\eqqcolon");X("\\equalscoloncolon","\\Eqqcolon");X("\\colonminus","\\coloneq");X("\\coloncolonminus","\\Coloneq");X("\\minuscolon","\\eqcolon");X("\\minuscoloncolon","\\Eqcolon");X("\\coloncolonapprox","\\Colonapprox");X("\\coloncolonsim","\\Colonsim");X("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");X("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");X("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");X("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");X("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");X("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");X("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");X("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");X("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");X("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");X("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");X("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");X("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");X("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");X("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");X("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");X("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");X("\\nleqq","\\html@mathml{\\@nleqq}{≰}");X("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");X("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");X("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");X("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");X("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");X("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");X("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");X("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");X("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");X("\\imath","\\html@mathml{\\@imath}{ı}");X("\\jmath","\\html@mathml{\\@jmath}{ȷ}");X("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");X("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");X("⟦","\\llbracket");X("⟧","\\rrbracket");X("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");X("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");X("⦃","\\lBrace");X("⦄","\\rBrace");X("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");X("⦵","\\minuso");X("\\darr","\\downarrow");X("\\dArr","\\Downarrow");X("\\Darr","\\Downarrow");X("\\lang","\\langle");X("\\rang","\\rangle");X("\\uarr","\\uparrow");X("\\uArr","\\Uparrow");X("\\Uarr","\\Uparrow");X("\\N","\\mathbb{N}");X("\\R","\\mathbb{R}");X("\\Z","\\mathbb{Z}");X("\\alef","\\aleph");X("\\alefsym","\\aleph");X("\\Alpha","\\mathrm{A}");X("\\Beta","\\mathrm{B}");X("\\bull","\\bullet");X("\\Chi","\\mathrm{X}");X("\\clubs","\\clubsuit");X("\\cnums","\\mathbb{C}");X("\\Complex","\\mathbb{C}");X("\\Dagger","\\ddagger");X("\\diamonds","\\diamondsuit");X("\\empty","\\emptyset");X("\\Epsilon","\\mathrm{E}");X("\\Eta","\\mathrm{H}");X("\\exist","\\exists");X("\\harr","\\leftrightarrow");X("\\hArr","\\Leftrightarrow");X("\\Harr","\\Leftrightarrow");X("\\hearts","\\heartsuit");X("\\image","\\Im");X("\\infin","\\infty");X("\\Iota","\\mathrm{I}");X("\\isin","\\in");X("\\Kappa","\\mathrm{K}");X("\\larr","\\leftarrow");X("\\lArr","\\Leftarrow");X("\\Larr","\\Leftarrow");X("\\lrarr","\\leftrightarrow");X("\\lrArr","\\Leftrightarrow");X("\\Lrarr","\\Leftrightarrow");X("\\Mu","\\mathrm{M}");X("\\natnums","\\mathbb{N}");X("\\Nu","\\mathrm{N}");X("\\Omicron","\\mathrm{O}");X("\\plusmn","\\pm");X("\\rarr","\\rightarrow");X("\\rArr","\\Rightarrow");X("\\Rarr","\\Rightarrow");X("\\real","\\Re");X("\\reals","\\mathbb{R}");X("\\Reals","\\mathbb{R}");X("\\Rho","\\mathrm{P}");X("\\sdot","\\cdot");X("\\sect","\\S");X("\\spades","\\spadesuit");X("\\sub","\\subset");X("\\sube","\\subseteq");X("\\supe","\\supseteq");X("\\Tau","\\mathrm{T}");X("\\thetasym","\\vartheta");X("\\weierp","\\wp");X("\\Zeta","\\mathrm{Z}");X("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");X("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");X("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");X("\\bra","\\mathinner{\\langle{#1}|}");X("\\ket","\\mathinner{|{#1}\\rangle}");X("\\braket","\\mathinner{\\langle{#1}\\rangle}");X("\\Bra","\\left\\langle#1\\right|");X("\\Ket","\\left|#1\\right\\rangle");var AM=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,s=t.consumeArg().tokens,a=t.macros.get("|"),o=t.macros.get("\\|");t.macros.beginGroup();var l=h=>m=>{e&&(m.macros.set("|",a),i.length&&m.macros.set("\\|",o));var g=h;if(!h&&i.length){var b=m.future();b.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?i:r,numArgs:0}};t.macros.set("|",l(!1)),i.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,f=t.expandTokens([...s,...u,...n]);return t.macros.endGroup(),{tokens:f.reverse(),numArgs:0}};X("\\bra@ket",AM(!1));X("\\bra@set",AM(!0));X("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");X("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");X("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");X("\\angln","{\\angl n}");X("\\blue","\\textcolor{##6495ed}{#1}");X("\\orange","\\textcolor{##ffa500}{#1}");X("\\pink","\\textcolor{##ff00af}{#1}");X("\\red","\\textcolor{##df0030}{#1}");X("\\green","\\textcolor{##28ae7b}{#1}");X("\\gray","\\textcolor{gray}{#1}");X("\\purple","\\textcolor{##9d38bd}{#1}");X("\\blueA","\\textcolor{##ccfaff}{#1}");X("\\blueB","\\textcolor{##80f6ff}{#1}");X("\\blueC","\\textcolor{##63d9ea}{#1}");X("\\blueD","\\textcolor{##11accd}{#1}");X("\\blueE","\\textcolor{##0c7f99}{#1}");X("\\tealA","\\textcolor{##94fff5}{#1}");X("\\tealB","\\textcolor{##26edd5}{#1}");X("\\tealC","\\textcolor{##01d1c1}{#1}");X("\\tealD","\\textcolor{##01a995}{#1}");X("\\tealE","\\textcolor{##208170}{#1}");X("\\greenA","\\textcolor{##b6ffb0}{#1}");X("\\greenB","\\textcolor{##8af281}{#1}");X("\\greenC","\\textcolor{##74cf70}{#1}");X("\\greenD","\\textcolor{##1fab54}{#1}");X("\\greenE","\\textcolor{##0d923f}{#1}");X("\\goldA","\\textcolor{##ffd0a9}{#1}");X("\\goldB","\\textcolor{##ffbb71}{#1}");X("\\goldC","\\textcolor{##ff9c39}{#1}");X("\\goldD","\\textcolor{##e07d10}{#1}");X("\\goldE","\\textcolor{##a75a05}{#1}");X("\\redA","\\textcolor{##fca9a9}{#1}");X("\\redB","\\textcolor{##ff8482}{#1}");X("\\redC","\\textcolor{##f9685d}{#1}");X("\\redD","\\textcolor{##e84d39}{#1}");X("\\redE","\\textcolor{##bc2612}{#1}");X("\\maroonA","\\textcolor{##ffbde0}{#1}");X("\\maroonB","\\textcolor{##ff92c6}{#1}");X("\\maroonC","\\textcolor{##ed5fa6}{#1}");X("\\maroonD","\\textcolor{##ca337c}{#1}");X("\\maroonE","\\textcolor{##9e034e}{#1}");X("\\purpleA","\\textcolor{##ddd7ff}{#1}");X("\\purpleB","\\textcolor{##c6b9fc}{#1}");X("\\purpleC","\\textcolor{##aa87ff}{#1}");X("\\purpleD","\\textcolor{##7854ab}{#1}");X("\\purpleE","\\textcolor{##543b78}{#1}");X("\\mintA","\\textcolor{##f5f9e8}{#1}");X("\\mintB","\\textcolor{##edf2df}{#1}");X("\\mintC","\\textcolor{##e0e5cc}{#1}");X("\\grayA","\\textcolor{##f6f7f7}{#1}");X("\\grayB","\\textcolor{##f0f1f2}{#1}");X("\\grayC","\\textcolor{##e3e5e6}{#1}");X("\\grayD","\\textcolor{##d6d8da}{#1}");X("\\grayE","\\textcolor{##babec2}{#1}");X("\\grayF","\\textcolor{##888d93}{#1}");X("\\grayG","\\textcolor{##626569}{#1}");X("\\grayH","\\textcolor{##3b3e40}{#1}");X("\\grayI","\\textcolor{##21242c}{#1}");X("\\kaBlue","\\textcolor{##314453}{#1}");X("\\kaGreen","\\textcolor{##71B307}{#1}");typeof document<"u"&&document.compatMode!=="CSS1Compat"&&typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.");const ffe=fn(kue),dfe=fn(Due),hfe=e=>{try{return e!==decodeURIComponent(e)?e:encodeURI(e)}catch(t){if(t instanceof URIError)return e;throw t}},O3=(e,t)=>{const{allowedSchemes:n,dangerouslySkipSanitization:r,defaultLinkAttributes:i}=e.getOptions({key:te.link}),s={...i},a=r?t.url:jN(t.url,{allowedSchemes:n})||void 0;return a!==void 0&&(s.href=a),"target"in t&&t.target!==void 0&&(s.target=t.target),s},pfe=e=>{try{return decodeURI(e)}catch(t){if(t instanceof URIError)return e;throw t}},mfe=/\s/,gfe=(e,t)=>{const{allowedSchemes:n,dangerouslySkipSanitization:r,isUrl:i}=e.getOptions(TM),s=i&&i!==Lc?i:void 0;return(t.startsWith("/")||t.startsWith("#"))&&mfe.test(t)?!1:t.startsWith("/")&&!t.startsWith("//")||t.startsWith("#")?s?s(t):!0:!(i&&!i(t)||!r&&!jN(t,{allowedSchemes:n,permitInvalid:!0}))},vfe=({editor:e,tf:{normalizeNode:t},type:n})=>({transforms:{normalizeNode([r,i]){if(r.type===n){const s=e.selection?.focus,a=s?e.api.node(s.path):void 0,o=!!a&&(!Fn.isText(a[0])||(s?.offset??0)<=a[0].text.length),l=e.api.end(i);if(s&&e.api.isCollapsed()&&o&&l&&yo.equals(s,l)&&!e.api.start(i,{next:!0})){const u=Je.next(i);e.tf.insertNodes({text:""},{at:u}),e.tf.select(u)}}t([r,i])}}}),TM=Yn({key:te.link,node:{dangerouslyAllowAttributes:["target"],isElement:!0,isInline:!0,props:({editor:e,element:t})=>O3(e,t)},options:{allowedSchemes:["http","https","mailto","tel"],dangerouslySkipSanitization:!1,defaultLinkAttributes:{},isUrl:Lc,keepSelectedTextOnPaste:!0,rangeBeforeOptions:{afterMatch:!0,matchBlockStart:!0,matchString:" ",skipInvalid:!0}},parsers:{html:{deserializer:{rules:[{validNodeName:"A"}],parse:({editor:e,element:t,type:n})=>{const r=t.getAttribute("href");if(r&&gfe(e,r))return{target:t.getAttribute("target")||"_blank",type:n,url:r}}}}},rules:{normalize:{removeEmpty:!0},selection:{affinity:"directional"}}}).overrideEditor(vfe),vu=l3(TM,{options:{isEditing:!1,mode:"",mouseDown:!1,newTab:!1,openEditorId:null,text:"",triggerFloatingLinkHotkeys:"meta+k, ctrl+k",updated:!1,url:""}}).extendEditorApi(({editor:e})=>({link:{getAttributes:De(O3,e)}})).extendEditorApi(({setOptions:e})=>({floatingLink:{hide:()=>{e({isEditing:!1,mode:"",mouseDown:!1,newTab:!1,openEditorId:null,text:"",updated:!1,url:""})},reset:()=>{e({isEditing:!1,mode:"",mouseDown:!1,newTab:!1,text:"",updated:!1,url:""})},show:(t,n)=>{e({isEditing:!1,mode:t,openEditorId:n})}}})).extendSelectors(({getOptions:e})=>({isOpen:t=>e().openEditorId===t})),yfe=()=>{const e=Zt.c(7),{getOptions:t}=s0(vu),n=f3(vu,"updated"),r=oe.useRef(null);let i;e[0]!==t?(i=t(),e[0]=t,e[1]=i):i=e[1];const[s,a]=oe.useState(i.newTab);let o,l;e[2]!==n?(o=()=>{r.current&&n&&setTimeout(()=>{r.current?.focus()},0)},l=[n],e[2]=n,e[3]=o,e[4]=l):(o=e[3],l=e[4]),oe.useEffect(o,l);let u;return e[5]!==s?(u={checked:s,ref:r,setChecked:a},e[5]=s,e[6]=u):u=e[6],u},xfe=e=>{const t=Zt.c(9),{checked:n,ref:r,setChecked:i}=e,{setOption:s}=s0(vu);let a;t[0]!==i||t[1]!==s?(a=f=>{i(f.target.checked),s("newTab",f.target.checked)},t[0]=i,t[1]=s,t[2]=a):a=t[2];const o=a;let l;t[3]!==n||t[4]!==o?(l={checked:n,type:"checkbox",onChange:o},t[3]=n,t[4]=o,t[5]=l):l=t[5];let u;return t[6]!==r||t[7]!==l?(u={props:l,ref:r},t[6]=r,t[7]=l,t[8]=u):u=t[8],u};Eu("input")({propsHook:xfe,stateHook:yfe});const bfe=()=>{const e=Zt.c(5),{getOptions:t}=s0(vu),n=f3(vu,"updated"),r=oe.useRef(null),i=oe.useRef(!1);let s,a;e[0]!==t||e[1]!==n?(s=()=>{r.current&&n&&setTimeout(()=>{const l=r.current;if(!l||i.current)return;i.current=!0;const u=t().url;l.focus(),l.value=u?pfe(u):""},0)},a=[t,n],e[0]=t,e[1]=n,e[2]=s,e[3]=a):(s=e[2],a=e[3]),oe.useEffect(s,a);let o;return e[4]===Symbol.for("react.memo_cache_sentinel")?(o={ref:r},e[4]=o):o=e[4],o},wfe=e=>{const t=Zt.c(10),{getOptions:n,setOption:r}=s0(vu);let i;t[0]!==r?(i=u=>{r("url",hfe(u.target.value))},t[0]=r,t[1]=i):i=t[1];const s=i;let a;t[2]!==n?(a=n(),t[2]=n,t[3]=a):a=t[3];let o;t[4]!==s||t[5]!==a.url?(o={defaultValue:a.url,onChange:s},t[4]=s,t[5]=a.url,t[6]=o):o=t[6];let l;return t[7]!==e.ref||t[8]!==o?(l={props:o,ref:e.ref},t[7]=e.ref,t[8]=o,t[9]=l):l=t[9],l};Eu("input")({propsHook:wfe,stateHook:bfe});const Efe=()=>{const e=wr(),t=mse(),n=oe.useMemo(()=>e.api.node({match:{type:e.getType(te.link)}}),[e,t]);if(!n)return{};const[r]=n;return{element:r}},Cfe=e=>{const t=Zt.c(6),{element:n}=e,r=wr();if(!n){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o={props:{}},t[0]=o):o=t[0],o}let i;t[1]!==r||t[2]!==n?(i=O3(r,n),t[1]=r,t[2]=n,t[3]=i):i=t[3];const s=i;let a;return t[4]!==s?(a={props:{...s,"aria-label":"Open link in a new tab",target:"_blank",onMouseOver:kfe}},t[4]=s,t[5]=a):a=t[5],a};Eu("a")({propsHook:Cfe,stateHook:Efe});function kfe(e){e.stopPropagation()}const Dfe=Jt({key:te.audio,node:{isElement:!0,isVoid:!0}}),Sfe=Jt({key:te.file,node:{isElement:!0,isVoid:!0}}),_fe=Jt({key:te.video,node:{dangerouslyAllowAttributes:["width","height"],isElement:!0,isVoid:!0}}),NM=(e,t,n={})=>{const r={children:[{text:""}],type:e.getType(te.img),url:t};e.tf.insertNodes(r,{nextBlock:!0,...n})},OM=(e,t,n={})=>{for(const r of t){const i=new FileReader,[s]=r.type.split("/");s==="image"&&(i.addEventListener("load",async()=>{if(!i.result)return;const a=e.getOptions(BM).uploadImage;NM(e,a?await a(i.result):i.result,n)}),i.readAsDataURL(r))}},Afe=new Set(["3dv","ai","amf","art","art","ase","awg","blp","bmp","bw","bw","cd5","cdr","cgm","cit","cmx","cpt","cr2","cur","cut","dds","dib","djvu","dxf","e2d","ecw","egt","egt","emf","eps","exif","fs","gbr","gif","gpl","grf","hdp","icns","ico","iff","iff","int","int","inta","jfif","jng","jp2","jpeg","jpg","jps","jxr","lbm","lbm","liff","max","miff","mng","msp","nitf","nrrd","odg","ota","pam","pbm","pc1","pc2","pc3","pcf","pct","pcx","pcx","pdd","pdn","pgf","pgm","PI1","PI2","PI3","pict","png","pnm","pns","ppm","psb","psd","psp","px","pxm","pxr","qfx","ras","raw","rgb","rgb","rgba","rle","sct","sgi","sgi","sid","stl","sun","svg","sxd","tga","tga","tif","tiff","v2d","vnd","vrml","vtf","wdp","webp","wmf","x3d","xar","xbm","xcf","xpm"]),Tfe=e=>{if(!Lc(e))return!1;const t=new URL(e).pathname.split(".").pop();return Afe.has(t)},Nfe=({editor:e,getOptions:t,tf:{insertData:n}})=>({transforms:{insertData(r){if(t().disableEmbedInsert)return n(r);const i=r.getData("text/plain");if(Tfe(i)){NM(e,i);return}n(r)}}}),Ofe=({editor:e,getOptions:t,plugin:n,tf:{insertData:r}})=>({transforms:{insertData(i){if(t().disableUploadInsert)return r(i);const s="text/plain",a=i.getData(s),{files:o}=i;if(!a&&o&&o.length>0){if(!jP(e,LE(e,n),{data:a,dataTransfer:i,mimeType:s}))return r(i);OM(e,o)}else return r(i)}}}),BM=Yn({key:te.img,node:{dangerouslyAllowAttributes:["alt","width","height"],isElement:!0,isVoid:!0},parsers:{html:{deserializer:{rules:[{validNodeName:"IMG"}],parse:({element:e,type:t})=>({type:t,url:e.getAttribute("src")})}}}}).overrideEditor(Ofe).overrideEditor(Nfe).extendEditorTransforms(({editor:e})=>({insert:{imageFromFiles:De(OM,e)}})),Bfe=new Set(["http:","https:"]),Pfe=(e,{urlParsers:t})=>{const n=(()=>{for(const r of t){const i=r(e);if(i)return i}})();if(n?.url)try{const{protocol:r}=new URL(n.url);if(!Bfe.has(r))return}catch{console.warn(`Could not parse URL: ${n.url}`);return}return n},Rfe=/]*\bsrc="([^"]*)"/i,Ffe=/"([^"]*)"/,Ife=/https?:\/\/(?:twitter|x)\.com\/(?:#!\/)?\w+\/status(?:es)?\/\d+/,Mfe=e=>{if(!e.startsWith("http")){const t=e.match(Ife)?.[0];if(t)return t;const n=Rfe.exec(e)?.[0]?.match(Ffe)?.[1];if(n)return n}return e},Lfe=Yn({key:te.mediaEmbed,node:{isElement:!0,isVoid:!0},options:{transformUrl:Mfe},parsers:{html:{deserializer:{rules:[{validNodeName:"IFRAME"}],parse:({element:e,type:t})=>{const n=e.getAttribute("src");if(n)return{type:t,url:n}}}}}}),zfe=/^https?:\/\/(?:twitter|x)\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/,jfe=3,qfe=e=>{const t=zfe.exec(e);if(t)return{id:t[jfe],provider:"twitter",sourceKind:"url",url:e}},$fe="https://www.youtube.com/embed/",Vfe="https://player.vimeo.com/video/",Ufe="https://www.dailymotion.com/embed/video/",Hfe="https://coub.com/embed/",Wfe="https://player.youku.com/embed/",PM=["youtube","vimeo","dailymotion","youku","coub"];[...PM];const Kfe={coub:Hfe,dailymotion:Ufe,vimeo:Vfe,youku:Wfe,youtube:$fe},Gfe=e=>{if(Lc(e))try{return new URL(e)}catch{return}},h0=e=>e.pathname.split("/").filter(Boolean),Xs=(e,t)=>{const n=e.indexOf(t);return n>=0?e[n+1]:void 0},Xm=e=>e.length>0&&[...e].every(t=>{const n=t.charCodeAt(0);return n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122}),Yfe=e=>e.length>0&&[...e].every(t=>{const n=t.charCodeAt(0);return n>=48&&n<=57}),L2=e=>e?.length===11&&[...e].every(t=>{const n=t.charCodeAt(0);return t==="-"||t==="_"||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122}),RM=e=>{if(!e)return;const t=[...e].findIndex(n=>!Xm(n));return t===-1?e:e.slice(0,t)},Jfe=e=>{const t=e.hostname.toLowerCase(),n=h0(e);if(t==="youtu.be"){const s=n[0];return L2(s)?s:void 0}if(t!=="youtube.com"&&!t.endsWith(".youtube.com"))return;const r=e.searchParams.get("v")??e.searchParams.get("ci");if(L2(r??void 0))return r;const i=Xs(n,"embed")??Xs(n,"v")??Xs(n,"vi")??Xs(n,"videos")??Xs(n,"shorts")??Xs(n,"live");return L2(i)?i:void 0},Xfe=e=>{const t=e.hostname.toLowerCase();if(!(t!=="vimeo.com"&&!t.endsWith(".vimeo.com")&&t!=="vimeopro.com"&&!t.endsWith(".vimeopro.com")))return[...h0(e)].reverse().find(Yfe)},Qfe=e=>{const t=e.hostname.toLowerCase();if(t!=="dai.ly"&&t!=="dailymotion.com"&&!t.endsWith(".dailymotion.com"))return;const n=h0(e),r=RM(t==="dai.ly"?n[0]:Xs(n,"video"));return r&&Xm(r)?r:void 0},Zfe=e=>{const t=e.hostname.toLowerCase();if(t!=="youku.com"&&!t.endsWith(".youku.com"))return;const n=h0(e),r=e.searchParams.get("VideoIDS")??void 0,i=Xs(n,"embed")??Xs(n,"sid")??n.find(a=>a.startsWith("id_"))?.slice(3).split(".")[0],s=RM(r??i);return s&&Xm(s)?s:void 0},ede=e=>{const t=e.hostname.toLowerCase();if(t!=="coub.com"&&!t.endsWith(".coub.com"))return;const n=h0(e),r=Xs(n,"view")??Xs(n,"embed");return r&&Xm(r)?r:void 0},tde={coub:ede,dailymotion:Qfe,vimeo:Xfe,youku:Zfe,youtube:Jfe},nde=e=>{const t=Gfe(e);if(t)for(const n of PM){const r=tde[n](t);if(!r)continue;const i=`${Kfe[n]}${r}`;return{id:r,provider:n,sourceKind:"url",sourceUrl:i===e?void 0:e,url:i}}},Qm=(e,t,n)=>{e.tf.withoutNormalizing(()=>e.tf.insertNodes({children:[{text:""}],mediaType:t,type:e.getType(te.placeholder)},n))},rde=(e,t)=>Qm(e,te.img,t),ide=(e,t)=>Qm(e,te.video,t),sde=(e,t)=>Qm(e,te.audio,t),ade=(e,t)=>Qm(e,te.file,t),ode=Yn({key:te.placeholder,node:{isElement:!0,isVoid:!0}}).extendEditorTransforms(({editor:e})=>({insert:{audioPlaceholder:De(sde,e),filePlaceholder:De(ade,e),imagePlaceholder:De(rde,e),videoPlaceholder:De(ide,e)}})),lde=fn(BM);fn(Lfe);fn(Dfe);fn(Sfe);fn(_fe);const ll=Rm({boundingClientRect:{},currentPreview:null,isEditingScale:!1,openEditorId:null,previewList:[],scale:1,translate:{x:0,y:0}},{mutative:!0,name:"imagePreview"}).extendActions(({set:e})=>({close:()=>{e("currentPreview",null),e("previewList",[]),e("openEditorId",null),e("scale",1),e("translate",{x:0,y:0}),e("isEditingScale",!1)}})).extendSelectors(({get:e})=>({isOpen:t=>e("openEditorId")===t})),{useValue:yp}=ll,ude=e=>{const t=e.api.nodes({at:[],match:n=>n.type===te.img});return Array.from(t,n=>({id:n[0].id,url:n[0].url}))},cde=(e,t)=>{const{id:n,url:r}=t,i=ude(e);ll.set("openEditorId",e.id),ll.set("currentPreview",{id:n,url:r}),ll.set("previewList",i)},fde=()=>{const e=Zt.c(7),t=yp("scale");let n;e[0]!==t?(n=()=>{if(t>=2)return;const o=[0,.5,1,1.5,2].find(l=>t{if(t<=0)return;const o=[0,.5,1,1.5,2].reverse().find(l=>t>l);o===1&&ll.set("translate",{x:0,y:0}),o!==void 0&&ll.set("scale",o)},e[2]=t,e[3]=i):i=e[3];const s=i;let a;return e[4]!==r||e[5]!==s?(a={zoomIn:r,zoomOut:s},e[4]=r,e[5]=s,e[6]=a):a=e[6],a},dde=()=>{const e=Zt.c(6),t=d3(),n=wr();let r;e[0]!==n||e[1]!==t?(r=()=>{cde(n,t)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i;return e[3]!==t.url||e[4]!==r?(i={props:{draggable:!0,src:t.url,onDoubleClickCapture:r}},e[3]=t.url,e[4]=r,e[5]=i):i=e[5],i};Eu("img")({propsHook:dde});const hde=()=>{const e=Zt.c(17),t=yp("currentPreview"),n=yp("translate"),r=yp("scale"),i=oe.useRef(null),s=r<=1,{zoomIn:a,zoomOut:o}=fde();let l;e[0]!==r?(l=()=>{if(r<=1)return;const E=i.current?.getBoundingClientRect();E&&ll.set("boundingClientRect",E)},e[0]=r,e[1]=l):l=e[1];let u;e[2]!==r||e[3]!==n.x||e[4]!==n.y?(u=[n.x,n.y,r],e[2]=r,e[3]=n.x,e[4]=n.y,e[5]=u):u=e[5],Z.useEffect(l,u);const f=t?.url,h=s?"zoom-in":"zoom-out",m=`scale(${r}) translate(${`${n.x}px`}, ${`${n.y}px`})`;let g;e[6]!==h||e[7]!==m?(g={cursor:h,transform:m},e[6]=h,e[7]=m,e[8]=g):g=e[8];let b;e[9]!==s||e[10]!==a||e[11]!==o?(b=E=>{E.stopPropagation(),s?a():o()},e[9]=s,e[10]=a,e[11]=o,e[12]=b):b=e[12];let y;return e[13]!==f||e[14]!==g||e[15]!==b?(y={props:{draggable:!1,ref:i,src:f,style:g,onClick:b}},e[13]=f,e[14]=g,e[15]=b,e[16]=y):y=e[16],y};Eu("img")({propsHook:hde});Jc({showCaption:!1},{name:"media"});const Pa=Rm({isEditing:!1,url:""},{mutative:!0,name:"floatingMedia"}).extendActions(({set:e})=>({reset:()=>{e("url",""),e("isEditing",!1)}})),{useState:cwe,useValue:fwe}=Pa,pde=()=>{const e=Zt.c(5),t=d3();let n;e[0]!==t.sourceUrl||e[1]!==t.url?(n=()=>{Pa.set("url",t.sourceUrl??t.url),Pa.set("isEditing",!0)},e[0]=t.sourceUrl,e[1]=t.url,e[2]=n):n=e[2];const r=n;let i;return e[3]!==r?(i={props:{onClick:r}},e[3]=r,e[4]=i):i=e[4],i};Eu("button")({propsHook:pde});const mde=(e,{element:t,plugin:n})=>{let r=Pa.get("url");if(r===t.url)return Pa.actions.reset(),!0;const{isUrl:i=Lc,transformUrl:s}=e.getOptions(n);if(s&&(r=s(r)),!i(r))return;const a=Pfe(r,{urlParsers:[qfe,nde]});return e.tf.setNodes({id:a?.id,provider:a?.provider,sourceUrl:a?.sourceUrl,url:a?.url??r}),Pa.actions.reset(),e.tf.focus({at:e.selection}),!0},gde=e=>{const t=Zt.c(11),{plugin:n}=e,r=wr(),i=d3();let s;t[0]!==r||t[1]!==i||t[2]!==n?(s=m=>{mde(r,{element:i,plugin:n})&&m.preventDefault()},t[0]=r,t[1]=i,t[2]=n,t[3]=s):s=t[3];let a,o;t[4]===Symbol.for("react.memo_cache_sentinel")?(a={enableOnFormTags:["INPUT"]},o=[],t[4]=a,t[5]=o):(a=t[4],o=t[5]),t4("enter",s,a,o);let l;t[6]!==r?(l=()=>{Pa.get("isEditing")&&(Pa.actions.reset(),r.tf.focus({at:r.selection}))},t[6]=r,t[7]=l):l=t[7];let u,f;t[8]===Symbol.for("react.memo_cache_sentinel")?(u={enableOnContentEditable:!0,enableOnFormTags:["INPUT"]},f=[],t[8]=u,t[9]=f):(u=t[8],f=t[9]),t4("escape",l,u,f);let h;return t[10]===Symbol.for("react.memo_cache_sentinel")?(h={defaultValue:Pa.get("url")},t[10]=h):h=t[10],h},vde=e=>{const t=Zt.c(2),{defaultValue:n}=e,r=yde;let i;return t[0]!==n?(i={props:{autoFocus:!0,defaultValue:n,onChange:r}},t[0]=n,t[1]=i):i=t[1],i};Eu("input")({propsHook:vde,stateHook:gde});function yde(e){Pa.set("url",e.target.value)}const ul={INVALID_FILE_TYPE:400,TOO_MANY_FILES:402,INVALID_FILE_SIZE:403,TOO_LESS_FILES:405,TOO_LARGE:413},cl=(e,t)=>({code:e,data:t}),xde=e=>typeof e=="object"&&e!==null&&"code"in e&&"data"in e&&typeof e.data=="object"&&e.data!==null&&"files"in e.data&&Array.isArray(e.data.files),bde={"application/andrew-inset":{extensions:["ez"],source:"iana"},"application/applixware":{extensions:["aw"],source:"apache"},"application/atom+xml":{extensions:["atom"],source:"iana"},"application/atomcat+xml":{extensions:["atomcat"],source:"iana"},"application/atomdeleted+xml":{extensions:["atomdeleted"],source:"iana"},"application/atomsvc+xml":{extensions:["atomsvc"],source:"iana"},"application/atsc-dwd+xml":{extensions:["dwd"],source:"iana"},"application/atsc-held+xml":{extensions:["held"],source:"iana"},"application/atsc-rsat+xml":{extensions:["rsat"],source:"iana"},"application/calendar+xml":{extensions:["xcs"],source:"iana"},"application/ccxml+xml":{extensions:["ccxml"],source:"iana"},"application/cdfx+xml":{extensions:["cdfx"],source:"iana"},"application/cdmi-capability":{extensions:["cdmia"],source:"iana"},"application/cdmi-container":{extensions:["cdmic"],source:"iana"},"application/cdmi-domain":{extensions:["cdmid"],source:"iana"},"application/cdmi-object":{extensions:["cdmio"],source:"iana"},"application/cdmi-queue":{extensions:["cdmiq"],source:"iana"},"application/cpl+xml":{extensions:["cpl"],source:"iana"},"application/cu-seeme":{extensions:["cu"],source:"apache"},"application/dash+xml":{extensions:["mpd"],source:"iana"},"application/dash-patch+xml":{extensions:["mpp"],source:"iana"},"application/davmount+xml":{extensions:["davmount"],source:"iana"},"application/dicom":{extensions:["dcm"],source:"iana"},"application/docbook+xml":{extensions:["dbk"],source:"apache"},"application/dssc+der":{extensions:["dssc"],source:"iana"},"application/dssc+xml":{extensions:["xdssc"],source:"iana"},"application/ecmascript":{extensions:["es","ecma"],source:"iana"},"application/emma+xml":{extensions:["emma"],source:"iana"},"application/emotionml+xml":{extensions:["emotionml"],source:"iana"},"application/epub+zip":{extensions:["epub"],source:"iana"},"application/exi":{extensions:["exi"],source:"iana"},"application/express":{extensions:["exp"],source:"iana"},"application/fdt+xml":{extensions:["fdt"],source:"iana"},"application/font-tdpfr":{extensions:["pfr"],source:"iana"},"application/geo+json":{extensions:["geojson"],source:"iana"},"application/gml+xml":{extensions:["gml"],source:"iana"},"application/gpx+xml":{extensions:["gpx"],source:"apache"},"application/gxf":{extensions:["gxf"],source:"apache"},"application/gzip":{extensions:["gz"],source:"iana"},"application/hyperstudio":{extensions:["stk"],source:"iana"},"application/inkml+xml":{extensions:["ink","inkml"],source:"iana"},"application/ipfix":{extensions:["ipfix"],source:"iana"},"application/its+xml":{extensions:["its"],source:"iana"},"application/java-archive":{extensions:["jar","war","ear"],source:"apache"},"application/java-serialized-object":{extensions:["ser"],source:"apache"},"application/java-vm":{extensions:["class"],source:"apache"},"application/javascript":{charset:"UTF-8",extensions:["js","mjs"],source:"iana"},"application/json":{charset:"UTF-8",extensions:["json","map"],source:"iana"},"application/jsonml+json":{extensions:["jsonml"],source:"apache"},"application/ld+json":{extensions:["jsonld"],source:"iana"},"application/lgr+xml":{extensions:["lgr"],source:"iana"},"application/lost+xml":{extensions:["lostxml"],source:"iana"},"application/mac-binhex40":{extensions:["hqx"],source:"iana"},"application/mac-compactpro":{extensions:["cpt"],source:"apache"},"application/mads+xml":{extensions:["mads"],source:"iana"},"application/manifest+json":{charset:"UTF-8",extensions:["webmanifest"],source:"iana"},"application/marc":{extensions:["mrc"],source:"iana"},"application/marcxml+xml":{extensions:["mrcx"],source:"iana"},"application/mathematica":{extensions:["ma","nb","mb"],source:"iana"},"application/mathml+xml":{extensions:["mathml"],source:"iana"},"application/mbox":{extensions:["mbox"],source:"iana"},"application/media-policy-dataset+xml":{extensions:["mpf"],source:"iana"},"application/mediaservercontrol+xml":{extensions:["mscml"],source:"iana"},"application/metalink4+xml":{extensions:["meta4"],source:"iana"},"application/metalink+xml":{extensions:["metalink"],source:"apache"},"application/mets+xml":{extensions:["mets"],source:"iana"},"application/mmt-aei+xml":{extensions:["maei"],source:"iana"},"application/mmt-usd+xml":{extensions:["musd"],source:"iana"},"application/mods+xml":{extensions:["mods"],source:"iana"},"application/mp4":{extensions:["mp4s","m4p"],source:"iana"},"application/mp21":{extensions:["m21","mp21"],source:"iana"},"application/msword":{extensions:["doc","dot"],source:"iana"},"application/mxf":{extensions:["mxf"],source:"iana"},"application/n-quads":{extensions:["nq"],source:"iana"},"application/n-triples":{extensions:["nt"],source:"iana"},"application/node":{extensions:["cjs"],source:"iana"},"application/octet-stream":{extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],source:"iana"},"application/oda":{extensions:["oda"],source:"iana"},"application/oebps-package+xml":{extensions:["opf"],source:"iana"},"application/ogg":{extensions:["ogx"],source:"iana"},"application/omdoc+xml":{extensions:["omdoc"],source:"apache"},"application/onenote":{extensions:["onetoc","onetoc2","onetmp","onepkg"],source:"apache"},"application/oxps":{extensions:["oxps"],source:"iana"},"application/p2p-overlay+xml":{extensions:["relo"],source:"iana"},"application/patch-ops-error+xml":{extensions:["xer"],source:"iana"},"application/pdf":{extensions:["pdf"],source:"iana"},"application/pgp-encrypted":{extensions:["pgp"],source:"iana"},"application/pgp-keys":{extensions:["asc"],source:"iana"},"application/pgp-signature":{extensions:["asc","sig"],source:"iana"},"application/pics-rules":{extensions:["prf"],source:"apache"},"application/pkcs7-mime":{extensions:["p7m","p7c"],source:"iana"},"application/pkcs7-signature":{extensions:["p7s"],source:"iana"},"application/pkcs8":{extensions:["p8"],source:"iana"},"application/pkcs10":{extensions:["p10"],source:"iana"},"application/pkix-attr-cert":{extensions:["ac"],source:"iana"},"application/pkix-cert":{extensions:["cer"],source:"iana"},"application/pkix-crl":{extensions:["crl"],source:"iana"},"application/pkix-pkipath":{extensions:["pkipath"],source:"iana"},"application/pkixcmp":{extensions:["pki"],source:"iana"},"application/pls+xml":{extensions:["pls"],source:"iana"},"application/postscript":{extensions:["ai","eps","ps"],source:"iana"},"application/provenance+xml":{extensions:["provx"],source:"iana"},"application/prs.cww":{extensions:["cww"],source:"iana"},"application/pskc+xml":{extensions:["pskcxml"],source:"iana"},"application/rdf+xml":{extensions:["rdf","owl"],source:"iana"},"application/reginfo+xml":{extensions:["rif"],source:"iana"},"application/relax-ng-compact-syntax":{extensions:["rnc"],source:"iana"},"application/resource-lists+xml":{extensions:["rl"],source:"iana"},"application/resource-lists-diff+xml":{extensions:["rld"],source:"iana"},"application/rls-services+xml":{extensions:["rs"],source:"iana"},"application/route-apd+xml":{extensions:["rapd"],source:"iana"},"application/route-s-tsid+xml":{extensions:["sls"],source:"iana"},"application/route-usd+xml":{extensions:["rusd"],source:"iana"},"application/rpki-ghostbusters":{extensions:["gbr"],source:"iana"},"application/rpki-manifest":{extensions:["mft"],source:"iana"},"application/rpki-roa":{extensions:["roa"],source:"iana"},"application/rsd+xml":{extensions:["rsd"],source:"apache"},"application/rss+xml":{extensions:["rss"],source:"apache"},"application/rtf":{extensions:["rtf"],source:"iana"},"application/sbml+xml":{extensions:["sbml"],source:"iana"},"application/scvp-cv-request":{extensions:["scq"],source:"iana"},"application/scvp-cv-response":{extensions:["scs"],source:"iana"},"application/scvp-vp-request":{extensions:["spq"],source:"iana"},"application/scvp-vp-response":{extensions:["spp"],source:"iana"},"application/sdp":{extensions:["sdp"],source:"iana"},"application/senml+xml":{extensions:["senmlx"],source:"iana"},"application/sensml+xml":{extensions:["sensmlx"],source:"iana"},"application/set-payment-initiation":{extensions:["setpay"],source:"iana"},"application/set-registration-initiation":{extensions:["setreg"],source:"iana"},"application/shf+xml":{extensions:["shf"],source:"iana"},"application/sieve":{extensions:["siv","sieve"],source:"iana"},"application/smil+xml":{extensions:["smi","smil"],source:"iana"},"application/sparql-query":{extensions:["rq"],source:"iana"},"application/sparql-results+xml":{extensions:["srx"],source:"iana"},"application/srgs":{extensions:["gram"],source:"iana"},"application/srgs+xml":{extensions:["grxml"],source:"iana"},"application/sru+xml":{extensions:["sru"],source:"iana"},"application/ssdl+xml":{extensions:["ssdl"],source:"apache"},"application/ssml+xml":{extensions:["ssml"],source:"iana"},"application/swid+xml":{extensions:["swidtag"],source:"iana"},"application/tei+xml":{extensions:["tei","teicorpus"],source:"iana"},"application/thraud+xml":{extensions:["tfi"],source:"iana"},"application/timestamped-data":{extensions:["tsd"],source:"iana"},"application/trig":{extensions:["trig"],source:"iana"},"application/ttml+xml":{extensions:["ttml"],source:"iana"},"application/urc-ressheet+xml":{extensions:["rsheet"],source:"iana"},"application/urc-targetdesc+xml":{extensions:["td"],source:"iana"},"application/vnd.3gpp2.tcap":{extensions:["tcap"],source:"iana"},"application/vnd.3gpp.pic-bw-large":{extensions:["plb"],source:"iana"},"application/vnd.3gpp.pic-bw-small":{extensions:["psb"],source:"iana"},"application/vnd.3gpp.pic-bw-var":{extensions:["pvb"],source:"iana"},"application/vnd.3m.post-it-notes":{extensions:["pwn"],source:"iana"},"application/vnd.1000minds.decision-model+xml":{extensions:["1km"],source:"iana"},"application/vnd.accpac.simply.aso":{extensions:["aso"],source:"iana"},"application/vnd.accpac.simply.imp":{extensions:["imp"],source:"iana"},"application/vnd.acucobol":{extensions:["acu"],source:"iana"},"application/vnd.acucorp":{extensions:["atc","acutc"],source:"iana"},"application/vnd.adobe.air-application-installer-package+zip":{extensions:["air"],source:"apache"},"application/vnd.adobe.formscentral.fcdt":{extensions:["fcdt"],source:"iana"},"application/vnd.adobe.fxp":{extensions:["fxp","fxpl"],source:"iana"},"application/vnd.adobe.xdp+xml":{extensions:["xdp"],source:"iana"},"application/vnd.adobe.xfdf":{extensions:["xfdf"],source:"iana"},"application/vnd.age":{extensions:["age"],source:"iana"},"application/vnd.ahead.space":{extensions:["ahead"],source:"iana"},"application/vnd.airzip.filesecure.azf":{extensions:["azf"],source:"iana"},"application/vnd.airzip.filesecure.azs":{extensions:["azs"],source:"iana"},"application/vnd.amazon.ebook":{extensions:["azw"],source:"apache"},"application/vnd.americandynamics.acc":{extensions:["acc"],source:"iana"},"application/vnd.amiga.ami":{extensions:["ami"],source:"iana"},"application/vnd.android.package-archive":{extensions:["apk"],source:"apache"},"application/vnd.anser-web-certificate-issue-initiation":{extensions:["cii"],source:"iana"},"application/vnd.anser-web-funds-transfer-initiation":{extensions:["fti"],source:"apache"},"application/vnd.antix.game-component":{extensions:["atx"],source:"iana"},"application/vnd.apple.installer+xml":{extensions:["mpkg"],source:"iana"},"application/vnd.apple.keynote":{extensions:["key"],source:"iana"},"application/vnd.apple.mpegurl":{extensions:["m3u8"],source:"iana"},"application/vnd.apple.numbers":{extensions:["numbers"],source:"iana"},"application/vnd.apple.pages":{extensions:["pages"],source:"iana"},"application/vnd.aristanetworks.swi":{extensions:["swi"],source:"iana"},"application/vnd.astraea-software.iota":{extensions:["iota"],source:"iana"},"application/vnd.audiograph":{extensions:["aep"],source:"iana"},"application/vnd.balsamiq.bmml+xml":{extensions:["bmml"],source:"iana"},"application/vnd.blueice.multipass":{extensions:["mpm"],source:"iana"},"application/vnd.bmi":{extensions:["bmi"],source:"iana"},"application/vnd.businessobjects":{extensions:["rep"],source:"iana"},"application/vnd.chemdraw+xml":{extensions:["cdxml"],source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{extensions:["mmd"],source:"iana"},"application/vnd.cinderella":{extensions:["cdy"],source:"iana"},"application/vnd.citationstyles.style+xml":{extensions:["csl"],source:"iana"},"application/vnd.claymore":{extensions:["cla"],source:"iana"},"application/vnd.cloanto.rp9":{extensions:["rp9"],source:"iana"},"application/vnd.clonk.c4group":{extensions:["c4g","c4d","c4f","c4p","c4u"],source:"iana"},"application/vnd.cluetrust.cartomobile-config":{extensions:["c11amc"],source:"iana"},"application/vnd.cluetrust.cartomobile-config-pkg":{extensions:["c11amz"],source:"iana"},"application/vnd.commonspace":{extensions:["csp"],source:"iana"},"application/vnd.contact.cmsg":{extensions:["cdbcmsg"],source:"iana"},"application/vnd.cosmocaller":{extensions:["cmc"],source:"iana"},"application/vnd.crick.clicker":{extensions:["clkx"],source:"iana"},"application/vnd.crick.clicker.keyboard":{extensions:["clkk"],source:"iana"},"application/vnd.crick.clicker.palette":{extensions:["clkp"],source:"iana"},"application/vnd.crick.clicker.template":{extensions:["clkt"],source:"iana"},"application/vnd.crick.clicker.wordbank":{extensions:["clkw"],source:"iana"},"application/vnd.criticaltools.wbs+xml":{extensions:["wbs"],source:"iana"},"application/vnd.ctc-posml":{extensions:["pml"],source:"iana"},"application/vnd.cups-ppd":{extensions:["ppd"],source:"iana"},"application/vnd.curl.car":{extensions:["car"],source:"apache"},"application/vnd.curl.pcurl":{extensions:["pcurl"],source:"apache"},"application/vnd.dart":{extensions:["dart"],source:"iana"},"application/vnd.data-vision.rdz":{extensions:["rdz"],source:"iana"},"application/vnd.dbf":{extensions:["dbf"],source:"iana"},"application/vnd.dece.data":{extensions:["uvf","uvvf","uvd","uvvd"],source:"iana"},"application/vnd.dece.ttml+xml":{extensions:["uvt","uvvt"],source:"iana"},"application/vnd.dece.unspecified":{extensions:["uvx","uvvx"],source:"iana"},"application/vnd.dece.zip":{extensions:["uvz","uvvz"],source:"iana"},"application/vnd.denovo.fcselayout-link":{extensions:["fe_launch"],source:"iana"},"application/vnd.dna":{extensions:["dna"],source:"iana"},"application/vnd.dolby.mlp":{extensions:["mlp"],source:"apache"},"application/vnd.dpgraph":{extensions:["dpg"],source:"iana"},"application/vnd.dreamfactory":{extensions:["dfac"],source:"iana"},"application/vnd.ds-keypoint":{extensions:["kpxx"],source:"apache"},"application/vnd.dvb.ait":{extensions:["ait"],source:"iana"},"application/vnd.dvb.service":{extensions:["svc"],source:"iana"},"application/vnd.dynageo":{extensions:["geo"],source:"iana"},"application/vnd.ecowin.chart":{extensions:["mag"],source:"iana"},"application/vnd.enliven":{extensions:["nml"],source:"iana"},"application/vnd.epson.esf":{extensions:["esf"],source:"iana"},"application/vnd.epson.msf":{extensions:["msf"],source:"iana"},"application/vnd.epson.quickanime":{extensions:["qam"],source:"iana"},"application/vnd.epson.salt":{extensions:["slt"],source:"iana"},"application/vnd.epson.ssf":{extensions:["ssf"],source:"iana"},"application/vnd.eszigno3+xml":{extensions:["es3","et3"],source:"iana"},"application/vnd.ezpix-album":{extensions:["ez2"],source:"iana"},"application/vnd.ezpix-package":{extensions:["ez3"],source:"iana"},"application/vnd.fdf":{extensions:["fdf"],source:"iana"},"application/vnd.fdsn.mseed":{extensions:["mseed"],source:"iana"},"application/vnd.fdsn.seed":{extensions:["seed","dataless"],source:"iana"},"application/vnd.flographit":{extensions:["gph"],source:"iana"},"application/vnd.fluxtime.clip":{extensions:["ftc"],source:"iana"},"application/vnd.framemaker":{extensions:["fm","frame","maker","book"],source:"iana"},"application/vnd.frogans.fnc":{extensions:["fnc"],source:"iana"},"application/vnd.frogans.ltf":{extensions:["ltf"],source:"iana"},"application/vnd.fsc.weblaunch":{extensions:["fsc"],source:"iana"},"application/vnd.fujitsu.oasys":{extensions:["oas"],source:"iana"},"application/vnd.fujitsu.oasys2":{extensions:["oa2"],source:"iana"},"application/vnd.fujitsu.oasys3":{extensions:["oa3"],source:"iana"},"application/vnd.fujitsu.oasysgp":{extensions:["fg5"],source:"iana"},"application/vnd.fujitsu.oasysprs":{extensions:["bh2"],source:"iana"},"application/vnd.fujixerox.ddd":{extensions:["ddd"],source:"iana"},"application/vnd.fujixerox.docuworks":{extensions:["xdw"],source:"iana"},"application/vnd.fujixerox.docuworks.binder":{extensions:["xbd"],source:"iana"},"application/vnd.fuzzysheet":{extensions:["fzs"],source:"iana"},"application/vnd.genomatix.tuxedo":{extensions:["txd"],source:"iana"},"application/vnd.geogebra.file":{extensions:["ggb"],source:"iana"},"application/vnd.geogebra.tool":{extensions:["ggt"],source:"iana"},"application/vnd.geometry-explorer":{extensions:["gex","gre"],source:"iana"},"application/vnd.geonext":{extensions:["gxt"],source:"iana"},"application/vnd.geoplan":{extensions:["g2w"],source:"iana"},"application/vnd.geospace":{extensions:["g3w"],source:"iana"},"application/vnd.gmx":{extensions:["gmx"],source:"iana"},"application/vnd.google-earth.kml+xml":{extensions:["kml"],source:"iana"},"application/vnd.google-earth.kmz":{extensions:["kmz"],source:"iana"},"application/vnd.grafeq":{extensions:["gqf","gqs"],source:"iana"},"application/vnd.groove-account":{extensions:["gac"],source:"iana"},"application/vnd.groove-help":{extensions:["ghf"],source:"iana"},"application/vnd.groove-identity-message":{extensions:["gim"],source:"iana"},"application/vnd.groove-injector":{extensions:["grv"],source:"iana"},"application/vnd.groove-tool-message":{extensions:["gtm"],source:"iana"},"application/vnd.groove-tool-template":{extensions:["tpl"],source:"iana"},"application/vnd.groove-vcard":{extensions:["vcg"],source:"iana"},"application/vnd.hal+xml":{extensions:["hal"],source:"iana"},"application/vnd.handheld-entertainment+xml":{extensions:["zmm"],source:"iana"},"application/vnd.hbci":{extensions:["hbci"],source:"iana"},"application/vnd.hhe.lesson-player":{extensions:["les"],source:"iana"},"application/vnd.hp-hpgl":{extensions:["hpgl"],source:"iana"},"application/vnd.hp-hpid":{extensions:["hpid"],source:"iana"},"application/vnd.hp-hps":{extensions:["hps"],source:"iana"},"application/vnd.hp-jlyt":{extensions:["jlt"],source:"iana"},"application/vnd.hp-pcl":{extensions:["pcl"],source:"iana"},"application/vnd.hp-pclxl":{extensions:["pclxl"],source:"iana"},"application/vnd.hydrostatix.sof-data":{extensions:["sfd-hdstx"],source:"iana"},"application/vnd.ibm.minipay":{extensions:["mpy"],source:"iana"},"application/vnd.ibm.modcap":{extensions:["afp","listafp","list3820"],source:"iana"},"application/vnd.ibm.rights-management":{extensions:["irm"],source:"iana"},"application/vnd.ibm.secure-container":{extensions:["sc"],source:"iana"},"application/vnd.iccprofile":{extensions:["icc","icm"],source:"iana"},"application/vnd.igloader":{extensions:["igl"],source:"iana"},"application/vnd.immervision-ivp":{extensions:["ivp"],source:"iana"},"application/vnd.immervision-ivu":{extensions:["ivu"],source:"iana"},"application/vnd.insors.igm":{extensions:["igm"],source:"iana"},"application/vnd.intercon.formnet":{extensions:["xpw","xpx"],source:"iana"},"application/vnd.intergeo":{extensions:["i2g"],source:"iana"},"application/vnd.intu.qbo":{extensions:["qbo"],source:"iana"},"application/vnd.intu.qfx":{extensions:["qfx"],source:"iana"},"application/vnd.ipunplugged.rcprofile":{extensions:["rcprofile"],source:"iana"},"application/vnd.irepository.package+xml":{extensions:["irp"],source:"iana"},"application/vnd.is-xpr":{extensions:["xpr"],source:"iana"},"application/vnd.isac.fcs":{extensions:["fcs"],source:"iana"},"application/vnd.jam":{extensions:["jam"],source:"iana"},"application/vnd.jcp.javame.midlet-rms":{extensions:["rms"],source:"iana"},"application/vnd.jisp":{extensions:["jisp"],source:"iana"},"application/vnd.joost.joda-archive":{extensions:["joda"],source:"iana"},"application/vnd.kahootz":{extensions:["ktz","ktr"],source:"iana"},"application/vnd.kde.karbon":{extensions:["karbon"],source:"iana"},"application/vnd.kde.kchart":{extensions:["chrt"],source:"iana"},"application/vnd.kde.kformula":{extensions:["kfo"],source:"iana"},"application/vnd.kde.kivio":{extensions:["flw"],source:"iana"},"application/vnd.kde.kontour":{extensions:["kon"],source:"iana"},"application/vnd.kde.kpresenter":{extensions:["kpr","kpt"],source:"iana"},"application/vnd.kde.kspread":{extensions:["ksp"],source:"iana"},"application/vnd.kde.kword":{extensions:["kwd","kwt"],source:"iana"},"application/vnd.kenameaapp":{extensions:["htke"],source:"iana"},"application/vnd.kidspiration":{extensions:["kia"],source:"iana"},"application/vnd.kinar":{extensions:["kne","knp"],source:"iana"},"application/vnd.koan":{extensions:["skp","skd","skt","skm"],source:"iana"},"application/vnd.kodak-descriptor":{extensions:["sse"],source:"iana"},"application/vnd.las.las+xml":{extensions:["lasxml"],source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{extensions:["lbd"],source:"iana"},"application/vnd.llamagraphics.life-balance.exchange+xml":{extensions:["lbe"],source:"iana"},"application/vnd.lotus-1-2-3":{extensions:["123"],source:"iana"},"application/vnd.lotus-approach":{extensions:["apr"],source:"iana"},"application/vnd.lotus-freelance":{extensions:["pre"],source:"iana"},"application/vnd.lotus-notes":{extensions:["nsf"],source:"iana"},"application/vnd.lotus-organizer":{extensions:["org"],source:"iana"},"application/vnd.lotus-screencam":{extensions:["scm"],source:"iana"},"application/vnd.lotus-wordpro":{extensions:["lwp"],source:"iana"},"application/vnd.macports.portpkg":{extensions:["portpkg"],source:"iana"},"application/vnd.mapbox-vector-tile":{extensions:["mvt"],source:"iana"},"application/vnd.mcd":{extensions:["mcd"],source:"iana"},"application/vnd.medcalcdata":{extensions:["mc1"],source:"iana"},"application/vnd.mediastation.cdkey":{extensions:["cdkey"],source:"iana"},"application/vnd.mfer":{extensions:["mwf"],source:"iana"},"application/vnd.mfmp":{extensions:["mfm"],source:"iana"},"application/vnd.micrografx.flo":{extensions:["flo"],source:"iana"},"application/vnd.micrografx.igx":{extensions:["igx"],source:"iana"},"application/vnd.mif":{extensions:["mif"],source:"iana"},"application/vnd.mobius.daf":{extensions:["daf"],source:"iana"},"application/vnd.mobius.dis":{extensions:["dis"],source:"iana"},"application/vnd.mobius.mbk":{extensions:["mbk"],source:"iana"},"application/vnd.mobius.mqy":{extensions:["mqy"],source:"iana"},"application/vnd.mobius.msl":{extensions:["msl"],source:"iana"},"application/vnd.mobius.plc":{extensions:["plc"],source:"iana"},"application/vnd.mobius.txf":{extensions:["txf"],source:"iana"},"application/vnd.mophun.application":{extensions:["mpn"],source:"iana"},"application/vnd.mophun.certificate":{extensions:["mpc"],source:"iana"},"application/vnd.mozilla.xul+xml":{extensions:["xul"],source:"iana"},"application/vnd.ms-artgalry":{extensions:["cil"],source:"iana"},"application/vnd.ms-cab-compressed":{extensions:["cab"],source:"iana"},"application/vnd.ms-excel":{extensions:["xls","xlm","xla","xlc","xlt","xlw"],source:"iana"},"application/vnd.ms-excel.addin.macroenabled.12":{extensions:["xlam"],source:"iana"},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{extensions:["xlsb"],source:"iana"},"application/vnd.ms-excel.sheet.macroenabled.12":{extensions:["xlsm"],source:"iana"},"application/vnd.ms-excel.template.macroenabled.12":{extensions:["xltm"],source:"iana"},"application/vnd.ms-fontobject":{extensions:["eot"],source:"iana"},"application/vnd.ms-htmlhelp":{extensions:["chm"],source:"iana"},"application/vnd.ms-ims":{extensions:["ims"],source:"iana"},"application/vnd.ms-lrm":{extensions:["lrm"],source:"iana"},"application/vnd.ms-officetheme":{extensions:["thmx"],source:"iana"},"application/vnd.ms-pki.seccat":{extensions:["cat"],source:"apache"},"application/vnd.ms-pki.stl":{extensions:["stl"],source:"apache"},"application/vnd.ms-powerpoint":{extensions:["ppt","pps","pot"],source:"iana"},"application/vnd.ms-powerpoint.addin.macroenabled.12":{extensions:["ppam"],source:"iana"},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{extensions:["pptm"],source:"iana"},"application/vnd.ms-powerpoint.slide.macroenabled.12":{extensions:["sldm"],source:"iana"},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{extensions:["ppsm"],source:"iana"},"application/vnd.ms-powerpoint.template.macroenabled.12":{extensions:["potm"],source:"iana"},"application/vnd.ms-project":{extensions:["mpp","mpt"],source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{extensions:["docm"],source:"iana"},"application/vnd.ms-word.template.macroenabled.12":{extensions:["dotm"],source:"iana"},"application/vnd.ms-works":{extensions:["wps","wks","wcm","wdb"],source:"iana"},"application/vnd.ms-wpl":{extensions:["wpl"],source:"iana"},"application/vnd.ms-xpsdocument":{extensions:["xps"],source:"iana"},"application/vnd.mseq":{extensions:["mseq"],source:"iana"},"application/vnd.musician":{extensions:["mus"],source:"iana"},"application/vnd.muvee.style":{extensions:["msty"],source:"iana"},"application/vnd.mynfc":{extensions:["taglet"],source:"iana"},"application/vnd.neurolanguage.nlu":{extensions:["nlu"],source:"iana"},"application/vnd.nitf":{extensions:["ntf","nitf"],source:"iana"},"application/vnd.noblenet-directory":{extensions:["nnd"],source:"iana"},"application/vnd.noblenet-sealer":{extensions:["nns"],source:"iana"},"application/vnd.noblenet-web":{extensions:["nnw"],source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{extensions:["ac"],source:"iana"},"application/vnd.nokia.n-gage.data":{extensions:["ngdat"],source:"iana"},"application/vnd.nokia.n-gage.symbian.install":{extensions:["n-gage"],source:"iana"},"application/vnd.nokia.radio-preset":{extensions:["rpst"],source:"iana"},"application/vnd.nokia.radio-presets":{extensions:["rpss"],source:"iana"},"application/vnd.novadigm.edm":{extensions:["edm"],source:"iana"},"application/vnd.novadigm.edx":{extensions:["edx"],source:"iana"},"application/vnd.novadigm.ext":{extensions:["ext"],source:"iana"},"application/vnd.oasis.opendocument.chart":{extensions:["odc"],source:"iana"},"application/vnd.oasis.opendocument.chart-template":{extensions:["otc"],source:"iana"},"application/vnd.oasis.opendocument.database":{extensions:["odb"],source:"iana"},"application/vnd.oasis.opendocument.formula":{extensions:["odf"],source:"iana"},"application/vnd.oasis.opendocument.formula-template":{extensions:["odft"],source:"iana"},"application/vnd.oasis.opendocument.graphics":{extensions:["odg"],source:"iana"},"application/vnd.oasis.opendocument.graphics-template":{extensions:["otg"],source:"iana"},"application/vnd.oasis.opendocument.image":{extensions:["odi"],source:"iana"},"application/vnd.oasis.opendocument.image-template":{extensions:["oti"],source:"iana"},"application/vnd.oasis.opendocument.presentation":{extensions:["odp"],source:"iana"},"application/vnd.oasis.opendocument.presentation-template":{extensions:["otp"],source:"iana"},"application/vnd.oasis.opendocument.spreadsheet":{extensions:["ods"],source:"iana"},"application/vnd.oasis.opendocument.spreadsheet-template":{extensions:["ots"],source:"iana"},"application/vnd.oasis.opendocument.text":{extensions:["odt"],source:"iana"},"application/vnd.oasis.opendocument.text-master":{extensions:["odm"],source:"iana"},"application/vnd.oasis.opendocument.text-template":{extensions:["ott"],source:"iana"},"application/vnd.oasis.opendocument.text-web":{extensions:["oth"],source:"iana"},"application/vnd.olpc-sugar":{extensions:["xo"],source:"iana"},"application/vnd.oma.dd2+xml":{extensions:["dd2"],source:"iana"},"application/vnd.openblox.game+xml":{extensions:["obgx"],source:"iana"},"application/vnd.openofficeorg.extension":{extensions:["oxt"],source:"apache"},"application/vnd.openstreetmap.data+xml":{extensions:["osm"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{extensions:["pptx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{extensions:["sldx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{extensions:["ppsx"],source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{extensions:["potx"],source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{extensions:["xlsx"],source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{extensions:["xltx"],source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{extensions:["docx"],source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{extensions:["dotx"],source:"iana"},"application/vnd.osgeo.mapguide.package":{extensions:["mgp"],source:"iana"},"application/vnd.osgi.dp":{extensions:["dp"],source:"iana"},"application/vnd.osgi.subsystem":{extensions:["esa"],source:"iana"},"application/vnd.palm":{extensions:["pdb","pqa","oprc"],source:"iana"},"application/vnd.pawaafile":{extensions:["paw"],source:"iana"},"application/vnd.pg.format":{extensions:["str"],source:"iana"},"application/vnd.pg.osasli":{extensions:["ei6"],source:"iana"},"application/vnd.picsel":{extensions:["efif"],source:"iana"},"application/vnd.pmi.widget":{extensions:["wg"],source:"iana"},"application/vnd.pocketlearn":{extensions:["plf"],source:"iana"},"application/vnd.powerbuilder6":{extensions:["pbd"],source:"iana"},"application/vnd.previewsystems.box":{extensions:["box"],source:"iana"},"application/vnd.proteus.magazine":{extensions:["mgz"],source:"iana"},"application/vnd.publishare-delta-tree":{extensions:["qps"],source:"iana"},"application/vnd.pvi.ptid1":{extensions:["ptid"],source:"iana"},"application/vnd.quark.quarkxpress":{extensions:["qxd","qxt","qwd","qwt","qxl","qxb"],source:"iana"},"application/vnd.rar":{extensions:["rar"],source:"iana"},"application/vnd.realvnc.bed":{extensions:["bed"],source:"iana"},"application/vnd.recordare.musicxml":{extensions:["mxl"],source:"iana"},"application/vnd.recordare.musicxml+xml":{extensions:["musicxml"],source:"iana"},"application/vnd.rig.cryptonote":{extensions:["cryptonote"],source:"iana"},"application/vnd.rim.cod":{extensions:["cod"],source:"apache"},"application/vnd.rn-realmedia":{extensions:["rm"],source:"apache"},"application/vnd.rn-realmedia-vbr":{extensions:["rmvb"],source:"apache"},"application/vnd.route66.link66+xml":{extensions:["link66"],source:"iana"},"application/vnd.sailingtracker.track":{extensions:["st"],source:"iana"},"application/vnd.seemail":{extensions:["see"],source:"iana"},"application/vnd.sema":{extensions:["sema"],source:"iana"},"application/vnd.semd":{extensions:["semd"],source:"iana"},"application/vnd.semf":{extensions:["semf"],source:"iana"},"application/vnd.shana.informed.formdata":{extensions:["ifm"],source:"iana"},"application/vnd.shana.informed.formtemplate":{extensions:["itp"],source:"iana"},"application/vnd.shana.informed.interchange":{extensions:["iif"],source:"iana"},"application/vnd.shana.informed.package":{extensions:["ipk"],source:"iana"},"application/vnd.simtech-mindmapper":{extensions:["twd","twds"],source:"iana"},"application/vnd.smaf":{extensions:["mmf"],source:"iana"},"application/vnd.smart.teacher":{extensions:["teacher"],source:"iana"},"application/vnd.software602.filler.form+xml":{extensions:["fo"],source:"iana"},"application/vnd.solent.sdkm+xml":{extensions:["sdkm","sdkd"],source:"iana"},"application/vnd.spotfire.dxp":{extensions:["dxp"],source:"iana"},"application/vnd.spotfire.sfs":{extensions:["sfs"],source:"iana"},"application/vnd.stardivision.calc":{extensions:["sdc"],source:"apache"},"application/vnd.stardivision.draw":{extensions:["sda"],source:"apache"},"application/vnd.stardivision.impress":{extensions:["sdd"],source:"apache"},"application/vnd.stardivision.math":{extensions:["smf"],source:"apache"},"application/vnd.stardivision.writer":{extensions:["sdw","vor"],source:"apache"},"application/vnd.stardivision.writer-global":{extensions:["sgl"],source:"apache"},"application/vnd.stepmania.package":{extensions:["smzip"],source:"iana"},"application/vnd.stepmania.stepchart":{extensions:["sm"],source:"iana"},"application/vnd.sun.wadl+xml":{extensions:["wadl"],source:"iana"},"application/vnd.sun.xml.calc":{extensions:["sxc"],source:"apache"},"application/vnd.sun.xml.calc.template":{extensions:["stc"],source:"apache"},"application/vnd.sun.xml.draw":{extensions:["sxd"],source:"apache"},"application/vnd.sun.xml.draw.template":{extensions:["std"],source:"apache"},"application/vnd.sun.xml.impress":{extensions:["sxi"],source:"apache"},"application/vnd.sun.xml.impress.template":{extensions:["sti"],source:"apache"},"application/vnd.sun.xml.math":{extensions:["sxm"],source:"apache"},"application/vnd.sun.xml.writer":{extensions:["sxw"],source:"apache"},"application/vnd.sun.xml.writer.global":{extensions:["sxg"],source:"apache"},"application/vnd.sun.xml.writer.template":{extensions:["stw"],source:"apache"},"application/vnd.sus-calendar":{extensions:["sus","susp"],source:"iana"},"application/vnd.svd":{extensions:["svd"],source:"iana"},"application/vnd.symbian.install":{extensions:["sis","sisx"],source:"apache"},"application/vnd.syncml+xml":{charset:"UTF-8",extensions:["xsm"],source:"iana"},"application/vnd.syncml.dm+wbxml":{charset:"UTF-8",extensions:["bdm"],source:"iana"},"application/vnd.syncml.dm+xml":{charset:"UTF-8",extensions:["xdm"],source:"iana"},"application/vnd.syncml.dmddf+xml":{charset:"UTF-8",extensions:["ddf"],source:"iana"},"application/vnd.tao.intent-module-archive":{extensions:["tao"],source:"iana"},"application/vnd.tcpdump.pcap":{extensions:["pcap","cap","dmp"],source:"iana"},"application/vnd.tmobile-livetv":{extensions:["tmo"],source:"iana"},"application/vnd.trid.tpt":{extensions:["tpt"],source:"iana"},"application/vnd.triscape.mxs":{extensions:["mxs"],source:"iana"},"application/vnd.trueapp":{extensions:["tra"],source:"iana"},"application/vnd.ufdl":{extensions:["ufd","ufdl"],source:"iana"},"application/vnd.uiq.theme":{extensions:["utz"],source:"iana"},"application/vnd.umajin":{extensions:["umj"],source:"iana"},"application/vnd.unity":{extensions:["unityweb"],source:"iana"},"application/vnd.uoml+xml":{extensions:["uoml"],source:"iana"},"application/vnd.vcx":{extensions:["vcx"],source:"iana"},"application/vnd.visio":{extensions:["vsd","vst","vss","vsw"],source:"iana"},"application/vnd.visionary":{extensions:["vis"],source:"iana"},"application/vnd.vsf":{extensions:["vsf"],source:"iana"},"application/vnd.wap.wbxml":{charset:"UTF-8",extensions:["wbxml"],source:"iana"},"application/vnd.wap.wmlc":{extensions:["wmlc"],source:"iana"},"application/vnd.wap.wmlscriptc":{extensions:["wmlsc"],source:"iana"},"application/vnd.webturbo":{extensions:["wtb"],source:"iana"},"application/vnd.wolfram.player":{extensions:["nbp"],source:"iana"},"application/vnd.wordperfect":{extensions:["wpd"],source:"iana"},"application/vnd.wqd":{extensions:["wqd"],source:"iana"},"application/vnd.wt.stf":{extensions:["stf"],source:"iana"},"application/vnd.xara":{extensions:["xar"],source:"iana"},"application/vnd.xfdl":{extensions:["xfdl"],source:"iana"},"application/vnd.yamaha.hv-dic":{extensions:["hvd"],source:"iana"},"application/vnd.yamaha.hv-script":{extensions:["hvs"],source:"iana"},"application/vnd.yamaha.hv-voice":{extensions:["hvp"],source:"iana"},"application/vnd.yamaha.openscoreformat":{extensions:["osf"],source:"iana"},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{extensions:["osfpvg"],source:"iana"},"application/vnd.yamaha.smaf-audio":{extensions:["saf"],source:"iana"},"application/vnd.yamaha.smaf-phrase":{extensions:["spf"],source:"iana"},"application/vnd.yellowriver-custom-menu":{extensions:["cmp"],source:"iana"},"application/vnd.zul":{extensions:["zir","zirz"],source:"iana"},"application/vnd.zzazz.deck+xml":{extensions:["zaz"],source:"iana"},"application/voicexml+xml":{extensions:["vxml"],source:"iana"},"application/wasm":{extensions:["wasm"],source:"iana"},"application/watcherinfo+xml":{extensions:["wif"],source:"iana"},"application/widget":{extensions:["wgt"],source:"iana"},"application/winhlp":{extensions:["hlp"],source:"apache"},"application/wsdl+xml":{extensions:["wsdl"],source:"iana"},"application/wspolicy+xml":{extensions:["wspolicy"],source:"iana"},"application/x-7z-compressed":{extensions:["7z"],source:"apache"},"application/x-abiword":{extensions:["abw"],source:"apache"},"application/x-ace-compressed":{extensions:["ace"],source:"apache"},"application/x-apple-diskimage":{extensions:["dmg"],source:"apache"},"application/x-authorware-bin":{extensions:["aab","x32","u32","vox"],source:"apache"},"application/x-authorware-map":{extensions:["aam"],source:"apache"},"application/x-authorware-seg":{extensions:["aas"],source:"apache"},"application/x-bcpio":{extensions:["bcpio"],source:"apache"},"application/x-bittorrent":{extensions:["torrent"],source:"apache"},"application/x-blorb":{extensions:["blb","blorb"],source:"apache"},"application/x-bzip":{extensions:["bz"],source:"apache"},"application/x-bzip2":{extensions:["bz2","boz"],source:"apache"},"application/x-cbr":{extensions:["cbr","cba","cbt","cbz","cb7"],source:"apache"},"application/x-cdlink":{extensions:["vcd"],source:"apache"},"application/x-cfs-compressed":{extensions:["cfs"],source:"apache"},"application/x-chat":{extensions:["chat"],source:"apache"},"application/x-chess-pgn":{extensions:["pgn"],source:"apache"},"application/x-cocoa":{extensions:["cco"],source:"nginx"},"application/x-conference":{extensions:["nsc"],source:"apache"},"application/x-cpio":{extensions:["cpio"],source:"apache"},"application/x-csh":{extensions:["csh"],source:"apache"},"application/x-debian-package":{extensions:["deb","udeb"],source:"apache"},"application/x-dgc-compressed":{extensions:["dgc"],source:"apache"},"application/x-director":{extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],source:"apache"},"application/x-doom":{extensions:["wad"],source:"apache"},"application/x-dtbncx+xml":{extensions:["ncx"],source:"apache"},"application/x-dtbook+xml":{extensions:["dtb"],source:"apache"},"application/x-dtbresource+xml":{extensions:["res"],source:"apache"},"application/x-dvi":{extensions:["dvi"],source:"apache"},"application/x-envoy":{extensions:["evy"],source:"apache"},"application/x-eva":{extensions:["eva"],source:"apache"},"application/x-font-bdf":{extensions:["bdf"],source:"apache"},"application/x-font-ghostscript":{extensions:["gsf"],source:"apache"},"application/x-font-linux-psf":{extensions:["psf"],source:"apache"},"application/x-font-pcf":{extensions:["pcf"],source:"apache"},"application/x-font-snf":{extensions:["snf"],source:"apache"},"application/x-font-type1":{extensions:["pfa","pfb","pfm","afm"],source:"apache"},"application/x-freearc":{extensions:["arc"],source:"apache"},"application/x-futuresplash":{extensions:["spl"],source:"apache"},"application/x-gca-compressed":{extensions:["gca"],source:"apache"},"application/x-glulx":{extensions:["ulx"],source:"apache"},"application/x-gnumeric":{extensions:["gnumeric"],source:"apache"},"application/x-gramps-xml":{extensions:["gramps"],source:"apache"},"application/x-gtar":{extensions:["gtar"],source:"apache"},"application/x-hdf":{extensions:["hdf"],source:"apache"},"application/x-install-instructions":{extensions:["install"],source:"apache"},"application/x-iso9660-image":{extensions:["iso"],source:"apache"},"application/x-java-archive-diff":{extensions:["jardiff"],source:"nginx"},"application/x-java-jnlp-file":{extensions:["jnlp"],source:"apache"},"application/x-latex":{extensions:["latex"],source:"apache"},"application/x-lzh-compressed":{extensions:["lzh","lha"],source:"apache"},"application/x-makeself":{extensions:["run"],source:"nginx"},"application/x-mie":{extensions:["mie"],source:"apache"},"application/x-mobipocket-ebook":{extensions:["prc","mobi"],source:"apache"},"application/x-ms-application":{extensions:["application"],source:"apache"},"application/x-ms-shortcut":{extensions:["lnk"],source:"apache"},"application/x-ms-wmd":{extensions:["wmd"],source:"apache"},"application/x-ms-wmz":{extensions:["wmz"],source:"apache"},"application/x-ms-xbap":{extensions:["xbap"],source:"apache"},"application/x-msaccess":{extensions:["mdb"],source:"apache"},"application/x-msbinder":{extensions:["obd"],source:"apache"},"application/x-mscardfile":{extensions:["crd"],source:"apache"},"application/x-msclip":{extensions:["clp"],source:"apache"},"application/x-msdownload":{extensions:["exe","dll","com","bat","msi"],source:"apache"},"application/x-msmediaview":{extensions:["mvb","m13","m14"],source:"apache"},"application/x-msmetafile":{extensions:["wmf","wmz","emf","emz"],source:"apache"},"application/x-msmoney":{extensions:["mny"],source:"apache"},"application/x-mspublisher":{extensions:["pub"],source:"apache"},"application/x-msschedule":{extensions:["scd"],source:"apache"},"application/x-msterminal":{extensions:["trm"],source:"apache"},"application/x-mswrite":{extensions:["wri"],source:"apache"},"application/x-netcdf":{extensions:["nc","cdf"],source:"apache"},"application/x-nzb":{extensions:["nzb"],source:"apache"},"application/x-perl":{extensions:["pl","pm"],source:"nginx"},"application/x-pilot":{extensions:["prc","pdb"],source:"nginx"},"application/x-pkcs7-certificates":{extensions:["p7b","spc"],source:"apache"},"application/x-pkcs7-certreqresp":{extensions:["p7r"],source:"apache"},"application/x-pkcs12":{extensions:["p12","pfx"],source:"apache"},"application/x-rar-compressed":{extensions:["rar"],source:"apache"},"application/x-redhat-package-manager":{extensions:["rpm"],source:"nginx"},"application/x-research-info-systems":{extensions:["ris"],source:"apache"},"application/x-sea":{extensions:["sea"],source:"nginx"},"application/x-sh":{extensions:["sh"],source:"apache"},"application/x-shar":{extensions:["shar"],source:"apache"},"application/x-shockwave-flash":{extensions:["swf"],source:"apache"},"application/x-silverlight-app":{extensions:["xap"],source:"apache"},"application/x-sql":{extensions:["sql"],source:"apache"},"application/x-stuffit":{extensions:["sit"],source:"apache"},"application/x-stuffitx":{extensions:["sitx"],source:"apache"},"application/x-subrip":{extensions:["srt"],source:"apache"},"application/x-sv4cpio":{extensions:["sv4cpio"],source:"apache"},"application/x-sv4crc":{extensions:["sv4crc"],source:"apache"},"application/x-t3vm-image":{extensions:["t3"],source:"apache"},"application/x-tads":{extensions:["gam"],source:"apache"},"application/x-tar":{extensions:["tar"],source:"apache"},"application/x-tcl":{extensions:["tcl","tk"],source:"apache"},"application/x-tex":{extensions:["tex"],source:"apache"},"application/x-tex-tfm":{extensions:["tfm"],source:"apache"},"application/x-texinfo":{extensions:["texinfo","texi"],source:"apache"},"application/x-tgif":{extensions:["obj"],source:"apache"},"application/x-ustar":{extensions:["ustar"],source:"apache"},"application/x-wais-source":{extensions:["src"],source:"apache"},"application/x-x509-ca-cert":{extensions:["der","crt","pem"],source:"iana"},"application/x-xfig":{extensions:["fig"],source:"apache"},"application/x-xliff+xml":{extensions:["xlf"],source:"apache"},"application/x-xpinstall":{extensions:["xpi"],source:"apache"},"application/x-xz":{extensions:["xz"],source:"apache"},"application/x-zmachine":{extensions:["z1","z2","z3","z4","z5","z6","z7","z8"],source:"apache"},"application/xaml+xml":{extensions:["xaml"],source:"apache"},"application/xcap-att+xml":{extensions:["xav"],source:"iana"},"application/xcap-caps+xml":{extensions:["xca"],source:"iana"},"application/xcap-diff+xml":{extensions:["xdf"],source:"iana"},"application/xcap-el+xml":{extensions:["xel"],source:"iana"},"application/xcap-ns+xml":{extensions:["xns"],source:"iana"},"application/xenc+xml":{extensions:["xenc"],source:"iana"},"application/xhtml+xml":{extensions:["xhtml","xht"],source:"iana"},"application/xliff+xml":{extensions:["xlf"],source:"iana"},"application/xml":{extensions:["xml","xsl","xsd","rng"],source:"iana"},"application/xml-dtd":{extensions:["dtd"],source:"iana"},"application/xop+xml":{extensions:["xop"],source:"iana"},"application/xproc+xml":{extensions:["xpl"],source:"apache"},"application/xslt+xml":{extensions:["xsl","xslt"],source:"iana"},"application/xspf+xml":{extensions:["xspf"],source:"apache"},"application/xv+xml":{extensions:["mxml","xhvml","xvml","xvm"],source:"iana"},"application/yaml":{extensions:["yaml","yml"],source:"iana"},"application/yang":{extensions:["yang"],source:"iana"},"application/yin+xml":{extensions:["yin"],source:"iana"},"application/zip":{extensions:["zip"],source:"iana"}},wde={"audio/3gpp":{extensions:["3gpp"],source:"iana"},"audio/adpcm":{extensions:["adp"],source:"apache"},"audio/amr":{extensions:["amr"],source:"iana"},"audio/basic":{extensions:["au","snd"],source:"iana"},"audio/midi":{extensions:["mid","midi","kar","rmi"],source:"apache"},"audio/mobile-xmf":{extensions:["mxmf"],source:"iana"},"audio/mp4":{extensions:["m4a","mp4a"],source:"iana"},"audio/mpeg":{extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"],source:"iana"},"audio/ogg":{extensions:["oga","ogg","spx","opus"],source:"iana"},"audio/s3m":{extensions:["s3m"],source:"apache"},"audio/silk":{extensions:["sil"],source:"apache"},"audio/vnd.dece.audio":{extensions:["uva","uvva"],source:"iana"},"audio/vnd.digital-winds":{extensions:["eol"],source:"iana"},"audio/vnd.dra":{extensions:["dra"],source:"iana"},"audio/vnd.dts":{extensions:["dts"],source:"iana"},"audio/vnd.dts.hd":{extensions:["dtshd"],source:"iana"},"audio/vnd.lucent.voice":{extensions:["lvp"],source:"iana"},"audio/vnd.ms-playready.media.pya":{extensions:["pya"],source:"iana"},"audio/vnd.nuera.ecelp4800":{extensions:["ecelp4800"],source:"iana"},"audio/vnd.nuera.ecelp7470":{extensions:["ecelp7470"],source:"iana"},"audio/vnd.nuera.ecelp9600":{extensions:["ecelp9600"],source:"iana"},"audio/vnd.rip":{extensions:["rip"],source:"iana"},"audio/webm":{extensions:["weba"],source:"apache"},"audio/x-aac":{extensions:["aac"],source:"apache"},"audio/x-aiff":{extensions:["aif","aiff","aifc"],source:"apache"},"audio/x-caf":{extensions:["caf"],source:"apache"},"audio/x-flac":{extensions:["flac"],source:"apache"},"audio/x-gsm":{extensions:["gsm"],source:"apache"},"audio/x-m4a":{extensions:["m4a"],source:"nginx"},"audio/x-matroska":{extensions:["mka"],source:"apache"},"audio/x-mpegurl":{extensions:["m3u"],source:"apache"},"audio/x-ms-wax":{extensions:["wax"],source:"apache"},"audio/x-ms-wma":{extensions:["wma"],source:"apache"},"audio/x-pn-realaudio":{extensions:["ram","ra"],source:"apache"},"audio/x-pn-realaudio-plugin":{extensions:["rmp"],source:"apache"},"audio/x-realaudio":{extensions:["ra"],source:"nginx"},"audio/x-wav":{extensions:["wav"],source:"apache"},"audio/xm":{extensions:["xm"],source:"apache"}},Ede={"image/aces":{extensions:["exr"],source:"iana"},"image/avci":{extensions:["avci"],source:"iana"},"image/avcs":{extensions:["avcs"],source:"iana"},"image/avif":{extensions:["avif"],source:"iana"},"image/bmp":{extensions:["bmp"],source:"iana"},"image/cgm":{extensions:["cgm"],source:"iana"},"image/dicom-rle":{extensions:["drle"],source:"iana"},"image/emf":{extensions:["emf"],source:"iana"},"image/fits":{extensions:["fits"],source:"iana"},"image/g3fax":{extensions:["g3"],source:"iana"},"image/gif":{extensions:["gif"],source:"iana"},"image/heic":{extensions:["heic"],source:"iana"},"image/heic-sequence":{extensions:["heics"],source:"iana"},"image/heif":{extensions:["heif"],source:"iana"},"image/heif-sequence":{extensions:["heifs"],source:"iana"},"image/hej2k":{extensions:["hej2"],source:"iana"},"image/hsj2":{extensions:["hsj2"],source:"iana"},"image/ief":{extensions:["ief"],source:"iana"},"image/jls":{extensions:["jls"],source:"iana"},"image/jp2":{extensions:["jp2","jpg2"],source:"iana"},"image/jpeg":{extensions:["jpeg","jpg","jpe","jfif","pjpeg","pjp"],source:"iana"},"image/jph":{extensions:["jph"],source:"iana"},"image/jphc":{extensions:["jhc"],source:"iana"},"image/jpm":{extensions:["jpm"],source:"iana"},"image/jpx":{extensions:["jpx","jpf"],source:"iana"},"image/jxr":{extensions:["jxr"],source:"iana"},"image/jxra":{extensions:["jxra"],source:"iana"},"image/jxrs":{extensions:["jxrs"],source:"iana"},"image/jxs":{extensions:["jxs"],source:"iana"},"image/jxsc":{extensions:["jxsc"],source:"iana"},"image/jxsi":{extensions:["jxsi"],source:"iana"},"image/jxss":{extensions:["jxss"],source:"iana"},"image/ktx":{extensions:["ktx"],source:"iana"},"image/ktx2":{extensions:["ktx2"],source:"iana"},"image/png":{extensions:["png"],source:"iana"},"image/prs.btif":{extensions:["btif"],source:"iana"},"image/prs.pti":{extensions:["pti"],source:"iana"},"image/sgi":{extensions:["sgi"],source:"apache"},"image/svg+xml":{extensions:["svg","svgz"],source:"iana"},"image/t38":{extensions:["t38"],source:"iana"},"image/tiff":{extensions:["tif","tiff"],source:"iana"},"image/tiff-fx":{extensions:["tfx"],source:"iana"},"image/vnd.adobe.photoshop":{extensions:["psd"],source:"iana"},"image/vnd.airzip.accelerator.azv":{extensions:["azv"],source:"iana"},"image/vnd.dece.graphic":{extensions:["uvi","uvvi","uvg","uvvg"],source:"iana"},"image/vnd.djvu":{extensions:["djvu","djv"],source:"iana"},"image/vnd.dvb.subtitle":{extensions:["sub"],source:"iana"},"image/vnd.dwg":{extensions:["dwg"],source:"iana"},"image/vnd.dxf":{extensions:["dxf"],source:"iana"},"image/vnd.fastbidsheet":{extensions:["fbs"],source:"iana"},"image/vnd.fpx":{extensions:["fpx"],source:"iana"},"image/vnd.fst":{extensions:["fst"],source:"iana"},"image/vnd.fujixerox.edmics-mmr":{extensions:["mmr"],source:"iana"},"image/vnd.fujixerox.edmics-rlc":{extensions:["rlc"],source:"iana"},"image/vnd.microsoft.icon":{extensions:["ico"],source:"iana"},"image/vnd.ms-modi":{extensions:["mdi"],source:"iana"},"image/vnd.ms-photo":{extensions:["wdp"],source:"apache"},"image/vnd.net-fpx":{extensions:["npx"],source:"iana"},"image/vnd.pco.b16":{extensions:["b16"],source:"iana"},"image/vnd.tencent.tap":{extensions:["tap"],source:"iana"},"image/vnd.valve.source.texture":{extensions:["vtf"],source:"iana"},"image/vnd.wap.wbmp":{extensions:["wbmp"],source:"iana"},"image/vnd.xiff":{extensions:["xif"],source:"iana"},"image/vnd.zbrush.pcx":{extensions:["pcx"],source:"iana"},"image/webp":{extensions:["webp"],source:"apache"},"image/wmf":{extensions:["wmf"],source:"iana"},"image/x-3ds":{extensions:["3ds"],source:"apache"},"image/x-cmu-raster":{extensions:["ras"],source:"apache"},"image/x-cmx":{extensions:["cmx"],source:"apache"},"image/x-freehand":{extensions:["fh","fhc","fh4","fh5","fh7"],source:"apache"},"image/x-icon":{extensions:["ico"],source:"apache"},"image/x-jng":{extensions:["jng"],source:"nginx"},"image/x-mrsid-image":{extensions:["sid"],source:"apache"},"image/x-ms-bmp":{extensions:["bmp"],source:"nginx"},"image/x-pcx":{extensions:["pcx"],source:"apache"},"image/x-pict":{extensions:["pic","pct"],source:"apache"},"image/x-portable-anymap":{extensions:["pnm"],source:"apache"},"image/x-portable-bitmap":{extensions:["pbm"],source:"apache"},"image/x-portable-graymap":{extensions:["pgm"],source:"apache"},"image/x-portable-pixmap":{extensions:["ppm"],source:"apache"},"image/x-rgb":{extensions:["rgb"],source:"apache"},"image/x-tga":{extensions:["tga"],source:"apache"},"image/x-xbitmap":{extensions:["xbm"],source:"apache"},"image/x-xpixmap":{extensions:["xpm"],source:"apache"},"image/x-xwindowdump":{extensions:["xwd"],source:"apache"}},Cde={"chemical/x-cdx":{extensions:["cdx"],source:"apache"},"chemical/x-cif":{extensions:["cif"],source:"apache"},"chemical/x-cmdf":{extensions:["cmdf"],source:"apache"},"chemical/x-cml":{extensions:["cml"],source:"apache"},"chemical/x-csml":{extensions:["csml"],source:"apache"},"chemical/x-xyz":{extensions:["xyz"],source:"apache"},"font/collection":{extensions:["ttc"],source:"iana"},"font/otf":{extensions:["otf"],source:"iana"},"font/ttf":{extensions:["ttf"],source:"iana"},"font/woff":{extensions:["woff"],source:"iana"},"font/woff2":{extensions:["woff2"],source:"iana"},"message/disposition-notification":{extensions:["disposition-notification"],source:"iana"},"message/global":{extensions:["u8msg"],source:"iana"},"message/global-delivery-status":{extensions:["u8dsn"],source:"iana"},"message/global-disposition-notification":{extensions:["u8mdn"],source:"iana"},"message/global-headers":{extensions:["u8hdr"],source:"iana"},"message/rfc822":{extensions:["eml","mime"],source:"iana"},"message/vnd.wfa.wsc":{extensions:["wsc"],source:"iana"},"model/3mf":{extensions:["3mf"],source:"iana"},"model/gltf+json":{extensions:["gltf"],source:"iana"},"model/gltf-binary":{extensions:["glb"],source:"iana"},"model/iges":{extensions:["igs","iges"],source:"iana"},"model/mesh":{extensions:["msh","mesh","silo"],source:"iana"},"model/mtl":{extensions:["mtl"],source:"iana"},"model/obj":{extensions:["obj"],source:"iana"},"model/step":{extensions:[".p21",".stp",".step",".stpnc",".210"],source:"iana"},"model/step+xml":{extensions:["stpx"],source:"iana"},"model/step+zip":{extensions:["stpz"],source:"iana"},"model/step-xml+zip":{extensions:["stpxz"],source:"iana"},"model/stl":{extensions:["stl"],source:"iana"},"model/vnd.collada+xml":{extensions:["dae"],source:"iana"},"model/vnd.dwf":{extensions:["dwf"],source:"iana"},"model/vnd.gdl":{extensions:["gdl"],source:"iana"},"model/vnd.gtw":{extensions:["gtw"],source:"iana"},"model/vnd.mts":{extensions:["mts"],source:"iana"},"model/vnd.opengex":{extensions:["ogex"],source:"iana"},"model/vnd.parasolid.transmit.binary":{extensions:["x_b"],source:"iana"},"model/vnd.parasolid.transmit.text":{extensions:["x_t"],source:"iana"},"model/vnd.sap.vds":{extensions:["vds"],source:"iana"},"model/vnd.usdz+zip":{extensions:["usdz"],source:"iana"},"model/vnd.valve.source.compiled-map":{extensions:["bsp"],source:"iana"},"model/vnd.vtu":{extensions:["vtu"],source:"iana"},"model/vrml":{extensions:["wrl","vrml"],source:"iana"},"model/x3d+binary":{extensions:["x3db","x3dbz"],source:"apache"},"model/x3d+fastinfoset":{extensions:["x3db"],source:"iana"},"model/x3d+vrml":{extensions:["x3dv","x3dvz"],source:"apache"},"model/x3d+xml":{extensions:["x3d","x3dz"],source:"iana"},"model/x3d-vrml":{extensions:["x3dv"],source:"iana"},"x-conference/x-cooltalk":{extensions:["ice"],source:"apache"}},kde={"video/3gpp":{extensions:["3gp","3gpp"],source:"iana"},"video/3gpp2":{extensions:["3g2"],source:"iana"},"video/h261":{extensions:["h261"],source:"iana"},"video/h263":{extensions:["h263"],source:"iana"},"video/h264":{extensions:["h264"],source:"iana"},"video/iso.segment":{extensions:["m4s"],source:"iana"},"video/jpeg":{extensions:["jpgv"],source:"iana"},"video/jpm":{extensions:["jpm","jpgm"],source:"apache"},"video/mj2":{extensions:["mj2","mjp2"],source:"iana"},"video/mp2t":{extensions:["ts"],source:"iana"},"video/mp4":{extensions:["mp4","mp4v","mpg4"],source:"iana"},"video/mpeg":{extensions:["mpeg","mpg","mpe","m1v","m2v"],source:"iana"},"video/ogg":{extensions:["ogv"],source:"iana"},"video/quicktime":{extensions:["qt","mov"],source:"iana"},"video/vnd.dece.hd":{extensions:["uvh","uvvh"],source:"iana"},"video/vnd.dece.mobile":{extensions:["uvm","uvvm"],source:"iana"},"video/vnd.dece.pd":{extensions:["uvp","uvvp"],source:"iana"},"video/vnd.dece.sd":{extensions:["uvs","uvvs"],source:"iana"},"video/vnd.dece.video":{extensions:["uvv","uvvv"],source:"iana"},"video/vnd.dvb.file":{extensions:["dvb"],source:"iana"},"video/vnd.fvt":{extensions:["fvt"],source:"iana"},"video/vnd.mpegurl":{extensions:["mxu","m4u"],source:"iana"},"video/vnd.ms-playready.media.pyv":{extensions:["pyv"],source:"iana"},"video/vnd.uvvu.mp4":{extensions:["uvu","uvvu"],source:"iana"},"video/vnd.vivo":{extensions:["viv"],source:"iana"},"video/webm":{extensions:["webm"],source:"apache"},"video/x-f4v":{extensions:["f4v"],source:"apache"},"video/x-fli":{extensions:["fli"],source:"apache"},"video/x-flv":{extensions:["flv"],source:"apache"},"video/x-m4v":{extensions:["m4v"],source:"apache"},"video/x-matroska":{extensions:["mkv","mk3d","mks"],source:"apache"},"video/x-mng":{extensions:["mng"],source:"apache"},"video/x-ms-asf":{extensions:["asf","asx"],source:"apache"},"video/x-ms-vob":{extensions:["vob"],source:"apache"},"video/x-ms-wm":{extensions:["wm"],source:"apache"},"video/x-ms-wmv":{extensions:["wmv"],source:"apache"},"video/x-ms-wmx":{extensions:["wmx"],source:"apache"},"video/x-ms-wvx":{extensions:["wvx"],source:"apache"},"video/x-msvideo":{extensions:["avi"],source:"apache"},"video/x-sgi-movie":{extensions:["movie"],source:"apache"},"video/x-smv":{extensions:["smv"],source:"apache"}},Dde={"text/cache-manifest":{extensions:["appcache","manifest"],source:"iana"},"text/calendar":{extensions:["ics","ifb"],source:"iana"},"text/css":{charset:"UTF-8",extensions:["css"],source:"iana"},"text/csv":{extensions:["csv"],source:"iana"},"text/html":{extensions:["html","htm","shtml"],source:"iana"},"text/markdown":{extensions:["markdown","md"],source:"iana"},"text/mathml":{extensions:["mml"],source:"nginx"},"text/n3":{charset:"UTF-8",extensions:["n3"],source:"iana"},"text/plain":{extensions:["txt","text","conf","def","list","log","in","ini"],source:"iana"},"text/prs.lines.tag":{extensions:["dsc"],source:"iana"},"text/richtext":{extensions:["rtx"],source:"iana"},"text/rtf":{extensions:["rtf"],source:"iana"},"text/sgml":{extensions:["sgml","sgm"],source:"iana"},"text/shex":{extensions:["shex"],source:"iana"},"text/spdx":{extensions:["spdx"],source:"iana"},"text/tab-separated-values":{extensions:["tsv"],source:"iana"},"text/troff":{extensions:["t","tr","roff","man","me","ms"],source:"iana"},"text/turtle":{charset:"UTF-8",extensions:["ttl"],source:"iana"},"text/uri-list":{extensions:["uri","uris","urls"],source:"iana"},"text/vcard":{extensions:["vcard"],source:"iana"},"text/vnd.curl":{extensions:["curl"],source:"iana"},"text/vnd.curl.dcurl":{extensions:["dcurl"],source:"apache"},"text/vnd.curl.mcurl":{extensions:["mcurl"],source:"apache"},"text/vnd.curl.scurl":{extensions:["scurl"],source:"apache"},"text/vnd.dvb.subtitle":{extensions:["sub"],source:"iana"},"text/vnd.familysearch.gedcom":{extensions:["ged"],source:"iana"},"text/vnd.fly":{extensions:["fly"],source:"iana"},"text/vnd.fmi.flexstor":{extensions:["flx"],source:"iana"},"text/vnd.graphviz":{extensions:["gv"],source:"iana"},"text/vnd.in3d.3dml":{extensions:["3dml"],source:"iana"},"text/vnd.in3d.spot":{extensions:["spot"],source:"iana"},"text/vnd.sun.j2me.app-descriptor":{charset:"UTF-8",extensions:["jad"],source:"iana"},"text/vnd.wap.wml":{extensions:["wml"],source:"iana"},"text/vnd.wap.wmlscript":{extensions:["wmls"],source:"iana"},"text/vtt":{charset:"UTF-8",extensions:["vtt"],source:"iana"},"text/x-asm":{extensions:["s","asm"],source:"apache"},"text/x-c":{extensions:["c","cc","cxx","cpp","h","hh","dic"],source:"apache"},"text/x-component":{extensions:["htc"],source:"nginx"},"text/x-fortran":{extensions:["f","for","f77","f90"],source:"apache"},"text/x-java-source":{extensions:["java"],source:"apache"},"text/x-nfo":{extensions:["nfo"],source:"apache"},"text/x-opml":{extensions:["opml"],source:"apache"},"text/x-pascal":{extensions:["p","pas"],source:"apache"},"text/x-setext":{extensions:["etx"],source:"apache"},"text/x-sfv":{extensions:["sfv"],source:"apache"},"text/x-uuencode":{extensions:["uu"],source:"apache"},"text/x-vcalendar":{extensions:["vcs"],source:"apache"},"text/x-vcard":{extensions:["vcf"],source:"apache"},"text/xml":{extensions:["xml"],source:"iana"}},Sde={...bde,...wde,...Ede,...Dde,...kde,...Cde};function _de(e){if(!e||typeof e!="string")return!1;const t=Ode(`x.${e}`).toLowerCase().slice(1);return t&&Tde()[t]||!1}const Ade={},W9={};function Tde(){return Nde(Ade,W9),W9}const z2=Sde;let K9=!1;function Nde(e,t){if(K9)return;K9=!0;const n=["nginx","apache",void 0,"iana"];Object.keys(z2).forEach(r=>{const i=z2[r],s=i.extensions;if(s?.length){e[r]=s;for(const a of s){if(t[a]){const o=n.indexOf(z2[t[a]].source),l=n.indexOf(i.source);if(t[a]!=="application/octet-stream"&&(o>l||o===l&&t[a].startsWith("application/")))continue}t[a]=r}}})}function Ode(e){const t=e.lastIndexOf(".");return t===-1?"":e.slice(Math.max(0,t))}const FM=(e,t)=>{const n=e.type||_de(e.name);if(!n){if(t.includes("blob"))return"blob";throw cl(ul.INVALID_FILE_TYPE,{allowedTypes:t,files:[e]})}if(t.some(i=>i.includes("/"))&&t.includes(n))return n;const r=n.toLowerCase()==="application/pdf"?"pdf":n.split("/")[0];if(!t.includes(r)){if(t.includes("blob"))return"blob";throw cl(ul.INVALID_FILE_TYPE,{allowedTypes:t,files:[e]})}return r},Bde=(e,t)=>t[FM(e,Object.keys(t))].mediaType,w4=new WeakMap,Pde=(e,t)=>{const n=IM(e);w4.set(e,!0),t(),w4.set(e,n)},IM=e=>w4.get(e)??!1,Rde=(e,t)=>{const n={audio:[],blob:[],image:[],pdf:[],text:[],video:[]};for(const r of e)n[FM(r,Object.keys(t))].push(r);return n},G9=["B","KB","MB","GB"],Fde=(e,t)=>{const n=new RegExp(`^(\\d+)(\\.\\d+)?\\s*(${G9.join("|")})$`,"i").exec(e);if(!n)throw cl(ul.INVALID_FILE_SIZE,{files:[t]});const r=Number.parseFloat(n[1]),i=n[3].toUpperCase(),s=r*1024**G9.indexOf(i);return Math.floor(s)},Ide=(e,t,n)=>{const{maxFileCount:r=Number.POSITIVE_INFINITY,maxFileSize:i,minFileCount:s=1}=t;if(e.lengthr)throw cl(ul.TOO_MANY_FILES,{files:e,fileType:n,maxFileCount:r});for(const a of e){const o=Fde(i,a);if(a.size>o)throw cl(ul.TOO_LARGE,{files:[a],fileType:n,maxFileSize:i})}return!0},Mde=(e,t)=>{const n=Rde(e,t),r=Object.keys(n);for(const i of r){const s=t[i],a=n[i];a.length!==0&&Ide(a,s,i)}},Lde=(e,t,n)=>{const r=e.getApi(Xo),i=e.getOption(Xo,"uploadConfig"),s=e.getOption(Xo,"multiple");try{Mde(t,i)}catch(h){if(!xde(h))throw h;return e.setOption(Xo,"error",h)}if(!s&&t.length>1)return e.setOption(Xo,"error",cl(ul.TOO_MANY_FILES,{files:Array.from(t),fileType:null,maxFileCount:1}));const a=e.getOption(Xo,"maxFileCount")??3;if(t.length>a)return e.setOption(Xo,"error",cl(ul.TOO_MANY_FILES,{files:Array.from(t),fileType:null,maxFileCount:a}));let o;const{at:l,nextBlock:u=!0,...f}=n??{};Array.from(t).forEach((h,m)=>{m===0?l&&(o=l):o=o?Je.next(o):void 0;const g=kd();r.placeholder.addUploadingFile(g,h);const b=()=>{e.tf.insertNodes({id:g,children:[{text:""}],mediaType:Bde(h,i),type:e.getType(te.placeholder)},{at:o,nextBlock:u,...f})};e.getOption(Xo,"disableEmptyPlaceholder")?e.tf.withoutMerging(()=>{Pde(e,b)}):e.tf.withoutNormalizing(b)})},Xo=l3(ode,{options:{disableEmptyPlaceholder:!1,disableFileDrop:!1,error:null,maxFileCount:5,multiple:!0,uploadConfig:{audio:{maxFileCount:1,maxFileSize:"8MB",mediaType:te.audio,minFileCount:1},blob:{maxFileCount:1,maxFileSize:"8MB",mediaType:te.file,minFileCount:1},image:{maxFileCount:3,maxFileSize:"4MB",mediaType:te.img,minFileCount:1},pdf:{maxFileCount:1,maxFileSize:"4MB",mediaType:te.file,minFileCount:1},text:{maxFileCount:1,maxFileSize:"64KB",mediaType:te.file,minFileCount:1},video:{maxFileCount:1,maxFileSize:"16MB",mediaType:te.video,minFileCount:1}},uploadingFiles:{}}}).overrideEditor(({editor:e,tf:{writeHistory:t}})=>({transforms:{writeHistory(n,r){if(IM(e)){t(n,{...r,[te.placeholder]:!0});return}return t(n,r)}}})).extendEditorTransforms(({editor:e})=>({insert:{media:De(Lde,e)}})).extendApi(({getOption:e,setOption:t})=>({addUploadingFile:(n,r)=>{t("uploadingFiles",{...e("uploadingFiles"),[n]:r})},getUploadingFile:n=>e("uploadingFiles")[n],removeUploadingFile:n=>{const r=e("uploadingFiles");delete r[n],t("uploadingFiles",r)}})).extend(({getOption:e})=>({handlers:{onDrop:({editor:t,event:n,tf:r})=>{if(!e("disableFileDrop"))return;const{files:i}=n.dataTransfer;return i.length===0||(n.preventDefault(),n.stopPropagation(),!t.api.findEventRange(n))?!1:(r.insert.media(i),!0)},onPaste:({editor:t,event:n,tf:r})=>{const{files:i,types:s}=n.clipboardData;if(i.length>0&&!s.includes("text/html")){n.preventDefault(),n.stopPropagation();let a=!1;const o=t.api.block({highest:!0});if(o){const[l,u]=o;ht.string(l).length===0&&(t.tf.removeNodes({at:u}),r.insert.media(i,{at:u,nextBlock:!1}),a=!0)}return a||r.insert.media(i,{nextBlock:!1}),!0}return!1}}}));Jc({isUploading:!1,progresses:{},size:null,updatedFiles:[]},{name:"placeholder"});function zde(){return{enter:{mdxFlowExpression:qde,mdxTextExpression:$de},exit:{mdxFlowExpression:Y9,mdxFlowExpressionChunk:J9,mdxTextExpression:Y9,mdxTextExpressionChunk:J9}}}function jde(){return{handlers:{mdxFlowExpression:X9,mdxTextExpression:X9},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function qde(e){this.enter({type:"mdxFlowExpression",value:""},e),this.buffer()}function $de(e){this.enter({type:"mdxTextExpression",value:""},e),this.buffer()}function Y9(e){const t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type==="mdxFlowExpression"||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function J9(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function X9(e,t,n){const r=e.value||"";return"{"+n.indentLines(r,function(s,a,o){return(a===0||o?"":" ")+s})+"}"}function tm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Vde=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Q9={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function MM(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Ude(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Hde(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Z9(e){return Hde(e)||MM(e)}const eT=document.createElement("i");function zd(e){const t="&"+e+";";eT.innerHTML=t;const n=eT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const Wde=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Kde(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,a=-1,o="",l,u;n.position&&("start"in n.position||"indent"in n.position?(u=n.position.indent,l=n.position.start):l=n.position);let f=(l?l.line:0)||1,h=(l?l.column:0)||1,m=b(),g;for(s--;++s<=e.length;)if(g===10&&(h=(u?u[a]:0)||1),g=e.charCodeAt(s),g===38){const C=e.charCodeAt(s+1);if(C===9||C===10||C===12||C===32||C===38||C===60||Number.isNaN(C)||r&&C===r){o+=String.fromCharCode(g),h++;continue}const x=s+1;let S=x,O=x,_;if(C===35){O=++S;const W=e.charCodeAt(O);W===88||W===120?(_="hexadecimal",O=++S):_="decimal"}else _="named";let w="",T="",A="";const P=_==="named"?Z9:_==="decimal"?MM:Ude;for(O--;++O<=e.length;){const W=e.charCodeAt(O);if(!P(W))break;A+=String.fromCharCode(W),_==="named"&&Vde.includes(A)&&(w=A,T=zd(A))}let I=e.charCodeAt(O)===59;if(I){O++;const W=_==="named"?zd(A):!1;W&&(w=A,T=W)}let F=1+O-x,M="";if(!(!I&&n.nonTerminated===!1))if(!A)_!=="named"&&y(4,F);else if(_==="named"){if(I&&!T)y(5,1);else if(w!==A&&(O=S+w.length,F=1+O-S,I=!1),!I){const W=w?1:3;if(n.attribute){const ee=e.charCodeAt(O);ee===61?(y(W,F),T=""):Z9(ee)?T="":y(W,F)}else y(W,F)}M=T}else{I||y(2,F);let W=Number.parseInt(A,_==="hexadecimal"?16:10);if(Gde(W))y(7,F),M="�";else if(W in Q9)y(6,F),M=Q9[W];else{let ee="";Yde(W)&&y(6,F),W>65535&&(W-=65536,ee+=String.fromCharCode(W>>>10|55296),W=56320|W&1023),M=ee+String.fromCharCode(W)}}if(M){E(),m=b(),s=O-1,h+=O-x+1,i.push(M);const W=b();W.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,M,{start:m,end:W},e.slice(x-1,O)),m=W}else A=e.slice(x-1,O),o+=A,h+=A.length,s=O-1}else g===10&&(f++,a++,h=0),Number.isNaN(g)?E():(o+=String.fromCharCode(g),h++);return i.join("");function b(){return{line:f,column:h,offset:s+((l?l.offset:0)||0)}}function y(C,x){let S;n.warning&&(S=b(),S.column+=x,S.offset+=x,n.warning.call(n.warningContext||void 0,Wde[C],S,C))}function E(){o&&(i.push(o),n.text&&n.text.call(n.textContext||void 0,o,{start:m,end:b()}),o="")}}function Gde(e){return e>=55296&&e<=57343||e>1114111}function Yde(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const Jde=/["&'<>`]/g,Xde=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qde=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Zde=/[|\\{}()[\]^$+*?.]/g,tT=new WeakMap;function e0e(e,t){if(e=e.replace(t.subset?t0e(t.subset):Jde,r),t.subset||t.escapeOnly)return e;return e.replace(Xde,n).replace(Qde,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function t0e(e){let t=tT.get(e);return t||(t=n0e(e),tT.set(e,t)),t}function n0e(e){const t=[];let n=-1;for(;++n"}}function a0e(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,s=t.printWidth||Number.POSITIVE_INFINITY,a=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return o.peek=l0e,{handlers:{mdxJsxFlowElement:o,mdxJsxTextElement:o},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function o(l,u,f,h){const m=l.type==="mdxJsxFlowElement",g=l.name?!l.children||l.children.length===0:!1,b=zM(f),y=jM(b),E=f.createTracker(h),C=f.createTracker(h),x=[],S=(m?y:"")+"<"+(l.name||""),O=f.enter(l.type);if(E.move(S),C.move(S),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let P=-1;for(;++Ptm(M,a)?a:n;ee=U+i0e(M,{subset:[U]})+U}F=W+(ee?"=":"")+ee}x.push(F)}}let _=!1;const w=x.join(" ");m&&(/\r?\n|\r/.test(w)||E.current().now.column+w.length+(g?i?2:3:1)>s)&&(_=!0);let T=E,A=S;if(_){T=C;let P=-1;for(;++P"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?A+=T.move(f.containerPhrasing(l,{...T.current(),before:">",after:"<"})):(T.shift(2),A+=T.move(` +`),A+=T.move(o0e(l,f,T.current())),A+=T.move(` +`))),g||(A+=T.move((m?y:"")+"")),O(),A}}function o0e(e,t,n){const r=t.indexStack,i=e.children,s=t.createTracker(n),a=jM(zM(t)),o=[];let l=-1;for(r.push(-1);++l-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function jM(e){return LM.repeat(e)}function l0e(){return"<"}function u0e(){return{enter:{mdxjsEsm:f0e},exit:{mdxjsEsm:d0e,mdxjsEsmData:h0e}}}function c0e(){return{handlers:{mdxjsEsm:p0e}}}function f0e(e){this.enter({type:"mdxjsEsm",value:""},e),this.buffer()}function d0e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);const r=e.estree;n.value=t,r&&(n.data={estree:r})}function h0e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function p0e(e){return e.value||""}function qM(){return[zde(),s0e(),u0e()]}function $M(e){return{extensions:[jde(),a0e(e),c0e()]}}var m0e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],VM=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],g0e="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",UM="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",j2={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},q2="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",v0e={5:q2,"5module":q2+" export import",6:q2+" const class extends export import super"},HM=/^in(stanceof)?$/,y0e=new RegExp("["+UM+"]"),x0e=new RegExp("["+UM+g0e+"]");function C4(e,t){for(var n=65536,r=0;re)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function Fa(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&y0e.test(String.fromCharCode(e)):t===!1?!1:C4(e,VM)}function Eo(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&x0e.test(String.fromCharCode(e)):t===!1?!1:C4(e,VM)||C4(e,m0e)}var An=function(t,n){n===void 0&&(n={}),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function bs(e,t){return new An(e,{beforeExpr:!0,binop:t})}var ws={beforeExpr:!0},Ui={startsExpr:!0},B3={};function Cn(e,t){return t===void 0&&(t={}),t.keyword=e,B3[e]=new An(e,t)}var J={num:new An("num",Ui),regexp:new An("regexp",Ui),string:new An("string",Ui),name:new An("name",Ui),privateId:new An("privateId",Ui),eof:new An("eof"),bracketL:new An("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new An("]"),braceL:new An("{",{beforeExpr:!0,startsExpr:!0}),braceR:new An("}"),parenL:new An("(",{beforeExpr:!0,startsExpr:!0}),parenR:new An(")"),comma:new An(",",ws),semi:new An(";",ws),colon:new An(":",ws),dot:new An("."),question:new An("?",ws),questionDot:new An("?."),arrow:new An("=>",ws),template:new An("template"),invalidTemplate:new An("invalidTemplate"),ellipsis:new An("...",ws),backQuote:new An("`",Ui),dollarBraceL:new An("${",{beforeExpr:!0,startsExpr:!0}),eq:new An("=",{beforeExpr:!0,isAssign:!0}),assign:new An("_=",{beforeExpr:!0,isAssign:!0}),incDec:new An("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new An("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:bs("||",1),logicalAND:bs("&&",2),bitwiseOR:bs("|",3),bitwiseXOR:bs("^",4),bitwiseAND:bs("&",5),equality:bs("==/!=/===/!==",6),relational:bs("/<=/>=",7),bitShift:bs("<>/>>>",8),plusMin:new An("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:bs("%",10),star:bs("*",10),slash:bs("/",10),starstar:new An("**",{beforeExpr:!0}),coalesce:bs("??",1),_break:Cn("break"),_case:Cn("case",ws),_catch:Cn("catch"),_continue:Cn("continue"),_debugger:Cn("debugger"),_default:Cn("default",ws),_do:Cn("do",{isLoop:!0,beforeExpr:!0}),_else:Cn("else",ws),_finally:Cn("finally"),_for:Cn("for",{isLoop:!0}),_function:Cn("function",Ui),_if:Cn("if"),_return:Cn("return",ws),_switch:Cn("switch"),_throw:Cn("throw",ws),_try:Cn("try"),_var:Cn("var"),_const:Cn("const"),_while:Cn("while",{isLoop:!0}),_with:Cn("with"),_new:Cn("new",{beforeExpr:!0,startsExpr:!0}),_this:Cn("this",Ui),_super:Cn("super",Ui),_class:Cn("class",Ui),_extends:Cn("extends",ws),_export:Cn("export"),_import:Cn("import",Ui),_null:Cn("null",Ui),_true:Cn("true",Ui),_false:Cn("false",Ui),_in:Cn("in",{beforeExpr:!0,binop:7}),_instanceof:Cn("instanceof",{beforeExpr:!0,binop:7}),_typeof:Cn("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Cn("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Cn("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Yi=/\r\n?|\n|\u2028|\u2029/,b0e=new RegExp(Yi.source,"g");function sf(e){return e===10||e===13||e===8232||e===8233}function WM(e,t,n){n===void 0&&(n=e.length);for(var r=t;r>10)+55296,(e&1023)+56320))}var C0e=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,jd=function(t,n){this.line=t,this.column=n};jd.prototype.offset=function(t){return new jd(this.line,this.column+t)};var Zm=function(t,n,r){this.start=n,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function YM(e,t){for(var n=1,r=0;;){var i=WM(e,r,t);if(i<0)return new jd(n,t-r);++n,r=i}}var k4={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},aT=!1;function k0e(e){var t={};for(var n in k4)t[n]=e&&af(e,n)?e[n]:k4[n];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!aT&&typeof console=="object"&&console.warn&&(aT=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),iT(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}if(iT(t.onComment)&&(t.onComment=D0e(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function D0e(e,t){return function(n,r,i,s,a,o){var l={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(l.loc=new Zm(this,a,o)),e.ranges&&(l.range=[i,s]),t.push(l)}}var yu=1,ku=2,P3=4,JM=8,R3=16,XM=32,e1=64,QM=128,Du=256,p0=512,ZM=1024,t1=yu|ku|Du;function F3(e,t){return ku|(e?P3:0)|(t?JM:0)}var nm=0,I3=1,_o=2,eL=3,tL=4,nL=5,Lr=function(t,n,r){this.options=t=k0e(t),this.sourceFile=t.sourceFile,this.keywords=sl(v0e[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=j2[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=sl(i);var s=(i?i+" ":"")+j2.strict;this.reservedWordsStrict=sl(s),this.reservedWordsStrictBind=sl(s+" "+j2.strictBind),this.input=String(n),this.containsEsc=!1,this.pos=r||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):r?(this.lineStart=this.input.lastIndexOf(` +`,r-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(Yi).length)):this.lineStart=0,this.type=J.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?ku:yu),this.regexpState=null,this.privateNameStack=[]},Rs={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Lr.prototype.parse=function(){var t=this,n=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(n)})};Rs.inFunction.get=function(){return(this.currentVarScope().flags&ku)>0};Rs.inGenerator.get=function(){return(this.currentVarScope().flags&JM)>0};Rs.inAsync.get=function(){return(this.currentVarScope().flags&P3)>0};Rs.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Du|p0))return!1;if(n&ku)return(n&P3)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Rs.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&yu)};Rs.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&e1)>0||this.options.allowSuperOutsideMethod};Rs.allowDirectSuper.get=function(){return(this.currentThisScope().flags&QM)>0};Rs.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Rs.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Du|p0)||n&ku&&!(n&R3))return!0}return!1};Rs.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&ZM||!this.inModule&&t&yu)};Rs.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Du)>0};Lr.extend=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var r=this,i=0;i=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="="||i==="i"&&_0e(this,r))}e+=t[0].length,ei.lastIndex=e,e+=ei.exec(this.input)[0].length,this.input[e]===";"&&e++}};function _0e(e,t){for(var n=t+1,r=Math.min(e.input.length,t+11);n-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}};wi.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};wi.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case J._class:return e&&this.unexpected(),this.parseClass(i,!0);case J._if:return this.parseIfStatement(i);case J._return:return this.parseReturnStatement(i);case J._switch:return this.parseSwitchStatement(i);case J._throw:return this.parseThrowStatement(i);case J._try:return this.parseTryStatement(i);case J._const:case J._var:return s=s||this.value,e&&s!=="var"&&this.unexpected(),this.parseVarStatement(i,s);case J._while:return this.parseWhileStatement(i);case J._with:return this.parseWithStatement(i);case J.braceL:return this.parseBlock(!0,i);case J.semi:return this.parseEmptyStatement(i);case J._export:case J._import:if(this.options.ecmaVersion>10&&r===J._import){ei.lastIndex=this.pos;var a=ei.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===J._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var u=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(u)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,u),this.semicolon(),this.finishNode(i,"VariableDeclaration");var f=this.value,h=this.parseExpression();return r===J.name&&h.type==="Identifier"&&this.eat(J.colon)?this.parseLabeledStatement(i,f,h,e):this.parseExpressionStatement(i,h)}};_t.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next(),this.eat(J.semi)||this.insertSemicolon()?e.label=null:this.type!==J.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(J.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};_t.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(M3),this.enterScope(0),this.expect(J.parenL),this.type===J.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===J._var||this.type===J._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),o==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var u=this.containsEsc,f=new n1,h=this.start,m=t>-1?this.parseExprSubscripts(f,"await"):this.parseExpression(!0,f);return this.type===J._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===J._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(m.start===h&&!u&&m.type==="Identifier"&&m.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),s&&a&&this.raise(m.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(m,!1,f),this.checkLValPattern(m),this.parseForIn(e,m)):(this.checkExpressionErrors(f,!0),t>-1&&this.unexpected(t),this.parseFor(e,m))};_t.parseForAfterInit=function(e,t,n){return(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===J._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))};_t.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,md|(n?0:D4),!1,t)};_t.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(J._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};_t.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(J.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};_t.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(J.braceL),this.labels.push(A0e),this.enterScope(ZM);for(var t,n=!1;this.type!==J.braceR;)if(this.type===J._case||this.type===J._default){var r=this.type===J._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(J.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};_t.parseThrowStatement=function(e){return this.next(),Yi.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var T0e=[];_t.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?XM:0),this.checkLValPattern(e,t?tL:_o),this.expect(J.parenR),e};_t.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===J._catch){var t=this.startNode();this.next(),this.eat(J.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(J._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};_t.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};_t.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(M3),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};_t.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};_t.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};_t.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i=0;l--){var u=this.labels[l];if(u.statementStart===e.start)u.statementStart=this.start,u.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};_t.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};_t.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(J.braceL),e&&this.enterScope(0);this.type!==J.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};_t.parseFor=function(e,t){return e.init=t,this.expect(J.semi),e.test=this.type===J.semi?null:this.parseExpression(),this.expect(J.semi),e.update=this.type===J.parenR?null:this.parseExpression(),this.expect(J.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};_t.parseForIn=function(e,t){var n=this.type===J._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(J.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};_t.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(J.eq)?i.init=this.parseMaybeAssign(t):!r&&n==="const"&&!(this.type===J._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==J._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!r&&i.id.type!=="Identifier"&&!(t&&(this.type===J._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(J.comma))break}return e};_t.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?I3:_o,!1)};var md=1,D4=2,rL=4;_t.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===J.star&&t&D4&&this.unexpected(),e.generator=this.eat(J.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&md&&(e.id=t&rL&&this.type!==J.name?null:this.parseIdent(),e.id&&!(t&D4)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?I3:_o:eL));var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(F3(e.async,e.generator)),t&md||(e.id=this.type===J.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&md?"FunctionDeclaration":"FunctionExpression")};_t.parseFunctionParams=function(e){this.expect(J.parenL),e.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};_t.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(J.braceL);this.type!==J.braceR;){var a=this.parseClassElement(e.superClass!==null);a&&(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&a.key.type==="PrivateIdentifier"&&N0e(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};_t.parseClassElement=function(e){if(this.eat(J.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(J.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===J.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===J.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(J.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===J.parenL||a!=="method"||i||s){var u=!n.static&&rm(n,"constructor"),f=u&&e;u&&a!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=u?"constructor":a,this.parseClassMethod(n,i,s,f)}else this.parseClassField(n);return n};_t.isClassElementNameStart=function(){return this.type===J.name||this.type===J.privateId||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword};_t.parseClassElementName=function(e){this.type===J.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};_t.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&rm(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return e.kind==="get"&&s.params.length!==0&&this.raiseRecoverable(s.start,"getter should have no params"),e.kind==="set"&&s.params.length!==1&&this.raiseRecoverable(s.start,"setter should have exactly one param"),e.kind==="set"&&s.params[0].type==="RestElement"&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};_t.parseClassField=function(e){return rm(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&rm(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(J.eq)?(this.enterScope(p0|e1),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};_t.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Du|e1);this.type!==J.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};_t.parseClassId=function(e,t){this.type===J.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,_o,!1)):(t===!0&&this.unexpected(),e.id=null)};_t.parseClassSuper=function(e){e.superClass=this.eat(J._extends)?this.parseExprSubscripts(null,!1):null};_t.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};_t.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],s=0;s=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};_t.parseExport=function(e,t){if(this.next(),this.eat(J.star))return this.parseExportAllDeclaration(e,t);if(this.eat(J._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==J.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};_t.parseExportDeclaration=function(e){return this.parseStatement(null)};_t.parseExportDefaultDeclaration=function(){var e;if(this.type===J._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,md|rL,!1,e)}else if(this.type===J._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};_t.checkExport=function(e,t,n){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),af(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)};_t.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};_t.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,_o),this.finishNode(e,"ImportSpecifier")};_t.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,_o),this.finishNode(e,"ImportDefaultSpecifier")};_t.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,_o),this.finishNode(e,"ImportNamespaceSpecifier")};_t.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===J.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(J.comma)))return e;if(this.type===J.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(J.braceL);!this.eat(J.braceR);){if(t)t=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;e.push(this.parseImportSpecifier())}return e};_t.parseWithClause=function(){var e=[];if(!this.eat(J._with))return e;this.expect(J.braceL);for(var t={},n=!0;!this.eat(J.braceR);){if(n)n=!1;else if(this.expect(J.comma),this.afterTrailingComma(J.braceR))break;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;af(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e};_t.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(J.colon),this.type!==J.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};_t.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===J.string){var e=this.parseLiteral(this.value);return C0e.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};_t.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Fs=Lr.prototype;Fs.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(J._function))return this.overrideContext(dr.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(J.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===J.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(J.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case J.regexp:var u=this.value;return r=this.parseLiteral(u.value),r.regex={pattern:u.pattern,flags:u.flags},r;case J.num:case J.string:return this.parseLiteral(this.value);case J._null:case J._true:case J._false:return r=this.startNode(),r.value=this.type===J._null?null:this.type===J._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case J.parenL:var f=this.start,h=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)&&(e.parenthesizedAssign=f),e.parenthesizedBind<0&&(e.parenthesizedBind=f)),h;case J.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(J.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case J.braceL:return this.overrideContext(dr.b_expr),this.parseObj(!1,e);case J._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case J._class:return this.parseClass(this.startNode(),!1);case J._new:return this.parseNew();case J.backQuote:return this.parseTemplate();case J._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};en.parseExprAtomDefault=function(){this.unexpected()};en.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===J.parenL&&!e)return this.parseDynamicImport(t);if(this.type===J.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};en.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(J.parenR)?e.options=null:(this.expect(J.comma),this.afterTrailingComma(J.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(J.parenR)||(this.expect(J.comma),this.afterTrailingComma(J.parenR)||this.unexpected())));else if(!this.eat(J.parenR)){var t=this.start;this.eat(J.comma)&&this.eat(J.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};en.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};en.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};en.parseParenExpression=function(){this.expect(J.parenL);var e=this.parseExpression();return this.expect(J.parenR),e};en.shouldParseArrow=function(e){return!this.canInsertSemicolon()};en.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,l=[],u=!0,f=!1,h=new n1,m=this.yieldPos,g=this.awaitPos,b;for(this.yieldPos=0,this.awaitPos=0;this.type!==J.parenR;)if(u?u=!1:this.expect(J.comma),s&&this.afterTrailingComma(J.parenR,!0)){f=!0;break}else if(this.type===J.ellipsis){b=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===J.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,h,this.parseParenItem));var y=this.lastTokEnd,E=this.lastTokEndLoc;if(this.expect(J.parenR),e&&this.shouldParseArrow(l)&&this.eat(J.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=m,this.awaitPos=g,this.parseParenArrowList(n,r,l,t);(!l.length||f)&&this.unexpected(this.lastTokStart),b&&this.unexpected(b),this.checkExpressionErrors(h,!0),this.yieldPos=m||this.yieldPos,this.awaitPos=g||this.awaitPos,l.length>1?(i=this.startNodeAt(a,o),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",y,E)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var C=this.startNodeAt(n,r);return C.expression=i,this.finishNode(C,"ParenthesizedExpression")}else return i};en.parseParenItem=function(e){return e};en.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var O0e=[];en.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===J.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(r,"Invalid use of 'super'"),this.eat(J.parenL)?e.arguments=this.parseExprList(J.parenR,this.options.ecmaVersion>=8,!1):e.arguments=O0e,this.finishNode(e,"NewExpression")};en.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===J.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),n.tail=this.type===J.backQuote,this.finishNode(n,"TemplateElement")};en.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===J.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(J.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(J.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")};en.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===J.name||this.type===J.num||this.type===J.string||this.type===J.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===J.star)&&!Yi.test(this.input.slice(this.lastTokEnd,this.start))};en.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(J.braceR);){if(r)r=!1;else if(this.expect(J.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(J.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};en.parseProperty=function(e,t){var n=this.startNode(),r,i,s,a;if(this.options.ecmaVersion>=9&&this.eat(J.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===J.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,t),this.type===J.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(s=this.start,a=this.startLoc),e||(r=this.eat(J.star)));var o=this.containsEsc;return this.parsePropertyName(n),!e&&!o&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(J.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,s,a,t,o),this.finishNode(n,"Property")};en.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};en.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===J.colon&&this.unexpected(),this.eat(J.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===J.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==J.comma&&this.type!==J.braceR&&this.type!==J.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===J.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};en.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(J.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(J.bracketR),e.key;e.computed=!1}return e.key=this.type===J.num||this.type===J.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};en.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};en.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(F3(t,r.generator)|e1|(n?QM:0)),this.expect(J.parenL),r.params=this.parseBindingList(J.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")};en.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(F3(n,!1)|R3),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};en.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==J.braceL,s=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||o)&&(a=this.strictDirective(this.end),a&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,nL),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};en.isSimpleParamList=function(e){for(var t=0,n=e;t-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&yu&&delete this.undefinedExports[e]}else if(t===tL){var s=this.currentScope();s.lexical.push(e)}else if(t===eL){var a=this.currentScope();this.treatFunctionsAsVar?r=a.lexical.indexOf(e)>-1:r=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var l=this.scopeStack[o];if(l.lexical.indexOf(e)>-1&&!(l.flags&XM&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&yu&&delete this.undefinedExports[e],l.flags&t1)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};vl.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};vl.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};vl.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(t1|p0|Du))return t}};vl.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(t1|p0|Du)&&!(t.flags&R3))return t}};var r1=function(t,n,r){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new Zm(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[n,0])},m0=Lr.prototype;m0.startNode=function(){return new r1(this,this.start,this.startLoc)};m0.startNodeAt=function(e,t){return new r1(this,e,t)};function sL(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}m0.finishNode=function(e,t){return sL.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};m0.finishNodeAt=function(e,t,n,r){return sL.call(this,e,t,n,r)};m0.copyNode=function(e){var t=new r1(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var P0e="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",aL="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",oL=aL+" Extended_Pictographic",lL=oL,uL=lL+" EBase EComp EMod EPres ExtPict",cL=uL,R0e=cL,F0e={9:aL,10:oL,11:lL,12:uL,13:cL,14:R0e},I0e="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",M0e={9:"",10:"",11:"",12:"",13:"",14:I0e},oT="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",fL="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",dL=fL+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",hL=dL+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",pL=hL+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",mL=pL+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",L0e=mL+" "+P0e,z0e={9:fL,10:dL,11:hL,12:pL,13:mL,14:L0e},gL={};function j0e(e){var t=gL[e]={binary:sl(F0e[e]+" "+oT),binaryOfStrings:sl(M0e[e]),nonBinary:{General_Category:sl(oT),Script:sl(z0e[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var $2=0,lT=[9,10,11,12,13,14];$2=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=gL[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};ja.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,s=r.indexOf("u")!==-1;this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=s&&this.parser.options.ecmaVersion>=9)};ja.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};ja.prototype.at=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return-1;var s=r.charCodeAt(t);if(!(n||this.switchU)||s<=55295||s>=57344||t+1>=i)return s;var a=r.charCodeAt(t+1);return a>=56320&&a<=57343?(s<<10)+a-56613888:s};ja.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return i;var s=r.charCodeAt(t),a;return!(n||this.switchU)||s<=55295||s>=57344||t+1>=i||(a=r.charCodeAt(t+1))<56320||a>57343?t+1:t+2};ja.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};ja.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};ja.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};ja.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t?(this.advance(n),!0):!1};ja.prototype.eatChars=function(t,n){n===void 0&&(n=!1);for(var r=this.pos,i=0,s=t;i-1&&this.raise(e.start,"Duplicate regular expression flag"),a==="u"&&(r=!0),a==="v"&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")};function $0e(e){for(var t in e)return!0;return!1}St.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&$0e(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};St.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t=16;for(t&&(e.branchID=new sm(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};St.regexp_alternative=function(e){for(;e.pos=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1};St.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};St.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};St.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);!n&&!a&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var o=0;o-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};St.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};St.regexp_eatModifiers=function(e){for(var t="",n=0;(n=e.current())!==-1&&V0e(n);)t+=Co(n),e.advance();return t};function V0e(e){return e===105||e===109||e===115}St.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};St.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};St.regexp_eatSyntaxCharacter=function(e){var t=e.current();return vL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function vL(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}St.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!vL(n);)e.advance();return e.pos!==t};St.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};St.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),U0e(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function U0e(e){return Fa(e,!0)||e===36||e===95}St.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),H0e(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function H0e(e){return Eo(e,!0)||e===36||e===95||e===8204||e===8205}St.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};St.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};St.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};St.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};St.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};St.regexp_eatZero=function(e){return e.current()===48&&!i1(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};St.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};St.regexp_eatControlLetter=function(e){var t=e.current();return yL(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function yL(e){return e>=65&&e<=90||e>=97&&e<=122}St.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}e.pos=s,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&W0e(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1};function W0e(e){return e>=0&&e<=1114111}St.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};St.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var xL=0,ko=1,Ds=2;St.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(K0e(t))return e.lastIntValue=-1,e.advance(),ko;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===Ds&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return xL};function K0e(e){return e===100||e===68||e===115||e===83||e===119||e===87}St.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),ko}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return xL};St.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){af(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")};St.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return ko;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ds;e.raise("Invalid property name")};St.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";bL(t=e.current());)e.lastStringValue+=Co(t),e.advance();return e.lastStringValue!==""};function bL(e){return yL(e)||e===95}St.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";G0e(t=e.current());)e.lastStringValue+=Co(t),e.advance();return e.lastStringValue!==""};function G0e(e){return bL(e)||i1(e)}St.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};St.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===Ds&&e.raise("Negated character class may contain strings"),!0}return!1};St.regexp_classContents=function(e){return e.current()===93?ko:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),ko)};St.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise("Invalid character class"),t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class")}}};St.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||CL(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};St.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};St.regexp_classSetExpression=function(e){var t=ko,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===Ds&&(t=Ds);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==Ds&&(t=ko);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===Ds&&(t=Ds)}};St.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};St.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?ko:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};St.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===Ds&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};St.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};St.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Ds&&(t=Ds);return t};St.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?ko:Ds};St.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Y0e(n)||J0e(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Y0e(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function J0e(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}St.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return X0e(t)?(e.lastIntValue=t,e.advance(),!0):!1};function X0e(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}St.regexp_eatClassControlLetter=function(e){var t=e.current();return i1(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};St.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};St.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;i1(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function i1(e){return e>=48&&e<=57}St.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;wL(n=e.current());)e.lastIntValue=16*e.lastIntValue+EL(n),e.advance();return e.pos!==t};function wL(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function EL(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}St.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};St.regexp_eatOctalDigit=function(e){var t=e.current();return CL(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function CL(e){return e>=48&&e<=55}St.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r=this.input.length)return this.finishToken(J.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};bn.readToken=function(e){return Fa(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};bn.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};bn.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};bn.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=WM(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};bn.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&KM.test(String.fromCharCode(e)))++this.pos;else break e}}};bn.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)};bn.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(J.ellipsis)):(++this.pos,this.finishToken(J.dot))};bn.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(J.assign,2):this.finishOp(J.slash,1)};bn.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?J.star:J.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=J.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(J.assign,n+1):this.finishOp(r,n)};bn.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(J.assign,3)}return this.finishOp(e===124?J.logicalOR:J.logicalAND,2)}return t===61?this.finishOp(J.assign,2):this.finishOp(e===124?J.bitwiseOR:J.bitwiseAND,1)};bn.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(J.assign,2):this.finishOp(J.bitwiseXOR,1)};bn.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Yi.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(J.incDec,2):t===61?this.finishOp(J.assign,2):this.finishOp(J.plusMin,1)};bn.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(J.assign,n+1):this.finishOp(J.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(J.relational,n))};bn.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(J.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(J.arrow)):this.finishOp(e===61?J.eq:J.prefix,1)};bn.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(J.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(J.assign,3)}return this.finishOp(J.coalesce,2)}}return this.finishOp(J.question,1)};bn.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),Fa(t,!0)||t===92))return this.finishToken(J.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Co(t)+"'")};bn.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(J.parenL);case 41:return++this.pos,this.finishToken(J.parenR);case 59:return++this.pos,this.finishToken(J.semi);case 44:return++this.pos,this.finishToken(J.comma);case 91:return++this.pos,this.finishToken(J.bracketL);case 93:return++this.pos,this.finishToken(J.bracketR);case 123:return++this.pos,this.finishToken(J.braceL);case 125:return++this.pos,this.finishToken(J.braceR);case 58:return++this.pos,this.finishToken(J.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(J.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(J.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Co(e)+"'")};bn.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};bn.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Yi.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new ja(this));o.reset(n,i,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(i,a)}catch{}return this.finishToken(J.regexp,{pattern:i,flags:a,value:l})};bn.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0,l=0,u=t??1/0;l=97?h=f-97+10:f>=65?h=f-65+10:f>=48&&f<=57?h=f-48:h=1/0,h>=e)break;o=f,a=a*e+h}return r&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||t!=null&&this.pos-s!==t?null:a};function Q0e(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function kL(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}bn.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=kL(this.input.slice(t,this.pos)),++this.pos):Fa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(J.num,n)};bn.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=kL(this.input.slice(t,this.pos));return++this.pos,Fa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(J.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),Fa(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var s=Q0e(this.input.slice(t,this.pos),n);return this.finishToken(J.num,s)};bn.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};bn.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(sf(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(J.string,t)};var DL={};bn.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===DL)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};bn.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw DL;this.raise(e,t)};bn.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===J.template||this.type===J.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(J.dollarBraceL)):(++this.pos,this.finishToken(J.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(J.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(sf(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` +`;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};bn.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return sf(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};bn.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,"Bad character escape sequence"),n};bn.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),U2}var nd={exports:{}},the=nd.exports,cT;function fT(){return cT||(cT=1,(function(e,t){(function(n,r){r(t)})(the,(function(n){var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],s="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄ-׉ؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୓-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫰ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",a="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆ՘ՙՠ-ֈ֋֌א-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿ₏-₟ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-꟝꟢꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩ꭬꭭ꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:l,"5module":l+" export import",6:l+" const class extends export import super"},f=/^in(stanceof)?$/,h=new RegExp("["+a+"]"),m=new RegExp("["+a+s+"]");function g(p,D){for(var z=65536,V=0;Vp)return!1;if(z+=D[V+1],z>=p)return!0}return!1}function b(p,D){return p<65?p===36:p<91?!0:p<97?p===95:p<123?!0:p<=65535?p>=170&&h.test(String.fromCharCode(p)):D===!1?!1:g(p,i)}function y(p,D){return p<48?p===36:p<58?!0:p<65?!1:p<91?!0:p<97?p===95:p<123?!0:p<=65535?p>=170&&m.test(String.fromCharCode(p)):D===!1?!1:g(p,i)||g(p,r)}var E=function(D,z){z===void 0&&(z={}),this.label=D,this.keyword=z.keyword,this.beforeExpr=!!z.beforeExpr,this.startsExpr=!!z.startsExpr,this.isLoop=!!z.isLoop,this.isAssign=!!z.isAssign,this.prefix=!!z.prefix,this.postfix=!!z.postfix,this.binop=z.binop||null,this.updateContext=null};function C(p,D){return new E(p,{beforeExpr:!0,binop:D})}var x={beforeExpr:!0},S={startsExpr:!0},O={};function _(p,D){return D===void 0&&(D={}),D.keyword=p,O[p]=new E(p,D)}var w={num:new E("num",S),regexp:new E("regexp",S),string:new E("string",S),name:new E("name",S),privateId:new E("privateId",S),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",x),semi:new E(";",x),colon:new E(":",x),dot:new E("."),question:new E("?",x),questionDot:new E("?."),arrow:new E("=>",x),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",x),backQuote:new E("`",S),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:C("||",1),logicalAND:C("&&",2),bitwiseOR:C("|",3),bitwiseXOR:C("^",4),bitwiseAND:C("&",5),equality:C("==/!=/===/!==",6),relational:C("/<=/>=",7),bitShift:C("<>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:C("%",10),star:C("*",10),slash:C("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:C("??",1),_break:_("break"),_case:_("case",x),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",x),_do:_("do",{isLoop:!0,beforeExpr:!0}),_else:_("else",x),_finally:_("finally"),_for:_("for",{isLoop:!0}),_function:_("function",S),_if:_("if"),_return:_("return",x),_switch:_("switch"),_throw:_("throw",x),_try:_("try"),_var:_("var"),_const:_("const"),_while:_("while",{isLoop:!0}),_with:_("with"),_new:_("new",{beforeExpr:!0,startsExpr:!0}),_this:_("this",S),_super:_("super",S),_class:_("class",S),_extends:_("extends",x),_export:_("export"),_import:_("import",S),_null:_("null",S),_true:_("true",S),_false:_("false",S),_in:_("in",{beforeExpr:!0,binop:7}),_instanceof:_("instanceof",{beforeExpr:!0,binop:7}),_typeof:_("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:_("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:_("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},T=/\r\n?|\n|\u2028|\u2029/,A=new RegExp(T.source,"g");function P(p){return p===10||p===13||p===8232||p===8233}function I(p,D,z){z===void 0&&(z=p.length);for(var V=D;V>10)+55296,(p&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,re=function(D,z){this.line=D,this.column=z};re.prototype.offset=function(D){return new re(this.line,this.column+D)};var K=function(D,z,V){this.start=z,this.end=V,D.sourceFile!==null&&(this.source=D.sourceFile)};function Be(p,D){for(var z=1,V=0;;){var ae=I(p,V,D);if(ae<0)return new re(z,D-V);++z,V=ae}}var ze={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},$e=!1;function je(p){var D={};for(var z in ze)D[z]=p&&fe(p,z)?p[z]:ze[z];if(D.ecmaVersion==="latest"?D.ecmaVersion=1e8:D.ecmaVersion==null?(!$e&&typeof console=="object"&&console.warn&&($e=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),D.ecmaVersion=11):D.ecmaVersion>=2015&&(D.ecmaVersion-=2009),D.allowReserved==null&&(D.allowReserved=D.ecmaVersion<5),(!p||p.allowHashBang==null)&&(D.allowHashBang=D.ecmaVersion>=14),ue(D.onToken)){var V=D.onToken;D.onToken=function(ae){return V.push(ae)}}if(ue(D.onComment)&&(D.onComment=Fe(D,D.onComment)),D.sourceType==="commonjs"&&D.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return D}function Fe(p,D){return function(z,V,ae,ke,Se,He){var it={type:z?"Block":"Line",value:V,start:ae,end:ke};p.locations&&(it.loc=new K(this,Se,He)),p.ranges&&(it.range=[ae,ke]),D.push(it)}}var Me=1,ge=2,Oe=4,se=8,we=16,_e=32,Ee=64,qe=128,Ue=256,tt=512,rt=1024,lt=Me|ge|Ue;function ut(p,D){return ge|(p?Oe:0)|(D?se:0)}var Ht=0,vt=1,mt=2,qn=3,on=4,be=5,Y=function(D,z,V){this.options=D=je(D),this.sourceFile=D.sourceFile,this.keywords=me(u[D.ecmaVersion>=6?6:D.sourceType==="module"?"5module":5]);var ae="";D.allowReserved!==!0&&(ae=o[D.ecmaVersion>=6?6:D.ecmaVersion===5?5:3],D.sourceType==="module"&&(ae+=" await")),this.reservedWords=me(ae);var ke=(ae?ae+" ":"")+o.strict;this.reservedWordsStrict=me(ke),this.reservedWordsStrictBind=me(ke+" "+o.strictBind),this.input=String(z),this.containsEsc=!1,this.pos=V||0,this.curLine=1,D.startLocation?(this.lineStart=this.pos-D.startLocation.column,this.curLine=D.startLocation.line):V?(this.lineStart=this.input.lastIndexOf(` +`,V-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(T).length)):this.lineStart=0,this.type=w.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=D.sourceType==="module",this.strict=this.inModule||D.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&D.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?ge:Me),this.regexpState=null,this.privateNameStack=[]},dt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Y.prototype.parse=function(){var D=this,z=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return D.parseTopLevel(z)})},dt.inFunction.get=function(){return(this.currentVarScope().flags&ge)>0},dt.inGenerator.get=function(){return(this.currentVarScope().flags&se)>0},dt.inAsync.get=function(){return(this.currentVarScope().flags&Oe)>0},dt.canAwait.get=function(){for(var p=this.scopeStack.length-1;p>=0;p--){var D=this.scopeStack[p],z=D.flags;if(z&(Ue|tt))return!1;if(z&ge)return(z&Oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},dt.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Me)},dt.allowSuper.get=function(){var p=this.currentThisScope(),D=p.flags;return(D&Ee)>0||this.options.allowSuperOutsideMethod},dt.allowDirectSuper.get=function(){return(this.currentThisScope().flags&qe)>0},dt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},dt.allowNewDotTarget.get=function(){for(var p=this.scopeStack.length-1;p>=0;p--){var D=this.scopeStack[p],z=D.flags;if(z&(Ue|tt)||z&ge&&!(z&we))return!0}return!1},dt.allowUsing.get=function(){var p=this.currentScope(),D=p.flags;return!(D&rt||!this.inModule&&D&Me)},dt.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ue)>0},Y.extend=function(){for(var D=[],z=arguments.length;z--;)D[z]=arguments[z];for(var V=this,ae=0;ae=,?^&]/.test(ae)||ae==="!"&&this.input.charAt(V+1)==="="||ae==="i"&&rn(this,V))}p+=D[0].length,M.lastIndex=p,p+=M.exec(this.input)[0].length,this.input[p]===";"&&p++}};function rn(p,D){for(var z=D+1,V=Math.min(p.input.length,D+11);z-1&&this.raiseRecoverable(p.trailingComma,"Comma is not permitted after the rest element");var z=D?p.parenthesizedAssign:p.parenthesizedBind;z>-1&&this.raiseRecoverable(z,D?"Assigning to rvalue":"Parenthesized pattern")}},ct.checkExpressionErrors=function(p,D){if(!p)return!1;var z=p.shorthandAssign,V=p.doubleProto;if(!D)return z>=0||V>=0;z>=0&&this.raise(z,"Shorthand property assignments are valid only in destructuring patterns"),V>=0&&this.raiseRecoverable(V,"Redefinition of __proto__ property")},ct.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&this.unexpected(),this.parseFunctionStatement(ae,!1,!p);case w._class:return p&&this.unexpected(),this.parseClass(ae,!0);case w._if:return this.parseIfStatement(ae);case w._return:return this.parseReturnStatement(ae);case w._switch:return this.parseSwitchStatement(ae);case w._throw:return this.parseThrowStatement(ae);case w._try:return this.parseTryStatement(ae);case w._const:case w._var:return ke=ke||this.value,p&&ke!=="var"&&this.unexpected(),this.parseVarStatement(ae,ke);case w._while:return this.parseWhileStatement(ae);case w._with:return this.parseWithStatement(ae);case w.braceL:return this.parseBlock(!0,ae);case w.semi:return this.parseEmptyStatement(ae);case w._export:case w._import:if(this.options.ecmaVersion>10&&V===w._import){M.lastIndex=this.pos;var Se=M.exec(this.input),He=this.pos+Se[0].length,it=this.input.charCodeAt(He);if(it===40||it===46)return this.parseExpressionStatement(ae,this.parseExpression())}return this.options.allowImportExportEverywhere||(D||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),V===w._import?this.parseImport(ae):this.parseExport(ae,z);default:if(this.isAsyncFunction())return p&&this.unexpected(),this.next(),this.parseFunctionStatement(ae,!0,!p);var It=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(It)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),p&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),It==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(ae,!1,It),this.semicolon(),this.finishNode(ae,"VariableDeclaration");var Kt=this.value,zn=this.parseExpression();return V===w.name&&zn.type==="Identifier"&&this.eat(w.colon)?this.parseLabeledStatement(ae,Kt,zn,p):this.parseExpressionStatement(ae,zn)}},Ye.parseBreakContinueStatement=function(p,D){var z=D==="break";this.next(),this.eat(w.semi)||this.insertSemicolon()?p.label=null:this.type!==w.name?this.unexpected():(p.label=this.parseIdent(),this.semicolon());for(var V=0;V=6?this.eat(w.semi):this.semicolon(),this.finishNode(p,"DoWhileStatement")},Ye.parseForStatement=function(p){this.next();var D=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Hr),this.enterScope(0),this.expect(w.parenL),this.type===w.semi)return D>-1&&this.unexpected(D),this.parseFor(p,null);var z=this.isLet();if(this.type===w._var||this.type===w._const||z){var V=this.startNode(),ae=z?"let":this.value;return this.next(),this.parseVar(V,!0,ae),this.finishNode(V,"VariableDeclaration"),this.parseForAfterInit(p,V,D)}var ke=this.isContextual("let"),Se=!1,He=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(He){var it=this.startNode();return this.next(),He==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(it,!0,He),this.finishNode(it,"VariableDeclaration"),this.parseForAfterInit(p,it,D)}var It=this.containsEsc,Kt=new Lt,zn=this.start,Kr=D>-1?this.parseExprSubscripts(Kt,"await"):this.parseExpression(!0,Kt);return this.type===w._in||(Se=this.options.ecmaVersion>=6&&this.isContextual("of"))?(D>-1?(this.type===w._in&&this.unexpected(D),p.await=!0):Se&&this.options.ecmaVersion>=8&&(Kr.start===zn&&!It&&Kr.type==="Identifier"&&Kr.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(p.await=!1)),ke&&Se&&this.raise(Kr.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Kr,!1,Kt),this.checkLValPattern(Kr),this.parseForIn(p,Kr)):(this.checkExpressionErrors(Kt,!0),D>-1&&this.unexpected(D),this.parseFor(p,Kr))},Ye.parseForAfterInit=function(p,D,z){return(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&D.declarations.length===1?(this.type===w._in?((D.kind==="using"||D.kind==="await using")&&!D.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&z>-1&&this.unexpected(z)):this.options.ecmaVersion>=9&&(p.await=z>-1),this.parseForIn(p,D)):(z>-1&&this.unexpected(z),this.parseFor(p,D))},Ye.parseFunctionStatement=function(p,D,z){return this.next(),this.parseFunction(p,hi|(z?0:Fi),!1,D)},Ye.parseIfStatement=function(p){return this.next(),p.test=this.parseParenExpression(),p.consequent=this.parseStatement("if"),p.alternate=this.eat(w._else)?this.parseStatement("if"):null,this.finishNode(p,"IfStatement")},Ye.parseReturnStatement=function(p){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(w.semi)||this.insertSemicolon()?p.argument=null:(p.argument=this.parseExpression(),this.semicolon()),this.finishNode(p,"ReturnStatement")},Ye.parseSwitchStatement=function(p){this.next(),p.discriminant=this.parseParenExpression(),p.cases=[],this.expect(w.braceL),this.labels.push(Xi),this.enterScope(rt);for(var D,z=!1;this.type!==w.braceR;)if(this.type===w._case||this.type===w._default){var V=this.type===w._case;D&&this.finishNode(D,"SwitchCase"),p.cases.push(D=this.startNode()),D.consequent=[],this.next(),V?D.test=this.parseExpression():(z&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),z=!0,D.test=null),this.expect(w.colon)}else D||this.unexpected(),D.consequent.push(this.parseStatement(null));return this.exitScope(),D&&this.finishNode(D,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(p,"SwitchStatement")},Ye.parseThrowStatement=function(p){return this.next(),T.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),p.argument=this.parseExpression(),this.semicolon(),this.finishNode(p,"ThrowStatement")};var Qi=[];Ye.parseCatchClauseParam=function(){var p=this.parseBindingAtom(),D=p.type==="Identifier";return this.enterScope(D?_e:0),this.checkLValPattern(p,D?on:mt),this.expect(w.parenR),p},Ye.parseTryStatement=function(p){if(this.next(),p.block=this.parseBlock(),p.handler=null,this.type===w._catch){var D=this.startNode();this.next(),this.eat(w.parenL)?D.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),D.param=null,this.enterScope(0)),D.body=this.parseBlock(!1),this.exitScope(),p.handler=this.finishNode(D,"CatchClause")}return p.finalizer=this.eat(w._finally)?this.parseBlock():null,!p.handler&&!p.finalizer&&this.raise(p.start,"Missing catch or finally clause"),this.finishNode(p,"TryStatement")},Ye.parseVarStatement=function(p,D,z){return this.next(),this.parseVar(p,!1,D,z),this.semicolon(),this.finishNode(p,"VariableDeclaration")},Ye.parseWhileStatement=function(p){return this.next(),p.test=this.parseParenExpression(),this.labels.push(Hr),p.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(p,"WhileStatement")},Ye.parseWithStatement=function(p){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),p.object=this.parseParenExpression(),p.body=this.parseStatement("with"),this.finishNode(p,"WithStatement")},Ye.parseEmptyStatement=function(p){return this.next(),this.finishNode(p,"EmptyStatement")},Ye.parseLabeledStatement=function(p,D,z,V){for(var ae=0,ke=this.labels;ae=0;it--){var It=this.labels[it];if(It.statementStart===p.start)It.statementStart=this.start,It.kind=He;else break}return this.labels.push({name:D,kind:He,statementStart:this.start}),p.body=this.parseStatement(V?V.indexOf("label")===-1?V+"label":V:"label"),this.labels.pop(),p.label=z,this.finishNode(p,"LabeledStatement")},Ye.parseExpressionStatement=function(p,D){return p.expression=D,this.semicolon(),this.finishNode(p,"ExpressionStatement")},Ye.parseBlock=function(p,D,z){for(p===void 0&&(p=!0),D===void 0&&(D=this.startNode()),D.body=[],this.expect(w.braceL),p&&this.enterScope(0);this.type!==w.braceR;){var V=this.parseStatement(null);D.body.push(V)}return z&&(this.strict=!1),this.next(),p&&this.exitScope(),this.finishNode(D,"BlockStatement")},Ye.parseFor=function(p,D){return p.init=D,this.expect(w.semi),p.test=this.type===w.semi?null:this.parseExpression(),this.expect(w.semi),p.update=this.type===w.parenR?null:this.parseExpression(),this.expect(w.parenR),p.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(p,"ForStatement")},Ye.parseForIn=function(p,D){var z=this.type===w._in;return this.next(),D.type==="VariableDeclaration"&&D.declarations[0].init!=null&&(!z||this.options.ecmaVersion<8||this.strict||D.kind!=="var"||D.declarations[0].id.type!=="Identifier")&&this.raise(D.start,(z?"for-in":"for-of")+" loop variable declaration may not have an initializer"),p.left=D,p.right=z?this.parseExpression():this.parseMaybeAssign(),this.expect(w.parenR),p.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(p,z?"ForInStatement":"ForOfStatement")},Ye.parseVar=function(p,D,z,V){for(p.declarations=[],p.kind=z;;){var ae=this.startNode();if(this.parseVarId(ae,z),this.eat(w.eq)?ae.init=this.parseMaybeAssign(D):!V&&z==="const"&&!(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!V&&(z==="using"||z==="await using")&&this.options.ecmaVersion>=17&&this.type!==w._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+z+" declaration"):!V&&ae.id.type!=="Identifier"&&!(D&&(this.type===w._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):ae.init=null,p.declarations.push(this.finishNode(ae,"VariableDeclarator")),!this.eat(w.comma))break}return p},Ye.parseVarId=function(p,D){p.id=D==="using"||D==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(p.id,D==="var"?vt:mt,!1)};var hi=1,Fi=2,pr=4;Ye.parseFunction=function(p,D,z,V,ae){this.initFunction(p),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!V)&&(this.type===w.star&&D&Fi&&this.unexpected(),p.generator=this.eat(w.star)),this.options.ecmaVersion>=8&&(p.async=!!V),D&hi&&(p.id=D&pr&&this.type!==w.name?null:this.parseIdent(),p.id&&!(D&Fi)&&this.checkLValSimple(p.id,this.strict||p.generator||p.async?this.treatFunctionsAsVar?vt:mt:qn));var ke=this.yieldPos,Se=this.awaitPos,He=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ut(p.async,p.generator)),D&hi||(p.id=this.type===w.name?this.parseIdent():null),this.parseFunctionParams(p),this.parseFunctionBody(p,z,!1,ae),this.yieldPos=ke,this.awaitPos=Se,this.awaitIdentPos=He,this.finishNode(p,D&hi?"FunctionDeclaration":"FunctionExpression")},Ye.parseFunctionParams=function(p){this.expect(w.parenL),p.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Ye.parseClass=function(p,D){this.next();var z=this.strict;this.strict=!0,this.parseClassId(p,D),this.parseClassSuper(p);var V=this.enterClassBody(),ae=this.startNode(),ke=!1;for(ae.body=[],this.expect(w.braceL);this.type!==w.braceR;){var Se=this.parseClassElement(p.superClass!==null);Se&&(ae.body.push(Se),Se.type==="MethodDefinition"&&Se.kind==="constructor"?(ke&&this.raiseRecoverable(Se.start,"Duplicate constructor in the same class"),ke=!0):Se.key&&Se.key.type==="PrivateIdentifier"&&ii(V,Se)&&this.raiseRecoverable(Se.key.start,"Identifier '#"+Se.key.name+"' has already been declared"))}return this.strict=z,this.next(),p.body=this.finishNode(ae,"ClassBody"),this.exitClassBody(),this.finishNode(p,D?"ClassDeclaration":"ClassExpression")},Ye.parseClassElement=function(p){if(this.eat(w.semi))return null;var D=this.options.ecmaVersion,z=this.startNode(),V="",ae=!1,ke=!1,Se="method",He=!1;if(this.eatContextual("static")){if(D>=13&&this.eat(w.braceL))return this.parseClassStaticBlock(z),z;this.isClassElementNameStart()||this.type===w.star?He=!0:V="static"}if(z.static=He,!V&&D>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===w.star)&&!this.canInsertSemicolon()?ke=!0:V="async"),!V&&(D>=9||!ke)&&this.eat(w.star)&&(ae=!0),!V&&!ke&&!ae){var it=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Se=it:V=it)}if(V?(z.computed=!1,z.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),z.key.name=V,this.finishNode(z.key,"Identifier")):this.parseClassElementName(z),D<13||this.type===w.parenL||Se!=="method"||ae||ke){var It=!z.static&&ir(z,"constructor"),Kt=It&&p;It&&Se!=="method"&&this.raise(z.key.start,"Constructor can't have get/set modifier"),z.kind=It?"constructor":Se,this.parseClassMethod(z,ae,ke,Kt)}else this.parseClassField(z);return z},Ye.isClassElementNameStart=function(){return this.type===w.name||this.type===w.privateId||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword},Ye.parseClassElementName=function(p){this.type===w.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),p.computed=!1,p.key=this.parsePrivateIdent()):this.parsePropertyName(p)},Ye.parseClassMethod=function(p,D,z,V){var ae=p.key;p.kind==="constructor"?(D&&this.raise(ae.start,"Constructor can't be a generator"),z&&this.raise(ae.start,"Constructor can't be an async method")):p.static&&ir(p,"prototype")&&this.raise(ae.start,"Classes may not have a static property named prototype");var ke=p.value=this.parseMethod(D,z,V);return p.kind==="get"&&ke.params.length!==0&&this.raiseRecoverable(ke.start,"getter should have no params"),p.kind==="set"&&ke.params.length!==1&&this.raiseRecoverable(ke.start,"setter should have exactly one param"),p.kind==="set"&&ke.params[0].type==="RestElement"&&this.raiseRecoverable(ke.params[0].start,"Setter cannot use rest params"),this.finishNode(p,"MethodDefinition")},Ye.parseClassField=function(p){return ir(p,"constructor")?this.raise(p.key.start,"Classes can't have a field named 'constructor'"):p.static&&ir(p,"prototype")&&this.raise(p.key.start,"Classes can't have a static field named 'prototype'"),this.eat(w.eq)?(this.enterScope(tt|Ee),p.value=this.parseMaybeAssign(),this.exitScope()):p.value=null,this.semicolon(),this.finishNode(p,"PropertyDefinition")},Ye.parseClassStaticBlock=function(p){p.body=[];var D=this.labels;for(this.labels=[],this.enterScope(Ue|Ee);this.type!==w.braceR;){var z=this.parseStatement(null);p.body.push(z)}return this.next(),this.exitScope(),this.labels=D,this.finishNode(p,"StaticBlock")},Ye.parseClassId=function(p,D){this.type===w.name?(p.id=this.parseIdent(),D&&this.checkLValSimple(p.id,mt,!1)):(D===!0&&this.unexpected(),p.id=null)},Ye.parseClassSuper=function(p){p.superClass=this.eat(w._extends)?this.parseExprSubscripts(null,!1):null},Ye.enterClassBody=function(){var p={declared:Object.create(null),used:[]};return this.privateNameStack.push(p),p.declared},Ye.exitClassBody=function(){var p=this.privateNameStack.pop(),D=p.declared,z=p.used;if(this.options.checkPrivateFields)for(var V=this.privateNameStack.length,ae=V===0?null:this.privateNameStack[V-1],ke=0;ke=11&&(this.eatContextual("as")?(p.exported=this.parseModuleExportName(),this.checkExport(D,p.exported,this.lastTokStart)):p.exported=null),this.expectContextual("from"),this.type!==w.string&&this.unexpected(),p.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(p.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(p,"ExportAllDeclaration")},Ye.parseExport=function(p,D){if(this.next(),this.eat(w.star))return this.parseExportAllDeclaration(p,D);if(this.eat(w._default))return this.checkExport(D,"default",this.lastTokStart),p.declaration=this.parseExportDefaultDeclaration(),this.finishNode(p,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())p.declaration=this.parseExportDeclaration(p),p.declaration.type==="VariableDeclaration"?this.checkVariableExport(D,p.declaration.declarations):this.checkExport(D,p.declaration.id,p.declaration.id.start),p.specifiers=[],p.source=null,this.options.ecmaVersion>=16&&(p.attributes=[]);else{if(p.declaration=null,p.specifiers=this.parseExportSpecifiers(D),this.eatContextual("from"))this.type!==w.string&&this.unexpected(),p.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(p.attributes=this.parseWithClause());else{for(var z=0,V=p.specifiers;z=16&&(p.attributes=[])}this.semicolon()}return this.finishNode(p,"ExportNamedDeclaration")},Ye.parseExportDeclaration=function(p){return this.parseStatement(null)},Ye.parseExportDefaultDeclaration=function(){var p;if(this.type===w._function||(p=this.isAsyncFunction())){var D=this.startNode();return this.next(),p&&this.next(),this.parseFunction(D,hi|pr,!1,p)}else if(this.type===w._class){var z=this.startNode();return this.parseClass(z,"nullableID")}else{var V=this.parseMaybeAssign();return this.semicolon(),V}},Ye.checkExport=function(p,D,z){p&&(typeof D!="string"&&(D=D.type==="Identifier"?D.name:D.value),fe(p,D)&&this.raiseRecoverable(z,"Duplicate export '"+D+"'"),p[D]=!0)},Ye.checkPatternExport=function(p,D){var z=D.type;if(z==="Identifier")this.checkExport(p,D,D.start);else if(z==="ObjectPattern")for(var V=0,ae=D.properties;V=16&&(p.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(p,"ImportDeclaration")},Ye.parseImportSpecifier=function(){var p=this.startNode();return p.imported=this.parseModuleExportName(),this.eatContextual("as")?p.local=this.parseIdent():(this.checkUnreserved(p.imported),p.local=p.imported),this.checkLValSimple(p.local,mt),this.finishNode(p,"ImportSpecifier")},Ye.parseImportDefaultSpecifier=function(){var p=this.startNode();return p.local=this.parseIdent(),this.checkLValSimple(p.local,mt),this.finishNode(p,"ImportDefaultSpecifier")},Ye.parseImportNamespaceSpecifier=function(){var p=this.startNode();return this.next(),this.expectContextual("as"),p.local=this.parseIdent(),this.checkLValSimple(p.local,mt),this.finishNode(p,"ImportNamespaceSpecifier")},Ye.parseImportSpecifiers=function(){var p=[],D=!0;if(this.type===w.name&&(p.push(this.parseImportDefaultSpecifier()),!this.eat(w.comma)))return p;if(this.type===w.star)return p.push(this.parseImportNamespaceSpecifier()),p;for(this.expect(w.braceL);!this.eat(w.braceR);){if(D)D=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;p.push(this.parseImportSpecifier())}return p},Ye.parseWithClause=function(){var p=[];if(!this.eat(w._with))return p;this.expect(w.braceL);for(var D={},z=!0;!this.eat(w.braceR);){if(z)z=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;var V=this.parseImportAttribute(),ae=V.key.type==="Identifier"?V.key.name:V.key.value;fe(D,ae)&&this.raiseRecoverable(V.key.start,"Duplicate attribute key '"+ae+"'"),D[ae]=!0,p.push(V)}return p},Ye.parseImportAttribute=function(){var p=this.startNode();return p.key=this.type===w.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(w.colon),this.type!==w.string&&this.unexpected(),p.value=this.parseExprAtom(),this.finishNode(p,"ImportAttribute")},Ye.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===w.string){var p=this.parseLiteral(this.value);return Q.test(p.value)&&this.raise(p.start,"An export name cannot include a lone surrogate."),p}return this.parseIdent(!0)},Ye.adaptDirectivePrologue=function(p){for(var D=0;D=5&&p.type==="ExpressionStatement"&&p.expression.type==="Literal"&&typeof p.expression.value=="string"&&(this.input[p.start]==='"'||this.input[p.start]==="'")};var Er=Y.prototype;Er.toAssignable=function(p,D,z){if(this.options.ecmaVersion>=6&&p)switch(p.type){case"Identifier":this.inAsync&&p.name==="await"&&this.raise(p.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":p.type="ObjectPattern",z&&this.checkPatternErrors(z,!0);for(var V=0,ae=p.properties;V=8&&!He&&it.name==="async"&&!this.canInsertSemicolon()&&this.eat(w._function))return this.overrideContext(Re.f_expr),this.parseFunction(this.startNodeAt(ke,Se),0,!1,!0,D);if(ae&&!this.canInsertSemicolon()){if(this.eat(w.arrow))return this.parseArrowExpression(this.startNodeAt(ke,Se),[it],!1,D);if(this.options.ecmaVersion>=8&&it.name==="async"&&this.type===w.name&&!He&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return it=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(w.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(ke,Se),[it],!0,D)}return it;case w.regexp:var It=this.value;return V=this.parseLiteral(It.value),V.regex={pattern:It.pattern,flags:It.flags},V;case w.num:case w.string:return this.parseLiteral(this.value);case w._null:case w._true:case w._false:return V=this.startNode(),V.value=this.type===w._null?null:this.type===w._true,V.raw=this.type.keyword,this.next(),this.finishNode(V,"Literal");case w.parenL:var Kt=this.start,zn=this.parseParenAndDistinguishExpression(ae,D);return p&&(p.parenthesizedAssign<0&&!this.isSimpleAssignTarget(zn)&&(p.parenthesizedAssign=Kt),p.parenthesizedBind<0&&(p.parenthesizedBind=Kt)),zn;case w.bracketL:return V=this.startNode(),this.next(),V.elements=this.parseExprList(w.bracketR,!0,!0,p),this.finishNode(V,"ArrayExpression");case w.braceL:return this.overrideContext(Re.b_expr),this.parseObj(!1,p);case w._function:return V=this.startNode(),this.next(),this.parseFunction(V,0);case w._class:return this.parseClass(this.startNode(),!1);case w._new:return this.parseNew();case w.backQuote:return this.parseTemplate();case w._import:return this.options.ecmaVersion>=11?this.parseExprImport(z):this.unexpected();default:return this.parseExprAtomDefault()}},Qe.parseExprAtomDefault=function(){this.unexpected()},Qe.parseExprImport=function(p){var D=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===w.parenL&&!p)return this.parseDynamicImport(D);if(this.type===w.dot){var z=this.startNodeAt(D.start,D.loc&&D.loc.start);return z.name="import",D.meta=this.finishNode(z,"Identifier"),this.parseImportMeta(D)}else this.unexpected()},Qe.parseDynamicImport=function(p){if(this.next(),p.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(w.parenR)?p.options=null:(this.expect(w.comma),this.afterTrailingComma(w.parenR)?p.options=null:(p.options=this.parseMaybeAssign(),this.eat(w.parenR)||(this.expect(w.comma),this.afterTrailingComma(w.parenR)||this.unexpected())));else if(!this.eat(w.parenR)){var D=this.start;this.eat(w.comma)&&this.eat(w.parenR)?this.raiseRecoverable(D,"Trailing comma is not allowed in import()"):this.unexpected(D)}return this.finishNode(p,"ImportExpression")},Qe.parseImportMeta=function(p){this.next();var D=this.containsEsc;return p.property=this.parseIdent(!0),p.property.name!=="meta"&&this.raiseRecoverable(p.property.start,"The only valid meta property for import is 'import.meta'"),D&&this.raiseRecoverable(p.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(p.start,"Cannot use 'import.meta' outside a module"),this.finishNode(p,"MetaProperty")},Qe.parseLiteral=function(p){var D=this.startNode();return D.value=p,D.raw=this.input.slice(this.start,this.end),D.raw.charCodeAt(D.raw.length-1)===110&&(D.bigint=D.value!=null?D.value.toString():D.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(D,"Literal")},Qe.parseParenExpression=function(){this.expect(w.parenL);var p=this.parseExpression();return this.expect(w.parenR),p},Qe.shouldParseArrow=function(p){return!this.canInsertSemicolon()},Qe.parseParenAndDistinguishExpression=function(p,D){var z=this.start,V=this.startLoc,ae,ke=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Se=this.start,He=this.startLoc,it=[],It=!0,Kt=!1,zn=new Lt,Kr=this.yieldPos,Sl=this.awaitPos,da;for(this.yieldPos=0,this.awaitPos=0;this.type!==w.parenR;)if(It?It=!1:this.expect(w.comma),ke&&this.afterTrailingComma(w.parenR,!0)){Kt=!0;break}else if(this.type===w.ellipsis){da=this.start,it.push(this.parseParenItem(this.parseRestBinding())),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else it.push(this.parseMaybeAssign(!1,zn,this.parseParenItem));var Wa=this.lastTokEnd,ha=this.lastTokEndLoc;if(this.expect(w.parenR),p&&this.shouldParseArrow(it)&&this.eat(w.arrow))return this.checkPatternErrors(zn,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Kr,this.awaitPos=Sl,this.parseParenArrowList(z,V,it,D);(!it.length||Kt)&&this.unexpected(this.lastTokStart),da&&this.unexpected(da),this.checkExpressionErrors(zn,!0),this.yieldPos=Kr||this.yieldPos,this.awaitPos=Sl||this.awaitPos,it.length>1?(ae=this.startNodeAt(Se,He),ae.expressions=it,this.finishNodeAt(ae,"SequenceExpression",Wa,ha)):ae=it[0]}else ae=this.parseParenExpression();if(this.options.preserveParens){var Ka=this.startNodeAt(z,V);return Ka.expression=ae,this.finishNode(Ka,"ParenthesizedExpression")}else return ae},Qe.parseParenItem=function(p){return p},Qe.parseParenArrowList=function(p,D,z,V){return this.parseArrowExpression(this.startNodeAt(p,D),z,!1,V)};var wt=[];Qe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var p=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===w.dot){var D=this.startNodeAt(p.start,p.loc&&p.loc.start);D.name="new",p.meta=this.finishNode(D,"Identifier"),this.next();var z=this.containsEsc;return p.property=this.parseIdent(!0),p.property.name!=="target"&&this.raiseRecoverable(p.property.start,"The only valid meta property for new is 'new.target'"),z&&this.raiseRecoverable(p.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(p.start,"'new.target' can only be used in functions and class static block"),this.finishNode(p,"MetaProperty")}var V=this.start,ae=this.startLoc;return p.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),V,ae,!0,!1),p.callee.type==="Super"&&this.raiseRecoverable(V,"Invalid use of 'super'"),this.eat(w.parenL)?p.arguments=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1):p.arguments=wt,this.finishNode(p,"NewExpression")},Qe.parseTemplateElement=function(p){var D=p.isTagged,z=this.startNode();return this.type===w.invalidTemplate?(D||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),z.value={raw:this.value.replace(/\r\n?/g,` +`),cooked:null}):z.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),z.tail=this.type===w.backQuote,this.finishNode(z,"TemplateElement")},Qe.parseTemplate=function(p){p===void 0&&(p={});var D=p.isTagged;D===void 0&&(D=!1);var z=this.startNode();this.next(),z.expressions=[];var V=this.parseTemplateElement({isTagged:D});for(z.quasis=[V];!V.tail;)this.type===w.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(w.dollarBraceL),z.expressions.push(this.parseExpression()),this.expect(w.braceR),z.quasis.push(V=this.parseTemplateElement({isTagged:D}));return this.next(),this.finishNode(z,"TemplateLiteral")},Qe.isAsyncProp=function(p){return!p.computed&&p.key.type==="Identifier"&&p.key.name==="async"&&(this.type===w.name||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===w.star)&&!T.test(this.input.slice(this.lastTokEnd,this.start))},Qe.parseObj=function(p,D){var z=this.startNode(),V=!0,ae={};for(z.properties=[],this.next();!this.eat(w.braceR);){if(V)V=!1;else if(this.expect(w.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(w.braceR))break;var ke=this.parseProperty(p,D);p||this.checkPropClash(ke,ae,D),z.properties.push(ke)}return this.finishNode(z,p?"ObjectPattern":"ObjectExpression")},Qe.parseProperty=function(p,D){var z=this.startNode(),V,ae,ke,Se;if(this.options.ecmaVersion>=9&&this.eat(w.ellipsis))return p?(z.argument=this.parseIdent(!1),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(z,"RestElement")):(z.argument=this.parseMaybeAssign(!1,D),this.type===w.comma&&D&&D.trailingComma<0&&(D.trailingComma=this.start),this.finishNode(z,"SpreadElement"));this.options.ecmaVersion>=6&&(z.method=!1,z.shorthand=!1,(p||D)&&(ke=this.start,Se=this.startLoc),p||(V=this.eat(w.star)));var He=this.containsEsc;return this.parsePropertyName(z),!p&&!He&&this.options.ecmaVersion>=8&&!V&&this.isAsyncProp(z)?(ae=!0,V=this.options.ecmaVersion>=9&&this.eat(w.star),this.parsePropertyName(z)):ae=!1,this.parsePropertyValue(z,p,V,ae,ke,Se,D,He),this.finishNode(z,"Property")},Qe.parseGetterSetter=function(p){var D=p.key.name;this.parsePropertyName(p),p.value=this.parseMethod(!1),p.kind=D;var z=p.kind==="get"?0:1;if(p.value.params.length!==z){var V=p.value.start;p.kind==="get"?this.raiseRecoverable(V,"getter should have no params"):this.raiseRecoverable(V,"setter should have exactly one param")}else p.kind==="set"&&p.value.params[0].type==="RestElement"&&this.raiseRecoverable(p.value.params[0].start,"Setter cannot use rest params")},Qe.parsePropertyValue=function(p,D,z,V,ae,ke,Se,He){(z||V)&&this.type===w.colon&&this.unexpected(),this.eat(w.colon)?(p.value=D?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,Se),p.kind="init"):this.options.ecmaVersion>=6&&this.type===w.parenL?(D&&this.unexpected(),p.method=!0,p.value=this.parseMethod(z,V),p.kind="init"):!D&&!He&&this.options.ecmaVersion>=5&&!p.computed&&p.key.type==="Identifier"&&(p.key.name==="get"||p.key.name==="set")&&this.type!==w.comma&&this.type!==w.braceR&&this.type!==w.eq?((z||V)&&this.unexpected(),this.parseGetterSetter(p)):this.options.ecmaVersion>=6&&!p.computed&&p.key.type==="Identifier"?((z||V)&&this.unexpected(),this.checkUnreserved(p.key),p.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=ae),D?p.value=this.parseMaybeDefault(ae,ke,this.copyNode(p.key)):this.type===w.eq&&Se?(Se.shorthandAssign<0&&(Se.shorthandAssign=this.start),p.value=this.parseMaybeDefault(ae,ke,this.copyNode(p.key))):p.value=this.copyNode(p.key),p.kind="init",p.shorthand=!0):this.unexpected()},Qe.parsePropertyName=function(p){if(this.options.ecmaVersion>=6){if(this.eat(w.bracketL))return p.computed=!0,p.key=this.parseMaybeAssign(),this.expect(w.bracketR),p.key;p.computed=!1}return p.key=this.type===w.num||this.type===w.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Qe.initFunction=function(p){p.id=null,this.options.ecmaVersion>=6&&(p.generator=p.expression=!1),this.options.ecmaVersion>=8&&(p.async=!1)},Qe.parseMethod=function(p,D,z){var V=this.startNode(),ae=this.yieldPos,ke=this.awaitPos,Se=this.awaitIdentPos;return this.initFunction(V),this.options.ecmaVersion>=6&&(V.generator=p),this.options.ecmaVersion>=8&&(V.async=!!D),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ut(D,V.generator)|Ee|(z?qe:0)),this.expect(w.parenL),V.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(V,!1,!0,!1),this.yieldPos=ae,this.awaitPos=ke,this.awaitIdentPos=Se,this.finishNode(V,"FunctionExpression")},Qe.parseArrowExpression=function(p,D,z,V){var ae=this.yieldPos,ke=this.awaitPos,Se=this.awaitIdentPos;return this.enterScope(ut(z,!1)|we),this.initFunction(p),this.options.ecmaVersion>=8&&(p.async=!!z),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,p.params=this.toAssignableList(D,!0),this.parseFunctionBody(p,!0,!1,V),this.yieldPos=ae,this.awaitPos=ke,this.awaitIdentPos=Se,this.finishNode(p,"ArrowFunctionExpression")},Qe.parseFunctionBody=function(p,D,z,V){var ae=D&&this.type!==w.braceL,ke=this.strict,Se=!1;if(ae)p.body=this.parseMaybeAssign(V),p.expression=!0,this.checkParams(p,!1);else{var He=this.options.ecmaVersion>=7&&!this.isSimpleParamList(p.params);(!ke||He)&&(Se=this.strictDirective(this.end),Se&&He&&this.raiseRecoverable(p.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var it=this.labels;this.labels=[],Se&&(this.strict=!0),this.checkParams(p,!ke&&!Se&&!D&&!z&&this.isSimpleParamList(p.params)),this.strict&&p.id&&this.checkLValSimple(p.id,be),p.body=this.parseBlock(!1,void 0,Se&&!ke),p.expression=!1,this.adaptDirectivePrologue(p.body.body),this.labels=it}this.exitScope()},Qe.isSimpleParamList=function(p){for(var D=0,z=p;D-1||ae.functions.indexOf(p)>-1||ae.var.indexOf(p)>-1,ae.lexical.push(p),this.inModule&&ae.flags&Me&&delete this.undefinedExports[p]}else if(D===on){var ke=this.currentScope();ke.lexical.push(p)}else if(D===qn){var Se=this.currentScope();this.treatFunctionsAsVar?V=Se.lexical.indexOf(p)>-1:V=Se.lexical.indexOf(p)>-1||Se.var.indexOf(p)>-1,Se.functions.push(p)}else for(var He=this.scopeStack.length-1;He>=0;--He){var it=this.scopeStack[He];if(it.lexical.indexOf(p)>-1&&!(it.flags&_e&&it.lexical[0]===p)||!this.treatFunctionsAsVarInScope(it)&&it.functions.indexOf(p)>-1){V=!0;break}if(it.var.push(p),this.inModule&&it.flags&Me&&delete this.undefinedExports[p],it.flags<)break}V&&this.raiseRecoverable(z,"Identifier '"+p+"' has already been declared")},Nt.checkLocalExport=function(p){this.scopeStack[0].lexical.indexOf(p.name)===-1&&this.scopeStack[0].var.indexOf(p.name)===-1&&(this.undefinedExports[p.name]=p)},Nt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Nt.currentVarScope=function(){for(var p=this.scopeStack.length-1;;p--){var D=this.scopeStack[p];if(D.flags&(lt|tt|Ue))return D}},Nt.currentThisScope=function(){for(var p=this.scopeStack.length-1;;p--){var D=this.scopeStack[p];if(D.flags&(lt|tt|Ue)&&!(D.flags&we))return D}};var On=function(D,z,V){this.type="",this.start=z,this.end=0,D.options.locations&&(this.loc=new K(D,V)),D.options.directSourceFile&&(this.sourceFile=D.options.directSourceFile),D.options.ranges&&(this.range=[z,0])},pi=Y.prototype;pi.startNode=function(){return new On(this,this.start,this.startLoc)},pi.startNodeAt=function(p,D){return new On(this,p,D)};function Is(p,D,z,V){return p.type=D,p.end=z,this.options.locations&&(p.loc.end=V),this.options.ranges&&(p.range[1]=z),p}pi.finishNode=function(p,D){return Is.call(this,p,D,this.lastTokEnd,this.lastTokEndLoc)},pi.finishNodeAt=function(p,D,z,V){return Is.call(this,p,D,z,V)},pi.copyNode=function(p){var D=new On(this,p.start,this.startLoc);for(var z in p)D[z]=p[z];return D};var $a="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Su="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",To=Su+" Extended_Pictographic",_u=To,hs=_u+" EBase EComp EMod EPres ExtPict",xl=hs,bl=xl,No={9:Su,10:To,11:_u,12:hs,13:xl,14:bl},Au="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Tu={9:"",10:"",11:"",12:"",13:"",14:Au},wl="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Ii="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",El=Ii+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Cl=El+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Xn=Cl+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Nu=Xn+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",kl=Nu+" "+$a,Va={9:Ii,10:El,11:Cl,12:Xn,13:Nu,14:kl},Ua={};function Ze(p){var D=Ua[p]={binary:me(No[p]+" "+wl),binaryOfStrings:me(Tu[p]),nonBinary:{General_Category:me(wl),Script:me(Va[p])}};D.nonBinary.Script_Extensions=D.nonBinary.Script,D.nonBinary.gc=D.nonBinary.General_Category,D.nonBinary.sc=D.nonBinary.Script,D.nonBinary.scx=D.nonBinary.Script_Extensions}for(var At=0,sn=[9,10,11,12,13,14];At=6?"uy":"")+(D.options.ecmaVersion>=9?"s":"")+(D.options.ecmaVersion>=13?"d":"")+(D.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Ua[D.options.ecmaVersion>=14?14:D.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Sr.prototype.reset=function(D,z,V){var ae=V.indexOf("v")!==-1,ke=V.indexOf("u")!==-1;this.start=D|0,this.source=z+"",this.flags=V,ae&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=ke&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=ke&&this.parser.options.ecmaVersion>=9)},Sr.prototype.raise=function(D){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+D)},Sr.prototype.at=function(D,z){z===void 0&&(z=!1);var V=this.source,ae=V.length;if(D>=ae)return-1;var ke=V.charCodeAt(D);if(!(z||this.switchU)||ke<=55295||ke>=57344||D+1>=ae)return ke;var Se=V.charCodeAt(D+1);return Se>=56320&&Se<=57343?(ke<<10)+Se-56613888:ke},Sr.prototype.nextIndex=function(D,z){z===void 0&&(z=!1);var V=this.source,ae=V.length;if(D>=ae)return ae;var ke=V.charCodeAt(D),Se;return!(z||this.switchU)||ke<=55295||ke>=57344||D+1>=ae||(Se=V.charCodeAt(D+1))<56320||Se>57343?D+1:D+2},Sr.prototype.current=function(D){return D===void 0&&(D=!1),this.at(this.pos,D)},Sr.prototype.lookahead=function(D){return D===void 0&&(D=!1),this.at(this.nextIndex(this.pos,D),D)},Sr.prototype.advance=function(D){D===void 0&&(D=!1),this.pos=this.nextIndex(this.pos,D)},Sr.prototype.eat=function(D,z){return z===void 0&&(z=!1),this.current(z)===D?(this.advance(z),!0):!1},Sr.prototype.eatChars=function(D,z){z===void 0&&(z=!1);for(var V=this.pos,ae=0,ke=D;ae-1&&this.raise(p.start,"Duplicate regular expression flag"),Se==="u"&&(V=!0),Se==="v"&&(ae=!0)}this.options.ecmaVersion>=15&&V&&ae&&this.raise(p.start,"Invalid regular expression flag")};function Oo(p){for(var D in p)return!0;return!1}at.validateRegExpPattern=function(p){this.regexp_pattern(p),!p.switchN&&this.options.ecmaVersion>=9&&Oo(p.groupNames)&&(p.switchN=!0,this.regexp_pattern(p))},at.regexp_pattern=function(p){p.pos=0,p.lastIntValue=0,p.lastStringValue="",p.lastAssertionIsQuantifiable=!1,p.numCapturingParens=0,p.maxBackReference=0,p.groupNames=Object.create(null),p.backReferenceNames.length=0,p.branchID=null,this.regexp_disjunction(p),p.pos!==p.source.length&&(p.eat(41)&&p.raise("Unmatched ')'"),(p.eat(93)||p.eat(125))&&p.raise("Lone quantifier brackets")),p.maxBackReference>p.numCapturingParens&&p.raise("Invalid escape");for(var D=0,z=p.backReferenceNames;D=16;for(D&&(p.branchID=new Hn(p.branchID,null)),this.regexp_alternative(p);p.eat(124);)D&&(p.branchID=p.branchID.sibling()),this.regexp_alternative(p);D&&(p.branchID=p.branchID.parent),this.regexp_eatQuantifier(p,!0)&&p.raise("Nothing to repeat"),p.eat(123)&&p.raise("Lone quantifier brackets")},at.regexp_alternative=function(p){for(;p.pos=9&&(z=p.eat(60)),p.eat(61)||p.eat(33))return this.regexp_disjunction(p),p.eat(41)||p.raise("Unterminated group"),p.lastAssertionIsQuantifiable=!z,!0}return p.pos=D,!1},at.regexp_eatQuantifier=function(p,D){return D===void 0&&(D=!1),this.regexp_eatQuantifierPrefix(p,D)?(p.eat(63),!0):!1},at.regexp_eatQuantifierPrefix=function(p,D){return p.eat(42)||p.eat(43)||p.eat(63)||this.regexp_eatBracedQuantifier(p,D)},at.regexp_eatBracedQuantifier=function(p,D){var z=p.pos;if(p.eat(123)){var V=0,ae=-1;if(this.regexp_eatDecimalDigits(p)&&(V=p.lastIntValue,p.eat(44)&&this.regexp_eatDecimalDigits(p)&&(ae=p.lastIntValue),p.eat(125)))return ae!==-1&&ae=16){var z=this.regexp_eatModifiers(p),V=p.eat(45);if(z||V){for(var ae=0;ae-1&&p.raise("Duplicate regular expression modifiers")}if(V){var Se=this.regexp_eatModifiers(p);!z&&!Se&&p.current()===58&&p.raise("Invalid regular expression modifiers");for(var He=0;He-1||z.indexOf(it)>-1)&&p.raise("Duplicate regular expression modifiers")}}}}if(p.eat(58)){if(this.regexp_disjunction(p),p.eat(41))return!0;p.raise("Unterminated group")}}p.pos=D}return!1},at.regexp_eatCapturingGroup=function(p){if(p.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(p):p.current()===63&&p.raise("Invalid group"),this.regexp_disjunction(p),p.eat(41))return p.numCapturingParens+=1,!0;p.raise("Unterminated group")}return!1},at.regexp_eatModifiers=function(p){for(var D="",z=0;(z=p.current())!==-1&&si(z);)D+=j(z),p.advance();return D};function si(p){return p===105||p===109||p===115}at.regexp_eatExtendedAtom=function(p){return p.eat(46)||this.regexp_eatReverseSolidusAtomEscape(p)||this.regexp_eatCharacterClass(p)||this.regexp_eatUncapturingGroup(p)||this.regexp_eatCapturingGroup(p)||this.regexp_eatInvalidBracedQuantifier(p)||this.regexp_eatExtendedPatternCharacter(p)},at.regexp_eatInvalidBracedQuantifier=function(p){return this.regexp_eatBracedQuantifier(p,!0)&&p.raise("Nothing to repeat"),!1},at.regexp_eatSyntaxCharacter=function(p){var D=p.current();return Wr(D)?(p.lastIntValue=D,p.advance(),!0):!1};function Wr(p){return p===36||p>=40&&p<=43||p===46||p===63||p>=91&&p<=94||p>=123&&p<=125}at.regexp_eatPatternCharacters=function(p){for(var D=p.pos,z=0;(z=p.current())!==-1&&!Wr(z);)p.advance();return p.pos!==D},at.regexp_eatExtendedPatternCharacter=function(p){var D=p.current();return D!==-1&&D!==36&&!(D>=40&&D<=43)&&D!==46&&D!==63&&D!==91&&D!==94&&D!==124?(p.advance(),!0):!1},at.regexp_groupSpecifier=function(p){if(p.eat(63)){this.regexp_eatGroupName(p)||p.raise("Invalid group");var D=this.options.ecmaVersion>=16,z=p.groupNames[p.lastStringValue];if(z)if(D)for(var V=0,ae=z;V=11,V=p.current(z);return p.advance(z),V===92&&this.regexp_eatRegExpUnicodeEscapeSequence(p,z)&&(V=p.lastIntValue),Ha(V)?(p.lastIntValue=V,!0):(p.pos=D,!1)};function Ha(p){return b(p,!0)||p===36||p===95}at.regexp_eatRegExpIdentifierPart=function(p){var D=p.pos,z=this.options.ecmaVersion>=11,V=p.current(z);return p.advance(z),V===92&&this.regexp_eatRegExpUnicodeEscapeSequence(p,z)&&(V=p.lastIntValue),aa(V)?(p.lastIntValue=V,!0):(p.pos=D,!1)};function aa(p){return y(p,!0)||p===36||p===95||p===8204||p===8205}at.regexp_eatAtomEscape=function(p){return this.regexp_eatBackReference(p)||this.regexp_eatCharacterClassEscape(p)||this.regexp_eatCharacterEscape(p)||p.switchN&&this.regexp_eatKGroupName(p)?!0:(p.switchU&&(p.current()===99&&p.raise("Invalid unicode escape"),p.raise("Invalid escape")),!1)},at.regexp_eatBackReference=function(p){var D=p.pos;if(this.regexp_eatDecimalEscape(p)){var z=p.lastIntValue;if(p.switchU)return z>p.maxBackReference&&(p.maxBackReference=z),!0;if(z<=p.numCapturingParens)return!0;p.pos=D}return!1},at.regexp_eatKGroupName=function(p){if(p.eat(107)){if(this.regexp_eatGroupName(p))return p.backReferenceNames.push(p.lastStringValue),!0;p.raise("Invalid named reference")}return!1},at.regexp_eatCharacterEscape=function(p){return this.regexp_eatControlEscape(p)||this.regexp_eatCControlLetter(p)||this.regexp_eatZero(p)||this.regexp_eatHexEscapeSequence(p)||this.regexp_eatRegExpUnicodeEscapeSequence(p,!1)||!p.switchU&&this.regexp_eatLegacyOctalEscapeSequence(p)||this.regexp_eatIdentityEscape(p)},at.regexp_eatCControlLetter=function(p){var D=p.pos;if(p.eat(99)){if(this.regexp_eatControlLetter(p))return!0;p.pos=D}return!1},at.regexp_eatZero=function(p){return p.current()===48&&!ua(p.lookahead())?(p.lastIntValue=0,p.advance(),!0):!1},at.regexp_eatControlEscape=function(p){var D=p.current();return D===116?(p.lastIntValue=9,p.advance(),!0):D===110?(p.lastIntValue=10,p.advance(),!0):D===118?(p.lastIntValue=11,p.advance(),!0):D===102?(p.lastIntValue=12,p.advance(),!0):D===114?(p.lastIntValue=13,p.advance(),!0):!1},at.regexp_eatControlLetter=function(p){var D=p.current();return oa(D)?(p.lastIntValue=D%32,p.advance(),!0):!1};function oa(p){return p>=65&&p<=90||p>=97&&p<=122}at.regexp_eatRegExpUnicodeEscapeSequence=function(p,D){D===void 0&&(D=!1);var z=p.pos,V=D||p.switchU;if(p.eat(117)){if(this.regexp_eatFixedHexDigits(p,4)){var ae=p.lastIntValue;if(V&&ae>=55296&&ae<=56319){var ke=p.pos;if(p.eat(92)&&p.eat(117)&&this.regexp_eatFixedHexDigits(p,4)){var Se=p.lastIntValue;if(Se>=56320&&Se<=57343)return p.lastIntValue=(ae-55296)*1024+(Se-56320)+65536,!0}p.pos=ke,p.lastIntValue=ae}return!0}if(V&&p.eat(123)&&this.regexp_eatHexDigits(p)&&p.eat(125)&&cf(p.lastIntValue))return!0;V&&p.raise("Invalid unicode escape"),p.pos=z}return!1};function cf(p){return p>=0&&p<=1114111}at.regexp_eatIdentityEscape=function(p){if(p.switchU)return this.regexp_eatSyntaxCharacter(p)?!0:p.eat(47)?(p.lastIntValue=47,!0):!1;var D=p.current();return D!==99&&(!p.switchN||D!==107)?(p.lastIntValue=D,p.advance(),!0):!1},at.regexp_eatDecimalEscape=function(p){p.lastIntValue=0;var D=p.current();if(D>=49&&D<=57){do p.lastIntValue=10*p.lastIntValue+(D-48),p.advance();while((D=p.current())>=48&&D<=57);return!0}return!1};var Ou=0,Ei=1,ai=2;at.regexp_eatCharacterClassEscape=function(p){var D=p.current();if(la(D))return p.lastIntValue=-1,p.advance(),Ei;var z=!1;if(p.switchU&&this.options.ecmaVersion>=9&&((z=D===80)||D===112)){p.lastIntValue=-1,p.advance();var V;if(p.eat(123)&&(V=this.regexp_eatUnicodePropertyValueExpression(p))&&p.eat(125))return z&&V===ai&&p.raise("Invalid property name"),V;p.raise("Invalid property name")}return Ou};function la(p){return p===100||p===68||p===115||p===83||p===119||p===87}at.regexp_eatUnicodePropertyValueExpression=function(p){var D=p.pos;if(this.regexp_eatUnicodePropertyName(p)&&p.eat(61)){var z=p.lastStringValue;if(this.regexp_eatUnicodePropertyValue(p)){var V=p.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(p,z,V),Ei}}if(p.pos=D,this.regexp_eatLoneUnicodePropertyNameOrValue(p)){var ae=p.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(p,ae)}return Ou},at.regexp_validateUnicodePropertyNameAndValue=function(p,D,z){fe(p.unicodeProperties.nonBinary,D)||p.raise("Invalid property name"),p.unicodeProperties.nonBinary[D].test(z)||p.raise("Invalid property value")},at.regexp_validateUnicodePropertyNameOrValue=function(p,D){if(p.unicodeProperties.binary.test(D))return Ei;if(p.switchV&&p.unicodeProperties.binaryOfStrings.test(D))return ai;p.raise("Invalid property name")},at.regexp_eatUnicodePropertyName=function(p){var D=0;for(p.lastStringValue="";Ms(D=p.current());)p.lastStringValue+=j(D),p.advance();return p.lastStringValue!==""};function Ms(p){return oa(p)||p===95}at.regexp_eatUnicodePropertyValue=function(p){var D=0;for(p.lastStringValue="";Mi(D=p.current());)p.lastStringValue+=j(D),p.advance();return p.lastStringValue!==""};function Mi(p){return Ms(p)||ua(p)}at.regexp_eatLoneUnicodePropertyNameOrValue=function(p){return this.regexp_eatUnicodePropertyValue(p)},at.regexp_eatCharacterClass=function(p){if(p.eat(91)){var D=p.eat(94),z=this.regexp_classContents(p);return p.eat(93)||p.raise("Unterminated character class"),D&&z===ai&&p.raise("Negated character class may contain strings"),!0}return!1},at.regexp_classContents=function(p){return p.current()===93?Ei:p.switchV?this.regexp_classSetExpression(p):(this.regexp_nonEmptyClassRanges(p),Ei)},at.regexp_nonEmptyClassRanges=function(p){for(;this.regexp_eatClassAtom(p);){var D=p.lastIntValue;if(p.eat(45)&&this.regexp_eatClassAtom(p)){var z=p.lastIntValue;p.switchU&&(D===-1||z===-1)&&p.raise("Invalid character class"),D!==-1&&z!==-1&&D>z&&p.raise("Range out of order in character class")}}},at.regexp_eatClassAtom=function(p){var D=p.pos;if(p.eat(92)){if(this.regexp_eatClassEscape(p))return!0;if(p.switchU){var z=p.current();(z===99||ca(z))&&p.raise("Invalid class escape"),p.raise("Invalid escape")}p.pos=D}var V=p.current();return V!==93?(p.lastIntValue=V,p.advance(),!0):!1},at.regexp_eatClassEscape=function(p){var D=p.pos;if(p.eat(98))return p.lastIntValue=8,!0;if(p.switchU&&p.eat(45))return p.lastIntValue=45,!0;if(!p.switchU&&p.eat(99)){if(this.regexp_eatClassControlLetter(p))return!0;p.pos=D}return this.regexp_eatCharacterClassEscape(p)||this.regexp_eatCharacterEscape(p)},at.regexp_classSetExpression=function(p){var D=Ei,z;if(!this.regexp_eatClassSetRange(p))if(z=this.regexp_eatClassSetOperand(p)){z===ai&&(D=ai);for(var V=p.pos;p.eatChars([38,38]);){if(p.current()!==38&&(z=this.regexp_eatClassSetOperand(p))){z!==ai&&(D=Ei);continue}p.raise("Invalid character in character class")}if(V!==p.pos)return D;for(;p.eatChars([45,45]);)this.regexp_eatClassSetOperand(p)||p.raise("Invalid character in character class");if(V!==p.pos)return D}else p.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(p)){if(z=this.regexp_eatClassSetOperand(p),!z)return D;z===ai&&(D=ai)}},at.regexp_eatClassSetRange=function(p){var D=p.pos;if(this.regexp_eatClassSetCharacter(p)){var z=p.lastIntValue;if(p.eat(45)&&this.regexp_eatClassSetCharacter(p)){var V=p.lastIntValue;return z!==-1&&V!==-1&&z>V&&p.raise("Range out of order in character class"),!0}p.pos=D}return!1},at.regexp_eatClassSetOperand=function(p){return this.regexp_eatClassSetCharacter(p)?Ei:this.regexp_eatClassStringDisjunction(p)||this.regexp_eatNestedClass(p)},at.regexp_eatNestedClass=function(p){var D=p.pos;if(p.eat(91)){var z=p.eat(94),V=this.regexp_classContents(p);if(p.eat(93))return z&&V===ai&&p.raise("Negated character class may contain strings"),V;p.pos=D}if(p.eat(92)){var ae=this.regexp_eatCharacterClassEscape(p);if(ae)return ae;p.pos=D}return null},at.regexp_eatClassStringDisjunction=function(p){var D=p.pos;if(p.eatChars([92,113])){if(p.eat(123)){var z=this.regexp_classStringDisjunctionContents(p);if(p.eat(125))return z}else p.raise("Invalid escape");p.pos=D}return null},at.regexp_classStringDisjunctionContents=function(p){for(var D=this.regexp_classString(p);p.eat(124);)this.regexp_classString(p)===ai&&(D=ai);return D},at.regexp_classString=function(p){for(var D=0;this.regexp_eatClassSetCharacter(p);)D++;return D===1?Ei:ai},at.regexp_eatClassSetCharacter=function(p){var D=p.pos;if(p.eat(92))return this.regexp_eatCharacterEscape(p)||this.regexp_eatClassSetReservedPunctuator(p)?!0:p.eat(98)?(p.lastIntValue=8,!0):(p.pos=D,!1);var z=p.current();return z<0||z===p.lookahead()&&Dl(z)||En(z)?!1:(p.advance(),p.lastIntValue=z,!0)};function Dl(p){return p===33||p>=35&&p<=38||p>=42&&p<=44||p===46||p>=58&&p<=64||p===94||p===96||p===126}function En(p){return p===40||p===41||p===45||p===47||p>=91&&p<=93||p>=123&&p<=125}at.regexp_eatClassSetReservedPunctuator=function(p){var D=p.current();return Gt(D)?(p.lastIntValue=D,p.advance(),!0):!1};function Gt(p){return p===33||p===35||p===37||p===38||p===44||p===45||p>=58&&p<=62||p===64||p===96||p===126}at.regexp_eatClassControlLetter=function(p){var D=p.current();return ua(D)||D===95?(p.lastIntValue=D%32,p.advance(),!0):!1},at.regexp_eatHexEscapeSequence=function(p){var D=p.pos;if(p.eat(120)){if(this.regexp_eatFixedHexDigits(p,2))return!0;p.switchU&&p.raise("Invalid escape"),p.pos=D}return!1},at.regexp_eatDecimalDigits=function(p){var D=p.pos,z=0;for(p.lastIntValue=0;ua(z=p.current());)p.lastIntValue=10*p.lastIntValue+(z-48),p.advance();return p.pos!==D};function ua(p){return p>=48&&p<=57}at.regexp_eatHexDigits=function(p){var D=p.pos,z=0;for(p.lastIntValue=0;sr(z=p.current());)p.lastIntValue=16*p.lastIntValue+Bn(z),p.advance();return p.pos!==D};function sr(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function Bn(p){return p>=65&&p<=70?10+(p-65):p>=97&&p<=102?10+(p-97):p-48}at.regexp_eatLegacyOctalEscapeSequence=function(p){if(this.regexp_eatOctalDigit(p)){var D=p.lastIntValue;if(this.regexp_eatOctalDigit(p)){var z=p.lastIntValue;D<=3&&this.regexp_eatOctalDigit(p)?p.lastIntValue=D*64+z*8+p.lastIntValue:p.lastIntValue=D*8+z}else p.lastIntValue=D;return!0}return!1},at.regexp_eatOctalDigit=function(p){var D=p.current();return ca(D)?(p.lastIntValue=D-48,p.advance(),!0):(p.lastIntValue=0,!1)};function ca(p){return p>=48&&p<=55}at.regexp_eatFixedHexDigits=function(p,D){var z=p.pos;p.lastIntValue=0;for(var V=0;V=this.input.length)return this.finishToken(w.eof);if(p.override)return p.override(this);this.readToken(this.fullCharCodeAtPos())},tn.readToken=function(p){return b(p,this.options.ecmaVersion>=6)||p===92?this.readWord():this.getTokenFromCode(p)},tn.fullCharCodeAt=function(p){var D=this.input.charCodeAt(p);if(D<=55295||D>=56320)return D;var z=this.input.charCodeAt(p+1);return z<=56319||z>=57344?D:(D<<10)+z-56613888},tn.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},tn.skipBlockComment=function(){var p=this.options.onComment&&this.curPosition(),D=this.pos,z=this.input.indexOf("*/",this.pos+=2);if(z===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=z+2,this.options.locations)for(var V=void 0,ae=D;(V=I(this.input,ae,this.pos))>-1;)++this.curLine,ae=this.lineStart=V;this.options.onComment&&this.options.onComment(!0,this.input.slice(D+2,z),D,this.pos,p,this.curPosition())},tn.skipLineComment=function(p){for(var D=this.pos,z=this.options.onComment&&this.curPosition(),V=this.input.charCodeAt(this.pos+=p);this.pos8&&p<14||p>=5760&&F.test(String.fromCharCode(p)))++this.pos;else break e}}},tn.finishToken=function(p,D){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var z=this.type;this.type=p,this.value=D,this.updateContext(z)},tn.readToken_dot=function(){var p=this.input.charCodeAt(this.pos+1);if(p>=48&&p<=57)return this.readNumber(!0);var D=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&p===46&&D===46?(this.pos+=3,this.finishToken(w.ellipsis)):(++this.pos,this.finishToken(w.dot))},tn.readToken_slash=function(){var p=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):p===61?this.finishOp(w.assign,2):this.finishOp(w.slash,1)},tn.readToken_mult_modulo_exp=function(p){var D=this.input.charCodeAt(this.pos+1),z=1,V=p===42?w.star:w.modulo;return this.options.ecmaVersion>=7&&p===42&&D===42&&(++z,V=w.starstar,D=this.input.charCodeAt(this.pos+2)),D===61?this.finishOp(w.assign,z+1):this.finishOp(V,z)},tn.readToken_pipe_amp=function(p){var D=this.input.charCodeAt(this.pos+1);if(D===p){if(this.options.ecmaVersion>=12){var z=this.input.charCodeAt(this.pos+2);if(z===61)return this.finishOp(w.assign,3)}return this.finishOp(p===124?w.logicalOR:w.logicalAND,2)}return D===61?this.finishOp(w.assign,2):this.finishOp(p===124?w.bitwiseOR:w.bitwiseAND,1)},tn.readToken_caret=function(){var p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(w.assign,2):this.finishOp(w.bitwiseXOR,1)},tn.readToken_plus_min=function(p){var D=this.input.charCodeAt(this.pos+1);return D===p?D===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||T.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(w.incDec,2):D===61?this.finishOp(w.assign,2):this.finishOp(w.plusMin,1)},tn.readToken_lt_gt=function(p){var D=this.input.charCodeAt(this.pos+1),z=1;return D===p?(z=p===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+z)===61?this.finishOp(w.assign,z+1):this.finishOp(w.bitShift,z)):D===33&&p===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(D===61&&(z=2),this.finishOp(w.relational,z))},tn.readToken_eq_excl=function(p){var D=this.input.charCodeAt(this.pos+1);return D===61?this.finishOp(w.equality,this.input.charCodeAt(this.pos+2)===61?3:2):p===61&&D===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(w.arrow)):this.finishOp(p===61?w.eq:w.prefix,1)},tn.readToken_question=function(){var p=this.options.ecmaVersion;if(p>=11){var D=this.input.charCodeAt(this.pos+1);if(D===46){var z=this.input.charCodeAt(this.pos+2);if(z<48||z>57)return this.finishOp(w.questionDot,2)}if(D===63){if(p>=12){var V=this.input.charCodeAt(this.pos+2);if(V===61)return this.finishOp(w.assign,3)}return this.finishOp(w.coalesce,2)}}return this.finishOp(w.question,1)},tn.readToken_numberSign=function(){var p=this.options.ecmaVersion,D=35;if(p>=13&&(++this.pos,D=this.fullCharCodeAtPos(),b(D,!0)||D===92))return this.finishToken(w.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+j(D)+"'")},tn.getTokenFromCode=function(p){switch(p){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(w.parenL);case 41:return++this.pos,this.finishToken(w.parenR);case 59:return++this.pos,this.finishToken(w.semi);case 44:return++this.pos,this.finishToken(w.comma);case 91:return++this.pos,this.finishToken(w.bracketL);case 93:return++this.pos,this.finishToken(w.bracketR);case 123:return++this.pos,this.finishToken(w.braceL);case 125:return++this.pos,this.finishToken(w.braceR);case 58:return++this.pos,this.finishToken(w.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(w.backQuote);case 48:var D=this.input.charCodeAt(this.pos+1);if(D===120||D===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(D===111||D===79)return this.readRadixNumber(8);if(D===98||D===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(p);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(p);case 124:case 38:return this.readToken_pipe_amp(p);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(p);case 60:case 62:return this.readToken_lt_gt(p);case 61:case 33:return this.readToken_eq_excl(p);case 63:return this.readToken_question();case 126:return this.finishOp(w.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+j(p)+"'")},tn.finishOp=function(p,D){var z=this.input.slice(this.pos,this.pos+D);return this.pos+=D,this.finishToken(p,z)},tn.readRegexp=function(){for(var p,D,z=this.pos;;){this.pos>=this.input.length&&this.raise(z,"Unterminated regular expression");var V=this.input.charAt(this.pos);if(T.test(V)&&this.raise(z,"Unterminated regular expression"),p)p=!1;else{if(V==="[")D=!0;else if(V==="]"&&D)D=!1;else if(V==="/"&&!D)break;p=V==="\\"}++this.pos}var ae=this.input.slice(z,this.pos);++this.pos;var ke=this.pos,Se=this.readWord1();this.containsEsc&&this.unexpected(ke);var He=this.regexpState||(this.regexpState=new Sr(this));He.reset(z,ae,Se),this.validateRegExpFlags(He),this.validateRegExpPattern(He);var it=null;try{it=new RegExp(ae,Se)}catch{}return this.finishToken(w.regexp,{pattern:ae,flags:Se,value:it})},tn.readInt=function(p,D,z){for(var V=this.options.ecmaVersion>=12&&D===void 0,ae=z&&this.input.charCodeAt(this.pos)===48,ke=this.pos,Se=0,He=0,it=0,It=D??1/0;it=97?zn=Kt-97+10:Kt>=65?zn=Kt-65+10:Kt>=48&&Kt<=57?zn=Kt-48:zn=1/0,zn>=p)break;He=Kt,Se=Se*p+zn}return V&&He===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===ke||D!=null&&this.pos-ke!==D?null:Se};function fa(p,D){return D?parseInt(p,8):parseFloat(p.replace(/_/g,""))}function ot(p){return typeof BigInt!="function"?null:BigInt(p.replace(/_/g,""))}tn.readRadixNumber=function(p){var D=this.pos;this.pos+=2;var z=this.readInt(p);return z==null&&this.raise(this.start+2,"Expected number in radix "+p),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(z=ot(this.input.slice(D,this.pos)),++this.pos):b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,z)},tn.readNumber=function(p){var D=this.pos;!p&&this.readInt(10,void 0,!0)===null&&this.raise(D,"Invalid number");var z=this.pos-D>=2&&this.input.charCodeAt(D)===48;z&&this.strict&&this.raise(D,"Invalid number");var V=this.input.charCodeAt(this.pos);if(!z&&!p&&this.options.ecmaVersion>=11&&V===110){var ae=ot(this.input.slice(D,this.pos));return++this.pos,b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,ae)}z&&/[89]/.test(this.input.slice(D,this.pos))&&(z=!1),V===46&&!z&&(++this.pos,this.readInt(10),V=this.input.charCodeAt(this.pos)),(V===69||V===101)&&!z&&(V=this.input.charCodeAt(++this.pos),(V===43||V===45)&&++this.pos,this.readInt(10)===null&&this.raise(D,"Invalid number")),b(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var ke=fa(this.input.slice(D,this.pos),z);return this.finishToken(w.num,ke)},tn.readCodePoint=function(){var p=this.input.charCodeAt(this.pos),D;if(p===123){this.options.ecmaVersion<6&&this.unexpected();var z=++this.pos;D=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,D>1114111&&this.invalidStringToken(z,"Code point out of bounds")}else D=this.readHexChar(4);return D},tn.readString=function(p){for(var D="",z=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var V=this.input.charCodeAt(this.pos);if(V===p)break;V===92?(D+=this.input.slice(z,this.pos),D+=this.readEscapedChar(!1),z=this.pos):V===8232||V===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(P(V)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return D+=this.input.slice(z,this.pos++),this.finishToken(w.string,D)};var yt={};tn.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(p){if(p===yt)this.readInvalidTemplateToken();else throw p}this.inTemplateElement=!1},tn.invalidStringToken=function(p,D){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw yt;this.raise(p,D)},tn.readTmplToken=function(){for(var p="",D=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var z=this.input.charCodeAt(this.pos);if(z===96||z===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===w.template||this.type===w.invalidTemplate)?z===36?(this.pos+=2,this.finishToken(w.dollarBraceL)):(++this.pos,this.finishToken(w.backQuote)):(p+=this.input.slice(D,this.pos),this.finishToken(w.template,p));if(z===92)p+=this.input.slice(D,this.pos),p+=this.readEscapedChar(!0),D=this.pos;else if(P(z)){switch(p+=this.input.slice(D,this.pos),++this.pos,z){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:p+=` +`;break;default:p+=String.fromCharCode(z);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),D=this.pos}else++this.pos}},tn.readInvalidTemplateToken=function(){for(;this.pos=48&&D<=55){var V=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],ae=parseInt(V,8);return ae>255&&(V=V.slice(0,-1),ae=parseInt(V,8)),this.pos+=V.length-1,D=this.input.charCodeAt(this.pos),(V!=="0"||D===56||D===57)&&(this.strict||p)&&this.invalidStringToken(this.pos-1-V.length,p?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(ae)}return P(D)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(D)}},tn.readHexChar=function(p){var D=this.pos,z=this.readInt(16,p);return z===null&&this.invalidStringToken(D,"Bad character escape sequence"),z},tn.readWord1=function(){this.containsEsc=!1;for(var p="",D=!0,z=this.pos,V=this.options.ecmaVersion>=6;this.pos...",!0,!0),E={tc_oTag:g,tc_cTag:b,tc_expr:y},C={jsxName:new m("jsxName"),jsxText:new m("jsxText",{beforeExpr:!0}),jsxTagStart:new m("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new m("jsxTagEnd")};C.jsxTagStart.updateContext=function(){this.context.push(y),this.context.push(g),this.exprAllowed=!1},C.jsxTagEnd.updateContext=function(x){let S=this.context.pop();S===g&&x===f.slash||S===b?(this.context.pop(),this.exprAllowed=this.curContext()===y):this.exprAllowed=!0},u={tokContexts:E,tokTypes:C},i.set(l,u)}return u}function a(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return a(l.object)+"."+a(l.property)}e.exports=function(l){return l=l||{},function(u){return o({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},u)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(fT()).tokTypes},configurable:!0,enumerable:!0});function o(l,u){const f=u.acorn||fT(),h=s(f),m=f.tokTypes,g=h.tokTypes,b=f.tokContexts,y=h.tokContexts.tc_oTag,E=h.tokContexts.tc_cTag,C=h.tokContexts.tc_expr,x=f.isNewLine,S=f.isIdentifierStart,O=f.isIdentifierChar;return class extends u{static get acornJsx(){return h}jsx_readToken(){let _="",w=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let T=this.input.charCodeAt(this.pos);switch(T){case 60:case 123:return this.pos===this.start?T===60&&this.exprAllowed?(++this.pos,this.finishToken(g.jsxTagStart)):this.getTokenFromCode(T):(_+=this.input.slice(w,this.pos),this.finishToken(g.jsxText,_));case 38:_+=this.input.slice(w,this.pos),_+=this.jsx_readEntity(),w=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(T===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(T)?(_+=this.input.slice(w,this.pos),_+=this.jsx_readNewLine(!0),w=this.pos):++this.pos}}}jsx_readNewLine(_){let w=this.input.charCodeAt(this.pos),T;return++this.pos,w===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,T=_?` +`:`\r +`):T=String.fromCharCode(w),this.options.locations&&(++this.curLine,this.lineStart=this.pos),T}jsx_readString(_){let w="",T=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let A=this.input.charCodeAt(this.pos);if(A===_)break;A===38?(w+=this.input.slice(T,this.pos),w+=this.jsx_readEntity(),T=this.pos):x(A)?(w+=this.input.slice(T,this.pos),w+=this.jsx_readNewLine(!1),T=this.pos):++this.pos}return w+=this.input.slice(T,this.pos++),this.finishToken(m.string,w)}jsx_readEntity(){let _="",w=0,T,A=this.input[this.pos];A!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let P=++this.pos;for(;this.pos")}let F=P.name?"Element":"Fragment";return T["opening"+F]=P,T["closing"+F]=I,T.children=A,this.type===m.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(T,"JSX"+F)}jsx_parseText(){let _=this.parseLiteral(this.value);return _.type="JSXText",_}jsx_parseElement(){let _=this.start,w=this.startLoc;return this.next(),this.jsx_parseElementAt(_,w)}parseExprAtom(_){return this.type===g.jsxText?this.jsx_parseText():this.type===g.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(_)}readToken(_){let w=this.curContext();if(w===C)return this.jsx_readToken();if(w===y||w===E){if(S(_))return this.jsx_readWord();if(_==62)return++this.pos,this.finishToken(g.jsxTagEnd);if((_===34||_===39)&&w==y)return this.jsx_readString(_)}return _===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(g.jsxTagStart)):super.readToken(_)}updateContext(_){if(this.type==m.braceL){var w=this.curContext();w==y?this.context.push(b.b_expr):w==C?this.context.push(b.b_tmpl):super.updateContext(_),this.exprAllowed=!0}else if(this.type===m.slash&&_===g.jsxTagStart)this.context.length-=2,this.context.push(E),this.exprAllowed=!1;else return super.updateContext(_)}}}})(V2)),V2.exports}var rhe=nhe();const SL=Rr(rhe),ti=yl(/[A-Za-z]/),Pi=yl(/[\dA-Za-z]/),ihe=yl(/[#-'*+\--9=?A-Z^-~]/);function am(e){return e!==null&&(e<32||e===127)}const _4=yl(/\d/),she=yl(/[\dA-Fa-f]/),_L=yl(/[!-/:-@[-`{-~]/);function Et(e){return e!==null&&e<-2}function Dn(e){return e!==null&&(e<0||e===32)}function nn(e){return e===-2||e===-1||e===32}const s1=yl(new RegExp("\\p{P}|\\p{S}","u")),Ti=yl(/\s/);function yl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function gn(e,t,n,r){const i=r?r-1:1/0;let s=0;return a;function a(l){return nn(l)?(e.enter(n),o(l)):t(l)}function o(l){return nn(l)&&s++=i?t(f):n(f)}}const ahe={}.hasOwnProperty,ohe=Symbol("continue"),H2=Symbol("exit"),lhe=Symbol("skip");function uhe(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(s,a,o,l){return W2(s)&&(u.displayName="node ("+s.type+")"),u;function u(){const f=n?hT(n(s,a,o,l)):[];if(f[0]===H2)return f;if(f[0]!==lhe){let h;for(h in s)if(ahe.call(s,h)&&s[h]&&typeof s[h]=="object"&&h!=="data"&&h!=="position"){const m=l.concat(s),g=s[h];if(Array.isArray(g)){const b=g;let y=0;for(;y>-1&&y0)}function z3(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),s=[],a=[],o=i.onComment,l=i.onToken;let u=!1,f,h;const m=Object.assign({},i,{onComment:s,preserveParens:!0});l&&(m.onToken=a);const g=che(e,t.tokenTypes),b=g.value,y=n+b+r,E=t.expression&&pT(b);if(E&&!t.allowEmpty)throw new Ln("Unexpected empty expression",{place:x(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{f=t.expression&&!E?t.acorn.parseExpressionAt(y,0,m):t.acorn.parse(y,m)}catch(S){const O=S,_=x(O.pos);O.message=String(O.message).replace(/ \(\d+:\d+\)$/,""),O.pos=_.offset,O.loc={line:_.line,column:_.column-1},h=O,u=O.raisedAt>=n.length+b.length||O.message==="Unterminated comment"}if(f&&t.expression&&!E)if(pT(y.slice(f.end,y.length-r.length)))f={type:"Program",start:0,end:n.length+b.length,body:[{type:"ExpressionStatement",expression:f,start:0,end:n.length+b.length}],sourceType:"module",comments:[]};else{const S=x(f.end),O=new Error("Unexpected content after expression");O.pos=S.offset,O.loc={line:S.line,column:S.column-1},h=O,f=void 0}if(f){if(f.comments=s,uhe(f,function(S,O,_,w){let T=w[w.length-1],A=O;S.type==="ParenthesizedExpression"&&T&&A&&(typeof _=="number"&&(T=T[A],A=_),T[A]=S.expression),C(S)}),Array.isArray(o))o.push(...s);else if(typeof o=="function")for(const S of s)o(S.type==="Block",S.value,S.start,S.end,S.loc.start,S.loc.end);for(const S of a)S.end<=n.length||S.start-n.length>=b.length||(C(S),Array.isArray(l)?l.push(S):l(S))}return{estree:f,error:h,swallow:u};function C(S){const O=x(S.start),_=x(S.end);S.start=O.offset,S.end=_.offset,S.loc={start:{line:O.line,column:O.column-1,offset:O.offset},end:{line:_.line,column:_.column-1,offset:_.offset}},S.range=[S.start,S.end]}function x(S){let O=S-n.length;O<0?O=0:O>b.length&&(O=b.length);let _=fhe(g.stops,O);return _||(_={line:t.start.line,column:t.start.column,offset:t.start.offset}),_}}function pT(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function che(e,t){const n={value:"",stops:[]};let r=-1;for(;++r0&&a[0]===-1;)a.shift();const o=dhe(a);n.stops.push([n.value.length,i[1].start]),n.value+=o,n.stops.push([n.value.length,i[1].end])}}}return n}function fhe(e,t){let n=0;for(;n-1?e:void 0}const hhe=2,xc="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",phe="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",mhe="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",gT="#unexpected-type-in-code-expected-an-object-spread-spread",ghe="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",vhe="#could-not-parse-expression-with-acorn";function om(e,t,n,r,i,s,a,o,l,u,f){const h=this,m=this.events.length+3;let g=0,b,y;return E;function E(O){return e.enter(n),e.enter(r),e.consume(O),e.exit(r),b=h.now(),C}function C(O){if(O===null){if(y)throw y;const _=new Ln("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:h.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw _.url=xc+phe,_}if(Et(O))return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),S;if(O===125&&g===0){const _=s?yhe.call(h,s,a,i,m,b,u||!1,l||!1):{type:"ok",estree:void 0};if(_.type==="ok"){e.enter(r),e.consume(O),e.exit(r);const w=e.exit(n);return o&&_.estree&&Object.assign(w,{estree:_.estree}),t}return y=_.message,e.enter(i),e.consume(O),x}return e.enter(i),x(O)}function x(O){return O===125&&g===0||O===null||Et(O)?(e.exit(i),C(O)):(O===123&&!s?g+=1:O===125&&(g-=1),e.consume(O),x)}function S(O){const _=h.now();if(_.line!==b.line&&!f&&h.parser.lazy[_.line]){const w=new Ln("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:h.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw w.url=xc+mhe,w}return nn(O)?gn(e,C,"linePrefix",hhe+1)(O):C(O)}}function yhe(e,t,n,r,i,s,a){const o=z3(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:s,prefix:a?"({":"",suffix:a?"})":""}),l=o.estree;if(a&&l){const u=l.body[0];if(u.type!=="ExpressionStatement"||u.expression.type!=="ObjectExpression"){const f=xp(u),h=new Ln("Unexpected `"+u.type+"` in code: expected an object spread (`{...spread}`)",{place:f.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=xc+gT,h}if(u.expression.properties[1]){const f=xp(u.expression.properties[1]),h=new Ln("Unexpected extra content in spread: only a single spread is supported",{place:f.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw h.url=xc+ghe,h}if(u.expression.properties[0]&&u.expression.properties[0].type!=="SpreadElement"){const f=xp(u.expression.properties[0]),h=new Ln("Unexpected `"+u.expression.properties[0].type+"` in code: only spread elements are supported",{place:f.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw h.url=xc+gT,h}}if(o.error){const u=new Ln("Could not parse expression with acorn",{cause:o.error,place:{line:o.error.loc.line,column:o.error.loc.column+1,offset:o.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return u.url=xc+vhe,{type:"nok",message:u}}return{type:"ok",estree:l}}function xhe(e){const t=e||{},n=t.addResult,r=t.acorn,i=t.spread;let s=t.allowEmpty,a;if(s==null&&(s=!0),r){if(!r.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");a=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions)}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:o,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function o(u,f,h){const m=this;return g;function g(C){return b(C)}function b(C){return om.call(m,u,y,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",r,a,n,i,s)(C)}function y(C){return nn(C)?gn(u,E,"whitespace")(C):E(C)}function E(C){const x=m.parser.constructs.flow[60],O=(Array.isArray(x)?x:x?[x]:[]).find(function(_){return _.name==="mdxJsxFlowTag"});return C===60&&O?u.attempt(O,E,h)(C):C===null||Et(C)?f(C):h(C)}}function l(u,f){const h=this;return m;function m(g){return om.call(h,u,f,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",r,a,n,i,s,!0)(g)}}}const bhe=/[$_\p{ID_Start}]/u,whe=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,Ehe=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,Che={};function Ws(e){return e?bhe.test(String.fromCodePoint(e)):!1}function Uf(e,t){const r=(t||Che).jsx?Ehe:whe;return e?r.test(String.fromCodePoint(e)):!1}const vT="https://github.com/micromark/micromark-extension-mdx-jsx";function TL(e,t,n,r,i,s,a,o,l,u,f,h,m,g,b,y,E,C,x,S,O,_,w,T,A,P,I,F,M,W,ee,U){const fe=this;let ue,ne;return me;function me(Y){return e.enter(o),e.enter(l),e.consume(Y),e.exit(l),j}function j(Y){return Dn(Y)?n(Y):(ue=Q,mt(Y))}function Q(Y){if(Y===47)return e.enter(u),e.consume(Y),e.exit(u),ue=re,mt;if(Y===62)return vt(Y);if(Y!==null&&Y>=0&&Ws(Y))return e.enter(h),e.enter(m),e.consume(Y),K;be(Y,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(Y===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function re(Y){if(Y===62)return vt(Y);if(Y!==null&&Y>=0&&Ws(Y))return e.enter(h),e.enter(m),e.consume(Y),K;be(Y,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(Y===42||Y===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function K(Y){if(Y!==null&&Y>=0&&Uf(Y,{jsx:!0}))return e.consume(Y),K;if(Y===46||Y===47||Y===58||Y===62||Y===123||Dn(Y)||Ti(Y))return e.exit(m),ue=Be,mt(Y);be(Y,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(Y===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function Be(Y){if(Y===46)return e.enter(g),e.consume(Y),e.exit(g),ue=ze,mt;if(Y===58)return e.enter(y),e.consume(Y),e.exit(y),ue=Fe,mt;if(Y===47||Y===62||Y===123||Y!==null&&Y>=0&&Ws(Y))return e.exit(h),Oe(Y);be(Y,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ze(Y){if(Y!==null&&Y>=0&&Ws(Y))return e.enter(b),e.consume(Y),$e;be(Y,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function $e(Y){if(Y!==null&&Y>=0&&Uf(Y,{jsx:!0}))return e.consume(Y),$e;if(Y===46||Y===47||Y===62||Y===123||Dn(Y)||Ti(Y))return e.exit(b),ue=je,mt(Y);be(Y,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(Y===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function je(Y){if(Y===46)return e.enter(g),e.consume(Y),e.exit(g),ue=ze,mt;if(Y===47||Y===62||Y===123||Y!==null&&Y>=0&&Ws(Y))return e.exit(h),Oe(Y);be(Y,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Fe(Y){if(Y!==null&&Y>=0&&Ws(Y))return e.enter(E),e.consume(Y),Me;be(Y,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(Y===43||Y!==null&&Y>46&&Y<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function Me(Y){if(Y!==null&&Y>=0&&Uf(Y,{jsx:!0}))return e.consume(Y),Me;if(Y===47||Y===62||Y===123||Dn(Y)||Ti(Y))return e.exit(E),ue=ge,mt(Y);be(Y,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(Y){if(Y===47||Y===62||Y===123||Y!==null&&Y>=0&&Ws(Y))return e.exit(h),Oe(Y);be(Y,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Oe(Y){if(Y===47)return e.enter(f),e.consume(Y),e.exit(f),ue=Ht,mt;if(Y===62)return vt(Y);if(Y===123)return om.call(fe,e,se,C,x,S,r,i,s,!0,!1,a)(Y);if(Y!==null&&Y>=0&&Ws(Y))return e.enter(O),e.enter(_),e.enter(w),e.consume(Y),we;be(Y,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function se(Y){return ue=Oe,mt(Y)}function we(Y){if(Y!==null&&Y>=0&&Uf(Y,{jsx:!0}))return e.consume(Y),we;if(Y===47||Y===58||Y===61||Y===62||Y===123||Dn(Y)||Ti(Y))return e.exit(w),ue=_e,mt(Y);be(Y,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function _e(Y){if(Y===58)return e.enter(T),e.consume(Y),e.exit(T),ue=Ee,mt;if(Y===61)return e.exit(_),e.enter(P),e.consume(Y),e.exit(P),ue=tt,mt;if(Y===47||Y===62||Y===123||Dn(Y)||Ti(Y)||Y!==null&&Y>=0&&Ws(Y))return e.exit(_),e.exit(O),ue=Oe,mt(Y);be(Y,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(Y){if(Y!==null&&Y>=0&&Ws(Y))return e.enter(A),e.consume(Y),qe;be(Y,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function qe(Y){if(Y!==null&&Y>=0&&Uf(Y,{jsx:!0}))return e.consume(Y),qe;if(Y===47||Y===61||Y===62||Y===123||Dn(Y)||Ti(Y))return e.exit(A),e.exit(_),ue=Ue,mt(Y);be(Y,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Ue(Y){if(Y===61)return e.enter(P),e.consume(Y),e.exit(P),ue=tt,mt;if(Y===47||Y===62||Y===123||Y!==null&&Y>=0&&Ws(Y))return e.exit(O),Oe(Y);be(Y,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function tt(Y){if(Y===34||Y===39)return e.enter(I),e.enter(F),e.consume(Y),e.exit(F),ne=Y,lt;if(Y===123)return om.call(fe,e,rt,W,ee,U,r,i,s,!1,!1,a)(Y);be(Y,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(Y===60?" (note: to use an element or fragment as a prop value in MDX, use `{}`)":""))}function rt(Y){return e.exit(O),ue=Oe,mt(Y)}function lt(Y){return Y===null&&be(Y,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ne)+"`"),Y===ne?(e.enter(F),e.consume(Y),e.exit(F),e.exit(I),e.exit(O),ne=void 0,ue=Oe,mt):Et(Y)?(ue=lt,mt(Y)):(e.enter(M),ut(Y))}function ut(Y){return Y===null||Y===ne||Et(Y)?(e.exit(M),lt(Y)):(e.consume(Y),ut)}function Ht(Y){if(Y===62)return vt(Y);be(Y,"after self-closing slash","`>` to end the tag"+(Y===42||Y===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function vt(Y){return e.enter(l),e.consume(Y),e.exit(l),e.exit(o),t}function mt(Y){return Et(Y)?(e.enter("lineEnding"),e.consume(Y),e.exit("lineEnding"),on):nn(Y)||Ti(Y)?(e.enter("esWhitespace"),qn(Y)):ue(Y)}function qn(Y){return Et(Y)?(e.exit("esWhitespace"),mt(Y)):nn(Y)||Ti(Y)?(e.consume(Y),qn):(e.exit("esWhitespace"),ue(Y))}function on(Y){if(!a&&fe.parser.lazy[fe.now().line]){const dt=new Ln("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",fe.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw dt.url=vT+"#unexpected-lazy-line-in-container-expected-line-to-be",dt}return mt(Y)}function be(Y,dt,ct){const dn=new Ln("Unexpected "+(Y===null?"end of file":"character `"+(Y===96?"` ` `":String.fromCodePoint(Y))+"` ("+khe(Y)+")")+" "+dt+", expected "+ct,fe.now(),"micromark-extension-mdx-jsx:unexpected-"+(Y===null?"eof":"character"));throw dn.url=vT+(Y===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),dn}}function khe(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function Dhe(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,s){return TL.call(this,r,i,s,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function She(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,s){const a=this;return o;function o(h){return l(h)}function l(h){return TL.call(a,r,u,s,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(h)}function u(h){return nn(h)?gn(r,f,"whitespace")(h):f(h)}function f(h){const m=a.parser.constructs.flow[123],g=Array.isArray(m)?m:m?[m]:[];let b;for(const y of g)if(y.name==="mdxFlowExpression"){b=y;break}return h===60?o(h):h===123&&b?r.attempt(b,f,s)(h):h===null||Et(h)?i(h):s(h)}}}function _he(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:She(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:Dhe(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Ahe(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}function Zs(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s0?(Zs(e,e.length,0,t),e):t}function Ia(e){if(e===null||Dn(e)||Ti(e))return 1;if(s1(e))return 2}function a1(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={...e[i][1].end},o={...e[n][1].start};yT(a,-s),yT(o,s);const l={type:s>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},f={type:s>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},h={type:s>1?"strong":"emphasis",start:{...l.start},end:{...u.end}};e[i][1].end={...l.start},e[n][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Cs(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=Cs(r,[["enter",h,t],["enter",l,t],["exit",l,t],["enter",f,t]]),r=Cs(r,a1(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Cs(r,[["exit",f,t],["enter",u,t],["exit",u,t],["exit",h,t]]);let m=0;e[n][1].end.offset-e[n][1].start.offset&&(m=2,r=Cs(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),Zs(e,i-1,n-i+3,r),n=i+r.length-m-2;break}}for(n=-1;++n0&&nn(w)?gn(e,x,"linePrefix",s+1)(w):x(w)}function x(w){return w===null||Et(w)?e.check(T4,y,O)(w):(e.enter("codeFlowValue"),S(w))}function S(w){return w===null||Et(w)?(e.exit("codeFlowValue"),x(w)):(e.consume(w),S)}function O(w){return e.exit("codeFenced"),t(w)}function _(w,T,A){let P=0;return I;function I(U){return w.enter("lineEnding"),w.consume(U),w.exit("lineEnding"),F}function F(U){return w.enter("codeFencedFence"),nn(U)?gn(w,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):M(U)}function M(U){return U===o?(w.enter("codeFencedFenceSequence"),W(U)):A(U)}function W(U){return U===o?(P++,w.consume(U),W):P>=a?(w.exit("codeFencedFenceSequence"),nn(U)?gn(w,ee,"whitespace")(U):ee(U)):A(U)}function ee(U){return U===null||Et(U)?(w.exit("codeFencedFence"),T(U)):A(U)}}}const G2={name:"codeIndented",tokenize:qhe},jhe={partial:!0,tokenize:$he};function qhe(e,t,n){return r;function r(o){return e.enter("codeIndented"),AL(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?a(o):Et(o)?e.attempt(jhe,i,a)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||Et(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),s)}function a(o){return e.exit("codeIndented"),t(o)}}function $he(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):AL(e,t,s,"linePrefix",4,4)(a)}function s(a){return Et(a)?i(a):n(a)}}const Vhe={name:"codeText",previous:Hhe,resolve:Uhe,tokenize:Whe};function Uhe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Hf(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Hf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Hf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function RL(e,t,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(C){return C===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(C),e.exit(s),m):C===null||C===32||C===41||am(C)?n(C):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(C))}function m(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===62?(e.exit("chunkString"),e.exit(o),m(C)):C===null||C===60||Et(C)?n(C):(e.consume(C),C===92?b:g)}function b(C){return C===60||C===62||C===92?(e.consume(C),g):g(C)}function y(C){return!f&&(C===null||C===41||Dn(C))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(C)):f999||g===null||g===91||g===93&&!l||g===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(g):g===93?(e.exit(s),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Et(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||Et(g)||o++>999?(e.exit("chunkString"),f(g)):(e.consume(g),l||(l=!nn(g)),g===92?m:h)}function m(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function IL(e,t,n,r,i,s){let a;return o;function o(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,l):n(m)}function l(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),u(m))}function u(m){return m===a?(e.exit(s),l(a)):m===null?n(m):Et(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),gn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||Et(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?h:f)}function h(m){return m===a||m===92?(e.consume(m),f):f(m)}}function gd(e,t){let n;return r;function r(i){return Et(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nn(i)?gn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function ea(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const epe={name:"definition",tokenize:npe},tpe={partial:!0,tokenize:rpe};function npe(e,t,n){const r=this;let i;return s;function s(g){return e.enter("definition"),a(g)}function a(g){return FL.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return i=ea(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),l):n(g)}function l(g){return Dn(g)?gd(e,u)(g):u(g)}function u(g){return RL(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function f(g){return e.attempt(tpe,h,h)(g)}function h(g){return nn(g)?gn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||Et(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function rpe(e,t,n){return r;function r(o){return Dn(o)?gd(e,i)(o):n(o)}function i(o){return IL(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return nn(o)?gn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Et(o)?t(o):n(o)}}const ipe={name:"hardBreakEscape",tokenize:spe};function spe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Et(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const ape={name:"headingAtx",resolve:ope,tokenize:lpe};function ope(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};Zs(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])}return e}function lpe(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Dn(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||Et(f)?(e.exit("atxHeading"),t(f)):nn(f)?gn(e,o,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),o(f))}function u(f){return f===null||f===35||Dn(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),u)}}const ML=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],N4=["pre","script","style","textarea"],upe={concrete:!0,name:"htmlFlow",resolveTo:fpe,tokenize:dpe},cpe={partial:!0,tokenize:hpe};function fpe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function dpe(e,t,n){const r=this;let i,s,a,o,l;return u;function u(K){return f(K)}function f(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),h}function h(K){return K===33?(e.consume(K),m):K===47?(e.consume(K),s=!0,y):K===63?(e.consume(K),i=3,r.interrupt?t:j):ti(K)?(e.consume(K),a=String.fromCharCode(K),E):n(K)}function m(K){return K===45?(e.consume(K),i=2,g):K===91?(e.consume(K),i=5,o=0,b):ti(K)?(e.consume(K),i=4,r.interrupt?t:j):n(K)}function g(K){return K===45?(e.consume(K),r.interrupt?t:j):n(K)}function b(K){const Be="CDATA[";return K===Be.charCodeAt(o++)?(e.consume(K),o===Be.length?r.interrupt?t:M:b):n(K)}function y(K){return ti(K)?(e.consume(K),a=String.fromCharCode(K),E):n(K)}function E(K){if(K===null||K===47||K===62||Dn(K)){const Be=K===47,ze=a.toLowerCase();return!Be&&!s&&N4.includes(ze)?(i=1,r.interrupt?t(K):M(K)):ML.includes(a.toLowerCase())?(i=6,Be?(e.consume(K),C):r.interrupt?t(K):M(K)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(K):s?x(K):S(K))}return K===45||Pi(K)?(e.consume(K),a+=String.fromCharCode(K),E):n(K)}function C(K){return K===62?(e.consume(K),r.interrupt?t:M):n(K)}function x(K){return nn(K)?(e.consume(K),x):I(K)}function S(K){return K===47?(e.consume(K),I):K===58||K===95||ti(K)?(e.consume(K),O):nn(K)?(e.consume(K),S):I(K)}function O(K){return K===45||K===46||K===58||K===95||Pi(K)?(e.consume(K),O):_(K)}function _(K){return K===61?(e.consume(K),w):nn(K)?(e.consume(K),_):S(K)}function w(K){return K===null||K===60||K===61||K===62||K===96?n(K):K===34||K===39?(e.consume(K),l=K,T):nn(K)?(e.consume(K),w):A(K)}function T(K){return K===l?(e.consume(K),l=null,P):K===null||Et(K)?n(K):(e.consume(K),T)}function A(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||Dn(K)?_(K):(e.consume(K),A)}function P(K){return K===47||K===62||nn(K)?S(K):n(K)}function I(K){return K===62?(e.consume(K),F):n(K)}function F(K){return K===null||Et(K)?M(K):nn(K)?(e.consume(K),F):n(K)}function M(K){return K===45&&i===2?(e.consume(K),fe):K===60&&i===1?(e.consume(K),ue):K===62&&i===4?(e.consume(K),Q):K===63&&i===3?(e.consume(K),j):K===93&&i===5?(e.consume(K),me):Et(K)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(cpe,re,W)(K)):K===null||Et(K)?(e.exit("htmlFlowData"),W(K)):(e.consume(K),M)}function W(K){return e.check(T4,ee,re)(K)}function ee(K){return e.enter("lineEnding"),e.consume(K),e.exit("lineEnding"),U}function U(K){return K===null||Et(K)?W(K):(e.enter("htmlFlowData"),M(K))}function fe(K){return K===45?(e.consume(K),j):M(K)}function ue(K){return K===47?(e.consume(K),a="",ne):M(K)}function ne(K){if(K===62){const Be=a.toLowerCase();return N4.includes(Be)?(e.consume(K),Q):M(K)}return ti(K)&&a.length<8?(e.consume(K),a+=String.fromCharCode(K),ne):M(K)}function me(K){return K===93?(e.consume(K),j):M(K)}function j(K){return K===62?(e.consume(K),Q):K===45&&i===2?(e.consume(K),j):M(K)}function Q(K){return K===null||Et(K)?(e.exit("htmlFlowData"),re(K)):(e.consume(K),Q)}function re(K){return e.exit("htmlFlow"),t(K)}}function hpe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(lf,t,n)}}const ppe={name:"htmlText",tokenize:mpe};function mpe(e,t,n){const r=this;let i,s,a;return o;function o(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),l}function l(j){return j===33?(e.consume(j),u):j===47?(e.consume(j),_):j===63?(e.consume(j),S):ti(j)?(e.consume(j),A):n(j)}function u(j){return j===45?(e.consume(j),f):j===91?(e.consume(j),s=0,b):ti(j)?(e.consume(j),x):n(j)}function f(j){return j===45?(e.consume(j),g):n(j)}function h(j){return j===null?n(j):j===45?(e.consume(j),m):Et(j)?(a=h,ue(j)):(e.consume(j),h)}function m(j){return j===45?(e.consume(j),g):h(j)}function g(j){return j===62?fe(j):j===45?m(j):h(j)}function b(j){const Q="CDATA[";return j===Q.charCodeAt(s++)?(e.consume(j),s===Q.length?y:b):n(j)}function y(j){return j===null?n(j):j===93?(e.consume(j),E):Et(j)?(a=y,ue(j)):(e.consume(j),y)}function E(j){return j===93?(e.consume(j),C):y(j)}function C(j){return j===62?fe(j):j===93?(e.consume(j),C):y(j)}function x(j){return j===null||j===62?fe(j):Et(j)?(a=x,ue(j)):(e.consume(j),x)}function S(j){return j===null?n(j):j===63?(e.consume(j),O):Et(j)?(a=S,ue(j)):(e.consume(j),S)}function O(j){return j===62?fe(j):S(j)}function _(j){return ti(j)?(e.consume(j),w):n(j)}function w(j){return j===45||Pi(j)?(e.consume(j),w):T(j)}function T(j){return Et(j)?(a=T,ue(j)):nn(j)?(e.consume(j),T):fe(j)}function A(j){return j===45||Pi(j)?(e.consume(j),A):j===47||j===62||Dn(j)?P(j):n(j)}function P(j){return j===47?(e.consume(j),fe):j===58||j===95||ti(j)?(e.consume(j),I):Et(j)?(a=P,ue(j)):nn(j)?(e.consume(j),P):fe(j)}function I(j){return j===45||j===46||j===58||j===95||Pi(j)?(e.consume(j),I):F(j)}function F(j){return j===61?(e.consume(j),M):Et(j)?(a=F,ue(j)):nn(j)?(e.consume(j),F):P(j)}function M(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),i=j,W):Et(j)?(a=M,ue(j)):nn(j)?(e.consume(j),M):(e.consume(j),ee)}function W(j){return j===i?(e.consume(j),i=void 0,U):j===null?n(j):Et(j)?(a=W,ue(j)):(e.consume(j),W)}function ee(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||Dn(j)?P(j):(e.consume(j),ee)}function U(j){return j===47||j===62||Dn(j)?P(j):n(j)}function fe(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function ue(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),ne}function ne(j){return nn(j)?gn(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):me(j)}function me(j){return e.enter("htmlTextData"),a(j)}}const q3={name:"labelEnd",resolveAll:xpe,resolveTo:bpe,tokenize:wpe},gpe={tokenize:Epe},vpe={tokenize:Cpe},ype={tokenize:kpe};function xpe(e){let t=-1;const n=[];for(;++t0&&i[i.length-1]._balanced;)i.pop();s=i[i.length-1]}return o;function o(m){return s?s._inactive?h(m):(a=r.parser.defined.includes(ea(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):n(m)}function l(m){return m===40?e.attempt(gpe,f,a?f:h)(m):m===91?e.attempt(vpe,f,a?u:h)(m):a?f(m):h(m)}function u(m){return e.attempt(ype,f,h)(m)}function f(m){return i.pop(),t(m)}function h(m){return s._balanced=!0,n(m)}}function Epe(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Dn(h)?gd(e,s)(h):s(h)}function s(h){return h===41?f(h):RL(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Dn(h)?gd(e,l)(h):f(h)}function o(h){return n(h)}function l(h){return h===34||h===39||h===40?IL(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function u(h){return Dn(h)?gd(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Cpe(e,t,n){const r=this;return i;function i(o){return FL.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(ea(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function kpe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Dpe={name:"labelStartImage",resolveAll:q3.resolveAll,tokenize:Spe};function Spe(e,t,n){const r=this;let i;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(l))}}const _pe={name:"labelStartLink",resolveAll:q3.resolveAll,tokenize:Ape};function Ape(e,t,n){const r=this;let i;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const Y2={name:"lineEnding",tokenize:Tpe};function Tpe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),gn(e,t,"linePrefix")}}const bp={name:"thematicBreak",tokenize:Npe};function Npe(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Et(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),nn(u)?gn(e,o,"whitespace")(u):o(u))}}const _i={continuation:{tokenize:Rpe},exit:Ipe,name:"list",tokenize:Ppe},Ope={partial:!0,tokenize:Mpe},Bpe={partial:!0,tokenize:Fpe};function Ppe(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(g){const b=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:_4(g)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(bp,n,u)(g):u(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(g)}return n(g)}function l(g){return _4(g)&&++a<10?(e.consume(g),l):(!r.interrupt||a<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),u(g)):n(g)}function u(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(lf,r.interrupt?n:f,e.attempt(Ope,m,h))}function f(g){return r.containerState.initialBlankLine=!0,s++,m(g)}function h(g){return nn(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):n(g)}function m(g){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function Rpe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(lf,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,gn(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!nn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Bpe,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,gn(e,e.attempt(_i,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Fpe(e,t,n){const r=this;return gn(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function Ipe(e){e.exit(this.containerState.type)}function Mpe(e,t,n){const r=this;return gn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!nn(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}let lm=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){bT(this,t,n,r,!1)}addBefore(t,n,r){bT(this,t,n,r,!0)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}};function bT(e,t,n,r,i){if(n===0&&r.length===0)return;const s=e.index.get(t);if(s){s[1]+=n,i?(r.push(...s[2]),s[2]=r):s[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}const wT={name:"setextUnderline",resolveTo:Lpe,tokenize:zpe};function Lpe(e,t){const n=new lm;let r=e.length,i,s,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(n.add(s,0,[["enter",o,t]]),n.add(a+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[a][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function zpe(e,t,n){const r=this;let i;return s;function s(u){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),nn(u)?gn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Et(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const jpe={tokenize:Vpe,partial:!0},ET="https://github.com/micromark/micromark-extension-mdxjs-esm",qpe=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function $pe(e){const t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(s,a,o){const l=this,u=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),f=this.events.length+1;let h="";return l.interrupt?o:m;function m(x){return l.now().column>1?o(x):(s.enter("mdxjsEsm"),s.enter("mdxjsEsmData"),s.consume(x),h+=String.fromCharCode(x),g)}function g(x){return ti(x)?(s.consume(x),h+=String.fromCharCode(x),g):(h==="import"||h==="export")&&x===32?(s.consume(x),b):o(x)}function b(x){return x===null||Et(x)?(s.exit("mdxjsEsmData"),y(x)):(s.consume(x),b)}function y(x){return x===null?C(x):Et(x)?s.check(jpe,C,E)(x):(s.enter("mdxjsEsmData"),b(x))}function E(x){return s.enter("lineEnding"),s.consume(x),s.exit("lineEnding"),y}function C(x){const S=z3(l.events.slice(f),{acorn:n,acornOptions:r,tokenTypes:["mdxjsEsmData"],prefix:u.length>0?"var "+u.join(",")+` +`:""});if(S.error){if(x!==null&&S.swallow)return E(x);const _=new Ln("Could not parse import/exports with acorn",{cause:S.error,place:{line:S.error.loc.line,column:S.error.loc.column+1,offset:S.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw _.url=ET+"#could-not-parse-importexports-with-acorn",_}u.length>0&&S.estree.body.shift();let O=-1;for(;++O "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),nme);return i(),a}function nme(e,t,n){return">"+(n?"":" ")+e}function jL(e,t){return ST(e,t.inConstruct,!0)&&!ST(e,t.notInConstruct,!1)}function ST(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ra&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function O4(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function rme(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ime(e,t,n,r){const i=rme(n),s=e.value||"";if(O4(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(s,sme);return h(),m}const a=n.createTracker(r),o=i.repeat(Math.max(qL(s,i)+1,3)),l=n.enter("codeFenced"),u=i==="`"?"GraveAccent":"Tilde";let f=a.move(o);if(e.lang){const h=n.enter(`codeFencedLang${u}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${u}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:` +`,encode:["`"],...a.current()})),h()}return f+=a.move(` +`),s&&(f+=a.move(s+` +`)),f+=a.move(o),l(),f}function sme(e,t,n){return(n?"":" ")+e}function U3(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ame(e,t,n,r){const i=U3(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":` +`,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),a(),u}function ome(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}H3.attention=lme;H3.peek=ume;function H3(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function lme(e,t){return{construct:"emphasis",markers:ome(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function ume(e,t,n){return n.options.emphasis||"*"}function W3(e){return"&#x"+e.toString(16).toUpperCase()+";"}const $L=[],cme=!0,B4=!1,fme="skip";function VL(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=l1(i),a=r?-1:1;o(e,void 0,[])();function o(l,u,f){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=$L,b,y,E;if((!t||s(l,u,f[f.length-1]||void 0))&&(g=dme(n(l,f)),g[0]===B4))return g;if("children"in l&&l.children){const C=l;if(C.children&&g[0]!==fme)for(y=(r?C.children.length:-1)+a,E=f.concat(C);y>-1&&y",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function vme(){return"!"}GL.peek=yme;function GL(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const u=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const f=n.stack;n.stack=f.filter(function(m){return m!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!u||u!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function yme(){return"!"}YL.peek=xme;function YL(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s\u007F]/.test(e.url))}XL.peek=bme;function XL(e,t,n,r){const i=U3(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);if(JL(e,n)){const f=n.stack;n.stack=f.filter(function(g){return g!=="phrasing"});const h=n.enter("autolink");let m=a.move("<");return m+=a.move(n.containerPhrasing(e,{before:m,after:">",...a.current()})),m+=a.move(">"),h(),n.stack=f,m}const o=n.enter("link");let l=n.enter("label"),u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),o(),u}function bme(e,t,n){return JL(e,n)?"<":"["}QL.peek=wme;function QL(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const f=n.stack;n.stack=f.filter(function(m){return m!=="phrasing"}),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!u||u!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function wme(){return"["}function G3(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Eme(e){const t=G3(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cme(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ZL(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kme(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?Cme(n):G3(n);const o=e.ordered?a==="."?")":".":Eme(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),ZL(n)===a&&f){let h=-1;for(;++h-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),f);return l(),u;function f(h,m,g){return m?(g?"":" ".repeat(a))+h:(g?s:s+" ".repeat(a-s.length))+h}}function _me(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}function Ame(e,t,n,r){if(!e.children.some(function(o){return LL(o)}))return n.containerFlow(e,r);const s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),a}function Tme(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Y3.attention=Nme;Y3.peek=Ome;function Y3(e,t,n,r){const i=n.enter("phrasing"),s=n.containerPhrasing({type:"root",children:[e]},r);return i(),s}function Nme(e,t){return{construct:"strong",markers:Tme(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function Ome(e,t,n){return n.options.strong||"*"}function Bme(e,t,n,r){const i=t?t.children:[],s=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[s+1],beforeNode:i[s-1]})}function Pme(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Rme(e,t,n){const r=(ZL(n)+(n.options.ruleSpaces?" ":"")).repeat(Pme(n));return n.options.ruleSpaces?r.slice(0,-1):r}const J3={blockquote:tme,break:_T,code:ime,definition:ame,emphasis:H3,hardBreak:_T,heading:mme,html:WL,image:KL,imageReference:GL,inlineCode:YL,link:XL,linkReference:QL,list:kme,listItem:Sme,paragraph:_me,root:Ame,strong:Y3,text:Bme,thematicBreak:Rme};function R4(e){if(e.charCodeAt(0)!==60)return;const t=e.charCodeAt(1);if(t===33){const o=e.charCodeAt(2);return o===45?2:o===91?5:ti(o)?4:void 0}if(t===63)return 3;const n=t===47,r=n?2:1;let i=r,s=e.charCodeAt(i);if(!ti(s))return;for(;s===45||Pi(s);)s=e.charCodeAt(++i);const a=e.slice(r,i).toLowerCase();return!n&&s!==47&&N4.includes(a)?1:ML.includes(a)?6:7}const Fme=[Ime];function Ime(e,t,n,r){if(t.type==="code"&&O4(t,r)&&(e.type==="list"||e.type===t.type&&O4(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean"){if(e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&HL(t,r)))return;if(e.type==="html"){const i=R4(e.value);if(i===void 0||i===6||i===7)return 1}if(e.type==="paragraph"&&t.type==="html"){const i=R4(t.value);if(i===void 0||i===7)return 1}return n.spread?1:0}}const Hl=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],ez=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` +`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\r",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\r",after:"\\r",inConstruct:"phrasing"},{character:` +`,before:"\\n",inConstruct:"phrasing"},{character:` +`,after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:Hl},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r +]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Hl},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r +*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Hl},{atBreak:!0,character:"+",after:`(?:[ \r +])`},{atBreak:!0,character:"-",after:`(?:[ \r +-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r +]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Hl},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Hl},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Hl},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Hl},{atBreak:!0,character:"~"},{character:"<",inConstruct:"autolink"},{character:">",inConstruct:"autolink"},{character:"",inConstruct:"autolink"}];let TT=-1;for(;++TT<33;)ez.push({character:String.fromCharCode(TT),inConstruct:"autolink"});function tz(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Mme=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nz(e){return e.replace(Mme,Lme)}function Lme(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tz(n.slice(s?2:1),s?16:10)}return zd(n)||e}function zme(e){return e.label||!e.identifier?e.label||"":nz(e.identifier)}function jme(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((e.beforeNode?"^":t?"("+t+")":"")+(/[$()*+.?[\\\]^{|}]/.test(e.character)?"\\":"")+e.character+(e.afterNode?"$":e.after?"(?:"+e.after+")":""),e.unicode?"gu":"g")}return e._compiled}function um(e){const t=e.codePointAt(0);return t===void 0?"":String.fromCodePoint(t)}function vd(e){const t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function NT(e,t,n){const r=Ia(e),i=Ia(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}const qme=new Map([["*",!1],["_",!0]]);function $me(e,t,n){const r=new Set;for(const s of e){const a=n.get(s);if(a&&s.attention&&t.some(o=>o.attention===s.attention))for(const o of a.tokens)r.add(o.attention)}const i=[];for(const s of e)s.attention&&r.delete(s.attention)&&i.push(s.attention);return i.reverse(),i}function rz(e,t,n){const r=[],i=new Map,s=new Map;let a=0;for(;an.index)return{chosen:l,mistake:f,tokens:u}}}}function Hme(e,t){let n=0;for(;n1&&s>1?2:1:s,f=o.markers.slice(o.end-u,o.end),h=r.markers.slice(r.start,r.start+u),m=f[0],g=h[0];if(m===f[u-1]&&m.value.length===u&&g===h[u-1]&&g.value.length===u&&m.attention===g.attention)t.delete(m),t.delete(g);else{const b=[...new Set([...f,...h])];for(const y of b){const E=t.get(y);E&&E.push(...b)}}o.end-=u,r.start+=u;break}}(a===-1||r.start===r.end)&&n++}}function Wme(e,t,n){if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of n)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of t){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!_L(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const s of n)r.push(i.repeat(s))}return r}function iz(e,t,n){const r=t.indexStack,i=e.children||[],s=[];let a=-1,o=n.before;r.push(-1);let l=t.createTracker(n);for(;++a0?b[0].value:"",E=NT(m.charCodeAt(m.length-1),y.charCodeAt(0),f);E.inside&&Uh(b,!0);const C=b.length>0?vd(b[b.length-1].value):"",x=NT(g.charCodeAt(0),C.charCodeAt(C.length-1),f);x.inside&&Uh(b,!1),E.outside&&m!==` +`&&m!=="\r"&&Uh(i,!1),x.outside&&(s=g),i.push({value:u,attention:l},...b,{value:u,attention:l}),a=u.charAt(u.length-1)}return i}function F4(e,t,n){let r=new Map;const i=X3(e,r,t,n);let s=i,a=rz(s,t,n);for(;a;){const l=Ume(e,r,a,t,n);if(!l){s=i;break}r=l.chosen,s=l.tokens,a=l.mistake}let o="";for(const l of s)o+=l.value;return o}function Kme(e,t,n){const r=t.indexStack,i=e.children||[],s=t.createTracker(n),a=[];let o=-1;for(r.push(-1);++o + +`}return` + +`}const Yme=/\r?\n|\r/g;function Jme(e,t){const n=[];let r=0,i=0,s;for(;s=Yme.exec(e);)a(e.slice(r,s.index)),n.push(s[0]),r=s.index+s[0].length,i++;return a(e.slice(r)),n.join("");function a(o){n.push(t(o,i,!o))}}const J2={}.hasOwnProperty;function Xme(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],s=[],a={},o=e.stack.includes("autolink"),l=n.before?n.before.length:0,u=r.length-(n.after?n.after.length:0);let f=-1;for(;++f=u)){if(r.charAt(g)==="_"&&g>0&&Ia(r.charCodeAt(g-1))===void 0&&!J2.call(a,g-1)&&!(g-1===l&&/[*_]/.test(r.charAt(l-1)))){let b=g+1;for(;b"u"||e.call(u,m)},a=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},o=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return X2=function l(){var u,f,h,m,g,b,y=arguments[0],E=1,C=arguments.length,x=!1;for(typeof y=="boolean"&&(x=y,y=arguments[1]||{},E=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});Ea.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(u){const f=u;if(o&&n)throw f;return i(f)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Ea={basename:f1e,dirname:d1e,extname:h1e,join:p1e,sep:"/"};function f1e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');g0(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function d1e(e){if(g0(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function h1e(e){g0(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function p1e(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function g1e(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function g0(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const v1e={cwd:y1e};function y1e(){return"/"}function M4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function x1e(e){if(typeof e=="string")e=new URL(e);else if(!M4(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return b1e(e)}function b1e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[g,...b]=f;const y=r[m][1];I4(y)&&I4(g)&&(g=Q2(!0,y,g)),r[m]=[u,g,...b]}}}}const c1=new Q3().freeze();function nw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function iw(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function IT(e){if(!I4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function MT(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hh(e){return D1e(e)?e:new w1e(e)}function D1e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S1e(e){return typeof e=="string"||_1e(e)}function _1e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const az=/^\d{4}-\d{2}-\d{2}$/,A1e=/^[A-Z][a-z]{2} [A-Z][a-z]{2} \d{2} \d{4}$/,L4=e=>!Number.isNaN(e.getTime()),LT=e=>String(e).padStart(2,"0"),zT=e=>`${e.getFullYear()}-${LT(e.getMonth()+1)}-${LT(e.getDate())}`,T1e=e=>{if(!az.test(e))return;const[t,n,r]=e.split("-"),i=Number(t),s=Number(n),a=Number(r),o=new Date(i,s-1,a,12);if(L4(o)&&!(o.getFullYear()!==i||o.getMonth()!==s-1||o.getDate()!==a))return o},oz=e=>{if(e instanceof Date)return L4(e)?{date:zT(e)}:{};if(!e)return{};const t=e.trim();if(!t)return{};if(az.test(t))return T1e(t)?{date:t}:{rawDate:t};if(A1e.test(t)){const n=new Date(t);if(L4(n))return{date:zT(n)}}return{rawDate:t}},N1e=(e,{date:t,...n}={})=>{const r=oz(t??new Date);e.tf.insertNodes([{children:[{text:""}],...r,type:e.getType(te.date)},{text:" "}],n)};Jt({key:te.date,node:{isElement:!0,isInline:!0,isVoid:!0}}).extendEditorTransforms(({editor:e})=>({insert:{date:De(N1e,e)}}));const O1e={tokenize:B1e};function B1e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),gn(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Et(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const P1e={tokenize:R1e},jT={tokenize:F1e};function R1e(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(ra))return;const T=t.events.length;let A=T,P,I;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(P){I=t.events[A][1].end;break}P=!0}for(C(r),w=T;wS;){const _=n[O];t.containerState=_[1],_[0].exit.call(t,e)}n.length=S}function x(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function F1e(e,t,n){return gn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const I1e={tokenize:M1e};function M1e(e){const t=this,n=e.attempt(lf,r,e.attempt(this.parser.constructs.flowInitial,i,gn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Yhe,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const L1e={resolveAll:uz()},z1e=lz("string"),j1e=lz("text");function lz(e){return{resolveAll:uz(e==="text"?q1e:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(f){return u(f)?s(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return u(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const h=i[f];let m=-1;if(h)for(;++m-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function ege(e,t){let n=-1;const r=[];let i;for(;++n0&&i(t.beforeEnter,{...dt,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1]),cz.call(Lt,be[rn][1].type)&&Lt[be[rn][1].type].call({...dt,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1]),be[rn][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...dt,sliceSerialize:be[rn][2].sliceSerialize},be[rn][1])}if(dt.tokenStack.length>0){const Lt=dt.tokenStack[dt.tokenStack.length-1];(Lt[1]||$T).call(dt,void 0,Lt[0])}for(Y.position={start:Qo(be.length>0?be[0][1].start:{line:1,column:1,offset:0}),end:Qo(be.length>0?be[be.length-2][1].end:{line:1,column:1,offset:0})},rn=-1;++rn{const n=sge[t];return ci(e,n)??n??t},age=e=>e?.rules?Object.entries(e.rules).filter(([t,n])=>n?.mark).map(([t])=>t):[];function _c(e){const t={};return e&&e.length>0&&e.forEach(n=>{if(n.name&&n.value!==void 0){let r=n.value;try{r=JSON.parse(n.value)}catch{r=n.value}t[n.name]=r}}),t}function $d(e){return Object.entries(e).map(([t,n])=>({name:t,type:"mdxJsxAttribute",value:typeof n=="string"||n?.type==="mdxJsxAttributeValueExpression"?n:JSON.stringify(n)}))}const oge={column:{deserialize:(e,t,n)=>{const r=_c(e.attributes);return{children:yr(e.children,{...t},n),type:Bt(n.editor,te.column),...r}},serialize:(e,t)=>{const{id:n,children:r,type:i,...s}=e;return{attributes:$d(s),children:Qr(r,t),name:i,type:"mdxJsxFlowElement"}}},column_group:{deserialize:(e,t,n)=>{const r=_c(e.attributes);return{children:yr(e.children,{...t},n),type:Bt(n.editor,te.columnGroup),...r}},serialize:(e,t)=>{const{id:n,children:r,type:i,...s}=e;return{attributes:$d(s),children:Qr(r,t),name:i,type:"mdxJsxFlowElement"}}}};function Wf(e){const t=lP(e);return{mark:!0,serialize:n=>({attributes:[{name:"style",type:"mdxJsxAttribute",value:`${t}: ${n[e]};`}],children:[{type:"text",value:n.text}],name:"span",type:"mdxJsxTextElement"})}}const lge={backgroundColor:Wf("backgroundColor"),color:Wf("color"),fontFamily:Wf("fontFamily"),fontSize:Wf("fontSize"),fontWeight:Wf("fontWeight"),span:{mark:!0,deserialize:(e,t,n)=>{const r=Kf(e,"font-family"),i=Kf(e,"font-size"),s=Kf(e,"font-weight"),a=Kf(e,"color"),o=Kf(e,"background-color");return yr(e.children,{...t,backgroundColor:o,color:a,fontFamily:r,fontSize:i,fontWeight:s},n)}}};function Wh(){return{deserialize:e=>{const{src:t,...n}=_c(e.attributes);return{children:[{text:""}],type:e.name,url:t,...n}},serialize:(e,t)=>{const{children:n,type:r,url:i,...s}=e;return{attributes:$d({...s,src:i}),children:Qr(n,t),name:r,type:"mdxJsxFlowElement"}}}}const uge={audio:Wh(),file:Wh(),media_embed:Wh(),video:Wh()},cge=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i,plainMarks:s,remarkPlugins:a,remarkStringifyOptions:o,rules:l}=e.getOptions(al),u={...f1(e),...t?.rules??l};return{allowedNodes:t?.allowedNodes??n,allowNode:t?.allowNode??r,disallowedNodes:t?.disallowedNodes??i,editor:e,plainMarks:t?.plainMarks??s,preserveEmptyParagraphs:t?.preserveEmptyParagraphs,remarkPlugins:t?.remarkPlugins??a??[],remarkStringifyOptions:t?.remarkStringifyOptions??o,rules:u,spread:t?.spread,value:t?.value??e.children,withBlockId:t?.withBlockId??!1}},hz=(e,t)=>{const n=t.rules,r=f1(t.editor);return n?.[e]?.serialize===void 0?r[e]?.serialize:n?.[e]?.serialize},fge=e=>{console.warn(`Unreachable code: ${JSON.stringify(e)}`)},VT=["italic","bold","strikethrough","code"],UT=(e,t,n)=>{const r=age(t),i=[],s=[];let a=[],o="";for(let l=0;l!VT.includes(y))].forEach(y=>{const E=Bt(t.editor,y);if(u[E]){if(t.plainMarks?.includes(y))return;m?.[E]||s.push(y),g?.[E]||a.push(y)}});const b=s.reduce((y,E,C)=>(a.includes(E)&&y.push({key:E,index:C}),y),[]);if(s.length>0){let y="",E="";if(b.length===1&&(f.toString()!==s.toString()||h.includes("italic")&&a.includes("bold"))&&s.length-b.length===0){for(;o.startsWith(" ");)y+=" ",o=o.slice(1);for(;o.endsWith(" ");)E+=" ",o=o.slice(0,-1)}let C={type:"text",value:o};o="",s.slice().reverse().forEach(S=>{const O=hz(S,t);switch(O&&(C={...O(u,t),children:[C]}),S){case"bold":C={children:[C],type:"strong"};break;case"code":{let _=C;for(;_.type!=="text"&&_.type!=="inlineCode";)_=_.children[0];_.type="inlineCode";break}case"italic":C={children:[C],type:"emphasis"};break;case"strikethrough":C={children:[C],type:"delete"};break}});const x=[];y.length>0&&x.push({type:"text",value:y}),x.push(C),E.length>0&&x.push({type:"text",value:E}),i.push(...x)}b.length>0?b.reverse().forEach(y=>{s.splice(y.index,1)}):(i.push({type:"text",value:o}),o="")}return o&&(i.push({type:"text",value:o}),o=""),mz(i).map(l=>pz(l)?l:{type:"text",value:""})},pz=e=>{if(e.type==="inlineCode"||e.type==="text")return e.value!=="";if(e.children?.length>0){for(const t of e.children)if(t.type!=="emphasis"&&t.type!=="strong"&&t.type!=="inlineCode"&&t.type!=="delete"&&t.type!=="text"||pz(t))return!0}return!1},mz=e=>{const t=[];for(const n of e){const r=t.at(-1);if(r&&r.type===n.type)r.type==="text"||r.type==="inlineCode"?r.value+=n.value:r.children=mz(r.children.concat(n.children));else{if(n.type==="text"&&n.value==="")continue;t.push(n)}}return t},gz=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i}=t;if(!e.type)return!0;if(n&&i&&n.length>0&&i.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");if(n){if(!n.includes(e.type))return!1}else if(i?.includes(e.type))return!1;return r?.serialize?r.serialize(e):!0},vz=(e,t)=>({attributes:[{name:"id",type:"mdxJsxAttribute",value:String(t)}],children:[e],data:{_mdxExplicitJsx:!0},name:"block",type:"mdxJsxFlowElement"});function dge(e,t,n=!1){if(e.length===0)throw new Error("Cannot create a list from empty nodes");if(t.withBlockId&&n&&e.some(s=>s.id))return hge(e,t);const r={children:[],ordered:e[0].listStyleType==="decimal",spread:t.spread??!1,start:e[0].listStart,type:"list"},i=[{indent:e[0].indent,list:r,parent:null,styleType:e[0].listStyleType}];for(let s=0;s1&&i.at(-1).indent>o;)i.pop();let l=i.at(-1);if(!l)throw new Error("Stack should never be empty");if(l.indent===o&&l.styleType!==a.listStyleType&&l.parent){const h={children:[],ordered:a.listStyleType==="decimal",spread:t.spread??!1,start:a.listStart,type:"list"};l.parent.children.push(h),i[i.length-1]={indent:o,list:h,parent:l.parent,styleType:a.listStyleType},l=i.at(-1)}const u={checked:null,children:[{children:Qr(a.children,t),type:"paragraph"}],spread:t.spread??!1,type:"listItem"};a.listStyleType==="todo"&&a.checked!==void 0&&(u.checked=a.checked),l.list.children.push(u);const f=e[s+1];if(f&&f.indent>o){const h={children:[],ordered:f.listStyleType==="decimal",spread:t.spread??!1,start:f.listStart,type:"list"};u.children.push(h),i.push({indent:f.indent,list:h,parent:u,styleType:f.listStyleType})}}return r}function hge(e,t){const n=[];for(let r=0;r{const r=[];let i=[];const s=[];for(let a=0;a<=e.length;a++){const o=e[a];if(o&&Fn.isText(o)&&o.rawHtml)i.length>0&&(r.push(...UT(i,t)),i=[]),r.push({type:"html",value:o.text});else if(o&&Fn.isText(o))pge(o,t)&&i.push(o);else{if(i.length>0&&r.push(...UT(i,t)),i=[],!o||!gz(o,t))continue;const l=Bt(t.editor,te.p)??te.p;if(o?.type===l&&"listStyleType"in o){s.push(o);const u=e[a+1],f=u&&u.type===l&&"listStyleType"in u,h=s.at(0),m=f&&h&&u.listStyleType!==h.listStyleType&&u.indent===h.indent;if(!f||m){const g=dge(s,t,n);g.type==="fragment"?r.push(...g.children):r.push(g),s.length=0}}else{const u=yz(o,t,n);u&&r.push(u)}}}return r},yz=(e,t,n=!1)=>{const r=t.editor;let i=ci(r,e.type)??e.type;te.heading.includes(i)&&(i="heading"),(i===te.olClassic||i===te.ulClassic)&&(i="list");const s=hz(i,t);if(s){const a=s(e,t);return t.withBlockId&&e.id&&n?vz(a,e.id):a}fge(e)},pge=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i}=t;if(n&&i&&n.length>0&&i.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");for(const[s,a]of Object.entries(e))if(s!=="text"){if(n){if(!n.includes(s)&&a)return!1}else if(i?.includes(s)&&a)return!1}return r?.serialize?r.serialize(e):!0},mge=(e,t)=>{const n=cge(e,t),{remarkPlugins:r,value:i}=n,s=c1().use(r??[]).use(sz,{emphasis:"_",resourceLink:!1,...n?.remarkStringifyOptions}),a=gge({children:i,options:n});return s.stringify(a)},gge=({children:e,options:t})=>({children:Qr(e,t,!0),type:"root"}),xz=(e,{allowedNodes:t,disallowedNodes:n})=>{if(t&&n&&t.length>0&&n.length>0)throw new Error("Cannot combine allowedNodes with disallowedNodes");return t?t.includes(e):!n?.includes(e)},cm=(e,t)=>{if(!e.type)return!0;const n=v0(t.editor,e.type);return xz(n,t)?t.allowNode?.deserialize?t.allowNode.deserialize({...e,type:n}):!0:!1},vge=/^ /,yge=/^\d+$/,xge=["li","ol","ul"],Vd=(e,t)=>(e?.type==="mdxJsxTextElement"||e?.type==="mdxJsxFlowElement")&&t.includes(e.name),bz=e=>e?.type==="text"&&e.value.trim()==="",eC=(e,t)=>e.attributes.find(n=>n.name===t),tC=(e,t)=>e.attributes.every(n=>t.includes(n.name)),HT=(e,t)=>[void 0,null,"true"].includes(eC(e,t)?.value),wz=e=>{const t=eC(e,"start");if(!t)return 1;const n=typeof t.value=="string"&&yge.test(t.value)?Number(t.value):0;return Number.isSafeInteger(n)&&n>=1?n:void 0},Ez=e=>Vd(e,["input"])&&tC(e,["checked","disabled","type"])&&eC(e,"type")?.value==="checkbox"&&HT(e,"checked")&&HT(e,"disabled"),xu=e=>Vd(e,["ol","ul"])&&tC(e,e.name==="ol"?["start"]:[])&&wz(e)!==void 0&&e.children.every(t=>bz(t)||bge(t,e.name==="ul")),bge=(e,t)=>{if(!Vd(e,["li"])||!tC(e,[]))return!1;const n=e.children.findIndex(xu);return e.children.every((r,i)=>Vd(r,["input"])?i===0&&t&&Ez(r):n===-1||i<=n||bz(r)||xu(r))},Cz=(e,t)=>e[t]?.name==="ol"&&e.slice(0,t).some(n=>xu(n)&&n.name==="ol"),kz=(e,t,n,r=1,i=!1)=>{if(!cm(e,n))return[];const s=e.name==="ol",a=wz(e),o=Bt(n.editor,s?te.ol:te.ul);return e.children.filter(l=>Vd(l,["li"])).flatMap((l,u)=>cm(l,n)?wge(l,t,n,{indent:r,listRestart:s&&u===0&&i?a:void 0,listRestartPolite:s&&u===0&&!i&&a>1?a:void 0,listStart:s?a+u:void 0,listStyleType:o}):[])},wge=(e,t,n,{indent:r,listRestart:i,listRestartPolite:s,listStart:a,listStyleType:o})=>{const[l,...u]=e.children,f=Ez(l),[h,...m]=u,g=h?.type==="text"?[{...h,value:h.value.replace(vge,"")},...m]:u,b={children:yr((f?g:e.children).filter(y=>!xu(y)),t,n).map(y=>y.text==="​"?{...y,text:""}:y),indent:r,listStyleType:f?Bt(n.editor,te.listTodo):o,type:Bt(n.editor,te.p)};return f&&(b.checked=l.attributes.some(y=>y.name==="checked")),a!==void 0&&(b.listStart=a),i!==void 0&&(b.listRestart=i),s!==void 0&&(b.listRestartPolite=s),[b,...e.children.filter(xu).flatMap((y,E,C)=>kz(y,t,n,r+1,Cz(C,E)))]},Ege=(e,t)=>t.some(n=>n.children?.some(r=>Rt.isElement(r)&&!e.api.isInline(r))),Cge=(e,t,n)=>!n.editor?.plugins.list||!xz(v0(n.editor,"list"),n)||xge.some(r=>n.rules?.[r])||!e.some(xu)?yr(e,t,n):e.flatMap((r,i)=>{if(!xu(r))return yr([r],t,n);const s=kz(r,t,n,1,Cz(e,i));return Ege(n.editor,s)?yr([r],t,n):s}),nC=e=>e.map(t=>t.type==="break"?{type:"html",value:"
    "}:t.type==="html"?{...t,value:t.value.replaceAll(` +`,"")}:t.type==="paragraph"?{...t,children:nC(t.children)}:t),kge=(e,t)=>{const n=[],r=[],i=a=>({type:"html",value:a}),s=()=>{n.push(i(`
  • `))};for(const a of e){const{checked:o,indent:l,listRestart:u,listStart:f,listStyleType:h}=a,m=h===te.ol?"ol":"ul";for(;r.length>0&&r.at(-1).indent>l;)s();const g=r.at(-1),b=g?.indent===l&&g.name===m,y=u??f??(b?g.nextStart:1);if(g?.indent===l&&(!b||m==="ol"&&(u!==void 0||y!==g.nextStart))&&s(),r.at(-1)?.indent===l)n.push(i("
  • "));else{const C=m==="ol"&&y!==1?` start="${y}"`:"";n.push(i(`<${m}${C}>
  • `)),r.push({indent:l,name:m,nextStart:y})}r.at(-1).nextStart=y+1,h===te.listTodo&&n.push(i(o?' ':' '));const E=yz(a,t);n.push(...nC(E.children))}for(;r.length>0;)s();return n},WT=(e,t)=>{const n=Bt(t.editor,te.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:kge(i,t),isList:!0}),i=[])};for(const o of e.children){if(o.type===n&&"listStyleType"in o){gz(o,t)&&i.push(o);continue}s();const l=Qr([o],t);l.length>0&&r.push({children:nC(l),isList:!1})}s();const a=[];return r.forEach((o,l)=>{l>0&&!o.isList&&!r[l-1].isList&&a.push({type:"html",value:"
    "}),a.push(...o.children)}),{children:a,type:"tableCell"}},Dge={table:{deserialize:(e,t,n)=>{const r=Bt(n.editor,te.p);return{children:e.children?.map((i,s)=>({children:i.children?.map(a=>{const o=s===0?"th":"td",l=Cge(a.children,t,n),u=[];let f=[];for(const h of l)!h.type||h.type===te.inlineEquation||n.editor.api.isInline(h)?f.push(h):(f.length>0&&(u.push({children:f,type:r}),f=[]),u.push(h));return f.length>0&&u.push({children:f,type:r}),{children:u.length>0?u:[{children:[{text:""}],type:r}],type:Bt(n.editor,o)}})||[],type:Bt(n.editor,te.tr)}))||[],type:Bt(n.editor,te.table)}},serialize:(e,t)=>({children:Qr(e.children,t),type:"table"})},td:{serialize:WT},th:{serialize:WT},tr:{serialize:(e,t)=>({children:Qr(e.children,t),type:"tableRow"})}},Sge=/^https?:\/\/[^\s<>\\]+$/i,_ge=/^\n/;function Age(e){return e===!0||e===!1||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Boolean]"}const KT=(e,t=[])=>({children:t.length>0?t:[{text:""}],type:Bt(e,te.lic)}),GT=(e,t,n)=>{const r=Bt(n.editor,te.lic),i=e.map(s=>s.type==="paragraph"?KT(n.editor,yr(s.children,t,n)):yr([s],t,n)[0]).filter(Boolean);return i.some(s=>s.type===r)||i.unshift(KT(n.editor)),i},YT=(e,t=[])=>{const n=Bt(e,te.p),r=[];let i=[];const s=()=>{i.length!==0&&(r.push({children:i,type:n}),i=[])};return t.forEach(a=>{if(Rt.isElement(a)&&!e.api.isInline(a)&&e.api.isBlock(a)){s(),r.push(a);return}i.push(a)}),s(),r.length>0?r:[{children:[{text:""}],type:n}]},Tge=/^\/\*([\s\S]*)\*\/$/,JT=e=>{const t=Tge.exec((e??"").trim());return t?``:null},Nge=(e,t)=>e.flatMap(n=>{const r=n.text;return n.rawHtml?[n]:r===""&&e.length===1&&t.preserveEmptyParagraphs!==!1?[{...n,text:"​"}]:typeof r!="string"||!r.includes(` +`)?[n]:r.split(` +`).flatMap((i,s,a)=>{const o=[];return i&&o.push({...n,text:i}),s({children:yr(e.children,t,n),type:Bt(n.editor,te.a),url:e.url??e.attributes?.find(r=>r.name==="href"&&typeof r.value=="string")?.value}),serialize:(e,t)=>{const n=Qr(e.children,t);if(n.length===1&&n[0]?.type==="text"&&n[0].value===e.url&&t.remarkStringifyOptions?.resourceLink!==!0&&Sge.test(e.url??"")){const r=b$.lexInline(e.url,{gfm:!0}),i=r[0];if(r.length===1&&i?.type==="link"&&i.href===e.url&&i.text===e.url)return{type:"html",value:e.url}}return{children:n,type:"link",url:e.url}}},blockquote:{deserialize:(e,t,n)=>({children:YT(n.editor,Ac(e.children,t,n)),type:Bt(n.editor,te.blockquote)}),serialize:(e,t)=>({children:Qr(YT(t.editor,e.children),t),type:"blockquote"})},bold:{mark:!0,deserialize:(e,t,n)=>sw(e,t,n)},br:{deserialize(){return[{text:` +`}]}},break:{deserialize:(e,t)=>({text:` +`}),serialize:()=>({type:"break"})},callout:{deserialize:(e,t,n)=>{const r=_c(e.attributes);return{children:yr(e.children,t,n),type:Bt(n.editor,te.callout),...r}},serialize(e,t){const{children:n,type:r,...i}=e;return{attributes:$d(i),children:Qr(n,t),name:"callout",type:"mdxJsxFlowElement"}}},code:{mark:!0,deserialize:(e,t,n)=>({...t,[Bt(n.editor,te.code)]:!0,text:e.value})},code_block:{deserialize:(e,t,n)=>({children:(e.value||"").split(` +`).map(r=>({children:[{text:r}],type:Bt(n.editor,te.codeLine)})),lang:e.lang??void 0,type:Bt(n.editor,te.codeBlock)}),serialize:e=>({lang:e.lang,type:"code",value:e.children.map(t=>t?.children===void 0?t.text:t.children.map(n=>n.text).join("")).join(` +`)})},comment:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.comment)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"comment",type:"mdxJsxTextElement"}}},date:{deserialize(e,t,n){const r=_c(e.attributes);return{children:[{text:""}],...oz(typeof r.value=="string"?r.value:e.children?.[0]?.value||""),type:Bt(n.editor,te.date)}},serialize({date:e,rawDate:t}){return e&&!t?{attributes:$d({value:e}),children:[],name:"date",type:"mdxJsxTextElement"}:{attributes:[],children:[{type:"text",value:t??e??""}],name:"date",type:"mdxJsxTextElement"}}},del:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.strikethrough)]:!0,...t},n)},equation:{deserialize:(e,t,n)=>({children:[{text:""}],texExpression:e.value,type:Bt(n.editor,te.equation)}),serialize:e=>({type:"math",value:e.texExpression})},footnoteDefinition:{deserialize:(e,t,n)=>{const r=Bt(n.editor,te.p),i=Ac(e.children,t,n).map(a=>a.type===r?a:{children:[a],type:r}),s=e.identifier;return i.length===0?{children:[{children:[{text:""}],type:r}],identifier:s,type:Bt(n.editor,"footnoteDefinition")}:{children:i,identifier:s,type:Bt(n.editor,"footnoteDefinition")}},serialize:(e,t)=>({children:Qr(e.children,t),identifier:e.identifier,type:"footnoteDefinition"})},footnoteReference:{deserialize:(e,t,n)=>({children:[{text:""}],identifier:e.identifier??"",type:Bt(n.editor,"footnoteReference")}),serialize:e=>({identifier:e.identifier??e.children?.map(t=>t.text??"").join("")??"",type:"footnoteReference"})},heading:{deserialize:(e,t,n)=>{const r={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[e.depth],i=Bt(n.editor,r);return{children:yr(e.children,t,n),type:i}},serialize:(e,t)=>{const n=ci(t.editor,e.type)??e.type;return{children:Qr(e.children,t),depth:{h1:1,h2:2,h3:3,h4:4,h5:5,h6:6}[n],type:"heading"}}},highlight:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.highlight)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"mark",type:"mdxJsxTextElement"}}},hr:{deserialize:(e,t,n)=>({children:[{text:""}],type:Bt(n.editor,te.hr)}),serialize:()=>({type:"thematicBreak"})},html:{deserialize:(e,t,n)=>e.value==="
    "?{text:` +`}:{rawHtml:!0,text:e.value||""}},mdxFlowExpression:{deserialize:(e,t,n)=>{const r=JT(e.value);return r===null?[]:{children:[{rawHtml:!0,text:r}],type:Bt(n.editor,te.p)}}},mdxTextExpression:{deserialize:e=>{const t=JT(e.value);return t===null?[]:{rawHtml:!0,text:t}}},img:{deserialize:(e,t,n)=>{const{alt:r,attributes:i,title:s,url:a}=e,{alt:o,src:l,...u}=i?_c(i):{};return{caption:[{text:o||r||""}],children:[{text:""}],...s&&{title:s},type:Bt(n.editor,te.img),url:l||a,...u}},serialize:({caption:e,title:t,url:n})=>({children:[{alt:e?e.map(r=>r.text).join(""):void 0,title:typeof t=="string"?t:void 0,type:"image",url:n}],type:"paragraph"})},inline_equation:{deserialize(e,t,n){return{children:[{text:""}],texExpression:e.value,type:Bt(n.editor,te.inlineEquation)}},serialize:e=>({type:"inlineMath",value:e.texExpression})},italic:{mark:!0,deserialize:(e,t,n)=>sw(e,t,n)},kbd:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.kbd)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"kbd",type:"mdxJsxTextElement"}}},list:{deserialize:(e,t,n)=>{if(!n.editor?.plugins.list)return{children:e.children.map(i=>i.type==="listItem"?{children:GT(i.children,t,n),type:Bt(n.editor,te.li)}:yr([i],t,n)[0]),type:Bt(n.editor,e.ordered?te.olClassic:te.ulClassic)};const r=(i,s=1,a=1)=>{const o=[],l=!!i.ordered;let u=l?Bt(n.editor,te.ol):Bt(n.editor,te.ul);return i.children?.forEach((f,h)=>{if(f.type!=="listItem")return;const m=Age(f.checked);m&&(u=Bt(n.editor,te.listTodo));const[g,...b]=f.children||[],y=g?fm(g,t,n):{children:[{text:""}],type:Bt(n.editor,te.p)};(Array.isArray(y)?y:[y]).forEach((E,C)=>{const x={...E,indent:s,type:E.type===Bt(n.editor,te.img)?E.type:Bt(n.editor,te.p)};x.listStyleType=u,m&&(x.checked=f.checked),l&&(x.listStart=a+h,h===0&&C===0&&x.listStart>1&&(x.listRestartPolite=x.listStart)),o.push(x)}),b.forEach(E=>{if(E.type==="list"){const C=E.start||1,x=r(E,s+1,C);o.push(...x)}else{const C=fm(E,t,n);Array.isArray(C)?o.push(...C.map(x=>({...x,indent:s+1}))):o.push({...C,indent:s+1})}})}),o};return r(e,1,e.start||1)},serialize:(e,t)=>{const n=t.editor,r=ci(n,e.type)===te.olClassic,i=s=>{const a=[];let o=null;for(const l of s)if(ci(n,l.type)==="li"){o&&a.push(o),o={children:[],spread:!1,type:"listItem"};for(const u of l.children)ci(n,u.type)==="lic"?o.children.push({children:Qr(u.children,t),type:"paragraph"}):(ci(n,u.type)==="ol"||ci(n,u.type)==="ul")&&o.children.push({children:i(u.children),ordered:ci(n,u.type)==="ol",spread:!1,type:"list"})}return o&&a.push(o),a};return{children:i(e.children),ordered:r,spread:!1,type:"list"}}},listItem:{deserialize:(e,t,n)=>({children:GT(e.children,t,n),type:Bt(n.editor,te.li)}),serialize:(e,t)=>({children:Qr(e.children,t),type:"listItem"})},mention:{deserialize:(e,t,n)=>({children:[{text:""}],type:Bt(n.editor,te.mention),value:e.displayText||e.username,...e.displayText&&{key:e.username}}),serialize:e=>{const t=e.key||e.value,n=e.value,r=encodeURIComponent(String(t)).replace(/\(/g,"%28").replace(/\)/g,"%29");return{children:[{type:"text",value:n}],type:"link",url:`mention:${r}`}}},p:{deserialize:(e,t,n)=>{const r=n.splitLineBreaks,i=yr(e.children,t,n),s=new Set(["img"]),a=[];let o=[];const l=()=>{o.length>0&&(a.push({children:o,type:Bt(n.editor,te.p)}),o=[])};return i.forEach(u=>{u.text==="​"&&(u.text="")}),i.forEach((u,f,h)=>{const{type:m}=u;if(m&&s.has(m))l(),a.push(u);else if(r&&"text"in u&&typeof u.text=="string"){const g=u.text.split(` +`);if(u.text===` +`&&o.length===0){o.push({...u,text:""}),l();return}g.forEach((b,y,E)=>{const C=y>0,x=y1&&f===h.length-1||o.push(u)}),l(),a.length===1?a[0]:a},serialize:(e,t)=>{const n=Nge(e.children,t),r=Qr(n,t);return r.length>0&&n.at(-1).type==="break"&&(r.at(-1).type="html",r.at(-1).value=` +
    `),{children:r,type:"paragraph"}}},strikethrough:{mark:!0,deserialize:(e,t,n)=>sw(e,t,n)},subscript:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.sub)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"sub",type:"mdxJsxTextElement"}}},suggestion:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.suggestion)]:!0,...t},n),serialize(e){return{attributes:[],children:[{type:"text",value:e.text}],name:"suggestion",type:"mdxJsxTextElement"}}},superscript:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.sup)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"sup",type:"mdxJsxTextElement"}}},text:{deserialize:(e,t)=>({...t,text:e.value.replace(_ge,"")})},toc:{deserialize:(e,t,n)=>({children:yr(e.children,t,n),type:Bt(n.editor,te.toc)}),serialize:(e,t)=>({attributes:[],children:Qr(e.children,t),name:"toc",type:"mdxJsxFlowElement"})},underline:{mark:!0,deserialize:(e,t,n)=>yr(e.children,{[Bt(n.editor,te.underline)]:!0,...t},n),serialize(e,t){return{attributes:[],children:[{type:"text",value:e.text}],name:"u",type:"mdxJsxTextElement"}}},...lge,...uge,...oge,...Dge},f1=e=>{const t=Object.keys(XT),n={};return t.forEach(r=>{const i=ci(e,r);n[i??r]=XT[r]}),n},Dz=(e,t)=>{const n=t.rules;return n?.[e]?.deserialize===void 0?f1(t.editor)[e]?.deserialize:n?.[e]?.deserialize},Oge={className:"class",htmlFor:"for"},Sz=new Set(["blockquote","code","heading","html","list","paragraph","table","thematicBreak"]),Bge=/\n$/,Pge=c1().use(sz).use(o1),QT=e=>{if(e?.type==="mdxJsxTextElement"||e?.type==="mdxJsxFlowElement")return z4(e);if(!e?.type)return"";const t={children:Sz.has(e.type)?[e]:[{children:[e],type:"paragraph"}],type:"root"};return Pge.stringify(t).replace(Bge,"")},Rge=e=>{if(!e?.length)return"";const t=e.map(n=>{const r=Oge[n.name]??n.name;return n.value===void 0||n.value===null?r:typeof n.value=="object"&&n.value?.type==="mdxJsxAttributeValueExpression"?`${r}={${n.value.value}}`:`${r}="${String(n.value)}"`});return t.length>0?` ${t.join(" ")}`:""},z4=e=>{const t=Rge(e.attributes),n=`<${e.name}${t}`;if(!e.children?.length)return`${n} />`;if(e.type==="mdxJsxFlowElement"){const r=e.children.some(i=>i.type!=="html"&&Sz.has(i.type))?` + +`:` +`;return`${n}>${r}${e.children.map(QT).join(r)}${r}`}return`${n}>${e.children.map(QT).join("")}`},Fge=(e,t,n)=>{const r=e.name,i=ci(n.editor,r)??e.name;if(i){const s=v0(n.editor,i),a=Dz(s,n);if(a)return n.disallowedNodes?.includes(s)?[]:a(e,t,n)}else console.warn("This MDX node does not have a parser for deserialization",e);if(e.type==="mdxJsxTextElement")return[{rawHtml:!0,text:z4(e)}];if(e.type==="mdxJsxFlowElement")return[{children:[{rawHtml:!0,text:z4(e)}],type:Bt(n.editor,te.p)}]},Ige=e=>{let t=e;return t=t.replaceAll(/^#{1,6}\s+/gm,""),t=t.replaceAll(/^\s*>\s?/gm,""),t=t.replaceAll(/^([*_-]){3,}\s*$/gm,""),t=t.replaceAll(/^(\s*)([*+-]|\d+\.)\s/gm,"$1"),t=t.replaceAll(/^```[\S\s]*?^```/gm,""),t=t.replaceAll("
    ",` +`),t},Mge=/^\s*/,Lge=/\s*$/,_z=(e,t,n)=>{const r=t.trim(),i=Mge.exec(t)?.[0]||"",s=Lge.exec(t)?.[0]||"",a=Ige(r);if(!a)return t?[{text:t}]:[];const o=[];i&&o.push({text:i});const l=e.getApi(al).markdown.deserialize(a,n)[0];if(l){const u=Rt.isElement(l)?l.children:[l];o.push(...u)}return s&&o.push({text:s}),o},Az="remarkMdx",zge=e=>e.filter(t=>t!==o1&&!("__pluginTag"in t&&t.__pluginTag===Az)),jge=(e,t)=>{const{allowedNodes:n,allowNode:r,disallowedNodes:i,remarkPlugins:s,rules:a}=e.getOptions(al),o={...f1(e),...t?.rules??a},l=t?.remarkPlugins??s??[];return{allowedNodes:t?.allowedNodes??n,allowNode:t?.allowNode??r,disallowedNodes:t?.disallowedNodes??i,editor:e,memoize:t?.memoize,parser:t?.parser,remarkPlugins:t?.withoutMdx?zge(l):l,rules:o,splitLineBreaks:t?.splitLineBreaks}},Kf=(e,t)=>{const n=e.attributes.find(i=>"name"in i&&i.name==="style");if(!n?.value)return;const r=n.value.split(";");for(const i of r){const[s,a]=i.split(":").map(o=>o.trim());if(s===t)return a}},qge=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),$ge=new Map([["checked","checked"],["disabled","disabled"],["readonly","readOnly"],["required","required"],["multiple","multiple"],["hidden","hidden"]]),Vge=Array.from($ge.entries()).map(([e,t])=>({jsxAttr:t,reg:new RegExp(`(\\s|^)${e}(\\s|/?>|$)`,"gi")})),Uge=[[/(\s)class=/g,"$1className="],[/(\s)for=/g,"$1htmlFor="]],Tz=(e,t)=>!e||typeof e!="string"?e:e.replace(//g,"{/*$1*/}").replace(/<([a-zA-Z0-9]+)\b([^>]*?)(\/?)>/gi,(n,r,i,s)=>{if(t?.(n))return n;let a=i;Uge.forEach(([l,u])=>{a=a.replace(l,u)}),a=a.replace(/(^|\s)([a-zA-Z0-9_-]+)=([^{ \t\n\r"'>]+?)(?=\s|\/?>|$)/g,'$1$2="$3"');for(const{reg:l,jsxAttr:u}of Vge)a=a.replace(l,`$1${u}="true"$2`);const o=qge.has(r.toLowerCase())?" /":s;return`<${r}${a.trimEnd()}${o}>`}),Hge=qd();function Wge(e){return Hge.text().write(Z3()(e,void 0,!0)).some(([t,n])=>t==="exit"&&n.type==="autolink"&&n.start.offset===0&&n.end.offset===e.length)}const Kge=e=>Tz(e,Wge),Nz=e=>e.referenceType==="full"?`][${e.label??e.identifier}]`:e.referenceType==="collapsed"?"][]":"]",Gge=(e,t)=>t?[{children:e.children,title:t.title,type:"link",url:t.url}]:[{type:"text",value:"["},...e.children,{type:"text",value:Nz(e)}],Yge=(e,t)=>t?[{alt:e.alt,title:t.title,type:"image",url:t.url}]:[{type:"text",value:`![${e.alt??""}${Nz(e)}`}],Jge=e=>{const t=new Map;P4(e,"definition",n=>{t.has(n.identifier)||t.set(n.identifier,n)}),P4(e,(n,r,i)=>{if(!i||r===void 0||n.type!=="linkReference"&&n.type!=="imageReference")return;const s=t.get(n.identifier),a=n.type==="linkReference"?Gge(n,s):Yge(n,s);return i.children.splice(r,1,...a),r+a.length})},Xge=(e,t)=>Qge(e,t),Qge=(e,t)=>{if(Jge(e),!t.splitLineBreaks)return e.children=e.children.map(s=>s.type==="html"&&s.value==="
    "?{children:[{type:"text",value:` +`}],type:"paragraph"}:s),Ac(e.children,{},t);const n=[];let r=e.position?.start.line??1;const i=s=>{s>0&&n.push(...Array.from({length:s}).map(()=>({children:[{text:""}],type:t.editor?ci(t.editor,te.p)??te.p:te.p})))};return e.children?.forEach((s,a)=>{const o=a===0,l=a===e.children.length-1;if(s.position){i(s.position.start.line-(o?r:r+1));const u=Ac([s],{},t);n.push(...u),l&&i(e.position.end.line-s.position.end.line-1),r=s.position.end.line}else{const u=Ac([s],{},t);n.push(...u)}}),n};var Kh=class{result;constructor(e){this.result=e}};function ZT(e){return typeof e=="object"&&e!==null&&"source"in e&&typeof e.source=="string"&&"ruleId"in e&&typeof e.ruleId=="string"}const Oz={...NL,name:"plateAutolink"};function Zge(e,t,n){const r={acorn:Lr.extend(SL()),acornOptions:{ecmaVersion:2024,sourceType:"module"},addResult:!0,...t};r.acornOptions={ecmaVersion:2024,sourceType:"module",...r.acornOptions,locations:!0,onToken:void 0,onComment:void 0,onTrailingComma:void 0,onInsertedSemicolon:void 0};const i=V3(r),s=Object.values(i.text??{}).flat().find(T=>T?.name==="mdxJsxTextTag");if(!s)throw new Error("MDX JSX text syntax is missing");const{source:a,entries:o}=e,l=a.lastIndexOf("}"),u=a.lastIndexOf("*/");function f(T){const A=T.events,P=A.findLastIndex(U=>U[0]==="enter"&&(U[1].type==="mdxJsxTextTagExpressionAttribute"||U[1].type==="mdxJsxTextTagAttributeValueExpression"));if(P<0||A.some(U=>U[0]==="exit"&&U[1]===A[P][1]))return;const I=T.now(),F=A[P][1].type==="mdxJsxTextTagExpressionAttribute",M=F?"mdxJsxTextTagExpressionAttributeValue":"mdxJsxTextTagAttributeValueExpressionValue",W=A.slice(P).filter(U=>U[1].type===M||U[1].type==="lineEnding").map(U=>U[1].end?U:[U[0],{...U[1],end:I},U[2]]),ee=r.acorn;if(ee)try{return{open:A[P][1],...z3(W,{...r,acorn:ee,expression:!0,allowEmpty:!F,prefix:F?"({":"",suffix:F?"})":"",tokenTypes:[M],start:A[P][1].start})}}catch{return}}function h(T){return!!(T?.error&&(!T.swallow||T.error.message==="Unterminated comment"&&u=F){F=(I.now().offset-M)*2;const U=f(I);if(U?.error&&!U.swallow)throw new Kh({ok:!1,context:I})}}};return T.tokenize.call(I,W,()=>{throw new Kh({ok:!0,context:I,start:M})},()=>{throw new Kh({ok:!1,context:I})})}}}const b=qd({extensions:[{text:{60:g(Oz)}}]}),y=qd({extensions:[{text:{60:g(s,!0)}}]});let E,C=[];const x=new Map,S=(T,A)=>{let P=0,I=T.length;for(;P>1;T[F]<=A?P=F+1:I=F}return P};function O(T){if(t?.acorn||T?.error?.message!=="Unterminated comment")return;if(!E){E=[];for(let M=a.indexOf("*/");M>=0;M=a.indexOf("*/",M+1))E.push(M);C=Array.from(a.matchAll(/[\r\n\u2028\u2029]/g),M=>M.index)}let A=E[S(E,T.error.pos+1)];if(A===void 0)return;const P=/\s*\/\*/y,I=[];for(;!x.has(A)&&(I.push(A),P.lastIndex=A+2,!!P.exec(a));){const M=E[S(E,P.lastIndex-1)];if(M===void 0)break;A=M}A=x.get(A)??A;for(const M of I)x.set(M,A);const F=C[S(C,T.error.pos)];return{start:T.error.pos+2,end:A,lineBreak:F!==void 0&&F>1;o[me].end<=P.offset?ue=me+1:ne=me}try{for(let me=ue;me=I)break;if(F&&!M&&j.line!==ee){ee=j.line;const Q=F.get(j.line),re=F.get(j.line+1);Q&&W.defineSkip(Q),re&&W.defineSkip(re)}if(typeof j.chunk=="string"){const Q=F?.get(j.line)?.offset??0,re=Math.max(U,j.start,Q)-j.start;let K=Math.min(I,j.end)-j.start;M&&!fe&&j.end>M.start&&j.start=(F?.get(j.line)?.offset??0)&&W.write([j.chunk]);if(M&&!fe&&j.end>=M.start&&j.start>1;o[K].end<=M.end?Q=K+1:re=K}me=Q-1,U=M.end,fe=!0}}return W.write([null]),{ok:!1,context:W}}catch(me){if(me instanceof Kh){const j=me.result;return j.ok&&j.start!==P.offset?{ok:!1,context:j.context}:j}return{ok:!1,error:me,context:W}}}function w(T,A){const P=_(b,"text",T);if(!P.ok)return{kind:"ordinary"};const I=A&&n?.(A);if(A&&n&&!I)return{kind:"ordinary"};const F=I?.end??a.length;if(P.context.now().offset>F)return{kind:"ordinary"};const M=_(y,"text",T,P.context.now().offset);let W;if(M.ok)W={kind:"jsx"};else{const ee=M.error;let U,fe=ZT(ee)&&ee.source==="micromark-extension-mdx-jsx"&&ee.ruleId==="unexpected-character"||ZT(ee)&&ee.source==="micromark-extension-mdx-expression"&&["non-spread","spread-extra","unexpected-empty-expression"].includes(ee.ruleId);fe||(U=f(M.context),U&&(fe=m(U,P.context.now().offset)));const ue=I?.skips,ne=O(U);!t?.acorn&&U?.error?.message==="Unterminated comment"&&(!ne||ne.end>=F)&&(fe=!0);const me=ne&&ne.endeN(_,{continuation:_.continuation&&eN(_.continuation,{tokenize(w,T,A){const P=this.containerState,I=this.now().line;return _.continuation.tokenize.call(this,w,F=>(g(P,I,"continued"),T(F)),F=>(g(P,I,"failed"),A(F)))}}),tokenize(w,T,A){const P=this.containerState;return _.tokenize.call(this,{...w,enter(I,F){const M=w.enter(I,F);return M._container&&P&&l.set(M,{construct:_,state:P}),M}},T,A)}}),y=b(j3),E=b(_i),C={document:{62:y,42:E,43:E,45:E}};for(let _=48;_<=57;_++)C.document[_]=E;const x={partial:!0,tokenize(_,w,T){if(!s){s=this,a.add(this),t(this.parser);for(const A of["flow","content","text"]){const P=this.parser[A];this.parser[A]=I=>{if(A==="text"&&I&&!o.has(I.offset))for(const M of a)for(const[W,ee]of M.events)W==="enter"&&ee.contentType==="text"&&o.set(ee.start.offset,ee);const F=P(I);if(a.add(F),A==="text"&&f.add(F),A==="text"&&I){let M=o.get(I.offset);if(M){const W=new Map;let ee=M.end.offset;for(;M;)W.set(M.start.line,M.start),ee=M.end.offset,M=M.next;u.set(F,{end:ee,skips:W})}}return F}}}return T}},S={document:Object.fromEntries([...i].map(_=>[_,x]))};function O(_){if(!s)return;const w=[];for(const[j,Q]of s.events)Q._container&&(j==="enter"?w.push(Q):w.pop());const T=_.now();let A=_;for(;A&&!a.has(A);)A=Object.getPrototypeOf(A);const P=s.events.findLast(j=>j[0]==="enter"&&j[1].type==="chunkFlow"&&j[1]._tokenizer===A&&j[1].start.line===T.line)?.[1]?.start.offset??T.offset,I=_.parser.lazy[T.line]&&_.events.some(j=>j[1].start.offsetP)),F=[];for(const j of w){const Q=l.get(j);if(!Q)return;const re=m.get(Q.state)?.get(T.line)==="continued";if(j.start.line!==T.line&&!re&&!I)break;F.push(Q)}const M=F.map(j=>({...j.state})),W=new Map;let ee=n.length;const U=r[T.line]?.start??n.length;if(U>=n.length||!F.length)return{end:ee,skips:W};class fe{}const ue={tokenize(j){let Q=0,re=U;const K=()=>{throw ee=re,new fe},Be=$e=>{if(Q&&M[Q-1]._closeFlow)return K();if(Q{if($e===null)throw j.exit("data"),new fe;return j.consume($e),$e===-3||$e===-4||$e===-5?(j.exit("data"),Q=0,re=this.now().offset,Be):ze};return Be}},ne=r[T.line].chunks.find(j=>typeof j!="string"||j.length),me=qd({extensions:[{text:{[typeof ne=="string"?ne.charCodeAt(0):ne??"null"]:ue},disable:{null:[..._.parser.constructs.disable.null??[]]}}]});try{const j=me.text({offset:U,line:T.line+1,column:1});for(let Q=T.line;QE=>(f=!0,y(E)),m={...i,enter(y,...E){if(y==="mdxJsxFlowTag"&&o.classify(l.now(),l).kind==="autolink")throw u;return i.enter(y,...E)}};let g=n.call(l,m,h(s),h(a));function b(y){try{const E=g(y);return f||!E?E:(g=E,b)}catch(E){if(E===u)return a(y);throw E}}return b}),e}function nve(e,t,n){const r=eve(e),i=new Map,s=tve(r,a=>j4.set(a,i));for(const a of n)i.set(a,Zge(r,a.options,o=>s.view(o)));return[s.observer,...t,s.initializer]}const rve=function(){const e=this.parser;if(!e)return;const t={owners:[],parser:void 0};this.parser=(n,r)=>{const i=t.owners.filter(l=>!Object.hasOwn(l.options,"acorn"));if(!i.length)return e(n,r);const s={...this.data("settings")},a=this.data("micromarkExtensions")||[],o=this.data("fromMarkdownExtensions")||[];return c1().data({settings:s,fromMarkdownExtensions:o,micromarkExtensions:nve(n,a,i)}).use(dz).parse(n)},t.parser=this.parser,rC.set(this,t)},Bz=function(e){const t=rC.get(this);if(!t)return o1.call(this,e);const n={};let r=!0;const i=e&&new Proxy({},{ownKeys(){return Reflect.ownKeys(e)},getOwnPropertyDescriptor(b,y){const E=Reflect.getOwnPropertyDescriptor(e,y);return E&&{...E,configurable:!0}},get(b,y){const E=Reflect.get(e,y,e);if(!r||(y==="acorn"&&(n.acorn=E),y==="addResult"&&(n.addResult=E),y!=="acornOptions"))return E;if(!E||typeof E!="object"&&typeof E!="function")return n.acornOptions=E,E;let C={ecmaVersion:2024};return n.acornOptions=C,new Proxy({},{ownKeys(){const x=Reflect.ownKeys(E);return C={ecmaVersion:2024},n.acornOptions=C,x},getOwnPropertyDescriptor(x,S){const O=Reflect.getOwnPropertyDescriptor(E,S);return O&&{...O,configurable:!0}},get(x,S){const O=Reflect.get(E,S,E);return r&&Reflect.set(C,S,O),O}})}}),s=this.data();let a=s.micromarkExtensions;a||(a=[],s.micromarkExtensions=a);let o=s.fromMarkdownExtensions;o||(o=[],s.fromMarkdownExtensions=o);let l=s.toMarkdownExtensions;l||(l=[],s.toMarkdownExtensions=l);const u=a.push;let f;try{f=V3(i)}finally{r=!1}const h={options:n};for(const b of["text","flow"]){const y=f[b],E=y?.[60];y&&E&&(y[60]=Array.isArray(E)?E.map(C=>tN(C,h)):tN(E,h))}Reflect.apply(u,a,[f]);const m=o.push;Reflect.apply(m,o,[qM()]);const g=l.push;Reflect.apply(g,l,[$M(e||{})]),t.owners.push(h)};function ive(e,t){e.freeze();const n=rC.get(e);return n&&n.parser===e.parser?Kge(t):Tz(t)}const sve=e=>e===o1?Bz:e,iC=(e,t,n)=>{const r=jge(e,n),i=c1().use(dz).use(rve).use((r.remarkPlugins??[]).map(sve)).use(ove,r),s=n?.withoutMdx?t:ive(i,t);return n?.memoize?mve(s,n.parser).flatMap(a=>a.type==="space"?{...e.api.create.block(),_memo:a.raw}:i.processSync(a.raw).result.map(o=>({_memo:a.raw,...o}))):i.processSync(s).result},ave=(e,t,n)=>{let r=null;try{r=iC(e,t,n)}catch(i){n?.onError?.(i),n?.withoutMdx||(r=pve(e,t,n))}return r?r.map(i=>Fn.isText(i)?{children:[i],type:ci(e,te.p)??te.p}:i):[]},ove=function(e={}){this.compiler=t=>Xge(t,e)},lve=/^]*>/i,uve=e=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===36||e===45||e===46||e===95||e===58,cve=e=>e===47||e===62||e===9||e===10||e===12||e===13||e===32,fve=e=>{const t=[],n=e.length;let r=0,i=-1;for(;r=n){i=s;break}let o=!1;e[r]==="/"&&(o=!0,r++);const l=r;for(;r"){m=!0,g=e[r-1]==="/",r++;break}r++}if(!m){i=s;break}if(!g)if(o){for(let b=t.length-1;b>=0;b--)if(t[b].name===u){t.splice(b,1);break}}else t.push({name:u,pos:s})}if(t.length>0){const s=t[0].pos;i=i===-1?s:Math.min(i,s)}return i===-1?e:[e.slice(0,i),e.slice(i)]},nN=e=>Fn.isText(e)&&Object.keys(e).every(t=>t==="text"),dve=e=>e.slice(e.lastIndexOf(` +`)+1).includes("|"),q4=(e,t,n)=>iC(e,t,{...n,withoutMdx:!0}),hve=(e,t,n)=>{try{return iC(e,t,n)}catch{return q4(e,t,n)}},Pz=(e,t,n)=>{if(!Rt.isElement(t)||e.api.isVoid(t))return!1;const r=Bt(e,te.p);if(t.type===r||t.children.some(i=>Fn.isText(i))){const i=t.children.at(-1);return nN(i)&&n.every(s=>nN(s))?(i.text+=n.map(s=>s.text).join(""),!0):(t.children.push(...n),!0)}for(let i=t.children.length-1;i>=0;i--)if(Pz(e,t.children[i],n))return!0;return!1},pve=(e,t,n)=>{const r=fve(t);if(!Array.isArray(r))return q4(e,t,n);const[i,s]=r,a=_z(e,s,{...n,withoutMdx:!0}),o=hve(e,i,n),l={children:a,type:Bt(e,te.p)};if(o.length===0)return[l];const u=o.at(-1);if(Rt.isElement(u)&&e.api.isVoid(u))return[...o,l];const f=Bt(e,te.table);if(Rt.isElement(u)&&u.type===f){if(dve(i)){const h=q4(e,t,n),m=o.filter(y=>Rt.isElement(y)&&y.type===f).indexOf(u);let g=-1,b=-1;for(const[y,E]of h.entries())if(Rt.isElement(E)&&E.type===f&&(b+=1,b===m)){g=y;break}if(g!==-1)return[...o.slice(0,-1),...h.slice(g)]}return[...o,l]}return Rt.isElement(u)&&Pz(e,u,a),o},mve=(e,{exclude:t=["space"],trim:n=!0}={})=>{let r=[...x$.lexer(e)];return t.length>0&&(r=r.filter(i=>!t.includes(i.type))),n&&(r=r.map(i=>({...i,raw:i.raw.trimEnd()}))),r},Ac=(e,t,n)=>e.reduce((r,i)=>(cm(i,n)&&r.push(...fm(i,t,n)),r),[]),fm=(e,t,n)=>{if(e.type==="mdxJsxTextElement"||e.type==="mdxJsxFlowElement"){const i=Fge(e,t,n);return Array.isArray(i)?i:[i]}const r=Dz(v0(n.editor,e.type),n);if(r){const i=r(e,t,n);return Array.isArray(i)?i:[i]}return[]},yr=(e,t,n)=>e.length===0?[{text:""}]:Ac(e,t,n),sw=(e,t,n)=>e.children.reduce((r,i)=>{const s=v0(n.editor,e.type),a=Bt(n.editor,s);return cm(i,n)&&r.push(...fm(i,{...t,[a]:!0},n)),r},[]),al=Yn({key:te.markdown,options:{allowedNodes:null,disallowedNodes:null,plainMarks:null,remarkPlugins:[],remarkStringifyOptions:null,rules:null}}).extendApi(({editor:e})=>({deserialize:De(ave,e),deserializeInline:De(_z,e),serialize:De(mge,e)})).extend(({api:e})=>({parser:{format:"text/plain",deserialize:({data:t})=>e.markdown.deserialize(t),query:({data:t,dataTransfer:n})=>{if(n.getData("text/html"))return!1;const{files:r}=n;return!(!r?.length&&Lc(t))}}}));Object.assign(function(...e){return Bz.apply(this,e)},{__pluginTag:Az});const $4=` +`;function gve(e){const t=e.trim();return t.startsWith("```")||t.startsWith("~~~")}function vve(e){let t=e.trim();return t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1)),t}function sC(e){return vve(e).split("|").map(t=>t.trim())}function yve(e){let t=e;if(t.startsWith(":")&&(t=t.slice(1)),t.endsWith(":")&&(t=t.slice(0,-1)),!t.length)return!1;for(let n=0;n=2&&t.push({start:s,end:a}),r=a}else r++}return t}function xve(e){return sC(e).map(t=>{if(!yve(t))return null;const n=t.startsWith(":"),r=t.endsWith(":");return n&&r?"center":r?"right":n?"left":null})}function bve(e,t){const n=[];for(let r=0;r{const r=sC(t[n]||"").length,i=xve(t[n+1]||""),s=[];for(let a=0;a{if(Array.isArray(r)){for(const i of r)if(!(!i||typeof i!="object")){if(i.type==="table"){const s=Array.isArray(i.align)?i.align:[];t.push(s.map(a=>a==="left"||a==="center"||a==="right"?a:null))}Array.isArray(i.children)&&n(i.children)}}};return n(e),t}function Cve(e,t){if(!Array.isArray(t)||!t.length)return;let n=0;const r=i=>{if(Array.isArray(i)){for(const s of i)if(!(!s||typeof s!="object")){if(s.type==="table"){const a=t[n++];if(a&&a.some(o=>o)){s.align=a.map(l=>l??null);const o=Array.isArray(s.children)?s.children:[];for(const l of o)(Array.isArray(l.children)?l.children:[]).forEach((f,h)=>{const m=a[h];m?f.align=m:delete f.align})}}Array.isArray(s.children)&&r(s.children)}}};r(e)}function kve(e,t){if(!Array.isArray(t)||!t.length)return e;const n=String(e||"").split($4),r=Rz(n);let i=!1;return r.forEach(({start:s},a)=>{const o=t[a];if(!o||!o.some(u=>u))return;const l=sC(n[s]||"").length;l&&(n[s+1]=bve(o,l),i=!0)}),i?n.join($4):e}function rN(e){let t=String(e||"").trim().toLowerCase();for(t.startsWith("mailto:")&&(t=t.slice(7)),t.startsWith("https://")?t=t.slice(8):t.startsWith("http://")&&(t=t.slice(7)),t.startsWith("www.")&&(t=t.slice(4));t.endsWith("/");)t=t.slice(0,-1);return t}function Fz(e){const t=Array.isArray(e.children)?e.children:[];let n="";for(const r of t)typeof r.text=="string"?n+=r.text:Array.isArray(r.children)&&(n+=Fz(r));return n}function iN(e){if(!Array.isArray(e))return e;const t=n=>{const r=[];for(const i of n){if(!i||typeof i!="object"){r.push(i);continue}const s=Array.isArray(i.children)?t(i.children):void 0;if((i.type==="a"||i.type==="link")&&i.url){const o=Fz(i);if(o&&rN(o)===rN(String(i.url))){s&&s.length?r.push(...s):r.push({text:o});continue}r.push({...i,children:s});continue}r.push(s?{...i,children:s}:i)}return r};return t(e)}const sc="\\",ac=` +`,Dve=["com","cn","net","org","io","dev","me","live","co","app","info","xyz","top","cc","tv","site","online","tech","ai"],Sve=["```","~~~"];function _ve(e){const t=e.trim();return Sve.some(n=>t.startsWith(n))}function Ave(e){let t=e;t=t.split(sc+"@").join("@"),t=t.split("http"+sc+"://").join("http://"),t=t.split("https"+sc+"://").join("https://"),t=t.split(sc+"://").join("://"),t=t.split("www"+sc+".").join("www.");for(const n of Dve)t=t.split(sc+"."+n).join("."+n);return t}function Tve(e){const t=String(e||"");if(!t)return t;const n=t.split(ac);let r=!1;const i=[];for(const a of n){if(_ve(a)){r=!r,i.push(a);continue}i.push(r?a:Ave(a))}let s=i.join(ac);for(;s.endsWith(ac+ac);)s=s.slice(0,-1);return s.endsWith(ac)||(s+=ac),s}function Nve(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ove(e,t,n){const i=l1((n||{}).ignore||[]),s=Bve(t);let a=-1;for(;++a0?{type:"text",value:T}:void 0),T===!1)m.lastIndex=_+1;else{if(b!==_&&O({type:"text",value:u.value.slice(b,_)}),Array.isArray(T))for(const A of T)O(A);else T&&O(T);b=_+S[0].length,C=!0}if(!m.global)break;S=m.exec(u.value)}return C?(b?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=tm(e,"(");let s=tm(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Iz(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ti(n)||s1(n))&&(!t||n!==47)}Mz.peek=tye;function Kve(){this.buffer()}function Gve(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Yve(){this.buffer()}function Jve(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Xve(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ea(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qve(e){this.exit(e)}function Zve(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ea(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eye(e){this.exit(e)}function tye(){return"["}function Mz(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function nye(){return{enter:{gfmFootnoteCallString:Kve,gfmFootnoteCall:Gve,gfmFootnoteDefinitionLabelString:Yve,gfmFootnoteDefinition:Jve},exit:{gfmFootnoteCallString:Xve,gfmFootnoteCall:Qve,gfmFootnoteDefinitionLabelString:Zve,gfmFootnoteDefinition:eye}}}function rye(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Mz},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const u=s.enter("footnoteDefinition"),f=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),f(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?` +`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Lz:iye))),u(),l}}function iye(e,t,n){return t===0?e:Lz(e,t,n)}function Lz(e,t,n){return(n?"":" ")+e}const sye=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];aC.attention=cye;aC.peek=fye;function aye(){return{canContainEols:["delete"],enter:{strikethrough:lye},exit:{strikethrough:uye}}}function oye(){return{handlers:{delete:aC},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sye}]}}function lye(e){this.enter({type:"delete",children:[],position:void 0},e)}function uye(e){this.exit(e)}function aC(e,t,n,r){const i=n.createTracker(r),s=n.stack.includes("strikethrough")?"~":"~~",a=n.enter("strikethrough");let o=i.move(s);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move(s),a(),o}function cye(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function fye(){return"~"}function dye(e){return e.length}function hye(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||dye,s=[],a=[],o=[],l=[];let u=0,f=-1;for(;++fu&&(u=e[f].length);++Cl[C])&&(l[C]=S)}y.push(x)}a[f]=y,o[f]=E}let h=-1;if(typeof r=="object"&&"length"in r)for(;++hl[h]&&(l[h]=x),g[h]=x),m[h]=S}a.splice(1,0,m),o.splice(1,0,g),f=-1;const b=[];for(;++f0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zye={tokenize:Kye,partial:!0};function jye(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Uye,continuation:{tokenize:Hye},exit:Wye}},text:{91:{name:"gfmFootnoteCall",tokenize:Vye},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qye,resolveTo:$ye}}}}function qye(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const u=ea(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function $ye(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Vye(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(s>999||h===93&&!a||h===null||h===91||Dn(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(ea(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Dn(h)||(a=!0),s++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,u):u(h)}}function Uye(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(b)}function f(b){if(a>999||b===93&&!o||b===null||b===91||Dn(b))return n(b);if(b===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return s=ea(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Dn(b)||(o=!0),a++,e.consume(b),b===92?h:f}function h(b){return b===91||b===92||b===93?(e.consume(b),a++,f):f(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(s)||i.push(s),gn(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return t(b)}}function Hye(e,t,n){return e.check(lf,t,e.attempt(zye,t,n))}function Wye(e){e.exit("gfmFootnoteDefinition")}function Kye(e,t,n){const r=this;return gn(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Gye(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l1?l(b):(a.consume(b),h++,g);if(h<2&&!n)return l(b);const E=a.exit("strikethroughSequenceTemporary"),C=Ia(b);return E._open=!C||C===2&&!!y,E._close=!y||y===2&&!!C,o(b)}}}class Yye{constructor(){this.map=[],this.index=new Map}add(t,n,r){Jye(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0,this.index.clear()}}function Jye(e,t,n,r){if(n===0&&r.length===0)return;const i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}const s=[t,n,r];e.map.push(s),e.index.set(t,s)}function Xye(e,t){let n=!1;const r=[];for(;t-1;){const{type:ee}=r.events[F][1];if(ee==="lineEnding"||ee==="linePrefix")F--;else break}const M=F>-1?r.events[F][1].type:null,W=M==="tableHead"||M==="tableRow"?w:l;return W===w&&r.parser.lazy[r.now().line]?n(I):W(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(a=!0,s+=1),f(I)}function f(I){return I===null?n(I):Et(I)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g):n(I):nn(I)?gn(e,f,"whitespace")(I):(s+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||Dn(I)?(e.exit("data"),f(I)):(e.consume(I),I===92?m:h)}function m(I){return I===92||I===124?(e.consume(I),h):h(I)}function g(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,nn(I)?gn(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):b(I))}function b(I){return I===45||I===58?E(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),y):_(I)}function y(I){return nn(I)?gn(e,E,"whitespace")(I):E(I)}function E(I){return I===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):I===45?(s+=1,C(I)):I===null||Et(I)?O(I):_(I)}function C(I){return I===45?(e.enter("tableDelimiterFiller"),x(I)):_(I)}function x(I){return I===45?(e.consume(I),x):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(I))}function S(I){return nn(I)?gn(e,O,"whitespace")(I):O(I)}function O(I){return I===124?b(I):I===null||Et(I)?!a||i!==s?_(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):_(I)}function _(I){return n(I)}function w(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||Et(I)?(e.exit("tableRow"),t(I)):nn(I)?gn(e,T,"whitespace")(I):(e.enter("data"),A(I))}function A(I){return I===null||I===124||Dn(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?P:A)}function P(I){return I===92||I===124?(e.consume(I),A):A(I)}}function exe(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,f,h;const m=new Yye;for(;++nn[2]+1){const b=n[2]+1,y=n[3]-n[2]-1;e.add(b,y,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},dc(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function lN(e,t,n,r,i){const s=[],a=dc(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function dc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const txe={name:"tasklistCheck",tokenize:rxe};function nxe(){return{text:{91:txe}}}function rxe(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Dn(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return Et(l)?t(l):nn(l)?e.check({tokenize:ixe},t,n)(l):n(l)}}function ixe(e,t,n){return gn(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function sxe(e){return $3([Nye(),jye(),Gye(e),Qye(),nxe()])}const axe={};function oxe(e){const t=this,n=e||axe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(sxe(n)),s.push(Sye()),a.push(_ye(n))}function lxe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function t(){this.buffer()}function n(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];f.type,this.exit(l),f.value=u;const h=f.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function s(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),f=this.stack[this.stack.length-1];f.type,this.exit(l),f.value=u,f.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function uxe(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(s,a,o,l){const u=s.value||"",f=o.createTracker(l),h="$".repeat(Math.max(qL(u,"$")+1,2)),m=o.enter("mathFlow");let g=f.move(h);if(s.meta){const b=o.enter("mathFlowMeta");g+=f.move(o.safe(s.meta,{after:` +`,before:g,encode:["$"],...f.current()})),b()}return g+=f.move(` +`),u&&(g+=f.move(u+` +`)),g+=f.move(h),m(),g}function r(s,a,o){let l=s.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const f="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h{const o=new RegExp("\\s"+s+`\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);return o?o[1]!==void 0?o[1]:o[2]!==void 0?o[2]:o[3]||"":""},n=t("src").trim();if(!n)return null;const r={url:n,alt:t("alt")},i=t("width").trim();return/^\d+(\.\d+)?$/.test(i)?r.width=Math.round(Number(i)):/^\d+(\.\d+)?%$/.test(i)&&(r.widthPct=i),r}const wxe=[{re:new RegExp(Mn[Aa][0]+"([^"+Mn[Aa][1]+"]*)"+Mn[Aa][1],"g"),field:Aa},{re:new RegExp(Mn[Ta][0]+"([^"+Mn[Ta][1]+"]*)"+Mn[Ta][1],"g"),field:Ta},{re:new RegExp(Mn[uo][0]+"([^"+Mn[uo][1]+"]*)"+Mn[uo][1],"g"),field:uo},{re:new RegExp(Mn[ol][0]+"([^"+Mn[ol][1]+"]*)"+Mn[ol][1],"g"),field:ol}];function Exe(e){let t=[{...e}];for(const{re:n,field:r}of wxe){const i=[];for(const s of t){const a=typeof s.text=="string"?s.text:"";if(!a||s[r]){i.push(s);continue}n.lastIndex=0;let o=0,l,u=!1;for(;l=n.exec(a);)u=!0,l.index>o&&i.push({...s,text:a.slice(o,l.index)}),i.push({...s,text:l[1],[r]:!0}),o=l.index+l[0].length;u?otypeof n.text=="string"&&n.text.length>0)}function Gz(e){if(typeof e.text=="string")return Exe(e);if(e.type&&xxe.has(e.type))return[e];if(Array.isArray(e.children)){const t=[];for(const n of e.children)for(const r of Gz(n))t.push(r);return[{...e,children:t}]}return[e]}function fN(e){return e&&String(e).split(/(```[\s\S]*?```|~~~[\s\S]*?~~~|\$\$[\s\S]*?\$\$|`+[^`]*`+|\$[^$\n]+\$)/g).map((n,r)=>r%2===1?n:n.replace(/]*>/gi,s=>lC+encodeURIComponent(s)+U4).replace(/([^<]*)<\/kbd>/gi,(s,a)=>"`"+a+"`").replace(/([^<]*)<\/sup>/gi,(s,a)=>"^"+a+"^").replace(/([^<]*)<\/sub>/gi,(s,a)=>"~"+a+"~").replace(/]*>([^<]*)<\/abbr>/gi,"$1").replace(/([^<]*)<\/mark>/gi,(s,a)=>"=="+a+"==").replace(/([^<]*)<\/u>/gi,(s,a)=>Mn[ol][0]+a+Mn[ol][1]).replace(//gi,Kz).replace(/\[TOC\]/gi,Ud).replace(/\[\[([^\[\]\n]+)\]\]/g,(s,a)=>Hd+a+d1).replace(/([^<]*)<\/mark>/gi,(s,a)=>Mn[Aa][0]+a+Mn[Aa][1]).replace(/([^<]*)<\/sup>/gi,(s,a)=>Mn[Ta][0]+a+Mn[Ta][1]).replace(/([^<]*)<\/sub>/gi,(s,a)=>Mn[uo][0]+a+Mn[uo][1]).replace(/<\/?(kbd|small|big|ins|del|font|span)(\s[^>]*)?>/gi,"").replace(/==([^=\n]+?)==/g,(s,a)=>Mn[Aa][0]+a+Mn[Aa][1]).replace(/\^([^^\n]+?)\^/g,(s,a)=>Mn[Ta][0]+a+Mn[Ta][1]).replace(/(?Mn[uo][0]+a+Mn[uo][1])).join("")}function Yz(e){if(typeof e.text=="string"){const t=e.text.replace(/[\uE000-\uE007]/g,"");return t===e.text?e:{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Yz)}:e}function H4(e){const t=[];for(const n of e)if(!(!n||typeof n!="object")){if(String(n.type||"").startsWith("mdx")){String(n.name||"").toLowerCase()==="br"?t.push({text:` +`}):Array.isArray(n.children)&&t.push(...H4(n.children));continue}Array.isArray(n.children)?t.push({...n,children:H4(n.children)}):t.push(n)}return t}function Jz(e){if(typeof e.text=="string"){if(!e.text.includes(Ud)&&!e.text.includes(Hd))return e;const t=e.text.split(Ud).join("[TOC]").split(Hd).join("[[").split(d1).join("]]");return{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Jz)}:e}function Xz(e){if(typeof e.text=="string"){if(!/\[TOC\]|\[\[/i.test(e.text))return e;const t=e.text.replace(/\[TOC\]/gi,Ud).replace(/\[\[([^\[\]\n]+)\]\]/g,(n,r)=>Hd+r+d1);return{...e,text:t}}return Array.isArray(e.children)?{...e,children:e.children.map(Xz)}:e}function Cxe(e,t){const n=Object.keys(e).filter(i=>i!=="text").sort(),r=Object.keys(t).filter(i=>i!=="text").sort();if(n.join(",")!==r.join(","))return!1;for(const i of n)if(i!=="children"&&e[i]!==t[i])return!1;return!0}function kxe(e){const t=[];for(const n of e){if(typeof n.text!="string"){t.push(n);continue}const r=n.text;if(r===""&&Object.keys(n).every(s=>s==="text"))continue;const i=t[t.length-1];if(i&&Cxe(i,n)){t[t.length-1]={...i,text:String(i.text||"")+r};continue}t.push(n)}return t.length?t:[{text:""}]}function dN(e){if(!Array.isArray(e))return e;const t=[];for(const s of e)for(const a of Gz(s))t.push(a);const n=H4(t).map(Yz),r=s=>{if(typeof s.text=="string"||!Array.isArray(s.children))return s;const a=s.children.map(r),l=a.length>0&&a.every(u=>typeof u.text=="string")?kxe(a):a;return l.length===a.length&&l.every((u,f)=>u===a[f])?s:{...s,children:l}},i=n.map(r).map(Jz);return Txe(i)}function Dxe(e){const n=(typeof e.text=="string"?e.text:"").replace(/\u200b/g,"");if(!n){const a={...e};for(const o of Object.keys(Mn))a[o]&&delete a[o];return a.text="",a}let r=n;const i={...e};let s=!1;for(const a of Object.keys(Mn)){if(!e[a])continue;const[o,l]=Mn[a];r=o+r+l,delete i[a],s=!0}return s?(i.text=r,i):e}function Qz(e){return typeof e.text=="string"?Dxe(e):Array.isArray(e.children)?{...e,children:e.children.map(Qz)}:e}function Sxe(e){return e.map(t=>Xz(t))}function _xe(e){return Array.isArray(e)?e.map(Qz):e}function Axe(e){if(!e)return e;let t=e;for(const n of Object.keys(Mn)){const[r,i]=Mn[n],s=new RegExp(r+"([^"+i+"]*)"+i,"g");if(n===ol){t=t.replace(s,(l,u)=>""+u+"");continue}const a=n===Aa?"==":n===Ta?"^":"~",o=a;t=t.replace(s,(l,u)=>a+u+o)}return t=t.split(Kz).join("
    "),t=t.split(Ud).join("[TOC]"),t=t.split(Hd).join("[[").split(d1).join("]]"),t=t.split(` +`).map(n=>/^[\u200b\s]*\u200b[\u200b\s]*$/.test(n)?"":n).join(` +`),t=t.replace(/ /g," "),t.replace(/[\uE000-\uE007]/g,"")}function Txe(e){if(!Array.isArray(e))return e;const t=s=>{let a="";try{a=decodeURIComponent(s)}catch{return null}const o=bxe(a);if(!o)return null;const l={type:String(te.img),url:o.url,caption:[{text:o.alt||""}],children:[{text:""}]};return o.width&&(l.width=o.width),o.widthPct&&(l.widthPct=o.widthPct),l},n=s=>{const a=typeof s.text=="string"?s.text:"";if(!a||a.indexOf(lC)<0)return[s];const o=[];cN.lastIndex=0;let l=0,u;for(;u=cN.exec(a);){u.index>l&&o.push({...s,text:a.slice(l,u.index)});const f=t(u[1]);o.push(f||{...s,text:u[0]}),l=u.index+u[0].length}return l!(typeof f.text=="string"&&f.text===""))},r=s=>{if(typeof s.text=="string")return n(s);if(!Array.isArray(s.children))return[s];const a=[];for(const o of s.children)a.push(...r(o));return[{...s,children:a}]},i=[];for(const s of e)for(const a of r(s)){if(a.type===String(te.p)&&Array.isArray(a.children)){const o=a.children.filter(l=>!(typeof l.text=="string"&&!l.text.trim()));if(o.length===1&&o[0]&&o[0].type===String(te.img)){i.push(o[0]);continue}}i.push(a)}return i}function Nxe({kind:e,code:t}){const n=Z.useRef(null),[r,i]=Z.useState(""),[s,a]=Z.useState(0);return Z.useEffect(()=>{const o=()=>a(l=>l+1);return window.addEventListener("cmark-theme",o),()=>window.removeEventListener("cmark-theme",o)},[]),Z.useEffect(()=>{let o=!0,l=null,u=null;return(async()=>{if(n.current)try{if(e==="mermaid"){const f=(await kk(async()=>{const{default:b}=await import("./mermaid-C_q9pug0.js").then(y=>y.be);return{default:b}},__vite__mapDeps([0,1]),import.meta.url)).default,h=document.documentElement.getAttribute("data-theme")==="dark";f.initialize({startOnLoad:!1,securityLevel:"loose",theme:h?"base":"default",themeVariables:h?{darkMode:!0,background:"#21262d",primaryColor:"#1f2a37",primaryTextColor:"#e6edf3",primaryBorderColor:"#58a6ff",secondaryColor:"#21262d",tertiaryColor:"#161b22",mainBkg:"#1f2a37",nodeBorder:"#58a6ff",nodeTextColor:"#e6edf3",lineColor:"#c9d1d9",textColor:"#e6edf3",titleColor:"#e6edf3",edgeLabelBackground:"#161b22",clusterBkg:"#161b22",clusterBorder:"#30363d",fontSize:"14px"}:{}});const m="mmd-"+Math.random().toString(36).slice(2,9),{svg:g}=await f.render(m,t);o&&n.current&&(n.current.innerHTML=g)}else{const f=await kk(()=>import("./echarts-BAPDkhe3.js"),[],import.meta.url);if(!o||!n.current)return;const h=n.current,m=f.getInstanceByDom(h);m&&m.dispose();const g=document.documentElement.getAttribute("data-theme")==="dark",b=g?"cmark-echarts-dark":"cmark-echarts-light",y=g?"#7d8894":"#b8c2cc",E=g?"rgba(255,255,255,0.20)":"#dbe1e8",C=g?"#b1bac4":"#4a5560",x=g?"#e6edf3":"#1f2328";f.registerTheme(b,{backgroundColor:"transparent",textStyle:{color:x},title:{textStyle:{color:x,fontWeight:600}},legend:{textStyle:{color:C}},tooltip:{backgroundColor:g?"#1c2128":"#ffffff",borderColor:g?"#30363d":"#d0d7de",textStyle:{color:x}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:y}},axisTick:{lineStyle:{color:y}},axisLabel:{color:C},splitLine:{show:!0,lineStyle:{color:E,type:"dashed"}}},valueAxis:{axisLine:{show:!0,lineStyle:{color:y}},axisTick:{lineStyle:{color:y}},axisLabel:{color:C},splitLine:{show:!0,lineStyle:{color:E,type:"dashed"}}},logarithmicAxis:{axisLine:{lineStyle:{color:y}},axisLabel:{color:C},splitLine:{lineStyle:{color:E,type:"dashed"}}}});const S=f.init(h,b,{renderer:"svg"}),O=JSON.parse(t);delete O.height,delete O.width,S.setOption(O),l=S;const _=()=>{if(o)try{const T=h.clientWidth,A=h.clientHeight;if(!T||!A)return;const P=S;(P.getWidth()!==T||P.getHeight()!==A)&&S.resize({width:T,height:A})}catch{}};setTimeout(_,0),setTimeout(_,150);const w=new ResizeObserver(()=>{if(o)try{const T=h.clientWidth,A=h.clientHeight;T&&A&&S.resize({width:T,height:A})}catch{}});w.observe(h),u=w}o&&i("")}catch(f){o&&i(f?.message||"渲染失败")}})(),()=>{o=!1;try{u?.disconnect()}catch{}if(l){try{l.dispose()}catch{}l=null}}},[e,t,s]),$.jsxs($.Fragment,{children:[$.jsx("div",{className:"diagram-canvas",ref:n,style:e==="echarts"?{width:"100%",height:320}:void 0}),r?$.jsx("div",{className:"diagram-err",children:r}):null]})}const dm=new Set;let wp=null;function uC(e){if(dm.size===0){wp=e;return}dm.forEach(t=>t(e))}function Oxe(){const[e,t]=Z.useState(null),[n,r]=Z.useState(""),i=Z.useRef(null),s=Z.useRef(null);s.current=e,Z.useEffect(()=>{const u=f=>{t(f),r(f.tex||"")};return dm.add(u),wp&&(u(wp),wp=null),()=>{dm.delete(u)}},[]),Z.useEffect(()=>{if(!e)return;const u=setTimeout(()=>{i.current?.focus();const f=i.current?.value.length||0;i.current?.setSelectionRange(f,f)},30);return()=>clearTimeout(u)},[e]);const a=()=>t(null),o=()=>{const u=s.current;if(u)try{u.onApply(n)}catch(f){console.error("[equation-dialog]",f)}t(null)};Z.useEffect(()=>{if(!e)return;const u=f=>{f.key==="Escape"&&(f.stopPropagation(),f.preventDefault(),t(null))};return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},[e]);let l="";if(e)try{l=G4.renderToString(n.trim()||"\\;",{throwOnError:!1,displayMode:!0})}catch{l=""}return e?pm.createPortal($.jsx("div",{className:"eq-mask",onMouseDown:a,children:$.jsxs("div",{className:"eq-dialog",onMouseDown:u=>u.stopPropagation(),children:[$.jsxs("div",{className:"eq-head",children:[$.jsx("span",{className:"eq-title",children:e.title||"编辑公式"}),$.jsx("button",{type:"button",className:"eq-x",onClick:a,title:"关闭",children:$.jsx("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:$.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]}),$.jsx("div",{className:"eq-preview",dangerouslySetInnerHTML:{__html:l}}),n.trim()?null:$.jsx("div",{className:"eq-empty",children:"上方会实时显示公式效果"}),$.jsx("textarea",{ref:i,className:"eq-input",value:n,spellCheck:!1,placeholder:"在这里输入 LaTeX,例如 \\frac{a}{b} 或 \\int_0^1 x^2\\,dx",onChange:u=>r(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.ctrlKey||u.metaKey)&&(u.preventDefault(),o())}}),$.jsxs("div",{className:"eq-foot",children:[$.jsx("span",{className:"eq-hint",children:"Ctrl+Enter 确定 · Esc 取消"}),$.jsx("button",{type:"button",className:"eq-btn",onClick:a,children:"取消"}),$.jsx("button",{type:"button",className:"eq-btn primary",onClick:o,children:"确定"})]})]})}),document.body):null}/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bxe=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */function Pxe(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Bxe(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rxe=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fxe=e=>{const t=Rxe(e);return t.charAt(0).toUpperCase()+t.slice(1)};/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */function cw(e){return e!=null}function Ixe(e,t={}){const n=t.attributeNames??{},r=m=>n[m]??m,i=e.size??e.width??Kl.width,s=e.size??e.height??Kl.height,a=e.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],o=[...e.name?[`lucide-${e.name}`]:[],...a],l=t.className?.split(" ").filter(Boolean)??[],u=t.includeDefaultClasses===!1?W4(...l):W4("lucide",...o,...l),f=t.absoluteStrokeWidth?Number(t.strokeWidth??Kl["stroke-width"])*Number(e.size??e.width??Kl.width)/Number(t.size??t.width??Kl.width):t.strokeWidth??Kl["stroke-width"];return["svg",{...Object.entries(Kl).reduce((m,[g,b])=>(m[r(g)]=b,m),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&cw(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&cw(t.width)&&{[r("width")]:t.width},..."height"in t&&cw(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:f,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${i} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[g,b,y]=m,E=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...b}:b;return y?[g,E,y]:[g,E]})]}/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */function Mxe(e,t={}){return Ixe(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lxe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},zxe=Z.createContext({}),jxe=()=>Z.useContext(zxe),qxe=Z.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:s,nonScalingStroke:a,className:o="",children:l,iconNode:u=[],icon:f={node:u,aliases:[],size:24},...h},m)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:y=!1,nonScalingStroke:E=!1,color:C="currentColor",className:x=""}=jxe()??{},S=!!l||Lxe(h),[O,_,w=[]]=Mxe(f,{color:e??C,width:n??t??g,height:r??t??g,strokeWidth:i??b,absoluteStrokeWidth:s??y,nonScalingStroke:a??E,className:W4(x,o),hasA11yProp:S,attributes:h});return Z.createElement(O,{ref:m,..._},[...w.map(([T,A])=>Z.createElement(T,A)),...Array.isArray(l)?l:[l]])});/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */function Nn(e,t=[],n=[]){const r=typeof e=="string"?Pxe(e,t,n):e,i=Z.forwardRef(({className:s,...a},o)=>Z.createElement(qxe,{ref:o,icon:r,className:s,...a}));return r.name&&(i.displayName=Fxe(r.name)),i}/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zz={name:"arrow-down-to-line",size:24,node:[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]};Zz.node;const $xe=Nn(Zz);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ej={name:"arrow-left-to-line",size:24,node:[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]]};ej.node;const Vxe=Nn(ej);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tj={name:"arrow-right-to-line",size:24,node:[["path",{d:"M17 12H3",key:"8awo09"}],["path",{d:"m11 18 6-6-6-6",key:"8c2y43"}],["path",{d:"M21 5v14",key:"nzette"}]]};tj.node;const Uxe=Nn(tj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nj={name:"arrow-up-to-line",size:24,node:[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]};nj.node;const Hxe=Nn(nj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rj={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};rj.node;const Wxe=Nn(rj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ij={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};ij.node;const Kxe=Nn(ij);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sj={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};sj.node;const Gxe=Nn(sj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aj={name:"columns-3",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],aliases:["panels-left-right"]};aj.node;const Yxe=Nn(aj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oj={name:"heading-1",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]};oj.node;const Jxe=Nn(oj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lj={name:"heading-2",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]};lj.node;const Xxe=Nn(lj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uj={name:"heading-3",size:24,node:[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]};uj.node;const Qxe=Nn(uj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cj={name:"highlighter",size:24,node:[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]};cj.node;const Zxe=Nn(cj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fj={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};fj.node;const ebe=Nn(fj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dj={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};dj.node;const tbe=Nn(dj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hj={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};hj.node;const nbe=Nn(hj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pj={name:"list-ordered",size:24,node:[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]};pj.node;const rbe=Nn(pj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mj={name:"list-todo",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]};mj.node;const ibe=Nn(mj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gj={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};gj.node;const sbe=Nn(gj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vj={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};vj.node;const abe=Nn(vj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yj={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};yj.node;const obe=Nn(yj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xj={name:"rows-3",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],aliases:["panels-top-bottom"]};xj.node;const lbe=Nn(xj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bj={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};bj.node;const ube=Nn(bj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wj={name:"sigma",size:24,node:[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]};wj.node;const cbe=Nn(wj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ej={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};Ej.node;const fbe=Nn(Ej);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cj={name:"square-code",size:24,node:[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]],aliases:["code-square"]};Cj.node;const dbe=Nn(Cj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kj={name:"square-function",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],aliases:["function-square"]};kj.node;const hbe=Nn(kj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dj={name:"strikethrough",size:24,node:[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]};Dj.node;const pbe=Nn(Dj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sj={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};Sj.node;const mbe=Nn(Sj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _j={name:"text-align-center",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],aliases:["align-center"]};_j.node;const gbe=Nn(_j);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aj={name:"text-align-end",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],aliases:["align-right"]};Aj.node;const vbe=Nn(Aj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tj={name:"text-align-start",size:24,node:[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],aliases:["text","align-left"]};Tj.node;const ybe=Nn(Tj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nj={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Nj.node;const xbe=Nn(Nj);/** + * @license lucide-react v1.61.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oj={name:"underline",size:24,node:[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]};Oj.node;const bbe=Nn(Oj);function wbe(e){const t=String(e||"").replace(/\r/g,"").split(` +`).filter(f=>f.trim());if(t.length<2)return null;const n=f=>f.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(h=>h.trim()),r=n(t[0]);if(!r.length)return null;const i=/^\s*\|?[\s:|-]+\|?\s*$/.test(t[1])&&t[1].includes("-"),a=(i?n(t[1]):[]).map(f=>{const h=f.startsWith(":"),m=f.endsWith(":");return h&&m?"center":m?"right":h?"left":void 0}),o=i?t.slice(2):t.slice(1),l=[r,...o.map(n)],u=Math.max(...l.map(f=>f.length));return{type:"table",...a.some(Boolean)?{align:a.map(f=>f??null)}:{},children:l.map((f,h)=>({type:"tr",children:Array.from({length:u}).map((m,g)=>({type:h===0?"th":"td",...a[g]?{align:a[g]}:{},children:[{type:"p",children:[{text:f[g]??""}]}]}))}))}}let oc=null;function Ebe({tableNode:e,onOpenChange:t}){const{editor:n,tf:r}=s0(sI),[i,s]=Z.useState(!1),[a,o]=Z.useState(""),[l,u]=Z.useState(!1),[f,h]=Z.useState(""),m=Z.useRef(null),g=()=>{const x=du(n),S=x?x[1]:null,O=wbe(a);if(!O){h("解析失败:至少要两行,第一行是表头,格式 | a | b |");return}if(!S){h("没有定位到表格,请先把光标放到表格里");return}try{n.tf.removeNodes({at:S}),n.tf.insertNodes(O,{at:S}),h(""),u(!1)}catch(_){h("写回失败:"+(_?.message||""))}},b=()=>{s(!1);try{t?.(!1)}catch{}oc===b&&(oc=null)};Z.useEffect(()=>{if(!i)return;const x=m.current;if(!x)return;x.style.height="auto";const S=Math.max(120,Math.round(window.innerHeight*.6)),O=Math.min(x.scrollHeight+2,S);x.style.height=O+"px",x.style.overflowY=x.scrollHeight+2>S?"auto":"hidden"},[a,i]);const y=()=>{if(i){b();return}if(oc){try{oc()}catch{}oc=null}let x="";try{const S=du(n),O=e||(S?S[0]:void 0);O?(x=String(n.getApi(al).markdown.serialize({value:[O]})||""),x.trim()||(x="(这个表格没有可序列化的内容)")):x="(没有定位到表格,请先把光标放到表格里再点)"}catch(S){x="(读取表格代码失败:"+(S&&S.message?S.message:"未知错误")+")",console.error("[table-code]",S)}o(x.replace(/\n+$/,"")),s(!0);try{t?.(!0)}catch{}oc=b},E=x=>{try{const S=du(n),O=n.selection;if(!S||!O)return;const[_,w]=S,A=O.anchor.path.slice(w.length)[1];if(typeof A!="number")return;const P=(_.children||[]).length,I=_,F=Array.isArray(I.align)?[...I.align]:[];F[A]=x;try{n.tf.setNodes({align:F},{at:w})}catch{}for(let M=0;Mr.insert.tableRow({before:!0})},{k:"rowDown",tip:"下方插入行",icon:$.jsx($xe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableRow()},{k:"delRow",tip:"删除行",icon:$.jsx(lbe,{size:15,strokeWidth:1.8}),run:()=>r.remove.tableRow(),danger:!0},{k:"colLeft",tip:"左侧插入列",icon:$.jsx(Vxe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableColumn({before:!0})},{k:"colRight",tip:"右侧插入列",icon:$.jsx(Uxe,{size:15,strokeWidth:1.8}),run:()=>r.insert.tableColumn()},{k:"delCol",tip:"删除列",icon:$.jsx(Yxe,{size:15,strokeWidth:1.8}),run:()=>r.remove.tableColumn(),sep:!0,danger:!0},{k:"alignLeft",tip:"列左对齐",icon:$.jsx(ybe,{size:15,strokeWidth:1.8}),run:()=>E("left")},{k:"alignCenter",tip:"列居中对齐",icon:$.jsx(gbe,{size:15,strokeWidth:1.8}),run:()=>E("center")},{k:"alignRight",tip:"列右对齐",icon:$.jsx(vbe,{size:15,strokeWidth:1.8}),run:()=>E("right"),sep:!0},{k:"delTable",tip:"删除整个表格",icon:$.jsx(xbe,{size:15,strokeWidth:1.8}),run:()=>r.remove.table(),danger:!0},...i&&l?[{k:"saveCode",tip:"保存表格代码",icon:$.jsx(ube,{size:15,strokeWidth:1.8}),run:()=>{},cls:"tc-right is-dirty"}]:[],{k:"viewCode",tip:"查看/隐藏表格代码",icon:$.jsx(Kxe,{size:15,strokeWidth:1.8}),run:()=>{},cls:"tc-right"+(i?" is-on":"")}];return $.jsxs(Z.Fragment,{children:[i?$.jsxs("div",{className:"table-code-panel",contentEditable:!1,onMouseDown:x=>{x.stopPropagation();const S=x.target;S&&!S.closest("textarea, input, button")&&x.preventDefault()},onMouseUp:x=>x.stopPropagation(),onPointerDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onDoubleClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),children:[$.jsx("textarea",{ref:m,className:"table-code-body",value:a,spellCheck:!1,onChange:x=>{o(x.target.value),u(!0)}}),f?$.jsx("div",{className:"table-code-err",children:f}):null]}):null,C.map((x,S)=>{const O=x.cls?.includes("tc-right")&&C.findIndex(_=>_.cls?.includes("tc-right"))===S;return $.jsxs(Z.Fragment,{children:[$.jsx("button",{type:"button",title:x.tip,className:"tc-btn"+(x.danger?" danger":"")+(x.cls?" "+x.cls:"")+(O?" tc-right-first":""),onMouseDown:_=>_.preventDefault(),onClick:_=>{if(x.k==="viewCode"){_.preventDefault();try{y()}catch(w){console.error("[table-toolbar] viewCode",w)}return}if(x.k==="saveCode"){_.preventDefault();try{g()}catch(w){console.error("[table-toolbar] saveCode",w)}return}try{x.run(),n.tf.focus()}catch(w){console.error("[table-toolbar]",x.k,w)}},children:x.icon}),x.sep?$.jsx("span",{}):null]},x.k)})]})}function Cbe({attributes:e,children:t,element:n,editor:r}){const i=n;return i.checked!==void 0?$.jsxs("div",{...e,className:"p task-list-item"+(i.checked?" task-checked":""),children:[$.jsx("span",{className:"task-list-checkbox",contentEditable:!1,children:$.jsx("input",{type:"checkbox",checked:!!i.checked,onChange:s=>{const a=r.api.findPath(n);a&&r.tf.setNodes({checked:s.target.checked},{at:a})}})}),$.jsx("span",{className:"task-list-text",children:t})]}):$.jsx("div",{...e,className:"p",children:t})}function uf(e){return function({attributes:n,children:r}){return $.jsx("div",{...n,className:"h"+e,children:r})}}const kbe=uf(1),Dbe=uf(2),Sbe=uf(3),_be=uf(4),Abe=uf(5),Tbe=uf(6);function Nbe({attributes:e,children:t}){return $.jsx("blockquote",{...e,className:"blockquote",children:t})}function Obe({attributes:e,children:t,element:n}){const r=h1(n);return $.jsxs("div",{...e,className:"hr void-wrap",contentEditable:!1,onClick:r,children:[$.jsx(Wd,{}),t]})}const fw=10;function Bbe(e,t,n){const r=e,i=ml(r,t);if(!i)return;const s=n==="before"?i.slice():[i[0]+1],a=o=>{const l=o;return!!l&&l.type===te.p&&Array.isArray(l.children)&&l.children.every(u=>typeof u.text=="string")};try{const o=r.api?.node?.(s);o&&a(o[0])?(r.tf?.select)({path:[...s,0],offset:0}):((r.tf?.insertNodes)({type:te.p,children:[{text:""}]},{at:s}),(r.tf?.select)({path:[...s,0],offset:0})),r.tf?.focus?.()}catch(o){console.error("[void-gap]",o)}}function Wd(){const e=t=>{t.preventDefault(),t.stopPropagation()};return $.jsxs($.Fragment,{children:[$.jsx("span",{className:"void-gap void-gap-top",contentEditable:!1,"aria-hidden":"true",onMouseDown:e,onPointerDown:e}),$.jsx("span",{className:"void-gap void-gap-bottom",contentEditable:!1,"aria-hidden":"true",onMouseDown:e,onPointerDown:e})]})}function h1(e){const t=wr();return n=>{const r=n.target;if(r&&typeof r.closest=="function"&&r.closest(".code-lang, .code-editor-copy, .code-lang-list"))return;const i=n.currentTarget.getBoundingClientRect(),s=n.clientY-i.top;s>fw&&sA.locked),l=h1(n),[u,f]=Z.useState(!1),[h,m]=Z.useState(!1),[g,b]=Z.useState({top:0,left:0}),y=Z.useRef(null),E=Z.useRef(null),C=Z.useRef(null),x=dw.includes(s)?dw:[s,...dw];Z.useEffect(()=>{if(!u)return;const A=I=>{const F=I.target;y.current&&y.current.contains(F)||E.current&&E.current.contains(F)||f(!1)},P=I=>{I.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",A),document.addEventListener("keydown",P),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",P)}},[u]);const S=(i.lang||"").toLowerCase(),O=S==="mermaid"||S==="echarts",_=A=>(A||[]).map(P=>{const I=P;if(typeof I.text=="string")return I.text;const F=I.children?_(I.children):"";return I.type==="code_line",F}).join(` +`),w=_(i.children||[]).split(` +`).map(A=>A.replace(/\n+$/,"")).join(` +`).replace(/\n{3,}/g,` + +`).replace(/^\n+|\n+$/g,""),T=()=>{try{navigator.clipboard.writeText(w)}catch{}};return $.jsxs("div",{className:"code-block-wrap void-wrap"+(a?" active":"")+(O&&w.trim()&&!h?" is-source-hidden":"")+(u?" is-lang-open":""),onClick:l,children:[$.jsx(Wd,{}),$.jsx("button",{ref:y,type:"button",className:"code-lang"+(o?" is-locked":""),contentEditable:!1,disabled:o,onMouseDown:A=>{A.preventDefault()},onClick:A=>{if(A.stopPropagation(),!o){f(P=>!P);try{const P=r;C.current=P.api?.findPath?.(n)||ml(r,n)}catch(P){C.current=ml(r,n),console.error("[code-lang findPath]",P)}try{const P=y.current?.getBoundingClientRect(),M=y.current?.closest(".code-block-wrap")?.querySelector(":scope > .code-editor-copy")?.getBoundingClientRect(),W=150,ee=6;if(P&&M){let U=M.left-W-ee;U<8&&(U=Math.max(8,P.left)),b({top:P.bottom+4,left:U})}else P&&b({top:P.bottom+4,left:P.left})}catch(P){console.error("[code-lang rect]",P)}}},title:"切换代码语言",children:s}),$.jsx("button",{type:"button",className:"code-editor-copy",contentEditable:!1,onClick:A=>{A.stopPropagation(),T()},title:"复制代码",children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),$.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),u&&!o?pm.createPortal($.jsx("div",{ref:E,className:"code-lang-list",contentEditable:!1,style:{top:g.top,left:g.left},onMouseDown:A=>A.preventDefault(),children:x.map(A=>$.jsx("div",{className:"code-lang-item"+(A===s?" on":""),onMouseDown:P=>{P.preventDefault(),P.stopPropagation();const I=C.current,F=r;if(I)try{F.tf?.setNodes?.({lang:A},{at:I})}catch(M){console.error("[code-lang]",M)}f(!1)},children:A},A))}),document.body):null,$.jsx("pre",{...e,className:"code-editor"+(O&&w.trim()?h?"":" is-source-hidden":""),"data-lang":i.lang||"",children:t}),O&&w.trim()?$.jsxs("div",{className:"diagram-box",contentEditable:!1,children:[$.jsx("button",{type:"button",className:"diagram-code-toggle"+(h?" is-on":""),contentEditable:!1,onMouseDown:A=>A.preventDefault(),onClick:A=>{A.stopPropagation(),m(P=>!P)},title:h?"隐藏源码":"显示源码",children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"m18 16 4-4-4-4"}),$.jsx("path",{d:"m6 8-4 4 4 4"}),$.jsx("path",{d:"m14.5 4-5 16"})]})}),$.jsx("div",{className:"diagram-canvas"+(S==="echarts"?" is-full":""),children:$.jsx(Nxe,{kind:S,code:w})})]}):null]})}function Rbe({attributes:e,children:t}){return $.jsx("div",{...e,className:"code-line",children:t})}const Fbe={"hljs-built_in":"builtin","hljs-regexp":"regex","hljs-attr":"attr-name","hljs-attribute":"attr-name","hljs-literal":"boolean","hljs-selector-tag":"selector","hljs-selector-class":"selector","hljs-selector-id":"selector","hljs-meta":"important","hljs-section":"property","hljs-params":"variable"};function Ibe(e){const t=[];for(const r of String(e||"").split(/\s+/).filter(Boolean))if(r==="hljs-title")t.push("function");else if(r==="class_"||r==="hljs-class")t.push("class-name");else{if(r.endsWith("_"))continue;t.push(Fbe[r]??(r.startsWith("hljs-")?r.slice(5):r))}const n=[...new Set(t)];return n.includes("class-name")?n.filter(r=>r!=="function").join(" "):n.join(" ")}function Mbe({attributes:e,children:t,leaf:n}){const r=n.className||"",i=Ibe(r),s=e?.className,a=i?["token",i,s].filter(Boolean).join(" "):s;return $.jsx("span",{...e,className:a,children:t})}function Lbe({attributes:e,children:t,element:n}){const r=Le(u=>u.locked),i=h1(n),s=Z.useRef(null),[a,o]=Z.useState(!1);Z.useEffect(()=>{const u=s.current,f=u?.closest(".table-wrap");if(!u||!f)return;let h=0;const m=()=>{u.classList.remove("is-pinned"),u.style.position="",u.style.top="",u.style.left="",u.style.width=""},g=()=>{cancelAnimationFrame(h),h=requestAnimationFrame(()=>{let b=f.parentElement;for(;b&&b!==document.body;){const x=getComputedStyle(b);if(/(auto|scroll)/.test(x.overflowY))break;b=b.parentElement}if(!b||b===document.body){m();return}const y=f.getBoundingClientRect(),E=b.getBoundingClientRect(),C=u.offsetHeight||30;y.topE.top+C?(u.classList.add("is-pinned"),u.style.position="fixed",u.style.top=Math.round(E.top)+"px",u.style.left=Math.round(y.left)+"px",u.style.width=Math.round(y.width)+"px"):m()})};return g(),window.addEventListener("scroll",g,!0),window.addEventListener("resize",g),()=>{cancelAnimationFrame(h),window.removeEventListener("scroll",g,!0),window.removeEventListener("resize",g)}},[]);const l=_F(u=>{try{const f=du(u);if(!f)return!1;const h=u.api.findPath?.(n);return h?f[1].join(",")===h.join(","):!1}catch{return!1}},[n]);return $.jsxs("div",{className:"table-wrap void-wrap"+((l||a)&&!r?" is-bar-open":""),onClick:i,children:[$.jsx(Wd,{}),$.jsx("div",{ref:s,className:"table-sticky-bar"+((l||a)&&!r?"":" is-hidden"),contentEditable:!1,"aria-hidden":!l||r,onClick:u=>u.stopPropagation(),onMouseDown:u=>u.stopPropagation(),onPointerDown:u=>u.stopPropagation(),children:$.jsx(Ebe,{tableNode:n,onOpenChange:o})}),$.jsx("table",{...e,className:"table",children:$.jsx("tbody",{children:t})})]})}function zbe({attributes:e,children:t}){return $.jsx("tr",{...e,className:"table-row",children:t})}function hN({attributes:e,children:t,element:n}){const r=n,i=!!r.header||String(r.type||"")==="th";return $.jsx("td",{...e,className:"table-cell"+(i?" is-header":""),style:r.align?{textAlign:r.align}:void 0,children:t})}function jbe({attributes:e,children:t,element:n}){const r=h1(n),i=wr(),s=Le(F=>F.locked),a=Z.useRef(null),o=n,l=(()=>{const F=Number(o.width);return Number.isFinite(F)&&F>0?Math.round(F):0})(),u=Z.useRef(null),[f,h]=Z.useState(null),[,m]=Z.useState(0),g=f??l,b=(()=>{const F=u.current?.naturalWidth||0;return!g||!F?100:Math.min(100,Math.max(10,Math.round(g/F*100)))})(),y=Z.useRef(null),E=F=>{y.current&&window.clearTimeout(y.current),y.current=window.setTimeout(()=>{try{const M=ml(i,n);if(!M)return;const W=u.current?.naturalWidth||0,ee=i.tf;F>=100?ee?.setNodes?.({width:null},{at:M}):W>0&&ee?.setNodes?.({width:Math.round(W*F/100)},{at:M})}catch(M){console.error("[img-zoom]",M)}},300)},C=o.caption,x=(()=>{if(!C)return"";if(typeof C=="string")return C;if(Array.isArray(C))return C.map(M=>{const W=M;return typeof W.text=="string"?W.text:Array.isArray(W.children)?W.children.map(ee=>String(ee?.text||"")).join(""):""}).join("");const F=C;return typeof F.text=="string"?F.text:""})(),S=o.alt||x,O=pn();let _=o.url||"";try{const F=Le.getState().currentRel;O?.resolveImageUrl&&(_=O.resolveImageUrl(o.url||"",F))}catch{}const w=F=>decodeURIComponent(F.replace(/^file:\/\/\/?/i,"")).replace(/\//g,"\\"),T=F=>{F.stopPropagation();const M=Math.min(100,Math.max(10,Number(F.target.value)||100)),W=u.current?.naturalWidth||0;h(M>=100||!W?null:Math.max(1,Math.round(W*M/100))),E(M)},A=F=>{F.stopPropagation(),F.preventDefault();try{const M=window.ztools;/^file:/i.test(_)?M?.shellOpenPath?.(w(_)):/^https?:/i.test(_)&&M?.shellOpenExternal?.(_)}catch(M){console.error("[img-open]",M)}},P=()=>{a.current=ml(i,n);const F=a.current;if(F)try{i.tf?.removeNodes?.({at:F})}catch(M){console.error("[img-del]",M)}},I=s?null:$.jsxs("div",{className:"img-handle",contentEditable:!1,onClick:F=>F.stopPropagation(),children:[$.jsxs("span",{className:"img-zoom",title:"拖动调整图片大小",children:[$.jsx("input",{type:"range",className:"img-zoom-range",min:10,max:100,step:5,value:b,onChange:T,onClick:F=>F.stopPropagation(),onMouseDown:F=>F.stopPropagation()}),$.jsxs("span",{className:"img-zoom-val",children:[b,"%"]})]}),$.jsx("button",{type:"button",title:"打开图片",onClick:A,children:$.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M9.5 2.5h4v4"}),$.jsx("path",{d:"M13.5 2.5L7.5 8.5"}),$.jsx("path",{d:"M12 9.5v3a1.5 1.5 0 01-1.5 1.5h-6A1.5 1.5 0 013 12.5v-6A1.5 1.5 0 014.5 5h3"})]})}),$.jsx("button",{type:"button",className:"danger",title:"删除图片",onClick:P,children:$.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M3 4.5h10"}),$.jsx("path",{d:"M6.5 4.5V3h3v1.5"}),$.jsx("path",{d:"M4.5 4.5l.6 8a1 1 0 001 .9h3.8a1 1 0 001-.9l.6-8"})]})})]});return _?$.jsxs("div",{...e,className:"block-img void-wrap",onClick:r,children:[$.jsx(Wd,{}),$.jsx("img",{ref:u,src:_,alt:S,style:g?{width:g+"px",maxWidth:"100%"}:void 0,onLoad:()=>m(F=>F+1),contentEditable:!1,draggable:!1,onClick:F=>{F.stopPropagation()},title:s?"":"点击显示图片操作"}),I,t]}):$.jsxs("div",{...e,className:"block-img is-broken void-wrap",contentEditable:!1,onClick:F=>{r(F)},children:[$.jsx(Wd,{}),$.jsxs("span",{className:"img-missing",children:["图片附件找不到:",S||o.url||"(无 URL)"]}),I,t]})}function qbe({attributes:e,children:t,element:n}){const r=n,i=wr(),s=r.texExpression||r.value||"";let a="";try{a=G4.renderToString(s,{throwOnError:!1,displayMode:!0})}catch{a=""}const o=()=>{const u=ml(i,n);if(u)try{i.tf?.select?.(u)}catch(f){console.error("[equation-select]",f)}},l=()=>{const u=ml(i,n);uC({tex:s,title:"编辑公式",onApply:f=>{if(!u)return;const h=i;try{h.tf?.setNodes?.({texExpression:f},{at:u})}catch(m){console.error("[equation-edit]",m)}}})};return $.jsxs("div",{...e,className:"math-leaf",contentEditable:!1,onClick:u=>{u.stopPropagation(),o()},children:[$.jsxs("div",{className:"math-canvas",children:[$.jsx("button",{type:"button",className:"math-toggle",contentEditable:!1,onMouseDown:u=>u.preventDefault(),onClick:u=>{u.stopPropagation(),l()},title:"编辑公式",children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"m9 6-6 6 6 6"}),$.jsx("path",{d:"m15 6 6 6-6 6"})]})}),$.jsx("div",{className:"math-render",dangerouslySetInnerHTML:{__html:a}})]}),t]})}function $be({attributes:e,children:t,element:n}){const r=n,i=r.texExpression||r.value||"";let s="";try{s=G4.renderToString(i,{throwOnError:!1,displayMode:!1})}catch{s=""}const a=wr(),o=()=>{const l=ml(a,n);uC({tex:i,title:"编辑行内公式",onApply:u=>{if(!l)return;const f=a;try{f.tf?.setNodes?.({texExpression:u},{at:l})}catch(h){console.error("[inline-equation-edit]",h)}}})};return $.jsxs("span",{...e,className:"math-inline",contentEditable:!1,children:[$.jsx("span",{className:"math-inline-body",dangerouslySetInnerHTML:{__html:s}}),$.jsx("button",{type:"button",className:"math-inline-toggle",contentEditable:!1,onMouseDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),o()},title:"编辑行内公式",children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"m9 6-6 6 6 6"}),$.jsx("path",{d:"m15 6 6 6-6 6"})]})}),t]})}function Vbe({attributes:e,children:t}){return $.jsx("mark",{...e,className:"search-hit-mark",children:t})}function Ube({attributes:e,children:t,element:n}){const i=n.url||"";return $.jsx("a",{...e,className:"link",href:i,title:i,onClick:s=>{s.preventDefault(),pn().openExternal?.(i)},children:t})}const pN=Gle(Vle),hw=e=>String(e).replace(/&/g,"&").replace(/"/g,""").replace(//g,">"),Hbe={hard:!1,bullet:"-",rule:"-",emphasis:"*",strong:"*",fences:!0};let Bj="";function Wbe(e){Bj=String(e||"")}const Kbe=Lm({key:"searchHit",node:{isLeaf:!0},render:{leaf:Vbe},decorate:({entry:e})=>{const t=Bj.trim().toLowerCase();if(!t)return[];const n=e;let r,i;if(Array.isArray(n))r=n[0],i=n[1];else if(n&&typeof n=="object"){const l=n;r=l.node,i=l.path}if(!Array.isArray(i))return[];if(!Sn.isText(r))return[];const s=(r.text||"").toLowerCase();if(!s)return[];const a=[];let o=s.indexOf(t);for(;o>=0;)a.push({anchor:{path:i,offset:o},focus:{path:i,offset:o+t.length},searchHit:!0}),o=s.indexOf(t,o+t.length);return a}}),Gbe=[{type:te.p,children:[{text:""}]}];function Ybe(){const e=Le(w=>w.content),t=Le(w=>w.currentRel),n=Le(w=>w.setContent),r=Le(w=>w.locked),i=Le(w=>w.bodyFontSize),s=Le(w=>w.sourceMode),a=Le(w=>w.findTerm),o=Le(w=>w.setEditorApi),l=Le(w=>w.setEditor),u=Le(w=>w.setActive),f=Le(w=>w.loadRevision),h=Z.useRef(null),[m,g]=Z.useState(0),b=Z.useMemo(()=>Math.max(2,String(Math.max(1,String(e||"").split(` +`).length)).length)*8+10,[e]),y=Z.useMemo(()=>{const w=Math.max(1,String(e||"").split(` +`).length);return Array.from({length:w},(T,A)=>A+1)},[e]),E=async w=>{try{const T=await new Promise((P,I)=>{const F=new FileReader;F.onload=()=>P(String(F.result||"")),F.onerror=()=>I(new Error("read failed")),F.readAsDataURL(w)}),A=pn().saveImageToWorkspace?.("",T,Le.getState().currentRel);if(!A||!A.ok||!A.rel){Le.getState().setMessage(A?.message||"图片保存失败",2400);return}S.tf.insertNodes({type:"img",url:A.rel,caption:[{text:w.name.replace(/\.[^.]+$/,"")}],children:[{text:""}]})}catch{Le.getState().setMessage("图片插入失败",2400)}},C=Z.useRef(!1),x=Z.useMemo(()=>[vF.configure({render:{node:Cbe}}),Xse.configure({render:{node:kbe}}),Qse.configure({render:{node:Dbe}}),Zse.configure({render:{node:Sbe}}),eae.configure({render:{node:_be}}),tae.configure({render:{node:Abe}}),nae.configure({render:{node:Tbe}}),UF.configure({render:{node:Nbe}}),HF.configure({render:{node:Obe}}),cae,fae,sI.configure({render:{node:Lbe}}),nI.configure({render:{node:zbe}}),rI.configure({render:{node:hN}}),iI.configure({render:{node:hN}}),boe.configure({options:{lowlight:pN,defaultLanguage:"text"},render:{node:Pbe}}),hI.configure({render:{node:Rbe}}),dI.configure({options:{lowlight:pN},render:{leaf:Mbe}}),xue,ffe.configure({render:{node:qbe}}),dfe.configure({render:{node:$be}}),vu.configure({render:{node:Ube}}),lde.configure({render:{node:jbe}}),Kbe,al.configure({options:{remarkPlugins:[oxe,yxe],remarkStringifyOptions:Hbe,rules:{img:{serialize:(w=>{const T=String(w.url||""),P=(Array.isArray(w.caption)?w.caption:[]).map(W=>String(W&&W.text||"")).join(""),I=Number(w.width),F=typeof w.widthPct=="string"?w.widthPct:"";let M="";return Number.isFinite(I)&&I>0?M=' width="'+Math.round(I)+'"':F&&(M=' width="'+hw(F)+'"'),M?{type:"html",value:''+hw(P)+'"}:{type:"paragraph",children:[{type:"image",url:T,alt:P||void 0,title:typeof w.title=="string"?w.title:void 0}]}})}}}})],[]),S=Ose({plugins:x}),O=Z.useRef(S);O.current=S,Z.useEffect(()=>{const w=T=>{if(r)return;const A=O.current;if(!A?.api||!A?.tf)return;const P=T.target;if(P&&!P.closest(".plate-content")||T.isComposing)return;if(T.key==="ArrowDown"&&!T.shiftKey&&!T.ctrlKey&&!T.metaKey)try{const ee=A.api.block(),U=ee?.[0];if(U&&U.type==="code_line"){const fe=ee[1],ue=A.api.parent(fe);if(ue){const[ne,me]=ue,j=Array.isArray(ne.children)?ne.children:[],Q=fe[fe.length-1]===j.length-1,re=(U.children||[]).map(ze=>String(ze.text||"")).join(""),K=A.selection,Be=!!K?.focus&&K.focus.offset>=re.length;if(Q&&Be){T.preventDefault(),T.stopPropagation();const ze=me.slice();ze[ze.length-1]=ze[ze.length-1]+1,A.api.node(ze)||A.tf.insertNodes({type:te.p,children:[{text:""}]},{at:ze}),A.tf.select({path:[...ze,0],offset:0});return}}}}catch(ee){console.error("[code-escape]",ee)}if(T.altKey||!(T.ctrlKey||T.metaKey))return;const M=Le.getState().editorApi;if(!M)return;const W=T.key.toLowerCase();if(T.shiftKey){W==="k"?(T.preventDefault(),M.insertNode("codeblock")):W==="q"?(T.preventDefault(),M.toggleBlock("blockquote")):W==="o"?(T.preventDefault(),M.toggleBlock("task-list")):T.code==="BracketLeft"||W==="{"?(T.preventDefault(),M.toggleBlock("numbered-list")):(T.code==="BracketRight"||W==="}")&&(T.preventDefault(),M.toggleBlock("bulleted-list"));return}W==="t"?(T.preventDefault(),M.insertNode("table")):W==="0"?(T.preventDefault(),M.toggleBlock("paragraph")):/^[1-6]$/.test(W)&&(T.preventDefault(),M.toggleBlock("heading",Number(W)))};return window.addEventListener("keydown",w,!0),()=>window.removeEventListener("keydown",w,!0)},[r]),Z.useEffect(()=>{if(!String(a||"").trim()||!t)return;const w=window.setTimeout(()=>{const T=document.querySelector(".search-hit-mark");if(T instanceof HTMLElement)try{T.scrollIntoView({block:"center",inline:"nearest"})}catch{}},380);return()=>window.clearTimeout(w)},[t,a]),Wbe(a),Z.useEffect(()=>{try{S.api.redecorate?.()}catch{}},[a,S]),Z.useEffect(()=>{if(t)try{const w=e||"",T=dN(S.getApi(al).markdown.deserialize(fN(w)));let A=T;try{A=iN(T)}catch{}try{Cve(A,wve(w))}catch{}const P=A;C.current=!0,S.tf.setValue(P&&P.length?P:Gbe),window.setTimeout(()=>{C.current=!1},0)}catch(w){console.error("[cmark] deserialize 失败",w),C.current=!1}},[t,s,f]);const _=Z.useMemo(()=>({"--cmark-body-font-size":i+"px"}),[i]);return Z.useEffect(()=>{const w={bold:te.bold,italic:te.italic,underline:te.underline,code:te.code,strike:te.strikethrough,highlight:te.highlight};return o({toggleMark(T){const A=w[T];if(A)try{const P=!!S.api.mark(A);if(A==="highlight"&&!P){S.tf.setNodes({[A]:!0},{match:M=>Sn.isText(M),split:!0}),S.tf.collapse({edge:"focus"});const I=S.selection;if(I){const M=[...I.focus.path];M[M.length-1]+=1;try{const W=M.slice(0,M.length-1),ee=S.api.node(W)?.[0],U=M[M.length-1];ee&&Array.isArray(ee.children)&&UP.type===te.codeBlock);A>=0&&S.tf.select({path:[A,0,0],offset:0})}else T==="table"?S.tf.insertNodes([{type:te.table,children:[{type:te.tr,children:[{type:te.th,children:[{type:te.p,children:[{text:"列一"}]}]},{type:te.th,children:[{type:te.p,children:[{text:"列二"}]}]}]},{type:te.tr,children:[{type:te.td,children:[{type:te.p,children:[{text:""}]}]},{type:te.td,children:[{type:te.p,children:[{text:""}]}]}]}]},{type:te.p,children:[{text:""}]}]):T==="hr"?S.tf.insertNodes({type:te.hr,children:[{text:""}]}):T==="math"&&uC({tex:"",title:"插入公式",onApply:A=>{try{S.tf.insertNodes({type:te.equation,texExpression:A,children:[{text:""}]})}catch(P){console.error("[insert-equation]",P)}}})}catch{}},insertText(T){try{S.tf.insertText(T)}catch{}},insertImage(T,A){try{S.tf.insertNodes({type:"img",url:T,caption:[{text:A||""}],children:[{text:""}]})}catch{}},insertMarkdown(T){try{const A=dN(S.getApi(al).markdown.deserialize(fN(T)));S.tf.insertNodes(A)}catch{}},focus(){try{S.tf.focus()}catch{}}}),()=>o(null)},[S,o,s]),Z.useEffect(()=>{if(!s)return l(S),()=>l(null)},[S,l,s]),Z.useEffect(()=>{s&&o(null)},[s,o]),s?$.jsxs("div",{className:"plate-host is-source"+(r?" is-locked":""),style:_,children:[$.jsx("div",{className:"source-gutter",style:{width:b},"aria-hidden":"true",children:$.jsx("div",{className:"source-gutter-inner",style:{transform:`translateY(-${m}px)`},children:y.map(w=>$.jsx("div",{className:"source-ln",children:w},w))})}),$.jsx("textarea",{ref:h,className:"source-editor",value:e,spellCheck:!1,readOnly:r,onChange:w=>n(w.target.value),onScroll:()=>g(h.current?.scrollTop||0)})]}):$.jsxs("div",{className:"plate-host"+(r?" is-locked":""),style:_,children:[$.jsx(Oxe,{}),$.jsx(Sse,{editor:S,onValueChange:({value:w})=>{if(!C.current){try{try{let T=Pj(w);try{T=iN(T)}catch{}const A=_xe(Sxe(T)),P=S.getApi(al).markdown.serialize({value:A});let I=Axe(P);try{I=kve(I,Eve(w))}catch{}try{I=Tve(I)}catch{}n(I)}catch(T){console.error("[serialize]",T),Le.getState().setMessage("保存失败:"+(T?.message||"序列化出错"),5e3)}}catch{}try{const T=S.api.marks(),A=S.api.block(),P=String(A?.type||"p");let I={type:"paragraph"};/^h[1-6]$/.test(P)?I={type:"heading",level:Number(P[1])}:P==="blockquote"?I={type:"blockquote"}:P==="code_block"?I={type:"codeblock"}:P==="equation"?I={type:"math"}:P==="p"&&(A?.checked!==void 0?I={type:"list-item",checked:!!A.checked}:A?.listStyleType==="disc"?I={type:"bulleted-list"}:A?.listStyleType==="decimal"&&(I={type:"numbered-list"})),u({bold:!!T?.bold,italic:!!T?.italic,underline:!!T?.underline,code:!!T?.code,strike:!!T?.strikethrough,highlight:!!T?.highlight,link:!!(T?.link||T?.url)},I)}catch{}}},children:$.jsx(AF,{className:"plate-content",readOnly:r,spellCheck:!1,onPaste:w=>{const T=w.clipboardData;if(!T)return;let A=null;if(T.files&&T.files.length){for(const P of Array.from(T.files))if(P.type.startsWith("image/")){A=P;break}}if(!A&&T.items){for(const P of Array.from(T.items))if(P.kind==="file"&&P.type.startsWith("image/")){const I=P.getAsFile();if(I){A=I;break}}}A&&(w.preventDefault(),w.stopPropagation(),E(A))}})})]})}function Pj(e){const t=[];for(const n of Array.isArray(e)?e:[])n&&n.synthetic||(Array.isArray(n?.children)?t.push({...n,children:Pj(n.children)}):t.push(n));return t}const Ar={size:15,strokeWidth:1.8,absoluteStrokeWidth:!1};function Jbe(){const e=Le(y=>y.editorApi),t=Le(y=>y.sourceMode),n=Le(y=>y.setMessage),r=Le(y=>y.activeMarks),i=Le(y=>y.activeBlock),s=Le(y=>y.toolbarHidden),a=Le(y=>y.setAiOpen),[o,l]=Z.useState(!1),u=y=>()=>e?.toggleMark(y),f=y=>()=>e?.toggleBlock(y),h=y=>()=>e?.toggleBlock("heading",y),m=y=>()=>e?.insertNode(y),g=[[{key:"ai",title:"AI 生成",node:$.jsx(fbe,{...Ar}),run:()=>a(!0)},{key:"codeblock",title:"插入代码块 Ctrl+Shift+K",node:$.jsx(dbe,{...Ar}),run:m("codeblock")},{key:"table",title:"插入表格 Ctrl+T",node:$.jsx(mbe,{...Ar}),run:m("table")},{key:"image",title:"插入图片文件",node:$.jsx(ebe,{...Ar}),run:()=>{const y=pn().pickImageFile?.();if(!y||!y.ok||!y.path){if(y&&y.canceled)return;n(y?.message||"无法打开文件选择器",2400);return}const E=pn().saveImageToWorkspace?.(y.path,void 0,Le.getState().currentRel);if(!E||!E.ok||!E.rel){n(E?.message||"图片插入失败",2400);return}const C=String(y.path).split(/[\\/]/).pop()||"";e?.insertImage(E.rel,C.replace(/\.[^.]+$/,""))}}],[{key:"ol",title:"有序列表 Ctrl+Shift+[",node:$.jsx(rbe,{...Ar}),run:f("numbered-list")},{key:"ul",title:"无序列表 Ctrl+Shift+]",node:$.jsx(sbe,{...Ar}),run:f("bulleted-list")},{key:"task",title:"任务列表 Ctrl+Shift+O",node:$.jsx(ibe,{...Ar}),run:f("task-list")},{key:"quote",title:"引用 Ctrl+Shift+Q",node:$.jsx(obe,{...Ar}),run:f("blockquote")}],[{key:"h1",title:"一级标题 Ctrl+1",node:$.jsx(Jxe,{...Ar}),run:h(1)},{key:"h2",title:"二级标题 Ctrl+2",node:$.jsx(Xxe,{...Ar}),run:h(2)},{key:"h3",title:"三级标题 Ctrl+3",node:$.jsx(Qxe,{...Ar}),run:h(3)},{key:"hr",title:"分割线",node:$.jsx(abe,{...Ar}),run:m("hr")},{key:"link",title:"超链接 Ctrl+K",node:$.jsx(nbe,{...Ar}),run:()=>l(!0)},{key:"mathBlock",title:"公式块",node:$.jsx(cbe,{...Ar}),run:m("math")},{key:"mathInline",title:"内联公式",node:$.jsx(hbe,{...Ar}),run:()=>e?.insertText("$$")}],[{key:"bold",title:"加粗 Ctrl+B",node:$.jsx(Wxe,{...Ar}),run:u("bold")},{key:"italic",title:"斜体 Ctrl+I",node:$.jsx(tbe,{...Ar}),run:u("italic")},{key:"underline",title:"下划线 Ctrl+U",node:$.jsx(bbe,{...Ar}),run:u("underline")},{key:"code",title:"内联代码",node:$.jsx(Gxe,{...Ar}),run:u("code")},{key:"strike",title:"删除线",node:$.jsx(pbe,{...Ar}),run:u("strike")},{key:"highlight",title:"高亮",node:$.jsx(Zxe,{...Ar}),run:u("highlight")}]],b=y=>{switch(y){case"bold":case"italic":case"underline":case"code":case"strike":case"highlight":case"link":return!!r[y];case"h1":return i.type==="heading"&&i.level===1;case"h2":return i.type==="heading"&&i.level===2;case"h3":return i.type==="heading"&&i.level===3;case"ol":return i.type==="numbered-list";case"ul":return i.type==="bulleted-list";case"task":return i.type==="list-item"&&i.checked!==void 0;case"quote":return i.type==="blockquote";case"codeblock":return i.type==="codeblock";case"mathBlock":return i.type==="math";default:return!1}};return s?null:$.jsxs($.Fragment,{children:[o&&$.jsx(IN,{title:"插入链接",defaultValue:"https://",placeholder:"https://",maxLength:2048,onSubmit:y=>{l(!1);const E=String(y||"").trim();E&&e?.setLink(E)},onCancel:()=>l(!1)}),$.jsx("div",{className:"editor-toolbar",title:t?"源码模式下为纯文本编辑,格式化按钮不可用":void 0,children:g.map((y,E)=>$.jsxs("div",{className:"tb-group",children:[E>0&&$.jsx("span",{className:"tb-sep"}),y.map(C=>$.jsx("button",{className:"tb-btn"+(b(C.key)?" is-on":""),title:C.title,disabled:!e||t,onMouseDown:x=>x.preventDefault(),onClick:C.run,children:C.node},C.key))]},E))})]})}function Kd(e){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kd(e)}function Xbe(e,t){if(Kd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qbe(e){var t=Xbe(e,"string");return Kd(t)=="symbol"?t:t+""}function Rj(e,t,n){return(t=Qbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fj=globalThis.Node,Zbe=globalThis.Text;const Ij=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,e2e=e=>hm(e)&&e.nodeType===8,na=e=>hm(e)&&e.nodeType===1,hm=e=>{const t=Ij(e);return!!t&&e instanceof t.Node},mN=e=>{const t=e&&e.anchorNode&&Ij(e.anchorNode);return!!t&&e instanceof t.Selection},t2e=e=>{let[t,n]=e;if(na(t)&&t.childNodes.length){let r=n===t.childNodes.length,i=r?n-1:n;for([t,i]=Mj(t,i,r?"backward":"forward"),r=i{let t=e&&e.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},Mj=(e,t,n)=>{if(typeof t!="number")throw new Error("Expected index to be a number");const{childNodes:r}=e;let i=r[t],s=t,a=!1,o=!1;for(;(e2e(i)||na(i)&&i.childNodes.length===0||na(i)&&i.getAttribute("contenteditable")==="false")&&!(a&&o);){if(s>=r.length){a=!0,s=t-1,n="backward";continue}if(s<0){o=!0,s=t+1,n="forward";continue}i=r[s],t=s,s+=n==="forward"?1:-1}return[i,t]},r2e=(e,t,n)=>{const[r]=Mj(e,t,n);return r},gN=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Lj=(e,t,n)=>{const{target:r}=t;if(na(r)&&r.matches('[contentEditable="false"]'))return!1;const{document:i}=Ut.getWindow(e);if(yd(i,r))return Ut.hasDOMNode(e,r,{editable:!0});const s=n.find(({addedNodes:a,removedNodes:o})=>{for(const l of a)if(l===r||yd(l,r))return!0;for(const l of o)if(l===r||yd(l,r))return!0});return!s||s===t?!1:Lj(e,s,n)},vN=(e,t)=>!!(e.compareDocumentPosition(t)&Fj.DOCUMENT_POSITION_PRECEDING),i2e=(e,t)=>!!(e.compareDocumentPosition(t)&Fj.DOCUMENT_POSITION_FOLLOWING),Gl=(e,t)=>{if(!e)return null;let n=e;for(;n;){if(n.matches&&n.matches(t))return n;if(n.parentElement)n=n.parentElement;else if(n.parentNode&&"host"in n.parentNode)n=n.parentNode.host;else return null}return null},yd=(e,t)=>{if(!e||!t)return!1;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;if(n.parentNode)"host"in n.parentNode?n=n.parentNode.host:n=n.parentNode;else return!1}return!1};var pw,mw;const yN=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),gw=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Yh=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),s2e=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((pw=navigator.userAgent.match(/Version\/(\d+)/))!==null&&pw!==void 0&&pw[1]&&parseInt((mw=navigator.userAgent.match(/Version\/(\d+)/))===null||mw===void 0?void 0:mw[1],10)<17);let a2e=0;class o2e{constructor(){Rj(this,"id",void 0),this.id=`${a2e++}`}}const l2e=new WeakMap,u2e=new WeakMap,xN=new WeakMap,bN=new WeakMap,wN=new WeakMap,EN=new WeakMap,CN=new WeakMap,kN=new WeakMap,Jh=new WeakMap,c2e=new WeakMap,f2e=new WeakMap,d2e=new WeakMap;function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bc(e){for(var t=1;td2e.get(e),androidScheduleFlush:e=>{var t;(t=f2e.get(e))===null||t===void 0||t()},blur:e=>{const t=Ut.toDOMNode(e,e),n=Ut.findDocumentOrShadowRoot(e);Jh.set(e,!1),n.activeElement===t&&t.blur()},deselect:e=>{const{selection:t}=e,n=Ut.findDocumentOrShadowRoot(e),r=gN(n);r&&r.rangeCount>0&&r.removeAllRanges(),t&&Ie.deselect(e)},findDocumentOrShadowRoot:e=>{const t=Ut.toDOMNode(e,e),n=t.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:t.ownerDocument},findEventRange:(e,t,n={})=>{const{suppressThrow:r=!1}=n;"nativeEvent"in t&&(t=t.nativeEvent);const{clientX:i,clientY:s,target:a}=t;if(i==null||s==null){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}let o;try{o=Ut.toSlateNode(e,t.target)}catch(y){if(r)return null;throw y}let l;try{l=Ut.findPath(e,o)}catch(y){if(r)return null;throw y}if(ie.isElement(o)&&L.isVoid(e,o)){const y=a.getBoundingClientRect(),E=e.isInline(o)?i-y.left{if(!y)return null;const E=f.createRange();return E.setStart(y.offsetNode,y.offset),E.setEnd(y.offsetNode,y.offset),E};if(m&&f.caretPositionFromPoint?u=g(f.caretPositionFromPoint(i,s,{shadowRoots:[m]})):f.caretRangeFromPoint?u=f.caretRangeFromPoint(i,s):u=g(f.caretPositionFromPoint(i,s)),!u){if(r)return null;throw new Error(`Cannot resolve a Slate range from a DOM event: ${t}`)}return Ut.toSlateRange(e,u,{exactMatch:!1,suppressThrow:r})},findKey:(e,t)=>{let n=EN.get(t);return n||(n=new o2e,EN.set(t,n)),n},findPath:(e,t)=>{const n=[];let r=t;for(;;){const s=u2e.get(r);if(s==null){if(r===e)return n;break}const a=l2e.get(r);if(a==null||s.children[a]!==r)break;n.unshift(a),r=s}const i=ie.findPath(e,t);if(i)return i;throw new Error(`Unable to find the path for Slate node: ${Zn.stringify(t)}`)},focus:(e,t={retries:5})=>{if(Jh.get(e)||!Ut.isMounted(e))return;if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Ut.focus(e,{retries:t.retries-1})},10);return}const n=Ut.toDOMNode(e,e),r=Ut.findDocumentOrShadowRoot(e);if(r.activeElement!==n){const i=e.selection&&r instanceof Document?Ut.toDOMRange(e,e.selection):null;if(e.selection||Ie.select(e,L.start(e,[])),Jh.set(e,!0),n.focus({preventScroll:!0}),i){const s=gN(r);s?.removeAllRanges(),s?.addRange(i)}}},getWindow:e=>{const t=xN.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:(e,t,n={})=>{const{editable:r=!1}=n;if(!Ut.isMounted(e))return!1;const i=Ut.toDOMNode(e,e);let s;try{s=na(t)?t:t.parentElement}catch(u){if(u instanceof Error&&!u.message.includes('Permission denied to access property "nodeType"'))throw u}if(!s||Gl(s,"[data-slate-editor]")!==i)return!1;const a=Gl(s,'[contenteditable="true" i], [contenteditable=""], [contenteditable="plaintext-only" i]'),o=a&&a!==i?Gl(a,'[contenteditable="false" i]'):null;if(o&&o!==i&&Gl(o,"[data-slate-editor]")===i){var l;const u=(l=Gl(s,'[data-slate-node="text"]'))!==null&&l!==void 0?l:a?.querySelector('[data-slate-node="text"]');if(!u||!(a!=null&&a.contains(u))||Gl(u,"[data-slate-editor]")!==i)return!1}return!r||s.isContentEditable?!0:typeof s.isContentEditable=="boolean"&&Gl(s,'[contenteditable="false"]')===i||!!s.getAttribute("data-slate-zero-width")},hasEditableTarget:(e,t)=>hm(t)&&Ut.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{if(typeof e.hasRange=="function")return e.hasRange(t);const{anchor:n,focus:r}=t;return L.hasPath(e,n.path)&&L.hasPath(e,r.path)},hasSelectableTarget:(e,t)=>Ut.hasEditableTarget(e,t)||Ut.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>hm(t)&&Ut.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!c2e.get(e),getWord:(e,t={})=>{var n,r;if(typeof L.word!="function")throw new Error("DOMEditor.getWord needs slate 0.136.0 or later");const i=Ut.isComposing(e)?h2e(e):void 0,s=(n=i?.view)!==null&&n!==void 0?n:e,a=L.word(s,bc(bc({},t),{},{at:(r=t.at)!==null&&r!==void 0?r:i?.point}));return a&&{range:a,text:L.string(s,a)}},isFocused:e=>!!Jh.get(e),isMounted:e=>!!bN.get(e),isReadOnly:e=>!!kN.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(kN.get(e)||!Ut.hasTarget(e,t))return!1;const n=Ut.toSlateNode(e,t);return ie.isElement(n)&&L.isVoid(e,n)},setFragmentData:(e,t,n)=>e.setFragmentData(t,n),toDOMNode:(e,t)=>{const n=Ut.resolveDOMNode(e,t);if(!n)throw new Error(`Cannot resolve a DOM node from Slate node: ${Zn.stringify(t)}`);return n},resolveDOMPoint:(e,t)=>{var n;if(!ie.has(e,t.path))return null;const r=(n=CN.get(e))===null||n===void 0?void 0:n.get(Ut.findKey(e,ie.get(e,t.path)));return r?_N(e,r,t):null},resolveDOMRange:(e,t)=>{var n,r;const i=Ut.resolveDOMPoint(e,t.anchor);if(!i)return null;const s=Ce.isCollapsed(t)?i:Ut.resolveDOMPoint(e,t.focus),a=(n=xN.get(e))!==null&&n!==void 0?n:(r=i[0].ownerDocument)===null||r===void 0?void 0:r.defaultView;if(!s||!a)return null;try{return AN(a,i,s,Ce.isBackward(t))}catch{return null}},resolveEventRange:(e,t)=>Ut.findEventRange(e,t,{suppressThrow:!0}),resolveDOMNode:(e,t)=>{var n,r;return(n=t===e?bN.get(e):(r=CN.get(e))===null||r===void 0?void 0:r.get(Ut.findKey(e,t)))!==null&&n!==void 0?n:null},resolveSlateNode:(e,t)=>{var n;const r=SN(t);return(n=r&&wN.get(r))!==null&&n!==void 0?n:null},resolveSlatePoint:(e,t,n={})=>{try{var r;return Ut.toSlatePoint(e,t,{exactMatch:(r=n.exactMatch)!==null&&r!==void 0?r:!1,searchDirection:n.searchDirection,suppressThrow:!0})}catch{return null}},resolveSlateRange:(e,t,n={})=>{try{var r;return Ut.toSlateRange(e,t,{exactMatch:(r=n.exactMatch)!==null&&r!==void 0?r:!1,suppressThrow:!0})}catch{return null}},toDOMPoint:(e,t)=>{const[n]=L.node(e,t.path),r=Ut.toDOMNode(e,n),i=_N(e,r,t);if(!i)throw new Error(p2e(t));return i},toDOMRange:(e,t)=>{const{anchor:n,focus:r}=t,i=Ut.toDOMPoint(e,n),s=Ce.isCollapsed(t)?i:Ut.toDOMPoint(e,r);return AN(Ut.getWindow(e),i,s,Ce.isBackward(t))},toSlateNode:(e,t)=>{const n=SN(t),r=n?wN.get(n):null;if(!r)throw new Error(`Cannot resolve a Slate node from DOM node: ${n}`);return r},toSlatePoint:(e,t,n)=>{const{exactMatch:r,suppressThrow:i}=n,[s,a]=r?t:t2e(t),o=s.parentNode;let l=n.searchDirection,u=null,f=0;if(o){var h,m;const C=Ut.toDOMNode(e,e),x=o.closest('[data-slate-void="true"]'),S=x&&yd(C,x)?x:null,O=o.closest('[contenteditable="false"]'),_=O&&yd(C,O)?O:null;let w=o.closest("[data-slate-leaf]"),T=null;if(w){if(u=w.closest('[data-slate-node="text"]'),u){const P=Ut.getWindow(e).document.createRange();P.setStart(u,0),P.setEnd(s,o.hasAttribute("data-slate-trailing")&&s===o.lastChild&&s.textContent===` +`?0:a);const I=P.cloneContents();[...Array.prototype.slice.call(I.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(I.querySelectorAll("[contenteditable=false]"))].forEach(M=>{if(gw&&!r&&M.hasAttribute("data-slate-zero-width")&&M.textContent.length>0&&M.textContext!=="\uFEFF"){M.textContent.startsWith("\uFEFF")&&(M.textContent=M.textContent.slice(1));return}M.parentNode.removeChild(M)}),f=I.textContent.length,T=u}}else if(S){const A=S.querySelectorAll("[data-slate-leaf]");for(let P=0;P{f-=P.textContent.length})):f=1}else if(_){const A=I=>I?I.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=_.closest('[data-slate-node="element"]');if(l==="backward"||!l){var g;w=(g=[...A(P?.previousElementSibling),...A(P)].findLast(F=>vN(_,F)))!==null&&g!==void 0?g:null,w&&(l="backward")}if(l==="forward"||!l){var b;w=(b=[...A(P),...A(P?.nextElementSibling)].find(F=>i2e(_,F)))!==null&&b!==void 0?b:null,w&&(l="forward")}w&&(u=w.closest('[data-slate-node="text"]'),T=w,l==="forward"?f=0:(f=T.textContent.length,T.querySelectorAll("[data-slate-zero-width]").forEach(I=>{f-=I.textContent.length})))}T&&f===T.textContent.length&&gw&&T.getAttribute("data-slate-zero-width")==="z"&&(h=T.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(o.hasAttribute("data-slate-zero-width")||Yh&&(m=T.textContent)!==null&&m!==void 0&&m.endsWith(` + +`))&&f--}if(gw&&o&&!u&&!r){const C=o.hasAttribute("data-slate-node")?o:o.closest("[data-slate-node]");if(C&&Ut.hasDOMNode(e,C,{editable:!0})){const x=Ut.toSlateNode(e,C);let S;try{S=Ut.findPath(e,x)}catch(w){if(i)return null;throw w}let{path:O,offset:_}=L.start(e,S);return C.querySelector("[data-slate-leaf]")||(_=a),{path:O,offset:_}}}if(!u){if(i)return null;throw new Error(`Cannot resolve a Slate point from DOM point: ${t}`)}let y;try{y=Ut.toSlateNode(e,u)}catch(C){if(i)return null;throw C}let E;try{E=Ut.findPath(e,y)}catch(C){if(i)return null;throw C}return{path:E,offset:f}},toSlateRange:(e,t,n)=>{var r,i;const{exactMatch:s,suppressThrow:a}=n,o=mN(t)?t.anchorNode:t.startContainer;let l,u,f,h,m;if(o)if(mN(t)){if(Yh&&t.rangeCount>1){f=t.focusNode;const C=t.getRangeAt(0),x=t.getRangeAt(t.rangeCount-1);if(f instanceof HTMLTableRowElement&&C.startContainer instanceof HTMLTableRowElement&&x.startContainer instanceof HTMLTableRowElement){let S=function(A){return A.childElementCount>0?S(A.children[0]):A};const O=C.startContainer,_=x.startContainer,w=S(O.children[C.startOffset]),T=S(_.children[x.startOffset]);h=0,T.childNodes.length>0?l=T.childNodes[0]:l=T,w.childNodes.length>0?f=w.childNodes[0]:f=w,T instanceof HTMLElement?u=T.innerHTML.length:u=0}else C.startContainer===f?(l=x.endContainer,u=x.endOffset,h=C.startOffset):(l=C.startContainer,u=C.endOffset,h=x.startOffset)}else l=t.anchorNode,u=t.anchorOffset,f=t.focusNode,h=t.focusOffset;s2e&&n2e(l)||Yh?m=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:m=t.isCollapsed}else l=t.startContainer,u=t.startOffset,f=t.endContainer,h=t.endOffset,m=t.collapsed;if(l==null||f==null||u==null||h==null)throw new Error(`Cannot resolve a Slate range from DOM range: ${t}`);Yh&&!((r=f.parentElement)!==null&&r!==void 0&&r.hasAttribute("data-slate-trailing"))&&(i=f.textContent)!==null&&i!==void 0&&i.endsWith(` + +`)&&h===f.textContent.length&&h--;const g=Ut.toSlatePoint(e,[l,u],{exactMatch:s,suppressThrow:a});if(!g)return null;const b=vN(l,f)||l===f&&he.map((r,i)=>i!==t[0]?r:t.length===1?bc(bc({},r),{},{text:n}):bc(bc({},r),{},{children:zj(r.children,t.slice(1),n)})),h2e=e=>{var t;const n=Ut.getWindow(e).getSelection();if(!(n!=null&&n.focusNode))return;const r=Ut.toSlatePoint(e,[n.focusNode,n.focusOffset],{exactMatch:!1,suppressThrow:!0});if(!r)return;const s=((t=Ut.toDOMNode(e,ie.get(e,r.path)).textContent)!==null&&t!==void 0?t:"").replace(/\uFEFF/g,""),a=Yd();return a.isInline=e.isInline,a.isVoid=e.isVoid,a.children=zj(e.children,r.path,s),{view:a,point:r}},SN=e=>{var t;const n=na(e)?e:e.parentElement;return n!=null&&n.hasAttribute("data-slate-node")?n:(t=n?.closest("[data-slate-node]"))!==null&&t!==void 0?t:null},p2e=e=>`Cannot resolve a DOM point from Slate point: ${Zn.stringify(e)}`,_N=(e,t,n)=>{let r=null;L.void(e,{at:n})&&(n={path:n.path,offset:0});const s=Array.from(t.querySelectorAll("[data-slate-string], [data-slate-zero-width]"));let a=0;for(let l=0;l{const i=e.document.createRange(),[s,a]=r?n:t,[o,l]=r?t:n,f=!!(na(s)?s:s.parentElement).getAttribute("data-slate-zero-width"),m=!!(na(o)?o:o.parentElement).getAttribute("data-slate-zero-width");return i.setStart(s,f?1:a),i.setEnd(o,m?1:l),i},m2e={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},g2e={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},v2e={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},fr=e=>{const t=m2e[e],n=g2e[e],r=v2e[e],i=t&&As.isHotkey(t),s=n&&As.isHotkey(n),a=r&&As.isHotkey(r);return o=>!!(i&&i(o)||yN&&s&&s(o)||!yN&&a&&a(o))};fr("bold"),fr("compose"),fr("moveBackward"),fr("moveForward"),fr("deleteBackward"),fr("deleteForward"),fr("deleteLineBackward"),fr("deleteLineForward"),fr("deleteWordBackward"),fr("deleteWordForward"),fr("extendBackward"),fr("extendForward"),fr("extendLineBackward"),fr("extendLineForward"),fr("italic"),fr("moveLineBackward"),fr("moveLineForward"),fr("moveWordBackward"),fr("moveWordForward"),fr("redo"),fr("insertSoftBreak"),fr("splitBlock"),fr("transposeCharacter"),fr("undo");function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function y2e(e,t){if(Gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x2e(e){var t=y2e(e,"string");return Gd(t)=="symbol"?t:t+""}function Ep(e,t,n){return(t=x2e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b2e=Z.createContext(null),TN=Ut,w2e=e=>na(e)&&e.hasAttribute("data-slate-placeholder"),E2e=({addedNodes:e,removedNodes:t})=>{const n=[...Array.from(e),...Array.from(t)];return n.length>0&&n.every(w2e)},C2e=(e,t)=>{let n=[];const r=()=>{n=[]},i=a=>{if(!t.current)return;const o=a.filter(l=>!E2e(l)&&Lj(e,l,a));n.push(...o)};function s(){n.length>0&&(n.reverse().forEach(a=>{a.type!=="characterData"&&(a.removedNodes.forEach(o=>{a.target.insertBefore(o,a.nextSibling)}),a.addedNodes.forEach(o=>{a.target.removeChild(o)}))}),r())}return{registerMutations:i,restoreDOM:s,clear:r}},k2e={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class D2e extends Z.Component{constructor(...t){super(...t),Ep(this,"context",null),Ep(this,"manager",null),Ep(this,"mutationObserver",null)}observe(){var t;const{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(n.current,k2e)}componentDidMount(){const{receivedUserInput:t}=this.props,n=this.context;this.manager=C2e(n,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,n,r;const i=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(i!=null&&i.length){var s;(s=this.manager)===null||s===void 0||s.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}Ep(D2e,"contextType",b2e);parseInt(oe.version.split(".")[0],10);function S2e({open:e,onClose:t,editor:n}){const[r,i]=Z.useState(""),[s,a]=Z.useState("note"),[o,l]=Z.useState([]),[u,f]=Z.useState(0),[h,m]=Z.useState(0),g=Le(A=>A.openNote),b=Le(A=>A.setFindTerm),y=Le(A=>A.currentRel),E=Z.useRef(null),C=Z.useRef("");Z.useEffect(()=>{e&&(C.current=Le.getState().findTerm,i(""),l([]),f(0),m(0),window.setTimeout(()=>E.current?.focus(),30))},[e]);const x=Z.useCallback((A,P,I=!1)=>{if(!A||!y){m(0);return}const F=A.toLowerCase(),M=[];for(const[ee,U]of ie.nodes(n)){if(!("text"in ee)||typeof ee.text!="string")continue;const fe=ee.text.toLowerCase();let ue=0;for(;;){const ne=fe.indexOf(F,ue);if(ne<0)break;M.push({path:U,offset:ne}),ue=ne+F.length}}if(m(M.length),!M.length)return;const W=M[Math.max(0,Math.min(M.length-1,P))];try{const ee={anchor:{path:W.path,offset:W.offset},focus:{path:W.path,offset:W.offset+A.length}};Ie.select(n,ee),I&&TN.focus(n);const U=TN.toDOMRange(n,ee)}catch{}},[n,y]),S=Z.useCallback(A=>{if(f(0),!A.trim()){l([]),m(0);return}if(s==="note")x(A,0,!1);else{const I=pn()?.searchNotes?.(A,80);l(I?.ok&&Array.isArray(I.data)?I.data:[])}},[s,x]),O=Z.useCallback(A=>{if(s!=="note"||h===0)return;const P=(u+A+h)%h;f(P),x(r,P,!0)},[s,u,h,r,x]),_=Z.useCallback(()=>{b(C.current),t()},[t,b]),w=Z.useCallback(A=>{if(A.key==="Escape"){A.preventDefault(),b(""),t();return}if(A.key==="Enter"){A.preventDefault(),A.shiftKey?O(-1):O(1);return}A.key==="Tab"&&(A.preventDefault(),a(P=>P==="note"?"all":"note"))},[t,O]),T=A=>{const P=r.trim();if(!P)return A;const I=P.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return String(A||"").split(new RegExp("("+I+")","gi")).map((M,W)=>W%2===1?$.jsx("mark",{className:"search-hl",children:M},W):M)};return Z.useEffect(()=>{e&&r&&S(r)},[s]),e?$.jsx("div",{className:"search-mask",onClick:_,children:$.jsxs("div",{className:"search-box",onClick:A=>A.stopPropagation(),children:[$.jsxs("div",{className:"search-head",children:[$.jsx("input",{ref:E,className:"search-input",value:r,placeholder:s==="note"?"在当前笔记中查找":"在所有笔记中查找",onChange:A=>{const P=A.target.value;i(P),b(s==="note"?P:""),S(P)},onKeyDown:w}),$.jsx("span",{className:"search-count",children:s==="note"?h?`${u+1} / ${h}`:"无结果":o.length?`${o.length} 篇`:"无结果"}),$.jsx("button",{className:"search-scope"+(s==="note"?" on":""),type:"button",title:"仅当前笔记(Tab 切换)",onClick:()=>a("note"),children:"当前笔记"}),$.jsx("button",{className:"search-scope"+(s==="all"?" on":""),type:"button",title:"所有笔记(Tab 切换)",onClick:()=>{a("all"),b("")},children:"所有笔记"}),$.jsx("button",{className:"gp-close",type:"button",title:"关闭",onClick:_,style:{position:"static"},children:"×"})]}),s==="all"&&o.length?$.jsx("div",{className:"search-list",children:o.map(A=>$.jsxs("button",{type:"button",className:"search-hit",onClick:()=>{b(r),g(A.rel),t()},children:[$.jsx("span",{className:"search-name",children:T(A.name)}),$.jsx("span",{className:"search-badge",children:A.count}),$.jsx("span",{className:"search-snip",children:T(A.snippet)})]},A.rel))}):null,$.jsx("div",{className:"search-foot",children:s==="note"?"Enter 下一个 · Shift+Enter 上一个 · Tab 切换范围 · Esc 关闭":"点击结果打开笔记 · Tab 切换范围 · Esc 关闭"})]})}):null}function jj(){return F$()||(J4()?pn():void 0)}const _2e=[".void-gap",".code-head",".code-lang",".code-lang-list",".code-editor-copy",".table-caption",".table-float-toolbar",".img-handle",".img-tools",".math-edit-pop",".diagram-err",".search-hit-mark",".diagram-code-toggle",".math-toggle",".math-source",".math-inline-toggle",".table-code-panel"],A2e=["color","background-color","background-image","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-decoration-line","text-transform","white-space","word-break","overflow-wrap","vertical-align","list-style-type","list-style-position","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","border-collapse","border-spacing","display","box-sizing","max-width","min-width","max-height","min-height","width","height","opacity","zoom","position","top","left","right","bottom","z-index","float","overflow","overflow-x","overflow-y","justify-content","align-items","align-self","flex-direction","flex-wrap","flex-grow","flex-shrink","gap","row-gap","column-gap","table-layout","text-overflow"],T2e=new Set(["","none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent"]);function qj(e,t=!1){if(!(!t&&e.closest(".katex"))){try{const n=window.getComputedStyle(e);let r="";for(const i of A2e){const s=n.getPropertyValue(i);!s||T2e.has(s)||t&&(i==="display"||i==="width"||i==="height"||i==="max-width")||t&&(i==="white-space"||i==="overflow-wrap"||i==="word-break")||(r+=i+":"+s+";")}r?e.setAttribute("style",r):e.removeAttribute("style")}catch{}for(const n of Array.from(e.children))n instanceof HTMLElement&&qj(n)}}function N2e(e){const t=document.querySelector(".plate-content");if(!t)return{html:"",ok:!1,message:"编辑区未就绪,请先打开笔记"};const n=t.cloneNode(!0),r=Array.from(t.querySelectorAll("canvas"));if(r.length){const u=Array.from(n.querySelectorAll("canvas"));r.forEach((f,h)=>{const m=u[h];if(!m)return;let g="";try{g=f.toDataURL("image/png")}catch{return}if(!g||g==="data:,")return;const b=window.getComputedStyle(f),y=document.createElement("img");y.setAttribute("src",g),y.setAttribute("alt",f.getAttribute("aria-label")||"chart"),f.width&&y.setAttribute("width",String(f.width)),f.height&&y.setAttribute("height",String(f.height)),y.setAttribute("style","display:block;width:"+b.width+";height:"+b.height+";"),m.replaceWith(y)})}for(const u of _2e)n.querySelectorAll(u).forEach(f=>f.remove());n.querySelectorAll(".diagram-box").forEach(u=>{let f=u.previousElementSibling;for(;f;){const h=f.className||"";if(typeof h=="string"&&/code-block-wrap|code-editor/.test(h)){f.remove();break}f=f.previousElementSibling}});const i=[n,...Array.from(n.querySelectorAll("*"))].filter(u=>u instanceof HTMLElement);for(const u of i)for(const f of Array.from(u.attributes))/^(data-slate|contenteditable|spellcheck|autocapitalize|autocorrect|role|translate|zindex)/i.test(f.name)&&u.removeAttribute(f.name);const s=pn();n.querySelectorAll("img").forEach(u=>{const f=u.getAttribute("src")||"";if(!f||/^(https?:|data:)/i.test(f))return;const h=/^file:/i.test(f)?f:s?.resolveImageUrl?.(f,e),m=h?s?.readFileAsDataUri?.(h):null;m?u.setAttribute("src",m):h&&u.setAttribute("src",h)});const a=Array.from(n.querySelectorAll(".diagram-canvas svg, .diagram-box svg"));for(const u of a){const f=parseFloat(u.getAttribute("width")||""),h=parseFloat(u.getAttribute("height")||"");!f||!h||u.getAttribute("viewBox")||(u.setAttribute("viewBox","0 0 "+f+" "+h),u.removeAttribute("width"),u.removeAttribute("height"),u.setAttribute("style","display:block;width:100%;height:auto;max-width:100%;"))}const o=t.getBoundingClientRect(),l=document.createElement("div");l.setAttribute("style","position:fixed;left:-99999px;top:0;width:"+Math.max(200,Math.round(o.width))+"px;pointer-events:none;visibility:hidden;z-index:-1"),l.appendChild(n),document.body.appendChild(l);try{const u=[t],f=[n],h=(g,b)=>{for(const y of Array.from(g.children))y instanceof HTMLElement&&(b.push(y),h(y,b))};h(t,u),h(n,f);const m=Math.min(u.length,f.length);for(let g=0;g"+f+""+u.html:u.html,m=/class="katex/.test(h);if(e==="html"){const g=NN();if(g===null){i("已取消导出",1600);return}const b=a.writeHtmlFile?.(g,o,h,[],m,!0,l);if(!b){i("导出失败:宿主未实现 writeHtmlFile",3600);return}if(b.canceled){i("已取消导出",1600);return}if(!b.ok){i("导出失败:"+(b.message||"未知错误"),3600);return}i("已导出 HTML",2e3);return}await new Promise(g=>{const b=(E,C)=>{i(E,C),g()},y=a.exportFile;if(!y){b("导出失败:宿主未实现 exportFile",3600);return}y(e,h,"",(E,C)=>{if(E){b("导出失败:"+E.message,3600);return}if(!C){b("导出失败:渲染窗口没有返回文件",3600);return}try{a.dialogSaveExportFile?.(C,o,e==="image"?"png":"pdf")}catch(x){b("导出失败:"+(x?.message||""),3600);return}g()},void 0,l)})}catch(u){i("导出失败:"+(u?.message||""),3600)}finally{s?.(null)}}const B2e=[{size:12,label:"紧凑"},{size:13,label:"偏小"},{size:14,label:"默认"},{size:15,label:"偏大"},{size:16,label:"舒适"}];function P2e(){const[e,t]=Z.useState(!1),[n,r]=Z.useState(null),i=Z.useRef(null),s=Le(b=>b.currentRel),a=Le(b=>b.content),o=Le(b=>b.setMessage),l=Le(b=>b.sourceMode),u=Le(b=>b.toolbarHidden),f=Le(b=>b.toggleToolbar),h=Le(b=>b.bodyFontSize),m=Le(b=>b.setBodyFontSize);Z.useEffect(()=>{if(!e)return;const b=E=>{i.current&&!i.current.contains(E.target)&&t(!1)},y=E=>{E.key==="Escape"&&t(!1)};return window.addEventListener("mousedown",b),window.addEventListener("keydown",y),()=>{window.removeEventListener("mousedown",b),window.removeEventListener("keydown",y)}},[e]);const g=Z.useCallback(async b=>{s&&(t(!1),await O2e(b,{rel:s,content:a,setMessage:o,setBusy:r}))},[s,a,o]);return s?$.jsxs("div",{className:"more-wrap",ref:i,children:[$.jsx("button",{className:"iconbtn"+(e?" on":""),type:"button",title:"更多",onClick:()=>t(b=>!b),disabled:!!n,children:n?$.jsx("span",{className:"export-spin"}):$.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"currentColor",children:[$.jsx("circle",{cx:"8",cy:"3",r:"1.35"}),$.jsx("circle",{cx:"8",cy:"8",r:"1.35"}),$.jsx("circle",{cx:"8",cy:"13",r:"1.35"})]})}),e?$.jsxs("div",{className:"more-menu",children:[l?null:$.jsxs($.Fragment,{children:[$.jsx("button",{type:"button",className:"more-item",onClick:()=>{t(!1),f()},children:u?"显示编辑工具栏":"隐藏编辑工具栏"}),$.jsxs("div",{className:"more-fontsize",children:[$.jsx("span",{className:"more-flabel",children:"正文字号"}),$.jsx("div",{className:"more-seg",children:B2e.map(b=>$.jsx("button",{type:"button",className:"more-segbtn"+(h===b.size?" on":""),title:b.label+" "+b.size+"px",onClick:()=>m(b.size),children:b.label},b.size))})]})]}),$.jsx("div",{className:"more-divider"}),$.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("md"),children:"导出为 Markdown 文件"}),$.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("html"),children:"导出为 Html 文件"}),$.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("pdf"),children:"导出为 PDF 文件"}),$.jsx("button",{type:"button",className:"more-item",onClick:()=>void g("image"),children:"导出为图像文件"})]}):null]}):null}const $j=()=>id();function ON(){try{const t=window.__CMARK_GIT?.get?.();if(t===!0||t===!1)return t}catch{}try{return localStorage.getItem("cmark-git-enabled")!=="0"}catch{return!0}}function R2e(e){try{const t=pn()?.absOf?.(e);return t&&$j()?.relOf?.(t)||null}catch{return null}}function F2e({onOpen:e}){const t=Le(h=>h.currentRel),[n,r]=Z.useState(!1),[i,s]=Z.useState(!1),[a,o]=Z.useState(ON);Z.useEffect(()=>{const h=()=>o(ON());return window.addEventListener("cmark-git-changed",h),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("cmark-git-changed",h),document.removeEventListener("visibilitychange",h)}},[]);const l=Z.useCallback(async()=>{const h=$j();if(h){try{const m=await h.remoteInfo?.();r(!!(m?.ok&&m.data?.hasRemote))}catch{}try{const m=await h.state?.();if(m?.ok&&m.data){const g=m.data,b=t?R2e(t):null,y=b?(g.files||[]).some(E=>E.path===b):!1;s(!!g.ahead||y)}else s(!1)}catch{}}},[t]);if(Z.useEffect(()=>{l();const h=window.setInterval(()=>void l(),1e4);return()=>window.clearInterval(h)},[l]),!a||!t)return null;const u=n&&i,f=u?"有改动尚未推送到远程仓库,点击查看并同步":n?"当前笔记与远端一致,点击查看变更记录":"查看这篇笔记的变更记录";return $.jsx("button",{className:"iconbtn"+(u?" warn-on":""),type:"button",title:f,onClick:e,children:$.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"M4.6 11.4a2.9 2.9 0 0 1-.3-5.78 3.9 3.9 0 0 1 7.5-.4 2.7 2.7 0 0 1 .6 5.3"}),$.jsx("path",{d:"M8 13.6V7.9"}),$.jsx("path",{d:"M6.2 9.6 8 7.8l1.8 1.8"})]})})}function Vj(e){let t=0;for(const n of e)n.type==="note"&&t++,n.children?.length&&(t+=Vj(n.children));return t}function I2e(){const[e,t]=Z.useState(!1),[n,r]=Z.useState(0),[i,s]=Z.useState(""),[a,o]=Z.useState(0),[l,u]=Z.useState(!1),[f,h]=Z.useState(!1),m=Le(C=>C.refreshTree),g=Z.useCallback(async()=>{try{const C=await jn().ws.listTree();o(Vj(C.children||[]))}catch{}try{const C=await jn().vcs.detect();u(!!(C.ok&&C.value?.repoRoot))}catch{}},[]),b=Z.useCallback(async()=>{try{await jn().ws.writeOnboard({done:!0,at:Date.now()})}catch{}},[]);Z.useEffect(()=>{(async()=>{const C=jn().ws;try{if((await C.readOnboard())?.done)return}catch{}const x=C.root();if(x)try{if(await C.isReady()){await b();return}}catch{}t(!0),s(x||""),await g()})()},[]);const y=Z.useCallback(async()=>{const C=await jn().ws.pick();!C.ok||!C.value||!(await jn().ws.adopt(C.value)).ok||(s(C.value),await g())},[g]),E=Z.useCallback(async()=>{await b(),t(!1),m(),Le.getState().buildIndex()},[b,m]);return e?$.jsx("div",{className:"onboard-mask",children:$.jsxs("div",{className:"onboard",children:[$.jsxs("div",{className:"ob-head",children:[$.jsx("span",{className:"ob-title",children:"开始使用 CMark"}),$.jsxs("span",{className:"ob-step",children:[n+1," / 3"]})]}),$.jsx("div",{className:"ob-body",children:n===0?$.jsxs($.Fragment,{children:[$.jsx("p",{className:"ob-lead",children:"笔记以纯 Markdown 文件保存在你这个目录里,随时可以用其它编辑器打开。"}),$.jsxs("div",{className:"ob-ws",children:[$.jsx("span",{className:"ob-ws-icon",children:$.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:$.jsx("path",{d:"M1.8 4.2h4.4l1.2 1.6h6.8v6.4H1.8z"})})}),$.jsx("span",{className:"ob-ws-path",title:i,children:i||"尚未选择"}),$.jsx("button",{type:"button",className:"gp-b",onClick:()=>void y(),children:i?"更换":"选择目录"})]}),$.jsx("p",{className:"ob-hint",children:"默认会用文档目录下的 CMark 文件夹。"})]}):n===1?$.jsxs($.Fragment,{children:[$.jsx("p",{className:"ob-lead",children:a>0?`这里已经有 ${a} 篇 Markdown 笔记,会直接读进来。`:"这个目录还是空的,可以从头开始。"}),$.jsxs("ul",{className:"ob-list",children:[$.jsxs("li",{children:[$.jsx("b",{children:a})," 篇笔记"]}),$.jsxs("li",{children:["版本控制 ",$.jsx("b",{children:l?"已启用":"未启用"})]})]}),l?null:$.jsx("p",{className:"ob-hint",children:"启用后每次改动都会留有历史,可以回溯任意版本;不启用也能正常写笔记,之后在设置里随时可以开。"})]}):$.jsxs($.Fragment,{children:[$.jsx("p",{className:"ob-lead",children:"准备就绪。"}),$.jsxs("ul",{className:"ob-list",children:[$.jsx("li",{children:"左侧目录树右键可以新建笔记与文件夹"}),$.jsx("li",{children:"Ctrl+F 搜索,Ctrl+B 加粗,Ctrl+1/2/3 标题"}),$.jsx("li",{children:"顶部工具栏可以插入表格、代码块、图片"})]})]})}),$.jsxs("div",{className:"ob-acts",children:[n>0?$.jsx("button",{type:"button",className:"gp-b",onClick:()=>r(C=>C-1),children:"上一步"}):null,$.jsx("span",{style:{flex:1}}),$.jsx("button",{type:"button",className:"gp-b",onClick:()=>void E(),children:"跳过"}),n===1&&!l?$.jsx("button",{type:"button",className:"gp-b",disabled:f||!i,onClick:async()=>{h(!0);try{(await jn().vcs.init()).ok&&u(!0)}finally{h(!1)}},children:"启用版本控制"}):null,$.jsx("button",{type:"button",className:"gp-b primary",disabled:n===0&&!i,onClick:()=>n<2?r(C=>C+1):void E(),children:n<2?"下一步":"开始使用"})]})]})}):null}function M2e(e){return(Array.isArray(e)?e:[]).map(n=>{const r=n,i=String(r.value??r.id??r.modelId??""),s=String(r.label??r.name??i);return{value:i,label:s}}).filter(n=>n.value!=="")}const Xh=()=>su(),BN={mermaid:` + ## 定位 + - 智能助手名称 : Mermaid 图表生成助手 + - 主要功能 :根据用户输入的内容生成 Mermaid 图表代码 + - Mermaid 版本 : 11.12.0 + + ## 要求 + - 生成的代码要符合 Mermaid 语法,准确表达用户需求 + - 根据用户输入的内容绘制最合适的图表类型 + - 确保生成的 Mermaid 代码可以正确渲染 + - 输出不要包含任何解释或其他内容 + + ## 输出格式: + \`\`\`mermaid + Mermaid 图表代码 + \`\`\` + `,echarts:` + ## 定位 + - 智能助手名称 :ECharts 统计图表生成助手 + - 主要功能 :根据用户输入的内容生成 JSON 格式的 ECharts 配置代码 + - ECharts 版本 : 6.0.0 + + ## 要求 + - 只支持 ECharts 基础图表类型:柱状图(bar)、折线图(line)、饼图(pie)、散点图(scatter) + - 根据用户输入的内容选择最合适的图表类型 + - 默认图表高度是 300, 可根据图表内容设置合适的图表高度:返回的 JSON 增加 "height" 字段,例如 { "height": 300, ... } + - 不理解内容或数据格式错误时,返回一个空的 ECharts 配置代码 + - 输出不要包含任何解释或其他内容 + + ## 输出格式: + \`\`\`echarts + JSON 格式的 ECharts 配置代码 + \`\`\` + `,table:` + ## 定位 + - 智能助手名称 : Markdown 表格生成助手 + - 主要功能 :根据用户输入的内容生成 Markdown 表格 + + ## 要求 + - 确保生成的 Markdown 表格可以正确渲染 + + ## 输出 + - 只能返回一个 Markdown 表格 + - 不要包含任何解释或其他内容 + - 不理解用户内容或用户内容无法转为表格时,输出 "fail" + `},L2e=[{key:"mermaid",label:"生成 Mermaid 流程图表",d:"M14 9v2h-3V9H8.5V7H11V1H4v6h2.5v2H4v6h2.5v2H4v6h7v-6H8.5v-2H11v-2h3v2h7V9z"},{key:"echarts",label:"生成 ECharts 统计图表",d:"M4 9h4v11H4zm12 4h4v7h-4zm-6-9h4v16h-4z"},{key:"table",label:"生成表格",d:"M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z"}];function z2e(e){try{const n=io()?.toNodes?.(e);return Array.isArray(n)?n:[]}catch{return[]}}function j2e({open:e,onClose:t}){const[n,r]=Z.useState([]),[i,s]=Z.useState(""),[a,o]=Z.useState(!1),[l,u]=Z.useState(""),[f,h]=Z.useState(!1),[m,g]=Z.useState(null),[b,y]=Z.useState(""),E=Le(S=>S.editorApi),C=Le(S=>S.setMessage);Z.useEffect(()=>{e&&(y(""),(async()=>{const S=Xh(),O=typeof S?.ai=="function"||typeof S?.aiChat=="function";o(O);let _=[];try{_=M2e(await Promise.resolve(S?.allAiModels?.()).catch(()=>[]))}catch{_=[]}if(!_.length&&O&&(_=[{value:"",label:"默认模型"}]),r(_),!O){y("当前宿主没有可用的 AI 能力。uTools 需要先在开发者中心为插件开通 AI,ZTools 需要在设置里配置模型。");return}let w="";try{w=window.localStorage.getItem("cmark-ai-model")||""}catch{w=""}const T=_.find(A=>A.value===w)||_[0];s(T?T.value:"")})())},[e]);const x=Z.useCallback(async S=>{if(!l.trim()){y("请输入内容");return}const O=Xh();if(typeof O?.ai!="function"&&typeof O?.aiChat!="function"){y("当前宿主没有提供 AI 接口。uTools 需要在开发者中心为插件开通 AI 能力,ZTools 需要在设置里配置模型。");return}try{window.localStorage.setItem("cmark-ai-model",i)}catch{}h(!0),y(""),g(S);try{let _="";if(O.ai){const w=await O.ai({...i?{model:i}:{},messages:[{role:"system",content:BN[S]},{role:"user",content:l}]});_=String(w?.content||"")}else{const w=await O.aiChat({...i?{model:i}:{},messages:[{role:"system",content:BN[S]},{role:"user",content:l}],temperature:.2});_=String(w?.content||"")}if(_=_.trim(),!_){y("模型没有返回内容");return}if(S==="table"){const w=z2e(_);if(!(w.length===1&&w[0].type==="table")){y("未能正确生成表格");return}E?.insertMarkdown(_)}else{const w=_.replace(/^```(?:echarts|mermaid|json)/i,"").replace(/```$/,"").trim();E?.insertMarkdown("```"+S+` +`+w+"\n```")}t(),C("已插入正文",1600)}catch(_){y("生成失败:"+(_?.message||""))}finally{h(!1),g(null)}},[l,i,E,t,C]);return e?$.jsx("div",{className:"ai-mask",onClick:t,children:$.jsxs("div",{className:"ai-panel",onClick:S=>S.stopPropagation(),children:[$.jsxs("div",{className:"ai-head",children:[$.jsx("span",{className:"ai-spark","aria-hidden":"true",children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"currentColor",children:[$.jsx("path",{d:"M12 2.2l2.36 5.44L20 10l-5.64 2.36L12 17.8l-2.36-5.44L4 10l5.64-2.36L12 2.2z"}),$.jsx("path",{d:"M18.6 15.2l1.1 2.5 2.6 1.1-2.6 1.1-1.1 2.5-1.1-2.5-2.6-1.1 2.6-1.1 1.1-2.5z",opacity:".55"})]})}),$.jsx("span",{className:"ai-title",children:"AI 生成"}),$.jsx("button",{className:"ai-close",type:"button",title:"关闭 (Esc)",onClick:t,children:$.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:$.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})})})]}),$.jsxs("div",{className:"ai-modelrow",children:[$.jsx("span",{className:"ai-mlabel",children:"模型"}),$.jsxs("select",{className:"ai-model",value:i,onChange:S=>s(S.target.value),title:"选择模型",children:[n.length===0?$.jsx("option",{value:"",children:"(没有可用模型)"}):null,n.map(S=>$.jsx("option",{value:S.value,children:S.label},S.value))]}),typeof Xh()?.redirectAiModelsSetting=="function"?$.jsx("button",{type:"button",className:"ai-link",onClick:()=>Xh()?.redirectAiModelsSetting?.(),title:"在 ZTools 设置里管理模型",children:"模型设置"}):null]}),$.jsx("div",{className:"ai-body",children:$.jsx("textarea",{className:"ai-input",value:l,placeholder:"描述你要生成的内容,例如:把本周各渠道的成交量整理成柱状图",autoFocus:!0,onChange:S=>u(S.target.value)})}),f?$.jsx("div",{className:"ai-out",children:"正在生成,请稍候…"}):null,b?$.jsx("div",{className:"ai-err",children:b}):null,$.jsx("div",{className:"ai-dialog-btns",children:L2e.map(S=>$.jsxs("button",{type:"button",className:"ai-preset-btn",disabled:f||!i&&!a,title:S.label,onClick:()=>void x(S.key),children:[$.jsx("span",{className:"ai-preset-ico","aria-hidden":"true",children:$.jsx("svg",{viewBox:"0 0 24 24",width:"17",height:"17",fill:"currentColor",children:$.jsx("path",{d:S.d})})}),$.jsx("span",{className:"ai-preset-txt",children:m===S.key?"生成中…":S.label})]},S.key))})]})}):null}function q2e({open:e,onClose:t}){const n=Le(y=>y.bodyFontSize),r=Le(y=>y.setBodyFontSize),[i,s]=Z.useState(null),[a,o]=Z.useState("light"),[l,u]=Z.useState(!1),[f,h]=Z.useState("");if(Z.useEffect(()=>{if(!e)return;s(jn().ws.root());const y=document.documentElement.dataset.theme;o(y==="dark"?"dark":"light"),h("")},[e]),!e)return null;const m=async()=>{u(!0),h("");try{const y=await jn().ws.pick();if(!y.ok){h("选择失败:"+(y.message||""));return}if(!y.value)return;const E=await jn().ws.adopt(y.value);if(!E.ok){h("切换失败:"+(E.message||""));return}s(jn().ws.root()),Le.getState().refreshTree(),Le.getState().buildIndex(),h("已切换工作区")}finally{u(!1)}},g=y=>{o(y),document.documentElement.dataset.theme=y;try{window.localStorage.setItem("cmark-desktop-theme",y)}catch{}},b=()=>{u(!0),h(""),Le.getState().buildIndex().then(()=>h("全文索引已重建")).catch(()=>h("重建失败")).finally(()=>u(!1))};return $.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,.28)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:400},children:$.jsxs("div",{onClick:y=>y.stopPropagation(),style:{width:560,maxWidth:"92vw",maxHeight:"86vh",overflowY:"auto",background:"var(--bg-card, #fff)",color:"var(--fg, #1f2328)",border:"1px solid var(--bd-soft, #d8dee4)",borderRadius:10,boxShadow:"0 12px 40px rgba(0,0,0,.18)",padding:"18px 20px 16px",fontSize:13},children:[$.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:14},children:[$.jsx("div",{style:{fontWeight:600,fontSize:14},children:"设置"}),$.jsx("div",{style:{flex:1}}),$.jsx("button",{type:"button",onClick:t,style:{border:0,background:"transparent",cursor:"pointer",fontSize:16,color:"var(--fg-mute, #6e7781)"},title:"关闭",children:"×"})]}),$.jsxs("div",{style:{marginBottom:16},children:[$.jsx("div",{style:Gf,children:"笔记库"}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[$.jsx("div",{title:i||"",style:{flex:1,minWidth:0,padding:"6px 9px",border:"1px solid var(--bd-soft, #d8dee4)",borderRadius:6,background:"var(--bg-sunken, #f6f8fa)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"Consolas, monospace",fontSize:12},children:i||"(未绑定)"}),$.jsx("button",{type:"button",onClick:m,disabled:l,style:Zh,children:l?"处理中…":"更改文件夹"}),$.jsx("button",{type:"button",onClick:()=>void jn().shell.revealInFolder(""),style:Zh,children:"打开"})]})]}),$.jsxs("div",{style:{marginBottom:16},children:[$.jsx("div",{style:Gf,children:"正文字号"}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[$.jsx("input",{type:"range",min:12,max:20,step:1,value:n,onChange:y=>r(Number(y.target.value)),style:{flex:1}}),$.jsxs("span",{style:{width:44,textAlign:"right",fontFamily:"Consolas, monospace"},children:[n,"px"]})]})]}),$.jsxs("div",{style:{marginBottom:16},children:[$.jsx("div",{style:Gf,children:"外观"}),$.jsx("div",{style:{display:"flex",gap:8},children:["light","dark"].map(y=>$.jsx("button",{type:"button",onClick:()=>g(y),style:{...Zh,borderColor:a===y?"var(--accent, #0969da)":"var(--bd-soft, #d8dee4)",color:a===y?"var(--accent, #0969da)":void 0},children:y==="light"?"浅色":"深色"},y))})]}),$.jsxs("div",{style:{marginBottom:16},children:[$.jsx("div",{style:Gf,children:"全文索引"}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[$.jsx("button",{type:"button",onClick:b,disabled:l,style:Zh,children:"重建索引"}),$.jsx("span",{style:{fontSize:12,color:"var(--fg-mute, #6e7781)"},children:"搜索用的索引只在启动时建一次,笔记在外部改动过多时可以重建"})]})]}),$.jsxs("div",{style:{marginBottom:6},children:[$.jsx("div",{style:Gf,children:"常用快捷键"}),$.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"4px 14px",fontSize:12,lineHeight:1.9},children:[$.jsxs("span",{children:["搜索",$.jsx("kbd",{style:Qh,children:"Ctrl+F"})]}),$.jsxs("span",{children:["加粗",$.jsx("kbd",{style:Qh,children:"Ctrl+B"})]}),$.jsxs("span",{children:["标题 1/2/3",$.jsx("kbd",{style:Qh,children:"Ctrl+1/2/3"})]}),$.jsxs("span",{children:["保存",$.jsx("kbd",{style:Qh,children:"Ctrl+S"})]})]})]}),f?$.jsx("div",{style:{marginTop:10,color:"var(--fg-mute, #6e7781)",fontSize:12},children:f}):null,$.jsxs("div",{style:{marginTop:16,paddingTop:12,borderTop:"1px solid var(--bd-soft, #d8dee4)",fontSize:12,color:"var(--fg-mute, #6e7781)",lineHeight:1.7},children:["CMark 桌面版 1.3.0",$.jsx("br",{}),"笔记与配置和插件端共用同一份(~/.cmark-config.json + 本地 Markdown)"]})]})})}const Gf={color:"var(--fg-mute, #6e7781)",marginBottom:6},Qh={marginLeft:6,padding:"1px 5px",border:"1px solid var(--bd-soft, #d8dee4)",borderRadius:4,fontSize:11,fontFamily:"Consolas, monospace",color:"var(--fg-mute, #6e7781)"},Zh={padding:"5px 12px",border:"1px solid var(--bd-soft, #d8dee4)",borderRadius:6,background:"transparent",color:"inherit",cursor:"pointer",fontSize:12,flex:"0 0 auto"},PN="cmark.search.v1";function $2e(){const e=Le(U=>U.currentRel),t=Le(U=>U.content),n=Le(U=>U.savedContent),r=Le(U=>U.save),i=Le(U=>U.message),s=Le(U=>U.buildIndex),a=Le(U=>U.searchNotes),o=Le(U=>U.refreshTree);Z.useEffect(()=>{try{window.__CMARK_THEME?.apply?.()}catch{}},[]),Z.useEffect(()=>{const U=()=>{const fe=window.__zgsOpen;fe&&fe()};return window.addEventListener("cmark-open-settings",U),()=>window.removeEventListener("cmark-open-settings",U)},[]);const[l,u]=Z.useState(!1),f=Le(U=>U.conflict),h=Le(U=>U.forceSave),m=Le(U=>U.reloadFromDisk),g=Le(U=>U.sourceMode),b=Le(U=>U.toggleSourceMode),y=Le(U=>U.aiOpen),E=Le(U=>U.setAiOpen),C=Le(U=>U.bodyFontSize),x=Le(U=>U.locked),S=Le(U=>U.toggleLocked),O=Le(U=>U.near),_=Le(U=>U.toggleNear),w=Le(U=>U.editor),[T,A]=Z.useState(!1);Z.useEffect(()=>{if(!e||t===n)return;const U=window.setTimeout(()=>r(),600);return()=>window.clearTimeout(U)},[t,n,e,r]),Z.useEffect(()=>{const U=()=>{const fe=Le.getState();fe.currentRel&&fe.content!==fe.savedContent&&fe.save()};return window.addEventListener("beforeunload",U),()=>window.removeEventListener("beforeunload",U)},[]),Z.useEffect(()=>{J4()&&pn().onWorkspaceChange(()=>{window.setTimeout(()=>o(),250)})},[o]),Z.useEffect(()=>{const U=fe=>{if(fe.ctrlKey&&fe.altKey&&fe.key===","&&(fe.preventDefault(),A(ue=>!ue)),(fe.ctrlKey||fe.metaKey)&&fe.key.toLowerCase()==="f"){if(fe.preventDefault(),fe.shiftKey){u(!0);return}try{window.ztools?.subInputFocus?.()}catch{}}};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[]),Z.useEffect(()=>{let U=null;try{U=JSON.parse(sessionStorage.getItem(PN)||"null")}catch{U=null}if(!U||!U.term&&!U.rel)return;const fe=U.term||"",ue=U.rel||"",ne=Le.getState().searchTerm,me=Le.getState().currentRel;fe&&window.setTimeout(()=>{const j=Le.getState();j.searchTerm===ne&&(j.searchTerm||j.searchNotes(fe))},300),ue&&window.setTimeout(()=>{const j=Le.getState();j.searchTerm===ne&&j.currentRel===me&&j.currentRel!==ue&&j.openNote(ue)},800)},[]),Z.useEffect(()=>{const U=window,fe=U.__CMARK_LAST_ENTER;if(!fe)return;U.__CMARK_LAST_ENTER=void 0;const ue=String(fe.code||"");if(ue.startsWith("note/")){const ne=ue.slice(5);ne&&window.setTimeout(()=>{Le.getState().openNote(ne)},260)}},[]),Z.useEffect(()=>{console.log("[cmark] debug"),window.__CMARK_SEARCH__={search:U=>Le.getState().searchNotes(U),clear:()=>Le.getState().clearSearch(),next:()=>Le.getState().nextHit(),prev:()=>Le.getState().prevHit(),state:()=>{const U=Le.getState();return{searchTerm:U.searchTerm,findTerm:U.findTerm,hits:U.hitOrder.length,currentRel:U.currentRel,rows:document.querySelectorAll(".tree .label").length,marks:document.querySelectorAll(".search-hit-mark").length,bar:document.querySelector(".tree-hitbar")?.innerText||"",focus:String(document.activeElement?.className||"")}}}},[]),Z.useEffect(()=>{let U=0;const fe=()=>{U||(U=window.setTimeout(()=>{U=0;const ne=Le.getState();try{sessionStorage.setItem(PN,JSON.stringify({term:ne.searchTerm||"",rel:ne.currentRel||""}))}catch{}},200))};fe();const ue=Le.subscribe(fe);return()=>{ue(),U&&window.clearTimeout(U)}},[]),Z.useEffect(()=>{const U=fe=>{const ue=Le.getState(),ne=document.activeElement;if(fe.key==="Escape"&&ue.searchTerm&&!l){try{const me=window.ztools;window.__cmarkSyncing=!0,me?.setSubInputValue?.(""),window.setTimeout(()=>{window.__cmarkSyncing=!1},120)}catch{}if(ue.clearSearch(),ne&&ne.blur)try{ne.blur()}catch{}return}fe.key!=="ArrowDown"&&fe.key!=="ArrowUp"||fe.altKey||fe.ctrlKey||fe.metaKey||fe.shiftKey||ne&&(ne.tagName==="INPUT"||ne.tagName==="TEXTAREA"||ne.isContentEditable||ne.closest&&ne.closest(".plate-content"))||ue.tree.length&&(fe.preventDefault(),ue.stepNote(fe.key==="ArrowDown"?1:-1))};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[l]),Z.useEffect(()=>{const U=window.ztools;if(!U?.setSubInput)return;let fe=0,ue=0,ne=0;const me=new Set(["cmark","markdown","md","cm"]),j=Fe=>{if(window.__cmarkSyncing||Date.now()String(Ee.text||"").toLowerCase().includes(Oe)||String(Ee.rel||"").toLowerCase().includes(Oe))){ne=Date.now();const Ee=Le.getState().searchTerm;Ee&&(window.setTimeout(()=>$e(Ee),300),window.setTimeout(()=>$e(Ee),900));return}const se=Le.getState();if(!Oe&&se.searchTerm){ue&&window.clearTimeout(ue),ue=window.setTimeout(()=>{ue=0;const we=Le.getState();if(we.searchTerm){if(Date.now()-ne<3e3){const _e=we.searchTerm;$e(_e),window.setTimeout(()=>$e(_e),700);return}we.clearSearch()}},400);return}ue&&(window.clearTimeout(ue),ue=0),a(ge)};try{U.setSubInput(j,"搜索所有笔记"),window.setTimeout(()=>{try{U.subInputFocus?.()}catch{}},150)}catch{}const Q=()=>{const Fe=document.activeElement;if(Fe&&(Fe.tagName==="TEXTAREA"||Fe.tagName==="INPUT"||Fe.closest&&Fe.closest(".plate-content")))return;let Me=0;const ge=()=>{Me++;const Oe=document.activeElement;if(!(Oe&&(Oe.tagName==="TEXTAREA"||Oe.closest&&Oe.closest(".plate-content")))){try{U.subInputFocus?.()}catch{}Me<2&&window.setTimeout(ge,220)}};ge()},re=Fe=>{try{Le.getState().openNote(Fe)}catch{}window.setTimeout(()=>{try{Le.getState().currentRel!==Fe&&Le.getState().openNote(Fe)}catch{}},400)},K=Fe=>{const Me=String(Fe?.code||"");if(fe=Date.now()+150,Me.startsWith("note/")){const ge=Me.slice(5);if(ge){re(ge);try{Le.getState().clearSearch()}catch{}window.setTimeout(()=>$e(""),120);return}}Q(),window.setTimeout(je,260)},Be=Fe=>{const Me=Fe.detail;K(Me)};window.addEventListener("cmark-plugin-enter",Be);const ze=()=>window.removeEventListener("cmark-plugin-enter",Be),$e=Fe=>{try{const Me=window.ztools;if(!Me?.setSubInputValue)return;window.__cmarkSyncing=!0,Me.setSubInputValue(Fe),window.setTimeout(()=>{window.__cmarkSyncing=!1},80)}catch{}};function je(){const Fe=Le.getState().searchTerm||"";Fe&&window.setTimeout(()=>{try{$e(Fe)}catch{}},120)}return window.setTimeout(je,400),()=>{ze(),ue&&window.clearTimeout(ue);try{U.removeSubInput?.()}catch{}}},[a]),Z.useEffect(()=>{s()},[s]),Z.useEffect(()=>{const U=async()=>{try{const ue=await Le.getState().syncNearFeatures();if(typeof ue=="number"&&ue>0)return!0}catch{}return!1},fe=window.setTimeout(()=>{U().then(ue=>{ue||window.setTimeout(()=>void U(),3500)})},2500);return()=>window.clearTimeout(fe)},[]),Z.useEffect(()=>{document.documentElement.style.setProperty("--body-font-size",C+"px");try{window.localStorage.setItem("cmark-dev-body-font-size",String(C))}catch{}},[C]);const P=Z.useCallback(U=>{let fe="";try{const ue=window.__CMARK_BOOT_ERRORS;Array.isArray(ue)&&ue.length?fe=":"+String(ue[0]).split(` +`)[0].slice(0,120):fe="(控制台可查 window.__CMARK_BOOT_ERRORS)"}catch{}try{Le.getState().setMessage(U+" 没有加载成功"+fe,8e3)}catch{}},[]),I=Z.useCallback(U=>{const fe=window.__zgpToggle;if(typeof fe=="function"){fe(U);return}P("Git 面板")},[P]),[F,M]=Z.useState(!1),W=Z.useCallback(()=>{const U=window.__zgsToggle;if(typeof U=="function"){U();return}M(!0)},[]);Z.useEffect(()=>{window.__cmarkHost=()=>({currentRel:e,flushSave:()=>Le.getState().save(),reloadNote:U=>Le.getState().openNote(U),refreshTree:()=>Le.getState().refreshTree(),pickDir:()=>{pn().pickWorkspace?.()?.ok&&window.setTimeout(()=>window.location.reload(),400)}})},[e]);const ee=e?e.split("/").pop().replace(/\.(md|markdown)$/i,""):"";return $.jsxs("div",{className:"app"+(T?" sidebar-hidden":""),children:[T?null:$.jsx(W$,{onOpenGitPanel:()=>I("global"),onOpenSettings:W}),$.jsxs("main",{className:"main",children:[e?$.jsxs("div",{className:"header",children:[$.jsx("div",{className:"menu-toggle",children:$.jsx("button",{className:"iconbtn",title:"隐藏侧边栏 Ctrl+Alt+,",onClick:()=>A(U=>!U),children:$.jsx(V$,{})})}),$.jsx("div",{className:"title",children:e?$.jsx("input",{type:"text",readOnly:!0,value:ee,placeholder:"",spellCheck:!1,title:"文件名请在左侧目录树中右键重命名"}):$.jsx("span",{className:"title-empty",children:"未打开笔记"})}),$.jsxs("div",{className:"handle",style:e?void 0:{display:"none"},children:[$.jsx(F2e,{onOpen:()=>I("file")}),$.jsx("button",{className:"iconbtn"+(x?" on":""),title:x?"笔记当前只读,点击恢复编辑":"禁止编辑(设为只读)",onClick:S,children:x?$.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:[$.jsx("rect",{x:"3.2",y:"7",width:"9.6",height:"6.6",rx:"1.4"}),$.jsx("path",{d:"M5.6 7V5.2a2.4 2.4 0 0 1 4.8 0V7"})]}):$.jsxs("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",children:[$.jsx("rect",{x:"3.2",y:"7",width:"9.6",height:"6.6",rx:"1.4"}),$.jsx("path",{d:"M5.6 7V5.2a2.4 2.4 0 0 1 4.7-.6"})]})}),$.jsx("button",{className:"iconbtn"+(O?" on":""),title:O?"已是全局搜索指令,点击取消":"设为全局搜索",onClick:_,children:$.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:$.jsx("path",{d:"M9.6 1.9 8.3 3.2l.6.6-3.4 3.4H3.4l-.7.7 2.9 2.9-3.3 3.3a.5.5 0 0 0 .7.7l3.3-3.3 2.9 2.9.7-.7v-2.1l3.4-3.4.6.6 1.3-1.3z"})})}),$.jsx("button",{className:"iconbtn"+(g?" on":""),title:g?"源码模式(点击回到富文本)":"源码模式(直接编辑 Markdown)",onClick:b,children:$.jsxs("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("path",{d:"m18 16 4-4-4-4"}),$.jsx("path",{d:"m6 8-4 4 4 4"}),$.jsx("path",{d:"m14.5 4-5 16"})]})}),$.jsx(P2e,{})]})]}):null,f?$.jsxs("div",{className:"conflict-bar",children:[$.jsxs("svg",{className:"cf-ico",viewBox:"0 0 16 16",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("path",{d:"M8 2.1 1.5 13.5h13z"}),$.jsx("path",{d:"M8 6.2v3.1"}),$.jsx("path",{d:"M8 11.5v.1"})]}),$.jsxs("span",{className:"cf-text",children:[f,",自动保存已暂停"]}),$.jsxs("span",{className:"cf-actions",children:[$.jsx("button",{type:"button",className:"cf-btn",onClick:m,children:"载入磁盘版本"}),$.jsx("button",{type:"button",className:"cf-btn danger",onClick:h,children:"用当前内容覆盖磁盘"})]})]}):null,e?$.jsx(Jbe,{}):null,$.jsx("div",{className:"content",children:e?$.jsx("div",{className:"editor-card",children:$.jsx(Ybe,{})}):$.jsxs("div",{className:"note-empty",children:[$.jsxs("svg",{viewBox:"0 0 48 48",width:"44",height:"44",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[$.jsx("path",{d:"M11 7h18l8 8v26a2 2 0 0 1-2 2H11a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2z"}),$.jsx("path",{d:"M29 7v8h8"}),$.jsx("path",{d:"M16 24h16M16 31h11"})]}),$.jsx("div",{className:"note-empty-title",children:"还没有打开笔记"}),$.jsx("div",{className:"note-empty-desc",children:"从左侧目录树里选一篇,或者右键新建"})]})})]}),$.jsx(I2e,{}),$.jsx(j2e,{open:y,onClose:()=>E(!1)}),w?$.jsx(S2e,{open:l,onClose:()=>u(!1),editor:w}):null,$.jsx(q2e,{open:F,onClose:()=>M(!1)}),i&&$.jsx("div",{className:"toast",children:i})]})}const K4="cmark-mock-v1",Uj={"欢迎.md":["# 欢迎使用 CMark","","这是浏览器预览模式,数据存在 localStorage 里,不会碰磁盘。","","## 能试的操作","","- 左侧新建笔记 / 新建文件夹 / 右键重命名、删除",'- 编辑区改内容,600ms 后自动"保存"',"- 右侧实时预览:**粗体**、*斜体*、~~删除线~~、`行内代码`","","## 表格","","| 项目 | 状态 | 说明 |","| --- | --- | --- |","| 目录树 | 完成 | 递归、展开、右键 |","| 编辑器 | 完成 | CodeMirror 6 |","| 预览 | 完成 | marked + KaTeX |","","## 代码块","","```js","const note = {",' rel: "欢迎.md",'," readonly: false,","}","","console.log('saving', note.rel)","```","","## 公式","","行内公式 $E = mc^2$,块级公式:","","$$","\\int_{0}^{\\infty} e^{-x^2} \\, dx = \\frac{\\sqrt{\\pi}}{2}","$$","","> 引用块:段落之间恰好空一行,反复保存不会累积空白。",""].join(` +`),"技术/CodeMirror 6.md":["# CodeMirror 6","","V1.1.0 用它替代了原版的 Ace Editor。","","## 为什么换","","1. 体积小得多(488 KB vs 8.4 MB)","2. 扩展体系现代,markdown 语言包开箱可用","3. 直接编辑源码,保存零风险","","## 已挂的扩展","","- `lineNumbers()` 行号","- `markdown()` 语法高亮与标题折叠","- `history()` 撤销重做","- `searchKeymap` 查找替换(Ctrl+F)","- `EditorView.lineWrapping` 软换行",""].join(` +`),"技术/git 工作流.md":["# git 工作流","","同步 = 提交 + 拉取 + 推送;推送 = 提交 + 推送;拉取 = 仅拉取。","","## 元数据在仓库根","","```",".cmark/","├── order.txt 目录顺序,一行一个 id","├── locked.txt 只读标记,一行一个 md5(id)","└── attachments/ 图片附件,文件名是内容 md5","```","","## 提交范围","","`git add` 必须同时包含工作区子目录**和**仓库根的 `.cmark/`,","否则排序和只读状态永远提交不上去。",""].join(` +`),"生活/清单.md":["# 待办清单","","- [x] 工程骨架","- [x] 目录树","- [x] 编辑器 + 预览","- [ ] git 界面接线","- [ ] 工具栏与表格操作","- [ ] 图片附件粘贴","- [ ] 全局搜索","- [ ] 设置面板",""].join(` +`)};function V2e(){try{const t=localStorage.getItem(K4);if(t)return JSON.parse(t)}catch{}const e=Object.assign({},Uj);return localStorage.setItem(K4,JSON.stringify(e)),e}function Yl(e){try{localStorage.setItem(K4,JSON.stringify(e))}catch{}}let cn=V2e();function U2e(e){const t=[],n=new Map,r=s=>{if(n.has(s))return n.get(s);const a=s.split("/"),o=a[a.length-1],l=a.slice(0,-1).join("/"),u=l?r(l):t,f={id:s,name:o,type:"folder",rel:s,children:[]};return u.push(f),n.set(s,f.children),f.children};for(const s of Object.keys(e)){const o=s.split("/").slice(0,-1).join("/");(o?r(o):t).push({id:s,name:s.split("/").pop().replace(/\.(md|markdown)$/i,""),type:"note",rel:s})}const i=s=>(s.sort((a,o)=>a.type!==o.type?a.type==="folder"?-1:1:a.name.localeCompare(o.name,"zh")),s.forEach(a=>a.children&&i(a.children)),s);return i(t)}function Zo(e){return Object.assign({ok:!0},e)}function ep(e){return{ok:!1,message:e}}function H2e(){if(typeof window>"u"||window.__CMARK)return;const e=[],t=()=>e.forEach(r=>r()),n={configPath:"(浏览器预览模式)",getConfig(){return{workspace:"browser://mock",initialized:!0,workspaceExists:!0}},pickWorkspace(){return ep("浏览器预览模式不支持更换目录")},countMarkdown(){return{markdown:Object.keys(cn).length,folders:new Set(Object.keys(cn).map(i=>i.split("/").slice(0,-1).join("/"))).size}},rescan(){return t(),{ok:!0}},onWorkspaceChange(r){e.push(r)},shellShowWorkspace(){},absOf(r){return"browser://mock/"+r},readNote(r){return cn[r]??""},exists(r){return Object.prototype.hasOwnProperty.call(cn,r)},readNoteEx(r){if(!Object.prototype.hasOwnProperty.call(cn,r))return{ok:!1,code:"ENOENT",message:"笔记不存在"};const i=cn[r]??"";return{ok:!0,text:i,mtime:Date.now(),size:i.length}},statNote(r){return Object.prototype.hasOwnProperty.call(cn,r)?{ok:!0,mtime:Date.now(),size:(cn[r]??"").length}:{ok:!1,code:"ENOENT"}},writeNote(r,i){return r in cn?(cn[r]=i,Yl(cn),Zo()):ep("笔记不存在")},createNote(r,i,s){const a=String(i||"未命名").replace(/[\\/:*?"<>|]/g,"").trim()||"未命名";let o=(r?r+"/":"")+a+".md",l=2;for(;o in cn;)o=(r?r+"/":"")+a+" "+l+".md",l++;return cn[o]=s??"# "+a+` +`,Yl(cn),t(),Zo({rel:o})},createFolder(r,i){const s=String(i||"新建文件夹").replace(/[\\/:*?"<>|]/g,"").trim()||"新建文件夹",a=(r?r+"/":"")+s,o=a+"/.keep.md";return o in cn||(cn[o]="# "+s+` +`,Yl(cn)),t(),Zo({rel:a})},renameNode(r,i){const s=String(i||"").replace(/[\\/:*?"<>|]/g,"").trim();if(!s)return ep("名称不能为空");const a=/\.(md|markdown)$/i.test(r),o=r.includes("/")?r.slice(0,r.lastIndexOf("/")):"",l=(o?o+"/":"")+s+(a?".md":"");return l===r?Zo({rel:r}):l in cn?ep("同名已存在"):(a?(cn[l]=cn[r],delete cn[r]):Object.keys(cn).filter(f=>f.startsWith(r+"/")).forEach(f=>{cn[l+f.slice(r.length)]=cn[f],delete cn[f]}),Yl(cn),t(),Zo({rel:l}))},deleteNode(r){return r in cn?delete cn[r]:Object.keys(cn).filter(i=>i.startsWith(r+"/")).forEach(i=>delete cn[i]),Yl(cn),t(),Zo()},countInDir(r){return Object.keys(cn).filter(i=>(r?i.startsWith(r+"/"):!0)&&/\.md$/i.test(i)).length},moveNode(r,i){const s=r.split("/").pop(),a=(i?i+"/":"")+s;return a===r?Zo({rel:r}):(cn[a]=cn[r],delete cn[r],Yl(cn),t(),Zo({rel:a}))},listTree(){return{workspace:"browser://mock",children:U2e(cn),truncated:!1,count:Object.keys(cn).length}}};window.__CMARK=n,window.__CMARK_RESET=()=>{cn=Object.assign({},Uj),Yl(cn),t(),location.reload()}}const xr=e=>({ok:!0,value:e}),ln=(e,t,n)=>({ok:!1,code:e,message:t,detail:n}),W2e={fs:{pickDirectory:!0,watch:!0,absolutePaths:!0,trash:!0},vcs:{protocols:["https","ssh","file"],credentialHelper:!0,globalConfig:!0,renameDetection:!0,inProcess:!1},export:{pdf:!0,longImage:!0,shareSheet:!1,saveDialog:!0},shell:{globalSearch:!0,subInput:!0,ai:!1,clipboardImage:!0,revealInFolder:!0}};function rd(e,t="操作失败"){return e&&e.ok===!1?ln("unknown",e.message||t):xr(void 0)}function K2e(e){const t=e.replace(/\\/g,"/").replace(/^\.\//,"").replace(/\.md$/i,""),n=t.lastIndexOf("/");return n<0?{dir:"",name:t}:{dir:t.slice(0,n),name:t.slice(n+1)}}const G2e={root(){return Ik()||pn().getConfig?.()?.workspace||null},async isReady(){return J4()},async pick(){const e=pn().pickWorkspace?.();if(!e||e.ok===!1)return ln("canceled",e?.message||"未选择目录");const t=pn().getConfig?.();return xr(t?.workspace||null)},async adopt(){return ln("unsupported","插件端通过设置面板切换工作区(会写 ~/.cmark-config.json)")},async listTree(e){const t=pn().listTree(),n=e?.maxEntries??2e4;return{children:t.children||[],count:t.children?.length??0,truncated:!!t.truncated&&(t.children?.length??0)>=n,workspace:t.workspace||Ik()}},async readAll(){return(pn().loadAllNotes?.()||[]).map(t=>({rel:t.rel,text:t.text}))},async read(e){const t=pn().readNoteEx?.(e);if(t)return t.ok?xr({text:t.text??"",mtime:t.mtime??0,size:t.size??0}):ln(t.code==="ENOENT"?"notfound":"unknown",t.message||"读取失败");const n=pn().readNote(e);return xr({text:n,mtime:pn().statNote?.(e)?.mtime??0,size:n.length})},async stat(e){const t=pn().statNote?.(e);return!t||t.ok===!1?ln("notfound","文件不存在"):xr({rel:e,mtime:t.mtime??0,size:t.size??0})},async write(e,t){const n=pn().writeNote(e,t);return n.ok===!1?ln("unknown",n.message||"保存失败"):xr({changed:!0,mtime:n.mtime??pn().statNote?.(e)?.mtime??Date.now()})},async create(e,t,n){const{dir:r,name:i}=K2e(e),s=t==="folder"?pn().createFolder(r,i):pn().createNote(r,i,n??"");return s.ok===!1?ln("unknown",s.message||"新建失败"):xr({rel:s.rel||e})},async rename(e,t){const n=pn().renameNode(e,t);return n.ok===!1?ln("unknown",n.message||"重命名失败"):xr({rel:n.rel||e})},async move(e,t){const n=pn().moveNode(e,t);return n.ok===!1?ln("unknown",n.message||"移动失败"):xr({rel:n.rel||e})},async remove(e){return rd(pn().deleteNode(e),"删除失败")},async duplicate(e){const t=pn().duplicateNode?.(e);return!t||t.ok===!1?ln("unsupported",t?.message||"复制失败"):xr({rel:t.rel||e})},async exists(e){return!!pn().exists?.(e)},watch(e){return pn().onWorkspaceChange?(pn().onWorkspaceChange(()=>{e({changed:[],removed:[]})}),()=>{}):()=>{}},async putAttachment(e,t){const n=twe(e),r=pn().saveImageToWorkspace?.(void 0,n);if(!r||r.ok===!1)return ln("unsupported",r?.message||"保存附件失败");const i=r.url||"";return xr({url:i,rel:i.replace(/^attachment:/,"")+"."+t.replace(/^\./,"")})},async readAttachment(){return ln("unsupported","插件端附件由渲染层用 resolveImageUrl 直接给 URL")},async pickImage(){const e=pn().pickImageFile?.();return!e||e.ok===!1?xr(null):ln("unsupported","插件端请直接用 saveImageToWorkspace(srcPath) 拷贝文件")},async readClipboardImage(){return ln("unsupported","插件端剪贴板图片走 saveClipboardImage")},async noteState(e){const t=io()?.readNoteState?.(e);return xr({locked:!!t?.locked,near:!!t?.near})},async setNoteLocked(e,t){return rd(io()?.setNoteLocked?.(e,t),"设置只读失败")},async setNoteNear(e,t){return rd(io()?.setNoteNear?.(e,t),"设置全局搜索失败")},async saveOrder(e){return rd(pn().saveOrder?.(e),"保存顺序失败")},async readOnboard(){return io()?.onboardGet?.()||{}},async writeOnboard(e){return io()?.onboardSet?.(e),xr(void 0)}},Y2e={protocols:["https","ssh","file"],async detect(){const e=id();if(!e?.detect)return ln("unsupported","插件端 git 服务暂未接入契约");const t=await e.detect();return xr({repoRoot:t.repoRoot??null,branch:t.branch??null,upstream:t.upstream??null})},async init(){return ln("unsupported","插件端 git 走 __znotesGit.initRepo")},async adopt(){return ln("unsupported","插件端 git 走 __znotesGit.adoptRepo")},async status(){return id()?.status?ln("unsupported","插件端 git 结果结构与契约尚未对齐"):ln("unsupported","插件端 git 服务暂未接入契约")},async log(e){const t=id();if(!t?.repoLog)return ln("unsupported","插件端历史走 __znotesGit.repoLog");const n=await t.repoLog(e||{});return xr({commits:n.commits||[],total:n.total??(n.commits?.length||0)})},async show(){return ln("unsupported","待迁移")},async diff(){return ln("unsupported","待迁移")},async stage(){return ln("unsupported","待迁移")},async unstage(){return ln("unsupported","待迁移")},async discard(){return ln("unsupported","待迁移")},async restore(){return ln("unsupported","待迁移")},async commit(){return ln("unsupported","待迁移")},async remotes(){return ln("unsupported","待迁移")},async setRemote(){return ln("unsupported","待迁移")},async probeRemote(){return ln("unsupported","待迁移")},async fetch(){return ln("unsupported","待迁移")},async push(){return ln("unsupported","待迁移")},async pull(){return ln("unsupported","待迁移")},setCredential(){}},Hj={async get(e,t){try{const n=localStorage.getItem(`cmark:${e}:${t}`);return n===null?void 0:JSON.parse(n)}catch{return}},async set(e,t,n){try{return localStorage.setItem(`cmark:${e}:${t}`,JSON.stringify(n)),window.dispatchEvent(new CustomEvent("cmark:prefs",{detail:{ns:e,key:t}})),xr(void 0)}catch(r){return ln("unknown",String(r))}},async patch(e,t){for(const[n,r]of Object.entries(t))await Hj.set(e,n,r);return xr(void 0)},async all(e){const t={};try{for(let n=0;nt();return window.addEventListener("cmark:prefs",n),()=>window.removeEventListener("cmark:prefs",n)}},J2e={notify(e){su()?.showNotification?.({title:e.title,body:e.body})},async pickDirectory(){return ln("unsupported","插件端目录选择走设置面板")},async pickFile(){const e=pn().pickImageFile?.();return!e?.ok||!e.path?xr(null):xr([e.path])},async saveFile(){return ln("unsupported","插件端导出走专用方法")},async copyText(e){try{return su()?.copyText?.(e),xr(void 0)}catch(t){return ln("unknown",String(t))}},async openUrl(e){return pn().openExternal?.(e),xr(void 0)},async revealInFolder(e){const t=pn().shellShowItem?.(e);return rd(t,"定位失败")},ai:null,setSearchKeyword(e,t){return su()?.setSubInputValue?.(e),()=>{}},onEnter(){return()=>{}}},X2e={async saveBytes(){return ln("unsupported","插件端导出走 __CMARK.writeMarkdownFile / writeHtmlFile / exportFile")},async renderPdf(){return ln("unsupported","插件端 PDF 走 __CMARK.exportFile")},async renderImage(){return ln("unsupported","插件端长图走 __CMARK.exportFile")},async share(){return ln("unsupported","桌面端没有系统分享面板")}};function Q2e(){return{env:{platform:Z2e(),host:ewe(),caps:W2e,paths:{config:null,temp:null,downloads:null},onActivate(e){return su()?.onPluginEnter?.(t=>e({raw:t})),()=>{}},onVisibilityChange(e){const t=()=>e(!document.hidden);return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},onBeforeQuit(e){const t=()=>void e();return window.addEventListener("beforeunload",t),()=>window.removeEventListener("beforeunload",t)},diagnostics(){return{missing:[],bootErrors:window.__CMARK_BOOT_ERRORS||[]}}},ws:G2e,vcs:Y2e,prefs:Hj,shell:J2e,export:X2e}}function Z2e(){const e=navigator.userAgent;return/Windows/i.test(e)?"win32":/Mac/i.test(e)?"darwin":"linux"}function ewe(){const t=window.__CMARK_HOST;return t==="utools"?"utools":"ztools"}function twe(e){let t="";for(let r=0;rcC("window.error",e.error||e.message));window.addEventListener("unhandledrejection",e=>cC("unhandledrejection",e.reason));class nwe extends Z.Component{state={err:null};static getDerivedStateFromError(t){return{err:t}}componentDidCatch(t){cC("render",t)}render(){return this.state.err?$.jsx("div",{style:{padding:24,fontFamily:"Consolas, monospace",fontSize:12,color:"#cf222e",whiteSpace:"pre-wrap"},children:`渲染失败: + +`+this.state.err.message+` + +`+(this.state.err.stack||"").split(` +`).slice(0,12).join(` +`)}):this.props.children}}window.addEventListener("load",()=>{const e=localStorage.getItem("cmark:lastError");e&&console.warn("[cmark] 上次错误:",e)});N$.createRoot(document.getElementById("root")).render($.jsx(nwe,{children:$.jsx($2e,{})})); diff --git a/plugins/cmark/docs/6.png b/plugins/cmark/docs/6.png new file mode 100644 index 000000000..bf726e150 Binary files /dev/null and b/plugins/cmark/docs/6.png differ diff --git a/plugins/cmark/docs/editor-dark.png b/plugins/cmark/docs/editor-dark.png new file mode 100644 index 000000000..41f61047c Binary files /dev/null and b/plugins/cmark/docs/editor-dark.png differ diff --git a/plugins/cmark/docs/editor-light.png b/plugins/cmark/docs/editor-light.png new file mode 100644 index 000000000..7cb73a3ae Binary files /dev/null and b/plugins/cmark/docs/editor-light.png differ diff --git a/plugins/cmark/docs/git-diff.png b/plugins/cmark/docs/git-diff.png new file mode 100644 index 000000000..bf726e150 Binary files /dev/null and b/plugins/cmark/docs/git-diff.png differ diff --git a/plugins/cmark/docs/git-history.png b/plugins/cmark/docs/git-history.png new file mode 100644 index 000000000..a14429bca Binary files /dev/null and b/plugins/cmark/docs/git-history.png differ diff --git a/plugins/cmark/docs/math-dialog.png b/plugins/cmark/docs/math-dialog.png new file mode 100644 index 000000000..216b29db8 Binary files /dev/null and b/plugins/cmark/docs/math-dialog.png differ diff --git a/plugins/cmark/docs/screenshot.png b/plugins/cmark/docs/screenshot.png deleted file mode 100644 index 70158a02b..000000000 Binary files a/plugins/cmark/docs/screenshot.png and /dev/null differ diff --git a/plugins/cmark/docs/settings.png b/plugins/cmark/docs/settings.png new file mode 100644 index 000000000..116a3495c Binary files /dev/null and b/plugins/cmark/docs/settings.png differ diff --git a/plugins/cmark/docs/ui-diff.png b/plugins/cmark/docs/ui-diff.png deleted file mode 100644 index e6186aa25..000000000 Binary files a/plugins/cmark/docs/ui-diff.png and /dev/null differ diff --git a/plugins/cmark/docs/ui-editor.png b/plugins/cmark/docs/ui-editor.png deleted file mode 100644 index 7b0795e97..000000000 Binary files a/plugins/cmark/docs/ui-editor.png and /dev/null differ diff --git a/plugins/cmark/docs/ui-history.png b/plugins/cmark/docs/ui-history.png deleted file mode 100644 index 032b23f8d..000000000 Binary files a/plugins/cmark/docs/ui-history.png and /dev/null differ diff --git a/plugins/cmark/docs/ui-settings.png b/plugins/cmark/docs/ui-settings.png deleted file mode 100644 index 0c7038d0b..000000000 Binary files a/plugins/cmark/docs/ui-settings.png and /dev/null differ diff --git a/plugins/cmark/index.html b/plugins/cmark/index.html index 62a5a9337..a00f1d952 100644 --- a/plugins/cmark/index.html +++ b/plugins/cmark/index.html @@ -4,10 +4,10 @@ CMark - + - +
    diff --git a/plugins/cmark/plugin.json b/plugins/cmark/plugin.json index 154b53796..009b53a94 100644 --- a/plugins/cmark/plugin.json +++ b/plugins/cmark/plugin.json @@ -2,7 +2,7 @@ "name": "cmark", "pluginName": "CMark", "title": "CMark", - "version": "1.2.0", + "version": "1.2.4", "description": "本地 Markdown 笔记,用 Git 管理版本、同步多端", "author": "Lancc", "homepage": "https://github.com/LanccBy2016/cmark", diff --git a/plugins/cmark/preload.js b/plugins/cmark/preload.js index 66caba7d2..10f517bb7 100644 --- a/plugins/cmark/preload.js +++ b/plugins/cmark/preload.js @@ -27,7 +27,7 @@ function bootError(label, err) { } catch (e) {} } const fs = require('fs') -const { exportDocCss, exportDocColors } = require('./preload/export-css') +const { exportDocCss, exportDocColors } = require('./preload/ports/export-css') const os = require('os') const CFG_PATH = path.join(os.homedir(), '.cmark-config.json') @@ -91,8 +91,52 @@ function themeMode () { return THEME_MODES.indexOf(m) >= 0 ? m : 'system' } +/** + * 宿主只支持一个 onPluginEnter 回调。 + * + * 设置面板要「重新进入时恢复面板」,App 要「快捷指令打开笔记 + 恢复搜索态」, + * 两处各自调 ztools.onPluginEnter 会互相覆盖 —— 后注册的把先注册的顶掉, + * 表现就是 onPluginEnter 时灵时不灵(实测重新唤起时 App 的回调完全收不到)。 + * 统一在这里注册一次,再广播成 DOM 事件,各处改成监听事件即可。 + */ +function wirePluginEnter () { + if (window.__CMARK_ENTER_WIRED) return + // 宿主还没注入时 window.ztools 是 host shim 的惰性 Proxy:任何方法都存在(no-op), + // 直接判 typeof 会「注册成功」,实际什么都没接上,事件一次都不派发。 + // 必须用 host.js 探测出来的宿主类型判断,并用轮询等它注入。 + const host = window.__CMARK_HOST + if (host !== 'ztools' && host !== 'utools') return + const z = window.ztools + if (!z || typeof z.onPluginEnter !== 'function') return + try { + z.onPluginEnter(function (enter) { + // 冷启动时 React 可能还没挂载,缓存一份给 App 补消费 + window.__CMARK_LAST_ENTER = enter || {} + try { + window.dispatchEvent(new CustomEvent('cmark-plugin-enter', { detail: enter || {} })) + } catch (e) {} + }) + window.__CMARK_ENTER_WIRED = true + } catch (e) {} +} +var __enterTries = 0 +var __enterTimer = setInterval(function () { + wirePluginEnter() + if (window.__CMARK_ENTER_WIRED || ++__enterTries > 60) clearInterval(__enterTimer) +}, 100) + function resolveTheme (mode) { if (mode === 'light' || mode === 'dark') return mode + // system:优先跟随宿主(ZTools/uTools 的主题设置,而宿主自己也可以设为跟随系统)。 + // 为什么不用 prefers-color-scheme:宿主的标题栏是它自己的 UI,颜色由宿主的主题决定, + // 插件改不了;只有让「跟随」这一档跟宿主同源,插件页面和顶部那条才不会一深一浅。 + // preload 跑在 document-start,宿主可能还没注入 window.ztools(host shim 会先给 no-op), + // 此时拿到的是 undefined,必须回退到系统媒体查询。 + try { + const z = window.ztools + const v = z && typeof z.isDarkColors === 'function' ? z.isDarkColors() : undefined + if (typeof v === 'boolean') return v ? 'dark' : 'light' + } catch (e) {} try { return typeof matchMedia === 'function' && matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' } catch (e) { @@ -159,6 +203,26 @@ try { else if (mq.addListener) mq.addListener(onChange) } catch (e) {} +// 「跟随」这一档还要跟宿主的主题变化走:用户在 ZTools 里切浅/深时, +// 插件页面要跟着换,否则会出现「顶部变了、页面没变」的反向不一致。 +// preload 早期宿主可能还没注入,所以延后一段时间再注册一次。 +function watchHostTheme () { + try { + const z = window.ztools + if (!z || typeof z.onThemeChange !== 'function') return false + z.onThemeChange(function () { if (themeMode() === 'system') applyTheme() }) + return true + } catch (e) { + return false + } +} +if (!watchHostTheme()) { + setTimeout(watchHostTheme, 600) + setTimeout(watchHostTheme, 2000) +} +// 宿主注入晚于首帧时,system 档的首帧可能按系统色算错了,补算一次 +setTimeout(function () { if (themeMode() === 'system') applyTheme() }, 300) + // 工作区未设置或不存在时,退到 ~/Documents/CMark,不弹任何框 let workspace = config.workspace if (!workspace || !fs.existsSync(workspace)) { @@ -174,7 +238,7 @@ if (!workspace || !fs.existsSync(workspace)) { * (被 try/catch 静默吞掉,表现就是「开关点了没生效、状态读不到」)。 * 这里给渲染层与注入脚本一个同步读写的入口,set 时广播事件让各界面同步。 */ -const wsPrefs = require('./preload/ws-prefs.js') +const wsPrefs = require('./preload/ports/ws-prefs.js') function currentWs () { try { @@ -207,7 +271,7 @@ try { if (window) window.__CMARK_GIT = gitApi } catch (e) {} /* ---------------- 挂载数据层 ---------------- */ // ndb.js 的第二个参数是"能读到 workspace 字段的 JSON 路径" try { - require('./preload/ndb.js')(window, CFG_PATH) + require('./preload/ports/ndb.js')(window, CFG_PATH) } catch (e) { console.error('[cmark] ndb 挂载失败', e) bootError('ndb', e) @@ -215,7 +279,7 @@ try { /* ---------------- 挂载版本控制 ---------------- */ try { - require('./preload/git-service.js')(window, workspace) + require('./preload/ports/git-service.js')(window, workspace) } catch (e) { console.error('[cmark] git 服务挂载失败', e) bootError('git-service', e) @@ -223,7 +287,7 @@ try { /* ---------------- 挂载导出/附件/剪贴板 ---------------- */ try { - window.services = require('./preload/services.js')(window) + window.services = require('./preload/ports/services.js')(window) } catch (e) { console.error('[cmark] services 挂载失败', e) bootError('services', e) @@ -280,7 +344,7 @@ try { } catch (e) {} } - require('./preload/git-panel.js')(window, workspace) + require('./preload/panels/git-panel.js')(window, workspace) } catch (e) { console.error('[cmark] git-panel 挂载失败', e) bootError('git-panel', e) @@ -289,26 +353,26 @@ try { // 每个模块单独 try:之前三个挤在一个 try 里,前面任一个抛错,设置面板就整块不挂载, // 表现就是「点设置没反应」(uTools 里尤其容易踩到)。 try { - require('./preload/remote-setup.js')(window) + require('./preload/panels/remote-setup.js')(window) } catch (e) { console.error('[cmark] remote-setup 挂载失败', e) bootError('remote-setup', e) } try { - require('./preload/remote-wizard.js')(window) + require('./preload/panels/remote-wizard.js')(window) } catch (e) { console.error('[cmark] remote-wizard 挂载失败', e) bootError('remote-wizard', e) } try { - require('./preload/settings-panel.js')(window) + require('./preload/panels/settings-panel.js')(window) } catch (e) { console.error('[cmark] settings-panel 挂载失败', e) bootError('settings-panel', e) } try { - require('./preload/rename-note.js')(window, window.__znotesFindInstance) + require('./preload/panels/rename-note.js')(window, window.__znotesFindInstance) } catch (e) { console.error('[cmark] rename-note 挂载失败', e) bootError('rename-note', e) diff --git a/plugins/cmark/preload/branch-bar.js b/plugins/cmark/preload/panels/branch-bar.js similarity index 100% rename from plugins/cmark/preload/branch-bar.js rename to plugins/cmark/preload/panels/branch-bar.js diff --git a/plugins/cmark/preload/git-panel.js b/plugins/cmark/preload/panels/git-panel.js similarity index 97% rename from plugins/cmark/preload/git-panel.js rename to plugins/cmark/preload/panels/git-panel.js index dc10c5c3d..f2b6f6df4 100644 --- a/plugins/cmark/preload/git-panel.js +++ b/plugins/cmark/preload/panels/git-panel.js @@ -567,7 +567,12 @@ module.exports = function installGitPanel(win, WS) { ensureStatusContainers() const box = $('zgp-status') if (!st || !st.isRepo) { - box.innerHTML = '尚未初始化 git 仓库' + // 只换 chips 的内容,绝不整体覆盖 .zgp-status: + // 整体覆盖会把 chips/acts/fileact 三个容器一起删掉,之后自愈重建时 + // 散落在状态条里的旧节点会留下来,表现为「工作区变更记录」里混着 + // 单个文档的 chip(两套状态条叠在一起) + const chipsBox0 = box.querySelector('#zgp-chips') + if (chipsBox0) chipsBox0.innerHTML = '尚未初始化 git 仓库' const foot0 = doc.querySelector('.zgp-acts') const oldE = doc.getElementById('zgp-foot-extra') if (oldE) oldE.remove() @@ -700,7 +705,7 @@ module.exports = function installGitPanel(win, WS) { if (!rel) { const chips0 = box.querySelector('#zgp-chips') if (chips0) chips0.innerHTML = '没有打开的笔记' - else box.innerHTML = '没有打开的笔记' + else ensureStatusContainers() const pane = $('zgp-pane-changes') if (pane) pane.innerHTML = '
    没有打开的笔记打开一篇笔记后,这里显示它的改动与历史
    ' const hp = $('zgp-pane-history') @@ -713,10 +718,11 @@ module.exports = function installGitPanel(win, WS) { const chipsHtml = '' + esc(displayPath(rel)) + '' + (file ? '有未提交改动' : '与最近提交一致') + (readErr ? '' + esc(readErr.slice(0, 40)) + '' : '') - // 只更新 chips,不要覆盖整个状态条(否则会删掉右侧操作区与容器) + // 只更新 chips,不要覆盖整个状态条(否则会删掉右侧操作区与容器)。 + // 容器缺失时先自愈重建,而不是退回「直接写 .zgp-status」那种会留残骸的兜底。 + ensureStatusContainers() const chipsBoxF = box.querySelector('#zgp-chips') if (chipsBoxF) chipsBoxF.innerHTML = chipsHtml - else box.innerHTML = chipsHtml renderFileChanges(rel, file) if (activeTab === 'history') renderHistory(true) } @@ -1186,6 +1192,10 @@ module.exports = function installGitPanel(win, WS) { const fAct = root.querySelector('#zgp-fileact') if (fAct) fAct.style.display = isFile ? 'flex' : 'none' if (!isFile && fAct) fAct.innerHTML = '' + // 切模式时先清一遍 chips:refresh 有签名去重,命中时会直接 return, + // 上一模式的 chip(全局的「分支 main/工作区干净」或单文件的「路径」)就会留在新面板里 + const chipsEl = doc.getElementById('zgp-chips') + if (chipsEl) chipsEl.innerHTML = '' } doc.querySelectorAll('.zgp-tab').forEach((t) => { @@ -1296,6 +1306,15 @@ module.exports = function installGitPanel(win, WS) { const status = $('zgp-status') if (!status) return let changed = false + // 先清掉不属于三个容器的散落节点:历史上 renderStatus/renderFileMode 都走过 + // 「直接给 .zgp-status 写 innerHTML」的兜底,留下的裸 chip 会和重建的容器 + // 并排显示(全局 chip + 单文件 chip 同时出现),必须一次性清干净 + const kids = Array.prototype.slice.call(status.children) + for (const el of kids) { + if (el.id === 'zgp-chips' || el.id === 'zgp-fileact') continue + if (el.classList && el.classList.contains('zgp-acts')) continue + try { status.removeChild(el); changed = true } catch (e) {} + } if (!$('zgp-chips')) { const d = doc.createElement('div') d.className = 'zgp-chips' @@ -1352,7 +1371,12 @@ module.exports = function installGitPanel(win, WS) { refresh() } } - win.__zgpOpen = function (mode) { if (!root.classList.contains('open')) win.__zgpToggle(mode || 'global') } + win.__zgpOpen = function (mode) { + const m = mode === 'file' ? 'file' : 'global' + // 面板已经打开时也要切模式:否则从「文档变更记录」再点侧边栏的 + // 「工作区变更记录」会被静默忽略,标题与内容停在上一层,看起来就是错乱 + if (!root.classList.contains('open') || m !== panelMode) win.__zgpToggle(m) + } win.__zgpIsOpen = function () { return root.classList.contains('open') } // 面板打开时定时刷新(3 秒);历史页不做轮询,避免反复重绘导致闪烁 diff --git a/plugins/cmark/preload/remote-setup.js b/plugins/cmark/preload/panels/remote-setup.js similarity index 81% rename from plugins/cmark/preload/remote-setup.js rename to plugins/cmark/preload/panels/remote-setup.js index b6efc878d..662654f6a 100644 --- a/plugins/cmark/preload/remote-setup.js +++ b/plugins/cmark/preload/panels/remote-setup.js @@ -20,7 +20,7 @@ const os = require('os') const path = require('path') const https = require('https') const { execFile } = require('child_process') -const wsPrefs = require('./ws-prefs.js') +const wsPrefs = require('../ports/ws-prefs.js') const CFG_PATH = path.join(os.homedir(), '.cmark-config.json') const GITHUB_CLIENT_ID = 'Ov23liDQDiefOfwzHHLA' @@ -231,12 +231,24 @@ function giteeCreateRepo (token, name, isPrivate) { } /* ---------------- git 绑定 ---------------- */ -const TOKEN_HELPER = '!f() { echo username=x-access-token; echo password=$CMARK_GIT_TOKEN; }; f' +// Gitee 的 HTTPS 用户名是强校验的:必须与令牌所有者一致,否则回 403 +// 「The token username invalid」(x-access-token 只有 GitHub 认)。 +// 用户名优先级:调用方给的 login > 从仓库地址推断的 owner > x-access-token +const SAFE_USER = /^[A-Za-z0-9._-]{1,64}$/ +function userForUrl (url) { + const m = /^https?:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/([^/]+)\//.exec(String(url || '')) + if (m && /(^|\.)gitee\.com$/i.test(m[1]) && SAFE_USER.test(m[2])) return m[2] + return 'x-access-token' +} +function tokenHelper (username) { + const u = SAFE_USER.test(String(username || '')) ? String(username) : 'x-access-token' + return '!f() { echo username=' + u + '; echo password=$CMARK_GIT_TOKEN; }; f' +} -function git (args, cwd, token, timeout) { +function git (args, cwd, token, timeout, username) { return new Promise(function (resolve) { const pre = token - ? ['-c', 'core.quotepath=false', '-c', 'credential.helper=', '-c', 'credential.helper=' + TOKEN_HELPER] + ? ['-c', 'core.quotepath=false', '-c', 'credential.helper=', '-c', 'credential.helper=' + tokenHelper(username)] : ['-c', 'core.quotepath=false', '-c', 'credential.helper=', '-c', 'credential.helper=manager'] execFile('git', pre.concat(args), { cwd: cwd, @@ -279,6 +291,9 @@ async function bind (o) { const dir = opt.dir const url = opt.url const token = opt.token + // Gitee 必须用令牌所有者的用户名校验;调用方(向导)拿到的是 login, + // 老路径/手填地址没有 login 时用仓库地址里的 owner 兜底 + const username = opt.username || userForUrl(url) if (!dir || !url || !token) return { ok: false, message: '参数不完整' } if (!fs.existsSync(dir)) { try { fs.mkdirSync(dir, { recursive: true }) } catch (e) { @@ -287,6 +302,25 @@ async function bind (o) { } const steps = [] + // 首推:本地还没有提交就先提交,然后 push -u origin main。 + // 全新仓库和「选了已有仓库但远端是空的」两种情况共用。 + async function firstPush () { + const hasCommit = await git(['rev-parse', '--verify', 'HEAD'], dir) + if (!hasCommit.ok) { + const addAll = await git(['add', '-A', '--', '.'], dir) + if (!addAll.ok) return { ok: false, message: '暂存失败:' + addAll.message, steps: steps } + const commit = await git(['commit', '-m', '初始化笔记仓库'], dir) + if (!commit.ok && !/nothing to commit/i.test(commit.message)) { + return { ok: false, message: '提交失败:' + commit.message, steps: steps } + } + steps.push('commit') + } + const push = await git(['push', '-u', 'origin', 'main'], dir, token, 180000, username) + if (!push.ok) return { ok: false, message: '首次推送失败:' + push.message, steps: steps } + steps.push('push') + return { ok: true } + } + if (!isRepo(dir)) { const init = await git(['init', '-b', 'main'], dir) if (!init.ok) return { ok: false, message: 'git init 失败:' + init.message } @@ -306,42 +340,41 @@ async function bind (o) { if (opt.existing) { // 远程已有仓库:把内容拉下来(只能 fast-forward,避免覆盖本地笔记) - const fetch = await git(['fetch', 'origin'], dir, token, 180000) + const fetch = await git(['fetch', 'origin'], dir, token, 180000, username) if (!fetch.ok) return { ok: false, message: '拉取失败:' + fetch.message, steps: steps } steps.push('fetch') - // 远端默认分支不一定是 main(Gitee 新建仓库默认 master),按远端 HEAD 指向来合并 - let remoteBranch = 'main' - try { - const sym = await git(['ls-remote', '--symref', 'origin', 'HEAD'], dir, token, 60000) - const m = sym.ok ? /ref:\s+refs\/heads\/(\S+)\s+HEAD/.exec(sym.data || '') : null - if (m && m[1]) remoteBranch = m[1] - } catch (e) {} + // 「使用已有仓库」也可能选到刚建好、还没推过东西的空仓库(auto_init:false 没有任何分支): + // 这种情况下 fetch 会成功但拉不到任何引用,接着 merge origin/main 必然失败。 + // 所以要显式分叉到首推,而不是让用户看到「合并失败」这种莫名报错。 + const heads = await git(['ls-remote', '--heads', 'origin'], dir, token, 60000, username) + const hasRemoteHeads = heads.ok && String(heads.data || '').trim() !== '' + if (!hasRemoteHeads) { + const fp = await firstPush() + if (!fp.ok) return fp + } else { + // 远端默认分支不一定是 main(Gitee 新建仓库默认 master),按远端 HEAD 指向来合并 + let remoteBranch = 'main' + try { + const sym = await git(['ls-remote', '--symref', 'origin', 'HEAD'], dir, token, 60000, username) + const m = sym.ok ? /ref:\s+refs\/heads\/(\S+)\s+HEAD/.exec(sym.data || '') : null + if (m && m[1]) remoteBranch = m[1] + } catch (e) {} - if (remoteBranch !== 'main') { - // 本地是 main、远程是别的名字:把本地主干指到远程分支,避免两个平行根 - await git(['branch', '-M', remoteBranch], dir) - } - const merge = await git(['merge', '--ff-only', 'origin/' + remoteBranch], dir, token, 60000) - if (!merge.ok) { - return { ok: false, message: '合并远端分支 ' + remoteBranch + ' 失败:' + merge.message, steps: steps } + if (remoteBranch !== 'main') { + // 本地是 main、远程是别的名字:把本地主干指到远程分支,避免两个平行根 + await git(['branch', '-M', remoteBranch], dir) + } + const merge = await git(['merge', '--ff-only', 'origin/' + remoteBranch], dir, token, 60000, username) + if (!merge.ok) { + return { ok: false, message: '合并远端分支 ' + remoteBranch + ' 失败:' + merge.message, steps: steps } + } + steps.push('merge') } - steps.push('merge') } else { // 全新仓库:提交本地内容后首次推送 - const hasCommit = await git(['rev-parse', '--verify', 'HEAD'], dir) - if (!hasCommit.ok) { - const addAll = await git(['add', '-A', '--', '.'], dir) - if (!addAll.ok) return { ok: false, message: '暂存失败:' + addAll.message } - const commit = await git(['commit', '-m', '初始化笔记仓库'], dir) - if (!commit.ok && !/nothing to commit/i.test(commit.message)) { - return { ok: false, message: '提交失败:' + commit.message } - } - steps.push('commit') - } - const push = await git(['push', '-u', 'origin', 'main'], dir, token, 180000) - if (!push.ok) return { ok: false, message: '首次推送失败:' + push.message, steps: steps } - steps.push('push') + const fp = await firstPush() + if (!fp.ok) return fp } // dir 是工作区(仓库根)。笔记目录若已经在它之内就保持不动, @@ -354,7 +387,7 @@ async function bind (o) { keepWs = !!curWs && !rel.startsWith('..') && !path.isAbsolute(rel) } catch (e) { keepWs = false } patchCfg(Object.assign({ repoDir: dir, initialized: true }, keepWs ? {} : { workspace: dir })) - const savedRes = wsPrefs.patch(dir, { remoteToken: { provider: opt.provider || '', token: token, url: url } }) + const savedRes = wsPrefs.patch(dir, { remoteToken: { provider: opt.provider || '', token: token, url: url, username: username } }) const saved = !!(savedRes && savedRes.ok) return { ok: saved, steps: steps, message: saved ? '' : ((savedRes && savedRes.message) || '写入配置失败') } } diff --git a/plugins/cmark/preload/remote-wizard.js b/plugins/cmark/preload/panels/remote-wizard.js similarity index 99% rename from plugins/cmark/preload/remote-wizard.js rename to plugins/cmark/preload/panels/remote-wizard.js index b17688e58..2d13c2a2a 100644 --- a/plugins/cmark/preload/remote-wizard.js +++ b/plugins/cmark/preload/panels/remote-wizard.js @@ -280,6 +280,8 @@ module.exports = function attachRemoteWizard (win) { provider: state.provider, url: c.url, token: state.token, + // Gitee 的 HTTPS 用户名必须等于令牌所有者(state.login 来自 /api/v5/user) + username: state.login, dir: ws, existing: !isNew }).then(function (b) { diff --git a/plugins/cmark/preload/rename-note.js b/plugins/cmark/preload/panels/rename-note.js similarity index 100% rename from plugins/cmark/preload/rename-note.js rename to plugins/cmark/preload/panels/rename-note.js diff --git a/plugins/cmark/preload/settings-panel.js b/plugins/cmark/preload/panels/settings-panel.js similarity index 99% rename from plugins/cmark/preload/settings-panel.js rename to plugins/cmark/preload/panels/settings-panel.js index 313ccd325..ab11ab915 100644 --- a/plugins/cmark/preload/settings-panel.js +++ b/plugins/cmark/preload/panels/settings-panel.js @@ -878,9 +878,9 @@ module.exports = function attachSettingsPanel (win) { } catch (e) {} // 补一条:宿主重新进入插件时也恢复(部分场景不触发 visibilitychange) try { - if (win.ztools && typeof win.ztools.onPluginEnter === 'function') { - win.ztools.onPluginEnter(function () { if (readOpenFlag()) open() }) - } + // 统一走 preload 广播的事件:宿主只支持一个 onPluginEnter, + // 直接调会和 App 的注册互相覆盖。 + win.addEventListener('cmark-plugin-enter', function () { if (readOpenFlag()) open() }) } catch (e) {} // 首次挂载时若上次会话面板是开的,直接打开 if (readOpenFlag()) setTimeout(function () { try { open() } catch (e) {} }, 80) diff --git a/plugins/cmark/preload/export-css.js b/plugins/cmark/preload/ports/export-css.js similarity index 100% rename from plugins/cmark/preload/export-css.js rename to plugins/cmark/preload/ports/export-css.js diff --git a/plugins/cmark/preload/git-service.js b/plugins/cmark/preload/ports/git-service.js similarity index 95% rename from plugins/cmark/preload/git-service.js rename to plugins/cmark/preload/ports/git-service.js index 8835877fa..35cc246b4 100644 --- a/plugins/cmark/preload/git-service.js +++ b/plugins/cmark/preload/ports/git-service.js @@ -203,7 +203,7 @@ module.exports = function installGitService(win, argvPath) { { kind: 'detached', re: /detached HEAD|not currently on a branch/i }, { kind: 'norepo', re: /not a git repository/i }, { kind: 'noUpstream', re: /no upstream configured|has no upstream branch|couldn't find remote ref/i }, - { kind: 'auth', re: /(Authentication failed|Permission denied \(publickey|invalid username or password|could not read Username|could not read Password|No such identity)/i }, + { kind: 'auth', re: /(Authentication failed|Permission denied \(publickey|invalid username or password|could not read Username|could not read Password|No such identity|token username invalid|Incorrect username or password|returned error:\s*40[13]|HTTP 40[13])/i }, { kind: 'network', re: /could not resolve host|Unable to access|Connection (refused|reset|timed out)|Failed to connect|network is unreachable|Operation timed out/i }, { kind: 'perm', re: /Permission denied|EACCES|Read-only file system|No space left/i }, { kind: 'dirty', re: /local changes would be lost|Your local changes|uncommitted changes/i } @@ -211,7 +211,7 @@ module.exports = function installGitService(win, argvPath) { const ERR_TEXT = { network: '网络不通或远端不可达', - auth: '认证失败(检查 SSH key 或凭据)', + auth: '认证失败:令牌无效或用户名不匹配(Gitee/自建服务重新授权一次即可)', conflict: '存在冲突,需要先解决', lock: 'git 被其他进程占用(index.lock)', detached: 'HEAD 处于游离状态,请先切回分支', @@ -258,24 +258,55 @@ module.exports = function installGitService(win, argvPath) { } catch (e) { return null } } const NET_CMDS = { push: 1, pull: 1, fetch: 1, 'ls-remote': 1, clone: 1 } - function netToken (args) { + + // Gitee 对 HTTPS 的用户名是**强校验**的:用户名必须与令牌所有者一致,否则直接回 + // 403「The token username invalid」(实测:用 x-access-token 当用户名,Gitee 连 + // 假令牌都明确回 username 相关错误)。x-access-token 这种占位用户名只有 GitHub 认。 + // 所以按远端决定用户名: + // https://gitee.com//.git → owner(个人仓库的 owner 就是令牌所有者) + // 其它(GitHub 等接受任意用户名) → x-access-token + const SAFE_USER = /^[A-Za-z0-9._-]{1,64}$/ + function userForUrl (url) { + const m = /^https?:\/\/(?:[^@/]+@)?([^/:]+)(?::\d+)?\/([^/]+)\//.exec(String(url || '')) + if (m && /(^|\.)gitee\.com$/i.test(m[1]) && SAFE_USER.test(m[2])) return m[2] + return 'x-access-token' + } + // 从 .git/config 里同步取 origin 的地址(exec 是同步拼参数的场合,不能等 git 命令) + function originUrl () { + try { + const txt = fs.readFileSync(path.join(repoRoot || WS, '.git', 'config'), 'utf8') + const tail = txt.split(/\[remote "origin"\]/)[1] || '' + const m = /^[ \t]*url[ \t]*=[ \t]*(.+)$/m.exec(tail) + return m ? m[1].trim() : '' + } catch (e) { return '' } + } + function tokenHelper (username) { + const u = SAFE_USER.test(String(username || '')) ? String(username) : 'x-access-token' + return '!f() { echo username=' + u + '; echo password=$CMARK_GIT_TOKEN; }; f' + } + function netCred (args) { if (!args.some(function (a) { return NET_CMDS[a] })) return null // 先取本工作区的凭据,再回退到旧版全局配置(迁移兼容) - try { - const p = wsPrefs.read(WS) - if (p.remoteToken && p.remoteToken.token) return p.remoteToken.token - } catch (e) {} - const c = readNetCfg() - const t = c && c.remoteToken - return t && t.token ? t.token : null + let rec = null + try { rec = wsPrefs.read(WS).remoteToken || null } catch (e) {} + if (!(rec && rec.token)) { + const c = readNetCfg() + rec = (c && c.remoteToken) || null + } + if (!rec || !rec.token) return null + // 用户名以配置为准;老配置没有 username 字段就用远端地址推断, + // 这样已经用旧版本绑过 Gitee 的用户升级后不用重新授权 + return { token: rec.token, username: rec.username || userForUrl(rec.url || originUrl()) } } - const TOKEN_HELPER = '!f() { echo username=x-access-token; echo password=$CMARK_GIT_TOKEN; }; f' function exec(args, opt) { const o = opt || {} - const token = o.token || netToken(args) + const cred = o.token + ? { token: o.token, username: o.username || userForUrl(o.url || originUrl()) } + : netCred(args) + const token = cred && cred.token const pre = token - ? ['-c', 'core.quotepath=false', '-c', 'credential.helper=', '-c', 'credential.helper=' + TOKEN_HELPER] + ? ['-c', 'core.quotepath=false', '-c', 'credential.helper=', '-c', 'credential.helper=' + tokenHelper(cred.username)] : BASE_ARGS return new Promise((resolve) => { execFile('git', pre.concat(args), { @@ -1325,7 +1356,7 @@ module.exports = function installGitService(win, argvPath) { if (!/^(https?:\/\/|git@|ssh:\/\/|file:\/\/|[A-Za-z]:[\\/]|\\\\|\/)/.test(u)) { return { ok: false, kind: 'badrev', message: '远程地址格式不正确:' + u } } - const r = await runGit(['ls-remote', '--heads', u], { label: 'probe', timeout: 60000, token: token || undefined }) + const r = await runGit(['ls-remote', '--heads', u], { label: 'probe', timeout: 60000, token: token || undefined, url: u }) if (r.ok) return { ok: true, data: { hasRefs: !!String(r.data || '').trim() } } return { ok: false, kind: r.kind, message: r.message } } @@ -1334,7 +1365,9 @@ module.exports = function installGitService(win, argvPath) { function setRemoteToken (token, url) { const t = String(token || '').trim() if (!t) return { ok: false, message: '令牌为空' } - const res = wsPrefs.patch(WS, { remoteToken: { provider: 'custom', token: t, url: String(url || '').trim() } }) + const u = String(url || '').trim() + // 记下按远端推断出的用户名:Gitee 要求它与令牌所有者一致,见 userForUrl + const res = wsPrefs.patch(WS, { remoteToken: { provider: 'custom', token: t, url: u, username: userForUrl(u) } }) if (res && res.ok === false) return res return { ok: true } } diff --git a/plugins/cmark/preload/ndb.js b/plugins/cmark/preload/ports/ndb.js similarity index 100% rename from plugins/cmark/preload/ndb.js rename to plugins/cmark/preload/ports/ndb.js diff --git a/plugins/cmark/preload/services.js b/plugins/cmark/preload/ports/services.js similarity index 100% rename from plugins/cmark/preload/services.js rename to plugins/cmark/preload/ports/services.js diff --git a/plugins/cmark/preload/ws-prefs.js b/plugins/cmark/preload/ports/ws-prefs.js similarity index 100% rename from plugins/cmark/preload/ws-prefs.js rename to plugins/cmark/preload/ports/ws-prefs.js