dsh-inkmap 0.3.8 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/README.zh.md +29 -15
- package/client.js +14 -3
- package/host.js +654 -371
- package/package.json +1 -1
- package/web/assets/{abnfDiagram-S7VZAUFO-Cv52kI-2.js → abnfDiagram-S7VZAUFO-BG5MYX3Z.js} +1 -1
- package/web/assets/{architectureDiagram-YGSQEFNW-C5siUviK.js → architectureDiagram-YGSQEFNW-xhOdCZHT.js} +1 -1
- package/web/assets/{blockDiagram-APKKGZFW-D9Cx18Cy.js → blockDiagram-APKKGZFW-om09jcTu.js} +1 -1
- package/web/assets/{c4Diagram-KJ2TOQU5-Cvk1QesM.js → c4Diagram-KJ2TOQU5-bf-oCj-6.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-BvpOcdWP.js → chunk-2Q5K7J3B-Cd6Zuyl0.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-Bk04rbHq.js → chunk-5VM5RSS4-D_9yIgMi.js} +1 -1
- package/web/assets/{chunk-HFQBQIA3-C2qMwyd_.js → chunk-HFQBQIA3-BSpJ_KUx.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-DoowW69r.js → chunk-JWPE2WC7-Bd1mTs5z.js} +1 -1
- package/web/assets/{chunk-KQLB2F66-BQcHY-wd.js → chunk-KQLB2F66-BjvuoG6k.js} +2 -2
- package/web/assets/{chunk-KS47KZWR-CJcu1y9y.js → chunk-KS47KZWR-DQnmQr8q.js} +1 -1
- package/web/assets/{chunk-OY52VR5R-Dh-uJO9r.js → chunk-OY52VR5R-CavAtvvE.js} +1 -1
- package/web/assets/{chunk-TU62E6Q5-D51xn01O.js → chunk-TU62E6Q5-DGB27D5M.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-BUe08pSx.js → chunk-XXDRQBXY-DiUpl_oE.js} +1 -1
- package/web/assets/{classDiagram-v2-L25IHNXF-BGwiHkBO.js → classDiagram-v2-L25IHNXF-ByAHR9p1.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-ATmSDzBm.js → cose-bilkent-JH36ORCC-T2AuyNNM.js} +1 -1
- package/web/assets/{cynefin-EF2NZ3EQ-BFiIOe-P.js → cynefin-EF2NZ3EQ-CWvVLSHN.js} +1 -1
- package/web/assets/{cynefinDiagram-L36ESFBY-DRTNpfDL.js → cynefinDiagram-L36ESFBY-EyBF2aYr.js} +1 -1
- package/web/assets/{dagre-SPEB5RXH-by7IaF5F.js → dagre-SPEB5RXH-DzCJs6d8.js} +1 -1
- package/web/assets/{diagram-3B7GL73J-rcNPo48m.js → diagram-3B7GL73J-BpqB4EyM.js} +1 -1
- package/web/assets/{diagram-DNEMPZML-iBi9Aax-.js → diagram-DNEMPZML-ByMvtGvg.js} +1 -1
- package/web/assets/{diagram-L3MUGCDN-DNcvt2mz.js → diagram-L3MUGCDN-BZlcEYsl.js} +1 -1
- package/web/assets/{diagram-LA4NIPWU-DEyZS6bD.js → diagram-LA4NIPWU-3kIxJzbY.js} +1 -1
- package/web/assets/{diagram-MHCOC4E2-D8atr--z.js → diagram-MHCOC4E2-BrWZm3sI.js} +1 -1
- package/web/assets/{diagram-XPFHEONP-D6H6iXV8.js → diagram-XPFHEONP-BjI1Mh1e.js} +1 -1
- package/web/assets/{ebnfDiagram-UZSYDL2S-TOp29H5n.js → ebnfDiagram-UZSYDL2S-BQb2XwWh.js} +1 -1
- package/web/assets/{elk-XV6XMXQE-D_I6bqGt.js → elk-XV6XMXQE-okjyR_tN.js} +1 -1
- package/web/assets/{erDiagram-EYBAPDEH-BfLIdaNH.js → erDiagram-EYBAPDEH-D_A5Ddgs.js} +1 -1
- package/web/assets/{flowDiagram-MALGAFMO-Bznd9mmI.js → flowDiagram-MALGAFMO-tTRMeUpP.js} +1 -1
- package/web/assets/{ganttDiagram-23REXITY-B1d5Izgt.js → ganttDiagram-23REXITY-Dko0e4pt.js} +1 -1
- package/web/assets/{gitGraphDiagram-STJD7YCW-4oJOXeNt.js → gitGraphDiagram-STJD7YCW-CLpH2Llw.js} +1 -1
- package/web/assets/index-BjS7o_Gs.js +767 -0
- package/web/assets/{index-BZG1D6oJ.css → index-BubxFPMN.css} +1 -1
- package/web/assets/{infoDiagram-KBXO4MBG-s8ALIoGd.js → infoDiagram-KBXO4MBG-Cf_YXaCy.js} +1 -1
- package/web/assets/{ishikawaDiagram-M35NCXHK-CCLGdUCq.js → ishikawaDiagram-M35NCXHK-BNUjJR-I.js} +1 -1
- package/web/assets/{journeyDiagram-OPLOXDXO-DVUeKyL8.js → journeyDiagram-OPLOXDXO-DW9CX1jJ.js} +1 -1
- package/web/assets/{kanban-definition-BZKZHSQY-z-Im93V7.js → kanban-definition-BZKZHSQY-D5kMETGg.js} +1 -1
- package/web/assets/{mermaid.core-Bpeij6Eb.js → mermaid.core-DrKMwEZo.js} +4 -4
- package/web/assets/{mindmap-definition-I2QAS2VK-BcrLb6db.js → mindmap-definition-I2QAS2VK-CGTN7dUC.js} +1 -1
- package/web/assets/{pegDiagram-FD4XPPHP-CIx8lMXF.js → pegDiagram-FD4XPPHP-B8pSeDvB.js} +1 -1
- package/web/assets/{pieDiagram-J4AKIIQI-uCHWsO4S.js → pieDiagram-J4AKIIQI-unMZGSAm.js} +1 -1
- package/web/assets/{quadrantDiagram-XTYBLID2-BX2qwhme.js → quadrantDiagram-XTYBLID2-CNr8tGSd.js} +1 -1
- package/web/assets/{railroadDiagram-MRQ6NCDL-CjyM79qk.js → railroadDiagram-MRQ6NCDL-DNTLRvF6.js} +1 -1
- package/web/assets/{requirementDiagram-Y7LWUY3S-BJVR4KSl.js → requirementDiagram-Y7LWUY3S-8OWE5U2v.js} +1 -1
- package/web/assets/{sankeyDiagram-WGJFYUXA-D0_hSNij.js → sankeyDiagram-WGJFYUXA-BuRgD8JC.js} +1 -1
- package/web/assets/{sequenceDiagram-5NDRBG5M-DnTdg9Z5.js → sequenceDiagram-5NDRBG5M-Dk98EWvB.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-DpXFdfyw.js → sizeCapture-INFHLROL-CgCDFhLh.js} +1 -1
- package/web/assets/{stateDiagram-v2-FJ4FJNEA-h4W01T-f.js → stateDiagram-v2-FJ4FJNEA-oPZjdCYL.js} +1 -1
- package/web/assets/{swimlanes-UMQ2AFYF-DF1ydmKR.js → swimlanes-UMQ2AFYF-n24AiDnm.js} +1 -1
- package/web/assets/swimlanesDiagram-OMPLPG4O-B1c0Wqw8.js +8 -0
- package/web/assets/{timeline-definition-SEUHKTQE-DKK3MFBh.js → timeline-definition-SEUHKTQE-CbD3aP4-.js} +1 -1
- package/web/assets/{usecaseDiagram-AFA6YXN4-Da7KDGnI.js → usecaseDiagram-AFA6YXN4-bJHinCId.js} +1 -1
- package/web/assets/{vennDiagram-NNMJR3RB-DXmI4Avx.js → vennDiagram-NNMJR3RB-BO0UGuRE.js} +1 -1
- package/web/assets/{wardleyDiagram-S7YFUSEH-Cj0zPvDJ.js → wardleyDiagram-S7YFUSEH-C92NnP4P.js} +1 -1
- package/web/assets/{xychartDiagram-GGNKY7IX-CkEz0WjS.js → xychartDiagram-GGNKY7IX-Dmsz0oIz.js} +1 -1
- package/web/index.html +5 -5
- package/web/assets/index-D_oxh87y.js +0 -719
- package/web/assets/swimlanesDiagram-OMPLPG4O-BuXkTCUS.js +0 -8
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
var du=Object.defineProperty;var uu=(i,e,t)=>e in i?du(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var se=(i,e,t)=>uu(i,typeof e!="symbol"?e+"":e,t);const fu={undo:"撤销",redo:"重做",undoTitle:"撤销 ⌘Z",redoTitle:"重做",expandTo:"展开",expandToTitle:"按层级展开节点",all:"全部",fit:"适应",fitTitle:"适应窗口大小",editMarkdown:"编辑 Markdown",layout:"结构",theme:"配色",export:"导出",find:"查找",findTitle:"查找与替换 ⌘F",present:"演示",presentTitle:"演示模式:逐个节点放映,Esc 退出",openBrowser:"浏览器打开",openBrowserTitle:"在浏览器全屏窗口打开,修改实时双向同步回原文件",trialBadge:"试用 {days}天",proBadge:"PRO",proActive:"Pro 终身会员",trialEnded:"试用已结束",saved:"已保存",readOnly:"只读",savedInCopy:"已更新副本",synced:"已同步",pending:"待保存",saving:"保存中…",saveFailed:"保存失败",loadFailed:"读取文档失败:{status}",cardComingSoon:"海外银行卡支付即将上线。",conflict:"文件已在别处修改,已载入最新内容;刚才这一步修改没有写入,请重做。",unsavedDiscarded:"已切换到另一个文件,上一个文件中尚未保存的最后修改没有写入。",chatContextFile:"请结合思维导图文件 `{file}` 进行分析。",chatContextLines:"来自 `{file}`(第 {start}–{end} 行):",selectNode:"先选中一个节点",newTopic:"新主题",sourceHead:"节点 Markdown",sourcePlaceholder:"先选中一个节点",zoomDiagram:"单独打开",editDiagram:"编辑流程图源码",diagramInvalid:"无法渲染,编辑源码",diagramHint:"触控板:双指平移 · 捏合或 ⌘滚轮缩放 · 双击放大焦点",sourceHint:"修改即时生效并写回文件。表格、图片、多行内容在这里编辑;普通文字也可以在图上双击编辑。",close:"关闭",insertChildNode:"添加子节点",insertSiblingNode:"添加同级节点",insertParentNode:"添加父节点",moveNodeUp:"上移节点",moveNodeDown:"下移节点",removeNode:"删除节点",expandAllDescendants:"展开所有子孙节点",addToChat:"添加到对话",addToChatTitle:"把选中节点对应的 Markdown 发送到 Cursor 对话",findPlaceholder:"查找",replacePlaceholder:"替换为",replace:"替换",replaceAll:"全部替换",noResults:"无结果",replaced:"已替换 {n} 处",prev:"上一个",next:"下一个",exportPng:"导出 PNG 图片",exportSvg:"导出 SVG 矢量图",exportHtml:"导出交互式 HTML 网页",exported:"已导出 {name}",exportFailed:"导出失败:{error}","layout.logicalStructure":"逻辑结构图","layout.mindMap":"思维导图(左右展开)","layout.logicalStructureLeft":"向左逻辑结构图","layout.organizationStructure":"组织结构图","layout.catalogOrganization":"目录组织图","layout.timeline":"时间轴","layout.timeline2":"时间轴(上下交错)","layout.verticalTimeline":"竖向时间轴","layout.fishbone":"鱼骨图","theme.classic":"经典蓝","theme.mint":"薄荷绿","theme.sunset":"暖阳橙","theme.dusk":"夜色(深色)",proTitle:"Inkmap Pro 终身会员",proSubtitle:"一次购买,永久使用,包含后续全部更新","feature.markdown":"在思维导图中编辑 Markdown,并与源文件同步","feature.diagram":"预览 Mermaid 流程图和状态图,修改源码即更新","feature.browser":"在 Chrome 中全屏编辑,与编辑器实时同步","feature.export":"导出无水印高清 PNG、SVG 矢量图与交互式分享 HTML,直接放进文档和 PPT","feature.layouts":"7 种额外结构:组织结构图、目录组织图、时间轴、鱼骨图等","feature.themes":"3 套额外配色,含护眼深色主题","feature.replace":"整张导图查找替换,一键批量修改","feature.present":"演示模式:逐个节点放映,适合讲解、汇报和复习","feature.updates":"终身会员:之后新增的 Pro 功能全部免费获得","featureName.browser":"浏览器全屏编辑","featureName.export":"导出图片","featureName.layouts":"更多结构","featureName.themes":"更多配色","featureName.replace":"查找替换","featureName.present":"演示模式",locked:"「{feature}」是 Pro 功能",buyPro:"立即开通 Pro(¥29.9)",signIn:"登录",signInSecondary:"已购买?登录同步",phoneSignIn:"邮箱验证登录",phoneNumber:"邮箱地址",phonePlaceholder:"请输入邮箱地址(如 name@example.com)",phoneCode:"邮箱验证码(输入 6 位自动验证)",phoneCodePlaceholder:"请输入 6 位数字验证码",sendPhoneCode:"获取验证码",resendPhoneCode:"{seconds}s 后重发",phoneCodeSent:"6 位验证码已发送至邮箱(10 分钟内有效),输入满 6 位自动验证。",phoneCodeSentMagic:"邮件已发送!在邮件里完成付款后,这里会自动开通 Pro,无需输入验证码;已开通 Pro 的邮箱可直接输入 6 位验证码。",phoneNotPro:"该邮箱尚未开通 Pro。请在邮件里点击按钮完成付款,付款后这里会自动开通。",magicSignedIn:"✓ 邮箱已自动验证登录,正在同步权益",phoneInvalid:"请输入有效的邮箱地址。",phoneCodeInvalid:"验证码错误或已过期,请检查后重试。",phoneRateLimited:"请求过于频繁,请稍后重试。",phoneSignInUnavailable:"邮件服务暂不可用,请稍后重试。",signInFailed:"登录失败:{error}",signInPageUnavailable:"验证服务暂时不可用,请重试。",allowAccountPopups:"浏览器拦截了窗口,请点击下方链接继续。",openLoginLink:"继续操作",copyLink:"复制链接",linkCopied:"已复制",editNode:"编辑节点",checkoutOpened:"请在弹出的结账窗口完成支付,完成后自动解锁 Pro。",signInOpened:"请在验证窗口完成登录,已有 Pro 权益将自动同步。",checkoutFailed:"无法发起支付:{error}",trialUntil:"免费试用至 {date}",trialExpired:"7 天免费试用已结束。开通 Pro(¥29.9 一次买断)即可永久使用;若已购买请直接登录。",trialExpiredSignedIn:"7 天免费试用已结束。当前账号尚未开通 Pro,可立即开通(¥29.9)或切换已购账号。",trialExpiredSignIn:"7 天免费试用已结束。获取验证码后会收到开通邮件:在邮件里完成付款,这里会自动开通 Pro,无需输入验证码;已开通 Pro 的邮箱输入验证码即可登录。",trialExpiredNoPro:"7 天免费试用已结束。请查看验证邮件中的专属开通链接,或切换到已开通 Pro 的邮箱。",trialExpiredNoAccount:"7 天免费试用已结束。请在支持账号登录的客户端中同步 Pro 权益。",accountHeading:"已登录",accountTitle:"Inkmap 账号",accountSignedOutSub:"一次买断 · 全平台一账通用",accountSignedOutRestoreSub:"验证邮箱以同步或开通 Pro 权益",accountConnected:"已登录",accountSignedOut:"未登录",accountSync:"验证邮箱后自动同步 Pro 权益(邮件内附专属开通通道)",accountUnavailable:"此面板暂不支持连接账号。",phoneSignInSub:"首次验证自动注册,无需密码",phoneSignInHint:"验证码 10 分钟有效 · 多端自动漫游同步",phoneVerifySubmit:"验证并登录",phoneSignInForPay:"第 1 步:验证邮箱以绑定 Pro 权益",phoneSignInForPaySub:"验证通过后立即显示 ¥29.9 微信收款码",phoneVerifyAndPay:"验证并显示收款码(¥29.9)",wechatPayTitle:"微信扫码开通 Pro",wechatPaySub:"微信扫一扫支付 ¥29.9 · 付款成功即刻自动解锁",wechatPayProduct:"Inkmap Pro 终身版",wechatPayAccount:"绑定账号:{account}",wechatPayWaiting:"等待扫码支付 · 有效至 {time}",wechatPayWaitingSimple:"等待微信扫码支付…",wechatPayExpired:"二维码已过期",wechatPayRefresh:"刷新二维码",wechatPayNote:"¥29.9 一次买断 · 无自动续费 · 永久免费升级",cardPayTitle:"安全银行卡结账",cardPaySub:"支付完成后当前面板自动解锁 Pro",cardPayBtn:"前往安全结账页付款",cardPayWaiting:"等待支付确认,完成后自动解锁…",proUnlocked:"Inkmap Pro 终身版已激活",proPerksTitle:"Pro 终身权益",proPriceTag:"¥29.9 买断","perk.markdown":"Markdown ⇄ 导图实时双向同步,源码与节点互定位","perk.diagram":"Mermaid 流程图、LaTeX 公式与表格原生渲染","perk.layouts":"9 种专业结构 + 夜色深色主题 + 全套快捷键同步","perk.export":"一键导出无水印高清 PNG、矢量 SVG 与交互式分享 HTML","perk.rich":"全平台通用(Cursor / VS Code / DeepSeek / Qoder / WorkBuddy / Claude / Codex / Antigravity / Trae)","perk.present":"逐节点聚焦演示模式 + 全图查找与批量替换","perk.updates":"一次买断永久免费升级 · 14 天无理由全额退款",trialPlan:"7 天免费试用",noProOnAccount:"Pro 尚未开通",proActiveDetail:"全平台终身权益已生效",switchAccount:"切换账号",signOut:"退出登录",signedOut:"已退出账号",signOutFailed:"退出失败:{error}",presentPrev:"← 上一步",presentNext:"下一步 →",presentExit:"退出放映 (Esc)"},pu={undo:"Undo",redo:"Redo",undoTitle:"Undo ⌘Z",redoTitle:"Redo",expandTo:"Expand",expandToTitle:"Expand nodes to level",all:"All",fit:"Fit",fitTitle:"Fit map to window",editMarkdown:"Edit Markdown",layout:"Layout",theme:"Theme",export:"Export",find:"Find",findTitle:"Find and replace ⌘F",present:"Present",presentTitle:"Presentation mode: step through nodes, Esc to exit",openBrowser:"Browser",openBrowserTitle:"Open full-screen in browser with live two-way sync",trialBadge:"{days}d trial",proBadge:"PRO",proActive:"Lifetime Pro",trialEnded:"Trial ended",saved:"Saved",readOnly:"Read only",savedInCopy:"Copy updated",synced:"Synced",pending:"Unsaved",saving:"Saving…",saveFailed:"Save failed",loadFailed:"Could not read the document: {status}",cardComingSoon:"International card checkout ($15) is coming soon.",conflict:"The file changed elsewhere and the latest version was loaded; your last edit was not written, please redo it.",unsavedDiscarded:"Another file was opened before your last edit to the previous file was saved, so that edit was not written.",chatContextFile:"Please use the mind map file `{file}` as context.",chatContextLines:"From `{file}` (lines {start}–{end}):",selectNode:"Select a node first",newTopic:"New topic",sourceHead:"Node Markdown",sourcePlaceholder:"Select a node first",zoomDiagram:"Open separately",editDiagram:"Edit diagram source",diagramInvalid:"Cannot render. Edit source",diagramHint:"Trackpad: two-finger pan · pinch or ⌘-scroll to zoom · double-click to focus",sourceHint:"Changes apply immediately and are written back. Edit tables, images and multi-line content here; plain text can also be edited on the map by double-clicking.",close:"Close",insertChildNode:"Add child node",insertSiblingNode:"Add sibling node",insertParentNode:"Add parent node",moveNodeUp:"Move node up",moveNodeDown:"Move node down",removeNode:"Delete node",expandAllDescendants:"Expand all descendants",addToChat:"Add to Chat",addToChatTitle:"Send the selected node's Markdown to the Cursor chat",findPlaceholder:"Find",replacePlaceholder:"Replace with",replace:"Replace",replaceAll:"Replace all",noResults:"No results",replaced:"Replaced {n}",prev:"Previous",next:"Next",exportPng:"Export PNG image",exportSvg:"Export SVG vector",exportHtml:"Export interactive HTML",exported:"Exported {name}",exportFailed:"Export failed: {error}","layout.logicalStructure":"Logic chart","layout.mindMap":"Mind map (both sides)","layout.logicalStructureLeft":"Logic chart (left)","layout.organizationStructure":"Org chart","layout.catalogOrganization":"Catalog","layout.timeline":"Timeline","layout.timeline2":"Timeline (alternating)","layout.verticalTimeline":"Vertical timeline","layout.fishbone":"Fishbone","theme.classic":"Classic","theme.mint":"Mint","theme.sunset":"Sunset","theme.dusk":"Dusk (dark)",proTitle:"Inkmap Pro — Lifetime",proSubtitle:"Pay once, use forever, every future update included","feature.markdown":"Edit Markdown in the mind map and sync changes to the source file","feature.diagram":"Preview Mermaid flowcharts and state diagrams, then edit their source","feature.browser":"Full-screen editing in Chrome, synced live with your editor","feature.export":"Export watermark-free HD PNG, SVG vector, and interactive shareable HTML","feature.layouts":"7 extra layouts: org chart, catalog, timelines, fishbone and more","feature.themes":"3 extra color themes, including dark","feature.replace":"Find and replace across the whole map","feature.present":"Presentation mode: walk through nodes one by one","feature.updates":"Lifetime: every Pro feature added later is included","featureName.browser":"Browser editing","featureName.export":"Export","featureName.layouts":"More layouts","featureName.themes":"More themes","featureName.replace":"Find and replace","featureName.present":"Presentation mode",locked:"“{feature}” is a Pro feature",buyPro:"Buy Pro ($15)",signIn:"Sign in",signInSecondary:"Already bought? Sign in",phoneSignIn:"Sign in with Email",phoneNumber:"Email address",phonePlaceholder:"you@example.com",phoneCode:"Verification code (auto-verifies at 6 digits)",phoneCodePlaceholder:"Enter 6-digit code",sendPhoneCode:"Send code",resendPhoneCode:"Resend in {seconds}s",phoneCodeSent:"6-digit code sent (valid for 10 min)! Auto-verifies once entered.",phoneCodeSentMagic:"Email sent! Pay from the email and Pro unlocks here automatically, no code needed. If this email already has Pro, enter the 6-digit code.",phoneNotPro:"This email doesn't have Pro yet. Pay from the button in the email and Pro unlocks here automatically.",magicSignedIn:"✓ Email verified & signed in automatically",phoneInvalid:"Enter a valid email address.",phoneCodeInvalid:"The code is incorrect or expired. Check it and try again.",phoneRateLimited:"Too many attempts. Try again in a moment.",phoneSignInUnavailable:"Email verification is temporarily unavailable. Try again shortly.",signInFailed:"Could not sign in: {error}",signInPageUnavailable:"Verification service is temporarily unavailable. Try again.",allowAccountPopups:"Pop-up was blocked. Click the link below to continue.",openLoginLink:"Continue to checkout",copyLink:"Copy link",linkCopied:"Copied",editNode:"Edit node",checkoutOpened:"Complete your $15 payment in the checkout window — Pro unlocks automatically.",signInOpened:"Finish signing in — any existing Pro access will sync automatically.",checkoutFailed:"Could not start checkout: {error}",trialUntil:"Free trial ends {date}",trialExpired:"Your 7-day trial has ended. Buy Pro ($15 lifetime) to continue, or sign in if you already bought it.",trialExpiredSignedIn:"Your 7-day trial has ended. Buy Pro ($15) or switch to an account with Pro access.",trialExpiredSignIn:"Your 7-day trial has ended. Get a code to receive the upgrade email: pay from that email and Pro unlocks here automatically, no code needed. If this email already has Pro, enter the code to sign in.",trialExpiredNoPro:"Your 7-day trial has ended. Use the one-click purchase link in your verification email, or switch accounts.",trialExpiredNoAccount:"Your 7-day trial has ended. Open Inkmap in a client that supports account sign-in.",accountHeading:"Signed in",accountTitle:"Inkmap account",accountSignedOutSub:"One-time purchase · Synced across all platforms",accountSignedOutRestoreSub:"Verify email to sync or activate Pro",accountConnected:"Signed in",accountSignedOut:"Signed out",accountSync:"Sign in with email to sync Pro access (verification email includes a one-click upgrade link).",accountUnavailable:"Account connection is not available in this panel.",phoneSignInSub:"New emails register automatically — no password needed",phoneSignInHint:"Code valid for 10 min · Syncs Pro across all devices",phoneVerifySubmit:"Verify & Sign in",phoneSignInForPay:"Step 1: Verify email to bind your Pro license",phoneSignInForPaySub:"Proceeds immediately to $15 checkout once verified",phoneVerifyAndPay:"Verify & Continue ($15)",wechatPayTitle:"WeChat Pay",wechatPaySub:"Scan to pay · Unlocks Pro automatically",wechatPayProduct:"Inkmap Pro · Lifetime",wechatPayAccount:"Account: {account}",wechatPayWaiting:"Waiting for payment · Valid until {time}",wechatPayWaitingSimple:"Waiting for payment…",wechatPayExpired:"Session expired",wechatPayRefresh:"Refresh",wechatPayNote:"$15 one-time purchase · No subscription · Lifetime updates",cardPayTitle:"Secure Card Checkout ($15)",cardPaySub:"Pay once · Unlocks Pro in this panel automatically",cardPayBtn:"Pay $15 with Card ↗",cardPayWaiting:"Waiting for payment confirmation…",proUnlocked:"Inkmap Pro is now active",proPerksTitle:"Pro Lifetime Perks",proPriceTag:"$15 once","perk.markdown":"Two-way live Markdown ⇄ Mind Map sync & line linking","perk.diagram":"Native Mermaid diagrams, LaTeX math & Markdown tables","perk.layouts":"9 pro layouts, Dusk dark mode & full keyboard shortcuts","perk.export":"One-click watermark-free HD PNG, vector SVG & interactive HTML export","perk.rich":"Works across Cursor, VS Code, DeepSeek, Qoder, WorkBuddy, Claude, Codex, Antigravity & Trae","perk.present":"Presentation mode + global find & batch replace","perk.updates":"Free lifetime upgrades · 14-day full refund guarantee",trialPlan:"7-day free trial",noProOnAccount:"Pro is inactive",proActiveDetail:"Lifetime Pro active across all your devices",switchAccount:"Switch account",signOut:"Sign out",signedOut:"Signed out",signOutFailed:"Could not sign out: {error}",presentPrev:"← Prev",presentNext:"Next →",presentExit:"Exit (Esc)"},ho=/^zh(?:[-_.]|$)/i,mu=/^en(?:[-_.]|$)/i;function gu(i){if(typeof document<"u"){const e=document.documentElement.dataset.osLocale;if(e==="zh")return!0;if(e==="en")return!1}if(i&&ho.test(i))return!0;if(i&&mu.test(i))return!1;try{const e=Intl.DateTimeFormat().resolvedOptions(),t=e.timeZone||"";if(/^(Asia\/(Shanghai|Chongqing|Chungking|Harbin|Urumqi|Beijing)|PRC)$/i.test(t))return!0;if(typeof navigator<"u"){if((Array.isArray(navigator.languages)&&navigator.languages.length?navigator.languages:[navigator.language||""]).some(r=>ho.test(r||"")))return!0}else if(ho.test(e.locale||""))return!0}catch{}return!1}function Pa(i){return gu(i)?"zh":"en"}let V0=Pa();const Ul={zh:fu,en:pu};function vu(i){V0=i,document.documentElement.lang=i==="zh"?"zh-CN":"en"}const Ft=()=>V0;function Q(i,e={}){return(Ul[V0][i]??Ul.en[i]??i).replace(/\{(\w+)\}/g,(n,r)=>String(e[r]??""))}function j0(i=document){i.querySelectorAll("[data-i18n]").forEach(e=>e.textContent=Q(e.dataset.i18n)),i.querySelectorAll("[data-i18n-title]").forEach(e=>e.title=Q(e.dataset.i18nTitle)),i.querySelectorAll("[data-i18n-aria]").forEach(e=>e.setAttribute("aria-label",Q(e.dataset.i18nAria))),i.querySelectorAll("[data-i18n-placeholder]").forEach(e=>e.placeholder=Q(e.dataset.i18nPlaceholder))}const wa=20.8,Gc=12;function xu(i,e,t=e){var c,d;const n=i.value.split(`
|
|
2
|
+
`),r=Math.max(0,n.length-1),s=Math.max(0,Math.min(e,r)),a=Math.max(s,Math.min(t,r));let o=0;for(let f=0;f<s;f++)o+=(((c=n[f])==null?void 0:c.length)??0)+1;let l=o;for(let f=s;f<=a;f++)l+=(((d=n[f])==null?void 0:d.length)??0)+(f<a?1:0);const h=Math.max(0,Gc+s*wa-i.clientHeight*.35);if(document.activeElement===i)try{i.setSelectionRange(o,Math.max(o,l))}catch{}i.scrollTop=h,i.scrollLeft=0,requestAnimationFrame(()=>{i.isConnected&&(i.scrollTop=h,i.scrollLeft=0)})}function yu(i){const e=[],t=[];let n=0;for(const r of i.split(`
|
|
3
|
+
`)){const s=n;n+=r.length+1;const a=/^\s*(`{3,}|~{3,})(.*)$/.exec(r);if(!a)continue;const o=a[1][0],l=a[1].length,h=a[2].trim(),c=t.at(-1);if(c&&o===c.char&&l>=c.len&&h===""){t.pop(),c.diagram&&e.push({start:c.start,end:s});continue}if(c&&c.lang!=="markdown"&&c.lang!=="md"||o==="`"&&h.includes("`"))continue;const d=h.split(/\s+/)[0].toLowerCase();t.push({char:o,len:l,lang:d,start:Math.min(n,i.length),diagram:d==="mermaid"&&t.length<=2})}for(const r of t)r.diagram&&e.push({start:r.start,end:i.length});return e.sort((r,s)=>r.start-s.start)}const ps=()=>window.inkmap;function wu(i=!1){requestAnimationFrame(()=>{try{const e=ps();e==null||e.mindMap.resize(),i&&(e==null||e.mindMap.view.fit())}catch{}})}function co(i=120){window.setTimeout(()=>{var e;try{(e=ps())==null||e.mindMap.view.fit()}catch{}},i)}const bu=/\.markmap\.md$/i,Zo=(i,e)=>i.name.localeCompare(e.name,void 0,{numeric:!0,sensitivity:"base"});function ku(i,e){const t=typeof i.label=="string"?i.label:"",n=t.indexOf(" / ");if(n>0)return{project:t.slice(0,n).trim(),rel:t.slice(n+3).replace(/\\/g,"/"),item:i};const r=(t||(i.path||"").split(/[\\/]/).pop()||"").replace(/\\/g,"/"),s=(i.path||"").replace(/\\/g,"/"),a="/"+r;let o=e;return s.endsWith(a)&&(o=s.slice(0,s.length-a.length).split("/").filter(Boolean).pop()||o),{project:o,rel:r,item:i}}function $l(i,e){return{name:i,key:e,folders:new Map,sortedFolders:[],files:[],totalFiles:0}}function qc(i){const e=[];for(const t of i.folders.values()){for(;t.files.length===0&&t.folders.size===1;){const n=[...t.folders.values()][0];t.name=`${t.name}/${n.name}`,t.key=n.key,t.folders=n.folders,t.files=n.files}qc(t),e.push(t)}e.sort(Zo),i.sortedFolders=e,i.files.sort((t,n)=>t.isMarkmap!==n.isMarkmap?t.isMarkmap?-1:1:Zo(t,n)),i.totalFiles=i.files.length+e.reduce((t,n)=>t+n.totalFiles,0)}function Tu(i,e,t){const n=e.trim().toLowerCase(),r=new Map;for(const a of i){const{project:o,rel:l,item:h}=ku(a,t);if(n&&!o.toLowerCase().includes(n)&&!l.toLowerCase().includes(n))continue;let c=r.get(o);c||(c={name:o,key:`proj:${o}`,active:!1,count:0,root:$l("",`proj:${o}`)},r.set(o,c)),h.group==="active"&&(c.active=!0),c.count++;const d=l.split("/").filter(Boolean),f=d.pop()||l;let m=c.root,v=c.key;for(const g of d){v+=`/${g}`;let x=m.folders.get(g);x||(x=$l(g,v),m.folders.set(g,x)),m=x}m.files.push({name:f,path:h.path,rel:l,project:o,isMarkmap:bu.test(f)})}const s=[...r.values()];for(const a of s)qc(a.root);return s.sort((a,o)=>a.active!==o.active?a.active?-1:1:Zo(a,o)),s}function Eu(i,e,t){const n=r=>{let s=r.files.some(a=>a.path===e);for(const a of r.sortedFolders)n(a)&&(s=!0);return s&&t.add(r.key),s};for(const r of i)r.active&&t.add(r.key),n(r.root)&&t.add(r.key)}function Mu(i,e){const t="M1.75 2.5A1.75 1.75 0 0 0 0 4.25v7.5C0 12.716.784 13.5 1.75 13.5h12.5A1.75 1.75 0 0 0 16 11.75v-5.5A1.75 1.75 0 0 0 14.25 4.5H7.82a.25.25 0 0 1-.177-.073L6.28 3.063A1.75 1.75 0 0 0 5.043 2.5H1.75Z";return{chevron:`<svg class="${i}-chevron" viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4l4 4-4 4"/></svg>`,folder:`<svg class="${i}-icon ${e}-folder" viewBox="0 0 16 16" width="14" height="14" fill="currentColor"><path d="${t}"/></svg>`,mapFile:`<svg class="${i}-icon ${e}-map" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="3.5" cy="8" r="1.75"/><circle cx="12.5" cy="4" r="1.75"/><circle cx="12.5" cy="12" r="1.75"/><path d="M5.25 7.3L10.75 4.7M5.25 8.7l5.5 2.6"/></svg>`,mdFile:`<svg class="${i}-icon ${e}-md" viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 1.5H4A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8a1.5 1.5 0 0 0 1.5-1.5V5.5L9.5 1.5Z"/><path d="M9.5 1.5v4h4"/></svg>`,folderPath:t}}class Su{constructor(e,t){se(this,"lastKey","");this.lineClass=e,this.text=t}invalidate(){this.lastKey=""}render(e,t,n,r=!1){const{textarea:s}=e;if(!s)return;const a=Math.max(1,s.value.split(`
|
|
4
|
+
`).length),o=Math.max(0,Math.min(t,a-1)),l=Math.max(o,Math.min(n,a-1));if(!r){if(e.badge){const c=o===l?`${o+1}`:`${o+1}–${l+1}`;e.badge.textContent=this.text(`行 ${c}`,`Ln ${c}`)}const h=`${a}:${o}:${l}`;if(e.gutter&&h!==this.lastKey){this.lastKey=h;const c=[];for(let d=0;d<a;d++)c.push(`<div class="${this.lineClass}${d>=o&&d<=l?" is-active":""}">${d+1}</div>`);e.gutter.innerHTML=c.join("")}}e.gutter&&(e.gutter.scrollTop=s.scrollTop),e.band&&(e.band.style.transform=`translateY(${Gc+o*wa-s.scrollTop}px)`,e.band.style.height=`${Math.max(1,l-o+1)*wa}px`)}}function Gl(i){const e=i.selectionStart??0,t=i.selectionEnd??e,n=i.value.slice(0,e).split(`
|
|
5
|
+
`).length-1,r=i.value.slice(0,t).split(`
|
|
6
|
+
`).length-1;return{start:n,end:Math.max(n,r)}}const zu=i=>i.replace(/\r\n?/g,`
|
|
7
|
+
`),Cu=(i,e)=>/\r\n/.test(e)?i.replace(/\r?\n/g,`\r
|
|
8
|
+
`):i,Nu=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]);class Qo extends Error{constructor(e,t){super(e),this.url=t}}const Lu=()=>Pa();class Au{constructor(){se(this,"base",/^\/s\/[a-f0-9]{48}\/$/.test(location.pathname)?location.pathname:"/");se(this,"sidebar",this.base!=="/");se(this,"account",this.sidebar?"restore":"purchase");se(this,"hostAccountNavigation",!1);se(this,"currentFile",null);se(this,"currentMd","");se(this,"cachedFiles",[]);se(this,"expandedKeys",new Set);se(this,"initializedExpansionForFile","");se(this,"treeOpen",!1);se(this,"mdOpen",!1);se(this,"treeWidthPx",240);se(this,"mdWidthPx",420);se(this,"mdEditTimer",0);se(this,"activeStartLine",0);se(this,"activeEndLine",0);se(this,"gutter",new Su("md-gutter-ln",(e,t)=>this.uiText(e,t)));se(this,"externalBound",!1);se(this,"treeBtnEl",null);se(this,"splitBtnEl",null);se(this,"treePaneEl",null);se(this,"treeTitleEl",null);se(this,"treeCloseBtnEl",null);se(this,"treeBodyEl",null);se(this,"treeSearchEl",null);se(this,"mdPaneEl",null);se(this,"mdTitleEl",null);se(this,"mdLineBadgeEl",null);se(this,"mdCloseBtnEl",null);se(this,"mdGutterEl",null);se(this,"mdBandEl",null);se(this,"mdTextareaEl",null);se(this,"externalListeners",[]);se(this,"revealListeners",[]);se(this,"openInBrowser",this.sidebar?async()=>{const e=await fetch(this.base+"api/open-browser",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??e.statusText)}}:void 0);se(this,"assetBase",this.base+"doc-assets/");se(this,"locale",Lu());se(this,"events",new EventSource(this.base+"api/events"));se(this,"phoneSignIn",{send:async e=>{const t=await fetch(this.base+"api/phone-send",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({phone:e,locale:Ft()})});return t.ok?(await t.json()).result:{ok:!1,reason:"unavailable"}},verify:async(e,t)=>{const n=await fetch(this.base+"api/phone-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({phone:e,code:t,locale:Ft()})});return n.ok?(await n.json()).result:{ok:!1,reason:"unavailable"}}});window.addEventListener("pagehide",()=>this.events.close(),{once:!0})}get capabilities(){return{saveTarget:"file",account:this.account,compact:this.sidebar,restrictAssets:this.sidebar}}uiText(e,t){return Ft()==="zh"?e:t}renderMdGutterAndBand(e=!1){this.gutter.render({textarea:this.mdTextareaEl,gutter:this.mdGutterEl,band:this.mdBandEl,badge:this.mdLineBadgeEl},this.activeStartLine,this.activeEndLine,e)}syncMdPane(e=this.currentMd,t=!1){if(this.mdTitleEl){const n=this.currentFile&&this.currentFile.split(/[\\/]/).pop()||"Markdown";this.mdTitleEl.textContent=n,this.mdTitleEl.title=this.currentFile||n}if(this.mdTextareaEl){if(t||document.activeElement!==this.mdTextareaEl){const n=zu(e);this.mdTextareaEl.value!==n&&(this.mdTextareaEl.value=n)}this.renderMdGutterAndBand()}}applyWorkspaceLayout(e=!1){const t=this.treeOpen?this.treeWidthPx:0,n=this.mdOpen?this.mdWidthPx:0,r=t+n,s=t;if(document.documentElement.classList.toggle("http-ide-active",r>0),document.documentElement.style.setProperty("--http-tree-w",`${t}px`),document.documentElement.style.setProperty("--http-md-left",`${s}px`),document.documentElement.style.setProperty("--http-md-w",`${n}px`),document.documentElement.style.setProperty("--http-map-left",`${r}px`),this.treePaneEl&&(this.treePaneEl.hidden=!this.treeOpen),this.mdPaneEl&&(this.mdPaneEl.hidden=!this.mdOpen),this.treeBtnEl){this.treeBtnEl.dataset.active=String(this.treeOpen);const a=this.treeBtnEl.querySelector("span");a&&(a.textContent=this.uiText("项目目录","Files")),this.treeBtnEl.title=this.treeOpen?this.uiText("隐藏左侧项目文件目录树","Hide project file tree sidebar"):this.uiText("显示左侧项目文件目录树","Show project file tree sidebar")}this.splitBtnEl&&(this.splitBtnEl.dataset.active=String(this.mdOpen),this.splitBtnEl.textContent=this.mdOpen?this.uiText("仅留导图","Map Only"):this.uiText("左MD/右导图","Split MD"),this.splitBtnEl.title=this.mdOpen?this.uiText("关闭左侧 Markdown 源文件,仅保留右侧思维导图","Close left Markdown source and keep mind map"):this.uiText("打开左侧原始 Markdown、右侧思维导图分屏对比与编辑","Open left raw Markdown + right mind map split view")),this.treeTitleEl&&(this.treeTitleEl.textContent=this.uiText("项目文件 (Explorer)","Project Explorer")),this.treeCloseBtnEl&&(this.treeCloseBtnEl.textContent=this.uiText("× 收起","× Hide")),this.treeSearchEl&&(this.treeSearchEl.placeholder=this.uiText("搜索项目 .md 文件…","Filter .md files…")),this.mdCloseBtnEl&&(this.mdCloseBtnEl.textContent=this.uiText("× 关闭MD","× Close MD")),this.mdOpen&&this.syncMdPane(this.currentMd,!0),this.treeOpen&&this.renderTreeDom(),wu(e)}renderTreeDom(){var o;if(!this.treeBodyEl)return;const e=((o=this.treeSearchEl)==null?void 0:o.value)??"",t=!!e.trim(),n=Tu(this.cachedFiles,e,this.uiText("当前项目","Workspace"));if(this.currentFile&&this.initializedExpansionForFile!==this.currentFile&&(this.initializedExpansionForFile=this.currentFile,Eu(n,this.currentFile,this.expandedKeys)),this.treeBodyEl.innerHTML="",!n.length){const l=document.createElement("div");l.className="http-tree-empty",l.textContent=t?this.uiText("无匹配的 Markdown 文件","No matching Markdown files"):this.uiText("未找到 Markdown 文件","No Markdown files"),this.treeBodyEl.appendChild(l);return}const r=Mu("http-tree","http-icon"),s=l=>{this.expandedKeys.has(l)?this.expandedKeys.delete(l):this.expandedKeys.add(l),this.renderTreeDom()},a=(l,h,c)=>{for(const d of l.sortedFolders){const f=t||this.expandedKeys.has(d.key),m=document.createElement("div");m.className="http-tree-group";const v=document.createElement("button");if(v.type="button",v.className=`http-tree-row http-tree-folder ${f?"is-open":""}`,v.style.paddingLeft=`${8+c*13}px`,v.innerHTML=`${r.chevron}${r.folder}<span class="http-tree-label"></span><span class="http-tree-count">${d.totalFiles}</span>`,v.querySelector(".http-tree-label").textContent=d.name,v.title=d.name,v.addEventListener("click",()=>s(d.key)),m.appendChild(v),f){const g=document.createElement("div");g.className="http-tree-children",a(d,g,c+1),m.appendChild(g)}h.appendChild(m)}for(const d of l.files){const f=d.path===this.currentFile,m=document.createElement("button");m.type="button",m.className=`http-tree-row http-tree-file ${f?"is-selected":""}`,m.style.paddingLeft=`${8+c*13}px`,m.innerHTML=`<span class="http-tree-check">${f?"✓":""}</span>${d.isMarkmap?r.mapFile:r.mdFile}<span class="http-tree-label"></span>${d.isMarkmap?`<span class="http-tree-tag">${this.uiText("导图","Map")}</span>`:""}`,m.querySelector(".http-tree-label").textContent=d.name,m.title=`${d.project} / ${d.rel}`,m.addEventListener("click",()=>{this.switchFile(d.path)}),h.appendChild(m)}};for(const l of n){const h=t||this.expandedKeys.has(l.key)||n.length===1,c=document.createElement("div");c.className="http-tree-project";const d=document.createElement("button");if(d.type="button",d.className=`http-tree-row http-tree-proj-header ${h?"is-open":""}`,d.innerHTML=`${r.chevron}${r.folder}<span class="http-tree-label"></span><span class="http-tree-count">${l.count}</span>`,d.querySelector(".http-tree-label").textContent=l.name,d.addEventListener("click",()=>s(l.key)),c.appendChild(d),h){const f=document.createElement("div");f.className="http-tree-proj-body",a(l.root,f,1),c.appendChild(f)}this.treeBodyEl.appendChild(c)}}async flushPendingEdits(){var e;this.mdEditTimer&&(window.clearTimeout(this.mdEditTimer),this.mdEditTimer=0,await((e=ps())==null?void 0:e.load(this.currentMd,!0)))}async switchFile(e){var r;if(!e||e===this.currentFile)return;await this.flushPendingEdits(),await((r=ps())==null?void 0:r.flushSave());const t=await fetch(this.base+"api/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:e})});if(!t.ok)return;const n=await t.json();this.currentFile=n.currentFile??e,Array.isArray(n.files)&&(this.cachedFiles=n.files),n.doc&&(this.currentMd=n.doc.md,this.syncMdPane(n.doc.md,!0),this.renderTreeDom(),this.externalListeners.forEach(s=>s(n.doc)),co())}mountWorkspaceControls(e){var l,h,c,d,f,m,v;const t=document.getElementById("bar");if(!t||document.getElementById("http-tree-btn"))return;const n=document.createElement("style");n.textContent=`
|
|
9
|
+
:root.http-ide-active #bar {
|
|
10
|
+
top: 0 !important; left: 0 !important; right: 0 !important;
|
|
11
|
+
min-height: 44px; border-radius: 0 !important;
|
|
12
|
+
border-top: none !important; border-left: none !important; border-right: none !important;
|
|
13
|
+
border-bottom: 1px solid var(--ui-border-strong, rgba(31,35,41,.15)) !important;
|
|
14
|
+
box-shadow: none !important; padding: 4px 12px !important;
|
|
15
|
+
background: var(--ui-solid, #fff) !important;
|
|
16
|
+
}
|
|
17
|
+
:root.http-ide-active #map {
|
|
18
|
+
top: var(--toolbar-height, 44px) !important;
|
|
19
|
+
left: var(--http-map-left, 0px) !important;
|
|
20
|
+
width: calc(100vw - var(--http-map-left, 0px)) !important;
|
|
21
|
+
height: calc(100vh - var(--toolbar-height, 44px)) !important;
|
|
22
|
+
}
|
|
23
|
+
#http-tree-btn, #http-split-btn {
|
|
24
|
+
display: inline-flex; align-items: center; gap: 5px; height: 29px; padding: 0 10px;
|
|
25
|
+
border: 1px solid var(--ui-border, rgba(31,35,41,.1)); border-radius: 7px;
|
|
26
|
+
background: var(--ui-subtle, #f6f7f9); font-size: 12px; font-weight: 560;
|
|
27
|
+
}
|
|
28
|
+
#http-tree-btn:hover, #http-split-btn:hover {
|
|
29
|
+
background: var(--ui-hover, rgba(31,35,41,.06)); border-color: var(--ui-border-strong, rgba(31,35,41,.16));
|
|
30
|
+
}
|
|
31
|
+
#http-tree-btn[data-active="true"], #http-split-btn[data-active="true"] {
|
|
32
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
|
|
33
|
+
border-color: color-mix(in srgb, var(--ui-primary, #336df4) 30%, transparent);
|
|
34
|
+
color: var(--ui-primary, #336df4); font-weight: 600;
|
|
35
|
+
}
|
|
36
|
+
#http-tree-pane, #http-md-pane {
|
|
37
|
+
position: fixed; top: var(--toolbar-height, 44px); bottom: 0; z-index: 30;
|
|
38
|
+
display: flex; flex-direction: column;
|
|
39
|
+
background: var(--ui-solid, #fff); color: var(--ui-text, #1f2329);
|
|
40
|
+
border-right: 1px solid var(--ui-border-strong, rgba(31,35,41,.16));
|
|
41
|
+
border-radius: 0; box-shadow: none; overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
#http-tree-pane {
|
|
44
|
+
left: 0; width: var(--http-tree-w, 240px);
|
|
45
|
+
background: var(--ui-subtle, #f6f7f9);
|
|
46
|
+
}
|
|
47
|
+
#http-md-pane {
|
|
48
|
+
left: var(--http-md-left, 240px); width: var(--http-md-w, 420px);
|
|
49
|
+
}
|
|
50
|
+
#http-tree-pane[hidden], #http-md-pane[hidden] { display: none !important; }
|
|
51
|
+
.http-pane-header {
|
|
52
|
+
display: flex; align-items: center; justify-content: space-between; gap: 6px;
|
|
53
|
+
height: 35px; padding: 0 10px; box-sizing: border-box;
|
|
54
|
+
border-bottom: 1px solid var(--ui-border, rgba(31,35,41,.09));
|
|
55
|
+
background: var(--ui-subtle, #f6f7f9); font-size: 12px; flex: none;
|
|
56
|
+
}
|
|
57
|
+
.http-pane-title {
|
|
58
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
59
|
+
font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
|
|
60
|
+
}
|
|
61
|
+
.http-md-line-badge {
|
|
62
|
+
font-size: 11px; font-weight: 560; font-variant-numeric: tabular-nums;
|
|
63
|
+
padding: 1px 6px; border-radius: 4px;
|
|
64
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
|
|
65
|
+
color: var(--ui-primary, #336df4); flex: none;
|
|
66
|
+
}
|
|
67
|
+
.http-pane-close {
|
|
68
|
+
border: 1px solid var(--ui-border-strong, rgba(31,35,41,.15)); background: var(--ui-solid, #fff);
|
|
69
|
+
color: var(--ui-muted, #646a73); border-radius: 5px; padding: 2px 7px; font-size: 11px; cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
.http-pane-close:hover { background: var(--ui-hover, rgba(31,35,41,.06)); color: var(--ui-text, #1f2329); }
|
|
72
|
+
.http-tree-search-box {
|
|
73
|
+
padding: 6px 8px; border-bottom: 1px solid var(--ui-border, rgba(31,35,41,.08)); flex: none;
|
|
74
|
+
}
|
|
75
|
+
.http-tree-search {
|
|
76
|
+
width: 100%; box-sizing: border-box; border: 1px solid var(--ui-border-strong, rgba(31,35,41,.15));
|
|
77
|
+
border-radius: 6px; padding: 4px 8px; font-size: 12px; background: var(--ui-solid, #fff);
|
|
78
|
+
color: var(--ui-text, #1f2329); outline: none;
|
|
79
|
+
}
|
|
80
|
+
.http-tree-search:focus { border-color: var(--ui-primary, #336df4); }
|
|
81
|
+
.http-tree-body { flex: 1; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
|
|
82
|
+
.http-tree-row {
|
|
83
|
+
display: flex; align-items: center; gap: 5px; width: 100%; box-sizing: border-box;
|
|
84
|
+
min-height: 26px; padding: 3px 7px; border: 0; border-radius: 6px;
|
|
85
|
+
background: transparent; color: var(--ui-text, #1f2329); font-size: 12px;
|
|
86
|
+
cursor: pointer; text-align: left;
|
|
87
|
+
}
|
|
88
|
+
.http-tree-row:hover { background: var(--ui-hover, rgba(31,35,41,.06)); }
|
|
89
|
+
.http-tree-proj-header { font-weight: 650; color: var(--ui-muted, #646a73); }
|
|
90
|
+
.http-tree-folder { font-weight: 550; }
|
|
91
|
+
.http-tree-chevron { flex: none; color: var(--ui-muted, #646a73); transition: transform .14s ease; }
|
|
92
|
+
.http-tree-folder.is-open > .http-tree-chevron,
|
|
93
|
+
.http-tree-proj-header.is-open > .http-tree-chevron { transform: rotate(90deg); }
|
|
94
|
+
.http-tree-icon { flex: none; }
|
|
95
|
+
.http-icon-folder { color: #e09f3e; }
|
|
96
|
+
.http-icon-map { color: var(--ui-primary, #336df4); }
|
|
97
|
+
.http-icon-md { color: var(--ui-muted, #646a73); }
|
|
98
|
+
.http-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
99
|
+
.http-tree-count {
|
|
100
|
+
flex: none; font-size: 10px; color: var(--ui-muted, #646a73);
|
|
101
|
+
background: color-mix(in srgb, var(--ui-text, #1f2329) 6%, transparent);
|
|
102
|
+
padding: 0 5px; border-radius: 999px;
|
|
103
|
+
}
|
|
104
|
+
.http-tree-check { width: 11px; flex: none; font-size: 11px; font-weight: 700; color: var(--ui-primary, #336df4); }
|
|
105
|
+
.http-tree-tag {
|
|
106
|
+
flex: none; font-size: 10px; font-weight: 600; padding: 0 4px; border-radius: 4px;
|
|
107
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent); color: var(--ui-primary, #336df4);
|
|
108
|
+
}
|
|
109
|
+
.http-tree-file.is-selected {
|
|
110
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
|
|
111
|
+
color: var(--ui-primary, #336df4); font-weight: 600;
|
|
112
|
+
}
|
|
113
|
+
.http-tree-empty { padding: 16px 10px; text-align: center; font-size: 12px; color: var(--ui-muted, #646a73); }
|
|
114
|
+
.http-md-body {
|
|
115
|
+
position: relative; flex: 1; display: flex; min-height: 0; overflow: hidden;
|
|
116
|
+
background: var(--ui-solid, #fff);
|
|
117
|
+
}
|
|
118
|
+
#http-md-gutter {
|
|
119
|
+
width: 40px; flex: none; overflow: hidden; user-select: none;
|
|
120
|
+
padding: 12px 6px 12px 0; box-sizing: border-box; text-align: right;
|
|
121
|
+
background: color-mix(in srgb, var(--ui-subtle, #f6f7f9) 65%, var(--ui-solid, #fff));
|
|
122
|
+
border-right: 1px solid var(--ui-border, rgba(31,35,41,.08));
|
|
123
|
+
font: 11.5px/20.8px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
124
|
+
color: var(--ui-muted, #646a73); font-variant-numeric: tabular-nums;
|
|
125
|
+
}
|
|
126
|
+
.md-gutter-ln { height: 20.8px; padding-right: 4px; }
|
|
127
|
+
.md-gutter-ln.is-active {
|
|
128
|
+
color: var(--ui-primary, #336df4); font-weight: 700;
|
|
129
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 12%, transparent);
|
|
130
|
+
}
|
|
131
|
+
.http-md-editor-stage {
|
|
132
|
+
position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden;
|
|
133
|
+
}
|
|
134
|
+
#http-md-band {
|
|
135
|
+
position: absolute; left: 0; right: 0; top: 0; height: 20.8px; pointer-events: none;
|
|
136
|
+
background: color-mix(in srgb, var(--ui-primary, #336df4) 10%, transparent);
|
|
137
|
+
border-left: 2.5px solid var(--ui-primary, #336df4);
|
|
138
|
+
transition: transform .06s ease-out, height .06s ease-out;
|
|
139
|
+
}
|
|
140
|
+
#http-md-textarea {
|
|
141
|
+
position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: border-box;
|
|
142
|
+
border: 0; outline: none; resize: none;
|
|
143
|
+
padding: 12px 14px; background: transparent; color: var(--ui-text, #1f2329);
|
|
144
|
+
font: 13px/20.8px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
145
|
+
tab-size: 2; white-space: pre; overflow: auto;
|
|
146
|
+
}
|
|
147
|
+
.http-pane-resizer {
|
|
148
|
+
position: absolute; top: 0; right: 0; bottom: 0; width: 5px; z-index: 5; cursor: col-resize; background: transparent;
|
|
149
|
+
transition: background .12s ease;
|
|
150
|
+
}
|
|
151
|
+
.http-pane-resizer:hover, .http-pane-resizer:active { background: var(--ui-primary, #336df4); }
|
|
152
|
+
`,document.head.appendChild(n),this.treeBtnEl=document.createElement("button"),this.treeBtnEl.id="http-tree-btn",this.treeBtnEl.type="button",this.treeBtnEl.innerHTML=`<svg viewBox="0 0 16 16" width="13" height="13" fill="currentColor"><path d="M1.75 2.5A1.75 1.75 0 0 0 0 4.25v7.5C0 12.716.784 13.5 1.75 13.5h12.5A1.75 1.75 0 0 0 16 11.75v-5.5A1.75 1.75 0 0 0 14.25 4.5H7.82a.25.25 0 0 1-.177-.073L6.28 3.063A1.75 1.75 0 0 0 5.043 2.5H1.75Z"/></svg><span>${this.uiText("项目目录","Files")}</span>`,this.treeBtnEl.addEventListener("click",()=>{var g;this.treeOpen=!this.treeOpen,this.applyWorkspaceLayout(!0),(g=this.treeBtnEl)==null||g.blur()}),this.splitBtnEl=document.createElement("button"),this.splitBtnEl.id="http-split-btn",this.splitBtnEl.type="button",this.splitBtnEl.addEventListener("click",()=>{var g;this.mdOpen=!this.mdOpen,this.mdOpen&&this.track("split_view"),this.applyWorkspaceLayout(!0),(g=this.splitBtnEl)==null||g.blur()});const r=document.createElement("span");r.className="sep",t.prepend(this.treeBtnEl,this.splitBtnEl,r),this.treePaneEl=document.createElement("aside"),this.treePaneEl.id="http-tree-pane",this.treePaneEl.hidden=!0,this.treePaneEl.innerHTML=`
|
|
153
|
+
<div class="http-pane-header">
|
|
154
|
+
<span class="http-pane-title" id="http-tree-title">${this.uiText("项目文件 (Explorer)","Project Explorer")}</span>
|
|
155
|
+
<button type="button" class="http-pane-close" id="http-tree-close">${this.uiText("× 收起","× Hide")}</button>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="http-tree-search-box">
|
|
158
|
+
<input type="search" class="http-tree-search" placeholder="${this.uiText("搜索项目 .md 文件…","Filter .md files…")}" />
|
|
159
|
+
</div>
|
|
160
|
+
<div class="http-tree-body" role="tree"></div>
|
|
161
|
+
<div class="http-pane-resizer" id="http-tree-resizer" title="${this.uiText("拖拽调整目录树宽度","Drag to resize file tree")}"></div>
|
|
162
|
+
`,document.body.appendChild(this.treePaneEl),this.treeTitleEl=this.treePaneEl.querySelector("#http-tree-title"),this.treeCloseBtnEl=this.treePaneEl.querySelector("#http-tree-close"),this.treeBodyEl=this.treePaneEl.querySelector(".http-tree-body"),this.treeSearchEl=this.treePaneEl.querySelector(".http-tree-search"),(l=this.treeSearchEl)==null||l.addEventListener("input",()=>this.renderTreeDom()),(h=this.treeCloseBtnEl)==null||h.addEventListener("click",()=>{this.treeOpen=!1,this.applyWorkspaceLayout(!0)});const s=this.treePaneEl.querySelector("#http-tree-resizer");s==null||s.addEventListener("pointerdown",g=>{g.preventDefault(),s.setPointerCapture(g.pointerId);const x=N=>{this.treeWidthPx=Math.max(170,Math.min(420,Math.round(N.clientX))),this.applyWorkspaceLayout(!1)},w=()=>{s.removeEventListener("pointermove",x),s.removeEventListener("pointerup",w),s.removeEventListener("pointercancel",w),co(0)};s.addEventListener("pointermove",x),s.addEventListener("pointerup",w),s.addEventListener("pointercancel",w)}),this.mdPaneEl=document.createElement("aside"),this.mdPaneEl.id="http-md-pane",this.mdPaneEl.hidden=!0,this.mdPaneEl.innerHTML=`
|
|
163
|
+
<div class="http-pane-header">
|
|
164
|
+
<span class="http-pane-title" id="http-md-title">Markdown</span>
|
|
165
|
+
<span class="http-md-line-badge" id="http-md-line-badge">Ln 1</span>
|
|
166
|
+
<button type="button" class="http-pane-close" id="http-md-close">${this.uiText("× 关闭MD","× Close MD")}</button>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="http-md-body">
|
|
169
|
+
<div id="http-md-gutter" aria-hidden="true"></div>
|
|
170
|
+
<div class="http-md-editor-stage">
|
|
171
|
+
<div id="http-md-band" aria-hidden="true"></div>
|
|
172
|
+
<textarea id="http-md-textarea" spellcheck="false"></textarea>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="http-pane-resizer" id="http-md-resizer" title="${this.uiText("拖拽调整原文件窗口宽度","Drag to resize Markdown pane")}"></div>
|
|
176
|
+
`,document.body.appendChild(this.mdPaneEl),this.mdTitleEl=this.mdPaneEl.querySelector("#http-md-title"),this.mdLineBadgeEl=this.mdPaneEl.querySelector("#http-md-line-badge"),this.mdCloseBtnEl=this.mdPaneEl.querySelector("#http-md-close"),this.mdGutterEl=this.mdPaneEl.querySelector("#http-md-gutter"),this.mdBandEl=this.mdPaneEl.querySelector("#http-md-band"),this.mdTextareaEl=this.mdPaneEl.querySelector("#http-md-textarea"),(c=this.mdCloseBtnEl)==null||c.addEventListener("click",()=>{this.mdOpen=!1,this.applyWorkspaceLayout(!0)}),(d=this.mdTextareaEl)==null||d.addEventListener("scroll",()=>{this.renderMdGutterAndBand(!0)});const a=()=>{if(!this.mdTextareaEl)return;const{start:g,end:x}=Gl(this.mdTextareaEl);this.activeStartLine=g,this.activeEndLine=x,this.renderMdGutterAndBand(),this.revealListeners.forEach(w=>w(g))};(f=this.mdTextareaEl)==null||f.addEventListener("click",a),(m=this.mdTextareaEl)==null||m.addEventListener("keyup",g=>{Nu.has(g.key)&&a()}),(v=this.mdTextareaEl)==null||v.addEventListener("input",()=>{const g=this.mdTextareaEl,x=Cu(g.value,this.currentMd);this.currentMd=x;const{start:w}=Gl(g);this.activeStartLine=w,this.activeEndLine=w,this.renderMdGutterAndBand(),window.clearTimeout(this.mdEditTimer),this.mdEditTimer=window.setTimeout(()=>{var N;this.mdEditTimer=0,(N=ps())==null||N.load(x,!0).then(()=>{this.revealListeners.forEach(M=>M(w))})},280)});const o=this.mdPaneEl.querySelector("#http-md-resizer");o==null||o.addEventListener("pointerdown",g=>{g.preventDefault(),o.setPointerCapture(g.pointerId);const x=N=>{const M=this.treeOpen?this.treeWidthPx:0,z=Math.max(260,Math.round(window.innerWidth*.65)-M);this.mdWidthPx=Math.max(220,Math.min(z,Math.round(N.clientX-M))),this.applyWorkspaceLayout(!1)},w=()=>{o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",w),o.removeEventListener("pointercancel",w),co(0)};o.addEventListener("pointermove",x),o.addEventListener("pointerup",w),o.addEventListener("pointercancel",w)}),e&&(this.treeOpen=!0,this.mdOpen=!0),this.applyWorkspaceLayout(!1)}async load(){const[e,t,n]=await Promise.all([fetch(this.base+"api/doc"),fetch(this.base+"api/capabilities").then(o=>o.ok?o.json():null).catch(()=>null),fetch(this.base+"api/files").then(o=>o.ok?o.json():null).catch(()=>null)]);if(!e.ok)throw new Error(Q("loadFailed",{status:e.status}));t?this.account=t.purchase===!0?"purchase":"restore":this.sidebar&&(this.account="restore"),this.hostAccountNavigation=(t==null?void 0:t.accountNavigation)==="host"&&new URLSearchParams(location.search).get("account-navigation")==="host"&&window.parent!==window;const r=await e.json();this.currentMd=r.md,this.currentFile=(n==null?void 0:n.currentFile)??r.currentFile??null,Array.isArray(n==null?void 0:n.files)&&(this.cachedFiles=n.files);const s=new URLSearchParams(location.search).get("ide")==="1",a=!this.sidebar&&(s||(t==null?void 0:t.ideWorkspace)===!0);return this.mountWorkspaceControls(a),this.syncMdPane(r.md,!0),r}onReveal(e){this.revealListeners.push(e)}select(e,t=e){this.activeStartLine=Math.max(0,e),this.activeEndLine=Math.max(this.activeStartLine,t),!(!this.mdTextareaEl||!this.mdOpen)&&(xu(this.mdTextareaEl,this.activeStartLine,this.activeEndLine),this.renderMdGutterAndBand())}onMapMarkdownChange(e){this.currentMd=e,this.syncMdPane(e,!1)}async save(e,t){this.currentMd=e,this.syncMdPane(e,!1);const n=await fetch(this.base+"api/doc",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({md:e,baseVersion:t})});if(n.status===409){const s=await n.json();return this.currentMd=s.md,this.syncMdPane(s.md,!0),{ok:!1,doc:s}}if(!n.ok)throw new Error(`${Q("saveFailed")}: ${n.status}`);return{ok:!0,...await n.json()}}onExternalChange(e){this.externalListeners.push(e),!this.externalBound&&(this.externalBound=!0,this.events.addEventListener("change",t=>{const n=JSON.parse(t.data),r=!!(n.currentFile&&n.currentFile!==this.currentFile),s=n.md!==this.currentMd,a=r&&this.mdEditTimer!==0;r&&(window.clearTimeout(this.mdEditTimer),this.mdEditTimer=0),this.currentMd=n.md,n.currentFile&&(this.currentFile=n.currentFile),(r||s)&&this.syncMdPane(n.md,r),this.treeOpen&&this.renderTreeDom();const o=a?{...n,discardedEdits:!0}:n;this.externalListeners.forEach(l=>l(o))}))}saveView(e){fetch(this.base+"api/view",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e),keepalive:!0}).catch(()=>{})}async license(){const e=await fetch(this.base+"api/license");return e.ok?e.json():{pro:!1}}async checkout(e){if(this.hostAccountNavigation){await new Promise((n,r)=>{const s=crypto.randomUUID(),a="inkmap:open-account";function o(c){window.clearTimeout(h),window.removeEventListener("message",l),c?n():r(new Error(Q("signInPageUnavailable")))}function l(c){var d;c.source===window.parent&&((d=c.data)==null?void 0:d.type)===a&&c.data.id===s&&o(c.data.ok===!0)}const h=window.setTimeout(()=>o(!1),12e3);window.addEventListener("message",l),window.parent.postMessage({type:a,id:s,mode:e,locale:Ft()},"*")});return}const t=window.open("about:blank","_blank");t&&(t.opener=null);try{const n=await fetch(this.base+"api/checkout",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:e,locale:Ft()})}),r=await n.json();if(!n.ok)throw new Error(r.error??n.statusText);if(!t)throw new Qo(Q("allowAccountPopups"),r.url);t.location.replace(r.url)}catch(n){throw t==null||t.close(),n}}async orderPro(){const e=await fetch(this.base+"api/order-pro",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({locale:Ft()})});if(e.status===501)return await this.checkout("buy"),{status:"redirect",url:"about:blank"};const t=await e.json().catch(()=>({}));if(!e.ok)throw new Error(t.error??e.statusText);const n=t.result;return n.status==="redirect"&&/^https:\/\//.test(n.url)&&window.open(n.url,"_blank","noopener,noreferrer"),n}openExternalUrl(e){/^https:\/\//.test(e)&&window.open(e,"_blank","noopener,noreferrer")}async signOut(){const e=await fetch(this.base+"api/signout",{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error??e.statusText)}}onLicenseChange(e){this.events.addEventListener("license",n=>e(JSON.parse(n.data)));const t=()=>{this.license().then(e).catch(()=>{})};window.addEventListener("focus",t),window.addEventListener("pagehide",()=>window.removeEventListener("focus",t),{once:!0})}async saveFile(e,t){const n=document.createElement("a");return n.href=t,n.download=e,n.click(),!0}track(e){fetch(this.base+"api/telemetry",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({event:e})}).catch(()=>{})}}class _u{constructor(e,t,n){se(this,"capabilities",{saveTarget:"editor",account:window.INKMAP_ACCOUNT_MODE??"purchase"});se(this,"nextId",1);se(this,"waiting",new Map);se(this,"listeners",{});se(this,"first");se(this,"currentLicense");se(this,"history",{undo:()=>this.post({type:"undo"}),redo:()=>this.post({type:"redo"})});se(this,"phoneSignIn",{send:e=>this.request(t=>({type:"sendPhoneCode",id:t,phone:e,locale:Ft()}),t=>t.result),verify:(e,t)=>this.request(n=>({type:"signInByPhone",id:n,phone:e,code:t,locale:Ft()}),n=>{const{result:r}=n;return r.ok&&(this.currentLicense=r.value),r})});this.api=e,this.assetBase=t,this.locale=n,window.addEventListener("message",r=>{var a;const s=r.data;!s||typeof s!="object"||("id"in s&&this.waiting.has(s.id)&&(this.waiting.get(s.id)(s),this.waiting.delete(s.id)),s.type==="license"&&(this.currentLicense=s.state),(a=this.listeners[s.type])==null||a.forEach(o=>o(s)))})}on(e,t){const n=e;this.listeners[n]=[...this.listeners[n]??[],t]}post(e){this.api.postMessage(e)}request(e,t,n=0){const r=this.nextId++;return new Promise((s,a)=>{const o=n?window.setTimeout(()=>{this.waiting.delete(r),a(new Error(Q("saveFailed")))},n):0;this.waiting.set(r,l=>{window.clearTimeout(o),l.type==="error"?a(new Error(l.message)):s(t(l))}),this.post(e(r))})}hello(){return this.first??(this.first=new Promise(e=>{this.on("doc",t=>e(t)),this.post({type:"ready"})}))}async load(){return(await this.hello()).doc}save(e,t){return this.request(n=>({type:"save",id:n,md:e,baseVersion:t}),n=>n.type==="saved"?{ok:!0,version:n.version}:{ok:!1,doc:n.doc},3e4)}onExternalChange(e){this.on("change",t=>e(t.doc))}onReveal(e){this.on("reveal",t=>e(t.line))}select(e,t){this.post({type:"select",line:e,...t!==void 0&&{endLine:t}})}onMapMarkdownChange(e){this.post({type:"mapMarkdownChange",md:e})}saveView(e){this.post({type:"viewState",state:e})}async canAddToChat(){return(await this.hello()).chat===!0}addToChat(e){this.post({type:"addToChat",...e})}onChatRequest(e){this.on("requestChat",()=>e())}async license(){return this.currentLicense??(await this.hello()).license}checkout(e){return this.request(t=>({type:"checkout",id:t,mode:e,locale:Ft()}),()=>{})}orderPro(){return this.request(e=>({type:"orderPro",id:e,locale:Ft()}),e=>{const{result:t}=e;return t.status==="active"&&(this.currentLicense=t.state),t})}openExternalUrl(e){/^https:\/\//.test(e)&&this.post({type:"openExternal",url:e})}openInBrowser(){this.post({type:"openInBrowser"})}signOut(){return this.request(e=>({type:"signOut",id:e}),()=>{})}onLicenseChange(e){this.on("license",t=>e(t.state))}onOpenAccountRequest(e){this.on("openAccount",()=>e())}saveFile(e,t){return this.request(n=>({type:"saveFile",id:n,name:e,dataUrl:t}),n=>n.saved)}track(e){this.post({type:"telemetry",event:e})}}function Du(){if(window.acquireVsCodeApi){const i=Pa(window.INKMAP_LOCALE);return new _u(window.acquireVsCodeApi(),window.INKMAP_ASSET_BASE??"",i)}return new Au}const D={CHANGE_THEME:"changeTheme",CHANGE_LAYOUT:"changeLayout",MODE:{READONLY:"readonly",EDIT:"edit"},LAYOUT:{LOGICAL_STRUCTURE:"logicalStructure",LOGICAL_STRUCTURE_LEFT:"logicalStructureLeft",MIND_MAP:"mindMap",ORGANIZATION_STRUCTURE:"organizationStructure",CATALOG_ORGANIZATION:"catalogOrganization",TIMELINE:"timeline",TIMELINE2:"timeline2",FISHBONE:"fishbone",FISHBONE2:"fishbone2",RIGHT_FISHBONE:"rightFishbone",RIGHT_FISHBONE2:"rightFishbone2",VERTICAL_TIMELINE:"verticalTimeline",VERTICAL_TIMELINE2:"verticalTimeline2",VERTICAL_TIMELINE3:"verticalTimeline3"},DIR:{UP:"up",LEFT:"left",DOWN:"down",RIGHT:"right"},KEY_DIR:{LEFT:"Left",UP:"Up",RIGHT:"Right",DOWN:"Down"},SHAPE:{RECTANGLE:"rectangle",DIAMOND:"diamond",PARALLELOGRAM:"parallelogram",ROUNDED_RECTANGLE:"roundedRectangle",OCTAGONAL_RECTANGLE:"octagonalRectangle",OUTER_TRIANGULAR_RECTANGLE:"outerTriangularRectangle",INNER_TRIANGULAR_RECTANGLE:"innerTriangularRectangle",ELLIPSE:"ellipse",CIRCLE:"circle"},MOUSE_WHEEL_ACTION:{ZOOM:"zoom",MOVE:"move"},INIT_ROOT_NODE_POSITION:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom",CENTER:"center"},LAYOUT_GROW_DIR:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"},CREATE_NEW_NODE_BEHAVIOR:{DEFAULT:"default",NOT_ACTIVE:"notActive",ACTIVE_ONLY:"activeOnly"},TAG_PLACEMENT:{RIGHT:"right",BOTTOM:"bottom"},IMG_PLACEMENT:{LEFT:"left",TOP:"top",RIGHT:"right",BOTTOM:"bottom"}},ql={[D.INIT_ROOT_NODE_POSITION.LEFT]:0,[D.INIT_ROOT_NODE_POSITION.TOP]:0,[D.INIT_ROOT_NODE_POSITION.RIGHT]:1,[D.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[D.INIT_ROOT_NODE_POSITION.CENTER]:.5},Wl=[D.LAYOUT.LOGICAL_STRUCTURE,D.LAYOUT.LOGICAL_STRUCTURE_LEFT,D.LAYOUT.MIND_MAP,D.LAYOUT.CATALOG_ORGANIZATION,D.LAYOUT.ORGANIZATION_STRUCTURE,D.LAYOUT.TIMELINE,D.LAYOUT.TIMELINE2,D.LAYOUT.VERTICAL_TIMELINE,D.LAYOUT.VERTICAL_TIMELINE2,D.LAYOUT.VERTICAL_TIMELINE3,D.LAYOUT.FISHBONE,D.LAYOUT.FISHBONE2,D.LAYOUT.RIGHT_FISHBONE,D.LAYOUT.RIGHT_FISHBONE2],ba=["text","image","imageTitle","imageSize","icon","tag","hyperlink","hyperlinkTitle","note","expand","isActive","generalization","richText","resetRichText","uid","activeStyle","associativeLineTargets","associativeLineTargetControlOffsets","associativeLinePoint","associativeLineText","attachmentUrl","attachmentName","notation","outerFrame","number","range","customLeft","customTop","customTextWidth","checkbox","dir","needUpdate","imgMap","nodeLink"],er={READ_CLIPBOARD_ERROR:"read_clipboard_error",PARSE_PASTE_DATA_ERROR:"parse_paste_data_error",CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR:"custom_handle_clipboard_text_error",LOAD_CLIPBOARD_IMAGE_ERROR:"load_clipboard_image_error",BEFORE_TEXT_EDIT_ERROR:"before_text_edit_error",EXPORT_ERROR:"export_error",EXPORT_LOAD_IMAGE_ERROR:"export_load_image_error",DATA_CHANGE_DETAIL_EVENT_ERROR:"data_change_detail_event_error"},Ru=`
|
|
177
|
+
/* 鼠标hover和激活时渲染的矩形 */
|
|
178
|
+
.smm-hover-node{
|
|
179
|
+
display: none;
|
|
180
|
+
opacity: 0.6;
|
|
181
|
+
stroke-width: 1;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.smm-node:not(.smm-node-dragging):hover .smm-hover-node{
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{
|
|
189
|
+
display: block;
|
|
190
|
+
opacity: 1;
|
|
191
|
+
stroke-width: 2;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.smm-text-node-wrap, .smm-expand-btn-text {
|
|
195
|
+
user-select: none;
|
|
196
|
+
}
|
|
197
|
+
`,Iu=["img","br","hr","input","link","meta","area"],ka=1.2,Ou=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];class Bu{constructor(e={}){this.opt=e,this.mindMap=this.opt.mindMap,this.scale=1,this.sx=0,this.sy=0,this.x=0,this.y=0,this.firstDrag=!0,this.setTransformData(this.mindMap.opt.viewData),this.bind()}bind(){this.mindMap.keyCommand.addShortcut("Control+=",()=>{this.enlarge()}),this.mindMap.keyCommand.addShortcut("Control+-",()=>{this.narrow()}),this.mindMap.keyCommand.addShortcut("Control+i",()=>{this.fit()}),this.mindMap.event.on("mousedown",e=>{const{isDisableDrag:t,mousedownEventPreventDefault:n}=this.mindMap.opt;t||(n&&e.preventDefault(),this.sx=this.x,this.sy=this.y)}),this.mindMap.event.on("drag",(e,t)=>{e.ctrlKey||e.metaKey||this.mindMap.opt.isDisableDrag||(this.firstDrag&&(this.firstDrag=!1,this.mindMap.renderer.activeNodeList.length>0&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")),this.x=this.sx+t.mousemoveOffset.x,this.y=this.sy+t.mousemoveOffset.y,this.transform())}),this.mindMap.event.on("mouseup",()=>{this.firstDrag=!0}),this.mindMap.event.on("mousewheel",(e,t,n,r)=>{const{customHandleMousewheel:s,mousewheelAction:a,mouseScaleCenterUseMousePosition:o,mousewheelMoveStep:l,mousewheelZoomActionReverse:h,disableMouseWheelZoom:c,translateRatio:d}=this.mindMap.opt;if(s&&typeof s=="function")return s(e);if(a===D.MOUSE_WHEEL_ACTION.ZOOM||e.ctrlKey||e.metaKey){if(c)return;const{x:f,y:m}=this.mindMap.toPos(e.clientX,e.clientY),v=o?f:void 0,g=o?m:void 0;switch(r&&(t.includes(D.DIR.LEFT)||t.includes(D.DIR.RIGHT))&&(t=t.filter(x=>![D.DIR.LEFT,D.DIR.RIGHT].includes(x))),!0){case t.includes(D.DIR.UP):h?this.enlarge(v,g,r):this.narrow(v,g,r);break;case t.includes(D.DIR.DOWN):h?this.narrow(v,g,r):this.enlarge(v,g,r);break}}else{let f=0,m=0;r?(f=Math.abs(e.wheelDeltaX),m=Math.abs(e.wheelDeltaY)):f=m=l;let v=0,g=0;t.includes(D.DIR.DOWN)&&(g=-m),t.includes(D.DIR.UP)&&(g=m),t.includes(D.DIR.LEFT)&&(v=f),t.includes(D.DIR.RIGHT)&&(v=-f),this.translateXY(v*d,g*d)}}),this.mindMap.on("resize",()=>{this.checkNeedMindMapInCanvas()&&this.transform()})}getTransformData(){return{transform:this.mindMap.draw.transform(),state:{scale:this.scale,x:this.x,y:this.y,sx:this.sx,sy:this.sy}}}setTransformData(e){e&&(Object.keys(e.state).forEach(t=>{this[t]=e.state[t]}),this.mindMap.draw.transform({...e.transform}),this.mindMap.emit("view_data_change",this.getTransformData()),this.emitEvent("scale"),this.emitEvent("translate"))}translateXY(e,t){e===0&&t===0||(this.x+=e,this.y+=t,this.transform(),this.emitEvent("translate"))}translateX(e){e!==0&&(this.x+=e,this.transform(),this.emitEvent("translate"))}translateXTo(e){this.x=e,this.transform(),this.emitEvent("translate")}translateY(e){e!==0&&(this.y+=e,this.transform(),this.emitEvent("translate"))}translateYTo(e){this.y=e,this.transform(),this.emitEvent("translate")}transform(){try{this.limitMindMapInCanvas()}catch{}this.mindMap.draw.transform({origin:[0,0],scale:this.scale,translate:[this.x,this.y]}),this.mindMap.emit("view_data_change",this.getTransformData())}reset(){const e=this.scale!==1,t=this.x!==0||this.y!==0;this.scale=1,this.x=0,this.y=0,this.transform(),e&&this.emitEvent("scale"),t&&this.emitEvent("translate")}narrow(e,t,n){let{scaleRatio:r,minZoomRatio:s}=this.mindMap.opt;r=r/(n?5:1);const a=Math.max(this.scale-r,s/100);this.scaleInCenter(a,e,t),this.transform(),this.emitEvent("scale")}enlarge(e,t,n){let{scaleRatio:r,maxZoomRatio:s}=this.mindMap.opt;r=r/(n?5:1);let a=0;s===-1?a=this.scale+r:a=Math.min(this.scale+r,s/100),this.scaleInCenter(a,e,t),this.transform(),this.emitEvent("scale")}scaleInCenter(e,t,n){(t===void 0||n===void 0)&&(t=this.mindMap.width/2,n=this.mindMap.height/2);const r=this.scale,s=1-e/r,a=(t-this.x)*s,o=(n-this.y)*s;this.x+=a,this.y+=o,this.scale=e}setScale(e,t,n){t!==void 0&&n!==void 0?this.scaleInCenter(e,t,n):this.scale=e,this.transform(),this.emitEvent("scale")}fit(e=()=>{},t=!1,n){n=n===void 0?this.mindMap.opt.fitPadding:n;const r=this.mindMap.draw,s=r.transform(),a=e()||r.rbox(),o=a.width/s.scaleX,l=a.height/s.scaleY,h=o/l;let{width:c,height:d}=this.mindMap.elRect;c=c-n*2,d=d-n*2;const f=c/d;let m=0,v="";if(o<=c&&l<=d&&!t)m=1,v=1;else{let N=0;h>f?(N=c,v=2):(N=d*h,v=3),m=N/o}this.setScale(m);const g=e()||r.rbox();g.x-=this.mindMap.elRect.left,g.y-=this.mindMap.elRect.top;let x=0,w=0;v===1?(x=-g.x+n+(c-g.width)/2,w=-g.y+n+(d-g.height)/2):v===2?(x=-g.x+n,w=-g.y+n+(d-g.height)/2):v===3&&(x=-g.x+n+(c-g.width)/2,w=-g.y+n),this.translateXY(x,w)}checkNeedMindMapInCanvas(){if(this.mindMap.demonstrate&&this.mindMap.demonstrate.isInDemonstrate)return!1;const{isLimitMindMapInCanvasWhenHasScrollbar:e,isLimitMindMapInCanvas:t}=this.mindMap.opt;return this.mindMap.scrollbar?e:t}limitMindMapInCanvas(){if(!this.checkNeedMindMapInCanvas())return;let{scale:e,left:t,top:n,right:r,bottom:s}=this.getPositionLimit();const a=(this.mindMap.width-this.mindMap.initWidth)/2*e,o=(this.mindMap.height-this.mindMap.initHeight)/2*e,l=this.scale/e;t*=l,r*=l,n*=l,s*=l;const h=this.mindMap.width/2,c=this.mindMap.height/2,d=this.scale-1;t-=d*h-a,r-=d*h-a,n-=d*c-o,s-=d*c-o,this.x>t&&(this.x=t),this.x<r&&(this.x=r),this.y>n&&(this.y=n),this.y<s&&(this.y=s)}getPositionLimit(){const{scaleX:e,scaleY:t}=this.mindMap.draw.transform(),n=this.mindMap.draw.rbox(),r=this.mindMap.renderer.root.group.rbox(),s=this.mindMap.renderer.layout.getRootCenterOffset(r.width,r.height),a=r.x-n.x-s.x*e,o=r.x-n.x2-s.x*e,l=r.y-n.y-s.y*t,h=r.y-n.y2-s.y*t;return{scale:e,left:a,right:o,top:l,bottom:h}}emitEvent(e){switch(e){case"scale":this.mindMap.emit("scale",this.scale);case"translate":this.mindMap.emit("translate",this.x,this.y)}}}var H7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var uo={exports:{}},Yl;function Fu(){return Yl||(Yl=1,(function(i){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(l,h,c){this.fn=l,this.context=h,this.once=c||!1}function s(l,h,c,d,f){if(typeof c!="function")throw new TypeError("The listener must be a function");var m=new r(c,d||l,f),v=t?t+h:h;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],m]:l._events[v].push(m):(l._events[v]=m,l._eventsCount++),l}function a(l,h){--l._eventsCount===0?l._events=new n:delete l._events[h]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var h=[],c,d;if(this._eventsCount===0)return h;for(d in c=this._events)e.call(c,d)&&h.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(c)):h},o.prototype.listeners=function(h){var c=t?t+h:h,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,m=d.length,v=new Array(m);f<m;f++)v[f]=d[f].fn;return v},o.prototype.listenerCount=function(h){var c=t?t+h:h,d=this._events[c];return d?d.fn?1:d.length:0},o.prototype.emit=function(h,c,d,f,m,v){var g=t?t+h:h;if(!this._events[g])return!1;var x=this._events[g],w=arguments.length,N,M;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,c),!0;case 3:return x.fn.call(x.context,c,d),!0;case 4:return x.fn.call(x.context,c,d,f),!0;case 5:return x.fn.call(x.context,c,d,f,m),!0;case 6:return x.fn.call(x.context,c,d,f,m,v),!0}for(M=1,N=new Array(w-1);M<w;M++)N[M-1]=arguments[M];x.fn.apply(x.context,N)}else{var z=x.length,E;for(M=0;M<z;M++)switch(x[M].once&&this.removeListener(h,x[M].fn,void 0,!0),w){case 1:x[M].fn.call(x[M].context);break;case 2:x[M].fn.call(x[M].context,c);break;case 3:x[M].fn.call(x[M].context,c,d);break;case 4:x[M].fn.call(x[M].context,c,d,f);break;default:if(!N)for(E=1,N=new Array(w-1);E<w;E++)N[E-1]=arguments[E];x[M].fn.apply(x[M].context,N)}}return!0},o.prototype.on=function(h,c,d){return s(this,h,c,d,!1)},o.prototype.once=function(h,c,d){return s(this,h,c,d,!0)},o.prototype.removeListener=function(h,c,d,f){var m=t?t+h:h;if(!this._events[m])return this;if(!c)return a(this,m),this;var v=this._events[m];if(v.fn)v.fn===c&&(!f||v.once)&&(!d||v.context===d)&&a(this,m);else{for(var g=0,x=[],w=v.length;g<w;g++)(v[g].fn!==c||f&&!v[g].once||d&&v[g].context!==d)&&x.push(v[g]);x.length?this._events[m]=x.length===1?x[0]:x:a(this,m)}return this},o.prototype.removeAllListeners=function(h){var c;return h?(c=t?t+h:h,this._events[c]&&a(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,i.exports=o})(uo)),uo.exports}var Hu=Fu();const Uu=Pu(Hu);let $u=class extends Uu{constructor(e={}){super(),this.opt=e,this.mindMap=e.mindMap,this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1,this.mousedownPos={x:0,y:0},this.mousemovePos={x:0,y:0},this.mousemoveOffset={x:0,y:0},this.bindFn(),this.bind()}bindFn(){this.onBodyMousedown=this.onBodyMousedown.bind(this),this.onBodyClick=this.onBodyClick.bind(this),this.onDrawClick=this.onDrawClick.bind(this),this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onNodeMouseup=this.onNodeMouseup.bind(this),this.onMousewheel=this.onMousewheel.bind(this),this.onContextmenu=this.onContextmenu.bind(this),this.onSvgMousedown=this.onSvgMousedown.bind(this),this.onKeyup=this.onKeyup.bind(this),this.onMouseenter=this.onMouseenter.bind(this),this.onMouseleave=this.onMouseleave.bind(this)}bind(){document.body.addEventListener("mousedown",this.onBodyMousedown),document.body.addEventListener("click",this.onBodyClick),this.mindMap.svg.on("click",this.onDrawClick),this.mindMap.el.addEventListener("mousedown",this.onMousedown),this.mindMap.svg.on("mousedown",this.onSvgMousedown),window.addEventListener("mousemove",this.onMousemove),window.addEventListener("mouseup",this.onMouseup),this.on("node_mouseup",this.onNodeMouseup),this.mindMap.el.addEventListener("wheel",this.onMousewheel),this.mindMap.svg.on("contextmenu",this.onContextmenu),this.mindMap.svg.on("mouseenter",this.onMouseenter),this.mindMap.svg.on("mouseleave",this.onMouseleave),window.addEventListener("keyup",this.onKeyup)}unbind(){document.body.removeEventListener("mousedown",this.onBodyMousedown),document.body.removeEventListener("click",this.onBodyClick),this.mindMap.svg.off("click",this.onDrawClick),this.mindMap.el.removeEventListener("mousedown",this.onMousedown),window.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("mouseup",this.onMouseup),this.off("node_mouseup",this.onNodeMouseup),this.mindMap.el.removeEventListener("wheel",this.onMousewheel),this.mindMap.svg.off("contextmenu",this.onContextmenu),this.mindMap.svg.off("mouseenter",this.onMouseenter),this.mindMap.svg.off("mouseleave",this.onMouseleave),window.removeEventListener("keyup",this.onKeyup)}onDrawClick(e){this.emit("draw_click",e)}onBodyMousedown(e){this.emit("body_mousedown",e)}onBodyClick(e){this.emit("body_click",e)}onSvgMousedown(e){this.emit("svg_mousedown",e)}onMousedown(e){e.which===1?this.isLeftMousedown=!0:e.which===3?this.isRightMousedown=!0:e.which===2&&(this.isMiddleMousedown=!0),this.mousedownPos.x=e.clientX,this.mousedownPos.y=e.clientY,this.emit("mousedown",e,this)}onMousemove(e){let{useLeftKeySelectionRightKeyDrag:t}=this.mindMap.opt;this.mousemovePos.x=e.clientX,this.mousemovePos.y=e.clientY,this.mousemoveOffset.x=e.clientX-this.mousedownPos.x,this.mousemoveOffset.y=e.clientY-this.mousedownPos.y,this.emit("mousemove",e,this),(this.isMiddleMousedown||(t?this.isRightMousedown:this.isLeftMousedown))&&(e.preventDefault(),this.emit("drag",e,this))}onMouseup(e){this.onNodeMouseup(),this.emit("mouseup",e,this)}onNodeMouseup(){this.isLeftMousedown=!1,this.isRightMousedown=!1,this.isMiddleMousedown=!1}onMousewheel(e){e.stopPropagation(),e.preventDefault();const t=[];e.deltaY<0&&t.push(D.DIR.UP),e.deltaY>0&&t.push(D.DIR.DOWN),e.deltaX<0&&t.push(D.DIR.LEFT),e.deltaX>0&&t.push(D.DIR.RIGHT);let n=!1;const{customCheckIsTouchPad:r}=this.mindMap.opt;typeof r=="function"?n=r(e):n=Math.abs(e.deltaY)<=10,this.emit("mousewheel",e,t,this,n)}onContextmenu(e){e.preventDefault(),!e.ctrlKey&&this.emit("contextmenu",e)}onKeyup(e){this.emit("keyup",e)}onMouseenter(e){this.emit("svg_mouseenter",e)}onMouseleave(e){this.emit("svg_mouseleave",e)}};var Ta=function(e){return Gu(e)&&!qu(e)};function Gu(i){return!!i&&typeof i=="object"}function qu(i){var e=Object.prototype.toString.call(i);return e==="[object RegExp]"||e==="[object Date]"||Xu(i)}var Wu=typeof Symbol=="function"&&Symbol.for,Yu=Wu?Symbol.for("react.element"):60103;function Xu(i){return i.$$typeof===Yu}function Vu(i){return Array.isArray(i)?[]:{}}function xs(i,e){var t=e&&e.clone===!0;return t&&Ta(i)?Dr(Vu(i),i,e):i}function Xl(i,e,t){var n=i.slice();return e.forEach(function(r,s){typeof n[s]>"u"?n[s]=xs(r,t):Ta(r)?n[s]=Dr(i[s],r,t):i.indexOf(r)===-1&&n.push(xs(r,t))}),n}function ju(i,e,t){var n={};return Ta(i)&&Object.keys(i).forEach(function(r){n[r]=xs(i[r],t)}),Object.keys(e).forEach(function(r){!Ta(e[r])||!i[r]?n[r]=xs(e[r],t):n[r]=Dr(i[r],e[r],t)}),n}function Dr(i,e,t){var n=Array.isArray(e),r=Array.isArray(i),s=t||{arrayMerge:Xl},a=n===r;if(a)if(n){var o=s.arrayMerge||Xl;return o(i,e,t)}else return ju(i,e,t);else return xs(e,t)}Dr.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(n,r){return Dr(n,r,t)})};var Ea=Dr;let js;const Ku=new Uint8Array(16);function Zu(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(Ku)}const Rt=[];for(let i=0;i<256;++i)Rt.push((i+256).toString(16).slice(1));function Qu(i,e=0){return Rt[i[e+0]]+Rt[i[e+1]]+Rt[i[e+2]]+Rt[i[e+3]]+"-"+Rt[i[e+4]]+Rt[i[e+5]]+"-"+Rt[i[e+6]]+Rt[i[e+7]]+"-"+Rt[i[e+8]]+Rt[i[e+9]]+"-"+Rt[i[e+10]]+Rt[i[e+11]]+Rt[i[e+12]]+Rt[i[e+13]]+Rt[i[e+14]]+Rt[i[e+15]]}const Ju=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Vl={randomUUID:Ju};function ef(i,e,t){if(Vl.randomUUID&&!i)return Vl.randomUUID();i=i||{};const n=i.random||(i.rng||Zu)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Qu(n)}function K0(i){this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(i)}K0.prototype.init_genrand=function(i){for(this.mt[0]=i>>>0,this.mti=1;this.mti<this.N;this.mti++)i=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(((i&4294901760)>>>16)*1812433253<<16)+(i&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0};K0.prototype.genrand_int32=function(){var i,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var t;for(this.mti==this.N+1&&this.init_genrand(5489),t=0;t<this.N-this.M;t++)i=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+this.M]^i>>>1^e[i&1];for(;t<this.N-1;t++)i=this.mt[t]&this.UPPER_MASK|this.mt[t+1]&this.LOWER_MASK,this.mt[t]=this.mt[t+(this.M-this.N)]^i>>>1^e[i&1];i=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^i>>>1^e[i&1],this.mti=0}return i=this.mt[this.mti++],i^=i>>>11,i^=i<<7&2636928640,i^=i<<15&4022730752,i^=i>>>18,i>>>0};const Jo={},Wc=[];function ze(i,e){if(Array.isArray(i)){for(const t of i)ze(t,e);return}if(typeof i=="object"){for(const t in i)ze(t,i[t]);return}Yc(Object.getOwnPropertyNames(e)),Jo[i]=Object.assign(Jo[i]||{},e)}function si(i){return Jo[i]||{}}function tf(){return[...new Set(Wc)]}function Yc(i){Wc.push(...i)}function Z0(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)r.push(e(i[t]));return r}function nf(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)e(i[t])&&r.push(i[t]);return r}function fo(i){return i%360*Math.PI/180}function Ks(i){return i.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function rf(i){return i.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}function Xc(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Pr(i,e,t,n){return(e==null||t==null)&&(n=n||i.bbox(),e==null?e=n.width/n.height*t:t==null&&(t=n.height/n.width*e)),{width:e,height:t}}function e0(i,e){const t=i.origin;let n=i.ox!=null?i.ox:i.originX!=null?i.originX:"center",r=i.oy!=null?i.oy:i.originY!=null?i.originY:"center";t!=null&&([n,r]=Array.isArray(t)?t:typeof t=="object"?[t.x,t.y]:[t,t]);const s=typeof n=="string",a=typeof r=="string";if(s||a){const{height:o,width:l,x:h,y:c}=e.bbox();s&&(n=n.includes("left")?h:n.includes("right")?h+l:h+l/2),a&&(r=r.includes("top")?c:r.includes("bottom")?c+o:c+o/2)}return[n,r]}const Q0="http://www.w3.org/2000/svg",sf="http://www.w3.org/1999/xhtml",Zs="http://www.w3.org/2000/xmlns/",Cs="http://www.w3.org/1999/xlink",af="http://svgjs.dev/svgjs",Pe={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};let J0=class{};const tr={},el="___SYMBOL___ROOT___";function ys(i,e=Q0){return Pe.document.createElementNS(e,i)}function Yt(i,e=!1){if(i instanceof J0)return i;if(typeof i=="object")return po(i);if(i==null)return new tr[el];if(typeof i=="string"&&i.charAt(0)!=="<")return po(Pe.document.querySelector(i));const t=e?Pe.document.createElement("div"):ys("svg");return t.innerHTML=i,i=po(t.firstChild),t.removeChild(t.firstChild),i}function tt(i,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:ys(i)}function Ei(i){if(!i)return null;if(i.instance instanceof J0)return i.instance;if(i.nodeName==="#document-fragment")return new tr.Fragment(i);let e=Xc(i.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":tr[e]||(e="Dom"),new tr[e](i)}let po=Ei;function Ie(i,e=i.name,t=!1){return tr[e]=i,t&&(tr[el]=i),Yc(Object.getOwnPropertyNames(i.prototype)),i}function of(i){return tr[i]}let lf=1e3;function Vc(i){return"Svgjs"+Xc(i)+lf++}function jc(i){for(let e=i.children.length-1;e>=0;e--)jc(i.children[e]);return i.id&&(i.id=Vc(i.nodeName)),i}function Ae(i,e){let t,n;for(i=Array.isArray(i)?i:[i],n=i.length-1;n>=0;n--)for(t in e)i[n].prototype[t]=e[t]}function et(i){return function(...e){const t=e[e.length-1];return t&&t.constructor===Object&&!(t instanceof Array)?i.apply(this,e.slice(0,-1)).attr(t):i.apply(this,e)}}function hf(){return this.parent().children()}function cf(){return this.parent().index(this)}function df(){return this.siblings()[this.position()+1]}function uf(){return this.siblings()[this.position()-1]}function ff(){const i=this.position();return this.parent().add(this.remove(),i+1),this}function pf(){const i=this.position();return this.parent().add(this.remove(),i?i-1:0),this}function mf(){return this.parent().add(this.remove()),this}function gf(){return this.parent().add(this.remove(),0),this}function vf(i){i=Yt(i),i.remove();const e=this.position();return this.parent().add(i,e),this}function xf(i){i=Yt(i),i.remove();const e=this.position();return this.parent().add(i,e+1),this}function yf(i){return i=Yt(i),i.before(this),this}function wf(i){return i=Yt(i),i.after(this),this}ze("Dom",{siblings:hf,position:cf,next:df,prev:uf,forward:ff,backward:pf,front:mf,back:gf,before:vf,after:xf,insertBefore:yf,insertAfter:wf});const Kc=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,bf=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,kf=/rgb\((\d+),(\d+),(\d+)\)/,Tf=/(#[a-z_][a-z0-9\-_]*)/i,Ef=/\)\s*,?\s*/,Mf=/\s/g,jl=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Kl=/^rgb\(/,Zl=/^(\s+)?$/,Ql=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Sf=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,an=/[\s,]+/,tl=/[MLHVCSQTAZ]/i;function zf(){const i=this.attr("class");return i==null?[]:i.trim().split(an)}function Cf(i){return this.classes().indexOf(i)!==-1}function Nf(i){if(!this.hasClass(i)){const e=this.classes();e.push(i),this.attr("class",e.join(" "))}return this}function Lf(i){return this.hasClass(i)&&this.attr("class",this.classes().filter(function(e){return e!==i}).join(" ")),this}function Af(i){return this.hasClass(i)?this.removeClass(i):this.addClass(i)}ze("Dom",{classes:zf,hasClass:Cf,addClass:Nf,removeClass:Lf,toggleClass:Af});function _f(i,e){const t={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(n){return!!n.length}).forEach(function(n){const r=n.split(/\s*:\s*/);t[r[0]]=r[1]}),t;if(arguments.length<2){if(Array.isArray(i)){for(const n of i){const r=Ks(n);t[n]=this.node.style[r]}return t}if(typeof i=="string")return this.node.style[Ks(i)];if(typeof i=="object")for(const n in i)this.node.style[Ks(n)]=i[n]==null||Zl.test(i[n])?"":i[n]}return arguments.length===2&&(this.node.style[Ks(i)]=e==null||Zl.test(e)?"":e),this}function Df(){return this.css("display","")}function Rf(){return this.css("display","none")}function If(){return this.css("display")!=="none"}ze("Dom",{css:_f,show:Df,hide:Rf,visible:If});function Of(i,e,t){if(i==null)return this.data(Z0(nf(this.node.attributes,n=>n.nodeName.indexOf("data-")===0),n=>n.nodeName.slice(5)));if(i instanceof Array){const n={};for(const r of i)n[r]=this.data(r);return n}else if(typeof i=="object")for(e in i)this.data(e,i[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+i))}catch{return this.attr("data-"+i)}else this.attr("data-"+i,e===null?null:t===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}ze("Dom",{data:Of});function Bf(i,e){if(typeof arguments[0]=="object")for(const t in i)this.remember(t,i[t]);else{if(arguments.length===1)return this.memory()[i];this.memory()[i]=e}return this}function Pf(){if(arguments.length===0)this._memory={};else for(let i=arguments.length-1;i>=0;i--)delete this.memory()[arguments[i]];return this}function Ff(){return this._memory=this._memory||{}}ze("Dom",{remember:Bf,forget:Pf,memory:Ff});function Hf(i){return i.length===4?["#",i.substring(1,2),i.substring(1,2),i.substring(2,3),i.substring(2,3),i.substring(3,4),i.substring(3,4)].join(""):i}function Uf(i){const e=Math.round(i),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function br(i,e){for(let t=e.length;t--;)if(i[e[t]]==null)return!1;return!0}function $f(i,e){const t=br(i,"rgb")?{_a:i.r,_b:i.g,_c:i.b,_d:0,space:"rgb"}:br(i,"xyz")?{_a:i.x,_b:i.y,_c:i.z,_d:0,space:"xyz"}:br(i,"hsl")?{_a:i.h,_b:i.s,_c:i.l,_d:0,space:"hsl"}:br(i,"lab")?{_a:i.l,_b:i.a,_c:i.b,_d:0,space:"lab"}:br(i,"lch")?{_a:i.l,_b:i.c,_c:i.h,_d:0,space:"lch"}:br(i,"cmyk")?{_a:i.c,_b:i.m,_c:i.y,_d:i.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return t.space=e||t.space,t}function Gf(i){return i==="lab"||i==="xyz"||i==="lch"}function mo(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*(2/3-t)*6:i}class We{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof We||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",t,n){const{random:r,round:s,sin:a,PI:o}=Math;if(e==="vibrant"){const l=24*r()+57,h=38*r()+45,c=360*r();return new We(l,h,c,"lch")}else if(e==="sine"){t=t??r();const l=s(80*a(2*o*t/.5+.01)+150),h=s(50*a(2*o*t/.5+4.6)+200),c=s(100*a(2*o*t/.5+2.3)+150);return new We(l,h,c)}else if(e==="pastel"){const l=8*r()+86,h=17*r()+9,c=360*r();return new We(l,h,c,"lch")}else if(e==="dark"){const l=10+10*r(),h=50*r()+86,c=360*r();return new We(l,h,c,"lch")}else if(e==="rgb"){const l=255*r(),h=255*r(),c=255*r();return new We(l,h,c)}else if(e==="lab"){const l=100*r(),h=256*r()-128,c=256*r()-128;return new We(l,h,c,"lab")}else if(e==="grey"){const l=255*r();return new We(l,l,l)}else throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(jl.test(e)||Kl.test(e))}cmyk(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(f=>f/255),o=Math.min(1-r,1-s,1-a);if(o===1)return new We(0,0,0,1,"cmyk");const l=(1-r-o)/(1-o),h=(1-s-o)/(1-o),c=(1-a-o)/(1-o);return new We(l,h,c,o,"cmyk")}hsl(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(g=>g/255),o=Math.max(r,s,a),l=Math.min(r,s,a),h=(o+l)/2,c=o===l,d=o-l,f=c?0:h>.5?d/(2-o-l):d/(o+l),m=c?0:o===r?((s-a)/d+(s<a?6:0))/6:o===s?((a-r)/d+2)/6:o===a?((r-s)/d+4)/6:0;return new We(360*m,100*f,100*h,"hsl")}init(e=0,t=0,n=0,r=0,s="rgb"){if(e=e||0,this.space)for(const d in this.space)delete this[this.space[d]];if(typeof e=="number")s=typeof r=="string"?r:s,r=typeof r=="string"?0:r,Object.assign(this,{_a:e,_b:t,_c:n,_d:r,space:s});else if(e instanceof Array)this.space=t||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const d=$f(e,t);Object.assign(this,d)}else if(typeof e=="string")if(Kl.test(e)){const d=e.replace(Mf,""),[f,m,v]=kf.exec(d).slice(1,4).map(g=>parseInt(g));Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else if(jl.test(e)){const d=g=>parseInt(g,16),[,f,m,v]=bf.exec(Hf(e)).map(d);Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else throw Error("Unsupported string format, can't construct Color");const{_a:a,_b:o,_c:l,_d:h}=this,c=this.space==="rgb"?{r:a,g:o,b:l}:this.space==="xyz"?{x:a,y:o,z:l}:this.space==="hsl"?{h:a,s:o,l}:this.space==="lab"?{l:a,a:o,b:l}:this.space==="lch"?{l:a,c:o,h:l}:this.space==="cmyk"?{c:a,m:o,y:l,k:h}:{};Object.assign(this,c)}lab(){const{x:e,y:t,z:n}=this.xyz(),r=116*t-16,s=500*(e-t),a=200*(t-n);return new We(r,s,a,"lab")}lch(){const{l:e,a:t,b:n}=this.lab(),r=Math.sqrt(t**2+n**2);let s=180*Math.atan2(n,t)/Math.PI;return s<0&&(s*=-1,s=360-s),new We(e,r,s,"lch")}rgb(){if(this.space==="rgb")return this;if(Gf(this.space)){let{x:e,y:t,z:n}=this;if(this.space==="lab"||this.space==="lch"){let{l:m,a:v,b:g}=this;if(this.space==="lch"){const{c:B,h:I}=this,R=Math.PI/180;v=B*Math.cos(R*I),g=B*Math.sin(R*I)}const x=(m+16)/116,w=v/500+x,N=x-g/200,M=16/116,z=.008856,E=7.787;e=.95047*(w**3>z?w**3:(w-M)/E),t=1*(x**3>z?x**3:(x-M)/E),n=1.08883*(N**3>z?N**3:(N-M)/E)}const r=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,a=e*.0557+t*-.204+n*1.057,o=Math.pow,l=.0031308,h=r>l?1.055*o(r,1/2.4)-.055:12.92*r,c=s>l?1.055*o(s,1/2.4)-.055:12.92*s,d=a>l?1.055*o(a,1/2.4)-.055:12.92*a;return new We(255*h,255*c,255*d)}else if(this.space==="hsl"){let{h:e,s:t,l:n}=this;if(e/=360,t/=100,n/=100,t===0)return n*=255,new We(n,n,n);const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r,a=255*mo(s,r,e+1/3),o=255*mo(s,r,e),l=255*mo(s,r,e-1/3);return new We(a,o,l)}else if(this.space==="cmyk"){const{c:e,m:t,y:n,k:r}=this,s=255*(1-Math.min(1,e*(1-r)+r)),a=255*(1-Math.min(1,t*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new We(s,a,o)}else return this}toArray(){const{_a:e,_b:t,_c:n,_d:r,space:s}=this;return[e,t,n,r,s]}toHex(){const[e,t,n]=this._clamped().map(Uf);return`#${e}${t}${n}`}toRgb(){const[e,t,n]=this._clamped();return`rgb(${e},${t},${n})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,s,a]=[e,t,n].map(w=>w/255),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,l=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,c=(o*.4124+l*.3576+h*.1805)/.95047,d=(o*.2126+l*.7152+h*.0722)/1,f=(o*.0193+l*.1192+h*.9505)/1.08883,m=c>.008856?Math.pow(c,1/3):7.787*c+16/116,v=d>.008856?Math.pow(d,1/3):7.787*d+16/116,g=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new We(m,v,g,"xyz")}_clamped(){const{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:s,round:a}=Math,o=l=>r(0,s(a(l),255));return[e,t,n].map(o)}}class mt{constructor(...e){this.init(...e)}clone(){return new mt(this)}init(e,t){const n={x:0,y:0},r=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:t};return this.x=r.x==null?n.x:r.x,this.y=r.y==null?n.y:r.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){ve.isMatrixLike(e)||(e=new ve(e));const{x:t,y:n}=this;return this.x=e.a*t+e.c*n+e.e,this.y=e.b*t+e.d*n+e.f,this}}function qf(i,e){return new mt(i,e).transformO(this.screenCTM().inverseO())}function kr(i,e,t){return Math.abs(e-i)<1e-6}class ve{constructor(...e){this.init(...e)}static formatTransforms(e){const t=e.flip==="both"||e.flip===!0,n=e.flip&&(t||e.flip==="x")?-1:1,r=e.flip&&(t||e.flip==="y")?-1:1,s=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,a=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,o=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,l=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,h=e.shear||0,c=e.rotate||e.theta||0,d=new mt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),f=d.x,m=d.y,v=new mt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),g=v.x,x=v.y,w=new mt(e.translate||e.tx||e.translateX,e.ty||e.translateY),N=w.x,M=w.y,z=new mt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),E=z.x,B=z.y;return{scaleX:o,scaleY:l,skewX:s,skewY:a,shear:h,theta:c,rx:E,ry:B,tx:N,ty:M,ox:f,oy:m,px:g,py:x}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,t,n){const r=e.a*t.a+e.c*t.b,s=e.b*t.a+e.d*t.b,a=e.a*t.c+e.c*t.d,o=e.b*t.c+e.d*t.d,l=e.e+e.a*t.e+e.c*t.f,h=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=s,n.c=a,n.d=o,n.e=l,n.f=h,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){const r=e||0,s=t||0;return this.translateO(-r,-s).lmultiplyO(n).translateO(r,s)}clone(){return new ve(this)}decompose(e=0,t=0){const n=this.a,r=this.b,s=this.c,a=this.d,o=this.e,l=this.f,h=n*a-r*s,c=h>0?1:-1,d=c*Math.sqrt(n*n+r*r),f=Math.atan2(c*r,c*n),m=180/Math.PI*f,v=Math.cos(f),g=Math.sin(f),x=(n*s+r*a)/h,w=s*d/(x*n-r)||a*d/(x*r+n),N=o-e+e*v*d+t*(x*v*d-g*w),M=l-t+e*g*d+t*(x*g*d+v*w);return{scaleX:d,scaleY:w,shear:x,rotate:m,translateX:N,translateY:M,originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const t=new ve(e);return kr(this.a,t.a)&&kr(this.b,t.b)&&kr(this.c,t.c)&&kr(this.d,t.d)&&kr(this.e,t.e)&&kr(this.f,t.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return e==="x"?this.scaleO(-1,1,t,0):e==="y"?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(e){const t=ve.fromArray([1,0,0,1,0,0]);return e=e instanceof qi?e.matrixify():typeof e=="string"?ve.fromArray(e.split(an).map(parseFloat)):Array.isArray(e)?ve.fromArray(e):typeof e=="object"&&ve.isMatrixLike(e)?e:typeof e=="object"?new ve().transform(e):arguments.length===6?ve.fromArray([].slice.call(arguments)):t,this.a=e.a!=null?e.a:t.a,this.b=e.b!=null?e.b:t.b,this.c=e.c!=null?e.c:t.c,this.d=e.d!=null?e.d:t.d,this.e=e.e!=null?e.e:t.e,this.f=e.f!=null?e.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,t=this.b,n=this.c,r=this.d,s=this.e,a=this.f,o=e*r-t*n;if(!o)throw new Error("Cannot invert "+this);const l=r/o,h=-t/o,c=-n/o,d=e/o,f=-(l*s+c*a),m=-(h*s+d*a);return this.a=l,this.b=h,this.c=c,this.d=d,this.e=f,this.f=m,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const t=this,n=e instanceof ve?e:new ve(e);return ve.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof ve?e:new ve(e);return ve.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=fo(e);const r=Math.cos(e),s=Math.sin(e),{a,b:o,c:l,d:h,e:c,f:d}=this;return this.a=a*r-o*s,this.b=o*r+a*s,this.c=l*r-h*s,this.d=h*r+l*s,this.e=c*r-d*s+n*s-t*r+t,this.f=d*r+c*s-t*s-n*r+n,this}scale(e,t,n,r){return this.clone().scaleO(...arguments)}scaleO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e);const{a:s,b:a,c:o,d:l,e:h,f:c}=this;return this.a=s*e,this.b=a*t,this.c=o*e,this.d=l*t,this.e=h*e-n*e+n,this.f=c*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){const{a:r,b:s,c:a,d:o,e:l,f:h}=this;return this.a=r+s*e,this.c=a+o*e,this.e=l+h*e-n*e,this}skew(e,t,n,r){return this.clone().skewO(...arguments)}skewO(e,t=e,n=0,r=0){arguments.length===3&&(r=n,n=t,t=e),e=fo(e),t=fo(t);const s=Math.tan(e),a=Math.tan(t),{a:o,b:l,c:h,d:c,e:d,f}=this;return this.a=o+l*s,this.b=l+o*a,this.c=h+c*s,this.d=c+h*a,this.e=d+f*s-r*s,this.f=f+d*a-n*a,this}skewX(e,t,n){return this.skew(e,0,t,n)}skewY(e,t,n){return this.skew(0,e,t,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(ve.isMatrixLike(e))return new ve(e).multiplyO(this);const t=ve.formatTransforms(e),n=this,{x:r,y:s}=new mt(t.ox,t.oy).transform(n),a=new ve().translateO(t.rx,t.ry).lmultiplyO(n).translateO(-r,-s).scaleO(t.scaleX,t.scaleY).skewO(t.skewX,t.skewY).shearO(t.shear).rotateO(t.theta).translateO(r,s);if(isFinite(t.px)||isFinite(t.py)){const o=new mt(r,s).transform(a),l=isFinite(t.px)?t.px-o.x:0,h=isFinite(t.py)?t.py-o.y:0;a.translateO(l,h)}return a.translateO(t.tx,t.ty),a}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Wf(){return new ve(this.node.getCTM())}function Yf(){if(typeof this.isRoot=="function"&&!this.isRoot()){const i=this.rect(1,1),e=i.node.getScreenCTM();return i.remove(),new ve(e)}return new ve(this.node.getScreenCTM())}Ie(ve,"Matrix");function Mn(){if(!Mn.nodes){const i=Yt().size(2,0);i.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),i.attr("focusable","false"),i.attr("aria-hidden","true");const e=i.path().node;Mn.nodes={svg:i,path:e}}if(!Mn.nodes.svg.node.parentNode){const i=Pe.document.body||Pe.document.documentElement;Mn.nodes.svg.addTo(i)}return Mn.nodes}function Zc(i){return!i.width&&!i.height&&!i.x&&!i.y}function Xf(i){return i===Pe.document||(Pe.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===Pe.document}).call(Pe.document.documentElement,i)}class Ht{constructor(...e){this.init(...e)}addOffset(){return this.x+=Pe.window.pageXOffset,this.y+=Pe.window.pageYOffset,new Ht(this)}init(e){const t=[0,0,0,0];return e=typeof e=="string"?e.split(an).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):t,this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Zc(this)}merge(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width)-t,s=Math.max(this.y+this.height,e.y+e.height)-n;return new Ht(t,n,r,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof ve||(e=new ve(e));let t=1/0,n=-1/0,r=1/0,s=-1/0;return[new mt(this.x,this.y),new mt(this.x2,this.y),new mt(this.x,this.y2),new mt(this.x2,this.y2)].forEach(function(o){o=o.transform(e),t=Math.min(t,o.x),n=Math.max(n,o.x),r=Math.min(r,o.y),s=Math.max(s,o.y)}),new Ht(t,r,n-t,s-r)}}function Qc(i,e,t){let n;try{if(n=e(i.node),Zc(n)&&!Xf(i.node))throw new Error("Element not in the dom")}catch{n=t(i)}return n}function Vf(){const t=Qc(this,r=>r.getBBox(),r=>{try{const s=r.clone().addTo(Mn().svg).show(),a=s.node.getBBox();return s.remove(),a}catch(s){throw new Error(`Getting bbox of element "${r.node.nodeName}" is not possible: ${s.toString()}`)}});return new Ht(t)}function jf(i){const n=Qc(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),r=new Ht(n);return i?r.transform(i.screenCTM().inverseO()):r.addOffset()}function Kf(i,e){const t=this.bbox();return i>t.x&&e>t.y&&i<t.x+t.width&&e<t.y+t.height}ze({viewbox:{viewbox(i,e,t,n){return i==null?new Ht(this.attr("viewBox")):this.attr("viewBox",new Ht(i,e,t,n))},zoom(i,e){let{width:t,height:n}=this.attr(["width","height"]);if((!t&&!n||typeof t=="string"||typeof n=="string")&&(t=this.node.clientWidth,n=this.node.clientHeight),!t||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const r=this.viewbox(),s=t/r.width,a=n/r.height,o=Math.min(s,a);if(i==null)return o;let l=o/i;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new mt(t/2/s+r.x,n/2/a+r.y);const h=new Ht(r).transform(new ve({scale:l,origin:e}));return this.viewbox(h)}}});Ie(Ht,"Box");class nr extends Array{constructor(e=[],...t){if(super(e,...t),typeof e=="number")return this;this.length=0,this.push(...e)}}Ae([nr],{each(i,...e){return typeof i=="function"?this.map((t,n,r)=>i.call(t,t,n,r)):this.map(t=>t[i](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const Zf=["toArray","constructor","each"];nr.extend=function(i){i=i.reduce((e,t)=>(Zf.includes(t)||t[0]==="_"||(e[t]=function(...n){return this.each(t,...n)}),e),{}),Ae([nr],i)};function Fr(i,e){return new nr(Z0((e||Pe.document).querySelectorAll(i),function(t){return Ei(t)}))}function Qf(i){return Fr(i,this.node)}function Jf(i){return Ei(this.node.querySelector(i))}let e3=0;const Jc={};function ed(i){let e=i.getEventHolder();return e===Pe.window&&(e=Jc),e.events||(e.events={}),e.events}function il(i){return i.getEventTarget()}function t3(i){let e=i.getEventHolder();e===Pe.window&&(e=Jc),e.events&&(e.events={})}function t0(i,e,t,n,r){const s=t.bind(n||i),a=Yt(i),o=ed(a),l=il(a);e=Array.isArray(e)?e:e.split(an),t._svgjsListenerId||(t._svgjsListenerId=++e3),e.forEach(function(h){const c=h.split(".")[0],d=h.split(".")[1]||"*";o[c]=o[c]||{},o[c][d]=o[c][d]||{},o[c][d][t._svgjsListenerId]=s,l.addEventListener(c,s,r||!1)})}function Sr(i,e,t,n){const r=Yt(i),s=ed(r),a=il(r);typeof t=="function"&&(t=t._svgjsListenerId,!t)||(e=Array.isArray(e)?e:(e||"").split(an),e.forEach(function(o){const l=o&&o.split(".")[0],h=o&&o.split(".")[1];let c,d;if(t)s[l]&&s[l][h||"*"]&&(a.removeEventListener(l,s[l][h||"*"][t],n||!1),delete s[l][h||"*"][t]);else if(l&&h){if(s[l]&&s[l][h]){for(d in s[l][h])Sr(a,[l,h].join("."),d);delete s[l][h]}}else if(h)for(o in s)for(c in s[o])h===c&&Sr(a,[o,h].join("."));else if(l){if(s[l]){for(c in s[l])Sr(a,[l,c].join("."));delete s[l]}}else{for(o in s)Sr(a,o);t3(r)}}))}function i3(i,e,t,n){const r=il(i);return e instanceof Pe.window.Event||(e=new Pe.window.CustomEvent(e,{detail:t,cancelable:!0,...n})),r.dispatchEvent(e),e}class Ns extends J0{addEventListener(){}dispatch(e,t,n){return i3(this,e,t,n)}dispatchEvent(e){const t=this.getEventHolder().events;if(!t)return!0;const n=t[e.type];for(const r in n)for(const s in n[r])n[r][s](e);return!e.defaultPrevented}fire(e,t,n){return this.dispatch(e,t,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,n){return Sr(this,e,t,n),this}on(e,t,n,r){return t0(this,e,t,n,r),this}removeEventListener(){}}Ie(Ns,"EventTarget");function Jl(){}const cs={duration:400,ease:">",delay:0},n3={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Rr extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"?this:(this.length=0,this.push(...this.parse(e)),this)}parse(e=[]){return e instanceof Array?e:e.trim().split(an).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class Ee{constructor(...e){this.init(...e)}convert(e){return new Ee(this.value,e)}divide(e){return e=new Ee(e),new Ee(this/e,this.unit||e.unit)}init(e,t){return t=Array.isArray(e)?e[1]:t,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=t||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(t=e.match(Kc),t&&(this.value=parseFloat(t[1]),t[5]==="%"?this.value/=100:t[5]==="s"&&(this.value*=1e3),this.unit=t[5])):e instanceof Ee&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Ee(e),new Ee(this-e,this.unit||e.unit)}plus(e){return e=new Ee(e),new Ee(this+e,this.unit||e.unit)}times(e){return e=new Ee(e),new Ee(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(this.value*1e8)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const td=[];function r3(i){td.push(i)}function s3(i,e,t){if(i==null){i={},e=this.node.attributes;for(const n of e)i[n.nodeName]=Ql.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return i}else{if(i instanceof Array)return i.reduce((n,r)=>(n[r]=this.attr(r),n),{});if(typeof i=="object"&&i.constructor===Object)for(e in i)this.attr(e,i[e]);else if(e===null)this.node.removeAttribute(i);else{if(e==null)return e=this.node.getAttribute(i),e==null?n3[i]:Ql.test(e)?parseFloat(e):e;e=td.reduce((n,r)=>r(i,n,this),e),typeof e=="number"?e=new Ee(e):We.isColor(e)?e=new We(e):e.constructor===Array&&(e=new Rr(e)),i==="leading"?this.leading&&this.leading(e):typeof t=="string"?this.node.setAttributeNS(t,i,e.toString()):this.node.setAttribute(i,e.toString()),this.rebuild&&(i==="font-size"||i==="x")&&this.rebuild()}}return this}class zn extends Ns{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=Yt(e),e.removeNamespace&&this.node instanceof Pe.window.SVGElement&&e.removeNamespace(),t==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return Yt(e).put(this,t)}children(){return new nr(Z0(this.node.children,function(e){return Ei(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,t=!0){this.writeDataToDom();let n=this.node.cloneNode(e);return t&&(n=jc(n)),new this.constructor(n)}each(e,t){const n=this.children();let r,s;for(r=0,s=n.length;r<s;r++)e.apply(n[r],[r,n]),t&&n[r].each(e,t);return this}element(e,t){return this.put(new zn(ys(e),t))}first(){return Ei(this.node.firstChild)}get(e){return Ei(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,t){return this.xml(e,t,sf)}id(e){return typeof e>"u"&&!this.node.id&&(this.node.id=Vc(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Ei(this.node.lastChild)}matches(e){const t=this.node,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return n&&n.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=Ei(t.node.parentNode),!e)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=Ei(t.node.parentNode));return t}put(e,t){return e=Yt(e),this.add(e,t),e}putIn(e,t){return Yt(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Yt(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){const n=10**e,r=this.attr(t);for(const s in r)typeof r[s]=="number"&&(r[s]=Math.round(r[s]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,Q0)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const t=this.parent();if(!t)return this.addTo(e);const n=t.index(this);return t.put(e,n).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,t,n){if(typeof e=="boolean"&&(n=t,t=e,e=null),e==null||typeof e=="function"){t=t??!0,this.writeDataToDom();let o=this;if(e!=null){if(o=Ei(o.node.cloneNode(!0)),t){const l=e(o);if(o=l||o,l===!1)return""}o.each(function(){const l=e(this),h=l||this;l===!1?this.remove():l&&this!==h&&this.replace(h)},!0)}return t?o.node.outerHTML:o.node.innerHTML}t=t??!1;const r=ys("wrapper",n),s=Pe.document.createDocumentFragment();r.innerHTML=e;for(let o=r.children.length;o--;)s.appendChild(r.firstElementChild);const a=this.parent();return t?this.replace(s)&&a:this.add(s)}}Ae(zn,{attr:s3,find:Qf,findOne:Jf});Ie(zn,"Dom");let qi=class extends zn{constructor(e,t){super(e,t),this.dom={},this.node.instance=this,e.hasAttribute("svgjs:data")&&this.setData(JSON.parse(e.getAttribute("svgjs:data"))||{})}center(e,t){return this.cx(e).cy(t)}cx(e){return e==null?this.x()+this.width()/2:this.x(e-this.width()/2)}cy(e){return e==null?this.y()+this.height()/2:this.y(e-this.height()/2)}defs(){const e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new Ee(e).plus(this.x()))}dy(e=0){return this.y(new Ee(e).plus(this.y()))}getEventHolder(){return this}height(e){return this.attr("height",e)}move(e,t){return this.x(e).y(t)}parents(e=this.root()){const t=typeof e=="string";t||(e=Yt(e));const n=new nr;let r=this;for(;(r=r.parent())&&r.node!==Pe.document&&r.nodeName!=="#document-fragment"&&(n.push(r),!(!t&&r.node===e.node||t&&r.matches(e)));)if(r.node===this.root().node)return null;return n}reference(e){if(e=this.attr(e),!e)return null;const t=(e+"").match(Tf);return t?Yt(t[1]):null}root(){const e=this.parent(of(el));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Pr(this,e,t);return this.width(new Ee(n.width)).height(new Ee(n.height))}width(e){return this.attr("width",e)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(e){return this.attr("x",e)}y(e){return this.attr("y",e)}};Ae(qi,{bbox:Vf,rbox:jf,inside:Kf,point:qf,ctm:Wf,screenCTM:Yf});Ie(qi,"Element");const is={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(i,e){return e==="color"?i:i+"-"+e}};["fill","stroke"].forEach(function(i){const e={};let t;e[i]=function(n){if(typeof n>"u")return this.attr(i);if(typeof n=="string"||n instanceof We||We.isRgb(n)||n instanceof qi)this.attr(i,n);else for(t=is[i].length-1;t>=0;t--)n[is[i][t]]!=null&&this.attr(is.prefix(i,is[i][t]),n[is[i][t]]);return this},ze(["Element","Runner"],e)});ze(["Element","Runner"],{matrix:function(i,e,t,n,r,s){return i==null?new ve(this):this.attr("transform",new ve(i,e,t,n,r,s))},rotate:function(i,e,t){return this.transform({rotate:i,ox:e,oy:t},!0)},skew:function(i,e,t,n){return arguments.length===1||arguments.length===3?this.transform({skew:i,ox:e,oy:t},!0):this.transform({skew:[i,e],ox:t,oy:n},!0)},shear:function(i,e,t){return this.transform({shear:i,ox:e,oy:t},!0)},scale:function(i,e,t,n){return arguments.length===1||arguments.length===3?this.transform({scale:i,ox:e,oy:t},!0):this.transform({scale:[i,e],ox:t,oy:n},!0)},translate:function(i,e){return this.transform({translate:[i,e]},!0)},relative:function(i,e){return this.transform({relative:[i,e]},!0)},flip:function(i="both",e="center"){return"xybothtrue".indexOf(i)===-1&&(e=i,i="both"),this.transform({flip:i,origin:e},!0)},opacity:function(i){return this.attr("opacity",i)}});ze("radius",{radius:function(i,e=i){return(this._element||this).type==="radialGradient"?this.attr("r",new Ee(i)):this.rx(i).ry(e)}});ze("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(i){return new mt(this.node.getPointAtLength(i))}});ze(["Element","Runner"],{font:function(i,e){if(typeof i=="object"){for(e in i)this.font(e,i[e]);return this}return i==="leading"?this.leading(e):i==="anchor"?this.attr("text-anchor",e):i==="size"||i==="family"||i==="weight"||i==="stretch"||i==="variant"||i==="style"?this.attr("font-"+i,e):this.attr(i,e)}});const a3=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(i,e){const t=function(n){return n===null?this.off(e):this.on(e,n),this};return i[e]=t,i},{});ze("Element",a3);function o3(){return this.attr("transform",null)}function l3(){return(this.attr("transform")||"").split(Ef).slice(0,-1).map(function(e){const t=e.trim().split("(");return[t[0],t[1].split(an).map(function(n){return parseFloat(n)})]}).reverse().reduce(function(e,t){return t[0]==="matrix"?e.lmultiply(ve.fromArray(t[1])):e[t[0]].apply(e,t[1])},new ve)}function h3(i,e){if(this===i)return this;const t=this.screenCTM(),n=i.screenCTM().inverse();return this.addTo(i,e).untransform().transform(n.multiply(t)),this}function c3(i){return this.toParent(this.root(),i)}function d3(i,e){if(i==null||typeof i=="string"){const r=new ve(this).decompose();return i==null?r:r[i]}ve.isMatrixLike(i)||(i={...i,origin:e0(i,this)});const t=e===!0?this:e||!1,n=new ve(t).transform(i);return this.attr("transform",n)}ze("Element",{untransform:o3,matrixify:l3,toParent:h3,toRoot:c3,transform:d3});class ai extends qi{flatten(e=this,t){return this.each(function(){if(this instanceof ai)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),t=e.index(this)){return t=t===-1?e.children().length:t,this.each(function(n,r){return r[r.length-n-1].toParent(e,t)}),this.remove()}}Ie(ai,"Container");class nl extends ai{constructor(e,t=e){super(tt("defs",e),t)}flatten(){return this}ungroup(){return this}}Ie(nl,"Defs");let mi=class extends qi{};Ie(mi,"Shape");function rl(i){return this.attr("rx",i)}function sl(i){return this.attr("ry",i)}function id(i){return i==null?this.cx()-this.rx():this.cx(i+this.rx())}function nd(i){return i==null?this.cy()-this.ry():this.cy(i+this.ry())}function rd(i){return this.attr("cx",i)}function sd(i){return this.attr("cy",i)}function ad(i){return i==null?this.rx()*2:this.rx(new Ee(i).divide(2))}function od(i){return i==null?this.ry()*2:this.ry(new Ee(i).divide(2))}var u3={__proto__:null,rx:rl,ry:sl,x:id,y:nd,cx:rd,cy:sd,width:ad,height:od};class Fa extends mi{constructor(e,t=e){super(tt("ellipse",e),t)}size(e,t){const n=Pr(this,e,t);return this.rx(new Ee(n.width).divide(2)).ry(new Ee(n.height).divide(2))}}Ae(Fa,u3);ze("Container",{ellipse:et(function(i=0,e=i){return this.put(new Fa).size(i,e).move(0,0)})});Ie(Fa,"Ellipse");class ld extends zn{constructor(e=Pe.document.createDocumentFragment()){super(e)}xml(e,t,n){if(typeof e=="boolean"&&(n=t,t=e,e=null),e==null||typeof e=="function"){const r=new zn(ys("wrapper",n));return r.add(this.node.cloneNode(!0)),r.xml(!1,n)}return super.xml(e,!1,n)}}Ie(ld,"Fragment");function hd(i,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Ee(i),fy:new Ee(e)}):this.attr({x1:new Ee(i),y1:new Ee(e)})}function cd(i,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Ee(i),cy:new Ee(e)}):this.attr({x2:new Ee(i),y2:new Ee(e)})}var f3={__proto__:null,from:hd,to:cd};class Ls extends ai{constructor(e,t){super(tt(e+"Gradient",typeof e=="string"?null:e),t)}attr(e,t,n){return e==="transform"&&(e="gradientTransform"),super.attr(e,t,n)}bbox(){return new Ht}targets(){return Fr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Ae(Ls,f3);ze({Container:{gradient(...i){return this.defs().gradient(...i)}},Defs:{gradient:et(function(i,e){return this.put(new Ls(i)).update(e)})}});Ie(Ls,"Gradient");class ws extends ai{constructor(e,t=e){super(tt("pattern",e),t)}attr(e,t,n){return e==="transform"&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new Ht}targets(){return Fr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}ze({Container:{pattern(...i){return this.defs().pattern(...i)}},Defs:{pattern:et(function(i,e,t){return this.put(new ws).update(t).attr({x:0,y:0,width:i,height:e,patternUnits:"userSpaceOnUse"})})}});Ie(ws,"Pattern");let ar=class extends mi{constructor(e,t=e){super(tt("image",e),t)}load(e,t){if(!e)return this;const n=new Pe.window.Image;return t0(n,"load",function(r){const s=this.parent(ws);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof ws&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof t=="function"&&t.call(this,r)},this),t0(n,"load error",function(){Sr(n)}),this.attr("href",n.src=e,Cs)}};r3(function(i,e,t){return(i==="fill"||i==="stroke")&&Sf.test(e)&&(e=t.root().defs().image(e)),e instanceof ar&&(e=t.root().defs().pattern(0,0,n=>{n.add(e)})),e});ze({Container:{image:et(function(i,e){return this.put(new ar).size(0,0).load(i,e)})}});Ie(ar,"Image");class Cn extends Rr{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach(function(s){e=Math.max(s[0],e),t=Math.max(s[1],t),n=Math.min(s[0],n),r=Math.min(s[1],r)}),new Ht(n,r,e-n,t-r)}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+e,this[r][1]+t];return this}parse(e=[0,0]){const t=[];e instanceof Array?e=Array.prototype.concat.apply([],e):e=e.trim().split(an).map(parseFloat),e.length%2!==0&&e.pop();for(let n=0,r=e.length;n<r;n=n+2)t.push([e[n],e[n+1]]);return t}size(e,t){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*e/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*t/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let t=0,n=this.length;t<n;t++)e.push(this[t].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){ve.isMatrixLike(e)||(e=new ve(e));for(let t=this.length;t--;){const[n,r]=this[t];this[t][0]=e.a*n+e.c*r+e.e,this[t][1]=e.b*n+e.d*r+e.f}return this}}const p3=Cn;function m3(i){return i==null?this.bbox().x:this.move(i,this.bbox().y)}function g3(i){return i==null?this.bbox().y:this.move(this.bbox().x,i)}function v3(i){const e=this.bbox();return i==null?e.width:this.size(i,e.height)}function x3(i){const e=this.bbox();return i==null?e.height:this.size(e.width,i)}var al={__proto__:null,MorphArray:p3,x:m3,y:g3,width:v3,height:x3};class bs extends mi{constructor(e,t=e){super(tt("line",e),t)}array(){return new Cn([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(e,t){return this.attr(this.array().move(e,t).toLine())}plot(e,t,n,r){return e==null?this.array():(typeof t<"u"?e={x1:e,y1:t,x2:n,y2:r}:e=new Cn(e).toLine(),this.attr(e))}size(e,t){const n=Pr(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}}Ae(bs,al);ze({Container:{line:et(function(...i){return bs.prototype.plot.apply(this.put(new bs),i[0]!=null?i:[0,0,0,0])})}});Ie(bs,"Line");class Ma extends ai{constructor(e,t=e){super(tt("marker",e),t)}height(e){return this.attr("markerHeight",e)}orient(e){return this.attr("orient",e)}ref(e,t){return this.attr("refX",e).attr("refY",t)}toString(){return"url(#"+this.id()+")"}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}width(e){return this.attr("markerWidth",e)}}ze({Container:{marker(...i){return this.defs().marker(...i)}},Defs:{marker:et(function(i,e,t){return this.put(new Ma).size(i,e).ref(i/2,e/2).viewbox(0,0,i,e).attr("orient","auto").update(t)})},marker:{marker(i,e,t,n){let r=["marker"];return i!=="all"&&r.push(i),r=r.join("-"),i=arguments[1]instanceof Ma?arguments[1]:this.defs().marker(e,t,n),this.attr(r,i)}}});Ie(Ma,"Marker");function zr(i,e){return function(t){return t==null?this[i]:(this[i]=t,e&&e.call(this),this)}}const y3={"-":function(i){return i},"<>":function(i){return-Math.cos(i*Math.PI)/2+.5},">":function(i){return Math.sin(i*Math.PI/2)},"<":function(i){return-Math.cos(i*Math.PI/2)+1},bezier:function(i,e,t,n){return function(r){return r<0?i>0?e/i*r:t>0?n/t*r:0:r>1?t<1?(1-n)/(1-t)*r+(n-t)/(1-t):i<1?(1-e)/(1-i)*r+(e-i)/(1-i):1:3*r*(1-r)**2*e+3*r**2*(1-r)*n+r**3}},steps:function(i,e="end"){e=e.split("-").reverse()[0];let t=i;return e==="none"?--t:e==="both"&&++t,(n,r=!1)=>{let s=Math.floor(n*i);const a=n*s%1===0;return(e==="start"||e==="both")&&++s,r&&a&&--s,n>=0&&s<0&&(s=0),n<=1&&s>t&&(s=t),s/t}}};class ol{done(){return!1}}class i0 extends ol{constructor(e=cs.ease){super(),this.ease=y3[e]||e}step(e,t,n){return typeof e!="number"?n<1?e:t:e+(t-e)*this.ease(n)}}class Sa extends ol{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function eh(){const i=(this._duration||500)/1e3,e=this._overshoot||0,t=1e-10,n=Math.PI,r=Math.log(e/100+t),s=-r/Math.sqrt(n*n+r*r),a=3.9/(s*i);this.d=2*s*a,this.k=a*a}class w3 extends Sa{constructor(e=500,t=0){super(),this.duration(e).overshoot(t)}step(e,t,n,r){if(typeof e=="string")return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;n>100&&(n=16),n/=1e3;const s=r.velocity||0,a=-this.d*s-this.k*(e-t),o=e+s*n+a*n*n/2;return r.velocity=s+a*n,r.done=Math.abs(t-o)+Math.abs(s)<.002,r.done?t:o}}Ae(w3,{duration:zr("_duration",eh),overshoot:zr("_overshoot",eh)});class b3 extends Sa{constructor(e=.1,t=.01,n=0,r=1e3){super(),this.p(e).i(t).d(n).windup(r)}step(e,t,n,r){if(typeof e=="string")return e;if(r.done=n===1/0,n===1/0)return t;if(n===0)return e;const s=t-e;let a=(r.integral||0)+s*n;const o=(s-(r.error||0))/n,l=this._windup;return l!==!1&&(a=Math.max(-l,Math.min(a,l))),r.error=s,r.integral=a,r.done=Math.abs(s)<.001,r.done?t:e+(this.P*s+this.I*a+this.D*o)}}Ae(b3,{windup:zr("_windup"),p:zr("P"),i:zr("I"),d:zr("D")});const k3={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},n0={M:function(i,e,t){return e.x=t.x=i[0],e.y=t.y=i[1],["M",e.x,e.y]},L:function(i,e){return e.x=i[0],e.y=i[1],["L",i[0],i[1]]},H:function(i,e){return e.x=i[0],["H",i[0]]},V:function(i,e){return e.y=i[0],["V",i[0]]},C:function(i,e){return e.x=i[4],e.y=i[5],["C",i[0],i[1],i[2],i[3],i[4],i[5]]},S:function(i,e){return e.x=i[2],e.y=i[3],["S",i[0],i[1],i[2],i[3]]},Q:function(i,e){return e.x=i[2],e.y=i[3],["Q",i[0],i[1],i[2],i[3]]},T:function(i,e){return e.x=i[0],e.y=i[1],["T",i[0],i[1]]},Z:function(i,e,t){return e.x=t.x,e.y=t.y,["Z"]},A:function(i,e){return e.x=i[5],e.y=i[6],["A",i[0],i[1],i[2],i[3],i[4],i[5],i[6]]}},go="mlhvqtcsaz".split("");for(let i=0,e=go.length;i<e;++i)n0[go[i]]=(function(t){return function(n,r,s){if(t==="H")n[0]=n[0]+r.x;else if(t==="V")n[0]=n[0]+r.y;else if(t==="A")n[5]=n[5]+r.x,n[6]=n[6]+r.y;else for(let a=0,o=n.length;a<o;++a)n[a]=n[a]+(a%2?r.y:r.x);return n0[t](n,r,s)}})(go[i].toUpperCase());function T3(i){const e=i.segment[0];return n0[e](i.segment.slice(1),i.p,i.p0)}function r0(i){return i.segment.length&&i.segment.length-1===k3[i.segment[0].toUpperCase()]}function E3(i,e){i.inNumber&&Xn(i,!1);const t=tl.test(e);if(t)i.segment=[e];else{const n=i.lastCommand,r=n.toLowerCase(),s=n===r;i.segment=[r==="m"?s?"l":"L":n]}return i.inSegment=!0,i.lastCommand=i.segment[0],t}function Xn(i,e){if(!i.inNumber)throw new Error("Parser Error");i.number&&i.segment.push(parseFloat(i.number)),i.inNumber=e,i.number="",i.pointSeen=!1,i.hasExponent=!1,r0(i)&&s0(i)}function s0(i){i.inSegment=!1,i.absolute&&(i.segment=T3(i)),i.segments.push(i.segment)}function M3(i){if(!i.segment.length)return!1;const e=i.segment[0].toUpperCase()==="A",t=i.segment.length;return e&&(t===4||t===5)}function S3(i){return i.lastToken.toUpperCase()==="E"}function z3(i,e=!0){let t=0,n="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new mt,p:new mt};for(;r.lastToken=n,n=i.charAt(t++);)if(!(!r.inSegment&&E3(r,n))){if(n==="."){if(r.pointSeen||r.hasExponent){Xn(r,!1),--t;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=n;continue}if(!isNaN(parseInt(n))){if(r.number==="0"||M3(r)){r.inNumber=!0,r.number=n,Xn(r,!0);continue}r.inNumber=!0,r.number+=n;continue}if(n===" "||n===","){r.inNumber&&Xn(r,!1);continue}if(n==="-"){if(r.inNumber&&!S3(r)){Xn(r,!1),--t;continue}r.number+=n,r.inNumber=!0;continue}if(n.toUpperCase()==="E"){r.number+=n,r.hasExponent=!0;continue}if(tl.test(n)){if(r.inNumber)Xn(r,!1);else if(r0(r))s0(r);else throw new Error("parser Error");--t}}return r.inNumber&&Xn(r,!1),r.inSegment&&r0(r)&&s0(r),r.segments}function C3(i){let e="";for(let t=0,n=i.length;t<n;t++)e+=i[t][0],i[t][1]!=null&&(e+=i[t][1],i[t][2]!=null&&(e+=" ",e+=i[t][2],i[t][3]!=null&&(e+=" ",e+=i[t][3],e+=" ",e+=i[t][4],i[t][5]!=null&&(e+=" ",e+=i[t][5],e+=" ",e+=i[t][6],i[t][7]!=null&&(e+=" ",e+=i[t][7])))));return e+" "}class rr extends Rr{bbox(){return Mn().path.setAttribute("d",this.toString()),new Ht(Mn.nodes.path.getBBox())}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r,s=this.length-1;s>=0;s--)r=this[s][0],r==="M"||r==="L"||r==="T"?(this[s][1]+=e,this[s][2]+=t):r==="H"?this[s][1]+=e:r==="V"?this[s][1]+=t:r==="C"||r==="S"||r==="Q"?(this[s][1]+=e,this[s][2]+=t,this[s][3]+=e,this[s][4]+=t,r==="C"&&(this[s][5]+=e,this[s][6]+=t)):r==="A"&&(this[s][6]+=e,this[s][7]+=t);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),z3(e)}size(e,t){const n=this.bbox();let r,s;for(n.width=n.width===0?1:n.width,n.height=n.height===0?1:n.height,r=this.length-1;r>=0;r--)s=this[r][0],s==="M"||s==="L"||s==="T"?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y):s==="H"?this[r][1]=(this[r][1]-n.x)*e/n.width+n.x:s==="V"?this[r][1]=(this[r][1]-n.y)*t/n.height+n.y:s==="C"||s==="S"||s==="Q"?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y,this[r][3]=(this[r][3]-n.x)*e/n.width+n.x,this[r][4]=(this[r][4]-n.y)*t/n.height+n.y,s==="C"&&(this[r][5]=(this[r][5]-n.x)*e/n.width+n.x,this[r][6]=(this[r][6]-n.y)*t/n.height+n.y)):s==="A"&&(this[r][1]=this[r][1]*e/n.width,this[r][2]=this[r][2]*t/n.height,this[r][6]=(this[r][6]-n.x)*e/n.width+n.x,this[r][7]=(this[r][7]-n.y)*t/n.height+n.y);return this}toString(){return C3(this)}}const dd=i=>{const e=typeof i;return e==="number"?Ee:e==="string"?We.isColor(i)?We:an.test(i)?tl.test(i)?rr:Rr:Kc.test(i)?Ee:a0:ll.indexOf(i.constructor)>-1?i.constructor:Array.isArray(i)?Rr:e==="object"?ks:a0};class Vn{constructor(e){this._stepper=e||new i0("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(t,n){return t&&n},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(dd(e));let t=new this._type(e);return this._type===We&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===ks&&(t=this._to?t.align(this._to):this._from?t.align(this._from):t),t=t.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(t.length)).map(Object).map(function(n){return n.done=!0,n}),t}}class a0{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class As{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,As.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}As.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const N3=(i,e)=>i[0]<e[0]?-1:i[0]>e[0]?1:0;class ks{constructor(...e){this.init(...e)}align(e){const t=this.values;for(let n=0,r=t.length;n<r;++n){if(t[n+1]===e[n+1]){if(t[n+1]===We&&e[n+7]!==t[n+7]){const o=e[n+7],l=new We(this.values.splice(n+3,5))[o]().toArray();this.values.splice(n+3,0,...l)}n+=t[n+2]+2;continue}if(!e[n+1])return this;const s=new e[n+1]().toArray(),a=t[n+2]+3;t.splice(n,a,e[n],e[n+1],e[n+2],...s),n+=t[n+2]+2}return this}init(e){if(this.values=[],Array.isArray(e)){this.values=e.slice();return}e=e||{};const t=[];for(const n in e){const r=dd(e[n]),s=new r(e[n]).toArray();t.push([n,r,s.length,...s])}return t.sort(N3),this.values=t.reduce((n,r)=>n.concat(r),[]),this}toArray(){return this.values}valueOf(){const e={},t=this.values;for(;t.length;){const n=t.shift(),r=t.shift(),s=t.shift(),a=t.splice(0,s);e[n]=new r(a)}return e}}const ll=[a0,As,ks];function L3(i=[]){ll.push(...[].concat(i))}function A3(){Ae(ll,{to(i){return new Vn().type(this.constructor).from(this.toArray()).to(i)},fromArray(i){return this.init(i),this},toConsumable(){return this.toArray()},morph(i,e,t,n,r){const s=function(a,o){return n.step(a,e[o],t,r[o],r)};return this.fromArray(i.map(s))}})}class or extends mi{constructor(e,t=e){super(tt("path",e),t)}array(){return this._array||(this._array=new rr(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,t){return this.attr("d",this.array().move(e,t))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new rr(e))}size(e,t){const n=Pr(this,e,t);return this.attr("d",this.array().size(n.width,n.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}or.prototype.MorphArray=rr;ze({Container:{path:et(function(i){return this.put(new or).plot(i||new rr)})}});Ie(or,"Path");function _3(){return this._array||(this._array=new Cn(this.attr("points")))}function D3(){return delete this._array,this}function R3(i,e){return this.attr("points",this.array().move(i,e))}function I3(i){return i==null?this.array():this.clear().attr("points",typeof i=="string"?i:this._array=new Cn(i))}function O3(i,e){const t=Pr(this,i,e);return this.attr("points",this.array().size(t.width,t.height))}var ud={__proto__:null,array:_3,clear:D3,move:R3,plot:I3,size:O3};class lr extends mi{constructor(e,t=e){super(tt("polygon",e),t)}}ze({Container:{polygon:et(function(i){return this.put(new lr).plot(i||new Cn)})}});Ae(lr,al);Ae(lr,ud);Ie(lr,"Polygon");class _s extends mi{constructor(e,t=e){super(tt("polyline",e),t)}}ze({Container:{polyline:et(function(i){return this.put(new _s).plot(i||new Cn)})}});Ae(_s,al);Ae(_s,ud);Ie(_s,"Polyline");class fi extends mi{constructor(e,t=e){super(tt("rect",e),t)}}Ae(fi,{rx:rl,ry:sl});ze({Container:{rect:et(function(i,e){return this.put(new fi).size(i,e)})}});Ie(fi,"Rect");class vo{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const t=typeof e.next<"u"?e:{value:e,next:null,prev:null};return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._last=t,this._first=t),t}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Ge={nextDraw:null,frames:new vo,timeouts:new vo,immediates:new vo,timer:()=>Pe.window.performance||Pe.window.Date,transforms:[],frame(i){const e=Ge.frames.push({run:i});return Ge.nextDraw===null&&(Ge.nextDraw=Pe.window.requestAnimationFrame(Ge._draw)),e},timeout(i,e){e=e||0;const t=Ge.timer().now()+e,n=Ge.timeouts.push({run:i,time:t});return Ge.nextDraw===null&&(Ge.nextDraw=Pe.window.requestAnimationFrame(Ge._draw)),n},immediate(i){const e=Ge.immediates.push(i);return Ge.nextDraw===null&&(Ge.nextDraw=Pe.window.requestAnimationFrame(Ge._draw)),e},cancelFrame(i){i!=null&&Ge.frames.remove(i)},clearTimeout(i){i!=null&&Ge.timeouts.remove(i)},cancelImmediate(i){i!=null&&Ge.immediates.remove(i)},_draw(i){let e=null;const t=Ge.timeouts.last();for(;(e=Ge.timeouts.shift())&&(i>=e.time?e.run():Ge.timeouts.push(e),e!==t););let n=null;const r=Ge.frames.last();for(;n!==r&&(n=Ge.frames.shift());)n.run(i);let s=null;for(;s=Ge.immediates.shift();)s();Ge.nextDraw=Ge.timeouts.first()||Ge.frames.first()?Pe.window.requestAnimationFrame(Ge._draw):null}},B3=function(i){const e=i.start,t=i.runner.duration(),n=e+t;return{start:e,duration:t,end:n,runner:i.runner}},P3=function(){const i=Pe.window;return(i.performance||i.Date).now()};let fd=class extends Ns{constructor(e=P3){super(),this._timeSource=e,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),t=e?e.runner.duration():0;return(e?e.start:this._time)+t}getEndTimeOfTimeline(){const e=this._runners.map(t=>t.start+t.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const t=this.speed();if(e==null)return this.speed(-t);const n=Math.abs(t);return this.speed(e?-n:n)}schedule(e,t,n){if(e==null)return this._runners.map(B3);let r=0;const s=this.getEndTime();if(t=t||0,n==null||n==="last"||n==="after")r=s;else if(n==="absolute"||n==="start")r=t,t=0;else if(n==="now")r=this._time;else if(n==="relative"){const l=this.getRunnerInfoById(e.id);l&&(r=l.start+t,t=0)}else if(n==="with-last"){const l=this.getLastRunnerInfo();r=l?l.start:this._time}else throw new Error('Invalid value for the "when" parameter');e.unschedule(),e.timeline(this);const a=e.persist(),o={persist:a===null?this._persist:a,start:r+t,runner:e};return this._lastRunnerId=e.id,this._runners.push(o),this._runners.sort((l,h)=>l.start-h.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const t=this._runnerIds.indexOf(e.id);return t<0?this:(this._runners.splice(t,1),this._runnerIds.splice(t,1),e.timeline(null),this)}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Ge.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():this._paused?this:(this._nextFrame=Ge.frame(this._step),this)}_stepFn(e=!1){const t=this._timeSource();let n=t-this._lastSourceTime;e&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=t,e||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let a=this._runners.length;a--;){const o=this._runners[a],l=o.runner;this._time-o.start<=0&&l.reset()}let s=!1;for(let a=0,o=this._runners.length;a<o;a++){const l=this._runners[a],h=l.runner;let c=r;const d=this._time-l.start;if(d<=0){s=!0;continue}else d<c&&(c=d);if(!h.active())continue;h.step(c).done?l.persist!==!0&&h.duration()-h.time()+this._time+l.persist<this._time&&(h.unschedule(),--a,--o):s=!0}return s&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}};ze({Element:{timeline:function(i){return i==null?(this._timeline=this._timeline||new fd,this._timeline):(this._timeline=i,this)}}});class di extends Ns{constructor(e){super(),this.id=di.id++,e=e??cs.duration,e=typeof e=="function"?new Sa(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Sa,this._stepper=this._isDeclarative?e:new i0,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ve,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=this._isDeclarative?!0:null}static sanitise(e,t,n){let r=1,s=!1,a=0;return e=e||cs.duration,t=t||cs.delay,n=n||"last",typeof e=="object"&&!(e instanceof ol)&&(t=e.delay||t,n=e.when||n,s=e.swing||s,r=e.times||r,a=e.wait||a,e=e.duration||cs.duration),{duration:e,delay:t,swing:s,times:r,wait:a,when:n}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e,t){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,t,n){const r=di.sanitise(e,t,n),s=new di(r.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new ve,this}clearTransformsFromQueue(){(!this.done||!this._timeline||!this._timeline._runnerIds.includes(this.id))&&(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new i0(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,t,n){return typeof e=="object"&&(t=e.swing,n=e.wait,e=e.times),this._times=e||1/0,this._swing=t||!1,this._wait=n||0,this._times===!0&&(this._times=1/0),this}loops(e){const t=this._duration+this._wait;if(e==null){const a=Math.floor(this._time/t),l=(this._time-a*t)/this._duration;return Math.min(a+l,this._times)}const n=Math.floor(e),r=e%1,s=t*n+this._duration*r;return this.time(s)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const t=this._time,n=this._duration,r=this._wait,s=this._times,a=this._swing,o=this._reverse;let l;if(e==null){const f=function(v){const g=a*Math.floor(v%(2*(r+n))/(r+n)),x=g&&!o||!g&&o,w=Math.pow(-1,x)*(v%(r+n))/n+x;return Math.max(Math.min(w,1),0)},m=s*(r+n)-r;return l=t<=0?Math.round(f(1e-5)):t<m?f(t):Math.round(f(m-1e-5)),l}const h=Math.floor(this.loops()),c=a&&h%2===0;return l=h+(c&&!o||o&&c?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,t,n,r){return this._queue.push({initialiser:e||Jl,runner:t||Jl,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted?this:(this.time(0),this._reseted=!0,this)}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,t,n){if(e instanceof fd||(n=t,t=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,t,n),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const t=this.position(),n=this._lastPosition!==t&&this._time>=0;this._lastPosition=t;const r=this.duration(),s=this._lastTime<=0&&this._time>0,a=this._lastTime<r&&this._time>=r;this._lastTime=this._time,s&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!a&&this._time>=r,this._reseted=!1;let l=!1;return(n||o)&&(this._initialise(n),this.transforms=new ve,l=this._run(o?e:t),this.fire("step",this)),this.done=this.done||l&&o,a&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const t=e-this._time;return this.step(t),this}timeline(e){return typeof e>"u"?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(!(!e&&!this._isDeclarative))for(let t=0,n=this._queue.length;t<n;++t){const r=this._queue[t],s=this._isDeclarative||!r.initialised&&e;e=!r.finished,s&&e&&(r.initialiser.call(this),r.initialised=!0)}}_rememberMorpher(e,t){if(this._history[e]={morpher:t,caller:this._queue[this._queue.length-1]},this._isDeclarative){const n=this.timeline();n&&n.play()}}_run(e){let t=!0;for(let n=0,r=this._queue.length;n<r;++n){const s=this._queue[n],a=s.runner.call(this,e);s.finished=s.finished||a===!0,t=t&&s.finished}return t}_tryRetarget(e,t,n){if(this._history[e]){if(!this._history[e].caller.initialised){const s=this._queue.indexOf(this._history[e].caller);return this._queue.splice(s,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,t,n):this._history[e].morpher.to(t),this._history[e].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}di.id=0;class za{constructor(e=new ve,t=-1,n=!0){this.transforms=e,this.id=t,this.done=n}clearTransformsFromQueue(){}}Ae([di,za],{mergeWith(i){return new za(i.transforms.lmultiply(this.transforms),i.id)}});const pd=(i,e)=>i.lmultiplyO(e),md=i=>i.transforms;function F3(){const e=this._transformationRunners.runners.map(md).reduce(pd,new ve);this.transform(e),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class H3{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){const t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new za).forEach(n=>n.clearTransformsFromQueue()),this}edit(e,t){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1,e+1),this.runners.splice(n,1,t),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let t=0;t<this.runners.length;++t){const n=this.runners[t];if(e&&n.done&&e.done&&(!n._timeline||!n._timeline._runnerIds.includes(n.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(n.id);const s=n.mergeWith(e);this.edit(e.id,s),e=s,--t}else e=n}return this}remove(e){const t=this.ids.indexOf(e+1);return this.ids.splice(t,1),this.runners.splice(t,1),this}}ze({Element:{animate(i,e,t){const n=di.sanitise(i,e,t),r=this.timeline();return new di(n.duration).loop(n).element(this).timeline(r.play()).schedule(n.delay,n.when)},delay(i,e){return this.animate(0,i,e)},_clearTransformRunnersBefore(i){this._transformationRunners.clearBefore(i.id)},_currentTransform(i){return this._transformationRunners.runners.filter(e=>e.id<=i.id).map(md).reduce(pd,new ve)},_addRunner(i){this._transformationRunners.add(i),Ge.cancelImmediate(this._frameId),this._frameId=Ge.immediate(F3.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new H3().add(new za(new ve(this))))}}});const U3=(i,e)=>i.filter(t=>!e.includes(t));Ae(di,{attr(i,e){return this.styleAttr("attr",i,e)},css(i,e){return this.styleAttr("css",i,e)},styleAttr(i,e,t){if(typeof e=="string")return this.styleAttr(i,{[e]:t});let n=e;if(this._tryRetarget(i,n))return this;let r=new Vn(this._stepper).to(n),s=Object.keys(n);return this.queue(function(){r=r.from(this.element()[i](s))},function(a){return this.element()[i](r.at(a).valueOf()),r.done()},function(a){const o=Object.keys(a),l=U3(o,s);if(l.length){const c=this.element()[i](l),d=new ks(r.from()).valueOf();Object.assign(d,c),r.from(d)}const h=new ks(r.to()).valueOf();Object.assign(h,a),r.to(h),s=o,n=a}),this._rememberMorpher(i,r),this},zoom(i,e){if(this._tryRetarget("zoom",i,e))return this;let t=new Vn(this._stepper).to(new Ee(i));return this.queue(function(){t=t.from(this.element().zoom())},function(n){return this.element().zoom(t.at(n),e),t.done()},function(n,r){e=r,t.to(n)}),this._rememberMorpher("zoom",t),this},transform(i,e,t){if(e=i.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",i))return this;const n=ve.isMatrixLike(i);t=i.affine!=null?i.affine:t??!n;const r=new Vn(this._stepper).type(t?As:ve);let s,a,o,l,h;function c(){a=a||this.element(),s=s||e0(i,a),h=new ve(e?void 0:a),a._addRunner(this),e||a._clearTransformRunnersBefore(this)}function d(m){e||this.clearTransform();const{x:v,y:g}=new mt(s).transform(a._currentTransform(this));let x=new ve({...i,origin:[v,g]}),w=this._isDeclarative&&o?o:h;if(t){x=x.decompose(v,g),w=w.decompose(v,g);const M=x.rotate,z=w.rotate,E=[M-360,M,M+360],B=E.map(F=>Math.abs(F-z)),I=Math.min(...B),R=B.indexOf(I);x.rotate=E[R]}e&&(n||(x.rotate=i.rotate||0),this._isDeclarative&&l&&(w.rotate=l)),r.from(w),r.to(x);const N=r.at(m);return l=N.rotate,o=new ve(N),this.addTransform(o),a._addRunner(this),r.done()}function f(m){(m.origin||"center").toString()!==(i.origin||"center").toString()&&(s=e0(m,a)),i={...m,origin:s}}return this.queue(c,d,f,!0),this._isDeclarative&&this._rememberMorpher("transform",r),this},x(i,e){return this._queueNumber("x",i)},y(i){return this._queueNumber("y",i)},dx(i=0){return this._queueNumberDelta("x",i)},dy(i=0){return this._queueNumberDelta("y",i)},dmove(i,e){return this.dx(i).dy(e)},_queueNumberDelta(i,e){if(e=new Ee(e),this._tryRetarget(i,e))return this;const t=new Vn(this._stepper).to(e);let n=null;return this.queue(function(){n=this.element()[i](),t.from(n),t.to(n+e)},function(r){return this.element()[i](t.at(r)),t.done()},function(r){t.to(n+new Ee(r))}),this._rememberMorpher(i,t),this},_queueObject(i,e){if(this._tryRetarget(i,e))return this;const t=new Vn(this._stepper).to(e);return this.queue(function(){t.from(this.element()[i]())},function(n){return this.element()[i](t.at(n)),t.done()}),this._rememberMorpher(i,t),this},_queueNumber(i,e){return this._queueObject(i,new Ee(e))},cx(i){return this._queueNumber("cx",i)},cy(i){return this._queueNumber("cy",i)},move(i,e){return this.x(i).y(e)},center(i,e){return this.cx(i).cy(e)},size(i,e){let t;return(!i||!e)&&(t=this._element.bbox()),i||(i=t.width/t.height*e),e||(e=t.height/t.width*i),this.width(i).height(e)},width(i){return this._queueNumber("width",i)},height(i){return this._queueNumber("height",i)},plot(i,e,t,n){if(arguments.length===4)return this.plot([i,e,t,n]);if(this._tryRetarget("plot",i))return this;const r=new Vn(this._stepper).type(this._element.MorphArray).to(i);return this.queue(function(){r.from(this._element.array())},function(s){return this._element.plot(r.at(s)),r.done()}),this._rememberMorpher("plot",r),this},leading(i){return this._queueNumber("leading",i)},viewbox(i,e,t,n){return this._queueObject("viewbox",new Ht(i,e,t,n))},update(i){return typeof i!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(i.opacity!=null&&this.attr("stop-opacity",i.opacity),i.color!=null&&this.attr("stop-color",i.color),i.offset!=null&&this.attr("offset",i.offset),this)}});Ae(di,{rx:rl,ry:sl,from:hd,to:cd});Ie(di,"Runner");class hl extends ai{constructor(e,t=e){super(tt("svg",e),t),this.namespace()}defs(){return this.isRoot()?Ei(this.node.querySelector("defs"))||this.put(new nl):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Pe.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:Q0,version:"1.1"}).attr("xmlns:xlink",Cs,Zs).attr("xmlns:svgjs",af,Zs):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Zs).attr("xmlns:svgjs",null,Zs)}root(){return this.isRoot()?this:super.root()}}ze({Container:{nested:et(function(){return this.put(new hl)})}});Ie(hl,"Svg",!0);let cl=class extends ai{constructor(e,t=e){super(tt("symbol",e),t)}};ze({Container:{symbol:et(function(){return this.put(new cl)})}});Ie(cl,"Symbol");function $3(i){return this._build===!1&&this.clear(),this.node.appendChild(Pe.document.createTextNode(i)),this}function G3(){return this.node.getComputedTextLength()}function q3(i,e=this.bbox()){return i==null?e.x:this.attr("x",this.attr("x")+i-e.x)}function W3(i,e=this.bbox()){return i==null?e.y:this.attr("y",this.attr("y")+i-e.y)}function Y3(i,e,t=this.bbox()){return this.x(i,t).y(e,t)}function X3(i,e=this.bbox()){return i==null?e.cx:this.attr("x",this.attr("x")+i-e.cx)}function V3(i,e=this.bbox()){return i==null?e.cy:this.attr("y",this.attr("y")+i-e.cy)}function j3(i,e,t=this.bbox()){return this.cx(i,t).cy(e,t)}function K3(i){return this.attr("x",i)}function Z3(i){return this.attr("y",i)}function Q3(i,e){return this.ax(i).ay(e)}function J3(i){return this._build=!!i,this}var gd={__proto__:null,plain:$3,length:G3,x:q3,y:W3,move:Y3,cx:X3,cy:V3,center:j3,ax:K3,ay:Z3,amove:Q3,build:J3};class Lt extends mi{constructor(e,t=e){super(tt("text",e),t),this.dom.leading=new Ee(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Ee(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const t=this;let n=0;const r=this.dom.leading;this.each(function(s){const a=Pe.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=r*new Ee(a);this.dom.newLined&&(this.attr("x",t.attr("x")),this.text()===`
|
|
198
|
+
`?n+=o:(this.attr("dy",s?o+n:0),n=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Ee(e.leading||1.3),this}text(e){if(e===void 0){const t=this.node.childNodes;let n=0;e="";for(let r=0,s=t.length;r<s;++r){if(t[r].nodeName==="textPath"){r===0&&(n=1);continue}r!==n&&t[r].nodeType!==3&&Ei(t[r]).dom.newLined===!0&&(e+=`
|
|
199
|
+
`),e+=t[r].textContent}return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else{e=(e+"").split(`
|
|
200
|
+
`);for(let t=0,n=e.length;t<n;t++)this.newLine(e[t])}return this.build(!1).rebuild()}}Ae(Lt,gd);ze({Container:{text:et(function(i=""){return this.put(new Lt).text(i)}),plain:et(function(i=""){return this.put(new Lt).plain(i)})}});Ie(Lt,"Text");class Ha extends mi{constructor(e,t=e){super(tt("tspan",e),t),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Lt))return this;const t=e.index(this),n=Pe.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=e.dom.leading*new Ee(n);return this.dy(t?r:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
|
|
201
|
+
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Ae(Ha,gd);ze({Tspan:{tspan:et(function(i=""){const e=new Ha;return this._build||this.clear(),this.put(e).text(i)})},Text:{newLine:function(i=""){return this.tspan(i).newLine()}}});Ie(Ha,"Tspan");class Hr extends mi{constructor(e,t=e){super(tt("circle",e),t)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new Ee(e).divide(2))}}Ae(Hr,{x:id,y:nd,cx:rd,cy:sd,width:ad,height:od});ze({Container:{circle:et(function(i=0){return this.put(new Hr).size(i).move(0,0)})}});Ie(Hr,"Circle");class o0 extends ai{constructor(e,t=e){super(tt("clipPath",e),t)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Fr("svg [clip-path*="+this.id()+"]")}}ze({Container:{clip:et(function(){return this.defs().put(new o0)})},Element:{clipper(){return this.reference("clip-path")},clipWith(i){const e=i instanceof o0?i:this.parent().clip().add(i);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}});Ie(o0,"ClipPath");class dl extends qi{constructor(e,t=e){super(tt("foreignObject",e),t)}}ze({Container:{foreignObject:et(function(i,e){return this.put(new dl).size(i,e)})}});Ie(dl,"ForeignObject");function e2(i,e){return this.children().forEach((t,n)=>{let r;try{r=t.bbox()}catch{return}const s=new ve(t),a=s.translate(i,e).transform(s.inverse()),o=new mt(r.x,r.y).transform(a);t.move(o.x,o.y)}),this}function t2(i){return this.dmove(i,0)}function i2(i){return this.dmove(0,i)}function n2(i,e=this.bbox()){return i==null?e.height:this.size(e.width,i,e)}function r2(i=0,e=0,t=this.bbox()){const n=i-t.x,r=e-t.y;return this.dmove(n,r)}function s2(i,e,t=this.bbox()){const n=Pr(this,i,e,t),r=n.width/t.width,s=n.height/t.height;return this.children().forEach((a,o)=>{const l=new mt(t).transform(new ve(a).inverse());a.scale(r,s,l.x,l.y)}),this}function a2(i,e=this.bbox()){return i==null?e.width:this.size(i,e.height,e)}function o2(i,e=this.bbox()){return i==null?e.x:this.move(i,e.y,e)}function l2(i,e=this.bbox()){return i==null?e.y:this.move(e.x,i,e)}var vd={__proto__:null,dmove:e2,dx:t2,dy:i2,height:n2,move:r2,size:s2,width:a2,x:o2,y:l2};class Ot extends ai{constructor(e,t=e){super(tt("g",e),t)}}Ae(Ot,vd);ze({Container:{group:et(function(){return this.put(new Ot)})}});Ie(Ot,"G");class Ts extends ai{constructor(e,t=e){super(tt("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Cs)}}Ae(Ts,vd);ze({Container:{link:et(function(i){return this.put(new Ts).to(i)})},Element:{unlink(){const i=this.linker();if(!i)return this;const e=i.parent();if(!e)return this.remove();const t=e.index(i);return e.add(this,t),i.remove(),this},linkTo(i){let e=this.linker();return e||(e=new Ts,this.wrap(e)),typeof i=="function"?i.call(e,e):e.to(i),this},linker(){const i=this.parent();return i&&i.node.nodeName.toLowerCase()==="a"?i:null}}});Ie(Ts,"A");class l0 extends ai{constructor(e,t=e){super(tt("mask",e),t)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Fr("svg [mask*="+this.id()+"]")}}ze({Container:{mask:et(function(){return this.defs().put(new l0)})},Element:{masker(){return this.reference("mask")},maskWith(i){const e=i instanceof l0?i:this.parent().mask().add(i);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}});Ie(l0,"Mask");class xd extends qi{constructor(e,t=e){super(tt("stop",e),t)}update(e){return(typeof e=="number"||e instanceof Ee)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new Ee(e.offset)),this}}ze({Gradient:{stop:function(i,e,t){return this.put(new xd).update(i,e,t)}}});Ie(xd,"Stop");function h2(i,e){if(!i)return"";if(!e)return i;let t=i+"{";for(const n in e)t+=rf(n)+":"+e[n]+";";return t+="}",t}let h0=class extends qi{constructor(e,t=e){super(tt("style",e),t)}addText(e=""){return this.node.textContent+=e,this}font(e,t,n={}){return this.rule("@font-face",{fontFamily:e,src:t,...n})}rule(e,t){return this.addText(h2(e,t))}};ze("Dom",{style(i,e){return this.put(new h0).rule(i,e)},fontface(i,e,t){return this.put(new h0).font(i,e,t)}});Ie(h0,"Style");class ul extends Lt{constructor(e,t=e){super(tt("textPath",e),t)}array(){const e=this.track();return e?e.array():null}plot(e){const t=this.track();let n=null;return t&&(n=t.plot(e)),e==null?n:this}track(){return this.reference("href")}}ze({Container:{textPath:et(function(i,e){return i instanceof Lt||(i=this.text(i)),i.path(e)})},Text:{path:et(function(i,e=!0){const t=new ul;i instanceof or||(i=this.defs().path(i)),t.attr("href","#"+i,Cs);let n;if(e)for(;n=this.node.firstChild;)t.node.appendChild(n);return this.put(t)}),textPath(){return this.findOne("textPath")}},Path:{text:et(function(i){return i instanceof Lt||(i=new Lt().addTo(this.parent()).text(i)),i.path(this)}),targets(){return Fr("svg textPath").filter(i=>(i.attr("href")||"").includes(this.id()))}}});ul.prototype.MorphArray=rr;Ie(ul,"TextPath");class yd extends mi{constructor(e,t=e){super(tt("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,Cs)}}ze({Container:{use:et(function(i,e){return this.put(new yd).use(i,e)})}});Ie(yd,"Use");const ct=Yt;Ae([hl,cl,ar,ws,Ma],si("viewbox"));Ae([bs,_s,lr,or],si("marker"));Ae(Lt,si("Text"));Ae(or,si("Path"));Ae(nl,si("Defs"));Ae([Lt,Ha],si("Tspan"));Ae([fi,Fa,Ls,di],si("radius"));Ae(Ns,si("EventTarget"));Ae(zn,si("Dom"));Ae(qi,si("Element"));Ae(mi,si("Shape"));Ae([ai,ld],si("Container"));Ae(Ls,si("Gradient"));Ae(di,si("Runner"));nr.extend(tf());L3([Ee,We,Ht,ve,Rr,Cn,rr,mt]);A3();const wd={paddingX:15,paddingY:5,imgMaxWidth:200,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineFlow:!1,lineFlowDuration:1,lineFlowForward:!0,lineStyle:"straight",rootLineKeepSameInCurve:!0,rootLineStartPositionKeepSameInCurve:!1,lineRadius:5,showLineMarker:!1,generalizationLineWidth:1,generalizationLineColor:"#549688",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineDasharray:"6,4",associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"normal",fontStyle:"normal",borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],lineMarkerDir:"end",hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"normal",fontStyle:"normal",borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none",gradientStyle:!1,startColor:"#549688",endColor:"#fff",startDir:[0,0],endDir:[1,0],hoverRectColor:"",hoverRectRadius:5,textAlign:"left",imgPlacement:"top",tagPlacement:"right"}},c2=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve","rootLineStartPositionKeepSameInCurve","showLineMarker","lineRadius","hoverRectColor","hoverRectRadius","lineFlow","lineFlowDuration","lineFlowForward","textAlign"],d2=i=>{let e=Object.keys(i);for(let t=0;t<e.length;t++)if(!c2.find(n=>n===e[t]))return!1;return!0},c0=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"],Be=(i,e,t,n,r,s=0,a=0,o=[])=>{let l=!1;if(t&&(l=t(i,e,r,s,a,o)),!l&&i.children&&i.children.length>0){let h=s+1;i.children.forEach((c,d)=>{Be(c,i,t,n,!1,h,d,[...o,i])})}n&&n(i,e,r,s,a,o)},Lr=(i,e)=>{let t=[i],n=!1;for(e(i,null)==="stop"&&(n=!0);t.length&&!n;){let r=t.shift();r.children&&r.children.length&&r.children.forEach(s=>{n||(t.push(s),e(s,r)==="stop"&&(n=!0))})}},bd=(i,e,t,n)=>{let r=i/e,s=[];if(t&&n)if(i<=t&&e<=n)s=[i,e];else{let a=t/n;r>a?s=[t,t/r]:s=[r*n,n]}else t?i<=t?s=[i,e]:s=[t,t/r]:n&&(e<=n?s=[i,e]:s=[r*n,n]);return s},u2=i=>{i=i.replace(/<br>/gim,`
|
|
202
|
+
`);let e=document.createElement("div");return e.innerHTML=i,i=e.textContent,i},Ri=i=>{try{return JSON.parse(JSON.stringify(i))}catch{return null}},kd=(i,e,t=!1)=>(i.data=Ri(e.data),t&&(i.data.isActive=!1,Ms(i.data).forEach(r=>{r.isActive=!1})),i.children=[],e.children&&e.children.length>0&&e.children.forEach((n,r)=>{i.children[r]=kd({},n,t)}),Object.keys(e).forEach(n=>{!["data","children"].includes(n)&&!/^_/.test(n)&&(i[n]=e[n])}),i),Es=(i,e,t=!1,n=!0)=>{const r=e.nodeData?e.nodeData:e;return i.data=Ri(r.data),n?delete i.data.uid:i.data.uid||(i.data.uid=$i()),t&&(i.data.isActive=!1),i.children=[],e.children&&e.children.length>0?e.children.forEach((s,a)=>{i.children[a]=Es({},s,t,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((s,a)=>{i.children[a]=Es({},s,t,n)}),Object.keys(r).forEach(s=>{!["data","children"].includes(s)&&!/^_/.test(s)&&(i[s]=r[s])}),i},th=(i,e=!1)=>new Promise((t,n)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{try{let s=document.createElement("canvas");s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0,r.width,r.height),e?s.toBlob(o=>{t(o)}):t(s.toDataURL())}catch(s){n(s)}},r.onerror=s=>{n(s)},r.src=i}),f2=(i,e)=>{let t=document.createElement("a");t.href=i,t.download=e,t.click()},Ua=(i,e=300,t)=>{let n=null;return(...r)=>{n||(n=setTimeout(()=>{i.call(t,...r),n=null},e))}},p2=(i,e=300,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,i.apply(t,r)},e)}},hr=(i,e=()=>{})=>{let t=0,n=i.length;if(n<=0)return e();let r=()=>{if(t>=n){e();return}i[t](),setTimeout(()=>{t++,r()},0)};r()},Cr=i=>i*(Math.PI/180),m2=i=>i.replace(/([a-z])([A-Z])/g,(...e)=>e[1]+"-"+e[2].toLowerCase()),g2=function(i,e){let t=!1,n=null,r=()=>{t=!1,e?i.call(e):i()};if(typeof MutationObserver<"u"){let s=1,a=new MutationObserver(r),o=document.createTextNode(s);a.observe(o,{characterData:!0}),n=function(){s=(s+1)%2,o.data=s}}else n=setTimeout;return function(){t||(t=!0,n(r,0))}},v2=(i,e,t=0,n=0)=>{let r=i.elRect,{scaleX:s,scaleY:a,translateX:o,translateY:l}=i.draw.transform(),{left:h,top:c,width:d,height:f}=e,m=(h+d)*s+o,v=(c+f)*a+l;h=h*s+o,c=c*a+l;let g=0,x=0;return h<0+t&&(g=-h+t),m>r.width-t&&(g=-(m-r.width)-t),c<0+n&&(x=-c+n),v>r.height-n&&(x=-(v-r.height)-n),{isOuter:g!==0||x!==0,offsetLeft:g,offsetTop:x}};let Qs=null;const Td=i=>(Qs||(Qs=document.createElement("div")),Qs.innerHTML=i,Qs.textContent),ns=i=>new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{e(r.target.result)},n.onerror=r=>{t(r)},n.readAsDataURL(i)}),x2=i=>new Promise(e=>{let t=new Image;t.src=i,t.onload=()=>{e({width:t.width,height:t.height})},t.onerror=()=>{e({width:0,height:0})}}),$i=()=>ef(),y2=i=>new Promise((e,t)=>{let n=new FileReader;n.readAsDataURL(i),n.onload=async r=>{let s=r.target.result,a=await x2(s);e({url:s,size:a})},n.onerror=r=>{t(r)}}),w2=i=>([[" "," "]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),Qn=i=>Object.prototype.toString.call(i).slice(8,-1),Nn=i=>i==null||i==="";let Js=null;const b2=i=>{Js||(Js=document.createElement("div")),Js.innerHTML=i;for(let e=Js.childNodes,t=e.length;t--;)if(e[t].nodeType==1)return!0;return!1},Ed=i=>(i=String(i).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(i)||/rgba\(255,255,255,[^)]+\)/.test(i)),k2=i=>(i=String(i).replace(/\s+/g,""),["","transparent"].includes(i)||/rgba\(\d+,\d+,\d+,0\)/.test(i)),T2=i=>{let{lineColor:e,root:t,second:n,node:r}=i,s=[e,t.fillColor,t.color,n.fillColor,n.color,r.fillColor,r.color,t.borderColor,n.borderColor,r.borderColor];for(let a=0;a<s.length;a++){let o=s[a];if(!k2(o)&&!Ed(o))return o}},E2=i=>{const e=t=>{t.childNodes.forEach(r=>{r.nodeType===1&&(r.classList.contains("ql-formula")?r.parentNode.removeChild(r):e(r))})};e(i)};let ea=null;const Md=i=>{ea||(ea=document.createElement("div")),ea.innerHTML=i;const e=ea.childNodes;let t="";for(let n=0;n<e.length;n++){const r=e[n];r.nodeType===1?(E2(r),r.tagName.toLowerCase()==="p"?t+=r.textContent+`
|
|
203
|
+
`:t+=r.textContent):r.nodeType===3&&(t+=r.nodeValue)}return t.replace(/\n$/,"")};let bn=null;const M2=i=>{bn||(bn=document.createElement("div")),bn.innerHTML=i;const e=bn.querySelectorAll(".ql-formula");Array.from(e).forEach(r=>{const s=document.createTextNode("$smmformula$");r.parentNode.replaceChild(s,r)});const t=bn.childNodes;let n=[];for(let r=0;r<t.length;r++){const s=t[r];s.nodeType===1?n.push(s.textContent):s.nodeType===3&&n.push(s.nodeValue)}if(i=n.map(r=>`<p><span>${$a(r)}</span></p>`).join(""),e.length>0){i=i.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),bn.innerHTML=i;const r=bn.querySelectorAll(".smmformula");Array.from(r).forEach((s,a)=>{s.parentNode.replaceChild(e[a],s)}),i=bn.innerHTML}return i},S2=(i,e)=>{const t={};return Object.keys(e).forEach(n=>{const r=i[n],s=e[n];if(Qn(r)!==Qn(s)){t[n]=s;return}if(Qn(r)==="Object"){if(JSON.stringify(r)!==JSON.stringify(s)){t[n]=s;return}}else if(r!==s){t[n]=s;return}}),t},d0=i=>/^_/.test(i)?!1:!ba.includes(i),z2=i=>{const e=[...c0],t=Object.keys(i);for(let n=0;n<t.length;n++)if(!e.includes(t[n]))return!1;return!0},C2=i=>i.reduce((e,t)=>{const n=e.find(r=>r.type===t.type);return n?t.list.forEach(r=>{const s=n.list.find(a=>a.name===r.name);s?s.icon=r.icon:n.list.push(r)}):e.push({...t}),e},[]),u0=i=>{let e=[];return i.forEach(t=>{i.find(n=>n.uid!==t.uid&&n.isAncestor(t))||e.push(t)}),e},N2=i=>{const e={},t={};i.forEach(r=>{const s=r.parent;if(s){const a=s.uid;t[a]=s;const o=r.getIndexInBrothers(),l={node:r,index:o};e[a]?e[a].find(h=>h.index===l.index)||e[a].push(l):e[a]=[l]}});const n=[];return Object.keys(e).forEach(r=>{if(e[r].length>1){const s=e[r].map(a=>a.index).sort((a,o)=>a-o);n.push({node:t[r],range:[s[0],s[s.length-1]]})}else n.push({node:e[r][0].node})}),n},L2=(i,e,t,n,r,s,a,o)=>e>r&&s>i&&n>a&&o>t,A2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),t.collapse(),e.removeAllRanges(),e.addRange(t)},_2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)},ta=(i,e={})=>{e={...e},e&&e.richText&&e.resetRichText&&delete e.resetRichText;const n=r=>{r.forEach(s=>{s.data={...s.data,...e},s.children&&s.children.length>0&&n(s.children)})};return n(i),i},ds=(i,e=!1,t=null,n=!1)=>{const r=s=>{s.forEach(a=>{a.data||(a.data={}),(e||Nn(a.data.uid))&&(a.data.uid=$i()),n&&Ms(a.data).forEach(l=>{(e||Nn(l.uid))&&(l.uid=$i())}),t&&t(a),a.children&&a.children.length>0&&r(a.children)})};return r(i),i},ki=i=>i?Array.isArray(i)?i:[i]:[],us=i=>i.parent?i.parent.nodeData.children.findIndex(e=>e.data.uid===i.uid):0,Ct=(i,e)=>e.findIndex(t=>t.uid===i.uid),Sd=i=>{let e=0;for(let r=0;r<i.length;r++)e=i.charCodeAt(r)+((e<<5)-e);return"hsla("+new K0(e).genrand_int32()%360+", 50%, 50%, 1)"},$a=i=>([["&","&"],["<","<"],[">",">"]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),f0=(i,e)=>{const t=Qn(i);if(t!==Qn(e))return!1;if(t==="Object"){const n=Object.keys(i),r=Object.keys(e);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){const a=n[s];if(!r.includes(a)||!f0(i[a],e[a]))return!1}return!0}else if(t==="Array"){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){const r=i[n],s=e[n],a=Qn(r),o=Qn(s);if(a!==o||!f0(r,s))return!1}return!0}else return i===e},zd=()=>navigator.clipboard&&typeof navigator.clipboard.read=="function",ih=i=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(i))},D2=async()=>{let i=null,e=null;if(zd()){const t=await navigator.clipboard.read();if(t&&t.length>0)for(const n of t)for(const r of n.types)/^image\//.test(r)?e=await n.getType(r):r==="text/plain"&&(i=await(await n.getType(r)).text())}return{text:i,img:e}},xo=i=>{if(!i||!i.parent)return;const e=us(i);e!==-1&&i.parent.nodeData.children.splice(e,1)},R2=i=>(Iu.forEach(e=>{i=i.replace(new RegExp(`<${e}([^>]*)>`,"g"),`<${e} $1 />`)}),i),I2=(i,e)=>{if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++)if(!e.find(n=>n.uid===i[t].uid))return!1;return!0},nh=i=>({simpleMindMap:!0,data:i}),p0=i=>{let e=null;if(typeof i=="string")try{const n=JSON.parse(i);typeof n=="object"&&n.simpleMindMap&&(e=n.data)}catch{}else typeof i=="object"&&i.simpleMindMap&&(e=i.data);const t=!!e;return{isSmm:t,data:t?e:String(i)}},rh=(i,e)=>{i.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument(),e=e||i.clipboardData.getData("text"),e=$a(e),e=Td(e);const n=e.split(/\n/g),r=document.createDocumentFragment();n.forEach((s,a)=>{const o=document.createTextNode(s);if(r.appendChild(o),a<n.length-1){const l=document.createElement("br");r.appendChild(l)}}),t.getRangeAt(0).insertNode(r),t.collapseToEnd()},sh=i=>{const e={},t=(n,r)=>{const s=n.data.uid;r&&r.children.push(s),e[s]={isRoot:!r,data:{...n.data},children:[]},n.children&&n.children.length>0&&n.children.forEach(a=>{t(a,e[s])})};return t(i,null),e},O2=({addContentToHeader:i,addContentToFooter:e})=>{const t=[];let n=null,r=0,s=null,a=0;const o=(l,h)=>{if(typeof l=="function"){const c=l();if(!c)return;const{el:d,cssText:f,height:m}=c;if(d instanceof HTMLElement){Jn(d);const v=Nr({el:d,height:m});h(v,m)}f&&t.push(f)}};return o(i,(l,h)=>{n=l,r=h}),o(e,(l,h)=>{s=l,a=h}),{cssTextList:t,header:n,headerHeight:r,footer:s,footerHeight:a}},m0=(i,e=0,t=0,n=0,r=0,s=!1,a=!1)=>{let o=1/0,l=-1/0,h=1/0,c=-1/0;const d=(f,m)=>{if(!(m&&s)&&f.group)try{const{x:v,y:g,width:x,height:w}=f.group.findOne(".smm-node-shape").rbox();v<o&&(o=v),v+x>l&&(l=v+x),g<h&&(h=g),g+w>c&&(c=g+w)}catch{}!a&&f._generalizationList.length>0&&f._generalizationList.forEach(v=>{d(v.generalizationNode)}),f.children&&f.children.forEach(v=>{d(v)})};return d(i,!0),o=o-e+n,h=h-t+r,l=l-e+n,c=c-t+r,{left:o,top:h,width:l-o,height:c-h}},B2=()=>{if(document.documentElement.requestFullScreen)return"fullscreenchange";if(document.documentElement.webkitRequestFullScreen)return"webkitfullscreenchange";if(document.documentElement.mozRequestFullScreen)return"mozfullscreenchange";if(document.documentElement.msRequestFullscreen)return"msfullscreenchange"},ah=B2(),P2=i=>{i.requestFullScreen?i.requestFullScreen():i.webkitRequestFullScreen?i.webkitRequestFullScreen():i.mozRequestFullScreen&&i.mozRequestFullScreen()},F2=()=>{document.fullscreenElement&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen&&document.mozCancelFullScreen())},Nr=({el:i,width:e,height:t})=>{const n=new dl;return e!==void 0&&n.width(e),t!==void 0&&n.height(t),n.add(i),n},Ms=i=>{const e=i.generalization;return e?Array.isArray(e)?e:[e]:[]},Jn=i=>{i.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},g0=i=>(i=[...i],i.sort((e,t)=>e.sortIndex-t.sortIndex),i),Cd=(i,e)=>Ea(i,e,{arrayMerge:(t,n)=>n}),H2=i=>{const e={};return Ou.forEach(t=>{let n=i.style.merge(t);t==="fontSize"&&(n=n+"px"),e[t]=n}),e},oh=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],Nd=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];let Ca=class jn{static setBackgroundStyle(e,t){if(!e)return;if(!jn.cacheStyle){jn.cacheStyle={};let l=window.getComputedStyle(e);oh.forEach(h=>{jn.cacheStyle[h]=l[h]})}let{backgroundColor:n,backgroundImage:r,backgroundRepeat:s,backgroundPosition:a,backgroundSize:o}=t;e.style.backgroundColor=n,r&&r!=="none"?(e.style.backgroundImage=`url(${r})`,e.style.backgroundRepeat=s,e.style.backgroundPosition=a,e.style.backgroundSize=o):e.style.backgroundImage="none"}static removeBackgroundStyle(e){jn.cacheStyle&&(oh.forEach(t=>{e.style[t]=jn.cacheStyle[t]}),jn.cacheStyle=null)}constructor(e){this.ctx=e,this._markerPath=null,this._marker=null,this._gradient=null}merge(e,t){let n=this.ctx.mindMap.themeConfig,r=null,s=!1;t?(s=!0,r=n):this.ctx.isGeneralization?r=n.generalization:this.ctx.layerIndex===0?r=n.root:this.ctx.layerIndex===1?r=n.second:r=n.node;let a="";return this.getSelfStyle(e)!==void 0?a=this.getSelfStyle(e):r[e]!==void 0?a=r[e]:a=n[e],s||this.addToEffectiveStyles({[e]:a}),a}getStyle(e,t){return this.merge(e,t)}getSelfStyle(e){return this.ctx.getData(e)}addToEffectiveStyles(e){this.ctx.mindMap.painter&&(this.ctx.effectiveStyles={...this.ctx.effectiveStyles,...e})}rect(e){this.shape(e),e.radius(this.merge("borderRadius"))}shape(e){const t={};Nd.forEach(n=>{t[n]=this.merge(n)}),t.gradientStyle?(this._gradient||(this._gradient=this.ctx.nodeDraw.gradient("linear")),this._gradient.update(n=>{n.stop(0,t.startColor),n.stop(1,t.endColor)}),this._gradient.from(...t.startDir).to(...t.endDir),e.fill(this._gradient)):e.fill({color:t.fillColor}),e.stroke({color:t.borderColor,width:t.borderWidth,dasharray:t.borderDasharray})}text(e){const t={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration")};e.fill({color:t.color}).css({"font-family":t.fontFamily,"font-size":t.fontSize+"px","font-weight":t.fontWeight,"font-style":t.fontStyle,"text-decoration":t.textDecoration})}domText(e,t=1){const n={color:this.merge("color"),fontFamily:this.merge("fontFamily"),fontSize:this.merge("fontSize"),fontWeight:this.merge("fontWeight"),fontStyle:this.merge("fontStyle"),textDecoration:this.merge("textDecoration"),textAlign:this.merge("textAlign")};e.style.color=n.color,e.style.textDecoration=n.textDecoration,e.style.fontFamily=n.fontFamily,e.style.fontSize=n.fontSize*t+"px",e.style.fontWeight=n.fontWeight||"normal",e.style.fontStyle=n.fontStyle,e.style.textAlign=n.textAlign}tagText(e,t){e.fill({color:"#fff"}).css({"font-size":t.fontSize+"px"})}tagRect(e,t){e.fill({color:t.fill}),t.radius&&e.radius(t.radius)}iconNode(e,t){e.attr({fill:t||this.merge("color")})}line(e,{width:t,color:n,dasharray:r}={},s,a){const{customHandleLine:o}=this.ctx.mindMap.opt;if(typeof o=="function"&&o(this.ctx,e,{width:t,color:n,dasharray:r}),e.stroke({color:n,dasharray:r,width:t}).fill({color:"none"}),s){const l=this.merge("showLineMarker",!0),h=a.style;if(l){h._marker=h._marker||h.createMarker(),h._markerPath.stroke({color:n}).fill({color:n}),e.attr("marker-start",""),e.attr("marker-end","");const c=h.merge("lineMarkerDir");e.marker(c,h._marker)}else h._marker&&(e.attr("marker-start",""),e.attr("marker-end",""),h._marker.remove(),h._marker=null)}}createMarker(){return this.ctx.lineDraw.marker(20,20,e=>{e.ref(8,5),e.size(20,20),e.attr("markerUnits","userSpaceOnUse"),e.attr("orient","auto-start-reverse"),this._markerPath=e.path("M0,0 L2,5 L0,10 L10,5 Z")})}generalizationLine(e){e.stroke({width:this.merge("generalizationLineWidth",!0),color:this.merge("generalizationLineColor",!0)}).fill({color:"none"})}iconBtn(e,t,n){let{color:r,fill:s,fontSize:a,fontColor:o}=this.ctx.mindMap.opt.expandBtnStyle||{color:"#808080",fill:"#fff",fontSize:12,fontColor:"#333333"};e.fill({color:r}),t.fill({color:r}),n.fill({color:s}),this.ctx.mindMap.opt.isShowExpandNum&&e.attr({"font-size":a+"px","font-color":o})}hasCustomStyle(){let e=!1;return Object.keys(this.ctx.getData()).forEach(t=>{d0(t)&&(e=!0)}),e}getCustomStyle(){const e={};return Object.keys(this.ctx.getData()).forEach(t=>{d0(t)&&(e[t]=this.ctx.getData(t))}),e}hoverNode(e){const t=this.merge("hoverRectColor")||this.ctx.mindMap.opt.hoverRectColor,n=this.merge("hoverRectRadius");e.radius(n).fill("none").stroke({color:t})}onRemove(){this._marker&&(this._marker.remove(),this._marker=null),this._markerPath&&(this._markerPath.remove(),this._markerPath=null),this._gradient&&(this._gradient.remove(),this._gradient=null)}};Ca.cacheStyle=null;class U2{constructor(e){this.node=e,this.mindMap=e.mindMap}getShapePadding(e,t,n,r){const s=this.node.getShape(),a=15,o=5,l=e+n*2,h=t+r*2,c=Math.abs(l-h);switch(s){case D.SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case D.SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case D.SHAPE.PARALLELOGRAM:return{paddingX:n<=0?a:0,paddingY:0};case D.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case D.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case D.SHAPE.ELLIPSE:return{paddingX:n<=0?a:0,paddingY:r<=0?o:0};case D.SHAPE.CIRCLE:return{paddingX:h>l?c/2:0,paddingY:h<l?c/2:0}}const d=this.getShapeFromExtendList(s);return d?d.getPadding({node:this.node,width:e,height:t,paddingX:n,paddingY:r})||{paddingX:0,paddingY:0}:{paddingX:0,paddingY:0}}getShapeFromExtendList(e){return this.mindMap.extendShapeList.find(t=>t.name===e)}createShape(){const e=this.node.getShape();let t=null;if(e===D.SHAPE.RECTANGLE?t=this.createRect():e===D.SHAPE.DIAMOND?t=this.createDiamond():e===D.SHAPE.PARALLELOGRAM?t=this.createParallelogram():e===D.SHAPE.ROUNDED_RECTANGLE?t=this.createRoundedRectangle():e===D.SHAPE.OCTAGONAL_RECTANGLE?t=this.createOctagonalRectangle():e===D.SHAPE.OUTER_TRIANGULAR_RECTANGLE?t=this.createOuterTriangularRectangle():e===D.SHAPE.INNER_TRIANGULAR_RECTANGLE?t=this.createInnerTriangularRectangle():e===D.SHAPE.ELLIPSE?t=this.createEllipse():e===D.SHAPE.CIRCLE&&(t=this.createCircle()),!t){const n=this.getShapeFromExtendList(e);n&&(t=n.createShape(this.node))}return t||this.createRect()}getNodeSize(){const e=this.node.getBorderWidth();let{width:t,height:n}=this.node;return t-=e,n-=e,{width:t,height:n}}createPath(e){const{customCreateNodePath:t}=this.mindMap.opt;return t?ct(t(e)):new or().plot(e)}createPolygon(e){const{customCreateNodePolygon:t}=this.mindMap.opt;return t?ct(t(e)):new lr().plot(e)}createRect(){let{width:e,height:t}=this.getNodeSize(),n=this.node.style.merge("borderRadius");const r=`
|
|
204
|
+
M${n},0
|
|
205
|
+
L${e-n},0
|
|
206
|
+
C${e-n},0 ${e},0 ${e},${n}
|
|
207
|
+
L${e},${t-n}
|
|
208
|
+
C${e},${t-n} ${e},${t} ${e-n},${t}
|
|
209
|
+
L${n},${t}
|
|
210
|
+
C${n},${t} 0,${t} 0,${t-n}
|
|
211
|
+
L0,${n}
|
|
212
|
+
C0,${n} 0,0 ${n},0
|
|
213
|
+
Z
|
|
214
|
+
`;return this.createPath(r)}createDiamond(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const m=[[n,0],[e,r],[n,t],[0,r]];return this.createPolygon(m)}createParallelogram(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[e,0],[t,0],[t-e,n],[0,n]];return this.createPolygon(r)}createRoundedRectangle(){let{width:e,height:t}=this.getNodeSize(),n=t/2;const r=`
|
|
215
|
+
M${n},0
|
|
216
|
+
L${e-n},0
|
|
217
|
+
A${t/2},${t/2} 0 0,1 ${e-n},${t}
|
|
218
|
+
L${n},${t}
|
|
219
|
+
A${t/2},${t/2} 0 0,1 ${n},0
|
|
220
|
+
`;return this.createPath(r)}createOctagonalRectangle(){let e=5,{width:t,height:n}=this.getNodeSize();const r=[[0,e],[e,0],[t-e,0],[t,e],[t,n-e],[t-e,n],[e,n],[0,n-e]];return this.createPolygon(r)}createOuterTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[e,0],[t-e,0],[t,n/2],[t-e,n],[e,n],[0,n/2]];return this.createPolygon(r)}createInnerTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e=e||this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize();const r=[[0,0],[t,0],[t-e/2,n/2],[t,n],[0,n],[e/2,n/2]];return this.createPolygon(r)}createEllipse(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const s=`
|
|
221
|
+
M${n},0
|
|
222
|
+
A${n},${r} 0 0,1 ${n},${t}
|
|
223
|
+
M${n},${t}
|
|
224
|
+
A${n},${r} 0 0,1 ${n},0
|
|
225
|
+
`;return this.createPath(s)}createCircle(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2;const s=`
|
|
226
|
+
M${n},0
|
|
227
|
+
A${n},${r} 0 0,1 ${n},${t}
|
|
228
|
+
M${n},${t}
|
|
229
|
+
A${n},${r} 0 0,1 ${n},0
|
|
230
|
+
`;return this.createPath(s)}}const $2=[D.SHAPE.RECTANGLE,D.SHAPE.DIAMOND,D.SHAPE.PARALLELOGRAM,D.SHAPE.ROUNDED_RECTANGLE,D.SHAPE.OCTAGONAL_RECTANGLE,D.SHAPE.OUTER_TRIANGULAR_RECTANGLE,D.SHAPE.INNER_TRIANGULAR_RECTANGLE,D.SHAPE.ELLIPSE,D.SHAPE.CIRCLE];function G2(){const i=this.getData("generalization");return Array.isArray(i)?i:i?[i]:[]}function q2(){return this.formatGetGeneralization().length>0}function W2(){return!!this.formatGetGeneralization().find(e=>!e.range||e.range.length<=0)}function Y2(i){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===i.uid)}function X2(){if(this.isGeneralization||!this.checkHasGeneralization())return;let i=0,e=0;this.formatGetGeneralization().forEach((n,r)=>{let s=this._generalizationList[r];s||(s=this._generalizationList[r]={}),s.node=this,s.range=n.range,s.generalizationLine||(s.generalizationLine=this.lineDraw.path()),s.generalizationNode||(s.generalizationNode=new qa({data:{inserting:n.inserting,data:n},uid:$i(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),delete n.inserting,s.generalizationNode.generalizationBelongNode=this,s.generalizationNode.width>i&&(i=s.generalizationNode.width),s.generalizationNode.height>e&&(e=s.generalizationNode.height),n.isActive&&this.renderer.addNodeToActiveList(s.generalizationNode)}),this._generalizationNodeWidth=i,this._generalizationNodeHeight=e}function V2(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function j2(i){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();if(e.length<=0||this.getData("expand")===!1){this.removeGeneralization();return}e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(t=>{this.style.generalizationLine(t.generalizationLine),t.generalizationNode.render(()=>{},i)})}function K2(){const i=this.getChildrenLength(),e=this.formatGetGeneralization(),t=[];e.forEach(n=>{if(!n.range){t.push(n);return}n.range.length>0&&n.range[0]<=i-1&&n.range[1]<=i-1&&t.push(n)}),t.length!==e.length&&this.setData({generalization:t})}function Z2(){this.isGeneralization||(this._generalizationList.forEach(i=>{i.generalizationNode.style.onRemove(),i.generalizationLine&&(i.generalizationLine.remove(),i.generalizationLine=null),i.generalizationNode&&(this.renderer.removeNodeFromActiveList(i.generalizationNode),i.generalizationNode.remove(),i.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())}function Q2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.hide(),i.generalizationNode&&i.generalizationNode.hide()})}function J2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.show(),i.generalizationNode&&i.generalizationNode.show()})}function e6(i){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(i),e.generalizationNode.group.opacity(i)})}function t6(){const i=this.generalizationBelongNode,e=i.formatGetGeneralization(),t=i.getGeneralizationNodeIndex(this),n=e[t],s=this.getStyle("hoverRectColor")||this.mindMap.opt.hoverRectColor,a=s?{stroke:s}:null;Array.isArray(n.range)&&n.range.length>0?this.mindMap.renderer.highlightNode(i,n.range,a):this.mindMap.renderer.highlightNode(i,null,a)}function i6(){this.mindMap.renderer.closeHighlightNode()}const lh={formatGetGeneralization:G2,checkHasGeneralization:q2,checkHasSelfGeneralization:W2,getGeneralizationNodeIndex:Y2,createGeneralizationNode:X2,updateGeneralization:V2,updateGeneralizationData:K2,renderGeneralization:j2,removeGeneralization:Z2,hideGeneralization:Q2,showGeneralization:J2,setGeneralizationOpacity:e6,handleGeneralizationMouseenter:t6,handleGeneralizationMouseleave:i6},n6='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M475.136 327.168v147.968h-147.968v74.24h147.968v147.968h74.24v-147.968h147.968v-74.24h-147.968v-147.968h-74.24z m36.864-222.208c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path></svg>',r6='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M512 105.472c225.28 0 407.04 181.76 407.04 407.04s-181.76 407.04-407.04 407.04-407.04-181.76-407.04-407.04 181.76-407.04 407.04-407.04z m0-74.24c-265.216 0-480.768 215.552-480.768 480.768s215.552 480.768 480.768 480.768 480.768-215.552 480.768-480.768-215.552-480.768-480.768-480.768z"></path><path d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>',s6='<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M514.048 62.464q93.184 0 175.616 35.328t143.872 96.768 96.768 143.872 35.328 175.616q0 94.208-35.328 176.128t-96.768 143.36-143.872 96.768-175.616 35.328q-94.208 0-176.64-35.328t-143.872-96.768-96.768-143.36-35.328-176.128q0-93.184 35.328-175.616t96.768-143.872 143.872-96.768 176.64-35.328zM772.096 576.512q26.624 0 45.056-18.944t18.432-45.568-18.432-45.056-45.056-18.432l-192.512 0 0-192.512q0-26.624-18.944-45.568t-45.568-18.944-45.056 18.944-18.432 45.568l0 192.512-192.512 0q-26.624 0-45.056 18.432t-18.432 45.056 18.432 45.568 45.056 18.944l192.512 0 0 191.488q0 26.624 18.432 45.568t45.056 18.944 45.568-18.944 18.944-45.568l0-191.488 192.512 0z"></path></svg>',v0={open:n6,close:r6,quickCreateChild:s6};function a6(){if(this._openExpandNode)return;const{expandBtnSize:i,expandBtnIcon:e,isShowExpandNum:t}=this.mindMap.opt;let{close:n,open:r}=e||{};t?(this._openExpandNode=new Lt,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:i/2,y:2})):(this._openExpandNode=ct(r||v0.open).size(i,i),this._openExpandNode.x(0).y(-i/2)),this._closeExpandNode=ct(n||v0.close).size(i,i),this._closeExpandNode.x(0).y(-i/2),this._fillExpandNode=new Hr().size(i),this._fillExpandNode.x(0).y(-i/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function o6(i=[]){return i.reduce((e,t)=>e+this.sumNode(t.children||[]),i.length)}function l6(){let{expand:i}=this.getData();if(i===this._lastExpandBtnType)return;this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent();let e;if(i===!1?(e=this._openExpandNode,this._lastExpandBtnType=!1):(e=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn){let{isShowExpandNum:t,expandBtnStyle:n,expandBtnNumHandler:r}=this.mindMap.opt;if(t)if(i)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:n.strokeColor});let s=this.sumNode(this.nodeData.children||[]);if(typeof r=="function"){const a=r(s,this);Nn(a)||(s=a)}e.text(String(s))}this._expandBtn.add(this._fillExpandNode).add(e)}}function h6(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function c6(){this.getChildrenLength()<=0||this.isRoot||(this._expandBtn?this.group.add(this._expandBtn):(this._expandBtn=new Ot,this._expandBtn.on("mouseover",i=>{i.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",i=>{i.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",i=>{i.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",i=>{i.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn"),this.group.add(this._expandBtn)),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function d6(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function u6(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;i||e||setTimeout(()=>{this.renderExpandBtn()},0)}function f6(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;if(i||this._isMouseenter||e)return;let{isActive:t,expand:n}=this.getData();!t&&n&&setTimeout(()=>{this.removeExpandBtn()},0)}const hh={createExpandNodeContent:a6,updateExpandBtnNode:l6,updateExpandBtnPos:h6,renderExpandBtn:c6,removeExpandBtn:d6,showExpandBtn:u6,hideExpandBtn:f6,sumNode:o6};function p6(i={}){this.mindMap.execCommand("SET_NODE_DATA",this,i)}function m6(i,e,t){this.mindMap.execCommand("SET_NODE_TEXT",this,i,e,t)}function g6(i){this.mindMap.execCommand("SET_NODE_IMAGE",this,i)}function v6(i){this.mindMap.execCommand("SET_NODE_ICON",this,i)}function x6(i,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,i,e)}function y6(i){this.mindMap.execCommand("SET_NODE_NOTE",this,i)}function w6(i,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,i,e)}function b6(i){this.mindMap.execCommand("SET_NODE_TAG",this,i)}function k6(i){this.mindMap.execCommand("SET_NODE_SHAPE",this,i)}function T6(i,e){this.mindMap.execCommand("SET_NODE_STYLE",this,i,e)}function E6(i){this.mindMap.execCommand("SET_NODE_STYLES",this,i)}const ch={setData:p6,setText:m6,setImage:g6,setIcon:v6,setHyperlink:x6,setNote:y6,setAttachment:w6,setTag:b6,setShape:k6,setStyle:T6,setStyles:E6},M6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M435.484444 251.733333v68.892445L295.822222 320.682667a168.504889 168.504889 0 0 0-2.844444 336.952889h142.506666v68.892444H295.822222a237.397333 237.397333 0 0 1 0-474.794667h139.662222z m248.945778 0a237.397333 237.397333 0 0 1 0 474.851556H544.654222v-69.006222l139.776 0.056889a168.504889 168.504889 0 0 0 2.844445-336.952889H544.597333V251.676444h139.776z m-25.827555 203.946667a34.474667 34.474667 0 0 1 0 68.892444H321.649778a34.474667 34.474667 0 0 1 0-68.892444h336.952889z" ></path></svg>',S6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M152.768 985.984 152.768 49.856l434.56 0 66.816 0 234.048 267.392 0 66.816 0 601.92L152.768 985.984 152.768 985.984zM654.144 193.088l0 124.16 108.736 0L654.144 193.088 654.144 193.088zM821.312 384.064l-167.168 0L587.328 384.064 587.328 317.312 587.328 116.736 219.584 116.736 219.584 919.04l601.728 0L821.312 384.064 821.312 384.064zM386.688 517.888 319.808 517.888 319.808 450.944l66.816 0L386.624 517.888 386.688 517.888zM386.688 651.584 319.808 651.584 319.808 584.704l66.816 0L386.624 651.584 386.688 651.584zM386.688 785.344 319.808 785.344l0-66.88 66.816 0L386.624 785.344 386.688 785.344zM721.024 517.888 453.632 517.888 453.632 450.944l267.392 0L721.024 517.888 721.024 517.888zM654.144 651.584 453.632 651.584 453.632 584.704l200.512 0L654.144 651.584 654.144 651.584zM620.672 785.344l-167.04 0 0-66.88 167.04 0L620.672 785.344 620.672 785.344z" ></path></svg>',z6='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" width="128" height="128"><path d="M516.373333 375.978667l136.576-136.576a147.797333 147.797333 0 0 1 208.853334-0.021334 147.690667 147.690667 0 0 1-0.042667 208.832l-204.8 204.778667v0.021333l-153.621333 153.6c-85.973333 85.973333-225.28 85.973333-311.253334 0.021334-85.994667-85.973333-85.973333-225.216 0.149334-311.36L431.146667 256.362667a21.333333 21.333333 0 0 0-30.165334-30.165334L162.069333 465.066667c-102.805333 102.826667-102.826667 269.056-0.149333 371.733333 102.613333 102.613333 268.970667 102.613333 371.584 0l153.6-153.642667h0.021333l0.021334-0.021333 204.778666-204.778667c74.325333-74.325333 74.346667-194.858667 0.021334-269.184-74.24-74.24-194.88-74.24-269.162667 0.042667l-136.576 136.554667-187.626667 187.626666a117.845333 117.845333 0 0 0-0.106666 166.826667 118.037333 118.037333 0 0 0 166.826666-0.106667l255.850667-255.829333a21.333333 21.333333 0 0 0-30.165333-30.165333L435.136 669.973333a75.370667 75.370667 0 0 1-106.496 0.106667 75.178667 75.178667 0 0 1 0.128-106.496l187.605333-187.605333z" ></path></svg>',Ld=[{name:"优先级图标",type:"priority",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#E93B30"></path><path d="M580.309333 256h-75.52c-10.666667 29.824-30.165333 55.765333-58.709333 78.165333-28.416 22.314667-54.869333 37.418667-79.146667 45.397334v84.608a320 320 0 0 0 120.234667-70.698667v352.085333H580.266667V256z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.957333 1024C229.248 1024 0 794.752 0 512S229.248 0 511.957333 0C794.752 0 1024 229.248 1024 512s-229.248 512-512.042667 512z" fill="#FA8D2E"></path><path d="M667.946667 658.602667h-185.301334c4.864-8.533333 11.178667-17.066667 19.072-25.984 7.808-8.874667 26.453333-26.837333 55.936-53.888 29.525333-27.008 49.877333-47.786667 61.226667-62.165334 16.981333-21.717333 29.44-42.453333 37.290667-62.293333 7.808-19.84 11.776-40.746667 11.776-62.677333 0-38.570667-13.738667-70.741333-41.088-96.725334C599.466667 268.928 561.706667 256 513.834667 256c-43.690667 0-80.128 11.136-109.354667 33.578667-29.098667 22.4-46.506667 59.306667-52.010667 110.805333l93.184 9.301333c1.792-27.349333 8.405333-46.890667 19.754667-58.624 11.434667-11.776 26.837333-17.664 46.165333-17.664 19.541333 0 34.858667 5.589333 45.909334 16.768 11.136 11.264 16.682667 27.221333 16.682666 48.042667 0 18.858667-6.4 37.930667-19.242666 57.258667-9.472 14.037333-35.157333 40.533333-77.098667 79.872-52.096 48.554667-87.04 87.509333-104.704 116.821333A226.688 226.688 0 0 0 341.333333 745.429333h326.613334v-86.826666z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#2E66FA"></path><path d="M627.754667 731.733333c-29.354667 25.088-66.901333 37.632-112.725334 37.632-44.928 0-81.792-11.52-110.592-34.773333-33.066667-26.538667-49.877333-64.469333-50.304-114.133333h92.16c0.426667 21.76 7.552 38.314667 21.333334 49.664 12.288 10.88 28.117333 16.341333 47.402666 16.341333 20.309333 0 36.778667-6.101333 49.322667-18.432 12.544-12.330667 18.773333-29.568 18.773333-51.797333 0-21.290667-6.229333-38.186667-18.773333-50.773334-12.544-12.501333-29.866667-18.773333-52.138667-18.773333h-13.525333v-80.042667H512c42.112 0 63.274667-21.034667 63.274667-63.146666 0-20.309333-5.888-36.096-17.706667-47.445334a60.757333 60.757333 0 0 0-43.818667-17.066666c-17.493333 0-32 5.504-43.434666 16.298666-11.562667 10.88-17.792 25.728-18.773334 44.714667H359.68c0.981333-43.946667 16.042667-78.976 45.397333-104.96 29.354667-25.941333 65.706667-39.04 109.226667-39.04 44.928 0 81.792 13.525333 110.592 40.490667 28.8 26.922667 43.306667 61.610667 43.306667 104.149333 0 48.213333-19.413333 82.688-58.154667 103.552 43.52 23.125333 65.28 61.44 65.28 114.858667 0 48.128-15.957333 85.76-47.573333 112.682666z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M600.96 256v309.802667h60.117333v81.536h-60.16v98.218666h-90.154666v-98.218666H311.466667v-81.237334L522.666667 256h78.293333zM510.72 399.104l-112.042667 166.698667h112.042667V399.104z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 512.042667 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M470.912 343.552h175.786667V256H400.256l-47.786667 253.952 75.434667 10.837333c21.205333-23.552 45.269333-35.413333 72.021333-35.413333 21.546667 0 38.997333 7.509333 52.437334 22.4 13.312 15.018667 20.053333 37.418667 20.053333 67.328 0 31.872-6.741333 55.765333-20.181333 71.552-13.397333 15.872-29.866667 23.765333-49.237334 23.765333-17.066667 0-32.085333-6.186667-45.013333-18.432-13.013333-12.373333-20.821333-29.013333-23.466667-50.133333L341.333333 611.498667c5.546667 40.874667 22.485333 73.429333 50.730667 97.621333 28.330667 24.32 64.938667 36.437333 109.866667 36.437333 56.149333 0 100.053333-21.546667 131.754666-64.554666a176.64 176.64 0 0 0 34.816-107.52c0-48.042667-14.378667-87.210667-43.221333-117.333334-28.8-30.208-63.957333-45.312-105.514667-45.312-21.674667 0-42.922667 5.248-63.829333 15.616l14.976-82.901333z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.205333 229.248 0 512 0c282.88 0 512 229.205333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M519.210667 256c36.992 0 67.626667 10.368 91.776 31.189333 24.192 20.821333 39.68 51.029333 46.293333 90.709334l-90.197333 9.984c-2.176-18.56-7.978667-32.298667-17.28-41.173334-9.258667-8.874667-21.418667-13.226667-36.224-13.226666-19.754667 0-36.437333 8.789333-50.048 26.453333-13.696 17.664-22.314667 54.613333-25.856 110.549333 23.296-27.52 52.138667-41.258667 86.656-41.258666 38.997333 0 72.362667 14.805333 100.181333 44.544 27.733333 29.696 41.685333 68.010667 41.685333 114.858666 0 49.877333-14.634667 89.856-43.818666 119.936-29.226667 30.208-66.730667 45.226667-112.554667 45.226667-49.066667 0-89.429333-19.072-121.130667-57.344C357.12 658.218667 341.333333 595.541333 341.333333 508.416c0-89.344 16.469333-153.813333 49.493334-193.194667C423.722667 275.754667 466.56 256 519.168 256z m-9.472 241.834667c-17.962667 0-33.066667 6.997333-45.525334 21.12-12.330667 14.037333-18.56 34.858667-18.56 62.293333 0 30.421333 6.912 53.76 20.906667 70.4 13.952 16.469333 29.866667 24.746667 47.786667 24.746667 17.28 0 31.701333-6.826667 43.178666-20.309334 11.52-13.525333 17.237333-35.669333 17.237334-66.56 0-31.658667-6.186667-54.869333-18.517334-69.546666a58.197333 58.197333 0 0 0-46.506666-22.144z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.752 0 512S229.248 0 512.042667 0C794.752 0 1024 229.248 1024 512s-229.248 512-511.957333 512z" fill="#6D768D"></path><path d="M673.024 273.066667H354.133333v86.869333h212.224a691.2 691.2 0 0 0-104.746666 187.989333c-26.026667 70.101333-39.978667 138.88-41.429334 206.293334h89.6c-0.298667-42.922667 6.698667-91.776 21.034667-146.474667a654.72 654.72 0 0 1 62.08-154.965333c27.136-48.554667 53.888-85.76 80.128-111.701334V273.066667z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z" fill="#6D768D"></path><path d="M512.426667 256c46.208 0 82.048 11.861333 107.605333 35.541333 25.6 23.68 38.314667 53.674667 38.314667 89.898667 0 22.613333-5.802667 42.666667-17.578667 60.330667a111.445333 111.445333 0 0 1-49.450667 40.277333c26.965333 10.837333 47.36 26.752 61.312 47.658667 13.994667 20.906667 21.034667 45.013333 21.034667 72.362666 0 45.098667-14.336 81.834667-42.965333 109.952-28.586667 28.245333-66.602667 42.368-114.090667 42.368-44.245333 0-81.066667-11.648-110.464-34.986666-34.645333-27.52-52.010667-65.28-52.010667-113.365334 0-26.368 6.528-50.645333 19.626667-72.746666 13.056-22.144 33.578667-39.210667 61.696-51.242667-24.064-10.154667-41.557333-24.192-52.48-41.941333a109.824 109.824 0 0 1-16.512-58.666667c0-36.224 12.757333-66.218667 37.973333-89.898667 25.386667-23.68 61.354667-35.541333 108.032-35.541333z m1.28 265.429333c-22.784 0-39.722667 7.978667-50.901334 23.893334-11.136 15.786667-16.64 33.066667-16.64 51.498666 0 25.984 6.485333 46.208 19.712 60.714667 13.098667 14.506667 29.525333 21.802667 49.152 21.802667 19.242667 0 35.157333-6.997333 47.786667-20.992 12.629333-13.909333 18.858667-34.048 18.858667-60.416 0-23.082667-6.314667-41.557333-19.2-55.466667a63.274667 63.274667 0 0 0-48.725334-21.034667z m-0.341334-191.488c-17.792 0-32 5.333333-42.581333 16-10.538667 10.666667-15.872 24.746667-15.872 42.325334 0 18.645333 5.248 33.152 15.701333 43.648 10.453333 10.453333 24.362667 15.658667 41.770667 15.658666 17.664 0 31.658667-5.290667 42.24-15.872 10.538667-10.581333 15.872-25.173333 15.872-43.818666 0-17.493333-5.248-31.573333-15.701333-42.154667s-24.277333-15.786667-41.429334-15.786667z" fill="#FFFFFF"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 1024C229.248 1024 0 794.794667 0 512.042667 0 229.333333 229.248 0 512 0c282.88 0 512 229.333333 512 512.042667C1024 794.794667 794.88 1024 512 1024z" fill="#6D768D"></path><path d="M497.28 256c49.365333 0 89.856 19.157333 121.429333 57.429333 31.701333 38.229333 47.488 101.205333 47.488 188.842667 0 89.173333-16.384 153.386667-49.365333 192.853333-32.853333 39.594667-75.605333 59.264-128.426667 59.264-37.888 0-68.608-10.154667-91.989333-30.506666s-38.4-50.816-45.013333-91.306667l90.112-9.984c2.261333 18.474667 8.021333 32.085333 17.28 41.088 9.173333 8.874667 21.418667 13.312 36.608 13.312 19.2 0 35.541333-8.874667 48.981333-26.752 13.44-17.749333 22.016-54.613333 25.770667-110.549333-23.466667 27.264-52.821333 40.874667-88.064 40.874666-38.314667 0-71.253333-14.72-99.114667-44.330666C355.242667 506.709333 341.333333 468.224 341.333333 420.864c0-49.493333 14.592-89.258667 43.946667-119.466667C414.549333 271.104 451.925333 256 497.237333 256z m-4.352 77.482667c-17.237333 0-31.658667 6.826667-43.008 20.437333-11.477333 13.653333-17.194667 35.84-17.194667 66.816 0 31.402667 6.229333 54.485333 18.645334 69.205333 12.458667 14.72 27.946667 22.101333 46.592 22.101334 18.005333 0 33.066667-7.082667 45.44-21.205334 12.330667-14.208 18.432-35.029333 18.432-62.506666 0-29.994667-6.912-53.376-20.821334-69.973334-13.824-16.597333-29.866667-24.874667-48.085333-24.874666z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512.042667 1024C229.248 1024 0 794.794667 0 511.957333 0 229.205333 229.248 0 512.042667 0 794.752 0 1024 229.205333 1024 511.957333 1024 794.794667 794.752 1024 512.042667 1024z" fill="#6D768D"></path><path d="M619.946667 273.066667c46.976 0 83.754667 16.042667 110.250666 48.042666 31.573333 37.973333 47.36 100.864 47.36 188.672 0 87.722667-15.829333 150.698667-47.658666 189.056-26.325333 31.616-62.976 47.36-109.952 47.36-47.274667 0-85.418667-17.237333-114.346667-51.968-28.885333-34.602667-43.392-96.426667-43.392-185.386666 0-87.168 15.872-150.016 47.701333-188.416 26.282667-31.488 62.933333-47.36 110.037334-47.36z m-207.488 12.8v452.266666H325.504V411.690667A299.904 299.904 0 0 1 213.333333 476.373333V398.933333c22.656-7.296 47.36-21.12 73.856-41.514666 26.624-20.522667 44.842667-44.288 54.784-71.552h70.485334z m207.488 60.842666c-11.306667 0-21.461333 3.413333-30.336 10.24-8.874667 6.826667-15.786667 19.157333-20.693334 36.864-6.4 22.997333-9.642667 61.653333-9.642666 115.968 0 54.442667 2.944 91.733333 8.661333 112.128 5.802667 20.352 13.098667 33.877333 21.845333 40.618667 8.789333 6.741333 18.858667 10.154667 30.165334 10.154667 11.349333 0 21.376-3.498667 30.250666-10.325334 8.874667-6.826667 15.786667-19.157333 20.693334-36.778666 6.4-22.826667 9.642667-61.354667 9.642666-115.797334 0-54.314667-2.858667-91.648-8.661333-112.042666-5.802667-20.352-13.013333-33.962667-21.76-40.789334a47.616 47.616 0 0 0-30.165333-10.24z" fill="#FFFFFF"></path></svg>'}]},{name:"进度图标",type:"progress",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144-294.144A414.72 414.72 0 0 1 928 512c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512h416c0 229.76-186.24 416-416 416z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96V512l294.144 294.144A414.72 414.72 0 0 1 512 928z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 928c-229.76 0-416-186.24-416-416S282.24 96 512 96v832z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512l-294.144 294.144A414.72 414.72 0 0 1 96 512c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512H96c0-229.76 186.24-416 416-416V512z" fill="#FFFFFF"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.752 0 512 0z" fill="#12BB37"></path><path d="M512 512L217.856 217.856A414.72 414.72 0 0 1 512 96V512z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#12BB37"></path><path d="M716.629333 341.333333h-51.328a35.072 35.072 0 0 0-28.330666 14.293334l-171.989334 233.984-77.909333-106.026667a35.2 35.2 0 0 0-28.330667-14.293333H307.413333c-7.082667 0-11.264 7.936-7.082666 13.653333l136.32 185.472a35.2 35.2 0 0 0 56.533333 0l230.4-313.429333a8.533333 8.533333 0 0 0-6.954667-13.653334z" fill="#FFFFFF"></path></svg>'}]},{name:"表情图标",type:"expression",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024"><path d="M1.097856 1.097642h1021.804717v1021.804716H1.097856z" fill="#F09495" ></path><path d="M1024.000214 1024H0.000214V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.195498v1019.609432z" fill="#FFFFFF" ></path><path d="M234.695985 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M234.695985 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115s28.339115 12.772559 28.339115 28.339115c0.099786 15.666342-12.672773 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617-11.774703-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M776.232528 335.179887m-27.341259 0a27.341259 27.341259 0 1 0 54.682518 0 27.341259 27.341259 0 1 0-54.682518 0Z" fill="#040000" ></path><path d="M776.232528 363.519002c-15.666342 0-28.339115-12.772559-28.339115-28.339115 0-15.666342 12.772559-28.339115 28.339115-28.339115 15.666342 0 28.339115 12.772559 28.339115 28.339115 0 15.666342-12.772559 28.339115-28.339115 28.339115z m0-54.582732c-14.468914 0-26.243617 11.774703-26.243617 26.243617s11.774703 26.243617 26.243617 26.243617 26.243617-11.774703 26.243617-26.243617c-0.099786-14.468914-11.874488-26.243617-26.243617-26.243617z" fill="#FFFFFF" ></path><path d="M512.000214 671.656987c-52.58702 0-105.872539-17.961411-105.872539-52.387449S459.413194 566.882089 512.000214 566.882089s105.872539 17.961411 105.87254 52.387449S564.587234 671.656987 512.000214 671.656987z m0-74.240499c-21.952836 0-43.207172 3.592282-58.2748 9.77899-13.870201 5.68778-17.06334 11.275775-17.06334 12.07406s3.19314 6.386279 17.06334 12.07406c15.067628 6.186708 36.321965 9.77899 58.2748 9.77899s43.207172-3.592282 58.274801-9.77899c13.870201-5.68778 17.06334-11.275775 17.06334-12.07406s-3.19314-6.386279-17.06334-12.07406c-15.067628-6.286494-36.321965-9.77899-58.274801-9.77899z" fill="#040000" ></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#E6A6C9" ></path><path d="M315.1 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM738.7 368.1c-23.9 0-43.3-19.4-43.3-43.3s19.4-43.3 43.3-43.3 43.3 19.4 43.3 43.3-19.4 43.3-43.3 43.3z m0-74.7c-17.3 0-31.3 14.1-31.3 31.3 0 17.3 14.1 31.3 31.3 31.3 17.3 0 31.3-14.1 31.3-31.3 0-17.2-14-31.3-31.3-31.3zM293.5 698.8l-14.5-1.3c0.1-0.6 1.5-14.6 15.1-27.9 17.2-16.7 45-24.8 82.7-24 4.9-0.1 10.9-10.5 16.1-19.6 8.4-14.7 19-33.1 37.9-34.3 19.4-1.2 42.2 16.4 71.5 55.4 9.9 5.2 16.5 11.2 21.8 16.1 8.4 7.7 13.1 11.9 25.1 10.8 14.9-1.4 38.9-11.1 77.5-31.4 26.8-28.4 56.4-41.4 83.5-36.6 27.9 4.9 50.6 27.6 67.5 67.5l-13.4 5.7c-14.7-34.5-34.3-54.9-56.7-58.8-22.3-3.9-47.6 7.8-71.2 33.1l-0.8 0.9-1.1 0.6c-85.6 45.1-99.4 38-120.2 19.1-5.5-5-11.2-10.2-20.1-14.7l-1.5-0.8-1-1.4c-32.2-43.2-50.4-51.6-60-51-11.1 0.7-18.8 14-26.2 27-7.6 13.2-15.4 26.9-28.8 26.9h-0.2c-78.4-1.6-83 38.3-83 38.7z" fill="#040000" ></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#F7E983" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M329.174412 344.491728a38.118106 10.277919 57.6 1 0 17.355867-11.014369 38.118106 10.277919 57.6 1 0-17.355867 11.014369Z" fill="#040000" ></path><path d="M644.769475 355.956059a11.175989 36.321965 30 1 0 36.321965-62.911488 11.175989 36.321965 30 1 0-36.321965 62.911488Z" fill="#040000" ></path><path d="M569.678445 671.158059c-26.343403 0-51.190021-5.288638-70.049503-14.967843-20.755408-10.577275-32.230754-25.445332-32.230755-41.710388 0-16.265056 11.475346-31.133112 32.230755-41.710387 18.859482-9.579419 43.805886-14.967843 70.049503-14.967843s51.190021 5.288638 70.049503 14.967843c20.755408 10.577275 32.230754 25.445332 32.230754 41.710387 0 16.265056-11.475346 31.133112-32.230754 41.710388-18.859482 9.679205-43.805886 14.967843-70.049503 14.967843z m0-95.095693c-49.693237 0-84.318846 20.356266-84.318846 38.517248s34.625609 38.517248 84.318846 38.517248 84.318846-20.356266 84.318846-38.517248-34.725395-38.517248-84.318846-38.517248z" fill="#040000" ></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#A6D9E2" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M376.194134 348.950302m-23.44962 0a23.44962 23.44962 0 1 0 46.89924 0 23.44962 23.44962 0 1 0-46.89924 0Z" fill="#040000" ></path><path d="M629.150672 348.950302m-24.647047 0a24.647047 24.647047 0 1 0 49.294095 0 24.647047 24.647047 0 1 0-49.294095 0Z" fill="#040000" ></path><path d="M397.847613 603.503411c13.471058 8.282206 28.738258 14.468914 43.7061 19.458195 29.835899 9.978562 62.266225 14.169558 93.299551 7.483921 21.054765-4.490353 40.213604-14.369129 56.778016-28.039758 6.785422-5.587995-2.893783-15.167414-9.579419-9.579419-46.999026 38.916391-112.258819 31.033327-163.847983 6.086922-4.590138-2.195284-9.080491-4.490353-13.371272-7.184564-7.583707-4.590138-14.468914 7.184564-6.984993 11.774703z" fill="#040000" ></path><path d="M627.753674 534.052621c-31.033327 24.048334-58.474371 68.253362-37.419607 106.970182 10.577275 19.35841 29.835899 32.629897 48.795167 42.708244 7.982849 4.190996 15.067628-7.883064 7.084779-12.07406-25.245761-13.271487-53.485091-35.324108-49.094524-66.557006 2.793997-20.156695 15.766127-37.319821 29.736114-51.190022 3.392711-3.392711 6.984993-6.785422 10.776847-9.77899 2.993569-2.295069 2.394855-7.483921 0-9.878776-2.893783-3.19314-6.885208-2.49464-9.878776-0.199572z" fill="#040000" ></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1026 1024" ><path d="M1.1 1.097642h1021.804716v1021.804716H1.1z" fill="#AD6F59" ></path><path d="M1024.002358 1024H0.002358V0h1024v1024z m-1021.804716-2.195284h1019.609433V2.195284H2.197642v1019.609432z" fill="#FFFFFF" ></path><path d="M411.829832 330.730879a38.118106 10.277919 57.6 1 0 17.355867-11.014368 38.118106 10.277919 57.6 1 0-17.355867 11.014368Z" fill="#040000" ></path><path d="M480.669675 609.989476c11.774703-25.844475 27.740401-51.788735 44.60417-73.342429 13.770415-17.462483 29.237186-33.92711 47.897096-44.803742 17.262912-10.078347 35.324108-13.67063 54.283376-6.58585 11.974274 4.390567 23.948548 14.468914 33.128825 24.547261 14.369129 15.865913 25.145975 34.625609 34.725394 53.684662 4.290782 8.581563 17.262912 0.997856 12.972131-7.583707-15.167414-30.334828-35.224323-63.763009-66.157864-80.327421-21.054765-11.37556-44.504385-11.475346-66.157864-1.895927-21.054765 9.280062-38.617034 25.644904-53.485091 42.907815-14.468914 16.863769-27.041902 35.324108-38.217891 54.582733-5.887351 10.178133-11.674917 20.555837-16.464627 31.232898-1.696355 3.692068-0.997856 7.982849 2.694212 10.277918 3.19314 1.895927 8.581563 0.898071 10.178133-2.694211z" fill="#040000" ></path><path d="M663.863649 338.091735a14.468914 33.727538 30 1 0 33.727538-58.417811 14.468914 33.727538 30 1 0-33.727538 58.417811Z" fill="#040000" ></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#83CEE3" ></path><path d="M369 375.8m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M369 411.7c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.1 36-36 36z m0-69.1c-18.3 0-33.2 14.9-33.2 33.2S350.7 409 369 409s33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M672.2 333.6c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.3-7.6-13zM578.2 720.9c-12.5-96.7-33.3-154.7-55.6-155.6-8.8 3.9-22.3 17.5-37.7 60.1-10.8 29.8-18.4 62.2-23 81.6-1.2 5.1-2.1 9.1-2.9 11.8l-9.3-2.4c0.7-2.6 1.6-6.6 2.8-11.6 14.9-63 36-136.8 67.5-148.8l0.8-0.3h0.8c18.2-0.4 33.2 19.5 45.8 60.8 10.2 33.3 16.7 74.6 20.5 103.3l-9.7 1.1z" fill="#040000" ></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#8CC66D" ></path><path d="M375.778679 404.47473a14.5 33.8 30 1 0 33.8-58.543317 14.5 33.8 30 1 0-33.8 58.543317Z" fill="#040000" ></path><path d="M627.220263 374.211388a43.1 11.6 57.6 1 0 19.588408-12.431182 43.1 11.6 57.6 1 0-19.588408 12.431182Z" fill="#040000" ></path><path d="M451.1 548.5c17.6-9.3 63.9-30 105.3-16.2 17 20.3 32.7 98.8 28.8 138.1-27.5 10.2-82.5 10.2-106.1 5.8-8.3-10.5-32.7-81.8-35.3-114.6-0.4-5.5 2.5-10.6 7.3-13.1z" fill="#040000" ></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#5A74B8" ></path><path d="M357.7 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M357.7 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2 33.2-14.9 33.2-33.2-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M676 400m-34.6 0a34.6 34.6 0 1 0 69.2 0 34.6 34.6 0 1 0-69.2 0Z" fill="#040000" ></path><path d="M676 436c-19.8 0-36-16.1-36-36s16.1-36 36-36 36 16.1 36 36-16.2 36-36 36z m0-69.2c-18.3 0-33.2 14.9-33.2 33.2s14.9 33.2 33.2 33.2c18.3 0 33.2-14.9 33.2-33.2s-14.9-33.2-33.2-33.2z" fill="#FFFFFF" ></path><path d="M347.6 684.1c0.3-0.9 0.6-1.7 0.9-2.6 0.2-0.5 1.4-3.2 0.3-0.8 0.6-1.4 1.3-2.9 2-4.3 3.2-6.3 6-10.7 10.9-15.3 4.3-4 10.8-7.5 17.1-6.1 3.9 0.9 7.9 4.9 11.1 7.2 3.1 2.2 6.3 4.5 9.7 6.2 7.5 3.8 15.3 4.4 23.4 1.9 4.7-1.5 9.2-3.6 13.6-5.9 5-2.6 10.7-5 14.2-9.5 4.5-5.7 6.1-8.5 11.4-14.1 1-1 2-2 3.1-3 0.2-0.2 2.2-1.7 0.6-0.5 0.6-0.4 1.2-0.9 1.8-1.3 1-0.6 2.1-1.3 3.2-1.7-2 0.8 0.2 0 0.6-0.1 2.3-0.7-0.3-0.2 1.2-0.3 2.8-0.1 3.6 0 5.5 1 3.8 1.9 6.6 4.7 9.5 7.8 4.5 5 7.5 11.1 11.7 16.2 1.8 2.2 3.7 4.3 5.4 6.5 8.1 10.3 17.7 22.2 32.2 22 8.8-0.1 16.6-5.2 22.6-11.2 4.2-4.1 7.7-8.9 11-13.7 2.9-4.2 4.6-9.9 6.2-13.5 3.2-7.1 7.2-13.1 13-18.1 4.8-4.2 11.1-6.5 16.7-5.3 10.5 2.4 17.2 12.1 23.1 20.2 4.7 6.5 9.8 13 16 18.2 7.8 6.4 17.1 11.4 27.5 11.1 14.1-0.4 25.5-9.5 34.2-19.9 3-3.6 3.6-8.8 0-12.4-3.1-3.1-9.4-3.7-12.4 0-6.3 7.6-14.7 15.9-24.9 14.7-2.2-0.3-5.3-1.5-7.9-3.1-3.5-2.1-6.1-4.4-9.1-7.5-4.9-5.1-6.8-8.1-10.9-13.8-7.3-10.1-16.1-19.6-28.2-23.7-18.5-6.3-35.7 5.6-46 20.1-2.4 3.3-4.4 6.9-6.1 10.6-1.8 3.9-2.7 8.5-5.2 11.9-3.1 4.4-6.2 8.8-10.2 12.5-3 2.8-5.7 4.4-8.6 5.1-0.4 0.1-1.7 0.1 0.1 0h-2.2c2.1 0.1 0 0-0.5-0.1-0.7-0.2-1.4-0.4-2-0.6 1.8 0.7-1.8-1.1-2.4-1.5l-1.2-0.9c1.5 1.2-0.9-0.9-1.2-1.1-4.7-4.3-8.4-9.5-12.3-14.4-10.9-13.6-20.9-34-41-34.9-14.2-0.6-24.5 10.6-32.4 20.8-1.2 1.6-2.5 3.2-3.7 4.8-1.5 1.9 1.1-1.4-0.4 0.5-0.4 0.5-0.8 1.2-1.3 1.6-1.7 1.4-4.6 2.6-6.6 3.6-2.9 1.6-5.9 3.2-9 4.5-1.6 0.7-3.4 1.2-5.1 1.7-2.2 0.6-0.7 0.5-2.8 0.4-2.8 0-3.9-0.4-6.6-1.9-3.9-2.2-7.5-4.9-11.1-7.5-5.6-4-10-6.9-17-7.5-10.5-0.9-20.3 3.2-28.2 9.9-9.4 8.1-16.4 20.2-20.1 32-3.6 11.2 13.3 15.8 16.8 5.1z" fill="#040000" ></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F0884F" ></path><path d="M287.2 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM598 382c6.4 2.3 11.6-3.7 15.4-7.9 5.1-5.5 10.2-11 16-15.9 0.8-0.7 1.7-1.4 2.5-2.1 1.2-0.9-1.7 1.3 0.2-0.2l1.2-0.9c2.1-1.5 4.3-2.9 6.5-4.3 2-1.2 4-2.2 6.1-3.2 0.6-0.3 1.2-0.6 1.9-0.9-0.3 0.2-1.5 0.6 0.2-0.1 1.3-0.5 2.6-1 4-1.5 11.2-3.7 21.8-4 33.4-1.1 19.5 4.9 36.4 17 51.2 30.2 8.6 7.7 21.4-5 12.7-12.7-25.2-22.6-57.1-42.1-92.2-36.2-20.4 3.4-37.7 16.1-51.6 30.9-2.3 2.4-4.5 5-6.8 7.4-0.7 0.7-1.9 1.5-2.4 2.4-0.5 0.8 2.3-1.5 0.8-0.7 1.3-0.7 3.9-1.4 5.8-0.7-11.1-3.7-15.8 13.7-4.9 17.5zM505.9 527.1c3.4 0.7 6.8 1.7 10.2 2.8 6.7 2.2 10.4 3.5 16.6 7.7 1.6 1.1-0.5-0.5 0.6 0.5 0.6 0.5 1.1 1.1 1.7 1.6 1.5 1.4-0.1-0.4 0.5 0.6 0.4 0.6 0.7 1.2 1 1.8-1-2 0.1 0 0 0.5 0.1-2-0.1 0-0.1 0-0.1 0.8 0 0.7 0.1-0.5-0.1 0.4-0.1 0.7-0.3 1.1-0.6 1 0.7-0.9-0.4 1-1.6 2.5-4.6 5.4-8.1 7.8-6.8 4.6-14.4 8.2-22 11.4-7 3-7.4 11.9 0 14.8 7.4 2.8 15 5.3 22.4 8.1 3.1 1.1 4.2 1.5 6.9 2.9 1.1 0.6 2.1 1.2 3.2 1.8 1.2 0.8-0.7-0.5 0.1 0 0.4 0.3 0.8 0.7 1.1 1.1 0.6 0.8-1.1-1.2-0.2-0.2 0.8 0.9-0.3-1.4-0.1-0.2 0.1 0.9 0.2-1.9 0-0.9-0.1 0.5-0.8 1.8 0 0.2-0.2 0.5-0.5 1-0.8 1.4-0.3 0.3-0.9 1.3-0.3 0.5-0.5 0.7-1.1 1.3-1.7 1.9-6.9 7.3-15.9 12.8-24.4 18.1-8.3 5.3-0.6 18.5 7.7 13.2 9.9-6.3 20.9-12.8 28.6-21.8 4.8-5.5 8.1-12.9 4.2-19.9-3.4-6-10.5-8.9-16.6-11.4-8.6-3.5-17.5-6.2-26.2-9.5v14.8c14.4-6.1 47.2-18.8 41.2-40.3-3.5-12.9-19.4-18.9-30.8-22.6-3.4-1.1-6.9-2.1-10.5-2.9-9.1-2.2-13.3 12.5-3.6 14.6z" fill="#040000" ></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M762.9 77.4H261.1L10.2 512l250.9 434.6h501.8L1013.8 512z" fill="#F6F180" ></path><path d="M342.9 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M342.9 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.7 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.6-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M702 400.6m-29.5 0a29.5 29.5 0 1 0 59 0 29.5 29.5 0 1 0-59 0Z" fill="#040000" ></path><path d="M702 431.3c-16.9 0-30.7-13.8-30.7-30.7s13.8-30.7 30.7-30.7 30.7 13.8 30.7 30.7-13.8 30.7-30.7 30.7z m0-59c-15.6 0-28.3 12.7-28.3 28.3s12.7 28.3 28.3 28.3 28.3-12.7 28.3-28.3-12.7-28.3-28.3-28.3z" fill="#FFFFFF" ></path><path d="M358.7 519.9c20 22 45.5 40.4 71.3 54.8 51.2 28.5 111.7 39.9 168 19.5 44.3-16.1 80.7-47.8 110.2-83.9 3-3.7 3.6-8.9 0-12.5-3.1-3.1-9.5-3.7-12.5 0-25.5 31.4-56.2 59.7-93.7 76-27.1 11.7-56.6 15.7-85.8 12.2-24.7-2.9-49.5-11.8-71.5-23.4-18.7-9.8-36.6-22.2-51.1-34.3-7.8-6.5-15.5-13.3-22.4-20.9-7.7-8.5-20.1 4.1-12.5 12.5z" ></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M48.2 844.9c-68.5-210.6 186-782.1 409.1-795.4 6.3-0.4 12.5 0.2 18.6 1.6C665.1 94.6 985.4 515 987.1 821.3c0.1 20-12.9 37.9-22.4 43.1-162.7 89.8-605.8 179.7-884.4 30.9-15-7.9-24.2-26.1-32.1-50.4z" fill="#F0884F" ></path><path d="M401 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M408.7 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M527.5 352.1m-52.4 0a52.4 52.4 0 1 0 104.8 0 52.4 52.4 0 1 0-104.8 0Z" fill="#FFFFFF" ></path><path d="M527.5 329m-29.3 0a29.3 29.3 0 1 0 58.6 0 29.3 29.3 0 1 0-58.6 0Z" fill="#040000" ></path><path d="M450.7 517c1.1-8.2 3.2-16.4 6.1-24.1 0.1-0.3 1-2.5 0.5-1.4s0.3-0.7 0.5-1c0.7-1.4 1.4-2.8 2.2-4.1 0.4-0.8 2.8-3.9 1.3-2.1 0.8-1 1.7-1.9 2.6-2.8 1-1-1.5 1 0.1 0 0.5-0.3 1-0.6 1.5-0.8-1.3 0.7-1.2 0.3 0 0.1 1.9-0.3-1.8 0.3 0.1 0 1.2-0.2 1.5 0.3 0-0.1 0.6 0.2 1.3 0.3 1.9 0.5 0.3 0.1-1.3-0.7 0.2 0.1 0.8 0.5 1.6 0.9 2.4 1.4 1.4 1 0-0.1 1.4 1.1 0.9 0.8 1.8 1.7 2.6 2.6 1.8 1.9 3.5 3.9 5 6.1 5.1 7.1 9.3 14.8 13.2 22.6 3.5 6.9 13.7 4.7 15.8-2.1 2.6-8.7 4.8-17.4 7.4-26.1 0.9-3.2 1.9-6.4 3.2-9.4-0.7 1.6 0.8-1.6 1.2-2.2l0.9-1.5c0.7-1.2-1.4 0.7 0.1-0.1 1.7-0.9-1.2 0.3-0.3 0.1 0.8-0.2 1-1.2 0.3-0.3-0.6 0.8 0.6 0-0.5 0.2-2 0.3 2.4 0.5-1.1 0 0.5 0.1 1.2 0.2 1.6 0.4-1.1-0.8-0.8-0.4 0.2 0.2 0.7 0.4 3.4 2.3 2.7 1.8 8.9 7.1 15.9 16.9 22.5 26 2.8 3.8 7.5 5.6 11.8 3.1 3.7-2.2 5.9-8 3.1-11.8-8.2-11.1-16.6-23-27.7-31.4-6.3-4.7-14.5-7.6-21.7-3-6.7 4.2-9.6 12.5-11.9 19.6-3.2 9.9-5.5 20-8.6 29.9 5.3-0.7 10.5-1.4 15.8-2.1-7.8-15.5-24.8-50.1-48-41.7-14.1 5.1-19.7 23-22.9 36.2-0.9 3.8-1.8 7.7-2.3 11.6-0.6 4.6 1.1 9.3 6 10.6 4.2 1 10.2-1.5 10.8-6.1z" fill="#040000" ></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M485.538528 993.072489a362.00362 481.804818 3.149 1 0 52.933731-962.15464 362.00362 481.804818 3.149 1 0-52.933731 962.15464Z" fill="#AADCF0" ></path><path d="M688.2 334.1c-15.1 7.6-30.2 15.6-44.3 25-5.9 3.9-17 10.4-14.6 19.1 1.8 6.5 12 11.2 17.3 14.3 15.7 9.3 32.1 17.6 48.3 25.9 8.6 4.4 16.2-8.5 7.6-13-14.1-7.3-28.3-14.5-42.1-22.3-3.9-2.2-7.9-4.5-11.7-6.9-1.2-0.8-2.4-1.5-3.5-2.4-0.6-0.4-1.1-0.8-1.6-1.2 2.2 1.7-0.3-0.3-0.3-0.3-0.9 0.1-1.5-3.2-0.2 0.5 0.9 2.4 1.1 3.8 0.3 5.8 0.6-1.5-0.9 0.8-0.1 0 0.5-0.5 1-1.1 1.6-1.6 0.5-0.5 1-0.9 1.6-1.3 0.6-0.5 0 0 1.2-0.9 1.7-1.3 3.5-2.5 5.3-3.6 8.4-5.5 17.2-10.4 26-15.2 5.6-3 11.2-6 16.8-8.9 8.6-4.4 1-17.4-7.6-13zM375.8 347c13.4 6.8 26.7 14 39.5 21.9 1.8 1.2 3.7 2.3 5.5 3.5 0.9 0.6 1.7 1.2 2.6 1.8 0.9 0.6 1.9 1.4 1.6 1.1 1.1 0.9 2.1 1.9 3.1 2.8 1.2 1 0-0.3 0.1 0 0-0.2-0.8-2.4-0.3-4.1 1.5-5.5 2.3-2.7 0.8-2-0.4 0.2-0.9 0.8-1.3 1.1 1.7-1.4-1.6 1.1-2.3 1.6-3.4 2.3-6.9 4.4-10.4 6.4-14.9 8.6-30.3 16.4-45.6 24.3-8.6 4.4-1 17.4 7.6 13 15-7.7 30.1-15.4 44.8-23.8 6.2-3.6 13.8-7.3 18.7-12.7 7.6-8.3-3.8-16.6-9.9-20.9-8.7-6.1-18-11.3-27.3-16.4-6.5-3.6-13-7.1-19.6-10.4-8.6-4.5-16.3 8.5-7.6 12.8zM412.8 570.9c13.5 7.7 28.5 13.3 43.3 17.9 29.8 9.2 61.7 13.1 92.6 7.3 20.6-3.9 40-12.5 56.6-25.2 2.8-2.2 4.3-5.6 2.3-9-1.6-2.8-6.2-4.5-9-2.3-48.3 36.9-113.3 30-165.6 6.7-4.6-2.1-9.2-4.2-13.7-6.7-7.3-4.2-13.9 7.2-6.5 11.3z" fill="#040000" ></path><path d="M644.6 505.2c-30.1 21.5-60.6 62.5-39.1 99.8 10.7 18.6 30.3 30.9 49.1 40.1 7.8 3.8 14.6-7.9 6.8-11.7-23.6-11.5-53.7-31.4-49.4-60.9 2.8-18.9 15.8-34.6 29.5-47.2 2.5-2.3 5.1-4.6 7.8-6.7 0.5-0.4 0.9-0.7 1.4-1.1-0.4 0.3-1.2 0.9-0.1 0.1l0.9-0.6c6.9-5.1 0.2-16.8-6.9-11.8z" fill="#040000" ></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M235.1 76.9c75.6-26.5 297.3-90.1 514.2-16.6 16.3 5.5 29.8 17.4 37.1 33 57.5 122.4 127.1 602.1 62.1 785.6a62.58 62.58 0 0 1-32.5 35.8c-109.5 51.8-428.1 136.7-609.3 37.2-14.4-7.9-25-21.3-29.7-37.1-41.9-140.6-37-627.7 19.1-798 6.1-18.7 20.5-33.4 39-39.9z" fill="#F9DABD" ></path><path d="M392.2 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M618.6 360.2m-35.2 0a35.2 35.2 0 1 0 70.4 0 35.2 35.2 0 1 0-70.4 0Z" fill="#040000" ></path><path d="M512 562.6c-36 0-65.3-29.3-65.3-65.3S476 432 512 432s65.3 29.3 65.3 65.3-29.3 65.3-65.3 65.3z m0-122.9c-31.7 0-57.6 25.8-57.6 57.6s25.8 57.6 57.6 57.6c31.7 0 57.6-25.8 57.6-57.6s-25.9-57.6-57.6-57.6z" fill="#040000" ></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M178.1 971.5c38.1 15.9 98.7 26.6 171.3-12.3 3.7-2 8.4-1.6 11.6 1.1 43.3 35.9 123.3 80.8 236 10.9 3.8-2.4 8.7-2.4 12.6-0.2 41.8 23.9 191.6 58.2 246.6 14.2 4.4-3.5 9.1-6.6 14.5-8.5C1065 909.5 678.2-652 194.3 351c-37.5 77.8-38.4 94.1-71.9 211.3-27.6 96.3-29.1 231.3 1.4 348.1 7.2 27.3 27.3 49.9 54.3 61.1z" fill="#ABAAAA" ></path><path d="M468.9 349H418c-6.1 0-11.1-5-11.1-11.1V336c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.1-5 11.1-11.1 11.1zM643 471.9H390c-6.6 0-12-5.4-12-12s5.4-12 12-12h253c6.6 0 12 5.4 12 12s-5.4 12-12 12zM609 349h-61.2c-6 0-11-4.9-11-11v-2.1c0-6 4.9-11 11-11H609c6 0 11 4.9 11 11v2.1c0 6.1-4.9 11-11 11z" fill="#040000" ></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M673.1 318.7c3.7-17.5 5.6-35.7 5.6-54.4 0-137.9-105.5-249.7-235.6-249.7S207.4 126.4 207.4 264.3c0 55.4 17.1 106.7 45.9 148.1-55.2 63.3-88.6 145.9-88.6 236.3 0 199.2 162.1 360.6 362.1 360.6 200 0 362.1-161.5 362.1-360.6 0.1-147.3-88.7-274-215.8-330z" fill="#4F8A54" ></path><path d="M392 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M386 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M505.6 246.2m-47.1 0a47.1 47.1 0 1 0 94.2 0 47.1 47.1 0 1 0-94.2 0Z" fill="#FFFFFF" ></path><path d="M501.4 252.8m-26.4 0a26.4 26.4 0 1 0 52.8 0 26.4 26.4 0 1 0-52.8 0Z" fill="#040000" ></path><path d="M474.3 364.8h-50.9c-6.1 0-11.1-5-11.1-11.1v-1.9c0-6.1 5-11.1 11.1-11.1h50.9c6.1 0 11.1 5 11.1 11.1v1.9c0 6.2-5 11.1-11.1 11.1z" fill="#040000" ></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M246.4 227.6c-166.9 101.1-461.9 344 87 564.1 1.5 0.6 2.9 1.1 4.4 1.6 80.7 27.7 392.8 165.4 641-198.1 40-58.6 38.5-136.2-3.7-193.3C892 289.5 727 201.1 429.1 182.7c-64.1-4-127.8 11.6-182.7 44.9z" fill="#CF92BE" ></path><path d="M617.1 393.4c-17.4 8.8-34.9 18.1-51.2 28.9-6.9 4.6-20.3 12.3-17.4 22.6 1.2 4.3 5.6 7 9 9.5 3.7 2.7 7.6 5 11.5 7.3 18.2 10.8 37.1 20.3 55.9 30 10 5.1 18.9-10 8.8-15.1-16.4-8.4-32.9-16.9-49-26-4.5-2.6-9.1-5.2-13.5-8l-4.5-3c-0.7-0.5-1.3-1-2-1.5 1.6 1.2 0.7 0.4-0.2-0.2-1.3-0.9-0.3-0.9-0.5-0.3 0.2 0.2 0.4 0.5 0.6 0.7 1 1.9 1.3 3.7 0.8 5.7 0.1-0.6 0.7-1.4-0.6 1.3 0.7-1.5-0.1 0-0.2 0.1 0.6-0.6 1.2-1.3 1.9-1.9l1.8-1.5c1.8-1.6-0.6 0.3 1.2-0.9 2-1.5 4.1-2.9 6.2-4.3 10-6.5 20.4-12.4 30.9-18 6.5-3.5 13.1-7 19.7-10.4 9.6-5 0.8-20.1-9.2-15zM323.1 408.5c15.9 8.1 31.7 16.5 46.8 26 2.2 1.4 4.3 2.8 6.5 4.2 1 0.7 1.9 1.3 2.8 2 0.5 0.3 1 0.7 1.4 1.1-1.1-0.9-0.3-0.3 0.3 0.3 1.1 1 2.2 2.2 3.3 3.1 1.4 1.1-1-1.7-0.1-0.1-0.6-1.1-0.9-4.1 0.3-6.7 2.2-4.8 0.7 0.1 0-0.5 0 0-1.1 0.9-1.3 1 2.3-1.9 0 0-0.5 0.4-0.8 0.5-1.5 1.1-2.3 1.6-4 2.7-8.1 5.1-12.3 7.5-17.3 10-35.1 19.1-52.8 28.2-10 5.1-1.2 20.2 8.8 15.1 17.5-9 35-17.9 52-27.7 7.3-4.2 15.9-8.6 21.8-14.7 9.3-9.7-4.3-19.7-11.5-24.7-10.1-7.1-20.9-13.1-31.7-19-7.6-4.2-15.2-8.2-22.9-12.1-9.7-5.2-18.6 9.9-8.6 15zM513 592.1c-12.2 0-24.6-1.4-36.3-4.3-8-2-13.9-8.2-15.4-16.2s1.7-15.8 8.4-20.5c23.2-16.3 60.5-31.9 106.2-13 6.4 2.6 11 8.3 12.3 15.1 1.3 6.7-0.8 13.6-5.7 18.3-13.5 13.1-40.9 20.6-69.5 20.6z m-37.4-32.5c-3.4 2.4-4.9 6.2-4.2 10.2 0.8 4.1 3.6 7.1 7.7 8.1 39.1 9.7 81.2 0.7 96.1-13.7 2.4-2.3 3.4-5.6 2.7-8.9-0.7-3.4-2.9-6.2-6.1-7.5-41.2-17.2-75.1-3.1-96.2 11.8z" fill="#040000" ></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M1008.6 465.7c0-124.9-95.5-226.2-213.4-226.2-12 0-23.8 1.1-35.2 3.1v-3.1c0-124.9-95.5-226.2-213.4-226.2S333.4 114.6 333.4 239.5c0 2.4 0 4.8 0.1 7.2-17.1-4.7-35-7.2-53.4-7.2-117.8 0-213.4 101.3-213.4 226.2 0 92.1 51.9 171.3 126.3 206.6-13.7 29.9-21.4 63.4-21.4 98.8 0 124.9 95.5 226.2 213.4 226.2 68.8 0 130-34.5 169-88.1 39 53.6 100.2 88.1 169 88.1 117.8 0 213.4-101.3 213.4-226.2 0-41.2-10.4-79.9-28.6-113.1 60.5-39.9 100.8-111.1 100.8-192.3z" fill="#8CC66D" ></path><path d="M437.8 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M649.7 400.7m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M527.3 625.9c6.3-14.2 13.1-28.3 17.9-43 6.2-19 8.3-38.6 10.5-58.3l2.1-19.2c0.7-6.2-9-6.1-9.7 0-1.7 16.3-2.8 32.8-5.7 48.9-4.2 23.7-13.8 45-23.5 66.7-2.5 5.6 5.9 10.5 8.4 4.9z" fill="#252525" ></path><path d="M447.7 522.3c20.3-0.1 40.6-0.2 61-0.4l96.6-0.6c7.5 0 14.9-0.1 22.4-0.1 16.6-0.1 16.7-25.9 0-25.8-20.3 0.1-40.6 0.2-61 0.4l-96.6 0.6c-7.5 0-14.9 0.1-22.4 0.1-16.6 0.1-16.7 25.9 0 25.8z" fill="#040000" ></path><path d="M495.4 508.2c-10.3 3.8-9.2 20.9-9.2 29.5 0.1 16 2.1 32.3 6.1 47.8 3.5 13.7 8.7 29.9 20.6 38.7 12.9 9.5 27.6 2.1 37.6-7.9 10.2-10.3 17.8-23 24.7-35.6 11.6-21.3 20.9-43.8 29.7-66.4 3-7.8-9.5-11.1-12.5-3.4-7.4 19.1-15.3 38.1-24.7 56.4-5.9 11.5-12.2 23-20.3 33.1-2.8 3.5-5.8 6.9-9.2 9.8-1.9 1.7-1.4 1.3-3.3 2.5-1.3 0.8-2.6 1.6-3.9 2.2-0.7 0.3 1-0.2-0.8 0.3-0.6 0.2-1.2 0.3-1.8 0.5-1.1 0.3-1.2 0.2-0.5 0.1-0.6 0-1.3 0-1.9 0.1-2.2 0.1 0.6 0.5-1.8-0.2l-1.8-0.6c1.5 0.5 0.2 0.1-0.5-0.3-0.8-0.5-2.9-2.1-1.7-1.1-1-0.9-2-1.7-2.8-2.7-0.4-0.5-0.9-1-1.3-1.5 0.4 0.5 0.1 0.2-0.5-0.7-0.8-1.3-1.7-2.5-2.4-3.9-0.7-1.3-1.4-2.5-2-3.8-0.4-0.8-0.8-1.6-1.1-2.4-0.1-0.2-0.5-1.1 0 0l-0.6-1.5a86.8 86.8 0 0 1-3.3-9.8c-4.4-14.9-6.2-27.9-6.8-42.8-0.3-6.6-0.3-13.1 0.4-19.7 0.2-1.5-0.3 1.5 0.1-0.5l0.3-1.8c0.2-0.9 0.5-1.8 0.7-2.8 0.4-1.9-0.7 1.1 0.3-0.7 0.5-1-1.3 1.2-0.3 0.5-0.3 0.3-1.1 0.8-2 1.1 7.7-2.9 4.3-15.4-3.5-12.5z" fill="#040000" ></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M75.4 739.8c-78.7-134.4-194-455.7 401.4-579.6 9.8-2 19.2-6.2 29.2-7.5C656.8 133 947.3 205 1000.1 578.4c42.6 223.8 29.7 392.1-822 233.6-43.1-8-80.6-34.4-102.7-72.2z" fill="#F09495" ></path><path d="M704.6 875.4c-129 0-301.8-20.5-526.6-62.3-43.5-8.1-81.2-34.6-103.5-72.7-19.3-32.9-44.8-84.3-57.1-142.5-13.9-65.1-8.8-125.3 15.1-179.2 54.3-122.3 203.7-209.6 444-259.6 4.1-0.9 8.3-2.1 12.3-3.4 5.5-1.7 11.1-3.4 16.9-4.2 29-3.8 75.7-5.9 133.8 5.7 54.5 10.9 105.3 31 150.8 59.9C843.7 251 888.2 296 922.7 351c39.7 63.1 66.1 139.6 78.5 227.3 8.1 42.4 15.2 87.3 12.5 127.9-2.8 42.6-16.4 75.5-41.5 100.7-42.5 42.7-120.3 65-237.8 68.1-9.6 0.2-19.6 0.4-29.8 0.4zM76.3 739.3c22 37.6 59.2 63.7 102.1 71.7 242.5 45.1 424.4 65.3 556.1 61.9 116.9-3.1 194.1-25.2 236.3-67.5 55.4-55.6 44.4-142.5 28.3-226.7C976 415.8 903.4 291.5 789.2 219c-124-78.7-248.1-69.9-283.2-65.3-5.6 0.7-11.2 2.4-16.6 4.1-4.1 1.2-8.3 2.5-12.5 3.4C237.3 211.1 88.5 298 34.5 419.6c-54.6 122.8 2.8 253 41.8 319.7z" fill="#FFFFFF" ></path><path d="M424.1 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M635.9 442.5m-24.7 0a24.7 24.7 0 1 0 49.4 0 24.7 24.7 0 1 0-49.4 0Z" fill="#040000" ></path><path d="M426.2 543.3c17.1 7.9 36.6 26 25.5 46.1-6.9 12.5-19.8 21.2-31.7 28.4-4.5 2.7-0.4 9.8 4.1 7.1 17.4-10.5 41.6-27.6 39-51.1-1.6-14-12.4-24.8-23.5-32.3-3-2-6.1-3.9-9.3-5.4-4.8-2.1-8.9 5-4.1 7.2zM629.5 535.4c-21.8 11.7-40.6 37-25.7 61.3 8.2 13.4 22.2 22.7 35.7 30.3 4.7 2.7 8.9-4.6 4.2-7.2-15.5-8.7-39.9-23.9-36.9-45.2 1.6-11.4 10.7-20.7 19.6-27.2 2.4-1.7 4.8-3.4 7.4-4.8 4.7-2.5 0.4-9.8-4.3-7.2z" fill="#040000" ></path><path d="M457.2 584.6c25.6 25.6 66.7 41 101.8 28.3 18.2-6.6 33.2-19.1 45.5-33.8 4.2-5.1-3-12.4-7.3-7.3-18.5 22-43.3 38.1-73 35-18.6-1.9-36.2-10.8-50.9-22-2.9-2.2-6.1-4.8-8.8-7.5-4.7-4.7-12 2.6-7.3 7.3z" fill="#040000" ></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M915.9 510.5c8.4-19 13.1-39.8 13.1-61.7 0-90-78.9-162.9-176.2-162.9-3.2 0-6.3 0.1-9.5 0.2v-0.2c0-94.8-116.2-171.6-259.6-171.6S224 191.2 224 286v2c-96.2 0-174.1 72-174.1 160.9 0 38 14.3 73 38.2 100.5-41.8 29.4-68.8 75.9-68.8 128.2 0 88.9 78 160.9 174.1 160.9 17.1 0 33.6-2.3 49.3-6.5 28.9 46.1 88.7 77.7 157.6 77.7 49.4 0 94-16.2 126-42.3 32 26.1 76.6 42.3 126 42.3 77.3 0 143-39.7 166.7-95 3.1 0.2 6.3 0.2 9.5 0.2 97.3 0 176.2-72.9 176.2-162.9 0-60.6-35.7-113.4-88.8-141.5z" fill="#5A74B8" ></path><path d="M357.6 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M357.5 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M531.3 449.5a46.6 73.2 0 1 0 93.2 0 46.6 73.2 0 1 0-93.2 0Z" fill="#FEFEFD" ></path><path d="M531.2 449.5a25.1 39.4 0 1 0 50.2 0 25.1 39.4 0 1 0-50.2 0Z" fill="#040000" ></path><path d="M426.7 574.6c20.9 29.9 59.7 52.2 96.2 38.6 19.2-7.2 34.7-21.2 47.6-36.9 2.8-3.5 3.4-8.3 0-11.7-2.9-2.9-8.9-3.5-11.7 0-16.5 20.2-40.9 40.9-68.1 35.5-17.3-3.4-31-13.2-42.9-25.9-2-2.2-3.9-4.4-5.8-6.7-1.6-1.9 1.1 1.5-0.4-0.6-0.2-0.2-0.3-0.5-0.5-0.7-6.2-8.7-20.6-0.4-14.4 8.4z" fill="#040000" ></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" ><path d="M792.8 301.4c-8.2 0-16.2 0.4-24.2 1.3-12.3-81.8-129.2-145.9-271.8-145.9-137.1 0-250.5 59.3-269.9 136.6C105.3 295.5 7.4 391.2 7.4 508.9c0 119.1 100.2 215.6 223.7 215.6 5.3 0 10.6-0.2 15.8-0.5 14.4 80.5 130.4 143.2 271.3 143.2 135.9 0 248.6-58.3 269.4-134.6 1.7 0 3.4 0.1 5.1 0.1 123.6 0 223.7-96.5 223.7-215.6s-100-215.7-223.6-215.7z" fill="#F6CD50" ></path><path d="M435.9 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M588.1 431.5m-52.2 0a52.2 52.2 0 1 0 104.4 0 52.2 52.2 0 1 0-104.4 0Z" fill="#FAFAFA" ></path><path d="M435.9 431.5m-27.8 0a27.8 27.8 0 1 0 55.6 0 27.8 27.8 0 1 0-55.6 0Z" fill="#040000" ></path><path d="M601.9 407.4c-5.7 2.9-11.3 5.9-16.9 9-6.8 3.8-15.3 7.8-20.5 13.8-5.6 6.5 1.6 11.1 6.7 14.4 11.2 7.1 23.3 13 35.1 19 5.7 2.9 10.8-5.7 5.1-8.6-10.9-5.6-21.9-11.1-32.4-17.4-2.4-1.4-4.6-3.1-7-4.6 1 0.6-0.4-0.4-0.4-0.4-1.9-0.3-0.5 4.2 0.5 4.1-0.1 0-0.6 0.3 0.3-0.3 0.5-0.3 1-0.9 1.5-1.3 9.7-7.9 21.9-13.5 33.1-19.2 5.7-2.7 0.6-11.4-5.1-8.5zM406.6 547.6c11.5 14.4 27 26.7 42.7 36.3 32.2 19.8 71.2 27.2 107.6 15.4 29.5-9.6 54.6-29.1 75.5-51.6 10.8-11.6-6.6-29.1-17.5-17.5-9.4 10.1-19.5 19.7-30.8 27.7-4.6 3.2-9.3 6.2-14.2 8.9-5 2.8-9.9 5.1-14.1 6.7-4.6 1.7-9.3 3.2-14.1 4.4-2.2 0.5-4.4 1-6.6 1.4-1 0.2-2 0.3-2.9 0.5 2.6-0.4-2.1 0.2-2.5 0.3-4.1 0.4-8.3 0.5-12.5 0.4-2.2-0.1-4.4-0.2-6.6-0.4-1.1-0.1-2.2-0.2-3.2-0.3-1.5-0.2-1.4-0.2 0.1 0l-2.1-0.3c-7.8-1.3-15.4-3.4-22.8-6.2-0.9-0.4-1.8-0.7-2.8-1.1-3.1-1.2 2.3 1.1-0.7-0.3-1.5-0.7-2.9-1.3-4.4-2-3.7-1.8-7.2-3.7-10.8-5.8-5.7-3.4-11.1-7.1-16.4-11.1 3 2.3-1.1-0.9-1.8-1.5-1.1-0.9-2.1-1.7-3.1-2.6-2.1-1.8-4.2-3.7-6.3-5.6-4.4-4.1-8.7-8.4-12.4-13.1-4.2-5.2-13.1-4.3-17.5 0-5 5.1-4 12.2 0.2 17.4z" fill="#040000" ></path></svg>'}]},{name:"标记图标",type:"sign",list:[{name:"1",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M809.728 429.696a18.901333 18.901333 0 0 0-15.274667-12.885333l-183.466666-26.624-81.92-166.272a18.901333 18.901333 0 0 0-34.005334 0l-81.92 166.272-183.594666 26.624a19.029333 19.029333 0 0 0-10.496 32.298666l132.693333 129.536-31.274667 182.741334a18.816 18.816 0 0 0 27.477334 19.84l164.138666-86.186667 164.096 86.058667a18.773333 18.773333 0 1 0 27.434667-19.84l-31.36-182.741334 132.693333-129.408a18.901333 18.901333 0 0 0 4.778667-19.413333z" fill="#FFFFFF"></path></svg>'},{name:"2",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M644.565333 306.901333c32.128 0 65.834667-5.76 101.077334-17.237333a17.066667 17.066667 0 0 1 22.357333 16.213333v328.32c-1.109333 0.768 10.325333 27.093333-99.370667 19.84-109.653333-7.210667-181.76-45.098667-246.869333-45.098666-65.152 0-49.322667 2.688-74.154667 8.405333v168.064a24.746667 24.746667 0 0 1-24.490666 25.258667 22.528 22.528 0 0 1-17.28-7.253334 24.149333 24.149333 0 0 1-7.168-18.005333V281.258667C299.776 280.490667 328.106667 256 421.76 256s164.437333 50.901333 222.805333 50.901333z" fill="#FFFFFF"></path></svg>'},{name:"3",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M524.074667 225.408l274.517333 274.517333a17.066667 17.066667 0 0 1 0 24.149334l-274.517333 274.517333a17.066667 17.066667 0 0 1-24.149334 0l-274.517333-274.517333a17.066667 17.066667 0 0 1 0-24.149334l274.517333-274.517333a17.066667 17.066667 0 0 1 24.149334 0z" fill="#FFFFFF"></path></svg>'},{name:"4",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M317.866667 300.8h388.266666c9.386667 0 17.066667 7.68 17.066667 17.066667v388.266666a17.066667 17.066667 0 0 1-17.066667 17.066667h-388.266666a17.066667 17.066667 0 0 1-17.066667-17.066667v-388.266666c0-9.386667 7.68-17.066667 17.066667-17.066667z" fill="#FFFFFF"></path></svg>'},{name:"5",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M498.346667 279.082667L248.789333 701.44a15.829333 15.829333 0 0 0 13.653334 23.893333h499.114666a15.829333 15.829333 0 0 0 13.653334-23.893333l-249.6-422.357333a15.829333 15.829333 0 0 0-27.264 0z" fill="#FFFFFF"></path></svg>'},{name:"6",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path><path d="M634.538667 487.808L555.050667 426.24 507.306667 256a201.002667 201.002667 0 0 0-23.594667 20.394667l-0.256-0.256L525.653333 426.666667l-133.290666 59.946666a14.08 14.08 0 0 0-8.021334 15.957334l28.757334 126.378666a14.208 14.208 0 0 0 27.733333-6.229333l-26.24-115.114667 126.037333-56.704 76.416 59.136a14.250667 14.250667 0 0 0 19.968-2.474666 14.08 14.08 0 0 0-2.474666-19.797334z" fill="#6D768D"></path></svg>'},{name:"7",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M497.749333 798.549333l-31.445333-28.501333C313.941333 631.722667 213.333333 540.501333 213.333333 428.8a160.981333 160.981333 0 0 1 162.730667-162.730667c51.498667 0 100.906667 23.978667 133.12 61.696a177.536 177.536 0 0 1 133.162667-61.696 160.981333 160.981333 0 0 1 162.730666 162.730667c0 111.701333-100.608 202.965333-252.970666 341.333333l-31.445334 28.458667a17.066667 17.066667 0 0 1-22.912 0z" fill="#FFFFFF"></path></svg>'},{name:"8",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M374.656 273.194667c5.973333 4.48 12.117333 9.6 18.346667 15.36 6.272 5.717333 11.904 12.373333 16.896 19.84 2.517333 4.010667 5.504 8.490667 9.002666 13.482666a529.493333 529.493333 0 0 1 20.266667 32.213334h155.221333a169.813333 169.813333 0 0 0 9.770667-15.744c2.474667-4.48 5.248-8.96 8.234667-13.482667a460.842667 460.842667 0 0 1 23.253333-31.829333c4.992-6.229333 12.245333-12.373333 21.76-18.346667a34.261333 34.261333 0 0 0 10.112-9.728 31.274667 31.274667 0 0 0 5.248-11.989333 18.56 18.56 0 0 0-1.536-11.605334 17.664 17.664 0 0 0-10.112-8.618666c-4.48-1.493333-8.362667-2.005333-11.605333-1.493334a46.933333 46.933333 0 0 0-9.770667 2.602667c-3.242667 1.28-6.613333 2.645333-10.112 4.138667a32.426667 32.426667 0 0 1-12.757333 2.261333 26.026667 26.026667 0 0 1-12.373334-2.645333 45.653333 45.653333 0 0 1-8.96-6.357334l-8.661333-7.850666a30.336 30.336 0 0 0-11.989333-6.4c-9.984-3.968-18.005333-4.693333-24.021334-2.218667-5.973333 2.474667-11.946667 6.485333-17.962666 11.946667a88.618667 88.618667 0 0 1-11.989334 10.496 7.338667 7.338667 0 0 1-3.754666 1.493333 46.165333 46.165333 0 0 1-8.277334-5.205333 71.808 71.808 0 0 1-7.125333-4.906667 37.973333 37.973333 0 0 1-6.4-6.357333c-3.968-3.968-9.941333-6.613333-17.92-7.850667a31.061333 31.061333 0 0 0-21.76 4.138667c-8.533333 5.461333-14.506667 10.069333-18.048 13.824a29.354667 29.354667 0 0 1-15.744 7.893333 23.978667 23.978667 0 0 1-13.098667-0.768 987.733333 987.733333 0 0 0-14.634666-4.48 80.725333 80.725333 0 0 0-14.250667-2.986667 16.768 16.768 0 0 0-11.989333 2.986667c-6.997333 5.461333-9.258667 12.074667-6.741334 19.84a34.56 34.56 0 0 0 13.482667 18.346667z" fill="#FFFFFF"></path><path d="M780.757333 545.152a219.306667 219.306667 0 0 0-19.882666-65.536 224.981333 224.981333 0 0 0-33.365334-49.792 430.336 430.336 0 0 0-37.12-37.12c-14.506667-11.946667-27.264-23.296-38.272-34.048a544.512 544.512 0 0 1-27.733333-28.842667 305.28 305.28 0 0 1-22.485333-26.197333h-168.746667c-6.485333 8.490667-13.994667 17.493333-22.485333 26.965333a360.96 360.96 0 0 1-26.24 28.074667c-10.538667 10.24-22.272 21.12-35.285334 32.597333a305.493333 305.493333 0 0 0-41.6 44.16 250.026667 250.026667 0 0 0-49.493333 117.589334 216.106667 216.106667 0 0 0 1.877333 70.4 220.586667 220.586667 0 0 0 75.349334 126.549333c21.248 18.005333 47.146667 32.597333 77.653333 43.818667 30.464 11.264 65.493333 16.853333 104.96 16.853333 38.528 0 72.874667-4.864 103.125333-14.592a265.045333 265.045333 0 0 0 78.378667-39.338667c21.973333-16.469333 39.594667-35.797333 52.864-58.026666 13.226667-22.186667 22.101333-45.824 26.624-70.784 4.992-30.421333 5.632-58.026667 1.877333-82.773334z" fill="#FFFFFF"></path><path d="M593.322667 647.509333a20.48 20.48 0 0 1-11.861334 3.2h-50.133333v14.165334c0 4.266667-1.792 8.362667-5.376 12.373333a15.914667 15.914667 0 0 1-13.952 5.333333 24.917333 24.917333 0 0 1-14.336-3.882666c-3.84-2.602667-5.973333-7.210667-6.4-13.824v-14.165334h-48.725333a17.792 17.792 0 0 1-11.818667-3.882666 10.24 10.24 0 0 1-3.968-9.6c0-4.266667 1.578667-7.68 4.693333-10.24a16.768 16.768 0 0 1 11.093334-3.925334h48.682666v-24.789333h-48.682666a15.573333 15.573333 0 0 1-11.52-4.266667 13.525333 13.525333 0 0 1-4.266667-9.941333 15.36 15.36 0 0 1 4.693333-10.624 14.72 14.72 0 0 1 11.093334-4.949333h48.682666l0.725334-14.890667a1053.568 1053.568 0 0 1-40.832-42.538667l-10.752-9.898666a41.216 41.216 0 0 1-6.442667-11.690667c-1.92-4.992-0.938667-10.069333 2.858667-15.274667a13.653333 13.653333 0 0 1 15.786666-3.84c6.186667 2.090667 11.221333 4.821333 15.018667 8.106667 1.92 2.389333 5.248 5.888 10.026667 10.666667l15.061333 14.848 19.328 19.157333 22.186667-20.565333a987.605333 987.605333 0 0 1 29.397333-25.514667 21.162667 21.162667 0 0 1 14.293333-5.674667c5.290667 0 9.557333 2.133333 12.928 6.4 6.186667 7.082667 3.84 15.36-7.168 24.789334a179.072 179.072 0 0 0-12.885333 12.373333c-5.76 5.973333-11.52 11.733333-17.194667 17.408-6.698667 7.082667-14.08 14.378667-22.186666 21.973333v13.44h46.506666c6.698667 0 11.605333 1.536 14.72 4.608a14.165333 14.165333 0 0 1 4.650667 10.282667c0 4.266667-1.450667 7.936-4.309333 11.008-2.858667 3.029333-7.637333 4.352-14.336 3.84l-46.506667 0.768-0.768 24.064h45.866667c13.354667 0 20.053333 4.992 20.053333 14.933333 0.469333 4.693333-0.853333 8.106667-3.925333 10.24z" fill="#6D768D"></path></svg>'},{name:"9",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M512 213.333333l234.666667 341.333334h-128v213.333333h-213.333334v-213.333333h-128L512 213.333333z" fill="#FFFFFF"></path></svg>'},{name:"10",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M533.333333 810.666667L298.666667 469.333333h128V256h213.333333v213.333333h128l-234.666667 341.333334z" fill="#FFFFFF"></path></svg>'},{name:"11",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M213.333333 533.333333L554.666667 298.666667v128h213.333333v213.333333h-213.333333v128l-341.333334-234.666667z" fill="#FFFFFF"></path></svg>'},{name:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M810.666667 533.333333L469.333333 768v-128H256v-213.333333h213.333333V298.666667l341.333334 234.666666z" fill="#FFFFFF"></path></svg>'},{name:"13",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M0 512c0 282.752 229.248 512 512 512s512-229.248 512-512S794.752 0 512 0 0 229.248 0 512z" fill="#6D768D"></path><path d="M571.349333 508.586667l162.389334-162.346667a44.330667 44.330667 0 1 0-62.72-62.72l-162.389334 162.389333-162.517333-162.389333a44.330667 44.330667 0 1 0-62.72 62.72l162.389333 162.389333-162.389333 162.474667a44.330667 44.330667 0 1 0 62.72 62.72l162.389333-162.346667 162.389334 162.389334a44.330667 44.330667 0 1 0 62.72-62.72l-162.261334-162.56z" fill="#FFFFFF"></path></svg>'},{name:"14",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C233.386667 0 0 225.877333 0 512s225.877333 512 512 512 512-225.877333 512-512S790.613333 0 512 0z" fill="#6D768D"></path><path d="M726.144 311.210667l-277.333333 305.066666-124.8-124.8c-13.866667-13.866667-41.6-13.866667-55.466667 0-13.866667 13.866667-13.866667 41.6 0 55.466667l159.445333 152.533333c13.866667 13.866667 41.6 13.866667 55.466667 0l305.066667-332.8c13.866667-13.866667 13.866667-41.6 0-55.466666-20.778667-13.866667-48.512-13.866667-62.378667 0z" fill="#FFFFFF"></path></svg>'},{name:"15",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M541.952 755.626667a40.618667 40.618667 0 0 1-29.824 12.373333 41.344 41.344 0 0 1-30.122667-12.373333 40.106667 40.106667 0 0 1-12.672-30.122667c0-11.605333 4.096-21.845333 12.672-30.122667a40.405333 40.405333 0 0 1 30.122667-12.714666c11.605333 0 21.546667 4.138667 29.824 12.714666a40.32 40.32 0 0 1 12.714667 30.122667c0 11.861333-4.096 21.76-12.714667 30.122667zM450.986667 241.28A77.866667 77.866667 0 0 1 512.256 213.333333c24.874667 0 45.354667 8.917333 61.354667 27.946667 15.488 18.432 23.722667 41.685333 23.722666 69.674667 0 23.765333-33.152 200.533333-44.672 329.045333h-80.128C463.146667 511.402667 426.666667 334.677333 426.666667 310.954667c0-27.392 8.277333-50.645333 24.32-69.674667z" fill="#FFFFFF"></path></svg>'},{name:"16",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 0C229.248 0 0 229.248 0 512s229.248 512 512 512 512-229.248 512-512S794.794667 0 512 0z" fill="#6D768D"></path><path d="M490.666667 682.666667a64 64 0 1 1 0 128 64 64 0 0 1 0-128z m13.994666-490.752c61.397333 0 112.341333 14.634667 153.002667 43.946666 40.533333 29.269333 60.885333 72.618667 60.885333 130.133334 0 35.242667-12.373333 64.938667-29.952 89.045333-10.282667 14.677333-33.664 33.408-62.890666 56.192l-32.426667 22.357333c-15.701333 12.202667-29.696 26.453333-34.858667 42.666667-1.706667 5.546667-3.072 14.677333-3.968 24.533333-0.426667 4.949333-4.864 15.018667-15.232 15.018667h-83.328c-13.568 0-15.957333-10.581333-15.744-15.786667 1.493333-34.005333 4.608-64.213333 18.474667-80.469333 28.074667-32.896 91.904-73.813333 91.904-73.813333a104.106667 104.106667 0 0 0 23.552-24.021334c10.837333-14.933333 19.797333-31.317333 19.797333-49.237333 0-20.565333-6.016-39.338667-18.090666-56.32-12.032-16.938667-34.090667-25.386667-66.005334-25.386667-31.445333 0-53.76 10.410667-66.901333 31.274667-9.685333 15.445333-15.786667 29.610667-18.346667 45.013333-0.853333 5.461333-4.394667 16.981333-16.042666 16.981334H327.210667c-17.322667 0-21.12-11.221333-20.650667-16.64 6.272-68.138667 32.896-114.688 80-144.597334 32-20.565333 71.381333-30.890667 118.101333-30.890666z" fill="#FFFFFF"></path></svg>'},{name:"17",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M336.256 410.026667H253.312a40.021333 40.021333 0 0 0-39.850667 43.264l23.296 278.101333c1.706667 20.693333 19.072 36.608 39.850667 36.608h59.648c11.050667 0 20.010667-8.96 20.010667-19.968v-318.037333a19.968 19.968 0 0 0-20.010667-19.968z m434.432 0h-178.944C653.312 182.314667 548.949333 170.666667 548.949333 170.666667c-44.288 0-35.114667 34.986667-38.442666 40.832 0 84.48-68.010667 155.093333-101.034667 184.362666a39.552 39.552 0 0 0-13.226667 29.653334v322.56c0 11.008 8.96 19.925333 20.010667 19.925333h233.728c30.378667 0 58.154667-17.152 71.68-44.373333 18.176-36.736 40.448-90.112 54.656-133.973334 13.781333-42.410667 26.24-94.976 33.578667-131.968a39.850667 39.850667 0 0 0-39.253334-47.658666z" fill="#FFFFFF"></path></svg>'},{name:"18",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M796.16 413.909333c-31.146667-0.298667-115.626667-0.085333-146.858667-0.085333h-158.464c8.533333-7.68 15.914667-14.506667 23.594667-20.906667 29.781333-24.874667 25.813333-71.082667-14.208-88.874666-22.954667-10.24-44.970667-5.632-64 11.52-34.944 31.274667-69.632 62.677333-104.277333 93.994666a15.488 15.488 0 0 1-11.178667 4.437334c-11.221333-0.085333-26.88-0.128-46.933333-0.170667a17.066667 17.066667 0 0 0-17.109334 17.066667L256 719.701333a17.066667 17.066667 0 0 0 17.066667 17.152l49.578666-0.085333c3.968 0 7.466667 0.768 10.88 2.602667 15.829333 8.832 31.701333 17.493333 47.616 26.24a18.133333 18.133333 0 0 0 9.301334 2.346666h168.405333c6.186667 0 11.946667-0.981333 17.834667-2.56 29.44-7.253333 40.021333-30.293333 38.528-52.565333-0.768-9.728-4.266667-18.346667-9.984-26.24 19.626667-5.76 35.114667-16.213333 42.112-36.096 7.125333-20.394667 1.621333-38.4-12.672-53.333333 28.16-19.754667 34.858667-44.672 18.645333-75.648h140.458667c6.570667 0 13.013333-0.597333 19.370666-2.645334 31.957333-9.813333 48.810667-42.88 35.626667-71.552-10.154667-22.186667-28.629333-33.152-52.608-33.450666z" fill="#FFFFFF"></path></svg>'},{name:"19",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M270.506667 413.909333c31.146667-0.298667 115.626667-0.085333 146.858666-0.085333h158.464c-8.533333-7.68-15.914667-14.506667-23.594666-20.906667-29.781333-24.874667-25.813333-71.082667 14.208-88.874666 22.954667-10.24 44.970667-5.632 64 11.52 34.944 31.274667 69.632 62.677333 104.277333 93.994666 3.413333 2.986667 6.528 4.437333 11.178667 4.437334 11.221333-0.085333 26.88-0.128 46.933333-0.170667a17.066667 17.066667 0 0 1 17.109333 17.066667l0.682667 288.853333a17.066667 17.066667 0 0 1-17.066667 17.152l-49.578666-0.085333a22.101333 22.101333 0 0 0-10.88 2.602666c-15.829333 8.832-31.701333 17.493333-47.616 26.24a18.133333 18.133333 0 0 1-9.301334 2.346667h-168.405333a68.693333 68.693333 0 0 1-17.834667-2.56c-29.44-7.253333-40.021333-30.293333-38.528-52.565333 0.768-9.728 4.266667-18.346667 9.984-26.24-19.626667-5.76-35.114667-16.213333-42.112-36.096-7.125333-20.394667-1.621333-38.4 12.672-53.333334-28.16-19.754667-34.858667-44.672-18.645333-75.648H272.853333c-6.570667 0-13.013333-0.597333-19.370666-2.645333-31.957333-9.813333-48.810667-42.88-35.626667-71.552 10.154667-22.186667 28.629333-33.152 52.608-33.450667z" fill="#FFFFFF"></path></svg>'},{name:"20",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M667.733333 480.128H400v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 213.333333a155.605333 155.605333 0 0 0-155.392 155.434667v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 509.013333v292.010667a28.885333 28.885333 0 0 0 28.885333 28.885333h340.138667a28.885333 28.885333 0 0 0 28.928-28.885333V509.013333a28.885333 28.885333 0 0 0-28.928-28.885333z" fill="#FFFFFF"></path></svg>'},{name:"21",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M400.042667 437.461333v-111.36a97.706667 97.706667 0 0 1 97.621333-97.621333 97.706667 97.706667 0 0 1 97.578667 97.621333 28.885333 28.885333 0 0 0 57.813333 0A155.605333 155.605333 0 0 0 497.621333 170.666667a155.605333 155.605333 0 0 0-155.392 155.434666v111.36h-14.677333A28.885333 28.885333 0 0 0 298.666667 466.346667v292.010666a28.885333 28.885333 0 0 0 28.885333 28.885334h340.138667a28.885333 28.885333 0 0 0 28.928-28.885334V466.346667a28.885333 28.885333 0 0 0-28.928-28.885334H400.042667z" fill="#FFFFFF"></path><path d="M595.242667 437.461333v-111.36a97.706667 97.706667 0 0 0-97.621334-97.621333 97.706667 97.706667 0 0 0-97.578666 97.621333 28.885333 28.885333 0 0 1-57.813334 0A155.605333 155.605333 0 0 1 497.621333 170.666667a155.605333 155.605333 0 0 1 155.434667 155.434666v111.36h14.634667c16 0 28.928 12.928 28.928 28.885334v292.010666a28.885333 28.885333 0 0 1-28.928 28.885334H327.552A28.885333 28.885333 0 0 1 298.666667 758.357333V466.346667c0-15.957333 12.928-28.885333 28.885333-28.885334h267.690667z" fill="#FFFFFF"></path></svg>'},{name:"22",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M511.999787 512.000213m-511.999787 0a511.999787 511.999787 0 1 0 1023.999573 0 511.999787 511.999787 0 1 0-1023.999573 0Z" fill="#6D768D"></path><path d="M381.354508 364.586941c0 54.015977 29.013321 103.935957 75.946635 130.986613a152.53327 152.53327 0 0 0 151.935936 0 151.12527 151.12527 0 0 0 75.946636-130.986613A151.594604 151.594604 0 0 0 533.333111 213.333671a151.594604 151.594604 0 0 0-151.89327 151.25327zM660.479725 498.901552a185.258589 185.258589 0 0 1-127.146614 50.346646c-49.066646 0-93.866628-19.199992-127.06128-50.346646C317.141201 544.853533 255.999893 637.440161 255.999893 744.106783c0 13.183995 10.709329 23.850657 23.978657 23.850657h506.709122a23.893323 23.893323 0 0 0 23.978657-23.893323c0-106.538622-61.098641-199.25325-150.186604-245.205232z" fill="#FFFFFF"></path></svg>'},{name:"23",icon:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024"><path d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z" fill="#6D768D"></path><path d="M445.610667 401.578667a129.322667 129.322667 0 1 0 258.645333 0 129.322667 129.322667 0 0 0-258.645333 0z m237.568 114.901333a157.354667 157.354667 0 0 1-216.362667 0 236.373333 236.373333 0 0 0-127.957333 209.706667c0 11.264 9.130667 20.394667 20.394666 20.394666h431.402667a20.394667 20.394667 0 0 0 20.394667-20.394666 236.373333 236.373333 0 0 0-127.872-209.706667zM409.813333 401.578667c0-40.362667 14.592-77.397333 38.698667-106.112a112.725333 112.725333 0 0 0-29.013333-3.925334 112.64 112.64 0 0 0-112.426667 112.469334 112.64 112.64 0 0 0 144.853333 107.648 164.693333 164.693333 0 0 1-42.112-110.08z m-18.602666 136.704a136.533333 136.533333 0 0 1-65.706667-34.474667 205.44 205.44 0 0 0-111.232 182.4c0 9.813333 7.936 17.706667 17.706667 17.706667H303.36a273.621333 273.621333 0 0 1 87.893333-165.632z" fill="#FFFFFF"></path></svg>'}]}],C6=(i,e=[])=>{let t=i.split("_"),r=C2([...Ld,...e]).find(s=>s.type===t[0]);if(r){let s=r.list.find(a=>a.name===t[1]);return s?s.icon:""}else return""},Ga={hyperlink:M6,note:S6,attachment:z6,nodeIconList:Ld,getNodeIconListIcon:C6},N6=(i,e)=>{const t=new Ot,n=new Lt().text(i);return e.text(n),t.add(n),t.bbox()},dh={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function L6(){let i=this.getData("image");if(!i)return;i=(this.mindMap.renderer.renderTree.data.imgMap||{})[i]||i;const e=this.getImgShowSize(),t=new ar().load(i).size(...e),{defaultNodeImage:n}=this.mindMap.opt;if(n){const r=new Image;r.onerror=()=>{t.load(n)},r.src=i}return this.getData("imageTitle")&&t.attr("title",this.getData("imageTitle")),t.on("click",r=>{this.mindMap.emit("node_img_click",this,t,r)}),t.on("dblclick",r=>{this.mindMap.emit("node_img_dblclick",this,r,t)}),t.on("mouseenter",r=>{this.mindMap.emit("node_img_mouseenter",this,t,r)}),t.on("mouseleave",r=>{this.mindMap.emit("node_img_mouseleave",this,t,r)}),t.on("mousemove",r=>{this.mindMap.emit("node_img_mousemove",this,t,r)}),{node:t,width:e[0],height:e[1]}}function A6(){const{custom:i,width:e,height:t}=this.getData("imageSize");return i?[e,t]:bd(e,t,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function _6(){let i=this.getData();if(!i.icon||i.icon.length<=0)return[];let e=this.mindMap.themeConfig.iconSize;return i.icon.map(t=>{let n=Ga.getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),r=null;return/^<svg/.test(n)?r=ct(n):r=new ar().load(n),r.size(e,e),r.on("click",s=>{this.mindMap.emit("node_icon_click",this,t,s,r)}),r.on("mouseenter",s=>{this.mindMap.emit("node_icon_mouseenter",this,t,s,r)}),r.on("mouseleave",s=>{this.mindMap.emit("node_icon_mouseleave",this,t,s,r)}),{node:r,width:e,height:e}})}function D6(i){const e=this.hasCustomWidth();let t=typeof i=="string"?i:this.getData("text"),{textAutoWrapWidth:n,emptyTextMeasureHeightText:r}=this.mindMap.opt;n=e?this.customTextWidth:n;const s=new Ot;let a=!1;this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,a=!0),a&&!Nn(t)&&(b2(t)?t=M2(t):t=`<p>${t}</p>`,this.setData({text:t}));const o=[],l=H2(this);Object.keys(l).forEach(x=>{o.push([x,l[x]])}),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl||(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.position="fixed",this.mindMap.commonCaches.measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(this.mindMap.commonCaches.measureRichtextNodeTextSizeEl));const h=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;o.forEach(([x,w])=>{h.style[x]=w}),h.style.lineHeight=1.2;const c=`<div>${t}</div>`;h.innerHTML=c;const d=h.children[0];d.classList.add("smm-richtext-node-wrap"),Jn(d),d.style.maxWidth=n+"px",e?d.style.width=this.customTextWidth+"px":d.style.width="";let{width:f,height:m}=d.getBoundingClientRect();if(m<=0){h.innerHTML=`<p>${r}</p>`;let x=h.children[0];x.classList.add("smm-richtext-node-wrap"),m=x.getBoundingClientRect().height,h.innerHTML=c}f=Math.min(Math.ceil(f)+1,n),m=Math.ceil(m),s.attr("data-width",f),s.attr("data-height",m);const v=Nr({el:h.children[0],width:f,height:m}),g={"line-height":1.2};return o.forEach(([x,w])=>{g[m2(x)]=w}),v.css(g),s.add(v),{node:s,nodeContent:v,width:f,height:m}}function R6(i){if(this.getData("needUpdate")&&delete this.nodeData.data.needUpdate,this.getData("richText"))return this.createRichTextNode(i);const e=typeof i=="string"?i:this.getData("text");this.getData("resetRichText")&&delete this.nodeData.data.resetRichText;const t=new Ot,n=this.getStyle("fontSize",!1),r=this.getStyle("textAlign",!1);let s=[];Nn(e)||(s=String(e).split(/\n/gim));const{textAutoWrapWidth:a,emptyTextMeasureHeightText:o}=this.mindMap.opt;let l=s.length>1;s.forEach((d,f)=>{let m=d.split(""),v=[],g=[];for(;m.length;){let x=m.shift(),w=[...g,x].join("");N6(w,this.style).width<=a?g.push(x):(v.push(g.join("")),g=[x])}g.length>0&&v.push(g.join("")),v.length>1&&(l=!0),s[f]=v.join(`
|
|
231
|
+
`)}),s=s.join(`
|
|
232
|
+
`).replace(/\n$/g,"").split(/\n/gim),s.forEach((d,f)=>{d===""&&(d="\uFEFF");const m=new Lt().text(d);m.addClass("smm-text-node-wrap"),m.attr("text-anchor",{left:"start",center:"middle",right:"end"}[r]||"start"),this.style.text(m),m.y(n*ka*f+(ka-1)*n/2),t.add(m)});let{width:h,height:c}=t.bbox();if(c<=0){const d=new Lt().text(o);this.style.text(d),c=d.bbox().height}return h=Math.min(Math.ceil(h),a),c=Math.ceil(c),t.attr("data-width",h),t.attr("data-height",c),t.attr("data-ismultiLine",l||s.length>1),{node:t,width:h,height:c}}function I6(){const{hyperlink:i,hyperlinkTitle:e}=this.getData();if(!i)return;const{customHyperlinkJump:t,hyperlinkIcon:n}=this.mindMap.opt,{icon:r,style:s}=n,a=this.getNodeIconSize("hyperlinkIcon"),o=new ct().size(a,a),l=new Ts().to(i).target("_blank");l.node.addEventListener("click",c=>{typeof t=="function"&&(c.preventDefault(),t(i,this))}),e&&o.add(ct(`<title>${e}</title>`)),l.rect(a,a).fill({color:"transparent"});const h=ct(r||Ga.hyperlink).size(a,a);return this.style.iconNode(h,s.color),l.add(h),o.add(l),{node:o,width:a,height:a}}function O6(){const i=this.getData("tag");if(!i||i.length<=0)return[];let{maxTag:e,tagsColorMap:t}=this.mindMap.opt;t=t||{};const n=[];return i.slice(0,e).forEach((r,s)=>{let a="",o={...dh};typeof r=="string"?a=r:(a=r.text,o={...dh,...r.style});const l=typeof o.width<"u",h=new Ot;h.on("click",()=>{this.mindMap.emit("node_tag_click",this,r,s,h)});const c=new Lt().text(a);this.style.tagText(c,o);const{width:d,height:f}=c.bbox(),m=l?o.width:d+o.paddingX*2,v=l?Math.max(m,d):m,g=Math.max(o.height,f);l?c.x((v-d)/2):c.x(l?0:o.paddingX),c.cy(-g/2);const x=new fi().size(m,o.height).cy(-g/2);l&&x.x((v-m)/2),this.style.tagRect(x,{...o,fill:o.fill||t[c.node.textContent]||Sd(c.node.textContent)}),h.add(x).add(c),n.push({node:h,width:v,height:g})}),n}function B6(){if(!this.getData("note"))return null;const{icon:i,style:e}=this.mindMap.opt.noteIcon,t=this.getNodeIconSize("noteIcon"),n=new ct().attr("cursor","pointer").addClass("smm-node-note").size(t,t);n.add(new fi().size(t,t).fill({color:"transparent"}));const r=ct(i||Ga.note).size(t,t);return this.style.iconNode(r,e.color),n.add(r),this.mindMap.opt.customNoteContentShow||(this.noteEl||(this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`
|
|
233
|
+
position: fixed;
|
|
234
|
+
padding: 10px;
|
|
235
|
+
border-radius: 5px;
|
|
236
|
+
box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
|
|
237
|
+
display: none;
|
|
238
|
+
background-color: #fff;
|
|
239
|
+
z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}
|
|
240
|
+
`,(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.noteEl)),this.noteEl.innerText=this.getData("note")),n.on("mouseover",()=>{const{left:s,top:a}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),s,a,this):(this.noteEl.style.left=s+"px",this.noteEl.style.top=a+"px",this.noteEl.style.display="block")}),n.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),n.on("click",s=>{this.mindMap.emit("node_note_click",this,s,n)}),n.on("dblclick",s=>{this.mindMap.emit("node_note_dblclick",this,s,n)}),{node:n,width:t,height:t}}function P6(){const{attachmentUrl:i,attachmentName:e}=this.getData();if(!i)return;const t=this.getNodeIconSize("attachmentIcon"),{icon:n,style:r}=this.mindMap.opt.attachmentIcon,s=new ct().attr("cursor","pointer").size(t,t);e&&s.add(ct(`<title>${e}</title>`)),s.add(new fi().size(t,t).fill({color:"transparent"}));const a=ct(n||Ga.attachment).size(t,t);return this.style.iconNode(a,r.color),s.add(a),s.on("click",o=>{this.mindMap.emit("node_attachmentClick",this,o,s)}),s.on("contextmenu",o=>{this.mindMap.emit("node_attachmentContextmenu",this,o,s)}),{node:s,width:t,height:t}}function F6(i){const{style:e}=this.mindMap.opt[i];return Nn(e.size)?this.mindMap.themeConfig.iconSize:e.size}function H6(){const i=this.getNodeIconSize("noteIcon"),{scaleY:e}=this.mindMap.view.getTransformData().transform,t=i*e;let{left:n,top:r}=this._noteData.node.node.getBoundingClientRect();return r+=t,{left:n,top:r}}function U6(i){this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText=`
|
|
241
|
+
position: fixed;
|
|
242
|
+
left: -99999px;
|
|
243
|
+
top: -99999px;
|
|
244
|
+
`,this.mindMap.el.appendChild(this.mindMap.commonCaches.measureCustomNodeContentSizeEl)),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.innerHTML="",this.mindMap.commonCaches.measureCustomNodeContentSizeEl.appendChild(i);let e=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:e.width,height:e.height}}function $6(){return!!this._customNodeContent}const uh={createImgNode:L6,getImgShowSize:A6,createIconNode:_6,createRichTextNode:D6,createTextNode:R6,createHyperlinkNode:I6,createTagNode:O6,createNoteNode:B6,createAttachmentNode:P6,getNoteContentPosition:H6,getNodeIconSize:F6,measureCustomNodeContentSize:U6,isUseCustomNodeContent:$6};function G6(){if(this.getChildrenLength()<=0||this.isRoot)return;const{alwaysShowExpandBtn:i,notShowExpandBtn:e,expandBtnSize:t}=this.mindMap.opt;if(!i&&!e){let{width:n,height:r}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new fi,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,t,n,r,this)}}function q6(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function W6(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}const fh={renderExpandBtnPlaceholderRect:G6,clearExpandBtnPlaceholderRect:q6,updateExpandBtnPlaceholderRect:W6};function Y6(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes=null,this.dragHandleWidth=4,this.dragHandleMousedownX=0,this.isDragHandleMousedown=!1,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.dragHandleMousedownBodyCursor="",this.dragHandleMousedownLeft=0,this.onDragMousemoveHandle=this.onDragMousemoveHandle.bind(this),window.addEventListener("mousemove",this.onDragMousemoveHandle),this.onDragMouseupHandle=this.onDragMouseupHandle.bind(this),window.addEventListener("mouseup",this.onDragMouseupHandle),this.mindMap.on("node_mouseup",this.onDragMouseupHandle))}function X6(i){if(!this.isDragHandleMousedown)return;i.stopPropagation(),i.preventDefault();let{minNodeTextModifyWidth:e,maxNodeTextModifyWidth:t,isUseCustomNodeContent:n,customCreateNodeContent:r}=this.mindMap.opt;const s=n&&r&&this._customNodeContent;document.body.style.cursor="ew-resize",this.group.css({cursor:"ew-resize"});const{scaleX:a}=this.mindMap.draw.transform(),o=i.clientX-this.dragHandleMousedownX;let l=this.dragHandleMousedownCustomTextWidth+(this.dragHandleIndex===0?-o:o)/a;if(l=Math.max(l,e),t!==-1&&(l=Math.min(l,t)),!s&&this.getData("image")){const h=this.getImgShowSize();this._rectInfo.textContentWidth-this.customTextWidth+l<=h[0]&&(l=h[0]+this.customTextWidth-this._rectInfo.textContentWidth)}this.customTextWidth=l,this.dragHandleIndex===0&&(this.left=this.dragHandleMousedownLeft+o/a),this.reRender(s?[]:["text"],{ignoreUpdateCustomTextWidth:!0})}function V6(){this.isDragHandleMousedown&&(document.body.style.cursor=this.dragHandleMousedownBodyCursor,this.group.css({cursor:"default"}),this.isDragHandleMousedown=!1,this.dragHandleMousedownX=0,this.dragHandleIndex=0,this.dragHandleMousedownCustomTextWidth=0,this.setData({customTextWidth:this.customTextWidth}),this.mindMap.render(),this.mindMap.emit("dragModifyNodeWidthEnd",this))}function j6(){const i=[new fi,new fi];return i.forEach((e,t)=>{e.size(this.dragHandleWidth,this.height).fill({color:"transparent"}).css({cursor:"ew-resize"}),e.on("mousedown",n=>{n.stopPropagation(),n.preventDefault(),this.dragHandleMousedownX=n.clientX,this.dragHandleIndex=t,this.dragHandleMousedownCustomTextWidth=this.customTextWidth===void 0?this._textData?this._textData.width:this.width:this.customTextWidth,this.dragHandleMousedownBodyCursor=document.body.style.cursor,this.dragHandleMousedownLeft=this.left,this.isDragHandleMousedown=!0})}),i}function K6(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes||(this._dragHandleNodes=this.createDragHandleNode()),this.getData("isActive")?(this._dragHandleNodes.forEach(i=>{i.height(this.height),this.group.add(i)}),this._dragHandleNodes[1].x(this.width-this.dragHandleWidth)):this._dragHandleNodes.forEach(i=>{i.remove()}))}const ph={initDragHandle:Y6,onDragMousemoveHandle:X6,onDragMouseupHandle:V6,createDragHandleNode:j6,updateDragHandle:K6};function Z6(){this.mindMap.cooperate&&(this._userListGroup=new Ot,this.group.add(this._userListGroup))}function Q6(i){const{avatarSize:e,fontSize:t}=this.mindMap.opt.cooperateStyle,n=new Ot,r=i.isMore?i.name:String(i.name)[0],s=new Hr().size(e,e);s.fill({color:i.color||Sd(r)});const a=new Lt().text(r).fill({color:"#fff"}).css({"font-size":t+"px"}).dx(-t/2).dy((e-t)/2);return n.add(s).add(a),n}function J6(i){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return new ar().load(i.avatar).size(e,e)}function ep(){if(!this._userListGroup)return;const{avatarSize:i}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const e=this.userList.length,t=Math.floor(this.width/i),n=[];e>t?n.push(...this.userList.slice(0,t-1),{isMore:!0,name:"+"+(e-t+1)}):n.push(...this.userList),n.forEach((r,s)=>{let a=null;r.avatar?a=this.createImageAvatar(r):a=this.createTextAvatar(r),a.on("click",o=>{this.mindMap.emit("node_cooperate_avatar_click",r,this,a,o)}),a.on("mouseenter",o=>{this.mindMap.emit("node_cooperate_avatar_mouseenter",r,this,a,o)}),a.on("mouseleave",o=>{this.mindMap.emit("node_cooperate_avatar_mouseleave",r,this,a,o)}),a.x(s*i).cy(-i/2),this._userListGroup.add(a)})}function tp(i){this.userList.find(e=>e.id==i.id)||(this.userList.push(i),this.updateUserListNode())}function ip(i){const e=this.userList.findIndex(t=>t.id==i.id);e!==-1&&(this.userList.splice(e,1),this.updateUserListNode())}function np(){this.userList=[],this.updateUserListNode()}const mh={createUserListNode:Z6,updateUserListNode:ep,createTextAvatar:Q6,createImageAvatar:J6,addUser:tp,removeUser:ip,emptyUser:np};function rp(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function sp(){if(!(this.isGeneralization||this.getChildrenLength()>0)){if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{const{quickCreateChildBtnIcon:i,expandBtnStyle:e,expandBtnSize:t}=this.mindMap.opt,{icon:n,style:r}=i;let{color:s,fill:a}=e||{color:"#808080",fill:"#fff"};s=r.color||s;const o=ct(n||v0.quickCreateChild).size(t,t);o.css({cursor:"pointer"}),o.x(0).y(-t/2),this.style.iconNode(o,s);const l=new Hr().size(t);l.x(0).y(-t/2),l.fill({color:a}).css({cursor:"pointer"}),this._quickCreateChildBtn=new Ot,this._quickCreateChildBtn.add(l).add(o),this._quickCreateChildBtn.on("click",h=>{h.stopPropagation(),this.mindMap.emit("quick_create_btn_click",this);const{customQuickCreateChildBtnClick:c}=this.mindMap.opt;if(typeof c=="function"){c(this);return}this.mindMap.execCommand("INSERT_CHILD_NODE",!0,[this])}),this._quickCreateChildBtn.on("dblclick",h=>{h.stopPropagation()}),this._quickCreateChildBtn.addClass("smm-quick-create-child-btn"),this.group.add(this._quickCreateChildBtn)}this._showQuickCreateChildBtn=!0,this.renderer.layout.renderExpandBtn(this,this._quickCreateChildBtn)}}function ap(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function op(){if(this.isGeneralization)return;const{isActive:i}=this.getData();i||this.removeQuickCreateChildBtn()}const gh={initQuickCreateChildBtn:rp,showQuickCreateChildBtn:sp,removeQuickCreateChildBtn:ap,hideQuickCreateChildBtn:op};function lp(i,e,t,n,r){const{imgTextMargin:s}=this.mindMap.opt;return i==="v"?n>0&&r>0?s:0:e>0&&t>0?s:0}function hp(i){let e=0,t=this._tagData.reduce((n,r)=>(e=Math.max(e,r.height),n+=r.width),0);return t+=(this._tagData.length-1)*i,{width:t,height:e}}function cp(){if(this.isUseCustomNodeContent()){const z=this.measureCustomNodeContentSize(this._customNodeContent);return{width:this.hasCustomWidth()?this.customTextWidth:z.width,height:z.height}}const{TAG_PLACEMENT:i,IMG_PLACEMENT:e}=D,{textContentMargin:t}=this.mindMap.opt,r=(this.getStyle("tagPlacement")||i.RIGHT)===i.BOTTOM,s=this.getStyle("imgPlacement")||e.TOP;let a=0,o=0,l=0,h=0,c=0,d=0,f=0;if(this._imgData&&(a=this._imgData.width,o=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(z=>{const E=this[`_${z.name}Data`];E&&(l+=E.width,h=Math.max(h,E.height),f++)}),this._prefixData&&(l+=this._prefixData.width,h=Math.max(h,this._prefixData.height),f++),this._iconData.length>0&&(l+=this._iconData.reduce((z,E)=>(h=Math.max(h,E.height),z+=E.width),0)+(this._iconData.length-1)*t,f++),this._textData&&(l+=this._textData.width,h=Math.max(h,this._textData.height),f++),this._hyperlinkData&&(l+=this._hyperlinkData.width,h=Math.max(h,this._hyperlinkData.height),f++),this._tagData.length>0){const{width:z,height:E}=this.getTagContentSize(t);r?(c=z,d=E):(l+=z,h=Math.max(h,E),f++)}this._noteData&&(l+=this._noteData.width,h=Math.max(h,this._noteData.height),f++),this._attachmentData&&(l+=this._attachmentData.width,h=Math.max(h,this._attachmentData.height),f++),this._postfixData&&(l+=this._postfixData.width,h=Math.max(h,this._postfixData.height),f++),this.mindMap.nodeInnerPostfixList.forEach(z=>{const E=this[`_${z.name}Data`];E&&(l+=E.width,h=Math.max(h,E.height),f++)}),l+=(f-1)*t,r&&l>0&&d>0&&(this._rectInfo.textContentWidthWithoutTag=l,l=Math.max(l,c),h=h+t+d),this._rectInfo.textContentWidth=l,this._rectInfo.textContentHeight=h;let m=0,v=0;[e.TOP,e.BOTTOM].includes(s)?(m=Math.max(a,l),v=o+h+this.getImgTextMarin("v",0,0,o,h)):(m=a+l+this.getImgTextMarin("h",a,l),v=Math.max(o,h));const{paddingX:g,paddingY:x}=this.getPaddingVale(),{paddingX:w,paddingY:N}=this.shapeInstance.getShapePadding(m,v,g,x);this.shapePadding.paddingX=w,this.shapePadding.paddingY=N;const M=this.getBorderWidth();return{width:m+g*2+w*2+M,height:v+x*2+N*2+M}}function dp(){if(!this.group)return;this.group.clear();const{hoverRectPadding:i,openRealtimeRenderOnNodeTextEdit:e,textContentMargin:t,addCustomContentToNode:n}=this.mindMap.opt,{width:r,height:s}=this;let{paddingX:a,paddingY:o}=this.getPaddingVale();const l=this.getBorderWidth()/2;a+=this.shapePadding.paddingX+l,o+=this.shapePadding.paddingY+l,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(l,l),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid);const h=()=>{this.hoverNode=new fi().size(r+i*2,s+i*2).x(-i).y(-i),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,r,s),this.group.add(this.hoverNode)};if(this.isUseCustomNodeContent()){const he=Nr({el:this._customNodeContent,width:r,height:s});this.group.add(he),h();return}const{IMG_PLACEMENT:c,TAG_PLACEMENT:d}=D,f=this.getStyle("imgPlacement")||c.TOP,v=(this.getStyle("tagPlacement")||d.RIGHT)===d.BOTTOM;let{textContentWidth:g,textContentHeight:x,textContentWidthWithoutTag:w}=this._rectInfo;const N=x;let M=0,z=0;const E=this._tagData&&this._tagData.length>0;if(E){const he=this.getTagContentSize(t);M=he.width,z=he.height,v&&(x-=z+t)}let B=0,I=0;if(this._imgData)switch(B=this._imgData.width,I=this._imgData.height,this.group.add(this._imgData.node),f){case c.TOP:this._imgData.node.cx(r/2).y(o);break;case c.BOTTOM:this._imgData.node.cx(r/2).y(s-o-I);break;case c.LEFT:this._imgData.node.x(a).cy(s/2);break;case c.RIGHT:this._imgData.node.x(r-a-B).cy(s/2);break}let R=new Ot,F=0;if(E&&v&&(F=w<g?(g-w)/2:0),this.mindMap.nodeInnerPrefixList.forEach(he=>{const fe=this[`_${he.name}Data`];fe&&(fe.node.x(F).y((x-fe.height)/2),R.add(fe.node),F+=fe.width+t)}),this._prefixData){const he=Nr({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});he.x(F).y((x-this._prefixData.height)/2),R.add(he),F+=this._prefixData.width+t}let ne=new Ot;if(this._iconData&&this._iconData.length>0){let he=0;this._iconData.forEach(fe=>{fe.node.x(F+he).y((x-fe.height)/2),ne.add(fe.node),he+=fe.width+t}),R.add(ne),F+=he}if(this._textData){const he=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",F),(this._textData.nodeContent||this._textData.node).x(-he).x(F).y((x-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),R.add(this._textData.node),F+=this._textData.width+t}this._hyperlinkData&&(this._hyperlinkData.node.x(F).y((x-this._hyperlinkData.height)/2),R.add(this._hyperlinkData.node),F+=this._hyperlinkData.width+t);let Y=new Ot;if(E)if(v){let he=0;this._tagData.forEach(fe=>{fe.node.x(he).y((z-fe.height)/2),Y.add(fe.node),he+=fe.width+t}),Y.x((g-M)/2).y(N-z),R.add(Y)}else{let he=0;this._tagData.forEach(fe=>{fe.node.x(F+he).y((x-fe.height)/2),Y.add(fe.node),he+=fe.width+t}),R.add(Y),F+=he}if(this._noteData&&(this._noteData.node.x(F).y((x-this._noteData.height)/2),R.add(this._noteData.node),F+=this._noteData.width+t),this._attachmentData&&(this._attachmentData.node.x(F).y((x-this._attachmentData.height)/2),R.add(this._attachmentData.node),F+=this._attachmentData.width+t),this._postfixData){const he=Nr({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});he.x(F).y((x-this._postfixData.height)/2),R.add(he),F+=this._postfixData.width+t}this.mindMap.nodeInnerPostfixList.forEach(he=>{const fe=this[`_${he.name}Data`];fe&&(fe.node.x(F).y((x-fe.height)/2),R.add(fe.node),F+=fe.width+t)}),this.group.add(R);const{width:re,height:j}=R.bbox();let $=0,q=0;switch(f){case c.TOP:$=r/2-re/2,q=o+I+this.getImgTextMarin("v",0,0,I,N);break;case c.BOTTOM:$=r/2-re/2,q=o;break;case c.LEFT:$=B+a+this.getImgTextMarin("h",B,g),q=s/2-j/2;break;case c.RIGHT:$=a,q=s/2-j/2;break}if(R.translate($,q),h(),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const he=Nr(this._customContentAddToNodeAdd);this.group.add(he),n&&typeof n.handle=="function"&&n.handle({content:this._customContentAddToNodeAdd,element:he,node:this})}this.mindMap.emit("node_layout_end",this)}const vh={getImgTextMarin:lp,getTagContentSize:hp,getNodeRect:cp,layout:dp};class qa{constructor(e={}){this.opt=e,this.nodeData=this.handleData(e.data||{}),this.nodeDataSnapshot="",this.uid=e.uid,this.mindMap=e.mindMap,this.renderer=e.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new Ca(this),this.effectiveStyles={},this.shapeInstance=new U2(this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=e.isRoot===void 0?!1:e.isRoot,this.isGeneralization=e.isGeneralization===void 0?!1:e.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=e.layerIndex===void 0?0:e.layerIndex,this.width=e.width||0,this.height=e.height||0,this.customTextWidth=e.data.data.customTextWidth||void 0,this._left=e.left||0,this._top=e.top||0,this.customLeft=e.data.data.customLeft||void 0,this.customTop=e.data.data.customTop||void 0,this.isDrag=!1,this.parent=e.parent||null,this.children=e.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._attachmentData=null,this._prefixData=null,this._postfixData=null,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._customContentAddToNodeAdd=null,this._rectInfo={textContentWidth:0,textContentHeight:0,textContentWidthWithoutTag:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1;const t=Object.getPrototypeOf(this);t.bindEvent||(Object.keys(vh).forEach(n=>{t[n]=vh[n]}),Object.keys(lh).forEach(n=>{t[n]=lh[n]}),Object.keys(hh).forEach(n=>{t[n]=hh[n]}),Object.keys(fh).forEach(n=>{t[n]=fh[n]}),Object.keys(ch).forEach(n=>{t[n]=ch[n]}),Object.keys(uh).forEach(n=>{t[n]=uh[n]}),this.mindMap.cooperate&&Object.keys(mh).forEach(n=>{t[n]=mh[n]}),Object.keys(ph).forEach(n=>{t[n]=ph[n]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(gh).forEach(n=>{t[n]=gh[n]}),this.initQuickCreateChildBtn()),t.bindEvent=!0),this.getSize(),this.updateGeneralization(),this.initDragHandle()}get left(){return this.customLeft||this._left}set left(e){this._left=e}get top(){return this.customTop||this._top}set top(e){this._top=e}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}resetWhenDelete(){this._isMouseenter=!1}handleData(e){return e.data.expand=e.data.expand!==!1,e.data.isActive=e.data.isActive===!0,e.children=e.children||[],e}createNodeData(e){const{isUseCustomNodeContent:t,customCreateNodeContent:n,createNodePrefixContent:r,createNodePostfixContent:s,addCustomContentToNode:a}=this.mindMap.opt,o=["custom","image","icon","text","hyperlink","tag","note","attachment","prefix","postfix",...this.mindMap.nodeInnerPrefixList.map(h=>h.name),...this.mindMap.nodeInnerPostfixList.map(h=>h.name)],l={};if(Array.isArray(e)?o.forEach(h=>{e.includes(h)&&(l[h]=!0)}):o.forEach(h=>{l[h]=!0}),t&&n&&l.custom&&(this._customNodeContent=n(this)),this._customNodeContent){Jn(this._customNodeContent);return}l.image&&(this._imgData=this.createImgNode()),l.icon&&(this._iconData=this.createIconNode()),l.text&&(this._textData=this.createTextNode()),l.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),l.tag&&(this._tagData=this.createTagNode()),l.note&&(this._noteData=this.createNoteNode()),l.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(h=>{l[h.name]&&(this[`_${h.name}Data`]=h.createContent(this))}),l.prefix&&(this._prefixData=r?r(this):null,this._prefixData&&this._prefixData.el&&Jn(this._prefixData.el)),l.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&Jn(this._postfixData.el)),this.mindMap.nodeInnerPostfixList.forEach(h=>{l[h.name]&&(this[`_${h.name}Data`]=h.createContent(this))}),a&&typeof a.create=="function"&&(this._customContentAddToNodeAdd=a.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&Jn(this._customContentAddToNodeAdd.el))}getSize(e,t={}){t.ignoreUpdateCustomTextWidth||!1||(this.customTextWidth=this.getData("customTextWidth")||void 0),this.customLeft=this.getData("customLeft")||void 0,this.customTop=this.getData("customTop")||void 0,this.createNodeData(e);const{width:r,height:s}=this.getNodeRect(),a=this.width!==r||this.height!==s;return this.width=r,this.height=s,a}bindGroupEvent(){this.group.on("click",e=>{if(this.mindMap.emit("node_click",this,e),this.isMultipleChoice){e.stopPropagation(),this.isMultipleChoice=!1;return}this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&this.userList.length>0||this.active(e)}),this.group.on("mousedown",e=>{const{readonly:t,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:r,mousedownEventPreventDefault:s}=this.mindMap.opt;if(s&&e.preventDefault(),t||(this.isRoot?e.which===3&&!r&&e.stopPropagation():e.which!==2&&e.stopPropagation()),!t&&(e.ctrlKey||e.metaKey)&&n){this.isMultipleChoice=!0;const a=this.getData("isActive");a||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[a?"removeNodeFromActiveList":"addNodeToActiveList"](this,!0),this.renderer.emitNodeActiveEvent(a?null:this)}this.mindMap.emit("node_mousedown",this,e)}),this.group.on("mouseup",e=>{!this.isRoot&&e.which!==2&&!this.mindMap.opt.readonly&&e.stopPropagation(),this.mindMap.emit("node_mouseup",this,e)}),this.group.on("mouseenter",e=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,e))}),this.group.on("mouseleave",e=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,e))}),this.group.on("dblclick",e=>{const{readonly:t,onlyOneEnableActiveNodeOnCooperate:n}=this.mindMap.opt;t||e.ctrlKey||e.metaKey||(e.stopPropagation(),!(n&&this.userList.length>0)&&this.mindMap.emit("node_dblclick",this,e))}),this.group.on("contextmenu",e=>{const{readonly:t,useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;t||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),!(this.mindMap.select&&!n&&this.mindMap.select.hasSelectRange())&&(this.getData("isActive")&&this.renderer.activeNodeList.length===1||(this.renderer.clearActiveNodeList(),this.active(e)),this.mindMap.emit("node_contextmenu",e,this)))})}active(e){this.mindMap.opt.readonly||(e&&e.stopPropagation(),!this.getData("isActive")&&(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this,!0),this.renderer.emitNodeActiveEvent(this)))}deactivate(){this.mindMap.renderer.removeNodeFromActiveList(this),this.mindMap.renderer.emitNodeActiveEvent()}update(e){if(!this.group)return;this.updateNodeActiveClass();const{alwaysShowExpandBtn:t,notShowExpandBtn:n,isShowCreateChildBtnIcon:r,readonly:s}=this.mindMap.opt,a=this.getChildrenLength();if(!n)if(t)this._expandBtn&&a<=0?this.removeExpandBtn():this.renderExpandBtn();else{const{isActive:l,expand:h}=this.getData();a<=0?this.removeExpandBtn():h&&!l&&!this._isMouseenter?this.hideExpandBtn():this.showExpandBtn()}if(r)if(a>0)this.removeQuickCreateChildBtn();else{const{isActive:l}=this.getData();l?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(e),this.updateUserListNode&&this.updateUserListNode();const o=this.group.transform();this.nodeDataSnapshot=s?"":JSON.stringify(this.getData()),(this.left!==o.translateX||this.top!==o.translateY)&&this.group.translate(this.left-o.translateX,this.top-o.translateY)}getNodePosInClient(e,t){const n=this.mindMap.draw.transform(),{scaleX:r,scaleY:s,translateX:a,translateY:o}=n,l=e*r+a,h=t*s+o;return{left:l,top:h}}checkIsInClient(e=0){const{left:t,top:n}=this.getNodePosInClient(this.left,this.top);return t+this.width>0-e&&n+this.height>0-e&&t<this.mindMap.width+e&&n<this.mindMap.height+e}reRender(e,t){const n=this.getSize(e,t);return this.layout(),this.update(),n}updateNodeActiveClass(){if(!this.group)return;const e=this.getData("isActive");this.group[e?"addClass":"removeClass"]("active")}updateNodeByActive(e){if(this.group){const{isShowCreateChildBtnIcon:t}=this.mindMap.opt;e?(this.showExpandBtn(),t&&this.showQuickCreateChildBtn()):(this.hideExpandBtn(),t&&this.hideQuickCreateChildBtn()),this.updateNodeActiveClass(),this.updateDragHandle()}}render(e=()=>{},t=!1,n=!1){this.renderLine();const{openPerformance:r,performanceConfig:s}=this.mindMap.opt;if(t||!r||this.checkIsInClient(s.padding)||this.isRoot?this.group?(this.nodeDraw.has(this.group)||this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update(t)):(this.group=new Ot,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(t)):r&&s.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&this.getData("expand")!==!1){let a=0;this.children.forEach(o=>{const l=()=>{o.render(()=>{a++,a>=this.children.length&&e()},t,n)};n?setTimeout(l,0):l()})}else e();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),this.mindMap.emit("node_dblclick",this,null,!0))}removeSelf(){this.group&&(this.group.remove(),this.removeGeneralization())}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(e=>{e.remove()}))}destroy(){this.removeLine(),this.parent&&this.parent.removeLine(),this.group&&(this.emptyUser&&this.emptyUser(),this.resetWhenDelete(),this.group.remove(),this.removeGeneralization(),this.group=null,this.style.onRemove())}hide(){if(this.group&&this.group.hide(),this.hideGeneralization(),this.parent){const e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].hide(),this._lines.forEach(t=>{t.hide()})}this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){const e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].show(),this._lines.forEach(t=>{t.show()})}this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}}setOpacity(e){this.group&&this.group.opacity(e),this._lines.forEach(t=>{t.opacity(e)}),this.children.forEach(t=>{t.setOpacity(e)}),this.setGeneralizationOpacity(e)}hideChildren(){this._lines.forEach(e=>{e.hide()}),this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}showChildren(){this._lines.forEach(e=>{e.show()}),this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}startDrag(){this.isDrag=!0,this.group&&this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group&&this.group.removeClass("smm-node-dragging")}renderLine(e=!1){if(this.getData("expand")===!1)return;let t=this.getChildrenLength();this.mindMap.renderer.layout.nodeIsRemoveAllLines&&this.mindMap.renderer.layout.nodeIsRemoveAllLines(this)&&(t=0),t>this._lines.length?new Array(t-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):t<this._lines.length&&(this._lines.slice(t).forEach(n=>{n.remove()}),this._lines=this._lines.slice(0,t)),this.renderer.layout.renderLine(this,this._lines,(...n)=>{this.styleLine(...n)},this.style.getStyle("lineStyle",!0)),e&&this.children&&this.children.length>0&&this.children.forEach(n=>{n.renderLine(e)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?D.SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return this.customLeft!==void 0&&this.customTop!==void 0}ancestorHasCustomPosition(){let e=this;for(;e;){if(e.hasCustomPosition())return!0;e=e.parent}return!1}ancestorHasGeneralization(){let e=this.parent;for(;e;){if(e.checkHasGeneralization())return!0;e=e.parent}return!1}addChildren(e){this.children.push(e)}styleLine(e,t,n){const{enableInheritAncestorLineStyle:r}=this.mindMap.opt,s=r?"getSelfInhertStyle":"getSelfStyle",a=t[s]("lineWidth")||t.getStyle("lineWidth",!0),o=t[s]("lineColor")||this.getRainbowLineColor(t)||t.getStyle("lineColor",!0),l=t[s]("lineDasharray")||t.getStyle("lineDasharray",!0);this.style.line(e,{width:a,color:o,dasharray:l},n,t)}getRainbowLineColor(e){return this.mindMap.rainbowLines?this.mindMap.rainbowLines.getNodeColor(e):""}removeLine(){this._lines.forEach(e=>{e.remove()}),this._lines=[]}isAncestor(e){if(this.uid===e.uid)return!1;let t=e.parent;for(;t;){if(this.uid===t.uid)return!0;t=t.parent}return!1}isParent(e){if(this.uid===e.uid)return!1;const t=e.parent;return!!(t&&this.uid===t.uid)}isBrother(e){return!this.parent||this.uid===e.uid?!1:this.parent.children.find(t=>t.uid===e.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.uid===this.uid):-1}getPaddingVale(){return{paddingX:this.getStyle("paddingX"),paddingY:this.getStyle("paddingY")}}getStyle(e,t){const n=this.style.merge(e,t);return n===void 0?"":n}getSelfStyle(e){return this.style.getSelfStyle(e)}getParentSelfStyle(e){return this.parent?this.parent.getSelfStyle(e)||this.parent.getParentSelfStyle(e):null}getSelfInhertStyle(e){return this.getSelfStyle(e)||this.getParentSelfStyle(e)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(e){return e?this.nodeData.data[e]:this.nodeData.data}getPureData(e=!0,t=!1){return Es({},this,e,t)}getAncestorNodes(){const e=[];let t=this.parent;for(;t;)e.unshift(t),t=t.parent;return e}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group?this.group.rbox():null}getRectInSvg(){const{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform();let{left:s,top:a,width:o,height:l}=this;const h=(s+o)*e+n,c=(a+l)*t+r;return s=s*e+n,a=a*t+r,{left:s,right:h,top:a,bottom:c,width:o*e,height:l*t}}highlight(){this.group&&this.group.addClass("smm-node-highlight")}closeHighlight(){this.group&&this.group.removeClass("smm-node-highlight")}fakeClone(){const e=new qa({...this.opt,uid:$i()});return Object.keys(this).forEach(t=>{e[t]=this[t]}),e}createSvgTextNode(e=""){return new Lt().text(e)}getSvgObjects(){return{SVG:ct,G:Ot,Rect:fi}}checkEnableDragModifyNodeWidth(){const{enableDragModifyNodeWidth:e,isUseCustomNodeContent:t,customCreateNodeContent:n}=this.mindMap.opt;return e&&(this.mindMap.richText||t&&n)}hasCustomWidth(){return this.checkEnableDragModifyNodeWidth()&&this.customTextWidth!==void 0}getChildrenLength(){return this.nodeData.children?this.nodeData.children.length:0}}class up{constructor(e){this.max=e||1e3,this.size=0,this.pool=new Map}add(e,t){return!this.has(e)&&this.size>=this.max?!1:(this.delete(e),this.pool.set(e,t),this.size++,!0)}delete(e){this.pool.has(e)&&(this.pool.delete(e),this.size--)}has(e){return this.pool.has(e)}get(e){if(this.pool.has(e))return this.pool.get(e)}clear(){this.size=0,this.pool=new Map}}class Rn{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new up(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null}doLayout(){throw new Error("【computed】方法为必要方法,需要子类进行重写!")}renderLine(){throw new Error("【renderLine】方法为必要方法,需要子类进行重写!")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法,需要子类进行重写!")}renderGeneralization(){}cacheNode(e,t){this.renderer.nodeCache[e]=t,this.lru.add(e,t)}checkIsNeedResizeSources(){return this.renderer.checkHasRenderSource(D.CHANGE_THEME)}checkIsLayerTypeChange(e,t){if(e>=2&&t>=2)return!1;if(e>=2&&t<2||e<2&&t>=2)return!0}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(e){this.renderer.checkHasRenderSource(D.CHANGE_LAYOUT)&&(e.needRerenderExpandBtnPlaceholderRect=!0)}checkIsNodeDataChange(e,t){if(e)e=typeof e=="string"?JSON.parse(e):e,e.isActive=t.isActive,e.expand=t.expand,e=JSON.stringify(e);else return!1;return e!==JSON.stringify(t)}checkNodeFixChange(e,t,n){let r=!1;this.mindMap.nodeInnerPrefixList.forEach(a=>{if(a.updateNodeData){const o=a.updateNodeData(e,t);o&&(r=o)}});let s=!1;return this.mindMap.nodeInnerPostfixList.forEach(a=>{if(a.updateNodeData){const o=a.updateNodeData(e,n);o&&(s=o)}}),r||s}createNode(e,t,n,r,s,a){const o={};this.mindMap.nodeInnerPrefixList.forEach(d=>{if(d.createNodeData){const[f,m]=d.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:s});o[f]=m}});const l={};this.mindMap.nodeInnerPostfixList.forEach(d=>{if(d.createNodeData){const[f,m]=d.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:s});l[f]=m}});const h=e.data.uid;let c=null;if(e&&e._node&&!this.renderer.reRender){c=e._node;const d=this.checkIsLayerTypeChange(c.layerIndex,r);c.reset(),c.layerIndex=r,n?c.isRoot=!0:c.parent=t._node,this.cacheNode(e._node.uid,c),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(c);const f=this.checkNodeFixChange(c,o,l),m=this.checkIsNeedResizeSources(),v=this.checkIsNodeDataChange(e._node.nodeDataSnapshot,e.data);(m||v||d||c.getData("resetRichText")||c.getData("needUpdate")||f)&&(c.getSize(),c.needLayout=!0),this.checkGetGeneralizationChange(c,m)}else if((this.lru.has(h)||this.renderer.lastNodeCache[h])&&!this.renderer.reRender){c=this.lru.get(h)||this.renderer.lastNodeCache[h];const d=JSON.stringify(c.getData()),f=this.checkIsLayerTypeChange(c.layerIndex,r);c.reset(),c.nodeData=c.handleData(e||{}),c.layerIndex=r,n?c.isRoot=!0:c.parent=t._node,this.cacheNode(h,c),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(c),e._node=c;const m=this.checkIsNeedResizeSources(),v=this.checkIsNodeDataChange(d,e.data),g=this.checkNodeFixChange(c,o,l);(m||v||f||c.getData("resetRichText")||c.getData("needUpdate")||g)&&(c.getSize(),c.needLayout=!0),this.checkGetGeneralizationChange(c,m)}else{const d=h||$i();c=new qa({data:e,uid:d,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:r,isRoot:n,parent:n?null:t._node,...o}),e.data.uid=d,this.cacheNode(d,c),e._node=c}return e.data.isActive&&this.renderer.addNodeToActiveList(c),this.mindMap.renderer.findActiveNodeIndex(c)!==-1&&c.setData({isActive:!0}),n?this.root=c:t._node.addChildren(c),c}checkGetGeneralizationChange(e,t){const n=e.getData("generalization");n&&e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach((r,s)=>{const a=r.generalizationNode,o=a.getData(),l=n[s];(t||l&&JSON.stringify(o)!==JSON.stringify(l))&&(l&&(a.nodeData.data=l),a.getSize(),a.needLayout=!0)})}formatPosition(e,t,n){return typeof e=="number"?e:ql[e]!==void 0?t*ql[e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}formatInitRootNodePosition(e){const{CENTER:t}=D.INIT_ROOT_NODE_POSITION;return(!e||!Array.isArray(e)||e.length<2)&&(e=[t,t]),e}setNodeCenter(e,t){let{initRootNodePosition:n}=this.mindMap.opt;n=this.formatInitRootNodePosition(t||n),e.left=this.formatPosition(n[0],this.mindMap.width,e.width),e.top=this.formatPosition(n[1],this.mindMap.height,e.height)}getRootCenterOffset(e,t){if(this.rootNodeCenterOffset)return this.rootNodeCenterOffset;let{initRootNodePosition:n}=this.mindMap.opt;const{CENTER:r}=D.INIT_ROOT_NODE_POSITION;if(n=this.formatInitRootNodePosition(n),n[0]===r&&n[1]===r)this.rootNodeCenterOffset={x:0,y:0};else{const s={width:e,height:t},a={width:e,height:t};this.setNodeCenter(s,[r,r]),this.setNodeCenter(a),this.rootNodeCenterOffset={x:a.left-s.left,y:a.top-s.top}}return this.rootNodeCenterOffset}updateChildren(e,t,n){e.forEach(r=>{r[t]+=n,r.children&&r.children.length&&!r.hasCustomPosition()&&this.updateChildren(r.children,t,n)})}updateChildrenPro(e,t){e.forEach(n=>{Object.keys(t).forEach(r=>{n[r]+=t[r]}),n.children&&n.children.length&&!n.hasCustomPosition()&&this.updateChildrenPro(n.children,t)})}getNodeAreaWidth(e,t=!1){let n=[],r=0,s=(a,o)=>{t&&a.checkHasGeneralization()&&(r+=a._generalizationNodeWidth),a.children.length?(o+=a.width/2,a.children.forEach(l=>{s(l,o)})):(o+=a.width,n.push(o))};return s(e,0),Math.max(...n)+r}quadraticCurvePath(e,t,n,r,s=!1){let a,o;return s?(a=e+(n-e)*.8,o=t+(r-t)*.2):(a=e+(n-e)*.2,o=t+(r-t)*.8),`M ${e},${t} Q ${a},${o} ${n},${r}`}cubicBezierPath(e,t,n,r,s=!1){let a,o,l,h;return s?(a=e,o=t+(r-t)/2,l=n,h=o):(a=e+(n-e)/2,o=t,l=a,h=r),`M ${e},${t} C ${a},${o} ${l},${h} ${n},${r}`}computeNewPoint(e,t,n=0){if(e[0]===t[0])return t[1]>e[1]?[t[0],t[1]-n]:[t[0],t[1]+n];if(e[1]===t[1])return t[0]>e[0]?[t[0]-n,t[1]]:[t[0]+n,t[1]]}createFoldLine(e){const{lineRadius:t}=this.mindMap.themeConfig,n=e.length;let r="",s="";if(n>=3&&t>0){const a=e[n-3],o=e[n-2],l=e[n-1];if(!(a[0].toFixed(0)===o[0].toFixed(0)&&o[0].toFixed(0)===l[0].toFixed(0)||a[1].toFixed(0)===o[1].toFixed(0)&&o[1].toFixed(0)===l[1].toFixed(0))){const c=this.computeNewPoint(a,o,t),d=this.computeNewPoint(l,o,t);s=`Q ${o[0]},${o[1]} ${d[0]},${d[1]}`,e.splice(n-2,1,c,s)}}return e.forEach((a,o)=>{if(typeof a=="string")r+=a;else{const[l,h]=a;o===0?r+=`M ${l},${h}`:r+=`L ${l},${h}`}}),r}getMarginX(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:s}=t,a=n.hoverRectPadding*2;return e===1?r.marginX+a:s.marginX+a}getMarginY(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:s}=t,a=n.hoverRectPadding*2;return e===1?r.marginY+a:s.marginY+a}getNodeWidthWithGeneralization(e){return Math.max(e.width,e.checkHasGeneralization()?e._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(e){return Math.max(e.height,e.checkHasGeneralization()?e._generalizationNodeHeight:0)}getNodeBoundaries(e,t){let{generalizationLineMargin:n,generalizationNodeMargin:r}=this.mindMap.themeConfig,s=c=>{let d=1/0,f=-1/0,m=1/0,v=-1/0;c.children&&c.children.length>0&&c.children.forEach(x=>{let{left:w,right:N,top:M,bottom:z}=s(x),E=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeWidth+r:0,B=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeHeight+r:0;w-(t==="h"?E:0)<d&&(d=w-(t==="h"?E:0)),N+(t==="h"?E:0)>f&&(f=N+(t==="h"?E:0)),M<m&&(m=M),z+(t==="v"?B:0)>v&&(v=z+(t==="v"?B:0))});let g={left:c.left,right:c.left+c.width,top:c.top,bottom:c.top+c.height};return{left:g.left<d?g.left:d,right:g.right>f?g.right:f,top:g.top<m?g.top:m,bottom:g.bottom>v?g.bottom:v}},{left:a,right:o,top:l,bottom:h}=s(e);return{left:a,right:o,top:l,bottom:h,generalizationLineMargin:n,generalizationNodeMargin:r}}getChildrenBoundaries(e,t,n=0,r){let{generalizationLineMargin:s,generalizationNodeMargin:a}=this.mindMap.themeConfig;const o=e.children.slice(n,r+1);let l=1/0,h=-1/0,c=1/0,d=-1/0;return o.forEach(f=>{const m=this.getNodeBoundaries(f,t);l=m.left<l?m.left:l,h=m.right>h?m.right:h,c=m.top<c?m.top:c,d=m.bottom>d?m.bottom:d}),{left:l,right:h,top:c,bottom:d,generalizationLineMargin:s,generalizationNodeMargin:a}}getNodeGeneralizationRenderBoundaries(e,t){let n=null;return e.range?n=this.getChildrenBoundaries(e.node,t,e.range[0],e.range[1]):n=this.getNodeBoundaries(e.node,t),n}getNodeActChildrenLength(e){return e.nodeData.children&&e.nodeData.children.length}setLineStyle(e,t,n,r){t.plot(this.transformPath(n)),e&&e(t,r,!0)}transformPath(e){const{customTransformNodeLinePath:t}=this.mindMap.opt;return t?t(e):e}}class xh extends Rn{constructor(e={},t){super(e),this.isUseLeft=t===D.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){let e=0;Be(this.renderer.renderTree,null,(t,n,r,s,a,o)=>{let l=this.createNode(t,n,r,s,a,o);if(l.sortIndex=e,e++,r?this.setNodeCenter(l):this.isUseLeft?l.left=n._node.left-l.width-this.getMarginX(s):l.left=n._node.left+n._node.width+this.getMarginX(s),!t.data.expand)return!0},(t,n,r,s)=>{let a=t.data.expand===!1?0:t._node.children.length;t._node.childrenAreaHeight=a?t._node.children.reduce((l,h)=>l+h.height,0)+(a+1)*this.getMarginY(s+1):0;let o=t._node.checkHasGeneralization()?t._node._generalizationNodeHeight+this.getMarginY(s+1):0;t._node.childrenAreaHeight2=Math.max(t._node.childrenAreaHeight,o)},!0,0)}computedTopValue(){Be(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),o=e.top+e.height/2-e.childrenAreaHeight/2+s;e.children.forEach(l=>{l.top=o,o+=l.height+s})}},null,!0)}adjustTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=e.childrenAreaHeight2-this.getMarginY(r+1)*2-e.height;s>0&&this.updateBrothers(e,s/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.uid===e.uid||s.hasCustomPosition())return;let o=0;a<r?o=-t:a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let f=(this.getMarginX(e.layerIndex+1)-l)*.6;this.isUseLeft&&(f*=-1);let m=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((v,g)=>{let x;this.isUseLeft?x=e.layerIndex===0?r:r-l:x=e.layerIndex===0?r+a:r+a+l;let w=s+o/2,N=this.isUseLeft?v.left+v.width:v.left,M=v.top+v.height/2,z=m?v.width*(this.isUseLeft?-1:1):0;w=m&&!e.isRoot?w+o/2:w,M=m?M+v.height/2:M;let E=this.createFoldLine([[x,w],[x+f,w],[x+f,M],[N+z,M]]);this.setLineStyle(n,t[g],E,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d}=this.mindMap.themeConfig;e.children.forEach((f,m)=>{e.layerIndex===0&&(l=0);let v=this.isUseLeft?r-l:r+a+l,g=s+o/2,x=this.isUseLeft?f.left+f.width:f.left,w=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,w=d?w+f.height/2:w;let N=d?` L ${this.isUseLeft?f.left:f.left+f.width},${w}`:"",M=`M ${v},${g} L ${x},${w}`+N;this.setLineStyle(n,t[m],M,f)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:f,rootLineKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x;this.isUseLeft?x=e.layerIndex===0&&!f?r+a/2:r-l:x=e.layerIndex===0&&!f?r+a/2:r+a+l;let w=s+o/2,N=this.isUseLeft?v.left+v.width:v.left,M=v.top+v.height/2,z="";w=d&&!e.isRoot?w+o/2:w,M=d?M+v.height/2:M;let E;this.isUseLeft?E=d?` L ${v.left},${M}`:"":E=d?` L ${v.left+v.width},${M}`:"",e.isRoot&&!m?z=this.quadraticCurvePath(x,w,N,M)+E:z=this.cubicBezierPath(x,w,N,M)+E,this.setLineStyle(n,t[g],z,v)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,layerIndex:a}=e;a===0&&(s=0);let{translateX:o,translateY:l}=t.transform(),h=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,c=this.isUseLeft?0-s:n,d=r/2+h;c===o&&d===l||t.translate(c-o,d-l)}renderGeneralization(e){e.forEach(t=>{let{left:n,top:r,bottom:s,right:a,generalizationLineMargin:o,generalizationNodeMargin:l}=this.getNodeGeneralizationRenderBoundaries(t,"h"),h=this.isUseLeft?n-o:a+o,c=h,d=r,f=h,m=s,v=c+(this.isUseLeft?-20:20),g=d+(m-d)/2,x=`M ${c},${d} Q ${v},${g} ${f},${m}`;t.generalizationLine.plot(x),t.generalizationNode.left=h+(this.isUseLeft?-l:l)-(this.isUseLeft?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r){this.isUseLeft?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}let fp=class extends Rn{constructor(e={}){super(e)}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=o.getData("dir")||(s%2===0?D.LAYOUT_GROW_DIR.RIGHT:D.LAYOUT_GROW_DIR.LEFT),o.left=o.dir===D.LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(!e.data.expand){e._node.leftChildrenAreaHeight=0,e._node.rightChildrenAreaHeight=0;return}let s=0,a=0,o=0,l=0;e._node.children.forEach(c=>{c.dir===D.LAYOUT_GROW_DIR.LEFT?(s++,o+=c.height):(a++,l+=c.height)}),e._node.leftChildrenAreaHeight=o+(s+1)*this.getMarginY(r+1),e._node.rightChildrenAreaHeight=l+(a+1)*this.getMarginY(r+1);let h=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.leftChildrenAreaHeight2=Math.max(e._node.leftChildrenAreaHeight,h),e._node.rightChildrenAreaHeight2=Math.max(e._node.rightChildrenAreaHeight,h)},!0,0)}computedTopValue(){Be(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),a=e.top+e.height/2+s,o=a-e.leftChildrenAreaHeight/2,l=a-e.rightChildrenAreaHeight/2;e.children.forEach(h=>{h.dir===D.LAYOUT_GROW_DIR.LEFT?(h.top=o,o+=h.height+s):(h.top=l,l+=h.height+s)})}},null,!0)}adjustTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=this.getMarginY(r+1)*2+e.height,a=e.leftChildrenAreaHeight2-s,o=e.rightChildrenAreaHeight2-s;(a>0||o>0)&&this.updateBrothers(e,a/2,o/2)},null,!0)}updateBrothers(e,t,n){if(e.parent){let r=e.parent.children.filter(a=>a.dir===e.dir),s=Ct(e,r);r.forEach((a,o)=>{if(a.hasCustomPosition())return;let l=0,h=a.dir===D.LAYOUT_GROW_DIR.LEFT?t:n;o<s?l=-h:o>s&&(l=h),a.top+=l,a.children&&a.children.length&&this.updateChildren(a.children,"top",l)}),this.updateBrothers(e.parent,t,n)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let f=(this.getMarginX(e.layerIndex+1)-l)*.6,m=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((v,g)=>{let x=0,w=0,N=m?v.width:0;v.dir===D.LAYOUT_GROW_DIR.LEFT?(w=-f,x=e.layerIndex===0?r:r-l,N=-N):(w=f,x=e.layerIndex===0?r+a:r+a+l);let M=s+o/2,z=v.dir===D.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,E=v.top+v.height/2;M=m&&!e.isRoot?M+o/2:M,E=m?E+v.height/2:E;let B=this.createFoldLine([[x,M],[x+w,M],[x+w,E],[z+N,E]]);this.setLineStyle(n,t[g],B,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d}=this.mindMap.themeConfig;e.children.forEach((f,m)=>{e.layerIndex===0&&(l=0);let v=f.dir===D.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,g=s+o/2,x=f.dir===D.LAYOUT_GROW_DIR.LEFT?f.left+f.width:f.left,w=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,w=d?w+f.height/2:w;let N="";d&&(f.dir===D.LAYOUT_GROW_DIR.LEFT?N=` L ${f.left},${w}`:N=` L ${f.left+f.width},${w}`);let M=`M ${v},${g} L ${x},${w}`+N;this.setLineStyle(n,t[m],M,f)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineKeepSameInCurve:f,rootLineStartPositionKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x=e.layerIndex===0&&!m?r+a/2:v.dir===D.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,w=s+o/2,N=v.dir===D.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,M=v.top+v.height/2,z="";w=d&&!e.isRoot?w+o/2:w,M=d?M+v.height/2:M;let E="";d&&(v.dir===D.LAYOUT_GROW_DIR.LEFT?E=` L ${v.left},${M}`:E=` L ${v.left+v.width},${M}`),e.isRoot&&!f?z=this.quadraticCurvePath(x,w,N,M)+E:z=this.cubicBezierPath(x,w,N,M)+E,this.setLineStyle(n,t[g],z,v)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s}=e,{translateX:a,translateY:o}=t.transform(),l=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,h=e.dir===D.LAYOUT_GROW_DIR.LEFT?0-s:n,c=r/2+l;if(h===a&&c===o)return;let d=h-a,f=c-o;t.translate(d,f)}renderGeneralization(e){e.forEach(t=>{let n=t.node.dir===D.LAYOUT_GROW_DIR.LEFT,{top:r,bottom:s,left:a,right:o,generalizationLineMargin:l,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),c=n?a-l:o+l,d=c,f=r,m=c,v=s,g=d+(n?-20:20),x=f+(v-f)/2,w=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(w),t.generalizationNode.left=c+(n?-h:h)-(n?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){s.dir===D.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}};class pp extends Rn{constructor(e={}){super(e)}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):t._node.isRoot&&(o.top=t._node.top+t._node.height+this.getMarginX(r)),!e.data.expand)return!0},(e,t,n,r)=>{if(n){let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=s?e._node.children.reduce((a,o)=>a+o.width,0)+(s+1)*this.getMarginX(r+1):0}},!0,0)}computedLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginX(r+1),a=this.getMarginY(r+1);if(n){let l=e.left+e.width/2-e.childrenAreaWidth/2+s;e.children.forEach(h=>{h.left=l,l+=h.width+s})}else{let o=e.top+this.getNodeHeightWithGeneralization(e)+a+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(l=>{l.left=e.left+e.width*.5,l.top=o,o+=this.getNodeHeightWithGeneralization(l)+a+(this.getNodeActChildrenLength(l)>0?l.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(t&&t.isRoot){let o=this.getNodeAreaWidth(e,!0)-e.width;o>0&&this.updateBrothersLeft(e,o)}let s=e.children.length;if(t&&!t.isRoot&&s>0){let a=this.getMarginY(r+1),o=e.children.reduce((l,h)=>l+this.getNodeHeightWithGeneralization(h)+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0),0)+s*a;this.updateBrothersTop(e,o)}},(e,t,n)=>{if(n){let{right:r,left:s}=this.getNodeBoundaries(e,"h"),a=r-s,o=e.left-s-(a-e.width)/2;this.updateChildren(e.children,"left",o)}},!0)}updateBrothersLeft(e,t){if(e.parent){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{s.hasCustomPosition()||a<=r||(s.left+=t,s.children&&s.children.length&&this.updateChildren(s.children,"left",t))}),this.updateBrothersLeft(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let d=e.children.length,f=this.getMarginX(e.layerIndex+1);if(e.isRoot){let m=r+a/2,v=s+o,g=f*.7,x=1/0,w=-1/0;e.children.forEach((M,z)=>{let E=M.left+M.width/2,B=M.top;E<x&&(x=E),E>w&&(w=E);let I=this.mindMap.themeConfig.nodeUseLineStyle?` L ${M.left},${B} L ${M.left+M.width},${B}`:"",R=`M ${E},${v+g} L ${E},${v+g>B?B+M.height:B}`+I;this.setLineStyle(n,t[z],R,M)}),x=Math.min(x,m),w=Math.max(w,m);let N=this.lineDraw.path();if(e.style.line(N),N.plot(this.transformPath(`M ${m},${v} L ${m},${v+g}`)),e._lines.push(N),n&&n(N,e),d>0){let M=this.lineDraw.path();e.style.line(M),M.plot(this.transformPath(`M ${x},${v+g} L ${w},${v+g}`)),e._lines.push(M),n&&n(M,e)}}else{let m=s+o,v=-1/0,g=e.left+e.width*.3;if(e.children.forEach((x,w)=>{let N=x.top+x.height/2;N>v&&(v=N);let M="",z=x.left,E=x.left+x.width<g,B=!1;E?z=x.left+x.width:x.left<g&&x.left+x.width>g&&(B=!0,N=x.top,v=N),N>s&&N<m?M=`M ${E?e.left:e.left+e.width},${N} L ${z},${N}`:N<m?(B&&(N=x.top+x.height,z=g),M=`M ${g},${s} L ${g},${N} L ${z},${N}`):(B&&(z=g),M=`M ${g},${N} L ${z},${N}`);let I=this.mindMap.themeConfig.nodeUseLineStyle?` L ${z},${N-x.height/2} L ${z},${N+x.height/2}`:"";M+=I,this.setLineStyle(n,t[w],M,x)}),d>0){let x=this.lineDraw.path();l=d>0?l:0,e.style.line(x),v<m+l?x.hide():(x.plot(this.transformPath(`M ${g},${m+l} L ${g},${v}`)),x.show()),e._lines.push(x),n&&n(x,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();t.translate(n*.3-s/2-o,r+s/2-l)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){e.size(n,t).x(0).y(r)}}class mp extends Rn{constructor(e={}){super(e)}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}])}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):o.top=t._node.top+t._node.height+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=s?e._node.children.reduce((o,l)=>o+l.width,0)+(s+1)*this.getMarginY(r+1):0;let a=e._node.checkHasGeneralization()?e._node._generalizationNodeWidth+this.getMarginY(r+1):0;e._node.childrenAreaWidth2=Math.max(e._node.childrenAreaWidth,a)},!0,0)}computedLeftValue(){Be(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let s=this.getMarginY(r+1),o=e.left+e.width/2-e.childrenAreaWidth/2+s;e.children.forEach(l=>{l.left=o,o+=l.width+s})}},null,!0)}adjustLeftValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s=e.childrenAreaWidth2-this.getMarginY(r+1)*2-e.width;s>0&&this.updateBrothers(e,s/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a<r?o=-t:a>r&&(o=t),s.left+=o,s.children&&s.children.length&&this.updateChildren(s.children,"left",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);const{nodeUseLineStyle:d,rootLineStartPositionKeepSameInCurve:f,rootLineKeepSameInCurve:m}=this.mindMap.themeConfig;e.children.forEach((v,g)=>{e.layerIndex===0&&(l=0);let x=r+a/2,w=e.layerIndex===0&&!f?s+o/2:s+o+l,N=v.left+v.width/2,M=v.top,z="",E=d?` L ${v.left},${M} L ${v.left+v.width},${M}`:"";e.isRoot&&!m?z=this.quadraticCurvePath(x,w,N,M,!0)+E:z=this.cubicBezierPath(x,w,N,M,!0)+E,this.setLineStyle(n,t[g],z,v)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o}=e;const{nodeUseLineStyle:l}=this.mindMap.themeConfig;let h=r+a/2,c=s+o;e.children.forEach((d,f)=>{let m=d.left+d.width/2,v=d.top,g=l?` L ${d.left},${v} L ${d.left+d.width},${v}`:"",x=`M ${h},${c} L ${m},${v}`+g;this.setLineStyle(n,t[f],x,d)})}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l,isRoot:h}=e;const{alwaysShowExpandBtn:c,notShowExpandBtn:d}=this.mindMap.opt;(!c||d)&&(l=0);let f=r+a/2,m=s+o,g=this.getMarginX(e.layerIndex+1)*.7,x=1/0,w=-1/0,N=e.children.length;e.children.forEach((z,E)=>{let B=z.left+z.width/2,I=m+g>z.top?z.top+z.height:z.top;B<x&&(x=B),B>w&&(w=B);let R=this.mindMap.themeConfig.nodeUseLineStyle?` L ${z.left},${I} L ${z.left+z.width},${I}`:"",F=`M ${B},${m+g} L ${B},${I}`+R;this.setLineStyle(n,t[E],F,z)}),x=Math.min(f,x),w=Math.max(f,w);let M=this.lineDraw.path();if(e.style.line(M),l=N>0&&!h?l:0,M.plot(this.transformPath(`M ${f},${m+l} L ${f},${m+g}`)),e._lines.push(M),n&&n(M,e),N>0){let z=this.lineDraw.path();e.style.line(z),z.plot(this.transformPath(`M ${x},${m+g} L ${w},${m+g}`)),e._lines.push(z),n&&n(z,e)}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s}=e,{translateX:a,translateY:o}=t.transform();t.translate(n/2-s/2-a,r+s/2-o)}renderGeneralization(e){e.forEach(t=>{let{bottom:n,left:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"v"),l=r,h=n+a,c=s,d=n+a,f=l+(c-l)/2,m=h+20,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.top=n+o,t.generalizationNode.left=r+(s-r-t.generalizationNode.width)/2})}renderExpandBtnRect(e,t,n,r,s){e.size(n,t).x(0).y(r)}}class yh extends Rn{constructor(e={},t){super(e),this.layout=t}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(this.layout===D.LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?D.LAYOUT_GROW_DIR.BOTTOM:D.LAYOUT_GROW_DIR.TOP:o.dir="",t._node.isRoot&&(o.top=t._node.top+(e._node.height>t._node.height?-(e._node.height-t._node.height)/2:(t._node.height-e._node.height)/2))),!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Be(this.root,null,(e,t,n,r,s)=>{if(e.getData("expand")&&e.children&&e.children.length){let a=this.getMarginX(r+1),o=this.getMarginY(r+1);if(n){let h=e.left+e.width+a;e.children.forEach(c=>{c.left=h,h+=c.width+a})}else{let l=e.top+e.height+o+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(h=>{h.left=e.left+e.width*.5,h.top=l,l+=h.height+o+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;e.isRoot&&this.updateBrothersLeft(e);let s=e.children.length;if(t&&!t.isRoot&&s>0){let a=this.getMarginY(r+1),o=e.children.reduce((l,h)=>l+h.height+(this.getNodeActChildrenLength(h)>0?h.expandBtnSize:0),0)+s*a;this.updateBrothersTop(e,o)}},(e,t,n,r)=>{t&&t.isRoot&&e.dir===D.LAYOUT_GROW_DIR.TOP&&e.children.forEach(s=>{let a=this.getNodeAreaHeight(s),o=s.top;s.top=e.top-(s.top-e.top)-a+e.height,this.updateChildren(s.children,"top",s.top-o)})},!0)}getNodeAreaHeight(e){let t=0,n=r=>{t+=r.height+(this.getNodeActChildrenLength(r)>0?r.expandBtnSize:0)+this.getMarginY(r.layerIndex),r.children.length&&r.children.forEach(s=>{n(s)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(r=>{r.left+=n,r.children&&r.children.length&&this.updateChildren(r.children,"left",n);let{left:s,right:a}=this.getNodeBoundaries(r,"h"),l=a-s-r.width;l>0&&(n+=l)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0);let d=e.children.length;if(e.isRoot){let f=e;e.children.forEach((m,v)=>{let g=f.left+f.width,x=m.left,w=e.top+e.height/2,N=`M ${g},${w} L ${x},${w}`;this.setLineStyle(n,t[v],N,m),f=m})}else{let f=-1/0,m=1/0,v=e.left+e.width*.3;if(e.children.forEach((g,x)=>{let w=g.top+g.height/2;w>f&&(f=w),w<m&&(m=w);let N=`M ${v},${w} L ${g.left},${w}`;this.setLineStyle(n,t[x],N,g)}),d>0){let g=this.lineDraw.path();l=d>0?l:0,e.parent&&e.parent.isRoot&&e.dir===D.LAYOUT_GROW_DIR.TOP?g.plot(this.transformPath(`M ${v},${s} L ${v},${m}`)):g.plot(this.transformPath(`M ${v},${s+o+l} L ${v},${f}`)),e.style.line(g),e._lines.push(g),n&&n(g,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();e.parent&&e.parent.isRoot&&e.dir===D.LAYOUT_GROW_DIR.TOP?t.translate(n*.3-s/2-o,-s/2-l):t.translate(n*.3-s/2-o,r+s/2-l)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){if(this.layout===D.LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let a="";s.dir===D.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?D.LAYOUT_GROW_DIR.TOP:D.LAYOUT_GROW_DIR.BOTTOM:a=D.LAYOUT_GROW_DIR.BOTTOM,a===D.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}class yo extends Rn{constructor(e={},t){super(e),this.layout=t}doLayout(e){hr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{let o=this.createNode(e,t,n,r,s,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:this.layout===D.LAYOUT.VERTICAL_TIMELINE2?o.dir=D.LAYOUT_GROW_DIR.LEFT:this.layout===D.LAYOUT.VERTICAL_TIMELINE3?o.dir=D.LAYOUT_GROW_DIR.RIGHT:o.dir=s%2===0?D.LAYOUT_GROW_DIR.RIGHT:D.LAYOUT_GROW_DIR.LEFT,t._node.isRoot?o.left=t._node.left+(e._node.width>t._node.width?-(e._node.width-t._node.width)/2:(t._node.width-e._node.width)/2):o.left=o.dir===D.LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(n)return;let s=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaHeight=s?e._node.children.reduce((a,o)=>a+o.height,0)+(s+1)*this.getMarginY(r+1):0},!0,0)}computedTopValue(){Be(this.root,null,(e,t,n,r,s)=>{if(e.getData("expand")&&e.children&&e.children.length){let a=this.getMarginY(r+1);if(n){let l=e.top+e.height+a;e.children.forEach(h=>{h.top=l,l+=h.height+a})}else{let o=this.getMarginY(r+1),h=e.top+e.height/2+o-e.childrenAreaHeight/2;e.children.forEach(c=>{c.top=h,h+=c.height+o})}}},null,!0)}adjustLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand")||n)return;let s=this.getMarginY(r+1)*2+e.height,a=e.childrenAreaHeight-s;a>0&&this.updateBrothers(e,a/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition()||!e.parent.isRoot&&s.uid===e.uid)return;let o=0;e.parent.isRoot?a<r?o=0:a>r?o=t*2:o=t:a<r?o=-t:a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothers(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n,r){r==="curve"?this.renderLineCurve(e,t,n):r==="direct"?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{expandBtnSize:r}=e;const{alwaysShowExpandBtn:s,notShowExpandBtn:a}=this.mindMap.opt;if((!s||a)&&(r=0),e.isRoot){let o=e;e.children.forEach((l,h)=>{let c=o.top+o.height,d=l.top,f=e.left+e.width/2,m=`M ${f},${c} L ${f},${d}`;this.setLineStyle(n,t[h],m,l),o=l})}else if(e.dir===D.LAYOUT_GROW_DIR.RIGHT){let o=e.left+e.width,l=e.top+e.height/2,c=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((d,f)=>{let m=d.left,v=d.top+d.height/2,g=this.createFoldLine([[o,l],[o+c,l],[o+c,v],[m,v]]);this.setLineStyle(n,t[f],g,d)})}else{let o=e.left,l=e.top+e.height/2,c=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((d,f)=>{let m=d.left+d.width,v=d.top+d.height/2,g=this.createFoldLine([[o,l],[o-c,l],[o-c,v],[m,v]]);this.setLineStyle(n,t[f],g,d)})}}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0),e.children.forEach((d,f)=>{if(e.isRoot){let m=e;e.children.forEach((v,g)=>{let x=m.top+m.height,w=v.top,N=e.left+e.width/2,M=`M ${N},${x} L ${N},${w}`;this.setLineStyle(n,t[g],M,v),m=v})}else{let m=d.dir===D.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===D.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,w=`M ${m},${v} L ${g},${x}`;this.setLineStyle(n,t[f],w,d)}})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:s,width:a,height:o,expandBtnSize:l}=e;const{alwaysShowExpandBtn:h,notShowExpandBtn:c}=this.mindMap.opt;(!h||c)&&(l=0),e.children.forEach((d,f)=>{if(e.isRoot){let m=e;e.children.forEach((v,g)=>{let x=m.top+m.height,w=v.top,N=e.left+e.width/2,M=`M ${N},${x} L ${N},${w}`;this.setLineStyle(n,t[g],M,v),m=v})}else{let m=d.dir===D.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===D.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,w=this.cubicBezierPath(m,v,g,x);this.setLineStyle(n,t[f],w,d)}})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform();e.dir===D.LAYOUT_GROW_DIR.RIGHT?t.translate(n-o,r/2-l):t.translate(-s-o,r/2-l)}}renderGeneralization(e){e.forEach(t=>{let n=t.node.dir===D.LAYOUT_GROW_DIR.LEFT,{top:r,bottom:s,left:a,right:o,generalizationLineMargin:l,generalizationNodeMargin:h}=this.getNodeGeneralizationRenderBoundaries(t,"h"),c=n?a-l:o+l,d=c,f=r,m=c,v=s,g=d+(n?-20:20),x=f+(v-f)/2,w=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(this.transformPath(w)),t.generalizationNode.left=c+(n?-h:h)-(n?t.generalizationNode.width:0),t.generalizationNode.top=r+(s-r-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){s.dir===D.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}const Pi={top:{renderExpandBtn({node:i,btn:e,expandBtnSize:t,translateX:n,translateY:r,width:s,height:a}){i.parent&&i.parent.isRoot?e.translate(s*.3-t/2-n,-t/2-r):e.translate(s*.3-t/2-n,a+t/2-r)},renderLine({node:i,line:e,top:t,x:n,lineLength:r,height:s,expandBtnSize:a,maxy:o,ctx:l}){i.parent&&i.parent.isRoot?e.plot(l.transformPath(`M ${n},${t} L ${n+r},${t-Math.tan(Cr(l.mindMap.opt.fishboneDeg))*r}`)):e.plot(l.transformPath(`M ${n},${t+s+a} L ${n},${o}`))},computedLeftTopValue({layerIndex:i,node:e,ctx:t}){if(i>=1&&e.children){let n=t.getMarginY(i+1),r=e.left+e.width*t.childIndent,s=e.top+e.height+(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(a=>{a.left=r,a.top+=s,s+=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:i,parent:e,ctx:t,layerIndex:n}){let r=i.children.length,s=t.getMarginY(n+1);if(e&&!e.isRoot&&r>0){let a=i.children.reduce((o,l)=>o+l.height+(t.getNodeActChildrenLength(l)>0?l.expandBtnSize:0)+s,0);t.updateBrothersTop(i,a)}},adjustLeftTopValueAfter({parent:i,node:e,ctx:t}){if(i&&i.isRoot){let n=t.getMarginY(e.layerIndex+1),r=e.expandBtnSize+n;e.children.forEach(s=>{let a=t.getNodeAreaHeight(s),o=s.top,l=s.left;s.top=e.top-(s.top-e.top)-a+e.height,s.left=e.left+e.width*t.indent+(a+r)/Math.tan(Cr(t.mindMap.opt.fishboneDeg)),r+=a,t.updateChildrenPro(s.children,{top:s.top-o,left:s.left-l})})}}},bottom:{renderExpandBtn({node:i,btn:e,expandBtnSize:t,translateX:n,translateY:r,width:s,height:a}){i.parent&&i.parent.isRoot?e.translate(s*.3-t/2-n,a+t/2-r):e.translate(s*.3-t/2-n,-t/2-r)},renderLine({node:i,line:e,top:t,x:n,lineLength:r,height:s,miny:a,ctx:o}){i.parent&&i.parent.isRoot?e.plot(o.transformPath(`M ${n},${t+s} L ${n+r},${t+s+Math.tan(Cr(o.mindMap.opt.fishboneDeg))*r}`)):e.plot(o.transformPath(`M ${n},${t} L ${n},${a}`))},computedLeftTopValue({layerIndex:i,node:e,ctx:t}){let n=t.getMarginY(i+1);if(i===1&&e.children){let r=e.left+e.width*t.childIndent,s=e.top+e.height+(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+n;e.children.forEach(a=>{a.left=r,a.top=s+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0),s+=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}if(i>1&&e.children){let r=e.left+e.width*t.childIndent,s=e.top-(t.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)-n;e.children.forEach(a=>{a.left=r,a.top=s-a.height,s-=a.height+(t.getNodeActChildrenLength(a)>0?a.expandBtnSize:0)+n})}},adjustLeftTopValueBefore({node:i,ctx:e,layerIndex:t}){let n=e.getMarginY(t+1),r=i.children.length;if(t>2&&r>0){let s=i.children.reduce((a,o)=>a+o.height+(e.getNodeActChildrenLength(o)>0?o.expandBtnSize:0)+n,0);e.updateBrothersTop(i,-s)}},adjustLeftTopValueAfter({parent:i,node:e,ctx:t}){if(i&&i.isRoot){let n=t.getMarginY(e.layerIndex+1),r=0,s=e.expandBtnSize;e.children.forEach(a=>{let o=t.getNodeActChildrenLength(a)>0,l=t.getNodeAreaHeight(a),h=o?l-a.height-(o?a.expandBtnSize:0):0;h-=o?n:0;let c=r+h,d=a.left;a.top+=c,a.left=e.left+e.width*t.indent+(l+s)/Math.tan(Cr(t.mindMap.opt.fishboneDeg)),r+=h,s+=l,t.updateChildrenPro(a.children,{top:c,left:a.left-d})})}}}};class wh extends Rn{constructor(e={},t){super(e),this.layout=t,this.indent=.3,this.childIndent=.5,this.fishTail=null,this.maxx=0,this.headRatio=1,this.tailRatio=.6,this.paddingXRatio=.3,this.fishHeadPathStr="M4,181 C4,181, 0,177, 4,173 Q 96.09523809523809,0, 288.2857142857143,0 L 288.2857142857143,354 Q 48.047619047619044,354, 8,218.18367346938777 C8,218.18367346938777, 6,214.18367346938777, 8,214.18367346938777 L 41.183673469387756,214.18367346938777 Z",this.fishTailPathStr="M 606.9342905223708 0 Q 713.1342905223709 -177 819.3342905223708 -177 L 766.2342905223709 0 L 819.3342905223708 177 Q 713.1342905223709 177 606.9342905223708 0 z",this.bindEvent(),this.extendShape(),this.beforeChange=this.beforeChange.bind(this)}nodeIsRemoveAllLines(e){return e.isRoot||e.layerIndex===1}isFishbone2(){return this.layout===D.LAYOUT.FISHBONE2}bindEvent(){this.isFishbone2()&&(this.onCheckUpdateFishTail=this.onCheckUpdateFishTail.bind(this),this.mindMap.on("afterExecCommand",this.onCheckUpdateFishTail))}unBindEvent(){this.mindMap.off("afterExecCommand",this.onCheckUpdateFishTail)}extendShape(){this.isFishbone2()&&this.mindMap.addShape({name:"fishHead",createShape:e=>{const t=ct(`<path d="${this.fishHeadPathStr}"></path>`),{width:n,height:r}=e.shapeInstance.getNodeSize();return t.size(n,r),t},getPadding:({width:e,height:t,paddingX:n,paddingY:r})=>{e+=n*2,t+=r*2;let s=this.paddingXRatio*e,a=0;return e+=s*2,a=(e/this.headRatio-t)/2,{paddingX:s,paddingY:a}}})}doLayout(e){hr([()=>{this.computedBaseValue(),this.addFishTail()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue(),this.updateFishTailPosition()},()=>{e(this.root)}])}addFishTail(){if(!this.isFishbone2())return;const e=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");e?this.fishTail=e:(this.fishTail=ct(`<path d="${this.fishTailPathStr}"></path>`),this.fishTail.addClass("smm-layout-fishbone-tail"));const t=this.root.height,n=t*this.tailRatio;this.fishTail.size(n,t),this.styleFishTail(),this.mindMap.lineDraw.add(this.fishTail)}onCheckUpdateFishTail(e,t,n){if(e==="SET_NODE_DATA"){let r=!1;Object.keys(n).forEach(s=>{Nd.includes(s)&&(r=!0)}),r&&this.styleFishTail()}}styleFishTail(){this.root.style.shape(this.fishTail)}removeFishTail(){const e=this.mindMap.lineDraw.findOne(".smm-layout-fishbone-tail");e&&e.remove()}updateFishTailPosition(){this.isFishbone2()&&this.fishTail.x(this.maxx).cy(this.root.top+this.root.height/2)}computedBaseValue(){Be(this.renderer.renderTree,null,(e,t,n,r,s,a)=>{n&&this.isFishbone2()&&(e.data.shape="fishHead");let o=this.createNode(e,t,n,r,s,a);if(n)this.setNodeCenter(o);else if(t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?D.LAYOUT_GROW_DIR.TOP:D.LAYOUT_GROW_DIR.BOTTOM,t._node.isRoot){let l=this.getMarginY(r);const h=this.isFishbone2()?t._node.height/4:0;this.checkIsTop(o)?o.top=t._node.top-o.height-l+h:o.top=t._node.top+t._node.height+l-h}if(!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(e.isRoot){let a=this.getMarginX(r+1);const o=this.isFishbone2()?2:1;let l=e.left+e.width+e.height/o+a,h=e.left+e.width+e.height/o+a;e.children.forEach(c=>{this.checkIsTop(c)?(c.left=l,l+=c.width+a):(c.left=h+20,h+=c.width+a)})}let s={layerIndex:r,node:e,ctx:this};this.checkIsTop(e)?Pi.top.computedLeftTopValue(s):Pi.bottom.computedLeftTopValue(s)},null,!0)}adjustLeftTopValue(){Be(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let s={node:e,parent:t,layerIndex:r,ctx:this};this.checkIsTop(e)?Pi.top.adjustLeftTopValueBefore(s):Pi.bottom.adjustLeftTopValueBefore(s)},(e,t)=>{let n={parent:t,node:e,ctx:this};if(this.checkIsTop(e)?Pi.top.adjustLeftTopValueAfter(n):Pi.bottom.adjustLeftTopValueAfter(n),e.isRoot){let r=0,s=0,a=-1/0;e.children.forEach(o=>{if(this.checkIsTop(o)){o.left+=r,this.updateChildren(o.children,"left",r);let{left:l,right:h}=this.getNodeBoundaries(o,"h");h>a&&(a=h),r+=h-l}else{o.left+=s,this.updateChildren(o.children,"left",s);let{left:l,right:h}=this.getNodeBoundaries(o,"h");h>a&&(a=h),s+=h-l}}),this.maxx=a}},!0)}getNodeAreaHeight(e){let t=0,n=r=>{let s=this.getMarginY(r.layerIndex);t+=r.height+(this.getNodeActChildrenLength(r)>0?r.expandBtnSize:0)+s,r.children.length&&r.children.forEach(a=>{n(a)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(r=>{r.left+=n,r.children&&r.children.length&&this.updateChildren(r.children,"left",n);let{left:s,right:a}=this.getNodeBoundaries(r,"h"),l=a-s-r.width;l>0&&(n+=l)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Ct(e,n);n.forEach((s,a)=>{if(s.hasCustomPosition())return;let o=0;a>r&&(o=t),s.top+=o,s.children&&s.children.length&&this.updateChildren(s.children,"top",o)}),this.checkIsTop(e)?this.updateBrothersTop(e.parent,t):this.updateBrothersTop(e.parent,e.layerIndex===3?0:t)}}checkIsTop(e){return e.dir===D.LAYOUT_GROW_DIR.TOP}renderLine(e,t,n){if(e.layerIndex!==1&&e.children.length<=0)return[];let{top:r,height:s,expandBtnSize:a}=e;const{alwaysShowExpandBtn:o,notShowExpandBtn:l}=this.mindMap.opt;(!o||l)&&(a=0);let h=e.children.length;if(e.isRoot){let c=-1/0;e.children.forEach(g=>{g.left>c&&(c=g.left);let x=this.getMarginY(g.layerIndex),w=g.left,N=e.height/2+x-(this.isFishbone2()?e.height/4:0),M=N/Math.tan(Cr(this.mindMap.opt.fishboneDeg)),z=this.lineDraw.path();this.checkIsTop(g)?z.plot(this.transformPath(`M ${w-M},${g.top+g.height+N} L ${g.left},${g.top+g.height}`)):z.plot(this.transformPath(`M ${w-M},${g.top-N} L ${w},${g.top}`)),e.style.line(z),e._lines.push(z),n&&n(z,e)});let d=e.top+e.height/2,f=e.height/2+this.getMarginY(e.layerIndex+1),m=this.lineDraw.path();const v=this.isFishbone2()?this.maxx:c-f/Math.tan(Cr(this.mindMap.opt.fishboneDeg));m.plot(this.transformPath(`M ${e.left+e.width},${d} L ${v},${d}`)),e.style.line(m),e._lines.push(m),n&&n(m,e)}else{let c=-1/0,d=1/0,f=-1/0,m=e.left+e.width*this.indent;if(e.children.forEach((v,g)=>{v.left>f&&(f=v.left);let x=v.top+v.height/2;if(x>c&&(c=x),x<d&&(d=x),e.layerIndex>1){let w=`M ${m},${x} L ${v.left},${x}`;this.setLineStyle(n,t[g],w,v)}}),h>=0){let v=this.lineDraw.path();a=h>0?a:0;let g=f-e.left-e.width*this.indent;g=Math.max(g,0);let x={node:e,line:v,top:r,x:m,lineLength:g,height:s,expandBtnSize:a,maxy:c,miny:d,ctx:this};this.checkIsTop(e)?Pi.top.renderLine(x):Pi.bottom.renderLine(x),e.style.line(v),e._lines.push(v),n&&n(v,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:s,isRoot:a}=e;if(!a){let{translateX:o,translateY:l}=t.transform(),h={node:e,btn:t,expandBtnSize:s,translateX:o,translateY:l,width:n,height:r};this.checkIsTop(e)?Pi.top.renderExpandBtn(h):Pi.bottom.renderExpandBtn(h)}}renderGeneralization(e){e.forEach(t=>{let{top:n,bottom:r,right:s,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(t,"h"),l=s+a,h=n,c=s+a,d=r,f=l+20,m=h+(d-h)/2,v=`M ${l},${h} Q ${f},${m} ${c},${d}`;t.generalizationLine.plot(this.transformPath(v)),t.generalizationNode.left=s+o,t.generalizationNode.top=n+(r-n-t.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,s){let a="";s.dir===D.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?D.LAYOUT_GROW_DIR.TOP:D.LAYOUT_GROW_DIR.BOTTOM:a=s.layerIndex===1?D.LAYOUT_GROW_DIR.BOTTOM:D.LAYOUT_GROW_DIR.TOP,a===D.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}beforeChange(){this.isFishbone2()&&(this.root.nodeData.data.shape=D.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}}const bh="smm-node-edit-wrap";class gp{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.hasBodyMousedown=!1,this.textNodePaddingX=5,this.textNodePaddingY=3,this.isNeedUpdateTextEditNode=!1,this.mindMap.addEditNodeClass(bh),this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(e,t,n)=>{this.show({node:e,e:t,isInserting:n})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_mousedown",()=>{this.hasBodyMousedown=!0}),this.mindMap.on("body_click",()=>{this.hasBodyMousedown&&(this.hasBodyMousedown=!1,this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox())}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===D.MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()}),this.mindMap.on("after_update_config",(e,t)=>{e.openRealtimeRenderOnNodeTextEdit!==t.openRealtimeRenderOnNodeTextEdit&&(this.mindMap.richText?this.mindMap.richText.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e.openRealtimeRenderOnNodeTextEdit):this.onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e.openRealtimeRenderOnNodeTextEdit)),e.enableAutoEnterTextEditWhenKeydown!==t.enableAutoEnterTextEditWhenKeydown&&window[e.enableAutoEnterTextEditWhenKeydown?"addEventListener":"removeEventListener"]("keydown",this.onKeydown)}),this.mindMap.on("afterExecCommand",()=>{this.isShowTextEdit()&&(this.isNeedUpdateTextEditNode=!0)}),this.mindMap.on("node_tree_render_end",()=>{this.isShowTextEdit()&&this.isNeedUpdateTextEditNode&&(this.isNeedUpdateTextEditNode=!1,this.updateTextEditNode())})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){if(e.target!==document.body)return;const t=this.mindMap.renderer.activeNodeList;if(t.length<=0||t.length>1)return;const n=t[0];n&&this.checkIsAutoEnterTextEditKey(e)&&(e.preventDefault(),this.show({node:n,e,isInserting:!1,isFromKeyDown:!0}))}checkIsAutoEnterTextEditKey(e){const t=e.keyCode;return(t===229||t>=65&&t<=90||t>=48&&t<=57)&&!this.mindMap.keyCommand.hasCombinationKey(e)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}isShowTextEdit(){return this.mindMap.richText?this.mindMap.richText.showTextEdit:this.showTextEdit}setIsShowTextEdit(e){this.showTextEdit=e,e?this.mindMap.keyCommand.stopCheckInSvg():this.mindMap.keyCommand.recoveryCheckInSvg()}async show({node:e,isInserting:t=!1,isFromKeyDown:n=!1,isFromScale:r=!1}){if(e.isUseCustomNodeContent())return;this.getCurrentEditNode()&&this.hideEditTextBox();const{beforeTextEdit:a,openRealtimeRenderOnNodeTextEdit:o}=this.mindMap.opt;if(typeof a=="function"){let m=!1;try{m=await a(e,t)}catch(v){m=!1,this.mindMap.opt.errorHandler(er.BEFORE_TEXT_EDIT_ERROR,v)}if(!m)return}const{offsetLeft:l,offsetTop:h}=v2(this.mindMap,e);this.mindMap.view.translateXY(l,h);const c=e._textData.node;o&&c.show();const d=c.node.getBoundingClientRect();o&&c.hide();const f={node:e,rect:d,isInserting:t,isFromKeyDown:n,isFromScale:r};if(this.mindMap.richText){this.mindMap.richText.showEditText(f);return}this.currentNode=e,this.showEditTextBox(f)}onOpenRealtimeRenderOnNodeTextEditConfigUpdate(e){this.textEditNode&&(this.textEditNode.style.background=e?"transparent":this.currentNode?this.getBackground(this.currentNode):"",this.textEditNode.style.boxShadow=e?"none":"0 0 20px rgba(0,0,0,.5)")}onScale(){const e=this.getCurrentEditNode();e&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.setIsShowTextEdit(!1)),this.show({node:e,isFromScale:!0}))}showEditTextBox({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:s}){if(this.showTextEdit)return;const{nodeTextEditZIndex:a,textAutoWrapWidth:o,selectTextOnEnterEditText:l,openRealtimeRenderOnNodeTextEdit:h,autoEmptyTextWhenKeydownEnterEdit:c}=this.mindMap.opt;s||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),this.textEditNode||(this.textEditNode=document.createElement("div"),this.textEditNode.classList.add(bh),this.textEditNode.style.cssText=`
|
|
245
|
+
position: fixed;
|
|
246
|
+
box-sizing: border-box;
|
|
247
|
+
${h?"":"box-shadow: 0 0 20px rgba(0,0,0,.5);"}
|
|
248
|
+
padding: ${this.textNodePaddingY}px ${this.textNodePaddingX}px;
|
|
249
|
+
margin-left: -${this.textNodePaddingX}px;
|
|
250
|
+
margin-top: -${this.textNodePaddingY}px;
|
|
251
|
+
outline: none;
|
|
252
|
+
word-break: break-all;
|
|
253
|
+
line-break: anywhere;
|
|
254
|
+
`,this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("click",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("mousedown",x=>{x.stopPropagation()}),this.textEditNode.addEventListener("keydown",x=>{this.checkIsAutoEnterTextEditKey(x)&&x.stopPropagation()}),this.textEditNode.addEventListener("paste",x=>{const w=x.clipboardData.getData("text"),{isSmm:N,data:M}=p0(w);N&&M[0]&&M[0].data?rh(x,Td(M[0].data.text)):rh(x),this.emitTextChangeEvent()}),this.textEditNode.addEventListener("input",()=>{this.emitTextChangeEvent()}),(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.textEditNode));const d=this.mindMap.view.scale,f=e.style.merge("fontSize"),m=(this.cacheEditingText||e.getData("text")).split(/\n/gim).map(g=>$a(g)),v=e._textData.node.attr("data-ismultiLine")==="true";e.style.domText(this.textEditNode,d),h||(this.textEditNode.style.background=this.getBackground(e)),this.textEditNode.style.zIndex=a,r&&c?this.textEditNode.innerHTML="":this.textEditNode.innerHTML=m.join("<br>"),this.textEditNode.style.minWidth=t.width+this.textNodePaddingX*2+"px",this.textEditNode.style.minHeight=t.height+"px",this.textEditNode.style.left=Math.floor(t.left)+"px",this.textEditNode.style.top=Math.floor(t.top)+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=o*d+"px",v?(this.textEditNode.style.lineHeight=ka,this.textEditNode.style.transform=`translateY(${(ka-1)*f/2*d}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),n||l&&!r?_2(this.textEditNode):A2(this.textEditNode),this.cacheEditingText=""}emitTextChangeEvent(){this.mindMap.emit("node_text_edit_change",{node:this.currentNode,text:this.getEditText(),richText:!1})}updateTextEditNode(){if(this.mindMap.richText){this.mindMap.richText.updateTextEditNode();return}if(!this.showTextEdit||!this.currentNode)return;const e=this.currentNode._textData.node.node.getBoundingClientRect();this.textEditNode.style.minWidth=e.width+this.textNodePaddingX*2+"px",this.textEditNode.style.minHeight=e.height+this.textNodePaddingY*2+"px",this.textEditNode.style.left=Math.floor(e.left)+"px",this.textEditNode.style.top=Math.floor(e.top)+"px"}getBackground(e){if(e.style.merge("gradientStyle")){const n=e.style.merge("startColor"),r=e.style.merge("endColor");return`linear-gradient(to right, ${n}, ${r})`}else{const n=e.style.merge("fillColor"),r=e.style.merge("color");return n==="transparent"?Ed(r)?T2(this.mindMap.themeConfig):"#fff":n}}removeTextEditEl(){if(this.mindMap.richText){this.mindMap.richText.removeTextEditEl();return}if(!this.textEditNode)return;(this.mindMap.opt.customInnerElsAppendTo||document.body).removeChild(this.textEditNode)}getEditText(){return u2(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.mindMap.richText)return this.mindMap.richText.hideEditText();if(!this.showTextEdit)return;const e=this.currentNode,t=this.getEditText();this.currentNode=null,this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.setIsShowTextEdit(!1),this.mindMap.execCommand("SET_NODE_TEXT",e,t),this.mindMap.render(),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList,e)}getCurrentEditNode(){return this.mindMap.richText?this.mindMap.richText.node:this.currentNode}}const kh={[D.LAYOUT.LOGICAL_STRUCTURE]:xh,[D.LAYOUT.LOGICAL_STRUCTURE_LEFT]:xh,[D.LAYOUT.MIND_MAP]:fp,[D.LAYOUT.CATALOG_ORGANIZATION]:pp,[D.LAYOUT.ORGANIZATION_STRUCTURE]:mp,[D.LAYOUT.TIMELINE]:yh,[D.LAYOUT.TIMELINE2]:yh,[D.LAYOUT.VERTICAL_TIMELINE]:yo,[D.LAYOUT.VERTICAL_TIMELINE2]:yo,[D.LAYOUT.VERTICAL_TIMELINE3]:yo,[D.LAYOUT.FISHBONE]:wh,[D.LAYOUT.FISHBONE2]:wh};class vp{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?Ea({},this.mindMap.opt.data):null,this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.nodeCache={},this.lastNodeCache={},this.renderSourceList=[],this.renderCallbackList=[],this.activeNodeList=[],this.emitNodeActiveEventTimer=null,this.renderTimer=null,this.root=null,this.textEdit=new gp(this),this.beingCopyData=null,this.highlightBoxNode=null,this.highlightBoxNodeStyle=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout&&this.layout.beforeChange&&this.layout.beforeChange();const{layout:e}=this.mindMap.opt;let t=kh[e]||this.mindMap[e];t||(t=kh[D.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=D.LAYOUT.LOGICAL_STRUCTURE),this.layout=new t(this,e)}setData(e){this.renderTree=e||null}bindEvent(){const{openPerformance:e,performanceConfig:t,openRealtimeRenderOnNodeTextEdit:n}=this.mindMap.opt;this.mindMap.on("draw_click",s=>{this.clearActiveNodeListOnDrawClick(s,"click")}),this.mindMap.on("contextmenu",s=>{this.clearActiveNodeListOnDrawClick(s,"contextmenu")}),this.mindMap.svg.on("dblclick",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});const r=Ua(()=>{this.renderTree&&this.root&&(this.mindMap.emit("node_tree_render_start"),this.root.render(()=>{this.mindMap.emit("node_tree_render_end")},!1,!0))},t.time);e&&this.mindMap.on("view_data_change",r),this.onNodeTextEditChange=p2(this.onNodeTextEditChange,100,this),n&&this.mindMap.on("node_text_edit_change",this.onNodeTextEditChange),this.mindMap.on("after_update_config",(s,a)=>{s.openPerformance!==a.openPerformance&&(this.mindMap[s.openPerformance?"on":"off"]("view_data_change",r),this.forceLoadNode()),s.openRealtimeRenderOnNodeTextEdit!==a.openRealtimeRenderOnNodeTextEdit&&this.mindMap[s.openRealtimeRenderOnNodeTextEdit?"on":"off"]("node_text_edit_change",this.onNodeTextEditChange)})}onNodeTextEditChange({node:e,text:t}){e._textData=e.createTextNode(t);const{width:n,height:r}=e.getNodeRect();e.width=n,e.height=r,e.layout(),this.mindMap.render(()=>{this.textEdit.updateTextEditNode()})}forceLoadNode(e){e=e||this.root,e&&(this.mindMap.emit("node_tree_render_start"),e.render(()=>{this.mindMap.emit("node_tree_render_end")},!0))}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.moveUpOneLevel=this.moveUpOneLevel.bind(this),this.mindMap.command.add("MOVE_UP_ONE_LEVEL",this.moveUpOneLevel),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeAttachment=this.setNodeAttachment.bind(this),this.mindMap.command.add("SET_NODE_ATTACHMENT",this.setNodeAttachment),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode),this.removeCustomStyles=this.removeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_CUSTOM_STYLES",this.removeCustomStyles),this.removeAllNodeCustomStyles=this.removeAllNodeCustomStyles.bind(this),this.mindMap.command.add("REMOVE_ALL_NODE_CUSTOM_STYLES",this.removeAllNodeCustomStyles)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Insert",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT")}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.paste()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(e=null,t=[...this.activeNodeList]){I2(this.lastActiveNodeList,t)||(this.lastActiveNodeList=[...t],clearTimeout(this.emitNodeActiveEventTimer),this.emitNodeActiveEventTimer=setTimeout(()=>{this.mindMap.emit("node_active",e,t)},0))}clearActiveNodeListOnDrawClick(e,t){if(this.activeNodeList.length<=0)return;let n=!0;const{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(t==="contextmenu"?!r:r){const s=this.mindMap.event.mousedownPos;n=Math.abs(e.clientX-s.x)<=5&&Math.abs(e.clientY-s.y)<=5}n&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}clearCache(){this.layout.lru.clear(),this.nodeCache={},this.lastNodeCache={}}addRenderParams(e,t){e&&this.renderCallbackList.findIndex(r=>r===e)===-1&&this.renderCallbackList.push(e),t&&this.renderSourceList.findIndex(r=>r===t)===-1&&this.renderSourceList.push(t)}checkHasRenderSource(e){e=Array.isArray(e)?e:[e];for(let t=0;t<this.renderSourceList.length;t++)if(e.includes(this.renderSourceList[t]))return!0;return!1}onRenderEnd(){this.renderCallbackList.forEach(e=>{e()}),this.isRendering=!1,this.reRender=!1,this.renderCallbackList=[],this.renderSourceList=[],this.mindMap.emit("node_tree_render_end")}render(e,t){this.addRenderParams(e,t),clearTimeout(this.renderTimer),this.renderTimer=setTimeout(()=>{this._render()},0)}_render(){if(this.checkHasRenderSource(D.CHANGE_THEME)&&this.resetUnExpandNodeStyle(),this.isRendering){this.hasWaitRendering=!0;return}if(this.isRendering=!0,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),!this.renderTree){this.onRenderEnd();return}this.mindMap.emit("node_tree_render_start"),this.root=null,this.layout.doLayout(e=>{Object.keys(this.lastNodeCache).forEach(t=>{this.nodeCache[t]||(this.removeNodeFromActiveList(this.lastNodeCache[t]),this.emitNodeActiveEvent(),this.lastNodeCache[t].destroy())}),this.root=e,this.root.render(()=>{if(this.isRendering=!1,this.hasWaitRendering){this.hasWaitRendering=!1,this.render();return}this.onRenderEnd()})}),this.emitNodeActiveEvent()}resetUnExpandNodeStyle(){this.renderTree&&Be(this.renderTree,null,e=>{if(!e.data.expand)return Be(e,null,t=>{t.data.needUpdate=!0}),!0})}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}),this.activeNodeList=[]}addNodeToActiveList(e,t=!1){if(this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&e.userList.length>0)return;this.findActiveNodeIndex(e)===-1&&(t||this.mindMap.emit("before_node_active",e,this.activeNodeList),this.mindMap.execCommand("SET_NODE_ACTIVE",e,!0),this.activeNodeList.push(e))}removeNodeFromActiveList(e){let t=this.findActiveNodeIndex(e);t!==-1&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),this.activeNodeList.splice(t,1))}activeMultiNode(e=[]){e.forEach(t=>{this.mindMap.emit("before_node_active",t,this.activeNodeList),this.addNodeToActiveList(t,!0),this.emitNodeActiveEvent(t)})}cancelActiveMultiNode(e=[]){e.forEach(t=>{this.removeNodeFromActiveList(t),this.emitNodeActiveEvent(null)})}findActiveNodeIndex(e){return Ct(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Be(this.root,null,e=>{e.getData("isActive")||this.addNodeToActiveList(e),e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach(t=>{const n=t.generalizationNode;n.getData("isActive")||this.addNodeToActiveList(n)})},null,!0,0,0),this.emitNodeActiveEvent())}back(e){this.backForward("back",e)}forward(e){this.backForward("forward",e)}backForward(e,t){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const n=this.mindMap.command[e](t);n&&(this.renderTree=n,this.mindMap.render()),this.mindMap.emit("data_change",n)}getNewNodeBehavior(e=!1,t=!1){const{createNewNodeBehavior:n}=this.mindMap.opt;let r=!1,s=!1;switch(n){case D.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,s=t?!1:e;break;case D.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,s=!1;break;case D.CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:r=!0,s=!1;break}return{focusNewNode:r,inserting:s}}insertNode(e=!0,t=[],n=null,r=[]){if(t=ki(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,l=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:c,inserting:d}=this.getNewNodeBehavior(e,l),f={expand:!0,richText:h,isActive:c};h&&(f.resetRichText=!0),r=ta(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization||g.isRoot)return;r=Ri(r);const x=g.parent,N=g.layerIndex===1?s:a,M=us(g);m&&f.resetRichText&&delete f.resetRichText;const z={inserting:d,data:{text:N,...f,uid:$i(),...n||{}},children:[...ds(r,v)]};v=!0,x.nodeData.children.splice(M+1,0,z)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0||(e=ki(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:s};r&&(a.resetRichText=!0),t=ta(t,a);let o=!1;n.forEach(l=>{if(l.isGeneralization||l.isRoot)return;t=Ri(t);const h=l.parent,c=us(l),d=ds(t,o);o=!0,h.nodeData.children.splice(c+1,0,...d)}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(e=!0,t=[],n=null,r=[]){if(t=ki(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:s,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,l=o.length>1,h=this.hasRichTextPlugin(),{focusNewNode:c,inserting:d}=this.getNewNodeBehavior(e,l),f={expand:!0,richText:h,isActive:c};h&&(f.resetRichText=!0),r=ta(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization)return;r=Ri(r),g.nodeData.children||(g.nodeData.children=[]);const x=g.isRoot?s:a;m&&f.resetRichText&&delete f.resetRichText;const w={inserting:d,data:{text:x,uid:$i(),...f,...n||{}},children:[...ds(r,v)]};v=!0,g.nodeData.children.push(w),g.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0||(e=ki(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:s}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:s};r&&(a.resetRichText=!0),t=ta(t,a);let o=!1;n.forEach(l=>{l.isGeneralization||(t=Ri(t),l.nodeData.children||(l.nodeData.children=[]),t=ds(t,o),o=!0,l.nodeData.children.push(...t),l.setData({expand:!0}))}),s&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(e=!0,t,n){if(t=ki(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:r,defaultInsertBelowSecondLevelNodeText:s}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,o=a.length>1,l=this.hasRichTextPlugin(),{focusNewNode:h,inserting:c}=this.getNewNodeBehavior(e,o),d={expand:!0,richText:l,isActive:h};l&&(d.resetRichText=!0);const f=n&&n.richText;a.forEach(m=>{if(m.isGeneralization||m.isRoot)return;const v=m.layerIndex===1?r:s;f&&d.resetRichText&&delete d.resetRichText;const g={inserting:c,data:{text:v,uid:$i(),...d,...n||{}},children:[m.nodeData]},x=m.parent,w=us(m);x.nodeData.children.splice(w,1,g)}),h&&this.clearActiveNodeList(),this.mindMap.render()}upNode(e){if(this.activeNodeList.length<=0&&!e)return;const n=(e?[e]:this.activeNodeList)[0];if(n.isRoot)return;let r=n.parent,s=r.children,a=Ct(n,s);if(a===-1||a===0)return;let o=a-1;s.splice(a,1),s.splice(o,0,n),r.nodeData.children.splice(a,1),r.nodeData.children.splice(o,0,n.nodeData),this.mindMap.render()}downNode(e){if(this.activeNodeList.length<=0&&!e)return;const n=(e?[e]:this.activeNodeList)[0];if(n.isRoot)return;let r=n.parent,s=r.children,a=Ct(n,s);if(a===-1||a===s.length-1)return;let o=a+1;s.splice(a,1),s.splice(o,0,n),r.nodeData.children.splice(a,1),r.nodeData.children.splice(o,0,n.nodeData),this.mindMap.render()}moveUpOneLevel(e){if(e=e||this.activeNodeList[0],!e||e.isRoot||e.layerIndex<=1)return;const t=e.parent,n=t.parent,r=Ct(e,t.children),s=Ct(t,n.children);t.nodeData.children.splice(r,1),n.nodeData.children.splice(s+1,0,e.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(e){let t=!1;return Object.keys(e).forEach(n=>{d0(n)&&(t=!0,delete e[n])}),this.hasRichTextPlugin()&&(t=!0,e.resetRichText=!0),t}removeCustomStyles(e){if(e=e||this.activeNodeList[0],!e)return;this._handleRemoveCustomStyles(e.getData())&&this.reRenderNodeCheckChange(e)}removeAllNodeCustomStyles(e){e=ki(e);let t=!1;if(e.length>0)e.forEach(n=>{this._handleRemoveCustomStyles(n.getData())&&(t=!0)});else{if(!this.renderTree)return;Be(this.renderTree,null,n=>{this._handleRemoveCustomStyles(n.data)&&(t=!0);const s=Ms(n.data);s.length>0&&s.forEach(a=>{this._handleRemoveCustomStyles(a)&&(t=!0)})})}t&&this.mindMap.reRender()}copy(){this.beingCopyData=this.copyNode(),this.beingCopyData&&(this.mindMap.opt.disabledClipboard||ih(nh(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,this.mindMap.opt.disabledClipboard||ih(nh(e))})}handlePaste(e){const{disabledClipboard:t}=this.mindMap.opt;if(t)return;const n=e.clipboardData||e.originalEvent.clipboardData,r=n.items;Array.from(r).forEach(s=>{s.type.indexOf("image")>-1&&s.getAsFile(),s.type.indexOf("text")>-1&&n.getData("text")}),this.paste()}async paste(){const{errorHandler:e,handleIsSplitByWrapOnPasteCreateNewNode:t,handleNodePasteImg:n,disabledClipboard:r,onlyPasteTextWhenHasImgAndText:s}=this.mindMap.opt;if(!r&&zd())try{const a=await D2();let o=a.text||"",l=a.img||null;if(o){let h=null,c=!0;if(this.mindMap.opt.customHandleClipboardText)try{const d=await this.mindMap.opt.customHandleClipboardText(o);if(!Nn(d)){c=!1;const f=p0(d);f.isSmm?h=f.data:o=f.data}}catch(d){e(er.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,d)}if(c){const d=p0(o);d.isSmm?h=d.data:o=d.data}if(h)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(h)?h:[h]);else{this.hasRichTextPlugin()&&(o=$a(o));const d=o.split(new RegExp(`\r?
|
|
255
|
+
|(?<!
|
|
256
|
+
)\r`,"g")).filter(f=>!!f);d.length>1&&t?t().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],d.map(f=>({data:{text:f},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:o})}}if(l&&(!o||!s))try{let h=null;n&&typeof n=="function"?h=await n(l):h=await y2(l),this.activeNodeList.length>0&&this.activeNodeList.forEach(c=>{this.mindMap.execCommand("SET_NODE_IMAGE",c,{url:h.url,title:"",width:h.size.width,height:h.size.height})})}catch(h){e(er.LOAD_CLIPBOARD_IMAGE_ERROR,h)}}catch(a){e(er.READ_CLIPBOARD_ERROR,a)}else this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}insertBefore(e,t){this.insertTo(e,t,"before")}insertAfter(e,t){this.insertTo(e,t,"after")}insertTo(e,t,n="before"){let r=ki(e);r=r.filter(s=>!s.isRoot),n==="after"&&r.reverse(),r.forEach(s=>{let a=s.parent,o=a.children,l=Ct(s,o);if(l===-1)return;o.splice(l,1),a.nodeData.children.splice(l,1);let h=t.parent,c=h.children,d=Ct(t,c);d!==-1&&(n==="after"&&d++,c.splice(d,0,s),h.nodeData.children.splice(d,0,s.nodeData))}),this.mindMap.render()}removeNode(e=[]){if(e=ki(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=null,n=e.length>0,r=n?e:this.activeNodeList,s=r.find(a=>a.isRoot);if(s)this.clearActiveNodeList(),s.children=[],s.nodeData.children=[];else{t=this.getNextActiveNode(r);for(let a=0;a<r.length;a++){const o=r[a],l=this.textEdit.getCurrentEditNode();l&&l.getData("uid")===o.getData("uid")&&this.textEdit.hideEditTextBox(),n&&r.splice(a,1),o.isGeneralization?(this.deleteNodeGeneralization(o),this.removeNodeFromActiveList(o),a--):(this.removeNodeFromActiveList(o),xo(o),a--)}}this.activeNodeList=[],t&&this.addNodeToActiveList(t),this.emitNodeActiveEvent(),this.mindMap.render()}deleteNodeGeneralization(e){const t=e.generalizationBelongNode,n=t.getGeneralizationNodeIndex(e);let r=t.getData("generalization");Array.isArray(r)?r.splice(n,1):r=null,this.mindMap.execCommand("SET_NODE_DATA",t,{generalization:r}),this.closeHighlightNode()}removeCurrentNode(e=[]){if(e=ki(e),this.activeNodeList.length<=0&&e.length<=0)return;let n=e.length>0?e:this.activeNodeList;n=n.filter(s=>!s.isRoot);let r=this.getNextActiveNode(n);for(let s=0;s<n.length;s++){let a=n[s];if(a.isGeneralization)this.deleteNodeGeneralization(a);else{const o=a.parent,l=us(a);o.nodeData.children.splice(l,1,...a.nodeData.children||[])}}this.activeNodeList=[],r&&this.addNodeToActiveList(r),this.emitNodeActiveEvent(),this.mindMap.render()}getNextActiveNode(e){if(e.length!==1||this.findActiveNodeIndex(e[0])===-1)return null;let t=null;if(this.activeNodeList.length===1&&!this.activeNodeList[0].isGeneralization&&this.mindMap.opt.deleteNodeActive){const n=this.activeNodeList[0],r=n.parent.children,s=Ct(n,r);s<r.length-1?t=r[s+1]:s>0?t=r[s-1]:t=n.parent}return t}copyNode(){if(this.activeNodeList.length<=0)return null;let e=u0(this.activeNodeList);return e=g0(e),e.map(t=>Es({},t,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;let t=u0(this.activeNodeList).filter(r=>!r.isRoot);t=g0(t);const n=t.map(r=>Es({},r,!0));t.forEach(r=>{xo(r)}),this.clearActiveNodeList(),this.mindMap.render(),e&&typeof e=="function"&&e(n)}moveNodeTo(e,t){let n=ki(e);n=n.filter(r=>!r.isRoot),n.forEach(r=>{this.removeNodeFromActiveList(r),xo(r),t.setData({expand:!0}),t.nodeData.children.push(r.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=ki(e),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e)}setNodeStyle(e,t,n){const r={[t]:n};this.setNodeDataRender(e,r),c0.includes(t)&&(e.parent||e).renderLine(!0)}setNodeStyles(e,t){const n={...t};this.setNodeDataRender(e,n);let r=Object.keys(t),s=!1;r.forEach(a=>{c0.includes(a)&&(s=!0)}),s&&(e.parent||e).renderLine(!0)}setNodeActive(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{isActive:t}),e.updateNodeByActive(t)}setNodeExpand(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{expand:t}),this.mindMap.render()}expandAllNode(e=""){if(!this.renderTree)return;const t=(n,r)=>{!r&&n.data.uid===e&&(r=!0),r&&!n.data.expand&&(n.data.expand=!0),n.children&&n.children.length>0&&n.children.forEach(s=>{t(s,r)})};t(this.renderTree,!e),this.mindMap.render()}unexpandAllNode(e=!0,t=""){if(!this.renderTree)return;const n=(r,s,a)=>{!a&&r.data.uid===t&&(a=!0),a&&!s&&r.children&&r.children.length>0&&(r.data.expand=!1),r.children&&r.children.length>0&&r.children.forEach(o=>{n(o,!1,a)})};n(this.renderTree,!0,!t),this.mindMap.render(()=>{e&&this.setRootNodeCenter()})}expandToLevel(e){this.renderTree&&(Be(this.renderTree,null,(t,n,r,s)=>{s<e?t.data.expand=!0:!r&&t.children&&t.children.length>0&&(t.data.expand=!1)},null,!0,0,0),this.mindMap.render())}toggleActiveExpand(){this.activeNodeList.forEach(e=>{e.nodeData.children.length<=0||e.isRoot||this.toggleNodeExpand(e)})}toggleNodeExpand(e){this.mindMap.execCommand("SET_NODE_EXPAND",e,!e.getData("expand"))}setNodeText(e,t,n,r){n=n===void 0?e.getData("richText"):n,this.setNodeDataRender(e,{text:t,richText:n,resetRichText:r})}setNodeImage(e,t){const{url:n,title:r,width:s,height:a,custom:o=!1}=t||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(e,{image:n,imageTitle:r||"",imageSize:{width:s,height:a,custom:o}})}setNodeIcon(e,t){this.setNodeDataRender(e,{icon:t})}setNodeHyperlink(e,t,n=""){this.setNodeDataRender(e,{hyperlink:t,hyperlinkTitle:n})}setNodeNote(e,t){this.setNodeDataRender(e,{note:t})}setNodeAttachment(e,t,n=""){this.setNodeDataRender(e,{attachmentUrl:t,attachmentName:n})}setNodeTag(e,t){this.setNodeDataRender(e,{tag:t})}insertFormula(e,t=[]){if(!this.hasRichTextPlugin()||!this.mindMap.formula)return;t=ki(t),(t.length>0?t:this.activeNodeList).forEach(r=>{this.mindMap.formula.insertFormulaToNode(r,e)})}addGeneralization(e,t=!0){if(this.activeNodeList.length<=0)return;const n=this.activeNodeList.filter(c=>!c.isRoot&&!c.isGeneralization&&!c.checkHasSelfGeneralization()),r=N2(n);if(r.length<=0)return;const s=this.hasRichTextPlugin(),{focusNewNode:a,inserting:o}=this.getNewNodeBehavior(t,r.length>1);let l=!1;const h=e&&e.richText;r.forEach(c=>{const d={inserting:o,...e||{text:this.mindMap.opt.defaultGeneralizationText},range:c.range||null,uid:$i(),richText:s,isActive:a};s&&!h&&(d.resetRichText=s);let f=c.node.getData("generalization");if(f=f?Array.isArray(f)?f:[f]:[],c.range){if(!!f.find(v=>v.range&&v.range[0]===c.range[0]&&v.range[1]===c.range[1]))return;f.push(d)}else f.push(d);l=!0,this.mindMap.execCommand("SET_NODE_DATA",c.node,{generalization:f}),c.node.setData({expand:!0})}),l&&(a&&this.clearActiveNodeList(),this.mindMap.render(()=>{this.mindMap.render()}))}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(e=>{e.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(e,t=void 0,n=void 0){[e].forEach(s=>{this.mindMap.execCommand("SET_NODE_DATA",s,{customLeft:t,customTop:n})})}resetLayout(){Be(this.root,null,e=>{e.customLeft=void 0,e.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(e,t){if(!t||!$2.includes(t))return;[e].forEach(r=>{this.setNodeStyle(r,"shape",t)})}goTargetNode(e,t=()=>{}){let n=typeof e=="string"?e:e.getData("uid");n&&this.expandToNodeUid(n,()=>{let r=this.findNodeByUid(n);r&&(r.active(),this.moveNodeToCenter(r),t(r))})}setNodeData(e,t){Object.keys(t).forEach(n=>{e.nodeData.data[n]=t[n]})}setNodeDataRender(e,t,n=!1){if(this.mindMap.execCommand("SET_NODE_DATA",e,t),z2(t)){this.mindMap.emit("node_tree_render_end");return}this.reRenderNodeCheckChange(e,n)}reRenderNodeCheckChange(e,t){e.reRender()?t||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(e,t){let{resetScaleOnMoveNodeToCenter:n}=this.mindMap.opt;t!==void 0&&(n=t);let{transform:r,state:s}=this.mindMap.view.getTransformData(),{left:a,top:o,width:l,height:h}=e;n||(a*=r.scaleX,o*=r.scaleY,l*=r.scaleX,h*=r.scaleY);let c=this.mindMap.width/2,d=this.mindMap.height/2,f=a+l/2,m=o+h/2,v=c-s.x,g=d-s.y,x=v-f,w=g-m;this.mindMap.view.translateX(x),this.mindMap.view.translateY(w),n&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(e,t=()=>{}){if(!this.renderTree){t();return}let n=[],r=!1;const s={};Lr(this.renderTree,(o,l)=>{if(o.data.uid===e)return n=l?[...s[l.data.uid],l]:[],"stop";if(Ms(o.data).forEach(c=>{c.uid===e&&(n=l?[...s[l.data.uid],l,o]:[],r=!0)}),r)return"stop";s[o.data.uid]=l?[...s[l.data.uid],l]:[]});let a=!1;if(n.forEach(o=>{o.data.expand||(a=!0,o.data.expand=!0)}),r){const o=n[n.length-1];o&&Be(o,null,l=>{l.data.expand||(a=!0,l.data.expand=!0)})}a?this.mindMap.render(t):t()}findNodeByUid(e){if(!this.root)return;let t=null;return Be(this.root,null,n=>{if(n.getData("uid")===e)return t=n,!0;let r=!1;if((n._generalizationList||[]).forEach(s=>{s.generalizationNode.getData("uid")===e&&(t=s.generalizationNode,r=!0)}),r)return!0}),t}highlightNode(e,t,n){if(this.isRendering)return;n={stroke:"rgb(94, 200, 248)",fill:"transparent",...n||{}},this.highlightBoxNode?this.highlightBoxNodeStyle&&(this.highlightBoxNodeStyle.stroke!==n.stroke||this.highlightBoxNodeStyle.fill!==n.fill)&&this.highlightBoxNode.stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}):this.highlightBoxNode=new lr().stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}),this.highlightBoxNodeStyle={...n};let r=1/0,s=1/0,a=-1/0,o=-1/0;t?e.children.slice(t[0],t[1]+1).forEach(h=>{h.left<r&&(r=h.left),h.top<s&&(s=h.top);const c=h.left+h.width,d=h.top+h.height;c>a&&(a=c),d>o&&(o=d)}):(r=e.left,s=e.top,a=e.left+e.width,o=e.top+e.height),this.highlightBoxNode.plot([[r,s],[a,s],[a,o],[r,o]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}}const ir={default:wd},fl={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let i=0;i<=9;i++)fl[i]=i+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((i,e)=>{fl[i]=e+65});const Di=fl;class xp{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.isStopCheckInSvg=!1,this.defaultEnableCheck=this.defaultEnableCheck.bind(this),this.bindEvent()}extendKeyMap(e,t){Di[e]=t}removeKeyMap(e){typeof Di[e]<"u"&&delete Di[e]}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){Object.keys(this.shortcutMapCache).length>0||(this.shortcutMapCache=this.shortcutMap,this.shortcutMap={})}restore(){Object.keys(this.shortcutMapCache).length<=0||(this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={})}stopCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:e}=this.mindMap.opt;e&&(this.isStopCheckInSvg=!0)}recoveryCheckInSvg(){const{enableShortcutOnlyWhenMouseInSvg:e}=this.mindMap.opt;e&&(this.isStopCheckInSvg=!0)}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.isInSvg=!1}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}defaultEnableCheck(e){const t=e.target;if(t===document.body)return!0;for(let n=0;n<this.mindMap.editNodeClassList.length;n++){const r=this.mindMap.editNodeClassList[n];if(t.classList.contains(r))return!0}return!1}onKeydown(e){const{enableShortcutOnlyWhenMouseInSvg:t,beforeShortcutRun:n,customCheckEnableShortcut:r}=this.mindMap.opt;(typeof r=="function"?r:this.defaultEnableCheck)(e)&&(this.isPause||t&&!this.isStopCheckInSvg&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(a=>{if(this.checkKey(e,a)){if(this.checkKey(e,"Control+v")||(e.stopPropagation(),e.preventDefault()),typeof n=="function"&&n(a,[...this.mindMap.renderer.activeNodeList]))return;this.shortcutMap[a].forEach(o=>{o()})}}))}checkKey(e,t){let n=this.getOriginEventCodeArr(e),r=this.getKeyCodeArr(t);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){let a=r.findIndex(o=>o===n[s]);if(a===-1)return!1;r.splice(a,1)}return!0}getOriginEventCodeArr(e){let t=[];return(e.ctrlKey||e.metaKey)&&t.push(Di.Control),e.altKey&&t.push(Di.Alt),e.shiftKey&&t.push(Di.Shift),t.includes(e.keyCode)||t.push(e.keyCode),t}hasCombinationKey(e){return e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}getKeyCodeArr(e){let t=e.split(/\s*\+\s*/),n=[];return t.forEach(r=>{n.push(Di[r])}),n}addShortcut(e,t){e.split(/\s*\|\s*/).forEach(n=>{this.shortcutMap[n]?this.shortcutMap[n].push(t):this.shortcutMap[n]=[t]})}removeShortcut(e,t){e.split(/\s*\|\s*/).forEach(n=>{if(this.shortcutMap[n])if(t){let r=this.shortcutMap[n].findIndex(s=>s===t);r!==-1&&this.shortcutMap[n].splice(r,1)}else this.shortcutMap[n]=[],delete this.shortcutMap[n]})}getShortcutFn(e){let t=[];return e.split(/\s*\|\s*/).forEach(n=>{t=this.shortcutMap[n]||[]}),t}}const yp="0.14.0",wp={version:yp};class bp{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.originAddHistory=this.addHistory.bind(this),this.addHistory=Ua(this.addHistory,this.mindMap.opt.addHistoryTime,this),this.isPause=!1}pause(){this.isPause=!0}recovery(){this.isPause=!1}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(e,...t){if(this.commands[e]){if(this.commands[e].forEach(n=>{n(...t)}),this.mindMap.emit("afterExecCommand",e,...t),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(e))return;this.addHistory()}}add(e,t){this.commands[e]?this.commands[e].push(t):this.commands[e]=[t]}remove(e,t){if(this.commands[e])if(!t)this.commands[e]=[],delete this.commands[e];else{let n=this.commands[e].find(r=>r===t);n!==-1&&this.commands[e].splice(n,1)}}addHistory(){if(this.mindMap.opt.readonly||this.isPause)return;this.mindMap.emit("beforeAddHistory");const e=this.history.length>0?this.history[this.activeHistoryIndex]:null,t=this.getCopyData(),n=JSON.stringify(t);e&&e===n||(this.emitDataUpdatesEvent(e,n),this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(n),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",t),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length))}back(e=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-e>=0){const t=this.history[this.activeHistoryIndex];this.activeHistoryIndex-=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const n=this.history[this.activeHistoryIndex],r=JSON.parse(n);return this.emitDataUpdatesEvent(t,n),r}}forward(e=1){if(this.mindMap.opt.readonly)return;let t=this.history.length;if(this.activeHistoryIndex+e<=t-1){const n=this.history[this.activeHistoryIndex];this.activeHistoryIndex+=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);const r=this.history[this.activeHistoryIndex],s=JSON.parse(r);return this.emitDataUpdatesEvent(n,r),s}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;const e=kd({},this.mindMap.renderer.renderTree,!0);return e.smmVersion=wp.version,e}removeDataUid(e){e=Ri(e);let t=n=>{delete n.data.uid,n.children&&n.children.length>0&&n.children.forEach(r=>{t(r)})};return t(e),e}emitDataUpdatesEvent(e,t){try{const n="data_change_detail";if(this.mindMap.event.listenerCount(n)>0&&e&&t){const s=JSON.parse(e),a=JSON.parse(t),o=Ri(sh(s)),l=Ri(sh(a)),h=[],c=(d,f)=>(d.children&&d.children.length>0&&d.children.forEach((m,v)=>{d.children[v]=typeof m=="string"?f[m]:f[m.data.uid],c(d.children[v],f)}),d);Object.keys(l).forEach(d=>{o[d]?f0(o[d],l[d])||h.push({action:"update",oldData:c(o[d],o),data:c(l[d],l)}):h.push({action:"create",data:c(l[d],l)})}),Object.keys(o).forEach(d=>{l[d]||h.push({action:"delete",data:c(o[d],o)})}),this.mindMap.emit(n,h)}}catch(n){this.mindMap.opt.errorHandler(er.DATA_CHANGE_DETAIL_EVENT_ERROR,n)}}}class kp{constructor(){this.has={},this.queue=[],this.nextTick=g2(this.flush,this)}push(e,t){if(this.has[e]){this.replaceTask(e,t);return}this.has[e]=!0,this.queue.push({name:e,fn:t}),this.nextTick()}replaceTask(e,t){const n=this.queue.findIndex(r=>r.name===e);n!==-1&&(this.queue[n]={name:e,fn:t})}flush(){let e=this.queue.slice(0);this.queue=[],e.forEach(({name:t,fn:n})=>{this.has[t]=!1,n()})}}const Th={el:null,data:null,viewData:null,readonly:!1,layout:D.LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,translateRatio:1,minZoomRatio:20,maxZoomRatio:400,customCheckIsTouchPad:null,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,customNoteContentShow:null,textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:D.MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:null,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,customCheckEnableShortcut:null,initRootNodePosition:null,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:500,alwaysShowExpandBtn:!1,notShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!1,autoEmptyTextWhenKeydownEnterEdit:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,errorHandler:(i,e)=>{console.error(i,e)},enableDblclickBackToRootNode:!1,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,fit:!1,tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},onlyOneEnableActiveNodeOnCooperate:!1,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,createNewNodeBehavior:D.CREATE_NEW_NODE_BEHAVIOR.DEFAULT,defaultNodeImage:"",isLimitMindMapInCanvas:!1,handleNodePasteImg:null,customCreateNodePath:null,customCreateNodePolygon:null,customTransformNodeLinePath:null,beforeShortcutRun:null,resetScaleOnMoveNodeToCenter:!1,createNodePrefixContent:null,createNodePostfixContent:null,disabledClipboard:!1,customHyperlinkJump:null,openPerformance:!1,performanceConfig:{time:250,padding:100,removeNodeWhenOutCanvas:!0},emptyTextMeasureHeightText:"abc123我和你",openRealtimeRenderOnNodeTextEdit:!1,mousedownEventPreventDefault:!1,onlyPasteTextWhenHasImgAndText:!0,enableDragModifyNodeWidth:!0,minNodeTextModifyWidth:20,maxNodeTextModifyWidth:-1,customHandleLine:null,addHistoryOnInit:!0,noteIcon:{icon:"",style:{}},hyperlinkIcon:{icon:"",style:{}},attachmentIcon:{icon:"",style:{}},isShowCreateChildBtnIcon:!0,quickCreateChildBtnIcon:{icon:"",style:{}},customQuickCreateChildBtnClick:null,addCustomContentToNode:null,enableInheritAncestorLineStyle:!0,selectTranslateStep:3,selectTranslateLimit:20,enableFreeDrag:!1,autoMoveWhenMouseInEdgeOnDrag:!0,dragMultiNodeRectConfig:{width:40,height:20,fill:"rgb(94, 200, 248)"},dragPlaceholderRectFill:"rgb(94, 200, 248)",dragPlaceholderLineConfig:{color:"rgb(94, 200, 248)",width:2},dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},handleDragCloneNode:null,beforeDragEnd:null,beforeDragStart:null,watermarkConfig:{onlyExport:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14},belowNode:!1},exportPaddingX:10,exportPaddingY:10,resetCss:`
|
|
257
|
+
* {
|
|
258
|
+
margin: 0;
|
|
259
|
+
padding: 0;
|
|
260
|
+
box-sizing: border-box;
|
|
261
|
+
}
|
|
262
|
+
`,minExportImgCanvasScale:2,addContentToHeader:null,addContentToFooter:null,handleBeingExportSvg:null,maxCanvasSize:16384,defaultAssociativeLineText:"关联",associativeLineIsAlwaysAboveNode:!0,associativeLineInitPointsPosition:{from:"",to:""},enableAdjustAssociativeLinePoints:!0,beforeAssociativeLineConnection:null,disableTouchZoom:!1,minTouchZoomScale:20,maxTouchZoomScale:-1,isLimitMindMapInCanvasWhenHasScrollbar:!0,isOnlySearchCurrentRenderNodes:!1,beforeCooperateUpdate:null,rainbowLinesConfig:{open:!1,colorsList:[]},demonstrateConfig:null,enableEditFormulaInRichTextEdit:!0,katexFontPath:"https://unpkg.com/katex@0.16.11/dist/",getKatexOutputType:null,transformRichTextOnEnterEdit:null,beforeHideRichTextEdit:null,outerFramePaddingX:10,outerFramePaddingY:10,defaultOuterFrameText:"外框",onlyPainterNodeCustomStyles:!1,beforeDeleteNodeImg:null,imgResizeBtnSize:25,minImgResizeWidth:50,minImgResizeHeight:50,maxImgResizeWidthInheritTheme:!1,maxImgResizeWidth:1/0,maxImgResizeHeight:1/0,customDeleteBtnInnerHTML:"",customResizeBtnInnerHTML:""};let ri=class Fi{constructor(e={}){if(Fi.instanceCount++,this.opt=this.handleOpt(Ea(Th,e)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.initWidth=this.width,this.initHeight=this.height,this.cssEl=null,this.cssTextMap={},this.nodeInnerPrefixList=[],this.nodeInnerPostfixList=[],this.editNodeClassList=[],this.extendShapeList=[],this.initContainer(),this.initTheme(),this.initCache(),Fi.pluginList.filter(t=>t.preload).forEach(t=>{this.initPlugin(t)}),this.event=new $u({mindMap:this}),this.keyCommand=new xp({mindMap:this}),this.command=new bp({mindMap:this}),this.renderer=new vp({mindMap:this}),this.view=new Bu({mindMap:this}),this.batchExecution=new kp,Fi.pluginList.filter(t=>!t.preload).forEach(t=>{this.initPlugin(t)}),this.addCss(),this.render(this.opt.fit?()=>this.view.fit():()=>{}),this.opt.addHistoryOnInit&&this.opt.data&&this.command.addHistory()}handleOpt(e){return Wl.includes(e.layout)||(e.layout=D.LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&ir[e.theme]?e.theme:"default",e}handleData(e){return Nn(e)||Object.keys(e).length<=0?null:(e=Ri(e||{}),e.data&&!e.data.expand&&(e.data.expand=!0),ds([e],!1,null,!0),e)}initContainer(){const{associativeLineIsAlwaysAboveNode:e}=this.opt;this.el.classList.add("smm-mind-map-container");const t=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=ct().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),e||t(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),e&&t(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}appendCss(e,t){this.cssTextMap[e]=t,this.removeCss(),this.addCss()}removeAppendCss(e){this.cssTextMap[e]&&(delete this.cssTextMap[e],this.removeCss(),this.addCss())}joinCss(){return Ru+Object.keys(this.cssTextMap).map(e=>this.cssTextMap[e]).join(`
|
|
263
|
+
`)}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=this.joinCss(),document.head.appendChild(this.cssEl)}removeCss(){this.cssEl&&document.head.removeChild(this.cssEl)}checkEditNodeClassIndex(e){return this.editNodeClassList.findIndex(t=>t===e)}addEditNodeClass(e){this.checkEditNodeClassIndex(e)===-1&&this.editNodeClassList.push(e)}deleteEditNodeClass(e){const t=this.checkEditNodeClassIndex(e);t!==-1&&this.editNodeClassList.splice(t,1)}render(e,t=""){this.initTheme(),this.renderer.render(e,t)}reRender(e,t=""){this.renderer.reRender=!0,this.renderer.clearCache(),this.clearDraw(),this.render(e,t)}getElRectInfo(){if(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0)throw new Error("容器元素el的宽高不能为0")}resize(){const e=this.width,t=this.height;this.getElRectInfo(),this.svg.size(this.width,this.height),(e!==this.width||t!==this.height)&&(this.demonstrate?this.demonstrate.isInDemonstrate||this.render():this.render()),this.emit("resize")}on(e,t){this.event.on(e,t)}emit(e,...t){this.event.emit(e,...t)}off(e,t){this.event.off(e,t)}initCache(){this.commonCaches={measureCustomNodeContentSizeEl:null,measureRichtextNodeTextSizeEl:null}}initTheme(){this.themeConfig=Cd(ir[this.opt.theme]||ir.default,this.opt.themeConfig),Ca.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=e,t||this.render(null,D.CHANGE_THEME),this.emit("view_theme_change",e)}getTheme(){return this.opt.theme}setThemeConfig(e,t=!1){const n=S2(this.themeConfig,e);if(this.opt.themeConfig=e,!t){const r=d2(n);this.render(null,r?"":D.CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(e){return e===void 0?this.themeConfig:this.themeConfig[e]}getConfig(e){return e===void 0?this.opt:this.opt[e]}updateConfig(e={}){this.emit("before_update_config",this.opt);const t={...this.opt};this.opt=this.handleOpt(Ea.all([Th,this.opt,e])),this.emit("after_update_config",this.opt,t)}getLayout(){return this.opt.layout}setLayout(e,t=!1){Wl.includes(e)||(e=D.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,D.CHANGE_LAYOUT),this.emit("layout_change",e)}execCommand(...e){this.command.exec(...e)}updateData(e){e=this.handleData(e),this.emit("before_update_data",e),this.renderer.setData(e),this.render(),this.command.addHistory(),this.emit("update_data",e)}setData(e){e=this.handleData(e),this.emit("before_set_data",e),this.opt.data=e,this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(e),this.reRender(),this.emit("set_data",e)}setFullData(e){e.root&&this.setData(e.root),e.layout&&this.setLayout(e.layout),e.theme&&(e.theme.template&&this.setTheme(e.theme.template),e.theme.config&&this.setThemeConfig(e.theme.config)),e.view&&this.view.setTransformData(e.view)}getData(e){let t=this.command.getCopyData(),n={};return e?n={layout:this.getLayout(),root:t,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:n=t,Ri(n)}async export(...e){try{if(!this.doExport)throw new Error("请注册Export插件!");return await this.doExport.export(...e)}catch(t){this.opt.errorHandler(er.EXPORT_ERROR,t)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){if(![D.MODE.READONLY,D.MODE.EDIT].includes(e))return;const t=e===D.MODE.READONLY;t!==this.opt.readonly&&(t&&(this.renderer.textEdit.isShowTextEdit()&&(this.renderer.textEdit.hideEditTextBox(),this.command.originAddHistory()),this.execCommand("CLEAR_ACTIVE_NODE")),this.opt.readonly=t,!t&&this.command.history.length<=0&&this.command.originAddHistory(),this.emit("mode_change",e))}getSvgData({paddingX:e=0,paddingY:t=0,ignoreWatermark:n=!1,addContentToHeader:r,addContentToFooter:s,node:a}={}){const{watermarkConfig:o,openPerformance:l}=this.opt;l&&this.renderer.forceLoadNode(a);const{cssTextList:h,header:c,headerHeight:d,footer:f,footerHeight:m}=O2({addContentToHeader:r,addContentToFooter:s}),v=this.svg,g=this.draw,x=v.width(),w=v.height(),N=g.transform(),M=this.elRect;g.scale(1/N.scaleX,1/N.scaleY);const z=g.rbox();let E=null;a&&(E=m0(a,z.x,z.y,e,t));const B=0;z.width+=e*2,z.height+=t*2+B+d+m,g.translate(e,t),v.size(z.width,z.height),g.translate(-z.x+M.left,-z.y+M.top);let I=v.clone();const R=this.watermark&&this.watermark.hasWatermark();if(!n&&R){this.watermark.isInExport=!0;const{onlyExport:Y}=o;z.width>x||z.height>w?(this.width=z.width,this.height=z.height,this.watermark.onResize(),I=v.clone(),this.width=x,this.height=w,this.watermark.onResize()):Y&&(this.watermark.onResize(),I=v.clone()),Y&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...h].forEach(Y=>{I.add(ct(`<style>${Y}</style>`))}),c&&d>0&&(I.findOne(".smm-container").translate(0,d),c.width(z.width),c.y(t),I.add(c,0)),f&&m>0&&(f.width(z.width),f.y(z.height-t-m),I.add(f));const F=v.find("defs"),ne=I.find("defs");return F.forEach((Y,re)=>{const j=ne[re];if(!j)return;const $=Y.children(),q=j.children();for(let he=0;he<$.length;he++){const fe=$[he],Ze=q[he];fe&&Ze&&Ze.attr("id",fe.attr("id"))}}),v.size(x,w),g.transform(N),{svg:I,svgHTML:I.svg(),clipData:E,rect:{...z,ratio:z.width/z.height},origWidth:x,origHeight:w,scaleX:N.scaleX,scaleY:N.scaleY}}addShape(e){!e||this.extendShapeList.find(n=>n.name===e.name)||this.extendShapeList.push(e)}removeShape(e){const t=this.extendShapeList.findIndex(n=>n.name===e);t!==-1&&this.extendShapeList.splice(t,1)}getSvgObjects(){return{SVG:ct,G:Ot,Rect:fi}}addPlugin(e,t){Fi.hasPlugin(e)===-1&&Fi.usePlugin(e,t),this.initPlugin(e)}removePlugin(e){let t=Fi.hasPlugin(e);t!==-1&&(Fi.pluginList.splice(t,1),this[e.instanceName]&&(this[e.instanceName].beforePluginRemove&&this[e.instanceName].beforePluginRemove(),delete this[e.instanceName]))}initPlugin(e){this[e.instanceName]||(this[e.instanceName]=new e({mindMap:this,pluginOpt:e.pluginOpt}))}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.renderer.textEdit.removeTextEditEl(),[...Fi.pluginList].forEach(e=>{this[e.instanceName]&&this[e.instanceName].beforePluginDestroy&&this[e.instanceName].beforePluginDestroy(),this[e.instanceName]=null}),this.event.unbind(),this.svg.remove(),Ca.removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),Fi.instanceCount--}},x0=[];ri.extendNodeDataNoStylePropList=(i=[])=>{x0.push(...i),ba.push(...i)};ri.resetNodeDataNoStylePropList=()=>{x0.forEach(i=>{const e=ba.findIndex(t=>t===i);e!==-1&&ba.splice(e,1)}),x0=[]};ri.pluginList=[];ri.usePlugin=(i,e={})=>(ri.hasPlugin(i)!==-1||(i.pluginOpt=e,ri.pluginList.push(i)),ri);ri.hasPlugin=i=>ri.pluginList.findIndex(e=>e===i);ri.instanceCount=0;ri.defineTheme=(i,e={})=>{if(ir[i])return new Error("该主题名称已存在");ir[i]=Cd(wd,e)};ri.removeTheme=i=>{ir[i]&&(ir[i]=null)};const Tp={boxShadowColor:"rgba(0, 0, 0, 0.8)",borderRadius:"5px",transition:"all 0.3s ease-out",zIndex:9999,padding:20,margin:50,openBlankMode:!0};class Ad{constructor(e){this.mindMap=e.mindMap,this.isInDemonstrate=!1,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.tmpStyleEl=null,this.highlightEl=null,this.transformState=null,this.renderTree=null,this.config=Object.assign({...Tp},this.mindMap.opt.demonstrateConfig||{}),this.needRestorePerformanceMode=!1}enter(){this.bindFullscreenEvent(),document.fullscreenElement===this.mindMap.el?this._enter():P2(this.mindMap.el)}_enter(){this.isInDemonstrate=!0,this.pausePerformanceMode(),this.addTmpStyles(),this.transformState=this.mindMap.view.getTransformData(),this.renderTree=this.mindMap.getData(),this.mindMap.command.pause(),this.mindMap.keyCommand.pause(),this.createHighlightEl(),this.getStepList();let e=!1;this.mindMap.renderer.isRendering&&(e=!0),this.mindMap.execCommand("UNEXPAND_ALL",!1);const t=()=>{if(e){e=!1;return}this.mindMap.off("node_tree_render_end",t),this.jump(this.currentStepIndex),this.bindEvent()};this.mindMap.on("node_tree_render_end",t)}exit(){F2(this.mindMap.el),this.mindMap.updateData(this.renderTree),this.mindMap.view.setTransformData(this.transformState),this.renderTree=null,this.transformState=null,this.stepList=[],this.currentStepIndex=0,this.currentStepNode=null,this.currentUnderlineTextData=null,this.unBindEvent(),this.removeTmpStyles(),this.removeHighlightEl(),this.mindMap.command.recovery(),this.mindMap.keyCommand.recovery(),this.restorePerformanceMode(),this.mindMap.emit("exit_demonstrate"),this.isInDemonstrate=!1}pausePerformanceMode(){const{openPerformance:e}=this.mindMap.opt;e&&(this.needRestorePerformanceMode=!0,this.mindMap.opt.openPerformance=!1,this.mindMap.renderer.forceLoadNode())}restorePerformanceMode(){this.needRestorePerformanceMode&&(this.mindMap.opt.openPerformance=!0,this.mindMap.renderer.forceLoadNode())}addTmpStyles(){this.tmpStyleEl=document.createElement("style");let e=`
|
|
264
|
+
/* 画布所有元素禁止响应鼠标事件 */
|
|
265
|
+
.smm-mind-map-container {
|
|
266
|
+
pointer-events: none;
|
|
267
|
+
}
|
|
268
|
+
/* 超链接图标允许响应鼠标事件 */
|
|
269
|
+
.smm-node a {
|
|
270
|
+
pointer-events: all;
|
|
271
|
+
}
|
|
272
|
+
/* 备注图标允许响应鼠标事件 */
|
|
273
|
+
.smm-node .smm-node-note {
|
|
274
|
+
pointer-events: all;
|
|
275
|
+
}
|
|
276
|
+
`;this.config.openBlankMode&&(e+=`
|
|
277
|
+
/* 带下划线的文本内容全部隐藏 */
|
|
278
|
+
.smm-richtext-node-wrap u {
|
|
279
|
+
opacity: 0;
|
|
280
|
+
}
|
|
281
|
+
`),this.tmpStyleEl.innerText=e,document.head.appendChild(this.tmpStyleEl)}removeTmpStyles(){this.tmpStyleEl&&document.head.removeChild(this.tmpStyleEl)}createHighlightEl(){this.highlightEl||(this.highlightEl=document.createElement("div"),this.highlightEl.style.cssText=`
|
|
282
|
+
position: absolute;
|
|
283
|
+
box-shadow: 0 0 0 5000px ${this.config.boxShadowColor};
|
|
284
|
+
border-radius: ${this.config.borderRadius};
|
|
285
|
+
transition: ${this.config.transition};
|
|
286
|
+
z-index: ${this.config.zIndex+1};
|
|
287
|
+
pointer-events: none;
|
|
288
|
+
`,this.mindMap.el.appendChild(this.highlightEl))}removeHighlightEl(){this.highlightEl&&(this.mindMap.el.removeChild(this.highlightEl),this.highlightEl=null)}updateHighlightEl({left:e,top:t,width:n,height:r}){const s=this.config.padding;e&&(this.highlightEl.style.left=e-s+"px"),t&&(this.highlightEl.style.top=t-s+"px"),n&&(this.highlightEl.style.width=n+s*2+"px"),r&&(this.highlightEl.style.height=r+s*2+"px")}bindEvent(){this.onKeydown=this.onKeydown.bind(this),window.addEventListener("keydown",this.onKeydown)}bindFullscreenEvent(){this.onFullscreenChange=this.onFullscreenChange.bind(this),document.addEventListener(ah,this.onFullscreenChange)}unBindEvent(){window.removeEventListener("keydown",this.onKeydown),document.removeEventListener(ah,this.onFullscreenChange)}onFullscreenChange(){document.fullscreenElement?document.fullscreenElement===this.mindMap.el&&this._enter():this.exit()}onKeydown(e){e.keyCode===Di.Left?this.prev():e.keyCode===Di.Right?this.next():e.keyCode===Di.Esc?this.exit():e.keyCode===Di.Enter&&this.showNextUnderlineText()}prev(){this.currentStepIndex>0&&this.jump(this.currentStepIndex-1)}next(){const e=this.stepList.length;this.currentStepIndex<e-1&&this.jump(this.currentStepIndex+1)}showNextUnderlineText(){if(!this.config.openBlankMode||!this.currentStepNode||!this.currentUnderlineTextData)return;const{index:e,list:t,length:n}=this.currentUnderlineTextData;if(e>=n)return;const r=t[e];this.currentUnderlineTextData.index++,r.node.style.opacity=1}jump(e){this.currentUnderlineTextData&&(this.currentUnderlineTextData.list.forEach(a=>{a.node.style.opacity=""}),this.currentUnderlineTextData=null),this.currentStepNode=null,this.currentStepIndex=e,this.mindMap.emit("demonstrate_jump",this.currentStepIndex,this.stepList.length);const t=this.stepList[e],n=t.node,r=n.data.uid,s=this.mindMap.renderer.findNodeByUid(r);if(!s){this.mindMap.renderer.expandToNodeUid(r,()=>{this.mindMap.renderer.findNodeByUid(r)&&this.jump(e)});return}if(t.type==="node"){this.currentStepNode=s;const a=this.config.openBlankMode?s.group.find("u"):null;a&&a.length>0&&(this.currentUnderlineTextData={index:0,list:a,length:a.length}),this.mindMap.view.fit(()=>s.group.rbox(),!0,this.config.padding+this.config.margin);const o=s.group.rbox();this.updateHighlightEl({left:o.x,top:o.y,width:o.width,height:o.height})}else{const a=()=>{n.children.forEach(o=>{o.data.expand=!1}),this.mindMap.render(()=>{this.mindMap.view.fit(()=>{const l=m0(s,0,0,0,0,!0);return{...l,x:l.left,y:l.top}},!0,this.config.padding+this.config.margin);const o=m0(s,0,0,0,0,!0);this.updateHighlightEl(o)})};if(n.data.expand)a();else{this.mindMap.execCommand("SET_NODE_EXPAND",s,!0);const o=()=>{this.mindMap.off("node_tree_render_end",o),a()};this.mindMap.on("node_tree_render_end",o)}}}getStepList(){Be(this.mindMap.renderer.renderTree,null,e=>{this.stepList.push({type:"node",node:e}),Ms(e.data).forEach(n=>{n.uid&&this.stepList.push({type:"node",node:{data:n}})}),e.children.length>1&&this.stepList.push({type:"children",node:e})})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Ad.instanceName="demonstrate";class _d{constructor(e){this.mindMap=e,this.autoMoveTimer=null}onMove(e,t,n=()=>{},r=()=>{}){n();let s=this.mindMap.opt.selectTranslateStep,a=this.mindMap.opt.selectTranslateLimit,o=0;e<=this.mindMap.elRect.left+a&&(r("left",s),this.mindMap.view.translateX(s),o++),e>=this.mindMap.elRect.right-a&&(r("right",s),this.mindMap.view.translateX(-s),o++),t<=this.mindMap.elRect.top+a&&(r("top",s),this.mindMap.view.translateY(s),o++),t>=this.mindMap.elRect.bottom-a&&(r("bottom",s),this.mindMap.view.translateY(-s),o++),o>0&&this.startAutoMove(e,t,n,r)}startAutoMove(e,t,n,r){this.autoMoveTimer=setTimeout(()=>{this.onMove(e,t,n,r)},20)}clearAutoMoveTimer(){clearTimeout(this.autoMoveTimer)}}class Dd extends Rn{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.autoMove=new _d(e),this.reset(),this.bindEvent()}reset(){this.isDragging=!1,this.mousedownNode=null,this.beingDragNodeList=[],this.nodeList=[],this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.drawTransform=null,this.clone=null,this.placeholder=null,this.placeholderWidth=50,this.placeholderHeight=10,this.placeHolderLine=null,this.placeHolderExtraLines=[],this.offsetX=0,this.offsetY=0,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.checkDragOffset=10,this.minOffset=10}bindEvent(){this.onNodeMousedown=this.onNodeMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkOverlapNode=Ua(this.checkOverlapNode,300,this),this.mindMap.on("node_mousedown",this.onNodeMousedown),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("mouseup",this.onMouseup)}unBindEvent(){this.mindMap.off("node_mousedown",this.onNodeMousedown),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("node_mouseup",this.onMouseup),this.mindMap.off("mouseup",this.onMouseup)}onNodeMousedown(e,t){if(this.mindMap.opt.readonly||t.which!==1||e.isGeneralization||e.isRoot)return;this.isMousedown=!0,this.mousedownNode=e;const{x:n,y:r}=this.mindMap.toPos(t.clientX,t.clientY);this.mouseDownX=n,this.mouseDownY=r}onMousemove(e){if(this.mindMap.opt.readonly||!this.isMousedown)return;e.preventDefault();const{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!(!this.isDragging&&Math.abs(t-this.mouseDownX)<=this.checkDragOffset&&Math.abs(n-this.mouseDownY)<=this.checkDragOffset)&&(this.mindMap.emit("node_dragging",this.mousedownNode),this.handleStartMove(),this.onMove(t,n,e))}async onMouseup(e){if(!this.isMousedown)return;const{autoMoveWhenMouseInEdgeOnDrag:t,enableFreeDrag:n,beforeDragEnd:r}=this.mindMap.opt;t&&this.mindMap.select&&this.autoMove.clearAutoMoveTimer(),this.isMousedown=!1,this.beingDragNodeList.forEach(l=>{l.setOpacity(1),l.showChildren(),l.endDrag()}),this.removeCloneNode();let s=this.overlapNode?this.overlapNode.getData("uid"):"",a=this.prevNode?this.prevNode.getData("uid"):"",o=this.nextNode?this.nextNode.getData("uid"):"";if(this.isDragging&&typeof r=="function"&&await r({overlapNodeUid:s,prevNodeUid:a,nextNodeUid:o,beingDragNodeList:[...this.beingDragNodeList]})){this.reset();return}if(this.overlapNode)this.removeNodeActive(this.overlapNode),this.mindMap.execCommand("MOVE_NODE_TO",this.beingDragNodeList,this.overlapNode);else if(this.prevNode)this.removeNodeActive(this.prevNode),this.mindMap.execCommand("INSERT_AFTER",this.beingDragNodeList,this.prevNode);else if(this.nextNode)this.removeNodeActive(this.nextNode),this.mindMap.execCommand("INSERT_BEFORE",this.beingDragNodeList,this.nextNode);else if(this.clone&&n&&this.beingDragNodeList.length===1){let{x:l,y:h}=this.mindMap.toPos(e.clientX-this.offsetX,e.clientY-this.offsetY),{scaleX:c,scaleY:d,translateX:f,translateY:m}=this.drawTransform;l=(l-f)/c,h=(h-m)/d,this.mousedownNode.left=l,this.mousedownNode.top=h,this.mousedownNode.customLeft=l,this.mousedownNode.customTop=h,this.mindMap.execCommand("SET_NODE_CUSTOM_POSITION",this.mousedownNode,l,h),this.mindMap.render()}this.isDragging&&this.mindMap.emit("node_dragend",{overlapNodeUid:s,prevNodeUid:a,nextNodeUid:o}),this.reset()}removeNodeActive(e){e.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}onMove(e,t,n){if(!this.isMousedown||!this.isDragging)return;let{scaleX:r,scaleY:s,translateX:a,translateY:o}=this.drawTransform,l=e-this.offsetX,h=t-this.offsetY;e=(l-a)/r,t=(h-o)/s;let c=this.clone.transform();this.clone.translate(e-c.translateX,t-c.translateY),this.checkOverlapNode(),this.drawTransform=this.mindMap.draw.transform(),this.autoMove.clearAutoMoveTimer(),this.autoMove.onMove(n.clientX,n.clientY)}async handleStartMove(){if(!this.isDragging){let e=this.mousedownNode;this.drawTransform=this.mindMap.draw.transform();let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.drawTransform;this.offsetX=this.mouseDownX-(e.left*t+r),this.offsetY=this.mouseDownY-(e.top*n+s),e.getData("isActive")?this.beingDragNodeList=g0(u0(this.mindMap.renderer.activeNodeList.filter(o=>!o.isRoot&&!o.isGeneralization))):this.beingDragNodeList=[e];const{beforeDragStart:a}=this.mindMap.opt;if(typeof a=="function"&&await a([...this.beingDragNodeList]))return;this.nodeTreeToList(),this.createCloneNode(),this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.isDragging=!0}}nodeTreeToList(){const e=[];Lr(this.mindMap.renderer.root,t=>{this.checkIsInBeingDragNodeList(t)||(e[t.layerIndex]||(e[t.layerIndex]=[]),e[t.layerIndex].push(t))}),this.nodeList=e.reduceRight((t,n)=>[...t,...n],[])}createCloneNode(){if(!this.clone){const{dragMultiNodeRectConfig:e,dragPlaceholderRectFill:t,dragPlaceholderLineConfig:n,dragOpacityConfig:r,handleDragCloneNode:s}=this.mindMap.opt,{width:a,height:o,fill:l}=e,h=this.beingDragNodeList[0],c=h.style.merge("lineColor",!0);if(this.beingDragNodeList.length>1)this.clone=this.mindMap.otherDraw.rect().size(a,o).radius(o/2).fill({color:l||c}),this.offsetX=a/2,this.offsetY=o/2;else{this.clone=h.group.clone();const d=this.clone.findOne(".smm-expand-btn");d&&d.remove(),this.mindMap.otherDraw.add(this.clone),typeof s=="function"&&s(this.clone)}this.clone.opacity(r.cloneNodeOpacity),this.clone.css("z-index",99999),this.placeholder=this.mindMap.otherDraw.rect().fill({color:t||c}).radius(5),this.placeHolderLine=this.mindMap.otherDraw.path().stroke({color:n.color||c,width:n.width}).fill({color:"none"}),this.beingDragNodeList.forEach(d=>{d.setOpacity(r.beingDragNodeOpacity),d.hideChildren(),d.startDrag()})}}removeCloneNode(){this.clone&&(this.clone.remove(),this.placeholder.remove(),this.placeHolderLine.remove(),this.removeExtraLines())}removeExtraLines(){this.placeHolderExtraLines.forEach(e=>{e.remove()}),this.placeHolderExtraLines=[]}checkOverlapNode(){if(!this.drawTransform||!this.placeholder)return;const{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:s,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:l,VERTICAL_TIMELINE2:h,VERTICAL_TIMELINE3:c,FISHBONE:d,FISHBONE2:f,RIGHT_FISHBONE:m,RIGHT_FISHBONE2:v}=D.LAYOUT;this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.placeholder.size(0,0),this.placeHolderLine.hide(),this.removeExtraLines(),this.nodeList.forEach(g=>{if(g.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",g,!1),!(this.overlapNode||this.prevNode&&this.nextNode))switch(this.mindMap.opt.layout){case e:case t:this.handleLogicalStructure(g);break;case n:this.handleMindMap(g);break;case r:this.handleOrganizationStructure(g);break;case s:this.handleCatalogOrganization(g);break;case a:this.handleTimeLine(g);break;case o:this.handleTimeLine2(g);break;case l:case h:case c:this.handleLogicalStructure(g);break;case d:case f:case m:case v:this.handleFishbone(g);break;default:this.handleLogicalStructure(g)}}),this.overlapNode&&this.handleOverlapNode()}handleOverlapNode(){const{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:s,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:l,VERTICAL_TIMELINE2:h,VERTICAL_TIMELINE3:c,FISHBONE:d,FISHBONE2:f,RIGHT_FISHBONE:m,RIGHT_FISHBONE2:v}=D.LAYOUT,{LEFT:g,TOP:x,RIGHT:w,BOTTOM:N}=D.LAYOUT_GROW_DIR,M=this.overlapNode.layerIndex,z=this.overlapNode.children,E=this.mindMap.renderer.layout.getMarginX(M+1),B=this.mindMap.renderer.layout.getMarginY(M+1),I=this.placeholderWidth/2,R=this.placeholderHeight/2;let F="",ne="",Y="",re=!1,j=!1;if(z.length>0){const $=z[z.length-1],q=this.getNodeRect($);switch(F=this.getNewChildNodeDir($),this.mindMap.opt.layout){case e:case n:ne=F===g?q.originRight-this.placeholderWidth:q.originLeft,Y=q.originBottom+this.minOffset-R;break;case t:ne=q.originRight-this.placeholderWidth,Y=q.originBottom+this.minOffset-R;break;case r:re=!0,ne=q.originRight+this.minOffset-R,Y=q.originTop;break;case s:M===0?(re=!0,ne=q.originRight+this.minOffset-R,Y=q.originTop):(ne=q.originLeft,Y=q.originBottom+this.minOffset-R);break;case a:M===0?(re=!0,ne=q.originRight+this.minOffset-R,Y=q.originTop+q.originHeight/2-I):(ne=q.originLeft,Y=q.originBottom+this.minOffset-R);break;case o:M===0?(re=!0,ne=q.originRight+this.minOffset-R,Y=q.originTop+q.originHeight/2-I):(ne=q.originLeft,M===1?Y=F===x?q.originTop-this.placeholderHeight-this.minOffset+R:q.originBottom+this.minOffset-R:Y=q.originBottom+this.minOffset-R);break;case l:case h:case c:M===0?(ne=q.originLeft+q.originWidth/2-I,Y=q.originBottom+this.minOffset-R):(ne=F===w?q.originLeft:q.originRight-this.placeholderWidth,Y=q.originBottom+this.minOffset-R);break;case d:case f:case m:case v:M<=1?(j=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ne=q.originLeft,Y=F===x?q.originBottom+this.minOffset-R:q.originTop-this.placeholderHeight-this.minOffset+R);break}}else{const $=this.getNodeRect(this.overlapNode);switch(F=this.getNewChildNodeDir(this.overlapNode),this.mindMap.opt.layout){case e:case n:ne=F===w?$.originRight+E:$.originLeft-this.placeholderWidth-E,Y=$.originTop+($.originHeight-this.placeholderHeight)/2;break;case t:ne=$.originLeft-this.placeholderWidth-E,Y=$.originTop+($.originHeight-this.placeholderHeight)/2;break;case r:re=!0,ne=$.originLeft+($.originWidth-this.placeholderHeight)/2,Y=$.originBottom+E;break;case s:M===0&&(re=!0),ne=$.originLeft+$.originWidth*.5,Y=$.originBottom+E;break;case a:M===0&&(re=!0),ne=$.originLeft+$.originWidth*.5,Y=$.originBottom+B;break;case o:M===0&&(re=!0),ne=$.originLeft+$.originWidth*.5,M===1?Y=F===x?$.originTop-this.placeholderHeight-E:$.originBottom+E:Y=$.originBottom+E;break;case l:case h:case c:M===0&&(re=!0),ne=F===w?$.originRight+E:$.originLeft-this.placeholderWidth-E,Y=$.originTop+$.originHeight/2-R;break;case d:case f:case m:case v:M<=1?(j=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ne=$.originLeft+$.originWidth*.5,Y=F===N?$.originTop-this.placeholderHeight-this.minOffset+R:$.originBottom+this.minOffset-R);break}}j||this.setPlaceholderRect({x:ne,y:Y,dir:F,rotate:re})}getNewChildNodeDir(e){const{LOGICAL_STRUCTURE:t,LOGICAL_STRUCTURE_LEFT:n,MIND_MAP:r,TIMELINE2:s,VERTICAL_TIMELINE:a,VERTICAL_TIMELINE2:o,VERTICAL_TIMELINE3:l,FISHBONE:h,FISHBONE2:c,RIGHT_FISHBONE:d,RIGHT_FISHBONE2:f}=D.LAYOUT;switch(this.mindMap.opt.layout){case t:return D.LAYOUT_GROW_DIR.RIGHT;case n:return D.LAYOUT_GROW_DIR.LEFT;case r:case s:case a:case o:case l:case h:case c:case d:case f:return e.dir;default:return""}}handleVerticalCheck(e,t,n=!1){const{layout:r}=this.mindMap.opt,{LAYOUT:s,LAYOUT_GROW_DIR:a}=D,{VERTICAL_TIMELINE:o,VERTICAL_TIMELINE2:l,VERTICAL_TIMELINE3:h,FISHBONE:c,FISHBONE2:d,RIGHT_FISHBONE:f,RIGHT_FISHBONE2:m}=s,{LEFT:v}=a,g=this.mouseMoveX,x=this.mouseMoveY,w=this.getNodeRect(e),N=this.getNewChildNodeDir(e),M=e.layerIndex;n&&(t=t.reverse());let z=w.originHeight/4,{prevBrotherOffset:E,nextBrotherOffset:B}=this.getNodeDistanceToSiblingNode(t,e,w,"v");if(w.left<=g&&w.right>=g){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let I=B>0?x>w.bottom&&x<=w.bottom+B:x>=w.bottom-z&&x<=w.bottom,R=E>0?x<w.top&&x>=w.top-E:x>=w.top&&x<=w.top+z;const{scaleY:F}=this.drawTransform;let ne=N===v?w.originRight-this.placeholderWidth:w.originLeft,Y=!1;switch(r){case o:case l:case h:M===1&&(ne=w.originLeft+w.originWidth/2-this.placeholderWidth/2);break;case f:case m:ne=w.originLeft+w.originWidth-this.placeholderWidth;break}if(I){n?this.nextNode=e:this.prevNode=e;let re=w.originBottom+B/F-this.placeholderHeight/2;switch(r){case c:case d:case f:case m:M===2&&(Y=!0,re=w.originBottom+this.minOffset-this.placeholderHeight/2);break}this.setPlaceholderRect({x:ne,y:re,dir:N,notRenderLine:Y})}else if(R){n?this.prevNode=e:this.nextNode=e;let re=w.originTop-this.placeholderHeight-E/F+this.placeholderHeight/2;switch(r){case c:case d:case f:case m:M===2&&(Y=!0,re=w.originTop-this.placeholderHeight-this.minOffset+this.placeholderHeight/2);break}this.setPlaceholderRect({x:ne,y:re,dir:N,notRenderLine:Y})}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:E,nextBrotherOffset:B,size:z,pos:x,nodeRect:w})}}handleHorizontalCheck(e,t){const{layout:n}=this.mindMap.opt,{LAYOUT:r}=D,{FISHBONE:s,FISHBONE2:a,RIGHT_FISHBONE:o,RIGHT_FISHBONE2:l,TIMELINE:h,TIMELINE2:c}=r;let d=this.mouseMoveX,f=this.mouseMoveY,m=this.getNodeRect(e),v=m.originWidth/4,{prevBrotherOffset:g,nextBrotherOffset:x}=this.getNodeDistanceToSiblingNode(t,e,m,"h");if(m.top<=f&&m.bottom>=f){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let w=x>0?d<m.right+x&&d>=m.right:d<=m.right&&d>=m.right-v,N=g>0?d>m.left-g&&d<=m.left:d<=m.left+v&&d>=m.left;const{scaleX:M}=this.drawTransform,z=e.layerIndex;let E=m.originTop,B=!1;switch(n){case h:case c:E=m.originTop+m.originHeight/2-this.placeholderWidth/2;break;case s:case a:case o:case l:z===1&&(B=!0,E=m.originTop+m.originHeight/2-this.placeholderWidth/2);break}w?([o,l].includes(n)?this.nextNode=e:this.prevNode=e,this.setPlaceholderRect({x:m.originRight+x/M-this.placeholderHeight/2,y:E,rotate:!0,notRenderLine:B})):N&&([o,l].includes(n)?this.prevNode=e:this.nextNode=e,this.setPlaceholderRect({x:m.originLeft-this.placeholderHeight-g/M+this.placeholderHeight/2,y:E,rotate:!0,notRenderLine:B}))}this.checkIsOverlap({node:e,dir:"h",prevBrotherOffset:g,nextBrotherOffset:x,size:v,pos:d,nodeRect:m})}}getNodeDistanceToSiblingNode(e,t,n,r){const{TOP:s,LEFT:a,BOTTOM:o,RIGHT:l}=D.LAYOUT_GROW_DIR;let{scaleX:h,scaleY:c}=this.drawTransform,d=r==="v"?s:a,f=r==="v"?o:l,m=r==="v"?c:h,v=this.minOffset*m,g=Ct(t,e),x=null,w=null;g!==-1&&(g-1>=0&&(x=e[g-1]),g+1<=e.length-1&&(w=e[g+1]));let N=0;if(x){let z=this.getNodeRect(x);N=n[d]-z[f],N=N>=v?N/2:0}else N=v;let M=0;return w?(M=this.getNodeRect(w)[d]-n[f],M=M>=v?M/2:0):M=v,{prevBrother:x,prevBrotherOffset:N,nextBrother:w,nextBrotherOffset:M}}setPlaceholderRect({x:e,y:t,dir:n,rotate:r,notRenderLine:s}){let a=this.placeholderWidth,o=this.placeholderHeight;if(r){const f=a;a=o,o=f}if(this.placeholder.size(a,o).move(e,t),s)return;const{dragPlaceholderLineConfig:l}=this.mindMap.opt;let h=null,c=null;this.overlapNode?(h=this.overlapNode,c=this.overlapNode):(h=this.prevNode||this.nextNode,c=h.parent),c=c.fakeClone(),h=h.fakeClone();const d=this.beingDragNodeList[0].fakeClone();d.dir=n,d.left=e,d.top=t,d.width=a,d.height=o,c.children=[d],c._lines=[],this.placeHolderLine.show(),this.mindMap.renderer.layout.renderLine(c,[this.placeHolderLine],(...f)=>{},h.style.getStyle("lineStyle",!0)),this.placeHolderExtraLines=[...c._lines],this.placeHolderExtraLines.forEach(f=>{this.mindMap.otherDraw.add(f),f.stroke({color:l.color,width:l.width}).fill({color:"none"})})}checkIsOverlap({node:e,dir:t,prevBrotherOffset:n,nextBrotherOffset:r,size:s,pos:a,nodeRect:o}){const{TOP:l,LEFT:h,BOTTOM:c,RIGHT:d}=D.LAYOUT_GROW_DIR;let f=t==="v"?l:h,m=t==="v"?c:d;!this.overlapNode&&!this.prevNode&&!this.nextNode&&o[f]+(n>0?0:s)<=a&&o[m]-(r>0?0:s)>=a&&(this.overlapNode=e)}handleLogicalStructure(e){const t=this.commonGetNodeCheckList(e);this.handleVerticalCheck(e,t)}handleMindMap(e){const t=e.parent?e.parent.children.filter(n=>{let r=!0;return e.layerIndex===1&&(r=n.dir===e.dir),r&&!this.checkIsInBeingDragNodeList(n)}):[];this.handleVerticalCheck(e,t)}handleOrganizationStructure(e){const t=this.commonGetNodeCheckList(e);this.handleHorizontalCheck(e,t)}handleCatalogOrganization(e){const t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine(e){let t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine2(e){let t=this.commonGetNodeCheckList(e);e.layerIndex===1?this.handleHorizontalCheck(e,t):e.dir===D.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}handleFishbone(e){let t=e.parent?e.parent.children.filter(n=>n.layerIndex>1&&!this.checkIsInBeingDragNodeList(n)):[];if(e.layerIndex===1)this.handleHorizontalCheck(e,t);else{const n=e.dir===D.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2,r=e.dir===D.LAYOUT_GROW_DIR.BOTTOM&&e.layerIndex>=3;n||r?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}}commonGetNodeCheckList(e){return e.parent?[...e.parent.children].filter(t=>!this.checkIsInBeingDragNodeList(t)):[]}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.drawTransform,{left:a,top:o,width:l,height:h}=e,c=l,d=h,f=a,m=o,v=o+h,g=a+l,x=(a+l)*t+r,w=(o+h)*n+s;return a=a*t+r,o=o*n+s,{left:a,top:o,right:x,bottom:w,originWidth:c,originHeight:d,originLeft:f,originTop:m,originBottom:v,originRight:g}}checkIsInBeingDragNodeList(e){return!!this.beingDragNodeList.find(t=>t.uid===e.uid||t.isAncestor(e))}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Dd.instanceName="drag";const pl=i=>String(i).split(/\s+/).map(t=>{if(/^[\d.]+/.test(t)){let n=/^([\d.]+)(.*)$/.exec(t);return[Number(n[1]),n[2]]}else return t}),ia=(i,e)=>i*e,wo=(i,e)=>e/i,Eh={left:0,top:0,center:50,bottom:100,right:100},Ep=({backgroundSize:i,drawOpt:e,imageRatio:t,canvasWidth:n,canvasHeight:r,canvasRatio:s})=>{if(i){let a=pl(i);if(a[0]==="auto"&&a[1]==="auto")return;if(a[0]==="cover"){t>s?(e.height=r,e.width=ia(t,r)):(e.width=n,e.height=wo(t,n));return}if(a[0]==="contain"){t>s?(e.width=n,e.height=wo(t,n)):(e.height=r,e.width=ia(t,r));return}let o=-1;a[0]&&(Array.isArray(a[0])?a[0][1]==="%"?(e.width=a[0][0]/100*n,o=e.width):(e.width=a[0][0],o=a[0][0]):a[0]==="auto"&&a[1]&&(a[1][1]==="%"?e.width=ia(t,a[1][0]/100*r):e.width=ia(t,a[1][0]))),a[1]&&Array.isArray(a[1])?a[1][1]==="%"?e.height=a[1][0]/100*r:e.height=a[1][0]:o!==-1&&(e.height=wo(t,o))}},Mp=({backgroundPosition:i,drawOpt:e,imgWidth:t,imgHeight:n,canvasWidth:r,canvasHeight:s})=>{if(i){let a=pl(i);if(a=a.map(o=>typeof o=="string"&&Eh[o]!==void 0?[Eh[o],"%"]:o),Array.isArray(a[0])){if(a.length===1&&a.push([50,"%"]),a[0][1]==="%"){let o=a[0][0]/100*r,l=a[0][0]/100*t;e.x=o-l}else e.x=a[0][0];if(a[1][1]==="%"){let o=a[1][0]/100*s,l=a[1][0]/100*n;e.y=o-l}else e.y=a[1][0]}}},Sp=({ctx:i,image:e,backgroundRepeat:t,drawOpt:n,imgWidth:r,imgHeight:s,canvasWidth:a,canvasHeight:o})=>{if(t){let l=n.x,h=n.y,c=Math.ceil(l/r),d=Math.ceil(h/s),f=l-c*r,m=h-d*s,v=pl(t);if(v[0]==="no-repeat"||r>=a&&s>=o)return;if(v[0]==="repeat-x"&&a>r){let g=f;for(;g<a;)ma(i,e,{...n,x:g}),g+=r;return!0}if(v[0]==="repeat-y"&&o>s){let g=m;for(;g<o;)ma(i,e,{...n,y:g}),g+=s;return!0}if(v[0]==="repeat"){let g=f;for(;g<a;){if(o>s){let x=m;for(;x<o;)ma(i,e,{...n,x:g,y:x}),x+=s}g+=r}return!0}}},ma=(i,e,t)=>{i.drawImage(e,t.sx,t.sy,t.swidth,t.sheight,t.x,t.y,t.width,t.height)},zp=(i,e,t,n,{backgroundSize:r,backgroundPosition:s,backgroundRepeat:a},o=()=>{})=>{let l=e/t,h=new Image;h.src=n,h.onload=()=>{let c=h.width,d=h.height,f=c/d,m={sx:0,sy:0,swidth:c,sheight:d,x:0,y:0,width:c,height:d};Ep({backgroundSize:r,drawOpt:m,imageRatio:f,canvasWidth:e,canvasHeight:t,canvasRatio:l}),Mp({backgroundPosition:s,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t}),Sp({ctx:i,image:h,backgroundRepeat:a,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t})||ma(i,h,m),o()},h.onerror=c=>{o(c)}},bo=i=>i.richText?Md(i.text):i.text,Cp=i=>new Array(i).fill("#").join(""),Np=i=>new Array(i-6).fill(" ").join("")+"*",Lp=i=>{let e="";return Be(i,null,(t,n,r,s)=>{const a=s+1;a<=6?e+=Cp(a):e+=Np(a),e+=" "+bo(t.data);const o=t.data.generalization;if(Array.isArray(o))e+=o.map(l=>` [${bo(l)}]`);else if(o&&o.text){const l=bo(o);e+=` [${l}]`}e+=`
|
|
289
|
+
|
|
290
|
+
`,t.data.note&&(e+=t.data.note+`
|
|
291
|
+
|
|
292
|
+
`)},()=>{},!0),e},ko=i=>i.richText?Md(i.text):i.text,Ap=i=>new Array(i).fill(" ").join(""),_p=i=>{let e="";return Be(i,null,(t,n,r,s)=>{e+=Ap(s),e+=" "+ko(t.data);const a=t.data.generalization;Array.isArray(a)?e+=a.map(o=>` [${ko(o)}]`):a&&a.text&&(e+=` [${ko(a)}]`),e+=`
|
|
293
|
+
|
|
294
|
+
`},()=>{},!0),e};class Rd{constructor(e){this.mindMap=e.mindMap}async export(e,t=!0,n="思维导图",...r){if(this[e]){const s=await this[e](n,...r);return t&&f2(s,n+"."+e),s}else return null}createTransformImgTaskList(e,t,n,r){return e.find(t).map(async a=>{const o=r(a);if(/^data:/.test(o)||o==="none")return;const l=await th(o);a.attr(n,l)})}async getSvgData(e){let{exportPaddingX:t,exportPaddingY:n,errorHandler:r,resetCss:s,addContentToHeader:a,addContentToFooter:o,handleBeingExportSvg:l}=this.mindMap.opt,{svg:h,svgHTML:c,clipData:d}=this.mindMap.getSvgData({paddingX:t,paddingY:n,addContentToHeader:a,addContentToFooter:o,node:e});d&&(d.paddingX=t,d.paddingY=n);let f=!1;const m=this.createTransformImgTaskList(h,"image","href",x=>x.attr("href")||x.attr("xlink:href")),v=this.createTransformImgTaskList(h,"img","src",x=>x.attr("src")),g=[...m,...v];try{await Promise.all(g)}catch(x){r(er.EXPORT_LOAD_IMAGE_ERROR,x)}if(this.mindMap.richText){const x=h.find("foreignObject");if(x.length>0&&(x[0].add(ct(`<style>${s}</style>`)),f=!0),this.mindMap.formula&&h.find(".ql-formula").length>0){const N=this.mindMap.formula.getStyleText();if(N){const M=document.createElement("style");M.innerHTML=N,Jn(M),x[0].add(M),f=!0}}}return typeof l=="function"&&(f=!0,h=l(h)),(g.length>0||f)&&(c=h.svg()),{node:h,str:c,clipData:d}}svgToPng(e,t,n=null,r=!1,s="image/png"){const{maxCanvasSize:a,minExportImgCanvasScale:o}=this.mindMap.opt;return new Promise((l,h)=>{const c=new Image;c.setAttribute("crossOrigin","anonymous"),c.onload=async()=>{try{const d=document.createElement("canvas"),f=Math.max(window.devicePixelRatio,o);let m=c.width,v=c.height,g=0,x=0;n&&(g=n.paddingX,x=n.paddingY,m=n.width+g*2,v=n.height+x*2);let w=0,N=0;const{backgroundImage:M}=this.mindMap.themeConfig;if(r&&M&&!t){const Y=await new Promise(re=>{const j=new Image;j.onload=()=>{re([j.width,j.height])},j.onerror=()=>{re(null)},j.src=M});if(Y){const re=m/v,j=Y[0]/Y[1];re>j?(w=m,N=m/j):(N=v,w=v*j)}}let z=(w||m)*f,E=(N||v)*f;if(z>a||E>a){let Y=null,re=null;z>a?Y=a:E>a&&(re=a);const j=bd(z,E,Y,re);z=j[0],E=j[1]}d.width=z,d.height=E;const B=z/f,I=E/f;d.style.width=B+"px",d.style.height=I+"px";const R=d.getContext("2d");R.scale(f,f),t||await this.drawBackgroundToCanvas(R,B,I);const F=w>0?(w-m)/2:0,ne=N>0?(N-v)/2:0;n?R.drawImage(c,n.left,n.top,n.width,n.height,g+F,x+ne,n.width,n.height):R.drawImage(c,F,ne,m,v),l(d.toDataURL(s))}catch(d){h(d)}},c.onerror=d=>{h(d)},c.src=e})}drawBackgroundToCanvas(e,t,n){return new Promise((r,s)=>{const{backgroundColor:a="#fff",backgroundImage:o,backgroundRepeat:l="no-repeat",backgroundPosition:h="center center",backgroundSize:c="cover"}=this.mindMap.themeConfig;e.save(),e.rect(0,0,t,n),e.fillStyle=a,e.fill(),e.restore(),o&&o!=="none"?(e.save(),zp(e,t,n,o,{backgroundRepeat:l,backgroundPosition:h,backgroundSize:c},d=>{d?s(d):r(),e.restore()})):r()})}drawBackgroundToSvg(e){return new Promise(async t=>{const{backgroundColor:n="#fff",backgroundImage:r,backgroundRepeat:s="repeat"}=this.mindMap.themeConfig;if(e.css("background-color",n),r&&r!=="none"){const a=await th(r);e.css("background-image",`url(${a})`),e.css("background-repeat",s),t()}else t()})}async _image(e,t,n=!1,r=null,s=!1){this.mindMap.renderer.textEdit.hideEditTextBox(),this.handleNodeExport(r);const{str:a,clipData:o}=await this.getSvgData(r),l=await this.fixSvgStrAndToBlob(a);return await this.svgToPng(l,n,o,s,e)}async png(...e){return await this._image("image/png",...e)}async jpg(...e){return await this._image("image/jpg",...e)}handleNodeExport(e){if(e&&e.getData("isActive")){e.deactivate();const{alwaysShowExpandBtn:t,notShowExpandBtn:n}=this.mindMap.opt;!t&&!n&&e.getData("expand")&&e.removeExpandBtn()}}async pdf(e,t=!1,n=!1){if(!this.mindMap.doExportPDF)throw new Error("请注册ExportPDF插件");const r=await this.png(e,t,null,n);return await this.mindMap.doExportPDF.pdf(r)}async xmind(e){if(!this.mindMap.doExportXMind)throw new Error("请注册ExportXMind插件");const t=this.mindMap.getData(),n=await this.mindMap.doExportXMind.xmind(t,e);return await ns(n)}async svg(e){this.mindMap.renderer.textEdit.hideEditTextBox();const{node:t}=await this.getSvgData();t.first().before(ct(`<title>${e}</title>`)),await this.drawBackgroundToSvg(t);const n=t.svg();return await this.fixSvgStrAndToBlob(n)}async fixSvgStrAndToBlob(e){e=w2(e),e=R2(e);const t=new Blob([e],{type:"image/svg+xml"});return await ns(t)}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),s=new Blob([r]);return await ns(s)}async smm(e,t){return await this.json(e,t)}async md(){const e=this.mindMap.getData(),t=Lp(e),n=new Blob([t]);return await ns(n)}async txt(){const e=this.mindMap.getData(),t=_p(e),n=new Blob([t]);return await ns(n)}}Rd.instanceName="doExport";class Id{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.addShortcut()}addShortcut(){this.onLeftKeyUp=this.onLeftKeyUp.bind(this),this.onUpKeyUp=this.onUpKeyUp.bind(this),this.onRightKeyUp=this.onRightKeyUp.bind(this),this.onDownKeyUp=this.onDownKeyUp.bind(this),this.mindMap.keyCommand.addShortcut(D.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.addShortcut(D.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.addShortcut(D.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.addShortcut(D.KEY_DIR.DOWN,this.onDownKeyUp)}removeShortcut(){this.mindMap.keyCommand.removeShortcut(D.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.removeShortcut(D.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.removeShortcut(D.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.removeShortcut(D.KEY_DIR.DOWN,this.onDownKeyUp)}onLeftKeyUp(){this.onKeyup(D.KEY_DIR.LEFT)}onUpKeyUp(){this.onKeyup(D.KEY_DIR.UP)}onRightKeyUp(){this.onKeyup(D.KEY_DIR.RIGHT)}onDownKeyUp(){this.onKeyup(D.KEY_DIR.DOWN)}onKeyup(e){if(this.mindMap.renderer.activeNodeList.length>0)this.focus(e);else{let t=this.mindMap.renderer.root;this.mindMap.execCommand("GO_TARGET_NODE",t)}}focus(e){let t=this.mindMap.renderer.activeNodeList[0],n=this.getNodeRect(t),r=null,s=1/0,a=(o,l)=>{let h=this.getDistance(n,o);h<s&&(r=l,s=h)};this.getFocusNodeByShadowAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r||this.getFocusNodeByAreaAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r||this.getFocusNodeBySimpleAlgorithm({currentActiveNode:t,currentActiveNodeRect:n,dir:e,checkNodeDis:a}),r&&this.mindMap.execCommand("GO_TARGET_NODE",r)}getFocusNodeBySimpleAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Lr(this.mindMap.renderer.root,s=>{if(s.uid===e.uid)return;let a=this.getNodeRect(s),{left:o,top:l,right:h,bottom:c}=a,d=!1;n===D.KEY_DIR.LEFT?d=h<=t.left:n===D.KEY_DIR.RIGHT?d=o>=t.right:n===D.KEY_DIR.UP?d=c<=t.top:n===D.KEY_DIR.DOWN&&(d=l>=t.bottom),d&&r(a,s)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Lr(this.mindMap.renderer.root,s=>{if(s.uid===e.uid)return;let a=this.getNodeRect(s),{left:o,top:l,right:h,bottom:c}=a,d=!1;n===D.KEY_DIR.LEFT?d=o<t.left&&l<t.bottom&&c>t.top:n===D.KEY_DIR.RIGHT?d=h>t.right&&l<t.bottom&&c>t.top:n===D.KEY_DIR.UP?d=l<t.top&&o<t.right&&h>t.left:n===D.KEY_DIR.DOWN&&(d=c>t.bottom&&o<t.right&&h>t.left),d&&r(a,s)})}getFocusNodeByAreaAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){let s=(t.right+t.left)/2,a=(t.bottom+t.top)/2;Lr(this.mindMap.renderer.root,o=>{if(o.uid===e.uid)return;let l=this.getNodeRect(o),{left:h,top:c,right:d,bottom:f}=l,m=(d+h)/2,v=(f+c)/2,g=m-s,x=v-a;if(g===0&&x===0)return;let w=!1;n===D.KEY_DIR.LEFT?w=g<=0&&g<=x&&g<=-x:n===D.KEY_DIR.RIGHT?w=g>0&&g>=-x&&g>=x:n===D.KEY_DIR.UP?w=x<=0&&x<g&&x<-g:n===D.KEY_DIR.DOWN&&(w=x>0&&-x<g&&x>g),w&&r(l,o)})}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:s}=this.mindMap.draw.transform(),{left:a,top:o,width:l,height:h}=e;return{right:(a+l)*t+r,bottom:(o+h)*n+s,left:a*t+r,top:o*n+s}}getDistance(e,t){let n=this.getCenter(e),r=this.getCenter(t);return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}getCenter({left:e,right:t,top:n,bottom:r}){return{x:(e+t)/2,y:(n+r)/2}}beforePluginRemove(){this.removeShortcut()}beforePluginDestroy(){this.removeShortcut()}}Id.instanceName="keyboardNavigation";class Od{constructor({mindMap:e}){this.mindMap=e,this.rect=null,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.isSelecting=!1,this.cacheActiveList=[],this.autoMove=new _d(e),this.bindEvent()}bindEvent(){this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkInNodes=Ua(this.checkInNodes,300,this),this.mindMap.on("mousedown",this.onMousedown),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup)}unBindEvent(){this.mindMap.off("mousedown",this.onMousedown),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_mouseup",this.onMouseup)}onMousedown(e){const{readonly:t,mousedownEventPreventDefault:n}=this.mindMap.opt;if(t)return;let{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(!(e.ctrlKey||e.metaKey)&&(r?e.which!==1:e.which!==3))return;n&&e.preventDefault(),this.isMousedown=!0,this.cacheActiveList=[...this.mindMap.renderer.activeNodeList];let{x:s,y:a}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseDownX=s,this.mouseDownY=a,this.createRect(s,a)}onMousemove(e){if(this.mindMap.opt.readonly||!this.isMousedown)return;let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!(Math.abs(t-this.mouseDownX)<=10&&Math.abs(n-this.mouseDownY)<=10)&&(this.autoMove.clearAutoMoveTimer(),this.autoMove.onMove(e.clientX,e.clientY,()=>{this.isSelecting=!0,this.rect&&this.rect.plot([[this.mouseDownX,this.mouseDownY],[this.mouseMoveX,this.mouseDownY],[this.mouseMoveX,this.mouseMoveY],[this.mouseDownX,this.mouseMoveY]]),this.checkInNodes()},(r,s)=>{switch(r){case"left":this.mouseDownX+=s;break;case"top":this.mouseDownY+=s;break;case"right":this.mouseDownX-=s;break;case"bottom":this.mouseDownY-=s;break}}))}onMouseup(){this.mindMap.opt.readonly||this.isMousedown&&(this.checkTriggerNodeActiveEvent(),this.autoMove.clearAutoMoveTimer(),this.isMousedown=!1,this.cacheActiveList=[],this.rect&&this.rect.remove(),this.rect=null,setTimeout(()=>{this.isSelecting=!1},0))}checkTriggerNodeActiveEvent(){let e=this.cacheActiveList.length!==this.mindMap.renderer.activeNodeList.length,t=!1;if(!e)for(let n=0;n<this.cacheActiveList.length;n++){let r=this.cacheActiveList[n];if(!this.mindMap.renderer.activeNodeList.find(s=>s.getData("uid")===r.getData("uid"))){t=!0;break}}(e||t)&&this.mindMap.renderer.emitNodeActiveEvent()}createRect(e,t){this.rect&&this.rect.remove(),this.rect=this.mindMap.svg.polygon().stroke({color:"#0984e3"}).fill({color:"rgba(9,132,227,0.3)"}).plot([[e,t]])}checkInNodes(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),s=Math.min(this.mouseDownX,this.mouseMoveX),a=Math.min(this.mouseDownY,this.mouseMoveY),o=Math.max(this.mouseDownX,this.mouseMoveX),l=Math.max(this.mouseDownY,this.mouseMoveY);const h=c=>{let{left:d,top:f,width:m,height:v}=c,g=(d+m)*e+n,x=(f+v)*t+r;if(d=d*e+n,f=f*t+r,L2(s,o,a,l,d,g,f,x)){if(c.getData("isActive"))return;this.mindMap.renderer.addNodeToActiveList(c),this.mindMap.renderer.emitNodeActiveEvent()}else if(c.getData("isActive")){if(!c.getData("isActive"))return;this.mindMap.renderer.removeNodeFromActiveList(c),this.mindMap.renderer.emitNodeActiveEvent()}};Lr(this.mindMap.renderer.root,c=>{h(c),c._generalizationList&&c._generalizationList.length>0&&c._generalizationList.forEach(d=>{h(d.generalizationNode)})})}hasSelectRange(){return this.isSelecting}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Od.instanceName="select";const Dp="@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url("+new URL("KaTeX_AMS-Regular-BQhdFMY1.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_AMS-Regular-DMm9YOAa.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_AMS-Regular-DRggAlZN.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Caligraphic-Bold-BEiXGLvX.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Caligraphic-Bold-ATXxdsX0.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Caligraphic-Regular-Di6jR-x-.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Caligraphic-Regular-CTRA-rTL.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Caligraphic-Regular-wX97UBjC.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Fraktur-Bold-CL6g_b3V.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Fraktur-Bold-BsDP51OF.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Fraktur-Bold-BdnERNNW.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Fraktur-Regular-CTYiF6lA.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Fraktur-Regular-Dxdc4cR9.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Fraktur-Regular-CB_wures.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_Main-Bold-Cx986IdX.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Bold-Jm3AIy58.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Bold-waoOVXN0.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url('+new URL("KaTeX_Main-BoldItalic-DxDJ3AOS.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-BoldItalic-SpSLRI95.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-BoldItalic-DzxPMmG6.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_Main-Italic-NWA7e6Wa.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Italic-BMLOBm91.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Italic-3WenGoN9.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Main-Regular-B22Nviop.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Main-Regular-Dr94JaBh.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Main-Regular-ypZvNtVU.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url('+new URL("KaTeX_Math-BoldItalic-CZnvNsCZ.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Math-BoldItalic-iY-2wyZ7.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Math-BoldItalic-B3XSjfu4.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_Math-Italic-t53AETM-.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Math-Italic-DA0__PXp.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Math-Italic-flOr_0UB.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url('+new URL("KaTeX_SansSerif-Bold-D1sUS0GD.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Bold-DbIhKOiC.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Bold-CFMepnvq.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url('+new URL("KaTeX_SansSerif-Italic-C3H0VqGB.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Italic-DN2j7dab.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Italic-YYjJ1zSn.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_SansSerif-Regular-DDBCnlJ7.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_SansSerif-Regular-CS6fqUqJ.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_SansSerif-Regular-BNo7hRIc.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Script-Regular-D3wIWfF6.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Script-Regular-D5yQViql.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Script-Regular-C5JkGWo-.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size1-Regular-mCD8mA8B.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size1-Regular-C195tn64.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size1-Regular-Dbsnue_I.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size2-Regular-Dy4dx90m.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size2-Regular-oD1tc_U0.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size2-Regular-B7gKUWhC.ttf",import.meta.url).href+') 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('+new URL("KaTeX_Size3-Regular-CTq5MqoE.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size3-Regular-DgpXs0kz.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Size4-Regular-Dl5lxZxV.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Size4-Regular-BF-4gkZK.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Size4-Regular-DWFBv043.ttf",import.meta.url).href+') format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url('+new URL("KaTeX_Typewriter-Regular-CO6r4hn1.woff2",import.meta.url).href+') format("woff2"),url('+new URL("KaTeX_Typewriter-Regular-C0xS9mPB.woff",import.meta.url).href+') format("woff"),url('+new URL("KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf",import.meta.url).href+') 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}',Rp=1440*60*1e3;function qn(i,e=Date.now()){return i.pro||(i.trialUntil??0)>e}function Ip(i,e=Date.now()){const t=(i.trialUntil??0)-e;return t>0?Math.ceil(t/Rp):0}const Bd=/^ {0,3}(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/,Op=/^(\s*)([-*+]|\d+[.)])(?:([ \t]+)(.*))?$/,Bp=/^(?:"[^"]*"|'[^']*'|[^\s#"'-].*?)[ \t]*:(?:[ \t]|$)/,Pp=/^title:[ \t]*(\S.*)$/m,Mh=i=>i.length-i.trimStart().length,Na=i=>i.trim()==="";function Fp(i){const e=/^(#{1,6})(?:[ \t]+(.*))?$/.exec(i);if(!e)return null;const t=(e[2]??"").replace(/[ \t]+$/,""),n=/^#+$/.test(t)?"":t.replace(/[ \t]+#+$/,"").replace(/[ \t]+$/,"");return{level:e[1].length,text:n}}function ms(i){const e=/^\s*(`{3,}|~{3,})(.*)$/.exec(i);if(!e)return null;const t=e[1][0];return t==="`"&&e[2].includes("`")?null:{char:t,len:e[1].length}}function Pd(i,e){const t=/^\s*(`{3,}|~{3,})[ \t]*$/.exec(i);return!!(t&&t[1][0]===e.char&&t[1].length>=e.len)}function Hp(i,e){if(e===1)return!0;if(Na(i[1]))return!1;let t=!1;for(let n=1;n<e;n++){const r=i[n];if(!(Na(r)||/^[ \t]*#/.test(r)||/^[ \t]+/.test(r)||/^-[ \t]/.test(r))){if(!Bp.test(r))return!1;t=!0}}return t}function Fd(i,e){const t=/^"((?:[^"\\]|\\.)*)"(?:[ \t]+#.*)?$/.exec(i);if(t)try{return JSON.parse(`"${t[1]}"`)}catch{return t[1]}const n=/^'((?:[^']|'')*)'(?:[ \t]+#.*)?$/.exec(i);return n?n[1].replace(/''/g,"'"):(e?i.replace(/[ \t]+#.*$/,""):i).trim()}function Hd(i){var t;const e=(t=i.replace(/\r\n?/g,`
|
|
295
|
+
`).match(Pp))==null?void 0:t[1].trim();if(!(!e||/^[>|][-+]?$/.test(e)))return Fd(e,!1)||void 0}function Up(i,e,t){const n=t??(i.includes(`\r
|
|
296
|
+
`)?`\r
|
|
297
|
+
`:`
|
|
298
|
+
`),r=`title: ${JSON.stringify(e.replace(/\s*\r?\n\s*/g," "))}`,s=i.replace(/\r\n?/g,`
|
|
299
|
+
`);let a;return s?/^title:/m.test(s)?a=s.replace(/^title:.*(?:\n[ \t]+.*)*$/m,()=>r):a=s.replace(/---\n?$/,()=>`${r}
|
|
300
|
+
---
|
|
301
|
+
`):a=`---
|
|
302
|
+
${r}
|
|
303
|
+
---
|
|
304
|
+
`,n===`\r
|
|
305
|
+
`?a.replace(/\n/g,`\r
|
|
306
|
+
`):a}function $p(i){let e=null;for(const t of i.split(`
|
|
307
|
+
`))e?Pd(t,e)&&(e=null):e=ms(t);return e?`${i}
|
|
308
|
+
${e.char.repeat(e.len)}`:i}function Sh(i,e,t){const[n]=e.split(`
|
|
309
|
+
`,1);return(Bd.test(i+n)||t&&!e.includes(`
|
|
310
|
+
`)&&ms(e))&&(e="\\"+e),t?$p(e):e}function zh(i,e="Untitled"){var I;const t=i.startsWith("\uFEFF"),n=t?i.slice(1):i,r=n.includes(`\r
|
|
311
|
+
`)?`\r
|
|
312
|
+
`:`
|
|
313
|
+
`,s=n.replace(/\r\n?/g,`
|
|
314
|
+
`),a=n===""?!0:s.endsWith(`
|
|
315
|
+
`),o=s===""?[""]:(s.endsWith(`
|
|
316
|
+
`)?s.slice(0,-1):s).split(`
|
|
317
|
+
`);let l="",h=0;if(o[0]==="---"){const R=o.indexOf("---",1);R>0&&Hp(o,R)&&(l=o.slice(0,R+1).join(`
|
|
318
|
+
`)+`
|
|
319
|
+
`,h=R+1,e=Hd(l)??e)}const c={md:e,kind:"heading",level:0,children:[]},d=[{node:c,indent:-1,content:0,heading:0}];let f=0,m=-1,v=null,g=null;const x=[],w=R=>{x.length&&(R.dividersBefore=x.splice(0)),m<0?m=f:f&&(R.blankBefore=f),f=0,d[d.length-1].node.children.push(R)};for(;h<o.length;h++){const R=o[h];if(v){M(g,R),Pd(R,v)&&(v=null,g!=null&&g.node.unindentedBlock&&(g=null));continue}if(Na(R)){f++;continue}const F=Mh(R),ne=Bd.test(R);if(ne&&(!g||g.node.kind!=="item"||F<g.content)){for(;d.length>1&&d[d.length-1].heading===void 0;)d.pop();g=null,m<0?(m=f,x.push({blankBefore:0,line:R})):x.push({blankBefore:f,line:R}),f=0;continue}let Y=ne?null:Op.exec(R);Y&&Y[4]===void 0&&!f&&(g==null?void 0:g.node.kind)==="block"&&(Y=null);const re=Y?null:Fp(R);if(g&&!Y&&!re&&(F>=g.content||!f&&g.node.kind==="item"&&F>0)){N(g),M(g,R),v=ms(R);continue}if(re){const{level:q,text:he}=re;for(;d.length>1&&(d[d.length-1].heading===void 0||d[d.length-1].heading>=q);)d.pop();const fe={md:he,kind:"heading",level:q,children:[]};w(fe),d.push({node:fe,indent:-1,content:0,heading:q}),g=null;continue}if(Y){for(;d.length>1&&d[d.length-1].heading===void 0&&d[d.length-1].indent>=F;)d.pop();const q=Y[4]??"",he={md:q,kind:"item",marker:Y[2],children:[]};w(he),g={node:he,indent:F,content:F+Y[2].length+(((I=Y[3])==null?void 0:I.length)??1)},d.push(g),v=ms(q);continue}const j=ms(R);if(!f&&F===0&&j&&g&&g.node.kind==="item"){const q={md:R,kind:"block",unindentedBlock:!0,children:[]};w(q),g={node:q,indent:0,content:0},v=j;continue}for(;d.length>1&&d[d.length-1].heading===void 0;)d.pop();const $={md:R.slice(F),kind:"block",children:[]};w($),g={node:$,indent:F,content:F},v=j}function N(R){for(;f>0;f--)R.node.md+=`
|
|
320
|
+
`}function M(R,F){R.node.md+=`
|
|
321
|
+
`+(Na(F)?"":F.slice(Math.min(R.content,Mh(F))))}m<0&&(m=0);const z=x.length?x.splice(0):void 0,E=c.children,B={...z&&{trailingDividers:z},...t&&{bom:!0}};return E.length===1&&E[0].kind==="heading"?{frontMatter:l,leadingBlank:m,root:E[0],syntheticRoot:!1,trailingNewline:a,eol:r,...B}:{frontMatter:l,leadingBlank:m,root:c,syntheticRoot:!0,trailingNewline:a,eol:r,...B}}function Ch(i){return y0(i).md}function y0(i){const e=[],t=new Map,n=i.eol??`
|
|
322
|
+
`,r=i.frontMatter?i.frontMatter.replace(/\r\n?/g,`
|
|
323
|
+
`):"",s=r?r.split(`
|
|
324
|
+
`).length-1:0,a=(g=0)=>{for(let x=0;x<g;x++)e.push("")},o=(g,x,w)=>{const[N,...M]=x.replace(/\r\n?/g,`
|
|
325
|
+
`).split(`
|
|
326
|
+
`);e.push(N===""?g.trimEnd():g+N);for(const z of M)e.push(z===""?"":w+z)},l=(g,x=!1)=>g!=null&&g.length?(g.forEach((w,N)=>{x&&N===0||a(w.blankBefore),e.push(w.line)}),!0):!1;let h=i.root;for(;h.children.length;)h=h.children[h.children.length-1];const c=g=>{var x;return g!==h||!!((x=i.trailingDividers)!=null&&x.length)},d=(g,x)=>g.kind==="block"&&g.children.length===0&&(x.kind==="heading"||!!g.unindentedBlock),f=(g,x,w,N,M=!1)=>{const z=x.kind==="heading"||g.kind==="item",E=x.kind==="heading"?l(g.dividersBefore,M):!1;(!M||E)&&a(z?g.blankBefore:0);const B=x.children[x.children.indexOf(g)-1];if(g.kind==="item"&&g.md.split(`
|
|
327
|
+
`,1)[0]===""&&B&&d(B,x)&&e.at(-1)&&e.push(""),t.set(g,s+e.length),g.kind==="heading"&&x.kind==="heading"&&N<6&&!/\r|\n/.test(g.md)){const F=g.level&&g.level>N&&g.level<=6?g.level:N+1;o("#".repeat(F)+" ",g.md,""),g.children.forEach(ne=>f(ne,g,0,F));return}if(d(g,x)){o("",Sh("",g.md,c(g)),"");return}const I=g.kind==="item"&&g.marker?g.marker:"-",R=" ".repeat(w);o(R+I+" ",Sh(I+" ",g.md,c(g))," ".repeat(w+I.length+1)),g.children.forEach(F=>f(F,g,w+I.length+1,N))};if(a(i.leadingBlank),i.syntheticRoot)t.set(i.root,s+e.length),i.root.children.forEach((g,x)=>f(g,i.root,0,0,x===0));else{const g=Math.min(i.root.level||1,6);l(i.root.dividersBefore,!0)&&a(i.root.blankBefore),t.set(i.root,s+e.length),o("#".repeat(g)+" ",i.root.md.replace(/\s*\r?\n\s*/g," "),""),i.root.children.forEach(x=>f(x,i.root,0,g))}l(i.trailingDividers,e.length===0);const m=e.join(n),v=n===`\r
|
|
328
|
+
`?r.replace(/\n/g,`\r
|
|
329
|
+
`):r;return{md:(i.bom?"\uFEFF":"")+v+m+(i.trailingNewline&&e.length>0?n:""),lines:t}}function Ud(i){return/\n|[`*_\\|<>[\]!~]|\$[^\s$][\s\S]*\$|\$\$[\s\S]+\$\$|^#|^\d+\.\s/.test(i)}function w0(i){return i.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/[`*_~]|\\(?=.)/g,"").replace(/\s*\n\s*/g," ").trim()}const b0=/^inkmap:[ \t]*\n((?:[ \t]+.*\n)*)/m;function Nh(i,e){var s,a;const r=(a=(((s=i.replace(/\r\n?/g,`
|
|
330
|
+
`).match(b0))==null?void 0:s[1])??"").match(new RegExp(`^[ \\t]+${e}:[ \\t]*(.*)$`,"m")))==null?void 0:a[1].trim();return r&&Fd(r,!0)||void 0}function Gp(i,e,t){const n=i.includes(`\r
|
|
331
|
+
`)?`\r
|
|
332
|
+
`:`
|
|
333
|
+
`,r=i.replace(/\r\n?/g,`
|
|
334
|
+
`),s=` ${e}: ${t}
|
|
335
|
+
`;let a;if(!r)a=`---
|
|
336
|
+
inkmap:
|
|
337
|
+
${s}---
|
|
338
|
+
`;else{const o=r.match(b0);if(!o)a=r.replace(/---\n$/,`inkmap:
|
|
339
|
+
${s}---
|
|
340
|
+
`);else{const l=new RegExp(`^[ \\t]+${e}:.*\\n`,"m"),h=l.test(o[1])?o[1].replace(l,s):o[1]+s;a=r.replace(b0,`inkmap:
|
|
341
|
+
${h}`)}}return n===`\r
|
|
342
|
+
`?a.replace(/\n/g,`\r
|
|
343
|
+
`):a}function k0(i){const e=Ud(i);return{md:i,rich:e,text:e?w0(i)||" ":i}}function $d(i,e,t=[],n=0){const r=[...t,i.md];return{data:{...k0(i.md),kind:i.kind,level:i.level,marker:i.marker,blankBefore:i.blankBefore,unindentedBlock:i.unindentedBlock,dividersBefore:i.dividersBefore,expand:i.children.length?e(r,n):!0},children:i.children.map(s=>$d(s,e,r,n+1))}}const Mi=i=>(i.rich?i.md:String(i.text??"")).replace(/\r\n?/g,`
|
|
344
|
+
`);function Gd(i,e){var a;const{data:t}=i,n=(i.children??[]).map(o=>Gd(o,e)),r=t.kind??(n.some(o=>o.kind==="heading")?"heading":"item"),s={md:Mi(t),kind:r,level:t.level,marker:t.marker,blankBefore:t.blankBefore,...t.unindentedBlock&&{unindentedBlock:!0},...((a=t.dividersBefore)==null?void 0:a.length)&&{dividersBefore:t.dividersBefore},children:n};return e&&t.uid&&e.set(s,t.uid),s}function qp(i,e,t){return{...i,root:Gd(e,t)}}function qd(i,e=new Map,t=[]){const n=[...t,Mi(i.data)];return e.set(n.join("\0"),i.data.expand!==!1),(i.children??[]).forEach(r=>qd(r,e,n)),e}function Wd(i,e={},t=[]){var r;const n=[...t,Mi(i.data)];return(r=i.children)!=null&&r.length&&(e[n.join("\0")]=i.data.expand!==!1,i.children.forEach(s=>Wd(s,e,n))),e}const Yd=".ink-node{max-width:520px;padding:6px 12px;font-size:14px;line-height:1.6;color:var(--ink-text, #1f2329);white-space:normal;word-break:break-word;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Noto Sans SC,sans-serif;box-sizing:content-box}.ink-node.depth-0{font-size:18px;font-weight:600;color:#fff}.ink-node.depth-0 h1,.ink-node.depth-0 h2,.ink-node.depth-0 h3,.ink-node.depth-0 h4,.ink-node.depth-0 h5,.ink-node.depth-0 h6{color:inherit}.ink-node a{color:var(--ink-accent, #2563eb);text-decoration:underline;text-underline-offset:2px}.ink-node.depth-0 a{color:#dbeafe}.ink-node.depth-1{font-size:15px;font-weight:600}.ink-node:has(table),.ink-node:has(img),.ink-node:has(.katex-display){max-width:none}.ink-node .katex{font-size:1.08em}.ink-node .katex-display{margin:6px 0}.ink-node p{margin:0}.ink-node>*+*{margin-top:6px}.ink-node h1,.ink-node h2,.ink-node h3,.ink-node h4,.ink-node h5,.ink-node h6{margin:8px 0 4px;font-weight:600;line-height:1.4;color:var(--ink-text, #1f2329)}.ink-node h1:first-child,.ink-node h2:first-child,.ink-node h3:first-child,.ink-node h4:first-child{margin-top:0}.ink-node h1,.ink-node h2{font-size:15px}.ink-node h3{font-size:14px}.ink-node h4,.ink-node h5,.ink-node h6{font-size:13.5px}.ink-node hr{border:0;border-top:1px solid var(--ink-border, #dee0e3);margin:8px 0}.ink-node blockquote{margin:4px 0;padding:4px 10px;border-left:3px solid var(--ink-accent, #5b7fd4);background:color-mix(in srgb,var(--ink-text, #1f2329) 4%,transparent);border-radius:0 4px 4px 0}.ink-node ul,.ink-node ol{margin:0;padding-left:1.4em}.ink-node li+li{margin-top:3px}.ink-node em{font-style:normal;opacity:.72}.ink-node code{background:color-mix(in srgb,var(--ink-text, #1f2329) 8%,transparent);border-radius:3px;padding:0 4px;font-family:inherit;font-weight:600}.ink-node pre{background:color-mix(in srgb,var(--ink-text, #1f2329) 5%,transparent);border-radius:6px;padding:8px 10px;font:12.5px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}.ink-node pre code{background:none;padding:0;font-weight:400}.ink-node .ink-embedded-md{background:color-mix(in srgb,var(--ink-text, #1f2329) 3.5%,transparent);border-left:3px solid var(--ink-accent, #5b7fd4);border-radius:6px;padding:10px 12px;max-width:100%;box-sizing:border-box}.ink-node .ink-embedded-md>*+*{margin-top:6px}.ink-node img{display:block;border-radius:6px;border:1px solid var(--ink-border, #eff0f1)}.ink-node table{border-collapse:separate;border-spacing:0;border:1px solid var(--ink-border, #dee0e3);border-radius:6px;overflow:hidden;font-size:13px;line-height:20px;color:var(--ink-text, #1f2329);background:var(--ink-card, #fff)}.ink-node th,.ink-node td{border-bottom:1px solid var(--ink-border, #eff0f1);padding:5px 10px;text-align:left;vertical-align:top;max-width:360px}.ink-node th+th,.ink-node td+td{border-left:1px solid var(--ink-border, #eff0f1)}.ink-node thead th{background:color-mix(in srgb,var(--ink-accent, #5b7fd4) 14%,var(--ink-card, #fff));font-weight:600;white-space:nowrap}.ink-node tbody tr:nth-child(2n) td{background:color-mix(in srgb,var(--ink-text, #1f2329) 3%,var(--ink-card, #fff))}.ink-node tbody tr:last-child td{border-bottom:none}.ink-node .ink-diagram{max-width:948px;border:1px solid var(--ink-border, #dee0e3);border-radius:8px;background:#fff;overflow:hidden}.ink-node .ink-diagram-viewport{max-height:620px;max-width:946px;overflow:auto;padding:10px 12px;box-sizing:border-box}.ink-node .ink-diagram-image{display:block;border:0;cursor:zoom-in}.ink-node .ink-diagram-error{max-width:540px;margin:8px;overflow:auto;color:#28313b}.ink-node .ink-diagram-bar{display:flex;justify-content:flex-end;gap:6px;padding:6px 10px;border-top:1px solid #eef1f5;background:#f8fafc}.ink-node .ink-diagram-zoom,.ink-node .ink-diagram-edit{padding:2px 8px;border:1px solid #d8e0ea;border-radius:5px;background:#fff;color:#334155;font:inherit;font-size:12px;cursor:pointer}.ink-node .ink-diagram-zoom:hover,.ink-node .ink-diagram-edit:hover{background:#f0f4ff;border-color:#8fb0f5;color:#1d4ed8}";function Wp(i,e,t=!1){const r=document.querySelector("#phone-sign-in-template").content.firstElementChild.cloneNode(!0),s=r.querySelector("#phone-sign-in-title"),a=r.querySelector(".phone-sign-in-sub"),o=r.querySelector("#sign-in-phone"),l=r.querySelector("#sign-in-code"),h=r.querySelector("#send-phone-code"),c=r.querySelector("button[type=submit]"),d=r.querySelector("#cancel-phone-sign-in"),f=r.querySelector("#phone-sign-in-status");let m=!1,v=!1,g=!1,x,w=0,N=0,M,z=0,E="",B;function I(){window.clearTimeout(N);const j=Math.max(0,Math.ceil((w-Date.now())/1e3));s.textContent=Q(g?"phoneSignInForPay":"phoneSignIn"),a.textContent=Q(g?"phoneSignInForPaySub":"phoneSignInSub"),c.textContent=Q(g?"phoneVerifyAndPay":"phoneVerifySubmit"),h.textContent=j?Q("resendPhoneCode",{seconds:j}):Q("sendPhoneCode"),h.disabled=m||j>0,c.disabled=m,d.disabled=v,o.readOnly=l.readOnly=m,f.hidden=!B,B&&(f.textContent=Q(B.key),f.dataset.state=B.error?"error":""),r.isConnected&&j&&(N=window.setTimeout(I,1e3))}function R(){j0(r),d.setAttribute("aria-label",Q("close")),I()}function F(j=!1){r.isConnected&&(z++,r.remove(),r.reset(),window.clearTimeout(N),m=!1,v=!1,g=!1,x=void 0,E="",B=void 0,j&&(M==null||M.focus()),M=void 0)}function ne(j,$){j==="rateLimited"&&(w=Date.now()+6e4),B={key:j==="rateLimited"?"phoneRateLimited":j==="unavailable"?"phoneSignInUnavailable":j==="notPro"?"phoneNotPro":$?"phoneCodeInvalid":"phoneInvalid",error:!0}}function Y(j=!1){const $=o.value.normalize("NFKC").trim();if($.includes("@")){const he=$.toLowerCase();if(he.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(he))return he;j||(ne("invalid",!1),I(),o.focus());return}const q=$.replace(/[\s\-–‑]/g,"").replace(/^(?:\+86|0086|86(?=1\d{10}$))/,"");if(/^1[3-9]\d{9}$/.test(q))return q;j||(ne("invalid",!1),I(),o.focus())}async function re(j=!1){if(m)return;const $=Y(j);if(!$)return;const q=l.value.replace(/\D+/g,"").slice(0,6);if(q.length!==6){j||(ne("invalid",!0),I(),l.focus());return}const he=++z;m=v=!0,B=void 0,I();const fe=await i.verify($,q).catch(()=>({ok:!1,reason:"unavailable"}));if(he===z){if(m=v=!1,fe.ok){const Ze=x;F(),e(fe.value),Ze==null||Ze(fe.value);return}ne(fe.reason,!0),I(),l.select()}}return h.addEventListener("click",async()=>{const j=Y();if(!j||m||Date.now()<w)return;const $=++z;m=!0,E="",B=void 0,I();const q=await i.send(j).catch(()=>({ok:!1,reason:"unavailable"}));(q.ok||q.reason==="rateLimited")&&(w=Date.now()+6e4),$===z&&(m=!1,q.ok?(B={key:t&&!g&&j.includes("@")?"phoneCodeSentMagic":"phoneCodeSent",error:!1},l.focus()):ne(q.reason,!1),I())}),r.addEventListener("submit",j=>{j.preventDefault(),re(!1)}),c.addEventListener("click",j=>{j.preventDefault(),re(!1)}),o.addEventListener("input",()=>{E=""}),l.addEventListener("input",()=>{const j=l.value.replace(/\D+/g,"").slice(0,6);if(l.value!==j&&(l.value=j),j.length<6){E="";return}const $=`${o.value.trim()}:${j}`;j.length===6&&!m&&$!==E&&Y(!0)&&(E=$,re(!0))}),d.addEventListener("click",()=>F(!0)),{open(j,$,q){F(),M=$,d.hidden=(q==null?void 0:q.closable)===!1,g=!!(q!=null&&q.forPurchase),x=q==null?void 0:q.onVerified,q!=null&&q.prefill&&(o.value=q.prefill),j.append(r),R(),(q!=null&&q.prefill&&!h.disabled?h:o).focus()},close:F,isOpen:()=>r.isConnected,isVerifying:()=>v}}function Yp(i){return i%10===0?"¥"+(i/100).toFixed(1):"¥"+(i/100).toFixed(2)}function Xp(i=1500){return i%100===0?"$"+String(i/100):"$"+(i/100).toFixed(2)}function Vp(i,e,t,n,r){const a=document.querySelector("#wechat-pay-template").content.firstElementChild.cloneNode(!0),o=a.querySelector("#wechat-pay-title"),l=a.querySelector(".wechat-pay-sub"),h=a.querySelector("#wechat-pay-account"),c=a.querySelector("#wechat-pay-amount"),d=a.querySelector("#wechat-pay-stage"),f=a.querySelector("#wechat-pay-qr"),m=a.querySelector("#wechat-pay-expired"),v=a.querySelector("#refresh-wechat-pay"),g=a.querySelector("#card-pay-stage"),x=a.querySelector("#card-pay-btn"),w=a.querySelector("#wechat-pay-expires"),N=a.querySelector("#close-wechat-pay");let M,z,E=0,B=0,I=0,R=!1;function F(){if(!M)return;const j=M.mode==="card";a.dataset.mode=j?"card":"qr",o.textContent=Q(j?"cardPayTitle":"wechatPayTitle"),l.textContent=Q(j?"cardPaySub":"wechatPaySub");const $=t();if(h.hidden=!$,$&&(h.textContent=Q("wechatPayAccount",{account:$})),M.mode==="card"){c.textContent=Xp(M.amountCents??1500),d.hidden=!0,g.hidden=!1,x.textContent=Q("cardPayBtn"),w.textContent=Q("cardPayWaiting");return}c.textContent=Yp(M.amountFen),d.hidden=!1,g.hidden=!0,f.getAttribute("src")!==M.qr&&(f.src=M.qr);const q=M.expiresAt?Date.parse(M.expiresAt):NaN,he=Number.isFinite(q)&&q<=Date.now();if(m.hidden=!he,v.disabled=R,he)w.textContent=Q("wechatPayExpired");else if(Number.isFinite(q)){const fe=new Intl.DateTimeFormat(Ft()==="zh"?"zh-CN":"en-US",{hour:"2-digit",minute:"2-digit"}).format(q);w.textContent=Q("wechatPayWaiting",{time:fe})}else w.textContent=Q("wechatPayWaitingSimple")}function ne(){if(window.clearTimeout(E),window.clearTimeout(B),!a.isConnected||!M)return;const j=I;if(M.mode!=="card"){const $=M.expiresAt?Date.parse(M.expiresAt):NaN;if(Number.isFinite($)){const q=$-Date.now();if(q<=0){F();return}B=window.setTimeout(()=>{j===I&&F()},q+50)}}E=window.setTimeout(async()=>{if(!(j!==I||!a.isConnected||!M)){try{if(M.mode==="card"){const $=await e();if(j!==I||!a.isConnected)return;if($.pro){re(),n($);return}}else{const $=await i();if(j!==I||!a.isConnected)return;if($.status==="active"){re(),n($.state);return}$.status==="qr"&&Ft()==="zh"&&(M={mode:"qr",...$},F())}}catch{}j===I&&a.isConnected&&ne()}},4e3)}function Y(){j0(a),N.setAttribute("aria-label",Q("close")),F()}function re(j=!1){a.isConnected&&(I++,window.clearTimeout(E),window.clearTimeout(B),a.remove(),M=void 0,R=!1,j&&(z!=null&&z.getClientRects().length)&&z.focus(),z=void 0)}return v.addEventListener("click",async()=>{if(R)return;const j=++I;R=!0,F();try{const $=await i();if(j!==I||!a.isConnected)return;if($.status==="active"){re(),n($.state);return}$.status==="qr"&&Ft()==="zh"&&(M={mode:"qr",...$})}catch{}finally{j===I&&(R=!1,F(),ne())}}),x.addEventListener("click",()=>{(M==null?void 0:M.mode)==="card"&&r(M.url)}),N.addEventListener("click",()=>re(!0)),{open(j,$,q){re(),I++,z=$,M=q,j.append(a),Y(),ne(),(q.mode==="card"?x:N).focus()},close:re,isOpen:()=>a.isConnected}}const J=i=>document.querySelector(i),jp=["markdown","diagram","browser","export","layouts","themes","replace","present","updates"];async function Kp(i,e){var Zt;let t={pro:!1};const n=[];let r=0;const s=J("#pro"),a=J("#account"),o=J("#account-panel"),l=J("#account-badge"),h=J("#account-heading"),c=J("#account-text"),d=J("#account-plan-status"),f=J("#account-plan-title"),m=J("#account-plan-detail"),v=J("#account-perks"),g=J("#account-actions"),x=J("#account-message"),w=J("#account-buy"),N=J("#account-sign-in"),M=J("#switch-account"),z=J("#sign-out"),E=J("#upgrade"),B=J("#bar"),I=E.querySelector(".upgrade-card"),R=J("#checkout-msg"),F=J("#buy-pro"),ne=J("#upgrade-sign-in"),Y=J("#upgrade-account-actions"),re=J("#upgrade-account"),j=J("#upgrade-switch-account"),$=J("#upgrade-sign-out"),q=J("#trial-status"),he=J("#trial-expired-message"),fe=J(".upgrade-close"),Ze=J(".upgrade-features"),lt=i.capabilities.account==="purchase",Ue=i.capabilities.account!=="none",St=[w,N,M,z,F,ne,j,$];let dt=!1,Qe=null;const Xe=()=>!!(t.connected||t.pro||t.account),Ci=()=>[F,ne,j].find(W=>W.getClientRects().length&&!W.disabled)??I,Z=i.phoneSignIn&&Wp(i.phoneSignIn,W=>{Tt(W),o.hidden?E.hidden||Ci().focus():s.focus()},!lt),Me=i.orderPro&&Vp(()=>i.orderPro(),()=>i.license(),()=>t.account,W=>{Tt(W),e==null||e(Q("proUnlocked"))},W=>{i.openExternalUrl?i.openExternalUrl(W):window.open(W,"_blank","noopener,noreferrer")});I.tabIndex=-1,o.tabIndex=-1,Ze.hidden=!lt;function bt(){for(const W of jp){let de=Ze.querySelector(`[data-feature="${W}"]`);de||(de=document.createElement("li"),de.dataset.feature=W,Ze.append(de)),de.textContent=Q(`feature.${W}`)}}function Ve(){lt||(J("#upgrade-title").textContent=Q("accountTitle"),J(".upgrade-sub").textContent=Q(Ue?"accountSync":"accountUnavailable"))}bt(),Ve();function Kt(W){dt=W;for(const de of St)de.disabled=W}function O(W,de,Ne,ye){if(W.textContent=de,ye){const me=document.createElement("div");me.className="popup-fallback-actions";const De=document.createElement("a");De.className="popup-fallback-link",De.href=ye,De.target="_blank",De.rel="noopener noreferrer",De.textContent=`${Q("openLoginLink")} ↗`;const je=document.createElement("button");je.type="button",je.className="popup-copy-link",je.textContent=Q("copyLink"),je.addEventListener("click",()=>{var _t;(_t=navigator.clipboard)==null||_t.writeText(ye).then(()=>{je.textContent=Q("linkCopied"),window.setTimeout(()=>{je.textContent=Q("copyLink")},1800)})}),me.append(De,je),W.append(me)}W.dataset.state=Ne,W.hidden=!1}async function xi(W,de){if(dt||Z!=null&&Z.isVerifying()||(W==="buy"?!lt:!Ue))return!1;const Ne=document.activeElement;Kt(!0),de.hidden=!0;try{return await i.checkout(W),(W==="buy"?!t.pro:!Xe())&&O(de,Q(W==="buy"?"checkoutOpened":"signInOpened"),W==="buy"?"buy":"signIn"),!0}catch(ye){const me=String(ye instanceof Error?ye.message:ye),De=W==="restore"?"signInFailed":"checkoutFailed",je=Q(De,{error:""}).replace(/[::\s]+$/,""),_t=ye instanceof Qo?ye.url:void 0;return O(de,me.startsWith(je)?me:Q(De,{error:me}),"error",_t),!1}finally{Kt(!1),Ne instanceof HTMLElement&&Ne.getClientRects().length&&(document.activeElement===document.body||document.activeElement===I)&&Ne.focus()}}async function Je(W){if(!(dt||Z!=null&&Z.isVerifying()||!Ue)){Z==null||Z.close(),Me==null||Me.close(),Kt(!0),W.hidden=!0;try{await i.signOut();const de=await i.license().catch(()=>({pro:!1,trialUntil:t.trialUntil}));Tt(de),e==null||e(Q("signedOut"))}catch(de){O(W,Q("signOutFailed",{error:String(de instanceof Error?de.message:de)}),"error")}finally{Kt(!1),Xe()||(E.hidden?N:ne).focus()}}}function kt(W,de,Ne){dt||Z!=null&&Z.isVerifying()||(Me==null||Me.close(),Z?(Ne.hidden=!0,Z.open(J(de),W,{prefill:t.lastSignIn})):xi("restore",Ne))}async function $t(W,de,Ne,ye=!1){if(!(dt||Z!=null&&Z.isVerifying()||!lt)){if(!i.orderPro)return xi("buy",Ne);Kt(!0),Ne.hidden=!0;try{const me=await i.orderPro();if(me.status==="active"){Tt(me.state),e==null||e(Q("proUnlocked"));return}if(me.status==="qr"){if(Ft()==="en"){O(Ne,Q("cardComingSoon"),"error");return}Z==null||Z.close(),Me==null||Me.open(J(de),W,{mode:"qr",...me});return}if(me.status==="needsPhone"&&Z){if(ye){Z.close(),O(Ne,Q("checkoutFailed",{error:Q("signInPageUnavailable")}),"error");return}Me==null||Me.close(),Z.open(J(de),W,{forPurchase:!0,prefill:t.lastSignIn,onVerified:De=>{De.pro||$t(W,de,Ne,!0)}});return}if(me.status==="redirect"){if(Ft()==="zh"){O(Ne,Q("checkoutFailed",{error:Q("signInPageUnavailable")}),"error");return}Z==null||Z.close(),Me&&me.url!=="about:blank"?Me.open(J(de),W,{mode:"card",url:me.url,amountCents:1500}):O(Ne,Q("checkoutOpened"),"buy");return}}catch(me){const De=String(me instanceof Error?me.message:me),je=Q("checkoutFailed",{error:""}).replace(/[::\s]+$/,""),_t=me instanceof Qo?me.url:void 0;O(Ne,De.startsWith(je)?De:Q("checkoutFailed",{error:De}),"error",_t)}finally{Kt(!1)}}}w.addEventListener("click",()=>void $t(w,"#account-phone-slot",x)),N.addEventListener("click",()=>kt(N,"#account-phone-slot",x)),M.addEventListener("click",()=>kt(M,"#account-phone-slot",x)),z.addEventListener("click",()=>void Je(x)),F.addEventListener("click",()=>void $t(F,"#upgrade-phone-slot",R)),ne.addEventListener("click",()=>kt(ne,"#upgrade-phone-slot",R)),j.addEventListener("click",()=>kt(j,"#upgrade-phone-slot",R)),$.addEventListener("click",()=>void Je(R));function Le(W,de=!1){o.hidden!==!W&&(!W&&o.querySelector(".phone-sign-in")&&(Z!=null&&Z.isVerifying())||(o.hidden=!W,!W&&o.querySelector(".phone-sign-in")&&(Z==null||Z.close()),!W&&o.querySelector(".wechat-pay")&&(Me==null||Me.close()),s.setAttribute("aria-expanded",String(W)),!W&&de&&s.focus()))}s.addEventListener("click",()=>Le(!!o.hidden)),document.addEventListener("pointerdown",W=>{W.target instanceof Node&&!a.contains(W.target)&&Le(!1)}),a.addEventListener("focusout",W=>{W.relatedTarget instanceof Node&&W.relatedTarget!==document.body&&!a.contains(W.relatedTarget)&&Le(!1)});function oi(){!qn(t)||E.hidden||I.querySelector(".phone-sign-in")&&(Z!=null&&Z.isVerifying())||(I.querySelector(".phone-sign-in")&&(Z==null||Z.close()),I.querySelector(".wechat-pay")&&(Me==null||Me.close()),E.hidden=!0,_e(!0),(Qe!=null&&Qe.getClientRects().length?Qe:s).focus(),Qe=null)}window.addEventListener("keydown",W=>{var Ne;if(W.key==="Escape"&&(Me!=null&&Me.isOpen())){W.preventDefault(),W.stopImmediatePropagation(),Me.close(!0);return}if(W.key==="Escape"&&(Z!=null&&Z.isOpen())){W.preventDefault(),W.stopImmediatePropagation(),Z.isVerifying()||Z.close(!0);return}if(W.key==="Escape"&&!o.hidden){W.preventDefault(),W.stopImmediatePropagation(),Le(!1,!0);return}if(E.hidden)return;if(W.key==="Escape"){W.preventDefault(),W.stopImmediatePropagation(),oi();return}const de=!qn(t);if(W.target instanceof Node&&(E.contains(W.target)||de&&a.contains(W.target))||(W.preventDefault(),Ci().focus()),W.key==="Tab"){const ye="button:not(:disabled), input:not(:disabled), select",me=[...de?a.querySelectorAll(ye):[],...I.querySelectorAll(ye)].filter(je=>je.getClientRects().length>0),De=W.shiftKey?me[0]:me.at(-1);De&&(document.activeElement===De||document.activeElement===I)&&(W.preventDefault(),(Ne=W.shiftKey?me.at(-1):me[0])==null||Ne.focus())}W.stopImmediatePropagation()},!0),E.addEventListener("pointerdown",W=>W.target===E&&oi()),fe.addEventListener("click",oi);function _e(W){I.setAttribute("aria-modal",String(W));for(const de of document.body.children)de instanceof HTMLElement&&de!==E&&de.tagName!=="SCRIPT"&&(de.inert=!E.hidden&&(W||de!==B))}function At(W){var me;const de=qn(t),Ne=Z==null?void 0:Z.isVerifying();if(t.pro||de&&(Ne||!lt))return;E.hidden&&(Qe=document.activeElement instanceof HTMLElement?document.activeElement:null,(me=i.track)==null||me.call(i,"paywall_view")),Le(!1);const ye=J(".upgrade-locked");ye.hidden=!W||de,W&&(ye.textContent=Q("locked",{feature:Q(`featureName.${W}`)})),Ze.querySelectorAll("li").forEach(De=>De.classList.toggle("highlight",De.dataset.feature===W)),R.hidden=!0,E.hidden=!1,_e(de),Ne||Ci().focus()}function ut(){clearTimeout(r);const W=Date.now(),de=qn(t,W);document.documentElement.classList.toggle("trial-expired",!de),document.documentElement.classList.toggle("pro",de),document.documentElement.classList.toggle("pro-member",t.pro);const Ne=Ip(t,W),ye=!t.pro&&de,me=Q(t.pro?"proBadge":ye?"trialBadge":"trialEnded",{days:Ne}),De=ye?new Intl.DateTimeFormat(Ft()==="zh"?"zh-CN":"en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t.trialUntil):"",je=ye?Q("trialUntil",{date:De}):"";l.textContent=me,s.setAttribute("aria-label",`${Q("accountHeading")} · ${me}`),s.hidden=!1,a.dataset.plan=t.pro?"pro":!ye||Ne<=2?"ending":"trial",a.dataset.signedIn=String(Xe()),c.textContent=t.account||Q(Xe()?"accountConnected":"accountSignedOut"),h.textContent=Q(Xe()?"accountHeading":lt?"accountSignedOutSub":"accountSignedOutRestoreSub"),d.hidden=!1,f.textContent=Q(t.pro?"proActive":ye?"trialPlan":"trialEnded"),m.textContent=t.pro?Q("proActiveDetail"):ye?je:Q("noProOnAccount"),w.hidden=!lt||t.pro,v.hidden=!lt||t.pro;const _t=lt?"signInSecondary":Z?"phoneSignIn":"signIn",li=!de&&!lt&&Ue&&!!Z&&!Xe();for(const Qt of[N,ne])Qt.textContent=Q(_t);if(N.hidden=!Ue||Xe(),M.hidden=!Ue||!Xe(),g.hidden=!Ue||!Xe(),!Ue&&!t.pro&&O(x,Q("accountUnavailable"),"signIn"),ye){const Qt=Math.min(Math.max(50,t.trialUntil-W+25),36e5);r=window.setTimeout(()=>{ut(),n.forEach(yi=>yi(t))},Qt)}fe.hidden=!de,q.hidden=!ye,q.textContent=je,he.hidden=de,he.textContent=Q(lt?Xe()?"trialExpiredSignedIn":"trialExpired":Ue?Xe()?"trialExpiredNoPro":"trialExpiredSignIn":"trialExpiredNoAccount"),F.hidden=!lt||t.pro,ne.hidden=!Ue||Xe()||li,Y.hidden=de||!Ue||!Xe(),j.hidden=Y.hidden,re.hidden=Y.hidden,re.textContent=t.account||Q("accountConnected"),J(".upgrade-buy").hidden=F.hidden&&ne.hidden,_e(de),t.pro?oi():!de&&E.hidden&&At(),li&&!E.hidden&&!Z.isOpen()&&Z.open(J("#upgrade-phone-slot"),ne,{prefill:t.lastSignIn,closable:!1})}function Tt(W){const de=Xe(),Ne=t.pro;t=W;const ye=!de&&Xe()&&!!(Z!=null&&Z.isOpen())&&!(Z!=null&&Z.isVerifying());if(ye&&(Z==null||Z.close()),t.pro&&(Me!=null&&Me.isOpen())&&Me.close(),!Ne&&t.pro?e==null||e(Q("proUnlocked")):ye&&(e==null||e(Q("magicSignedIn"))),ut(),!de&&Xe()){for(const me of[x,R])me.dataset.state==="signIn"&&(me.hidden=!0);!o.hidden&&document.activeElement===document.body&&s.focus(),!E.hidden&&o.hidden&&!I.contains(document.activeElement)&&Ci().focus()}n.forEach(me=>me(t))}let Ni=!1;i.onLicenseChange(W=>{Ni=!0,Tt(W)}),(Zt=i.onOpenAccountRequest)==null||Zt.call(i,()=>{qn(t)?Le(!0,!0):At()});const zt=await i.license().catch(()=>t);return Ni||Tt(zt),{isPro:()=>qn(t),isPaidPro:()=>!!t.pro,allow(W){return qn(t)?!0:(At(W),!1)},openUpgrade:At,onChange:W=>n.push(W)}}class ee extends Error{constructor(e,t){var n="KaTeX parse error: "+e,r,s,a=t&&t.loc;if(a&&a.start<=a.end){var o=a.lexer.input;r=a.start,s=a.end,r===o.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=o.slice(r,s).replace(/[^]/g,"$&̲"),h;r>15?h="…"+o.slice(r-15,r):h=o.slice(0,r);var c;s+15<o.length?c=o.slice(s,s+15)+"…":c=o.slice(s),n+=h+l+c}super(n),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,ee.prototype),this.position=r,r!=null&&s!=null&&(this.length=s-r),this.rawMessage=e}}var Zp=/([A-Z])/g,Qp=i=>i.replace(Zp,"-$1").toLowerCase(),Jp={"&":"&",">":">","<":"<",'"':""","'":"'"},em=/[&><"']/g,Ut=i=>String(i).replace(em,e=>Jp[e]),ga=i=>i.type==="ordgroup"||i.type==="color"?i.body.length===1?ga(i.body[0]):i:i.type==="font"?ga(i.body):i,tm=new Set(["mathord","textord","atom"]),on=i=>tm.has(ga(i).type),im=i=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(i);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},T0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:i=>"#"+i},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(i,e)=>(e.push(i),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:i=>Math.max(0,i),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:i=>Math.max(0,i),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:i=>Math.max(0,i),cli:"-e, --max-expand <n>",cliProcessor:i=>i==="Infinity"?1/0:parseInt(i)},globalGroup:{type:"boolean",cli:!1}};function nm(i){if(typeof i!="string")return i.enum[0];switch(i){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function rm(i){if(i.default!==void 0)return i.default;var e=Array.isArray(i.type)?i.type[0]:i.type;return nm(e)}function sm(i,e,t,n){var r=t[e];i[e]=r!==void 0?n.processor?n.processor(r):r:rm(n)}class ml{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t of Object.keys(T0)){var n=T0[t];n&&sm(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r=="function"&&(r=r(e,t,n)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new ee("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),n);r==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r=="function")try{r=r(e,t,n)}catch{r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=im(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class kn{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ui[am[this.id]]}sub(){return Ui[om[this.id]]}fracNum(){return Ui[lm[this.id]]}fracDen(){return Ui[hm[this.id]]}cramp(){return Ui[cm[this.id]]}text(){return Ui[dm[this.id]]}isTight(){return this.size>=2}}var gl=0,La=1,Ar=2,rn=3,Ss=4,Si=5,Ir=6,Xt=7,Ui=[new kn(gl,0,!1),new kn(La,0,!0),new kn(Ar,1,!1),new kn(rn,1,!0),new kn(Ss,2,!1),new kn(Si,2,!0),new kn(Ir,3,!1),new kn(Xt,3,!0)],am=[Ss,Si,Ss,Si,Ir,Xt,Ir,Xt],om=[Si,Si,Si,Si,Xt,Xt,Xt,Xt],lm=[Ar,rn,Ss,Si,Ir,Xt,Ir,Xt],hm=[rn,rn,Si,Si,Xt,Xt,Xt,Xt],cm=[La,La,rn,rn,Si,Si,Xt,Xt],dm=[gl,La,Ar,rn,Ar,rn,Ar,rn],Te={DISPLAY:Ui[gl],TEXT:Ui[Ar],SCRIPT:Ui[Ss],SCRIPTSCRIPT:Ui[Ir]},E0=[{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 um(i){for(var e=0;e<E0.length;e++)for(var t=E0[e],n=0;n<t.blocks.length;n++){var r=t.blocks[n];if(i>=r[0]&&i<=r[1])return t.name}return null}var va=[];E0.forEach(i=>i.blocks.forEach(e=>va.push(...e)));function Xd(i){for(var e=0;e<va.length;e+=2)if(i>=va[e]&&i<=va[e+1])return!0;return!1}var Et=i=>i+" "+i,Tr=80,fm=function(e,t){return"M95,"+(622+e+t)+`
|
|
345
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
346
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
347
|
+
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
|
|
348
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
349
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
350
|
+
l`+e/2.075+" -"+e+`
|
|
351
|
+
c5.3,-9.3,12,-14,20,-14
|
|
352
|
+
H400000v`+(40+e)+`H845.2724
|
|
353
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
354
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
355
|
+
M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},pm=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
356
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
357
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
358
|
+
l`+e/2.084+" -"+e+`
|
|
359
|
+
c4.7,-7.3,11,-11,19,-11
|
|
360
|
+
H40000v`+(40+e)+`H1012.3
|
|
361
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
362
|
+
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
|
|
363
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
364
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
365
|
+
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},mm=function(e,t){return"M983 "+(10+e+t)+`
|
|
366
|
+
l`+e/3.13+" -"+e+`
|
|
367
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
368
|
+
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
|
|
369
|
+
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
|
|
370
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
371
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
372
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
373
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
374
|
+
M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},gm=function(e,t){return"M424,"+(2398+e+t)+`
|
|
375
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
376
|
+
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
|
|
377
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
378
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
379
|
+
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
380
|
+
v`+(40+e)+`H1014.6
|
|
381
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
382
|
+
c-2,6,-10,9,-24,9
|
|
383
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+`
|
|
384
|
+
h400000v`+(40+e)+"h-400000z"},vm=function(e,t){return"M473,"+(2713+e+t)+`
|
|
385
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
|
|
386
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
387
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
388
|
+
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
|
|
389
|
+
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
|
|
390
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
391
|
+
606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},xm=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},ym=function(e,t,n){var r=n-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+`
|
|
392
|
+
H742v`+r+`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
|
|
393
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
394
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
395
|
+
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},wm=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=fm(t,Tr);break;case"sqrtSize1":r=pm(t,Tr);break;case"sqrtSize2":r=mm(t,Tr);break;case"sqrtSize3":r=gm(t,Tr);break;case"sqrtSize4":r=vm(t,Tr);break;case"sqrtTall":r=ym(t,Tr,n)}return r},bm=function(e,t){switch(e){case"⎜":return Et("M291 0 H417 V"+t+" H291z");case"∣":return Et("M145 0 H188 V"+t+" H145z");case"∥":return Et("M145 0 H188 V"+t+" H145z")+Et("M367 0 H410 V"+t+" H367z");case"⎟":return Et("M457 0 H583 V"+t+" H457z");case"⎢":return Et("M319 0 H403 V"+t+" H319z");case"⎥":return Et("M263 0 H347 V"+t+" H263z");case"⎪":return Et("M384 0 H504 V"+t+" H384z");case"⏐":return Et("M312 0 H355 V"+t+" H312z");case"‖":return Et("M257 0 H300 V"+t+" H257z")+Et("M478 0 H521 V"+t+" H478z");default:return""}},Lh={doubleleftarrow:`M262 157
|
|
396
|
+
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
|
|
397
|
+
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
|
|
398
|
+
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
|
|
399
|
+
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
|
|
400
|
+
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
|
|
401
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
402
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
403
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
404
|
+
-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
|
|
405
|
+
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
|
|
406
|
+
-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
|
|
407
|
+
-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
|
|
408
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
409
|
+
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
|
|
410
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
411
|
+
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
|
|
412
|
+
-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
|
|
413
|
+
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
|
|
414
|
+
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
|
|
415
|
+
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
|
|
416
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
417
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
418
|
+
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
|
|
419
|
+
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
|
|
420
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
421
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
422
|
+
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
|
|
423
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
424
|
+
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
|
|
425
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
426
|
+
-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
|
|
427
|
+
-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
|
|
428
|
+
-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
|
|
429
|
+
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
|
|
430
|
+
-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
|
|
431
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
432
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
433
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
434
|
+
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
|
|
435
|
+
-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
|
|
436
|
+
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
|
|
437
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
438
|
+
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
|
|
439
|
+
-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
|
|
440
|
+
-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
|
|
441
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Et("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Et("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Et("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Et("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
442
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
443
|
+
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
|
|
444
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Et("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
445
|
+
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
|
|
446
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
447
|
+
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
|
|
448
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
449
|
+
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
|
|
450
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
451
|
+
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
|
|
452
|
+
-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
|
|
453
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
454
|
+
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
|
|
455
|
+
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
|
|
456
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
457
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
458
|
+
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
|
|
459
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
460
|
+
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
|
|
461
|
+
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
|
|
462
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
463
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
464
|
+
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
|
|
465
|
+
-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
|
|
466
|
+
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
|
|
467
|
+
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
|
|
468
|
+
-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
|
|
469
|
+
-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
|
|
470
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
471
|
+
-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
|
|
472
|
+
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
|
|
473
|
+
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
|
|
474
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
475
|
+
-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
|
|
476
|
+
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
|
|
477
|
+
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
|
|
478
|
+
-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
|
|
479
|
+
-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
|
|
480
|
+
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
|
|
481
|
+
-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
|
|
482
|
+
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
|
|
483
|
+
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
|
|
484
|
+
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
|
|
485
|
+
-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
|
|
486
|
+
-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
|
|
487
|
+
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
|
|
488
|
+
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
|
|
489
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
490
|
+
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
|
|
491
|
+
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
|
|
492
|
+
-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
|
|
493
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Et("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Et("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Et("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
494
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
495
|
+
-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
|
|
496
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
497
|
+
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
|
|
498
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
499
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
500
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
501
|
+
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
|
|
502
|
+
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
|
|
503
|
+
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
|
|
504
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
505
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
506
|
+
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
|
|
507
|
+
-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
|
|
508
|
+
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
|
|
509
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
510
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
511
|
+
-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
|
|
512
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
513
|
+
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
|
|
514
|
+
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
|
|
515
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
516
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
517
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
518
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
519
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
520
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
521
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
522
|
+
-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
|
|
523
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
524
|
+
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
|
|
525
|
+
-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
|
|
526
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
527
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
528
|
+
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
|
|
529
|
+
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
|
|
530
|
+
-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
|
|
531
|
+
-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
|
|
532
|
+
-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,
|
|
533
|
+
-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,
|
|
534
|
+
-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,
|
|
535
|
+
-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,
|
|
536
|
+
-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
|
|
537
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
538
|
+
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
|
|
539
|
+
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
|
|
540
|
+
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
|
|
541
|
+
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
|
|
542
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
543
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
544
|
+
-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
|
|
545
|
+
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
|
|
546
|
+
-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
|
|
547
|
+
-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
|
|
548
|
+
-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
|
|
549
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
550
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
551
|
+
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
|
|
552
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
553
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
554
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
555
|
+
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,
|
|
556
|
+
-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
|
|
557
|
+
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
|
|
558
|
+
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
|
|
559
|
+
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,
|
|
560
|
+
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,
|
|
561
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
562
|
+
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
|
|
563
|
+
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,
|
|
564
|
+
-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
|
|
565
|
+
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
|
|
566
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},km=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84
|
|
567
|
+
H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z
|
|
568
|
+
M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
|
|
569
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
570
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15
|
|
571
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
572
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
573
|
+
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
574
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
575
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z
|
|
576
|
+
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z
|
|
577
|
+
MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z
|
|
578
|
+
M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z
|
|
579
|
+
M347 1759 V0 h-84 V1759 v`+t+" 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
|
|
580
|
+
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,
|
|
581
|
+
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
582
|
+
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
|
|
583
|
+
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,
|
|
584
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
585
|
+
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
586
|
+
-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,
|
|
587
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
588
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
589
|
+
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
|
|
590
|
+
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
|
|
591
|
+
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
|
|
592
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
593
|
+
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
594
|
+
-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.")}};function Tm(i){return"toText"in i}class Ur{constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Tm(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var M0={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},Em={ex:!0,em:!0,mu:!0},Vd=function(e){return typeof e!="string"&&(e=e.unit),e in M0||e in Em||e==="ex"},ot=function(e,t){var n;if(e.unit in M0)n=M0[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")n=t.fontMetrics().cssEmPerMu;else{var r;if(t.style.isTight()?r=t.havingStyle(t.style.text()):r=t,e.unit==="ex")n=r.fontMetrics().xHeight;else if(e.unit==="em")n=r.fontMetrics().quad;else throw new ee("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ie=function(e){return+e.toFixed(4)+"em"},Ln=function(e){return e.filter(t=>t).join(" ")},vl=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=Qp(n)+":"+r+";")}return t},jd=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Kd=function(e){var t=document.createElement(e);t.className=Ln(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},Mm=/[\s"'>/=\x00-\x1f]/,Zd=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Ut(Ln(this.classes))+'"');var n=vl(this.style);n&&(t+=' style="'+Ut(n)+'"');for(var r of Object.keys(this.attributes)){if(Mm.test(r))throw new ee("Invalid attribute name '"+r+"'");t+=" "+r+'="'+Ut(this.attributes[r])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t};class $r{constructor(e,t,n,r){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,this.italic=void 0,jd.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Kd.call(this,"span")}toMarkup(){return Zd.call(this,"span")}}class Wa{constructor(e,t,n,r){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,jd.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Kd.call(this,"a")}toMarkup(){return Zd.call(this,"a")}}class Sm{constructor(e,t,n){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=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Ut(this.src)+'"'+(' alt="'+Ut(this.alt)+'"'),t=vl(this.style);return t&&(e+=' style="'+Ut(t)+'"'),e+="'/>",e}}var zm={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class pi{constructor(e,t,n,r,s,a,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=s||0,this.width=a||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var h=um(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=zm[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement("span"),t.style.marginRight=ie(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Ln(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Ut(Ln(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+ie(this.italic)+";"),n+=vl(this.style),n&&(e=!0,t+=' style="'+Ut(n)+'"');var r=Ut(this.text);return e?(t+=">",t+=r,t+="</span>",t):r}}class sn{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ut(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class An{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",Lh[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+Ut(this.alternate)+'"/>':'<path d="'+Ut(Lh[this.pathName])+'"/>'}}class S0{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);return t}toMarkup(){var e="<line";for(var t of Object.keys(this.attributes))e+=" "+t+'="'+Ut(this.attributes[t])+'"';return e+="/>",e}}function Cm(i){if(i instanceof pi)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function Nm(i){if(i instanceof $r)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var Lm=i=>i instanceof $r||i instanceof Wa||i instanceof Ur,Gi={"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]}},na={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ah={Å:"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 Am(i,e){Gi[i]=e}function xl(i,e,t){if(!Gi[e])throw new Error("Font metrics not found for font: "+e+".");var n=i.charCodeAt(0),r=Gi[e][n];if(!r&&i[0]in Ah&&(n=Ah[i[0]].charCodeAt(0),r=Gi[e][n]),!r&&t==="text"&&Xd(n)&&(r=Gi[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var To={};function _m(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!To[e]){var t=To[e]={cssEmPerMu:na.quad[e]/18};for(var n in na)na.hasOwnProperty(n)&&(t[n]=na[n][e])}return To[e]}var it={math:{},text:{}};function u(i,e,t,n,r,s){it[i][r]={font:e,group:t,replace:n},s&&n&&(it[i][n]=it[i][r])}var p="math",V="text",y="main",S="ams",rt="accent-token",ce="bin",jt="close",Gr="inner",xe="mathord",wt="op-token",gi="open",Ds="punct",C="rel",ln="spacing",L="textord";u(p,y,C,"≡","\\equiv",!0);u(p,y,C,"≺","\\prec",!0);u(p,y,C,"≻","\\succ",!0);u(p,y,C,"∼","\\sim",!0);u(p,y,C,"⊥","\\perp");u(p,y,C,"⪯","\\preceq",!0);u(p,y,C,"⪰","\\succeq",!0);u(p,y,C,"≃","\\simeq",!0);u(p,y,C,"∣","\\mid",!0);u(p,y,C,"≪","\\ll",!0);u(p,y,C,"≫","\\gg",!0);u(p,y,C,"≍","\\asymp",!0);u(p,y,C,"∥","\\parallel");u(p,y,C,"⋈","\\bowtie",!0);u(p,y,C,"⌣","\\smile",!0);u(p,y,C,"⊑","\\sqsubseteq",!0);u(p,y,C,"⊒","\\sqsupseteq",!0);u(p,y,C,"≐","\\doteq",!0);u(p,y,C,"⌢","\\frown",!0);u(p,y,C,"∋","\\ni",!0);u(p,y,C,"∝","\\propto",!0);u(p,y,C,"⊢","\\vdash",!0);u(p,y,C,"⊣","\\dashv",!0);u(p,y,C,"∋","\\owns");u(p,y,Ds,".","\\ldotp");u(p,y,Ds,"⋅","\\cdotp");u(p,y,Ds,"⋅","·");u(V,y,L,"⋅","·");u(p,y,L,"#","\\#");u(V,y,L,"#","\\#");u(p,y,L,"&","\\&");u(V,y,L,"&","\\&");u(p,y,L,"ℵ","\\aleph",!0);u(p,y,L,"∀","\\forall",!0);u(p,y,L,"ℏ","\\hbar",!0);u(p,y,L,"∃","\\exists",!0);u(p,y,L,"∇","\\nabla",!0);u(p,y,L,"♭","\\flat",!0);u(p,y,L,"ℓ","\\ell",!0);u(p,y,L,"♮","\\natural",!0);u(p,y,L,"♣","\\clubsuit",!0);u(p,y,L,"℘","\\wp",!0);u(p,y,L,"♯","\\sharp",!0);u(p,y,L,"♢","\\diamondsuit",!0);u(p,y,L,"ℜ","\\Re",!0);u(p,y,L,"♡","\\heartsuit",!0);u(p,y,L,"ℑ","\\Im",!0);u(p,y,L,"♠","\\spadesuit",!0);u(p,y,L,"§","\\S",!0);u(V,y,L,"§","\\S");u(p,y,L,"¶","\\P",!0);u(V,y,L,"¶","\\P");u(p,y,L,"†","\\dag");u(V,y,L,"†","\\dag");u(V,y,L,"†","\\textdagger");u(p,y,L,"‡","\\ddag");u(V,y,L,"‡","\\ddag");u(V,y,L,"‡","\\textdaggerdbl");u(p,y,jt,"⎱","\\rmoustache",!0);u(p,y,gi,"⎰","\\lmoustache",!0);u(p,y,jt,"⟯","\\rgroup",!0);u(p,y,gi,"⟮","\\lgroup",!0);u(p,y,ce,"∓","\\mp",!0);u(p,y,ce,"⊖","\\ominus",!0);u(p,y,ce,"⊎","\\uplus",!0);u(p,y,ce,"⊓","\\sqcap",!0);u(p,y,ce,"∗","\\ast");u(p,y,ce,"⊔","\\sqcup",!0);u(p,y,ce,"◯","\\bigcirc",!0);u(p,y,ce,"∙","\\bullet",!0);u(p,y,ce,"‡","\\ddagger");u(p,y,ce,"≀","\\wr",!0);u(p,y,ce,"⨿","\\amalg");u(p,y,ce,"&","\\And");u(p,y,C,"⟵","\\longleftarrow",!0);u(p,y,C,"⇐","\\Leftarrow",!0);u(p,y,C,"⟸","\\Longleftarrow",!0);u(p,y,C,"⟶","\\longrightarrow",!0);u(p,y,C,"⇒","\\Rightarrow",!0);u(p,y,C,"⟹","\\Longrightarrow",!0);u(p,y,C,"↔","\\leftrightarrow",!0);u(p,y,C,"⟷","\\longleftrightarrow",!0);u(p,y,C,"⇔","\\Leftrightarrow",!0);u(p,y,C,"⟺","\\Longleftrightarrow",!0);u(p,y,C,"↦","\\mapsto",!0);u(p,y,C,"⟼","\\longmapsto",!0);u(p,y,C,"↗","\\nearrow",!0);u(p,y,C,"↩","\\hookleftarrow",!0);u(p,y,C,"↪","\\hookrightarrow",!0);u(p,y,C,"↘","\\searrow",!0);u(p,y,C,"↼","\\leftharpoonup",!0);u(p,y,C,"⇀","\\rightharpoonup",!0);u(p,y,C,"↙","\\swarrow",!0);u(p,y,C,"↽","\\leftharpoondown",!0);u(p,y,C,"⇁","\\rightharpoondown",!0);u(p,y,C,"↖","\\nwarrow",!0);u(p,y,C,"⇌","\\rightleftharpoons",!0);u(p,S,C,"≮","\\nless",!0);u(p,S,C,"","\\@nleqslant");u(p,S,C,"","\\@nleqq");u(p,S,C,"⪇","\\lneq",!0);u(p,S,C,"≨","\\lneqq",!0);u(p,S,C,"","\\@lvertneqq");u(p,S,C,"⋦","\\lnsim",!0);u(p,S,C,"⪉","\\lnapprox",!0);u(p,S,C,"⊀","\\nprec",!0);u(p,S,C,"⋠","\\npreceq",!0);u(p,S,C,"⋨","\\precnsim",!0);u(p,S,C,"⪹","\\precnapprox",!0);u(p,S,C,"≁","\\nsim",!0);u(p,S,C,"","\\@nshortmid");u(p,S,C,"∤","\\nmid",!0);u(p,S,C,"⊬","\\nvdash",!0);u(p,S,C,"⊭","\\nvDash",!0);u(p,S,C,"⋪","\\ntriangleleft");u(p,S,C,"⋬","\\ntrianglelefteq",!0);u(p,S,C,"⊊","\\subsetneq",!0);u(p,S,C,"","\\@varsubsetneq");u(p,S,C,"⫋","\\subsetneqq",!0);u(p,S,C,"","\\@varsubsetneqq");u(p,S,C,"≯","\\ngtr",!0);u(p,S,C,"","\\@ngeqslant");u(p,S,C,"","\\@ngeqq");u(p,S,C,"⪈","\\gneq",!0);u(p,S,C,"≩","\\gneqq",!0);u(p,S,C,"","\\@gvertneqq");u(p,S,C,"⋧","\\gnsim",!0);u(p,S,C,"⪊","\\gnapprox",!0);u(p,S,C,"⊁","\\nsucc",!0);u(p,S,C,"⋡","\\nsucceq",!0);u(p,S,C,"⋩","\\succnsim",!0);u(p,S,C,"⪺","\\succnapprox",!0);u(p,S,C,"≆","\\ncong",!0);u(p,S,C,"","\\@nshortparallel");u(p,S,C,"∦","\\nparallel",!0);u(p,S,C,"⊯","\\nVDash",!0);u(p,S,C,"⋫","\\ntriangleright");u(p,S,C,"⋭","\\ntrianglerighteq",!0);u(p,S,C,"","\\@nsupseteqq");u(p,S,C,"⊋","\\supsetneq",!0);u(p,S,C,"","\\@varsupsetneq");u(p,S,C,"⫌","\\supsetneqq",!0);u(p,S,C,"","\\@varsupsetneqq");u(p,S,C,"⊮","\\nVdash",!0);u(p,S,C,"⪵","\\precneqq",!0);u(p,S,C,"⪶","\\succneqq",!0);u(p,S,C,"","\\@nsubseteqq");u(p,S,ce,"⊴","\\unlhd");u(p,S,ce,"⊵","\\unrhd");u(p,S,C,"↚","\\nleftarrow",!0);u(p,S,C,"↛","\\nrightarrow",!0);u(p,S,C,"⇍","\\nLeftarrow",!0);u(p,S,C,"⇏","\\nRightarrow",!0);u(p,S,C,"↮","\\nleftrightarrow",!0);u(p,S,C,"⇎","\\nLeftrightarrow",!0);u(p,S,C,"△","\\vartriangle");u(p,S,L,"ℏ","\\hslash");u(p,S,L,"▽","\\triangledown");u(p,S,L,"◊","\\lozenge");u(p,S,L,"Ⓢ","\\circledS");u(p,S,L,"®","\\circledR");u(V,S,L,"®","\\circledR");u(p,S,L,"∡","\\measuredangle",!0);u(p,S,L,"∄","\\nexists");u(p,S,L,"℧","\\mho");u(p,S,L,"Ⅎ","\\Finv",!0);u(p,S,L,"⅁","\\Game",!0);u(p,S,L,"‵","\\backprime");u(p,S,L,"▲","\\blacktriangle");u(p,S,L,"▼","\\blacktriangledown");u(p,S,L,"■","\\blacksquare");u(p,S,L,"⧫","\\blacklozenge");u(p,S,L,"★","\\bigstar");u(p,S,L,"∢","\\sphericalangle",!0);u(p,S,L,"∁","\\complement",!0);u(p,S,L,"ð","\\eth",!0);u(V,y,L,"ð","ð");u(p,S,L,"╱","\\diagup");u(p,S,L,"╲","\\diagdown");u(p,S,L,"□","\\square");u(p,S,L,"□","\\Box");u(p,S,L,"◊","\\Diamond");u(p,S,L,"¥","\\yen",!0);u(V,S,L,"¥","\\yen",!0);u(p,S,L,"✓","\\checkmark",!0);u(V,S,L,"✓","\\checkmark");u(p,S,L,"ℶ","\\beth",!0);u(p,S,L,"ℸ","\\daleth",!0);u(p,S,L,"ℷ","\\gimel",!0);u(p,S,L,"ϝ","\\digamma",!0);u(p,S,L,"ϰ","\\varkappa");u(p,S,gi,"┌","\\@ulcorner",!0);u(p,S,jt,"┐","\\@urcorner",!0);u(p,S,gi,"└","\\@llcorner",!0);u(p,S,jt,"┘","\\@lrcorner",!0);u(p,S,C,"≦","\\leqq",!0);u(p,S,C,"⩽","\\leqslant",!0);u(p,S,C,"⪕","\\eqslantless",!0);u(p,S,C,"≲","\\lesssim",!0);u(p,S,C,"⪅","\\lessapprox",!0);u(p,S,C,"≊","\\approxeq",!0);u(p,S,ce,"⋖","\\lessdot");u(p,S,C,"⋘","\\lll",!0);u(p,S,C,"≶","\\lessgtr",!0);u(p,S,C,"⋚","\\lesseqgtr",!0);u(p,S,C,"⪋","\\lesseqqgtr",!0);u(p,S,C,"≑","\\doteqdot");u(p,S,C,"≓","\\risingdotseq",!0);u(p,S,C,"≒","\\fallingdotseq",!0);u(p,S,C,"∽","\\backsim",!0);u(p,S,C,"⋍","\\backsimeq",!0);u(p,S,C,"⫅","\\subseteqq",!0);u(p,S,C,"⋐","\\Subset",!0);u(p,S,C,"⊏","\\sqsubset",!0);u(p,S,C,"≼","\\preccurlyeq",!0);u(p,S,C,"⋞","\\curlyeqprec",!0);u(p,S,C,"≾","\\precsim",!0);u(p,S,C,"⪷","\\precapprox",!0);u(p,S,C,"⊲","\\vartriangleleft");u(p,S,C,"⊴","\\trianglelefteq");u(p,S,C,"⊨","\\vDash",!0);u(p,S,C,"⊪","\\Vvdash",!0);u(p,S,C,"⌣","\\smallsmile");u(p,S,C,"⌢","\\smallfrown");u(p,S,C,"≏","\\bumpeq",!0);u(p,S,C,"≎","\\Bumpeq",!0);u(p,S,C,"≧","\\geqq",!0);u(p,S,C,"⩾","\\geqslant",!0);u(p,S,C,"⪖","\\eqslantgtr",!0);u(p,S,C,"≳","\\gtrsim",!0);u(p,S,C,"⪆","\\gtrapprox",!0);u(p,S,ce,"⋗","\\gtrdot");u(p,S,C,"⋙","\\ggg",!0);u(p,S,C,"≷","\\gtrless",!0);u(p,S,C,"⋛","\\gtreqless",!0);u(p,S,C,"⪌","\\gtreqqless",!0);u(p,S,C,"≖","\\eqcirc",!0);u(p,S,C,"≗","\\circeq",!0);u(p,S,C,"≜","\\triangleq",!0);u(p,S,C,"∼","\\thicksim");u(p,S,C,"≈","\\thickapprox");u(p,S,C,"⫆","\\supseteqq",!0);u(p,S,C,"⋑","\\Supset",!0);u(p,S,C,"⊐","\\sqsupset",!0);u(p,S,C,"≽","\\succcurlyeq",!0);u(p,S,C,"⋟","\\curlyeqsucc",!0);u(p,S,C,"≿","\\succsim",!0);u(p,S,C,"⪸","\\succapprox",!0);u(p,S,C,"⊳","\\vartriangleright");u(p,S,C,"⊵","\\trianglerighteq");u(p,S,C,"⊩","\\Vdash",!0);u(p,S,C,"∣","\\shortmid");u(p,S,C,"∥","\\shortparallel");u(p,S,C,"≬","\\between",!0);u(p,S,C,"⋔","\\pitchfork",!0);u(p,S,C,"∝","\\varpropto");u(p,S,C,"◀","\\blacktriangleleft");u(p,S,C,"∴","\\therefore",!0);u(p,S,C,"∍","\\backepsilon");u(p,S,C,"▶","\\blacktriangleright");u(p,S,C,"∵","\\because",!0);u(p,S,C,"⋘","\\llless");u(p,S,C,"⋙","\\gggtr");u(p,S,ce,"⊲","\\lhd");u(p,S,ce,"⊳","\\rhd");u(p,S,C,"≂","\\eqsim",!0);u(p,y,C,"⋈","\\Join");u(p,S,C,"≑","\\Doteq",!0);u(p,S,ce,"∔","\\dotplus",!0);u(p,S,ce,"∖","\\smallsetminus");u(p,S,ce,"⋒","\\Cap",!0);u(p,S,ce,"⋓","\\Cup",!0);u(p,S,ce,"⩞","\\doublebarwedge",!0);u(p,S,ce,"⊟","\\boxminus",!0);u(p,S,ce,"⊞","\\boxplus",!0);u(p,S,ce,"⋇","\\divideontimes",!0);u(p,S,ce,"⋉","\\ltimes",!0);u(p,S,ce,"⋊","\\rtimes",!0);u(p,S,ce,"⋋","\\leftthreetimes",!0);u(p,S,ce,"⋌","\\rightthreetimes",!0);u(p,S,ce,"⋏","\\curlywedge",!0);u(p,S,ce,"⋎","\\curlyvee",!0);u(p,S,ce,"⊝","\\circleddash",!0);u(p,S,ce,"⊛","\\circledast",!0);u(p,S,ce,"⋅","\\centerdot");u(p,S,ce,"⊺","\\intercal",!0);u(p,S,ce,"⋒","\\doublecap");u(p,S,ce,"⋓","\\doublecup");u(p,S,ce,"⊠","\\boxtimes",!0);u(p,S,C,"⇢","\\dashrightarrow",!0);u(p,S,C,"⇠","\\dashleftarrow",!0);u(p,S,C,"⇇","\\leftleftarrows",!0);u(p,S,C,"⇆","\\leftrightarrows",!0);u(p,S,C,"⇚","\\Lleftarrow",!0);u(p,S,C,"↞","\\twoheadleftarrow",!0);u(p,S,C,"↢","\\leftarrowtail",!0);u(p,S,C,"↫","\\looparrowleft",!0);u(p,S,C,"⇋","\\leftrightharpoons",!0);u(p,S,C,"↶","\\curvearrowleft",!0);u(p,S,C,"↺","\\circlearrowleft",!0);u(p,S,C,"↰","\\Lsh",!0);u(p,S,C,"⇈","\\upuparrows",!0);u(p,S,C,"↿","\\upharpoonleft",!0);u(p,S,C,"⇃","\\downharpoonleft",!0);u(p,y,C,"⊶","\\origof",!0);u(p,y,C,"⊷","\\imageof",!0);u(p,S,C,"⊸","\\multimap",!0);u(p,S,C,"↭","\\leftrightsquigarrow",!0);u(p,S,C,"⇉","\\rightrightarrows",!0);u(p,S,C,"⇄","\\rightleftarrows",!0);u(p,S,C,"↠","\\twoheadrightarrow",!0);u(p,S,C,"↣","\\rightarrowtail",!0);u(p,S,C,"↬","\\looparrowright",!0);u(p,S,C,"↷","\\curvearrowright",!0);u(p,S,C,"↻","\\circlearrowright",!0);u(p,S,C,"↱","\\Rsh",!0);u(p,S,C,"⇊","\\downdownarrows",!0);u(p,S,C,"↾","\\upharpoonright",!0);u(p,S,C,"⇂","\\downharpoonright",!0);u(p,S,C,"⇝","\\rightsquigarrow",!0);u(p,S,C,"⇝","\\leadsto");u(p,S,C,"⇛","\\Rrightarrow",!0);u(p,S,C,"↾","\\restriction");u(p,y,L,"‘","`");u(p,y,L,"$","\\$");u(V,y,L,"$","\\$");u(V,y,L,"$","\\textdollar");u(p,y,L,"%","\\%");u(V,y,L,"%","\\%");u(p,y,L,"_","\\_");u(V,y,L,"_","\\_");u(V,y,L,"_","\\textunderscore");u(p,y,L,"∠","\\angle",!0);u(p,y,L,"∞","\\infty",!0);u(p,y,L,"′","\\prime");u(p,y,L,"△","\\triangle");u(p,y,L,"Γ","\\Gamma",!0);u(p,y,L,"Δ","\\Delta",!0);u(p,y,L,"Θ","\\Theta",!0);u(p,y,L,"Λ","\\Lambda",!0);u(p,y,L,"Ξ","\\Xi",!0);u(p,y,L,"Π","\\Pi",!0);u(p,y,L,"Σ","\\Sigma",!0);u(p,y,L,"Υ","\\Upsilon",!0);u(p,y,L,"Φ","\\Phi",!0);u(p,y,L,"Ψ","\\Psi",!0);u(p,y,L,"Ω","\\Omega",!0);u(p,y,L,"A","Α");u(p,y,L,"B","Β");u(p,y,L,"E","Ε");u(p,y,L,"Z","Ζ");u(p,y,L,"H","Η");u(p,y,L,"I","Ι");u(p,y,L,"K","Κ");u(p,y,L,"M","Μ");u(p,y,L,"N","Ν");u(p,y,L,"O","Ο");u(p,y,L,"P","Ρ");u(p,y,L,"T","Τ");u(p,y,L,"X","Χ");u(p,y,L,"¬","\\neg",!0);u(p,y,L,"¬","\\lnot");u(p,y,L,"⊤","\\top");u(p,y,L,"⊥","\\bot");u(p,y,L,"∅","\\emptyset");u(p,S,L,"∅","\\varnothing");u(p,y,xe,"α","\\alpha",!0);u(p,y,xe,"β","\\beta",!0);u(p,y,xe,"γ","\\gamma",!0);u(p,y,xe,"δ","\\delta",!0);u(p,y,xe,"ϵ","\\epsilon",!0);u(p,y,xe,"ζ","\\zeta",!0);u(p,y,xe,"η","\\eta",!0);u(p,y,xe,"θ","\\theta",!0);u(p,y,xe,"ι","\\iota",!0);u(p,y,xe,"κ","\\kappa",!0);u(p,y,xe,"λ","\\lambda",!0);u(p,y,xe,"μ","\\mu",!0);u(p,y,xe,"ν","\\nu",!0);u(p,y,xe,"ξ","\\xi",!0);u(p,y,xe,"ο","\\omicron",!0);u(p,y,xe,"π","\\pi",!0);u(p,y,xe,"ρ","\\rho",!0);u(p,y,xe,"σ","\\sigma",!0);u(p,y,xe,"τ","\\tau",!0);u(p,y,xe,"υ","\\upsilon",!0);u(p,y,xe,"ϕ","\\phi",!0);u(p,y,xe,"χ","\\chi",!0);u(p,y,xe,"ψ","\\psi",!0);u(p,y,xe,"ω","\\omega",!0);u(p,y,xe,"ε","\\varepsilon",!0);u(p,y,xe,"ϑ","\\vartheta",!0);u(p,y,xe,"ϖ","\\varpi",!0);u(p,y,xe,"ϱ","\\varrho",!0);u(p,y,xe,"ς","\\varsigma",!0);u(p,y,xe,"φ","\\varphi",!0);u(p,y,ce,"∗","*",!0);u(p,y,ce,"+","+");u(p,y,ce,"−","-",!0);u(p,y,ce,"⋅","\\cdot",!0);u(p,y,ce,"∘","\\circ",!0);u(p,y,ce,"÷","\\div",!0);u(p,y,ce,"±","\\pm",!0);u(p,y,ce,"×","\\times",!0);u(p,y,ce,"∩","\\cap",!0);u(p,y,ce,"∪","\\cup",!0);u(p,y,ce,"∖","\\setminus",!0);u(p,y,ce,"∧","\\land");u(p,y,ce,"∨","\\lor");u(p,y,ce,"∧","\\wedge",!0);u(p,y,ce,"∨","\\vee",!0);u(p,y,L,"√","\\surd");u(p,y,gi,"⟨","\\langle",!0);u(p,y,gi,"∣","\\lvert");u(p,y,gi,"∥","\\lVert");u(p,y,jt,"?","?");u(p,y,jt,"!","!");u(p,y,jt,"⟩","\\rangle",!0);u(p,y,jt,"∣","\\rvert");u(p,y,jt,"∥","\\rVert");u(p,y,C,"=","=");u(p,y,C,":",":");u(p,y,C,"≈","\\approx",!0);u(p,y,C,"≅","\\cong",!0);u(p,y,C,"≥","\\ge");u(p,y,C,"≥","\\geq",!0);u(p,y,C,"←","\\gets");u(p,y,C,">","\\gt",!0);u(p,y,C,"∈","\\in",!0);u(p,y,C,"","\\@not");u(p,y,C,"⊂","\\subset",!0);u(p,y,C,"⊃","\\supset",!0);u(p,y,C,"⊆","\\subseteq",!0);u(p,y,C,"⊇","\\supseteq",!0);u(p,S,C,"⊈","\\nsubseteq",!0);u(p,S,C,"⊉","\\nsupseteq",!0);u(p,y,C,"⊨","\\models");u(p,y,C,"←","\\leftarrow",!0);u(p,y,C,"≤","\\le");u(p,y,C,"≤","\\leq",!0);u(p,y,C,"<","\\lt",!0);u(p,y,C,"→","\\rightarrow",!0);u(p,y,C,"→","\\to");u(p,S,C,"≱","\\ngeq",!0);u(p,S,C,"≰","\\nleq",!0);u(p,y,ln," ","\\ ");u(p,y,ln," ","\\space");u(p,y,ln," ","\\nobreakspace");u(V,y,ln," ","\\ ");u(V,y,ln," "," ");u(V,y,ln," ","\\space");u(V,y,ln," ","\\nobreakspace");u(p,y,ln,"","\\nobreak");u(p,y,ln,"","\\allowbreak");u(p,y,Ds,",",",");u(p,y,Ds,";",";");u(p,S,ce,"⊼","\\barwedge",!0);u(p,S,ce,"⊻","\\veebar",!0);u(p,y,ce,"⊙","\\odot",!0);u(p,y,ce,"⊕","\\oplus",!0);u(p,y,ce,"⊗","\\otimes",!0);u(p,y,L,"∂","\\partial",!0);u(p,y,ce,"⊘","\\oslash",!0);u(p,S,ce,"⊚","\\circledcirc",!0);u(p,S,ce,"⊡","\\boxdot",!0);u(p,y,ce,"△","\\bigtriangleup");u(p,y,ce,"▽","\\bigtriangledown");u(p,y,ce,"†","\\dagger");u(p,y,ce,"⋄","\\diamond");u(p,y,ce,"⋆","\\star");u(p,y,ce,"◃","\\triangleleft");u(p,y,ce,"▹","\\triangleright");u(p,y,gi,"{","\\{");u(V,y,L,"{","\\{");u(V,y,L,"{","\\textbraceleft");u(p,y,jt,"}","\\}");u(V,y,L,"}","\\}");u(V,y,L,"}","\\textbraceright");u(p,y,gi,"{","\\lbrace");u(p,y,jt,"}","\\rbrace");u(p,y,gi,"[","\\lbrack",!0);u(V,y,L,"[","\\lbrack",!0);u(p,y,jt,"]","\\rbrack",!0);u(V,y,L,"]","\\rbrack",!0);u(p,y,gi,"(","\\lparen",!0);u(p,y,jt,")","\\rparen",!0);u(V,y,L,"<","\\textless",!0);u(V,y,L,">","\\textgreater",!0);u(p,y,gi,"⌊","\\lfloor",!0);u(p,y,jt,"⌋","\\rfloor",!0);u(p,y,gi,"⌈","\\lceil",!0);u(p,y,jt,"⌉","\\rceil",!0);u(p,y,L,"\\","\\backslash");u(p,y,L,"∣","|");u(p,y,L,"∣","\\vert");u(V,y,L,"|","\\textbar",!0);u(p,y,L,"∥","\\|");u(p,y,L,"∥","\\Vert");u(V,y,L,"∥","\\textbardbl");u(V,y,L,"~","\\textasciitilde");u(V,y,L,"\\","\\textbackslash");u(V,y,L,"^","\\textasciicircum");u(p,y,C,"↑","\\uparrow",!0);u(p,y,C,"⇑","\\Uparrow",!0);u(p,y,C,"↓","\\downarrow",!0);u(p,y,C,"⇓","\\Downarrow",!0);u(p,y,C,"↕","\\updownarrow",!0);u(p,y,C,"⇕","\\Updownarrow",!0);u(p,y,wt,"∐","\\coprod");u(p,y,wt,"⋁","\\bigvee");u(p,y,wt,"⋀","\\bigwedge");u(p,y,wt,"⨄","\\biguplus");u(p,y,wt,"⋂","\\bigcap");u(p,y,wt,"⋃","\\bigcup");u(p,y,wt,"∫","\\int");u(p,y,wt,"∫","\\intop");u(p,y,wt,"∬","\\iint");u(p,y,wt,"∭","\\iiint");u(p,y,wt,"∏","\\prod");u(p,y,wt,"∑","\\sum");u(p,y,wt,"⨂","\\bigotimes");u(p,y,wt,"⨁","\\bigoplus");u(p,y,wt,"⨀","\\bigodot");u(p,y,wt,"∮","\\oint");u(p,y,wt,"∯","\\oiint");u(p,y,wt,"∰","\\oiiint");u(p,y,wt,"⨆","\\bigsqcup");u(p,y,wt,"∫","\\smallint");u(V,y,Gr,"…","\\textellipsis");u(p,y,Gr,"…","\\mathellipsis");u(V,y,Gr,"…","\\ldots",!0);u(p,y,Gr,"…","\\ldots",!0);u(p,y,Gr,"⋯","\\@cdots",!0);u(p,y,Gr,"⋱","\\ddots",!0);u(p,y,L,"⋮","\\varvdots");u(V,y,L,"⋮","\\varvdots");u(p,y,rt,"ˊ","\\acute");u(p,y,rt,"ˋ","\\grave");u(p,y,rt,"¨","\\ddot");u(p,y,rt,"~","\\tilde");u(p,y,rt,"ˉ","\\bar");u(p,y,rt,"˘","\\breve");u(p,y,rt,"ˇ","\\check");u(p,y,rt,"^","\\hat");u(p,y,rt,"⃗","\\vec");u(p,y,rt,"˙","\\dot");u(p,y,rt,"˚","\\mathring");u(p,y,xe,"","\\@imath");u(p,y,xe,"","\\@jmath");u(p,y,L,"ı","ı");u(p,y,L,"ȷ","ȷ");u(V,y,L,"ı","\\i",!0);u(V,y,L,"ȷ","\\j",!0);u(V,y,L,"ß","\\ss",!0);u(V,y,L,"æ","\\ae",!0);u(V,y,L,"œ","\\oe",!0);u(V,y,L,"ø","\\o",!0);u(V,y,L,"Æ","\\AE",!0);u(V,y,L,"Œ","\\OE",!0);u(V,y,L,"Ø","\\O",!0);u(V,y,rt,"ˊ","\\'");u(V,y,rt,"ˋ","\\`");u(V,y,rt,"ˆ","\\^");u(V,y,rt,"˜","\\~");u(V,y,rt,"ˉ","\\=");u(V,y,rt,"˘","\\u");u(V,y,rt,"˙","\\.");u(V,y,rt,"¸","\\c");u(V,y,rt,"˚","\\r");u(V,y,rt,"ˇ","\\v");u(V,y,rt,"¨",'\\"');u(V,y,rt,"˝","\\H");u(V,y,rt,"◯","\\textcircled");var Qd={"--":!0,"---":!0,"``":!0,"''":!0};u(V,y,L,"–","--",!0);u(V,y,L,"–","\\textendash");u(V,y,L,"—","---",!0);u(V,y,L,"—","\\textemdash");u(V,y,L,"‘","`",!0);u(V,y,L,"‘","\\textquoteleft");u(V,y,L,"’","'",!0);u(V,y,L,"’","\\textquoteright");u(V,y,L,"“","``",!0);u(V,y,L,"“","\\textquotedblleft");u(V,y,L,"”","''",!0);u(V,y,L,"”","\\textquotedblright");u(p,y,L,"°","\\degree",!0);u(V,y,L,"°","\\degree");u(V,y,L,"°","\\textdegree",!0);u(p,y,L,"£","\\pounds");u(p,y,L,"£","\\mathsterling",!0);u(V,y,L,"£","\\pounds");u(V,y,L,"£","\\textsterling",!0);u(p,S,L,"✠","\\maltese");u(V,S,L,"✠","\\maltese");var _h='0123456789/@."';for(var Eo=0;Eo<_h.length;Eo++){var Dh=_h.charAt(Eo);u(p,y,L,Dh,Dh)}var Rh='0123456789!@*()-=+";:?/.,';for(var Mo=0;Mo<Rh.length;Mo++){var Ih=Rh.charAt(Mo);u(V,y,L,Ih,Ih)}var Aa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var So=0;So<Aa.length;So++){var ra=Aa.charAt(So);u(p,y,xe,ra,ra),u(V,y,L,ra,ra)}u(p,S,L,"C","ℂ");u(V,S,L,"C","ℂ");u(p,S,L,"H","ℍ");u(V,S,L,"H","ℍ");u(p,S,L,"N","ℕ");u(V,S,L,"N","ℕ");u(p,S,L,"P","ℙ");u(V,S,L,"P","ℙ");u(p,S,L,"Q","ℚ");u(V,S,L,"Q","ℚ");u(p,S,L,"R","ℝ");u(V,S,L,"R","ℝ");u(p,S,L,"Z","ℤ");u(V,S,L,"Z","ℤ");u(p,y,xe,"h","ℎ");u(V,y,xe,"h","ℎ");var ke;for(var qt=0;qt<Aa.length;qt++){var ht=Aa.charAt(qt);ke=String.fromCharCode(55349,56320+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56372+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56424+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56580+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56684+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56736+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56788+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56840+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56944+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),qt<26&&(ke=String.fromCharCode(55349,56632+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke),ke=String.fromCharCode(55349,56476+qt),u(p,y,xe,ht,ke),u(V,y,L,ht,ke))}ke="𝕜";u(p,y,xe,"k",ke);u(V,y,L,"k",ke);for(var Wn=0;Wn<10;Wn++){var Tn=Wn.toString();ke=String.fromCharCode(55349,57294+Wn),u(p,y,xe,Tn,ke),u(V,y,L,Tn,ke),ke=String.fromCharCode(55349,57314+Wn),u(p,y,xe,Tn,ke),u(V,y,L,Tn,ke),ke=String.fromCharCode(55349,57324+Wn),u(p,y,xe,Tn,ke),u(V,y,L,Tn,ke),ke=String.fromCharCode(55349,57334+Wn),u(p,y,xe,Tn,ke),u(V,y,L,Tn,ke)}var z0="ÐÞþ";for(var zo=0;zo<z0.length;zo++){var sa=z0.charAt(zo);u(p,y,xe,sa,sa),u(V,y,L,sa,sa)}var C0={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Oh={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Bh={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Dm={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Zn={mathClass:"",textClass:"",font:""},Ph={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Fh={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Hh={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},N0={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},L0={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Uh={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},A0={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},$h=[C0,C0,Oh,Oh,Bh,Bh,Dm,Zn,Zn,Zn,Ph,Ph,Fh,Fh,Hh,Hh,N0,N0,L0,L0,Uh,Uh,Zn,Zn,A0,A0],Rm=[C0,Zn,N0,L0,A0],Im=i=>{var e=i.charCodeAt(0),t=i.charCodeAt(1),n=(e-55296)*1024+(t-56320)+65536;if(119808<=n&&n<120484){var r=Math.floor((n-119808)/26);return $h[r]}else if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return Rm[s]}else{if(n===120485||n===120486)return $h[0];if(120486<n&&n<120782)return Zn;throw new ee("Unsupported character: "+i)}},Ya=function(e,t,n){if(it[n][e]){var r=it[n][e].replace;r&&(e=r)}return{value:e,metrics:xl(e,t,n)}},Wt=function(e,t,n,r,s){var a=Ya(e,t,n),o=a.metrics;e=a.value;var l;if(o){var h=o.italic;(n==="text"||r&&r.font==="mathit")&&(h=0),l=new pi(e,o.height,o.depth,h,o.skew,o.width,s)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+t+"' and mode '"+n+"'")),l=new pi(e,0,0,0,0,0,s);if(r){l.maxFontSize=r.sizeMultiplier,r.style.isTight()&&l.classes.push("mtight");var c=r.getColor();c&&(l.style.color=c)}return l},yl=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Ya(e,"Main-Bold",t).metrics?Wt(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||it[t][e].font==="main"?Wt(e,"Main-Regular",t,n,r):Wt(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},Om=function(e,t,n){return n!=="textord"&&Ya(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Xa=function(e,t,n){var r=e.mode,s=e.text,a=["mord"],{font:o,fontFamily:l,fontWeight:h,fontShape:c}=t,d=r==="math"||r==="text"&&!!o,f=d?o:l,m="",v="";if(s.charCodeAt(0)===55349){var g=Im(s);m=g.font,v=g[r+"Class"]}if(m)return Wt(s,m,r,t,a.concat(v));if(f){var x,w;if(f==="boldsymbol"){var N=Om(s,r,n);x=N.fontName,w=[N.fontClass]}else d?(x=_0[o].fontName,w=[o]):(x=aa(l,h,c),w=[l,h,c]);if(Ya(s,x,r).metrics)return Wt(s,x,r,t,a.concat(w));if(Qd.hasOwnProperty(s)&&x.slice(0,10)==="Typewriter"){for(var M=[],z=0;z<s.length;z++)M.push(Wt(s[z],x,r,t,a.concat(w)));return hn(M)}}if(n==="mathord")return Wt(s,"Math-Italic",r,t,a.concat(["mathnormal"]));if(n==="textord"){var E=it[r][s]&&it[r][s].font;if(E==="ams"){var B=aa("amsrm",h,c);return Wt(s,B,r,t,a.concat("amsrm",h,c))}else if(E==="main"||!E){var I=aa("textrm",h,c);return Wt(s,I,r,t,a.concat(h,c))}else{var R=aa(E,h,c);return Wt(s,R,r,t,a.concat(R,h,c))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Bm=(i,e)=>{if(Ln(i.classes)!==Ln(e.classes)||i.skew!==e.skew||i.maxFontSize!==e.maxFontSize||i.italic!==0&&i.hasClass("mathnormal"))return!1;if(i.classes.length===1){var t=i.classes[0];if(t==="mbin"||t==="mord")return!1}for(var n of Object.keys(i.style))if(i.style[n]!==e.style[n])return!1;for(var r of Object.keys(e.style))if(i.style[r]!==e.style[r])return!1;return!0},Jd=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof pi&&n instanceof pi&&Bm(t,n)&&(t.text+=n.text,t.height=Math.max(t.height,n.height),t.depth=Math.max(t.depth,n.depth),t.italic=n.italic,i.splice(e+1,1),e--)}return i},wl=function(e){for(var t=0,n=0,r=0,s=0;s<e.children.length;s++){var a=e.children[s];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},K=function(e,t,n,r){var s=new $r(e,t,n,r);return wl(s),s},_n=(i,e,t,n)=>new $r(i,e,t,n),Or=function(e,t,n){var r=K([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ie(r.height),r.maxFontSize=1,r},Pm=function(e,t,n,r){var s=new Wa(e,t,n,r);return wl(s),s},hn=function(e){var t=new Ur(e);return wl(t),t},Br=function(e,t){return e instanceof Ur?K([],[e],t):e},Fm=function(e){if(e.positionType==="individualShift"){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,s=r,a=1;a<t.length;a++){var o=-t[a].shift-s-t[a].elem.depth,l=o-(t[a-1].elem.height+t[a-1].elem.depth);s=s+o,n.push({type:"kern",size:l}),n.push(t[a])}return{children:n,depth:r}}var h;if(e.positionType==="top"){for(var c=e.positionData,d=0;d<e.children.length;d++){var f=e.children[d];c-=f.type==="kern"?f.size:f.elem.height+f.elem.depth}h=c}else if(e.positionType==="bottom")h=-e.positionData;else{var m=e.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")h=-m.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")h=-m.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:h}},Fe=function(e,t){for(var{children:n,depth:r}=Fm(e),s=0,a=0;a<n.length;a++){var o=n[a];if(o.type==="elem"){var l=o.elem;s=Math.max(s,l.maxFontSize,l.height)}}s+=2;var h=K(["pstrut"],[]);h.style.height=ie(s);for(var c=[],d=r,f=r,m=r,v=0;v<n.length;v++){var g=n[v];if(g.type==="kern")m+=g.size;else{var x=g.elem,w=g.wrapperClasses||[],N=g.wrapperStyle||{},M=K(w,[h,x],void 0,N);M.style.top=ie(-s-m-x.depth),g.marginLeft&&(M.style.marginLeft=g.marginLeft),g.marginRight&&(M.style.marginRight=g.marginRight),c.push(M),m+=x.height+x.depth}d=Math.min(d,m),f=Math.max(f,m)}var z=K(["vlist"],c);z.style.height=ie(f);var E;if(d<0){var B=K([],[]),I=K(["vlist"],[B]);I.style.height=ie(-d);var R=K(["vlist-s"],[new pi("")]);E=[K(["vlist-r"],[z,R]),K(["vlist-r"],[I])]}else E=[K(["vlist-r"],[z])];var F=K(["vlist-t"],E);return E.length===2&&F.classes.push("vlist-t2"),F.height=f,F.depth=-d,F},e1=(i,e)=>{var t=K(["mspace"],[],e),n=ot(i,e);return t.style.marginRight=ie(n),t},aa=(i,e,t)=>{var n,r;switch(i){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=i}return e==="textbf"&&t==="textit"?r="BoldItalic":e==="textbf"?r="Bold":t==="textit"?r="Italic":r="Regular",n+"-"+r},_0={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"}},t1={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},i1=function(e,t){var[n,r,s]=t1[e],a=new An(n),o=new sn([a],{width:ie(r),height:ie(s),style:"width:"+ie(r),viewBox:"0 0 "+1e3*r+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=_n(["overlay"],[o],t);return l.height=s,l.style.height=ie(s),l.style.width=ie(r),l},at={number:3,unit:"mu"},Yn={number:4,unit:"mu"},Zi={number:5,unit:"mu"},Hm={mord:{mop:at,mbin:Yn,mrel:Zi,minner:at},mop:{mord:at,mop:at,mrel:Zi,minner:at},mbin:{mord:Yn,mop:Yn,mopen:Yn,minner:Yn},mrel:{mord:Zi,mop:Zi,mopen:Zi,minner:Zi},mopen:{},mclose:{mop:at,mbin:Yn,mrel:Zi,minner:at},mpunct:{mord:at,mop:at,mrel:Zi,mopen:at,mclose:at,mpunct:at,minner:at},minner:{mord:at,mop:at,mbin:Yn,mrel:Zi,mopen:at,mpunct:at,minner:at}},Um={mord:{mop:at},mop:{mord:at,mop:at},mbin:{},mrel:{},mopen:{},mclose:{mop:at},mpunct:{},minner:{mop:at}},n1={},_a={},Da={};function le(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:s,mathmlBuilder:a}=i,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:r},l=0;l<t.length;++l)n1[t[l]]=o;e&&(s&&(_a[e]=s),a&&(Da[e]=a))}function cr(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;le({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var Ra=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},xt=function(e){return e.type==="ordgroup"?e.body:[e]},$m=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),Gm=new Set(["rightmost","mrel","mclose","mpunct"]),qm={display:Te.DISPLAY,text:Te.TEXT,script:Te.SCRIPT,scriptscript:Te.SCRIPTSCRIPT},Wm={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Mt=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var s=[],a=0;a<e.length;a++){var o=He(e[a],t);if(o instanceof Ur){var l=o.children;s.push(...l)}else s.push(o)}if(Jd(s),!n)return s;var h=t;if(e.length===1){var c=e[0];c.type==="sizing"?h=t.havingSize(c.size):c.type==="styling"&&(h=t.havingStyle(qm[c.style]))}var d=K([r[0]||"leftmost"],[],t),f=K([r[1]||"rightmost"],[],t),m=n==="root";return D0(s,(v,g)=>{var x=g.classes[0],w=v.classes[0];x==="mbin"&&Gm.has(w)?g.classes[0]="mord":w==="mbin"&&$m.has(x)&&(v.classes[0]="mord")},{node:d},f,m),D0(s,(v,g)=>{var x,w,N=I0(g),M=I0(v),z=N&&M?v.hasClass("mtight")?(x=Um[N])==null?void 0:x[M]:(w=Hm[N])==null?void 0:w[M]:null;if(z)return e1(z,h)},{node:d},f,m),s},D0=function(e,t,n,r,s){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],l=r1(o);if(l){D0(l.children,t,n,null,s);continue}var h=!o.hasClass("mspace");if(h){var c=t(o,n.node);c&&(n.insertAfter?n.insertAfter(c):(e.unshift(c),a++))}h?n.node=o:s&&o.hasClass("newline")&&(n.node=K(["leftmost"])),n.insertAfter=(d=>f=>{e.splice(d+1,0,f),a++})(a)}r&&e.pop()},r1=function(e){return e instanceof Ur||e instanceof Wa||e instanceof $r&&e.hasClass("enclosing")?e:null},R0=function(e,t){var n=r1(e);if(n){var r=n.children;if(r.length){if(t==="right")return R0(r[r.length-1],"right");if(t==="left")return R0(r[0],"left")}}return e},I0=function(e,t){if(!e)return null;t&&(e=R0(e,t));var n=e.classes[0];return Wm[n]||null},zs=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return K(t.concat(n))},He=function(e,t,n){if(!e)return K();if(_a[e.type]){var r=_a[e.type](e,t);if(n&&t.size!==n.size){r=K(t.sizingClasses(n),[r],t);var s=t.sizeMultiplier/n.sizeMultiplier;r.height*=s,r.depth*=s}return r}else throw new ee("Got group of unknown type: '"+e.type+"'")};function oa(i,e){var t=K(["base"],i,e),n=K(["strut"]);return n.style.height=ie(t.height+t.depth),t.depth&&(n.style.verticalAlign=ie(-t.depth)),t.children.unshift(n),t}function O0(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Mt(i,e,"root"),r;n.length===2&&n[1].hasClass("tag")&&(r=n.pop());for(var s=[],a=[],o=0;o<n.length;o++)if(a.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,a.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(s.push(oa(a,e)),a=[])}else n[o].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(oa(a,e)),a=[]),s.push(n[o]));a.length>0&&s.push(oa(a,e));var h;t?(h=oa(Mt(t,e,!0),e),h.classes=["tag"],s.push(h)):r&&s.push(r);var c=K(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=ie(c.height+c.depth),c.depth&&(d.style.verticalAlign=ie(-c.depth))}return c}function s1(i){return new Ur(i)}class te{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Ln(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof yt&&this.children[n+1]instanceof yt){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof yt;)r+=this.children[++n].toText();e.appendChild(new yt(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Ut(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Ut(Ln(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class yt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ut(this.toText())}toText(){return this.text}}class a1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character=" ":e>=-.05556&&e<=-.05555?this.character=" ":e>=-.1667&&e<=-.1666?this.character=" ":e>=-.2223&&e<=-.2222?this.character=" ":e>=-.2778&&e<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",ie(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ie(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ym=new Set(["\\imath","\\jmath"]),Xm=new Set(["mrow","mtable"]),zi=function(e,t,n){return it[t][e]&&it[t][e].replace&&e.charCodeAt(0)!==55349&&!(Qd.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=it[t][e].replace),new yt(e)},bl=function(e){return e.length===1?e[0]:new te("mrow",e)},Vm={mathit:"italic",boldsymbol:i=>i.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},kl=(i,e)=>{if(i.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var t=e.font;if(!t||t==="mathnormal")return null;var n=i.mode,r=Vm[t];if(r)return typeof r=="function"?r(i):r;var s=i.text;if(Ym.has(s))return null;if(it[n][s]){var a=it[n][s].replace;a&&(s=a)}var o=_0[t].fontName;return xl(s,o,n)?_0[t].variant:null};function Co(i){if(!i)return!1;if(i.type==="mi"&&i.children.length===1){var e=i.children[0];return e instanceof yt&&e.text==="."}else if(i.type==="mo"&&i.children.length===1&&i.getAttribute("separator")==="true"&&i.getAttribute("lspace")==="0em"&&i.getAttribute("rspace")==="0em"){var t=i.children[0];return t instanceof yt&&t.text===","}else return!1}var vi=function(e,t,n){if(e.length===1){var r=Ke(e[0],t);return n&&r instanceof te&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var s=[],a,o=0;o<e.length;o++){var l=Ke(e[o],t);if(l instanceof te&&a instanceof te){if(l.type==="mtext"&&a.type==="mtext"&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}else if(l.type==="mn"&&a.type==="mn"){a.children.push(...l.children);continue}else if(Co(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&Co(a))l.children=[...a.children,...l.children],s.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||Co(a))){var h=l.children[0];h instanceof te&&h.type==="mn"&&(h.children=[...a.children,...h.children],s.pop())}else if(a.type==="mi"&&a.children.length===1){var c=a.children[0];if(c instanceof yt&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof yt&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),a=l}return s},Dn=function(e,t,n){return bl(vi(e,t,n))},Ke=function(e,t){if(!e)return new te("mrow");if(Da[e.type])return Da[e.type](e,t);throw new ee("Got group of unknown type: '"+e.type+"'")};function Gh(i,e,t,n,r){var s=vi(i,t),a;s.length===1&&s[0]instanceof te&&Xm.has(s[0].type)?a=s[0]:a=new te("mrow",s);var o=new te("annotation",[new yt(e)]);o.setAttribute("encoding","application/x-tex");var l=new te("semantics",[a,o]),h=new te("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var c=r?"katex":"katex-mathml";return K([c],[h])}var jm=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],qh=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Wh=function(e,t){return t.size<2?e:jm[e-1][t.size-1]};class en{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||en.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=qh[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new en(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Wh(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:qh[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Wh(en.BASESIZE,e);return this.size===t&&this.textSize===en.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==en.BASESIZE?["sizing","reset-size"+this.size,"size"+en.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=_m(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}en.BASESIZE=6;var o1=function(e){return new en({style:e.displayMode?Te.DISPLAY:Te.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},l1=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=K(n,[e])}return e},Km=function(e,t,n){var r=o1(n),s;if(n.output==="mathml")return Gh(e,t,r,n.displayMode,!0);if(n.output==="html"){var a=O0(e,r);s=K(["katex"],[a])}else{var o=Gh(e,t,r,n.displayMode,!1),l=O0(e,r);s=K(["katex"],[o,l])}return l1(s,n)},Zm=function(e,t,n){var r=o1(n),s=O0(e,r),a=K(["katex"],[s]);return l1(a,n)},Qm={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",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":"="},Va=function(e){var t=new te("mo",[new yt(Qm[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Jm={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],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],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]},e4=new Set(["widehat","widecheck","widetilde","utilde"]),ja=function(e,t){function n(){var o=4e5,l=e.label.slice(1);if(e4.has(l)&&"base"in e){var h=e.base.type==="ordgroup"?e.base.body.length:1,c,d,f;if(h>5)l==="widehat"||l==="widecheck"?(c=420,o=2364,f=.42,d=l+"4"):(c=312,o=2340,f=.34,d="tilde4");else{var m=[1,1,2,2,3,3][h];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],c=[0,239,300,360,420][m],f=[0,.24,.3,.3,.36,.42][m],d=l+m):(o=[0,600,1033,2339,2340][m],c=[0,260,286,306,312][m],f=[0,.26,.286,.3,.306,.34][m],d="tilde"+m)}var v=new An(d),g=new sn([v],{width:"100%",height:ie(f),viewBox:"0 0 "+o+" "+c,preserveAspectRatio:"none"});return{span:_n([],[g],t),minWidth:0,height:f}}else{var x=[],w=Jm[l];if(!w)throw new Error('No SVG data for "'+l+'".');var[N,M,z]=w,E=z/1e3,B=N.length,I,R;if(B===1){if(w.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');I=["hide-tail"],R=[w[3]]}else if(B===2)I=["halfarrow-left","halfarrow-right"],R=["xMinYMin","xMaxYMin"];else if(B===3)I=["brace-left","brace-center","brace-right"],R=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
595
|
+
`+B+" children.");for(var F=0;F<B;F++){var ne=new An(N[F]),Y=new sn([ne],{width:"400em",height:ie(E),viewBox:"0 0 "+o+" "+z,preserveAspectRatio:R[F]+" slice"}),re=_n([I[F]],[Y],t);if(B===1)return{span:re,minWidth:M,height:E};re.style.height=ie(E),x.push(re)}return{span:K(["stretchy"],x,t),minWidth:M,height:E}}}var{span:r,minWidth:s,height:a}=n();return r.height=a,r.style.height=ie(a),s>0&&(r.style.minWidth=ie(s)),r},t4=function(e,t,n,r,s){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=K(["stretchy",t],[],s),t==="fbox"){var l=s.color&&s.getColor();l&&(a.style.borderColor=l)}}else{var h=[];/^[bx]cancel$/.test(t)&&h.push(new S0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&h.push(new S0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new sn(h,{width:"100%",height:ie(o)});a=_n([],[c],s)}return a.height=o,a.style.height=ie(o),a},i4={bin:1,close:1,inner:1,open:1,punct:1,rel:1},n4={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function r4(i){return i in i4}function Se(i,e){if(!i||i.type!==e)throw new Error("Expected node of type "+e+", but got "+(i?"node of type "+i.type:String(i)));return i}function Ka(i){var e=Za(i);if(!e)throw new Error("Expected node of symbol group type, but got "+(i?"node of type "+i.type:String(i)));return e}function Za(i){return i&&(i.type==="atom"||n4.hasOwnProperty(i.type))?i:null}var h1=i=>{if(i instanceof pi)return i;if(Lm(i)&&i.children.length===1)return h1(i.children[0])},Tl=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Se(i.base,"accent"),t=n.base,i.base=t,r=Nm(He(i,e)),i.base=n):(n=Se(i,"accent"),t=n.base);var s=He(t,e.havingCrampedStyle()),a=n.isShifty&&on(t),o=0;if(a){var l,h;o=(l=(h=h1(s))==null?void 0:h.skew)!=null?l:0}var c=n.label==="\\c",d=c?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),f;if(n.isStretchy)f=ja(n,e),f=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ie(2*o)+")",marginLeft:ie(2*o)}:void 0}]});else{var m,v;n.label==="\\vec"?(m=i1("vec",e),v=t1.vec[1]):(m=Xa({mode:n.mode,text:n.label},e,"textord"),m=Cm(m),m.italic=0,v=m.width,c&&(d+=m.depth)),f=K(["accent-body"],[m]);var g=n.label==="\\textcircled";g&&(f.classes.push("accent-full"),d=s.height);var x=o;g||(x-=v/2),f.style.left=ie(x),n.label==="\\textcircled"&&(f.style.top=".2em"),f=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]})}var w=K(["mord","accent"],[f],e);return r?(r.children[0]=w,r.height=Math.max(w.height,r.height),r.classes[0]="mord",r):w},c1=(i,e)=>{var t=i.isStretchy?Va(i.label):new te("mo",[zi(i.label,i.mode)]),n=new te("mover",[Ke(i.base,e),t]);return n.setAttribute("accent","true"),n},s4=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));le({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:(i,e)=>{var t=Ra(e[0]),n=!s4.test(i.funcName),r=!n||i.funcName==="\\widehat"||i.funcName==="\\widetilde"||i.funcName==="\\widecheck";return{type:"accent",mode:i.parser.mode,label:i.funcName,isStretchy:n,isShifty:r,base:t}},htmlBuilder:Tl,mathmlBuilder:c1});le({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(i,e)=>{var t=e[0],n=i.parser.mode;return n==="math"&&(i.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+i.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:i.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Tl,mathmlBuilder:c1});le({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"accentUnder",mode:t.mode,label:n,base:r}},htmlBuilder:(i,e)=>{var t=He(i.base,e),n=ja(i,e),r=i.label==="\\utilde"?.12:0,s=Fe({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]});return K(["mord","accentunder"],[s],e)},mathmlBuilder:(i,e)=>{var t=Va(i.label),n=new te("munder",[Ke(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var la=i=>{var e=new te("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};le({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(i,e,t){var{parser:n,funcName:r}=i;return{type:"xArrow",mode:n.mode,label:r,body:e[0],below:t[0]}},htmlBuilder(i,e){var t=e.style,n=e.havingStyle(t.sup()),r=Br(He(i.body,n,e),e),s=i.label.slice(0,2)==="\\x"?"x":"cd";r.classes.push(s+"-arrow-pad");var a;i.below&&(n=e.havingStyle(t.sub()),a=Br(He(i.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=ja(i,e),l=-e.fontMetrics().axisHeight+.5*o.height,h=-e.fontMetrics().axisHeight-.5*o.height-.111;(r.depth>.25||i.label==="\\xleftequilibrium")&&(h-=r.depth);var c;if(a){var d=-e.fontMetrics().axisHeight+a.height+.5*o.height+.111;c=Fe({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:d}]})}else c=Fe({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return K(["mrel","x-arrow"],[c],e)},mathmlBuilder(i,e){var t=Va(i.label);t.setAttribute("minsize",i.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(i.body){var r=la(Ke(i.body,e));if(i.below){var s=la(Ke(i.below,e));n=new te("munderover",[t,s,r])}else n=new te("mover",[t,r])}else if(i.below){var a=la(Ke(i.below,e));n=new te("munder",[t,a])}else n=la(),n=new te("mover",[t,n]);return n}});function d1(i,e){var t=Mt(i.body,e,!0);return K([i.mclass],t,e)}function u1(i,e){var t,n=vi(i.body,e);return i.mclass==="minner"?t=new te("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new te("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new te("mo",n),i.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):i.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):i.mclass==="mopen"||i.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):i.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}le({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+n.slice(5),body:xt(r),isCharacterBox:on(r)}},htmlBuilder:d1,mathmlBuilder:u1});var Qa=i=>{var e=i.type==="ordgroup"&&i.body.length?i.body[0]:i;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};le({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:Qa(e[0]),body:xt(e[1]),isCharacterBox:on(e[1])}}});le({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(i,e){var{parser:t,funcName:n}=i,r=e[1],s=e[0],a;n!=="\\stackrel"?a=Qa(r):a="mrel";var o={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:xt(r)},l={type:"supsub",mode:s.mode,base:o,sup:n==="\\underset"?null:s,sub:n==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:a,body:[l],isCharacterBox:on(l)}},htmlBuilder:d1,mathmlBuilder:u1});le({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:Qa(e[0]),body:xt(e[0])}},htmlBuilder(i,e){var t=Mt(i.body,e,!0),n=K([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=vi(i.body,e),n=new te("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var a4={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Yh=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Xh=i=>i.type==="textord"&&i.text==="@",o4=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function l4(i,e,t){var n=a4[i];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var r=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:n,mode:"math",family:"rel"},a=t.callFunction("\\Big",[s],[]),o=t.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[r,a,o]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function h4(i){var e=[];for(i.gullet.beginGroup(),i.gullet.macros.set("\\cr","\\\\\\relax"),i.gullet.beginGroup();;){e.push(i.parseExpression(!1,"\\\\")),i.gullet.endGroup(),i.gullet.beginGroup();var t=i.fetch().text;if(t==="&"||t==="\\\\")i.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new ee("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],s=0;s<e.length;s++){for(var a=e[s],o=Yh(),l=0;l<a.length;l++)if(!Xh(a[l]))o.body.push(a[l]);else{n.push(o),l+=1;var h=Ka(a[l]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(h))if("<>AV".includes(h))for(var d=0;d<2;d++){for(var f=!0,m=l+1;m<a.length;m++){if(o4(a[m],h)){f=!1,l=m;break}if(Xh(a[m]))throw new ee("Missing a "+h+" character to complete a CD arrow.",a[m]);c[d].body.push(a[m])}if(f)throw new ee("Missing a "+h+" character to complete a CD arrow.",a[l])}else throw new ee('Expected one of "<>AV=|." after @',a[l]);var v=l4(h,c,i),g={type:"styling",body:[v],mode:"math",style:"display",resetFont:!0};n.push(g),o=Yh()}s%2===0?n.push(o):n.shift(),n=[],r.push(n)}i.gullet.endGroup(),i.gullet.endGroup();var x=new Array(r[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:r,arraystretch:1,addJot:!0,rowGaps:[null],cols:x,colSeparationType:"CD",hLinesBeforeRow:new Array(r.length+1).fill([])}}le({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"cdlabel",mode:t.mode,side:n.slice(4),label:e[0]}},htmlBuilder(i,e){var t=e.havingStyle(e.style.sup()),n=Br(He(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ie(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new te("mrow",[Ke(i.label,e)]);return t=new te("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new te("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});le({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(i,e){var{parser:t}=i;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(i,e){var t=Br(He(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new te("mrow",[Ke(i.fragment,e)])}});le({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Se(e[0],"ordgroup"),r=n.body,s="",a=0;a<r.length;a++){var o=Se(r[a],"textord");s+=o.text}var l=parseInt(s),h;if(isNaN(l))throw new ee("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new ee("\\@char with invalid code point "+s);return l<=65535?h=String.fromCharCode(l):(l-=65536,h=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:h}}});var f1=(i,e)=>{var t=Mt(i.body,e.withColor(i.color),!1);return hn(t)},p1=(i,e)=>{var t=vi(i.body,e.withColor(i.color)),n=new te("mstyle",t);return n.setAttribute("mathcolor",i.color),n};le({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Se(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:xt(r)}},htmlBuilder:f1,mathmlBuilder:p1});le({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Se(e[0],"color-token").color;t.gullet.macros.set("\\current@color",r);var s=t.parseExpression(!0,n);return{type:"color",mode:t.mode,color:r,body:s}},htmlBuilder:f1,mathmlBuilder:p1});le({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(i,e,t){var{parser:n}=i,r=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:r&&Se(r,"size").value}},htmlBuilder(i,e){var t=K(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ie(ot(i.size,e)))),t},mathmlBuilder(i,e){var t=new te("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ie(ot(i.size,e)))),t}});var B0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},m1=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new ee("Expected a control sequence",i);return e},c4=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},g1=(i,e,t,n)=>{var r=i.gullet.macros.get(t.text);r==null&&(t.noexpand=!0,r={tokens:[t],numArgs:0,unexpandable:!i.gullet.isExpandable(t.text)}),i.gullet.macros.set(e,r,n)};le({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(i){var{parser:e,funcName:t}=i;e.consumeSpaces();var n=e.fetch();if(B0[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=B0[n.text]),Se(e.parseFunction(),"internal");throw new ee("Invalid token after macro prefix",n)}});le({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=e.gullet.popToken(),r=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(r))throw new ee("Expected a control sequence",n);for(var s=0,a,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){a=e.gullet.future(),o[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new ee('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new ee('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new ee("Expected a macro definition");o[s].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return a&&l.unshift(a),(t==="\\edef"||t==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(r,{tokens:l,numArgs:s,delimiters:o},t===B0[t]),{type:"internal",mode:e.mode}}});le({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=m1(e.gullet.popToken());e.gullet.consumeSpaces();var r=c4(e);return g1(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});le({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=m1(e.gullet.popToken()),r=e.gullet.popToken(),s=e.gullet.popToken();return g1(e,n,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var fs=function(e,t,n){var r=it.math[e]&&it.math[e].replace,s=xl(r||e,t,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},El=function(e,t,n,r){var s=n.havingBaseStyle(t),a=K(r.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},v1=function(e,t,n){var r=t.havingBaseStyle(n),s=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ie(s),e.height-=s,e.depth+=s},d4=function(e,t,n,r,s,a){var o=Wt(e,"Main-Regular",s,r),l=El(o,t,r,a);return v1(l,r,t),l},u4=function(e,t,n,r){return Wt(e,"Size"+t+"-Regular",n,r)},x1=function(e,t,n,r,s,a){var o=u4(e,t,s,r),l=El(K(["delimsizing","size"+t],[o],r),Te.TEXT,r,a);return n&&v1(l,r,Te.TEXT),l},No=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var s=K(["delimsizinginner",r],[K([],[Wt(e,t,n)])]);return{type:"elem",elem:s}},Lo=function(e,t,n){var r=Gi["Size4-Regular"][e.charCodeAt(0)]?Gi["Size4-Regular"][e.charCodeAt(0)][4]:Gi["Size1-Regular"][e.charCodeAt(0)][4],s=new An("inner",bm(e,Math.round(1e3*t))),a=new sn([s],{width:ie(r),height:ie(t),style:"width:"+ie(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=_n([],[a],n);return o.height=t,o.style.height=ie(t),o.style.width=ie(r),{type:"elem",elem:o}},P0=.008,ha={type:"kern",size:-1*P0},f4=new Set(["|","\\lvert","\\rvert","\\vert"]),p4=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),y1=function(e,t,n,r,s,a){var o,l,h,c,d="",f=0;o=h=c=e,l=null;var m="Size1-Regular";e==="\\uparrow"?h=c="⏐":e==="\\Uparrow"?h=c="‖":e==="\\downarrow"?o=h="⏐":e==="\\Downarrow"?o=h="‖":e==="\\updownarrow"?(o="\\uparrow",h="⏐",c="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",h="‖",c="\\Downarrow"):f4.has(e)?(h="∣",d="vert",f=333):p4.has(e)?(h="∥",d="doublevert",f=556):e==="["||e==="\\lbrack"?(o="⎡",h="⎢",c="⎣",m="Size4-Regular",d="lbrack",f=667):e==="]"||e==="\\rbrack"?(o="⎤",h="⎥",c="⎦",m="Size4-Regular",d="rbrack",f=667):e==="\\lfloor"||e==="⌊"?(h=o="⎢",c="⎣",m="Size4-Regular",d="lfloor",f=667):e==="\\lceil"||e==="⌈"?(o="⎡",h=c="⎢",m="Size4-Regular",d="lceil",f=667):e==="\\rfloor"||e==="⌋"?(h=o="⎥",c="⎦",m="Size4-Regular",d="rfloor",f=667):e==="\\rceil"||e==="⌉"?(o="⎤",h=c="⎥",m="Size4-Regular",d="rceil",f=667):e==="("||e==="\\lparen"?(o="⎛",h="⎜",c="⎝",m="Size4-Regular",d="lparen",f=875):e===")"||e==="\\rparen"?(o="⎞",h="⎟",c="⎠",m="Size4-Regular",d="rparen",f=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",c="⎩",h="⎪",m="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",c="⎭",h="⎪",m="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",c="⎩",h="⎪",m="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",c="⎭",h="⎪",m="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",c="⎭",h="⎪",m="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",c="⎩",h="⎪",m="Size4-Regular");var v=fs(o,m,s),g=v.height+v.depth,x=fs(h,m,s),w=x.height+x.depth,N=fs(c,m,s),M=N.height+N.depth,z=0,E=1;if(l!==null){var B=fs(l,m,s);z=B.height+B.depth,E=2}var I=g+M+z,R=Math.max(0,Math.ceil((t-I)/(E*w))),F=I+R*E*w,ne=r.fontMetrics().axisHeight;n&&(ne*=r.sizeMultiplier);var Y=F/2-ne,re=[];if(d.length>0){var j=F-g-M,$=Math.round(F*1e3),q=km(d,Math.round(j*1e3)),he=new An(d,q),fe=ie(f/1e3),Ze=ie($/1e3),lt=new sn([he],{width:fe,height:Ze,viewBox:"0 0 "+f+" "+$}),Ue=_n([],[lt],r);Ue.height=$/1e3,Ue.style.width=fe,Ue.style.height=Ze,re.push({type:"elem",elem:Ue})}else{if(re.push(No(c,m,s)),re.push(ha),l===null){var St=F-g-M+2*P0;re.push(Lo(h,St,r))}else{var dt=(F-g-M-z)/2+2*P0;re.push(Lo(h,dt,r)),re.push(ha),re.push(No(l,m,s)),re.push(ha),re.push(Lo(h,dt,r))}re.push(ha),re.push(No(o,m,s))}var Qe=r.havingBaseStyle(Te.TEXT),Xe=Fe({positionType:"bottom",positionData:Y,children:re});return El(K(["delimsizing","mult"],[Xe],Qe),Te.TEXT,r,a)},Ao=80,_o=.08,Do=function(e,t,n,r,s){var a=wm(e,r,n),o=new An(e,a),l=new sn([o],{width:"400em",height:ie(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return _n(["hide-tail"],[l],s)},m4=function(e,t){var n=t.havingBaseSizing(),r=E1("\\surd",e*n.sizeMultiplier,T1,n),s=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,l,h,c,d;return r.type==="small"?(c=1e3+1e3*a+Ao,e<1?s=1:e<1.4&&(s=.7),l=(1+a+_o)/s,h=(1+a)/s,o=Do("sqrtMain",l,c,a,t),o.style.minWidth="0.853em",d=.833/s):r.type==="large"?(c=(1e3+Ao)*gs[r.size],h=(gs[r.size]+a)/s,l=(gs[r.size]+a+_o)/s,o=Do("sqrtSize"+r.size,l,c,a,t),o.style.minWidth="1.02em",d=1/s):(l=e+a+_o,h=e+a,c=Math.floor(1e3*e+a)+Ao,o=Do("sqrtTall",l,c,a,t),o.style.minWidth="0.742em",d=1.056),o.height=h,o.style.height=ie(l),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},w1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),g4=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),b1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),gs=[0,1.2,1.8,2.4,3],k1=function(e,t,n,r,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),w1.has(e)||b1.has(e))return x1(e,t,!1,n,r,s);if(g4.has(e))return y1(e,gs[t],!1,n,r,s);throw new ee("Illegal delimiter: '"+e+"'")},v4=[{type:"small",style:Te.SCRIPTSCRIPT},{type:"small",style:Te.SCRIPT},{type:"small",style:Te.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],x4=[{type:"small",style:Te.SCRIPTSCRIPT},{type:"small",style:Te.SCRIPT},{type:"small",style:Te.TEXT},{type:"stack"}],T1=[{type:"small",style:Te.SCRIPTSCRIPT},{type:"small",style:Te.SCRIPT},{type:"small",style:Te.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],y4=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},E1=function(e,t,n,r){for(var s=Math.min(2,3-r.style.size),a=s;a<n.length;a++){var o=n[a];if(o.type==="stack")break;var l=fs(e,y4(o),"math"),h=l.height+l.depth;if(o.type==="small"){var c=r.havingBaseStyle(o.style);h*=c.sizeMultiplier}if(h>t)return o}return n[n.length-1]},F0=function(e,t,n,r,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;b1.has(e)?o=v4:w1.has(e)?o=T1:o=x4;var l=E1(e,t,o,r);return l.type==="small"?d4(e,l.style,n,r,s,a):l.type==="large"?x1(e,l.size,n,r,s,a):y1(e,t,n,r,s,a)},Ro=function(e,t,n,r,s,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,l=901,h=5/r.fontMetrics().ptPerEm,c=Math.max(t-o,n+o),d=Math.max(c/500*l,2*c-h);return F0(e,d,!0,r,s,a)},Vh={"\\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}},w4=new Set(["(","\\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 jh(i){return"isMiddle"in i}function Ja(i,e){var t=Za(i);if(t&&w4.has(t.text))return t;throw t?new ee("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new ee("Invalid delimiter type '"+i.type+"'",i)}le({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:(i,e)=>{var t=Ja(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:Vh[i.funcName].size,mclass:Vh[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?K([i.mclass]):k1(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(zi(i.delim,i.mode));var t=new te("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ie(gs[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function Kh(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}le({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=i.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new ee("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:Ja(e[0],i).text,color:t}}});le({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ja(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Se(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(i,e)=>{Kh(i);for(var t=Mt(i.body,e,!0,["mopen","mclose"]),n=0,r=0,s=!1,a=0;a<t.length;a++){var o=t[a];jh(o)?s=!0:(n=Math.max(t[a].height,n),r=Math.max(t[a].depth,r))}n*=e.sizeMultiplier,r*=e.sizeMultiplier;var l;if(i.left==="."?l=zs(e,["mopen"]):l=Ro(i.left,n,r,e,i.mode,["mopen"]),t.unshift(l),s)for(var h=1;h<t.length;h++){var c=t[h];if(jh(c)){var d=c.isMiddle;t[h]=Ro(d.delim,n,r,d.options,i.mode,[])}}var f;if(i.right===".")f=zs(e,["mclose"]);else{var m=i.rightColor?e.withColor(i.rightColor):e;f=Ro(i.right,n,r,m,i.mode,["mclose"])}return t.push(f),K(["minner"],t,e)},mathmlBuilder:(i,e)=>{Kh(i);var t=vi(i.body,e);if(i.left!=="."){var n=new te("mo",[zi(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new te("mo",[zi(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return bl(t)}});le({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ja(e[0],i);if(!i.parser.leftrightDepth)throw new ee("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;return i.delim==="."?t=zs(e,[]):(t=k1(i.delim,1,e,i.mode,[]),t.isMiddle={delim:i.delim,options:e}),t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?zi("|","text"):zi(i.delim,i.mode),n=new te("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var eo=(i,e)=>{var t=Br(He(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,s,a,o=on(i.body);if(n==="sout")s=K(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/r,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=ot({number:.6,unit:"pt"},e),h=ot({number:.35,unit:"ex"},e),c=e.havingBaseSizing();r=r/c.sizeMultiplier;var d=t.height+t.depth+l+h;t.style.paddingLeft=ie(d/2+l);var f=Math.floor(1e3*d*r),m=xm(f),v=new sn([new An("phase",m)],{width:"400em",height:ie(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=_n(["hide-tail"],[v],e),s.style.height=ie(d),a=t.depth+l+h}else{/cancel/.test(n)?o||t.classes.push("cancel-pad"):n==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var g,x,w=0;/box/.test(n)?(w=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:w),x=g):n==="angl"?(w=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*w,x=Math.max(0,.25-t.depth)):(g=o?.2:0,x=g),s=t4(t,n,g,x,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=ie(w)):n==="angl"&&w!==.049&&(s.style.borderTopWidth=ie(w),s.style.borderRightWidth=ie(w)),a=t.depth+x,i.backgroundColor&&(s.style.backgroundColor=i.backgroundColor,i.borderColor&&(s.style.borderColor=i.borderColor))}var N;if(i.backgroundColor)N=Fe({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:t,shift:0}]});else{var M=/cancel|phase/.test(n)?["svg-align"]:[];N=Fe({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:M}]})}return/cancel/.test(n)&&(N.height=t.height,N.depth=t.depth),/cancel/.test(n)&&!o?K(["mord","cancel-lap"],[N],e):K(["mord"],[N],e)},to=(i,e)=>{var t,n=new te(i.label.includes("colorbox")?"mpadded":"menclose",[Ke(i.body,e)]);switch(i.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*t+"pt"),n.setAttribute("height","+"+2*t+"pt"),n.setAttribute("lspace",t+"pt"),n.setAttribute("voffset",t+"pt"),i.label==="\\fcolorbox"){var r=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+ie(r)+" solid "+i.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};le({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Se(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,body:a}},htmlBuilder:eo,mathmlBuilder:to});le({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Se(e[0],"color-token").color,a=Se(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:eo,mathmlBuilder:to});le({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});le({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:eo,mathmlBuilder:to});le({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var r=e[0];return{type:"enclose",mode:t.mode,label:n,body:r}},htmlBuilder:eo,mathmlBuilder:to});le({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var M1={};function Wi(i){for(var{type:e,names:t,props:n,handler:r,htmlBuilder:s,mathmlBuilder:a}=i,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:r},l=0;l<t.length;++l)M1[t[l]]=o;s&&(_a[e]=s),a&&(Da[e]=a)}var S1={};function k(i,e){S1[i]=e}class ni{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new ni(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class ui{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new ui(t,ni.range(this,e))}}function Zh(i){var e=[];i.consumeSpaces();var t=i.fetch().text;for(t==="\\relax"&&(i.consume(),i.consumeSpaces(),t=i.fetch().text);t==="\\hline"||t==="\\hdashline";)i.consume(),e.push(t==="\\hdashline"),i.consumeSpaces(),t=i.fetch().text;return e}var io=i=>{var e=i.parser.settings;if(!e.displayMode)throw new ee("{"+i.envName+"} can be used only in display mode.")},b4=new Set(["gather","gather*"]);function Ml(i){if(!i.includes("ed"))return!i.includes("*")}function In(i,e,t){var{hskipBeforeAndAfter:n,addJot:r,cols:s,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:f}=e;if(i.gullet.beginGroup(),h||i.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=i.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new ee("Invalid \\arraystretch: "+m)}i.gullet.beginGroup();var v=[],g=[v],x=[],w=[],N=l!=null?[]:void 0;function M(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function z(){N&&(i.gullet.macros.get("\\df@tag")?(N.push(i.subparse([new ui("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):N.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(M(),w.push(Zh(i));;){var E=i.parseExpression(!1,h?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup();var B={type:"ordgroup",mode:i.mode,body:E};t&&(B={type:"styling",mode:i.mode,style:t,resetFont:!0,body:[B]}),v.push(B);var I=i.fetch().text;if(I==="&"){if(d&&v.length===d){if(h||o)throw new ee("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(I==="\\end"){z(),v.length===1&&B.type==="styling"&&B.body.length===1&&B.body[0].type==="ordgroup"&&B.body[0].body.length===0&&(g.length>1||!c)&&g.pop(),w.length<g.length+1&&w.push([]);break}else if(I==="\\\\"){i.consume();var R=void 0;i.gullet.future().text!==" "&&(R=i.parseSizeGroup(!0)),x.push(R?R.value:null),z(),w.push(Zh(i)),v=[],g.push(v),M()}else throw new ee("Expected & or \\\\ or \\cr or \\end",i.nextToken)}return i.gullet.endGroup(),i.gullet.endGroup(),{type:"array",mode:i.mode,addJot:r,arraystretch:a,body:g,cols:s,rowGaps:x,hskipBeforeAndAfter:n,hLinesBeforeRow:w,colSeparationType:o,tags:N,leqno:f}}function Sl(i){return i.slice(0,1)==="d"?"display":"text"}var Yi=function(e,t){var n,r,s=e.body.length,a=e.hLinesBeforeRow,o=0,l=new Array(s),h=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var m=t.havingStyle(Te.SCRIPT).sizeMultiplier;f=.2778*(m/t.sizeMultiplier)}var v=e.colSeparationType==="CD"?ot({number:3,unit:"ex"},t):12*d,g=3*d,x=e.arraystretch*v,w=.7*x,N=.3*x,M=0;function z(ye){for(var me=0;me<ye.length;++me)me>0&&(M+=.25),h.push({pos:M,isDashed:ye[me]})}for(z(a[0]),n=0;n<e.body.length;++n){var E=e.body[n],B=w,I=N;o<E.length&&(o=E.length);var R={cells:new Array(E.length),height:0,depth:0,pos:0};for(r=0;r<E.length;++r){var F=He(E[r],t);I<F.depth&&(I=F.depth),B<F.height&&(B=F.height),R.cells[r]=F}var ne=e.rowGaps[n],Y=0;ne&&(Y=ot(ne,t),Y>0&&(Y+=N,I<Y&&(I=Y),Y=0)),e.addJot&&n<e.body.length-1&&(I+=g),R.height=B,R.depth=I,M+=B,R.pos=M,M+=I+Y,l[n]=R,z(a[n+1])}var re=M/2+t.fontMetrics().axisHeight,j=e.cols||[],$=[],q,he,fe=[];if(e.tags&&e.tags.some(ye=>ye))for(n=0;n<s;++n){var Ze=l[n],lt=Ze.pos-re,Ue=e.tags[n],St=void 0;Ue===!0?St=K(["eqn-num"],[],t):Ue===!1?St=K([],[],t):St=K([],Mt(Ue,t,!0),t),St.depth=Ze.depth,St.height=Ze.height,fe.push({type:"elem",elem:St,shift:lt})}for(r=0,he=0;r<o||he<j.length;++r,++he){for(var dt,Qe=j[he],Xe=!0;((Ci=Qe)==null?void 0:Ci.type)==="separator";){var Ci;if(Xe||(q=K(["arraycolsep"],[]),q.style.width=ie(t.fontMetrics().doubleRuleSep),$.push(q)),Qe.separator==="|"||Qe.separator===":"){var Z=Qe.separator==="|"?"solid":"dashed",Me=K(["vertical-separator"],[],t);Me.style.height=ie(M),Me.style.borderRightWidth=ie(c),Me.style.borderRightStyle=Z,Me.style.margin="0 "+ie(-c/2);var bt=M-re;bt&&(Me.style.verticalAlign=ie(-bt)),$.push(Me)}else throw new ee("Invalid separator type: "+Qe.separator);he++,Qe=j[he],Xe=!1}if(!(r>=o)){var Ve=void 0;if(r>0||e.hskipBeforeAndAfter){var Kt,O;Ve=(Kt=(O=Qe)==null?void 0:O.pregap)!=null?Kt:f,Ve!==0&&(q=K(["arraycolsep"],[]),q.style.width=ie(Ve),$.push(q))}var xi=[];for(n=0;n<s;++n){var Je=l[n],kt=Je.cells[r];if(kt){var $t=Je.pos-re;kt.depth=Je.depth,kt.height=Je.height,xi.push({type:"elem",elem:kt,shift:$t})}}var Le=Fe({positionType:"individualShift",children:xi}),oi=K(["col-align-"+(((dt=Qe)==null?void 0:dt.align)||"c")],[Le]);if($.push(oi),r<o-1||e.hskipBeforeAndAfter){var _e,At;Ve=(_e=(At=Qe)==null?void 0:At.postgap)!=null?_e:f,Ve!==0&&(q=K(["arraycolsep"],[]),q.style.width=ie(Ve),$.push(q))}}}var ut=K(["mtable"],$);if(h.length>0){for(var Tt=Or("hline",t,c),Ni=Or("hdashline",t,c),zt=[{type:"elem",elem:ut,shift:0}];h.length>0;){var Zt=h.pop(),W=Zt.pos-re;Zt.isDashed?zt.push({type:"elem",elem:Ni,shift:W}):zt.push({type:"elem",elem:Tt,shift:W})}ut=Fe({positionType:"individualShift",children:zt})}if(fe.length===0)return K(["mord"],[ut],t);var de=Fe({positionType:"individualShift",children:fe}),Ne=K(["tag"],[de],t);return hn([ut,Ne])},k4={c:"center ",l:"left ",r:"right "},Xi=function(e,t){for(var n=[],r=new te("mtd",[],["mtr-glue"]),s=new te("mtd",[],["mml-eqn-num"]),a=0;a<e.body.length;a++){for(var o=e.body[a],l=[],h=0;h<o.length;h++)l.push(new te("mtd",[Ke(o[h],t)]));e.tags&&e.tags[a]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(s):l.push(s)),n.push(new te("mtr",l))}var c=new te("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",ie(d));var f="",m="";if(e.cols&&e.cols.length>0){var v=e.cols,g="",x=!1,w=0,N=v.length;v[0].type==="separator"&&(f+="top ",w=1),v[v.length-1].type==="separator"&&(f+="bottom ",N-=1);for(var M=w;M<N;M++){var z=v[M];z.type==="align"?(m+=k4[z.align],x&&(g+="none "),x=!0):z.type==="separator"&&x&&(g+=z.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",m.trim()),/[sd]/.test(g)&&c.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var E=e.cols||[],B="",I=1;I<E.length;I++)B+=I%2?"0em ":"1em ";c.setAttribute("columnspacing",B.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?c.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?c.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var R="",F=e.hLinesBeforeRow;f+=F[0].length>0?"left ":"",f+=F[F.length-1].length>0?"right ":"";for(var ne=1;ne<F.length-1;ne++)R+=F[ne].length===0?"none ":F[ne][0]?"dashed ":"solid ";return/[sd]/.test(R)&&c.setAttribute("rowlines",R.trim()),f!==""&&(c=new te("menclose",[c]),c.setAttribute("notation",f.trim())),e.arraystretch&&e.arraystretch<1&&(c=new te("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},z1=function(e,t){e.envName.includes("ed")||io(e);var n=[],r=e.envName.includes("at")?"alignat":"align",s=e.envName==="split",a=In(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Ml(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var c="",d=0;d<t[0].body.length;d++){var f=Se(t[0].body[d],"textord");c+=f.text}o=Number(c),l=o*2}var m=!l;a.body.forEach(function(w){for(var N=1;N<w.length;N+=2){var M=Se(w[N],"styling"),z=Se(M.body[0],"ordgroup");z.body.unshift(h)}if(m)l<w.length&&(l=w.length);else{var E=w.length/2;if(o<E)throw new ee("Too many math in a row: "+("expected "+o+", but got "+E),w[0])}});for(var v=0;v<l;++v){var g="r",x=0;v%2===1?g="l":v>0&&m&&(x=1),n[v]={type:"align",align:g,pregap:x,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Wi({type:"array",names:["array","darray"],props:{numArgs:1},handler(i,e){var t=Za(e[0]),n=t?[e[0]]:Se(e[0],"ordgroup").body,r=n.map(function(a){var o=Ka(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new ee("Unknown column alignment: "+l,a)}),s={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return In(i.parser,s,Sl(i.envName))},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(i){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[i.envName.replace("*","")],t="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(i.envName.charAt(i.envName.length-1)==="*"){var r=i.parser;if(r.consumeSpaces(),r.fetch().text==="["){if(r.consume(),r.consumeSpaces(),t=r.fetch().text,!"lcr".includes(t))throw new ee("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var s=In(i.parser,n,Sl(i.envName)),a=Math.max(0,...s.body.map(o=>o.length));return s.cols=new Array(a).fill({type:"align",align:t}),e?{type:"leftright",mode:i.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(i){var e={arraystretch:.5},t=In(i.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["subarray"],props:{numArgs:1},handler(i,e){var t=Za(e[0]),n=t?[e[0]]:Se(e[0],"ordgroup").body,r=n.map(function(o){var l=Ka(o),h=l.text;if("lc".includes(h))return{type:"align",align:h};throw new ee("Unknown column alignment: "+h,o)});if(r.length>1)throw new ee("{subarray} can contain only one column");var s={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=In(i.parser,s,"script");if(a.body.length>0&&a.body[0].length>1)throw new ee("{subarray} can contain only one column");return a},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(i){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=In(i.parser,e,Sl(i.envName));return{type:"leftright",mode:i.mode,body:[t],left:i.envName.includes("r")?".":"\\{",right:i.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:z1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){b4.has(i.envName)&&io(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ml(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return In(i.parser,e,"display")},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:z1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){io(i);var e={autoTag:Ml(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return In(i.parser,e,"display")},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["CD"],props:{numArgs:0},handler(i){return io(i),h4(i.parser)},htmlBuilder:Yi,mathmlBuilder:Xi});k("\\nonumber","\\gdef\\@eqnsw{0}");k("\\notag","\\nonumber");le({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new ee(i.funcName+" valid only within array environment")}});var Qh=M1;le({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];if(r.type!=="ordgroup")throw new ee("Invalid environment name",r);for(var s="",a=0;a<r.body.length;++a)s+=Se(r.body[a],"textord").text;if(n==="\\begin"){if(!Qh.hasOwnProperty(s))throw new ee("No such environment: "+s,r);var o=Qh[s],{args:l,optArgs:h}=t.parseArguments("\\begin{"+s+"}",o),c={mode:t.mode,envName:s,parser:t},d=o.handler(c,l,h);t.expect("\\end",!1);var f=t.nextToken,m=Se(t.parseFunction(),"environment");if(m.name!==s)throw new ee("Mismatch: \\begin{"+s+"} matched by \\end{"+m.name+"}",f);return d}return{type:"environment",mode:t.mode,name:s,nameGroup:r}}});var C1=(i,e)=>{var t=i.font,n=e.withFont(t);return He(i.body,n)},N1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ke(i.body,n)},Jh={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};le({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=Ra(e[0]),s=n;return s in Jh&&(s=Jh[s]),{type:"font",mode:t.mode,font:s.slice(1),body:r}},htmlBuilder:C1,mathmlBuilder:N1});le({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"mclass",mode:t.mode,mclass:Qa(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:on(n)}}});le({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,breakOnTokenText:r}=i,{mode:s}=t,a=t.parseExpression(!0,r);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:C1,mathmlBuilder:N1});var T4=(i,e)=>{var t=e.style,n=t.fracNum(),r=t.fracDen(),s;s=e.havingStyle(n);var a=He(i.numer,s,e);if(i.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;a.height=a.height<o?o:a.height,a.depth=a.depth<l?l:a.depth}s=e.havingStyle(r);var h=He(i.denom,s,e),c,d,f;i.hasBarLine?(i.barSize?(d=ot(i.barSize,e),c=Or("frac-line",e,d)):c=Or("frac-line",e),d=c.height,f=c.height):(c=null,d=0,f=e.fontMetrics().defaultRuleThickness);var m,v,g;t.size===Te.DISPLAY.size?(m=e.fontMetrics().num1,d>0?v=3*f:v=7*f,g=e.fontMetrics().denom1):(d>0?(m=e.fontMetrics().num2,v=f):(m=e.fontMetrics().num3,v=3*f),g=e.fontMetrics().denom2);var x;if(c){var N=e.fontMetrics().axisHeight;m-a.depth-(N+.5*d)<v&&(m+=v-(m-a.depth-(N+.5*d))),N-.5*d-(h.height-g)<v&&(g+=v-(N-.5*d-(h.height-g)));var M=-(N-.5*d);x=Fe({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:c,shift:M},{type:"elem",elem:a,shift:-m}]})}else{var w=m-a.depth-(h.height-g);w<v&&(m+=.5*(v-w),g+=.5*(v-w)),x=Fe({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:a,shift:-m}]})}s=e.havingStyle(t),x.height*=s.sizeMultiplier/e.sizeMultiplier,x.depth*=s.sizeMultiplier/e.sizeMultiplier;var z;t.size===Te.DISPLAY.size?z=e.fontMetrics().delim1:t.size===Te.SCRIPTSCRIPT.size?z=e.havingStyle(Te.SCRIPT).fontMetrics().delim2:z=e.fontMetrics().delim2;var E,B;return i.leftDelim==null?E=zs(e,["mopen"]):E=F0(i.leftDelim,z,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?B=K([]):i.rightDelim==null?B=zs(e,["mclose"]):B=F0(i.rightDelim,z,!0,e.havingStyle(t),i.mode,["mclose"]),K(["mord"].concat(s.sizingClasses(e)),[E,K(["mfrac"],[x]),B],e)},E4=(i,e)=>{var t=new te("mfrac",[Ke(i.numer,e),Ke(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=ot(i.barSize,e);t.setAttribute("linethickness",ie(n))}if(i.leftDelim!=null||i.rightDelim!=null){var r=[];if(i.leftDelim!=null){var s=new te("mo",[new yt(i.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),r.push(s)}if(r.push(t),i.rightDelim!=null){var a=new te("mo",[new yt(i.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),r.push(a)}return bl(r)}return t},L1=(i,e)=>{if(!e)return i;var t={type:"styling",mode:i.mode,style:e,body:[i]};return t};le({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=e[1],a,o=null,l=null;switch(n){case"\\cfrac":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")}var h=n==="\\cfrac",c=null;return h||n.startsWith("\\d")?c="display":n.startsWith("\\t")&&(c="text"),L1({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:h,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},c)},htmlBuilder:T4,mathmlBuilder:E4});le({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(i){var{parser:e,funcName:t,token:n}=i,r;switch(t){case"\\over":r="\\frac";break;case"\\choose":r="\\binom";break;case"\\atop":r="\\\\atopfrac";break;case"\\brace":r="\\\\bracefrac";break;case"\\brack":r="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:r,token:n}}});var ec=["display","text","script","scriptscript"],tc=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};le({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(i,e){var{parser:t}=i,n=e[4],r=e[5],s=Ra(e[0]),a=s.type==="atom"&&s.family==="open"?tc(s.text):null,o=Ra(e[1]),l=o.type==="atom"&&o.family==="close"?tc(o.text):null,h=Se(e[2],"size"),c,d=null;h.isBlank?c=!0:(d=h.value,c=d.number>0);var f=null,m=e[3];if(m.type==="ordgroup"){if(m.body.length>0){var v=Se(m.body[0],"textord");f=ec[Number(v.text)]}}else m=Se(m,"textord"),f=ec[Number(m.text)];return L1({type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:c,barSize:d,leftDelim:a,rightDelim:l},f)}});le({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(i,e){var{parser:t,funcName:n,token:r}=i;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:Se(e[0],"size").value,token:r}}});le({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=Se(e[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));var a=e[2],o=s.number>0;return{type:"genfrac",mode:t.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:s,leftDelim:null,rightDelim:null}}});var A1=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?He(i.sup,e.havingStyle(t.sup()),e):He(i.sub,e.havingStyle(t.sub()),e),r=Se(i.base,"horizBrace")):r=Se(i,"horizBrace");var s=He(r.base,e.havingBaseStyle(Te.DISPLAY)),a=ja(r,e),o;if(r.isOver?o=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Fe({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),n){var l=K(["minner",r.isOver?"mover":"munder"],[o],e);r.isOver?o=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Fe({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return K(["minner",r.isOver?"mover":"munder"],[o],e)},M4=(i,e)=>{var t=Va(i.label);return new te(i.isOver?"mover":"munder",[Ke(i.base,e),t])};le({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(i,e){var{parser:t,funcName:n}=i;return{type:"horizBrace",mode:t.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:A1,mathmlBuilder:M4});le({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Se(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:xt(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Mt(i.body,e,!1);return Pm(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=Dn(i.body,e);return t instanceof te||(t=new te("mrow",[t])),t.setAttribute("href",i.href),t}});le({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Se(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:n}))return t.formatUnsupportedCmd("\\url");for(var r=[],s=0;s<n.length;s++){var a=n[s];a==="~"&&(a="\\textasciitilde"),r.push({type:"textord",mode:"text",text:a})}var o={type:"text",mode:t.mode,font:"\\texttt",body:r};return{type:"href",mode:t.mode,href:n,body:xt(o)}}});le({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(i,e){var{parser:t}=i;return{type:"hbox",mode:t.mode,body:xt(e[0])}},htmlBuilder(i,e){var t=Mt(i.body,e.withFont(""),!1);return hn(t)},mathmlBuilder(i,e){return new te("mrow",vi(i.body,e.withFont("")))}});le({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n,token:r}=i,s=Se(e[0],"raw").string,a=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){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 h=s.split(","),c=0;c<h.length;c++){var d=h[c],f=d.indexOf("=");if(f<0)throw new ee("\\htmlData key/value '"+d+"' missing equals sign");var m=d.slice(0,f),v=d.slice(f+1);l["data-"+m.trim()]=v}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return t.settings.isTrusted(o)?{type:"html",mode:t.mode,attributes:l,body:xt(a)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=Mt(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=K(n,t,e);for(var s in i.attributes)s!=="class"&&i.attributes.hasOwnProperty(s)&&r.setAttribute(s,i.attributes[s]);return r},mathmlBuilder:(i,e)=>Dn(i.body,e)});le({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"htmlmathml",mode:t.mode,html:xt(e[0]),mathml:xt(e[1])}},htmlBuilder:(i,e)=>{var t=Mt(i.html,e,!1);return hn(t)},mathmlBuilder:(i,e)=>Dn(i.mathml,e)});var Io=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new ee("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Vd(n))throw new ee("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};le({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(i,e,t)=>{var{parser:n}=i,r={number:0,unit:"em"},s={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var l=Se(t[0],"raw").string,h=l.split(","),c=0;c<h.length;c++){var d=h[c].split("=");if(d.length===2){var f=d[1].trim();switch(d[0].trim()){case"alt":o=f;break;case"width":r=Io(f);break;case"height":s=Io(f);break;case"totalheight":a=Io(f);break;default:throw new ee("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Se(e[0],"url").url;return o===""&&(o=m,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:n.mode,alt:o,width:r,height:s,totalheight:a,src:m}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(i,e)=>{var t=ot(i.height,e),n=0;i.totalheight.number>0&&(n=ot(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=ot(i.width,e));var s={height:ie(t+n)};r>0&&(s.width=ie(r)),n>0&&(s.verticalAlign=ie(-n));var a=new Sm(i.src,i.alt,s);return a.height=t,a.depth=n,a},mathmlBuilder:(i,e)=>{var t=new te("mglyph",[]);t.setAttribute("alt",i.alt);var n=ot(i.height,e),r=0;if(i.totalheight.number>0&&(r=ot(i.totalheight,e)-n,t.setAttribute("valign",ie(-r))),t.setAttribute("height",ie(n+r)),i.width.number>0){var s=ot(i.width,e);t.setAttribute("width",ie(s))}return t.setAttribute("src",i.src),t}});le({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=Se(e[0],"size");if(t.settings.strict){var s=n[1]==="m",a=r.value.unit==="mu";s?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+r.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:r.value}},htmlBuilder(i,e){return e1(i.dimension,e)},mathmlBuilder(i,e){var t=ot(i.dimension,e);return new a1(t)}});le({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"lap",mode:t.mode,alignment:n.slice(5),body:r}},htmlBuilder:(i,e)=>{var t;i.alignment==="clap"?(t=K([],[He(i.body,e)]),t=K(["inner"],[t],e)):t=K(["inner"],[He(i.body,e)]);var n=K(["fix"],[]),r=K([i.alignment],[t,n],e),s=K(["strut"]);return s.style.height=ie(r.height+r.depth),r.depth&&(s.style.verticalAlign=ie(-r.depth)),r.children.unshift(s),r=K(["thinbox"],[r],e),K(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new te("mpadded",[Ke(i.body,e)]);if(i.alignment!=="rlap"){var n=i.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",n+"width")}return t.setAttribute("width","0px"),t}});le({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){var{funcName:t,parser:n}=i,r=n.mode;n.switchMode("math");var s=t==="\\("?"\\)":"$",a=n.parseExpression(!1,s);return n.expect(s),n.switchMode(r),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:a}}});le({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new ee("Mismatched "+i.funcName)}});var ic=(i,e)=>{switch(e.style.size){case Te.DISPLAY.size:return i.display;case Te.TEXT.size:return i.text;case Te.SCRIPT.size:return i.script;case Te.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};le({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:xt(e[0]),text:xt(e[1]),script:xt(e[2]),scriptscript:xt(e[3])}},htmlBuilder:(i,e)=>{var t=ic(i,e),n=Mt(t,e,!1);return hn(n)},mathmlBuilder:(i,e)=>{var t=ic(i,e);return Dn(t,e)}});var _1=(i,e,t,n,r,s,a)=>{i=K([],[i]);var o=t&&on(t),l,h;if(e){var c=He(e,n.havingStyle(r.sup()),n);h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(t){var d=He(t,n.havingStyle(r.sub()),n);l={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-d.height)}}var f;if(h&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+i.depth+a;f=Fe({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ie(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ie(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var v=i.height-a;f=Fe({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ie(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i}]})}else if(h){var g=i.depth+a;f=Fe({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ie(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return i;var x=[f];if(l&&s!==0&&!o){var w=K(["mspace"],[],n);w.style.marginRight=ie(s),x.unshift(w)}return K(["mop","op-limits"],x,n)},D1=new Set(["\\smallint"]),qr=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Se(i.base,"op"),r=!0):s=Se(i,"op");var a=e.style,o=!1;a.size===Te.DISPLAY.size&&s.symbol&&!D1.has(s.name)&&(o=!0);var l,h;if(s.symbol){var c=o?"Size2-Regular":"Size1-Regular",d="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(d=s.name.slice(1),s.name=d==="oiint"?"\\iint":"\\iiint"),l=Wt(s.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h=l.italic,d.length>0){var f=i1(d+"Size"+(o?"2":"1"),e);l=Fe({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:o?.08:0}]}),s.name="\\"+d,l.classes.unshift("mop"),l.italic=h}}else if(s.body){var m=Mt(s.body,e,!0);m.length===1&&m[0]instanceof pi?(l=m[0],l.classes[0]="mop"):l=K(["mop"],m,e)}else{for(var v=[],g=1;g<s.name.length;g++)v.push(yl(s.name[g],s.mode,e));l=K(["mop"],v,e)}var x=0,w=0;if((l instanceof pi||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var N;x=(l.height-l.depth)/2-e.fontMetrics().axisHeight,w=(N=l.italic)!=null?N:0}return r?_1(l,t,n,e,a,w,x):(x&&(l.style.position="relative",l.style.top=ie(x)),l)},Rs=(i,e)=>{var t;if(i.symbol)t=new te("mo",[zi(i.name,i.mode)]),D1.has(i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new te("mo",vi(i.body,e));else{t=new te("mi",[new yt(i.name.slice(1))]);var n=new te("mo",[zi("","text")]);i.parentIsSupSub?t=new te("mrow",[t,n]):t=s1([t,n])}return t},S4={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};le({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=n;return r.length===1&&(r=S4[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:qr,mathmlBuilder:Rs});le({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xt(n)}},htmlBuilder:qr,mathmlBuilder:Rs});var z4={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};le({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(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:qr,mathmlBuilder:Rs});le({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(i){var{parser:e,funcName:t}=i;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:qr,mathmlBuilder:Rs});le({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(i){var{parser:e,funcName:t}=i,n=t;return n.length===1&&(n=z4[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:qr,mathmlBuilder:Rs});var R1=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Se(i.base,"operatorname"),r=!0):s=Se(i,"operatorname");var a;if(s.body.length>0){for(var o=s.body.map(d=>{var f="text"in d?d.text:void 0;return typeof f=="string"?{type:"textord",mode:d.mode,text:f}:d}),l=Mt(o,e.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof pi&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=K(["mop"],l,e)}else a=K(["mop"],[],e);return r?_1(a,t,n,e,e.style,0,0):a},C4=(i,e)=>{for(var t=vi(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var s=t[r];if(!(s instanceof a1))if(s instanceof te)switch(s.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var a=s.children[0];s.children.length===1&&a instanceof yt?a.text=a.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=t.map(c=>c.toText()).join("");t=[new yt(o)]}var l=new te("mi",t);l.setAttribute("mathvariant","normal");var h=new te("mo",[zi("","text")]);return i.parentIsSupSub?new te("mrow",[l,h]):s1([l,h])};le({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0];return{type:"operatorname",mode:t.mode,body:xt(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:R1,mathmlBuilder:C4});k("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");cr({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?hn(Mt(i.body,e,!1)):K(["mord"],Mt(i.body,e,!0),e)},mathmlBuilder(i,e){return Dn(i.body,e,!0)}});le({type:"overline",names:["\\overline"],props:{numArgs:1},handler(i,e){var{parser:t}=i,n=e[0];return{type:"overline",mode:t.mode,body:n}},htmlBuilder(i,e){var t=He(i.body,e.havingCrampedStyle()),n=Or("overline-line",e),r=e.fontMetrics().defaultRuleThickness,s=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]});return K(["mord","overline"],[s],e)},mathmlBuilder(i,e){var t=new te("mo",[new yt("‾")]);t.setAttribute("stretchy","true");var n=new te("mover",[Ke(i.body,e),t]);return n.setAttribute("accent","true"),n}});le({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"phantom",mode:t.mode,body:xt(n)}},htmlBuilder:(i,e)=>{var t=Mt(i.body,e.withPhantom(),!1);return hn(t)},mathmlBuilder:(i,e)=>{var t=vi(i.body,e);return new te("mphantom",t)}});k("\\hphantom","\\smash{\\phantom{#1}}");le({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[0];return{type:"vphantom",mode:t.mode,body:n}},htmlBuilder:(i,e)=>{var t=K(["inner"],[He(i.body,e.withPhantom())]),n=K(["fix"],[]);return K(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=vi(xt(i.body),e),n=new te("mphantom",t),r=new te("mpadded",[n]);return r.setAttribute("width","0px"),r}});le({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Se(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=He(i.body,e),n=ot(i.dy,e);return Fe({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new te("mpadded",[Ke(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});le({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});le({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(i,e,t){var{parser:n}=i,r=t[0],s=Se(e[0],"size"),a=Se(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Se(r,"size").value,width:s.value,height:a.value}},htmlBuilder(i,e){var t=K(["mord","rule"],[],e),n=ot(i.width,e),r=ot(i.height,e),s=i.shift?ot(i.shift,e):0;return t.style.borderRightWidth=ie(n),t.style.borderTopWidth=ie(r),t.style.bottom=ie(s),t.width=n,t.height=r+s,t.depth=-s,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=ot(i.width,e),n=ot(i.height,e),r=i.shift?ot(i.shift,e):0,s=e.color&&e.getColor()||"black",a=new te("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",ie(t)),a.setAttribute("height",ie(n));var o=new te("mpadded",[a]);return r>=0?o.setAttribute("height",ie(r)):(o.setAttribute("height",ie(r)),o.setAttribute("depth",ie(-r))),o.setAttribute("voffset",ie(r)),o}});function I1(i,e,t){for(var n=Mt(i,e,!1),r=e.sizeMultiplier/t.sizeMultiplier,s=0;s<n.length;s++){var a=n[s].classes.indexOf("sizing");a<0?Array.prototype.push.apply(n[s].classes,e.sizingClasses(t)):n[s].classes[a+1]==="reset-size"+e.size&&(n[s].classes[a+1]="reset-size"+t.size),n[s].height*=r,n[s].depth*=r}return hn(n)}var nc=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],N4=(i,e)=>{var t=e.havingSize(i.size);return I1(i.body,t,e)};le({type:"sizing",names:nc,props:{numArgs:0,allowedInText:!0},handler:(i,e)=>{var{breakOnTokenText:t,funcName:n,parser:r}=i,s=r.parseExpression(!1,t);return{type:"sizing",mode:r.mode,size:nc.indexOf(n)+1,body:s}},htmlBuilder:N4,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=vi(i.body,t),r=new te("mstyle",n);return r.setAttribute("mathsize",ie(t.sizeMultiplier)),r}});le({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(i,e,t)=>{var{parser:n}=i,r=!1,s=!1,a=t[0]&&Se(t[0],"ordgroup");if(a)for(var o,l=0;l<a.body.length;++l){var h=a.body[l];if(o=Ka(h).text,o==="t")r=!0;else if(o==="b")s=!0;else{r=!1,s=!1;break}}else r=!0,s=!0;var c=e[0];return{type:"smash",mode:n.mode,body:c,smashHeight:r,smashDepth:s}},htmlBuilder:(i,e)=>{var t=K([],[He(i.body,e)]);if(!i.smashHeight&&!i.smashDepth)return t;if(i.smashHeight&&(t.height=0),i.smashDepth&&(t.depth=0),i.smashHeight&&i.smashDepth)return K(["mord","smash"],[t],e);if(t.children)for(var n=0;n<t.children.length;n++)i.smashHeight&&(t.children[n].height=0),i.smashDepth&&(t.children[n].depth=0);var r=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:t}]});return K(["mord"],[r],e)},mathmlBuilder:(i,e)=>{var t=new te("mpadded",[Ke(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});le({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(i,e,t){var{parser:n}=i,r=t[0],s=e[0];return{type:"sqrt",mode:n.mode,body:s,index:r}},htmlBuilder(i,e){var t=He(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=Br(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,s=r;e.style.id<Te.TEXT.id&&(s=e.fontMetrics().xHeight);var a=r+s/4,o=t.height+t.depth+a+r,{span:l,ruleWidth:h,advanceWidth:c}=m4(o,e),d=l.height-h;d>t.height+t.depth+a&&(a=(a+d-t.height-t.depth)/2);var f=l.height-t.height-a-h;t.style.paddingLeft=ie(c);var m=Fe({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+f)},{type:"elem",elem:l},{type:"kern",size:h}]});if(i.index){var v=e.havingStyle(Te.SCRIPTSCRIPT),g=He(i.index,v,e),x=.6*(m.height-m.depth),w=Fe({positionType:"shift",positionData:-x,children:[{type:"elem",elem:g}]}),N=K(["root"],[w]);return K(["mord","sqrt"],[N,m],e)}else return K(["mord","sqrt"],[m],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new te("mroot",[Ke(t,e),Ke(n,e)]):new te("msqrt",[Ke(t,e)])}});var H0={display:Te.DISPLAY,text:Te.TEXT,script:Te.SCRIPT,scriptscript:Te.SCRIPTSCRIPT};function L4(i){return i in H0}le({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i,e){var{breakOnTokenText:t,funcName:n,parser:r}=i,s=r.parseExpression(!0,t),a=n.slice(1,n.length-5);if(!L4(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:r.mode,style:a,body:s}},htmlBuilder(i,e){var t=H0[i.style],n=e.havingStyle(t);return i.resetFont&&(n=n.withFont("")),I1(i.body,n,e)},mathmlBuilder(i,e){var t=H0[i.style],n=e.havingStyle(t);i.resetFont&&(n=n.withFont(""));var r=vi(i.body,n),s=new te("mstyle",r),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[i.style];return s.setAttribute("scriptlevel",o[0]),s.setAttribute("displaystyle",o[1]),s}});var A4=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===Te.DISPLAY.size||n.alwaysHandleSupSub);return r?qr:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(t.style.size===Te.DISPLAY.size||n.limits);return s?R1:null}else{if(n.type==="accent")return on(n.base)?Tl:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?A1:null}else return null}else return null};cr({type:"supsub",htmlBuilder(i,e){var t=A4(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:s}=i,a=He(n,e),o,l,h=e.fontMetrics(),c=0,d=0,f=n&&on(n);if(r){var m=e.havingStyle(e.style.sup());o=He(r,m,e),f||(c=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=He(s,v,e),f||(d=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var g;e.style===Te.DISPLAY?g=h.sup1:e.style.cramped?g=h.sup3:g=h.sup2;var x=e.sizeMultiplier,w=ie(.5/h.ptPerEm/x),N=null;if(l){var M=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");if(a instanceof pi||M){var z;N=ie(-((z=a.italic)!=null?z:0))}}var E;if(o&&l){c=Math.max(c,g,o.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var B=h.defaultRuleThickness,I=4*B;if(c-o.depth-(l.height-d)<I){d=I-(c-o.depth)+l.height;var R=.8*h.xHeight-(c-o.depth);R>0&&(c+=R,d-=R)}var F=[{type:"elem",elem:l,shift:d,marginRight:w,marginLeft:N},{type:"elem",elem:o,shift:-c,marginRight:w}];E=Fe({positionType:"individualShift",children:F})}else if(l){d=Math.max(d,h.sub1,l.height-.8*h.xHeight);var ne=[{type:"elem",elem:l,marginLeft:N,marginRight:w}];E=Fe({positionType:"shift",positionData:d,children:ne})}else if(o)c=Math.max(c,g,o.depth+.25*h.xHeight),E=Fe({positionType:"shift",positionData:-c,children:[{type:"elem",elem:o,marginRight:w}]});else throw new Error("supsub must have either sup or sub.");var Y=I0(a,"right")||"mord";return K([Y],[a,K(["msupsub"],[E])],e)},mathmlBuilder(i,e){var t=!1,n,r;i.base&&i.base.type==="horizBrace"&&(r=!!i.sup,r===i.base.isOver&&(t=!0,n=i.base.isOver)),i.base&&(i.base.type==="op"||i.base.type==="operatorname")&&(i.base.parentIsSupSub=!0);var s=[Ke(i.base,e)];i.sub&&s.push(Ke(i.sub,e)),i.sup&&s.push(Ke(i.sup,e));var a;if(t)a=n?"mover":"munder";else if(i.sub)if(i.sup){var h=i.base;h&&h.type==="op"&&h.limits&&e.style===Te.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===Te.DISPLAY||h.limits)?a="munderover":a="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===Te.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===Te.DISPLAY)?a="munder":a="msub"}else{var o=i.base;o&&o.type==="op"&&o.limits&&(e.style===Te.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===Te.DISPLAY)?a="mover":a="msup"}return new te(a,s)}});cr({type:"atom",htmlBuilder(i,e){return yl(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new te("mo",[zi(i.text,i.mode)]);if(i.family==="bin"){var n=kl(i,e);n==="bold-italic"&&t.setAttribute("mathvariant",n)}else i.family==="punct"?t.setAttribute("separator","true"):(i.family==="open"||i.family==="close")&&t.setAttribute("stretchy","false");return t}});var O1={mi:"italic",mn:"normal",mtext:"normal"};cr({type:"mathord",htmlBuilder(i,e){return Xa(i,e,"mathord")},mathmlBuilder(i,e){var t=new te("mi",[zi(i.text,i.mode,e)]),n=kl(i,e)||"italic";return n!==O1[t.type]&&t.setAttribute("mathvariant",n),t}});cr({type:"textord",htmlBuilder(i,e){return Xa(i,e,"textord")},mathmlBuilder(i,e){var t=zi(i.text,i.mode,e),n=kl(i,e)||"normal",r;return i.mode==="text"?r=new te("mtext",[t]):/[0-9]/.test(i.text)?r=new te("mn",[t]):i.text==="\\prime"?r=new te("mo",[t]):r=new te("mi",[t]),n!==O1[r.type]&&r.setAttribute("mathvariant",n),r}});var Oo={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Bo={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};cr({type:"spacing",htmlBuilder(i,e){if(Bo.hasOwnProperty(i.text)){var t=Bo[i.text].className||"";if(i.mode==="text"){var n=Xa(i,e,"textord");return n.classes.push(t),n}else return K(["mspace",t],[yl(i.text,i.mode,e)],e)}else{if(Oo.hasOwnProperty(i.text))return K(["mspace",Oo[i.text]],[],e);throw new ee('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(Bo.hasOwnProperty(i.text))t=new te("mtext",[new yt(" ")]);else{if(Oo.hasOwnProperty(i.text))return new te("mspace");throw new ee('Unknown type of space "'+i.text+'"')}return t}});var rc=()=>{var i=new te("mtd",[]);return i.setAttribute("width","50%"),i};cr({type:"tag",mathmlBuilder(i,e){var t=new te("mtable",[new te("mtr",[rc(),new te("mtd",[Dn(i.body,e)]),rc(),new te("mtd",[Dn(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var sc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ac={"\\textbf":"textbf","\\textmd":"textmd"},_4={"\\textit":"textit","\\textup":"textup"},oc=(i,e)=>{var t=i.font;if(t){if(sc[t])return e.withTextFontFamily(sc[t]);if(ac[t])return e.withTextFontWeight(ac[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(_4[t])};le({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(i,e){var{parser:t,funcName:n}=i,r=e[0];return{type:"text",mode:t.mode,body:xt(r),font:n}},htmlBuilder(i,e){var t=oc(i,e),n=Mt(i.body,t,!0);return K(["mord","text"],n,t)},mathmlBuilder(i,e){var t=oc(i,e);return Dn(i.body,t)}});le({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=He(i.body,e),n=Or("underline-line",e),r=e.fontMetrics().defaultRuleThickness,s=Fe({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]});return K(["mord","underline"],[s],e)},mathmlBuilder(i,e){var t=new te("mo",[new yt("‾")]);t.setAttribute("stretchy","true");var n=new te("munder",[Ke(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});le({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(i,e){var{parser:t}=i;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(i,e){var t=He(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return Fe({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new te("mpadded",[Ke(i.body,e)],["vcenter"]);return new te("mrow",[t])}});le({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new ee("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=lc(i),n=[],r=e.havingStyle(e.style.text()),s=0;s<t.length;s++){var a=t[s];a==="~"&&(a="\\textasciitilde"),n.push(Wt(a,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return K(["mord","text"].concat(r.sizingClasses(e)),Jd(n),r)},mathmlBuilder(i,e){var t=new yt(lc(i)),n=new te("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var lc=i=>i.body.replace(/ /g,i.star?"␣":" "),Sn=n1,B1=`[ \r
|
|
596
|
+
]`,D4="\\\\[a-zA-Z@]+",R4="\\\\[^\uD800-\uDFFF]",I4="("+D4+")"+B1+"*",O4=`\\\\(
|
|
597
|
+
|[ \r ]+
|
|
598
|
+
?)[ \r ]*`,U0="[̀-ͯ]",B4=new RegExp(U0+"+$"),P4="("+B1+"+)|"+(O4+"|")+"([!-\\[\\]-‧-豈-]"+(U0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(U0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+I4)+("|"+R4+")");class hc{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(P4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ui("EOF",new ni(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new ee("Unexpected character: '"+e[t]+"'",new ui(e[t],new ni(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
|
|
599
|
+
`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new ui(r,new ni(this,t,this.tokenRegex.lastIndex))}}class F4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ee("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var H4=S1;k("\\noexpand",function(i){var e=i.popToken();return i.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});k("\\expandafter",function(i){var e=i.popToken();return i.expandOnce(!0),{tokens:[e],numArgs:0}});k("\\@firstoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[0],numArgs:0}});k("\\@secondoftwo",function(i){var e=i.consumeArgs(2);return{tokens:e[1],numArgs:0}});k("\\@ifnextchar",function(i){var e=i.consumeArgs(3);i.consumeSpaces();var t=i.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});k("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");k("\\TextOrMath",function(i){var e=i.consumeArgs(2);return i.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cc={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};k("\\char",function(i){var e=i.popToken(),t,n=0;if(e.text==="'")t=8,e=i.popToken();else if(e.text==='"')t=16,e=i.popToken();else if(e.text==="`")if(e=i.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new ee("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=cc[e.text],n==null||n>=t)throw new ee("Invalid base-"+t+" digit "+e.text);for(var r;(r=cc[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var zl=(i,e,t,n)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new ee("\\newcommand's first argument must be a macro name");var s=r[0].text,a=i.isDefined(s);if(a&&!e)throw new ee("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!t)throw new ee("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var o=0;if(r=i.consumeArg().tokens,r.length===1&&r[0].text==="["){for(var l="",h=i.expandNextToken();h.text!=="]"&&h.text!=="EOF";)l+=h.text,h=i.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new ee("Invalid number of arguments: "+l);o=parseInt(l),r=i.consumeArg().tokens}return a&&n||i.macros.set(s,{tokens:r,numArgs:o}),""};k("\\newcommand",i=>zl(i,!1,!0,!1));k("\\renewcommand",i=>zl(i,!0,!1,!1));k("\\providecommand",i=>zl(i,!0,!0,!0));k("\\message",i=>{var e=i.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});k("\\errmessage",i=>{var e=i.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});k("\\show",i=>{var e=i.popToken(),t=e.text;return console.log(e,i.macros.get(t),Sn[t],it.math[t],it.text[t]),""});k("\\bgroup","{");k("\\egroup","}");k("~","\\nobreakspace");k("\\lq","`");k("\\rq","'");k("\\aa","\\r a");k("\\AA","\\r A");k("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");k("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");k("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");k("ℬ","\\mathscr{B}");k("ℰ","\\mathscr{E}");k("ℱ","\\mathscr{F}");k("ℋ","\\mathscr{H}");k("ℐ","\\mathscr{I}");k("ℒ","\\mathscr{L}");k("ℳ","\\mathscr{M}");k("ℛ","\\mathscr{R}");k("ℭ","\\mathfrak{C}");k("ℌ","\\mathfrak{H}");k("ℨ","\\mathfrak{Z}");k("\\Bbbk","\\Bbb{k}");k("\\llap","\\mathllap{\\textrm{#1}}");k("\\rlap","\\mathrlap{\\textrm{#1}}");k("\\clap","\\mathclap{\\textrm{#1}}");k("\\mathstrut","\\vphantom{(}");k("\\underbar","\\underline{\\text{#1}}");k("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');k("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");k("\\ne","\\neq");k("≠","\\neq");k("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");k("∉","\\notin");k("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");k("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");k("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");k("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");k("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");k("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");k("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");k("⟂","\\perp");k("‼","\\mathclose{!\\mkern-0.8mu!}");k("∌","\\notni");k("⌜","\\ulcorner");k("⌝","\\urcorner");k("⌞","\\llcorner");k("⌟","\\lrcorner");k("©","\\copyright");k("®","\\textregistered");k("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');k("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');k("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');k("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');k("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");k("⋮","\\vdots");k("\\varGamma","\\mathit{\\Gamma}");k("\\varDelta","\\mathit{\\Delta}");k("\\varTheta","\\mathit{\\Theta}");k("\\varLambda","\\mathit{\\Lambda}");k("\\varXi","\\mathit{\\Xi}");k("\\varPi","\\mathit{\\Pi}");k("\\varSigma","\\mathit{\\Sigma}");k("\\varUpsilon","\\mathit{\\Upsilon}");k("\\varPhi","\\mathit{\\Phi}");k("\\varPsi","\\mathit{\\Psi}");k("\\varOmega","\\mathit{\\Omega}");k("\\substack","\\begin{subarray}{c}#1\\end{subarray}");k("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");k("\\boxed","\\fbox{$\\displaystyle{#1}$}");k("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");k("\\implies","\\DOTSB\\;\\Longrightarrow\\;");k("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");k("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");k("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dc={",":"\\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"},U4=new Set(["bin","rel"]);k("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in dc?e=dc[t]:(t.slice(0,4)==="\\not"||t in it.math&&U4.has(it.math[t].group))&&(e="\\dotsb"),e});var Cl={")":!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};k("\\dotso",function(i){var e=i.future().text;return e in Cl?"\\ldots\\,":"\\ldots"});k("\\dotsc",function(i){var e=i.future().text;return e in Cl&&e!==","?"\\ldots\\,":"\\ldots"});k("\\cdots",function(i){var e=i.future().text;return e in Cl?"\\@cdots\\,":"\\@cdots"});k("\\dotsb","\\cdots");k("\\dotsm","\\cdots");k("\\dotsi","\\!\\cdots");k("\\dotsx","\\ldots\\,");k("\\DOTSI","\\relax");k("\\DOTSB","\\relax");k("\\DOTSX","\\relax");k("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");k("\\,","\\tmspace+{3mu}{.1667em}");k("\\thinspace","\\,");k("\\>","\\mskip{4mu}");k("\\:","\\tmspace+{4mu}{.2222em}");k("\\medspace","\\:");k("\\;","\\tmspace+{5mu}{.2777em}");k("\\thickspace","\\;");k("\\!","\\tmspace-{3mu}{.1667em}");k("\\negthinspace","\\!");k("\\negmedspace","\\tmspace-{4mu}{.2222em}");k("\\negthickspace","\\tmspace-{5mu}{.277em}");k("\\enspace","\\kern.5em ");k("\\enskip","\\hskip.5em\\relax");k("\\quad","\\hskip1em\\relax");k("\\qquad","\\hskip2em\\relax");k("\\tag","\\@ifstar\\tag@literal\\tag@paren");k("\\tag@paren","\\tag@literal{({#1})}");k("\\tag@literal",i=>{if(i.macros.get("\\df@tag"))throw new ee("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});k("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");k("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");k("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");k("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");k("\\newline","\\\\\\relax");k("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var P1=ie(Gi["Main-Regular"][84][1]-.7*Gi["Main-Regular"][65][1]);k("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+P1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");k("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+P1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");k("\\hspace","\\@ifstar\\@hspacer\\@hspace");k("\\@hspace","\\hskip #1\\relax");k("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");k("\\ordinarycolon",":");k("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");k("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');k("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');k("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');k("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');k("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');k("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');k("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');k("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');k("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');k("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');k("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');k("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');k("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');k("∷","\\dblcolon");k("∹","\\eqcolon");k("≔","\\coloneqq");k("≕","\\eqqcolon");k("⩴","\\Coloneqq");k("\\ratio","\\vcentcolon");k("\\coloncolon","\\dblcolon");k("\\colonequals","\\coloneqq");k("\\coloncolonequals","\\Coloneqq");k("\\equalscolon","\\eqqcolon");k("\\equalscoloncolon","\\Eqqcolon");k("\\colonminus","\\coloneq");k("\\coloncolonminus","\\Coloneq");k("\\minuscolon","\\eqcolon");k("\\minuscoloncolon","\\Eqcolon");k("\\coloncolonapprox","\\Colonapprox");k("\\coloncolonsim","\\Colonsim");k("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");k("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");k("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");k("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");k("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");k("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");k("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");k("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");k("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");k("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");k("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");k("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");k("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");k("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");k("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");k("\\nleqq","\\html@mathml{\\@nleqq}{≰}");k("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");k("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");k("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");k("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");k("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");k("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");k("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");k("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");k("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");k("\\imath","\\html@mathml{\\@imath}{ı}");k("\\jmath","\\html@mathml{\\@jmath}{ȷ}");k("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");k("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");k("⟦","\\llbracket");k("⟧","\\rrbracket");k("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");k("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");k("⦃","\\lBrace");k("⦄","\\rBrace");k("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");k("⦵","\\minuso");k("\\darr","\\downarrow");k("\\dArr","\\Downarrow");k("\\Darr","\\Downarrow");k("\\lang","\\langle");k("\\rang","\\rangle");k("\\uarr","\\uparrow");k("\\uArr","\\Uparrow");k("\\Uarr","\\Uparrow");k("\\N","\\mathbb{N}");k("\\R","\\mathbb{R}");k("\\Z","\\mathbb{Z}");k("\\alef","\\aleph");k("\\alefsym","\\aleph");k("\\Alpha","\\mathrm{A}");k("\\Beta","\\mathrm{B}");k("\\bull","\\bullet");k("\\Chi","\\mathrm{X}");k("\\clubs","\\clubsuit");k("\\cnums","\\mathbb{C}");k("\\Complex","\\mathbb{C}");k("\\Dagger","\\ddagger");k("\\diamonds","\\diamondsuit");k("\\empty","\\emptyset");k("\\Epsilon","\\mathrm{E}");k("\\Eta","\\mathrm{H}");k("\\exist","\\exists");k("\\harr","\\leftrightarrow");k("\\hArr","\\Leftrightarrow");k("\\Harr","\\Leftrightarrow");k("\\hearts","\\heartsuit");k("\\image","\\Im");k("\\infin","\\infty");k("\\Iota","\\mathrm{I}");k("\\isin","\\in");k("\\Kappa","\\mathrm{K}");k("\\larr","\\leftarrow");k("\\lArr","\\Leftarrow");k("\\Larr","\\Leftarrow");k("\\lrarr","\\leftrightarrow");k("\\lrArr","\\Leftrightarrow");k("\\Lrarr","\\Leftrightarrow");k("\\Mu","\\mathrm{M}");k("\\natnums","\\mathbb{N}");k("\\Nu","\\mathrm{N}");k("\\Omicron","\\mathrm{O}");k("\\plusmn","\\pm");k("\\rarr","\\rightarrow");k("\\rArr","\\Rightarrow");k("\\Rarr","\\Rightarrow");k("\\real","\\Re");k("\\reals","\\mathbb{R}");k("\\Reals","\\mathbb{R}");k("\\Rho","\\mathrm{P}");k("\\sdot","\\cdot");k("\\sect","\\S");k("\\spades","\\spadesuit");k("\\sub","\\subset");k("\\sube","\\subseteq");k("\\supe","\\supseteq");k("\\Tau","\\mathrm{T}");k("\\thetasym","\\vartheta");k("\\weierp","\\wp");k("\\Zeta","\\mathrm{Z}");k("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");k("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");k("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");k("\\bra","\\mathinner{\\langle{#1}|}");k("\\ket","\\mathinner{|{#1}\\rangle}");k("\\braket","\\mathinner{\\langle{#1}\\rangle}");k("\\Bra","\\left\\langle#1\\right|");k("\\Ket","\\left|#1\\right\\rangle");var F1=i=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,s=e.consumeArg().tokens,a=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=d=>f=>{i&&(f.macros.set("|",a),r.length&&f.macros.set("\\|",o));var m=d;if(!d&&r.length){var v=f.future();v.text==="|"&&(f.popToken(),m=!0)}return{tokens:m?r:n,numArgs:0}};e.macros.set("|",l(!1)),r.length&&e.macros.set("\\|",l(!0));var h=e.consumeArg().tokens,c=e.expandTokens([...s,...h,...t]);return e.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};k("\\bra@ket",F1(!1));k("\\bra@set",F1(!0));k("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");k("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");k("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");k("\\angln","{\\angl n}");k("\\blue","\\textcolor{##6495ed}{#1}");k("\\orange","\\textcolor{##ffa500}{#1}");k("\\pink","\\textcolor{##ff00af}{#1}");k("\\red","\\textcolor{##df0030}{#1}");k("\\green","\\textcolor{##28ae7b}{#1}");k("\\gray","\\textcolor{gray}{#1}");k("\\purple","\\textcolor{##9d38bd}{#1}");k("\\blueA","\\textcolor{##ccfaff}{#1}");k("\\blueB","\\textcolor{##80f6ff}{#1}");k("\\blueC","\\textcolor{##63d9ea}{#1}");k("\\blueD","\\textcolor{##11accd}{#1}");k("\\blueE","\\textcolor{##0c7f99}{#1}");k("\\tealA","\\textcolor{##94fff5}{#1}");k("\\tealB","\\textcolor{##26edd5}{#1}");k("\\tealC","\\textcolor{##01d1c1}{#1}");k("\\tealD","\\textcolor{##01a995}{#1}");k("\\tealE","\\textcolor{##208170}{#1}");k("\\greenA","\\textcolor{##b6ffb0}{#1}");k("\\greenB","\\textcolor{##8af281}{#1}");k("\\greenC","\\textcolor{##74cf70}{#1}");k("\\greenD","\\textcolor{##1fab54}{#1}");k("\\greenE","\\textcolor{##0d923f}{#1}");k("\\goldA","\\textcolor{##ffd0a9}{#1}");k("\\goldB","\\textcolor{##ffbb71}{#1}");k("\\goldC","\\textcolor{##ff9c39}{#1}");k("\\goldD","\\textcolor{##e07d10}{#1}");k("\\goldE","\\textcolor{##a75a05}{#1}");k("\\redA","\\textcolor{##fca9a9}{#1}");k("\\redB","\\textcolor{##ff8482}{#1}");k("\\redC","\\textcolor{##f9685d}{#1}");k("\\redD","\\textcolor{##e84d39}{#1}");k("\\redE","\\textcolor{##bc2612}{#1}");k("\\maroonA","\\textcolor{##ffbde0}{#1}");k("\\maroonB","\\textcolor{##ff92c6}{#1}");k("\\maroonC","\\textcolor{##ed5fa6}{#1}");k("\\maroonD","\\textcolor{##ca337c}{#1}");k("\\maroonE","\\textcolor{##9e034e}{#1}");k("\\purpleA","\\textcolor{##ddd7ff}{#1}");k("\\purpleB","\\textcolor{##c6b9fc}{#1}");k("\\purpleC","\\textcolor{##aa87ff}{#1}");k("\\purpleD","\\textcolor{##7854ab}{#1}");k("\\purpleE","\\textcolor{##543b78}{#1}");k("\\mintA","\\textcolor{##f5f9e8}{#1}");k("\\mintB","\\textcolor{##edf2df}{#1}");k("\\mintC","\\textcolor{##e0e5cc}{#1}");k("\\grayA","\\textcolor{##f6f7f7}{#1}");k("\\grayB","\\textcolor{##f0f1f2}{#1}");k("\\grayC","\\textcolor{##e3e5e6}{#1}");k("\\grayD","\\textcolor{##d6d8da}{#1}");k("\\grayE","\\textcolor{##babec2}{#1}");k("\\grayF","\\textcolor{##888d93}{#1}");k("\\grayG","\\textcolor{##626569}{#1}");k("\\grayH","\\textcolor{##3b3e40}{#1}");k("\\grayI","\\textcolor{##21242c}{#1}");k("\\kaBlue","\\textcolor{##314453}{#1}");k("\\kaGreen","\\textcolor{##71B307}{#1}");var H1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class $4{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new F4(H4,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new hc(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg(["]"])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ui("EOF",n.loc)),this.pushTokens(r),new ui("",ni.range(t,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),s,a=0,o=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++a;else if(s.text==="}"){if(--a,a===-1)throw new ee("Extra }",s)}else if(s.text==="EOF")throw new ee("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",s);if(e&&n)if((a===0||a===1&&e[o]==="{")&&s.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}while(a!==0||n);return r.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new ee("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var s=this.popToken();if(n[r]!==s.text)throw new ee("Use of the macro doesn't match its definition",s)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new ee("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]==="\\"&&!this.isDefined(n))throw new ee("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var s=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){s=s.slice();for(var o=s.length-1;o>=0;--o){var l=s[o];if(l.text==="#"){if(o===0)throw new ee("Incomplete placeholder at end of macro body",l);if(l=s[--o],l.text==="#")s.splice(o+1,1);else if(/^[1-9]$/.test(l.text))s.splice(o,2,...a[+l.text-1]);else throw new ee("Not a valid argument number",l)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ui(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(n=>n.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t=="function"?t(this):t;if(typeof r=="string"){var s=0;if(r.includes("#"))for(var a=r.replace(/##/g,"");a.includes("#"+(s+1));)++s;for(var o=new hc(r,this.settings),l=[],h=o.lex();h.text!=="EOF";)l.push(h),h=o.lex();l.reverse();var c={tokens:l,numArgs:s};return c}return r}isDefined(e){return this.macros.has(e)||Sn.hasOwnProperty(e)||it.math.hasOwnProperty(e)||it.text.hasOwnProperty(e)||H1.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Sn.hasOwnProperty(e)&&!Sn[e].primitive}}var uc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ca=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Po={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},fc={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class no{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new $4(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new ee("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ui("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var r=this.fetch();if(no.endOfExpression.has(r.text)||t&&r.text===t||e&&Sn[r.text]&&Sn[r.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;n.push(s)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var s=e[r];if(s.type==="infix"){if(t!==-1)throw new ee("only one infix operator per group",s.token);t=r,n=s.replaceWith}}if(t!==-1&&n){var a,o,l=e.slice(0,t),h=e.slice(t+1);l.length===1&&l[0].type==="ordgroup"?a=l[0]:a={type:"ordgroup",mode:this.mode,body:l},h.length===1&&h[0].type==="ordgroup"?o=h[0]:o={type:"ordgroup",mode:this.mode,body:h};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[a,e[t],o],[]):c=this.callFunction(n,[a,o],[]),[c]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do{var s;r=this.parseGroup(e)}while(((s=r)==null?void 0:s.type)==="internal");if(!r)throw new ee("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t},s={type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]};return s}parseAtom(e){var t=this.parseGroup("atom",e);if((t==null?void 0:t.type)==="internal"||this.mode==="text")return t;for(var n,r;;){this.consumeSpaces();var s=this.fetch();if(s.text==="\\limits"||s.text==="\\nolimits"){if(t&&t.type==="op"){var a=s.text==="\\limits";t.limits=a,t.alwaysHandleSupSub=!0}else if(t&&t.type==="operatorname")t.alwaysHandleSupSub&&(t.limits=s.text==="\\limits");else throw new ee("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new ee("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new ee("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new ee("Double superscript",s);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(ca[s.text]){var h=uc.test(s.text),c=[];for(c.push(new ui(ca[s.text])),this.consume();;){var d=this.fetch().text;if(!ca[d]||uc.test(d)!==h)break;c.unshift(new ui(ca[d])),this.consume()}var f=this.subparse(c);h?r={type:"ordgroup",mode:"math",body:f}:n={type:"ordgroup",mode:"math",body:f}}else break}return n||r?{type:"supsub",mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,s=Sn[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new ee("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!s.allowedInText)throw new ee("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&s.allowedInMath===!1)throw new ee("Can't use function '"+r+"' in math mode",n);var{args:a,optArgs:o}=this.parseArguments(r,s);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,s){var a={funcName:e,parser:this,token:r,breakOnTokenText:s},o=Sn[e];if(o&&o.handler)return o.handler(a,t,n);throw new ee("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],s=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],l=a<t.numOptionalArgs;("primitive"in t&&t.primitive&&o==null||t.type==="sqrt"&&a===1&&s[0]==null)&&(o="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",o,l);if(l)s.push(h);else if(h!=null)r.push(h);else throw new ee("Null argument, please report this as a bug")}return{args:r,optArgs:s}}parseGroupOfType(e,t,n){switch(t){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,t);case"hbox":{var r=this.parseArgumentGroup(n,"text");return r!=null?{type:"styling",mode:r.mode,body:[r],style:"text",resetFont:!0}:null}case"raw":{var s=this.parseStringGroup("raw",n);return s!=null?{type:"raw",mode:"text",string:s.text}:null}case"primitive":{if(n)throw new ee("A primitive argument cannot be optional");var a=this.parseGroup(e);if(a==null)throw new ee("Expected group as "+e,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new ee("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r="",s;(s=this.fetch()).text!=="EOF";)r+=s.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,s="",a;(a=this.fetch()).text!=="EOF"&&e.test(s+a.text);)r=a,s+=r.text,this.consume();if(s==="")throw new ee("Invalid "+t+": '"+n.text+"'",n);return n.range(r,s)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new ee("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?t=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):t=this.parseStringGroup("size",e),!t)return null;!e&&t.text.length===0&&(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new ee("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Vd(s))throw new ee("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var s=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var a={type:"ordgroup",mode:this.mode,loc:n.loc,body:s};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,s;if(r==="{"||r==="\\begingroup"){this.consume();var a=r==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,a),l=this.fetch();this.expect(a),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:ni.range(n,l),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!H1.hasOwnProperty(r)){if(this.settings.throwOnError)throw new ee("Undefined control sequence: "+r,n);s=this.formatUnsupportedCmd(r),this.consume()}return s}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type==="textord"){var s=r.text,a=e[n+1];if(!(!a||a.type!=="textord")){if(s==="-"&&a.text==="-"){var o=e[n+2];n+1<t&&o&&o.type==="textord"&&o.text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:ni.range(r,o),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:ni.range(r,a),text:"--"}),t-=1)}(s==="'"||s==="`")&&a.text===s&&(e.splice(n,2,{type:"textord",mode:"text",loc:ni.range(r,a),text:s+s}),t-=1)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)==="*";if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new ee(`\\verb assertion failed --
|
|
600
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}fc.hasOwnProperty(t[0])&&!it[this.mode][t[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=fc[t[0]]+t.slice(1));var s=B4.exec(t);s&&(t=t.substring(0,s.index),t==="i"?t="ı":t==="j"&&(t="ȷ"));var a;if(it[this.mode][t]){this.settings.strict&&this.mode==="math"&&z0.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var o=it[this.mode][t].group,l=ni.range(e),h;r4(o)?h={type:"atom",mode:this.mode,family:o,loc:l,text:t}:h={type:o,mode:this.mode,loc:l,text:t},a=h}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Xd(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),a={type:"textord",mode:"text",loc:ni.range(e),text:t};else return null;if(this.consume(),s)for(var c=0;c<s[0].length;c++){var d=s[0][c];if(!Po[d])throw new ee("Unknown accent ' "+d+"'",e);var f=Po[d][this.mode]||Po[d].text;if(!f)throw new ee("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:ni.range(e),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}}no.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var Nl=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new no(e,t);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new ee("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new ui("\\df@tag")])}]}return r},U1=function(e,t,n){t.textContent="";var r=Ll(e,n).toNode();t.appendChild(r)};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."),U1=function(){throw new ee("KaTeX doesn't work in quirks mode.")});var G4=function(e,t){var n=Ll(e,t).toMarkup();return n},q4=function(e,t){var n=new ml(t);return Nl(e,n)},$1=function(e,t,n){if(n.throwOnError||!(e instanceof ee))throw e;var r=K(["katex-error"],[new pi(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Ll=function(e,t){var n=new ml(t);try{var r=Nl(e,n);return Km(r,e,n)}catch(s){return $1(s,e,n)}},W4=function(e,t){var n=new ml(t);try{var r=Nl(e,n);return Zm(r,e,n)}catch(s){return $1(s,e,n)}},Y4="0.16.47",X4={Span:$r,Anchor:Wa,SymbolNode:pi,SvgNode:sn,PathNode:An,LineNode:S0},V4={version:Y4,render:U1,renderToString:G4,ParseError:ee,SETTINGS_SCHEMA:T0,__parse:q4,__renderToDomTree:Ll,__renderToHTMLTree:W4,__setFontMetrics:Am,__defineSymbol:u,__defineFunction:le,__defineMacro:k,__domTree:X4};const j4=(function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"})(),K4=function(i,e){return new URL(i,e).href},pc={},Z4=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let a=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),h=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=a(t.map(c=>{if(c=K4(c,n),c in pc)return;pc[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(!!n)for(let g=o.length-1;g>=0;g--){const x=o[g];if(x.href===c&&(!d||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":j4,d||(v.as="script"),v.crossOrigin="",v.href=c,h&&v.setAttribute("nonce",h),document.head.appendChild(v),d)return new Promise((g,x)=>{v.addEventListener("load",g),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return r.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})},mc='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Q4=920,J4=.78,e5=1200,t5=128,i5=3e4,_i=new Map;let gc,vc=0;function n5(i){return/^\s*(?:---\s*\n[\s\S]*?\n---\s*\n\s*)?(?:%%\{[\s\S]*?\}%%\s*)*(?:flowchart|graph)\b/.test(i)?i.split(`
|
|
601
|
+
`).map(t=>/^\s*%%/.test(t)?t:t.replace(/("[^"\n]*")|(\|[^|\n]*\|)|(\b[A-Za-z0-9_]+)\{(?!\{)((?:"[^"\n]*"|[^}\n])+)\}(?!\})/g,(n,r,s,a,o)=>r||s?n:`${a}{{${o}}}`)).join(`
|
|
602
|
+
`):i}async function r5(){return gc??(gc=Z4(async()=>{const{default:i}=await import("./mermaid.core-DrKMwEZo.js").then(e=>e.bb);return{default:i}},[],import.meta.url).then(({default:i})=>(i.initialize({startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,suppressErrorRendering:!0,maxTextSize:5e4,maxEdges:500,look:"classic",theme:"base",fontFamily:mc,fontSize:13,flowchart:{htmlLabels:!1,curve:"basis",wrappingWidth:260,minNodeWidth:96,nodeSpacing:36,rankSpacing:38,padding:12,diagramPadding:16,subGraphTitleMargin:{top:10,bottom:12}},state:{padding:10},themeVariables:{background:"#ffffff",fontFamily:mc,fontSize:"13px",primaryColor:"#eef4ff",primaryTextColor:"#1f2329",primaryBorderColor:"#638ef2",secondaryColor:"#eefaf6",secondaryTextColor:"#1f2329",secondaryBorderColor:"#45b892",tertiaryColor:"#f8fafc",tertiaryTextColor:"#334155",tertiaryBorderColor:"#cbd5e1",lineColor:"#64748b",textColor:"#1f2329",mainBkg:"#eef4ff",nodeBorder:"#638ef2",clusterBkg:"#f8fafc",clusterBorder:"#cbd5e1",titleColor:"#334155",edgeLabelBackground:"#ffffff",stateBkg:"#eef4ff",stateLabelColor:"#1f2329",transitionColor:"#64748b",noteBkgColor:"#fff8e6",noteBorderColor:"#e2a336",noteTextColor:"#1f2329"},themeCSS:`
|
|
603
|
+
.node rect, .node circle, .node ellipse, .statediagram-state rect.basic { rx: 10px; ry: 10px; stroke-width: 1.5px; }
|
|
604
|
+
.node polygon { fill: #fffbeb !important; stroke: #d97706 !important; stroke-width: 1.6px !important; stroke-linejoin: round; }
|
|
605
|
+
.cluster rect { fill: #f8fafc !important; stroke: #cbd5e1 !important; stroke-width: 1.3px !important; stroke-dasharray: 6 4; rx: 12px; ry: 12px; }
|
|
606
|
+
.cluster-label text, .cluster text { font-weight: 650 !important; fill: #1e293b !important; font-size: 13px !important; }
|
|
607
|
+
.edgePaths path, .transition { stroke: #64748b !important; stroke-width: 1.5px !important; }
|
|
608
|
+
.arrowheadPath, marker path { fill: #64748b !important; stroke: #64748b !important; }
|
|
609
|
+
.edgeLabel rect, .labelBkg { fill: #ffffff !important; stroke: #e2e8f0 !important; stroke-width: 1px !important; opacity: 0.98 !important; rx: 6px; ry: 6px; }
|
|
610
|
+
.edgeLabel text, .edgeLabel tspan { fill: #334155 !important; font-size: 11.5px !important; font-weight: 500 !important; }
|
|
611
|
+
`}),i))),gc}function $0(){var e;if(typeof window>"u"||typeof document>"u"||window.innerWidth<=0||window.innerHeight<=0)return!1;const i=(e=document.body)==null?void 0:e.getBoundingClientRect();return!!(i&&i.width>0&&i.height>0)}async function s5(i){var v;if(!$0())throw new Error("Mermaid viewport hidden");const e=await r5(),t=n5(i);let n;try{({svg:n}=await e.render("inkmap-mermaid-"+ ++vc,t))}catch{if(t===i)throw new Error("Mermaid render failed");({svg:n}=await e.render("inkmap-mermaid-"+ ++vc,i))}const s=new DOMParser().parseFromString(n,"image/svg+xml").documentElement,a=(v=s.getAttribute("viewBox"))==null?void 0:v.trim().split(/\s+/).map(Number);if(s.localName!=="svg"||!a||a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("Invalid Mermaid viewBox");const o=Math.max(1,Math.round(a[2])),l=Math.max(1,Math.round(a[3]));if(o<=36||l<=36||!$0())throw new Error("Mermaid measured zero-size bounds in hidden viewport");const h=Math.min(1,Q4/o),c=Math.min(h,Math.max(J4,e5/l)),d=Math.max(1,Math.round(o*c)),f=Math.max(1,Math.round(l*c));s.setAttribute("width",String(d)),s.setAttribute("height",String(f)),s.style.removeProperty("max-width");const m=new XMLSerializer().serializeToString(s);return{src:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(m),width:d,height:f,naturalWidth:o,naturalHeight:l}}function G1(i,e){_i.delete(i),_i.set(i,e)}function a5(i){const e=_i.get(i);if(e!=null&&e.image)return G1(i,e),e.image}function o5(i){if(!$0())return Promise.resolve(void 0);const e=_i.get(i);if(e&&(e.failedAt===void 0||Date.now()-e.failedAt<i5))return G1(i,e),e.promise;const t={promise:s5(i).then(n=>t.image=n,n=>{String(n==null?void 0:n.message).includes("hidden viewport")?_i.get(i)===t&&_i.delete(i):t.failedAt=Date.now()})};if(_i.delete(i),_i.size>=t5){const n=_i.keys().next().value;n!==void 0&&_i.delete(n)}return _i.set(i,t),t.promise}function Al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var dr=Al();function q1(i){dr=i}var vs={exec:()=>null};function qe(i,e=""){let t=typeof i=="string"?i:i.source;const n={replace:(r,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Vt.caret,"$1"),t=t.replace(r,a),n},getRegex:()=>new RegExp(t,e)};return n}var Vt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}#`),htmlBeginRegex:i=>new RegExp(`^ {0,${Math.min(3,i-1)}}<(?:[a-z].*>|!--)`,"i")},l5=/^(?:[ \t]*(?:\n|$))+/,h5=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,c5=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Is=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d5=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_l=/(?:[*+-]|\d{1,9}[.)])/,W1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Y1=qe(W1).replace(/bull/g,_l).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),u5=qe(W1).replace(/bull/g,_l).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Dl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,f5=/^[^\n]+/,Rl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,p5=qe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),m5=qe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_l).getRegex(),ro="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Il=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g5=qe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Il).replace("tag",ro).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X1=qe(Dl).replace("hr",Is).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ro).getRegex(),v5=qe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",X1).getRegex(),Ol={blockquote:v5,code:h5,def:p5,fences:c5,heading:d5,hr:Is,html:g5,lheading:Y1,list:m5,newline:l5,paragraph:X1,table:vs,text:f5},xc=qe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Is).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ro).getRegex(),x5={...Ol,lheading:u5,table:xc,paragraph:qe(Dl).replace("hr",Is).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ro).getRegex()},y5={...Ol,html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Il).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qe(Dl).replace("hr",Is).replace("heading",` *#{1,6} *[^
|
|
612
|
+
]`).replace("lheading",Y1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},w5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,b5=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,V1=/^( {2,}|\\)\n(?!\s*$)/,k5=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,so=/[\p{P}\p{S}]/u,Bl=/[\s\p{P}\p{S}]/u,j1=/[^\s\p{P}\p{S}]/u,T5=qe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Bl).getRegex(),K1=/(?!~)[\p{P}\p{S}]/u,E5=/(?!~)[\s\p{P}\p{S}]/u,M5=/(?:[^\s\p{P}\p{S}]|~)/u,S5=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Z1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,z5=qe(Z1,"u").replace(/punct/g,so).getRegex(),C5=qe(Z1,"u").replace(/punct/g,K1).getRegex(),Q1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N5=qe(Q1,"gu").replace(/notPunctSpace/g,j1).replace(/punctSpace/g,Bl).replace(/punct/g,so).getRegex(),L5=qe(Q1,"gu").replace(/notPunctSpace/g,M5).replace(/punctSpace/g,E5).replace(/punct/g,K1).getRegex(),A5=qe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,j1).replace(/punctSpace/g,Bl).replace(/punct/g,so).getRegex(),_5=qe(/\\(punct)/,"gu").replace(/punct/g,so).getRegex(),D5=qe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),R5=qe(Il).replace("(?:-->|$)","-->").getRegex(),I5=qe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",R5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ia=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,O5=qe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ia).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J1=qe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ia).replace("ref",Rl).getRegex(),eu=qe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rl).getRegex(),B5=qe("reflink|nolink(?!\\()","g").replace("reflink",J1).replace("nolink",eu).getRegex(),Pl={_backpedal:vs,anyPunctuation:_5,autolink:D5,blockSkip:S5,br:V1,code:b5,del:vs,emStrongLDelim:z5,emStrongRDelimAst:N5,emStrongRDelimUnd:A5,escape:w5,link:O5,nolink:eu,punctuation:T5,reflink:J1,reflinkSearch:B5,tag:I5,text:k5,url:vs},P5={...Pl,link:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ia).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ia).getRegex()},G0={...Pl,emStrongRDelimAst:L5,emStrongLDelim:C5,url:qe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},F5={...G0,br:qe(V1).replace("{2,}","*").getRegex(),text:qe(G0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},da={normal:Ol,gfm:x5,pedantic:y5},rs={normal:Pl,gfm:G0,breaks:F5,pedantic:P5},H5={"&":"&","<":"<",">":">",'"':""","'":"'"},yc=i=>H5[i];function Hi(i,e){if(e){if(Vt.escapeTest.test(i))return i.replace(Vt.escapeReplace,yc)}else if(Vt.escapeTestNoEncode.test(i))return i.replace(Vt.escapeReplaceNoEncode,yc);return i}function wc(i){try{i=encodeURI(i).replace(Vt.percentDecode,"%")}catch{return null}return i}function bc(i,e){var s;const t=i.replace(Vt.findPipe,(a,o,l)=>{let h=!1,c=o;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),n=t.split(Vt.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(Vt.slashPipe,"|");return n}function ss(i,e,t){const n=i.length;if(n===0)return"";let r=0;for(;r<n&&i.charAt(n-r-1)===e;)r++;return i.slice(0,n-r)}function U5(i,e){if(i.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<i.length;n++)if(i[n]==="\\")n++;else if(i[n]===e[0])t++;else if(i[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function kc(i,e,t,n,r){const s=e.href,a=e.title||null,o=i[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;const l={type:i[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function $5(i,e,t){const n=i.match(t.other.indentCodeCompensation);if(n===null)return e;const r=n[1];return e.split(`
|
|
613
|
+
`).map(s=>{const a=s.match(t.other.beginningSpace);if(a===null)return s;const[o]=a;return o.length>=r.length?s.slice(r.length):s}).join(`
|
|
614
|
+
`)}var Oa=class{constructor(i){se(this,"options");se(this,"rules");se(this,"lexer");this.options=i||dr}space(i){const e=this.rules.block.newline.exec(i);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(i){const e=this.rules.block.code.exec(i);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ss(t,`
|
|
615
|
+
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const t=e[0],n=$5(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(i){const e=this.rules.block.heading.exec(i);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const n=ss(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(i){const e=this.rules.block.hr.exec(i);if(e)return{type:"hr",raw:ss(e[0],`
|
|
616
|
+
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let t=ss(e[0],`
|
|
617
|
+
`).split(`
|
|
618
|
+
`),n="",r="";const s=[];for(;t.length>0;){let a=!1;const o=[];let l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))o.push(t[l]),a=!0;else if(!a)o.push(t[l]);else break;t=t.slice(l);const h=o.join(`
|
|
619
|
+
`),c=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
620
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
621
|
+
${h}`:h,r=r?`${r}
|
|
622
|
+
${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=d,t.length===0)break;const f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){const m=f,v=m.raw+`
|
|
623
|
+
`+t.join(`
|
|
624
|
+
`),g=this.blockquote(v);s[s.length-1]=g,n=n.substring(0,n.length-m.raw.length)+g.raw,r=r.substring(0,r.length-m.text.length)+g.text;break}else if((f==null?void 0:f.type)==="list"){const m=f,v=m.raw+`
|
|
625
|
+
`+t.join(`
|
|
626
|
+
`),g=this.list(v);s[s.length-1]=g,n=n.substring(0,n.length-f.raw.length)+g.raw,r=r.substring(0,r.length-m.raw.length)+g.raw,t=v.substring(s.at(-1).raw.length).split(`
|
|
627
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(i){let e=this.rules.block.list.exec(i);if(e){let t=e[1].trim();const n=t.length>1,r={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");const s=this.rules.other.listItemRegex(t);let a=!1;for(;i;){let l=!1,h="",c="";if(!(e=s.exec(i))||this.rules.block.hr.test(i))break;h=e[0],i=i.substring(h.length);let d=e[2].split(`
|
|
628
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),f=i.split(`
|
|
629
|
+
`,1)[0],m=!d.trim(),v=0;if(this.options.pedantic?(v=2,c=d.trimStart()):m?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,c=d.slice(v),v+=e[1].length),m&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
630
|
+
`,i=i.substring(f.length+1),l=!0),!l){const w=this.rules.other.nextBulletRegex(v),N=this.rules.other.hrRegex(v),M=this.rules.other.fencesBeginRegex(v),z=this.rules.other.headingBeginRegex(v),E=this.rules.other.htmlBeginRegex(v);for(;i;){const B=i.split(`
|
|
631
|
+
`,1)[0];let I;if(f=B,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),I=f):I=f.replace(this.rules.other.tabCharGlobal," "),M.test(f)||z.test(f)||E.test(f)||w.test(f)||N.test(f))break;if(I.search(this.rules.other.nonSpaceChar)>=v||!f.trim())c+=`
|
|
632
|
+
`+I.slice(v);else{if(m||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(d)||z.test(d)||N.test(d))break;c+=`
|
|
633
|
+
`+f}!m&&!f.trim()&&(m=!0),h+=B+`
|
|
634
|
+
`,i=i.substring(B.length+1),d=I.slice(v)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0));let g=null,x;this.options.gfm&&(g=this.rules.other.listIsTask.exec(c),g&&(x=g[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:h,task:!!g,checked:x,loose:!1,text:c,tokens:[]}),r.raw+=h}const o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){const h=r.items[l].tokens.filter(d=>d.type==="space"),c=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=c}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(i){const e=this.rules.block.html.exec(i);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(i){const e=this.rules.block.def.exec(i);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(i){var a;const e=this.rules.block.table.exec(i);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const t=bc(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
635
|
+
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(const o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<t.length;o++)s.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:s.align[o]});for(const o of r)s.rows.push(bc(o,s.header.length).map((l,h)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[h]})));return s}}lheading(i){const e=this.rules.block.lheading.exec(i);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(i){const e=this.rules.block.paragraph.exec(i);if(e){const t=e[1].charAt(e[1].length-1)===`
|
|
636
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(i){const e=this.rules.block.text.exec(i);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(i){const e=this.rules.inline.escape.exec(i);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(i){const e=this.rules.inline.tag.exec(i);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(i){const e=this.rules.inline.link.exec(i);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const s=ss(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{const s=U5(e[2],"()");if(s===-2)return;if(s>-1){const o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),kc(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(i,e){let t;if((t=this.rules.inline.reflink.exec(i))||(t=this.rules.inline.nolink.exec(i))){const n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[n.toLowerCase()];if(!r){const s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return kc(t,r,t[0],this.lexer,this.rules)}}emStrong(i,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(i);if(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(n[1]||n[2]||"")||!t||this.rules.inline.punctuation.exec(t)){const s=[...n[0]].length-1;let a,o,l=s,h=0;const c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*i.length+s);(n=c.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&s%3&&!((s+o)%3)){h+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+h);const d=[...n[0]][0].length,f=i.slice(0,s+n.index+d+o);if(Math.min(s,o)%2){const v=f.slice(1,-1);return{type:"em",raw:f,text:v,tokens:this.lexer.inlineTokens(v)}}const m=f.slice(2,-2);return{type:"strong",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(i){const e=this.rules.inline.code.exec(i);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(i){const e=this.rules.inline.br.exec(i);if(e)return{type:"br",raw:e[0]}}del(i){const e=this.rules.inline.del.exec(i);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(i){const e=this.rules.inline.autolink.exec(i);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(i){var t;let e;if(e=this.rules.inline.url.exec(i)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let s;do s=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(s!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(i){const e=this.rules.inline.text.exec(i);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},tn=class q0{constructor(e){se(this,"tokens");se(this,"options");se(this,"state");se(this,"tokenizer");se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||dr,this.options.tokenizer=this.options.tokenizer||new Oa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:Vt,block:da.normal,inline:rs.normal};this.options.pedantic?(t.block=da.pedantic,t.inline=rs.pedantic):this.options.gfm&&(t.block=da.gfm,this.options.breaks?t.inline=rs.breaks:t.inline=rs.gfm),this.tokenizer.rules=t}static get rules(){return{block:da,inline:rs}}static lex(e,t){return new q0(t).lex(e)}static lexInline(e,t){return new q0(t).inlineTokens(e)}lex(e){e=e.replace(Vt.carriageReturn,`
|
|
637
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var r,s,a;for(this.options.pedantic&&(e=e.replace(Vt.tabCharGlobal," ").replace(Vt.spaceLine,""));e;){let o;if((s=(r=this.options.extensions)==null?void 0:r.block)!=null&&s.some(h=>(o=h.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);const h=t.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
638
|
+
`:t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
|
|
639
|
+
`+o.raw,h.text+=`
|
|
640
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
|
|
641
|
+
`+o.raw,h.text+=`
|
|
642
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let h=1/0;const c=e.slice(1);let d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(l=e.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){const h=t.at(-1);n&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=`
|
|
643
|
+
`+o.raw,h.text+=`
|
|
644
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):t.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);const h=t.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=`
|
|
645
|
+
`+o.raw,h.text+=`
|
|
646
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):t.push(o);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var o,l,h;let n=e,r=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let c;if((l=(o=this.options.extensions)==null?void 0:o.inline)!=null&&l.some(f=>(c=f.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const f=t.at(-1);c.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,a)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let d=e;if((h=this.options.extensions)!=null&&h.startInline){let f=1/0;const m=e.slice(1);let v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},m),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=e.substring(0,f+1))}if(c=this.tokenizer.inlineText(d)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(a=c.raw.slice(-1)),s=!0;const f=t.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=c.raw,f.text+=c.text):t.push(c);continue}if(e){const f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return t}},Ba=class{constructor(i){se(this,"options");se(this,"parser");this.options=i||dr}space(i){return""}code({text:i,lang:e,escaped:t}){var s;const n=(s=(e||"").match(Vt.notSpaceStart))==null?void 0:s[0],r=i.replace(Vt.endingNewline,"")+`
|
|
647
|
+
`;return n?'<pre><code class="language-'+Hi(n)+'">'+(t?r:Hi(r,!0))+`</code></pre>
|
|
648
|
+
`:"<pre><code>"+(t?r:Hi(r,!0))+`</code></pre>
|
|
649
|
+
`}blockquote({tokens:i}){return`<blockquote>
|
|
650
|
+
${this.parser.parse(i)}</blockquote>
|
|
651
|
+
`}html({text:i}){return i}heading({tokens:i,depth:e}){return`<h${e}>${this.parser.parseInline(i)}</h${e}>
|
|
652
|
+
`}hr(i){return`<hr>
|
|
653
|
+
`}list(i){const e=i.ordered,t=i.start;let n="";for(let a=0;a<i.items.length;a++){const o=i.items[a];n+=this.listitem(o)}const r=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+r+s+`>
|
|
654
|
+
`+n+"</"+r+`>
|
|
655
|
+
`}listitem(i){var t;let e="";if(i.task){const n=this.checkbox({checked:!!i.checked});i.loose?((t=i.tokens[0])==null?void 0:t.type)==="paragraph"?(i.tokens[0].text=n+" "+i.tokens[0].text,i.tokens[0].tokens&&i.tokens[0].tokens.length>0&&i.tokens[0].tokens[0].type==="text"&&(i.tokens[0].tokens[0].text=n+" "+Hi(i.tokens[0].tokens[0].text),i.tokens[0].tokens[0].escaped=!0)):i.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(i.tokens,!!i.loose),`<li>${e}</li>
|
|
656
|
+
`}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
|
|
657
|
+
`}table(i){let e="",t="";for(let r=0;r<i.header.length;r++)t+=this.tablecell(i.header[r]);e+=this.tablerow({text:t});let n="";for(let r=0;r<i.rows.length;r++){const s=i.rows[r];t="";for(let a=0;a<s.length;a++)t+=this.tablecell(s[a]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
658
|
+
<thead>
|
|
659
|
+
`+e+`</thead>
|
|
660
|
+
`+n+`</table>
|
|
661
|
+
`}tablerow({text:i}){return`<tr>
|
|
662
|
+
${i}</tr>
|
|
663
|
+
`}tablecell(i){const e=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+e+`</${t}>
|
|
664
|
+
`}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Hi(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:e,tokens:t}){const n=this.parser.parseInline(t),r=wc(i);if(r===null)return n;i=r;let s='<a href="'+i+'"';return e&&(s+=' title="'+Hi(e)+'"'),s+=">"+n+"</a>",s}image({href:i,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));const r=wc(i);if(r===null)return Hi(t);i=r;let s=`<img src="${i}" alt="${t}"`;return e&&(s+=` title="${Hi(e)}"`),s+=">",s}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Hi(i.text)}},Fl=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}},nn=class W0{constructor(e){se(this,"options");se(this,"renderer");se(this,"textRenderer");this.options=e||dr,this.options.renderer=this.options.renderer||new Ba,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Fl}static parse(e,t){return new W0(t).parse(e)}static parseInline(e,t){return new W0(t).parseInline(e)}parse(e,t=!0){var r,s;let n="";for(let a=0;a<e.length;a++){const o=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[o.type]){const h=o,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)){n+=c||"";continue}}const l=o;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;a+1<e.length&&e[a+1].type==="text";)h=e[++a],c+=`
|
|
665
|
+
`+this.renderer.text(h);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}parseInline(e,t=this.renderer){var r,s;let n="";for(let a=0;a<e.length;a++){const o=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[o.type]){const h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=h||"";continue}}const l=o;switch(l.type){case"escape":{n+=t.text(l);break}case"html":{n+=t.html(l);break}case"link":{n+=t.link(l);break}case"image":{n+=t.image(l);break}case"strong":{n+=t.strong(l);break}case"em":{n+=t.em(l);break}case"codespan":{n+=t.codespan(l);break}case"br":{n+=t.br(l);break}case"del":{n+=t.del(l);break}case"text":{n+=t.text(l);break}default:{const h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}},Ko,xa=(Ko=class{constructor(i){se(this,"options");se(this,"block");this.options=i||dr}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?tn.lex:tn.lexInline}provideParser(){return this.block?nn.parse:nn.parseInline}},se(Ko,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ko),tu=class{constructor(...i){se(this,"defaults",Al());se(this,"options",this.setOptions);se(this,"parse",this.parseMarkdown(!0));se(this,"parseInline",this.parseMarkdown(!1));se(this,"Parser",nn);se(this,"Renderer",Ba);se(this,"TextRenderer",Fl);se(this,"Lexer",tn);se(this,"Tokenizer",Oa);se(this,"Hooks",xa);this.use(...i)}walkTokens(i,e){var n,r;let t=[];for(const s of i)switch(t=t.concat(e.call(this,s)),s.type){case"table":{const a=s;for(const o of a.header)t=t.concat(this.walkTokens(o.tokens,e));for(const o of a.rows)for(const l of o)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{const a=s;t=t.concat(this.walkTokens(a.items,e));break}default:{const a=s;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{const l=a[o].flat(1/0);t=t.concat(this.walkTokens(l,e))}):a.tokens&&(t=t.concat(this.walkTokens(a.tokens,e)))}}return t}use(...i){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){const r=this.defaults.renderer||new Ba(this.defaults);for(const s in t.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,o=t.renderer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c||""}}n.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new Oa(this.defaults);for(const s in t.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,o=t.tokenizer[a],l=r[a];r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}n.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new xa;for(const s in t.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,o=t.hooks[a],l=r[a];xa.passThroughHooks.has(s)?r[a]=h=>{if(this.defaults.async)return Promise.resolve(o.call(r,h)).then(d=>l.call(r,d));const c=o.call(r,h);return l.call(r,c)}:r[a]=(...h)=>{let c=o.apply(r,h);return c===!1&&(c=l.apply(r,h)),c}}n.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),r&&(o=o.concat(r.call(this,a))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,e){return tn.lex(i,e??this.defaults)}parser(i,e){return nn.parse(i,e??this.defaults)}parseMarkdown(i){return(t,n)=>{const r={...n},s={...this.defaults,...r},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=i);const o=s.hooks?s.hooks.provideLexer():i?tn.lex:tn.lexInline,l=s.hooks?s.hooks.provideParser():i?nn.parse:nn.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(h=>o(h,s)).then(h=>s.hooks?s.hooks.processAllTokens(h):h).then(h=>s.walkTokens?Promise.all(this.walkTokens(h,s.walkTokens)).then(()=>h):h).then(h=>l(h,s)).then(h=>s.hooks?s.hooks.postprocess(h):h).catch(a);try{s.hooks&&(t=s.hooks.preprocess(t));let h=o(t,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let c=l(h,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(h){return a(h)}}}onError(i,e){return t=>{if(t.message+=`
|
|
666
|
+
Please report this to https://github.com/markedjs/marked.`,i){const n="<p>An error occurred:</p><pre>"+Hi(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},sr=new tu;function Ye(i,e){return sr.parse(i,e)}Ye.options=Ye.setOptions=function(i){return sr.setOptions(i),Ye.defaults=sr.defaults,q1(Ye.defaults),Ye};Ye.getDefaults=Al;Ye.defaults=dr;Ye.use=function(...i){return sr.use(...i),Ye.defaults=sr.defaults,q1(Ye.defaults),Ye};Ye.walkTokens=function(i,e){return sr.walkTokens(i,e)};Ye.parseInline=sr.parseInline;Ye.Parser=nn;Ye.parser=nn.parse;Ye.Renderer=Ba;Ye.TextRenderer=Fl;Ye.Lexer=tn;Ye.lexer=tn.lex;Ye.Tokenizer=Oa;Ye.Hooks=xa;Ye.parse=Ye;Ye.options;Ye.setOptions;Ye.use;Ye.walkTokens;Ye.parseInline;nn.parse;tn.lex;/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Tc(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=Array(e);t<e;t++)n[t]=i[t];return n}function G5(i){if(Array.isArray(i))return i}function q5(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n,r,s,a,o=[],l=!0,h=!1;try{if(s=(t=t.call(i)).next,e!==0)for(;!(l=(n=s.call(t)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(c){h=!0,r=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(h)throw r}}return o}}function W5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
667
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function Y5(i,e){return G5(i)||q5(i,e)||X5(i,e)||W5()}function X5(i,e){if(i){if(typeof i=="string")return Tc(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Tc(i,e):void 0}}const iu=Object.entries,Ec=Object.setPrototypeOf,V5=Object.isFrozen,nu=Object.getPrototypeOf,ru=Object.getOwnPropertyDescriptor;let Nt=Object.freeze,Bt=Object.seal,Mr=Object.create,su=typeof Reflect<"u"&&Reflect,Y0=su.apply,X0=su.construct;Nt||(Nt=function(e){return e});Bt||(Bt=function(e){return e});Y0||(Y0=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];return e.apply(t,r)});X0||(X0=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Qi=nt(Array.prototype.forEach),j5=nt(Array.prototype.lastIndexOf),Mc=nt(Array.prototype.pop),as=nt(Array.prototype.push),K5=nt(Array.prototype.slice),Z5=nt(Array.prototype.splice),_r=Array.isArray,Fo=au(Set),Ho=nt(Set.prototype.add),os=nt(Set.prototype.has),Kn=nt(String.prototype.toLowerCase),Uo=nt(String.prototype.toString),Sc=nt(String.prototype.match),ls=nt(String.prototype.replace),zc=nt(String.prototype.indexOf),Q5=nt(String.prototype.trim),J5=nt(Number.prototype.toString),e7=nt(Boolean.prototype.toString),Cc=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),Nc=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),ii=nt(Object.prototype.hasOwnProperty),hs=nt(Object.prototype.toString),It=nt(RegExp.prototype.test),Ji=au(TypeError);function nt(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Y0(i,e,n)}}function au(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return X0(i,t)}}function Oe(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Kn;if(Ec&&Ec(i,null),!_r(e))return i;let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const s=t(r);s!==r&&(V5(e)||(e[n]=s),r=s)}i[r]=!0}return i}function t7(i){for(let e=0;e<i.length;e++)ii(i,e)||(i[e]=null);return i}function ci(i){const e=Mr(null);for(const n of iu(i)){var t=Y5(n,2);const r=t[0],s=t[1];ii(i,r)&&(_r(s)?e[r]=t7(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=ci(s):e[r]=s)}return e}function i7(i){switch(typeof i){case"string":return i;case"number":return J5(i);case"boolean":return e7(i);case"bigint":return Cc?Cc(i):"0";case"symbol":return Nc?Nc(i):"Symbol()";case"undefined":return hs(i);case"function":case"object":{if(i===null)return hs(i);const e=i,t=Ti(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:hs(n)}return hs(i)}default:return hs(i)}}function Ti(i,e){for(;i!==null;){const n=ru(i,e);if(n){if(n.get)return nt(n.get);if(typeof n.value=="function")return nt(n.value)}i=nu(i)}function t(){return null}return t}function n7(i,e){for(;i!==null;){const t=ru(i,e);if(t)return t.get?nt(t.get):null;i=nu(i)}return null}function r7(i){try{return It(i,""),!0}catch{return!1}}const Lc=Nt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$o=Nt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Go=Nt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),s7=Nt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qo=Nt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),a7=Nt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ac=Nt(["#text"]),_c=Nt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Wo=Nt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Dc=Nt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ua=Nt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o7=Bt(/{{[\w\W]*|^[\w\W]*}}/g),l7=Bt(/<%[\w\W]*|^[\w\W]*%>/g),h7=Bt(/\${[\w\W]*/g),c7=Bt(/^data-[\-\w.\u00B7-\uFFFF]+$/),d7=Bt(/^aria-[\-\w]+$/),Rc=Bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),u7=Bt(/^(?:\w+script|data):/i),f7=Bt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),p7=Bt(/^html$/i),m7=Bt(/^[a-z][.\w]*(-[.\w]+)+$/i),Yo=Bt(/<[/\w!]/g),Ic=Bt(/<[/\w]/g),g7=Bt(/<\/no(script|embed|frames)/i),Oc=Bt(/\/>/i),vt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},v7=Nt(Oe({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),x7=function(){return typeof window>"u"?null:window},y7=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Bc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},En=function(e,t,n,r){return ii(e,t)&&_r(e[t])?Oe(r.base?ci(r.base):{},e[t],r.transform):n},Xo=function(e,t,n){const r=ii(e,t)?e[t]:void 0;return r&&typeof r=="object"?ci(r):n()};function ou(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x7();const e=X=>ou(X);if(e.version="3.4.17",e.removed=[],!i||!i.document||i.document.nodeType!==vt.document||!i.Element)return e.isSupported=!1,e;let t=i.document;const n=t,r=n.currentScript;i.DocumentFragment;const s=i.HTMLTemplateElement,a=i.Node,o=i.Element,l=i.NodeFilter;i.NamedNodeMap===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const h=i.DOMParser,c=i.trustedTypes,d=o.prototype,f=Ti(d,"cloneNode"),m=Ti(d,"remove"),v=Ti(d,"removeAttributeNode"),g=Ti(d,"nextSibling"),x=Ti(d,"childNodes"),w=Ti(d,"parentNode"),N=Ti(d,"shadowRoot"),M=Ti(d,"attributes"),z=a&&a.prototype?Ti(a.prototype,"nodeType"):null,E=a&&a.prototype?Ti(a.prototype,"nodeName"):null,B=a&&a.prototype?Ti(a.prototype,"ownerDocument"):null,I=function(T){return z?z(T):T.nodeType},R=function(T){return E?E(T):T.nodeName},F=n7(d,"namespaceURI"),ne=function(T){return F?F(T):T.namespaceURI};if(typeof s=="function"){const X=t.createElement("template");X.content&&X.content.ownerDocument&&(t=X.content.ownerDocument)}let Y,re="",j,$=!1,q=0;const he=function(){if(q>0)throw Ji('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},fe=function(T){he(),q++;try{return Y.createHTML(T)}finally{q--}},Ze=function(T){he(),q++;try{return Y.createScriptURL(T)}finally{q--}},lt=function(){return $||(j=y7(c,r),$=!0),j},Ue=t,St=Ue.implementation,dt=Ue.createNodeIterator,Qe=Ue.createDocumentFragment,Xe=Ue.getElementsByTagName,Ci=n.importNode;let Z=Bc();e.isSupported=typeof iu=="function"&&typeof w=="function"&&St&&St.createHTMLDocument!==void 0;const Me=o7,bt=l7,Ve=h7,Kt=c7,O=d7,xi=u7,Je=f7,kt=m7;let $t=Rc,Le=null;const oi=Oe({},[...Lc,...$o,...Go,...qo,...Ac]);let _e=null;const At=Oe({},[..._c,...Wo,...Dc,...ua]);let ut=Object.seal(Mr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Tt=null,Ni=null;const zt=Object.seal(Mr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Zt=!0,W=!0,de=!1,Ne=!0,ye=!1,me=!0,De=!1,je=!1,_t=null,li=null,Qt=!1,yi=!1,Vi=!1,cn=!1,Ii=!0,Os=!1;const Bs="user-content-";let On=!0,wi=!1,ji=null,Ki={},Oi=null;const Wr=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Gt=null;const ur=Oe({},["audio","video","img","source","image","track"]);let Ps=null;const Bn=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pn="http://www.w3.org/1998/Math/MathML",Fn="http://www.w3.org/2000/svg",hi="http://www.w3.org/1999/xhtml";let Li=hi,Hn=!1,fr=null;const Yr=Oe({},[Pn,Fn,hi],Uo),Xr=Nt(["mi","mo","mn","ms","mtext"]);let dn=Oe({},Xr);const Un=Nt(["annotation-xml"]);let un=Oe({},Un);const pr=Oe({},["title","style","font","a","script"]);let fn=null;const Fs=["application/xhtml+xml","text/html"],Hs="text/html";let st=null,pn=null;const ao=t.createElement("form"),$n=function(T){return T instanceof RegExp||T instanceof Function},mr=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pn&&pn===T)return;(!T||typeof T!="object")&&(T={}),T=ci(T),fn=Fs.indexOf(T.PARSER_MEDIA_TYPE)===-1?Hs:T.PARSER_MEDIA_TYPE,st=fn==="application/xhtml+xml"?Uo:Kn,Le=En(T,"ALLOWED_TAGS",oi,{transform:st}),_e=En(T,"ALLOWED_ATTR",At,{transform:st}),fr=En(T,"ALLOWED_NAMESPACES",Yr,{transform:Uo}),Ps=En(T,"ADD_URI_SAFE_ATTR",Bn,{transform:st,base:Bn}),Gt=En(T,"ADD_DATA_URI_TAGS",ur,{transform:st,base:ur}),Oi=En(T,"FORBID_CONTENTS",Wr,{transform:st}),Tt=En(T,"FORBID_TAGS",ci({}),{transform:st}),Ni=En(T,"FORBID_ATTR",ci({}),{transform:st}),Ki=ii(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?ci(T.USE_PROFILES):T.USE_PROFILES:!1,Zt=T.ALLOW_ARIA_ATTR!==!1,W=T.ALLOW_DATA_ATTR!==!1,de=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=T.SAFE_FOR_TEMPLATES||!1,me=T.SAFE_FOR_XML!==!1,De=T.WHOLE_DOCUMENT||!1,yi=T.RETURN_DOM||!1,Vi=T.RETURN_DOM_FRAGMENT||!1,cn=T.RETURN_TRUSTED_TYPE||!1,Qt=T.FORCE_BODY||!1,Ii=T.SANITIZE_DOM!==!1,Os=T.SANITIZE_NAMED_PROPS||!1,On=T.KEEP_CONTENT!==!1,wi=T.IN_PLACE||!1,$t=r7(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Rc,Li=typeof T.NAMESPACE=="string"?T.NAMESPACE:hi,dn=Xo(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>Oe({},Xr)),un=Xo(T,"HTML_INTEGRATION_POINTS",()=>Oe({},Un));const _=Xo(T,"CUSTOM_ELEMENT_HANDLING",()=>Mr(null));if(ut=Mr(null),ii(_,"tagNameCheck")&&$n(_.tagNameCheck)&&(ut.tagNameCheck=_.tagNameCheck),ii(_,"attributeNameCheck")&&$n(_.attributeNameCheck)&&(ut.attributeNameCheck=_.attributeNameCheck),ii(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(ut.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),Bt(ut),ye&&(W=!1),Vi&&(yi=!0),Ki&&(Le=Oe({},Ac),_e=Mr(null),Ki.html===!0&&(Oe(Le,Lc),Oe(_e,_c)),Ki.svg===!0&&(Oe(Le,$o),Oe(_e,Wo),Oe(_e,ua)),Ki.svgFilters===!0&&(Oe(Le,Go),Oe(_e,Wo),Oe(_e,ua)),Ki.mathMl===!0&&(Oe(Le,qo),Oe(_e,Dc),Oe(_e,ua))),zt.tagCheck=null,zt.attributeCheck=null,ii(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?zt.tagCheck=T.ADD_TAGS:_r(T.ADD_TAGS)&&(Le===oi&&(Le=ci(Le)),Oe(Le,T.ADD_TAGS,st))),ii(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?zt.attributeCheck=T.ADD_ATTR:_r(T.ADD_ATTR)&&(_e===At&&(_e=ci(_e)),Oe(_e,T.ADD_ATTR,st))),ii(T,"ADD_FORBID_CONTENTS")&&_r(T.ADD_FORBID_CONTENTS)&&(Oi===Wr&&(Oi=ci(Oi)),Oe(Oi,T.ADD_FORBID_CONTENTS,st)),On&&(Le["#text"]=!0),De&&Oe(Le,["html","head","body"]),Le.table&&(Oe(Le,["tbody"]),delete Tt.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ji('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ji('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=Y;Y=T.TRUSTED_TYPES_POLICY;try{re=fe("")}catch(U){throw Y=G,U}}else T.TRUSTED_TYPES_POLICY===null?(Y=void 0,re=""):(Y===void 0&&(Y=lt()),Y&&typeof re=="string"&&(re=fe("")));Nt&&Nt(T),pn=T},mn=Oe({},[...$o,...Go,...s7]),gn=Oe({},[...qo,...a7]),Vr=function(T,_,G){return _.namespaceURI===hi?T==="svg":_.namespaceURI===Pn?T==="svg"&&(G==="annotation-xml"||dn[G]):!!mn[T]},oo=function(T,_,G){return _.namespaceURI===hi?T==="math":_.namespaceURI===Fn?T==="math"&&un[G]:!!gn[T]},Us=function(T,_,G){return _.namespaceURI===Fn&&!un[G]||_.namespaceURI===Pn&&!dn[G]?!1:!gn[T]&&(pr[T]||!mn[T])},jr=function(T){const _=ne(T),G=Kn(R(T)),U=w(T);let pe,we;return U&&I(U)===vt.element?(pe={namespaceURI:ne(U)},we=Kn(R(U))):(pe={namespaceURI:Li},we="template"),fr[_]?_===Fn?Vr(G,pe,we):_===Pn?oo(G,pe,we):_===hi?Us(G,pe,we):!!(fn==="application/xhtml+xml"&&fr[_]):!1},Jt=function(T){as(e.removed,{element:T});try{w(T).removeChild(T)}catch{if(m(T),!w(T))throw Ji("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kr=function(T,_,G){try{v(T,_)}catch{try{T.removeAttribute(G)}catch{}}},gt=function(T){Zr(T);const _=x(T);_&&Qi(K5(_),U=>{try{m(U)}catch{}});const G=I(T)===vt.element?M(T):null;if(G)for(let U=G.length-1;U>=0;--U){const pe=G[U],we=pe&&pe.name;typeof we=="string"&&Kr(T,pe,we)}},Ai=function(T,_,G){if(!G)try{G=_.getAttributeNode(T)}catch{G=null}as(e.removed,{attribute:G||null,from:_});try{G?v(_,G):_.removeAttribute(T)}catch{try{_.removeAttribute(T)}catch{}}if(T==="is")if(yi||Vi)try{Jt(_)}catch{}else try{_.setAttribute(T,"")}catch{}},$s=function(T){const _=M(T);if(_)for(let G=_.length-1;G>=0;--G){const U=_[G],pe=U&&U.name;typeof pe!="string"||_e[st(pe)]||Kr(T,U,pe)}},vn=function(T,_){let G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const U=[T];for(;U.length>0;){const pe=U.pop();if(_(pe)===!1)continue;if(G&&I(pe)===vt.element){const Ce=N(pe);be(Ce)&&U.push(Ce)}const we=x(pe);if(we)for(let Ce=we.length-1;Ce>=0;--Ce)U.push(we[Ce])}},Zr=function(T){vn(T,_=>{I(_)===vt.element&&$s(_)})},xn=function(T){const _=[];return vn(T,G=>{_.push(G)},!0),_},Qr=function(T,_){const G=Fo();Qi(xn(T),U=>{I(U)===vt.element&&Ho(G,U)}),Qi(_,U=>{I(U)===vt.element&&!os(G,U)&&$s(U)})},gr=function(T,_){let G=!1;return Qi(e.removed,U=>{U.element&&(G=G||U.element===T,Zr(U.element))}),Qr(T,_),G},Gs=8,qs=function(T,_){const G=ji;let U=null;const pe=()=>(U||(U=Fo(),Qi(_,we=>{Ho(U,we)})),U);for(let we=0;;we++){const Ce=xn(T),pt=[T];let ei=!1;if(Qi(Ce,Dt=>{I(Dt)===vt.documentFragment?as(pt,Dt):!ei&&!os(G,Dt)&&(ei=os(pe(),Dt))}),!ei)return;if(we>=Gs)throw Ji("the tree kept changing during in-place sanitization; refusing to return it");Qi(pt,(Dt,Pt)=>{Ws(Dt,Pt>0,T,pe())})}},Ws=function(T,_,G,U){const pe=P(T);let we;for(;we=pe.nextNode();)!os(U,we)||os(ji,we)||(_&&Re(Z.uponSanitizeShadowNode,we,null),Gn(we,G),ts(we,G),be(we.content)&&wn(we.content))},Ys=function(T){ji&&Ho(ji,T)},Jr=function(T,_){return me?T==="patchsrc"?!0:T==="for"&&_!=="label"&&_!=="output":!1},b=function(T){me&&vn(T,_=>{const G=I(_);if(G===vt.processingInstruction||G===vt.comment&&It(Ic,_.data)){try{m(_)}catch{}return!1}if(G===vt.element){const U=_,pe=st(R(_));try{U.hasAttribute&&U.hasAttribute("patchsrc")&&U.removeAttribute("patchsrc"),U.hasAttribute&&U.hasAttribute("for")&&Jr("for",pe)&&U.removeAttribute("for")}catch{}}return!0})},A=function(T){let _=null,G=null;if(Qt)T="<remove></remove>"+T;else{const we=Sc(T,/^[\r\n\t ]+/);G=we&&we[0]}fn==="application/xhtml+xml"&&Li===hi&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const U=Y?fe(T):T;if(Li===hi)try{_=new h().parseFromString(U,fn)}catch{}if(!_||!_.documentElement){_=St.createDocument(Li,"template",null);try{_.documentElement.innerHTML=Hn?re:U}catch{}}const pe=_.body||_.documentElement;return T&&G&&pe.insertBefore(t.createTextNode(G),pe.childNodes[0]||null),Li===hi?Xe.call(_,De?"html":"body")[0]:De?_.documentElement:pe},P=function(T){const _=B?B(T):T.ownerDocument;return dt.call(_||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},H=function(T){return T=ls(T,Me," "),T=ls(T,bt," "),T=ls(T,Ve," "),T},ae=function(T){var _;oe(T);const G=(_=T.querySelectorAll)===null||_===void 0?void 0:_.call(T,"template");G&&Qi(G,U=>{be(U.content)&&ae(U.content)})},oe=function(T){T.normalize();const _=B?B(T):T.ownerDocument,G=dt.call(_||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let U=G.nextNode();for(;U;)U.data=H(U.data),U=G.nextNode()},ge=function(T){const _=E?E(T):null;return typeof _!="string"||st(_)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==M(T)||typeof T.removeAttribute!="function"||typeof T.removeAttributeNode!="function"||typeof T.getAttributeNode!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==z(T)||T.childNodes!==x(T)},be=function(T){if(!z||typeof T!="object"||T===null)return!1;try{return z(T)===vt.documentFragment}catch{return!1}},ue=function(T){if(!z||typeof T!="object"||T===null)return!1;try{return typeof z(T)=="number"}catch{return!1}};function Re(X,T,_){X.length!==0&&Qi(X,G=>{G.call(e,T,_,pn)})}const bi=function(T,_){return!!(me&&T.hasChildNodes()&&!ue(T.firstElementChild)&&It(Yo,T.textContent)&&It(Yo,T.innerHTML)||me&&v7[_]&&I(T)===vt.element&&ne(T)===hi&&(ue(T.firstElementChild)||typeof T.textContent=="string"&&It(Yo,T.textContent))||T.nodeType===vt.processingInstruction||me&&T.nodeType===vt.comment&&It(Ic,T.data))},ft=function(T,_){if(T instanceof RegExp)return It(T,_);if(T instanceof Function){for(var G=arguments.length,U=new Array(G>2?G-2:0),pe=2;pe<G;pe++)U[pe-2]=arguments[pe];return!!T(_,...U)}return!1},Xs=function(T,_,G){if(!Tt[_]&&yn(_)&&ft(ut.tagNameCheck,_))return!1;if(On&&!Oi[_]&&!Oi[Kn(_)]){const U=w(T),pe=x(T);if(pe&&U){const we=pe.length;for(let Ce=we-1;Ce>=0;--Ce){const pt=T===G?f(pe[Ce],!0):pe[Ce];U.insertBefore(pt,g(T))}}}return Jt(T),!0},vr=function(T,_,G,U){return T.length===0?_:_===G||_===U?ci(_):_},Bi=function(T,_){return T===_||w(T)!==null?!1:(wi&&Zr(T),!0)},Gn=function(T,_){if(Ys(T),Re(Z.beforeSanitizeElements,T,null),Bi(T,_))return!0;if(ge(T))return Jt(T),!0;const G=st(R(T));if(Le=vr(Z.uponSanitizeElement,Le,oi,_t),Re(Z.uponSanitizeElement,T,{tagName:G,allowedTags:Le}),Bi(T,_))return!0;if(bi(T,G))return Jt(T),!0;if(Tt[G]||!(zt.tagCheck instanceof Function&&zt.tagCheck(G))&&!Le[G]){const U=Xs(T,G,_);return U===!1&&(Re(Z.afterSanitizeElements,T,null),Bi(T,_))?!0:U}if(I(T)===vt.element&&!jr(T)||(G==="noscript"||G==="noembed"||G==="noframes")&&It(g7,T.innerHTML))return Jt(T),!0;if(ye&&T.nodeType===vt.text){const U=H(T.textContent);T.textContent!==U&&(as(e.removed,{element:T.cloneNode()}),T.textContent=U)}return Re(Z.afterSanitizeElements,T,null),Bi(T,_)},es=function(T,_,G){if(Ni[_]||Jr(_,T)||Ii&&(_==="id"||_==="name")&&(G in t||G in ao))return!1;const U=_e[_]||zt.attributeCheck instanceof Function&&zt.attributeCheck(_,T);return W&&It(Kt,_)||Zt&&It(O,_)?!0:U?Ps[_]||It($t,ls(G,Je,""))||(_==="src"||_==="xlink:href"||_==="href")&&T!=="script"&&zc(G,"data:")===0&&Gt[T]||de&&!It(xi,ls(G,Je,""))?!0:!G:yn(T)&&ft(ut.tagNameCheck,T)&&ft(ut.attributeNameCheck,_,T)||_==="is"&&ut.allowCustomizedBuiltInElements&&ft(ut.tagNameCheck,G)},$e=Oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yn=function(T){return!$e[Kn(T)]&&It(kt,T)},Vs=function(T,_,G,U){if(Y&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!G)switch(c.getAttributeType(T,_)){case"TrustedHTML":return fe(U);case"TrustedScriptURL":return Ze(U)}return U},lo=function(T,_,G,U){try{return G?T.setAttributeNS(G,_,U):T.setAttribute(_,U),ge(T)?(Jt(T),!1):!0}catch{return Ai(_,T),!1}},xr=function(T,_){return me&&It(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_)?!0:Kn(T)==="attributename"&&Sc(_,"href")!==null},ts=function(T,_){if(Re(Z.beforeSanitizeAttributes,T,null),Bi(T,_))return;const G=T.attributes;if(!G||ge(T))return;_e=vr(Z.uponSanitizeAttribute,_e,At,li);const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let pe=G.length;const we=st(T.nodeName);for(;pe--;){const Ce=G[pe],pt=Ce.name,ei=Ce.namespaceURI,Dt=Ce.value,Pt=st(pt),wr=Dt;let ti=pt==="value"?wr:Q5(wr),Hl=!1;if(U.attrName=Pt,U.attrValue=ti,U.keepAttr=!0,U.forceKeepAttr=void 0,Re(Z.uponSanitizeAttribute,T,U),ti=U.attrValue,Os&&(Pt==="id"||Pt==="name")&&zc(ti,Bs)!==0&&(Ai(pt,T,Ce),ti=Bs+ti,Hl=!0),xr(pt,ti)){Ai(pt,T,Ce);continue}if(!U.forceKeepAttr){if(!U.keepAttr){Ai(pt,T,Ce);continue}if(!Ne&&It(Oc,ti)){Ai(pt,T,Ce);continue}if(ye&&(ti=H(ti)),!es(we,Pt,ti)){Ai(pt,T,Ce);continue}ti=Vs(we,Pt,ei,ti),ti!==wr&&lo(T,pt,ei,ti)&&Hl&&Mc(e.removed)}}Re(Z.afterSanitizeAttributes,T,null),Bi(T,_)},wn=function(T){let _=null;const G=P(T);for(Re(Z.beforeSanitizeShadowDOM,T,null);_=G.nextNode();)if(Re(Z.uponSanitizeShadowNode,_,null),Gn(_,T),ts(_,T),be(_.content)&&wn(_.content),I(_)===vt.element){const U=N(_);be(U)&&(yr(U),wn(U))}ye&&oe(T),Re(Z.afterSanitizeShadowDOM,T,null)},yr=function(T){const _=[{node:T,shadow:null}];for(;_.length>0;){const G=_.pop();if(G.shadow){wn(G.shadow);continue}const U=G.node,pe=I(U)===vt.element,we=x(U);if(we)for(let Ce=we.length-1;Ce>=0;--Ce)_.push({node:we[Ce],shadow:null});if(pe){const Ce=E?E(U):null;if(typeof Ce=="string"&&st(Ce)==="template"){const pt=U.content;be(pt)&&_.push({node:pt,shadow:null})}}if(pe){const Ce=N(U);be(Ce)&&_.push({node:null,shadow:Ce},{node:Ce,shadow:null})}}};return e.sanitize=function(X){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,G=null,U=null,pe=null;if(Hn=!X,Hn&&(X="<!-->"),typeof X!="string"&&!ue(X)&&(X=i7(X),typeof X!="string"))throw Ji("dirty is not a string, aborting");if(!e.isSupported)return X;je?(Le=_t,_e=li):mr(T),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(Le=ci(Le)),Z.uponSanitizeAttribute.length>0&&(_e=ci(_e)),e.removed=[];const we=wi&&typeof X!="string"&&ue(X);let Ce=[];const pt=ji;if(we){b(X);const Pt=R(X);if(typeof Pt=="string"){const wr=st(Pt);if(!Le[wr]||Tt[wr])throw gt(X),Ji("root node is forbidden and cannot be sanitized in-place")}if(ge(X))throw gt(X),Ji("root node is clobbered and cannot be sanitized in-place");Ce=xn(X),ji=Fo()}else if(ue(X))_=A("<!---->"),G=_.ownerDocument.importNode(X,!0),G.nodeType===vt.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?_=G:_.appendChild(G),yr(_);else{if(!yi&&!ye&&!De&&X.indexOf("<")===-1)return Y&&cn?fe(X):X;if(_=A(X),!_)return yi?null:cn?re:""}_&&Qt&&Jt(_.firstChild);const ei=we?X:_;try{we&&yr(X);const Pt=P(ei);for(;U=Pt.nextNode();)Gn(U,ei),ts(U,ei),be(U.content)&&wn(U.content);we&&qs(X,Ce)}catch(Pt){throw we&&(gt(X),gr(X,Ce)),Pt}finally{ji=pt}if(we){if(gr(X,Ce))throw Ji("a node selected for removal could not be safely returned; refusing to sanitize in place");return ye&&ae(X),X}if(yi){if(ye&&ae(_),Vi)for(pe=Qe.call(_.ownerDocument);_.firstChild;)pe.appendChild(_.firstChild);else pe=_;return(_e.shadowroot||_e.shadowrootmode)&&(pe=Ci.call(n,pe,!0)),pe}let Dt=De?_.outerHTML:_.innerHTML;return De&&Le["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&It(p7,_.ownerDocument.doctype.name)&&(Dt="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
668
|
+
`+Dt),ye&&(Dt=H(Dt)),Y&&cn?fe(Dt):Dt},e.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mr(X),je=!0,_t=Le,li=_e},e.clearConfig=function(){pn=null,je=!1,_t=null,li=null,Y=j,re=""},e.isValidAttribute=function(X,T,_){pn||mr({});const G=st(X),U=st(T);return typeof _=="string"&&(xr(T,_)||!Ne&&It(Oc,_))?!1:es(G,U,_)},e.addHook=function(X,T){typeof T=="function"&&ii(Z,X)&&as(Z[X],T)},e.removeHook=function(X,T){if(ii(Z,X)){if(T!==void 0){const _=j5(Z[X],T);return _===-1?void 0:Z5(Z[X],_,1)[0]}return Mc(Z[X])}},e.removeHooks=function(X){ii(Z,X)&&(Z[X]=[])},e.removeAllHooks=function(){Z=Bc()},e}var w7=ou();const Vo=new Map,b7=/!\[[^\]]*\]\(\s*<?([^)\s>]+)>?(?:\s+"[^"]*")?\s*\)/g,k7=/\$|\\[([]/,Pc=600,Er=i=>i.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),lu=(i,e)=>V4.renderToString(i.trim(),{displayMode:e,output:"html",throwOnError:!1,strict:!1}),T7={name:"blockMath",level:"block",start:i=>i.search(/\$\$|\\\[/),tokenizer(i){const e=/^\$\$([\s\S]+?)\$\$[ \t]*(?:\n|$)/.exec(i)??/^\\\[([\s\S]+?)\\\][ \t]*(?:\n|$)/.exec(i);if(!(!e||!e[1].trim()))return{type:"blockMath",raw:e[0],tex:e[1],display:!0}},renderer:i=>lu(i.tex,!0)},E7={name:"inlineMath",level:"inline",start:i=>i.search(/\$|\\[([]/),tokenizer(i){const e=/^\$\$(?!\$)([\s\S]+?)\$\$/.exec(i)??/^\\\[([\s\S]+?)\\\]/.exec(i);if(e&&e[1].trim())return{type:"inlineMath",raw:e[0],tex:e[1],display:!0};const t=/^\\\(([\s\S]+?)\\\)/.exec(i);if(t&&t[1].trim())return{type:"inlineMath",raw:t[0],tex:t[1],display:!1};if(i[0]==="$"&&i[1]&&!/[\s$]/.test(i[1]))for(let n=1;n<i.length;n++){const r=i[n];if(r==="\\"){n++;continue}if(r===`
|
|
669
|
+
`&&i[n+1]===`
|
|
670
|
+
`)break;if(r==="$"){const s=i[n-1],a=i[n+1]??"";if(!/\s/.test(s)&&a!=="$"&&!/[0-9]/.test(a))return{type:"inlineMath",raw:i.slice(0,n+1),tex:i.slice(1,n),display:!1};break}}},renderer:i=>lu(i.tex,i.display)},M7={name:"cjkStrong",level:"inline",start:i=>i.indexOf("**"),tokenizer(i){const e=new RegExp("^\\*\\*(?!\\s)([^\\n*]+?(?:\\*[^\\n*]+?)*?)(?<!\\s)\\*\\*(?!\\*)").exec(i);if(!(!e||!/[\u2014-\u201f\u3000-\u303f\uff00-\uffef\u4e00-\u9fff]/.test(e[0])))return{type:"cjkStrong",raw:e[0],tokens:this.lexer.inlineTokens(e[1])}},renderer(i){return`<strong>${this.parser.parseInline(i.tokens)}</strong>`}};function S7(i,e=!1){const t=o=>{const l=/^([a-z][a-z0-9+.-]*:|[\\/])/i.test(o);if(e){if(/^data:image\/(?:png|jpeg|gif|webp);base64,[\w+/=]+$/i.test(o))return o;if(l||!i)return"";const d=new URL(o,location.origin+i);return d.origin===location.origin&&d.pathname.startsWith(i)?d.href:""}const h=o.replace(/^\.\//,"");if(l)return o;if(!i.endsWith("="))return i+h;let c=h;try{c=decodeURIComponent(h)}catch{}return i+encodeURIComponent(c)};let n=0;const r=new tu({gfm:!0,extensions:[T7,E7,M7],renderer:{html({raw:o}){return e?Er(o):!1},link({href:o,tokens:l}){const h=this.parser.parseInline(l);return/^\s*(?:javascript|vbscript|data):/i.test(o)?h:e?/^(https?:\/\/|mailto:)/i.test(o)?`<a href="${Er(o)}" target="_blank" rel="noopener noreferrer">${h}</a>`:h:!1},code({lang:o,text:l}){const h=(o==null?void 0:o.trim().toLowerCase())??"";if((h==="markdown"||h==="md")&&n<2){n++;try{return`<div class="ink-embedded-md">${r.parse(l,{async:!1})}</div>`}finally{n--}}if(h!=="mermaid")return!1;const c=a5(l);return`<div class="ink-diagram">${c?`<div class="ink-diagram-viewport"><img class="ink-diagram-image" src="${c.src}" width="${c.width}" height="${c.height}" data-natural-width="${c.naturalWidth}" data-natural-height="${c.naturalHeight}" alt="Mermaid"></div>`:`<pre class="ink-diagram-error"><code>${Er(l)}</code></pre>`}<div class="ink-diagram-bar">${c?'<button type="button" class="ink-diagram-zoom"></button>':""}<button type="button" class="ink-diagram-edit"></button></div></div>`},image({href:o,title:l,text:h}){const c=t(o);if(!c)return`<span>${Er(h||o)}</span>`;const d=Vo.get(c),f=Number(l)||Math.min((d==null?void 0:d.width)??Pc,Pc),m=d?Math.round(d.height*f/d.width):void 0;return`<img src="${Er(c)}" alt="${Er(h)}" width="${f}"${m?` height="${m}"`:""}>`}}});function s(o,l,h=0){r.walkTokens(r.lexer(o),c=>{var f;if(c.type!=="code")return;const d=(f=c.lang)==null?void 0:f.trim().toLowerCase();d==="mermaid"?l.add(c.text):(d==="markdown"||d==="md")&&h<2&&/mermaid/i.test(c.text)&&s(c.text,l,h+1)})}let a;return{render(o){const l=r.parse(o,{async:!1});return w7.sanitize(l,{ADD_ATTR:["target"]})},async preload(o){const l=new Set,h=new Set;let c=!1;for(const d of o){!c&&k7.test(d)&&(c=!0);for(const f of d.matchAll(b7)){const m=t(f[1]);m&&l.add(m)}/mermaid/i.test(d)&&s(d,h)}c&&typeof document<"u"&&document.fonts&&(a??(a=Promise.all(["1em KaTeX_Main","italic 1em KaTeX_Math","1em KaTeX_Size1","1em KaTeX_AMS"].map(d=>document.fonts.load(d).catch(()=>{}))))),await Promise.all([a,...[...h].map(d=>o5(d)),...[...l].filter(d=>!Vo.has(d)).map(d=>new Promise(f=>{const m=new Image;m.onload=()=>{Vo.set(d,{width:m.naturalWidth,height:m.naturalHeight}),f()},m.onerror=()=>f(),m.src=d}))])}}}const fa=40;function z7(){const i=J("#diagram-modal"),e=J("#diagram-modal-stage"),t=J("#diagram-modal-world"),n=J("#diagram-modal-img"),r=J("#diagram-zoom-level");let s=0,a=0,o=1,l=0,h=0,c=null;function d(E){return Math.max(.15,Math.min(8,E))}function f(){const E=l-(s+fa)*o/2,B=h-(a+fa)*o/2;t.style.transform=`translate(${E}px, ${B}px) scale(${o})`,r.textContent=`${Math.round(o*100)}%`}function m(E,B){const I=e.getBoundingClientRect();return{x:E-I.left-I.width/2,y:B-I.top-I.height/2}}function v(E,B,I){const{x:R,y:F}=m(E,B),ne=d(I),Y=ne/o;l=R-(R-l)*Y,h=F-(F-h)*Y,o=ne,f()}function g(E,B,I){const R=e.getBoundingClientRect();v(B??R.left+R.width/2,I??R.top+R.height/2,o*E)}function x(){const E=e.getBoundingClientRect(),B=48,I=Math.max(120,E.width-B),R=Math.max(120,E.height-B);o=d(Math.min(1,I/(s+fa),R/(a+fa))),l=0,h=0,f()}function w(){o=1,l=0,h=0,f()}function N(E){s=Number(E.dataset.naturalWidth)||E.naturalWidth||E.width||600,a=Number(E.dataset.naturalHeight)||E.naturalHeight||E.height||400,n.src=E.src,n.style.width=`${s}px`,n.style.height=`${a}px`,i.hidden=!1,e.focus({preventScroll:!0}),requestAnimationFrame(x)}const M=()=>{c=null,e.classList.remove("is-panning"),i.hidden=!0;try{document.body.focus({preventScroll:!0})}catch{}};J("#diagram-zoom-in").addEventListener("click",()=>g(1.25)),J("#diagram-zoom-out").addEventListener("click",()=>g(1/1.25)),J("#diagram-zoom-fit").addEventListener("click",x),J("#diagram-zoom-reset").addEventListener("click",w),J("#diagram-modal-close").addEventListener("click",M),e.addEventListener("wheel",E=>{if(i.hidden)return;if(E.preventDefault(),E.ctrlKey||E.metaKey){const I=Math.exp(-E.deltaY*.01);v(E.clientX,E.clientY,o*I);return}const B=E.deltaMode===1?16:E.deltaMode===2?e.clientHeight:1;l-=E.deltaX*B,h-=E.deltaY*B,f()},{passive:!1}),e.addEventListener("pointerdown",E=>{E.button!==0&&E.button!==1||(c={pointerId:E.pointerId,x:E.clientX,y:E.clientY,tx:l,ty:h},e.classList.add("is-panning"),e.setPointerCapture(E.pointerId))}),e.addEventListener("pointermove",E=>{!c||E.pointerId!==c.pointerId||(l=c.tx+(E.clientX-c.x),h=c.ty+(E.clientY-c.y),f())});const z=E=>{!c||E.pointerId!==c.pointerId||(c=null,e.classList.remove("is-panning"))};return e.addEventListener("pointerup",z),e.addEventListener("pointercancel",z),e.addEventListener("dblclick",E=>{E.target.closest(".diagram-modal-bar")||g(o>=2.5?1/o:1.6,E.clientX,E.clientY)}),window.addEventListener("keydown",E=>{if(i.hidden||!J("#upgrade").hidden||document.documentElement.classList.contains("trial-expired"))return;const B=(I,R)=>{l+=I,h+=R,f()};if(E.key==="Escape"){E.preventDefault(),E.stopPropagation(),M();return}E.key==="+"||E.key==="="?(E.preventDefault(),E.stopPropagation(),g(1.25)):E.key==="-"||E.key==="_"?(E.preventDefault(),E.stopPropagation(),g(1/1.25)):E.key==="0"?(E.preventDefault(),E.stopPropagation(),w()):E.key==="1"||E.key==="f"||E.key==="F"?(E.preventDefault(),E.stopPropagation(),x()):E.key==="ArrowLeft"?(E.preventDefault(),E.stopPropagation(),B(48,0)):E.key==="ArrowRight"?(E.preventDefault(),E.stopPropagation(),B(-48,0)):E.key==="ArrowUp"?(E.preventDefault(),E.stopPropagation(),B(0,48)):E.key==="ArrowDown"&&(E.preventDefault(),E.stopPropagation(),B(0,-48))},!0),{open:N,close:M,isOpen:()=>!i.hidden}}function C7({title:i,svgDataUrl:e,markdown:t,palette:n,showBadge:r}){const s=i.replace(/[&<>"']/g,l=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[l]||l),a=t.replace(/[&<>]/g,l=>({"&":"&","<":"<",">":">"})[l]||l),o=r?'<a class="ink-viral-badge" href="https://zhiyuanv.com/software.html" target="_blank" rel="noopener noreferrer">✨ Made with <strong>Inkmap</strong> — Editable Markdown Mind Map & Mermaid Editor for VS Code / Cursor / MCP ↗</a>':"";return`<!doctype html>
|
|
671
|
+
<html lang="en">
|
|
672
|
+
<head>
|
|
673
|
+
<meta charset="utf-8">
|
|
674
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
675
|
+
<title>${s} · Inkmap</title>
|
|
676
|
+
<style>
|
|
677
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
678
|
+
body { background: ${n.background}; color: ${n.text}; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
|
|
679
|
+
header { height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(128,128,128,0.18); background: ${n.card}; z-index: 10; }
|
|
680
|
+
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
|
|
681
|
+
.actions { display: flex; align-items: center; gap: 8px; }
|
|
682
|
+
button, .cta { padding: 5px 11px; border-radius: 7px; border: 1px solid rgba(128,128,128,0.28); background: transparent; color: inherit; font-size: 12px; cursor: pointer; text-decoration: none; }
|
|
683
|
+
.cta { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
|
|
684
|
+
#stage { flex: 1; position: relative; overflow: hidden; cursor: grab; display: flex; align-items: center; justify-content: center; }
|
|
685
|
+
#stage:active { cursor: grabbing; }
|
|
686
|
+
#map-img { max-width: 92vw; max-height: 84vh; transform-origin: center center; transition: transform 0.05s linear; user-select: none; -webkit-user-drag: none; }
|
|
687
|
+
#md-drawer { position: fixed; right: 16px; top: 58px; bottom: 58px; width: min(440px, 90vw); background: ${n.card}; border: 1px solid rgba(128,128,128,0.25); border-radius: 12px; padding: 14px; display: none; flex-direction: column; gap: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.22); z-index: 20; }
|
|
688
|
+
#md-drawer.open { display: flex; }
|
|
689
|
+
pre { flex: 1; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; padding: 10px; border-radius: 8px; background: rgba(128,128,128,0.08); }
|
|
690
|
+
.ink-viral-badge { position: fixed; right: 16px; bottom: 14px; padding: 7px 13px; border-radius: 999px; background: rgba(15, 23, 42, 0.86); color: #f8fafc; font-size: 12px; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,0.22); z-index: 30; backdrop-filter: blur(8px); }
|
|
691
|
+
.ink-viral-badge strong { color: #60a5fa; }
|
|
692
|
+
</style>
|
|
693
|
+
</head>
|
|
694
|
+
<body>
|
|
695
|
+
<header>
|
|
696
|
+
<div class="brand"><span>${s}</span></div>
|
|
697
|
+
<div class="actions">
|
|
698
|
+
<button type="button" id="zoom-out">−</button>
|
|
699
|
+
<button type="button" id="zoom-reset">100%</button>
|
|
700
|
+
<button type="button" id="zoom-in">+</button>
|
|
701
|
+
<button type="button" id="toggle-md">Markdown</button>
|
|
702
|
+
<a class="cta" href="https://marketplace.visualstudio.com/items?itemName=inkmap.inkmap-vscode" target="_blank" rel="noopener noreferrer">Edit in VS Code / Cursor ↗</a>
|
|
703
|
+
</div>
|
|
704
|
+
</header>
|
|
705
|
+
<div id="stage"><img id="map-img" src="${e.replace(/"/g,"%22")}" alt="${s}"></div>
|
|
706
|
+
<aside id="md-drawer">
|
|
707
|
+
<div style="display:flex;justify-content:space-between;align-items:center">
|
|
708
|
+
<strong style="font-size:13px">Markdown Source</strong>
|
|
709
|
+
<button type="button" id="copy-md">Copy Markdown</button>
|
|
710
|
+
</div>
|
|
711
|
+
<pre id="md-raw">${a}</pre>
|
|
712
|
+
</aside>
|
|
713
|
+
${o}
|
|
714
|
+
<script>
|
|
715
|
+
(() => {
|
|
716
|
+
const stage = document.getElementById("stage");
|
|
717
|
+
const img = document.getElementById("map-img");
|
|
718
|
+
const drawer = document.getElementById("md-drawer");
|
|
719
|
+
let scale = 1, tx = 0, ty = 0, dragging = false, sx = 0, sy = 0;
|
|
720
|
+
const apply = () => { img.style.transform = \`translate(\${tx}px, \${ty}px) scale(\${scale})\`; };
|
|
721
|
+
stage.addEventListener("wheel", e => {
|
|
722
|
+
e.preventDefault();
|
|
723
|
+
scale = Math.min(5, Math.max(0.25, scale * (e.deltaY < 0 ? 1.1 : 0.9)));
|
|
724
|
+
apply();
|
|
725
|
+
}, { passive: false });
|
|
726
|
+
stage.addEventListener("pointerdown", e => { dragging = true; sx = e.clientX - tx; sy = e.clientY - ty; stage.setPointerCapture(e.pointerId); });
|
|
727
|
+
stage.addEventListener("pointermove", e => { if (!dragging) return; tx = e.clientX - sx; ty = e.clientY - sy; apply(); });
|
|
728
|
+
stage.addEventListener("pointerup", () => { dragging = false; });
|
|
729
|
+
stage.addEventListener("pointercancel", () => { dragging = false; });
|
|
730
|
+
document.getElementById("zoom-in").onclick = () => { scale = Math.min(5, scale * 1.2); apply(); };
|
|
731
|
+
document.getElementById("zoom-out").onclick = () => { scale = Math.max(0.25, scale / 1.2); apply(); };
|
|
732
|
+
document.getElementById("zoom-reset").onclick = () => { scale = 1; tx = 0; ty = 0; apply(); };
|
|
733
|
+
document.getElementById("toggle-md").onclick = () => drawer.classList.toggle("open");
|
|
734
|
+
document.getElementById("copy-md").onclick = e => {
|
|
735
|
+
const raw = document.getElementById("md-raw").textContent || "";
|
|
736
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
737
|
+
navigator.clipboard.writeText(raw).catch(() => {});
|
|
738
|
+
} else {
|
|
739
|
+
const ta = document.createElement("textarea");
|
|
740
|
+
ta.value = raw;
|
|
741
|
+
ta.style.position = "fixed";
|
|
742
|
+
ta.style.opacity = "0";
|
|
743
|
+
document.body.appendChild(ta);
|
|
744
|
+
ta.select();
|
|
745
|
+
try { document.execCommand("copy"); } catch {}
|
|
746
|
+
ta.remove();
|
|
747
|
+
}
|
|
748
|
+
e.target.textContent = "Copied!";
|
|
749
|
+
setTimeout(() => { e.target.textContent = "Copy Markdown"; }, 1500);
|
|
750
|
+
};
|
|
751
|
+
})();
|
|
752
|
+
<\/script>
|
|
753
|
+
</body>
|
|
754
|
+
</html>`}const N7=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function L7(i,e,t){let n=0;const r=i.replace(new RegExp(N7(e),"gi"),()=>(n++,t));return n>0?{next:r,hits:n}:null}function A7(i,e,t){return t===0?-1:t>=e?(i+1)%t:Math.min(Math.max(i,0),t-1)}function _7({mindMap:i,pro:e,showToast:t,rewrite:n,onReplace:r}){const s=J("#search"),a=J("#find-input"),o=J("#replace-input"),l=J("#find-count");let h=[],c=-1;function d(z){const E=z.toLowerCase(),B=[],I=R=>{(w0(Mi(R.data)).toLowerCase().includes(E)||Mi(R.data).toLowerCase().includes(E))&&B.push(String(R.data.uid)),(R.children??[]).forEach(I)};return E&&I(i.renderer.renderTree),B}function f(){l.textContent=a.value?h.length?`${c+1}/${h.length}`:Q("noResults"):""}function m(){const z=h[c];if(!z)return f();i.renderer.expandToNodeUid(z,()=>{const E=i.renderer.findNodeByUid(z);E&&(i.execCommand("CLEAR_ACTIVE_NODE"),E.active(),i.renderer.moveNodeToCenter(E,!1))}),f()}function v(z=!1){h=d(a.value),c=h.length?z?Math.min(Math.max(c,0),h.length-1):0:-1,m()}function g(z){if(!h.length)return v();c=(c+z+h.length)%h.length,m()}function x(){s.hidden=!1;const z=i.renderer.activeNodeList[0];!a.value&&z&&(a.value=w0(Mi(z.getData())).slice(0,60)),a.focus(),a.select(),v()}function w(){s.hidden=!0,a.blur(),o.blur()}async function N(z){if(!e.allow("replace"))return;const E=a.value;if(!E)return a.focus();const B=z?void 0:h[c];if(!z&&!B)return;const I=h.length;let R=0;const F=await n(ne=>{const Y=L7(ne,E,o.value);return Y?(R+=Y.hits,Y.next):null},B);if(F>0&&(r==null||r()),t(Q("replaced",{n:R||F})),!z&&F>0){h=d(a.value),c=A7(c,I,h.length),m();return}v(!z)}let M=0;return a.addEventListener("input",()=>{clearTimeout(M),M=window.setTimeout(()=>v(),150)}),a.addEventListener("keydown",z=>{z.key==="Enter"&&g(z.shiftKey?-1:1),z.key==="Escape"&&w()}),o.addEventListener("keydown",z=>{z.key==="Enter"&&N(z.metaKey||z.ctrlKey),z.key==="Escape"&&w()}),J("#find-prev").addEventListener("click",()=>g(-1)),J("#find-next").addEventListener("click",()=>g(1)),J("#replace-one").addEventListener("click",()=>N(!1)),J("#replace-all").addEventListener("click",()=>N(!0)),J("#find-close").addEventListener("click",w),{open:x,close:w,isOpen:()=>!s.hidden}}const ya='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',jo=[{id:"logicalStructure",pro:!1},{id:"mindMap",pro:!1},{id:"logicalStructureLeft",pro:!0},{id:"organizationStructure",pro:!0},{id:"catalogOrganization",pro:!0},{id:"timeline",pro:!0},{id:"timeline2",pro:!0},{id:"verticalTimeline",pro:!0},{id:"fishbone",pro:!0}],pa=[{id:"classic",pro:!1,dark:!1,palette:{background:"#f5f6f7",line:"#5b7fd4",root:"#4e83fd",rootText:"#fff",card:"#fff",text:"#1f2329",border:"#dee0e3",second:"#5b7fd4"}},{id:"mint",pro:!0,dark:!1,palette:{background:"#f3f8f6",line:"#2f9e7a",root:"#1f8a68",rootText:"#fff",card:"#fff",text:"#1d2b26",border:"#d5e6df",second:"#2f9e7a"}},{id:"sunset",pro:!0,dark:!1,palette:{background:"#fbf6f1",line:"#e07a3f",root:"#d9622b",rootText:"#fff",card:"#fff",text:"#2d221b",border:"#eedfd2",second:"#e07a3f"}},{id:"dusk",pro:!0,dark:!0,palette:{background:"#1b1e24",line:"#6f8fe8",root:"#4e83fd",rootText:"#fff",card:"#262a32",text:"#e6e8eb",border:"#3a3f49",second:"#6f8fe8"}}],D7=i=>`layout.${i}`,R7=i=>`theme.${i}`;function Fc({palette:i}){return{backgroundColor:i.background,lineStyle:"straight",lineRadius:6,lineWidth:1.5,lineColor:i.line,generalizationLineColor:i.line,rootLineKeepSameInCurve:!1,paddingX:12,paddingY:6,root:{fillColor:i.root,color:i.rootText,fontSize:18,fontWeight:"bold",fontFamily:ya,borderWidth:0,borderRadius:8,marginX:80,marginY:24},second:{fillColor:i.card,color:i.text,fontSize:15,fontWeight:"bold",fontFamily:ya,borderColor:i.second,borderWidth:1.5,borderRadius:6,marginX:60,marginY:16},node:{fillColor:i.card,color:i.text,fontSize:14,fontFamily:ya,borderColor:i.border,borderWidth:1,borderRadius:6,marginX:50,marginY:12}}}function Hc(i){const e=document.documentElement.style,t=i.palette;e.setProperty("--ink-bg",t.background),e.setProperty("--ink-text",t.text),e.setProperty("--ink-card",t.card),e.setProperty("--ink-border",t.border),e.setProperty("--ink-accent",t.line),document.documentElement.dataset.theme=i.id,document.documentElement.classList.toggle("dark",i.dark)}const hu=ri;hu.usePlugin(Dd).usePlugin(Od).usePlugin(Id).usePlugin(Rd).usePlugin(Ad);const Uc=3,I7=400,$c=40,cu=document.createElement("style");cu.textContent=Yd;document.head.append(cu);async function O7(i){var Gs,qs,Ws,Ys,Jr;vu(Pa(i.locale)),j0();const e=J("#status"),t=J("#toast"),n=J("#source"),r=J("#source-text"),s=J("#node-inline-edit"),a=z7();let o=await i.load();const{saveTarget:l,compact:h,restrictAssets:c}=i.capabilities,d=S7(i.assetBase,c);document.documentElement.classList.toggle("ink-sidebar",!!h),e.setAttribute("role","status");let f,m=o.md,v=Promise.resolve(),g=0,x=null;const w=()=>o.writable===!1,N=(b,A)=>{e.dataset.state=b,e.textContent=A};let M=0;const z=b=>{t.textContent=b,t.hidden=!1,clearTimeout(M),M=window.setTimeout(()=>t.hidden=!0,4e3)},E=await Kp(i,z);E.onChange(()=>{!E.isPro()&&a.isOpen()&&a.close()});let B="";async function I(b,A){const P=zh(b,o.name),{root:H,...ae}=P,oe=[],ge=be=>(oe.push(be.md),be.children.forEach(ge));return ge(H),await d.preload(oe),{data:$d(H,A),meta:ae,syntheticTitle:P.syntheticRoot?H.md:""}}let R={md:"",fm:""};const F=b=>(R.md!==b&&(R={md:b,fm:zh(b).frontMatter}),R.fm);function ne(b){const A=F(b),P=jo.find(H=>H.id===Nh(A,"layout"));return P&&(!P.pro||E.isPro())?P.id:/^\s*layout:\s*["']?(two-sided|mindMap)/m.test(A)?"mindMap":"logicalStructure"}function Y(b){const A=pa.find(P=>P.id===Nh(F(b),"theme"));return A&&(!A.pro||E.isPro())?A:pa[0]}const re=b=>Hd(F(b))??o.name;let j=re(o.md);document.title=`${j} · Inkmap`;let $=Y(o.md);Hc($);const q=(Gs=o.viewState)==null?void 0:Gs.folds;let he=(qs=o.viewState)==null?void 0:qs.view,fe=!1,Ze,lt=!1;i.onExternalChange(b=>{if(!lt){Ze=b;return}const A=b.name!==o.name;A&&(clearTimeout(g),g=0),v=v.then(async()=>{const P=Je()!==kt,H=!A&&P&&b.md!==m;await Ni(b),H?z(Q("conflict")):A&&(P||b.discardedEdits)&&!w()&&z(Q("unsavedDiscarded"))}).catch(P=>z(String(P instanceof Error?P.message:P)))});const Ue=J("#map"),St=new Set,dt=Ue.getBoundingClientRect.bind(Ue);let Qe=!1;{const b=dt();Qe=b.width>=160&&b.height>=160}Ue.getBoundingClientRect=()=>{const b=dt();if(b.width>=160&&b.height>=160)return b;const A=window.innerWidth>=160?window.innerWidth:960,P=window.innerHeight>=160?window.innerHeight:720;return new DOMRect(0,0,A,P)};const Xe=await I(o.md,(b,A)=>A===0?!0:(q==null?void 0:q[b.join("\0")])??A<Uc);f=Xe.meta,B=Xe.syntheticTitle;const Ci=Xe.data;{const b=dt();b.width>=160&&b.height>=160&&(Qe=!0)}document.body.tabIndex=-1,document.body.style.outline="none";const Z=J("#node-menu"),Me=J("#export-menu");let bt=[];const Ve=()=>{Z.hidden=!0,Me.hidden=!0,bt=[]},Kt=b=>{if(!(b instanceof Element)||b.classList.contains("smm-node-edit-wrap"))return!1;const A=b.tagName;return A==="INPUT"||A==="TEXTAREA"||A==="SELECT"||A==="BUTTON"||A==="A"?!0:b.isContentEditable===!0},O=new hu({el:Ue,readonly:w(),data:Ci,layout:ne(o.md),fit:!he,nodeTextEditZIndex:5,enableShortcutOnlyWhenMouseInSvg:!1,enableAutoEnterTextEditWhenKeydown:!0,customCheckEnableShortcut:b=>{if(a.isOpen()||document.documentElement.classList.contains("presenting"))return!1;const A=document.getElementById("upgrade");if(A&&!A.hidden)return!1;const P=document.getElementById("account-panel");return!(P&&!P.hidden||Kt(b.target)||Kt(document.activeElement))},beforeShortcutRun:()=>(Ve(),!1),defaultInsertSecondLevelNodeText:Q("newTopic"),defaultInsertBelowSecondLevelNodeText:Q("newTopic"),isShowCreateChildBtnIcon:!1,isUseCustomNodeContent:!0,customCreateNodeContent(b){const A=b.getData();if(!A.rich)return null;const P=document.createElement("div");return P.className=`ink-node depth-${Math.min(b.layerIndex,2)}`,P.innerHTML=d.render(A.md),P.querySelectorAll(".ink-diagram-viewport").forEach(H=>{H.addEventListener("wheel",ae=>{if(ae.ctrlKey||ae.metaKey)return;const oe=H.scrollHeight>H.clientHeight+1,ge=H.scrollWidth>H.clientWidth+1;if(!oe&&!ge)return;const be=H.scrollTop<=0&&ae.deltaY<0,ue=H.scrollTop+H.clientHeight>=H.scrollHeight-1&&ae.deltaY>0,Re=H.scrollLeft<=0&&ae.deltaX<0,bi=H.scrollLeft+H.clientWidth>=H.scrollWidth-1&&ae.deltaX>0;(oe&&!(be||ue)||ge&&!(Re||bi))&&ae.stopPropagation()},{passive:!0})}),P.querySelectorAll(".ink-diagram-image").forEach(H=>{var ae;H.dataset.trackedRender||(H.dataset.trackedRender="1",(ae=i.track)==null||ae.call(i,"diagram_render")),H.addEventListener("pointerdown",oe=>oe.stopPropagation()),H.addEventListener("click",oe=>{oe.stopPropagation(),a.open(H)})}),P.querySelectorAll(".ink-diagram-zoom").forEach(H=>{H.textContent=Q("zoomDiagram"),H.addEventListener("pointerdown",ae=>ae.stopPropagation()),H.addEventListener("click",ae=>{var ge;ae.stopPropagation();const oe=(ge=H.closest(".ink-diagram"))==null?void 0:ge.querySelector(".ink-diagram-image");oe&&a.open(oe)})}),P.querySelectorAll(".ink-diagram-edit").forEach((H,ae)=>{var ge,be;const oe=!!((be=(ge=H.parentElement)==null?void 0:ge.parentElement)!=null&&be.querySelector(".ink-diagram-error"));oe&&dt().width>0&&!St.has(A.md)&&(St.add(A.md),d.preload([A.md]).then(()=>{O.reRender()})),H.hidden=w(),H.textContent=Q(oe?"diagramInvalid":"editDiagram"),H.addEventListener("pointerdown",ue=>ue.stopPropagation()),H.addEventListener("click",ue=>{ue.stopPropagation(),Ne(b);const Re=yu(r.value)[ae];if(Re){r.setSelectionRange(Re.start,Re.end);const bi=r.value.slice(0,Re.start).split(`
|
|
755
|
+
`).length-1;r.scrollTop=Math.max(0,(bi-2)*wa)}})}),P},themeConfig:Fc($),expandBtnStyle:{color:$.palette.line,fill:$.palette.card,fontSize:12,strokeColor:$.palette.line},exportPaddingX:$c,exportPaddingY:$c,handleBeingExportSvg:b=>{var A,P,H,ae;if(b.node.querySelectorAll(".ink-diagram-bar, .ink-diagram-edit").forEach(oe=>oe.remove()),b.node.querySelectorAll(".ink-diagram-viewport").forEach(oe=>{oe.style.maxHeight="none",oe.style.maxWidth="none",oe.style.overflow="visible"}),b.node.insertAdjacentHTML("afterbegin",`<style>${pn()}</style>`),!E.isPaidPro()){const oe=Number(b.node.getAttribute("width"))||((P=(A=b.node.viewBox)==null?void 0:A.baseVal)==null?void 0:P.width)||800,ge=Number(b.node.getAttribute("height"))||((ae=(H=b.node.viewBox)==null?void 0:H.baseVal)==null?void 0:ae.height)||600,be=Math.max(140,oe-16),ue=Math.max(24,ge-12);b.node.insertAdjacentHTML("beforeend",`<text class="inkmap-export-watermark" x="${be}" y="${ue}" text-anchor="end" font-family="-apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif" font-size="12" fill="${$.palette.text}" fill-opacity="0.45">Made with Inkmap · Editable Markdown Mind Map (zhiyuanv.com)</text>`)}return b},demonstrateConfig:{boxShadowColor:"rgba(0, 0, 0, 0.75)",padding:24,margin:60,zIndex:42}});function xi(b=O.getData(!1),A){let P=f;const H=Mi(b.data);if(f.syntheticRoot&&H!==B&&H.trim()){const ae=/^title:/m.test(f.frontMatter),oe=(b.children??[]).some(ge=>ge.data.kind==="heading"&&(ge.data.level??1)===1);!ae&&!oe?P={...f,syntheticRoot:!1}:P={...f,frontMatter:Up(f.frontMatter,H,f.eol)}}return qp(P,b,A)}const Je=()=>Ch(xi());let kt=Je();const $t=()=>{if(w())return Q("readOnly");switch(l){case"copy":return Q("savedInCopy");case"file":return Q("saved");case"editor":return Q("synced")}};N("saved",$t());function Le(b=Je()){clearTimeout(g),!w()&&b!==kt&&(N("pending",Q("pending")),g=window.setTimeout(()=>v=v.then(oi),I7))}async function oi(){if(w())return;const b=Je();if(b===kt)return N("saved",$t());N("saving",Q("saving"));try{const A=await i.save(b,o.version);A.ok?(m=b,kt=b,o={...o,md:b,version:A.version},Je()===kt?N("saved",$t()):Le()):(await Ni(A.doc),z(Q("conflict")))}catch(A){N("error",Q("saveFailed")),z(String(A instanceof Error?A.message:A))}}async function _e(){clearTimeout(g),g=0,await(v=v.then(oi))}let At,ut=0;async function Tt(b,A,P=!1){var be;const H=++ut;Ii(!1),_t();const ae=P?new Map:qd(O.getData(!1)),oe=await I(b,(ue,Re)=>ae.get(ue.join("\0"))??Re<Uc);if(H!==ut)return;const ge=oe.data;if(f=oe.meta,At=void 0,B=oe.syntheticTitle,j=re(b),document.title=`${j} · Inkmap`,ye(),O.execCommand("CLEAR_ACTIVE_NODE"),P?(O.setData(ge),requestAnimationFrame(()=>{try{O.resize(),O.view.fit()}catch{}})):O.updateData(ge),Fs(b),A){const ue=Je();(be=i.onMapMarkdownChange)==null||be.call(i,ue),Le(ue)}}async function Ni(b){const A=b.name!==o.name;if(!A&&b.md===m&&b.writable===o.writable){o=b;return}o=b,m=b.md,O.setMode(w()?"readonly":"edit"),await Tt(b.md,!1,A),kt=Je(),clearTimeout(g),g=0,N("saved",$t())}if(lt=!0,Ze){const b=Ze;Ze=void 0,v=v.then(()=>Ni(b)).catch(A=>z(String(A instanceof Error?A.message:A)))}O.on("data_change",()=>{var A;const b=Je();(A=i.onMapMarkdownChange)==null||A.call(i,b),Le(b)});const zt=new WeakMap;let Zt=Promise.resolve(),W;async function de(b,A){const P={};zt.set(b,P),await d.preload([A]),zt.get(b)===P&&O.renderer.setNodeDataRender(b,k0(A))}O.on("before_show_text_edit",()=>{var A,P;const b=(P=(A=O.renderer)==null?void 0:A.activeNodeList)==null?void 0:P[0];W=b?String(b.getData("text")??""):void 0}),O.on("hide_text_edit",(b,A,P)=>{W=void 0;const H=String((P==null?void 0:P.getData("text"))??"");P&&Ud(H)&&(Zt=de(P,H)),wi()});function Ne(b,A=!0){x!==b&&je(),x=b,n.hidden=!1,r.value=Mi(b.getData()),r.readOnly=w(),A&&r.focus()}function ye(){je(),x=null,n.hidden=!0,r.blur(),wi()}let me=0,De=null;function je(){clearTimeout(me),me=0;const b=De;De=null,b==null||b()}function _t(){clearTimeout(me),me=0,De=null}r.addEventListener("input",()=>{const b=x;if(!b)return;_t(),zt.delete(b);const A=r.value.replace(/\n+$/,"");De=()=>{var P,H;((H=(P=b.group)==null?void 0:P.node)==null?void 0:H.isConnected)!==!1&&(Zt=de(b,A))},me=window.setTimeout(je,250)}),r.addEventListener("keydown",b=>{b.key==="Escape"&&ye()});let li=null,Qt="",yi=!1;function Vi(){if(!li)return;const b=li.group.node;if(!b.isConnected)return Ii(!1);const A=b.getBoundingClientRect(),P=Math.max(1,innerWidth-16),H=Math.max(36,innerHeight-24),ae=Math.min(P,Math.max(A.width,180)),oe=Qt.includes(`
|
|
756
|
+
`)||s.value.includes(`
|
|
757
|
+
`);s.style.width=`${ae}px`,s.style.height="auto";const ge=Math.max(A.height,s.scrollHeight+2,oe?88:34),be=Math.min(H,ge);s.style.height=`${be}px`,s.style.left=`${Math.max(8,Math.min(A.left,innerWidth-ae-8))}px`,s.style.top=`${Math.max(8,Math.min(A.top,innerHeight-be-8))}px`}function cn(b){if(!b||w())return;Ii(!0);const A=x===b?r.value:Mi(b.getData());if(ye(),li=b,Qt=Mi(b.getData()),yi=/^\d+\\[.)]\s/.test(A),s.value=yi?A.replace(/^(\d+)\\([.)])/,"$1$2"):A,s.setAttribute("aria-label",Q("editNode")),s.hidden=!1,Vi(),s.focus({preventScroll:!0}),Qt.includes(`
|
|
758
|
+
`)||s.value.length>80){const P=s.value.length;s.setSelectionRange(P,P)}else s.select()}function Ii(b){const A=li;if(!A)return;li=null,s.hidden=!0;const P=s.value.replace(/\n+$/,""),H=yi?P.replace(/^(\d+)([.)])(?=\s)/,"$1\\$2"):P;b&&!w()&&H!==Qt&&(_t(),Zt=de(A,H)),wi()}s.addEventListener("blur",()=>Ii(!0)),s.addEventListener("input",Vi),s.addEventListener("keydown",b=>{if(b.stopPropagation(),b.isComposing)return;const A=Qt.includes(`
|
|
759
|
+
`)||s.value.includes(`
|
|
760
|
+
`),P=b.key==="Enter"&&(b.metaKey||b.ctrlKey||!b.shiftKey&&!A)||b.key==="Tab"&&!A;(P||b.key==="Escape")&&(b.preventDefault(),Ii(P))});for(const b of["scale","translate","node_tree_render_end"])O.on(b,Vi);window.addEventListener("resize",Vi),O.on("node_dblclick",b=>{!b.getData("rich")||w()||cn(b)}),O.on("node_active",(b,A)=>{if(!n.hidden){if(A.length===1)return Ne(A[0],!1);je(),x=null,r.value="",r.readOnly=!0}});async function Os(b,A){if(w())return 0;const P=O.getData(!1);let H=0;const ae=oe=>{if(!A||oe.data.uid===A){const ge=b(Mi(oe.data));ge!==null&&ge!==Mi(oe.data)&&(Object.assign(oe.data,k0(ge)),H++)}(oe.children??[]).forEach(ae)};return ae(P),H&&await Tt(Ch(xi(P)),!0),H}O.on("data_change",()=>At=void 0);function Bs(){if(At)return At;const b=new Map,{lines:A}=y0(xi(O.getData(!1),b)),P=new Map;for(const[H,ae]of A){const oe=b.get(H);oe&&P.set(oe,ae)}return At=P}let On=!1;const wi=()=>{var A;const b=document.activeElement;if(b&&b!==document.body&&!b.classList.contains("smm-node-edit-wrap")&&b!==s&&typeof b.blur=="function"&&b.blur(),document.activeElement!==s&&!((A=document.activeElement)!=null&&A.classList.contains("smm-node-edit-wrap")))try{window.focus(),document.body.focus({preventScroll:!0})}catch{}};O.on("node_mousedown",wi),O.on("svg_mousedown",wi),i.select&&O.on("node_click",b=>{if(wi(),On)return;const A=Fn([b]);A&&i.select(A.startLine,A.endLine)}),(Ws=i.onReveal)==null||Ws.call(i,b=>{let A,P=-1;for(const[ae,oe]of Bs())oe<=b&&oe>=P&&([A,P]=[ae,oe]);if(!A)return;const H=A;O.renderer.expandToNodeUid(H,()=>{var oe;const ae=O.renderer.findNodeByUid(H);ae&&(On=!0,((oe=O.renderer.activeNodeList[0])==null?void 0:oe.getData("uid"))!==H&&(O.renderer.clearActiveNodeList(),ae.active()),On=!1,O.resize(),O.renderer.moveNodeToCenter(ae,!1))})});const ji=()=>{const b=O.renderer.activeNodeList;n.hidden?b.length===1?Ne(b[0]):z(Q("selectNode")):ye()};O.keyCommand.addShortcut("Control+e",ji),O.keyCommand.addShortcut("F2",()=>{const b=O.renderer.activeNodeList;b.length===1&&b[0].getData("rich")&&cn(b[0])}),O.keyCommand.addShortcut("Enter",()=>{var A,P;const b=O.renderer.activeNodeList;!((P=(A=O.renderer.textEdit)==null?void 0:A.isShowTextEdit)!=null&&P.call(A))&&b.length===1&&b[0].isRoot&&O.execCommand("INSERT_CHILD_NODE")}),O.keyCommand.addShortcut("Alt+Up",()=>O.execCommand("UP_NODE")),O.keyCommand.addShortcut("Alt+Down",()=>O.execCommand("DOWN_NODE"));const Ki=(b=O.renderer.activeNodeList)=>{if(!b.length)return z(Q("selectNode"));b.forEach(A=>O.execCommand("EXPAND_ALL",A.getData("uid")))};O.keyCommand.addShortcut("Shift+/",()=>Ki()),O.keyCommand.unBindEvent();const Oi=b=>{var A,P,H,ae,oe,ge,be;if((b.metaKey||b.ctrlKey)&&!b.altKey&&!b.shiftKey&&b.key.toLowerCase()==="s"){b.preventDefault(),b.stopImmediatePropagation(),(async()=>{var ue;await Wr(),await((ue=i.flushPendingEdits)==null?void 0:ue.call(i)),await _e(),z(o.name?`${$t()} · ${o.name}`:$t())})();return}if(!b.isComposing){if(!s.hidden&&(b.target===s||document.activeElement===s)){const ue=Qt.includes(`
|
|
761
|
+
`)||s.value.includes(`
|
|
762
|
+
`),Re=b.key==="Enter"&&(b.metaKey||b.ctrlKey||!b.shiftKey&&!ue)||b.key==="Tab"&&!ue;(Re||b.key==="Escape")&&(b.preventDefault(),b.stopImmediatePropagation(),Ii(Re));return}if((H=(P=(A=O.renderer)==null?void 0:A.textEdit)==null?void 0:P.isShowTextEdit)!=null&&H.call(P)&&b.key==="Escape"){b.preventDefault(),b.stopImmediatePropagation();const ue=document.querySelector(".smm-node-edit-wrap");ue&&W!==void 0&&(ue.textContent=W),O.renderer.textEdit.hideEditTextBox(),wi();return}if(O.keyCommand.onKeydown(b),!b.defaultPrevented&&((oe=(ae=O.opt).customCheckEnableShortcut)!=null&&oe.call(ae,b))){const ue=O.renderer.activeNodeList;ue.length===1&&ue[0].getData("rich")&&((be=(ge=O.renderer.textEdit)==null?void 0:ge.checkIsAutoEnterTextEditKey)!=null&&be.call(ge,b))&&(b.preventDefault(),b.stopPropagation(),cn(ue[0]))}}};window.addEventListener("keydown",Oi,!0),O.on("beforeDestroy",()=>window.removeEventListener("keydown",Oi,!0));async function Wr(){var b,A,P;s.hidden||Ii(!0),(P=(A=(b=O.renderer)==null?void 0:b.textEdit)==null?void 0:A.isShowTextEdit)!=null&&P.call(A)&&O.renderer.textEdit.hideEditTextBox(),je(),await Zt}O.on("node_contextmenu",(b,A)=>{b.preventDefault(),wi();const P=O.renderer.activeNodeList;bt=P.includes(A)?[...P]:[A];const H=bt.every(oe=>oe==null?void 0:oe.isRoot),ae=w();J("#menu-insert-child").hidden=ae,J("#menu-insert-sibling").hidden=ae||H,J("#menu-insert-parent").hidden=ae||H,J("#menu-move-up").hidden=ae||H,J("#menu-move-down").hidden=ae||H,J("#menu-remove-node").hidden=ae||H,Z.hidden=!1,Z.style.left=`${Math.min(b.clientX,innerWidth-Z.offsetWidth-8)}px`,Z.style.top=`${Math.min(b.clientY,innerHeight-Z.offsetHeight-8)}px`}),window.addEventListener("pointerdown",b=>{const A=b.target;!Z.contains(A)&&!Me.parentElement.contains(A)&&Ve()},!0),window.addEventListener("keydown",b=>b.key==="Escape"&&Ve()),O.on("scale",Ve),O.on("translate",Ve);const Gt=J("#chat-add"),ur=J("#menu-add-to-chat"),Ps=await((Ys=i.canAddToChat)==null?void 0:Ys.call(i))===!0,Bn=/Mac|iPhone|iPad/.test(navigator.platform),Pn=Bn?"⌘L":"Ctrl+L";J("#menu-source-kbd").textContent=Bn?"⌘E":"Ctrl+E",J("#menu-up-kbd").textContent=Bn?"⌘↑":"Ctrl+↑",J("#menu-down-kbd").textContent=Bn?"⌘↓":"Ctrl+↓",Gt.innerHTML=`<span>${Q("addToChat")}</span><kbd>${Pn}</kbd>`,Gt.title=Q("addToChatTitle"),ur.innerHTML=`<span>${Q("addToChat")}</span><kbd>${Pn}</kbd>`;function Fn(b){const A=new Set(b.map(Re=>Re.getData("uid"))),P=new Map,H=xi(O.getData(!1),P),{md:ae,lines:oe}=y0(H),ge=ae.replace(/\r\n?/g,`
|
|
763
|
+
`).replace(/\n$/,"").split(`
|
|
764
|
+
`).length-1;let be=1/0,ue=-1;for(const[Re,bi]of oe){if(!A.has(P.get(Re)))continue;const ft=H.syntheticRoot&&Re===oe.keys().next().value;be=Math.min(be,ft?0:bi),ue=Math.max(ue,ft?ge:bi+Re.md.replace(/\r\n?/g,`
|
|
765
|
+
`).split(`
|
|
766
|
+
`).length-1)}return ue<0?null:{startLine:be,endLine:Math.min(ue,ge)}}function hi(){var A;const b=document.activeElement;if(!n.hidden&&x&&b===r&&r.selectionStart!==r.selectionEnd){const P=r.value.slice(r.selectionStart,r.selectionEnd),H=J(".source-head button").getBoundingClientRect();return P.trim()?{node:x,text:P,anchorRight:H.left-6,anchorY:(H.top+H.bottom)/2,outer:{left:H.left-6,right:H.left-6,top:H.top,bottom:H.bottom},inHeader:!0}:null}if(b!=null&&b.classList.contains("smm-node-edit-wrap")){const P=getSelection(),H=O.renderer.activeNodeList[0],ae=P&&!P.isCollapsed?P.toString():"";if(H&&ae.trim()){const oe=P.getRangeAt(0).getBoundingClientRect(),ge=b.getBoundingClientRect(),be=(A=H.group)==null?void 0:A.node.getBoundingClientRect(),ue={left:be?Math.min(be.left,ge.left):ge.left,right:be?Math.max(be.right,ge.right):ge.right,top:be?Math.min(be.top,ge.top):ge.top,bottom:be?Math.max(be.bottom,ge.bottom):ge.bottom};return{node:H,text:ae,anchorRight:oe.width>0?oe.right:ue.right,anchorY:oe.height>0?(oe.top+oe.bottom)/2:(ue.top+ue.bottom)/2,outer:ue}}}return null}async function Li(b){Ve();const A=b?null:hi();if(b??(b=A?[A.node]:[...O.renderer.activeNodeList]),!b.length)return i.addToChat();if(A?(A.inHeader&&je(),await Zt):await Wr(),await _e(),e.dataset.state!=="saved")return z(Q("saveFailed"));const P=Fn(b);P&&i.addToChat({...P,...A&&{text:A.text}})}function Hn(b){const A=[],P=dt(),H=P.width>=160?P.left:0,ae=P.width>=160?P.right:innerWidth,oe=P.height>=160?P.top:0,ge=P.height>=160?P.bottom:innerHeight,be=ue=>{var Re,bi;if(ue){if(!b.has(ue)){const ft=(Re=ue.group)==null?void 0:Re.node.getBoundingClientRect();ft&&ft.width>0&&ft.bottom>oe&&ft.top<ge&&ft.right>H&&ft.left<ae&&A.push(ft)}((bi=ue.getData)==null?void 0:bi.call(ue,"expand"))!==!1&&(ue.children??[]).forEach(be)}};return be(O.renderer.root),A}const fr=(b,A)=>Math.max(0,Math.min(b.right,A.right)-Math.max(b.left,A.left))*Math.max(0,Math.min(b.bottom,A.bottom)-Math.max(b.top,A.top)),Yr=()=>document.documentElement.classList.contains("presenting");let Xr=0;function dn(){cancelAnimationFrame(Xr),Xr=requestAnimationFrame(()=>{var es;const b=()=>void(Gt.hidden=!0);if(Yr())return b();const A=J("#bar").getBoundingClientRect(),P=A.bottom+6;Gt.hidden=!1;const{offsetWidth:H,offsetHeight:ae}=Gt,oe=$e=>Math.max(8,Math.min($e,innerWidth-H-8)),ge=$e=>Math.max(P,Math.min($e,innerHeight-ae-8)),be=($e,yn,Vs,lo)=>{const xr=Hn(lo);n.hidden||xr.push(n.getBoundingClientRect()),J("#search").hidden||xr.push(J("#search").getBoundingClientRect());const ts=[[yn-H,$e.top-ae-5],[$e.right-H,$e.top-ae-5],[yn-H,$e.bottom+5],[$e.right-H,$e.bottom+5],[$e.right+8,Vs-ae/2],[$e.left-H-8,Vs-ae/2]];let wn=null,yr=1/0;for(const[_,G]of ts){const U=oe(_),pe=ge(G),we={left:U,right:U+H,top:pe,bottom:pe+ae},Ce=fr(we,$e),pt=xr.reduce((Dt,Pt)=>Dt+fr(we,Pt),0),ei=Ce*100+pt;if(ei<yr&&(wn=[U,pe],yr=ei,ei===0))break}const[X,T]=wn??[oe($e.right-H),ge($e.top-ae-5)];Gt.style.left=`${X}px`,Gt.style.top=`${T}px`},ue=hi();if(ue){if(ue.inHeader){Gt.style.left=`${oe(ue.anchorRight-H)}px`,Gt.style.top=`${Math.max(8,ue.outer.top+(ue.outer.bottom-ue.outer.top-ae)/2)}px`;return}return be(ue.outer,ue.anchorRight,ue.anchorY,new Set([ue.node]))}if((es=document.activeElement)!=null&&es.classList.contains("smm-node-edit-wrap"))return b();const Re=O.renderer.activeNodeList,ft=Re.map($e=>{var yn;return(yn=$e.group)==null?void 0:yn.node.getBoundingClientRect()}).filter($e=>$e&&$e.width>0),Xs=Math.min(...ft.map($e=>$e.left)),vr=Math.max(...ft.map($e=>$e.right)),Bi=Math.min(...ft.map($e=>$e.top)),Gn=Math.max(...ft.map($e=>$e.bottom));if(!ft.length||Gn<A.bottom||Bi>innerHeight||vr<0||Xs>innerWidth)return b();be({left:Xs,right:vr,top:Bi,bottom:Gn},vr,(Bi+Gn)/2,new Set(Re))})}if(O.keyCommand.removeShortcut("Control+l"),Ps){O.keyCommand.addShortcut("Control+l",()=>void Li()),ur.hidden=!1;for(const b of["node_active","node_tree_render_end","scale","translate","expand_btn_click","node_dragend","exit_demonstrate","before_show_text_edit","hide_text_edit"])O.on(b,dn);O.on("node_dragging",()=>Gt.hidden=!0),window.addEventListener("resize",dn),document.addEventListener("selectionchange",dn);for(const b of["select","keyup","mouseup","blur"])r.addEventListener(b,dn);Gt.addEventListener("mousedown",b=>(b.stopPropagation(),b.preventDefault())),Gt.addEventListener("click",b=>{b.stopPropagation(),Li()}),ur.addEventListener("click",()=>Li(bt)),(Jr=i.onChatRequest)==null||Jr.call(i,()=>Li())}const Un=J("#layout-select"),un=J("#theme-select"),pr=()=>{Un.innerHTML=jo.map(b=>`<option value="${b.id}">${Q(D7(b.id))}</option>`).join(""),un.innerHTML=pa.map(b=>`<option value="${b.id}">${Q(R7(b.id))}</option>`).join(""),Un.value=O.getLayout(),un.value=$.id};function fn(b){$=b,Hc($),O.updateConfig({expandBtnStyle:{color:$.palette.line,fill:$.palette.card,fontSize:12,strokeColor:$.palette.line}}),O.setThemeConfig(Fc($))}function Fs(b){const A=ne(b);A!==O.getLayout()&&O.setLayout(A);const P=Y(b);P.id!==$.id&&fn(P),pr()}function Hs(b,A){var P;w()||(f={...f,frontMatter:Gp(f.frontMatter,b,A)},(P=i.onMapMarkdownChange)==null||P.call(i,Je()),Le())}Un.addEventListener("change",()=>{var A;const b=jo.find(P=>P.id===Un.value);if(b.pro&&!E.allow("layouts"))return pr();(A=i.track)==null||A.call(i,"feature_layouts"),O.setLayout(b.id),Hs("layout",b.id),setTimeout(()=>O.view.fit(),200)}),un.addEventListener("change",()=>{var A;const b=pa.find(P=>P.id===un.value);if(b.pro&&!E.allow("themes"))return pr();(A=i.track)==null||A.call(i,"feature_themes"),fn(b),Hs("theme",b.id)}),E.onChange(()=>Fs(Je())),pr();const st=Dp.replace(/@font-face\{[^}]*\}/g,"");function pn(){const b=getComputedStyle(document.documentElement),A=Yd.replace(/var\((--[\w-]+),\s*([^()]+)\)/g,(P,H,ae)=>b.getPropertyValue(H).trim()||ae);return`${st}
|
|
767
|
+
${A}`}async function ao(b){var P;if(Ve(),!E.allow("export"))return;(P=i.track)==null||P.call(i,"feature_export");const A=j.replace(/[\\/:*?"<>|]+/g,"_");try{if(O.execCommand("CLEAR_ACTIVE_NODE"),b==="html"){const oe=await O.export("svg",!1,A),ge=C7({title:j,svgDataUrl:oe,markdown:Je(),palette:$.palette,showBadge:!E.isPaidPro()}),be=`data:text/html;charset=utf-8,${encodeURIComponent(ge)}`,ue=`${A}.html`;await i.saveFile(ue,be)&&z(Q("exported",{name:ue}));return}const H=await O.export(b,!1,A),ae=`${A}.${b}`;await i.saveFile(ae,H)&&z(Q("exported",{name:ae}))}catch(H){z(Q("exportFailed",{error:String(H instanceof Error?H.message:H)}))}}const $n=J("#present-bar"),mr=J("#present-step"),mn=J("#present-prev"),gn=J("#present-next"),Vr=J("#present-exit");async function oo(){var b,A;if(!((b=O.demonstrate)!=null&&b.isInDemonstrate)&&E.allow("present")){(A=i.track)==null||A.call(i,"feature_present"),Ve(),ye(),Jt.close(),document.documentElement.classList.add("presenting"),$n&&($n.hidden=!1);try{await document.documentElement.requestFullscreen()}catch{O.demonstrate._enter()}}}mn==null||mn.addEventListener("click",()=>{var b;return(b=O.demonstrate)==null?void 0:b.prev()}),gn==null||gn.addEventListener("click",()=>{var b;return(b=O.demonstrate)==null?void 0:b.next()}),Vr==null||Vr.addEventListener("click",()=>{var b;return(b=O.demonstrate)==null?void 0:b.exit()}),O.on("demonstrate_jump",(b,A)=>{mr&&(mr.textContent=`${b+1} / ${A}`),mn&&(mn.disabled=b<=0),gn&&(gn.disabled=b>=A-1)}),document.addEventListener("fullscreenchange",()=>{const b=O.demonstrate;document.fullscreenElement===document.documentElement&&!b.isInDemonstrate?b._enter():!document.fullscreenElement&&b.isInDemonstrate&&b.exit()}),O.on("exit_demonstrate",()=>{document.documentElement.classList.remove("presenting"),$n&&($n.hidden=!0),document.fullscreenElement&&document.exitFullscreen().catch(()=>{})});let Us=0;const jr=()=>{cancelAnimationFrame(Us),Us=requestAnimationFrame(()=>{const{width:b,height:A}=dt();if(!(b<160||A<160)){if(!Qe){Qe=!0,St.clear(),O.resize(),Tt(Je(),!1).then(()=>{O.resize(),O.reRender(()=>{O.view.fit()})});return}O.resize(),Hn(new Set).length===0&&O.view.fit()}})};new ResizeObserver(jr).observe(O.el),window.addEventListener("resize",jr),document.addEventListener("visibilitychange",jr);const Jt=_7({mindMap:O,pro:E,showToast:z,rewrite:Os,onReplace:()=>{var b;return(b=i.track)==null?void 0:b.call(i,"feature_replace")}}),Kr=J("#bar");new ResizeObserver(()=>{const b=Kr.offsetHeight;b&&document.documentElement.style.setProperty("--toolbar-height",`${b}px`)}).observe(Kr),O.keyCommand.addShortcut("Control+f",()=>Jt.open());const gt=(b,A)=>J(b).addEventListener("click",P=>{A(),P.currentTarget.blur()}),Ai=b=>{g||Je()!==kt?_e().then(b):b()};i.history?(O.keyCommand.removeShortcut("Control+z"),O.keyCommand.removeShortcut("Control+y"),O.keyCommand.addShortcut("Control+z",()=>Ai(()=>i.history.undo())),O.keyCommand.addShortcut("Control+y|Control+Shift+z",()=>Ai(()=>i.history.redo()))):O.keyCommand.addShortcut("Control+Shift+z",()=>O.execCommand("FORWARD")),gt("#undo",()=>i.history?Ai(()=>i.history.undo()):O.execCommand("BACK")),gt("#redo",()=>i.history?Ai(()=>i.history.redo()):O.execCommand("FORWARD")),gt("#fit",()=>{O.resize(),O.view.fit()}),gt("#menu-insert-child",()=>{const b=bt;Ve(),b.length&&O.execCommand("INSERT_CHILD_NODE",!0,b)}),gt("#menu-insert-sibling",()=>{const b=bt;Ve(),b.length&&O.execCommand("INSERT_NODE",!0,b)}),gt("#menu-insert-parent",()=>{const b=bt;Ve(),b.length&&O.execCommand("INSERT_PARENT_NODE",!0,b)}),gt("#menu-move-up",()=>{const b=bt[0];Ve(),b&&O.execCommand("UP_NODE",b)}),gt("#menu-move-down",()=>{const b=bt[0];Ve(),b&&O.execCommand("DOWN_NODE",b)}),gt("#menu-remove-node",()=>{const b=bt;Ve(),b.length&&O.execCommand("REMOVE_NODE",b)}),gt("#menu-source",()=>{const b=bt[0];Ve(),b&&Ne(b)}),gt("#menu-expand-subtree",()=>{const b=bt;Ve(),Ki(b)}),gt("#close-source",ye),gt("#find",()=>Jt.isOpen()?Jt.close():Jt.open()),gt("#export",()=>{E.allow("export")&&(Me.hidden=!Me.hidden)}),document.querySelectorAll("[data-export]").forEach(b=>b.addEventListener("click",()=>ao(b.dataset.export))),gt("#present",oo);const $s=J("#open-browser");$s.hidden=!i.openInBrowser,gt("#open-browser",()=>{var b;E.allow("browser")&&Promise.resolve((b=i.openInBrowser)==null?void 0:b.call(i)).catch(A=>{z(String(A instanceof Error?A.message:A))})});const vn=J("#level-select");vn.addEventListener("change",()=>{const b=vn.value;b==="all"?O.execCommand("EXPAND_ALL"):b&&O.execCommand("UNEXPAND_TO_LEVEL",Number(b)),vn.value="",vn.blur(),setTimeout(()=>O.view.fit(),300)});function Zr(){const b=O.renderer.root,A=O.view.scale,P=b&&Number.isFinite(b.left)?{scale:A,dx:O.view.x+(b.left+b.width/2)*A-O.width/2,dy:O.view.y+(b.top+b.height/2)*A-O.height/2}:void 0;return{folds:Wd(O.getData(!1)),...P&&{view:P}}}let xn=0;function Qr(){!fe||!i.saveView||Yr()||(clearTimeout(xn),xn=0,i.saveView(Zr()))}function gr(){!fe||!i.saveView||Yr()||(clearTimeout(xn),xn=window.setTimeout(Qr,250))}return O.on("node_tree_render_end",()=>{if(he){const b=he;he=void 0;const A=O.renderer.root;A&&O.width>0&&O.height>0&&(O.view.scale=b.scale,O.view.x=O.width/2+b.dx-(A.left+A.width/2)*b.scale,O.view.y=O.height/2+b.dy-(A.top+A.height/2)*b.scale,O.view.transform(),Hn(new Set).length===0?O.view.fit():(O.emit("scale",b.scale),O.emit("translate"))),fe=!0;return}if(!fe){fe=!0;return}gr()}),O.on("scale",gr),O.on("translate",gr),document.addEventListener("visibilitychange",()=>document.visibilityState==="hidden"&&Qr()),window.addEventListener("beforeunload",b=>{Qr(),e.dataset.state!=="saved"&&b.preventDefault()}),{mindMap:O,currentMarkdown:Je,pro:E,load:Tt,flushSave:_e}}function B7(i){return O7(i).then(e=>(window.inkmap=e,e))}function P7(i){const e=document.createElement("p");e.style.cssText=`padding:24px;font:14px ${ya}`,e.textContent=String(i instanceof Error?i.message:i),document.body.replaceChildren(e)}B7(Du()).catch(P7);export{Z4 as _,H7 as c,Pu as g,w7 as p};
|