dsh-inkmap 0.3.4 → 0.3.6
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/host.js +123 -22
- package/package.json +9 -1
- package/web/assets/{abnfDiagram-S7VZAUFO-TLa3VhI_.js → abnfDiagram-S7VZAUFO-DrBW4zqH.js} +1 -1
- package/web/assets/{architectureDiagram-YGSQEFNW-ye0lXjUa.js → architectureDiagram-YGSQEFNW-4RpnlRN0.js} +1 -1
- package/web/assets/{blockDiagram-APKKGZFW-CCjPX5sL.js → blockDiagram-APKKGZFW-ComZi7YM.js} +1 -1
- package/web/assets/{c4Diagram-KJ2TOQU5-DRLHAIRM.js → c4Diagram-KJ2TOQU5-DZN7GFIA.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-B2yvX6O2.js → chunk-2Q5K7J3B-Bekhmc45.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-IP7Edy3X.js → chunk-5VM5RSS4-Bn7d1ail.js} +1 -1
- package/web/assets/{chunk-HFQBQIA3-I0ZOVt3_.js → chunk-HFQBQIA3-I1fDLjcG.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-BBMe5Xtv.js → chunk-JWPE2WC7-DKPUknl1.js} +1 -1
- package/web/assets/{chunk-KQLB2F66-DU6oAFrd.js → chunk-KQLB2F66-Dc9hSZPH.js} +1 -1
- package/web/assets/{chunk-KS47KZWR-BJ5Lrbm8.js → chunk-KS47KZWR-BSi29bPZ.js} +1 -1
- package/web/assets/{chunk-OY52VR5R-DDb8YjsA.js → chunk-OY52VR5R-YW_Djx_D.js} +1 -1
- package/web/assets/{chunk-TU62E6Q5-B7CKjQgd.js → chunk-TU62E6Q5-CAuvwT2i.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-C-IWqxPZ.js → chunk-XXDRQBXY-BZGRjo08.js} +1 -1
- package/web/assets/{classDiagram-v2-L25IHNXF-1OBdD3rf.js → classDiagram-v2-L25IHNXF-0TyBb_pv.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-DnJr7V89.js → cose-bilkent-JH36ORCC-CcTqfrZk.js} +1 -1
- package/web/assets/{cynefin-EF2NZ3EQ-BEdwkS-v.js → cynefin-EF2NZ3EQ-D-58ofeg.js} +1 -1
- package/web/assets/{cynefinDiagram-L36ESFBY-RZ9QRUeU.js → cynefinDiagram-L36ESFBY-Cwzf_0sG.js} +1 -1
- package/web/assets/{dagre-SPEB5RXH-CBfCY1Zx.js → dagre-SPEB5RXH-Dfrad5zU.js} +1 -1
- package/web/assets/{diagram-3B7GL73J-Dm7GITjw.js → diagram-3B7GL73J-TLJFMh7T.js} +1 -1
- package/web/assets/{diagram-DNEMPZML-CcR58yAj.js → diagram-DNEMPZML-BD-e0XcL.js} +1 -1
- package/web/assets/{diagram-L3MUGCDN-ZYiiveou.js → diagram-L3MUGCDN-Dv3914hI.js} +1 -1
- package/web/assets/{diagram-LA4NIPWU-B0bLNg4n.js → diagram-LA4NIPWU-Dy_k7atN.js} +1 -1
- package/web/assets/{diagram-MHCOC4E2-Dcb7YVor.js → diagram-MHCOC4E2-Ct1d9mjt.js} +1 -1
- package/web/assets/{diagram-XPFHEONP-CBvf1Kqx.js → diagram-XPFHEONP-BVj8qfpm.js} +1 -1
- package/web/assets/{ebnfDiagram-UZSYDL2S-D6E9DB-s.js → ebnfDiagram-UZSYDL2S-CtDLif8p.js} +1 -1
- package/web/assets/{elk-XV6XMXQE-B97cQbJz.js → elk-XV6XMXQE-esY_zUO9.js} +1 -1
- package/web/assets/{erDiagram-EYBAPDEH-DMxIRsor.js → erDiagram-EYBAPDEH-BhU-QeBo.js} +1 -1
- package/web/assets/{flowDiagram-MALGAFMO-FLTIKFZW.js → flowDiagram-MALGAFMO-DaeyL7Oo.js} +1 -1
- package/web/assets/{ganttDiagram-23REXITY-CG9-KD6j.js → ganttDiagram-23REXITY-CyZIKg4-.js} +1 -1
- package/web/assets/{gitGraphDiagram-STJD7YCW-CCuid-gy.js → gitGraphDiagram-STJD7YCW-RuvoysGE.js} +1 -1
- package/web/assets/{index-yRUtD7w4.js → index-CL1mygUK.js} +49 -49
- package/web/assets/{infoDiagram-KBXO4MBG-D7XEUciT.js → infoDiagram-KBXO4MBG-FYckP-GR.js} +1 -1
- package/web/assets/{ishikawaDiagram-M35NCXHK-CyphkFfL.js → ishikawaDiagram-M35NCXHK-BJ2ECR8m.js} +1 -1
- package/web/assets/{journeyDiagram-OPLOXDXO-DuivX1ng.js → journeyDiagram-OPLOXDXO-CwEsqAcw.js} +1 -1
- package/web/assets/{kanban-definition-BZKZHSQY-B9yzwaQi.js → kanban-definition-BZKZHSQY-KdpXmjwS.js} +1 -1
- package/web/assets/{mermaid.core-sbRvcg9F.js → mermaid.core-BA0ZnaVT.js} +3 -3
- package/web/assets/{mindmap-definition-I2QAS2VK-Cw1TFsFH.js → mindmap-definition-I2QAS2VK-B56-W6EZ.js} +1 -1
- package/web/assets/{pegDiagram-FD4XPPHP-B9Xok_-9.js → pegDiagram-FD4XPPHP-C2pErj_o.js} +1 -1
- package/web/assets/{pieDiagram-J4AKIIQI-D28RcApN.js → pieDiagram-J4AKIIQI-Ch3pN-sc.js} +1 -1
- package/web/assets/{quadrantDiagram-XTYBLID2-LdBvyh5C.js → quadrantDiagram-XTYBLID2-BkKchXfV.js} +1 -1
- package/web/assets/{railroadDiagram-MRQ6NCDL-BPRu986i.js → railroadDiagram-MRQ6NCDL-D0nzZjcw.js} +1 -1
- package/web/assets/{requirementDiagram-Y7LWUY3S-DggCyQ9Z.js → requirementDiagram-Y7LWUY3S-Cx4R38Ct.js} +1 -1
- package/web/assets/{sankeyDiagram-WGJFYUXA-Wz1QXfv3.js → sankeyDiagram-WGJFYUXA-Bl4YFoH4.js} +1 -1
- package/web/assets/{sequenceDiagram-5NDRBG5M--6V8-dEG.js → sequenceDiagram-5NDRBG5M-BitjQ1-f.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-CrmlLwGT.js → sizeCapture-INFHLROL-CLe0SHId.js} +1 -1
- package/web/assets/{stateDiagram-v2-FJ4FJNEA-B4KCInDn.js → stateDiagram-v2-FJ4FJNEA-DHcT6Szc.js} +1 -1
- package/web/assets/{swimlanes-UMQ2AFYF-C776vzuU.js → swimlanes-UMQ2AFYF-B8ILeqek.js} +1 -1
- package/web/assets/swimlanesDiagram-OMPLPG4O-BsX6cLme.js +8 -0
- package/web/assets/{timeline-definition-SEUHKTQE-CNdPDzJw.js → timeline-definition-SEUHKTQE-BSJfLIzK.js} +1 -1
- package/web/assets/{usecaseDiagram-AFA6YXN4-DjWPxdii.js → usecaseDiagram-AFA6YXN4-DtFbmFlO.js} +1 -1
- package/web/assets/{vennDiagram-NNMJR3RB-Dxri1suY.js → vennDiagram-NNMJR3RB-DA9eosKB.js} +1 -1
- package/web/assets/{wardleyDiagram-S7YFUSEH-b2r7oeDP.js → wardleyDiagram-S7YFUSEH-BvLf_vHO.js} +1 -1
- package/web/assets/{xychartDiagram-GGNKY7IX-Cw0idTlH.js → xychartDiagram-GGNKY7IX-DiGDuK2u.js} +1 -1
- package/web/index.html +1 -1
- package/web/assets/swimlanesDiagram-OMPLPG4O-DXtsIH__.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var se=(i,e,t)=>eu(i,typeof e!="symbol"?e+"":e,t);const tu={undo:"撤销",redo:"重做",undoTitle:"撤销 ⌘Z",redoTitle:"重做",expandTo:"展开",expandToTitle:"按层级展开节点",all:"全部",fit:"适应",fitTitle:"适应窗口大小",editMarkdown:"编辑 Markdown",layout:"结构",theme:"配色",export:"导出",find:"查找",findTitle:"查找与替换 ⌘F",present:"演示",presentTitle:"演示模式:逐个节点放映,Esc 退出",trialBadge:"试用 {days}天",proBadge:"PRO",proActive:"Pro 终身会员",trialEnded:"试用已结束",saved:"已保存",readOnly:"只读",savedInCopy:"已更新副本",synced:"已同步",pending:"待保存",saving:"保存中…",saveFailed:"保存失败",conflict:"文件已在别处修改,已载入最新内容;刚才这一步修改没有写入,请重做。",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 矢量图",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.noAds":"去除全部广告,界面清爽专注","feature.browser":"在 Chrome 中全屏编辑,与编辑器实时同步","feature.export":"导出 PNG 高清图片和 SVG 矢量图,直接放进文档和 PPT","feature.layouts":"7 种额外结构:组织结构图、目录组织图、时间轴、鱼骨图等","feature.themes":"3 套额外配色,含护眼深色主题","feature.replace":"整张导图查找替换,一键批量修改","feature.present":"演示模式:逐个节点放映,适合讲解、汇报和复习","feature.updates":"终身会员:之后新增的 Pro 功能全部免费获得","featureName.noAds":"去除广告","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 位自动验证。",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 终身权益。",trialExpiredNoPro:"7 天免费试用已结束。请查看验证邮件中的专属开通链接,或切换到已开通 Pro 的邮箱。",trialExpiredNoAccount:"7 天免费试用已结束。请在支持账号登录的客户端中同步 Pro 权益。",accountHeading:"已登录",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(适配 PPT)","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)",adLabel:"广告",adHide:"暂时关闭",removeAds:"去除广告","house.export.title":"把导图导出成高清图片","house.export.text":"Pro 版一键导出 PNG / SVG,直接放进笔记、文档和 PPT。","house.layouts.title":"试试组织结构图和时间轴","house.layouts.text":"Pro 版解锁 7 种结构和深色主题,同一份大纲换个视角看。","house.present.title":"用导图来讲解和汇报","house.present.text":"Pro 版演示模式逐个节点放映,复习和汇报都更清楚。","house.cta":"了解 Pro"},iu={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",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",conflict:"The file changed elsewhere and the latest version was loaded; your last edit was not written, please redo it.",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",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.noAds":"No ads — a clean, focused workspace","feature.browser":"Full-screen editing in Chrome, synced live with your editor","feature.export":"Export high-resolution PNG and SVG for docs and slides","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.noAds":"No ads","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.",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. Sign in with your email to sync or activate Pro access.",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",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 HD PNG & vector SVG export for slides","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)",adLabel:"Ad",adHide:"Hide for now",removeAds:"Remove ads","house.export.title":"Export your map as an image","house.export.text":"Pro exports PNG and SVG in one click, ready for notes, docs and slides.","house.layouts.title":"Try org charts and timelines","house.layouts.text":"Pro unlocks 7 layouts and a dark theme — see the same outline from a new angle.","house.present.title":"Present with your map","house.present.text":"Pro's presentation mode reveals nodes one by one for talks and revision.","house.cta":"See Pro"};function nu(i){if(i&&/^zh\b/i.test(i))return!0;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=>/^zh\b/i.test(r||"")))return!0}else if(/^zh\b/i.test(e.locale||""))return!0}catch{}return!1}function Ia(i){return nu(i)?"zh":"en"}let Y0=Ia();const ru={zh:tu,en:iu};function su(i){Y0=i,document.documentElement.lang=i==="zh"?"zh-CN":"en"}const ui=()=>Y0;function ee(i,e={}){return ru[Y0][i].replace(/\{(\w+)\}/g,(t,n)=>String(e[n]??""))}function X0(i=document){i.querySelectorAll("[data-i18n]").forEach(e=>e.textContent=ee(e.dataset.i18n)),i.querySelectorAll("[data-i18n-title]").forEach(e=>e.title=ee(e.dataset.i18nTitle)),i.querySelectorAll("[data-i18n-placeholder]").forEach(e=>e.placeholder=ee(e.dataset.i18nPlaceholder))}const au=20.8,ou=12;function lu(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,ou+s*au-i.clientHeight*.35);if(document.activeElement===i)try{i.setSelectionRange(o,Math.max(o,l))}catch{}i.scrollTop=h,requestAnimationFrame(()=>{i.isConnected&&(i.scrollTop=h)})}class Ko extends Error{constructor(e,t){super(e),this.url=t}}const hu=()=>Ia();class cu{constructor(){
|
|
1
|
+
var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ae=(i,e,t)=>eu(i,typeof e!="symbol"?e+"":e,t);const tu={undo:"撤销",redo:"重做",undoTitle:"撤销 ⌘Z",redoTitle:"重做",expandTo:"展开",expandToTitle:"按层级展开节点",all:"全部",fit:"适应",fitTitle:"适应窗口大小",editMarkdown:"编辑 Markdown",layout:"结构",theme:"配色",export:"导出",find:"查找",findTitle:"查找与替换 ⌘F",present:"演示",presentTitle:"演示模式:逐个节点放映,Esc 退出",trialBadge:"试用 {days}天",proBadge:"PRO",proActive:"Pro 终身会员",trialEnded:"试用已结束",saved:"已保存",readOnly:"只读",savedInCopy:"已更新副本",synced:"已同步",pending:"待保存",saving:"保存中…",saveFailed:"保存失败",conflict:"文件已在别处修改,已载入最新内容;刚才这一步修改没有写入,请重做。",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 矢量图",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.noAds":"去除全部广告,界面清爽专注","feature.browser":"在 Chrome 中全屏编辑,与编辑器实时同步","feature.export":"导出 PNG 高清图片和 SVG 矢量图,直接放进文档和 PPT","feature.layouts":"7 种额外结构:组织结构图、目录组织图、时间轴、鱼骨图等","feature.themes":"3 套额外配色,含护眼深色主题","feature.replace":"整张导图查找替换,一键批量修改","feature.present":"演示模式:逐个节点放映,适合讲解、汇报和复习","feature.updates":"终身会员:之后新增的 Pro 功能全部免费获得","featureName.noAds":"去除广告","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:"邮件已发送!点击邮件内按钮可免输码自动完成登录/开通,或在此输入 6 位码。",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 终身权益。",trialExpiredNoPro:"7 天免费试用已结束。请查看验证邮件中的专属开通链接,或切换到已开通 Pro 的邮箱。",trialExpiredNoAccount:"7 天免费试用已结束。请在支持账号登录的客户端中同步 Pro 权益。",accountHeading:"已登录",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(适配 PPT)","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)",adLabel:"广告",adHide:"暂时关闭",removeAds:"去除广告","house.export.title":"把导图导出成高清图片","house.export.text":"Pro 版一键导出 PNG / SVG,直接放进笔记、文档和 PPT。","house.layouts.title":"试试组织结构图和时间轴","house.layouts.text":"Pro 版解锁 7 种结构和深色主题,同一份大纲换个视角看。","house.present.title":"用导图来讲解和汇报","house.present.text":"Pro 版演示模式逐个节点放映,复习和汇报都更清楚。","house.cta":"了解 Pro"},iu={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",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",conflict:"The file changed elsewhere and the latest version was loaded; your last edit was not written, please redo it.",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",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.noAds":"No ads — a clean, focused workspace","feature.browser":"Full-screen editing in Chrome, synced live with your editor","feature.export":"Export high-resolution PNG and SVG for docs and slides","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.noAds":"No ads","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! Click the button in the email for zero-code auto sign-in & checkout, or enter the 6-digit code.",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. Sign in with your email to sync or activate Pro access.",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",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 HD PNG & vector SVG export for slides","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)",adLabel:"Ad",adHide:"Hide for now",removeAds:"Remove ads","house.export.title":"Export your map as an image","house.export.text":"Pro exports PNG and SVG in one click, ready for notes, docs and slides.","house.layouts.title":"Try org charts and timelines","house.layouts.text":"Pro unlocks 7 layouts and a dark theme — see the same outline from a new angle.","house.present.title":"Present with your map","house.present.text":"Pro's presentation mode reveals nodes one by one for talks and revision.","house.cta":"See Pro"};function nu(i){if(typeof document<"u"){const e=document.documentElement.dataset.osLocale;if(e==="zh")return!0;if(e==="en")return!1}if(i&&/^zh\b/i.test(i))return!0;if(i&&/^en\b/i.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=>/^zh\b/i.test(r||"")))return!0}else if(/^zh\b/i.test(e.locale||""))return!0}catch{}return!1}function Ia(i){return nu(i)?"zh":"en"}let Y0=Ia();const ru={zh:tu,en:iu};function su(i){Y0=i,document.documentElement.lang=i==="zh"?"zh-CN":"en"}const ui=()=>Y0;function te(i,e={}){return ru[Y0][i].replace(/\{(\w+)\}/g,(t,n)=>String(e[n]??""))}function X0(i=document){i.querySelectorAll("[data-i18n]").forEach(e=>e.textContent=te(e.dataset.i18n)),i.querySelectorAll("[data-i18n-title]").forEach(e=>e.title=te(e.dataset.i18nTitle)),i.querySelectorAll("[data-i18n-placeholder]").forEach(e=>e.placeholder=te(e.dataset.i18nPlaceholder))}const au=20.8,ou=12;function lu(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,ou+s*au-i.clientHeight*.35);if(document.activeElement===i)try{i.setSelectionRange(o,Math.max(o,l))}catch{}i.scrollTop=h,requestAnimationFrame(()=>{i.isConnected&&(i.scrollTop=h)})}class Ko extends Error{constructor(e,t){super(e),this.url=t}}const hu=()=>Ia();class cu{constructor(){ae(this,"base",/^\/s\/[a-f0-9]{48}\/$/.test(location.pathname)?location.pathname:"/");ae(this,"sidebar",this.base!=="/");ae(this,"account",this.sidebar?"restore":"purchase");ae(this,"hostAccountNavigation",!1);ae(this,"currentFile",null);ae(this,"currentMd","");ae(this,"currentVersion","");ae(this,"cachedFiles",[]);ae(this,"expandedKeys",new Set);ae(this,"initializedExpansionForFile","");ae(this,"treeOpen",!1);ae(this,"mdOpen",!1);ae(this,"treeWidthPx",240);ae(this,"mdWidthPx",420);ae(this,"mdEditTimer",0);ae(this,"activeStartLine",0);ae(this,"activeEndLine",0);ae(this,"treeBtnEl",null);ae(this,"splitBtnEl",null);ae(this,"treePaneEl",null);ae(this,"treeTitleEl",null);ae(this,"treeCloseBtnEl",null);ae(this,"treeBodyEl",null);ae(this,"treeSearchEl",null);ae(this,"mdPaneEl",null);ae(this,"mdTitleEl",null);ae(this,"mdLineBadgeEl",null);ae(this,"mdCloseBtnEl",null);ae(this,"mdGutterEl",null);ae(this,"mdBandEl",null);ae(this,"mdTextareaEl",null);ae(this,"externalListeners",[]);ae(this,"revealListeners",[]);ae(this,"assetBase",this.base+"doc-assets/");ae(this,"locale",hu());ae(this,"events",new EventSource(this.base+"api/events"));ae(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:ui()})});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})});return n.ok?(await n.json()).result:{ok:!1,reason:"unavailable"}}})}get capabilities(){return{saveTarget:"file",account:this.account,compact:this.sidebar,restrictAssets:this.sidebar}}uiText(e,t){return ui()==="zh"?e:t}parseFileEntry(e){const t=typeof e.label=="string"?e.label:"",n=t.indexOf(" / ");if(n>0){const l=t.slice(0,n).trim(),h=t.slice(n+3).replace(/\\/g,"/");return{project:l,rel:h,item:e}}const r=(t||(e.path||"").split(/[\\/]/).pop()||"").replace(/\\/g,"/"),s=(e.path||"").replace(/\\/g,"/"),a="/"+r;let o=this.uiText("当前项目","Workspace");return s.endsWith(a)&&(o=s.slice(0,s.length-a.length).split("/").filter(Boolean).pop()||o),{project:o,rel:r,item:e}}renderMdGutterAndBand(){if(!this.mdTextareaEl)return;const e=Math.max(1,this.mdTextareaEl.value.split(`
|
|
3
3
|
`).length),t=Math.max(0,Math.min(this.activeStartLine,e-1)),n=Math.max(t,Math.min(this.activeEndLine,e-1));if(this.mdLineBadgeEl){const r=t===n?`${t+1}`:`${t+1}–${n+1}`;this.mdLineBadgeEl.textContent=this.uiText(`行 ${r}`,`Ln ${r}`)}if(this.mdGutterEl){const r=[];for(let s=0;s<e;s++){const a=s>=t&&s<=n;r.push(`<div class="md-gutter-ln${a?" is-active":""}">${s+1}</div>`)}this.mdGutterEl.innerHTML=r.join(""),this.mdGutterEl.scrollTop=this.mdTextareaEl.scrollTop}if(this.mdBandEl){const a=12+t*20.8-this.mdTextareaEl.scrollTop,o=Math.max(1,n-t+1)*20.8;this.mdBandEl.style.transform=`translateY(${a}px)`,this.mdBandEl.style.height=`${o}px`}}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}this.mdTextareaEl&&((t||document.activeElement!==this.mdTextareaEl)&&this.mdTextareaEl.value!==e&&(this.mdTextareaEl.value=e),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(),requestAnimationFrame(()=>{var a,o,l;try{const h=window.inkmap;(a=h==null?void 0:h.mindMap)==null||a.resize(),e&&((l=(o=h==null?void 0:h.mindMap)==null?void 0:o.view)==null||l.fit())}catch{}})}renderTreeDom(){var d;if(!this.treeBodyEl)return;const e=(((d=this.treeSearchEl)==null?void 0:d.value)??"").trim().toLowerCase(),t=!!e,n=new Map;for(const f of this.cachedFiles){const{project:m,rel:v,item:g}=this.parseFileEntry(f);if(e&&!m.toLowerCase().includes(e)&&!v.toLowerCase().includes(e))continue;let x=n.get(m);x||(x={name:m,key:`proj:${m}`,active:g.group==="active",count:0,root:{name:"",key:`proj:${m}`,folders:new Map,sortedFolders:[],files:[],totalFiles:0}},n.set(m,x)),g.group==="active"&&(x.active=!0),x.count++;const b=v.split("/").filter(Boolean),M=b.pop()||v;let E=x.root,C=`proj:${m}`;for(const N of b){C+=`/${N}`;let O=E.folders.get(N);O||(O={name:N,key:C,folders:new Map,sortedFolders:[],files:[],totalFiles:0},E.folders.set(N,O)),E=O}E.files.push({name:M,path:g.path,rel:v,project:m,isMarkmap:/\.markmap\.md$/i.test(M)})}const r=f=>{const m=[];for(const g of f.folders.values()){for(;g.files.length===0&&g.folders.size===1;){const x=[...g.folders.values()][0];g.name=`${g.name}/${x.name}`,g.key=x.key,g.folders=x.folders,g.files=x.files}r(g),m.push(g)}m.sort((g,x)=>g.name.localeCompare(x.name,void 0,{numeric:!0,sensitivity:"base"})),f.sortedFolders=m,f.files.sort((g,x)=>g.isMarkmap!==x.isMarkmap?g.isMarkmap?-1:1:g.name.localeCompare(x.name,void 0,{numeric:!0,sensitivity:"base"}));let v=f.files.length;for(const g of m)v+=g.totalFiles;f.totalFiles=v},s=[...n.values()];for(const f of s)r(f.root);if(s.sort((f,m)=>f.active!==m.active?f.active?-1:1:f.name.localeCompare(m.name)),this.currentFile&&this.initializedExpansionForFile!==this.currentFile){this.initializedExpansionForFile=this.currentFile;for(const f of s){f.active&&this.expandedKeys.add(f.key);const m=v=>{let g=v.files.some(x=>x.path===this.currentFile);for(const x of v.sortedFolders)m(x)&&(g=!0);return g&&this.expandedKeys.add(v.key),g};m(f.root)&&this.expandedKeys.add(f.key)}}if(this.treeBodyEl.innerHTML="",!s.length){const f=document.createElement("div");f.className="http-tree-empty",f.textContent=t?this.uiText("无匹配的 Markdown 文件","No matching Markdown files"):this.uiText("未找到 Markdown 文件","No Markdown files"),this.treeBodyEl.appendChild(f);return}const a='<svg class="http-tree-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>',o='<svg class="http-tree-icon http-icon-folder" viewBox="0 0 16 16" width="14" height="14" 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>',l='<svg class="http-tree-icon http-icon-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>',h='<svg class="http-tree-icon http-icon-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>',c=(f,m,v)=>{for(const g of f.sortedFolders){const x=t||this.expandedKeys.has(g.key),b=document.createElement("div");b.className="http-tree-group";const M=document.createElement("button");if(M.type="button",M.className=`http-tree-row http-tree-folder ${x?"is-open":""}`,M.style.paddingLeft=`${8+v*13}px`,M.innerHTML=`${a}${o}<span class="http-tree-label"></span><span class="http-tree-count">${g.totalFiles}</span>`,M.querySelector(".http-tree-label").textContent=g.name,M.title=g.name,M.addEventListener("click",()=>{this.expandedKeys.has(g.key)?this.expandedKeys.delete(g.key):this.expandedKeys.add(g.key),this.renderTreeDom()}),b.appendChild(M),x){const E=document.createElement("div");E.className="http-tree-children",c(g,E,v+1),b.appendChild(E)}m.appendChild(b)}for(const g of f.files){const x=g.path===this.currentFile,b=document.createElement("button");b.type="button",b.className=`http-tree-row http-tree-file ${x?"is-selected":""}`,b.style.paddingLeft=`${8+v*13}px`,b.innerHTML=`<span class="http-tree-check">${x?"✓":""}</span>${g.isMarkmap?l:h}<span class="http-tree-label"></span>${g.isMarkmap?`<span class="http-tree-tag">${this.uiText("导图","Map")}</span>`:""}`,b.querySelector(".http-tree-label").textContent=g.name,b.title=`${g.project} / ${g.rel}`,b.addEventListener("click",()=>{this.switchFile(g.path)}),m.appendChild(b)}};for(const f of s){const m=t||this.expandedKeys.has(f.key)||s.length===1,v=document.createElement("div");v.className="http-tree-project";const g=document.createElement("button");if(g.type="button",g.className=`http-tree-row http-tree-proj-header ${m?"is-open":""}`,g.innerHTML=`${a}${o}<span class="http-tree-label"></span><span class="http-tree-count">${f.count}</span>`,g.querySelector(".http-tree-label").textContent=f.name,g.addEventListener("click",()=>{this.expandedKeys.has(f.key)?this.expandedKeys.delete(f.key):this.expandedKeys.add(f.key),this.renderTreeDom()}),v.appendChild(g),m){const x=document.createElement("div");x.className="http-tree-proj-body",c(f.root,x,1),v.appendChild(x)}this.treeBodyEl.appendChild(v)}}async flushPendingEdits(){var e,t;this.mdEditTimer&&(window.clearTimeout(this.mdEditTimer),this.mdEditTimer=0,await((t=(e=window.inkmap)==null?void 0:e.load)==null?void 0:t.call(e,this.currentMd,!0)))}async switchFile(e){var r,s;if(!e||e===this.currentFile)return;await this.flushPendingEdits(),await((s=(r=window.inkmap)==null?void 0:r.flushSave)==null?void 0:s.call(r));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.currentVersion=n.doc.version,this.syncMdPane(n.doc.md,!0),this.renderTreeDom(),this.externalListeners.forEach(a=>a(n.doc)),window.setTimeout(()=>{var a,o,l;try{(l=(o=(a=window.inkmap)==null?void 0:a.mindMap)==null?void 0:o.view)==null||l.fit()}catch{}},120))}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=`
|
|
4
4
|
:root.http-ide-active #bar {
|
|
5
5
|
top: 0 !important; left: 0 !important; right: 0 !important;
|
|
@@ -171,7 +171,7 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
171
171
|
`,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()});const a=()=>{if(!this.mdTextareaEl)return;const g=this.mdTextareaEl.selectionStart??0,x=this.mdTextareaEl.selectionEnd??g,b=this.mdTextareaEl.value.slice(0,g).split(`
|
|
172
172
|
`).length-1,M=this.mdTextareaEl.value.slice(0,x).split(`
|
|
173
173
|
`).length-1;this.activeStartLine=b,this.activeEndLine=Math.max(b,M),this.renderMdGutterAndBand(),this.revealListeners.forEach(E=>E(b))};(f=this.mdTextareaEl)==null||f.addEventListener("click",a),(m=this.mdTextareaEl)==null||m.addEventListener("keyup",g=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(g.key)&&a()}),(v=this.mdTextareaEl)==null||v.addEventListener("input",()=>{const g=this.mdTextareaEl.value;this.currentMd=g;const x=this.mdTextareaEl.selectionStart??0,b=g.slice(0,x).split(`
|
|
174
|
-
`).length-1;this.activeStartLine=b,this.activeEndLine=b,this.renderMdGutterAndBand(),window.clearTimeout(this.mdEditTimer),this.mdEditTimer=window.setTimeout(()=>{const M=window.inkmap;M!=null&&M.load&&M.load(g,!0).then(()=>{this.revealListeners.forEach(E=>E(b))})},280)});const o=this.mdPaneEl.querySelector("#http-md-resizer");o==null||o.addEventListener("pointerdown",g=>{g.preventDefault(),o.setPointerCapture(g.pointerId);const x=M=>{const E=this.treeOpen?this.treeWidthPx:0,C=Math.max(260,Math.round(window.innerWidth*.65)-E);this.mdWidthPx=Math.max(220,Math.min(C,Math.round(M.clientX-E))),this.applyWorkspaceLayout(!1)},b=()=>{var M,E,C;o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",b),o.removeEventListener("pointercancel",b);try{(C=(E=(M=window.inkmap)==null?void 0:M.mindMap)==null?void 0:E.view)==null||C.fit()}catch{}};o.addEventListener("pointermove",x),o.addEventListener("pointerup",b),o.addEventListener("pointercancel",b)}),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(`读取文档失败:${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.currentVersion=r.version,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)&&(lu(this.mdTextareaEl,this.activeStartLine,this.activeEndLine),this.renderMdGutterAndBand())}onMapMarkdownChange(e){this.currentMd=e,this.syncMdPane(e,!1)}refreshLanguage(){this.applyWorkspaceLayout(!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.currentVersion=s.version,this.syncMdPane(s.md,!0),{ok:!1,doc:s}}if(!n.ok)throw new Error(`保存失败:${n.status}`);const r=await n.json();return this.currentVersion=r.version,{ok:!0,...r}}onExternalChange(e){this.externalListeners.push(e),this.events.addEventListener("change",t=>{const n=JSON.parse(t.data),r=!!(n.currentFile&&n.currentFile!==this.currentFile),s=n.md!==this.currentMd;this.currentMd=n.md,this.currentVersion=n.version,n.currentFile&&(this.currentFile=n.currentFile),(r||s)&&this.syncMdPane(n.md,r),this.treeOpen&&this.renderTreeDom(),e(n)})}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(e==="restore"&&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(ee("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},"*")});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:ui()})}),r=await n.json();if(!n.ok)throw new Error(r.error??n.statusText);if(!t)throw new Ko(ee("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:ui()})});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 ads(){const e=await fetch(this.base+"api/ads").catch(()=>null);return e!=null&&e.ok?e.json():[]}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 du{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:ui()}),t=>t.result),verify:(e,t)=>this.request(n=>({type:"signInByPhone",id:n,phone:e,code:t}),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){const n=this.nextId++;return new Promise((r,s)=>{this.waiting.set(n,a=>{a.type==="error"?s(new Error(a.message)):r(t(a))}),this.post(e(n))})}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})}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:ui()}),()=>{})}orderPro(){return this.request(e=>({type:"orderPro",id:e,locale:ui()}),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})}signOut(){return this.request(e=>({type:"signOut",id:e}),()=>{})}onLicenseChange(e){this.on("license",t=>e(t.state))}async ads(){return(await this.hello()).ads}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 uu(){if(window.acquireVsCodeApi){const i=Ia(window.INKMAP_LOCALE);return new du(window.acquireVsCodeApi(),window.INKMAP_ASSET_BASE??"",i)}return new cu}const R={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"}},Pl={[R.INIT_ROOT_NODE_POSITION.LEFT]:0,[R.INIT_ROOT_NODE_POSITION.TOP]:0,[R.INIT_ROOT_NODE_POSITION.RIGHT]:1,[R.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[R.INIT_ROOT_NODE_POSITION.CENTER]:.5},Fl=[R.LAYOUT.LOGICAL_STRUCTURE,R.LAYOUT.LOGICAL_STRUCTURE_LEFT,R.LAYOUT.MIND_MAP,R.LAYOUT.CATALOG_ORGANIZATION,R.LAYOUT.ORGANIZATION_STRUCTURE,R.LAYOUT.TIMELINE,R.LAYOUT.TIMELINE2,R.LAYOUT.VERTICAL_TIMELINE,R.LAYOUT.VERTICAL_TIMELINE2,R.LAYOUT.VERTICAL_TIMELINE3,R.LAYOUT.FISHBONE,R.LAYOUT.FISHBONE2,R.LAYOUT.RIGHT_FISHBONE,R.LAYOUT.RIGHT_FISHBONE2],ya=["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"],Jn={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"},fu=`
|
|
174
|
+
`).length-1;this.activeStartLine=b,this.activeEndLine=b,this.renderMdGutterAndBand(),window.clearTimeout(this.mdEditTimer),this.mdEditTimer=window.setTimeout(()=>{const M=window.inkmap;M!=null&&M.load&&M.load(g,!0).then(()=>{this.revealListeners.forEach(E=>E(b))})},280)});const o=this.mdPaneEl.querySelector("#http-md-resizer");o==null||o.addEventListener("pointerdown",g=>{g.preventDefault(),o.setPointerCapture(g.pointerId);const x=M=>{const E=this.treeOpen?this.treeWidthPx:0,C=Math.max(260,Math.round(window.innerWidth*.65)-E);this.mdWidthPx=Math.max(220,Math.min(C,Math.round(M.clientX-E))),this.applyWorkspaceLayout(!1)},b=()=>{var M,E,C;o.removeEventListener("pointermove",x),o.removeEventListener("pointerup",b),o.removeEventListener("pointercancel",b);try{(C=(E=(M=window.inkmap)==null?void 0:M.mindMap)==null?void 0:E.view)==null||C.fit()}catch{}};o.addEventListener("pointermove",x),o.addEventListener("pointerup",b),o.addEventListener("pointercancel",b)}),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(`读取文档失败:${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.currentVersion=r.version,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)&&(lu(this.mdTextareaEl,this.activeStartLine,this.activeEndLine),this.renderMdGutterAndBand())}onMapMarkdownChange(e){this.currentMd=e,this.syncMdPane(e,!1)}refreshLanguage(){this.applyWorkspaceLayout(!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.currentVersion=s.version,this.syncMdPane(s.md,!0),{ok:!1,doc:s}}if(!n.ok)throw new Error(`保存失败:${n.status}`);const r=await n.json();return this.currentVersion=r.version,{ok:!0,...r}}onExternalChange(e){this.externalListeners.push(e),this.events.addEventListener("change",t=>{const n=JSON.parse(t.data),r=!!(n.currentFile&&n.currentFile!==this.currentFile),s=n.md!==this.currentMd;this.currentMd=n.md,this.currentVersion=n.version,n.currentFile&&(this.currentFile=n.currentFile),(r||s)&&this.syncMdPane(n.md,r),this.treeOpen&&this.renderTreeDom(),e(n)})}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(e==="restore"&&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(te("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},"*")});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:ui()})}),r=await n.json();if(!n.ok)throw new Error(r.error??n.statusText);if(!t)throw new Ko(te("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:ui()})});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 ads(){const e=await fetch(this.base+"api/ads").catch(()=>null);return e!=null&&e.ok?e.json():[]}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 du{constructor(e,t,n){ae(this,"capabilities",{saveTarget:"editor",account:window.INKMAP_ACCOUNT_MODE??"purchase"});ae(this,"nextId",1);ae(this,"waiting",new Map);ae(this,"listeners",{});ae(this,"first");ae(this,"currentLicense");ae(this,"history",{undo:()=>this.post({type:"undo"}),redo:()=>this.post({type:"redo"})});ae(this,"phoneSignIn",{send:e=>this.request(t=>({type:"sendPhoneCode",id:t,phone:e,locale:ui()}),t=>t.result),verify:(e,t)=>this.request(n=>({type:"signInByPhone",id:n,phone:e,code:t}),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){const n=this.nextId++;return new Promise((r,s)=>{this.waiting.set(n,a=>{a.type==="error"?s(new Error(a.message)):r(t(a))}),this.post(e(n))})}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})}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:ui()}),()=>{})}orderPro(){return this.request(e=>({type:"orderPro",id:e,locale:ui()}),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})}signOut(){return this.request(e=>({type:"signOut",id:e}),()=>{})}onLicenseChange(e){this.on("license",t=>e(t.state))}onOpenAccountRequest(e){this.on("openAccount",()=>e())}async ads(){return(await this.hello()).ads}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 uu(){if(window.acquireVsCodeApi){const i=Ia(window.INKMAP_LOCALE);return new du(window.acquireVsCodeApi(),window.INKMAP_ASSET_BASE??"",i)}return new cu}const R={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"}},Pl={[R.INIT_ROOT_NODE_POSITION.LEFT]:0,[R.INIT_ROOT_NODE_POSITION.TOP]:0,[R.INIT_ROOT_NODE_POSITION.RIGHT]:1,[R.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[R.INIT_ROOT_NODE_POSITION.CENTER]:.5},Fl=[R.LAYOUT.LOGICAL_STRUCTURE,R.LAYOUT.LOGICAL_STRUCTURE_LEFT,R.LAYOUT.MIND_MAP,R.LAYOUT.CATALOG_ORGANIZATION,R.LAYOUT.ORGANIZATION_STRUCTURE,R.LAYOUT.TIMELINE,R.LAYOUT.TIMELINE2,R.LAYOUT.VERTICAL_TIMELINE,R.LAYOUT.VERTICAL_TIMELINE2,R.LAYOUT.VERTICAL_TIMELINE3,R.LAYOUT.FISHBONE,R.LAYOUT.FISHBONE2,R.LAYOUT.RIGHT_FISHBONE,R.LAYOUT.RIGHT_FISHBONE2],ya=["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"],tr={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"},fu=`
|
|
175
175
|
/* 鼠标hover和激活时渲染的矩形 */
|
|
176
176
|
.smm-hover-node{
|
|
177
177
|
display: none;
|
|
@@ -192,13 +192,13 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
192
192
|
.smm-text-node-wrap, .smm-expand-btn-text {
|
|
193
193
|
user-select: none;
|
|
194
194
|
}
|
|
195
|
-
`,pu=["img","br","hr","input","link","meta","area"],wa=1.2,mu=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];class gu{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===R.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(R.DIR.LEFT)||t.includes(R.DIR.RIGHT))&&(t=t.filter(x=>![R.DIR.LEFT,R.DIR.RIGHT].includes(x))),!0){case t.includes(R.DIR.UP):h?this.enlarge(v,g,r):this.narrow(v,g,r);break;case t.includes(R.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(R.DIR.DOWN)&&(g=-m),t.includes(R.DIR.UP)&&(g=m),t.includes(R.DIR.LEFT)&&(v=f),t.includes(R.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 M=0;h>f?(M=c,v=2):(M=d*h,v=3),m=M/o}this.setScale(m);const g=e()||r.rbox();g.x-=this.mindMap.elRect.left,g.y-=this.mindMap.elRect.top;let x=0,b=0;v===1?(x=-g.x+n+(c-g.width)/2,b=-g.y+n+(d-g.height)/2):v===2?(x=-g.x+n,b=-g.y+n+(d-g.height)/2):v===3&&(x=-g.x+n+(c-g.width)/2,b=-g.y+n),this.translateXY(x,b)}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 o7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ho={exports:{}},Hl;function xu(){return Hl||(Hl=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],b=arguments.length,M,E;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),b){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(E=1,M=new Array(b-1);E<b;E++)M[E-1]=arguments[E];x.fn.apply(x.context,M)}else{var C=x.length,N;for(E=0;E<C;E++)switch(x[E].once&&this.removeListener(h,x[E].fn,void 0,!0),b){case 1:x[E].fn.call(x[E].context);break;case 2:x[E].fn.call(x[E].context,c);break;case 3:x[E].fn.call(x[E].context,c,d);break;case 4:x[E].fn.call(x[E].context,c,d,f);break;default:if(!M)for(N=1,M=new Array(b-1);N<b;N++)M[N-1]=arguments[N];x[E].fn.apply(x[E].context,M)}}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=[],b=v.length;g<b;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})(ho)),ho.exports}var yu=xu();const wu=vu(yu);let bu=class extends wu{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(R.DIR.UP),e.deltaY>0&&t.push(R.DIR.DOWN),e.deltaX<0&&t.push(R.DIR.LEFT),e.deltaX>0&&t.push(R.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 ba=function(e){return ku(e)&&!Tu(e)};function ku(i){return!!i&&typeof i=="object"}function Tu(i){var e=Object.prototype.toString.call(i);return e==="[object RegExp]"||e==="[object Date]"||Su(i)}var Eu=typeof Symbol=="function"&&Symbol.for,Mu=Eu?Symbol.for("react.element"):60103;function Su(i){return i.$$typeof===Mu}function zu(i){return Array.isArray(i)?[]:{}}function Ms(i,e){var t=e&&e.clone===!0;return t&&ba(i)?Ur(zu(i),i,e):i}function Ul(i,e,t){var n=i.slice();return e.forEach(function(r,s){typeof n[s]>"u"?n[s]=Ms(r,t):ba(r)?n[s]=Ur(i[s],r,t):i.indexOf(r)===-1&&n.push(Ms(r,t))}),n}function Cu(i,e,t){var n={};return ba(i)&&Object.keys(i).forEach(function(r){n[r]=Ms(i[r],t)}),Object.keys(e).forEach(function(r){!ba(e[r])||!i[r]?n[r]=Ms(e[r],t):n[r]=Ur(i[r],e[r],t)}),n}function Ur(i,e,t){var n=Array.isArray(e),r=Array.isArray(i),s=t||{arrayMerge:Ul},a=n===r;if(a)if(n){var o=s.arrayMerge||Ul;return o(i,e,t)}else return Cu(i,e,t);else return Ms(e,t)}Ur.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 Ur(n,r,t)})};var ka=Ur;let Xs;const Nu=new Uint8Array(16);function Lu(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Nu)}const Dt=[];for(let i=0;i<256;++i)Dt.push((i+256).toString(16).slice(1));function Au(i,e=0){return Dt[i[e+0]]+Dt[i[e+1]]+Dt[i[e+2]]+Dt[i[e+3]]+"-"+Dt[i[e+4]]+Dt[i[e+5]]+"-"+Dt[i[e+6]]+Dt[i[e+7]]+"-"+Dt[i[e+8]]+Dt[i[e+9]]+"-"+Dt[i[e+10]]+Dt[i[e+11]]+Dt[i[e+12]]+Dt[i[e+13]]+Dt[i[e+14]]+Dt[i[e+15]]}const _u=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$l={randomUUID:_u};function Ru(i,e,t){if($l.randomUUID&&!i)return $l.randomUUID();i=i||{};const n=i.random||(i.rng||Lu)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Au(n)}function V0(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)}V0.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};V0.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 Zo={},Oc=[];function Se(i,e){if(Array.isArray(i)){for(const t of i)Se(t,e);return}if(typeof i=="object"){for(const t in i)Se(t,i[t]);return}Bc(Object.getOwnPropertyNames(e)),Zo[i]=Object.assign(Zo[i]||{},e)}function ri(i){return Zo[i]||{}}function Du(){return[...new Set(Oc)]}function Bc(i){Oc.push(...i)}function j0(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)r.push(e(i[t]));return r}function Iu(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 co(i){return i%360*Math.PI/180}function Vs(i){return i.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Ou(i){return i.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}function Pc(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Yr(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 Qo(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 K0="http://www.w3.org/2000/svg",Bu="http://www.w3.org/1999/xhtml",js="http://www.w3.org/2000/xmlns/",Is="http://www.w3.org/1999/xlink",Pu="http://svgjs.dev/svgjs",He={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};let Z0=class{};const er={},Q0="___SYMBOL___ROOT___";function Ss(i,e=K0){return He.document.createElementNS(e,i)}function Wt(i,e=!1){if(i instanceof Z0)return i;if(typeof i=="object")return uo(i);if(i==null)return new er[Q0];if(typeof i=="string"&&i.charAt(0)!=="<")return uo(He.document.querySelector(i));const t=e?He.document.createElement("div"):Ss("svg");return t.innerHTML=i,i=uo(t.firstChild),t.removeChild(t.firstChild),i}function et(i,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:Ss(i)}function Mi(i){if(!i)return null;if(i.instance instanceof Z0)return i.instance;if(i.nodeName==="#document-fragment")return new er.Fragment(i);let e=Pc(i.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":er[e]||(e="Dom"),new er[e](i)}let uo=Mi;function Oe(i,e=i.name,t=!1){return er[e]=i,t&&(er[Q0]=i),Bc(Object.getOwnPropertyNames(i.prototype)),i}function Fu(i){return er[i]}let Hu=1e3;function Fc(i){return"Svgjs"+Pc(i)+Hu++}function Hc(i){for(let e=i.children.length-1;e>=0;e--)Hc(i.children[e]);return i.id&&(i.id=Fc(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 Je(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 Uu(){return this.parent().children()}function $u(){return this.parent().index(this)}function Gu(){return this.siblings()[this.position()+1]}function qu(){return this.siblings()[this.position()-1]}function Wu(){const i=this.position();return this.parent().add(this.remove(),i+1),this}function Yu(){const i=this.position();return this.parent().add(this.remove(),i?i-1:0),this}function Xu(){return this.parent().add(this.remove()),this}function Vu(){return this.parent().add(this.remove(),0),this}function ju(i){i=Wt(i),i.remove();const e=this.position();return this.parent().add(i,e),this}function Ku(i){i=Wt(i),i.remove();const e=this.position();return this.parent().add(i,e+1),this}function Zu(i){return i=Wt(i),i.before(this),this}function Qu(i){return i=Wt(i),i.after(this),this}Se("Dom",{siblings:Uu,position:$u,next:Gu,prev:qu,forward:Wu,backward:Yu,front:Xu,back:Vu,before:ju,after:Ku,insertBefore:Zu,insertAfter:Qu});const Uc=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ju=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,e3=/rgb\((\d+),(\d+),(\d+)\)/,t3=/(#[a-z_][a-z0-9\-_]*)/i,i3=/\)\s*,?\s*/,n3=/\s/g,Gl=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ql=/^rgb\(/,Wl=/^(\s+)?$/,Yl=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,r3=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,fn=/[\s,]+/,J0=/[MLHVCSQTAZ]/i;function s3(){const i=this.attr("class");return i==null?[]:i.trim().split(fn)}function a3(i){return this.classes().indexOf(i)!==-1}function o3(i){if(!this.hasClass(i)){const e=this.classes();e.push(i),this.attr("class",e.join(" "))}return this}function l3(i){return this.hasClass(i)&&this.attr("class",this.classes().filter(function(e){return e!==i}).join(" ")),this}function h3(i){return this.hasClass(i)?this.removeClass(i):this.addClass(i)}Se("Dom",{classes:s3,hasClass:a3,addClass:o3,removeClass:l3,toggleClass:h3});function c3(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=Vs(n);t[n]=this.node.style[r]}return t}if(typeof i=="string")return this.node.style[Vs(i)];if(typeof i=="object")for(const n in i)this.node.style[Vs(n)]=i[n]==null||Wl.test(i[n])?"":i[n]}return arguments.length===2&&(this.node.style[Vs(i)]=e==null||Wl.test(e)?"":e),this}function d3(){return this.css("display","")}function u3(){return this.css("display","none")}function f3(){return this.css("display")!=="none"}Se("Dom",{css:c3,show:d3,hide:u3,visible:f3});function p3(i,e,t){if(i==null)return this.data(j0(Iu(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}Se("Dom",{data:p3});function m3(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 g3(){if(arguments.length===0)this._memory={};else for(let i=arguments.length-1;i>=0;i--)delete this.memory()[arguments[i]];return this}function v3(){return this._memory=this._memory||{}}Se("Dom",{remember:m3,forget:g3,memory:v3});function x3(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 y3(i){const e=Math.round(i),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function Cr(i,e){for(let t=e.length;t--;)if(i[e[t]]==null)return!1;return!0}function w3(i,e){const t=Cr(i,"rgb")?{_a:i.r,_b:i.g,_c:i.b,_d:0,space:"rgb"}:Cr(i,"xyz")?{_a:i.x,_b:i.y,_c:i.z,_d:0,space:"xyz"}:Cr(i,"hsl")?{_a:i.h,_b:i.s,_c:i.l,_d:0,space:"hsl"}:Cr(i,"lab")?{_a:i.l,_b:i.a,_c:i.b,_d:0,space:"lab"}:Cr(i,"lch")?{_a:i.l,_b:i.c,_c:i.h,_d:0,space:"lch"}:Cr(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 b3(i){return i==="lab"||i==="xyz"||i==="lch"}function fo(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 Ye{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ye||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 Ye(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 Ye(l,h,c)}else if(e==="pastel"){const l=8*r()+86,h=17*r()+9,c=360*r();return new Ye(l,h,c,"lch")}else if(e==="dark"){const l=10+10*r(),h=50*r()+86,c=360*r();return new Ye(l,h,c,"lch")}else if(e==="rgb"){const l=255*r(),h=255*r(),c=255*r();return new Ye(l,h,c)}else if(e==="lab"){const l=100*r(),h=256*r()-128,c=256*r()-128;return new Ye(l,h,c,"lab")}else if(e==="grey"){const l=255*r();return new Ye(l,l,l)}else throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(Gl.test(e)||ql.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 Ye(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 Ye(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 Ye(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=w3(e,t);Object.assign(this,d)}else if(typeof e=="string")if(ql.test(e)){const d=e.replace(n3,""),[f,m,v]=e3.exec(d).slice(1,4).map(g=>parseInt(g));Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else if(Gl.test(e)){const d=g=>parseInt(g,16),[,f,m,v]=Ju.exec(x3(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 Ye(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 Ye(e,r,s,"lch")}rgb(){if(this.space==="rgb")return this;if(b3(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:O,h:B}=this,H=Math.PI/180;v=O*Math.cos(H*B),g=O*Math.sin(H*B)}const x=(m+16)/116,b=v/500+x,M=x-g/200,E=16/116,C=.008856,N=7.787;e=.95047*(b**3>C?b**3:(b-E)/N),t=1*(x**3>C?x**3:(x-E)/N),n=1.08883*(M**3>C?M**3:(M-E)/N)}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 Ye(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 Ye(n,n,n);const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r,a=255*fo(s,r,e+1/3),o=255*fo(s,r,e),l=255*fo(s,r,e-1/3);return new Ye(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 Ye(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(y3);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(b=>b/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 Ye(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 vt{constructor(...e){this.init(...e)}clone(){return new vt(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){pe.isMatrixLike(e)||(e=new pe(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 k3(i,e){return new vt(i,e).transformO(this.screenCTM().inverseO())}function Nr(i,e,t){return Math.abs(e-i)<1e-6}class pe{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 vt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),f=d.x,m=d.y,v=new vt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),g=v.x,x=v.y,b=new vt(e.translate||e.tx||e.translateX,e.ty||e.translateY),M=b.x,E=b.y,C=new vt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),N=C.x,O=C.y;return{scaleX:o,scaleY:l,skewX:s,skewY:a,shear:h,theta:c,rx:N,ry:O,tx:M,ty:E,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 pe(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,b=s*d/(x*n-r)||a*d/(x*r+n),M=o-e+e*v*d+t*(x*v*d-g*b),E=l-t+e*g*d+t*(x*g*d+v*b);return{scaleX:d,scaleY:b,shear:x,rotate:m,translateX:M,translateY:E,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 pe(e);return Nr(this.a,t.a)&&Nr(this.b,t.b)&&Nr(this.c,t.c)&&Nr(this.d,t.d)&&Nr(this.e,t.e)&&Nr(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=pe.fromArray([1,0,0,1,0,0]);return e=e instanceof qi?e.matrixify():typeof e=="string"?pe.fromArray(e.split(fn).map(parseFloat)):Array.isArray(e)?pe.fromArray(e):typeof e=="object"&&pe.isMatrixLike(e)?e:typeof e=="object"?new pe().transform(e):arguments.length===6?pe.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 pe?e:new pe(e);return pe.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof pe?e:new pe(e);return pe.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=co(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=co(e),t=co(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(pe.isMatrixLike(e))return new pe(e).multiplyO(this);const t=pe.formatTransforms(e),n=this,{x:r,y:s}=new vt(t.ox,t.oy).transform(n),a=new pe().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 vt(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 T3(){return new pe(this.node.getCTM())}function E3(){if(typeof this.isRoot=="function"&&!this.isRoot()){const i=this.rect(1,1),e=i.node.getScreenCTM();return i.remove(),new pe(e)}return new pe(this.node.getScreenCTM())}Oe(pe,"Matrix");function Mn(){if(!Mn.nodes){const i=Wt().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=He.document.body||He.document.documentElement;Mn.nodes.svg.addTo(i)}return Mn.nodes}function $c(i){return!i.width&&!i.height&&!i.x&&!i.y}function M3(i){return i===He.document||(He.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===He.document}).call(He.document.documentElement,i)}class Ut{constructor(...e){this.init(...e)}addOffset(){return this.x+=He.window.pageXOffset,this.y+=He.window.pageYOffset,new Ut(this)}init(e){const t=[0,0,0,0];return e=typeof e=="string"?e.split(fn).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 $c(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 Ut(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 pe||(e=new pe(e));let t=1/0,n=-1/0,r=1/0,s=-1/0;return[new vt(this.x,this.y),new vt(this.x2,this.y),new vt(this.x,this.y2),new vt(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 Ut(t,r,n-t,s-r)}}function Gc(i,e,t){let n;try{if(n=e(i.node),$c(n)&&!M3(i.node))throw new Error("Element not in the dom")}catch{n=t(i)}return n}function S3(){const t=Gc(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 Ut(t)}function z3(i){const n=Gc(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),r=new Ut(n);return i?r.transform(i.screenCTM().inverseO()):r.addOffset()}function C3(i,e){const t=this.bbox();return i>t.x&&e>t.y&&i<t.x+t.width&&e<t.y+t.height}Se({viewbox:{viewbox(i,e,t,n){return i==null?new Ut(this.attr("viewBox")):this.attr("viewBox",new Ut(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 vt(t/2/s+r.x,n/2/a+r.y);const h=new Ut(r).transform(new pe({scale:l,origin:e}));return this.viewbox(h)}}});Oe(Ut,"Box");class ir extends Array{constructor(e=[],...t){if(super(e,...t),typeof e=="number")return this;this.length=0,this.push(...e)}}Ae([ir],{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 N3=["toArray","constructor","each"];ir.extend=function(i){i=i.reduce((e,t)=>(N3.includes(t)||t[0]==="_"||(e[t]=function(...n){return this.each(t,...n)}),e),{}),Ae([ir],i)};function Xr(i,e){return new ir(j0((e||He.document).querySelectorAll(i),function(t){return Mi(t)}))}function L3(i){return Xr(i,this.node)}function A3(i){return Mi(this.node.querySelector(i))}let _3=0;const qc={};function Wc(i){let e=i.getEventHolder();return e===He.window&&(e=qc),e.events||(e.events={}),e.events}function el(i){return i.getEventTarget()}function R3(i){let e=i.getEventHolder();e===He.window&&(e=qc),e.events&&(e.events={})}function Jo(i,e,t,n,r){const s=t.bind(n||i),a=Wt(i),o=Wc(a),l=el(a);e=Array.isArray(e)?e:e.split(fn),t._svgjsListenerId||(t._svgjsListenerId=++_3),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 Dr(i,e,t,n){const r=Wt(i),s=Wc(r),a=el(r);typeof t=="function"&&(t=t._svgjsListenerId,!t)||(e=Array.isArray(e)?e:(e||"").split(fn),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])Dr(a,[l,h].join("."),d);delete s[l][h]}}else if(h)for(o in s)for(c in s[o])h===c&&Dr(a,[o,h].join("."));else if(l){if(s[l]){for(c in s[l])Dr(a,[l,c].join("."));delete s[l]}}else{for(o in s)Dr(a,o);R3(r)}}))}function D3(i,e,t,n){const r=el(i);return e instanceof He.window.Event||(e=new He.window.CustomEvent(e,{detail:t,cancelable:!0,...n})),r.dispatchEvent(e),e}class Os extends Z0{addEventListener(){}dispatch(e,t,n){return D3(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 Dr(this,e,t,n),this}on(e,t,n,r){return Jo(this,e,t,n,r),this}removeEventListener(){}}Oe(Os,"EventTarget");function Xl(){}const ys={duration:400,ease:">",delay:0},I3={"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 $r 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(fn).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 ke{constructor(...e){this.init(...e)}convert(e){return new ke(this.value,e)}divide(e){return e=new ke(e),new ke(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(Uc),t&&(this.value=parseFloat(t[1]),t[5]==="%"?this.value/=100:t[5]==="s"&&(this.value*=1e3),this.unit=t[5])):e instanceof ke&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new ke(e),new ke(this-e,this.unit||e.unit)}plus(e){return e=new ke(e),new ke(this+e,this.unit||e.unit)}times(e){return e=new ke(e),new ke(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 Yc=[];function O3(i){Yc.push(i)}function B3(i,e,t){if(i==null){i={},e=this.node.attributes;for(const n of e)i[n.nodeName]=Yl.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?I3[i]:Yl.test(e)?parseFloat(e):e;e=Yc.reduce((n,r)=>r(i,n,this),e),typeof e=="number"?e=new ke(e):Ye.isColor(e)?e=new Ye(e):e.constructor===Array&&(e=new $r(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 Os{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=Wt(e),e.removeNamespace&&this.node instanceof He.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 Wt(e).put(this,t)}children(){return new ir(j0(this.node.children,function(e){return Mi(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=Hc(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(Ss(e),t))}first(){return Mi(this.node.firstChild)}get(e){return Mi(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,Bu)}id(e){return typeof e>"u"&&!this.node.id&&(this.node.id=Fc(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Mi(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=Mi(t.node.parentNode),!e)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=Mi(t.node.parentNode));return t}put(e,t){return e=Wt(e),this.add(e,t),e}putIn(e,t){return Wt(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=Wt(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,K0)}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=Mi(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=Ss("wrapper",n),s=He.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:B3,find:L3,findOne:A3});Oe(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 ke(e).plus(this.x()))}dy(e=0){return this.y(new ke(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=Wt(e));const n=new ir;let r=this;for(;(r=r.parent())&&r.node!==He.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(t3);return t?Wt(t[1]):null}root(){const e=this.parent(Fu(Q0));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Yr(this,e,t);return this.width(new ke(n.width)).height(new ke(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:S3,rbox:z3,inside:C3,point:k3,ctm:T3,screenCTM:E3});Oe(qi,"Element");const ds={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 Ye||Ye.isRgb(n)||n instanceof qi)this.attr(i,n);else for(t=ds[i].length-1;t>=0;t--)n[ds[i][t]]!=null&&this.attr(ds.prefix(i,ds[i][t]),n[ds[i][t]]);return this},Se(["Element","Runner"],e)});Se(["Element","Runner"],{matrix:function(i,e,t,n,r,s){return i==null?new pe(this):this.attr("transform",new pe(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)}});Se("radius",{radius:function(i,e=i){return(this._element||this).type==="radialGradient"?this.attr("r",new ke(i)):this.rx(i).ry(e)}});Se("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(i){return new vt(this.node.getPointAtLength(i))}});Se(["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 P3=["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},{});Se("Element",P3);function F3(){return this.attr("transform",null)}function H3(){return(this.attr("transform")||"").split(i3).slice(0,-1).map(function(e){const t=e.trim().split("(");return[t[0],t[1].split(fn).map(function(n){return parseFloat(n)})]}).reverse().reduce(function(e,t){return t[0]==="matrix"?e.lmultiply(pe.fromArray(t[1])):e[t[0]].apply(e,t[1])},new pe)}function U3(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 $3(i){return this.toParent(this.root(),i)}function G3(i,e){if(i==null||typeof i=="string"){const r=new pe(this).decompose();return i==null?r:r[i]}pe.isMatrixLike(i)||(i={...i,origin:Qo(i,this)});const t=e===!0?this:e||!1,n=new pe(t).transform(i);return this.attr("transform",n)}Se("Element",{untransform:F3,matrixify:H3,toParent:U3,toRoot:$3,transform:G3});class si extends qi{flatten(e=this,t){return this.each(function(){if(this instanceof si)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()}}Oe(si,"Container");class tl extends si{constructor(e,t=e){super(et("defs",e),t)}flatten(){return this}ungroup(){return this}}Oe(tl,"Defs");let vi=class extends qi{};Oe(vi,"Shape");function il(i){return this.attr("rx",i)}function nl(i){return this.attr("ry",i)}function Xc(i){return i==null?this.cx()-this.rx():this.cx(i+this.rx())}function Vc(i){return i==null?this.cy()-this.ry():this.cy(i+this.ry())}function jc(i){return this.attr("cx",i)}function Kc(i){return this.attr("cy",i)}function Zc(i){return i==null?this.rx()*2:this.rx(new ke(i).divide(2))}function Qc(i){return i==null?this.ry()*2:this.ry(new ke(i).divide(2))}var q3={__proto__:null,rx:il,ry:nl,x:Xc,y:Vc,cx:jc,cy:Kc,width:Zc,height:Qc};class Oa extends vi{constructor(e,t=e){super(et("ellipse",e),t)}size(e,t){const n=Yr(this,e,t);return this.rx(new ke(n.width).divide(2)).ry(new ke(n.height).divide(2))}}Ae(Oa,q3);Se("Container",{ellipse:Je(function(i=0,e=i){return this.put(new Oa).size(i,e).move(0,0)})});Oe(Oa,"Ellipse");class Jc extends zn{constructor(e=He.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(Ss("wrapper",n));return r.add(this.node.cloneNode(!0)),r.xml(!1,n)}return super.xml(e,!1,n)}}Oe(Jc,"Fragment");function ed(i,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new ke(i),fy:new ke(e)}):this.attr({x1:new ke(i),y1:new ke(e)})}function td(i,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new ke(i),cy:new ke(e)}):this.attr({x2:new ke(i),y2:new ke(e)})}var W3={__proto__:null,from:ed,to:td};class Bs extends si{constructor(e,t){super(et(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 Ut}targets(){return Xr("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(Bs,W3);Se({Container:{gradient(...i){return this.defs().gradient(...i)}},Defs:{gradient:Je(function(i,e){return this.put(new Bs(i)).update(e)})}});Oe(Bs,"Gradient");class zs extends si{constructor(e,t=e){super(et("pattern",e),t)}attr(e,t,n){return e==="transform"&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new Ut}targets(){return Xr("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()+")"}}Se({Container:{pattern(...i){return this.defs().pattern(...i)}},Defs:{pattern:Je(function(i,e,t){return this.put(new zs).update(t).attr({x:0,y:0,width:i,height:e,patternUnits:"userSpaceOnUse"})})}});Oe(zs,"Pattern");let sr=class extends vi{constructor(e,t=e){super(et("image",e),t)}load(e,t){if(!e)return this;const n=new He.window.Image;return Jo(n,"load",function(r){const s=this.parent(zs);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof zs&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof t=="function"&&t.call(this,r)},this),Jo(n,"load error",function(){Dr(n)}),this.attr("href",n.src=e,Is)}};O3(function(i,e,t){return(i==="fill"||i==="stroke")&&r3.test(e)&&(e=t.root().defs().image(e)),e instanceof sr&&(e=t.root().defs().pattern(0,0,n=>{n.add(e)})),e});Se({Container:{image:Je(function(i,e){return this.put(new sr).size(0,0).load(i,e)})}});Oe(sr,"Image");class Cn extends $r{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 Ut(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(fn).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){pe.isMatrixLike(e)||(e=new pe(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 Y3=Cn;function X3(i){return i==null?this.bbox().x:this.move(i,this.bbox().y)}function V3(i){return i==null?this.bbox().y:this.move(this.bbox().x,i)}function j3(i){const e=this.bbox();return i==null?e.width:this.size(i,e.height)}function K3(i){const e=this.bbox();return i==null?e.height:this.size(e.width,i)}var rl={__proto__:null,MorphArray:Y3,x:X3,y:V3,width:j3,height:K3};class Cs extends vi{constructor(e,t=e){super(et("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=Yr(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}}Ae(Cs,rl);Se({Container:{line:Je(function(...i){return Cs.prototype.plot.apply(this.put(new Cs),i[0]!=null?i:[0,0,0,0])})}});Oe(Cs,"Line");class Ta extends si{constructor(e,t=e){super(et("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)}}Se({Container:{marker(...i){return this.defs().marker(...i)}},Defs:{marker:Je(function(i,e,t){return this.put(new Ta).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 Ta?arguments[1]:this.defs().marker(e,t,n),this.attr(r,i)}}});Oe(Ta,"Marker");function Ir(i,e){return function(t){return t==null?this[i]:(this[i]=t,e&&e.call(this),this)}}const Z3={"-":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 sl{done(){return!1}}class e0 extends sl{constructor(e=ys.ease){super(),this.ease=Z3[e]||e}step(e,t,n){return typeof e!="number"?n<1?e:t:e+(t-e)*this.ease(n)}}class Ea extends sl{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function Vl(){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 Q3 extends Ea{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(Q3,{duration:Ir("_duration",Vl),overshoot:Ir("_overshoot",Vl)});class J3 extends Ea{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(J3,{windup:Ir("_windup"),p:Ir("P"),i:Ir("I"),d:Ir("D")});const ef={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},t0={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]]}},po="mlhvqtcsaz".split("");for(let i=0,e=po.length;i<e;++i)t0[po[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 t0[t](n,r,s)}})(po[i].toUpperCase());function tf(i){const e=i.segment[0];return t0[e](i.segment.slice(1),i.p,i.p0)}function i0(i){return i.segment.length&&i.segment.length-1===ef[i.segment[0].toUpperCase()]}function nf(i,e){i.inNumber&&Yn(i,!1);const t=J0.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 Yn(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,i0(i)&&n0(i)}function n0(i){i.inSegment=!1,i.absolute&&(i.segment=tf(i)),i.segments.push(i.segment)}function rf(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 sf(i){return i.lastToken.toUpperCase()==="E"}function af(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 vt,p:new vt};for(;r.lastToken=n,n=i.charAt(t++);)if(!(!r.inSegment&&nf(r,n))){if(n==="."){if(r.pointSeen||r.hasExponent){Yn(r,!1),--t;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=n;continue}if(!isNaN(parseInt(n))){if(r.number==="0"||rf(r)){r.inNumber=!0,r.number=n,Yn(r,!0);continue}r.inNumber=!0,r.number+=n;continue}if(n===" "||n===","){r.inNumber&&Yn(r,!1);continue}if(n==="-"){if(r.inNumber&&!sf(r)){Yn(r,!1),--t;continue}r.number+=n,r.inNumber=!0;continue}if(n.toUpperCase()==="E"){r.number+=n,r.hasExponent=!0;continue}if(J0.test(n)){if(r.inNumber)Yn(r,!1);else if(i0(r))n0(r);else throw new Error("parser Error");--t}}return r.inNumber&&Yn(r,!1),r.inSegment&&i0(r)&&n0(r),r.segments}function of(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 nr extends $r{bbox(){return Mn().path.setAttribute("d",this.toString()),new Ut(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()),af(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 of(this)}}const id=i=>{const e=typeof i;return e==="number"?ke:e==="string"?Ye.isColor(i)?Ye:fn.test(i)?J0.test(i)?nr:$r:Uc.test(i)?ke:r0:al.indexOf(i.constructor)>-1?i.constructor:Array.isArray(i)?$r:e==="object"?Ns:r0};class Xn{constructor(e){this._stepper=e||new e0("-"),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(id(e));let t=new this._type(e);return this._type===Ye&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===Ns&&(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 r0{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 Ps{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,Ps.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Ps.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const lf=(i,e)=>i[0]<e[0]?-1:i[0]>e[0]?1:0;class Ns{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]===Ye&&e[n+7]!==t[n+7]){const o=e[n+7],l=new Ye(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=id(e[n]),s=new r(e[n]).toArray();t.push([n,r,s.length,...s])}return t.sort(lf),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 al=[r0,Ps,Ns];function hf(i=[]){al.push(...[].concat(i))}function cf(){Ae(al,{to(i){return new Xn().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 ar extends vi{constructor(e,t=e){super(et("path",e),t)}array(){return this._array||(this._array=new nr(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 nr(e))}size(e,t){const n=Yr(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)}}ar.prototype.MorphArray=nr;Se({Container:{path:Je(function(i){return this.put(new ar).plot(i||new nr)})}});Oe(ar,"Path");function df(){return this._array||(this._array=new Cn(this.attr("points")))}function uf(){return delete this._array,this}function ff(i,e){return this.attr("points",this.array().move(i,e))}function pf(i){return i==null?this.array():this.clear().attr("points",typeof i=="string"?i:this._array=new Cn(i))}function mf(i,e){const t=Yr(this,i,e);return this.attr("points",this.array().size(t.width,t.height))}var nd={__proto__:null,array:df,clear:uf,move:ff,plot:pf,size:mf};class or extends vi{constructor(e,t=e){super(et("polygon",e),t)}}Se({Container:{polygon:Je(function(i){return this.put(new or).plot(i||new Cn)})}});Ae(or,rl);Ae(or,nd);Oe(or,"Polygon");class Fs extends vi{constructor(e,t=e){super(et("polyline",e),t)}}Se({Container:{polyline:Je(function(i){return this.put(new Fs).plot(i||new Cn)})}});Ae(Fs,rl);Ae(Fs,nd);Oe(Fs,"Polyline");class mi extends vi{constructor(e,t=e){super(et("rect",e),t)}}Ae(mi,{rx:il,ry:nl});Se({Container:{rect:Je(function(i,e){return this.put(new mi).size(i,e)})}});Oe(mi,"Rect");class mo{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 qe={nextDraw:null,frames:new mo,timeouts:new mo,immediates:new mo,timer:()=>He.window.performance||He.window.Date,transforms:[],frame(i){const e=qe.frames.push({run:i});return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),e},timeout(i,e){e=e||0;const t=qe.timer().now()+e,n=qe.timeouts.push({run:i,time:t});return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),n},immediate(i){const e=qe.immediates.push(i);return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),e},cancelFrame(i){i!=null&&qe.frames.remove(i)},clearTimeout(i){i!=null&&qe.timeouts.remove(i)},cancelImmediate(i){i!=null&&qe.immediates.remove(i)},_draw(i){let e=null;const t=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(i>=e.time?e.run():qe.timeouts.push(e),e!==t););let n=null;const r=qe.frames.last();for(;n!==r&&(n=qe.frames.shift());)n.run(i);let s=null;for(;s=qe.immediates.shift();)s();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?He.window.requestAnimationFrame(qe._draw):null}},gf=function(i){const e=i.start,t=i.runner.duration(),n=e+t;return{start:e,duration:t,end:n,runner:i.runner}},vf=function(){const i=He.window;return(i.performance||i.Date).now()};let rd=class extends Os{constructor(e=vf){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(gf);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 qe.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():this._paused?this:(this._nextFrame=qe.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}};Se({Element:{timeline:function(i){return i==null?(this._timeline=this._timeline||new rd,this._timeline):(this._timeline=i,this)}}});class fi extends Os{constructor(e){super(),this.id=fi.id++,e=e??ys.duration,e=typeof e=="function"?new Ea(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Ea,this._stepper=this._isDeclarative?e:new e0,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new pe,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||ys.duration,t=t||ys.delay,n=n||"last",typeof e=="object"&&!(e instanceof sl)&&(t=e.delay||t,n=e.when||n,s=e.swing||s,r=e.times||r,a=e.wait||a,e=e.duration||ys.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=fi.sanitise(e,t,n),s=new fi(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 pe,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 e0(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,b=Math.pow(-1,x)*(v%(r+n))/n+x;return Math.max(Math.min(b,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||Xl,runner:t||Xl,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 rd||(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 pe,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}}fi.id=0;class Ma{constructor(e=new pe,t=-1,n=!0){this.transforms=e,this.id=t,this.done=n}clearTransformsFromQueue(){}}Ae([fi,Ma],{mergeWith(i){return new Ma(i.transforms.lmultiply(this.transforms),i.id)}});const sd=(i,e)=>i.lmultiplyO(e),ad=i=>i.transforms;function xf(){const e=this._transformationRunners.runners.map(ad).reduce(sd,new pe);this.transform(e),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class yf{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 Ma).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}}Se({Element:{animate(i,e,t){const n=fi.sanitise(i,e,t),r=this.timeline();return new fi(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(ad).reduce(sd,new pe)},_addRunner(i){this._transformationRunners.add(i),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(xf.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new yf().add(new Ma(new pe(this))))}}});const wf=(i,e)=>i.filter(t=>!e.includes(t));Ae(fi,{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 Xn(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=wf(o,s);if(l.length){const c=this.element()[i](l),d=new Ns(r.from()).valueOf();Object.assign(d,c),r.from(d)}const h=new Ns(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 Xn(this._stepper).to(new ke(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=pe.isMatrixLike(i);t=i.affine!=null?i.affine:t??!n;const r=new Xn(this._stepper).type(t?Ps:pe);let s,a,o,l,h;function c(){a=a||this.element(),s=s||Qo(i,a),h=new pe(e?void 0:a),a._addRunner(this),e||a._clearTransformRunnersBefore(this)}function d(m){e||this.clearTransform();const{x:v,y:g}=new vt(s).transform(a._currentTransform(this));let x=new pe({...i,origin:[v,g]}),b=this._isDeclarative&&o?o:h;if(t){x=x.decompose(v,g),b=b.decompose(v,g);const E=x.rotate,C=b.rotate,N=[E-360,E,E+360],O=N.map(W=>Math.abs(W-C)),B=Math.min(...O),H=O.indexOf(B);x.rotate=N[H]}e&&(n||(x.rotate=i.rotate||0),this._isDeclarative&&l&&(b.rotate=l)),r.from(b),r.to(x);const M=r.at(m);return l=M.rotate,o=new pe(M),this.addTransform(o),a._addRunner(this),r.done()}function f(m){(m.origin||"center").toString()!==(i.origin||"center").toString()&&(s=Qo(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 ke(e),this._tryRetarget(i,e))return this;const t=new Xn(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 ke(r))}),this._rememberMorpher(i,t),this},_queueObject(i,e){if(this._tryRetarget(i,e))return this;const t=new Xn(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 ke(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 Xn(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 Ut(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(fi,{rx:il,ry:nl,from:ed,to:td});Oe(fi,"Runner");class ol extends si{constructor(e,t=e){super(et("svg",e),t),this.namespace()}defs(){return this.isRoot()?Mi(this.node.querySelector("defs"))||this.put(new tl):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof He.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:K0,version:"1.1"}).attr("xmlns:xlink",Is,js).attr("xmlns:svgjs",Pu,js):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,js).attr("xmlns:svgjs",null,js)}root(){return this.isRoot()?this:super.root()}}Se({Container:{nested:Je(function(){return this.put(new ol)})}});Oe(ol,"Svg",!0);let ll=class extends si{constructor(e,t=e){super(et("symbol",e),t)}};Se({Container:{symbol:Je(function(){return this.put(new ll)})}});Oe(ll,"Symbol");function bf(i){return this._build===!1&&this.clear(),this.node.appendChild(He.document.createTextNode(i)),this}function kf(){return this.node.getComputedTextLength()}function Tf(i,e=this.bbox()){return i==null?e.x:this.attr("x",this.attr("x")+i-e.x)}function Ef(i,e=this.bbox()){return i==null?e.y:this.attr("y",this.attr("y")+i-e.y)}function Mf(i,e,t=this.bbox()){return this.x(i,t).y(e,t)}function Sf(i,e=this.bbox()){return i==null?e.cx:this.attr("x",this.attr("x")+i-e.cx)}function zf(i,e=this.bbox()){return i==null?e.cy:this.attr("y",this.attr("y")+i-e.cy)}function Cf(i,e,t=this.bbox()){return this.cx(i,t).cy(e,t)}function Nf(i){return this.attr("x",i)}function Lf(i){return this.attr("y",i)}function Af(i,e){return this.ax(i).ay(e)}function _f(i){return this._build=!!i,this}var od={__proto__:null,plain:bf,length:kf,x:Tf,y:Ef,move:Mf,cx:Sf,cy:zf,center:Cf,ax:Nf,ay:Lf,amove:Af,build:_f};class _t extends vi{constructor(e,t=e){super(et("text",e),t),this.dom.leading=new ke(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new ke(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=He.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=r*new ke(a);this.dom.newLined&&(this.attr("x",t.attr("x")),this.text()===`
|
|
196
|
-
`?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
|
|
195
|
+
`,pu=["img","br","hr","input","link","meta","area"],wa=1.2,mu=["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color","textAlign"];class gu{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===R.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(R.DIR.LEFT)||t.includes(R.DIR.RIGHT))&&(t=t.filter(x=>![R.DIR.LEFT,R.DIR.RIGHT].includes(x))),!0){case t.includes(R.DIR.UP):h?this.enlarge(v,g,r):this.narrow(v,g,r);break;case t.includes(R.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(R.DIR.DOWN)&&(g=-m),t.includes(R.DIR.UP)&&(g=m),t.includes(R.DIR.LEFT)&&(v=f),t.includes(R.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 M=0;h>f?(M=c,v=2):(M=d*h,v=3),m=M/o}this.setScale(m);const g=e()||r.rbox();g.x-=this.mindMap.elRect.left,g.y-=this.mindMap.elRect.top;let x=0,b=0;v===1?(x=-g.x+n+(c-g.width)/2,b=-g.y+n+(d-g.height)/2):v===2?(x=-g.x+n,b=-g.y+n+(d-g.height)/2):v===3&&(x=-g.x+n+(c-g.width)/2,b=-g.y+n),this.translateXY(x,b)}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 o7=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ho={exports:{}},Hl;function xu(){return Hl||(Hl=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],b=arguments.length,M,E;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),b){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(E=1,M=new Array(b-1);E<b;E++)M[E-1]=arguments[E];x.fn.apply(x.context,M)}else{var C=x.length,N;for(E=0;E<C;E++)switch(x[E].once&&this.removeListener(h,x[E].fn,void 0,!0),b){case 1:x[E].fn.call(x[E].context);break;case 2:x[E].fn.call(x[E].context,c);break;case 3:x[E].fn.call(x[E].context,c,d);break;case 4:x[E].fn.call(x[E].context,c,d,f);break;default:if(!M)for(N=1,M=new Array(b-1);N<b;N++)M[N-1]=arguments[N];x[E].fn.apply(x[E].context,M)}}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=[],b=v.length;g<b;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})(ho)),ho.exports}var yu=xu();const wu=vu(yu);let bu=class extends wu{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(R.DIR.UP),e.deltaY>0&&t.push(R.DIR.DOWN),e.deltaX<0&&t.push(R.DIR.LEFT),e.deltaX>0&&t.push(R.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 ba=function(e){return ku(e)&&!Tu(e)};function ku(i){return!!i&&typeof i=="object"}function Tu(i){var e=Object.prototype.toString.call(i);return e==="[object RegExp]"||e==="[object Date]"||Su(i)}var Eu=typeof Symbol=="function"&&Symbol.for,Mu=Eu?Symbol.for("react.element"):60103;function Su(i){return i.$$typeof===Mu}function zu(i){return Array.isArray(i)?[]:{}}function Ms(i,e){var t=e&&e.clone===!0;return t&&ba(i)?Ur(zu(i),i,e):i}function Ul(i,e,t){var n=i.slice();return e.forEach(function(r,s){typeof n[s]>"u"?n[s]=Ms(r,t):ba(r)?n[s]=Ur(i[s],r,t):i.indexOf(r)===-1&&n.push(Ms(r,t))}),n}function Cu(i,e,t){var n={};return ba(i)&&Object.keys(i).forEach(function(r){n[r]=Ms(i[r],t)}),Object.keys(e).forEach(function(r){!ba(e[r])||!i[r]?n[r]=Ms(e[r],t):n[r]=Ur(i[r],e[r],t)}),n}function Ur(i,e,t){var n=Array.isArray(e),r=Array.isArray(i),s=t||{arrayMerge:Ul},a=n===r;if(a)if(n){var o=s.arrayMerge||Ul;return o(i,e,t)}else return Cu(i,e,t);else return Ms(e,t)}Ur.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 Ur(n,r,t)})};var ka=Ur;let Xs;const Nu=new Uint8Array(16);function Lu(){if(!Xs&&(Xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xs(Nu)}const Dt=[];for(let i=0;i<256;++i)Dt.push((i+256).toString(16).slice(1));function Au(i,e=0){return Dt[i[e+0]]+Dt[i[e+1]]+Dt[i[e+2]]+Dt[i[e+3]]+"-"+Dt[i[e+4]]+Dt[i[e+5]]+"-"+Dt[i[e+6]]+Dt[i[e+7]]+"-"+Dt[i[e+8]]+Dt[i[e+9]]+"-"+Dt[i[e+10]]+Dt[i[e+11]]+Dt[i[e+12]]+Dt[i[e+13]]+Dt[i[e+14]]+Dt[i[e+15]]}const _u=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$l={randomUUID:_u};function Ru(i,e,t){if($l.randomUUID&&!i)return $l.randomUUID();i=i||{};const n=i.random||(i.rng||Lu)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Au(n)}function V0(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)}V0.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};V0.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 Zo={},Oc=[];function Me(i,e){if(Array.isArray(i)){for(const t of i)Me(t,e);return}if(typeof i=="object"){for(const t in i)Me(t,i[t]);return}Bc(Object.getOwnPropertyNames(e)),Zo[i]=Object.assign(Zo[i]||{},e)}function ri(i){return Zo[i]||{}}function Du(){return[...new Set(Oc)]}function Bc(i){Oc.push(...i)}function j0(i,e){let t;const n=i.length,r=[];for(t=0;t<n;t++)r.push(e(i[t]));return r}function Iu(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 co(i){return i%360*Math.PI/180}function Vs(i){return i.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Ou(i){return i.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()})}function Pc(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Yr(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 Qo(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 K0="http://www.w3.org/2000/svg",Bu="http://www.w3.org/1999/xhtml",js="http://www.w3.org/2000/xmlns/",Is="http://www.w3.org/1999/xlink",Pu="http://svgjs.dev/svgjs",He={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};let Z0=class{};const ir={},Q0="___SYMBOL___ROOT___";function Ss(i,e=K0){return He.document.createElementNS(e,i)}function Yt(i,e=!1){if(i instanceof Z0)return i;if(typeof i=="object")return uo(i);if(i==null)return new ir[Q0];if(typeof i=="string"&&i.charAt(0)!=="<")return uo(He.document.querySelector(i));const t=e?He.document.createElement("div"):Ss("svg");return t.innerHTML=i,i=uo(t.firstChild),t.removeChild(t.firstChild),i}function et(i,e){return e&&e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node?e:Ss(i)}function Si(i){if(!i)return null;if(i.instance instanceof Z0)return i.instance;if(i.nodeName==="#document-fragment")return new ir.Fragment(i);let e=Pc(i.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":ir[e]||(e="Dom"),new ir[e](i)}let uo=Si;function Be(i,e=i.name,t=!1){return ir[e]=i,t&&(ir[Q0]=i),Bc(Object.getOwnPropertyNames(i.prototype)),i}function Fu(i){return ir[i]}let Hu=1e3;function Fc(i){return"Svgjs"+Pc(i)+Hu++}function Hc(i){for(let e=i.children.length-1;e>=0;e--)Hc(i.children[e]);return i.id&&(i.id=Fc(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 Je(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 Uu(){return this.parent().children()}function $u(){return this.parent().index(this)}function Gu(){return this.siblings()[this.position()+1]}function qu(){return this.siblings()[this.position()-1]}function Wu(){const i=this.position();return this.parent().add(this.remove(),i+1),this}function Yu(){const i=this.position();return this.parent().add(this.remove(),i?i-1:0),this}function Xu(){return this.parent().add(this.remove()),this}function Vu(){return this.parent().add(this.remove(),0),this}function ju(i){i=Yt(i),i.remove();const e=this.position();return this.parent().add(i,e),this}function Ku(i){i=Yt(i),i.remove();const e=this.position();return this.parent().add(i,e+1),this}function Zu(i){return i=Yt(i),i.before(this),this}function Qu(i){return i=Yt(i),i.after(this),this}Me("Dom",{siblings:Uu,position:$u,next:Gu,prev:qu,forward:Wu,backward:Yu,front:Xu,back:Vu,before:ju,after:Ku,insertBefore:Zu,insertAfter:Qu});const Uc=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ju=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,e3=/rgb\((\d+),(\d+),(\d+)\)/,t3=/(#[a-z_][a-z0-9\-_]*)/i,i3=/\)\s*,?\s*/,n3=/\s/g,Gl=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ql=/^rgb\(/,Wl=/^(\s+)?$/,Yl=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,r3=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,fn=/[\s,]+/,J0=/[MLHVCSQTAZ]/i;function s3(){const i=this.attr("class");return i==null?[]:i.trim().split(fn)}function a3(i){return this.classes().indexOf(i)!==-1}function o3(i){if(!this.hasClass(i)){const e=this.classes();e.push(i),this.attr("class",e.join(" "))}return this}function l3(i){return this.hasClass(i)&&this.attr("class",this.classes().filter(function(e){return e!==i}).join(" ")),this}function h3(i){return this.hasClass(i)?this.removeClass(i):this.addClass(i)}Me("Dom",{classes:s3,hasClass:a3,addClass:o3,removeClass:l3,toggleClass:h3});function c3(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=Vs(n);t[n]=this.node.style[r]}return t}if(typeof i=="string")return this.node.style[Vs(i)];if(typeof i=="object")for(const n in i)this.node.style[Vs(n)]=i[n]==null||Wl.test(i[n])?"":i[n]}return arguments.length===2&&(this.node.style[Vs(i)]=e==null||Wl.test(e)?"":e),this}function d3(){return this.css("display","")}function u3(){return this.css("display","none")}function f3(){return this.css("display")!=="none"}Me("Dom",{css:c3,show:d3,hide:u3,visible:f3});function p3(i,e,t){if(i==null)return this.data(j0(Iu(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}Me("Dom",{data:p3});function m3(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 g3(){if(arguments.length===0)this._memory={};else for(let i=arguments.length-1;i>=0;i--)delete this.memory()[arguments[i]];return this}function v3(){return this._memory=this._memory||{}}Me("Dom",{remember:m3,forget:g3,memory:v3});function x3(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 y3(i){const e=Math.round(i),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function Nr(i,e){for(let t=e.length;t--;)if(i[e[t]]==null)return!1;return!0}function w3(i,e){const t=Nr(i,"rgb")?{_a:i.r,_b:i.g,_c:i.b,_d:0,space:"rgb"}:Nr(i,"xyz")?{_a:i.x,_b:i.y,_c:i.z,_d:0,space:"xyz"}:Nr(i,"hsl")?{_a:i.h,_b:i.s,_c:i.l,_d:0,space:"hsl"}:Nr(i,"lab")?{_a:i.l,_b:i.a,_c:i.b,_d:0,space:"lab"}:Nr(i,"lch")?{_a:i.l,_b:i.c,_c:i.h,_d:0,space:"lch"}:Nr(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 b3(i){return i==="lab"||i==="xyz"||i==="lch"}function fo(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 Ye{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ye||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 Ye(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 Ye(l,h,c)}else if(e==="pastel"){const l=8*r()+86,h=17*r()+9,c=360*r();return new Ye(l,h,c,"lch")}else if(e==="dark"){const l=10+10*r(),h=50*r()+86,c=360*r();return new Ye(l,h,c,"lch")}else if(e==="rgb"){const l=255*r(),h=255*r(),c=255*r();return new Ye(l,h,c)}else if(e==="lab"){const l=100*r(),h=256*r()-128,c=256*r()-128;return new Ye(l,h,c,"lab")}else if(e==="grey"){const l=255*r();return new Ye(l,l,l)}else throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(Gl.test(e)||ql.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 Ye(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 Ye(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 Ye(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=w3(e,t);Object.assign(this,d)}else if(typeof e=="string")if(ql.test(e)){const d=e.replace(n3,""),[f,m,v]=e3.exec(d).slice(1,4).map(g=>parseInt(g));Object.assign(this,{_a:f,_b:m,_c:v,_d:0,space:"rgb"})}else if(Gl.test(e)){const d=g=>parseInt(g,16),[,f,m,v]=Ju.exec(x3(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 Ye(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 Ye(e,r,s,"lch")}rgb(){if(this.space==="rgb")return this;if(b3(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:O,h:B}=this,$=Math.PI/180;v=O*Math.cos($*B),g=O*Math.sin($*B)}const x=(m+16)/116,b=v/500+x,M=x-g/200,E=16/116,C=.008856,N=7.787;e=.95047*(b**3>C?b**3:(b-E)/N),t=1*(x**3>C?x**3:(x-E)/N),n=1.08883*(M**3>C?M**3:(M-E)/N)}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 Ye(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 Ye(n,n,n);const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r,a=255*fo(s,r,e+1/3),o=255*fo(s,r,e),l=255*fo(s,r,e-1/3);return new Ye(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 Ye(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(y3);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(b=>b/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 Ye(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 vt{constructor(...e){this.init(...e)}clone(){return new vt(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){me.isMatrixLike(e)||(e=new me(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 k3(i,e){return new vt(i,e).transformO(this.screenCTM().inverseO())}function Lr(i,e,t){return Math.abs(e-i)<1e-6}class me{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 vt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),f=d.x,m=d.y,v=new vt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),g=v.x,x=v.y,b=new vt(e.translate||e.tx||e.translateX,e.ty||e.translateY),M=b.x,E=b.y,C=new vt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),N=C.x,O=C.y;return{scaleX:o,scaleY:l,skewX:s,skewY:a,shear:h,theta:c,rx:N,ry:O,tx:M,ty:E,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 me(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,b=s*d/(x*n-r)||a*d/(x*r+n),M=o-e+e*v*d+t*(x*v*d-g*b),E=l-t+e*g*d+t*(x*g*d+v*b);return{scaleX:d,scaleY:b,shear:x,rotate:m,translateX:M,translateY:E,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 me(e);return Lr(this.a,t.a)&&Lr(this.b,t.b)&&Lr(this.c,t.c)&&Lr(this.d,t.d)&&Lr(this.e,t.e)&&Lr(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=me.fromArray([1,0,0,1,0,0]);return e=e instanceof qi?e.matrixify():typeof e=="string"?me.fromArray(e.split(fn).map(parseFloat)):Array.isArray(e)?me.fromArray(e):typeof e=="object"&&me.isMatrixLike(e)?e:typeof e=="object"?new me().transform(e):arguments.length===6?me.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 me?e:new me(e);return me.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof me?e:new me(e);return me.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=co(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=co(e),t=co(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(me.isMatrixLike(e))return new me(e).multiplyO(this);const t=me.formatTransforms(e),n=this,{x:r,y:s}=new vt(t.ox,t.oy).transform(n),a=new me().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 vt(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 T3(){return new me(this.node.getCTM())}function E3(){if(typeof this.isRoot=="function"&&!this.isRoot()){const i=this.rect(1,1),e=i.node.getScreenCTM();return i.remove(),new me(e)}return new me(this.node.getScreenCTM())}Be(me,"Matrix");function Sn(){if(!Sn.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;Sn.nodes={svg:i,path:e}}if(!Sn.nodes.svg.node.parentNode){const i=He.document.body||He.document.documentElement;Sn.nodes.svg.addTo(i)}return Sn.nodes}function $c(i){return!i.width&&!i.height&&!i.x&&!i.y}function M3(i){return i===He.document||(He.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===He.document}).call(He.document.documentElement,i)}class Ut{constructor(...e){this.init(...e)}addOffset(){return this.x+=He.window.pageXOffset,this.y+=He.window.pageYOffset,new Ut(this)}init(e){const t=[0,0,0,0];return e=typeof e=="string"?e.split(fn).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 $c(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 Ut(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 me||(e=new me(e));let t=1/0,n=-1/0,r=1/0,s=-1/0;return[new vt(this.x,this.y),new vt(this.x2,this.y),new vt(this.x,this.y2),new vt(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 Ut(t,r,n-t,s-r)}}function Gc(i,e,t){let n;try{if(n=e(i.node),$c(n)&&!M3(i.node))throw new Error("Element not in the dom")}catch{n=t(i)}return n}function S3(){const t=Gc(this,r=>r.getBBox(),r=>{try{const s=r.clone().addTo(Sn().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 Ut(t)}function z3(i){const n=Gc(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),r=new Ut(n);return i?r.transform(i.screenCTM().inverseO()):r.addOffset()}function C3(i,e){const t=this.bbox();return i>t.x&&e>t.y&&i<t.x+t.width&&e<t.y+t.height}Me({viewbox:{viewbox(i,e,t,n){return i==null?new Ut(this.attr("viewBox")):this.attr("viewBox",new Ut(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 vt(t/2/s+r.x,n/2/a+r.y);const h=new Ut(r).transform(new me({scale:l,origin:e}));return this.viewbox(h)}}});Be(Ut,"Box");class rr extends Array{constructor(e=[],...t){if(super(e,...t),typeof e=="number")return this;this.length=0,this.push(...e)}}Ae([rr],{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 N3=["toArray","constructor","each"];rr.extend=function(i){i=i.reduce((e,t)=>(N3.includes(t)||t[0]==="_"||(e[t]=function(...n){return this.each(t,...n)}),e),{}),Ae([rr],i)};function Xr(i,e){return new rr(j0((e||He.document).querySelectorAll(i),function(t){return Si(t)}))}function L3(i){return Xr(i,this.node)}function A3(i){return Si(this.node.querySelector(i))}let _3=0;const qc={};function Wc(i){let e=i.getEventHolder();return e===He.window&&(e=qc),e.events||(e.events={}),e.events}function el(i){return i.getEventTarget()}function R3(i){let e=i.getEventHolder();e===He.window&&(e=qc),e.events&&(e.events={})}function Jo(i,e,t,n,r){const s=t.bind(n||i),a=Yt(i),o=Wc(a),l=el(a);e=Array.isArray(e)?e:e.split(fn),t._svgjsListenerId||(t._svgjsListenerId=++_3),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 Dr(i,e,t,n){const r=Yt(i),s=Wc(r),a=el(r);typeof t=="function"&&(t=t._svgjsListenerId,!t)||(e=Array.isArray(e)?e:(e||"").split(fn),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])Dr(a,[l,h].join("."),d);delete s[l][h]}}else if(h)for(o in s)for(c in s[o])h===c&&Dr(a,[o,h].join("."));else if(l){if(s[l]){for(c in s[l])Dr(a,[l,c].join("."));delete s[l]}}else{for(o in s)Dr(a,o);R3(r)}}))}function D3(i,e,t,n){const r=el(i);return e instanceof He.window.Event||(e=new He.window.CustomEvent(e,{detail:t,cancelable:!0,...n})),r.dispatchEvent(e),e}class Os extends Z0{addEventListener(){}dispatch(e,t,n){return D3(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 Dr(this,e,t,n),this}on(e,t,n,r){return Jo(this,e,t,n,r),this}removeEventListener(){}}Be(Os,"EventTarget");function Xl(){}const ys={duration:400,ease:">",delay:0},I3={"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 $r 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(fn).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 be{constructor(...e){this.init(...e)}convert(e){return new be(this.value,e)}divide(e){return e=new be(e),new be(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(Uc),t&&(this.value=parseFloat(t[1]),t[5]==="%"?this.value/=100:t[5]==="s"&&(this.value*=1e3),this.unit=t[5])):e instanceof be&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new be(e),new be(this-e,this.unit||e.unit)}plus(e){return e=new be(e),new be(this+e,this.unit||e.unit)}times(e){return e=new be(e),new be(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 Yc=[];function O3(i){Yc.push(i)}function B3(i,e,t){if(i==null){i={},e=this.node.attributes;for(const n of e)i[n.nodeName]=Yl.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?I3[i]:Yl.test(e)?parseFloat(e):e;e=Yc.reduce((n,r)=>r(i,n,this),e),typeof e=="number"?e=new be(e):Ye.isColor(e)?e=new Ye(e):e.constructor===Array&&(e=new $r(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 Cn extends Os{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 He.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 rr(j0(this.node.children,function(e){return Si(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=Hc(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 Cn(Ss(e),t))}first(){return Si(this.node.firstChild)}get(e){return Si(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,Bu)}id(e){return typeof e>"u"&&!this.node.id&&(this.node.id=Fc(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Si(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=Si(t.node.parentNode),!e)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=Si(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,K0)}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=Si(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=Ss("wrapper",n),s=He.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(Cn,{attr:B3,find:L3,findOne:A3});Be(Cn,"Dom");let qi=class extends Cn{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 be(e).plus(this.x()))}dy(e=0){return this.y(new be(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 rr;let r=this;for(;(r=r.parent())&&r.node!==He.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(t3);return t?Yt(t[1]):null}root(){const e=this.parent(Fu(Q0));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Yr(this,e,t);return this.width(new be(n.width)).height(new be(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:S3,rbox:z3,inside:C3,point:k3,ctm:T3,screenCTM:E3});Be(qi,"Element");const ds={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 Ye||Ye.isRgb(n)||n instanceof qi)this.attr(i,n);else for(t=ds[i].length-1;t>=0;t--)n[ds[i][t]]!=null&&this.attr(ds.prefix(i,ds[i][t]),n[ds[i][t]]);return this},Me(["Element","Runner"],e)});Me(["Element","Runner"],{matrix:function(i,e,t,n,r,s){return i==null?new me(this):this.attr("transform",new me(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)}});Me("radius",{radius:function(i,e=i){return(this._element||this).type==="radialGradient"?this.attr("r",new be(i)):this.rx(i).ry(e)}});Me("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(i){return new vt(this.node.getPointAtLength(i))}});Me(["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 P3=["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},{});Me("Element",P3);function F3(){return this.attr("transform",null)}function H3(){return(this.attr("transform")||"").split(i3).slice(0,-1).map(function(e){const t=e.trim().split("(");return[t[0],t[1].split(fn).map(function(n){return parseFloat(n)})]}).reverse().reduce(function(e,t){return t[0]==="matrix"?e.lmultiply(me.fromArray(t[1])):e[t[0]].apply(e,t[1])},new me)}function U3(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 $3(i){return this.toParent(this.root(),i)}function G3(i,e){if(i==null||typeof i=="string"){const r=new me(this).decompose();return i==null?r:r[i]}me.isMatrixLike(i)||(i={...i,origin:Qo(i,this)});const t=e===!0?this:e||!1,n=new me(t).transform(i);return this.attr("transform",n)}Me("Element",{untransform:F3,matrixify:H3,toParent:U3,toRoot:$3,transform:G3});class si extends qi{flatten(e=this,t){return this.each(function(){if(this instanceof si)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()}}Be(si,"Container");class tl extends si{constructor(e,t=e){super(et("defs",e),t)}flatten(){return this}ungroup(){return this}}Be(tl,"Defs");let vi=class extends qi{};Be(vi,"Shape");function il(i){return this.attr("rx",i)}function nl(i){return this.attr("ry",i)}function Xc(i){return i==null?this.cx()-this.rx():this.cx(i+this.rx())}function Vc(i){return i==null?this.cy()-this.ry():this.cy(i+this.ry())}function jc(i){return this.attr("cx",i)}function Kc(i){return this.attr("cy",i)}function Zc(i){return i==null?this.rx()*2:this.rx(new be(i).divide(2))}function Qc(i){return i==null?this.ry()*2:this.ry(new be(i).divide(2))}var q3={__proto__:null,rx:il,ry:nl,x:Xc,y:Vc,cx:jc,cy:Kc,width:Zc,height:Qc};class Oa extends vi{constructor(e,t=e){super(et("ellipse",e),t)}size(e,t){const n=Yr(this,e,t);return this.rx(new be(n.width).divide(2)).ry(new be(n.height).divide(2))}}Ae(Oa,q3);Me("Container",{ellipse:Je(function(i=0,e=i){return this.put(new Oa).size(i,e).move(0,0)})});Be(Oa,"Ellipse");class Jc extends Cn{constructor(e=He.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 Cn(Ss("wrapper",n));return r.add(this.node.cloneNode(!0)),r.xml(!1,n)}return super.xml(e,!1,n)}}Be(Jc,"Fragment");function ed(i,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new be(i),fy:new be(e)}):this.attr({x1:new be(i),y1:new be(e)})}function td(i,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new be(i),cy:new be(e)}):this.attr({x2:new be(i),y2:new be(e)})}var W3={__proto__:null,from:ed,to:td};class Bs extends si{constructor(e,t){super(et(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 Ut}targets(){return Xr("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(Bs,W3);Me({Container:{gradient(...i){return this.defs().gradient(...i)}},Defs:{gradient:Je(function(i,e){return this.put(new Bs(i)).update(e)})}});Be(Bs,"Gradient");class zs extends si{constructor(e,t=e){super(et("pattern",e),t)}attr(e,t,n){return e==="transform"&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new Ut}targets(){return Xr("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()+")"}}Me({Container:{pattern(...i){return this.defs().pattern(...i)}},Defs:{pattern:Je(function(i,e,t){return this.put(new zs).update(t).attr({x:0,y:0,width:i,height:e,patternUnits:"userSpaceOnUse"})})}});Be(zs,"Pattern");let or=class extends vi{constructor(e,t=e){super(et("image",e),t)}load(e,t){if(!e)return this;const n=new He.window.Image;return Jo(n,"load",function(r){const s=this.parent(zs);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof zs&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof t=="function"&&t.call(this,r)},this),Jo(n,"load error",function(){Dr(n)}),this.attr("href",n.src=e,Is)}};O3(function(i,e,t){return(i==="fill"||i==="stroke")&&r3.test(e)&&(e=t.root().defs().image(e)),e instanceof or&&(e=t.root().defs().pattern(0,0,n=>{n.add(e)})),e});Me({Container:{image:Je(function(i,e){return this.put(new or).size(0,0).load(i,e)})}});Be(or,"Image");class Nn extends $r{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 Ut(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(fn).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){me.isMatrixLike(e)||(e=new me(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 Y3=Nn;function X3(i){return i==null?this.bbox().x:this.move(i,this.bbox().y)}function V3(i){return i==null?this.bbox().y:this.move(this.bbox().x,i)}function j3(i){const e=this.bbox();return i==null?e.width:this.size(i,e.height)}function K3(i){const e=this.bbox();return i==null?e.height:this.size(e.width,i)}var rl={__proto__:null,MorphArray:Y3,x:X3,y:V3,width:j3,height:K3};class Cs extends vi{constructor(e,t=e){super(et("line",e),t)}array(){return new Nn([[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 Nn(e).toLine(),this.attr(e))}size(e,t){const n=Yr(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}}Ae(Cs,rl);Me({Container:{line:Je(function(...i){return Cs.prototype.plot.apply(this.put(new Cs),i[0]!=null?i:[0,0,0,0])})}});Be(Cs,"Line");class Ta extends si{constructor(e,t=e){super(et("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)}}Me({Container:{marker(...i){return this.defs().marker(...i)}},Defs:{marker:Je(function(i,e,t){return this.put(new Ta).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 Ta?arguments[1]:this.defs().marker(e,t,n),this.attr(r,i)}}});Be(Ta,"Marker");function Ir(i,e){return function(t){return t==null?this[i]:(this[i]=t,e&&e.call(this),this)}}const Z3={"-":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 sl{done(){return!1}}class e0 extends sl{constructor(e=ys.ease){super(),this.ease=Z3[e]||e}step(e,t,n){return typeof e!="number"?n<1?e:t:e+(t-e)*this.ease(n)}}class Ea extends sl{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function Vl(){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 Q3 extends Ea{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(Q3,{duration:Ir("_duration",Vl),overshoot:Ir("_overshoot",Vl)});class J3 extends Ea{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(J3,{windup:Ir("_windup"),p:Ir("P"),i:Ir("I"),d:Ir("D")});const ef={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},t0={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]]}},po="mlhvqtcsaz".split("");for(let i=0,e=po.length;i<e;++i)t0[po[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 t0[t](n,r,s)}})(po[i].toUpperCase());function tf(i){const e=i.segment[0];return t0[e](i.segment.slice(1),i.p,i.p0)}function i0(i){return i.segment.length&&i.segment.length-1===ef[i.segment[0].toUpperCase()]}function nf(i,e){i.inNumber&&Vn(i,!1);const t=J0.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 Vn(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,i0(i)&&n0(i)}function n0(i){i.inSegment=!1,i.absolute&&(i.segment=tf(i)),i.segments.push(i.segment)}function rf(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 sf(i){return i.lastToken.toUpperCase()==="E"}function af(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 vt,p:new vt};for(;r.lastToken=n,n=i.charAt(t++);)if(!(!r.inSegment&&nf(r,n))){if(n==="."){if(r.pointSeen||r.hasExponent){Vn(r,!1),--t;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=n;continue}if(!isNaN(parseInt(n))){if(r.number==="0"||rf(r)){r.inNumber=!0,r.number=n,Vn(r,!0);continue}r.inNumber=!0,r.number+=n;continue}if(n===" "||n===","){r.inNumber&&Vn(r,!1);continue}if(n==="-"){if(r.inNumber&&!sf(r)){Vn(r,!1),--t;continue}r.number+=n,r.inNumber=!0;continue}if(n.toUpperCase()==="E"){r.number+=n,r.hasExponent=!0;continue}if(J0.test(n)){if(r.inNumber)Vn(r,!1);else if(i0(r))n0(r);else throw new Error("parser Error");--t}}return r.inNumber&&Vn(r,!1),r.inSegment&&i0(r)&&n0(r),r.segments}function of(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 sr extends $r{bbox(){return Sn().path.setAttribute("d",this.toString()),new Ut(Sn.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()),af(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 of(this)}}const id=i=>{const e=typeof i;return e==="number"?be:e==="string"?Ye.isColor(i)?Ye:fn.test(i)?J0.test(i)?sr:$r:Uc.test(i)?be:r0:al.indexOf(i.constructor)>-1?i.constructor:Array.isArray(i)?$r:e==="object"?Ns:r0};class jn{constructor(e){this._stepper=e||new e0("-"),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(id(e));let t=new this._type(e);return this._type===Ye&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===Ns&&(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 r0{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 Ps{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,Ps.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Ps.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const lf=(i,e)=>i[0]<e[0]?-1:i[0]>e[0]?1:0;class Ns{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]===Ye&&e[n+7]!==t[n+7]){const o=e[n+7],l=new Ye(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=id(e[n]),s=new r(e[n]).toArray();t.push([n,r,s.length,...s])}return t.sort(lf),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 al=[r0,Ps,Ns];function hf(i=[]){al.push(...[].concat(i))}function cf(){Ae(al,{to(i){return new jn().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 lr extends vi{constructor(e,t=e){super(et("path",e),t)}array(){return this._array||(this._array=new sr(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 sr(e))}size(e,t){const n=Yr(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)}}lr.prototype.MorphArray=sr;Me({Container:{path:Je(function(i){return this.put(new lr).plot(i||new sr)})}});Be(lr,"Path");function df(){return this._array||(this._array=new Nn(this.attr("points")))}function uf(){return delete this._array,this}function ff(i,e){return this.attr("points",this.array().move(i,e))}function pf(i){return i==null?this.array():this.clear().attr("points",typeof i=="string"?i:this._array=new Nn(i))}function mf(i,e){const t=Yr(this,i,e);return this.attr("points",this.array().size(t.width,t.height))}var nd={__proto__:null,array:df,clear:uf,move:ff,plot:pf,size:mf};class hr extends vi{constructor(e,t=e){super(et("polygon",e),t)}}Me({Container:{polygon:Je(function(i){return this.put(new hr).plot(i||new Nn)})}});Ae(hr,rl);Ae(hr,nd);Be(hr,"Polygon");class Fs extends vi{constructor(e,t=e){super(et("polyline",e),t)}}Me({Container:{polyline:Je(function(i){return this.put(new Fs).plot(i||new Nn)})}});Ae(Fs,rl);Ae(Fs,nd);Be(Fs,"Polyline");class mi extends vi{constructor(e,t=e){super(et("rect",e),t)}}Ae(mi,{rx:il,ry:nl});Me({Container:{rect:Je(function(i,e){return this.put(new mi).size(i,e)})}});Be(mi,"Rect");class mo{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 qe={nextDraw:null,frames:new mo,timeouts:new mo,immediates:new mo,timer:()=>He.window.performance||He.window.Date,transforms:[],frame(i){const e=qe.frames.push({run:i});return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),e},timeout(i,e){e=e||0;const t=qe.timer().now()+e,n=qe.timeouts.push({run:i,time:t});return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),n},immediate(i){const e=qe.immediates.push(i);return qe.nextDraw===null&&(qe.nextDraw=He.window.requestAnimationFrame(qe._draw)),e},cancelFrame(i){i!=null&&qe.frames.remove(i)},clearTimeout(i){i!=null&&qe.timeouts.remove(i)},cancelImmediate(i){i!=null&&qe.immediates.remove(i)},_draw(i){let e=null;const t=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(i>=e.time?e.run():qe.timeouts.push(e),e!==t););let n=null;const r=qe.frames.last();for(;n!==r&&(n=qe.frames.shift());)n.run(i);let s=null;for(;s=qe.immediates.shift();)s();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?He.window.requestAnimationFrame(qe._draw):null}},gf=function(i){const e=i.start,t=i.runner.duration(),n=e+t;return{start:e,duration:t,end:n,runner:i.runner}},vf=function(){const i=He.window;return(i.performance||i.Date).now()};let rd=class extends Os{constructor(e=vf){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(gf);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 qe.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():this._paused?this:(this._nextFrame=qe.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}};Me({Element:{timeline:function(i){return i==null?(this._timeline=this._timeline||new rd,this._timeline):(this._timeline=i,this)}}});class fi extends Os{constructor(e){super(),this.id=fi.id++,e=e??ys.duration,e=typeof e=="function"?new Ea(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Ea,this._stepper=this._isDeclarative?e:new e0,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new me,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||ys.duration,t=t||ys.delay,n=n||"last",typeof e=="object"&&!(e instanceof sl)&&(t=e.delay||t,n=e.when||n,s=e.swing||s,r=e.times||r,a=e.wait||a,e=e.duration||ys.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=fi.sanitise(e,t,n),s=new fi(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 me,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 e0(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,b=Math.pow(-1,x)*(v%(r+n))/n+x;return Math.max(Math.min(b,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||Xl,runner:t||Xl,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 rd||(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 me,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}}fi.id=0;class Ma{constructor(e=new me,t=-1,n=!0){this.transforms=e,this.id=t,this.done=n}clearTransformsFromQueue(){}}Ae([fi,Ma],{mergeWith(i){return new Ma(i.transforms.lmultiply(this.transforms),i.id)}});const sd=(i,e)=>i.lmultiplyO(e),ad=i=>i.transforms;function xf(){const e=this._transformationRunners.runners.map(ad).reduce(sd,new me);this.transform(e),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class yf{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 Ma).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}}Me({Element:{animate(i,e,t){const n=fi.sanitise(i,e,t),r=this.timeline();return new fi(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(ad).reduce(sd,new me)},_addRunner(i){this._transformationRunners.add(i),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(xf.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new yf().add(new Ma(new me(this))))}}});const wf=(i,e)=>i.filter(t=>!e.includes(t));Ae(fi,{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 jn(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=wf(o,s);if(l.length){const c=this.element()[i](l),d=new Ns(r.from()).valueOf();Object.assign(d,c),r.from(d)}const h=new Ns(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 jn(this._stepper).to(new be(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=me.isMatrixLike(i);t=i.affine!=null?i.affine:t??!n;const r=new jn(this._stepper).type(t?Ps:me);let s,a,o,l,h;function c(){a=a||this.element(),s=s||Qo(i,a),h=new me(e?void 0:a),a._addRunner(this),e||a._clearTransformRunnersBefore(this)}function d(m){e||this.clearTransform();const{x:v,y:g}=new vt(s).transform(a._currentTransform(this));let x=new me({...i,origin:[v,g]}),b=this._isDeclarative&&o?o:h;if(t){x=x.decompose(v,g),b=b.decompose(v,g);const E=x.rotate,C=b.rotate,N=[E-360,E,E+360],O=N.map(Y=>Math.abs(Y-C)),B=Math.min(...O),$=O.indexOf(B);x.rotate=N[$]}e&&(n||(x.rotate=i.rotate||0),this._isDeclarative&&l&&(b.rotate=l)),r.from(b),r.to(x);const M=r.at(m);return l=M.rotate,o=new me(M),this.addTransform(o),a._addRunner(this),r.done()}function f(m){(m.origin||"center").toString()!==(i.origin||"center").toString()&&(s=Qo(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 be(e),this._tryRetarget(i,e))return this;const t=new jn(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 be(r))}),this._rememberMorpher(i,t),this},_queueObject(i,e){if(this._tryRetarget(i,e))return this;const t=new jn(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 be(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 jn(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 Ut(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(fi,{rx:il,ry:nl,from:ed,to:td});Be(fi,"Runner");class ol extends si{constructor(e,t=e){super(et("svg",e),t),this.namespace()}defs(){return this.isRoot()?Si(this.node.querySelector("defs"))||this.put(new tl):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof He.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:K0,version:"1.1"}).attr("xmlns:xlink",Is,js).attr("xmlns:svgjs",Pu,js):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,js).attr("xmlns:svgjs",null,js)}root(){return this.isRoot()?this:super.root()}}Me({Container:{nested:Je(function(){return this.put(new ol)})}});Be(ol,"Svg",!0);let ll=class extends si{constructor(e,t=e){super(et("symbol",e),t)}};Me({Container:{symbol:Je(function(){return this.put(new ll)})}});Be(ll,"Symbol");function bf(i){return this._build===!1&&this.clear(),this.node.appendChild(He.document.createTextNode(i)),this}function kf(){return this.node.getComputedTextLength()}function Tf(i,e=this.bbox()){return i==null?e.x:this.attr("x",this.attr("x")+i-e.x)}function Ef(i,e=this.bbox()){return i==null?e.y:this.attr("y",this.attr("y")+i-e.y)}function Mf(i,e,t=this.bbox()){return this.x(i,t).y(e,t)}function Sf(i,e=this.bbox()){return i==null?e.cx:this.attr("x",this.attr("x")+i-e.cx)}function zf(i,e=this.bbox()){return i==null?e.cy:this.attr("y",this.attr("y")+i-e.cy)}function Cf(i,e,t=this.bbox()){return this.cx(i,t).cy(e,t)}function Nf(i){return this.attr("x",i)}function Lf(i){return this.attr("y",i)}function Af(i,e){return this.ax(i).ay(e)}function _f(i){return this._build=!!i,this}var od={__proto__:null,plain:bf,length:kf,x:Tf,y:Ef,move:Mf,cx:Sf,cy:zf,center:Cf,ax:Nf,ay:Lf,amove:Af,build:_f};class _t extends vi{constructor(e,t=e){super(et("text",e),t),this.dom.leading=new be(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new be(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=He.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=r*new be(a);this.dom.newLined&&(this.attr("x",t.attr("x")),this.text()===`
|
|
196
|
+
`?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 be(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&&Si(t[r]).dom.newLined===!0&&(e+=`
|
|
197
197
|
`),e+=t[r].textContent}return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else{e=(e+"").split(`
|
|
198
|
-
`);for(let t=0,n=e.length;t<n;t++)this.newLine(e[t])}return this.build(!1).rebuild()}}Ae(_t,od);
|
|
199
|
-
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Ae(Ba,od);
|
|
200
|
-
`);let e=document.createElement("div");return e.innerHTML=i,i=e.textContent,i},
|
|
201
|
-
`:t+=r.textContent):r.nodeType===3&&(t+=r.nodeValue)}return t.replace(/\n$/,"")};let bn=null;const r2=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>${Fa(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(Zn(r)!==Zn(s)){t[n]=s;return}if(Zn(r)==="Object"){if(JSON.stringify(r)!==JSON.stringify(s)){t[n]=s;return}}else if(r!==s){t[n]=s;return}}),t},h0=i=>/^_/.test(i)?!1:!ya.includes(i),a2=i=>{const e=[...l0],t=Object.keys(i);for(let n=0;n<t.length;n++)if(!e.includes(t[n]))return!1;return!0},o2=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},[]),c0=i=>{let e=[];return i.forEach(t=>{i.find(n=>n.uid!==t.uid&&n.isAncestor(t))||e.push(t)}),e},l2=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},h2=(i,e,t,n,r,s,a,o)=>e>r&&s>i&&n>a&&o>t,c2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),t.collapse(),e.removeAllRanges(),e.addRange(t)},d2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)},Js=(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},ws=(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&&_s(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},Ti=i=>i?Array.isArray(i)?i:[i]:[],bs=i=>i.parent?i.parent.nodeData.children.findIndex(e=>e.data.uid===i.uid):0,Lt=(i,e)=>e.findIndex(t=>t.uid===i.uid),vd=i=>{let e=0;for(let r=0;r<i.length;r++)e=i.charCodeAt(r)+((e<<5)-e);return"hsla("+new V0(e).genrand_int32()%360+", 50%, 50%, 1)"},Fa=i=>([["&","&"],["<","<"],[">",">"]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),d0=(i,e)=>{const t=Zn(i);if(t!==Zn(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)||!d0(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=Zn(r),o=Zn(s);if(a!==o||!d0(r,s))return!1}return!0}else return i===e},xd=()=>navigator.clipboard&&typeof navigator.clipboard.read=="function",Kl=i=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(i))},u2=async()=>{let i=null,e=null;if(xd()){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}},go=i=>{if(!i||!i.parent)return;const e=bs(i);e!==-1&&i.parent.nodeData.children.splice(e,1)},f2=i=>(pu.forEach(e=>{i=i.replace(new RegExp(`<${e}([^>]*)>`,"g"),`<${e} $1 />`)}),i),p2=(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},Zl=i=>({simpleMindMap:!0,data:i}),u0=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)}},Ql=(i,e)=>{i.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument(),e=e||i.clipboardData.getData("text"),e=Fa(e),e=pd(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()},Jl=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},m2=({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){Qn(d);const v=Br({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}},f0=(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:b}=f.group.findOne(".smm-node-shape").rbox();v<o&&(o=v),v+x>l&&(l=v+x),g<h&&(h=g),g+b>c&&(c=g+b)}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}},g2=()=>{if(document.documentElement.requestFullScreen)return"fullscreenchange";if(document.documentElement.webkitRequestFullScreen)return"webkitfullscreenchange";if(document.documentElement.mozRequestFullScreen)return"mozfullscreenchange";if(document.documentElement.msRequestFullscreen)return"msfullscreenchange"},eh=g2(),v2=i=>{i.requestFullScreen?i.requestFullScreen():i.webkitRequestFullScreen?i.webkitRequestFullScreen():i.mozRequestFullScreen&&i.mozRequestFullScreen()},x2=()=>{document.fullscreenElement&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen&&document.mozCancelFullScreen())},Br=({el:i,width:e,height:t})=>{const n=new hl;return e!==void 0&&n.width(e),t!==void 0&&n.height(t),n.add(i),n},_s=i=>{const e=i.generalization;return e?Array.isArray(e)?e:[e]:[]},Qn=i=>{i.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},p0=i=>(i=[...i],i.sort((e,t)=>e.sortIndex-t.sortIndex),i),yd=(i,e)=>ka(i,e,{arrayMerge:(t,n)=>n}),y2=i=>{const e={};return mu.forEach(t=>{let n=i.style.merge(t);t==="fontSize"&&(n=n+"px"),e[t]=n}),e},th=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],wd=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];let Sa=class Vn{static setBackgroundStyle(e,t){if(!e)return;if(!Vn.cacheStyle){Vn.cacheStyle={};let l=window.getComputedStyle(e);th.forEach(h=>{Vn.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){Vn.cacheStyle&&(th.forEach(t=>{e.style[t]=Vn.cacheStyle[t]}),Vn.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={};wd.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=>{h0(t)&&(e=!0)}),e}getCustomStyle(){const e={};return Object.keys(this.ctx.getData()).forEach(t=>{h0(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)}};Sa.cacheStyle=null;class w2{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 R.SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case R.SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case R.SHAPE.PARALLELOGRAM:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.ELLIPSE:return{paddingX:n<=0?a:0,paddingY:r<=0?o:0};case R.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===R.SHAPE.RECTANGLE?t=this.createRect():e===R.SHAPE.DIAMOND?t=this.createDiamond():e===R.SHAPE.PARALLELOGRAM?t=this.createParallelogram():e===R.SHAPE.ROUNDED_RECTANGLE?t=this.createRoundedRectangle():e===R.SHAPE.OCTAGONAL_RECTANGLE?t=this.createOctagonalRectangle():e===R.SHAPE.OUTER_TRIANGULAR_RECTANGLE?t=this.createOuterTriangularRectangle():e===R.SHAPE.INNER_TRIANGULAR_RECTANGLE?t=this.createInnerTriangularRectangle():e===R.SHAPE.ELLIPSE?t=this.createEllipse():e===R.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?pt(t(e)):new ar().plot(e)}createPolygon(e){const{customCreateNodePolygon:t}=this.mindMap.opt;return t?pt(t(e)):new or().plot(e)}createRect(){let{width:e,height:t}=this.getNodeSize(),n=this.node.style.merge("borderRadius");const r=`
|
|
198
|
+
`);for(let t=0,n=e.length;t<n;t++)this.newLine(e[t])}return this.build(!1).rebuild()}}Ae(_t,od);Me({Container:{text:Je(function(i=""){return this.put(new _t).text(i)}),plain:Je(function(i=""){return this.put(new _t).plain(i)})}});Be(_t,"Text");class Ba extends vi{constructor(e,t=e){super(et("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 _t))return this;const t=e.index(this),n=He.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=e.dom.leading*new be(n);return this.dy(t?r:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
|
|
199
|
+
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Ae(Ba,od);Me({Tspan:{tspan:Je(function(i=""){const e=new Ba;return this._build||this.clear(),this.put(e).text(i)})},Text:{newLine:function(i=""){return this.tspan(i).newLine()}}});Be(Ba,"Tspan");class Vr extends vi{constructor(e,t=e){super(et("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 be(e).divide(2))}}Ae(Vr,{x:Xc,y:Vc,cx:jc,cy:Kc,width:Zc,height:Qc});Me({Container:{circle:Je(function(i=0){return this.put(new Vr).size(i).move(0,0)})}});Be(Vr,"Circle");class s0 extends si{constructor(e,t=e){super(et("clipPath",e),t)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Xr("svg [clip-path*="+this.id()+"]")}}Me({Container:{clip:Je(function(){return this.defs().put(new s0)})},Element:{clipper(){return this.reference("clip-path")},clipWith(i){const e=i instanceof s0?i:this.parent().clip().add(i);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}});Be(s0,"ClipPath");class hl extends qi{constructor(e,t=e){super(et("foreignObject",e),t)}}Me({Container:{foreignObject:Je(function(i,e){return this.put(new hl).size(i,e)})}});Be(hl,"ForeignObject");function Rf(i,e){return this.children().forEach((t,n)=>{let r;try{r=t.bbox()}catch{return}const s=new me(t),a=s.translate(i,e).transform(s.inverse()),o=new vt(r.x,r.y).transform(a);t.move(o.x,o.y)}),this}function Df(i){return this.dmove(i,0)}function If(i){return this.dmove(0,i)}function Of(i,e=this.bbox()){return i==null?e.height:this.size(e.width,i,e)}function Bf(i=0,e=0,t=this.bbox()){const n=i-t.x,r=e-t.y;return this.dmove(n,r)}function Pf(i,e,t=this.bbox()){const n=Yr(this,i,e,t),r=n.width/t.width,s=n.height/t.height;return this.children().forEach((a,o)=>{const l=new vt(t).transform(new me(a).inverse());a.scale(r,s,l.x,l.y)}),this}function Ff(i,e=this.bbox()){return i==null?e.width:this.size(i,e.height,e)}function Hf(i,e=this.bbox()){return i==null?e.x:this.move(i,e.y,e)}function Uf(i,e=this.bbox()){return i==null?e.y:this.move(e.x,i,e)}var ld={__proto__:null,dmove:Rf,dx:Df,dy:If,height:Of,move:Bf,size:Pf,width:Ff,x:Hf,y:Uf};class Ot extends si{constructor(e,t=e){super(et("g",e),t)}}Ae(Ot,ld);Me({Container:{group:Je(function(){return this.put(new Ot)})}});Be(Ot,"G");class Ls extends si{constructor(e,t=e){super(et("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Is)}}Ae(Ls,ld);Me({Container:{link:Je(function(i){return this.put(new Ls).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 Ls,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}}});Be(Ls,"A");class a0 extends si{constructor(e,t=e){super(et("mask",e),t)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Xr("svg [mask*="+this.id()+"]")}}Me({Container:{mask:Je(function(){return this.defs().put(new a0)})},Element:{masker(){return this.reference("mask")},maskWith(i){const e=i instanceof a0?i:this.parent().mask().add(i);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}});Be(a0,"Mask");class hd extends qi{constructor(e,t=e){super(et("stop",e),t)}update(e){return(typeof e=="number"||e instanceof be)&&(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 be(e.offset)),this}}Me({Gradient:{stop:function(i,e,t){return this.put(new hd).update(i,e,t)}}});Be(hd,"Stop");function $f(i,e){if(!i)return"";if(!e)return i;let t=i+"{";for(const n in e)t+=Ou(n)+":"+e[n]+";";return t+="}",t}let o0=class extends qi{constructor(e,t=e){super(et("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($f(e,t))}};Me("Dom",{style(i,e){return this.put(new o0).rule(i,e)},fontface(i,e,t){return this.put(new o0).font(i,e,t)}});Be(o0,"Style");class cl extends _t{constructor(e,t=e){super(et("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")}}Me({Container:{textPath:Je(function(i,e){return i instanceof _t||(i=this.text(i)),i.path(e)})},Text:{path:Je(function(i,e=!0){const t=new cl;i instanceof lr||(i=this.defs().path(i)),t.attr("href","#"+i,Is);let n;if(e)for(;n=this.node.firstChild;)t.node.appendChild(n);return this.put(t)}),textPath(){return this.findOne("textPath")}},Path:{text:Je(function(i){return i instanceof _t||(i=new _t().addTo(this.parent()).text(i)),i.path(this)}),targets(){return Xr("svg textPath").filter(i=>(i.attr("href")||"").includes(this.id()))}}});cl.prototype.MorphArray=sr;Be(cl,"TextPath");class cd extends vi{constructor(e,t=e){super(et("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,Is)}}Me({Container:{use:Je(function(i,e){return this.put(new cd).use(i,e)})}});Be(cd,"Use");const pt=Yt;Ae([ol,ll,or,zs,Ta],ri("viewbox"));Ae([Cs,Fs,hr,lr],ri("marker"));Ae(_t,ri("Text"));Ae(lr,ri("Path"));Ae(tl,ri("Defs"));Ae([_t,Ba],ri("Tspan"));Ae([mi,Oa,Bs,fi],ri("radius"));Ae(Os,ri("EventTarget"));Ae(Cn,ri("Dom"));Ae(qi,ri("Element"));Ae(vi,ri("Shape"));Ae([si,Jc],ri("Container"));Ae(Bs,ri("Gradient"));Ae(fi,ri("Runner"));rr.extend(Du());hf([be,Ye,Ut,me,$r,Nn,sr,vt]);cf();const dd={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"}},Gf=["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"],qf=i=>{let e=Object.keys(i);for(let t=0;t<e.length;t++)if(!Gf.find(n=>n===e[t]))return!1;return!0},l0=["lineColor","lineDasharray","lineWidth","lineMarkerDir","lineFlow","lineFlowDuration","lineFlowForward"],Fe=(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)=>{Fe(c,i,t,n,!1,h,d,[...o,i])})}n&&n(i,e,r,s,a,o)},Pr=(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))})}},ud=(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},Wf=i=>{i=i.replace(/<br>/gim,`
|
|
200
|
+
`);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}},fd=(i,e,t=!1)=>(i.data=Ri(e.data),t&&(i.data.isActive=!1,_s(i.data).forEach(r=>{r.isActive=!1})),i.children=[],e.children&&e.children.length>0&&e.children.forEach((n,r)=>{i.children[r]=fd({},n,t)}),Object.keys(e).forEach(n=>{!["data","children"].includes(n)&&!/^_/.test(n)&&(i[n]=e[n])}),i),As=(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]=As({},s,t,n)}):e.nodeData&&e.nodeData.children&&e.nodeData.children.length>0&&e.nodeData.children.forEach((s,a)=>{i.children[a]=As({},s,t,n)}),Object.keys(r).forEach(s=>{!["data","children"].includes(s)&&!/^_/.test(s)&&(i[s]=r[s])}),i},jl=(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}),Yf=(i,e)=>{let t=document.createElement("a");t.href=i,t.download=e,t.click()},Pa=(i,e=300,t)=>{let n=null;return(...r)=>{n||(n=setTimeout(()=>{i.call(t,...r),n=null},e))}},Xf=(i,e=300,t)=>{let n=null;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{n=null,i.apply(t,r)},e)}},cr=(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()},Or=i=>i*(Math.PI/180),Vf=i=>i.replace(/([a-z])([A-Z])/g,(...e)=>e[1]+"-"+e[2].toLowerCase()),jf=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))}},Kf=(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 Ks=null;const pd=i=>(Ks||(Ks=document.createElement("div")),Ks.innerHTML=i,Ks.textContent),us=i=>new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{e(r.target.result)},n.onerror=r=>{t(r)},n.readAsDataURL(i)}),Zf=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=()=>Ru(),Qf=i=>new Promise((e,t)=>{let n=new FileReader;n.readAsDataURL(i),n.onload=async r=>{let s=r.target.result,a=await Zf(s);e({url:s,size:a})},n.onerror=r=>{t(r)}}),Jf=i=>([[" "," "]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),Jn=i=>Object.prototype.toString.call(i).slice(8,-1),Ln=i=>i==null||i==="";let Zs=null;const e2=i=>{Zs||(Zs=document.createElement("div")),Zs.innerHTML=i;for(let e=Zs.childNodes,t=e.length;t--;)if(e[t].nodeType==1)return!0;return!1},md=i=>(i=String(i).replace(/\s+/g,""),["#fff","#ffffff","#FFF","#FFFFFF","rgb(255,255,255)"].includes(i)||/rgba\(255,255,255,[^)]+\)/.test(i)),t2=i=>(i=String(i).replace(/\s+/g,""),["","transparent"].includes(i)||/rgba\(\d+,\d+,\d+,0\)/.test(i)),i2=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(!t2(o)&&!md(o))return o}},n2=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 Qs=null;const gd=i=>{Qs||(Qs=document.createElement("div")),Qs.innerHTML=i;const e=Qs.childNodes;let t="";for(let n=0;n<e.length;n++){const r=e[n];r.nodeType===1?(n2(r),r.tagName.toLowerCase()==="p"?t+=r.textContent+`
|
|
201
|
+
`:t+=r.textContent):r.nodeType===3&&(t+=r.nodeValue)}return t.replace(/\n$/,"")};let kn=null;const r2=i=>{kn||(kn=document.createElement("div")),kn.innerHTML=i;const e=kn.querySelectorAll(".ql-formula");Array.from(e).forEach(r=>{const s=document.createTextNode("$smmformula$");r.parentNode.replaceChild(s,r)});const t=kn.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>${Fa(r)}</span></p>`).join(""),e.length>0){i=i.replace(/\$smmformula\$/g,'<span class="smmformula"></span>'),kn.innerHTML=i;const r=kn.querySelectorAll(".smmformula");Array.from(r).forEach((s,a)=>{s.parentNode.replaceChild(e[a],s)}),i=kn.innerHTML}return i},s2=(i,e)=>{const t={};return Object.keys(e).forEach(n=>{const r=i[n],s=e[n];if(Jn(r)!==Jn(s)){t[n]=s;return}if(Jn(r)==="Object"){if(JSON.stringify(r)!==JSON.stringify(s)){t[n]=s;return}}else if(r!==s){t[n]=s;return}}),t},h0=i=>/^_/.test(i)?!1:!ya.includes(i),a2=i=>{const e=[...l0],t=Object.keys(i);for(let n=0;n<t.length;n++)if(!e.includes(t[n]))return!1;return!0},o2=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},[]),c0=i=>{let e=[];return i.forEach(t=>{i.find(n=>n.uid!==t.uid&&n.isAncestor(t))||e.push(t)}),e},l2=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},h2=(i,e,t,n,r,s,a,o)=>e>r&&s>i&&n>a&&o>t,c2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),t.collapse(),e.removeAllRanges(),e.addRange(t)},d2=i=>{let e=window.getSelection(),t=document.createRange();t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t)},Js=(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},ws=(i,e=!1,t=null,n=!1)=>{const r=s=>{s.forEach(a=>{a.data||(a.data={}),(e||Ln(a.data.uid))&&(a.data.uid=$i()),n&&_s(a.data).forEach(l=>{(e||Ln(l.uid))&&(l.uid=$i())}),t&&t(a),a.children&&a.children.length>0&&r(a.children)})};return r(i),i},Ei=i=>i?Array.isArray(i)?i:[i]:[],bs=i=>i.parent?i.parent.nodeData.children.findIndex(e=>e.data.uid===i.uid):0,Lt=(i,e)=>e.findIndex(t=>t.uid===i.uid),vd=i=>{let e=0;for(let r=0;r<i.length;r++)e=i.charCodeAt(r)+((e<<5)-e);return"hsla("+new V0(e).genrand_int32()%360+", 50%, 50%, 1)"},Fa=i=>([["&","&"],["<","<"],[">",">"]].forEach(e=>{i=i.replace(new RegExp(e[0],"g"),e[1])}),i),d0=(i,e)=>{const t=Jn(i);if(t!==Jn(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)||!d0(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=Jn(r),o=Jn(s);if(a!==o||!d0(r,s))return!1}return!0}else return i===e},xd=()=>navigator.clipboard&&typeof navigator.clipboard.read=="function",Kl=i=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(i))},u2=async()=>{let i=null,e=null;if(xd()){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}},go=i=>{if(!i||!i.parent)return;const e=bs(i);e!==-1&&i.parent.nodeData.children.splice(e,1)},f2=i=>(pu.forEach(e=>{i=i.replace(new RegExp(`<${e}([^>]*)>`,"g"),`<${e} $1 />`)}),i),p2=(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},Zl=i=>({simpleMindMap:!0,data:i}),u0=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)}},Ql=(i,e)=>{i.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument(),e=e||i.clipboardData.getData("text"),e=Fa(e),e=pd(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()},Jl=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},m2=({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){er(d);const v=Br({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}},f0=(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:b}=f.group.findOne(".smm-node-shape").rbox();v<o&&(o=v),v+x>l&&(l=v+x),g<h&&(h=g),g+b>c&&(c=g+b)}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}},g2=()=>{if(document.documentElement.requestFullScreen)return"fullscreenchange";if(document.documentElement.webkitRequestFullScreen)return"webkitfullscreenchange";if(document.documentElement.mozRequestFullScreen)return"mozfullscreenchange";if(document.documentElement.msRequestFullscreen)return"msfullscreenchange"},eh=g2(),v2=i=>{i.requestFullScreen?i.requestFullScreen():i.webkitRequestFullScreen?i.webkitRequestFullScreen():i.mozRequestFullScreen&&i.mozRequestFullScreen()},x2=()=>{document.fullscreenElement&&(document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen&&document.mozCancelFullScreen())},Br=({el:i,width:e,height:t})=>{const n=new hl;return e!==void 0&&n.width(e),t!==void 0&&n.height(t),n.add(i),n},_s=i=>{const e=i.generalization;return e?Array.isArray(e)?e:[e]:[]},er=i=>{i.setAttribute("xmlns","http://www.w3.org/1999/xhtml")},p0=i=>(i=[...i],i.sort((e,t)=>e.sortIndex-t.sortIndex),i),yd=(i,e)=>ka(i,e,{arrayMerge:(t,n)=>n}),y2=i=>{const e={};return mu.forEach(t=>{let n=i.style.merge(t);t==="fontSize"&&(n=n+"px"),e[t]=n}),e},th=["backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize"],wd=["gradientStyle","startColor","endColor","startDir","endDir","fillColor","borderColor","borderWidth","borderDasharray"];let Sa=class Kn{static setBackgroundStyle(e,t){if(!e)return;if(!Kn.cacheStyle){Kn.cacheStyle={};let l=window.getComputedStyle(e);th.forEach(h=>{Kn.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){Kn.cacheStyle&&(th.forEach(t=>{e.style[t]=Kn.cacheStyle[t]}),Kn.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={};wd.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=>{h0(t)&&(e=!0)}),e}getCustomStyle(){const e={};return Object.keys(this.ctx.getData()).forEach(t=>{h0(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)}};Sa.cacheStyle=null;class w2{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 R.SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case R.SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case R.SHAPE.PARALLELOGRAM:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?a:0,paddingY:0};case R.SHAPE.ELLIPSE:return{paddingX:n<=0?a:0,paddingY:r<=0?o:0};case R.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===R.SHAPE.RECTANGLE?t=this.createRect():e===R.SHAPE.DIAMOND?t=this.createDiamond():e===R.SHAPE.PARALLELOGRAM?t=this.createParallelogram():e===R.SHAPE.ROUNDED_RECTANGLE?t=this.createRoundedRectangle():e===R.SHAPE.OCTAGONAL_RECTANGLE?t=this.createOctagonalRectangle():e===R.SHAPE.OUTER_TRIANGULAR_RECTANGLE?t=this.createOuterTriangularRectangle():e===R.SHAPE.INNER_TRIANGULAR_RECTANGLE?t=this.createInnerTriangularRectangle():e===R.SHAPE.ELLIPSE?t=this.createEllipse():e===R.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?pt(t(e)):new lr().plot(e)}createPolygon(e){const{customCreateNodePolygon:t}=this.mindMap.opt;return t?pt(t(e)):new hr().plot(e)}createRect(){let{width:e,height:t}=this.getNodeSize(),n=this.node.style.merge("borderRadius");const r=`
|
|
202
202
|
M${n},0
|
|
203
203
|
L${e-n},0
|
|
204
204
|
C${e-n},0 ${e},0 ${e},${n}
|
|
@@ -225,7 +225,7 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
225
225
|
A${n},${r} 0 0,1 ${n},${t}
|
|
226
226
|
M${n},${t}
|
|
227
227
|
A${n},${r} 0 0,1 ${n},0
|
|
228
|
-
`;return this.createPath(s)}}const b2=[R.SHAPE.RECTANGLE,R.SHAPE.DIAMOND,R.SHAPE.PARALLELOGRAM,R.SHAPE.ROUNDED_RECTANGLE,R.SHAPE.OCTAGONAL_RECTANGLE,R.SHAPE.OUTER_TRIANGULAR_RECTANGLE,R.SHAPE.INNER_TRIANGULAR_RECTANGLE,R.SHAPE.ELLIPSE,R.SHAPE.CIRCLE];function k2(){const i=this.getData("generalization");return Array.isArray(i)?i:i?[i]:[]}function T2(){return this.formatGetGeneralization().length>0}function E2(){return!!this.formatGetGeneralization().find(e=>!e.range||e.range.length<=0)}function M2(i){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===i.uid)}function S2(){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 Ua({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 z2(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function C2(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 N2(){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 L2(){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 A2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.hide(),i.generalizationNode&&i.generalizationNode.hide()})}function _2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.show(),i.generalizationNode&&i.generalizationNode.show()})}function R2(i){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(i),e.generalizationNode.group.opacity(i)})}function D2(){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 I2(){this.mindMap.renderer.closeHighlightNode()}const ih={formatGetGeneralization:k2,checkHasGeneralization:T2,checkHasSelfGeneralization:E2,getGeneralizationNodeIndex:M2,createGeneralizationNode:S2,updateGeneralization:z2,updateGeneralizationData:N2,renderGeneralization:C2,removeGeneralization:L2,hideGeneralization:A2,showGeneralization:_2,setGeneralizationOpacity:R2,handleGeneralizationMouseenter:D2,handleGeneralizationMouseleave:I2},O2='<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>',B2='<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>',P2='<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>',m0={open:O2,close:B2,quickCreateChild:P2};function F2(){if(this._openExpandNode)return;const{expandBtnSize:i,expandBtnIcon:e,isShowExpandNum:t}=this.mindMap.opt;let{close:n,open:r}=e||{};t?(this._openExpandNode=new _t,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:i/2,y:2})):(this._openExpandNode=pt(r||m0.open).size(i,i),this._openExpandNode.x(0).y(-i/2)),this._closeExpandNode=pt(n||m0.close).size(i,i),this._closeExpandNode.x(0).y(-i/2),this._fillExpandNode=new Vr().size(i),this._fillExpandNode.x(0).y(-i/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function H2(i=[]){return i.reduce((e,t)=>e+this.sumNode(t.children||[]),i.length)}function U2(){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 $2(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function G2(){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 q2(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function W2(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;i||e||setTimeout(()=>{this.renderExpandBtn()},0)}function Y2(){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 nh={createExpandNodeContent:F2,updateExpandBtnNode:U2,updateExpandBtnPos:$2,renderExpandBtn:G2,removeExpandBtn:q2,showExpandBtn:W2,hideExpandBtn:Y2,sumNode:H2};function X2(i={}){this.mindMap.execCommand("SET_NODE_DATA",this,i)}function V2(i,e,t){this.mindMap.execCommand("SET_NODE_TEXT",this,i,e,t)}function j2(i){this.mindMap.execCommand("SET_NODE_IMAGE",this,i)}function K2(i){this.mindMap.execCommand("SET_NODE_ICON",this,i)}function Z2(i,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,i,e)}function Q2(i){this.mindMap.execCommand("SET_NODE_NOTE",this,i)}function J2(i,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,i,e)}function e6(i){this.mindMap.execCommand("SET_NODE_TAG",this,i)}function t6(i){this.mindMap.execCommand("SET_NODE_SHAPE",this,i)}function i6(i,e){this.mindMap.execCommand("SET_NODE_STYLE",this,i,e)}function n6(i){this.mindMap.execCommand("SET_NODE_STYLES",this,i)}const rh={setData:X2,setText:V2,setImage:j2,setIcon:K2,setHyperlink:Z2,setNote:Q2,setAttachment:J2,setTag:e6,setShape:t6,setStyle:i6,setStyles:n6},r6='<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>',a6='<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>',bd=[{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>'}]}],o6=(i,e=[])=>{let t=i.split("_"),r=o2([...bd,...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""},Ha={hyperlink:r6,note:s6,attachment:a6,nodeIconList:bd,getNodeIconListIcon:o6},l6=(i,e)=>{const t=new Ot,n=new _t().text(i);return e.text(n),t.add(n),t.bbox()},sh={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function h6(){let i=this.getData("image");if(!i)return;i=(this.mindMap.renderer.renderTree.data.imgMap||{})[i]||i;const e=this.getImgShowSize(),t=new sr().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 c6(){const{custom:i,width:e,height:t}=this.getData("imageSize");return i?[e,t]:ud(e,t,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function d6(){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=Ha.getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),r=null;return/^<svg/.test(n)?r=pt(n):r=new sr().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 u6(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)&&(e2(t)?t=r2(t):t=`<p>${t}</p>`,this.setData({text:t}));const o=[],l=y2(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,b])=>{h.style[x]=b}),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"),Qn(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=Br({el:h.children[0],width:f,height:m}),g={"line-height":1.2};return o.forEach(([x,b])=>{g[Vf(x)]=b}),v.css(g),s.add(v),{node:s,nodeContent:v,width:f,height:m}}function f6(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(),b=[...g,x].join("");l6(b,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(`
|
|
228
|
+
`;return this.createPath(s)}}const b2=[R.SHAPE.RECTANGLE,R.SHAPE.DIAMOND,R.SHAPE.PARALLELOGRAM,R.SHAPE.ROUNDED_RECTANGLE,R.SHAPE.OCTAGONAL_RECTANGLE,R.SHAPE.OUTER_TRIANGULAR_RECTANGLE,R.SHAPE.INNER_TRIANGULAR_RECTANGLE,R.SHAPE.ELLIPSE,R.SHAPE.CIRCLE];function k2(){const i=this.getData("generalization");return Array.isArray(i)?i:i?[i]:[]}function T2(){return this.formatGetGeneralization().length>0}function E2(){return!!this.formatGetGeneralization().find(e=>!e.range||e.range.length<=0)}function M2(i){return this._generalizationList.findIndex(e=>e.generalizationNode.uid===i.uid)}function S2(){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 Ua({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 z2(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function C2(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 N2(){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 L2(){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 A2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.hide(),i.generalizationNode&&i.generalizationNode.hide()})}function _2(){this.isGeneralization||this._generalizationList.forEach(i=>{i.generalizationLine&&i.generalizationLine.show(),i.generalizationNode&&i.generalizationNode.show()})}function R2(i){this._generalizationList.forEach(e=>{e.generalizationLine.opacity(i),e.generalizationNode.group.opacity(i)})}function D2(){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 I2(){this.mindMap.renderer.closeHighlightNode()}const ih={formatGetGeneralization:k2,checkHasGeneralization:T2,checkHasSelfGeneralization:E2,getGeneralizationNodeIndex:M2,createGeneralizationNode:S2,updateGeneralization:z2,updateGeneralizationData:N2,renderGeneralization:C2,removeGeneralization:L2,hideGeneralization:A2,showGeneralization:_2,setGeneralizationOpacity:R2,handleGeneralizationMouseenter:D2,handleGeneralizationMouseleave:I2},O2='<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>',B2='<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>',P2='<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>',m0={open:O2,close:B2,quickCreateChild:P2};function F2(){if(this._openExpandNode)return;const{expandBtnSize:i,expandBtnIcon:e,isShowExpandNum:t}=this.mindMap.opt;let{close:n,open:r}=e||{};t?(this._openExpandNode=new _t,this._openExpandNode.addClass("smm-expand-btn-text"),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:i/2,y:2})):(this._openExpandNode=pt(r||m0.open).size(i,i),this._openExpandNode.x(0).y(-i/2)),this._closeExpandNode=pt(n||m0.close).size(i,i),this._closeExpandNode.x(0).y(-i/2),this._fillExpandNode=new Vr().size(i),this._fillExpandNode.x(0).y(-i/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function H2(i=[]){return i.reduce((e,t)=>e+this.sumNode(t.children||[]),i.length)}function U2(){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);Ln(a)||(s=a)}e.text(String(s))}this._expandBtn.add(this._fillExpandNode).add(e)}}function $2(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function G2(){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 q2(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function W2(){const{alwaysShowExpandBtn:i,notShowExpandBtn:e}=this.mindMap.opt;i||e||setTimeout(()=>{this.renderExpandBtn()},0)}function Y2(){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 nh={createExpandNodeContent:F2,updateExpandBtnNode:U2,updateExpandBtnPos:$2,renderExpandBtn:G2,removeExpandBtn:q2,showExpandBtn:W2,hideExpandBtn:Y2,sumNode:H2};function X2(i={}){this.mindMap.execCommand("SET_NODE_DATA",this,i)}function V2(i,e,t){this.mindMap.execCommand("SET_NODE_TEXT",this,i,e,t)}function j2(i){this.mindMap.execCommand("SET_NODE_IMAGE",this,i)}function K2(i){this.mindMap.execCommand("SET_NODE_ICON",this,i)}function Z2(i,e){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,i,e)}function Q2(i){this.mindMap.execCommand("SET_NODE_NOTE",this,i)}function J2(i,e){this.mindMap.execCommand("SET_NODE_ATTACHMENT",this,i,e)}function e6(i){this.mindMap.execCommand("SET_NODE_TAG",this,i)}function t6(i){this.mindMap.execCommand("SET_NODE_SHAPE",this,i)}function i6(i,e){this.mindMap.execCommand("SET_NODE_STYLE",this,i,e)}function n6(i){this.mindMap.execCommand("SET_NODE_STYLES",this,i)}const rh={setData:X2,setText:V2,setImage:j2,setIcon:K2,setHyperlink:Z2,setNote:Q2,setAttachment:J2,setTag:e6,setShape:t6,setStyle:i6,setStyles:n6},r6='<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>',a6='<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>',bd=[{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>'}]}],o6=(i,e=[])=>{let t=i.split("_"),r=o2([...bd,...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""},Ha={hyperlink:r6,note:s6,attachment:a6,nodeIconList:bd,getNodeIconListIcon:o6},l6=(i,e)=>{const t=new Ot,n=new _t().text(i);return e.text(n),t.add(n),t.bbox()},sh={radius:3,fontSize:12,fill:"",height:20,paddingX:8};function h6(){let i=this.getData("image");if(!i)return;i=(this.mindMap.renderer.renderTree.data.imgMap||{})[i]||i;const e=this.getImgShowSize(),t=new or().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 c6(){const{custom:i,width:e,height:t}=this.getData("imageSize");return i?[e,t]:ud(e,t,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function d6(){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=Ha.getNodeIconListIcon(t,this.mindMap.opt.iconList||[]),r=null;return/^<svg/.test(n)?r=pt(n):r=new or().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 u6(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&&!Ln(t)&&(e2(t)?t=r2(t):t=`<p>${t}</p>`,this.setData({text:t}));const o=[],l=y2(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,b])=>{h.style[x]=b}),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"),er(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=Br({el:h.children[0],width:f,height:m}),g={"line-height":1.2};return o.forEach(([x,b])=>{g[Vf(x)]=b}),v.css(g),s.add(v),{node:s,nodeContent:v,width:f,height:m}}function f6(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=[];Ln(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(),b=[...g,x].join("");l6(b,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(`
|
|
229
229
|
`)}),s=s.join(`
|
|
230
230
|
`).replace(/\n$/g,"").split(/\n/gim),s.forEach((d,f)=>{d===""&&(d="\uFEFF");const m=new _t().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*wa*f+(wa-1)*n/2),t.add(m)});let{width:h,height:c}=t.bbox();if(c<=0){const d=new _t().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 p6(){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 pt().size(a,a),l=new Ls().to(i).target("_blank");l.node.addEventListener("click",c=>{typeof t=="function"&&(c.preventDefault(),t(i,this))}),e&&o.add(pt(`<title>${e}</title>`)),l.rect(a,a).fill({color:"transparent"});const h=pt(r||Ha.hyperlink).size(a,a);return this.style.iconNode(h,s.color),l.add(h),o.add(l),{node:o,width:a,height:a}}function m6(){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={...sh};typeof r=="string"?a=r:(a=r.text,o={...sh,...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 _t().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 mi().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]||vd(c.node.textContent)}),h.add(x).add(c),n.push({node:h,width:v,height:g})}),n}function g6(){if(!this.getData("note"))return null;const{icon:i,style:e}=this.mindMap.opt.noteIcon,t=this.getNodeIconSize("noteIcon"),n=new pt().attr("cursor","pointer").addClass("smm-node-note").size(t,t);n.add(new mi().size(t,t).fill({color:"transparent"}));const r=pt(i||Ha.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=`
|
|
231
231
|
position: fixed;
|
|
@@ -235,11 +235,11 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
235
235
|
display: none;
|
|
236
236
|
background-color: #fff;
|
|
237
237
|
z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}
|
|
238
|
-
`,(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 v6(){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 pt().attr("cursor","pointer").size(t,t);e&&s.add(pt(`<title>${e}</title>`)),s.add(new mi().size(t,t).fill({color:"transparent"}));const a=pt(n||Ha.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 x6(i){const{style:e}=this.mindMap.opt[i];return
|
|
238
|
+
`,(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 v6(){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 pt().attr("cursor","pointer").size(t,t);e&&s.add(pt(`<title>${e}</title>`)),s.add(new mi().size(t,t).fill({color:"transparent"}));const a=pt(n||Ha.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 x6(i){const{style:e}=this.mindMap.opt[i];return Ln(e.size)?this.mindMap.themeConfig.iconSize:e.size}function y6(){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 w6(i){this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement("div"),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText=`
|
|
239
239
|
position: fixed;
|
|
240
240
|
left: -99999px;
|
|
241
241
|
top: -99999px;
|
|
242
|
-
`,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 b6(){return!!this._customNodeContent}const ah={createImgNode:h6,getImgShowSize:c6,createIconNode:d6,createRichTextNode:u6,createTextNode:f6,createHyperlinkNode:p6,createTagNode:m6,createNoteNode:g6,createAttachmentNode:v6,getNoteContentPosition:y6,getNodeIconSize:x6,measureCustomNodeContentSize:w6,isUseCustomNodeContent:b6};function k6(){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 mi,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,t,n,r,this)}}function T6(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function E6(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}const oh={renderExpandBtnPlaceholderRect:k6,clearExpandBtnPlaceholderRect:T6,updateExpandBtnPlaceholderRect:E6};function M6(){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 S6(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 z6(){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 C6(){const i=[new mi,new mi];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 N6(){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 lh={initDragHandle:M6,onDragMousemoveHandle:S6,onDragMouseupHandle:z6,createDragHandleNode:C6,updateDragHandle:N6};function L6(){this.mindMap.cooperate&&(this._userListGroup=new Ot,this.group.add(this._userListGroup))}function A6(i){const{avatarSize:e,fontSize:t}=this.mindMap.opt.cooperateStyle,n=new Ot,r=i.isMore?i.name:String(i.name)[0],s=new Vr().size(e,e);s.fill({color:i.color||vd(r)});const a=new _t().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 _6(i){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return new sr().load(i.avatar).size(e,e)}function R6(){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 D6(i){this.userList.find(e=>e.id==i.id)||(this.userList.push(i),this.updateUserListNode())}function I6(i){const e=this.userList.findIndex(t=>t.id==i.id);e!==-1&&(this.userList.splice(e,1),this.updateUserListNode())}function O6(){this.userList=[],this.updateUserListNode()}const hh={createUserListNode:L6,updateUserListNode:R6,createTextAvatar:A6,createImageAvatar:_6,addUser:D6,removeUser:I6,emptyUser:O6};function B6(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function P6(){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=pt(n||m0.quickCreateChild).size(t,t);o.css({cursor:"pointer"}),o.x(0).y(-t/2),this.style.iconNode(o,s);const l=new Vr().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 F6(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function H6(){if(this.isGeneralization)return;const{isActive:i}=this.getData();i||this.removeQuickCreateChildBtn()}const ch={initQuickCreateChildBtn:B6,showQuickCreateChildBtn:P6,removeQuickCreateChildBtn:F6,hideQuickCreateChildBtn:H6};function U6(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 $6(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 G6(){if(this.isUseCustomNodeContent()){const C=this.measureCustomNodeContentSize(this._customNodeContent);return{width:this.hasCustomWidth()?this.customTextWidth:C.width,height:C.height}}const{TAG_PLACEMENT:i,IMG_PLACEMENT:e}=R,{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(C=>{const N=this[`_${C.name}Data`];N&&(l+=N.width,h=Math.max(h,N.height),f++)}),this._prefixData&&(l+=this._prefixData.width,h=Math.max(h,this._prefixData.height),f++),this._iconData.length>0&&(l+=this._iconData.reduce((C,N)=>(h=Math.max(h,N.height),C+=N.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:C,height:N}=this.getTagContentSize(t);r?(c=C,d=N):(l+=C,h=Math.max(h,N),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(C=>{const N=this[`_${C.name}Data`];N&&(l+=N.width,h=Math.max(h,N.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:b,paddingY:M}=this.shapeInstance.getShapePadding(m,v,g,x);this.shapePadding.paddingX=b,this.shapePadding.paddingY=M;const E=this.getBorderWidth();return{width:m+g*2+b*2+E,height:v+x*2+M*2+E}}function q6(){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 mi().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=Br({el:this._customNodeContent,width:r,height:s});this.group.add(he),h();return}const{IMG_PLACEMENT:c,TAG_PLACEMENT:d}=R,f=this.getStyle("imgPlacement")||c.TOP,v=(this.getStyle("tagPlacement")||d.RIGHT)===d.BOTTOM;let{textContentWidth:g,textContentHeight:x,textContentWidthWithoutTag:b}=this._rectInfo;const M=x;let E=0,C=0;const N=this._tagData&&this._tagData.length>0;if(N){const he=this.getTagContentSize(t);E=he.width,C=he.height,v&&(x-=C+t)}let O=0,B=0;if(this._imgData)switch(O=this._imgData.width,B=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-B);break;case c.LEFT:this._imgData.node.x(a).cy(s/2);break;case c.RIGHT:this._imgData.node.x(r-a-O).cy(s/2);break}let H=new Ot,W=0;if(N&&v&&(W=b<g?(g-b)/2:0),this.mindMap.nodeInnerPrefixList.forEach(he=>{const ue=this[`_${he.name}Data`];ue&&(ue.node.x(W).y((x-ue.height)/2),H.add(ue.node),W+=ue.width+t)}),this._prefixData){const he=Br({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});he.x(W).y((x-this._prefixData.height)/2),H.add(he),W+=this._prefixData.width+t}let ie=new Ot;if(this._iconData&&this._iconData.length>0){let he=0;this._iconData.forEach(ue=>{ue.node.x(W+he).y((x-ue.height)/2),ie.add(ue.node),he+=ue.width+t}),H.add(ie),W+=he}if(this._textData){const he=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",W),(this._textData.nodeContent||this._textData.node).x(-he).x(W).y((x-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),H.add(this._textData.node),W+=this._textData.width+t}this._hyperlinkData&&(this._hyperlinkData.node.x(W).y((x-this._hyperlinkData.height)/2),H.add(this._hyperlinkData.node),W+=this._hyperlinkData.width+t);let $=new Ot;if(N)if(v){let he=0;this._tagData.forEach(ue=>{ue.node.x(he).y((C-ue.height)/2),$.add(ue.node),he+=ue.width+t}),$.x((g-E)/2).y(M-C),H.add($)}else{let he=0;this._tagData.forEach(ue=>{ue.node.x(W+he).y((x-ue.height)/2),$.add(ue.node),he+=ue.width+t}),H.add($),W+=he}if(this._noteData&&(this._noteData.node.x(W).y((x-this._noteData.height)/2),H.add(this._noteData.node),W+=this._noteData.width+t),this._attachmentData&&(this._attachmentData.node.x(W).y((x-this._attachmentData.height)/2),H.add(this._attachmentData.node),W+=this._attachmentData.width+t),this._postfixData){const he=Br({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});he.x(W).y((x-this._postfixData.height)/2),H.add(he),W+=this._postfixData.width+t}this.mindMap.nodeInnerPostfixList.forEach(he=>{const ue=this[`_${he.name}Data`];ue&&(ue.node.x(W).y((x-ue.height)/2),H.add(ue.node),W+=ue.width+t)}),this.group.add(H);const{width:Y,height:ne}=H.bbox();let V=0,J=0;switch(f){case c.TOP:V=r/2-Y/2,J=o+B+this.getImgTextMarin("v",0,0,B,M);break;case c.BOTTOM:V=r/2-Y/2,J=o;break;case c.LEFT:V=O+a+this.getImgTextMarin("h",O,g),J=s/2-ne/2;break;case c.RIGHT:V=a,J=s/2-ne/2;break}if(H.translate(V,J),h(),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const he=Br(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 dh={getImgTextMarin:U6,getTagContentSize:$6,getNodeRect:G6,layout:q6};class Ua{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 Sa(this),this.effectiveStyles={},this.shapeInstance=new w2(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(dh).forEach(n=>{t[n]=dh[n]}),Object.keys(ih).forEach(n=>{t[n]=ih[n]}),Object.keys(nh).forEach(n=>{t[n]=nh[n]}),Object.keys(oh).forEach(n=>{t[n]=oh[n]}),Object.keys(rh).forEach(n=>{t[n]=rh[n]}),Object.keys(ah).forEach(n=>{t[n]=ah[n]}),this.mindMap.cooperate&&Object.keys(hh).forEach(n=>{t[n]=hh[n]}),Object.keys(lh).forEach(n=>{t[n]=lh[n]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(ch).forEach(n=>{t[n]=ch[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){Qn(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&&Qn(this._prefixData.el)),l.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&Qn(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&&Qn(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?R.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 As({},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 Ua({...this.opt,uid:$i()});return Object.keys(this).forEach(t=>{e[t]=this[t]}),e}createSvgTextNode(e=""){return new _t().text(e)}getSvgObjects(){return{SVG:pt,G:Ot,Rect:mi}}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 W6{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 Dn{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 W6(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(R.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(R.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 Ua({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:Pl[e]!==void 0?t*Pl[e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}formatInitRootNodePosition(e){const{CENTER:t}=R.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}=R.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:b,right:M,top:E,bottom:C}=s(x),N=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeWidth+r:0,O=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeHeight+r:0;b-(t==="h"?N:0)<d&&(d=b-(t==="h"?N:0)),M+(t==="h"?N:0)>f&&(f=M+(t==="h"?N:0)),E<m&&(m=E),C+(t==="v"?O:0)>v&&(v=C+(t==="v"?O: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 uh extends Dn{constructor(e={},t){super(e),this.isUseLeft=t===R.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){let e=0;Fe(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(){Fe(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(){Fe(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=Lt(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 b=s+o/2,M=this.isUseLeft?v.left+v.width:v.left,E=v.top+v.height/2,C=m?v.width*(this.isUseLeft?-1:1):0;b=m&&!e.isRoot?b+o/2:b,E=m?E+v.height/2:E;let N=this.createFoldLine([[x,b],[x+f,b],[x+f,E],[M+C,E]]);this.setLineStyle(n,t[g],N,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,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let M=d?` L ${this.isUseLeft?f.left:f.left+f.width},${b}`:"",E=`M ${v},${g} L ${x},${b}`+M;this.setLineStyle(n,t[m],E,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 b=s+o/2,M=this.isUseLeft?v.left+v.width:v.left,E=v.top+v.height/2,C="";b=d&&!e.isRoot?b+o/2:b,E=d?E+v.height/2:E;let N;this.isUseLeft?N=d?` L ${v.left},${E}`:"":N=d?` L ${v.left+v.width},${E}`:"",e.isRoot&&!m?C=this.quadraticCurvePath(x,b,M,E)+N:C=this.cubicBezierPath(x,b,M,E)+N,this.setLineStyle(n,t[g],C,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 Y6=class extends Dn{constructor(e={}){super(e)}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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?R.LAYOUT_GROW_DIR.RIGHT:R.LAYOUT_GROW_DIR.LEFT),o.left=o.dir===R.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===R.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(){Fe(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===R.LAYOUT_GROW_DIR.LEFT?(h.top=o,o+=h.height+s):(h.top=l,l+=h.height+s)})}},null,!0)}adjustTopValue(){Fe(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=Lt(e,r);r.forEach((a,o)=>{if(a.hasCustomPosition())return;let l=0,h=a.dir===R.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,b=0,M=m?v.width:0;v.dir===R.LAYOUT_GROW_DIR.LEFT?(b=-f,x=e.layerIndex===0?r:r-l,M=-M):(b=f,x=e.layerIndex===0?r+a:r+a+l);let E=s+o/2,C=v.dir===R.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,N=v.top+v.height/2;E=m&&!e.isRoot?E+o/2:E,N=m?N+v.height/2:N;let O=this.createFoldLine([[x,E],[x+b,E],[x+b,N],[C+M,N]]);this.setLineStyle(n,t[g],O,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===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,g=s+o/2,x=f.dir===R.LAYOUT_GROW_DIR.LEFT?f.left+f.width:f.left,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let M="";d&&(f.dir===R.LAYOUT_GROW_DIR.LEFT?M=` L ${f.left},${b}`:M=` L ${f.left+f.width},${b}`);let E=`M ${v},${g} L ${x},${b}`+M;this.setLineStyle(n,t[m],E,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===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,b=s+o/2,M=v.dir===R.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,E=v.top+v.height/2,C="";b=d&&!e.isRoot?b+o/2:b,E=d?E+v.height/2:E;let N="";d&&(v.dir===R.LAYOUT_GROW_DIR.LEFT?N=` L ${v.left},${E}`:N=` L ${v.left+v.width},${E}`),e.isRoot&&!f?C=this.quadraticCurvePath(x,b,M,E)+N:C=this.cubicBezierPath(x,b,M,E)+N,this.setLineStyle(n,t[g],C,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===R.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===R.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,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(b),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===R.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}};class X6 extends Dn{constructor(e={}){super(e)}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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(){Fe(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(){Fe(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=Lt(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=Lt(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,b=-1/0;e.children.forEach((E,C)=>{let N=E.left+E.width/2,O=E.top;N<x&&(x=N),N>b&&(b=N);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${E.left},${O} L ${E.left+E.width},${O}`:"",H=`M ${N},${v+g} L ${N},${v+g>O?O+E.height:O}`+B;this.setLineStyle(n,t[C],H,E)}),x=Math.min(x,m),b=Math.max(b,m);let M=this.lineDraw.path();if(e.style.line(M),M.plot(this.transformPath(`M ${m},${v} L ${m},${v+g}`)),e._lines.push(M),n&&n(M,e),d>0){let E=this.lineDraw.path();e.style.line(E),E.plot(this.transformPath(`M ${x},${v+g} L ${b},${v+g}`)),e._lines.push(E),n&&n(E,e)}}else{let m=s+o,v=-1/0,g=e.left+e.width*.3;if(e.children.forEach((x,b)=>{let M=x.top+x.height/2;M>v&&(v=M);let E="",C=x.left,N=x.left+x.width<g,O=!1;N?C=x.left+x.width:x.left<g&&x.left+x.width>g&&(O=!0,M=x.top,v=M),M>s&&M<m?E=`M ${N?e.left:e.left+e.width},${M} L ${C},${M}`:M<m?(O&&(M=x.top+x.height,C=g),E=`M ${g},${s} L ${g},${M} L ${C},${M}`):(O&&(C=g),E=`M ${g},${M} L ${C},${M}`);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${C},${M-x.height/2} L ${C},${M+x.height/2}`:"";E+=B,this.setLineStyle(n,t[b],E,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 V6 extends Dn{constructor(e={}){super(e)}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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(){Fe(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(){Fe(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=Lt(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,b=e.layerIndex===0&&!f?s+o/2:s+o+l,M=v.left+v.width/2,E=v.top,C="",N=d?` L ${v.left},${E} L ${v.left+v.width},${E}`:"";e.isRoot&&!m?C=this.quadraticCurvePath(x,b,M,E,!0)+N:C=this.cubicBezierPath(x,b,M,E,!0)+N,this.setLineStyle(n,t[g],C,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,b=-1/0,M=e.children.length;e.children.forEach((C,N)=>{let O=C.left+C.width/2,B=m+g>C.top?C.top+C.height:C.top;O<x&&(x=O),O>b&&(b=O);let H=this.mindMap.themeConfig.nodeUseLineStyle?` L ${C.left},${B} L ${C.left+C.width},${B}`:"",W=`M ${O},${m+g} L ${O},${B}`+H;this.setLineStyle(n,t[N],W,C)}),x=Math.min(f,x),b=Math.max(f,b);let E=this.lineDraw.path();if(e.style.line(E),l=M>0&&!h?l:0,E.plot(this.transformPath(`M ${f},${m+l} L ${f},${m+g}`)),e._lines.push(E),n&&n(E,e),M>0){let C=this.lineDraw.path();e.style.line(C),C.plot(this.transformPath(`M ${x},${m+g} L ${b},${m+g}`)),e._lines.push(C),n&&n(C,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 fh extends Dn{constructor(e={},t){super(e),this.layout=t}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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===R.LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?R.LAYOUT_GROW_DIR.BOTTOM:R.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(){Fe(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(){Fe(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===R.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=Lt(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,b=e.top+e.height/2,M=`M ${g},${b} L ${x},${b}`;this.setLineStyle(n,t[v],M,m),f=m})}else{let f=-1/0,m=1/0,v=e.left+e.width*.3;if(e.children.forEach((g,x)=>{let b=g.top+g.height/2;b>f&&(f=b),b<m&&(m=b);let M=`M ${v},${b} L ${g.left},${b}`;this.setLineStyle(n,t[x],M,g)}),d>0){let g=this.lineDraw.path();l=d>0?l:0,e.parent&&e.parent.isRoot&&e.dir===R.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===R.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===R.LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let a="";s.dir===R.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?R.LAYOUT_GROW_DIR.TOP:R.LAYOUT_GROW_DIR.BOTTOM:a=R.LAYOUT_GROW_DIR.BOTTOM,a===R.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}class vo extends Dn{constructor(e={},t){super(e),this.layout=t}doLayout(e){lr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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===R.LAYOUT.VERTICAL_TIMELINE2?o.dir=R.LAYOUT_GROW_DIR.LEFT:this.layout===R.LAYOUT.VERTICAL_TIMELINE3?o.dir=R.LAYOUT_GROW_DIR.RIGHT:o.dir=s%2===0?R.LAYOUT_GROW_DIR.RIGHT:R.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===R.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(){Fe(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(){Fe(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=Lt(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=Lt(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===R.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,b=v.top,M=e.left+e.width/2,E=`M ${M},${x} L ${M},${b}`;this.setLineStyle(n,t[g],E,v),m=v})}else{let m=d.dir===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===R.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=`M ${m},${v} L ${g},${x}`;this.setLineStyle(n,t[f],b,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,b=v.top,M=e.left+e.width/2,E=`M ${M},${x} L ${M},${b}`;this.setLineStyle(n,t[g],E,v),m=v})}else{let m=d.dir===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===R.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=this.cubicBezierPath(m,v,g,x);this.setLineStyle(n,t[f],b,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===R.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===R.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,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(this.transformPath(b)),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===R.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(Or(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(Or(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(Or(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(Or(t.mindMap.opt.fishboneDeg)),r+=h,s+=l,t.updateChildrenPro(a.children,{top:c,left:a.left-d})})}}}};class ph extends Dn{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===R.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=pt(`<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){lr([()=>{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=pt(`<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=>{wd.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(){Fe(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?R.LAYOUT_GROW_DIR.TOP:R.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(){Fe(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(){Fe(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=Lt(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===R.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),b=g.left,M=e.height/2+x-(this.isFishbone2()?e.height/4:0),E=M/Math.tan(Or(this.mindMap.opt.fishboneDeg)),C=this.lineDraw.path();this.checkIsTop(g)?C.plot(this.transformPath(`M ${b-E},${g.top+g.height+M} L ${g.left},${g.top+g.height}`)):C.plot(this.transformPath(`M ${b-E},${g.top-M} L ${b},${g.top}`)),e.style.line(C),e._lines.push(C),n&&n(C,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(Or(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 b=`M ${m},${x} L ${v.left},${x}`;this.setLineStyle(n,t[g],b,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===R.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?R.LAYOUT_GROW_DIR.TOP:R.LAYOUT_GROW_DIR.BOTTOM:a=s.layerIndex===1?R.LAYOUT_GROW_DIR.BOTTOM:R.LAYOUT_GROW_DIR.TOP,a===R.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=R.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}}const mh="smm-node-edit-wrap";class j6{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(mh),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===R.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(Jn.BEFORE_TEXT_EDIT_ERROR,v)}if(!m)return}const{offsetLeft:l,offsetTop:h}=Kf(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(mh),this.textEditNode.style.cssText=`
|
|
242
|
+
`,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 b6(){return!!this._customNodeContent}const ah={createImgNode:h6,getImgShowSize:c6,createIconNode:d6,createRichTextNode:u6,createTextNode:f6,createHyperlinkNode:p6,createTagNode:m6,createNoteNode:g6,createAttachmentNode:v6,getNoteContentPosition:y6,getNodeIconSize:x6,measureCustomNodeContentSize:w6,isUseCustomNodeContent:b6};function k6(){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 mi,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,t,n,r,this)}}function T6(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function E6(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}const oh={renderExpandBtnPlaceholderRect:k6,clearExpandBtnPlaceholderRect:T6,updateExpandBtnPlaceholderRect:E6};function M6(){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 S6(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 z6(){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 C6(){const i=[new mi,new mi];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 N6(){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 lh={initDragHandle:M6,onDragMousemoveHandle:S6,onDragMouseupHandle:z6,createDragHandleNode:C6,updateDragHandle:N6};function L6(){this.mindMap.cooperate&&(this._userListGroup=new Ot,this.group.add(this._userListGroup))}function A6(i){const{avatarSize:e,fontSize:t}=this.mindMap.opt.cooperateStyle,n=new Ot,r=i.isMore?i.name:String(i.name)[0],s=new Vr().size(e,e);s.fill({color:i.color||vd(r)});const a=new _t().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 _6(i){const{avatarSize:e}=this.mindMap.opt.cooperateStyle;return new or().load(i.avatar).size(e,e)}function R6(){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 D6(i){this.userList.find(e=>e.id==i.id)||(this.userList.push(i),this.updateUserListNode())}function I6(i){const e=this.userList.findIndex(t=>t.id==i.id);e!==-1&&(this.userList.splice(e,1),this.updateUserListNode())}function O6(){this.userList=[],this.updateUserListNode()}const hh={createUserListNode:L6,updateUserListNode:R6,createTextAvatar:A6,createImageAvatar:_6,addUser:D6,removeUser:I6,emptyUser:O6};function B6(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function P6(){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=pt(n||m0.quickCreateChild).size(t,t);o.css({cursor:"pointer"}),o.x(0).y(-t/2),this.style.iconNode(o,s);const l=new Vr().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 F6(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function H6(){if(this.isGeneralization)return;const{isActive:i}=this.getData();i||this.removeQuickCreateChildBtn()}const ch={initQuickCreateChildBtn:B6,showQuickCreateChildBtn:P6,removeQuickCreateChildBtn:F6,hideQuickCreateChildBtn:H6};function U6(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 $6(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 G6(){if(this.isUseCustomNodeContent()){const C=this.measureCustomNodeContentSize(this._customNodeContent);return{width:this.hasCustomWidth()?this.customTextWidth:C.width,height:C.height}}const{TAG_PLACEMENT:i,IMG_PLACEMENT:e}=R,{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(C=>{const N=this[`_${C.name}Data`];N&&(l+=N.width,h=Math.max(h,N.height),f++)}),this._prefixData&&(l+=this._prefixData.width,h=Math.max(h,this._prefixData.height),f++),this._iconData.length>0&&(l+=this._iconData.reduce((C,N)=>(h=Math.max(h,N.height),C+=N.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:C,height:N}=this.getTagContentSize(t);r?(c=C,d=N):(l+=C,h=Math.max(h,N),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(C=>{const N=this[`_${C.name}Data`];N&&(l+=N.width,h=Math.max(h,N.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:b,paddingY:M}=this.shapeInstance.getShapePadding(m,v,g,x);this.shapePadding.paddingX=b,this.shapePadding.paddingY=M;const E=this.getBorderWidth();return{width:m+g*2+b*2+E,height:v+x*2+M*2+E}}function q6(){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 mi().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 le=Br({el:this._customNodeContent,width:r,height:s});this.group.add(le),h();return}const{IMG_PLACEMENT:c,TAG_PLACEMENT:d}=R,f=this.getStyle("imgPlacement")||c.TOP,v=(this.getStyle("tagPlacement")||d.RIGHT)===d.BOTTOM;let{textContentWidth:g,textContentHeight:x,textContentWidthWithoutTag:b}=this._rectInfo;const M=x;let E=0,C=0;const N=this._tagData&&this._tagData.length>0;if(N){const le=this.getTagContentSize(t);E=le.width,C=le.height,v&&(x-=C+t)}let O=0,B=0;if(this._imgData)switch(O=this._imgData.width,B=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-B);break;case c.LEFT:this._imgData.node.x(a).cy(s/2);break;case c.RIGHT:this._imgData.node.x(r-a-O).cy(s/2);break}let $=new Ot,Y=0;if(N&&v&&(Y=b<g?(g-b)/2:0),this.mindMap.nodeInnerPrefixList.forEach(le=>{const fe=this[`_${le.name}Data`];fe&&(fe.node.x(Y).y((x-fe.height)/2),$.add(fe.node),Y+=fe.width+t)}),this._prefixData){const le=Br({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});le.x(Y).y((x-this._prefixData.height)/2),$.add(le),Y+=this._prefixData.width+t}let ne=new Ot;if(this._iconData&&this._iconData.length>0){let le=0;this._iconData.forEach(fe=>{fe.node.x(Y+le).y((x-fe.height)/2),ne.add(fe.node),le+=fe.width+t}),$.add(ne),Y+=le}if(this._textData){const le=this._textData.node.attr("data-offsetx")||0;this._textData.node.attr("data-offsetx",Y),(this._textData.nodeContent||this._textData.node).x(-le).x(Y).y((x-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),$.add(this._textData.node),Y+=this._textData.width+t}this._hyperlinkData&&(this._hyperlinkData.node.x(Y).y((x-this._hyperlinkData.height)/2),$.add(this._hyperlinkData.node),Y+=this._hyperlinkData.width+t);let G=new Ot;if(N)if(v){let le=0;this._tagData.forEach(fe=>{fe.node.x(le).y((C-fe.height)/2),G.add(fe.node),le+=fe.width+t}),G.x((g-E)/2).y(M-C),$.add(G)}else{let le=0;this._tagData.forEach(fe=>{fe.node.x(Y+le).y((x-fe.height)/2),G.add(fe.node),le+=fe.width+t}),$.add(G),Y+=le}if(this._noteData&&(this._noteData.node.x(Y).y((x-this._noteData.height)/2),$.add(this._noteData.node),Y+=this._noteData.width+t),this._attachmentData&&(this._attachmentData.node.x(Y).y((x-this._attachmentData.height)/2),$.add(this._attachmentData.node),Y+=this._attachmentData.width+t),this._postfixData){const le=Br({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});le.x(Y).y((x-this._postfixData.height)/2),$.add(le),Y+=this._postfixData.width+t}this.mindMap.nodeInnerPostfixList.forEach(le=>{const fe=this[`_${le.name}Data`];fe&&(fe.node.x(Y).y((x-fe.height)/2),$.add(fe.node),Y+=fe.width+t)}),this.group.add($);const{width:ie,height:Q}=$.bbox();let X=0,j=0;switch(f){case c.TOP:X=r/2-ie/2,j=o+B+this.getImgTextMarin("v",0,0,B,M);break;case c.BOTTOM:X=r/2-ie/2,j=o;break;case c.LEFT:X=O+a+this.getImgTextMarin("h",O,g),j=s/2-Q/2;break;case c.RIGHT:X=a,j=s/2-Q/2;break}if($.translate(X,j),h(),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){const le=Br(this._customContentAddToNodeAdd);this.group.add(le),n&&typeof n.handle=="function"&&n.handle({content:this._customContentAddToNodeAdd,element:le,node:this})}this.mindMap.emit("node_layout_end",this)}const dh={getImgTextMarin:U6,getTagContentSize:$6,getNodeRect:G6,layout:q6};class Ua{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 Sa(this),this.effectiveStyles={},this.shapeInstance=new w2(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(dh).forEach(n=>{t[n]=dh[n]}),Object.keys(ih).forEach(n=>{t[n]=ih[n]}),Object.keys(nh).forEach(n=>{t[n]=nh[n]}),Object.keys(oh).forEach(n=>{t[n]=oh[n]}),Object.keys(rh).forEach(n=>{t[n]=rh[n]}),Object.keys(ah).forEach(n=>{t[n]=ah[n]}),this.mindMap.cooperate&&Object.keys(hh).forEach(n=>{t[n]=hh[n]}),Object.keys(lh).forEach(n=>{t[n]=lh[n]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(ch).forEach(n=>{t[n]=ch[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){er(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&&er(this._prefixData.el)),l.postfix&&(this._postfixData=s?s(this):null,this._postfixData&&this._postfixData.el&&er(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&&er(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?R.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 As({},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 Ua({...this.opt,uid:$i()});return Object.keys(this).forEach(t=>{e[t]=this[t]}),e}createSvgTextNode(e=""){return new _t().text(e)}getSvgObjects(){return{SVG:pt,G:Ot,Rect:mi}}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 W6{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 In{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 W6(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(R.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(R.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 Ua({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:Pl[e]!==void 0?t*Pl[e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}formatInitRootNodePosition(e){const{CENTER:t}=R.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}=R.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:b,right:M,top:E,bottom:C}=s(x),N=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeWidth+r:0,O=x.checkHasGeneralization()&&x.getData("expand")?x._generalizationNodeHeight+r:0;b-(t==="h"?N:0)<d&&(d=b-(t==="h"?N:0)),M+(t==="h"?N:0)>f&&(f=M+(t==="h"?N:0)),E<m&&(m=E),C+(t==="v"?O:0)>v&&(v=C+(t==="v"?O: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 uh extends In{constructor(e={},t){super(e),this.isUseLeft=t===R.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){let e=0;Fe(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(){Fe(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(){Fe(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=Lt(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 b=s+o/2,M=this.isUseLeft?v.left+v.width:v.left,E=v.top+v.height/2,C=m?v.width*(this.isUseLeft?-1:1):0;b=m&&!e.isRoot?b+o/2:b,E=m?E+v.height/2:E;let N=this.createFoldLine([[x,b],[x+f,b],[x+f,E],[M+C,E]]);this.setLineStyle(n,t[g],N,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,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let M=d?` L ${this.isUseLeft?f.left:f.left+f.width},${b}`:"",E=`M ${v},${g} L ${x},${b}`+M;this.setLineStyle(n,t[m],E,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 b=s+o/2,M=this.isUseLeft?v.left+v.width:v.left,E=v.top+v.height/2,C="";b=d&&!e.isRoot?b+o/2:b,E=d?E+v.height/2:E;let N;this.isUseLeft?N=d?` L ${v.left},${E}`:"":N=d?` L ${v.left+v.width},${E}`:"",e.isRoot&&!m?C=this.quadraticCurvePath(x,b,M,E)+N:C=this.cubicBezierPath(x,b,M,E)+N,this.setLineStyle(n,t[g],C,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 Y6=class extends In{constructor(e={}){super(e)}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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?R.LAYOUT_GROW_DIR.RIGHT:R.LAYOUT_GROW_DIR.LEFT),o.left=o.dir===R.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===R.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(){Fe(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===R.LAYOUT_GROW_DIR.LEFT?(h.top=o,o+=h.height+s):(h.top=l,l+=h.height+s)})}},null,!0)}adjustTopValue(){Fe(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=Lt(e,r);r.forEach((a,o)=>{if(a.hasCustomPosition())return;let l=0,h=a.dir===R.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,b=0,M=m?v.width:0;v.dir===R.LAYOUT_GROW_DIR.LEFT?(b=-f,x=e.layerIndex===0?r:r-l,M=-M):(b=f,x=e.layerIndex===0?r+a:r+a+l);let E=s+o/2,C=v.dir===R.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,N=v.top+v.height/2;E=m&&!e.isRoot?E+o/2:E,N=m?N+v.height/2:N;let O=this.createFoldLine([[x,E],[x+b,E],[x+b,N],[C+M,N]]);this.setLineStyle(n,t[g],O,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===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,g=s+o/2,x=f.dir===R.LAYOUT_GROW_DIR.LEFT?f.left+f.width:f.left,b=f.top+f.height/2;g=d&&!e.isRoot?g+o/2:g,b=d?b+f.height/2:b;let M="";d&&(f.dir===R.LAYOUT_GROW_DIR.LEFT?M=` L ${f.left},${b}`:M=` L ${f.left+f.width},${b}`);let E=`M ${v},${g} L ${x},${b}`+M;this.setLineStyle(n,t[m],E,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===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,b=s+o/2,M=v.dir===R.LAYOUT_GROW_DIR.LEFT?v.left+v.width:v.left,E=v.top+v.height/2,C="";b=d&&!e.isRoot?b+o/2:b,E=d?E+v.height/2:E;let N="";d&&(v.dir===R.LAYOUT_GROW_DIR.LEFT?N=` L ${v.left},${E}`:N=` L ${v.left+v.width},${E}`),e.isRoot&&!f?C=this.quadraticCurvePath(x,b,M,E)+N:C=this.cubicBezierPath(x,b,M,E)+N,this.setLineStyle(n,t[g],C,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===R.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===R.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,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(b),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===R.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}};class X6 extends In{constructor(e={}){super(e)}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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(){Fe(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(){Fe(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=Lt(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=Lt(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,b=-1/0;e.children.forEach((E,C)=>{let N=E.left+E.width/2,O=E.top;N<x&&(x=N),N>b&&(b=N);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${E.left},${O} L ${E.left+E.width},${O}`:"",$=`M ${N},${v+g} L ${N},${v+g>O?O+E.height:O}`+B;this.setLineStyle(n,t[C],$,E)}),x=Math.min(x,m),b=Math.max(b,m);let M=this.lineDraw.path();if(e.style.line(M),M.plot(this.transformPath(`M ${m},${v} L ${m},${v+g}`)),e._lines.push(M),n&&n(M,e),d>0){let E=this.lineDraw.path();e.style.line(E),E.plot(this.transformPath(`M ${x},${v+g} L ${b},${v+g}`)),e._lines.push(E),n&&n(E,e)}}else{let m=s+o,v=-1/0,g=e.left+e.width*.3;if(e.children.forEach((x,b)=>{let M=x.top+x.height/2;M>v&&(v=M);let E="",C=x.left,N=x.left+x.width<g,O=!1;N?C=x.left+x.width:x.left<g&&x.left+x.width>g&&(O=!0,M=x.top,v=M),M>s&&M<m?E=`M ${N?e.left:e.left+e.width},${M} L ${C},${M}`:M<m?(O&&(M=x.top+x.height,C=g),E=`M ${g},${s} L ${g},${M} L ${C},${M}`):(O&&(C=g),E=`M ${g},${M} L ${C},${M}`);let B=this.mindMap.themeConfig.nodeUseLineStyle?` L ${C},${M-x.height/2} L ${C},${M+x.height/2}`:"";E+=B,this.setLineStyle(n,t[b],E,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 V6 extends In{constructor(e={}){super(e)}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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(){Fe(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(){Fe(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=Lt(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,b=e.layerIndex===0&&!f?s+o/2:s+o+l,M=v.left+v.width/2,E=v.top,C="",N=d?` L ${v.left},${E} L ${v.left+v.width},${E}`:"";e.isRoot&&!m?C=this.quadraticCurvePath(x,b,M,E,!0)+N:C=this.cubicBezierPath(x,b,M,E,!0)+N,this.setLineStyle(n,t[g],C,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,b=-1/0,M=e.children.length;e.children.forEach((C,N)=>{let O=C.left+C.width/2,B=m+g>C.top?C.top+C.height:C.top;O<x&&(x=O),O>b&&(b=O);let $=this.mindMap.themeConfig.nodeUseLineStyle?` L ${C.left},${B} L ${C.left+C.width},${B}`:"",Y=`M ${O},${m+g} L ${O},${B}`+$;this.setLineStyle(n,t[N],Y,C)}),x=Math.min(f,x),b=Math.max(f,b);let E=this.lineDraw.path();if(e.style.line(E),l=M>0&&!h?l:0,E.plot(this.transformPath(`M ${f},${m+l} L ${f},${m+g}`)),e._lines.push(E),n&&n(E,e),M>0){let C=this.lineDraw.path();e.style.line(C),C.plot(this.transformPath(`M ${x},${m+g} L ${b},${m+g}`)),e._lines.push(C),n&&n(C,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 fh extends In{constructor(e={},t){super(e),this.layout=t}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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===R.LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=s%2===0?R.LAYOUT_GROW_DIR.BOTTOM:R.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(){Fe(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(){Fe(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===R.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=Lt(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,b=e.top+e.height/2,M=`M ${g},${b} L ${x},${b}`;this.setLineStyle(n,t[v],M,m),f=m})}else{let f=-1/0,m=1/0,v=e.left+e.width*.3;if(e.children.forEach((g,x)=>{let b=g.top+g.height/2;b>f&&(f=b),b<m&&(m=b);let M=`M ${v},${b} L ${g.left},${b}`;this.setLineStyle(n,t[x],M,g)}),d>0){let g=this.lineDraw.path();l=d>0?l:0,e.parent&&e.parent.isRoot&&e.dir===R.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===R.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===R.LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let a="";s.dir===R.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?R.LAYOUT_GROW_DIR.TOP:R.LAYOUT_GROW_DIR.BOTTOM:a=R.LAYOUT_GROW_DIR.BOTTOM,a===R.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}class vo extends In{constructor(e={},t){super(e),this.layout=t}doLayout(e){cr([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Fe(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===R.LAYOUT.VERTICAL_TIMELINE2?o.dir=R.LAYOUT_GROW_DIR.LEFT:this.layout===R.LAYOUT.VERTICAL_TIMELINE3?o.dir=R.LAYOUT_GROW_DIR.RIGHT:o.dir=s%2===0?R.LAYOUT_GROW_DIR.RIGHT:R.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===R.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(){Fe(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(){Fe(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=Lt(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=Lt(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===R.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,b=v.top,M=e.left+e.width/2,E=`M ${M},${x} L ${M},${b}`;this.setLineStyle(n,t[g],E,v),m=v})}else{let m=d.dir===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===R.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=`M ${m},${v} L ${g},${x}`;this.setLineStyle(n,t[f],b,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,b=v.top,M=e.left+e.width/2,E=`M ${M},${x} L ${M},${b}`;this.setLineStyle(n,t[g],E,v),m=v})}else{let m=d.dir===R.LAYOUT_GROW_DIR.LEFT?r-l:r+a+l,v=s+o/2,g=d.dir===R.LAYOUT_GROW_DIR.LEFT?d.left+d.width:d.left,x=d.top+d.height/2,b=this.cubicBezierPath(m,v,g,x);this.setLineStyle(n,t[f],b,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===R.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===R.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,b=`M ${d},${f} Q ${g},${x} ${m},${v}`;t.generalizationLine.plot(this.transformPath(b)),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===R.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(Or(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(Or(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(Or(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(Or(t.mindMap.opt.fishboneDeg)),r+=h,s+=l,t.updateChildrenPro(a.children,{top:c,left:a.left-d})})}}}};class ph extends In{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===R.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=pt(`<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){cr([()=>{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=pt(`<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=>{wd.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(){Fe(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?R.LAYOUT_GROW_DIR.TOP:R.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(){Fe(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(){Fe(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=Lt(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===R.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),b=g.left,M=e.height/2+x-(this.isFishbone2()?e.height/4:0),E=M/Math.tan(Or(this.mindMap.opt.fishboneDeg)),C=this.lineDraw.path();this.checkIsTop(g)?C.plot(this.transformPath(`M ${b-E},${g.top+g.height+M} L ${g.left},${g.top+g.height}`)):C.plot(this.transformPath(`M ${b-E},${g.top-M} L ${b},${g.top}`)),e.style.line(C),e._lines.push(C),n&&n(C,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(Or(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 b=`M ${m},${x} L ${v.left},${x}`;this.setLineStyle(n,t[g],b,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===R.LAYOUT_GROW_DIR.TOP?a=s.layerIndex===1?R.LAYOUT_GROW_DIR.TOP:R.LAYOUT_GROW_DIR.BOTTOM:a=s.layerIndex===1?R.LAYOUT_GROW_DIR.BOTTOM:R.LAYOUT_GROW_DIR.TOP,a===R.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=R.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape("fishHead"))}}const mh="smm-node-edit-wrap";class j6{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(mh),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===R.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(tr.BEFORE_TEXT_EDIT_ERROR,v)}if(!m)return}const{offsetLeft:l,offsetTop:h}=Kf(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(mh),this.textEditNode.style.cssText=`
|
|
243
243
|
position: fixed;
|
|
244
244
|
box-sizing: border-box;
|
|
245
245
|
${h?"":"box-shadow: 0 0 20px rgba(0,0,0,.5);"}
|
|
@@ -249,16 +249,16 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
249
249
|
outline: none;
|
|
250
250
|
word-break: break-all;
|
|
251
251
|
line-break: anywhere;
|
|
252
|
-
`,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 b=x.clipboardData.getData("text"),{isSmm:M,data:E}=u0(b);M&&E[0]&&E[0].data?Ql(x,pd(E[0].data.text)):Ql(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=>Fa(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=wa,this.textEditNode.style.transform=`translateY(${(wa-1)*f/2*d}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),n||l&&!r?d2(this.textEditNode):c2(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"?md(r)?i2(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 Wf(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 gh={[R.LAYOUT.LOGICAL_STRUCTURE]:uh,[R.LAYOUT.LOGICAL_STRUCTURE_LEFT]:uh,[R.LAYOUT.MIND_MAP]:Y6,[R.LAYOUT.CATALOG_ORGANIZATION]:X6,[R.LAYOUT.ORGANIZATION_STRUCTURE]:V6,[R.LAYOUT.TIMELINE]:fh,[R.LAYOUT.TIMELINE2]:fh,[R.LAYOUT.VERTICAL_TIMELINE]:vo,[R.LAYOUT.VERTICAL_TIMELINE2]:vo,[R.LAYOUT.VERTICAL_TIMELINE3]:vo,[R.LAYOUT.FISHBONE]:ph,[R.LAYOUT.FISHBONE2]:ph};class K6{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?ka({},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 j6(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=gh[e]||this.mindMap[e];t||(t=gh[R.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=R.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=Pa(()=>{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=Xf(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]){p2(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(R.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&&Fe(this.renderTree,null,e=>{if(!e.data.expand)return Fe(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 Lt(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Fe(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 R.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,s=t?!1:e;break;case R.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,s=!1;break;case R.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=Ti(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=Js(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization||g.isRoot)return;r=_i(r);const x=g.parent,M=g.layerIndex===1?s:a,E=bs(g);m&&f.resetRichText&&delete f.resetRichText;const C={inserting:d,data:{text:M,...f,uid:$i(),...n||{}},children:[...ws(r,v)]};v=!0,x.nodeData.children.splice(E+1,0,C)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0||(e=Ti(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=Js(t,a);let o=!1;n.forEach(l=>{if(l.isGeneralization||l.isRoot)return;t=_i(t);const h=l.parent,c=bs(l),d=ws(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=Ti(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=Js(r,f);const m=n&&n.richText;let v=!1;o.forEach(g=>{if(g.isGeneralization)return;r=_i(r),g.nodeData.children||(g.nodeData.children=[]);const x=g.isRoot?s:a;m&&f.resetRichText&&delete f.resetRichText;const b={inserting:d,data:{text:x,uid:$i(),...f,...n||{}},children:[...ws(r,v)]};v=!0,g.nodeData.children.push(b),g.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0||(e=Ti(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=Js(t,a);let o=!1;n.forEach(l=>{l.isGeneralization||(t=_i(t),l.nodeData.children||(l.nodeData.children=[]),t=ws(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=Ti(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,b=bs(m);x.nodeData.children.splice(b,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=Lt(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=Lt(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=Lt(e,t.children),s=Lt(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=>{h0(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=Ti(e);let t=!1;if(e.length>0)e.forEach(n=>{this._handleRemoveCustomStyles(n.getData())&&(t=!0)});else{if(!this.renderTree)return;Fe(this.renderTree,null,n=>{this._handleRemoveCustomStyles(n.data)&&(t=!0);const s=_s(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||Kl(Zl(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,this.mindMap.opt.disabledClipboard||Kl(Zl(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&&xd())try{const a=await u2();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=u0(d);f.isSmm?h=f.data:o=f.data}}catch(d){e(Jn.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,d)}if(c){const d=u0(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=Fa(o));const d=o.split(new RegExp(`\r?
|
|
252
|
+
`,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 b=x.clipboardData.getData("text"),{isSmm:M,data:E}=u0(b);M&&E[0]&&E[0].data?Ql(x,pd(E[0].data.text)):Ql(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=>Fa(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=wa,this.textEditNode.style.transform=`translateY(${(wa-1)*f/2*d}px)`):this.textEditNode.style.lineHeight="normal",this.setIsShowTextEdit(!0),n||l&&!r?d2(this.textEditNode):c2(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"?md(r)?i2(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 Wf(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 gh={[R.LAYOUT.LOGICAL_STRUCTURE]:uh,[R.LAYOUT.LOGICAL_STRUCTURE_LEFT]:uh,[R.LAYOUT.MIND_MAP]:Y6,[R.LAYOUT.CATALOG_ORGANIZATION]:X6,[R.LAYOUT.ORGANIZATION_STRUCTURE]:V6,[R.LAYOUT.TIMELINE]:fh,[R.LAYOUT.TIMELINE2]:fh,[R.LAYOUT.VERTICAL_TIMELINE]:vo,[R.LAYOUT.VERTICAL_TIMELINE2]:vo,[R.LAYOUT.VERTICAL_TIMELINE3]:vo,[R.LAYOUT.FISHBONE]:ph,[R.LAYOUT.FISHBONE2]:ph};class K6{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?ka({},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 j6(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=gh[e]||this.mindMap[e];t||(t=gh[R.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=R.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=Pa(()=>{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=Xf(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]){p2(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(R.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&&Fe(this.renderTree,null,e=>{if(!e.data.expand)return Fe(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 Lt(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Fe(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 R.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,s=t?!1:e;break;case R.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,s=!1;break;case R.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=Ei(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=Js(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,M=g.layerIndex===1?s:a,E=bs(g);m&&f.resetRichText&&delete f.resetRichText;const C={inserting:d,data:{text:M,...f,uid:$i(),...n||{}},children:[...ws(r,v)]};v=!0,x.nodeData.children.splice(E+1,0,C)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0||(e=Ei(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=Js(t,a);let o=!1;n.forEach(l=>{if(l.isGeneralization||l.isRoot)return;t=Ri(t);const h=l.parent,c=bs(l),d=ws(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=Ei(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=Js(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 b={inserting:d,data:{text:x,uid:$i(),...f,...n||{}},children:[...ws(r,v)]};v=!0,g.nodeData.children.push(b),g.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0||(e=Ei(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=Js(t,a);let o=!1;n.forEach(l=>{l.isGeneralization||(t=Ri(t),l.nodeData.children||(l.nodeData.children=[]),t=ws(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=Ei(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,b=bs(m);x.nodeData.children.splice(b,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=Lt(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=Lt(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=Lt(e,t.children),s=Lt(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=>{h0(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=Ei(e);let t=!1;if(e.length>0)e.forEach(n=>{this._handleRemoveCustomStyles(n.getData())&&(t=!0)});else{if(!this.renderTree)return;Fe(this.renderTree,null,n=>{this._handleRemoveCustomStyles(n.data)&&(t=!0);const s=_s(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||Kl(Zl(this.beingCopyData)))}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,this.mindMap.opt.disabledClipboard||Kl(Zl(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&&xd())try{const a=await u2();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(!Ln(d)){c=!1;const f=u0(d);f.isSmm?h=f.data:o=f.data}}catch(d){e(tr.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,d)}if(c){const d=u0(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=Fa(o));const d=o.split(new RegExp(`\r?
|
|
253
253
|
|(?<!
|
|
254
|
-
)\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 Qf(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(Jn.LOAD_CLIPBOARD_IMAGE_ERROR,h)}}catch(a){e(Jn.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=Ti(e);r=r.filter(s=>!s.isRoot),n==="after"&&r.reverse(),r.forEach(s=>{let a=s.parent,o=a.children,l=Lt(s,o);if(l===-1)return;o.splice(l,1),a.nodeData.children.splice(l,1);let h=t.parent,c=h.children,d=Lt(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=Ti(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),go(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=Ti(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=bs(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=Lt(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=c0(this.activeNodeList);return e=p0(e),e.map(t=>As({},t,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;let t=c0(this.activeNodeList).filter(r=>!r.isRoot);t=p0(t);const n=t.map(r=>As({},r,!0));t.forEach(r=>{go(r)}),this.clearActiveNodeList(),this.mindMap.render(),e&&typeof e=="function"&&e(n)}moveNodeTo(e,t){let n=Ti(e);n=n.filter(r=>!r.isRoot),n.forEach(r=>{this.removeNodeFromActiveList(r),go(r),t.setData({expand:!0}),t.nodeData.children.push(r.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Ti(e),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e)}setNodeStyle(e,t,n){const r={[t]:n};this.setNodeDataRender(e,r),l0.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=>{l0.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&&(Fe(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=Ti(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=l2(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(){Fe(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||!b2.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),a2(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,b=g-m;this.mindMap.view.translateX(x),this.mindMap.view.translateY(b),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={};Pr(this.renderTree,(o,l)=>{if(o.data.uid===e)return n=l?[...s[l.data.uid],l]:[],"stop";if(_s(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&&Fe(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 Fe(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 or().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 tr={default:dd},dl={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++)dl[i]=i+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((i,e)=>{dl[i]=e+65});const Li=dl;class Z6{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){Li[e]=t}removeKeyMap(e){typeof Li[e]<"u"&&delete Li[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(Li.Control),e.altKey&&t.push(Li.Alt),e.shiftKey&&t.push(Li.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(Li[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 Q6="0.14.0",J6={version:Q6};class e4{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=Pa(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=fd({},this.mindMap.renderer.renderTree,!0);return e.smmVersion=J6.version,e}removeDataUid(e){e=_i(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=_i(Jl(s)),l=_i(Jl(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]?d0(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(Jn.DATA_CHANGE_DETAIL_EVENT_ERROR,n)}}}class t4{constructor(){this.has={},this.queue=[],this.nextTick=jf(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 vh={el:null,data:null,viewData:null,readonly:!1,layout:R.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:R.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:R.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:`
|
|
254
|
+
)\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 Qf(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(tr.LOAD_CLIPBOARD_IMAGE_ERROR,h)}}catch(a){e(tr.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=Ei(e);r=r.filter(s=>!s.isRoot),n==="after"&&r.reverse(),r.forEach(s=>{let a=s.parent,o=a.children,l=Lt(s,o);if(l===-1)return;o.splice(l,1),a.nodeData.children.splice(l,1);let h=t.parent,c=h.children,d=Lt(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=Ei(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),go(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=Ei(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=bs(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=Lt(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=c0(this.activeNodeList);return e=p0(e),e.map(t=>As({},t,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;let t=c0(this.activeNodeList).filter(r=>!r.isRoot);t=p0(t);const n=t.map(r=>As({},r,!0));t.forEach(r=>{go(r)}),this.clearActiveNodeList(),this.mindMap.render(),e&&typeof e=="function"&&e(n)}moveNodeTo(e,t){let n=Ei(e);n=n.filter(r=>!r.isRoot),n.forEach(r=>{this.removeNodeFromActiveList(r),go(r),t.setData({expand:!0}),t.nodeData.children.push(r.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Ei(e),this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e)}setNodeStyle(e,t,n){const r={[t]:n};this.setNodeDataRender(e,r),l0.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=>{l0.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&&(Fe(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=Ei(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=l2(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(){Fe(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||!b2.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),a2(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,b=g-m;this.mindMap.view.translateX(x),this.mindMap.view.translateY(b),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={};Pr(this.renderTree,(o,l)=>{if(o.data.uid===e)return n=l?[...s[l.data.uid],l]:[],"stop";if(_s(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&&Fe(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 Fe(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 hr().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 nr={default:dd},dl={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++)dl[i]=i+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((i,e)=>{dl[i]=e+65});const Ai=dl;class Z6{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){Ai[e]=t}removeKeyMap(e){typeof Ai[e]<"u"&&delete Ai[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(Ai.Control),e.altKey&&t.push(Ai.Alt),e.shiftKey&&t.push(Ai.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(Ai[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 Q6="0.14.0",J6={version:Q6};class e4{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=Pa(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=fd({},this.mindMap.renderer.renderTree,!0);return e.smmVersion=J6.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(Jl(s)),l=Ri(Jl(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]?d0(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(tr.DATA_CHANGE_DETAIL_EVENT_ERROR,n)}}}class t4{constructor(){this.has={},this.queue=[],this.nextTick=jf(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 vh={el:null,data:null,viewData:null,readonly:!1,layout:R.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:R.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:R.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:`
|
|
255
255
|
* {
|
|
256
256
|
margin: 0;
|
|
257
257
|
padding: 0;
|
|
258
258
|
box-sizing: border-box;
|
|
259
259
|
}
|
|
260
|
-
`,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 ni=class Fi{constructor(e={}){if(Fi.instanceCount++,this.opt=this.handleOpt(ka(vh,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 bu({mindMap:this}),this.keyCommand=new Z6({mindMap:this}),this.command=new e4({mindMap:this}),this.renderer=new K6({mindMap:this}),this.view=new gu({mindMap:this}),this.batchExecution=new t4,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 Fl.includes(e.layout)||(e.layout=R.LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&
|
|
261
|
-
`)}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=yd(
|
|
260
|
+
`,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 ni=class Fi{constructor(e={}){if(Fi.instanceCount++,this.opt=this.handleOpt(ka(vh,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 bu({mindMap:this}),this.keyCommand=new Z6({mindMap:this}),this.command=new e4({mindMap:this}),this.renderer=new K6({mindMap:this}),this.view=new gu({mindMap:this}),this.batchExecution=new t4,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 Fl.includes(e.layout)||(e.layout=R.LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&nr[e.theme]?e.theme:"default",e}handleData(e){return Ln(e)||Object.keys(e).length<=0?null:(e=Ri(e||{}),e.data&&!e.data.expand&&(e.data.expand=!0),ws([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=pt().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 fu+Object.keys(this.cssTextMap).map(e=>this.cssTextMap[e]).join(`
|
|
261
|
+
`)}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=yd(nr[this.opt.theme]||nr.default,this.opt.themeConfig),Sa.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=e,t||this.render(null,R.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=qf(n);this.render(null,r?"":R.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(ka.all([vh,this.opt,e])),this.emit("after_update_config",this.opt,t)}getLayout(){return this.opt.layout}setLayout(e,t=!1){Fl.includes(e)||(e=R.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,R.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(tr.EXPORT_ERROR,t)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){if(![R.MODE.READONLY,R.MODE.EDIT].includes(e))return;const t=e===R.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}=m2({addContentToHeader:r,addContentToFooter:s}),v=this.svg,g=this.draw,x=v.width(),b=v.height(),M=g.transform(),E=this.elRect;g.scale(1/M.scaleX,1/M.scaleY);const C=g.rbox();let N=null;a&&(N=f0(a,C.x,C.y,e,t));const O=0;C.width+=e*2,C.height+=t*2+O+d+m,g.translate(e,t),v.size(C.width,C.height),g.translate(-C.x+E.left,-C.y+E.top);let B=v.clone();const $=this.watermark&&this.watermark.hasWatermark();if(!n&&$){this.watermark.isInExport=!0;const{onlyExport:G}=o;C.width>x||C.height>b?(this.width=C.width,this.height=C.height,this.watermark.onResize(),B=v.clone(),this.width=x,this.height=b,this.watermark.onResize()):G&&(this.watermark.onResize(),B=v.clone()),G&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...h].forEach(G=>{B.add(pt(`<style>${G}</style>`))}),c&&d>0&&(B.findOne(".smm-container").translate(0,d),c.width(C.width),c.y(t),B.add(c,0)),f&&m>0&&(f.width(C.width),f.y(C.height-t-m),B.add(f));const Y=v.find("defs"),ne=B.find("defs");return Y.forEach((G,ie)=>{const Q=ne[ie];if(!Q)return;const X=G.children(),j=Q.children();for(let le=0;le<X.length;le++){const fe=X[le],Ue=j[le];fe&&Ue&&Ue.attr("id",fe.attr("id"))}}),v.size(x,b),g.transform(M),{svg:B,svgHTML:B.svg(),clipData:N,rect:{...C,ratio:C.width/C.height},origWidth:x,origHeight:b,scaleX:M.scaleX,scaleY:M.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:pt,G:Ot,Rect:mi}}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(),Sa.removeBackgroundStyle(this.el),this.el.classList.remove("smm-mind-map-container"),this.el.innerHTML="",this.el=null,this.removeCss(),Fi.instanceCount--}},g0=[];ni.extendNodeDataNoStylePropList=(i=[])=>{g0.push(...i),ya.push(...i)};ni.resetNodeDataNoStylePropList=()=>{g0.forEach(i=>{const e=ya.findIndex(t=>t===i);e!==-1&&ya.splice(e,1)}),g0=[]};ni.pluginList=[];ni.usePlugin=(i,e={})=>(ni.hasPlugin(i)!==-1||(i.pluginOpt=e,ni.pluginList.push(i)),ni);ni.hasPlugin=i=>ni.pluginList.findIndex(e=>e===i);ni.instanceCount=0;ni.defineTheme=(i,e={})=>{if(nr[i])return new Error("该主题名称已存在");nr[i]=yd(dd,e)};ni.removeTheme=i=>{nr[i]&&(nr[i]=null)};const i4={boxShadowColor:"rgba(0, 0, 0, 0.8)",borderRadius:"5px",transition:"all 0.3s ease-out",zIndex:9999,padding:20,margin:50,openBlankMode:!0};class kd{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({...i4},this.mindMap.opt.demonstrateConfig||{}),this.needRestorePerformanceMode=!1}enter(){this.bindFullscreenEvent(),document.fullscreenElement===this.mindMap.el?this._enter():v2(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(){x2(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=`
|
|
262
262
|
/* 画布所有元素禁止响应鼠标事件 */
|
|
263
263
|
.smm-mind-map-container {
|
|
264
264
|
pointer-events: none;
|
|
@@ -283,13 +283,13 @@ var J1=Object.defineProperty;var eu=(i,e,t)=>e in i?J1(i,e,{enumerable:!0,config
|
|
|
283
283
|
transition: ${this.config.transition};
|
|
284
284
|
z-index: ${this.config.zIndex+1};
|
|
285
285
|
pointer-events: none;
|
|
286
|
-
`,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(eh,this.onFullscreenChange)}unBindEvent(){window.removeEventListener("keydown",this.onKeydown),document.removeEventListener(eh,this.onFullscreenChange)}onFullscreenChange(){document.fullscreenElement?document.fullscreenElement===this.mindMap.el&&this._enter():this.exit()}onKeydown(e){e.keyCode===Li.Left?this.prev():e.keyCode===Li.Right?this.next():e.keyCode===Li.Esc?this.exit():e.keyCode===Li.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=f0(s,0,0,0,0,!0);return{...l,x:l.left,y:l.top}},!0,this.config.padding+this.config.margin);const o=f0(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(){Fe(this.mindMap.renderer.renderTree,null,e=>{this.stepList.push({type:"node",node:e}),_s(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()}}kd.instanceName="demonstrate";class Td{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 Ed extends Dn{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.autoMove=new Td(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=Pa(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=p0(c0(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=[];Pr(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}=R.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}=R.LAYOUT,{LEFT:g,TOP:x,RIGHT:b,BOTTOM:M}=R.LAYOUT_GROW_DIR,E=this.overlapNode.layerIndex,C=this.overlapNode.children,N=this.mindMap.renderer.layout.getMarginX(E+1),O=this.mindMap.renderer.layout.getMarginY(E+1),B=this.placeholderWidth/2,H=this.placeholderHeight/2;let W="",ie="",$="",Y=!1,ne=!1;if(C.length>0){const V=C[C.length-1],J=this.getNodeRect(V);switch(W=this.getNewChildNodeDir(V),this.mindMap.opt.layout){case e:case n:ie=W===g?J.originRight-this.placeholderWidth:J.originLeft,$=J.originBottom+this.minOffset-H;break;case t:ie=J.originRight-this.placeholderWidth,$=J.originBottom+this.minOffset-H;break;case r:Y=!0,ie=J.originRight+this.minOffset-H,$=J.originTop;break;case s:E===0?(Y=!0,ie=J.originRight+this.minOffset-H,$=J.originTop):(ie=J.originLeft,$=J.originBottom+this.minOffset-H);break;case a:E===0?(Y=!0,ie=J.originRight+this.minOffset-H,$=J.originTop+J.originHeight/2-B):(ie=J.originLeft,$=J.originBottom+this.minOffset-H);break;case o:E===0?(Y=!0,ie=J.originRight+this.minOffset-H,$=J.originTop+J.originHeight/2-B):(ie=J.originLeft,E===1?$=W===x?J.originTop-this.placeholderHeight-this.minOffset+H:J.originBottom+this.minOffset-H:$=J.originBottom+this.minOffset-H);break;case l:case h:case c:E===0?(ie=J.originLeft+J.originWidth/2-B,$=J.originBottom+this.minOffset-H):(ie=W===b?J.originLeft:J.originRight-this.placeholderWidth,$=J.originBottom+this.minOffset-H);break;case d:case f:case m:case v:E<=1?(ne=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ie=J.originLeft,$=W===x?J.originBottom+this.minOffset-H:J.originTop-this.placeholderHeight-this.minOffset+H);break}}else{const V=this.getNodeRect(this.overlapNode);switch(W=this.getNewChildNodeDir(this.overlapNode),this.mindMap.opt.layout){case e:case n:ie=W===b?V.originRight+N:V.originLeft-this.placeholderWidth-N,$=V.originTop+(V.originHeight-this.placeholderHeight)/2;break;case t:ie=V.originLeft-this.placeholderWidth-N,$=V.originTop+(V.originHeight-this.placeholderHeight)/2;break;case r:Y=!0,ie=V.originLeft+(V.originWidth-this.placeholderHeight)/2,$=V.originBottom+N;break;case s:E===0&&(Y=!0),ie=V.originLeft+V.originWidth*.5,$=V.originBottom+N;break;case a:E===0&&(Y=!0),ie=V.originLeft+V.originWidth*.5,$=V.originBottom+O;break;case o:E===0&&(Y=!0),ie=V.originLeft+V.originWidth*.5,E===1?$=W===x?V.originTop-this.placeholderHeight-N:V.originBottom+N:$=V.originBottom+N;break;case l:case h:case c:E===0&&(Y=!0),ie=W===b?V.originRight+N:V.originLeft-this.placeholderWidth-N,$=V.originTop+V.originHeight/2-H;break;case d:case f:case m:case v:E<=1?(ne=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ie=V.originLeft+V.originWidth*.5,$=W===M?V.originTop-this.placeholderHeight-this.minOffset+H:V.originBottom+this.minOffset-H);break}}ne||this.setPlaceholderRect({x:ie,y:$,dir:W,rotate:Y})}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}=R.LAYOUT;switch(this.mindMap.opt.layout){case t:return R.LAYOUT_GROW_DIR.RIGHT;case n:return R.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}=R,{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,b=this.getNodeRect(e),M=this.getNewChildNodeDir(e),E=e.layerIndex;n&&(t=t.reverse());let C=b.originHeight/4,{prevBrotherOffset:N,nextBrotherOffset:O}=this.getNodeDistanceToSiblingNode(t,e,b,"v");if(b.left<=g&&b.right>=g){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let B=O>0?x>b.bottom&&x<=b.bottom+O:x>=b.bottom-C&&x<=b.bottom,H=N>0?x<b.top&&x>=b.top-N:x>=b.top&&x<=b.top+C;const{scaleY:W}=this.drawTransform;let ie=M===v?b.originRight-this.placeholderWidth:b.originLeft,$=!1;switch(r){case o:case l:case h:E===1&&(ie=b.originLeft+b.originWidth/2-this.placeholderWidth/2);break;case f:case m:ie=b.originLeft+b.originWidth-this.placeholderWidth;break}if(B){n?this.nextNode=e:this.prevNode=e;let Y=b.originBottom+O/W-this.placeholderHeight/2;switch(r){case c:case d:case f:case m:E===2&&($=!0,Y=b.originBottom+this.minOffset-this.placeholderHeight/2);break}this.setPlaceholderRect({x:ie,y:Y,dir:M,notRenderLine:$})}else if(H){n?this.prevNode=e:this.nextNode=e;let Y=b.originTop-this.placeholderHeight-N/W+this.placeholderHeight/2;switch(r){case c:case d:case f:case m:E===2&&($=!0,Y=b.originTop-this.placeholderHeight-this.minOffset+this.placeholderHeight/2);break}this.setPlaceholderRect({x:ie,y:Y,dir:M,notRenderLine:$})}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:N,nextBrotherOffset:O,size:C,pos:x,nodeRect:b})}}handleHorizontalCheck(e,t){const{layout:n}=this.mindMap.opt,{LAYOUT:r}=R,{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 b=x>0?d<m.right+x&&d>=m.right:d<=m.right&&d>=m.right-v,M=g>0?d>m.left-g&&d<=m.left:d<=m.left+v&&d>=m.left;const{scaleX:E}=this.drawTransform,C=e.layerIndex;let N=m.originTop,O=!1;switch(n){case h:case c:N=m.originTop+m.originHeight/2-this.placeholderWidth/2;break;case s:case a:case o:case l:C===1&&(O=!0,N=m.originTop+m.originHeight/2-this.placeholderWidth/2);break}b?([o,l].includes(n)?this.nextNode=e:this.prevNode=e,this.setPlaceholderRect({x:m.originRight+x/E-this.placeholderHeight/2,y:N,rotate:!0,notRenderLine:O})):M&&([o,l].includes(n)?this.prevNode=e:this.nextNode=e,this.setPlaceholderRect({x:m.originLeft-this.placeholderHeight-g/E+this.placeholderHeight/2,y:N,rotate:!0,notRenderLine:O}))}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}=R.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=Lt(t,e),x=null,b=null;g!==-1&&(g-1>=0&&(x=e[g-1]),g+1<=e.length-1&&(b=e[g+1]));let M=0;if(x){let C=this.getNodeRect(x);M=n[d]-C[f],M=M>=v?M/2:0}else M=v;let E=0;return b?(E=this.getNodeRect(b)[d]-n[f],E=E>=v?E/2:0):E=v,{prevBrother:x,prevBrotherOffset:M,nextBrother:b,nextBrotherOffset:E}}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}=R.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===R.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===R.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2,r=e.dir===R.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,b=(o+h)*n+s;return a=a*t+r,o=o*n+s,{left:a,top:o,right:x,bottom:b,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()}}Ed.instanceName="drag";const ul=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}),ea=(i,e)=>i*e,xo=(i,e)=>e/i,xh={left:0,top:0,center:50,bottom:100,right:100},n4=({backgroundSize:i,drawOpt:e,imageRatio:t,canvasWidth:n,canvasHeight:r,canvasRatio:s})=>{if(i){let a=ul(i);if(a[0]==="auto"&&a[1]==="auto")return;if(a[0]==="cover"){t>s?(e.height=r,e.width=ea(t,r)):(e.width=n,e.height=xo(t,n));return}if(a[0]==="contain"){t>s?(e.width=n,e.height=xo(t,n)):(e.height=r,e.width=ea(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=ea(t,a[1][0]/100*r):e.width=ea(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=xo(t,o))}},r4=({backgroundPosition:i,drawOpt:e,imgWidth:t,imgHeight:n,canvasWidth:r,canvasHeight:s})=>{if(i){let a=ul(i);if(a=a.map(o=>typeof o=="string"&&xh[o]!==void 0?[xh[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]}}},s4=({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=ul(t);if(v[0]==="no-repeat"||r>=a&&s>=o)return;if(v[0]==="repeat-x"&&a>r){let g=f;for(;g<a;)pa(i,e,{...n,x:g}),g+=r;return!0}if(v[0]==="repeat-y"&&o>s){let g=m;for(;g<o;)pa(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;)pa(i,e,{...n,x:g,y:x}),x+=s}g+=r}return!0}}},pa=(i,e,t)=>{i.drawImage(e,t.sx,t.sy,t.swidth,t.sheight,t.x,t.y,t.width,t.height)},a4=(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};n4({backgroundSize:r,drawOpt:m,imageRatio:f,canvasWidth:e,canvasHeight:t,canvasRatio:l}),r4({backgroundPosition:s,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t}),s4({ctx:i,image:h,backgroundRepeat:a,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t})||pa(i,h,m),o()},h.onerror=c=>{o(c)}},yo=i=>i.richText?gd(i.text):i.text,o4=i=>new Array(i).fill("#").join(""),l4=i=>new Array(i-6).fill(" ").join("")+"*",h4=i=>{let e="";return Fe(i,null,(t,n,r,s)=>{const a=s+1;a<=6?e+=o4(a):e+=l4(a),e+=" "+yo(t.data);const o=t.data.generalization;if(Array.isArray(o))e+=o.map(l=>` [${yo(l)}]`);else if(o&&o.text){const l=yo(o);e+=` [${l}]`}e+=`
|
|
286
|
+
`,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(eh,this.onFullscreenChange)}unBindEvent(){window.removeEventListener("keydown",this.onKeydown),document.removeEventListener(eh,this.onFullscreenChange)}onFullscreenChange(){document.fullscreenElement?document.fullscreenElement===this.mindMap.el&&this._enter():this.exit()}onKeydown(e){e.keyCode===Ai.Left?this.prev():e.keyCode===Ai.Right?this.next():e.keyCode===Ai.Esc?this.exit():e.keyCode===Ai.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=f0(s,0,0,0,0,!0);return{...l,x:l.left,y:l.top}},!0,this.config.padding+this.config.margin);const o=f0(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(){Fe(this.mindMap.renderer.renderTree,null,e=>{this.stepList.push({type:"node",node:e}),_s(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()}}kd.instanceName="demonstrate";class Td{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 Ed extends In{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.autoMove=new Td(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=Pa(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=p0(c0(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=[];Pr(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}=R.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}=R.LAYOUT,{LEFT:g,TOP:x,RIGHT:b,BOTTOM:M}=R.LAYOUT_GROW_DIR,E=this.overlapNode.layerIndex,C=this.overlapNode.children,N=this.mindMap.renderer.layout.getMarginX(E+1),O=this.mindMap.renderer.layout.getMarginY(E+1),B=this.placeholderWidth/2,$=this.placeholderHeight/2;let Y="",ne="",G="",ie=!1,Q=!1;if(C.length>0){const X=C[C.length-1],j=this.getNodeRect(X);switch(Y=this.getNewChildNodeDir(X),this.mindMap.opt.layout){case e:case n:ne=Y===g?j.originRight-this.placeholderWidth:j.originLeft,G=j.originBottom+this.minOffset-$;break;case t:ne=j.originRight-this.placeholderWidth,G=j.originBottom+this.minOffset-$;break;case r:ie=!0,ne=j.originRight+this.minOffset-$,G=j.originTop;break;case s:E===0?(ie=!0,ne=j.originRight+this.minOffset-$,G=j.originTop):(ne=j.originLeft,G=j.originBottom+this.minOffset-$);break;case a:E===0?(ie=!0,ne=j.originRight+this.minOffset-$,G=j.originTop+j.originHeight/2-B):(ne=j.originLeft,G=j.originBottom+this.minOffset-$);break;case o:E===0?(ie=!0,ne=j.originRight+this.minOffset-$,G=j.originTop+j.originHeight/2-B):(ne=j.originLeft,E===1?G=Y===x?j.originTop-this.placeholderHeight-this.minOffset+$:j.originBottom+this.minOffset-$:G=j.originBottom+this.minOffset-$);break;case l:case h:case c:E===0?(ne=j.originLeft+j.originWidth/2-B,G=j.originBottom+this.minOffset-$):(ne=Y===b?j.originLeft:j.originRight-this.placeholderWidth,G=j.originBottom+this.minOffset-$);break;case d:case f:case m:case v:E<=1?(Q=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ne=j.originLeft,G=Y===x?j.originBottom+this.minOffset-$:j.originTop-this.placeholderHeight-this.minOffset+$);break}}else{const X=this.getNodeRect(this.overlapNode);switch(Y=this.getNewChildNodeDir(this.overlapNode),this.mindMap.opt.layout){case e:case n:ne=Y===b?X.originRight+N:X.originLeft-this.placeholderWidth-N,G=X.originTop+(X.originHeight-this.placeholderHeight)/2;break;case t:ne=X.originLeft-this.placeholderWidth-N,G=X.originTop+(X.originHeight-this.placeholderHeight)/2;break;case r:ie=!0,ne=X.originLeft+(X.originWidth-this.placeholderHeight)/2,G=X.originBottom+N;break;case s:E===0&&(ie=!0),ne=X.originLeft+X.originWidth*.5,G=X.originBottom+N;break;case a:E===0&&(ie=!0),ne=X.originLeft+X.originWidth*.5,G=X.originBottom+O;break;case o:E===0&&(ie=!0),ne=X.originLeft+X.originWidth*.5,E===1?G=Y===x?X.originTop-this.placeholderHeight-N:X.originBottom+N:G=X.originBottom+N;break;case l:case h:case c:E===0&&(ie=!0),ne=Y===b?X.originRight+N:X.originLeft-this.placeholderWidth-N,G=X.originTop+X.originHeight/2-$;break;case d:case f:case m:case v:E<=1?(Q=!0,this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)):(ne=X.originLeft+X.originWidth*.5,G=Y===M?X.originTop-this.placeholderHeight-this.minOffset+$:X.originBottom+this.minOffset-$);break}}Q||this.setPlaceholderRect({x:ne,y:G,dir:Y,rotate:ie})}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}=R.LAYOUT;switch(this.mindMap.opt.layout){case t:return R.LAYOUT_GROW_DIR.RIGHT;case n:return R.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}=R,{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,b=this.getNodeRect(e),M=this.getNewChildNodeDir(e),E=e.layerIndex;n&&(t=t.reverse());let C=b.originHeight/4,{prevBrotherOffset:N,nextBrotherOffset:O}=this.getNodeDistanceToSiblingNode(t,e,b,"v");if(b.left<=g&&b.right>=g){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let B=O>0?x>b.bottom&&x<=b.bottom+O:x>=b.bottom-C&&x<=b.bottom,$=N>0?x<b.top&&x>=b.top-N:x>=b.top&&x<=b.top+C;const{scaleY:Y}=this.drawTransform;let ne=M===v?b.originRight-this.placeholderWidth:b.originLeft,G=!1;switch(r){case o:case l:case h:E===1&&(ne=b.originLeft+b.originWidth/2-this.placeholderWidth/2);break;case f:case m:ne=b.originLeft+b.originWidth-this.placeholderWidth;break}if(B){n?this.nextNode=e:this.prevNode=e;let ie=b.originBottom+O/Y-this.placeholderHeight/2;switch(r){case c:case d:case f:case m:E===2&&(G=!0,ie=b.originBottom+this.minOffset-this.placeholderHeight/2);break}this.setPlaceholderRect({x:ne,y:ie,dir:M,notRenderLine:G})}else if($){n?this.prevNode=e:this.nextNode=e;let ie=b.originTop-this.placeholderHeight-N/Y+this.placeholderHeight/2;switch(r){case c:case d:case f:case m:E===2&&(G=!0,ie=b.originTop-this.placeholderHeight-this.minOffset+this.placeholderHeight/2);break}this.setPlaceholderRect({x:ne,y:ie,dir:M,notRenderLine:G})}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:N,nextBrotherOffset:O,size:C,pos:x,nodeRect:b})}}handleHorizontalCheck(e,t){const{layout:n}=this.mindMap.opt,{LAYOUT:r}=R,{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 b=x>0?d<m.right+x&&d>=m.right:d<=m.right&&d>=m.right-v,M=g>0?d>m.left-g&&d<=m.left:d<=m.left+v&&d>=m.left;const{scaleX:E}=this.drawTransform,C=e.layerIndex;let N=m.originTop,O=!1;switch(n){case h:case c:N=m.originTop+m.originHeight/2-this.placeholderWidth/2;break;case s:case a:case o:case l:C===1&&(O=!0,N=m.originTop+m.originHeight/2-this.placeholderWidth/2);break}b?([o,l].includes(n)?this.nextNode=e:this.prevNode=e,this.setPlaceholderRect({x:m.originRight+x/E-this.placeholderHeight/2,y:N,rotate:!0,notRenderLine:O})):M&&([o,l].includes(n)?this.prevNode=e:this.nextNode=e,this.setPlaceholderRect({x:m.originLeft-this.placeholderHeight-g/E+this.placeholderHeight/2,y:N,rotate:!0,notRenderLine:O}))}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}=R.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=Lt(t,e),x=null,b=null;g!==-1&&(g-1>=0&&(x=e[g-1]),g+1<=e.length-1&&(b=e[g+1]));let M=0;if(x){let C=this.getNodeRect(x);M=n[d]-C[f],M=M>=v?M/2:0}else M=v;let E=0;return b?(E=this.getNodeRect(b)[d]-n[f],E=E>=v?E/2:0):E=v,{prevBrother:x,prevBrotherOffset:M,nextBrother:b,nextBrotherOffset:E}}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}=R.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===R.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===R.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2,r=e.dir===R.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,b=(o+h)*n+s;return a=a*t+r,o=o*n+s,{left:a,top:o,right:x,bottom:b,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()}}Ed.instanceName="drag";const ul=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}),ea=(i,e)=>i*e,xo=(i,e)=>e/i,xh={left:0,top:0,center:50,bottom:100,right:100},n4=({backgroundSize:i,drawOpt:e,imageRatio:t,canvasWidth:n,canvasHeight:r,canvasRatio:s})=>{if(i){let a=ul(i);if(a[0]==="auto"&&a[1]==="auto")return;if(a[0]==="cover"){t>s?(e.height=r,e.width=ea(t,r)):(e.width=n,e.height=xo(t,n));return}if(a[0]==="contain"){t>s?(e.width=n,e.height=xo(t,n)):(e.height=r,e.width=ea(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=ea(t,a[1][0]/100*r):e.width=ea(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=xo(t,o))}},r4=({backgroundPosition:i,drawOpt:e,imgWidth:t,imgHeight:n,canvasWidth:r,canvasHeight:s})=>{if(i){let a=ul(i);if(a=a.map(o=>typeof o=="string"&&xh[o]!==void 0?[xh[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]}}},s4=({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=ul(t);if(v[0]==="no-repeat"||r>=a&&s>=o)return;if(v[0]==="repeat-x"&&a>r){let g=f;for(;g<a;)pa(i,e,{...n,x:g}),g+=r;return!0}if(v[0]==="repeat-y"&&o>s){let g=m;for(;g<o;)pa(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;)pa(i,e,{...n,x:g,y:x}),x+=s}g+=r}return!0}}},pa=(i,e,t)=>{i.drawImage(e,t.sx,t.sy,t.swidth,t.sheight,t.x,t.y,t.width,t.height)},a4=(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};n4({backgroundSize:r,drawOpt:m,imageRatio:f,canvasWidth:e,canvasHeight:t,canvasRatio:l}),r4({backgroundPosition:s,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t}),s4({ctx:i,image:h,backgroundRepeat:a,drawOpt:m,imgWidth:m.width,imgHeight:m.height,canvasWidth:e,canvasHeight:t})||pa(i,h,m),o()},h.onerror=c=>{o(c)}},yo=i=>i.richText?gd(i.text):i.text,o4=i=>new Array(i).fill("#").join(""),l4=i=>new Array(i-6).fill(" ").join("")+"*",h4=i=>{let e="";return Fe(i,null,(t,n,r,s)=>{const a=s+1;a<=6?e+=o4(a):e+=l4(a),e+=" "+yo(t.data);const o=t.data.generalization;if(Array.isArray(o))e+=o.map(l=>` [${yo(l)}]`);else if(o&&o.text){const l=yo(o);e+=` [${l}]`}e+=`
|
|
287
287
|
|
|
288
288
|
`,t.data.note&&(e+=t.data.note+`
|
|
289
289
|
|
|
290
290
|
`)},()=>{},!0),e},wo=i=>i.richText?gd(i.text):i.text,c4=i=>new Array(i).fill(" ").join(""),d4=i=>{let e="";return Fe(i,null,(t,n,r,s)=>{e+=c4(s),e+=" "+wo(t.data);const a=t.data.generalization;Array.isArray(a)?e+=a.map(o=>` [${wo(o)}]`):a&&a.text&&(e+=` [${wo(a)}]`),e+=`
|
|
291
291
|
|
|
292
|
-
`},()=>{},!0),e};class Md{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&&Yf(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 jl(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(Jn.EXPORT_LOAD_IMAGE_ERROR,x)}if(this.mindMap.richText){const x=h.find("foreignObject");if(x.length>0&&(x[0].add(pt(`<style>${s}</style>`)),f=!0),this.mindMap.formula&&h.find(".ql-formula").length>0){const M=this.mindMap.formula.getStyleText();if(M){const E=document.createElement("style");E.innerHTML=M,Qn(E),x[0].add(E),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 b=0,M=0;const{backgroundImage:E}=this.mindMap.themeConfig;if(r&&E&&!t){const $=await new Promise(Y=>{const ne=new Image;ne.onload=()=>{Y([ne.width,ne.height])},ne.onerror=()=>{Y(null)},ne.src=E});if($){const Y=m/v,ne=$[0]/$[1];Y>ne?(b=m,M=m/ne):(M=v,b=v*ne)}}let C=(b||m)*f,N=(M||v)*f;if(C>a||N>a){let $=null,Y=null;C>a?$=a:N>a&&(Y=a);const ne=ud(C,N,$,Y);C=ne[0],N=ne[1]}d.width=C,d.height=N;const O=C/f,B=N/f;d.style.width=O+"px",d.style.height=B+"px";const H=d.getContext("2d");H.scale(f,f),t||await this.drawBackgroundToCanvas(H,O,B);const W=b>0?(b-m)/2:0,ie=M>0?(M-v)/2:0;n?H.drawImage(c,n.left,n.top,n.width,n.height,g+W,x+ie,n.width,n.height):H.drawImage(c,W,ie,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(),a4(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 jl(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 us(n)}async svg(e){this.mindMap.renderer.textEdit.hideEditTextBox();const{node:t}=await this.getSvgData();t.first().before(pt(`<title>${e}</title>`)),await this.drawBackgroundToSvg(t);const n=t.svg();return await this.fixSvgStrAndToBlob(n)}async fixSvgStrAndToBlob(e){e=Jf(e),e=f2(e);const t=new Blob([e],{type:"image/svg+xml"});return await us(t)}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),s=new Blob([r]);return await us(s)}async smm(e,t){return await this.json(e,t)}async md(){const e=this.mindMap.getData(),t=h4(e),n=new Blob([t]);return await us(n)}async txt(){const e=this.mindMap.getData(),t=d4(e),n=new Blob([t]);return await us(n)}}Md.instanceName="doExport";class Sd{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(R.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.DOWN,this.onDownKeyUp)}removeShortcut(){this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.DOWN,this.onDownKeyUp)}onLeftKeyUp(){this.onKeyup(R.KEY_DIR.LEFT)}onUpKeyUp(){this.onKeyup(R.KEY_DIR.UP)}onRightKeyUp(){this.onKeyup(R.KEY_DIR.RIGHT)}onDownKeyUp(){this.onKeyup(R.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}){Pr(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===R.KEY_DIR.LEFT?d=h<=t.left:n===R.KEY_DIR.RIGHT?d=o>=t.right:n===R.KEY_DIR.UP?d=c<=t.top:n===R.KEY_DIR.DOWN&&(d=l>=t.bottom),d&&r(a,s)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Pr(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===R.KEY_DIR.LEFT?d=o<t.left&&l<t.bottom&&c>t.top:n===R.KEY_DIR.RIGHT?d=h>t.right&&l<t.bottom&&c>t.top:n===R.KEY_DIR.UP?d=l<t.top&&o<t.right&&h>t.left:n===R.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;Pr(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 b=!1;n===R.KEY_DIR.LEFT?b=g<=0&&g<=x&&g<=-x:n===R.KEY_DIR.RIGHT?b=g>0&&g>=-x&&g>=x:n===R.KEY_DIR.UP?b=x<=0&&x<g&&x<-g:n===R.KEY_DIR.DOWN&&(b=x>0&&-x<g&&x>g),b&&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()}}Sd.instanceName="keyboardNavigation";class zd{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 Td(e),this.bindEvent()}bindEvent(){this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkInNodes=Pa(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,h2(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()}};Pr(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()}}zd.instanceName="select";const u4="@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}',f4=1440*60*1e3;function Lr(i,e=Date.now()){return i.pro||(i.trialUntil??0)>e}function p4(i,e=Date.now()){const t=(i.trialUntil??0)-e;return t>0?Math.ceil(t/f4):0}const m4=/^(\s*)([-*+]|\d+[.)])(\s+)(.*)$/,g4=/^(#{1,6})\s+(.*?)\s*#*\s*$/,ta=/^\s*(```|~~~)/,yh=i=>i.length-i.trimStart().length,wh=i=>i.trim()==="";function v4(i,e="Untitled"){const t=i.replace(/\r\n?/g,`
|
|
292
|
+
`},()=>{},!0),e};class Md{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&&Yf(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 jl(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(tr.EXPORT_LOAD_IMAGE_ERROR,x)}if(this.mindMap.richText){const x=h.find("foreignObject");if(x.length>0&&(x[0].add(pt(`<style>${s}</style>`)),f=!0),this.mindMap.formula&&h.find(".ql-formula").length>0){const M=this.mindMap.formula.getStyleText();if(M){const E=document.createElement("style");E.innerHTML=M,er(E),x[0].add(E),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 b=0,M=0;const{backgroundImage:E}=this.mindMap.themeConfig;if(r&&E&&!t){const G=await new Promise(ie=>{const Q=new Image;Q.onload=()=>{ie([Q.width,Q.height])},Q.onerror=()=>{ie(null)},Q.src=E});if(G){const ie=m/v,Q=G[0]/G[1];ie>Q?(b=m,M=m/Q):(M=v,b=v*Q)}}let C=(b||m)*f,N=(M||v)*f;if(C>a||N>a){let G=null,ie=null;C>a?G=a:N>a&&(ie=a);const Q=ud(C,N,G,ie);C=Q[0],N=Q[1]}d.width=C,d.height=N;const O=C/f,B=N/f;d.style.width=O+"px",d.style.height=B+"px";const $=d.getContext("2d");$.scale(f,f),t||await this.drawBackgroundToCanvas($,O,B);const Y=b>0?(b-m)/2:0,ne=M>0?(M-v)/2:0;n?$.drawImage(c,n.left,n.top,n.width,n.height,g+Y,x+ne,n.width,n.height):$.drawImage(c,Y,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(),a4(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 jl(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 us(n)}async svg(e){this.mindMap.renderer.textEdit.hideEditTextBox();const{node:t}=await this.getSvgData();t.first().before(pt(`<title>${e}</title>`)),await this.drawBackgroundToSvg(t);const n=t.svg();return await this.fixSvgStrAndToBlob(n)}async fixSvgStrAndToBlob(e){e=Jf(e),e=f2(e);const t=new Blob([e],{type:"image/svg+xml"});return await us(t)}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),s=new Blob([r]);return await us(s)}async smm(e,t){return await this.json(e,t)}async md(){const e=this.mindMap.getData(),t=h4(e),n=new Blob([t]);return await us(n)}async txt(){const e=this.mindMap.getData(),t=d4(e),n=new Blob([t]);return await us(n)}}Md.instanceName="doExport";class Sd{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(R.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.addShortcut(R.KEY_DIR.DOWN,this.onDownKeyUp)}removeShortcut(){this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.removeShortcut(R.KEY_DIR.DOWN,this.onDownKeyUp)}onLeftKeyUp(){this.onKeyup(R.KEY_DIR.LEFT)}onUpKeyUp(){this.onKeyup(R.KEY_DIR.UP)}onRightKeyUp(){this.onKeyup(R.KEY_DIR.RIGHT)}onDownKeyUp(){this.onKeyup(R.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}){Pr(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===R.KEY_DIR.LEFT?d=h<=t.left:n===R.KEY_DIR.RIGHT?d=o>=t.right:n===R.KEY_DIR.UP?d=c<=t.top:n===R.KEY_DIR.DOWN&&(d=l>=t.bottom),d&&r(a,s)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Pr(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===R.KEY_DIR.LEFT?d=o<t.left&&l<t.bottom&&c>t.top:n===R.KEY_DIR.RIGHT?d=h>t.right&&l<t.bottom&&c>t.top:n===R.KEY_DIR.UP?d=l<t.top&&o<t.right&&h>t.left:n===R.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;Pr(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 b=!1;n===R.KEY_DIR.LEFT?b=g<=0&&g<=x&&g<=-x:n===R.KEY_DIR.RIGHT?b=g>0&&g>=-x&&g>=x:n===R.KEY_DIR.UP?b=x<=0&&x<g&&x<-g:n===R.KEY_DIR.DOWN&&(b=x>0&&-x<g&&x>g),b&&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()}}Sd.instanceName="keyboardNavigation";class zd{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 Td(e),this.bindEvent()}bindEvent(){this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkInNodes=Pa(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,h2(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()}};Pr(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()}}zd.instanceName="select";const u4="@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}',f4=1440*60*1e3;function Wn(i,e=Date.now()){return i.pro||(i.trialUntil??0)>e}function p4(i,e=Date.now()){const t=(i.trialUntil??0)-e;return t>0?Math.ceil(t/f4):0}const m4=/^(\s*)([-*+]|\d+[.)])(\s+)(.*)$/,g4=/^(#{1,6})\s+(.*?)\s*#*\s*$/,ta=/^\s*(```|~~~)/,yh=i=>i.length-i.trimStart().length,wh=i=>i.trim()==="";function v4(i,e="Untitled"){const t=i.replace(/\r\n?/g,`
|
|
293
293
|
`),n=t.endsWith(`
|
|
294
294
|
`),r=(n?t.slice(0,-1):t).split(`
|
|
295
295
|
`);let s="",a=0;if(r[0]==="---"){const b=r.indexOf("---",1);if(b>0){s=r.slice(0,b+1).join(`
|
|
@@ -307,8 +307,8 @@ ${n}---
|
|
|
307
307
|
`;const r=i.match(y0);if(!r)return i.replace(/---\n$/,`inkmap:
|
|
308
308
|
${n}---
|
|
309
309
|
`);const s=new RegExp(`^[ \\t]+${e}:.*\\n`,"m"),a=s.test(r[1])?r[1].replace(s,n):r[1]+n;return i.replace(y0,`inkmap:
|
|
310
|
-
${a}`)}function w0(i){const e=Cd(i);return{md:i,rich:e,text:e?x0(i)||" ":i}}function Nd(i,e,t=[],n=0){const r=[...t,i.md];return{data:{...w0(i.md),kind:i.kind,level:i.level,marker:i.marker,blankBefore:i.blankBefore,expand:i.children.length?e(r,n):!0},children:i.children.map(s=>Nd(s,e,r,n+1))}}const
|
|
311
|
-
`);function Ld(i,e){const{data:t}=i,n={md:Ai(t),kind:t.kind??"item",level:t.level,marker:t.marker,blankBefore:t.blankBefore,children:(i.children??[]).map(r=>Ld(r,e))};return e&&t.uid&&e.set(n,t.uid),n}function ia(i,e,t){return{...i,root:Ld(e,t)}}function Ad(i,e=new Map,t=[]){const n=[...t,Ai(i.data)];return e.set(n.join("\0"),i.data.expand!==!1),(i.children??[]).forEach(r=>Ad(r,e,n)),e}function _d(i,e={},t=[]){var r;const n=[...t,Ai(i.data)];return(r=i.children)!=null&&r.length&&(e[n.join("\0")]=i.data.expand!==!1,i.children.forEach(s=>_d(s,e,n))),e}const Rd=".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-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 ul,.ink-node ol{margin:0;padding-left:1.4em}.ink-node em{font-style:normal;opacity:.65}.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:12px/1.5 ui-monospace,Menlo,monospace;white-space:pre}.ink-node pre code{background:none;padding:0;font-weight:400}.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;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 y4(i,e){const n=document.querySelector("#phone-sign-in-template").content.firstElementChild.cloneNode(!0),r=n.querySelector("#phone-sign-in-title"),s=n.querySelector(".phone-sign-in-sub"),a=n.querySelector("#sign-in-phone"),o=n.querySelector("#sign-in-code"),l=n.querySelector("#send-phone-code"),h=n.querySelector("button[type=submit]"),c=n.querySelector("#cancel-phone-sign-in"),d=n.querySelector("#phone-sign-in-status");let f=!1,m=!1,v=!1,g,x=0,b=0,M,E=0,C="",N;function O(){window.clearTimeout(b);const Y=Math.max(0,Math.ceil((x-Date.now())/1e3));r.textContent=ee(v?"phoneSignInForPay":"phoneSignIn"),s.textContent=ee(v?"phoneSignInForPaySub":"phoneSignInSub"),h.textContent=ee(v?"phoneVerifyAndPay":"phoneVerifySubmit"),l.textContent=Y?ee("resendPhoneCode",{seconds:Y}):ee("sendPhoneCode"),l.disabled=f||Y>0,h.disabled=f,c.disabled=m,a.readOnly=o.readOnly=f,d.hidden=!N,N&&(d.textContent=ee(N.key),d.dataset.state=N.error?"error":""),n.isConnected&&Y&&(b=window.setTimeout(O,1e3))}function B(){X0(n),c.setAttribute("aria-label",ee("close")),O()}function H(Y=!1){n.isConnected&&(E++,n.remove(),n.reset(),window.clearTimeout(b),f=!1,m=!1,v=!1,g=void 0,C="",N=void 0,Y&&(M==null||M.focus()),M=void 0)}function W(Y,ne){Y==="rateLimited"&&(x=Date.now()+6e4),N={key:Y==="rateLimited"?"phoneRateLimited":Y==="unavailable"?"phoneSignInUnavailable":ne?"phoneCodeInvalid":"phoneInvalid",error:!0}}function ie(Y=!1){const ne=a.value.normalize("NFKC").trim();if(ne.includes("@")){const J=ne.toLowerCase();if(J.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(J))return J;Y||(W("invalid",!1),O(),a.focus());return}const V=ne.replace(/[\s\-–‑]/g,"").replace(/^(?:\+86|0086|86(?=1\d{10}$))/,"");if(/^1[3-9]\d{9}$/.test(V))return V;Y||(W("invalid",!1),O(),a.focus())}async function $(Y=!1){if(f)return;const ne=ie(Y);if(!ne)return;const V=o.value.replace(/\D+/g,"").slice(0,6);if(V.length!==6){Y||(W("invalid",!0),O(),o.focus());return}const J=++E;f=m=!0,N=void 0,O();const he=await i.verify(ne,V).catch(()=>({ok:!1,reason:"unavailable"}));if(J===E){if(f=m=!1,he.ok){const ue=g;H(),e(he.value),ue==null||ue(he.value);return}W(he.reason,!0),O(),o.select()}}return l.addEventListener("click",async()=>{const Y=ie();if(!Y||f||Date.now()<x)return;const ne=++E;f=!0,C="",N=void 0,O();const V=await i.send(Y).catch(()=>({ok:!1,reason:"unavailable"}));(V.ok||V.reason==="rateLimited")&&(x=Date.now()+6e4),ne===E&&(f=!1,V.ok?(N={key:"phoneCodeSent",error:!1},o.focus()):W(V.reason,!1),O())}),n.addEventListener("submit",Y=>{Y.preventDefault(),$(!1)}),h.addEventListener("click",Y=>{Y.preventDefault(),$(!1)}),a.addEventListener("input",()=>{C=""}),o.addEventListener("input",()=>{const Y=o.value.replace(/\D+/g,"").slice(0,6);if(o.value!==Y&&(o.value=Y),Y.length<6){C="";return}const ne=`${a.value.trim()}:${Y}`;Y.length===6&&!f&&ne!==C&&ie(!0)&&(C=ne,$(!0))}),c.addEventListener("click",()=>H(!0)),{open(Y,ne,V){H(),M=ne,v=!!(V!=null&&V.forPurchase),g=V==null?void 0:V.onVerified,Y.append(n),B(),a.focus()},close:H,isOpen:()=>n.isConnected,isVerifying:()=>m,refreshLanguage:B}}function w4(i){return i%10===0?"¥"+(i/100).toFixed(1):"¥"+(i/100).toFixed(2)}function b4(i=1500){return i%100===0?"$"+String(i/100):"$"+(i/100).toFixed(2)}function k4(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"),b=a.querySelector("#wechat-pay-expires"),M=a.querySelector("#close-wechat-pay");let E,C,N=0,O=0,B=0,H=!1;function W(){if(!E)return;const ne=E.mode==="card";a.dataset.mode=ne?"card":"qr",o.textContent=ee(ne?"cardPayTitle":"wechatPayTitle"),l.textContent=ee(ne?"cardPaySub":"wechatPaySub");const V=t();if(h.hidden=!V,V&&(h.textContent=ee("wechatPayAccount",{account:V})),E.mode==="card"){c.textContent=b4(E.amountCents??1500),d.hidden=!0,g.hidden=!1,x.textContent=ee("cardPayBtn"),b.textContent=ee("cardPayWaiting");return}c.textContent=w4(E.amountFen),d.hidden=!1,g.hidden=!0,f.getAttribute("src")!==E.qr&&(f.src=E.qr);const J=E.expiresAt?Date.parse(E.expiresAt):NaN,he=Number.isFinite(J)&&J<=Date.now();if(m.hidden=!he,v.disabled=H,he)b.textContent=ee("wechatPayExpired");else if(Number.isFinite(J)){const ue=new Intl.DateTimeFormat(ui()==="zh"?"zh-CN":"en-US",{hour:"2-digit",minute:"2-digit"}).format(J);b.textContent=ee("wechatPayWaiting",{time:ue})}else b.textContent=ee("wechatPayWaitingSimple")}function ie(){if(window.clearTimeout(N),window.clearTimeout(O),!a.isConnected||!E)return;const ne=B;if(E.mode!=="card"){const V=E.expiresAt?Date.parse(E.expiresAt):NaN;if(Number.isFinite(V)){const J=V-Date.now();if(J<=0){W();return}O=window.setTimeout(()=>{ne===B&&W()},J+50)}}N=window.setTimeout(async()=>{if(!(ne!==B||!a.isConnected||!E)){try{if(E.mode==="card"){const V=await e();if(ne!==B||!a.isConnected)return;if(V.pro){Y(),n(V);return}}else{const V=await i();if(ne!==B||!a.isConnected)return;if(V.status==="active"){Y(),n(V.state);return}V.status==="qr"&&ui()==="zh"&&(E={mode:"qr",...V},W())}}catch{}ne===B&&a.isConnected&&ie()}},4e3)}function $(){X0(a),M.setAttribute("aria-label",ee("close")),W()}function Y(ne=!1){a.isConnected&&(B++,window.clearTimeout(N),window.clearTimeout(O),a.remove(),E=void 0,H=!1,ne&&(C!=null&&C.getClientRects().length)&&C.focus(),C=void 0)}return v.addEventListener("click",async()=>{if(H)return;const ne=++B;H=!0,W();try{const V=await i();if(ne!==B||!a.isConnected)return;if(V.status==="active"){Y(),n(V.state);return}V.status==="qr"&&ui()==="zh"&&(E={mode:"qr",...V})}catch{}finally{ne===B&&(H=!1,W(),ie())}}),x.addEventListener("click",()=>{(E==null?void 0:E.mode)==="card"&&r(E.url)}),M.addEventListener("click",()=>Y(!0)),{open(ne,V,J){Y(),B++,C=V,E=J,ne.append(a),$(),ie(),(J.mode==="card"?x:M).focus()},close:Y,isOpen:()=>a.isConnected,refreshLanguage:$}}const T4=["markdown","diagram","browser","export","layouts","themes","replace","present","updates"],Le=i=>document.querySelector(i);async function E4(i,e){let t={pro:!1};const n=[];let r=0;const s=Le("#pro"),a=Le("#account"),o=Le("#account-panel"),l=Le("#account-badge"),h=Le("#account-heading"),c=Le("#account-text"),d=Le("#account-plan-status"),f=Le("#account-plan-title"),m=Le("#account-plan-detail"),v=Le("#account-perks"),g=Le("#account-actions"),x=Le("#account-message"),b=Le("#account-buy"),M=Le("#account-sign-in"),E=Le("#switch-account"),C=Le("#sign-out"),N=Le("#upgrade"),O=Le("#bar"),B=N.querySelector(".upgrade-card"),H=Le("#checkout-msg"),W=Le("#buy-pro"),ie=Le("#upgrade-sign-in"),$=Le("#upgrade-account-actions"),Y=Le("#upgrade-account"),ne=Le("#upgrade-switch-account"),V=Le("#upgrade-sign-out"),J=Le("#trial-status"),he=Le("#trial-expired-message"),ue=Le(".upgrade-close"),je=Le(".upgrade-features"),Qe=i.capabilities.account==="purchase",_e=i.capabilities.account!=="none",Xe=[b,M,E,C,W,ie,ne,V];let ht=!1,st=null;const Be=()=>!!(t.connected||t.pro||t.account),xt=()=>[W,ie,ne].find(G=>G.getClientRects().length&&!G.disabled)??B,te=i.phoneSignIn&&y4(i.phoneSignIn,G=>{Et(G),o.hidden?N.hidden||xt().focus():s.focus()}),Te=i.orderPro&&k4(()=>i.orderPro(),()=>i.license(),()=>t.account,G=>{Et(G),e==null||e(ee("proUnlocked"))},G=>{i.openExternalUrl?i.openExternalUrl(G):window.open(G,"_blank","noopener,noreferrer")});B.tabIndex=-1,je.hidden=!Qe;function Ri(){for(const G of T4){let oe=je.querySelector(`[data-feature="${G}"]`);oe||(oe=document.createElement("li"),oe.dataset.feature=G,je.append(oe)),oe.textContent=ee(`feature.${G}`)}}function jt(){Qe||(Le("#upgrade-title").textContent=ee("accountHeading"),Le(".upgrade-sub").textContent=ee(_e?"accountSync":"accountUnavailable"))}Ri(),jt();function Kt(G){ht=G;for(const oe of Xe)oe.disabled=G}function Tt(G,oe,ge,ze){if(G.textContent=oe,ze){const D=document.createElement("div");D.className="popup-fallback-actions";const xe=document.createElement("a");xe.className="popup-fallback-link",xe.href=ze,xe.target="_blank",xe.rel="noopener noreferrer",xe.textContent=`${ee("openLoginLink")} ↗`;const Ue=document.createElement("button");Ue.type="button",Ue.className="popup-copy-link",Ue.textContent=ee("copyLink"),Ue.addEventListener("click",()=>{var Mt;(Mt=navigator.clipboard)==null||Mt.writeText(ze).then(()=>{Ue.textContent=ee("linkCopied"),window.setTimeout(()=>{Ue.textContent=ee("copyLink")},1800)})}),D.append(xe,Ue),G.append(D)}G.dataset.state=ge,G.hidden=!1}async function ct(G,oe){if(ht||te!=null&&te.isVerifying()||(G==="buy"?!Qe:!_e))return!1;const ge=document.activeElement;Kt(!0),oe.hidden=!0;try{return await i.checkout(G),(G==="buy"?!t.pro:!Be())&&Tt(oe,ee(G==="buy"?"checkoutOpened":"signInOpened"),G==="buy"?"buy":"signIn"),!0}catch(ze){const D=String(ze instanceof Error?ze.message:ze),xe=G==="restore"?"signInFailed":"checkoutFailed",Ue=ee(xe,{error:""}).replace(/[::\s]+$/,""),Mt=ze instanceof Ko?ze.url:void 0;return Tt(oe,D.startsWith(Ue)?D:ee(xe,{error:D}),"error",Mt),!1}finally{Kt(!1),ge instanceof HTMLElement&&ge.getClientRects().length&&(document.activeElement===document.body||document.activeElement===B)&&ge.focus()}}async function Zt(G){if(!(ht||te!=null&&te.isVerifying()||!_e)){te==null||te.close(),Te==null||Te.close(),Kt(!0),G.hidden=!0;try{await i.signOut();const oe=await i.license().catch(()=>({pro:!1,trialUntil:t.trialUntil}));Et(oe),e==null||e(ee("signedOut"))}catch(oe){Tt(G,ee("signOutFailed",{error:String(oe instanceof Error?oe.message:oe)}),"error")}finally{Kt(!1),Be()||(N.hidden?M:ie).focus()}}}function Pt(G,oe,ge){ht||te!=null&&te.isVerifying()||(Te==null||Te.close(),te?(ge.hidden=!0,te.open(Le(oe),G)):ct("restore",ge))}async function Qt(G,oe,ge,ze=!1){if(!(ht||te!=null&&te.isVerifying()||!Qe)){if(!i.orderPro)return ct("buy",ge);Kt(!0),ge.hidden=!0;try{const D=await i.orderPro();if(D.status==="active"){Et(D.state),e==null||e(ee("proUnlocked"));return}if(D.status==="qr"){if(ui()==="en"){Tt(ge,"International card checkout ($15) is coming soon.","error");return}te==null||te.close(),Te==null||Te.open(Le(oe),G,{mode:"qr",...D});return}if(D.status==="needsPhone"&&te){if(ze){te.close(),Tt(ge,ee("checkoutFailed",{error:ee("signInPageUnavailable")}),"error");return}Te==null||Te.close(),te.open(Le(oe),G,{forPurchase:!0,onVerified:xe=>{xe.pro||Qt(G,oe,ge,!0)}});return}if(D.status==="redirect"){if(ui()==="zh"){Tt(ge,ee("checkoutFailed",{error:ee("signInPageUnavailable")}),"error");return}te==null||te.close(),Te&&D.url!=="about:blank"?Te.open(Le(oe),G,{mode:"card",url:D.url,amountCents:1500}):Tt(ge,ee("checkoutOpened"),"buy");return}}catch(D){const xe=String(D instanceof Error?D.message:D),Ue=ee("checkoutFailed",{error:""}).replace(/[::\s]+$/,""),Mt=D instanceof Ko?D.url:void 0;Tt(ge,xe.startsWith(Ue)?xe:ee("checkoutFailed",{error:xe}),"error",Mt)}finally{Kt(!1)}}}b.addEventListener("click",()=>void Qt(b,"#account-phone-slot",x)),M.addEventListener("click",()=>Pt(M,"#account-phone-slot",x)),E.addEventListener("click",()=>Pt(E,"#account-phone-slot",x)),C.addEventListener("click",()=>void Zt(x)),W.addEventListener("click",()=>void Qt(W,"#upgrade-phone-slot",H)),ie.addEventListener("click",()=>Pt(ie,"#upgrade-phone-slot",H)),ne.addEventListener("click",()=>Pt(ne,"#upgrade-phone-slot",H)),V.addEventListener("click",()=>void Zt(H));function Ne(G,oe=!1){o.hidden!==!G&&(!G&&o.querySelector(".phone-sign-in")&&(te!=null&&te.isVerifying())||(o.hidden=!G,!G&&o.querySelector(".phone-sign-in")&&(te==null||te.close()),!G&&o.querySelector(".wechat-pay")&&(Te==null||Te.close()),s.setAttribute("aria-expanded",String(G)),!G&&oe&&s.focus()))}s.addEventListener("click",()=>Ne(!!o.hidden)),document.addEventListener("pointerdown",G=>{G.target instanceof Node&&!a.contains(G.target)&&Ne(!1)}),a.addEventListener("focusout",G=>{G.relatedTarget instanceof Node&&!a.contains(G.relatedTarget)&&Ne(!1)});function ai(){!Lr(t)||N.hidden||B.querySelector(".phone-sign-in")&&(te!=null&&te.isVerifying())||(B.querySelector(".phone-sign-in")&&(te==null||te.close()),B.querySelector(".wechat-pay")&&(Te==null||Te.close()),N.hidden=!0,Re(!0),(st!=null&&st.getClientRects().length?st:s).focus(),st=null)}window.addEventListener("keydown",G=>{var ge;if(G.key==="Escape"&&(Te!=null&&Te.isOpen())){G.preventDefault(),G.stopImmediatePropagation(),Te.close(!0);return}if(G.key==="Escape"&&(te!=null&&te.isOpen())){G.preventDefault(),G.stopImmediatePropagation(),te.isVerifying()||te.close(!0);return}if(G.key==="Escape"&&!o.hidden){G.preventDefault(),G.stopImmediatePropagation(),Ne(!1,!0);return}if(N.hidden)return;if(G.key==="Escape"){G.preventDefault(),G.stopImmediatePropagation(),ai();return}const oe=!Lr(t);if(G.target instanceof Node&&(N.contains(G.target)||oe&&a.contains(G.target))||(G.preventDefault(),xt().focus()),G.key==="Tab"){const ze="button:not(:disabled), input:not(:disabled), select",D=[...oe?a.querySelectorAll(ze):[],...B.querySelectorAll(ze)].filter(Ue=>Ue.getClientRects().length>0),xe=G.shiftKey?D[0]:D.at(-1);xe&&(document.activeElement===xe||document.activeElement===B)&&(G.preventDefault(),(ge=G.shiftKey?D.at(-1):D[0])==null||ge.focus())}G.stopImmediatePropagation()},!0),N.addEventListener("pointerdown",G=>G.target===N&&ai()),ue.addEventListener("click",ai);function Re(G){B.setAttribute("aria-modal",String(G));for(const oe of document.body.children)oe instanceof HTMLElement&&oe!==N&&oe.tagName!=="SCRIPT"&&(oe.inert=!N.hidden&&(G||oe!==O))}function Jt(G){var D;const oe=Lr(t),ge=te==null?void 0:te.isVerifying();if(t.pro||oe&&(ge||!Qe))return;N.hidden&&(st=document.activeElement instanceof HTMLElement?document.activeElement:null,(D=i.track)==null||D.call(i,"paywall_view")),Ne(!1);const ze=Le(".upgrade-locked");ze.hidden=!G||oe,G&&(ze.textContent=ee("locked",{feature:ee(`featureName.${G}`)})),je.querySelectorAll("li").forEach(xe=>xe.classList.toggle("highlight",xe.dataset.feature===G)),H.hidden=!0,N.hidden=!1,Re(oe),ge||xt().focus()}function Ze(){clearTimeout(r);const G=Date.now(),oe=Lr(t,G);document.documentElement.classList.toggle("trial-expired",!oe),document.documentElement.classList.toggle("pro",oe),document.documentElement.classList.toggle("pro-member",t.pro);const ge=p4(t,G),ze=!t.pro&&oe,D=ee(t.pro?"proBadge":ze?"trialBadge":"trialEnded",{days:ge}),xe=ze?new Intl.DateTimeFormat(ui()==="zh"?"zh-CN":"en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t.trialUntil):"",Ue=ze?ee("trialUntil",{date:xe}):"";l.textContent=D,s.setAttribute("aria-label",`${ee("accountHeading")} · ${D}`),s.hidden=!1,a.dataset.plan=t.pro?"pro":!ze||ge<=2?"ending":"trial",a.dataset.signedIn=String(Be()),c.textContent=t.account||ee(Be()?"accountConnected":"accountSignedOut"),h.textContent=ee(Be()?"accountHeading":Qe?"accountSignedOutSub":"accountSignedOutRestoreSub"),d.hidden=!1,f.textContent=ee(t.pro?"proActive":ze?"trialPlan":"trialEnded"),m.textContent=t.pro?ee("proActiveDetail"):ze?Ue:ee("noProOnAccount"),b.hidden=!Qe||t.pro,v.hidden=!Qe||t.pro;const Mt=Qe?"signInSecondary":te?"phoneSignIn":"signIn";for(const oi of[M,ie])oi.textContent=ee(Mt);if(M.hidden=!_e||Be(),E.hidden=!_e||!Be(),g.hidden=!_e||!Be(),!_e&&!t.pro&&Tt(x,ee("accountUnavailable"),"signIn"),ze){const oi=Math.min(Math.max(50,t.trialUntil-G+25),36e5);r=window.setTimeout(()=>{Ze(),n.forEach(Di=>Di(t))},oi)}ue.hidden=!oe,J.hidden=!ze,J.textContent=Ue,he.hidden=oe,he.textContent=ee(Qe?Be()?"trialExpiredSignedIn":"trialExpired":_e?Be()?"trialExpiredNoPro":"trialExpiredSignIn":"trialExpiredNoAccount"),W.hidden=!Qe||t.pro,ie.hidden=!_e||Be(),$.hidden=oe||!_e||!Be(),ne.hidden=$.hidden,Y.hidden=$.hidden,Y.textContent=t.account||ee("accountConnected"),Le(".upgrade-buy").hidden=W.hidden&&ie.hidden,Re(oe),t.pro?ai():!oe&&N.hidden&&Jt()}function Et(G){const oe=Be(),ge=t.pro;if(t=G,t.pro&&(Te!=null&&Te.isOpen())&&(Te.close(),ge||e==null||e(ee("proUnlocked"))),Ze(),!oe&&Be()){for(const ze of[x,H])ze.dataset.state==="signIn"&&(ze.hidden=!0);!o.hidden&&document.activeElement===document.body&&s.focus(),!N.hidden&&o.hidden&&!B.contains(document.activeElement)&&xt().focus()}n.forEach(ze=>ze(t))}let Vi=!1;i.onLicenseChange(G=>{Vi=!0,Et(G)});const dt=await i.license().catch(()=>t);return Vi||Et(dt),{isPro:()=>Lr(t),allow(G){return Lr(t)?!0:(Jt(G),!1)},openUpgrade:Jt,onChange:G=>n.push(G),refreshLanguage(){Ri(),jt(),te==null||te.refreshLanguage(),Te==null||Te.refreshLanguage(),Ze()}}}class K 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,K.prototype),this.position=r,r!=null&&s!=null&&(this.length=s-r),this.rawMessage=e}}var M4=/([A-Z])/g,S4=i=>i.replace(M4,"-$1").toLowerCase(),z4={"&":"&",">":">","<":"<",'"':""","'":"'"},C4=/[&><"']/g,$t=i=>String(i).replace(C4,e=>z4[e]),ma=i=>i.type==="ordgroup"||i.type==="color"?i.body.length===1?ma(i.body[0]):i:i.type==="font"?ma(i.body):i,N4=new Set(["mathord","textord","atom"]),pn=i=>N4.has(ma(i).type),L4=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"},b0={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 A4(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 _4(i){if(i.default!==void 0)return i.default;var e=Array.isArray(i.type)?i.type[0]:i.type;return A4(e)}function R4(i,e,t,n){var r=t[e];i[e]=r!==void 0?n.processor?n.processor(r):r:_4(n)}class fl{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(b0)){var n=b0[t];n&&R4(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 K("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=L4(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[D4[this.id]]}sub(){return Ui[I4[this.id]]}fracNum(){return Ui[O4[this.id]]}fracDen(){return Ui[B4[this.id]]}cramp(){return Ui[P4[this.id]]}text(){return Ui[F4[this.id]]}isTight(){return this.size>=2}}var pl=0,za=1,Fr=2,dn=3,Rs=4,Si=5,Gr=6,Yt=7,Ui=[new kn(pl,0,!1),new kn(za,0,!0),new kn(Fr,1,!1),new kn(dn,1,!0),new kn(Rs,2,!1),new kn(Si,2,!0),new kn(Gr,3,!1),new kn(Yt,3,!0)],D4=[Rs,Si,Rs,Si,Gr,Yt,Gr,Yt],I4=[Si,Si,Si,Si,Yt,Yt,Yt,Yt],O4=[Fr,dn,Rs,Si,Gr,Yt,Gr,Yt],B4=[dn,dn,Si,Si,Yt,Yt,Yt,Yt],P4=[za,za,dn,dn,Si,Si,Yt,Yt],F4=[pl,za,Fr,dn,Fr,dn,Fr,dn],be={DISPLAY:Ui[pl],TEXT:Ui[Fr],SCRIPT:Ui[Rs],SCRIPTSCRIPT:Ui[Gr]},k0=[{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 H4(i){for(var e=0;e<k0.length;e++)for(var t=k0[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 ga=[];k0.forEach(i=>i.blocks.forEach(e=>ga.push(...e)));function Dd(i){for(var e=0;e<ga.length;e+=2)if(i>=ga[e]&&i<=ga[e+1])return!0;return!1}var zt=i=>i+" "+i,Ar=80,U4=function(e,t){return"M95,"+(622+e+t)+`
|
|
310
|
+
${a}`)}function w0(i){const e=Cd(i);return{md:i,rich:e,text:e?x0(i)||" ":i}}function Nd(i,e,t=[],n=0){const r=[...t,i.md];return{data:{...w0(i.md),kind:i.kind,level:i.level,marker:i.marker,blankBefore:i.blankBefore,expand:i.children.length?e(r,n):!0},children:i.children.map(s=>Nd(s,e,r,n+1))}}const _i=i=>(i.rich?i.md:String(i.text??"")).replace(/\r\n?/g,`
|
|
311
|
+
`);function Ld(i,e){const{data:t}=i,n={md:_i(t),kind:t.kind??"item",level:t.level,marker:t.marker,blankBefore:t.blankBefore,children:(i.children??[]).map(r=>Ld(r,e))};return e&&t.uid&&e.set(n,t.uid),n}function ia(i,e,t){return{...i,root:Ld(e,t)}}function Ad(i,e=new Map,t=[]){const n=[...t,_i(i.data)];return e.set(n.join("\0"),i.data.expand!==!1),(i.children??[]).forEach(r=>Ad(r,e,n)),e}function _d(i,e={},t=[]){var r;const n=[...t,_i(i.data)];return(r=i.children)!=null&&r.length&&(e[n.join("\0")]=i.data.expand!==!1,i.children.forEach(s=>_d(s,e,n))),e}const Rd=".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-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 ul,.ink-node ol{margin:0;padding-left:1.4em}.ink-node em{font-style:normal;opacity:.65}.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:12px/1.5 ui-monospace,Menlo,monospace;white-space:pre}.ink-node pre code{background:none;padding:0;font-weight:400}.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;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 y4(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,b=0,M=0,E,C=0,N="",O;function B(){window.clearTimeout(M);const Q=Math.max(0,Math.ceil((b-Date.now())/1e3));s.textContent=te(g?"phoneSignInForPay":"phoneSignIn"),a.textContent=te(g?"phoneSignInForPaySub":"phoneSignInSub"),c.textContent=te(g?"phoneVerifyAndPay":"phoneVerifySubmit"),h.textContent=Q?te("resendPhoneCode",{seconds:Q}):te("sendPhoneCode"),h.disabled=m||Q>0,c.disabled=m,d.disabled=v,o.readOnly=l.readOnly=m,f.hidden=!O,O&&(f.textContent=te(O.key),f.dataset.state=O.error?"error":""),r.isConnected&&Q&&(M=window.setTimeout(B,1e3))}function $(){X0(r),d.setAttribute("aria-label",te("close")),B()}function Y(Q=!1){r.isConnected&&(C++,r.remove(),r.reset(),window.clearTimeout(M),m=!1,v=!1,g=!1,x=void 0,N="",O=void 0,Q&&(E==null||E.focus()),E=void 0)}function ne(Q,X){Q==="rateLimited"&&(b=Date.now()+6e4),O={key:Q==="rateLimited"?"phoneRateLimited":Q==="unavailable"?"phoneSignInUnavailable":X?"phoneCodeInvalid":"phoneInvalid",error:!0}}function G(Q=!1){const X=o.value.normalize("NFKC").trim();if(X.includes("@")){const le=X.toLowerCase();if(le.length<=254&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(le))return le;Q||(ne("invalid",!1),B(),o.focus());return}const j=X.replace(/[\s\-–‑]/g,"").replace(/^(?:\+86|0086|86(?=1\d{10}$))/,"");if(/^1[3-9]\d{9}$/.test(j))return j;Q||(ne("invalid",!1),B(),o.focus())}async function ie(Q=!1){if(m)return;const X=G(Q);if(!X)return;const j=l.value.replace(/\D+/g,"").slice(0,6);if(j.length!==6){Q||(ne("invalid",!0),B(),l.focus());return}const le=++C;m=v=!0,O=void 0,B();const fe=await i.verify(X,j).catch(()=>({ok:!1,reason:"unavailable"}));if(le===C){if(m=v=!1,fe.ok){const Ue=x;Y(),e(fe.value),Ue==null||Ue(fe.value);return}ne(fe.reason,!0),B(),l.select()}}return h.addEventListener("click",async()=>{const Q=G();if(!Q||m||Date.now()<b)return;const X=++C;m=!0,N="",O=void 0,B();const j=await i.send(Q).catch(()=>({ok:!1,reason:"unavailable"}));(j.ok||j.reason==="rateLimited")&&(b=Date.now()+6e4),X===C&&(m=!1,j.ok?(O={key:t&&!g&&Q.includes("@")?"phoneCodeSentMagic":"phoneCodeSent",error:!1},l.focus()):ne(j.reason,!1),B())}),r.addEventListener("submit",Q=>{Q.preventDefault(),ie(!1)}),c.addEventListener("click",Q=>{Q.preventDefault(),ie(!1)}),o.addEventListener("input",()=>{N=""}),l.addEventListener("input",()=>{const Q=l.value.replace(/\D+/g,"").slice(0,6);if(l.value!==Q&&(l.value=Q),Q.length<6){N="";return}const X=`${o.value.trim()}:${Q}`;Q.length===6&&!m&&X!==N&&G(!0)&&(N=X,ie(!0))}),d.addEventListener("click",()=>Y(!0)),{open(Q,X,j){Y(),E=X,g=!!(j!=null&&j.forPurchase),x=j==null?void 0:j.onVerified,Q.append(r),$(),o.focus()},close:Y,isOpen:()=>r.isConnected,isVerifying:()=>v,refreshLanguage:$}}function w4(i){return i%10===0?"¥"+(i/100).toFixed(1):"¥"+(i/100).toFixed(2)}function b4(i=1500){return i%100===0?"$"+String(i/100):"$"+(i/100).toFixed(2)}function k4(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"),b=a.querySelector("#wechat-pay-expires"),M=a.querySelector("#close-wechat-pay");let E,C,N=0,O=0,B=0,$=!1;function Y(){if(!E)return;const Q=E.mode==="card";a.dataset.mode=Q?"card":"qr",o.textContent=te(Q?"cardPayTitle":"wechatPayTitle"),l.textContent=te(Q?"cardPaySub":"wechatPaySub");const X=t();if(h.hidden=!X,X&&(h.textContent=te("wechatPayAccount",{account:X})),E.mode==="card"){c.textContent=b4(E.amountCents??1500),d.hidden=!0,g.hidden=!1,x.textContent=te("cardPayBtn"),b.textContent=te("cardPayWaiting");return}c.textContent=w4(E.amountFen),d.hidden=!1,g.hidden=!0,f.getAttribute("src")!==E.qr&&(f.src=E.qr);const j=E.expiresAt?Date.parse(E.expiresAt):NaN,le=Number.isFinite(j)&&j<=Date.now();if(m.hidden=!le,v.disabled=$,le)b.textContent=te("wechatPayExpired");else if(Number.isFinite(j)){const fe=new Intl.DateTimeFormat(ui()==="zh"?"zh-CN":"en-US",{hour:"2-digit",minute:"2-digit"}).format(j);b.textContent=te("wechatPayWaiting",{time:fe})}else b.textContent=te("wechatPayWaitingSimple")}function ne(){if(window.clearTimeout(N),window.clearTimeout(O),!a.isConnected||!E)return;const Q=B;if(E.mode!=="card"){const X=E.expiresAt?Date.parse(E.expiresAt):NaN;if(Number.isFinite(X)){const j=X-Date.now();if(j<=0){Y();return}O=window.setTimeout(()=>{Q===B&&Y()},j+50)}}N=window.setTimeout(async()=>{if(!(Q!==B||!a.isConnected||!E)){try{if(E.mode==="card"){const X=await e();if(Q!==B||!a.isConnected)return;if(X.pro){ie(),n(X);return}}else{const X=await i();if(Q!==B||!a.isConnected)return;if(X.status==="active"){ie(),n(X.state);return}X.status==="qr"&&ui()==="zh"&&(E={mode:"qr",...X},Y())}}catch{}Q===B&&a.isConnected&&ne()}},4e3)}function G(){X0(a),M.setAttribute("aria-label",te("close")),Y()}function ie(Q=!1){a.isConnected&&(B++,window.clearTimeout(N),window.clearTimeout(O),a.remove(),E=void 0,$=!1,Q&&(C!=null&&C.getClientRects().length)&&C.focus(),C=void 0)}return v.addEventListener("click",async()=>{if($)return;const Q=++B;$=!0,Y();try{const X=await i();if(Q!==B||!a.isConnected)return;if(X.status==="active"){ie(),n(X.state);return}X.status==="qr"&&ui()==="zh"&&(E={mode:"qr",...X})}catch{}finally{Q===B&&($=!1,Y(),ne())}}),x.addEventListener("click",()=>{(E==null?void 0:E.mode)==="card"&&r(E.url)}),M.addEventListener("click",()=>ie(!0)),{open(Q,X,j){ie(),B++,C=X,E=j,Q.append(a),G(),ne(),(j.mode==="card"?x:M).focus()},close:ie,isOpen:()=>a.isConnected,refreshLanguage:G}}const T4=["markdown","diagram","browser","export","layouts","themes","replace","present","updates"],Le=i=>document.querySelector(i);async function E4(i,e){var oi;let t={pro:!1};const n=[];let r=0;const s=Le("#pro"),a=Le("#account"),o=Le("#account-panel"),l=Le("#account-badge"),h=Le("#account-heading"),c=Le("#account-text"),d=Le("#account-plan-status"),f=Le("#account-plan-title"),m=Le("#account-plan-detail"),v=Le("#account-perks"),g=Le("#account-actions"),x=Le("#account-message"),b=Le("#account-buy"),M=Le("#account-sign-in"),E=Le("#switch-account"),C=Le("#sign-out"),N=Le("#upgrade"),O=Le("#bar"),B=N.querySelector(".upgrade-card"),$=Le("#checkout-msg"),Y=Le("#buy-pro"),ne=Le("#upgrade-sign-in"),G=Le("#upgrade-account-actions"),ie=Le("#upgrade-account"),Q=Le("#upgrade-switch-account"),X=Le("#upgrade-sign-out"),j=Le("#trial-status"),le=Le("#trial-expired-message"),fe=Le(".upgrade-close"),Ue=Le(".upgrade-features"),Ze=i.capabilities.account==="purchase",_e=i.capabilities.account!=="none",Xe=[b,M,E,C,Y,ne,Q,X];let ht=!1,st=null;const Ie=()=>!!(t.connected||t.pro||t.account),xt=()=>[Y,ne,Q].find(U=>U.getClientRects().length&&!U.disabled)??B,J=i.phoneSignIn&&y4(i.phoneSignIn,U=>{Et(U),o.hidden?N.hidden||xt().focus():s.focus()},!Ze),ke=i.orderPro&&k4(()=>i.orderPro(),()=>i.license(),()=>t.account,U=>{Et(U),e==null||e(te("proUnlocked"))},U=>{i.openExternalUrl?i.openExternalUrl(U):window.open(U,"_blank","noopener,noreferrer")});B.tabIndex=-1,Ue.hidden=!Ze;function Di(){for(const U of T4){let re=Ue.querySelector(`[data-feature="${U}"]`);re||(re=document.createElement("li"),re.dataset.feature=U,Ue.append(re)),re.textContent=te(`feature.${U}`)}}function Kt(){Ze||(Le("#upgrade-title").textContent=te("accountHeading"),Le(".upgrade-sub").textContent=te(_e?"accountSync":"accountUnavailable"))}Di(),Kt();function Zt(U){ht=U;for(const re of Xe)re.disabled=U}function Tt(U,re,Ne,D){if(U.textContent=re,D){const de=document.createElement("div");de.className="popup-fallback-actions";const Ce=document.createElement("a");Ce.className="popup-fallback-link",Ce.href=D,Ce.target="_blank",Ce.rel="noopener noreferrer",Ce.textContent=`${te("openLoginLink")} ↗`;const je=document.createElement("button");je.type="button",je.className="popup-copy-link",je.textContent=te("copyLink"),je.addEventListener("click",()=>{var Ct;(Ct=navigator.clipboard)==null||Ct.writeText(D).then(()=>{je.textContent=te("linkCopied"),window.setTimeout(()=>{je.textContent=te("copyLink")},1800)})}),de.append(Ce,je),U.append(de)}U.dataset.state=Ne,U.hidden=!1}async function ct(U,re){if(ht||J!=null&&J.isVerifying()||(U==="buy"?!Ze:!_e))return!1;const Ne=document.activeElement;Zt(!0),re.hidden=!0;try{return await i.checkout(U),(U==="buy"?!t.pro:!Ie())&&Tt(re,te(U==="buy"?"checkoutOpened":"signInOpened"),U==="buy"?"buy":"signIn"),!0}catch(D){const de=String(D instanceof Error?D.message:D),Ce=U==="restore"?"signInFailed":"checkoutFailed",je=te(Ce,{error:""}).replace(/[::\s]+$/,""),Ct=D instanceof Ko?D.url:void 0;return Tt(re,de.startsWith(je)?de:te(Ce,{error:de}),"error",Ct),!1}finally{Zt(!1),Ne instanceof HTMLElement&&Ne.getClientRects().length&&(document.activeElement===document.body||document.activeElement===B)&&Ne.focus()}}async function Qt(U){if(!(ht||J!=null&&J.isVerifying()||!_e)){J==null||J.close(),ke==null||ke.close(),Zt(!0),U.hidden=!0;try{await i.signOut();const re=await i.license().catch(()=>({pro:!1,trialUntil:t.trialUntil}));Et(re),e==null||e(te("signedOut"))}catch(re){Tt(U,te("signOutFailed",{error:String(re instanceof Error?re.message:re)}),"error")}finally{Zt(!1),Ie()||(N.hidden?M:ne).focus()}}}function Pt(U,re,Ne){ht||J!=null&&J.isVerifying()||(ke==null||ke.close(),J?(Ne.hidden=!0,J.open(Le(re),U)):ct("restore",Ne))}async function Jt(U,re,Ne,D=!1){if(!(ht||J!=null&&J.isVerifying()||!Ze)){if(!i.orderPro)return ct("buy",Ne);Zt(!0),Ne.hidden=!0;try{const de=await i.orderPro();if(de.status==="active"){Et(de.state),e==null||e(te("proUnlocked"));return}if(de.status==="qr"){if(ui()==="en"){Tt(Ne,"International card checkout ($15) is coming soon.","error");return}J==null||J.close(),ke==null||ke.open(Le(re),U,{mode:"qr",...de});return}if(de.status==="needsPhone"&&J){if(D){J.close(),Tt(Ne,te("checkoutFailed",{error:te("signInPageUnavailable")}),"error");return}ke==null||ke.close(),J.open(Le(re),U,{forPurchase:!0,onVerified:Ce=>{Ce.pro||Jt(U,re,Ne,!0)}});return}if(de.status==="redirect"){if(ui()==="zh"){Tt(Ne,te("checkoutFailed",{error:te("signInPageUnavailable")}),"error");return}J==null||J.close(),ke&&de.url!=="about:blank"?ke.open(Le(re),U,{mode:"card",url:de.url,amountCents:1500}):Tt(Ne,te("checkoutOpened"),"buy");return}}catch(de){const Ce=String(de instanceof Error?de.message:de),je=te("checkoutFailed",{error:""}).replace(/[::\s]+$/,""),Ct=de instanceof Ko?de.url:void 0;Tt(Ne,Ce.startsWith(je)?Ce:te("checkoutFailed",{error:Ce}),"error",Ct)}finally{Zt(!1)}}}b.addEventListener("click",()=>void Jt(b,"#account-phone-slot",x)),M.addEventListener("click",()=>Pt(M,"#account-phone-slot",x)),E.addEventListener("click",()=>Pt(E,"#account-phone-slot",x)),C.addEventListener("click",()=>void Qt(x)),Y.addEventListener("click",()=>void Jt(Y,"#upgrade-phone-slot",$)),ne.addEventListener("click",()=>Pt(ne,"#upgrade-phone-slot",$)),Q.addEventListener("click",()=>Pt(Q,"#upgrade-phone-slot",$)),X.addEventListener("click",()=>void Qt($));function ze(U,re=!1){o.hidden!==!U&&(!U&&o.querySelector(".phone-sign-in")&&(J!=null&&J.isVerifying())||(o.hidden=!U,!U&&o.querySelector(".phone-sign-in")&&(J==null||J.close()),!U&&o.querySelector(".wechat-pay")&&(ke==null||ke.close()),s.setAttribute("aria-expanded",String(U)),!U&&re&&s.focus()))}s.addEventListener("click",()=>ze(!!o.hidden)),document.addEventListener("pointerdown",U=>{U.target instanceof Node&&!a.contains(U.target)&&ze(!1)}),a.addEventListener("focusout",U=>{U.relatedTarget instanceof Node&&!a.contains(U.relatedTarget)&&ze(!1)});function ai(){!Wn(t)||N.hidden||B.querySelector(".phone-sign-in")&&(J!=null&&J.isVerifying())||(B.querySelector(".phone-sign-in")&&(J==null||J.close()),B.querySelector(".wechat-pay")&&(ke==null||ke.close()),N.hidden=!0,Re(!0),(st!=null&&st.getClientRects().length?st:s).focus(),st=null)}window.addEventListener("keydown",U=>{var Ne;if(U.key==="Escape"&&(ke!=null&&ke.isOpen())){U.preventDefault(),U.stopImmediatePropagation(),ke.close(!0);return}if(U.key==="Escape"&&(J!=null&&J.isOpen())){U.preventDefault(),U.stopImmediatePropagation(),J.isVerifying()||J.close(!0);return}if(U.key==="Escape"&&!o.hidden){U.preventDefault(),U.stopImmediatePropagation(),ze(!1,!0);return}if(N.hidden)return;if(U.key==="Escape"){U.preventDefault(),U.stopImmediatePropagation(),ai();return}const re=!Wn(t);if(U.target instanceof Node&&(N.contains(U.target)||re&&a.contains(U.target))||(U.preventDefault(),xt().focus()),U.key==="Tab"){const D="button:not(:disabled), input:not(:disabled), select",de=[...re?a.querySelectorAll(D):[],...B.querySelectorAll(D)].filter(je=>je.getClientRects().length>0),Ce=U.shiftKey?de[0]:de.at(-1);Ce&&(document.activeElement===Ce||document.activeElement===B)&&(U.preventDefault(),(Ne=U.shiftKey?de.at(-1):de[0])==null||Ne.focus())}U.stopImmediatePropagation()},!0),N.addEventListener("pointerdown",U=>U.target===N&&ai()),fe.addEventListener("click",ai);function Re(U){B.setAttribute("aria-modal",String(U));for(const re of document.body.children)re instanceof HTMLElement&&re!==N&&re.tagName!=="SCRIPT"&&(re.inert=!N.hidden&&(U||re!==O))}function Gt(U){var de;const re=Wn(t),Ne=J==null?void 0:J.isVerifying();if(t.pro||re&&(Ne||!Ze))return;N.hidden&&(st=document.activeElement instanceof HTMLElement?document.activeElement:null,(de=i.track)==null||de.call(i,"paywall_view")),ze(!1);const D=Le(".upgrade-locked");D.hidden=!U||re,U&&(D.textContent=te("locked",{feature:te(`featureName.${U}`)})),Ue.querySelectorAll("li").forEach(Ce=>Ce.classList.toggle("highlight",Ce.dataset.feature===U)),$.hidden=!0,N.hidden=!1,Re(re),Ne||xt().focus()}function Qe(){clearTimeout(r);const U=Date.now(),re=Wn(t,U);document.documentElement.classList.toggle("trial-expired",!re),document.documentElement.classList.toggle("pro",re),document.documentElement.classList.toggle("pro-member",t.pro);const Ne=p4(t,U),D=!t.pro&&re,de=te(t.pro?"proBadge":D?"trialBadge":"trialEnded",{days:Ne}),Ce=D?new Intl.DateTimeFormat(ui()==="zh"?"zh-CN":"en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t.trialUntil):"",je=D?te("trialUntil",{date:Ce}):"";l.textContent=de,s.setAttribute("aria-label",`${te("accountHeading")} · ${de}`),s.hidden=!1,a.dataset.plan=t.pro?"pro":!D||Ne<=2?"ending":"trial",a.dataset.signedIn=String(Ie()),c.textContent=t.account||te(Ie()?"accountConnected":"accountSignedOut"),h.textContent=te(Ie()?"accountHeading":Ze?"accountSignedOutSub":"accountSignedOutRestoreSub"),d.hidden=!1,f.textContent=te(t.pro?"proActive":D?"trialPlan":"trialEnded"),m.textContent=t.pro?te("proActiveDetail"):D?je:te("noProOnAccount"),b.hidden=!Ze||t.pro,v.hidden=!Ze||t.pro;const Ct=Ze?"signInSecondary":J?"phoneSignIn":"signIn";for(const wi of[M,ne])wi.textContent=te(Ct);if(M.hidden=!_e||Ie(),E.hidden=!_e||!Ie(),g.hidden=!_e||!Ie(),!_e&&!t.pro&&Tt(x,te("accountUnavailable"),"signIn"),D){const wi=Math.min(Math.max(50,t.trialUntil-U+25),36e5);r=window.setTimeout(()=>{Qe(),n.forEach(vn=>vn(t))},wi)}fe.hidden=!re,j.hidden=!D,j.textContent=je,le.hidden=re,le.textContent=te(Ze?Ie()?"trialExpiredSignedIn":"trialExpired":_e?Ie()?"trialExpiredNoPro":"trialExpiredSignIn":"trialExpiredNoAccount"),Y.hidden=!Ze||t.pro,ne.hidden=!_e||Ie(),G.hidden=re||!_e||!Ie(),Q.hidden=G.hidden,ie.hidden=G.hidden,ie.textContent=t.account||te("accountConnected"),Le(".upgrade-buy").hidden=Y.hidden&&ne.hidden,Re(re),t.pro?ai():!re&&N.hidden&&Gt()}function Et(U){const re=Ie(),Ne=t.pro;t=U;const D=!re&&Ie()&&!!(J!=null&&J.isOpen());if(D&&(J==null||J.close()),t.pro&&(ke!=null&&ke.isOpen())&&ke.close(),!Ne&&t.pro?e==null||e(te("proUnlocked")):D&&(e==null||e(te("magicSignedIn"))),Qe(),!re&&Ie()){for(const de of[x,$])de.dataset.state==="signIn"&&(de.hidden=!0);!o.hidden&&document.activeElement===document.body&&s.focus(),!N.hidden&&o.hidden&&!B.contains(document.activeElement)&&xt().focus()}n.forEach(de=>de(t))}let Vi=!1;i.onLicenseChange(U=>{Vi=!0,Et(U)}),(oi=i.onOpenAccountRequest)==null||oi.call(i,()=>{Wn(t)?ze(!0,!0):Gt()});const dt=await i.license().catch(()=>t);return Vi||Et(dt),{isPro:()=>Wn(t),allow(U){return Wn(t)?!0:(Gt(U),!1)},openUpgrade:Gt,onChange:U=>n.push(U),refreshLanguage(){Di(),Kt(),J==null||J.refreshLanguage(),ke==null||ke.refreshLanguage(),Qe()}}}class K 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,K.prototype),this.position=r,r!=null&&s!=null&&(this.length=s-r),this.rawMessage=e}}var M4=/([A-Z])/g,S4=i=>i.replace(M4,"-$1").toLowerCase(),z4={"&":"&",">":">","<":"<",'"':""","'":"'"},C4=/[&><"']/g,$t=i=>String(i).replace(C4,e=>z4[e]),ma=i=>i.type==="ordgroup"||i.type==="color"?i.body.length===1?ma(i.body[0]):i:i.type==="font"?ma(i.body):i,N4=new Set(["mathord","textord","atom"]),pn=i=>N4.has(ma(i).type),L4=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"},b0={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 A4(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 _4(i){if(i.default!==void 0)return i.default;var e=Array.isArray(i.type)?i.type[0]:i.type;return A4(e)}function R4(i,e,t,n){var r=t[e];i[e]=r!==void 0?n.processor?n.processor(r):r:_4(n)}class fl{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(b0)){var n=b0[t];n&&R4(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 K("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=L4(e.url);if(t==null)return!1;e.protocol=t}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class Tn{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[D4[this.id]]}sub(){return Ui[I4[this.id]]}fracNum(){return Ui[O4[this.id]]}fracDen(){return Ui[B4[this.id]]}cramp(){return Ui[P4[this.id]]}text(){return Ui[F4[this.id]]}isTight(){return this.size>=2}}var pl=0,za=1,Fr=2,dn=3,Rs=4,zi=5,Gr=6,Xt=7,Ui=[new Tn(pl,0,!1),new Tn(za,0,!0),new Tn(Fr,1,!1),new Tn(dn,1,!0),new Tn(Rs,2,!1),new Tn(zi,2,!0),new Tn(Gr,3,!1),new Tn(Xt,3,!0)],D4=[Rs,zi,Rs,zi,Gr,Xt,Gr,Xt],I4=[zi,zi,zi,zi,Xt,Xt,Xt,Xt],O4=[Fr,dn,Rs,zi,Gr,Xt,Gr,Xt],B4=[dn,dn,zi,zi,Xt,Xt,Xt,Xt],P4=[za,za,dn,dn,zi,zi,Xt,Xt],F4=[pl,za,Fr,dn,Fr,dn,Fr,dn],we={DISPLAY:Ui[pl],TEXT:Ui[Fr],SCRIPT:Ui[Rs],SCRIPTSCRIPT:Ui[Gr]},k0=[{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 H4(i){for(var e=0;e<k0.length;e++)for(var t=k0[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 ga=[];k0.forEach(i=>i.blocks.forEach(e=>ga.push(...e)));function Dd(i){for(var e=0;e<ga.length;e+=2)if(i>=ga[e]&&i<=ga[e+1])return!0;return!1}var St=i=>i+" "+i,Ar=80,U4=function(e,t){return"M95,"+(622+e+t)+`
|
|
312
312
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
313
313
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
314
314
|
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
|
|
@@ -359,7 +359,7 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1
|
|
|
359
359
|
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
|
|
360
360
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
361
361
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
362
|
-
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},V4=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=U4(t,Ar);break;case"sqrtSize1":r=$4(t,Ar);break;case"sqrtSize2":r=G4(t,Ar);break;case"sqrtSize3":r=q4(t,Ar);break;case"sqrtSize4":r=W4(t,Ar);break;case"sqrtTall":r=X4(t,Ar,n)}return r},j4=function(e,t){switch(e){case"⎜":return
|
|
362
|
+
219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},V4=function(e,t,n){t=1e3*t;var r="";switch(e){case"sqrtMain":r=U4(t,Ar);break;case"sqrtSize1":r=$4(t,Ar);break;case"sqrtSize2":r=G4(t,Ar);break;case"sqrtSize3":r=q4(t,Ar);break;case"sqrtSize4":r=W4(t,Ar);break;case"sqrtTall":r=X4(t,Ar,n)}return r},j4=function(e,t){switch(e){case"⎜":return St("M291 0 H417 V"+t+" H291z");case"∣":return St("M145 0 H188 V"+t+" H145z");case"∥":return St("M145 0 H188 V"+t+" H145z")+St("M367 0 H410 V"+t+" H367z");case"⎟":return St("M457 0 H583 V"+t+" H457z");case"⎢":return St("M319 0 H403 V"+t+" H319z");case"⎥":return St("M263 0 H347 V"+t+" H263z");case"⎪":return St("M384 0 H504 V"+t+" H384z");case"⏐":return St("M312 0 H355 V"+t+" H312z");case"‖":return St("M257 0 H300 V"+t+" H257z")+St("M478 0 H521 V"+t+" H478z");default:return""}},Th={doubleleftarrow:`M262 157
|
|
363
363
|
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
|
|
364
364
|
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
|
|
365
365
|
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
|
|
@@ -405,10 +405,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9
|
|
|
405
405
|
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
|
|
406
406
|
-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
|
|
407
407
|
-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
|
|
408
|
-
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:
|
|
408
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:St("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:St("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:St("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:St("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
409
409
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
410
410
|
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
|
|
411
|
-
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:
|
|
411
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:St("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
|
412
412
|
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
|
|
413
413
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
414
414
|
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
|
|
@@ -457,7 +457,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown
|
|
|
457
457
|
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
|
|
458
458
|
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
|
|
459
459
|
-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
|
|
460
|
-
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:
|
|
460
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:St("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:St("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:St("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
|
|
461
461
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
462
462
|
-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
|
|
463
463
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
@@ -558,15 +558,15 @@ 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
|
|
|
558
558
|
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
|
|
559
559
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
560
560
|
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
561
|
-
-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 Z4(i){return"toText"in i}class jr{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(Z4(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var T0={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},Q4={ex:!0,em:!0,mu:!0},Id=function(e){return typeof e!="string"&&(e=e.unit),e in T0||e in Q4||e==="ex"},lt=function(e,t){var n;if(e.unit in T0)n=T0[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 K("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Q=function(e){return+e.toFixed(4)+"em"},Ln=function(e){return e.filter(t=>t).join(" ")},ml=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=S4(n)+":"+r+";")}return t},Od=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)}},Bd=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},J4=/[\s"'>/=\x00-\x1f]/,Pd=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+$t(Ln(this.classes))+'"');var n=ml(this.style);n&&(t+=' style="'+$t(n)+'"');for(var r of Object.keys(this.attributes)){if(J4.test(r))throw new K("Invalid attribute name '"+r+"'");t+=" "+r+'="'+$t(this.attributes[r])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t};class Kr{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,Od.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Bd.call(this,"span")}toMarkup(){return Pd.call(this,"span")}}class $a{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,Od.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 Bd.call(this,"a")}toMarkup(){return Pd.call(this,"a")}}class ep{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="'+$t(this.src)+'"'+(' alt="'+$t(this.alt)+'"'),t=ml(this.style);return t&&(e+=' style="'+$t(t)+'"'),e+="'/>",e}}var tp={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class gi{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=H4(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=tp[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=Q(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+=$t(Ln(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+Q(this.italic)+";"),n+=ml(this.style),n&&(e=!0,t+=' style="'+$t(n)+'"');var r=$t(this.text);return e?(t+=">",t+=r,t+="</span>",t):r}}class un{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+'="'+$t(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",Th[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+$t(this.alternate)+'"/>':'<path d="'+$t(Th[this.pathName])+'"/>'}}class E0{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+'="'+$t(this.attributes[t])+'"';return e+="/>",e}}function ip(i){if(i instanceof gi)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function np(i){if(i instanceof Kr)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var rp=i=>i instanceof Kr||i instanceof $a||i instanceof jr,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]},Eh={Å:"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 sp(i,e){Gi[i]=e}function gl(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 Eh&&(n=Eh[i[0]].charCodeAt(0),r=Gi[e][n]),!r&&t==="text"&&Dd(n)&&(r=Gi[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var bo={};function ap(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!bo[e]){var t=bo[e]={cssEmPerMu:na.quad[e]/18};for(var n in na)na.hasOwnProperty(n)&&(t[n]=na[n][e])}return bo[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",X="text",y="main",S="ams",rt="accent-token",le="bin",Vt="close",Zr="inner",me="mathord",kt="op-token",xi="open",Hs="punct",z="rel",mn="spacing",L="textord";u(p,y,z,"≡","\\equiv",!0);u(p,y,z,"≺","\\prec",!0);u(p,y,z,"≻","\\succ",!0);u(p,y,z,"∼","\\sim",!0);u(p,y,z,"⊥","\\perp");u(p,y,z,"⪯","\\preceq",!0);u(p,y,z,"⪰","\\succeq",!0);u(p,y,z,"≃","\\simeq",!0);u(p,y,z,"∣","\\mid",!0);u(p,y,z,"≪","\\ll",!0);u(p,y,z,"≫","\\gg",!0);u(p,y,z,"≍","\\asymp",!0);u(p,y,z,"∥","\\parallel");u(p,y,z,"⋈","\\bowtie",!0);u(p,y,z,"⌣","\\smile",!0);u(p,y,z,"⊑","\\sqsubseteq",!0);u(p,y,z,"⊒","\\sqsupseteq",!0);u(p,y,z,"≐","\\doteq",!0);u(p,y,z,"⌢","\\frown",!0);u(p,y,z,"∋","\\ni",!0);u(p,y,z,"∝","\\propto",!0);u(p,y,z,"⊢","\\vdash",!0);u(p,y,z,"⊣","\\dashv",!0);u(p,y,z,"∋","\\owns");u(p,y,Hs,".","\\ldotp");u(p,y,Hs,"⋅","\\cdotp");u(p,y,Hs,"⋅","·");u(X,y,L,"⋅","·");u(p,y,L,"#","\\#");u(X,y,L,"#","\\#");u(p,y,L,"&","\\&");u(X,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(X,y,L,"§","\\S");u(p,y,L,"¶","\\P",!0);u(X,y,L,"¶","\\P");u(p,y,L,"†","\\dag");u(X,y,L,"†","\\dag");u(X,y,L,"†","\\textdagger");u(p,y,L,"‡","\\ddag");u(X,y,L,"‡","\\ddag");u(X,y,L,"‡","\\textdaggerdbl");u(p,y,Vt,"⎱","\\rmoustache",!0);u(p,y,xi,"⎰","\\lmoustache",!0);u(p,y,Vt,"⟯","\\rgroup",!0);u(p,y,xi,"⟮","\\lgroup",!0);u(p,y,le,"∓","\\mp",!0);u(p,y,le,"⊖","\\ominus",!0);u(p,y,le,"⊎","\\uplus",!0);u(p,y,le,"⊓","\\sqcap",!0);u(p,y,le,"∗","\\ast");u(p,y,le,"⊔","\\sqcup",!0);u(p,y,le,"◯","\\bigcirc",!0);u(p,y,le,"∙","\\bullet",!0);u(p,y,le,"‡","\\ddagger");u(p,y,le,"≀","\\wr",!0);u(p,y,le,"⨿","\\amalg");u(p,y,le,"&","\\And");u(p,y,z,"⟵","\\longleftarrow",!0);u(p,y,z,"⇐","\\Leftarrow",!0);u(p,y,z,"⟸","\\Longleftarrow",!0);u(p,y,z,"⟶","\\longrightarrow",!0);u(p,y,z,"⇒","\\Rightarrow",!0);u(p,y,z,"⟹","\\Longrightarrow",!0);u(p,y,z,"↔","\\leftrightarrow",!0);u(p,y,z,"⟷","\\longleftrightarrow",!0);u(p,y,z,"⇔","\\Leftrightarrow",!0);u(p,y,z,"⟺","\\Longleftrightarrow",!0);u(p,y,z,"↦","\\mapsto",!0);u(p,y,z,"⟼","\\longmapsto",!0);u(p,y,z,"↗","\\nearrow",!0);u(p,y,z,"↩","\\hookleftarrow",!0);u(p,y,z,"↪","\\hookrightarrow",!0);u(p,y,z,"↘","\\searrow",!0);u(p,y,z,"↼","\\leftharpoonup",!0);u(p,y,z,"⇀","\\rightharpoonup",!0);u(p,y,z,"↙","\\swarrow",!0);u(p,y,z,"↽","\\leftharpoondown",!0);u(p,y,z,"⇁","\\rightharpoondown",!0);u(p,y,z,"↖","\\nwarrow",!0);u(p,y,z,"⇌","\\rightleftharpoons",!0);u(p,S,z,"≮","\\nless",!0);u(p,S,z,"","\\@nleqslant");u(p,S,z,"","\\@nleqq");u(p,S,z,"⪇","\\lneq",!0);u(p,S,z,"≨","\\lneqq",!0);u(p,S,z,"","\\@lvertneqq");u(p,S,z,"⋦","\\lnsim",!0);u(p,S,z,"⪉","\\lnapprox",!0);u(p,S,z,"⊀","\\nprec",!0);u(p,S,z,"⋠","\\npreceq",!0);u(p,S,z,"⋨","\\precnsim",!0);u(p,S,z,"⪹","\\precnapprox",!0);u(p,S,z,"≁","\\nsim",!0);u(p,S,z,"","\\@nshortmid");u(p,S,z,"∤","\\nmid",!0);u(p,S,z,"⊬","\\nvdash",!0);u(p,S,z,"⊭","\\nvDash",!0);u(p,S,z,"⋪","\\ntriangleleft");u(p,S,z,"⋬","\\ntrianglelefteq",!0);u(p,S,z,"⊊","\\subsetneq",!0);u(p,S,z,"","\\@varsubsetneq");u(p,S,z,"⫋","\\subsetneqq",!0);u(p,S,z,"","\\@varsubsetneqq");u(p,S,z,"≯","\\ngtr",!0);u(p,S,z,"","\\@ngeqslant");u(p,S,z,"","\\@ngeqq");u(p,S,z,"⪈","\\gneq",!0);u(p,S,z,"≩","\\gneqq",!0);u(p,S,z,"","\\@gvertneqq");u(p,S,z,"⋧","\\gnsim",!0);u(p,S,z,"⪊","\\gnapprox",!0);u(p,S,z,"⊁","\\nsucc",!0);u(p,S,z,"⋡","\\nsucceq",!0);u(p,S,z,"⋩","\\succnsim",!0);u(p,S,z,"⪺","\\succnapprox",!0);u(p,S,z,"≆","\\ncong",!0);u(p,S,z,"","\\@nshortparallel");u(p,S,z,"∦","\\nparallel",!0);u(p,S,z,"⊯","\\nVDash",!0);u(p,S,z,"⋫","\\ntriangleright");u(p,S,z,"⋭","\\ntrianglerighteq",!0);u(p,S,z,"","\\@nsupseteqq");u(p,S,z,"⊋","\\supsetneq",!0);u(p,S,z,"","\\@varsupsetneq");u(p,S,z,"⫌","\\supsetneqq",!0);u(p,S,z,"","\\@varsupsetneqq");u(p,S,z,"⊮","\\nVdash",!0);u(p,S,z,"⪵","\\precneqq",!0);u(p,S,z,"⪶","\\succneqq",!0);u(p,S,z,"","\\@nsubseteqq");u(p,S,le,"⊴","\\unlhd");u(p,S,le,"⊵","\\unrhd");u(p,S,z,"↚","\\nleftarrow",!0);u(p,S,z,"↛","\\nrightarrow",!0);u(p,S,z,"⇍","\\nLeftarrow",!0);u(p,S,z,"⇏","\\nRightarrow",!0);u(p,S,z,"↮","\\nleftrightarrow",!0);u(p,S,z,"⇎","\\nLeftrightarrow",!0);u(p,S,z,"△","\\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(X,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(X,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(X,S,L,"¥","\\yen",!0);u(p,S,L,"✓","\\checkmark",!0);u(X,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,xi,"┌","\\@ulcorner",!0);u(p,S,Vt,"┐","\\@urcorner",!0);u(p,S,xi,"└","\\@llcorner",!0);u(p,S,Vt,"┘","\\@lrcorner",!0);u(p,S,z,"≦","\\leqq",!0);u(p,S,z,"⩽","\\leqslant",!0);u(p,S,z,"⪕","\\eqslantless",!0);u(p,S,z,"≲","\\lesssim",!0);u(p,S,z,"⪅","\\lessapprox",!0);u(p,S,z,"≊","\\approxeq",!0);u(p,S,le,"⋖","\\lessdot");u(p,S,z,"⋘","\\lll",!0);u(p,S,z,"≶","\\lessgtr",!0);u(p,S,z,"⋚","\\lesseqgtr",!0);u(p,S,z,"⪋","\\lesseqqgtr",!0);u(p,S,z,"≑","\\doteqdot");u(p,S,z,"≓","\\risingdotseq",!0);u(p,S,z,"≒","\\fallingdotseq",!0);u(p,S,z,"∽","\\backsim",!0);u(p,S,z,"⋍","\\backsimeq",!0);u(p,S,z,"⫅","\\subseteqq",!0);u(p,S,z,"⋐","\\Subset",!0);u(p,S,z,"⊏","\\sqsubset",!0);u(p,S,z,"≼","\\preccurlyeq",!0);u(p,S,z,"⋞","\\curlyeqprec",!0);u(p,S,z,"≾","\\precsim",!0);u(p,S,z,"⪷","\\precapprox",!0);u(p,S,z,"⊲","\\vartriangleleft");u(p,S,z,"⊴","\\trianglelefteq");u(p,S,z,"⊨","\\vDash",!0);u(p,S,z,"⊪","\\Vvdash",!0);u(p,S,z,"⌣","\\smallsmile");u(p,S,z,"⌢","\\smallfrown");u(p,S,z,"≏","\\bumpeq",!0);u(p,S,z,"≎","\\Bumpeq",!0);u(p,S,z,"≧","\\geqq",!0);u(p,S,z,"⩾","\\geqslant",!0);u(p,S,z,"⪖","\\eqslantgtr",!0);u(p,S,z,"≳","\\gtrsim",!0);u(p,S,z,"⪆","\\gtrapprox",!0);u(p,S,le,"⋗","\\gtrdot");u(p,S,z,"⋙","\\ggg",!0);u(p,S,z,"≷","\\gtrless",!0);u(p,S,z,"⋛","\\gtreqless",!0);u(p,S,z,"⪌","\\gtreqqless",!0);u(p,S,z,"≖","\\eqcirc",!0);u(p,S,z,"≗","\\circeq",!0);u(p,S,z,"≜","\\triangleq",!0);u(p,S,z,"∼","\\thicksim");u(p,S,z,"≈","\\thickapprox");u(p,S,z,"⫆","\\supseteqq",!0);u(p,S,z,"⋑","\\Supset",!0);u(p,S,z,"⊐","\\sqsupset",!0);u(p,S,z,"≽","\\succcurlyeq",!0);u(p,S,z,"⋟","\\curlyeqsucc",!0);u(p,S,z,"≿","\\succsim",!0);u(p,S,z,"⪸","\\succapprox",!0);u(p,S,z,"⊳","\\vartriangleright");u(p,S,z,"⊵","\\trianglerighteq");u(p,S,z,"⊩","\\Vdash",!0);u(p,S,z,"∣","\\shortmid");u(p,S,z,"∥","\\shortparallel");u(p,S,z,"≬","\\between",!0);u(p,S,z,"⋔","\\pitchfork",!0);u(p,S,z,"∝","\\varpropto");u(p,S,z,"◀","\\blacktriangleleft");u(p,S,z,"∴","\\therefore",!0);u(p,S,z,"∍","\\backepsilon");u(p,S,z,"▶","\\blacktriangleright");u(p,S,z,"∵","\\because",!0);u(p,S,z,"⋘","\\llless");u(p,S,z,"⋙","\\gggtr");u(p,S,le,"⊲","\\lhd");u(p,S,le,"⊳","\\rhd");u(p,S,z,"≂","\\eqsim",!0);u(p,y,z,"⋈","\\Join");u(p,S,z,"≑","\\Doteq",!0);u(p,S,le,"∔","\\dotplus",!0);u(p,S,le,"∖","\\smallsetminus");u(p,S,le,"⋒","\\Cap",!0);u(p,S,le,"⋓","\\Cup",!0);u(p,S,le,"⩞","\\doublebarwedge",!0);u(p,S,le,"⊟","\\boxminus",!0);u(p,S,le,"⊞","\\boxplus",!0);u(p,S,le,"⋇","\\divideontimes",!0);u(p,S,le,"⋉","\\ltimes",!0);u(p,S,le,"⋊","\\rtimes",!0);u(p,S,le,"⋋","\\leftthreetimes",!0);u(p,S,le,"⋌","\\rightthreetimes",!0);u(p,S,le,"⋏","\\curlywedge",!0);u(p,S,le,"⋎","\\curlyvee",!0);u(p,S,le,"⊝","\\circleddash",!0);u(p,S,le,"⊛","\\circledast",!0);u(p,S,le,"⋅","\\centerdot");u(p,S,le,"⊺","\\intercal",!0);u(p,S,le,"⋒","\\doublecap");u(p,S,le,"⋓","\\doublecup");u(p,S,le,"⊠","\\boxtimes",!0);u(p,S,z,"⇢","\\dashrightarrow",!0);u(p,S,z,"⇠","\\dashleftarrow",!0);u(p,S,z,"⇇","\\leftleftarrows",!0);u(p,S,z,"⇆","\\leftrightarrows",!0);u(p,S,z,"⇚","\\Lleftarrow",!0);u(p,S,z,"↞","\\twoheadleftarrow",!0);u(p,S,z,"↢","\\leftarrowtail",!0);u(p,S,z,"↫","\\looparrowleft",!0);u(p,S,z,"⇋","\\leftrightharpoons",!0);u(p,S,z,"↶","\\curvearrowleft",!0);u(p,S,z,"↺","\\circlearrowleft",!0);u(p,S,z,"↰","\\Lsh",!0);u(p,S,z,"⇈","\\upuparrows",!0);u(p,S,z,"↿","\\upharpoonleft",!0);u(p,S,z,"⇃","\\downharpoonleft",!0);u(p,y,z,"⊶","\\origof",!0);u(p,y,z,"⊷","\\imageof",!0);u(p,S,z,"⊸","\\multimap",!0);u(p,S,z,"↭","\\leftrightsquigarrow",!0);u(p,S,z,"⇉","\\rightrightarrows",!0);u(p,S,z,"⇄","\\rightleftarrows",!0);u(p,S,z,"↠","\\twoheadrightarrow",!0);u(p,S,z,"↣","\\rightarrowtail",!0);u(p,S,z,"↬","\\looparrowright",!0);u(p,S,z,"↷","\\curvearrowright",!0);u(p,S,z,"↻","\\circlearrowright",!0);u(p,S,z,"↱","\\Rsh",!0);u(p,S,z,"⇊","\\downdownarrows",!0);u(p,S,z,"↾","\\upharpoonright",!0);u(p,S,z,"⇂","\\downharpoonright",!0);u(p,S,z,"⇝","\\rightsquigarrow",!0);u(p,S,z,"⇝","\\leadsto");u(p,S,z,"⇛","\\Rrightarrow",!0);u(p,S,z,"↾","\\restriction");u(p,y,L,"‘","`");u(p,y,L,"$","\\$");u(X,y,L,"$","\\$");u(X,y,L,"$","\\textdollar");u(p,y,L,"%","\\%");u(X,y,L,"%","\\%");u(p,y,L,"_","\\_");u(X,y,L,"_","\\_");u(X,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,me,"α","\\alpha",!0);u(p,y,me,"β","\\beta",!0);u(p,y,me,"γ","\\gamma",!0);u(p,y,me,"δ","\\delta",!0);u(p,y,me,"ϵ","\\epsilon",!0);u(p,y,me,"ζ","\\zeta",!0);u(p,y,me,"η","\\eta",!0);u(p,y,me,"θ","\\theta",!0);u(p,y,me,"ι","\\iota",!0);u(p,y,me,"κ","\\kappa",!0);u(p,y,me,"λ","\\lambda",!0);u(p,y,me,"μ","\\mu",!0);u(p,y,me,"ν","\\nu",!0);u(p,y,me,"ξ","\\xi",!0);u(p,y,me,"ο","\\omicron",!0);u(p,y,me,"π","\\pi",!0);u(p,y,me,"ρ","\\rho",!0);u(p,y,me,"σ","\\sigma",!0);u(p,y,me,"τ","\\tau",!0);u(p,y,me,"υ","\\upsilon",!0);u(p,y,me,"ϕ","\\phi",!0);u(p,y,me,"χ","\\chi",!0);u(p,y,me,"ψ","\\psi",!0);u(p,y,me,"ω","\\omega",!0);u(p,y,me,"ε","\\varepsilon",!0);u(p,y,me,"ϑ","\\vartheta",!0);u(p,y,me,"ϖ","\\varpi",!0);u(p,y,me,"ϱ","\\varrho",!0);u(p,y,me,"ς","\\varsigma",!0);u(p,y,me,"φ","\\varphi",!0);u(p,y,le,"∗","*",!0);u(p,y,le,"+","+");u(p,y,le,"−","-",!0);u(p,y,le,"⋅","\\cdot",!0);u(p,y,le,"∘","\\circ",!0);u(p,y,le,"÷","\\div",!0);u(p,y,le,"±","\\pm",!0);u(p,y,le,"×","\\times",!0);u(p,y,le,"∩","\\cap",!0);u(p,y,le,"∪","\\cup",!0);u(p,y,le,"∖","\\setminus",!0);u(p,y,le,"∧","\\land");u(p,y,le,"∨","\\lor");u(p,y,le,"∧","\\wedge",!0);u(p,y,le,"∨","\\vee",!0);u(p,y,L,"√","\\surd");u(p,y,xi,"⟨","\\langle",!0);u(p,y,xi,"∣","\\lvert");u(p,y,xi,"∥","\\lVert");u(p,y,Vt,"?","?");u(p,y,Vt,"!","!");u(p,y,Vt,"⟩","\\rangle",!0);u(p,y,Vt,"∣","\\rvert");u(p,y,Vt,"∥","\\rVert");u(p,y,z,"=","=");u(p,y,z,":",":");u(p,y,z,"≈","\\approx",!0);u(p,y,z,"≅","\\cong",!0);u(p,y,z,"≥","\\ge");u(p,y,z,"≥","\\geq",!0);u(p,y,z,"←","\\gets");u(p,y,z,">","\\gt",!0);u(p,y,z,"∈","\\in",!0);u(p,y,z,"","\\@not");u(p,y,z,"⊂","\\subset",!0);u(p,y,z,"⊃","\\supset",!0);u(p,y,z,"⊆","\\subseteq",!0);u(p,y,z,"⊇","\\supseteq",!0);u(p,S,z,"⊈","\\nsubseteq",!0);u(p,S,z,"⊉","\\nsupseteq",!0);u(p,y,z,"⊨","\\models");u(p,y,z,"←","\\leftarrow",!0);u(p,y,z,"≤","\\le");u(p,y,z,"≤","\\leq",!0);u(p,y,z,"<","\\lt",!0);u(p,y,z,"→","\\rightarrow",!0);u(p,y,z,"→","\\to");u(p,S,z,"≱","\\ngeq",!0);u(p,S,z,"≰","\\nleq",!0);u(p,y,mn," ","\\ ");u(p,y,mn," ","\\space");u(p,y,mn," ","\\nobreakspace");u(X,y,mn," ","\\ ");u(X,y,mn," "," ");u(X,y,mn," ","\\space");u(X,y,mn," ","\\nobreakspace");u(p,y,mn,"","\\nobreak");u(p,y,mn,"","\\allowbreak");u(p,y,Hs,",",",");u(p,y,Hs,";",";");u(p,S,le,"⊼","\\barwedge",!0);u(p,S,le,"⊻","\\veebar",!0);u(p,y,le,"⊙","\\odot",!0);u(p,y,le,"⊕","\\oplus",!0);u(p,y,le,"⊗","\\otimes",!0);u(p,y,L,"∂","\\partial",!0);u(p,y,le,"⊘","\\oslash",!0);u(p,S,le,"⊚","\\circledcirc",!0);u(p,S,le,"⊡","\\boxdot",!0);u(p,y,le,"△","\\bigtriangleup");u(p,y,le,"▽","\\bigtriangledown");u(p,y,le,"†","\\dagger");u(p,y,le,"⋄","\\diamond");u(p,y,le,"⋆","\\star");u(p,y,le,"◃","\\triangleleft");u(p,y,le,"▹","\\triangleright");u(p,y,xi,"{","\\{");u(X,y,L,"{","\\{");u(X,y,L,"{","\\textbraceleft");u(p,y,Vt,"}","\\}");u(X,y,L,"}","\\}");u(X,y,L,"}","\\textbraceright");u(p,y,xi,"{","\\lbrace");u(p,y,Vt,"}","\\rbrace");u(p,y,xi,"[","\\lbrack",!0);u(X,y,L,"[","\\lbrack",!0);u(p,y,Vt,"]","\\rbrack",!0);u(X,y,L,"]","\\rbrack",!0);u(p,y,xi,"(","\\lparen",!0);u(p,y,Vt,")","\\rparen",!0);u(X,y,L,"<","\\textless",!0);u(X,y,L,">","\\textgreater",!0);u(p,y,xi,"⌊","\\lfloor",!0);u(p,y,Vt,"⌋","\\rfloor",!0);u(p,y,xi,"⌈","\\lceil",!0);u(p,y,Vt,"⌉","\\rceil",!0);u(p,y,L,"\\","\\backslash");u(p,y,L,"∣","|");u(p,y,L,"∣","\\vert");u(X,y,L,"|","\\textbar",!0);u(p,y,L,"∥","\\|");u(p,y,L,"∥","\\Vert");u(X,y,L,"∥","\\textbardbl");u(X,y,L,"~","\\textasciitilde");u(X,y,L,"\\","\\textbackslash");u(X,y,L,"^","\\textasciicircum");u(p,y,z,"↑","\\uparrow",!0);u(p,y,z,"⇑","\\Uparrow",!0);u(p,y,z,"↓","\\downarrow",!0);u(p,y,z,"⇓","\\Downarrow",!0);u(p,y,z,"↕","\\updownarrow",!0);u(p,y,z,"⇕","\\Updownarrow",!0);u(p,y,kt,"∐","\\coprod");u(p,y,kt,"⋁","\\bigvee");u(p,y,kt,"⋀","\\bigwedge");u(p,y,kt,"⨄","\\biguplus");u(p,y,kt,"⋂","\\bigcap");u(p,y,kt,"⋃","\\bigcup");u(p,y,kt,"∫","\\int");u(p,y,kt,"∫","\\intop");u(p,y,kt,"∬","\\iint");u(p,y,kt,"∭","\\iiint");u(p,y,kt,"∏","\\prod");u(p,y,kt,"∑","\\sum");u(p,y,kt,"⨂","\\bigotimes");u(p,y,kt,"⨁","\\bigoplus");u(p,y,kt,"⨀","\\bigodot");u(p,y,kt,"∮","\\oint");u(p,y,kt,"∯","\\oiint");u(p,y,kt,"∰","\\oiiint");u(p,y,kt,"⨆","\\bigsqcup");u(p,y,kt,"∫","\\smallint");u(X,y,Zr,"…","\\textellipsis");u(p,y,Zr,"…","\\mathellipsis");u(X,y,Zr,"…","\\ldots",!0);u(p,y,Zr,"…","\\ldots",!0);u(p,y,Zr,"⋯","\\@cdots",!0);u(p,y,Zr,"⋱","\\ddots",!0);u(p,y,L,"⋮","\\varvdots");u(X,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,me,"","\\@imath");u(p,y,me,"","\\@jmath");u(p,y,L,"ı","ı");u(p,y,L,"ȷ","ȷ");u(X,y,L,"ı","\\i",!0);u(X,y,L,"ȷ","\\j",!0);u(X,y,L,"ß","\\ss",!0);u(X,y,L,"æ","\\ae",!0);u(X,y,L,"œ","\\oe",!0);u(X,y,L,"ø","\\o",!0);u(X,y,L,"Æ","\\AE",!0);u(X,y,L,"Œ","\\OE",!0);u(X,y,L,"Ø","\\O",!0);u(X,y,rt,"ˊ","\\'");u(X,y,rt,"ˋ","\\`");u(X,y,rt,"ˆ","\\^");u(X,y,rt,"˜","\\~");u(X,y,rt,"ˉ","\\=");u(X,y,rt,"˘","\\u");u(X,y,rt,"˙","\\.");u(X,y,rt,"¸","\\c");u(X,y,rt,"˚","\\r");u(X,y,rt,"ˇ","\\v");u(X,y,rt,"¨",'\\"');u(X,y,rt,"˝","\\H");u(X,y,rt,"◯","\\textcircled");var Fd={"--":!0,"---":!0,"``":!0,"''":!0};u(X,y,L,"–","--",!0);u(X,y,L,"–","\\textendash");u(X,y,L,"—","---",!0);u(X,y,L,"—","\\textemdash");u(X,y,L,"‘","`",!0);u(X,y,L,"‘","\\textquoteleft");u(X,y,L,"’","'",!0);u(X,y,L,"’","\\textquoteright");u(X,y,L,"“","``",!0);u(X,y,L,"“","\\textquotedblleft");u(X,y,L,"”","''",!0);u(X,y,L,"”","\\textquotedblright");u(p,y,L,"°","\\degree",!0);u(X,y,L,"°","\\degree");u(X,y,L,"°","\\textdegree",!0);u(p,y,L,"£","\\pounds");u(p,y,L,"£","\\mathsterling",!0);u(X,y,L,"£","\\pounds");u(X,y,L,"£","\\textsterling",!0);u(p,S,L,"✠","\\maltese");u(X,S,L,"✠","\\maltese");var Mh='0123456789/@."';for(var ko=0;ko<Mh.length;ko++){var Sh=Mh.charAt(ko);u(p,y,L,Sh,Sh)}var zh='0123456789!@*()-=+";:?/.,';for(var To=0;To<zh.length;To++){var Ch=zh.charAt(To);u(X,y,L,Ch,Ch)}var Ca="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Eo=0;Eo<Ca.length;Eo++){var ra=Ca.charAt(Eo);u(p,y,me,ra,ra),u(X,y,L,ra,ra)}u(p,S,L,"C","ℂ");u(X,S,L,"C","ℂ");u(p,S,L,"H","ℍ");u(X,S,L,"H","ℍ");u(p,S,L,"N","ℕ");u(X,S,L,"N","ℕ");u(p,S,L,"P","ℙ");u(X,S,L,"P","ℙ");u(p,S,L,"Q","ℚ");u(X,S,L,"Q","ℚ");u(p,S,L,"R","ℝ");u(X,S,L,"R","ℝ");u(p,S,L,"Z","ℤ");u(X,S,L,"Z","ℤ");u(p,y,me,"h","ℎ");u(X,y,me,"h","ℎ");var ye;for(var Gt=0;Gt<Ca.length;Gt++){var ft=Ca.charAt(Gt);ye=String.fromCharCode(55349,56320+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56372+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56424+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56580+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56684+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56736+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56788+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56840+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56944+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),Gt<26&&(ye=String.fromCharCode(55349,56632+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye),ye=String.fromCharCode(55349,56476+Gt),u(p,y,me,ft,ye),u(X,y,L,ft,ye))}ye="𝕜";u(p,y,me,"k",ye);u(X,y,L,"k",ye);for(var qn=0;qn<10;qn++){var Tn=qn.toString();ye=String.fromCharCode(55349,57294+qn),u(p,y,me,Tn,ye),u(X,y,L,Tn,ye),ye=String.fromCharCode(55349,57314+qn),u(p,y,me,Tn,ye),u(X,y,L,Tn,ye),ye=String.fromCharCode(55349,57324+qn),u(p,y,me,Tn,ye),u(X,y,L,Tn,ye),ye=String.fromCharCode(55349,57334+qn),u(p,y,me,Tn,ye),u(X,y,L,Tn,ye)}var M0="ÐÞþ";for(var Mo=0;Mo<M0.length;Mo++){var sa=M0.charAt(Mo);u(p,y,me,sa,sa),u(X,y,L,sa,sa)}var S0={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Nh={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Lh={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},op={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Kn={mathClass:"",textClass:"",font:""},Ah={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},_h={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Rh={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},z0={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},C0={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Dh={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},N0={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Ih=[S0,S0,Nh,Nh,Lh,Lh,op,Kn,Kn,Kn,Ah,Ah,_h,_h,Rh,Rh,z0,z0,C0,C0,Dh,Dh,Kn,Kn,N0,N0],lp=[S0,Kn,z0,C0,N0],hp=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 Ih[r]}else if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return lp[s]}else{if(n===120485||n===120486)return Ih[0];if(120486<n&&n<120782)return Kn;throw new K("Unsupported character: "+i)}},Ga=function(e,t,n){if(it[n][e]){var r=it[n][e].replace;r&&(e=r)}return{value:e,metrics:gl(e,t,n)}},qt=function(e,t,n,r,s){var a=Ga(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 gi(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 gi(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},vl=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Ga(e,"Main-Bold",t).metrics?qt(e,"Main-Bold",t,n,r.concat(["mathbf"])):e==="\\"||it[t][e].font==="main"?qt(e,"Main-Regular",t,n,r):qt(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},cp=function(e,t,n){return n!=="textord"&&Ga(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},qa=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=hp(s);m=g.font,v=g[r+"Class"]}if(m)return qt(s,m,r,t,a.concat(v));if(f){var x,b;if(f==="boldsymbol"){var M=cp(s,r,n);x=M.fontName,b=[M.fontClass]}else d?(x=L0[o].fontName,b=[o]):(x=aa(l,h,c),b=[l,h,c]);if(Ga(s,x,r).metrics)return qt(s,x,r,t,a.concat(b));if(Fd.hasOwnProperty(s)&&x.slice(0,10)==="Typewriter"){for(var E=[],C=0;C<s.length;C++)E.push(qt(s[C],x,r,t,a.concat(b)));return gn(E)}}if(n==="mathord")return qt(s,"Math-Italic",r,t,a.concat(["mathnormal"]));if(n==="textord"){var N=it[r][s]&&it[r][s].font;if(N==="ams"){var O=aa("amsrm",h,c);return qt(s,O,r,t,a.concat("amsrm",h,c))}else if(N==="main"||!N){var B=aa("textrm",h,c);return qt(s,B,r,t,a.concat(h,c))}else{var H=aa(N,h,c);return qt(s,H,r,t,a.concat(H,h,c))}}else throw new Error("unexpected type: "+n+" in makeOrd")},dp=(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},Hd=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof gi&&n instanceof gi&&dp(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},xl=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},j=function(e,t,n,r){var s=new Kr(e,t,n,r);return xl(s),s},_n=(i,e,t,n)=>new Kr(i,e,t,n),qr=function(e,t,n){var r=j([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Q(r.height),r.maxFontSize=1,r},up=function(e,t,n,r){var s=new $a(e,t,n,r);return xl(s),s},gn=function(e){var t=new jr(e);return xl(t),t},Wr=function(e,t){return e instanceof jr?j([],[e],t):e},fp=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}},$e=function(e,t){for(var{children:n,depth:r}=fp(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=j(["pstrut"],[]);h.style.height=Q(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,b=g.wrapperClasses||[],M=g.wrapperStyle||{},E=j(b,[h,x],void 0,M);E.style.top=Q(-s-m-x.depth),g.marginLeft&&(E.style.marginLeft=g.marginLeft),g.marginRight&&(E.style.marginRight=g.marginRight),c.push(E),m+=x.height+x.depth}d=Math.min(d,m),f=Math.max(f,m)}var C=j(["vlist"],c);C.style.height=Q(f);var N;if(d<0){var O=j([],[]),B=j(["vlist"],[O]);B.style.height=Q(-d);var H=j(["vlist-s"],[new gi("")]);N=[j(["vlist-r"],[C,H]),j(["vlist-r"],[B])]}else N=[j(["vlist-r"],[C])];var W=j(["vlist-t"],N);return N.length===2&&W.classes.push("vlist-t2"),W.height=f,W.depth=-d,W},Ud=(i,e)=>{var t=j(["mspace"],[],e),n=lt(i,e);return t.style.marginRight=Q(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},L0={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"}},$d={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gd=function(e,t){var[n,r,s]=$d[e],a=new An(n),o=new un([a],{width:Q(r),height:Q(s),style:"width:"+Q(r),viewBox:"0 0 "+1e3*r+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=_n(["overlay"],[o],t);return l.height=s,l.style.height=Q(s),l.style.width=Q(r),l},ot={number:3,unit:"mu"},Wn={number:4,unit:"mu"},rn={number:5,unit:"mu"},pp={mord:{mop:ot,mbin:Wn,mrel:rn,minner:ot},mop:{mord:ot,mop:ot,mrel:rn,minner:ot},mbin:{mord:Wn,mop:Wn,mopen:Wn,minner:Wn},mrel:{mord:rn,mop:rn,mopen:rn,minner:rn},mopen:{},mclose:{mop:ot,mbin:Wn,mrel:rn,minner:ot},mpunct:{mord:ot,mop:ot,mrel:rn,mopen:ot,mclose:ot,mpunct:ot,minner:ot},minner:{mord:ot,mop:ot,mbin:Wn,mrel:rn,mopen:ot,mpunct:ot,minner:ot}},mp={mord:{mop:ot},mop:{mord:ot,mop:ot},mbin:{},mrel:{},mopen:{},mclose:{mop:ot},mpunct:{},minner:{mop:ot}},qd={},Na={},La={};function ae(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)qd[t[l]]=o;e&&(s&&(Na[e]=s),a&&(La[e]=a))}function hr(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;ae({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var Aa=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},wt=function(e){return e.type==="ordgroup"?e.body:[e]},gp=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),vp=new Set(["rightmost","mrel","mclose","mpunct"]),xp={display:be.DISPLAY,text:be.TEXT,script:be.SCRIPT,scriptscript:be.SCRIPTSCRIPT},yp={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ct=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var s=[],a=0;a<e.length;a++){var o=Ge(e[a],t);if(o instanceof jr){var l=o.children;s.push(...l)}else s.push(o)}if(Hd(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(xp[c.style]))}var d=j([r[0]||"leftmost"],[],t),f=j([r[1]||"rightmost"],[],t),m=n==="root";return A0(s,(v,g)=>{var x=g.classes[0],b=v.classes[0];x==="mbin"&&vp.has(b)?g.classes[0]="mord":b==="mbin"&&gp.has(x)&&(v.classes[0]="mord")},{node:d},f,m),A0(s,(v,g)=>{var x,b,M=R0(g),E=R0(v),C=M&&E?v.hasClass("mtight")?(x=mp[M])==null?void 0:x[E]:(b=pp[M])==null?void 0:b[E]:null;if(C)return Ud(C,h)},{node:d},f,m),s},A0=function(e,t,n,r,s){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],l=Wd(o);if(l){A0(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=j(["leftmost"])),n.insertAfter=(d=>f=>{e.splice(d+1,0,f),a++})(a)}r&&e.pop()},Wd=function(e){return e instanceof jr||e instanceof $a||e instanceof Kr&&e.hasClass("enclosing")?e:null},_0=function(e,t){var n=Wd(e);if(n){var r=n.children;if(r.length){if(t==="right")return _0(r[r.length-1],"right");if(t==="left")return _0(r[0],"left")}}return e},R0=function(e,t){if(!e)return null;t&&(e=_0(e,t));var n=e.classes[0];return yp[n]||null},Ds=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return j(t.concat(n))},Ge=function(e,t,n){if(!e)return j();if(Na[e.type]){var r=Na[e.type](e,t);if(n&&t.size!==n.size){r=j(t.sizingClasses(n),[r],t);var s=t.sizeMultiplier/n.sizeMultiplier;r.height*=s,r.depth*=s}return r}else throw new K("Got group of unknown type: '"+e.type+"'")};function oa(i,e){var t=j(["base"],i,e),n=j(["strut"]);return n.style.height=Q(t.height+t.depth),t.depth&&(n.style.verticalAlign=Q(-t.depth)),t.children.unshift(n),t}function D0(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=Ct(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(Ct(t,e,!0),e),h.classes=["tag"],s.push(h)):r&&s.push(r);var c=j(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=Q(c.height+c.depth),c.depth&&(d.style.verticalAlign=Q(-c.depth))}return c}function Yd(i){return new jr(i)}class Z{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 bt&&this.children[n+1]instanceof bt){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof bt;)r+=this.children[++n].toText();e.appendChild(new bt(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+=$t(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+$t(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 bt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $t(this.toText())}toText(){return this.text}}class Xd{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",Q(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Q(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var wp=new Set(["\\imath","\\jmath"]),bp=new Set(["mrow","mtable"]),zi=function(e,t,n){return it[t][e]&&it[t][e].replace&&e.charCodeAt(0)!==55349&&!(Fd.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 bt(e)},yl=function(e){return e.length===1?e[0]:new Z("mrow",e)},kp={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"},wl=(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=kp[t];if(r)return typeof r=="function"?r(i):r;var s=i.text;if(wp.has(s))return null;if(it[n][s]){var a=it[n][s].replace;a&&(s=a)}var o=L0[t].fontName;return gl(s,o,n)?L0[t].variant:null};function So(i){if(!i)return!1;if(i.type==="mi"&&i.children.length===1){var e=i.children[0];return e instanceof bt&&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 bt&&t.text===","}else return!1}var yi=function(e,t,n){if(e.length===1){var r=Ke(e[0],t);return n&&r instanceof Z&&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 Z&&a instanceof Z){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(So(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&So(a))l.children=[...a.children,...l.children],s.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||So(a))){var h=l.children[0];h instanceof Z&&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 bt&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof bt&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),s.pop())}}}s.push(l),a=l}return s},Rn=function(e,t,n){return yl(yi(e,t,n))},Ke=function(e,t){if(!e)return new Z("mrow");if(La[e.type])return La[e.type](e,t);throw new K("Got group of unknown type: '"+e.type+"'")};function Oh(i,e,t,n,r){var s=yi(i,t),a;s.length===1&&s[0]instanceof Z&&bp.has(s[0].type)?a=s[0]:a=new Z("mrow",s);var o=new Z("annotation",[new bt(e)]);o.setAttribute("encoding","application/x-tex");var l=new Z("semantics",[a,o]),h=new Z("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var c=r?"katex":"katex-mathml";return j([c],[h])}var Tp=[[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]],Bh=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ph=function(e,t){return t.size<2?e:Tp[e-1][t.size-1]};class ln{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||ln.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=Bh[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 ln(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ph(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:Bh[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ph(ln.BASESIZE,e);return this.size===t&&this.textSize===ln.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!==ln.BASESIZE?["sizing","reset-size"+this.size,"size"+ln.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=ap(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ln.BASESIZE=6;var Vd=function(e){return new ln({style:e.displayMode?be.DISPLAY:be.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},jd=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=j(n,[e])}return e},Ep=function(e,t,n){var r=Vd(n),s;if(n.output==="mathml")return Oh(e,t,r,n.displayMode,!0);if(n.output==="html"){var a=D0(e,r);s=j(["katex"],[a])}else{var o=Oh(e,t,r,n.displayMode,!1),l=D0(e,r);s=j(["katex"],[o,l])}return jd(s,n)},Mp=function(e,t,n){var r=Vd(n),s=D0(e,r),a=j(["katex"],[s]);return jd(a,n)},Sp={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":"="},Wa=function(e){var t=new Z("mo",[new bt(Sp[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},zp={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]},Cp=new Set(["widehat","widecheck","widetilde","utilde"]),Ya=function(e,t){function n(){var o=4e5,l=e.label.slice(1);if(Cp.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 un([v],{width:"100%",height:Q(f),viewBox:"0 0 "+o+" "+c,preserveAspectRatio:"none"});return{span:_n([],[g],t),minWidth:0,height:f}}else{var x=[],b=zp[l];if(!b)throw new Error('No SVG data for "'+l+'".');var[M,E,C]=b,N=C/1e3,O=M.length,B,H;if(O===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');B=["hide-tail"],H=[b[3]]}else if(O===2)B=["halfarrow-left","halfarrow-right"],H=["xMinYMin","xMaxYMin"];else if(O===3)B=["brace-left","brace-center","brace-right"],H=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
562
|
-
`+O+" children.");for(var W=0;W<O;W++){var ie=new An(M[W]),$=new un([ie],{width:"400em",height:Q(N),viewBox:"0 0 "+o+" "+C,preserveAspectRatio:H[W]+" slice"}),Y=_n([B[W]],[$],t);if(O===1)return{span:Y,minWidth:E,height:N};Y.style.height=Q(N),x.push(Y)}return{span:j(["stretchy"],x,t),minWidth:E,height:N}}}var{span:r,minWidth:s,height:a}=n();return r.height=a,r.style.height=Q(a),s>0&&(r.style.minWidth=Q(s)),r},Np=function(e,t,n,r,s){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=j(["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 E0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&h.push(new E0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new un(h,{width:"100%",height:Q(o)});a=_n([],[c],s)}return a.height=o,a.style.height=Q(o),a},Lp={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ap={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function _p(i){return i in Lp}function Me(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 Xa(i){var e=Va(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 Va(i){return i&&(i.type==="atom"||Ap.hasOwnProperty(i.type))?i:null}var Kd=i=>{if(i instanceof gi)return i;if(rp(i)&&i.children.length===1)return Kd(i.children[0])},bl=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Me(i.base,"accent"),t=n.base,i.base=t,r=np(Ge(i,e)),i.base=n):(n=Me(i,"accent"),t=n.base);var s=Ge(t,e.havingCrampedStyle()),a=n.isShifty&&pn(t),o=0;if(a){var l,h;o=(l=(h=Kd(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=Ya(n,e),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Q(2*o)+")",marginLeft:Q(2*o)}:void 0}]});else{var m,v;n.label==="\\vec"?(m=Gd("vec",e),v=$d.vec[1]):(m=qa({mode:n.mode,text:n.label},e,"textord"),m=ip(m),m.italic=0,v=m.width,c&&(d+=m.depth)),f=j(["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=Q(x),n.label==="\\textcircled"&&(f.style.top=".2em"),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]})}var b=j(["mord","accent"],[f],e);return r?(r.children[0]=b,r.height=Math.max(b.height,r.height),r.classes[0]="mord",r):b},Zd=(i,e)=>{var t=i.isStretchy?Wa(i.label):new Z("mo",[zi(i.label,i.mode)]),n=new Z("mover",[Ke(i.base,e),t]);return n.setAttribute("accent","true"),n},Rp=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));ae({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=Aa(e[0]),n=!Rp.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:bl,mathmlBuilder:Zd});ae({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:bl,mathmlBuilder:Zd});ae({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=Ge(i.base,e),n=Ya(i,e),r=i.label==="\\utilde"?.12:0,s=$e({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]});return j(["mord","accentunder"],[s],e)},mathmlBuilder:(i,e)=>{var t=Wa(i.label),n=new Z("munder",[Ke(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var la=i=>{var e=new Z("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ae({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=Wr(Ge(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=Wr(Ge(i.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=Ya(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=$e({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=$e({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return j(["mrel","x-arrow"],[c],e)},mathmlBuilder(i,e){var t=Wa(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 Z("munderover",[t,s,r])}else n=new Z("mover",[t,r])}else if(i.below){var a=la(Ke(i.below,e));n=new Z("munder",[t,a])}else n=la(),n=new Z("mover",[t,n]);return n}});function Qd(i,e){var t=Ct(i.body,e,!0);return j([i.mclass],t,e)}function Jd(i,e){var t,n=yi(i.body,e);return i.mclass==="minner"?t=new Z("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Z("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Z("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}ae({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:wt(r),isCharacterBox:pn(r)}},htmlBuilder:Qd,mathmlBuilder:Jd});var ja=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"};ae({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:ja(e[0]),body:wt(e[1]),isCharacterBox:pn(e[1])}}});ae({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=ja(r):a="mrel";var o={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:wt(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:pn(l)}},htmlBuilder:Qd,mathmlBuilder:Jd});ae({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:ja(e[0]),body:wt(e[0])}},htmlBuilder(i,e){var t=Ct(i.body,e,!0),n=j([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=yi(i.body,e),n=new Z("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Dp={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fh=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Hh=i=>i.type==="textord"&&i.text==="@",Ip=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Op(i,e,t){var n=Dp[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 Bp(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 K("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],s=0;s<e.length;s++){for(var a=e[s],o=Fh(),l=0;l<a.length;l++)if(!Hh(a[l]))o.body.push(a[l]);else{n.push(o),l+=1;var h=Xa(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(Ip(a[m],h)){f=!1,l=m;break}if(Hh(a[m]))throw new K("Missing a "+h+" character to complete a CD arrow.",a[m]);c[d].body.push(a[m])}if(f)throw new K("Missing a "+h+" character to complete a CD arrow.",a[l])}else throw new K('Expected one of "<>AV=|." after @',a[l]);var v=Op(h,c,i),g={type:"styling",body:[v],mode:"math",style:"display",resetFont:!0};n.push(g),o=Fh()}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([])}}ae({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=Wr(Ge(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=Q(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Z("mrow",[Ke(i.label,e)]);return t=new Z("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Z("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ae({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=Wr(Ge(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Z("mrow",[Ke(i.fragment,e)])}});ae({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Me(e[0],"ordgroup"),r=n.body,s="",a=0;a<r.length;a++){var o=Me(r[a],"textord");s+=o.text}var l=parseInt(s),h;if(isNaN(l))throw new K("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new K("\\@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 e1=(i,e)=>{var t=Ct(i.body,e.withColor(i.color),!1);return gn(t)},t1=(i,e)=>{var t=yi(i.body,e.withColor(i.color)),n=new Z("mstyle",t);return n.setAttribute("mathcolor",i.color),n};ae({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Me(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:wt(r)}},htmlBuilder:e1,mathmlBuilder:t1});ae({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Me(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:e1,mathmlBuilder:t1});ae({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&&Me(r,"size").value}},htmlBuilder(i,e){var t=j(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=Q(lt(i.size,e)))),t},mathmlBuilder(i,e){var t=new Z("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",Q(lt(i.size,e)))),t}});var I0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},i1=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new K("Expected a control sequence",i);return e},Pp=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},n1=(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)};ae({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(I0[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=I0[n.text]),Me(e.parseFunction(),"internal");throw new K("Invalid token after macro prefix",n)}});ae({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 K("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 K('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new K('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new K("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===I0[t]),{type:"internal",mode:e.mode}}});ae({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=i1(e.gullet.popToken());e.gullet.consumeSpaces();var r=Pp(e);return n1(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});ae({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=i1(e.gullet.popToken()),r=e.gullet.popToken(),s=e.gullet.popToken();return n1(e,n,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var ks=function(e,t,n){var r=it.math[e]&&it.math[e].replace,s=gl(r||e,t,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kl=function(e,t,n,r){var s=n.havingBaseStyle(t),a=j(r.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},r1=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=Q(s),e.height-=s,e.depth+=s},Fp=function(e,t,n,r,s,a){var o=qt(e,"Main-Regular",s,r),l=kl(o,t,r,a);return r1(l,r,t),l},Hp=function(e,t,n,r){return qt(e,"Size"+t+"-Regular",n,r)},s1=function(e,t,n,r,s,a){var o=Hp(e,t,s,r),l=kl(j(["delimsizing","size"+t],[o],r),be.TEXT,r,a);return n&&r1(l,r,be.TEXT),l},zo=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var s=j(["delimsizinginner",r],[j([],[qt(e,t,n)])]);return{type:"elem",elem:s}},Co=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",j4(e,Math.round(1e3*t))),a=new un([s],{width:Q(r),height:Q(t),style:"width:"+Q(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=_n([],[a],n);return o.height=t,o.style.height=Q(t),o.style.width=Q(r),{type:"elem",elem:o}},O0=.008,ha={type:"kern",size:-1*O0},Up=new Set(["|","\\lvert","\\rvert","\\vert"]),$p=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),a1=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"):Up.has(e)?(h="∣",d="vert",f=333):$p.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=ks(o,m,s),g=v.height+v.depth,x=ks(h,m,s),b=x.height+x.depth,M=ks(c,m,s),E=M.height+M.depth,C=0,N=1;if(l!==null){var O=ks(l,m,s);C=O.height+O.depth,N=2}var B=g+E+C,H=Math.max(0,Math.ceil((t-B)/(N*b))),W=B+H*N*b,ie=r.fontMetrics().axisHeight;n&&(ie*=r.sizeMultiplier);var $=W/2-ie,Y=[];if(d.length>0){var ne=W-g-E,V=Math.round(W*1e3),J=K4(d,Math.round(ne*1e3)),he=new An(d,J),ue=Q(f/1e3),je=Q(V/1e3),Qe=new un([he],{width:ue,height:je,viewBox:"0 0 "+f+" "+V}),_e=_n([],[Qe],r);_e.height=V/1e3,_e.style.width=ue,_e.style.height=je,Y.push({type:"elem",elem:_e})}else{if(Y.push(zo(c,m,s)),Y.push(ha),l===null){var Xe=W-g-E+2*O0;Y.push(Co(h,Xe,r))}else{var ht=(W-g-E-C)/2+2*O0;Y.push(Co(h,ht,r)),Y.push(ha),Y.push(zo(l,m,s)),Y.push(ha),Y.push(Co(h,ht,r))}Y.push(ha),Y.push(zo(o,m,s))}var st=r.havingBaseStyle(be.TEXT),Be=$e({positionType:"bottom",positionData:$,children:Y});return kl(j(["delimsizing","mult"],[Be],st),be.TEXT,r,a)},No=80,Lo=.08,Ao=function(e,t,n,r,s){var a=V4(e,r,n),o=new An(e,a),l=new un([o],{width:"400em",height:Q(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return _n(["hide-tail"],[l],s)},Gp=function(e,t){var n=t.havingBaseSizing(),r=d1("\\surd",e*n.sizeMultiplier,c1,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+No,e<1?s=1:e<1.4&&(s=.7),l=(1+a+Lo)/s,h=(1+a)/s,o=Ao("sqrtMain",l,c,a,t),o.style.minWidth="0.853em",d=.833/s):r.type==="large"?(c=(1e3+No)*Ts[r.size],h=(Ts[r.size]+a)/s,l=(Ts[r.size]+a+Lo)/s,o=Ao("sqrtSize"+r.size,l,c,a,t),o.style.minWidth="1.02em",d=1/s):(l=e+a+Lo,h=e+a,c=Math.floor(1e3*e+a)+No,o=Ao("sqrtTall",l,c,a,t),o.style.minWidth="0.742em",d=1.056),o.height=h,o.style.height=Q(l),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},o1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),qp=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),l1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Ts=[0,1.2,1.8,2.4,3],h1=function(e,t,n,r,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),o1.has(e)||l1.has(e))return s1(e,t,!1,n,r,s);if(qp.has(e))return a1(e,Ts[t],!1,n,r,s);throw new K("Illegal delimiter: '"+e+"'")},Wp=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Yp=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"stack"}],c1=[{type:"small",style:be.SCRIPTSCRIPT},{type:"small",style:be.SCRIPT},{type:"small",style:be.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Xp=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.")},d1=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=ks(e,Xp(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]},B0=function(e,t,n,r,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;l1.has(e)?o=Wp:o1.has(e)?o=c1:o=Yp;var l=d1(e,t,o,r);return l.type==="small"?Fp(e,l.style,n,r,s,a):l.type==="large"?s1(e,l.size,n,r,s,a):a1(e,t,n,r,s,a)},_o=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 B0(e,d,!0,r,s,a)},Uh={"\\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}},Vp=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 $h(i){return"isMiddle"in i}function Ka(i,e){var t=Va(i);if(t&&Vp.has(t.text))return t;throw t?new K("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new K("Invalid delimiter type '"+i.type+"'",i)}ae({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=Ka(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:Uh[i.funcName].size,mclass:Uh[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?j([i.mclass]):h1(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 Z("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=Q(Ts[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function Gh(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ae({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 K("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:Ka(e[0],i).text,color:t}}});ae({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ka(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Me(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(i,e)=>{Gh(i);for(var t=Ct(i.body,e,!0,["mopen","mclose"]),n=0,r=0,s=!1,a=0;a<t.length;a++){var o=t[a];$h(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=Ds(e,["mopen"]):l=_o(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($h(c)){var d=c.isMiddle;t[h]=_o(d.delim,n,r,d.options,i.mode,[])}}var f;if(i.right===".")f=Ds(e,["mclose"]);else{var m=i.rightColor?e.withColor(i.rightColor):e;f=_o(i.right,n,r,m,i.mode,["mclose"])}return t.push(f),j(["minner"],t,e)},mathmlBuilder:(i,e)=>{Gh(i);var t=yi(i.body,e);if(i.left!=="."){var n=new Z("mo",[zi(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Z("mo",[zi(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return yl(t)}});ae({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ka(e[0],i);if(!i.parser.leftrightDepth)throw new K("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;return i.delim==="."?t=Ds(e,[]):(t=h1(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 Z("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Za=(i,e)=>{var t=Wr(Ge(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,s,a,o=pn(i.body);if(n==="sout")s=j(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/r,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=lt({number:.6,unit:"pt"},e),h=lt({number:.35,unit:"ex"},e),c=e.havingBaseSizing();r=r/c.sizeMultiplier;var d=t.height+t.depth+l+h;t.style.paddingLeft=Q(d/2+l);var f=Math.floor(1e3*d*r),m=Y4(f),v=new un([new An("phase",m)],{width:"400em",height:Q(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=_n(["hide-tail"],[v],e),s.style.height=Q(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,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),x=g):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*b,x=Math.max(0,.25-t.depth)):(g=o?.2:0,x=g),s=Np(t,n,g,x,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=Q(b)):n==="angl"&&b!==.049&&(s.style.borderTopWidth=Q(b),s.style.borderRightWidth=Q(b)),a=t.depth+x,i.backgroundColor&&(s.style.backgroundColor=i.backgroundColor,i.borderColor&&(s.style.borderColor=i.borderColor))}var M;if(i.backgroundColor)M=$e({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:t,shift:0}]});else{var E=/cancel|phase/.test(n)?["svg-align"]:[];M=$e({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:E}]})}return/cancel/.test(n)&&(M.height=t.height,M.depth=t.depth),/cancel/.test(n)&&!o?j(["mord","cancel-lap"],[M],e):j(["mord"],[M],e)},Qa=(i,e)=>{var t,n=new Z(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: "+Q(r)+" solid "+i.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};ae({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Me(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,body:a}},htmlBuilder:Za,mathmlBuilder:Qa});ae({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Me(e[0],"color-token").color,a=Me(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:Za,mathmlBuilder:Qa});ae({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]}}});ae({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:Za,mathmlBuilder:Qa});ae({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:Za,mathmlBuilder:Qa});ae({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 u1={};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)u1[t[l]]=o;s&&(Na[e]=s),a&&(La[e]=a)}var f1={};function k(i,e){f1[i]=e}class ii{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 ii(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class pi{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 pi(t,ii.range(this,e))}}function qh(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 Ja=i=>{var e=i.parser.settings;if(!e.displayMode)throw new K("{"+i.envName+"} can be used only in display mode.")},jp=new Set(["gather","gather*"]);function Tl(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 K("Invalid \\arraystretch: "+m)}i.gullet.beginGroup();var v=[],g=[v],x=[],b=[],M=l!=null?[]:void 0;function E(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function C(){M&&(i.gullet.macros.get("\\df@tag")?(M.push(i.subparse([new pi("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):M.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(E(),b.push(qh(i));;){var N=i.parseExpression(!1,h?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup();var O={type:"ordgroup",mode:i.mode,body:N};t&&(O={type:"styling",mode:i.mode,style:t,resetFont:!0,body:[O]}),v.push(O);var B=i.fetch().text;if(B==="&"){if(d&&v.length===d){if(h||o)throw new K("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(B==="\\end"){C(),v.length===1&&O.type==="styling"&&O.body.length===1&&O.body[0].type==="ordgroup"&&O.body[0].body.length===0&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}else if(B==="\\\\"){i.consume();var H=void 0;i.gullet.future().text!==" "&&(H=i.parseSizeGroup(!0)),x.push(H?H.value:null),C(),b.push(qh(i)),v=[],g.push(v),E()}else throw new K("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:b,colSeparationType:o,tags:M,leqno:f}}function El(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(be.SCRIPT).sizeMultiplier;f=.2778*(m/t.sizeMultiplier)}var v=e.colSeparationType==="CD"?lt({number:3,unit:"ex"},t):12*d,g=3*d,x=e.arraystretch*v,b=.7*x,M=.3*x,E=0;function C(D){for(var xe=0;xe<D.length;++xe)xe>0&&(E+=.25),h.push({pos:E,isDashed:D[xe]})}for(C(a[0]),n=0;n<e.body.length;++n){var N=e.body[n],O=b,B=M;o<N.length&&(o=N.length);var H={cells:new Array(N.length),height:0,depth:0,pos:0};for(r=0;r<N.length;++r){var W=Ge(N[r],t);B<W.depth&&(B=W.depth),O<W.height&&(O=W.height),H.cells[r]=W}var ie=e.rowGaps[n],$=0;ie&&($=lt(ie,t),$>0&&($+=M,B<$&&(B=$),$=0)),e.addJot&&n<e.body.length-1&&(B+=g),H.height=O,H.depth=B,E+=O,H.pos=E,E+=B+$,l[n]=H,C(a[n+1])}var Y=E/2+t.fontMetrics().axisHeight,ne=e.cols||[],V=[],J,he,ue=[];if(e.tags&&e.tags.some(D=>D))for(n=0;n<s;++n){var je=l[n],Qe=je.pos-Y,_e=e.tags[n],Xe=void 0;_e===!0?Xe=j(["eqn-num"],[],t):_e===!1?Xe=j([],[],t):Xe=j([],Ct(_e,t,!0),t),Xe.depth=je.depth,Xe.height=je.height,ue.push({type:"elem",elem:Xe,shift:Qe})}for(r=0,he=0;r<o||he<ne.length;++r,++he){for(var ht,st=ne[he],Be=!0;((xt=st)==null?void 0:xt.type)==="separator";){var xt;if(Be||(J=j(["arraycolsep"],[]),J.style.width=Q(t.fontMetrics().doubleRuleSep),V.push(J)),st.separator==="|"||st.separator===":"){var te=st.separator==="|"?"solid":"dashed",Te=j(["vertical-separator"],[],t);Te.style.height=Q(E),Te.style.borderRightWidth=Q(c),Te.style.borderRightStyle=te,Te.style.margin="0 "+Q(-c/2);var Ri=E-Y;Ri&&(Te.style.verticalAlign=Q(-Ri)),V.push(Te)}else throw new K("Invalid separator type: "+st.separator);he++,st=ne[he],Be=!1}if(!(r>=o)){var jt=void 0;if(r>0||e.hskipBeforeAndAfter){var Kt,Tt;jt=(Kt=(Tt=st)==null?void 0:Tt.pregap)!=null?Kt:f,jt!==0&&(J=j(["arraycolsep"],[]),J.style.width=Q(jt),V.push(J))}var ct=[];for(n=0;n<s;++n){var Zt=l[n],Pt=Zt.cells[r];if(Pt){var Qt=Zt.pos-Y;Pt.depth=Zt.depth,Pt.height=Zt.height,ct.push({type:"elem",elem:Pt,shift:Qt})}}var Ne=$e({positionType:"individualShift",children:ct}),ai=j(["col-align-"+(((ht=st)==null?void 0:ht.align)||"c")],[Ne]);if(V.push(ai),r<o-1||e.hskipBeforeAndAfter){var Re,Jt;jt=(Re=(Jt=st)==null?void 0:Jt.postgap)!=null?Re:f,jt!==0&&(J=j(["arraycolsep"],[]),J.style.width=Q(jt),V.push(J))}}}var Ze=j(["mtable"],V);if(h.length>0){for(var Et=qr("hline",t,c),Vi=qr("hdashline",t,c),dt=[{type:"elem",elem:Ze,shift:0}];h.length>0;){var G=h.pop(),oe=G.pos-Y;G.isDashed?dt.push({type:"elem",elem:Vi,shift:oe}):dt.push({type:"elem",elem:Et,shift:oe})}Ze=$e({positionType:"individualShift",children:dt})}if(ue.length===0)return j(["mord"],[Ze],t);var ge=$e({positionType:"individualShift",children:ue}),ze=j(["tag"],[ge],t);return gn([Ze,ze])},Kp={c:"center ",l:"left ",r:"right "},Xi=function(e,t){for(var n=[],r=new Z("mtd",[],["mtr-glue"]),s=new Z("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 Z("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 Z("mtr",l))}var c=new Z("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",Q(d));var f="",m="";if(e.cols&&e.cols.length>0){var v=e.cols,g="",x=!1,b=0,M=v.length;v[0].type==="separator"&&(f+="top ",b=1),v[v.length-1].type==="separator"&&(f+="bottom ",M-=1);for(var E=b;E<M;E++){var C=v[E];C.type==="align"?(m+=Kp[C.align],x&&(g+="none "),x=!0):C.type==="separator"&&x&&(g+=C.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",m.trim()),/[sd]/.test(g)&&c.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var N=e.cols||[],O="",B=1;B<N.length;B++)O+=B%2?"0em ":"1em ";c.setAttribute("columnspacing",O.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 H="",W=e.hLinesBeforeRow;f+=W[0].length>0?"left ":"",f+=W[W.length-1].length>0?"right ":"";for(var ie=1;ie<W.length-1;ie++)H+=W[ie].length===0?"none ":W[ie][0]?"dashed ":"solid ";return/[sd]/.test(H)&&c.setAttribute("rowlines",H.trim()),f!==""&&(c=new Z("menclose",[c]),c.setAttribute("notation",f.trim())),e.arraystretch&&e.arraystretch<1&&(c=new Z("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},p1=function(e,t){e.envName.includes("ed")||Ja(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:Tl(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=Me(t[0].body[d],"textord");c+=f.text}o=Number(c),l=o*2}var m=!l;a.body.forEach(function(b){for(var M=1;M<b.length;M+=2){var E=Me(b[M],"styling"),C=Me(E.body[0],"ordgroup");C.body.unshift(h)}if(m)l<b.length&&(l=b.length);else{var N=b.length/2;if(o<N)throw new K("Too many math in a row: "+("expected "+o+", but got "+N),b[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=Va(e[0]),n=t?[e[0]]:Me(e[0],"ordgroup").body,r=n.map(function(a){var o=Xa(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 K("Unknown column alignment: "+l,a)}),s={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return In(i.parser,s,El(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 K("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,El(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=Va(e[0]),n=t?[e[0]]:Me(e[0],"ordgroup").body,r=n.map(function(o){var l=Xa(o),h=l.text;if("lc".includes(h))return{type:"align",align:h};throw new K("Unknown column alignment: "+h,o)});if(r.length>1)throw new K("{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 K("{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,El(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:p1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){jp.has(i.envName)&&Ja(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tl(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:p1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){Ja(i);var e={autoTag:Tl(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 Ja(i),Bp(i.parser)},htmlBuilder:Yi,mathmlBuilder:Xi});k("\\nonumber","\\gdef\\@eqnsw{0}");k("\\notag","\\nonumber");ae({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new K(i.funcName+" valid only within array environment")}});var Wh=u1;ae({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 K("Invalid environment name",r);for(var s="",a=0;a<r.body.length;++a)s+=Me(r.body[a],"textord").text;if(n==="\\begin"){if(!Wh.hasOwnProperty(s))throw new K("No such environment: "+s,r);var o=Wh[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=Me(t.parseFunction(),"environment");if(m.name!==s)throw new K("Mismatch: \\begin{"+s+"} matched by \\end{"+m.name+"}",f);return d}return{type:"environment",mode:t.mode,name:s,nameGroup:r}}});var m1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ge(i.body,n)},g1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ke(i.body,n)},Yh={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ae({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=Aa(e[0]),s=n;return s in Yh&&(s=Yh[s]),{type:"font",mode:t.mode,font:s.slice(1),body:r}},htmlBuilder:m1,mathmlBuilder:g1});ae({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:ja(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:pn(n)}}});ae({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:m1,mathmlBuilder:g1});var Zp=(i,e)=>{var t=e.style,n=t.fracNum(),r=t.fracDen(),s;s=e.havingStyle(n);var a=Ge(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=Ge(i.denom,s,e),c,d,f;i.hasBarLine?(i.barSize?(d=lt(i.barSize,e),c=qr("frac-line",e,d)):c=qr("frac-line",e),d=c.height,f=c.height):(c=null,d=0,f=e.fontMetrics().defaultRuleThickness);var m,v,g;t.size===be.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 M=e.fontMetrics().axisHeight;m-a.depth-(M+.5*d)<v&&(m+=v-(m-a.depth-(M+.5*d))),M-.5*d-(h.height-g)<v&&(g+=v-(M-.5*d-(h.height-g)));var E=-(M-.5*d);x=$e({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:c,shift:E},{type:"elem",elem:a,shift:-m}]})}else{var b=m-a.depth-(h.height-g);b<v&&(m+=.5*(v-b),g+=.5*(v-b)),x=$e({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 C;t.size===be.DISPLAY.size?C=e.fontMetrics().delim1:t.size===be.SCRIPTSCRIPT.size?C=e.havingStyle(be.SCRIPT).fontMetrics().delim2:C=e.fontMetrics().delim2;var N,O;return i.leftDelim==null?N=Ds(e,["mopen"]):N=B0(i.leftDelim,C,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?O=j([]):i.rightDelim==null?O=Ds(e,["mclose"]):O=B0(i.rightDelim,C,!0,e.havingStyle(t),i.mode,["mclose"]),j(["mord"].concat(s.sizingClasses(e)),[N,j(["mfrac"],[x]),O],e)},Qp=(i,e)=>{var t=new Z("mfrac",[Ke(i.numer,e),Ke(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=lt(i.barSize,e);t.setAttribute("linethickness",Q(n))}if(i.leftDelim!=null||i.rightDelim!=null){var r=[];if(i.leftDelim!=null){var s=new Z("mo",[new bt(i.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),r.push(s)}if(r.push(t),i.rightDelim!=null){var a=new Z("mo",[new bt(i.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),r.push(a)}return yl(r)}return t},v1=(i,e)=>{if(!e)return i;var t={type:"styling",mode:i.mode,style:e,body:[i]};return t};ae({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"),v1({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:h,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},c)},htmlBuilder:Zp,mathmlBuilder:Qp});ae({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 Xh=["display","text","script","scriptscript"],Vh=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};ae({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=Aa(e[0]),a=s.type==="atom"&&s.family==="open"?Vh(s.text):null,o=Aa(e[1]),l=o.type==="atom"&&o.family==="close"?Vh(o.text):null,h=Me(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=Me(m.body[0],"textord");f=Xh[Number(v.text)]}}else m=Me(m,"textord"),f=Xh[Number(m.text)];return v1({type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:c,barSize:d,leftDelim:a,rightDelim:l},f)}});ae({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:Me(e[0],"size").value,token:r}}});ae({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=Me(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 x1=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?Ge(i.sup,e.havingStyle(t.sup()),e):Ge(i.sub,e.havingStyle(t.sub()),e),r=Me(i.base,"horizBrace")):r=Me(i,"horizBrace");var s=Ge(r.base,e.havingBaseStyle(be.DISPLAY)),a=Ya(r,e),o;if(r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=$e({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=j(["minner",r.isOver?"mover":"munder"],[o],e);r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=$e({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return j(["minner",r.isOver?"mover":"munder"],[o],e)},Jp=(i,e)=>{var t=Wa(i.label);return new Z(i.isOver?"mover":"munder",[Ke(i.base,e),t])};ae({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:x1,mathmlBuilder:Jp});ae({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Me(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:wt(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=Ct(i.body,e,!1);return up(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=Rn(i.body,e);return t instanceof Z||(t=new Z("mrow",[t])),t.setAttribute("href",i.href),t}});ae({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Me(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:wt(o)}}});ae({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:wt(e[0])}},htmlBuilder(i,e){var t=Ct(i.body,e.withFont(""),!1);return gn(t)},mathmlBuilder(i,e){return new Z("mrow",yi(i.body,e.withFont("")))}});ae({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=Me(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 K("\\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:wt(a)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=Ct(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=j(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)=>Rn(i.body,e)});ae({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:wt(e[0]),mathml:wt(e[1])}},htmlBuilder:(i,e)=>{var t=Ct(i.html,e,!1);return gn(t)},mathmlBuilder:(i,e)=>Rn(i.mathml,e)});var Ro=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 K("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Id(n))throw new K("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ae({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=Me(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=Ro(f);break;case"height":s=Ro(f);break;case"totalheight":a=Ro(f);break;default:throw new K("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Me(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=lt(i.height,e),n=0;i.totalheight.number>0&&(n=lt(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=lt(i.width,e));var s={height:Q(t+n)};r>0&&(s.width=Q(r)),n>0&&(s.verticalAlign=Q(-n));var a=new ep(i.src,i.alt,s);return a.height=t,a.depth=n,a},mathmlBuilder:(i,e)=>{var t=new Z("mglyph",[]);t.setAttribute("alt",i.alt);var n=lt(i.height,e),r=0;if(i.totalheight.number>0&&(r=lt(i.totalheight,e)-n,t.setAttribute("valign",Q(-r))),t.setAttribute("height",Q(n+r)),i.width.number>0){var s=lt(i.width,e);t.setAttribute("width",Q(s))}return t.setAttribute("src",i.src),t}});ae({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=Me(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 Ud(i.dimension,e)},mathmlBuilder(i,e){var t=lt(i.dimension,e);return new Xd(t)}});ae({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=j([],[Ge(i.body,e)]),t=j(["inner"],[t],e)):t=j(["inner"],[Ge(i.body,e)]);var n=j(["fix"],[]),r=j([i.alignment],[t,n],e),s=j(["strut"]);return s.style.height=Q(r.height+r.depth),r.depth&&(s.style.verticalAlign=Q(-r.depth)),r.children.unshift(s),r=j(["thinbox"],[r],e),j(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Z("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}});ae({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}}});ae({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new K("Mismatched "+i.funcName)}});var jh=(i,e)=>{switch(e.style.size){case be.DISPLAY.size:return i.display;case be.TEXT.size:return i.text;case be.SCRIPT.size:return i.script;case be.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};ae({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:wt(e[0]),text:wt(e[1]),script:wt(e[2]),scriptscript:wt(e[3])}},htmlBuilder:(i,e)=>{var t=jh(i,e),n=Ct(t,e,!1);return gn(n)},mathmlBuilder:(i,e)=>{var t=jh(i,e);return Rn(t,e)}});var y1=(i,e,t,n,r,s,a)=>{i=j([],[i]);var o=t&&pn(t),l,h;if(e){var c=Ge(e,n.havingStyle(r.sup()),n);h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(t){var d=Ge(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=$e({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Q(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Q(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var v=i.height-a;f=$e({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Q(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i}]})}else if(h){var g=i.depth+a;f=$e({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:Q(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return i;var x=[f];if(l&&s!==0&&!o){var b=j(["mspace"],[],n);b.style.marginRight=Q(s),x.unshift(b)}return j(["mop","op-limits"],x,n)},w1=new Set(["\\smallint"]),Qr=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Me(i.base,"op"),r=!0):s=Me(i,"op");var a=e.style,o=!1;a.size===be.DISPLAY.size&&s.symbol&&!w1.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=qt(s.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h=l.italic,d.length>0){var f=Gd(d+"Size"+(o?"2":"1"),e);l=$e({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=Ct(s.body,e,!0);m.length===1&&m[0]instanceof gi?(l=m[0],l.classes[0]="mop"):l=j(["mop"],m,e)}else{for(var v=[],g=1;g<s.name.length;g++)v.push(vl(s.name[g],s.mode,e));l=j(["mop"],v,e)}var x=0,b=0;if((l instanceof gi||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var M;x=(l.height-l.depth)/2-e.fontMetrics().axisHeight,b=(M=l.italic)!=null?M:0}return r?y1(l,t,n,e,a,b,x):(x&&(l.style.position="relative",l.style.top=Q(x)),l)},Us=(i,e)=>{var t;if(i.symbol)t=new Z("mo",[zi(i.name,i.mode)]),w1.has(i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new Z("mo",yi(i.body,e));else{t=new Z("mi",[new bt(i.name.slice(1))]);var n=new Z("mo",[zi("","text")]);i.parentIsSupSub?t=new Z("mrow",[t,n]):t=Yd([t,n])}return t},em={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ae({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=em[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Qr,mathmlBuilder:Us});ae({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:wt(n)}},htmlBuilder:Qr,mathmlBuilder:Us});var tm={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ae({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:Us});ae({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:Us});ae({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=tm[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Qr,mathmlBuilder:Us});var b1=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Me(i.base,"operatorname"),r=!0):s=Me(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=Ct(o,e.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof gi&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=j(["mop"],l,e)}else a=j(["mop"],[],e);return r?y1(a,t,n,e,e.style,0,0):a},im=(i,e)=>{for(var t=yi(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var s=t[r];if(!(s instanceof Xd))if(s instanceof Z)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 bt?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 bt(o)]}var l=new Z("mi",t);l.setAttribute("mathvariant","normal");var h=new Z("mo",[zi("","text")]);return i.parentIsSupSub?new Z("mrow",[l,h]):Yd([l,h])};ae({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:wt(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:b1,mathmlBuilder:im});k("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");hr({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?gn(Ct(i.body,e,!1)):j(["mord"],Ct(i.body,e,!0),e)},mathmlBuilder(i,e){return Rn(i.body,e,!0)}});ae({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=Ge(i.body,e.havingCrampedStyle()),n=qr("overline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]});return j(["mord","overline"],[s],e)},mathmlBuilder(i,e){var t=new Z("mo",[new bt("‾")]);t.setAttribute("stretchy","true");var n=new Z("mover",[Ke(i.body,e),t]);return n.setAttribute("accent","true"),n}});ae({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:wt(n)}},htmlBuilder:(i,e)=>{var t=Ct(i.body,e.withPhantom(),!1);return gn(t)},mathmlBuilder:(i,e)=>{var t=yi(i.body,e);return new Z("mphantom",t)}});k("\\hphantom","\\smash{\\phantom{#1}}");ae({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=j(["inner"],[Ge(i.body,e.withPhantom())]),n=j(["fix"],[]);return j(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=yi(wt(i.body),e),n=new Z("mphantom",t),r=new Z("mpadded",[n]);return r.setAttribute("width","0px"),r}});ae({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Me(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=Ge(i.body,e),n=lt(i.dy,e);return $e({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new Z("mpadded",[Ke(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});ae({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});ae({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=Me(e[0],"size"),a=Me(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Me(r,"size").value,width:s.value,height:a.value}},htmlBuilder(i,e){var t=j(["mord","rule"],[],e),n=lt(i.width,e),r=lt(i.height,e),s=i.shift?lt(i.shift,e):0;return t.style.borderRightWidth=Q(n),t.style.borderTopWidth=Q(r),t.style.bottom=Q(s),t.width=n,t.height=r+s,t.depth=-s,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=lt(i.width,e),n=lt(i.height,e),r=i.shift?lt(i.shift,e):0,s=e.color&&e.getColor()||"black",a=new Z("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",Q(t)),a.setAttribute("height",Q(n));var o=new Z("mpadded",[a]);return r>=0?o.setAttribute("height",Q(r)):(o.setAttribute("height",Q(r)),o.setAttribute("depth",Q(-r))),o.setAttribute("voffset",Q(r)),o}});function k1(i,e,t){for(var n=Ct(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 gn(n)}var Kh=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],nm=(i,e)=>{var t=e.havingSize(i.size);return k1(i.body,t,e)};ae({type:"sizing",names:Kh,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:Kh.indexOf(n)+1,body:s}},htmlBuilder:nm,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=yi(i.body,t),r=new Z("mstyle",n);return r.setAttribute("mathsize",Q(t.sizeMultiplier)),r}});ae({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]&&Me(t[0],"ordgroup");if(a)for(var o,l=0;l<a.body.length;++l){var h=a.body[l];if(o=Xa(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=j([],[Ge(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 j(["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=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t}]});return j(["mord"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Z("mpadded",[Ke(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});ae({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=Ge(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=Wr(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,s=r;e.style.id<be.TEXT.id&&(s=e.fontMetrics().xHeight);var a=r+s/4,o=t.height+t.depth+a+r,{span:l,ruleWidth:h,advanceWidth:c}=Gp(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=Q(c);var m=$e({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(be.SCRIPTSCRIPT),g=Ge(i.index,v,e),x=.6*(m.height-m.depth),b=$e({positionType:"shift",positionData:-x,children:[{type:"elem",elem:g}]}),M=j(["root"],[b]);return j(["mord","sqrt"],[M,m],e)}else return j(["mord","sqrt"],[m],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Z("mroot",[Ke(t,e),Ke(n,e)]):new Z("msqrt",[Ke(t,e)])}});var P0={display:be.DISPLAY,text:be.TEXT,script:be.SCRIPT,scriptscript:be.SCRIPTSCRIPT};function rm(i){return i in P0}ae({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(!rm(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:r.mode,style:a,body:s}},htmlBuilder(i,e){var t=P0[i.style],n=e.havingStyle(t);return i.resetFont&&(n=n.withFont("")),k1(i.body,n,e)},mathmlBuilder(i,e){var t=P0[i.style],n=e.havingStyle(t);i.resetFont&&(n=n.withFont(""));var r=yi(i.body,n),s=new Z("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 sm=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===be.DISPLAY.size||n.alwaysHandleSupSub);return r?Qr:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(t.style.size===be.DISPLAY.size||n.limits);return s?b1:null}else{if(n.type==="accent")return pn(n.base)?bl:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?x1:null}else return null}else return null};hr({type:"supsub",htmlBuilder(i,e){var t=sm(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:s}=i,a=Ge(n,e),o,l,h=e.fontMetrics(),c=0,d=0,f=n&&pn(n);if(r){var m=e.havingStyle(e.style.sup());o=Ge(r,m,e),f||(c=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=Ge(s,v,e),f||(d=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var g;e.style===be.DISPLAY?g=h.sup1:e.style.cramped?g=h.sup3:g=h.sup2;var x=e.sizeMultiplier,b=Q(.5/h.ptPerEm/x),M=null;if(l){var E=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");if(a instanceof gi||E){var C;M=Q(-((C=a.italic)!=null?C:0))}}var N;if(o&&l){c=Math.max(c,g,o.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var O=h.defaultRuleThickness,B=4*O;if(c-o.depth-(l.height-d)<B){d=B-(c-o.depth)+l.height;var H=.8*h.xHeight-(c-o.depth);H>0&&(c+=H,d-=H)}var W=[{type:"elem",elem:l,shift:d,marginRight:b,marginLeft:M},{type:"elem",elem:o,shift:-c,marginRight:b}];N=$e({positionType:"individualShift",children:W})}else if(l){d=Math.max(d,h.sub1,l.height-.8*h.xHeight);var ie=[{type:"elem",elem:l,marginLeft:M,marginRight:b}];N=$e({positionType:"shift",positionData:d,children:ie})}else if(o)c=Math.max(c,g,o.depth+.25*h.xHeight),N=$e({positionType:"shift",positionData:-c,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var $=R0(a,"right")||"mord";return j([$],[a,j(["msupsub"],[N])],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===be.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===be.DISPLAY||h.limits)?a="munderover":a="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===be.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===be.DISPLAY)?a="munder":a="msub"}else{var o=i.base;o&&o.type==="op"&&o.limits&&(e.style===be.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===be.DISPLAY)?a="mover":a="msup"}return new Z(a,s)}});hr({type:"atom",htmlBuilder(i,e){return vl(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Z("mo",[zi(i.text,i.mode)]);if(i.family==="bin"){var n=wl(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 T1={mi:"italic",mn:"normal",mtext:"normal"};hr({type:"mathord",htmlBuilder(i,e){return qa(i,e,"mathord")},mathmlBuilder(i,e){var t=new Z("mi",[zi(i.text,i.mode,e)]),n=wl(i,e)||"italic";return n!==T1[t.type]&&t.setAttribute("mathvariant",n),t}});hr({type:"textord",htmlBuilder(i,e){return qa(i,e,"textord")},mathmlBuilder(i,e){var t=zi(i.text,i.mode,e),n=wl(i,e)||"normal",r;return i.mode==="text"?r=new Z("mtext",[t]):/[0-9]/.test(i.text)?r=new Z("mn",[t]):i.text==="\\prime"?r=new Z("mo",[t]):r=new Z("mi",[t]),n!==T1[r.type]&&r.setAttribute("mathvariant",n),r}});var Do={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Io={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};hr({type:"spacing",htmlBuilder(i,e){if(Io.hasOwnProperty(i.text)){var t=Io[i.text].className||"";if(i.mode==="text"){var n=qa(i,e,"textord");return n.classes.push(t),n}else return j(["mspace",t],[vl(i.text,i.mode,e)],e)}else{if(Do.hasOwnProperty(i.text))return j(["mspace",Do[i.text]],[],e);throw new K('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(Io.hasOwnProperty(i.text))t=new Z("mtext",[new bt(" ")]);else{if(Do.hasOwnProperty(i.text))return new Z("mspace");throw new K('Unknown type of space "'+i.text+'"')}return t}});var Zh=()=>{var i=new Z("mtd",[]);return i.setAttribute("width","50%"),i};hr({type:"tag",mathmlBuilder(i,e){var t=new Z("mtable",[new Z("mtr",[Zh(),new Z("mtd",[Rn(i.body,e)]),Zh(),new Z("mtd",[Rn(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var Qh={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Jh={"\\textbf":"textbf","\\textmd":"textmd"},am={"\\textit":"textit","\\textup":"textup"},ec=(i,e)=>{var t=i.font;if(t){if(Qh[t])return e.withTextFontFamily(Qh[t]);if(Jh[t])return e.withTextFontWeight(Jh[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(am[t])};ae({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:wt(r),font:n}},htmlBuilder(i,e){var t=ec(i,e),n=Ct(i.body,t,!0);return j(["mord","text"],n,t)},mathmlBuilder(i,e){var t=ec(i,e);return Rn(i.body,t)}});ae({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=Ge(i.body,e),n=qr("underline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]});return j(["mord","underline"],[s],e)},mathmlBuilder(i,e){var t=new Z("mo",[new bt("‾")]);t.setAttribute("stretchy","true");var n=new Z("munder",[Ke(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});ae({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=Ge(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return $e({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new Z("mpadded",[Ke(i.body,e)],["vcenter"]);return new Z("mrow",[t])}});ae({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new K("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=tc(i),n=[],r=e.havingStyle(e.style.text()),s=0;s<t.length;s++){var a=t[s];a==="~"&&(a="\\textasciitilde"),n.push(qt(a,"Typewriter-Regular",i.mode,r,["mord","texttt"]))}return j(["mord","text"].concat(r.sizingClasses(e)),Hd(n),r)},mathmlBuilder(i,e){var t=new bt(tc(i)),n=new Z("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var tc=i=>i.body.replace(/ /g,i.star?"␣":" "),Sn=qd,E1=`[ \r
|
|
561
|
+
-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 Z4(i){return"toText"in i}class jr{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(Z4(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}var T0={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},Q4={ex:!0,em:!0,mu:!0},Id=function(e){return typeof e!="string"&&(e=e.unit),e in T0||e in Q4||e==="ex"},lt=function(e,t){var n;if(e.unit in T0)n=T0[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 K("Invalid unit: '"+e.unit+"'");r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},ee=function(e){return+e.toFixed(4)+"em"},An=function(e){return e.filter(t=>t).join(" ")},ml=function(e){var t="";for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=S4(n)+":"+r+";")}return t},Od=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)}},Bd=function(e){var t=document.createElement(e);t.className=An(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},J4=/[\s"'>/=\x00-\x1f]/,Pd=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+$t(An(this.classes))+'"');var n=ml(this.style);n&&(t+=' style="'+$t(n)+'"');for(var r of Object.keys(this.attributes)){if(J4.test(r))throw new K("Invalid attribute name '"+r+"'");t+=" "+r+'="'+$t(this.attributes[r])+'"'}t+=">";for(var s=0;s<this.children.length;s++)t+=this.children[s].toMarkup();return t+="</"+e+">",t};class Kr{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,Od.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Bd.call(this,"span")}toMarkup(){return Pd.call(this,"span")}}class $a{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,Od.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 Bd.call(this,"a")}toMarkup(){return Pd.call(this,"a")}}class ep{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="'+$t(this.src)+'"'+(' alt="'+$t(this.alt)+'"'),t=ml(this.style);return t&&(e+=' style="'+$t(t)+'"'),e+="'/>",e}}var tp={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class gi{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=H4(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=tp[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=ee(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=An(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+=$t(An(this.classes)),t+='"');var n="";this.italic>0&&(n+="margin-right:"+ee(this.italic)+";"),n+=ml(this.style),n&&(e=!0,t+=' style="'+$t(n)+'"');var r=$t(this.text);return e?(t+=">",t+=r,t+="</span>",t):r}}class un{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+'="'+$t(this.attributes[t])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class _n{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",Th[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+$t(this.alternate)+'"/>':'<path d="'+$t(Th[this.pathName])+'"/>'}}class E0{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+'="'+$t(this.attributes[t])+'"';return e+="/>",e}}function ip(i){if(i instanceof gi)return i;throw new Error("Expected symbolNode but got "+String(i)+".")}function np(i){if(i instanceof Kr)return i;throw new Error("Expected span<HtmlDomNode> but got "+String(i)+".")}var rp=i=>i instanceof Kr||i instanceof $a||i instanceof jr,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]},Eh={Å:"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 sp(i,e){Gi[i]=e}function gl(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 Eh&&(n=Eh[i[0]].charCodeAt(0),r=Gi[e][n]),!r&&t==="text"&&Dd(n)&&(r=Gi[e][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}var bo={};function ap(i){var e;if(i>=5?e=0:i>=3?e=1:e=2,!bo[e]){var t=bo[e]={cssEmPerMu:na.quad[e]/18};for(var n in na)na.hasOwnProperty(n)&&(t[n]=na[n][e])}return bo[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",W="text",y="main",S="ams",rt="accent-token",he="bin",jt="close",Zr="inner",ge="mathord",kt="op-token",xi="open",Hs="punct",z="rel",mn="spacing",L="textord";u(p,y,z,"≡","\\equiv",!0);u(p,y,z,"≺","\\prec",!0);u(p,y,z,"≻","\\succ",!0);u(p,y,z,"∼","\\sim",!0);u(p,y,z,"⊥","\\perp");u(p,y,z,"⪯","\\preceq",!0);u(p,y,z,"⪰","\\succeq",!0);u(p,y,z,"≃","\\simeq",!0);u(p,y,z,"∣","\\mid",!0);u(p,y,z,"≪","\\ll",!0);u(p,y,z,"≫","\\gg",!0);u(p,y,z,"≍","\\asymp",!0);u(p,y,z,"∥","\\parallel");u(p,y,z,"⋈","\\bowtie",!0);u(p,y,z,"⌣","\\smile",!0);u(p,y,z,"⊑","\\sqsubseteq",!0);u(p,y,z,"⊒","\\sqsupseteq",!0);u(p,y,z,"≐","\\doteq",!0);u(p,y,z,"⌢","\\frown",!0);u(p,y,z,"∋","\\ni",!0);u(p,y,z,"∝","\\propto",!0);u(p,y,z,"⊢","\\vdash",!0);u(p,y,z,"⊣","\\dashv",!0);u(p,y,z,"∋","\\owns");u(p,y,Hs,".","\\ldotp");u(p,y,Hs,"⋅","\\cdotp");u(p,y,Hs,"⋅","·");u(W,y,L,"⋅","·");u(p,y,L,"#","\\#");u(W,y,L,"#","\\#");u(p,y,L,"&","\\&");u(W,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(W,y,L,"§","\\S");u(p,y,L,"¶","\\P",!0);u(W,y,L,"¶","\\P");u(p,y,L,"†","\\dag");u(W,y,L,"†","\\dag");u(W,y,L,"†","\\textdagger");u(p,y,L,"‡","\\ddag");u(W,y,L,"‡","\\ddag");u(W,y,L,"‡","\\textdaggerdbl");u(p,y,jt,"⎱","\\rmoustache",!0);u(p,y,xi,"⎰","\\lmoustache",!0);u(p,y,jt,"⟯","\\rgroup",!0);u(p,y,xi,"⟮","\\lgroup",!0);u(p,y,he,"∓","\\mp",!0);u(p,y,he,"⊖","\\ominus",!0);u(p,y,he,"⊎","\\uplus",!0);u(p,y,he,"⊓","\\sqcap",!0);u(p,y,he,"∗","\\ast");u(p,y,he,"⊔","\\sqcup",!0);u(p,y,he,"◯","\\bigcirc",!0);u(p,y,he,"∙","\\bullet",!0);u(p,y,he,"‡","\\ddagger");u(p,y,he,"≀","\\wr",!0);u(p,y,he,"⨿","\\amalg");u(p,y,he,"&","\\And");u(p,y,z,"⟵","\\longleftarrow",!0);u(p,y,z,"⇐","\\Leftarrow",!0);u(p,y,z,"⟸","\\Longleftarrow",!0);u(p,y,z,"⟶","\\longrightarrow",!0);u(p,y,z,"⇒","\\Rightarrow",!0);u(p,y,z,"⟹","\\Longrightarrow",!0);u(p,y,z,"↔","\\leftrightarrow",!0);u(p,y,z,"⟷","\\longleftrightarrow",!0);u(p,y,z,"⇔","\\Leftrightarrow",!0);u(p,y,z,"⟺","\\Longleftrightarrow",!0);u(p,y,z,"↦","\\mapsto",!0);u(p,y,z,"⟼","\\longmapsto",!0);u(p,y,z,"↗","\\nearrow",!0);u(p,y,z,"↩","\\hookleftarrow",!0);u(p,y,z,"↪","\\hookrightarrow",!0);u(p,y,z,"↘","\\searrow",!0);u(p,y,z,"↼","\\leftharpoonup",!0);u(p,y,z,"⇀","\\rightharpoonup",!0);u(p,y,z,"↙","\\swarrow",!0);u(p,y,z,"↽","\\leftharpoondown",!0);u(p,y,z,"⇁","\\rightharpoondown",!0);u(p,y,z,"↖","\\nwarrow",!0);u(p,y,z,"⇌","\\rightleftharpoons",!0);u(p,S,z,"≮","\\nless",!0);u(p,S,z,"","\\@nleqslant");u(p,S,z,"","\\@nleqq");u(p,S,z,"⪇","\\lneq",!0);u(p,S,z,"≨","\\lneqq",!0);u(p,S,z,"","\\@lvertneqq");u(p,S,z,"⋦","\\lnsim",!0);u(p,S,z,"⪉","\\lnapprox",!0);u(p,S,z,"⊀","\\nprec",!0);u(p,S,z,"⋠","\\npreceq",!0);u(p,S,z,"⋨","\\precnsim",!0);u(p,S,z,"⪹","\\precnapprox",!0);u(p,S,z,"≁","\\nsim",!0);u(p,S,z,"","\\@nshortmid");u(p,S,z,"∤","\\nmid",!0);u(p,S,z,"⊬","\\nvdash",!0);u(p,S,z,"⊭","\\nvDash",!0);u(p,S,z,"⋪","\\ntriangleleft");u(p,S,z,"⋬","\\ntrianglelefteq",!0);u(p,S,z,"⊊","\\subsetneq",!0);u(p,S,z,"","\\@varsubsetneq");u(p,S,z,"⫋","\\subsetneqq",!0);u(p,S,z,"","\\@varsubsetneqq");u(p,S,z,"≯","\\ngtr",!0);u(p,S,z,"","\\@ngeqslant");u(p,S,z,"","\\@ngeqq");u(p,S,z,"⪈","\\gneq",!0);u(p,S,z,"≩","\\gneqq",!0);u(p,S,z,"","\\@gvertneqq");u(p,S,z,"⋧","\\gnsim",!0);u(p,S,z,"⪊","\\gnapprox",!0);u(p,S,z,"⊁","\\nsucc",!0);u(p,S,z,"⋡","\\nsucceq",!0);u(p,S,z,"⋩","\\succnsim",!0);u(p,S,z,"⪺","\\succnapprox",!0);u(p,S,z,"≆","\\ncong",!0);u(p,S,z,"","\\@nshortparallel");u(p,S,z,"∦","\\nparallel",!0);u(p,S,z,"⊯","\\nVDash",!0);u(p,S,z,"⋫","\\ntriangleright");u(p,S,z,"⋭","\\ntrianglerighteq",!0);u(p,S,z,"","\\@nsupseteqq");u(p,S,z,"⊋","\\supsetneq",!0);u(p,S,z,"","\\@varsupsetneq");u(p,S,z,"⫌","\\supsetneqq",!0);u(p,S,z,"","\\@varsupsetneqq");u(p,S,z,"⊮","\\nVdash",!0);u(p,S,z,"⪵","\\precneqq",!0);u(p,S,z,"⪶","\\succneqq",!0);u(p,S,z,"","\\@nsubseteqq");u(p,S,he,"⊴","\\unlhd");u(p,S,he,"⊵","\\unrhd");u(p,S,z,"↚","\\nleftarrow",!0);u(p,S,z,"↛","\\nrightarrow",!0);u(p,S,z,"⇍","\\nLeftarrow",!0);u(p,S,z,"⇏","\\nRightarrow",!0);u(p,S,z,"↮","\\nleftrightarrow",!0);u(p,S,z,"⇎","\\nLeftrightarrow",!0);u(p,S,z,"△","\\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(W,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(W,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(W,S,L,"¥","\\yen",!0);u(p,S,L,"✓","\\checkmark",!0);u(W,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,xi,"┌","\\@ulcorner",!0);u(p,S,jt,"┐","\\@urcorner",!0);u(p,S,xi,"└","\\@llcorner",!0);u(p,S,jt,"┘","\\@lrcorner",!0);u(p,S,z,"≦","\\leqq",!0);u(p,S,z,"⩽","\\leqslant",!0);u(p,S,z,"⪕","\\eqslantless",!0);u(p,S,z,"≲","\\lesssim",!0);u(p,S,z,"⪅","\\lessapprox",!0);u(p,S,z,"≊","\\approxeq",!0);u(p,S,he,"⋖","\\lessdot");u(p,S,z,"⋘","\\lll",!0);u(p,S,z,"≶","\\lessgtr",!0);u(p,S,z,"⋚","\\lesseqgtr",!0);u(p,S,z,"⪋","\\lesseqqgtr",!0);u(p,S,z,"≑","\\doteqdot");u(p,S,z,"≓","\\risingdotseq",!0);u(p,S,z,"≒","\\fallingdotseq",!0);u(p,S,z,"∽","\\backsim",!0);u(p,S,z,"⋍","\\backsimeq",!0);u(p,S,z,"⫅","\\subseteqq",!0);u(p,S,z,"⋐","\\Subset",!0);u(p,S,z,"⊏","\\sqsubset",!0);u(p,S,z,"≼","\\preccurlyeq",!0);u(p,S,z,"⋞","\\curlyeqprec",!0);u(p,S,z,"≾","\\precsim",!0);u(p,S,z,"⪷","\\precapprox",!0);u(p,S,z,"⊲","\\vartriangleleft");u(p,S,z,"⊴","\\trianglelefteq");u(p,S,z,"⊨","\\vDash",!0);u(p,S,z,"⊪","\\Vvdash",!0);u(p,S,z,"⌣","\\smallsmile");u(p,S,z,"⌢","\\smallfrown");u(p,S,z,"≏","\\bumpeq",!0);u(p,S,z,"≎","\\Bumpeq",!0);u(p,S,z,"≧","\\geqq",!0);u(p,S,z,"⩾","\\geqslant",!0);u(p,S,z,"⪖","\\eqslantgtr",!0);u(p,S,z,"≳","\\gtrsim",!0);u(p,S,z,"⪆","\\gtrapprox",!0);u(p,S,he,"⋗","\\gtrdot");u(p,S,z,"⋙","\\ggg",!0);u(p,S,z,"≷","\\gtrless",!0);u(p,S,z,"⋛","\\gtreqless",!0);u(p,S,z,"⪌","\\gtreqqless",!0);u(p,S,z,"≖","\\eqcirc",!0);u(p,S,z,"≗","\\circeq",!0);u(p,S,z,"≜","\\triangleq",!0);u(p,S,z,"∼","\\thicksim");u(p,S,z,"≈","\\thickapprox");u(p,S,z,"⫆","\\supseteqq",!0);u(p,S,z,"⋑","\\Supset",!0);u(p,S,z,"⊐","\\sqsupset",!0);u(p,S,z,"≽","\\succcurlyeq",!0);u(p,S,z,"⋟","\\curlyeqsucc",!0);u(p,S,z,"≿","\\succsim",!0);u(p,S,z,"⪸","\\succapprox",!0);u(p,S,z,"⊳","\\vartriangleright");u(p,S,z,"⊵","\\trianglerighteq");u(p,S,z,"⊩","\\Vdash",!0);u(p,S,z,"∣","\\shortmid");u(p,S,z,"∥","\\shortparallel");u(p,S,z,"≬","\\between",!0);u(p,S,z,"⋔","\\pitchfork",!0);u(p,S,z,"∝","\\varpropto");u(p,S,z,"◀","\\blacktriangleleft");u(p,S,z,"∴","\\therefore",!0);u(p,S,z,"∍","\\backepsilon");u(p,S,z,"▶","\\blacktriangleright");u(p,S,z,"∵","\\because",!0);u(p,S,z,"⋘","\\llless");u(p,S,z,"⋙","\\gggtr");u(p,S,he,"⊲","\\lhd");u(p,S,he,"⊳","\\rhd");u(p,S,z,"≂","\\eqsim",!0);u(p,y,z,"⋈","\\Join");u(p,S,z,"≑","\\Doteq",!0);u(p,S,he,"∔","\\dotplus",!0);u(p,S,he,"∖","\\smallsetminus");u(p,S,he,"⋒","\\Cap",!0);u(p,S,he,"⋓","\\Cup",!0);u(p,S,he,"⩞","\\doublebarwedge",!0);u(p,S,he,"⊟","\\boxminus",!0);u(p,S,he,"⊞","\\boxplus",!0);u(p,S,he,"⋇","\\divideontimes",!0);u(p,S,he,"⋉","\\ltimes",!0);u(p,S,he,"⋊","\\rtimes",!0);u(p,S,he,"⋋","\\leftthreetimes",!0);u(p,S,he,"⋌","\\rightthreetimes",!0);u(p,S,he,"⋏","\\curlywedge",!0);u(p,S,he,"⋎","\\curlyvee",!0);u(p,S,he,"⊝","\\circleddash",!0);u(p,S,he,"⊛","\\circledast",!0);u(p,S,he,"⋅","\\centerdot");u(p,S,he,"⊺","\\intercal",!0);u(p,S,he,"⋒","\\doublecap");u(p,S,he,"⋓","\\doublecup");u(p,S,he,"⊠","\\boxtimes",!0);u(p,S,z,"⇢","\\dashrightarrow",!0);u(p,S,z,"⇠","\\dashleftarrow",!0);u(p,S,z,"⇇","\\leftleftarrows",!0);u(p,S,z,"⇆","\\leftrightarrows",!0);u(p,S,z,"⇚","\\Lleftarrow",!0);u(p,S,z,"↞","\\twoheadleftarrow",!0);u(p,S,z,"↢","\\leftarrowtail",!0);u(p,S,z,"↫","\\looparrowleft",!0);u(p,S,z,"⇋","\\leftrightharpoons",!0);u(p,S,z,"↶","\\curvearrowleft",!0);u(p,S,z,"↺","\\circlearrowleft",!0);u(p,S,z,"↰","\\Lsh",!0);u(p,S,z,"⇈","\\upuparrows",!0);u(p,S,z,"↿","\\upharpoonleft",!0);u(p,S,z,"⇃","\\downharpoonleft",!0);u(p,y,z,"⊶","\\origof",!0);u(p,y,z,"⊷","\\imageof",!0);u(p,S,z,"⊸","\\multimap",!0);u(p,S,z,"↭","\\leftrightsquigarrow",!0);u(p,S,z,"⇉","\\rightrightarrows",!0);u(p,S,z,"⇄","\\rightleftarrows",!0);u(p,S,z,"↠","\\twoheadrightarrow",!0);u(p,S,z,"↣","\\rightarrowtail",!0);u(p,S,z,"↬","\\looparrowright",!0);u(p,S,z,"↷","\\curvearrowright",!0);u(p,S,z,"↻","\\circlearrowright",!0);u(p,S,z,"↱","\\Rsh",!0);u(p,S,z,"⇊","\\downdownarrows",!0);u(p,S,z,"↾","\\upharpoonright",!0);u(p,S,z,"⇂","\\downharpoonright",!0);u(p,S,z,"⇝","\\rightsquigarrow",!0);u(p,S,z,"⇝","\\leadsto");u(p,S,z,"⇛","\\Rrightarrow",!0);u(p,S,z,"↾","\\restriction");u(p,y,L,"‘","`");u(p,y,L,"$","\\$");u(W,y,L,"$","\\$");u(W,y,L,"$","\\textdollar");u(p,y,L,"%","\\%");u(W,y,L,"%","\\%");u(p,y,L,"_","\\_");u(W,y,L,"_","\\_");u(W,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,ge,"α","\\alpha",!0);u(p,y,ge,"β","\\beta",!0);u(p,y,ge,"γ","\\gamma",!0);u(p,y,ge,"δ","\\delta",!0);u(p,y,ge,"ϵ","\\epsilon",!0);u(p,y,ge,"ζ","\\zeta",!0);u(p,y,ge,"η","\\eta",!0);u(p,y,ge,"θ","\\theta",!0);u(p,y,ge,"ι","\\iota",!0);u(p,y,ge,"κ","\\kappa",!0);u(p,y,ge,"λ","\\lambda",!0);u(p,y,ge,"μ","\\mu",!0);u(p,y,ge,"ν","\\nu",!0);u(p,y,ge,"ξ","\\xi",!0);u(p,y,ge,"ο","\\omicron",!0);u(p,y,ge,"π","\\pi",!0);u(p,y,ge,"ρ","\\rho",!0);u(p,y,ge,"σ","\\sigma",!0);u(p,y,ge,"τ","\\tau",!0);u(p,y,ge,"υ","\\upsilon",!0);u(p,y,ge,"ϕ","\\phi",!0);u(p,y,ge,"χ","\\chi",!0);u(p,y,ge,"ψ","\\psi",!0);u(p,y,ge,"ω","\\omega",!0);u(p,y,ge,"ε","\\varepsilon",!0);u(p,y,ge,"ϑ","\\vartheta",!0);u(p,y,ge,"ϖ","\\varpi",!0);u(p,y,ge,"ϱ","\\varrho",!0);u(p,y,ge,"ς","\\varsigma",!0);u(p,y,ge,"φ","\\varphi",!0);u(p,y,he,"∗","*",!0);u(p,y,he,"+","+");u(p,y,he,"−","-",!0);u(p,y,he,"⋅","\\cdot",!0);u(p,y,he,"∘","\\circ",!0);u(p,y,he,"÷","\\div",!0);u(p,y,he,"±","\\pm",!0);u(p,y,he,"×","\\times",!0);u(p,y,he,"∩","\\cap",!0);u(p,y,he,"∪","\\cup",!0);u(p,y,he,"∖","\\setminus",!0);u(p,y,he,"∧","\\land");u(p,y,he,"∨","\\lor");u(p,y,he,"∧","\\wedge",!0);u(p,y,he,"∨","\\vee",!0);u(p,y,L,"√","\\surd");u(p,y,xi,"⟨","\\langle",!0);u(p,y,xi,"∣","\\lvert");u(p,y,xi,"∥","\\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,z,"=","=");u(p,y,z,":",":");u(p,y,z,"≈","\\approx",!0);u(p,y,z,"≅","\\cong",!0);u(p,y,z,"≥","\\ge");u(p,y,z,"≥","\\geq",!0);u(p,y,z,"←","\\gets");u(p,y,z,">","\\gt",!0);u(p,y,z,"∈","\\in",!0);u(p,y,z,"","\\@not");u(p,y,z,"⊂","\\subset",!0);u(p,y,z,"⊃","\\supset",!0);u(p,y,z,"⊆","\\subseteq",!0);u(p,y,z,"⊇","\\supseteq",!0);u(p,S,z,"⊈","\\nsubseteq",!0);u(p,S,z,"⊉","\\nsupseteq",!0);u(p,y,z,"⊨","\\models");u(p,y,z,"←","\\leftarrow",!0);u(p,y,z,"≤","\\le");u(p,y,z,"≤","\\leq",!0);u(p,y,z,"<","\\lt",!0);u(p,y,z,"→","\\rightarrow",!0);u(p,y,z,"→","\\to");u(p,S,z,"≱","\\ngeq",!0);u(p,S,z,"≰","\\nleq",!0);u(p,y,mn," ","\\ ");u(p,y,mn," ","\\space");u(p,y,mn," ","\\nobreakspace");u(W,y,mn," ","\\ ");u(W,y,mn," "," ");u(W,y,mn," ","\\space");u(W,y,mn," ","\\nobreakspace");u(p,y,mn,"","\\nobreak");u(p,y,mn,"","\\allowbreak");u(p,y,Hs,",",",");u(p,y,Hs,";",";");u(p,S,he,"⊼","\\barwedge",!0);u(p,S,he,"⊻","\\veebar",!0);u(p,y,he,"⊙","\\odot",!0);u(p,y,he,"⊕","\\oplus",!0);u(p,y,he,"⊗","\\otimes",!0);u(p,y,L,"∂","\\partial",!0);u(p,y,he,"⊘","\\oslash",!0);u(p,S,he,"⊚","\\circledcirc",!0);u(p,S,he,"⊡","\\boxdot",!0);u(p,y,he,"△","\\bigtriangleup");u(p,y,he,"▽","\\bigtriangledown");u(p,y,he,"†","\\dagger");u(p,y,he,"⋄","\\diamond");u(p,y,he,"⋆","\\star");u(p,y,he,"◃","\\triangleleft");u(p,y,he,"▹","\\triangleright");u(p,y,xi,"{","\\{");u(W,y,L,"{","\\{");u(W,y,L,"{","\\textbraceleft");u(p,y,jt,"}","\\}");u(W,y,L,"}","\\}");u(W,y,L,"}","\\textbraceright");u(p,y,xi,"{","\\lbrace");u(p,y,jt,"}","\\rbrace");u(p,y,xi,"[","\\lbrack",!0);u(W,y,L,"[","\\lbrack",!0);u(p,y,jt,"]","\\rbrack",!0);u(W,y,L,"]","\\rbrack",!0);u(p,y,xi,"(","\\lparen",!0);u(p,y,jt,")","\\rparen",!0);u(W,y,L,"<","\\textless",!0);u(W,y,L,">","\\textgreater",!0);u(p,y,xi,"⌊","\\lfloor",!0);u(p,y,jt,"⌋","\\rfloor",!0);u(p,y,xi,"⌈","\\lceil",!0);u(p,y,jt,"⌉","\\rceil",!0);u(p,y,L,"\\","\\backslash");u(p,y,L,"∣","|");u(p,y,L,"∣","\\vert");u(W,y,L,"|","\\textbar",!0);u(p,y,L,"∥","\\|");u(p,y,L,"∥","\\Vert");u(W,y,L,"∥","\\textbardbl");u(W,y,L,"~","\\textasciitilde");u(W,y,L,"\\","\\textbackslash");u(W,y,L,"^","\\textasciicircum");u(p,y,z,"↑","\\uparrow",!0);u(p,y,z,"⇑","\\Uparrow",!0);u(p,y,z,"↓","\\downarrow",!0);u(p,y,z,"⇓","\\Downarrow",!0);u(p,y,z,"↕","\\updownarrow",!0);u(p,y,z,"⇕","\\Updownarrow",!0);u(p,y,kt,"∐","\\coprod");u(p,y,kt,"⋁","\\bigvee");u(p,y,kt,"⋀","\\bigwedge");u(p,y,kt,"⨄","\\biguplus");u(p,y,kt,"⋂","\\bigcap");u(p,y,kt,"⋃","\\bigcup");u(p,y,kt,"∫","\\int");u(p,y,kt,"∫","\\intop");u(p,y,kt,"∬","\\iint");u(p,y,kt,"∭","\\iiint");u(p,y,kt,"∏","\\prod");u(p,y,kt,"∑","\\sum");u(p,y,kt,"⨂","\\bigotimes");u(p,y,kt,"⨁","\\bigoplus");u(p,y,kt,"⨀","\\bigodot");u(p,y,kt,"∮","\\oint");u(p,y,kt,"∯","\\oiint");u(p,y,kt,"∰","\\oiiint");u(p,y,kt,"⨆","\\bigsqcup");u(p,y,kt,"∫","\\smallint");u(W,y,Zr,"…","\\textellipsis");u(p,y,Zr,"…","\\mathellipsis");u(W,y,Zr,"…","\\ldots",!0);u(p,y,Zr,"…","\\ldots",!0);u(p,y,Zr,"⋯","\\@cdots",!0);u(p,y,Zr,"⋱","\\ddots",!0);u(p,y,L,"⋮","\\varvdots");u(W,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,ge,"","\\@imath");u(p,y,ge,"","\\@jmath");u(p,y,L,"ı","ı");u(p,y,L,"ȷ","ȷ");u(W,y,L,"ı","\\i",!0);u(W,y,L,"ȷ","\\j",!0);u(W,y,L,"ß","\\ss",!0);u(W,y,L,"æ","\\ae",!0);u(W,y,L,"œ","\\oe",!0);u(W,y,L,"ø","\\o",!0);u(W,y,L,"Æ","\\AE",!0);u(W,y,L,"Œ","\\OE",!0);u(W,y,L,"Ø","\\O",!0);u(W,y,rt,"ˊ","\\'");u(W,y,rt,"ˋ","\\`");u(W,y,rt,"ˆ","\\^");u(W,y,rt,"˜","\\~");u(W,y,rt,"ˉ","\\=");u(W,y,rt,"˘","\\u");u(W,y,rt,"˙","\\.");u(W,y,rt,"¸","\\c");u(W,y,rt,"˚","\\r");u(W,y,rt,"ˇ","\\v");u(W,y,rt,"¨",'\\"');u(W,y,rt,"˝","\\H");u(W,y,rt,"◯","\\textcircled");var Fd={"--":!0,"---":!0,"``":!0,"''":!0};u(W,y,L,"–","--",!0);u(W,y,L,"–","\\textendash");u(W,y,L,"—","---",!0);u(W,y,L,"—","\\textemdash");u(W,y,L,"‘","`",!0);u(W,y,L,"‘","\\textquoteleft");u(W,y,L,"’","'",!0);u(W,y,L,"’","\\textquoteright");u(W,y,L,"“","``",!0);u(W,y,L,"“","\\textquotedblleft");u(W,y,L,"”","''",!0);u(W,y,L,"”","\\textquotedblright");u(p,y,L,"°","\\degree",!0);u(W,y,L,"°","\\degree");u(W,y,L,"°","\\textdegree",!0);u(p,y,L,"£","\\pounds");u(p,y,L,"£","\\mathsterling",!0);u(W,y,L,"£","\\pounds");u(W,y,L,"£","\\textsterling",!0);u(p,S,L,"✠","\\maltese");u(W,S,L,"✠","\\maltese");var Mh='0123456789/@."';for(var ko=0;ko<Mh.length;ko++){var Sh=Mh.charAt(ko);u(p,y,L,Sh,Sh)}var zh='0123456789!@*()-=+";:?/.,';for(var To=0;To<zh.length;To++){var Ch=zh.charAt(To);u(W,y,L,Ch,Ch)}var Ca="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Eo=0;Eo<Ca.length;Eo++){var ra=Ca.charAt(Eo);u(p,y,ge,ra,ra),u(W,y,L,ra,ra)}u(p,S,L,"C","ℂ");u(W,S,L,"C","ℂ");u(p,S,L,"H","ℍ");u(W,S,L,"H","ℍ");u(p,S,L,"N","ℕ");u(W,S,L,"N","ℕ");u(p,S,L,"P","ℙ");u(W,S,L,"P","ℙ");u(p,S,L,"Q","ℚ");u(W,S,L,"Q","ℚ");u(p,S,L,"R","ℝ");u(W,S,L,"R","ℝ");u(p,S,L,"Z","ℤ");u(W,S,L,"Z","ℤ");u(p,y,ge,"h","ℎ");u(W,y,ge,"h","ℎ");var xe;for(var qt=0;qt<Ca.length;qt++){var ft=Ca.charAt(qt);xe=String.fromCharCode(55349,56320+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56372+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56424+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56580+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56684+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56736+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56788+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56840+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56944+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),qt<26&&(xe=String.fromCharCode(55349,56632+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe),xe=String.fromCharCode(55349,56476+qt),u(p,y,ge,ft,xe),u(W,y,L,ft,xe))}xe="𝕜";u(p,y,ge,"k",xe);u(W,y,L,"k",xe);for(var Yn=0;Yn<10;Yn++){var En=Yn.toString();xe=String.fromCharCode(55349,57294+Yn),u(p,y,ge,En,xe),u(W,y,L,En,xe),xe=String.fromCharCode(55349,57314+Yn),u(p,y,ge,En,xe),u(W,y,L,En,xe),xe=String.fromCharCode(55349,57324+Yn),u(p,y,ge,En,xe),u(W,y,L,En,xe),xe=String.fromCharCode(55349,57334+Yn),u(p,y,ge,En,xe),u(W,y,L,En,xe)}var M0="ÐÞþ";for(var Mo=0;Mo<M0.length;Mo++){var sa=M0.charAt(Mo);u(p,y,ge,sa,sa),u(W,y,L,sa,sa)}var S0={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Nh={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Lh={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},op={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Qn={mathClass:"",textClass:"",font:""},Ah={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},_h={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Rh={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},z0={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},C0={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Dh={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},N0={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},Ih=[S0,S0,Nh,Nh,Lh,Lh,op,Qn,Qn,Qn,Ah,Ah,_h,_h,Rh,Rh,z0,z0,C0,C0,Dh,Dh,Qn,Qn,N0,N0],lp=[S0,Qn,z0,C0,N0],hp=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 Ih[r]}else if(120782<=n&&n<=120831){var s=Math.floor((n-120782)/10);return lp[s]}else{if(n===120485||n===120486)return Ih[0];if(120486<n&&n<120782)return Qn;throw new K("Unsupported character: "+i)}},Ga=function(e,t,n){if(it[n][e]){var r=it[n][e].replace;r&&(e=r)}return{value:e,metrics:gl(e,t,n)}},Wt=function(e,t,n,r,s){var a=Ga(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 gi(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 gi(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},vl=function(e,t,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Ga(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"]))},cp=function(e,t,n){return n!=="textord"&&Ga(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},qa=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=hp(s);m=g.font,v=g[r+"Class"]}if(m)return Wt(s,m,r,t,a.concat(v));if(f){var x,b;if(f==="boldsymbol"){var M=cp(s,r,n);x=M.fontName,b=[M.fontClass]}else d?(x=L0[o].fontName,b=[o]):(x=aa(l,h,c),b=[l,h,c]);if(Ga(s,x,r).metrics)return Wt(s,x,r,t,a.concat(b));if(Fd.hasOwnProperty(s)&&x.slice(0,10)==="Typewriter"){for(var E=[],C=0;C<s.length;C++)E.push(Wt(s[C],x,r,t,a.concat(b)));return gn(E)}}if(n==="mathord")return Wt(s,"Math-Italic",r,t,a.concat(["mathnormal"]));if(n==="textord"){var N=it[r][s]&&it[r][s].font;if(N==="ams"){var O=aa("amsrm",h,c);return Wt(s,O,r,t,a.concat("amsrm",h,c))}else if(N==="main"||!N){var B=aa("textrm",h,c);return Wt(s,B,r,t,a.concat(h,c))}else{var $=aa(N,h,c);return Wt(s,$,r,t,a.concat($,h,c))}}else throw new Error("unexpected type: "+n+" in makeOrd")},dp=(i,e)=>{if(An(i.classes)!==An(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},Hd=i=>{for(var e=0;e<i.length-1;e++){var t=i[e],n=i[e+1];t instanceof gi&&n instanceof gi&&dp(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},xl=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},V=function(e,t,n,r){var s=new Kr(e,t,n,r);return xl(s),s},Rn=(i,e,t,n)=>new Kr(i,e,t,n),qr=function(e,t,n){var r=V([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=ee(r.height),r.maxFontSize=1,r},up=function(e,t,n,r){var s=new $a(e,t,n,r);return xl(s),s},gn=function(e){var t=new jr(e);return xl(t),t},Wr=function(e,t){return e instanceof jr?V([],[e],t):e},fp=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}},$e=function(e,t){for(var{children:n,depth:r}=fp(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=V(["pstrut"],[]);h.style.height=ee(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,b=g.wrapperClasses||[],M=g.wrapperStyle||{},E=V(b,[h,x],void 0,M);E.style.top=ee(-s-m-x.depth),g.marginLeft&&(E.style.marginLeft=g.marginLeft),g.marginRight&&(E.style.marginRight=g.marginRight),c.push(E),m+=x.height+x.depth}d=Math.min(d,m),f=Math.max(f,m)}var C=V(["vlist"],c);C.style.height=ee(f);var N;if(d<0){var O=V([],[]),B=V(["vlist"],[O]);B.style.height=ee(-d);var $=V(["vlist-s"],[new gi("")]);N=[V(["vlist-r"],[C,$]),V(["vlist-r"],[B])]}else N=[V(["vlist-r"],[C])];var Y=V(["vlist-t"],N);return N.length===2&&Y.classes.push("vlist-t2"),Y.height=f,Y.depth=-d,Y},Ud=(i,e)=>{var t=V(["mspace"],[],e),n=lt(i,e);return t.style.marginRight=ee(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},L0={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"}},$d={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gd=function(e,t){var[n,r,s]=$d[e],a=new _n(n),o=new un([a],{width:ee(r),height:ee(s),style:"width:"+ee(r),viewBox:"0 0 "+1e3*r+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),l=Rn(["overlay"],[o],t);return l.height=s,l.style.height=ee(s),l.style.width=ee(r),l},ot={number:3,unit:"mu"},Xn={number:4,unit:"mu"},rn={number:5,unit:"mu"},pp={mord:{mop:ot,mbin:Xn,mrel:rn,minner:ot},mop:{mord:ot,mop:ot,mrel:rn,minner:ot},mbin:{mord:Xn,mop:Xn,mopen:Xn,minner:Xn},mrel:{mord:rn,mop:rn,mopen:rn,minner:rn},mopen:{},mclose:{mop:ot,mbin:Xn,mrel:rn,minner:ot},mpunct:{mord:ot,mop:ot,mrel:rn,mopen:ot,mclose:ot,mpunct:ot,minner:ot},minner:{mord:ot,mop:ot,mbin:Xn,mrel:rn,mopen:ot,mpunct:ot,minner:ot}},mp={mord:{mop:ot},mop:{mord:ot,mop:ot},mbin:{},mrel:{},mopen:{},mclose:{mop:ot},mpunct:{},minner:{mop:ot}},qd={},Na={},La={};function oe(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)qd[t[l]]=o;e&&(s&&(Na[e]=s),a&&(La[e]=a))}function dr(i){var{type:e,htmlBuilder:t,mathmlBuilder:n}=i;oe({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:n})}var Aa=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},wt=function(e){return e.type==="ordgroup"?e.body:[e]},gp=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),vp=new Set(["rightmost","mrel","mclose","mpunct"]),xp={display:we.DISPLAY,text:we.TEXT,script:we.SCRIPT,scriptscript:we.SCRIPTSCRIPT},yp={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},zt=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var s=[],a=0;a<e.length;a++){var o=Ge(e[a],t);if(o instanceof jr){var l=o.children;s.push(...l)}else s.push(o)}if(Hd(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(xp[c.style]))}var d=V([r[0]||"leftmost"],[],t),f=V([r[1]||"rightmost"],[],t),m=n==="root";return A0(s,(v,g)=>{var x=g.classes[0],b=v.classes[0];x==="mbin"&&vp.has(b)?g.classes[0]="mord":b==="mbin"&&gp.has(x)&&(v.classes[0]="mord")},{node:d},f,m),A0(s,(v,g)=>{var x,b,M=R0(g),E=R0(v),C=M&&E?v.hasClass("mtight")?(x=mp[M])==null?void 0:x[E]:(b=pp[M])==null?void 0:b[E]:null;if(C)return Ud(C,h)},{node:d},f,m),s},A0=function(e,t,n,r,s){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],l=Wd(o);if(l){A0(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=V(["leftmost"])),n.insertAfter=(d=>f=>{e.splice(d+1,0,f),a++})(a)}r&&e.pop()},Wd=function(e){return e instanceof jr||e instanceof $a||e instanceof Kr&&e.hasClass("enclosing")?e:null},_0=function(e,t){var n=Wd(e);if(n){var r=n.children;if(r.length){if(t==="right")return _0(r[r.length-1],"right");if(t==="left")return _0(r[0],"left")}}return e},R0=function(e,t){if(!e)return null;t&&(e=_0(e,t));var n=e.classes[0];return yp[n]||null},Ds=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return V(t.concat(n))},Ge=function(e,t,n){if(!e)return V();if(Na[e.type]){var r=Na[e.type](e,t);if(n&&t.size!==n.size){r=V(t.sizingClasses(n),[r],t);var s=t.sizeMultiplier/n.sizeMultiplier;r.height*=s,r.depth*=s}return r}else throw new K("Got group of unknown type: '"+e.type+"'")};function oa(i,e){var t=V(["base"],i,e),n=V(["strut"]);return n.style.height=ee(t.height+t.depth),t.depth&&(n.style.verticalAlign=ee(-t.depth)),t.children.unshift(n),t}function D0(i,e){var t=null;i.length===1&&i[0].type==="tag"&&(t=i[0].tag,i=i[0].body);var n=zt(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(zt(t,e,!0),e),h.classes=["tag"],s.push(h)):r&&s.push(r);var c=V(["katex-html"],s);if(c.setAttribute("aria-hidden","true"),h){var d=h.children[0];d.style.height=ee(c.height+c.depth),c.depth&&(d.style.verticalAlign=ee(-c.depth))}return c}function Yd(i){return new jr(i)}class Z{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=An(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof bt&&this.children[n+1]instanceof bt){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof bt;)r+=this.children[++n].toText();e.appendChild(new bt(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+=$t(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+$t(An(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 bt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $t(this.toText())}toText(){return this.text}}class Xd{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",ee(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ee(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var wp=new Set(["\\imath","\\jmath"]),bp=new Set(["mrow","mtable"]),Ci=function(e,t,n){return it[t][e]&&it[t][e].replace&&e.charCodeAt(0)!==55349&&!(Fd.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 bt(e)},yl=function(e){return e.length===1?e[0]:new Z("mrow",e)},kp={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"},wl=(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=kp[t];if(r)return typeof r=="function"?r(i):r;var s=i.text;if(wp.has(s))return null;if(it[n][s]){var a=it[n][s].replace;a&&(s=a)}var o=L0[t].fontName;return gl(s,o,n)?L0[t].variant:null};function So(i){if(!i)return!1;if(i.type==="mi"&&i.children.length===1){var e=i.children[0];return e instanceof bt&&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 bt&&t.text===","}else return!1}var yi=function(e,t,n){if(e.length===1){var r=Ke(e[0],t);return n&&r instanceof Z&&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 Z&&a instanceof Z){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(So(l)&&a.type==="mn"){a.children.push(...l.children);continue}else if(l.type==="mn"&&So(a))l.children=[...a.children,...l.children],s.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(a.type==="mn"||So(a))){var h=l.children[0];h instanceof Z&&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 bt&&c.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof bt&&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 yl(yi(e,t,n))},Ke=function(e,t){if(!e)return new Z("mrow");if(La[e.type])return La[e.type](e,t);throw new K("Got group of unknown type: '"+e.type+"'")};function Oh(i,e,t,n,r){var s=yi(i,t),a;s.length===1&&s[0]instanceof Z&&bp.has(s[0].type)?a=s[0]:a=new Z("mrow",s);var o=new Z("annotation",[new bt(e)]);o.setAttribute("encoding","application/x-tex");var l=new Z("semantics",[a,o]),h=new Z("math",[l]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var c=r?"katex":"katex-mathml";return V([c],[h])}var Tp=[[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]],Bh=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ph=function(e,t){return t.size<2?e:Tp[e-1][t.size-1]};class ln{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||ln.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=Bh[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 ln(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ph(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:Bh[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ph(ln.BASESIZE,e);return this.size===t&&this.textSize===ln.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!==ln.BASESIZE?["sizing","reset-size"+this.size,"size"+ln.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=ap(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ln.BASESIZE=6;var Vd=function(e){return new ln({style:e.displayMode?we.DISPLAY:we.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},jd=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=V(n,[e])}return e},Ep=function(e,t,n){var r=Vd(n),s;if(n.output==="mathml")return Oh(e,t,r,n.displayMode,!0);if(n.output==="html"){var a=D0(e,r);s=V(["katex"],[a])}else{var o=Oh(e,t,r,n.displayMode,!1),l=D0(e,r);s=V(["katex"],[o,l])}return jd(s,n)},Mp=function(e,t,n){var r=Vd(n),s=D0(e,r),a=V(["katex"],[s]);return jd(a,n)},Sp={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":"="},Wa=function(e){var t=new Z("mo",[new bt(Sp[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},zp={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]},Cp=new Set(["widehat","widecheck","widetilde","utilde"]),Ya=function(e,t){function n(){var o=4e5,l=e.label.slice(1);if(Cp.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 _n(d),g=new un([v],{width:"100%",height:ee(f),viewBox:"0 0 "+o+" "+c,preserveAspectRatio:"none"});return{span:Rn([],[g],t),minWidth:0,height:f}}else{var x=[],b=zp[l];if(!b)throw new Error('No SVG data for "'+l+'".');var[M,E,C]=b,N=C/1e3,O=M.length,B,$;if(O===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');B=["hide-tail"],$=[b[3]]}else if(O===2)B=["halfarrow-left","halfarrow-right"],$=["xMinYMin","xMaxYMin"];else if(O===3)B=["brace-left","brace-center","brace-right"],$=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
562
|
+
`+O+" children.");for(var Y=0;Y<O;Y++){var ne=new _n(M[Y]),G=new un([ne],{width:"400em",height:ee(N),viewBox:"0 0 "+o+" "+C,preserveAspectRatio:$[Y]+" slice"}),ie=Rn([B[Y]],[G],t);if(O===1)return{span:ie,minWidth:E,height:N};ie.style.height=ee(N),x.push(ie)}return{span:V(["stretchy"],x,t),minWidth:E,height:N}}}var{span:r,minWidth:s,height:a}=n();return r.height=a,r.style.height=ee(a),s>0&&(r.style.minWidth=ee(s)),r},Np=function(e,t,n,r,s){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=V(["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 E0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&h.push(new E0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new un(h,{width:"100%",height:ee(o)});a=Rn([],[c],s)}return a.height=o,a.style.height=ee(o),a},Lp={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ap={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function _p(i){return i in Lp}function Ee(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 Xa(i){var e=Va(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 Va(i){return i&&(i.type==="atom"||Ap.hasOwnProperty(i.type))?i:null}var Kd=i=>{if(i instanceof gi)return i;if(rp(i)&&i.children.length===1)return Kd(i.children[0])},bl=(i,e)=>{var t,n,r;i&&i.type==="supsub"?(n=Ee(i.base,"accent"),t=n.base,i.base=t,r=np(Ge(i,e)),i.base=n):(n=Ee(i,"accent"),t=n.base);var s=Ge(t,e.havingCrampedStyle()),a=n.isShifty&&pn(t),o=0;if(a){var l,h;o=(l=(h=Kd(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=Ya(n,e),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+ee(2*o)+")",marginLeft:ee(2*o)}:void 0}]});else{var m,v;n.label==="\\vec"?(m=Gd("vec",e),v=$d.vec[1]):(m=qa({mode:n.mode,text:n.label},e,"textord"),m=ip(m),m.italic=0,v=m.width,c&&(d+=m.depth)),f=V(["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=ee(x),n.label==="\\textcircled"&&(f.style.top=".2em"),f=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-d},{type:"elem",elem:f}]})}var b=V(["mord","accent"],[f],e);return r?(r.children[0]=b,r.height=Math.max(b.height,r.height),r.classes[0]="mord",r):b},Zd=(i,e)=>{var t=i.isStretchy?Wa(i.label):new Z("mo",[Ci(i.label,i.mode)]),n=new Z("mover",[Ke(i.base,e),t]);return n.setAttribute("accent","true"),n},Rp=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(i=>"\\"+i).join("|"));oe({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=Aa(e[0]),n=!Rp.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:bl,mathmlBuilder:Zd});oe({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:bl,mathmlBuilder:Zd});oe({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=Ge(i.base,e),n=Ya(i,e),r=i.label==="\\utilde"?.12:0,s=$e({positionType:"top",positionData:t.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:r},{type:"elem",elem:t}]});return V(["mord","accentunder"],[s],e)},mathmlBuilder:(i,e)=>{var t=Wa(i.label),n=new Z("munder",[Ke(i.base,e),t]);return n.setAttribute("accentunder","true"),n}});var la=i=>{var e=new Z("mpadded",i?[i]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};oe({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=Wr(Ge(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=Wr(Ge(i.below,n,e),e),a.classes.push(s+"-arrow-pad"));var o=Ya(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=$e({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=$e({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return V(["mrel","x-arrow"],[c],e)},mathmlBuilder(i,e){var t=Wa(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 Z("munderover",[t,s,r])}else n=new Z("mover",[t,r])}else if(i.below){var a=la(Ke(i.below,e));n=new Z("munder",[t,a])}else n=la(),n=new Z("mover",[t,n]);return n}});function Qd(i,e){var t=zt(i.body,e,!0);return V([i.mclass],t,e)}function Jd(i,e){var t,n=yi(i.body,e);return i.mclass==="minner"?t=new Z("mpadded",n):i.mclass==="mord"?i.isCharacterBox?(t=n[0],t.type="mi"):t=new Z("mi",n):(i.isCharacterBox?(t=n[0],t.type="mo"):t=new Z("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}oe({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:wt(r),isCharacterBox:pn(r)}},htmlBuilder:Qd,mathmlBuilder:Jd});var ja=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"};oe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(i,e){var{parser:t}=i;return{type:"mclass",mode:t.mode,mclass:ja(e[0]),body:wt(e[1]),isCharacterBox:pn(e[1])}}});oe({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=ja(r):a="mrel";var o={type:"op",mode:r.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:wt(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:pn(l)}},htmlBuilder:Qd,mathmlBuilder:Jd});oe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(i,e){var{parser:t}=i;return{type:"pmb",mode:t.mode,mclass:ja(e[0]),body:wt(e[0])}},htmlBuilder(i,e){var t=zt(i.body,e,!0),n=V([i.mclass],t,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(i,e){var t=yi(i.body,e),n=new Z("mstyle",t);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Dp={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fh=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Hh=i=>i.type==="textord"&&i.text==="@",Ip=(i,e)=>(i.type==="mathord"||i.type==="atom")&&i.text===e;function Op(i,e,t){var n=Dp[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 Bp(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 K("Expected \\\\ or \\cr or \\end",i.nextToken)}for(var n=[],r=[n],s=0;s<e.length;s++){for(var a=e[s],o=Fh(),l=0;l<a.length;l++)if(!Hh(a[l]))o.body.push(a[l]);else{n.push(o),l+=1;var h=Xa(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(Ip(a[m],h)){f=!1,l=m;break}if(Hh(a[m]))throw new K("Missing a "+h+" character to complete a CD arrow.",a[m]);c[d].body.push(a[m])}if(f)throw new K("Missing a "+h+" character to complete a CD arrow.",a[l])}else throw new K('Expected one of "<>AV=|." after @',a[l]);var v=Op(h,c,i),g={type:"styling",body:[v],mode:"math",style:"display",resetFont:!0};n.push(g),o=Fh()}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([])}}oe({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=Wr(Ge(i.label,t,e),e);return n.classes.push("cd-label-"+i.side),n.style.bottom=ee(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(i,e){var t=new Z("mrow",[Ke(i.label,e)]);return t=new Z("mpadded",[t]),t.setAttribute("width","0"),i.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Z("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});oe({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=Wr(Ge(i.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(i,e){return new Z("mrow",[Ke(i.fragment,e)])}});oe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(i,e){for(var{parser:t}=i,n=Ee(e[0],"ordgroup"),r=n.body,s="",a=0;a<r.length;a++){var o=Ee(r[a],"textord");s+=o.text}var l=parseInt(s),h;if(isNaN(l))throw new K("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new K("\\@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 e1=(i,e)=>{var t=zt(i.body,e.withColor(i.color),!1);return gn(t)},t1=(i,e)=>{var t=yi(i.body,e.withColor(i.color)),n=new Z("mstyle",t);return n.setAttribute("mathcolor",i.color),n};oe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(i,e){var{parser:t}=i,n=Ee(e[0],"color-token").color,r=e[1];return{type:"color",mode:t.mode,color:n,body:wt(r)}},htmlBuilder:e1,mathmlBuilder:t1});oe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(i,e){var{parser:t,breakOnTokenText:n}=i,r=Ee(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:e1,mathmlBuilder:t1});oe({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&&Ee(r,"size").value}},htmlBuilder(i,e){var t=V(["mspace"],[],e);return i.newLine&&(t.classes.push("newline"),i.size&&(t.style.marginTop=ee(lt(i.size,e)))),t},mathmlBuilder(i,e){var t=new Z("mspace");return i.newLine&&(t.setAttribute("linebreak","newline"),i.size&&t.setAttribute("height",ee(lt(i.size,e)))),t}});var I0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},i1=i=>{var e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new K("Expected a control sequence",i);return e},Pp=i=>{var e=i.gullet.popToken();return e.text==="="&&(e=i.gullet.popToken(),e.text===" "&&(e=i.gullet.popToken())),e},n1=(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)};oe({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(I0[n.text])return(t==="\\global"||t==="\\\\globallong")&&(n.text=I0[n.text]),Ee(e.parseFunction(),"internal");throw new K("Invalid token after macro prefix",n)}});oe({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 K("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 K('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new K('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if(n.text==="EOF")throw new K("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===I0[t]),{type:"internal",mode:e.mode}}});oe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=i1(e.gullet.popToken());e.gullet.consumeSpaces();var r=Pp(e);return n1(e,n,r,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});oe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(i){var{parser:e,funcName:t}=i,n=i1(e.gullet.popToken()),r=e.gullet.popToken(),s=e.gullet.popToken();return n1(e,n,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(r),{type:"internal",mode:e.mode}}});var ks=function(e,t,n){var r=it.math[e]&&it.math[e].replace,s=gl(r||e,t,n);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kl=function(e,t,n,r){var s=n.havingBaseStyle(t),a=V(r.concat(s.sizingClasses(n)),[e],n),o=s.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=s.sizeMultiplier,a},r1=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=ee(s),e.height-=s,e.depth+=s},Fp=function(e,t,n,r,s,a){var o=Wt(e,"Main-Regular",s,r),l=kl(o,t,r,a);return r1(l,r,t),l},Hp=function(e,t,n,r){return Wt(e,"Size"+t+"-Regular",n,r)},s1=function(e,t,n,r,s,a){var o=Hp(e,t,s,r),l=kl(V(["delimsizing","size"+t],[o],r),we.TEXT,r,a);return n&&r1(l,r,we.TEXT),l},zo=function(e,t,n){var r;t==="Size1-Regular"?r="delim-size1":r="delim-size4";var s=V(["delimsizinginner",r],[V([],[Wt(e,t,n)])]);return{type:"elem",elem:s}},Co=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 _n("inner",j4(e,Math.round(1e3*t))),a=new un([s],{width:ee(r),height:ee(t),style:"width:"+ee(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Rn([],[a],n);return o.height=t,o.style.height=ee(t),o.style.width=ee(r),{type:"elem",elem:o}},O0=.008,ha={type:"kern",size:-1*O0},Up=new Set(["|","\\lvert","\\rvert","\\vert"]),$p=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),a1=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"):Up.has(e)?(h="∣",d="vert",f=333):$p.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=ks(o,m,s),g=v.height+v.depth,x=ks(h,m,s),b=x.height+x.depth,M=ks(c,m,s),E=M.height+M.depth,C=0,N=1;if(l!==null){var O=ks(l,m,s);C=O.height+O.depth,N=2}var B=g+E+C,$=Math.max(0,Math.ceil((t-B)/(N*b))),Y=B+$*N*b,ne=r.fontMetrics().axisHeight;n&&(ne*=r.sizeMultiplier);var G=Y/2-ne,ie=[];if(d.length>0){var Q=Y-g-E,X=Math.round(Y*1e3),j=K4(d,Math.round(Q*1e3)),le=new _n(d,j),fe=ee(f/1e3),Ue=ee(X/1e3),Ze=new un([le],{width:fe,height:Ue,viewBox:"0 0 "+f+" "+X}),_e=Rn([],[Ze],r);_e.height=X/1e3,_e.style.width=fe,_e.style.height=Ue,ie.push({type:"elem",elem:_e})}else{if(ie.push(zo(c,m,s)),ie.push(ha),l===null){var Xe=Y-g-E+2*O0;ie.push(Co(h,Xe,r))}else{var ht=(Y-g-E-C)/2+2*O0;ie.push(Co(h,ht,r)),ie.push(ha),ie.push(zo(l,m,s)),ie.push(ha),ie.push(Co(h,ht,r))}ie.push(ha),ie.push(zo(o,m,s))}var st=r.havingBaseStyle(we.TEXT),Ie=$e({positionType:"bottom",positionData:G,children:ie});return kl(V(["delimsizing","mult"],[Ie],st),we.TEXT,r,a)},No=80,Lo=.08,Ao=function(e,t,n,r,s){var a=V4(e,r,n),o=new _n(e,a),l=new un([o],{width:"400em",height:ee(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Rn(["hide-tail"],[l],s)},Gp=function(e,t){var n=t.havingBaseSizing(),r=d1("\\surd",e*n.sizeMultiplier,c1,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+No,e<1?s=1:e<1.4&&(s=.7),l=(1+a+Lo)/s,h=(1+a)/s,o=Ao("sqrtMain",l,c,a,t),o.style.minWidth="0.853em",d=.833/s):r.type==="large"?(c=(1e3+No)*Ts[r.size],h=(Ts[r.size]+a)/s,l=(Ts[r.size]+a+Lo)/s,o=Ao("sqrtSize"+r.size,l,c,a,t),o.style.minWidth="1.02em",d=1/s):(l=e+a+Lo,h=e+a,c=Math.floor(1e3*e+a)+No,o=Ao("sqrtTall",l,c,a,t),o.style.minWidth="0.742em",d=1.056),o.height=h,o.style.height=ee(l),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*s}},o1=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),qp=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),l1=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Ts=[0,1.2,1.8,2.4,3],h1=function(e,t,n,r,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),o1.has(e)||l1.has(e))return s1(e,t,!1,n,r,s);if(qp.has(e))return a1(e,Ts[t],!1,n,r,s);throw new K("Illegal delimiter: '"+e+"'")},Wp=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Yp=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"stack"}],c1=[{type:"small",style:we.SCRIPTSCRIPT},{type:"small",style:we.SCRIPT},{type:"small",style:we.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Xp=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.")},d1=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=ks(e,Xp(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]},B0=function(e,t,n,r,s,a){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;l1.has(e)?o=Wp:o1.has(e)?o=c1:o=Yp;var l=d1(e,t,o,r);return l.type==="small"?Fp(e,l.style,n,r,s,a):l.type==="large"?s1(e,l.size,n,r,s,a):a1(e,t,n,r,s,a)},_o=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 B0(e,d,!0,r,s,a)},Uh={"\\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}},Vp=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 $h(i){return"isMiddle"in i}function Ka(i,e){var t=Va(i);if(t&&Vp.has(t.text))return t;throw t?new K("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",i):new K("Invalid delimiter type '"+i.type+"'",i)}oe({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=Ka(e[0],i);return{type:"delimsizing",mode:i.parser.mode,size:Uh[i.funcName].size,mclass:Uh[i.funcName].mclass,delim:t.text}},htmlBuilder:(i,e)=>i.delim==="."?V([i.mclass]):h1(i.delim,i.size,e,i.mode,[i.mclass]),mathmlBuilder:i=>{var e=[];i.delim!=="."&&e.push(Ci(i.delim,i.mode));var t=new Z("mo",e);i.mclass==="mopen"||i.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var n=ee(Ts[i.size]);return t.setAttribute("minsize",n),t.setAttribute("maxsize",n),t}});function Gh(i){if(!i.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}oe({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 K("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:i.parser.mode,delim:Ka(e[0],i).text,color:t}}});oe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ka(e[0],i),n=i.parser;++n.leftrightDepth;var r=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var s=Ee(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:r,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(i,e)=>{Gh(i);for(var t=zt(i.body,e,!0,["mopen","mclose"]),n=0,r=0,s=!1,a=0;a<t.length;a++){var o=t[a];$h(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=Ds(e,["mopen"]):l=_o(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($h(c)){var d=c.isMiddle;t[h]=_o(d.delim,n,r,d.options,i.mode,[])}}var f;if(i.right===".")f=Ds(e,["mclose"]);else{var m=i.rightColor?e.withColor(i.rightColor):e;f=_o(i.right,n,r,m,i.mode,["mclose"])}return t.push(f),V(["minner"],t,e)},mathmlBuilder:(i,e)=>{Gh(i);var t=yi(i.body,e);if(i.left!=="."){var n=new Z("mo",[Ci(i.left,i.mode)]);n.setAttribute("fence","true"),t.unshift(n)}if(i.right!=="."){var r=new Z("mo",[Ci(i.right,i.mode)]);r.setAttribute("fence","true"),i.rightColor&&r.setAttribute("mathcolor",i.rightColor),t.push(r)}return yl(t)}});oe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(i,e)=>{var t=Ka(e[0],i);if(!i.parser.leftrightDepth)throw new K("\\middle without preceding \\left",t);return{type:"middle",mode:i.parser.mode,delim:t.text}},htmlBuilder:(i,e)=>{var t;return i.delim==="."?t=Ds(e,[]):(t=h1(i.delim,1,e,i.mode,[]),t.isMiddle={delim:i.delim,options:e}),t},mathmlBuilder:(i,e)=>{var t=i.delim==="\\vert"||i.delim==="|"?Ci("|","text"):Ci(i.delim,i.mode),n=new Z("mo",[t]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Za=(i,e)=>{var t=Wr(Ge(i.body,e),e),n=i.label.slice(1),r=e.sizeMultiplier,s,a,o=pn(i.body);if(n==="sout")s=V(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/r,a=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=lt({number:.6,unit:"pt"},e),h=lt({number:.35,unit:"ex"},e),c=e.havingBaseSizing();r=r/c.sizeMultiplier;var d=t.height+t.depth+l+h;t.style.paddingLeft=ee(d/2+l);var f=Math.floor(1e3*d*r),m=Y4(f),v=new un([new _n("phase",m)],{width:"400em",height:ee(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});s=Rn(["hide-tail"],[v],e),s.style.height=ee(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,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),g=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),x=g):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),g=4*b,x=Math.max(0,.25-t.depth)):(g=o?.2:0,x=g),s=Np(t,n,g,x,e),/fbox|boxed|fcolorbox/.test(n)?(s.style.borderStyle="solid",s.style.borderWidth=ee(b)):n==="angl"&&b!==.049&&(s.style.borderTopWidth=ee(b),s.style.borderRightWidth=ee(b)),a=t.depth+x,i.backgroundColor&&(s.style.backgroundColor=i.backgroundColor,i.borderColor&&(s.style.borderColor=i.borderColor))}var M;if(i.backgroundColor)M=$e({positionType:"individualShift",children:[{type:"elem",elem:s,shift:a},{type:"elem",elem:t,shift:0}]});else{var E=/cancel|phase/.test(n)?["svg-align"]:[];M=$e({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:a,wrapperClasses:E}]})}return/cancel/.test(n)&&(M.height=t.height,M.depth=t.depth),/cancel/.test(n)&&!o?V(["mord","cancel-lap"],[M],e):V(["mord"],[M],e)},Qa=(i,e)=>{var t,n=new Z(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: "+ee(r)+" solid "+i.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return i.backgroundColor&&n.setAttribute("mathbackground",i.backgroundColor),n};oe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Ee(e[0],"color-token").color,a=e[1];return{type:"enclose",mode:n.mode,label:r,backgroundColor:s,body:a}},htmlBuilder:Za,mathmlBuilder:Qa});oe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(i,e,t){var{parser:n,funcName:r}=i,s=Ee(e[0],"color-token").color,a=Ee(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:r,backgroundColor:a,borderColor:s,body:o}},htmlBuilder:Za,mathmlBuilder:Qa});oe({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]}}});oe({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:Za,mathmlBuilder:Qa});oe({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:Za,mathmlBuilder:Qa});oe({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 u1={};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)u1[t[l]]=o;s&&(Na[e]=s),a&&(La[e]=a)}var f1={};function k(i,e){f1[i]=e}class ii{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 ii(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class pi{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 pi(t,ii.range(this,e))}}function qh(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 Ja=i=>{var e=i.parser.settings;if(!e.displayMode)throw new K("{"+i.envName+"} can be used only in display mode.")},jp=new Set(["gather","gather*"]);function Tl(i){if(!i.includes("ed"))return!i.includes("*")}function On(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 K("Invalid \\arraystretch: "+m)}i.gullet.beginGroup();var v=[],g=[v],x=[],b=[],M=l!=null?[]:void 0;function E(){l&&i.gullet.macros.set("\\@eqnsw","1",!0)}function C(){M&&(i.gullet.macros.get("\\df@tag")?(M.push(i.subparse([new pi("\\df@tag")])),i.gullet.macros.set("\\df@tag",void 0,!0)):M.push(!!l&&i.gullet.macros.get("\\@eqnsw")==="1"))}for(E(),b.push(qh(i));;){var N=i.parseExpression(!1,h?"\\end":"\\\\");i.gullet.endGroup(),i.gullet.beginGroup();var O={type:"ordgroup",mode:i.mode,body:N};t&&(O={type:"styling",mode:i.mode,style:t,resetFont:!0,body:[O]}),v.push(O);var B=i.fetch().text;if(B==="&"){if(d&&v.length===d){if(h||o)throw new K("Too many tab characters: &",i.nextToken);i.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}i.consume()}else if(B==="\\end"){C(),v.length===1&&O.type==="styling"&&O.body.length===1&&O.body[0].type==="ordgroup"&&O.body[0].body.length===0&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}else if(B==="\\\\"){i.consume();var $=void 0;i.gullet.future().text!==" "&&($=i.parseSizeGroup(!0)),x.push($?$.value:null),C(),b.push(qh(i)),v=[],g.push(v),E()}else throw new K("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:b,colSeparationType:o,tags:M,leqno:f}}function El(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(we.SCRIPT).sizeMultiplier;f=.2778*(m/t.sizeMultiplier)}var v=e.colSeparationType==="CD"?lt({number:3,unit:"ex"},t):12*d,g=3*d,x=e.arraystretch*v,b=.7*x,M=.3*x,E=0;function C(D){for(var de=0;de<D.length;++de)de>0&&(E+=.25),h.push({pos:E,isDashed:D[de]})}for(C(a[0]),n=0;n<e.body.length;++n){var N=e.body[n],O=b,B=M;o<N.length&&(o=N.length);var $={cells:new Array(N.length),height:0,depth:0,pos:0};for(r=0;r<N.length;++r){var Y=Ge(N[r],t);B<Y.depth&&(B=Y.depth),O<Y.height&&(O=Y.height),$.cells[r]=Y}var ne=e.rowGaps[n],G=0;ne&&(G=lt(ne,t),G>0&&(G+=M,B<G&&(B=G),G=0)),e.addJot&&n<e.body.length-1&&(B+=g),$.height=O,$.depth=B,E+=O,$.pos=E,E+=B+G,l[n]=$,C(a[n+1])}var ie=E/2+t.fontMetrics().axisHeight,Q=e.cols||[],X=[],j,le,fe=[];if(e.tags&&e.tags.some(D=>D))for(n=0;n<s;++n){var Ue=l[n],Ze=Ue.pos-ie,_e=e.tags[n],Xe=void 0;_e===!0?Xe=V(["eqn-num"],[],t):_e===!1?Xe=V([],[],t):Xe=V([],zt(_e,t,!0),t),Xe.depth=Ue.depth,Xe.height=Ue.height,fe.push({type:"elem",elem:Xe,shift:Ze})}for(r=0,le=0;r<o||le<Q.length;++r,++le){for(var ht,st=Q[le],Ie=!0;((xt=st)==null?void 0:xt.type)==="separator";){var xt;if(Ie||(j=V(["arraycolsep"],[]),j.style.width=ee(t.fontMetrics().doubleRuleSep),X.push(j)),st.separator==="|"||st.separator===":"){var J=st.separator==="|"?"solid":"dashed",ke=V(["vertical-separator"],[],t);ke.style.height=ee(E),ke.style.borderRightWidth=ee(c),ke.style.borderRightStyle=J,ke.style.margin="0 "+ee(-c/2);var Di=E-ie;Di&&(ke.style.verticalAlign=ee(-Di)),X.push(ke)}else throw new K("Invalid separator type: "+st.separator);le++,st=Q[le],Ie=!1}if(!(r>=o)){var Kt=void 0;if(r>0||e.hskipBeforeAndAfter){var Zt,Tt;Kt=(Zt=(Tt=st)==null?void 0:Tt.pregap)!=null?Zt:f,Kt!==0&&(j=V(["arraycolsep"],[]),j.style.width=ee(Kt),X.push(j))}var ct=[];for(n=0;n<s;++n){var Qt=l[n],Pt=Qt.cells[r];if(Pt){var Jt=Qt.pos-ie;Pt.depth=Qt.depth,Pt.height=Qt.height,ct.push({type:"elem",elem:Pt,shift:Jt})}}var ze=$e({positionType:"individualShift",children:ct}),ai=V(["col-align-"+(((ht=st)==null?void 0:ht.align)||"c")],[ze]);if(X.push(ai),r<o-1||e.hskipBeforeAndAfter){var Re,Gt;Kt=(Re=(Gt=st)==null?void 0:Gt.postgap)!=null?Re:f,Kt!==0&&(j=V(["arraycolsep"],[]),j.style.width=ee(Kt),X.push(j))}}}var Qe=V(["mtable"],X);if(h.length>0){for(var Et=qr("hline",t,c),Vi=qr("hdashline",t,c),dt=[{type:"elem",elem:Qe,shift:0}];h.length>0;){var oi=h.pop(),U=oi.pos-ie;oi.isDashed?dt.push({type:"elem",elem:Vi,shift:U}):dt.push({type:"elem",elem:Et,shift:U})}Qe=$e({positionType:"individualShift",children:dt})}if(fe.length===0)return V(["mord"],[Qe],t);var re=$e({positionType:"individualShift",children:fe}),Ne=V(["tag"],[re],t);return gn([Qe,Ne])},Kp={c:"center ",l:"left ",r:"right "},Xi=function(e,t){for(var n=[],r=new Z("mtd",[],["mtr-glue"]),s=new Z("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 Z("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 Z("mtr",l))}var c=new Z("mtable",n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",ee(d));var f="",m="";if(e.cols&&e.cols.length>0){var v=e.cols,g="",x=!1,b=0,M=v.length;v[0].type==="separator"&&(f+="top ",b=1),v[v.length-1].type==="separator"&&(f+="bottom ",M-=1);for(var E=b;E<M;E++){var C=v[E];C.type==="align"?(m+=Kp[C.align],x&&(g+="none "),x=!0):C.type==="separator"&&x&&(g+=C.separator==="|"?"solid ":"dashed ",x=!1)}c.setAttribute("columnalign",m.trim()),/[sd]/.test(g)&&c.setAttribute("columnlines",g.trim())}if(e.colSeparationType==="align"){for(var N=e.cols||[],O="",B=1;B<N.length;B++)O+=B%2?"0em ":"1em ";c.setAttribute("columnspacing",O.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 $="",Y=e.hLinesBeforeRow;f+=Y[0].length>0?"left ":"",f+=Y[Y.length-1].length>0?"right ":"";for(var ne=1;ne<Y.length-1;ne++)$+=Y[ne].length===0?"none ":Y[ne][0]?"dashed ":"solid ";return/[sd]/.test($)&&c.setAttribute("rowlines",$.trim()),f!==""&&(c=new Z("menclose",[c]),c.setAttribute("notation",f.trim())),e.arraystretch&&e.arraystretch<1&&(c=new Z("mstyle",[c]),c.setAttribute("scriptlevel","1")),c},p1=function(e,t){e.envName.includes("ed")||Ja(e);var n=[],r=e.envName.includes("at")?"alignat":"align",s=e.envName==="split",a=On(e.parser,{cols:n,addJot:!0,autoTag:s?void 0:Tl(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=Ee(t[0].body[d],"textord");c+=f.text}o=Number(c),l=o*2}var m=!l;a.body.forEach(function(b){for(var M=1;M<b.length;M+=2){var E=Ee(b[M],"styling"),C=Ee(E.body[0],"ordgroup");C.body.unshift(h)}if(m)l<b.length&&(l=b.length);else{var N=b.length/2;if(o<N)throw new K("Too many math in a row: "+("expected "+o+", but got "+N),b[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=Va(e[0]),n=t?[e[0]]:Ee(e[0],"ordgroup").body,r=n.map(function(a){var o=Xa(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 K("Unknown column alignment: "+l,a)}),s={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return On(i.parser,s,El(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 K("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),n.cols=[{type:"align",align:t}]}}var s=On(i.parser,n,El(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=On(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=Va(e[0]),n=t?[e[0]]:Ee(e[0],"ordgroup").body,r=n.map(function(o){var l=Xa(o),h=l.text;if("lc".includes(h))return{type:"align",align:h};throw new K("Unknown column alignment: "+h,o)});if(r.length>1)throw new K("{subarray} can contain only one column");var s={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=On(i.parser,s,"script");if(a.body.length>0&&a.body[0].length>1)throw new K("{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=On(i.parser,e,El(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:p1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(i){jp.has(i.envName)&&Ja(i);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tl(i.envName),emptySingleRow:!0,leqno:i.parser.settings.leqno};return On(i.parser,e,"display")},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:p1,htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(i){Ja(i);var e={autoTag:Tl(i.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:i.parser.settings.leqno};return On(i.parser,e,"display")},htmlBuilder:Yi,mathmlBuilder:Xi});Wi({type:"array",names:["CD"],props:{numArgs:0},handler(i){return Ja(i),Bp(i.parser)},htmlBuilder:Yi,mathmlBuilder:Xi});k("\\nonumber","\\gdef\\@eqnsw{0}");k("\\notag","\\nonumber");oe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(i,e){throw new K(i.funcName+" valid only within array environment")}});var Wh=u1;oe({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 K("Invalid environment name",r);for(var s="",a=0;a<r.body.length;++a)s+=Ee(r.body[a],"textord").text;if(n==="\\begin"){if(!Wh.hasOwnProperty(s))throw new K("No such environment: "+s,r);var o=Wh[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=Ee(t.parseFunction(),"environment");if(m.name!==s)throw new K("Mismatch: \\begin{"+s+"} matched by \\end{"+m.name+"}",f);return d}return{type:"environment",mode:t.mode,name:s,nameGroup:r}}});var m1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ge(i.body,n)},g1=(i,e)=>{var t=i.font,n=e.withFont(t);return Ke(i.body,n)},Yh={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};oe({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=Aa(e[0]),s=n;return s in Yh&&(s=Yh[s]),{type:"font",mode:t.mode,font:s.slice(1),body:r}},htmlBuilder:m1,mathmlBuilder:g1});oe({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:ja(n),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:n}],isCharacterBox:pn(n)}}});oe({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:m1,mathmlBuilder:g1});var Zp=(i,e)=>{var t=e.style,n=t.fracNum(),r=t.fracDen(),s;s=e.havingStyle(n);var a=Ge(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=Ge(i.denom,s,e),c,d,f;i.hasBarLine?(i.barSize?(d=lt(i.barSize,e),c=qr("frac-line",e,d)):c=qr("frac-line",e),d=c.height,f=c.height):(c=null,d=0,f=e.fontMetrics().defaultRuleThickness);var m,v,g;t.size===we.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 M=e.fontMetrics().axisHeight;m-a.depth-(M+.5*d)<v&&(m+=v-(m-a.depth-(M+.5*d))),M-.5*d-(h.height-g)<v&&(g+=v-(M-.5*d-(h.height-g)));var E=-(M-.5*d);x=$e({positionType:"individualShift",children:[{type:"elem",elem:h,shift:g},{type:"elem",elem:c,shift:E},{type:"elem",elem:a,shift:-m}]})}else{var b=m-a.depth-(h.height-g);b<v&&(m+=.5*(v-b),g+=.5*(v-b)),x=$e({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 C;t.size===we.DISPLAY.size?C=e.fontMetrics().delim1:t.size===we.SCRIPTSCRIPT.size?C=e.havingStyle(we.SCRIPT).fontMetrics().delim2:C=e.fontMetrics().delim2;var N,O;return i.leftDelim==null?N=Ds(e,["mopen"]):N=B0(i.leftDelim,C,!0,e.havingStyle(t),i.mode,["mopen"]),i.continued?O=V([]):i.rightDelim==null?O=Ds(e,["mclose"]):O=B0(i.rightDelim,C,!0,e.havingStyle(t),i.mode,["mclose"]),V(["mord"].concat(s.sizingClasses(e)),[N,V(["mfrac"],[x]),O],e)},Qp=(i,e)=>{var t=new Z("mfrac",[Ke(i.numer,e),Ke(i.denom,e)]);if(!i.hasBarLine)t.setAttribute("linethickness","0px");else if(i.barSize){var n=lt(i.barSize,e);t.setAttribute("linethickness",ee(n))}if(i.leftDelim!=null||i.rightDelim!=null){var r=[];if(i.leftDelim!=null){var s=new Z("mo",[new bt(i.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),r.push(s)}if(r.push(t),i.rightDelim!=null){var a=new Z("mo",[new bt(i.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),r.push(a)}return yl(r)}return t},v1=(i,e)=>{if(!e)return i;var t={type:"styling",mode:i.mode,style:e,body:[i]};return t};oe({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"),v1({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:h,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},c)},htmlBuilder:Zp,mathmlBuilder:Qp});oe({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 Xh=["display","text","script","scriptscript"],Vh=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};oe({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=Aa(e[0]),a=s.type==="atom"&&s.family==="open"?Vh(s.text):null,o=Aa(e[1]),l=o.type==="atom"&&o.family==="close"?Vh(o.text):null,h=Ee(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=Ee(m.body[0],"textord");f=Xh[Number(v.text)]}}else m=Ee(m,"textord"),f=Xh[Number(m.text)];return v1({type:"genfrac",mode:t.mode,numer:n,denom:r,continued:!1,hasBarLine:c,barSize:d,leftDelim:a,rightDelim:l},f)}});oe({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:Ee(e[0],"size").value,token:r}}});oe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(i,e)=>{var{parser:t,funcName:n}=i,r=e[0],s=Ee(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 x1=(i,e)=>{var t=e.style,n,r;i.type==="supsub"?(n=i.sup?Ge(i.sup,e.havingStyle(t.sup()),e):Ge(i.sub,e.havingStyle(t.sub()),e),r=Ee(i.base,"horizBrace")):r=Ee(i,"horizBrace");var s=Ge(r.base,e.havingBaseStyle(we.DISPLAY)),a=Ya(r,e),o;if(r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=$e({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=V(["minner",r.isOver?"mover":"munder"],[o],e);r.isOver?o=$e({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=$e({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]})}return V(["minner",r.isOver?"mover":"munder"],[o],e)},Jp=(i,e)=>{var t=Wa(i.label);return new Z(i.isOver?"mover":"munder",[Ke(i.base,e),t])};oe({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:x1,mathmlBuilder:Jp});oe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=e[1],r=Ee(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:r})?{type:"href",mode:t.mode,href:r,body:wt(n)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(i,e)=>{var t=zt(i.body,e,!1);return up(i.href,[],t,e)},mathmlBuilder:(i,e)=>{var t=Dn(i.body,e);return t instanceof Z||(t=new Z("mrow",[t])),t.setAttribute("href",i.href),t}});oe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(i,e)=>{var{parser:t}=i,n=Ee(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:wt(o)}}});oe({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:wt(e[0])}},htmlBuilder(i,e){var t=zt(i.body,e.withFont(""),!1);return gn(t)},mathmlBuilder(i,e){return new Z("mrow",yi(i.body,e.withFont("")))}});oe({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=Ee(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 K("\\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:wt(a)}:t.formatUnsupportedCmd(n)},htmlBuilder:(i,e)=>{var t=zt(i.body,e,!1),n=["enclosing"];i.attributes.class&&n.push(...i.attributes.class.trim().split(/\s+/));var r=V(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)});oe({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:wt(e[0]),mathml:wt(e[1])}},htmlBuilder:(i,e)=>{var t=zt(i.html,e,!1);return gn(t)},mathmlBuilder:(i,e)=>Dn(i.mathml,e)});var Ro=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 K("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Id(n))throw new K("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};oe({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=Ee(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=Ro(f);break;case"height":s=Ro(f);break;case"totalheight":a=Ro(f);break;default:throw new K("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Ee(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=lt(i.height,e),n=0;i.totalheight.number>0&&(n=lt(i.totalheight,e)-t);var r=0;i.width.number>0&&(r=lt(i.width,e));var s={height:ee(t+n)};r>0&&(s.width=ee(r)),n>0&&(s.verticalAlign=ee(-n));var a=new ep(i.src,i.alt,s);return a.height=t,a.depth=n,a},mathmlBuilder:(i,e)=>{var t=new Z("mglyph",[]);t.setAttribute("alt",i.alt);var n=lt(i.height,e),r=0;if(i.totalheight.number>0&&(r=lt(i.totalheight,e)-n,t.setAttribute("valign",ee(-r))),t.setAttribute("height",ee(n+r)),i.width.number>0){var s=lt(i.width,e);t.setAttribute("width",ee(s))}return t.setAttribute("src",i.src),t}});oe({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=Ee(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 Ud(i.dimension,e)},mathmlBuilder(i,e){var t=lt(i.dimension,e);return new Xd(t)}});oe({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=V([],[Ge(i.body,e)]),t=V(["inner"],[t],e)):t=V(["inner"],[Ge(i.body,e)]);var n=V(["fix"],[]),r=V([i.alignment],[t,n],e),s=V(["strut"]);return s.style.height=ee(r.height+r.depth),r.depth&&(s.style.verticalAlign=ee(-r.depth)),r.children.unshift(s),r=V(["thinbox"],[r],e),V(["mord","vbox"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Z("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}});oe({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}}});oe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(i,e){throw new K("Mismatched "+i.funcName)}});var jh=(i,e)=>{switch(e.style.size){case we.DISPLAY.size:return i.display;case we.TEXT.size:return i.text;case we.SCRIPT.size:return i.script;case we.SCRIPTSCRIPT.size:return i.scriptscript;default:return i.text}};oe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(i,e)=>{var{parser:t}=i;return{type:"mathchoice",mode:t.mode,display:wt(e[0]),text:wt(e[1]),script:wt(e[2]),scriptscript:wt(e[3])}},htmlBuilder:(i,e)=>{var t=jh(i,e),n=zt(t,e,!1);return gn(n)},mathmlBuilder:(i,e)=>{var t=jh(i,e);return Dn(t,e)}});var y1=(i,e,t,n,r,s,a)=>{i=V([],[i]);var o=t&&pn(t),l,h;if(e){var c=Ge(e,n.havingStyle(r.sup()),n);h={elem:c,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-c.depth)}}if(t){var d=Ge(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=$e({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ee(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(l){var v=i.height-a;f=$e({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ee(-s)},{type:"kern",size:l.kern},{type:"elem",elem:i}]})}else if(h){var g=i.depth+a;f=$e({positionType:"bottom",positionData:g,children:[{type:"elem",elem:i},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:ee(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return i;var x=[f];if(l&&s!==0&&!o){var b=V(["mspace"],[],n);b.style.marginRight=ee(s),x.unshift(b)}return V(["mop","op-limits"],x,n)},w1=new Set(["\\smallint"]),Qr=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Ee(i.base,"op"),r=!0):s=Ee(i,"op");var a=e.style,o=!1;a.size===we.DISPLAY.size&&s.symbol&&!w1.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=Gd(d+"Size"+(o?"2":"1"),e);l=$e({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=zt(s.body,e,!0);m.length===1&&m[0]instanceof gi?(l=m[0],l.classes[0]="mop"):l=V(["mop"],m,e)}else{for(var v=[],g=1;g<s.name.length;g++)v.push(vl(s.name[g],s.mode,e));l=V(["mop"],v,e)}var x=0,b=0;if((l instanceof gi||s.name==="\\oiint"||s.name==="\\oiiint")&&!s.suppressBaseShift){var M;x=(l.height-l.depth)/2-e.fontMetrics().axisHeight,b=(M=l.italic)!=null?M:0}return r?y1(l,t,n,e,a,b,x):(x&&(l.style.position="relative",l.style.top=ee(x)),l)},Us=(i,e)=>{var t;if(i.symbol)t=new Z("mo",[Ci(i.name,i.mode)]),w1.has(i.name)&&t.setAttribute("largeop","false");else if(i.body)t=new Z("mo",yi(i.body,e));else{t=new Z("mi",[new bt(i.name.slice(1))]);var n=new Z("mo",[Ci("","text")]);i.parentIsSupSub?t=new Z("mrow",[t,n]):t=Yd([t,n])}return t},em={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};oe({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=em[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Qr,mathmlBuilder:Us});oe({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:wt(n)}},htmlBuilder:Qr,mathmlBuilder:Us});var tm={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};oe({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:Us});oe({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:Us});oe({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=tm[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Qr,mathmlBuilder:Us});var b1=(i,e)=>{var t,n,r=!1,s;i.type==="supsub"?(t=i.sup,n=i.sub,s=Ee(i.base,"operatorname"),r=!0):s=Ee(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=zt(o,e.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof gi&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}a=V(["mop"],l,e)}else a=V(["mop"],[],e);return r?y1(a,t,n,e,e.style,0,0):a},im=(i,e)=>{for(var t=yi(i.body,e.withFont("mathrm")),n=!0,r=0;r<t.length;r++){var s=t[r];if(!(s instanceof Xd))if(s instanceof Z)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 bt?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 bt(o)]}var l=new Z("mi",t);l.setAttribute("mathvariant","normal");var h=new Z("mo",[Ci("","text")]);return i.parentIsSupSub?new Z("mrow",[l,h]):Yd([l,h])};oe({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:wt(r),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:b1,mathmlBuilder:im});k("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");dr({type:"ordgroup",htmlBuilder(i,e){return i.semisimple?gn(zt(i.body,e,!1)):V(["mord"],zt(i.body,e,!0),e)},mathmlBuilder(i,e){return Dn(i.body,e,!0)}});oe({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=Ge(i.body,e.havingCrampedStyle()),n=qr("overline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*r},{type:"elem",elem:n},{type:"kern",size:r}]});return V(["mord","overline"],[s],e)},mathmlBuilder(i,e){var t=new Z("mo",[new bt("‾")]);t.setAttribute("stretchy","true");var n=new Z("mover",[Ke(i.body,e),t]);return n.setAttribute("accent","true"),n}});oe({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:wt(n)}},htmlBuilder:(i,e)=>{var t=zt(i.body,e.withPhantom(),!1);return gn(t)},mathmlBuilder:(i,e)=>{var t=yi(i.body,e);return new Z("mphantom",t)}});k("\\hphantom","\\smash{\\phantom{#1}}");oe({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=V(["inner"],[Ge(i.body,e.withPhantom())]),n=V(["fix"],[]);return V(["mord","rlap"],[t,n],e)},mathmlBuilder:(i,e)=>{var t=yi(wt(i.body),e),n=new Z("mphantom",t),r=new Z("mpadded",[n]);return r.setAttribute("width","0px"),r}});oe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(i,e){var{parser:t}=i,n=Ee(e[0],"size").value,r=e[1];return{type:"raisebox",mode:t.mode,dy:n,body:r}},htmlBuilder(i,e){var t=Ge(i.body,e),n=lt(i.dy,e);return $e({positionType:"shift",positionData:-n,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new Z("mpadded",[Ke(i.body,e)]),n=i.dy.number+i.dy.unit;return t.setAttribute("voffset",n),t}});oe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(i){var{parser:e}=i;return{type:"internal",mode:e.mode}}});oe({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=Ee(e[0],"size"),a=Ee(e[1],"size");return{type:"rule",mode:n.mode,shift:r&&Ee(r,"size").value,width:s.value,height:a.value}},htmlBuilder(i,e){var t=V(["mord","rule"],[],e),n=lt(i.width,e),r=lt(i.height,e),s=i.shift?lt(i.shift,e):0;return t.style.borderRightWidth=ee(n),t.style.borderTopWidth=ee(r),t.style.bottom=ee(s),t.width=n,t.height=r+s,t.depth=-s,t.maxFontSize=r*1.125*e.sizeMultiplier,t},mathmlBuilder(i,e){var t=lt(i.width,e),n=lt(i.height,e),r=i.shift?lt(i.shift,e):0,s=e.color&&e.getColor()||"black",a=new Z("mspace");a.setAttribute("mathbackground",s),a.setAttribute("width",ee(t)),a.setAttribute("height",ee(n));var o=new Z("mpadded",[a]);return r>=0?o.setAttribute("height",ee(r)):(o.setAttribute("height",ee(r)),o.setAttribute("depth",ee(-r))),o.setAttribute("voffset",ee(r)),o}});function k1(i,e,t){for(var n=zt(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 gn(n)}var Kh=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],nm=(i,e)=>{var t=e.havingSize(i.size);return k1(i.body,t,e)};oe({type:"sizing",names:Kh,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:Kh.indexOf(n)+1,body:s}},htmlBuilder:nm,mathmlBuilder:(i,e)=>{var t=e.havingSize(i.size),n=yi(i.body,t),r=new Z("mstyle",n);return r.setAttribute("mathsize",ee(t.sizeMultiplier)),r}});oe({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]&&Ee(t[0],"ordgroup");if(a)for(var o,l=0;l<a.body.length;++l){var h=a.body[l];if(o=Xa(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=V([],[Ge(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 V(["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=$e({positionType:"firstBaseline",children:[{type:"elem",elem:t}]});return V(["mord"],[r],e)},mathmlBuilder:(i,e)=>{var t=new Z("mpadded",[Ke(i.body,e)]);return i.smashHeight&&t.setAttribute("height","0px"),i.smashDepth&&t.setAttribute("depth","0px"),t}});oe({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=Ge(i.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=Wr(t,e);var n=e.fontMetrics(),r=n.defaultRuleThickness,s=r;e.style.id<we.TEXT.id&&(s=e.fontMetrics().xHeight);var a=r+s/4,o=t.height+t.depth+a+r,{span:l,ruleWidth:h,advanceWidth:c}=Gp(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=ee(c);var m=$e({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(we.SCRIPTSCRIPT),g=Ge(i.index,v,e),x=.6*(m.height-m.depth),b=$e({positionType:"shift",positionData:-x,children:[{type:"elem",elem:g}]}),M=V(["root"],[b]);return V(["mord","sqrt"],[M,m],e)}else return V(["mord","sqrt"],[m],e)},mathmlBuilder(i,e){var{body:t,index:n}=i;return n?new Z("mroot",[Ke(t,e),Ke(n,e)]):new Z("msqrt",[Ke(t,e)])}});var P0={display:we.DISPLAY,text:we.TEXT,script:we.SCRIPT,scriptscript:we.SCRIPTSCRIPT};function rm(i){return i in P0}oe({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(!rm(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:r.mode,style:a,body:s}},htmlBuilder(i,e){var t=P0[i.style],n=e.havingStyle(t);return i.resetFont&&(n=n.withFont("")),k1(i.body,n,e)},mathmlBuilder(i,e){var t=P0[i.style],n=e.havingStyle(t);i.resetFont&&(n=n.withFont(""));var r=yi(i.body,n),s=new Z("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 sm=function(e,t){var n=e.base;if(n)if(n.type==="op"){var r=n.limits&&(t.style.size===we.DISPLAY.size||n.alwaysHandleSupSub);return r?Qr:null}else if(n.type==="operatorname"){var s=n.alwaysHandleSupSub&&(t.style.size===we.DISPLAY.size||n.limits);return s?b1:null}else{if(n.type==="accent")return pn(n.base)?bl:null;if(n.type==="horizBrace"){var a=!e.sub;return a===n.isOver?x1:null}else return null}else return null};dr({type:"supsub",htmlBuilder(i,e){var t=sm(i,e);if(t)return t(i,e);var{base:n,sup:r,sub:s}=i,a=Ge(n,e),o,l,h=e.fontMetrics(),c=0,d=0,f=n&&pn(n);if(r){var m=e.havingStyle(e.style.sup());o=Ge(r,m,e),f||(c=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/e.sizeMultiplier)}if(s){var v=e.havingStyle(e.style.sub());l=Ge(s,v,e),f||(d=a.depth+v.fontMetrics().subDrop*v.sizeMultiplier/e.sizeMultiplier)}var g;e.style===we.DISPLAY?g=h.sup1:e.style.cramped?g=h.sup3:g=h.sup2;var x=e.sizeMultiplier,b=ee(.5/h.ptPerEm/x),M=null;if(l){var E=i.base&&i.base.type==="op"&&i.base.name&&(i.base.name==="\\oiint"||i.base.name==="\\oiiint");if(a instanceof gi||E){var C;M=ee(-((C=a.italic)!=null?C:0))}}var N;if(o&&l){c=Math.max(c,g,o.depth+.25*h.xHeight),d=Math.max(d,h.sub2);var O=h.defaultRuleThickness,B=4*O;if(c-o.depth-(l.height-d)<B){d=B-(c-o.depth)+l.height;var $=.8*h.xHeight-(c-o.depth);$>0&&(c+=$,d-=$)}var Y=[{type:"elem",elem:l,shift:d,marginRight:b,marginLeft:M},{type:"elem",elem:o,shift:-c,marginRight:b}];N=$e({positionType:"individualShift",children:Y})}else if(l){d=Math.max(d,h.sub1,l.height-.8*h.xHeight);var ne=[{type:"elem",elem:l,marginLeft:M,marginRight:b}];N=$e({positionType:"shift",positionData:d,children:ne})}else if(o)c=Math.max(c,g,o.depth+.25*h.xHeight),N=$e({positionType:"shift",positionData:-c,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var G=R0(a,"right")||"mord";return V([G],[a,V(["msupsub"],[N])],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===we.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===we.DISPLAY||h.limits)?a="munderover":a="msubsup"}else{var l=i.base;l&&l.type==="op"&&l.limits&&(e.style===we.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===we.DISPLAY)?a="munder":a="msub"}else{var o=i.base;o&&o.type==="op"&&o.limits&&(e.style===we.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===we.DISPLAY)?a="mover":a="msup"}return new Z(a,s)}});dr({type:"atom",htmlBuilder(i,e){return vl(i.text,i.mode,e,["m"+i.family])},mathmlBuilder(i,e){var t=new Z("mo",[Ci(i.text,i.mode)]);if(i.family==="bin"){var n=wl(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 T1={mi:"italic",mn:"normal",mtext:"normal"};dr({type:"mathord",htmlBuilder(i,e){return qa(i,e,"mathord")},mathmlBuilder(i,e){var t=new Z("mi",[Ci(i.text,i.mode,e)]),n=wl(i,e)||"italic";return n!==T1[t.type]&&t.setAttribute("mathvariant",n),t}});dr({type:"textord",htmlBuilder(i,e){return qa(i,e,"textord")},mathmlBuilder(i,e){var t=Ci(i.text,i.mode,e),n=wl(i,e)||"normal",r;return i.mode==="text"?r=new Z("mtext",[t]):/[0-9]/.test(i.text)?r=new Z("mn",[t]):i.text==="\\prime"?r=new Z("mo",[t]):r=new Z("mi",[t]),n!==T1[r.type]&&r.setAttribute("mathvariant",n),r}});var Do={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Io={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};dr({type:"spacing",htmlBuilder(i,e){if(Io.hasOwnProperty(i.text)){var t=Io[i.text].className||"";if(i.mode==="text"){var n=qa(i,e,"textord");return n.classes.push(t),n}else return V(["mspace",t],[vl(i.text,i.mode,e)],e)}else{if(Do.hasOwnProperty(i.text))return V(["mspace",Do[i.text]],[],e);throw new K('Unknown type of space "'+i.text+'"')}},mathmlBuilder(i,e){var t;if(Io.hasOwnProperty(i.text))t=new Z("mtext",[new bt(" ")]);else{if(Do.hasOwnProperty(i.text))return new Z("mspace");throw new K('Unknown type of space "'+i.text+'"')}return t}});var Zh=()=>{var i=new Z("mtd",[]);return i.setAttribute("width","50%"),i};dr({type:"tag",mathmlBuilder(i,e){var t=new Z("mtable",[new Z("mtr",[Zh(),new Z("mtd",[Dn(i.body,e)]),Zh(),new Z("mtd",[Dn(i.tag,e)])])]);return t.setAttribute("width","100%"),t}});var Qh={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Jh={"\\textbf":"textbf","\\textmd":"textmd"},am={"\\textit":"textit","\\textup":"textup"},ec=(i,e)=>{var t=i.font;if(t){if(Qh[t])return e.withTextFontFamily(Qh[t]);if(Jh[t])return e.withTextFontWeight(Jh[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(am[t])};oe({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:wt(r),font:n}},htmlBuilder(i,e){var t=ec(i,e),n=zt(i.body,t,!0);return V(["mord","text"],n,t)},mathmlBuilder(i,e){var t=ec(i,e);return Dn(i.body,t)}});oe({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=Ge(i.body,e),n=qr("underline-line",e),r=e.fontMetrics().defaultRuleThickness,s=$e({positionType:"top",positionData:t.height,children:[{type:"kern",size:r},{type:"elem",elem:n},{type:"kern",size:3*r},{type:"elem",elem:t}]});return V(["mord","underline"],[s],e)},mathmlBuilder(i,e){var t=new Z("mo",[new bt("‾")]);t.setAttribute("stretchy","true");var n=new Z("munder",[Ke(i.body,e),t]);return n.setAttribute("accentunder","true"),n}});oe({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=Ge(i.body,e),n=e.fontMetrics().axisHeight,r=.5*(t.height-n-(t.depth+n));return $e({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]})},mathmlBuilder(i,e){var t=new Z("mpadded",[Ke(i.body,e)],["vcenter"]);return new Z("mrow",[t])}});oe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(i,e,t){throw new K("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){for(var t=tc(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 V(["mord","text"].concat(r.sizingClasses(e)),Hd(n),r)},mathmlBuilder(i,e){var t=new bt(tc(i)),n=new Z("mtext",[t]);return n.setAttribute("mathvariant","monospace"),n}});var tc=i=>i.body.replace(/ /g,i.star?"␣":" "),zn=qd,E1=`[ \r
|
|
563
563
|
]`,om="\\\\[a-zA-Z@]+",lm="\\\\[^\uD800-\uDFFF]",hm="("+om+")"+E1+"*",cm=`\\\\(
|
|
564
564
|
|[ \r ]+
|
|
565
565
|
?)[ \r ]*`,F0="[̀-ͯ]",dm=new RegExp(F0+"+$"),um="("+E1+"+)|"+(cm+"|")+"([!-\\[\\]-‧-豈-]"+(F0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(F0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+hm)+("|"+lm+")");class ic{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(um,"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 pi("EOF",new ii(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new K("Unexpected character: '"+e[t]+"'",new pi(e[t],new ii(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[r]===14){var s=e.indexOf(`
|
|
566
|
-
`,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 pi(r,new ii(this,t,this.tokenRegex.lastIndex))}}class fm{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 K("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 pm=f1;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 nc={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 K("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=nc[e.text],n==null||n>=t)throw new K("Invalid base-"+t+" digit "+e.text);for(var r;(r=nc[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var Ml=(i,e,t,n)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new K("\\newcommand's first argument must be a macro name");var s=r[0].text,a=i.isDefined(s);if(a&&!e)throw new K("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!t)throw new K("\\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 K("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=>Ml(i,!1,!0,!1));k("\\renewcommand",i=>Ml(i,!0,!1,!1));k("\\providecommand",i=>Ml(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 rc={",":"\\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"},mm=new Set(["bin","rel"]);k("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in rc?e=rc[t]:(t.slice(0,4)==="\\not"||t in it.math&&mm.has(it.math[t].group))&&(e="\\dotsb"),e});var Sl={")":!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 Sl?"\\ldots\\,":"\\ldots"});k("\\dotsc",function(i){var e=i.future().text;return e in Sl&&e!==","?"\\ldots\\,":"\\ldots"});k("\\cdots",function(i){var e=i.future().text;return e in Sl?"\\@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 K("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 M1=Q(Gi["Main-Regular"][84][1]-.7*Gi["Main-Regular"][65][1]);k("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+M1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");k("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+M1+"}{\\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 S1=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",S1(!1));k("\\bra@set",S1(!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 z1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gm{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 fm(pm,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new ic(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 pi("EOF",n.loc)),this.pushTokens(r),new pi("",ii.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 K("Extra }",s)}else if(s.text==="EOF")throw new K("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 K("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 K("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 K("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 K("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 K("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 K("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 pi(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 ic(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)||z1.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 sc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Oo={"́":{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"}},ac={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class eo{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 gm(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 K("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 pi("}")),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(eo.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 K("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 K("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 K("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new K("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new K("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new K("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=sc.test(s.text),c=[];for(c.push(new pi(ca[s.text])),this.consume();;){var d=this.fetch().text;if(!ca[d]||sc.test(d)!==h)break;c.unshift(new pi(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 K("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!s.allowedInText)throw new K("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&s.allowedInMath===!1)throw new K("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 K("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 K("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 K("A primitive argument cannot be optional");var a=this.parseGroup(e);if(a==null)throw new K("Expected group as "+e,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new K("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 K("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 K("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 K("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Id(s))throw new K("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:ii.range(n,l),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!z1.hasOwnProperty(r)){if(this.settings.throwOnError)throw new K("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:ii.range(r,o),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:ii.range(r,a),text:"--"}),t-=1)}(s==="'"||s==="`")&&a.text===s&&(e.splice(n,2,{type:"textord",mode:"text",loc:ii.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 K(`\\verb assertion failed --
|
|
567
|
-
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}ac.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=ac[t[0]]+t.slice(1));var s=dm.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"&&M0.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=ii.range(e),h;_p(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&&(Dd(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:ii.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(!Oo[d])throw new K("Unknown accent ' "+d+"'",e);var f=Oo[d][this.mode]||Oo[d].text;if(!f)throw new K("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:ii.range(e),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}}eo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var zl=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new eo(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 K("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new pi("\\df@tag")])}]}return r},C1=function(e,t,n){t.textContent="";var r=Cl(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."),C1=function(){throw new K("KaTeX doesn't work in quirks mode.")});var vm=function(e,t){var n=Cl(e,t).toMarkup();return n},xm=function(e,t){var n=new fl(t);return zl(e,n)},N1=function(e,t,n){if(n.throwOnError||!(e instanceof K))throw e;var r=
|
|
566
|
+
`,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 pi(r,new ii(this,t,this.tokenRegex.lastIndex))}}class fm{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 K("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 pm=f1;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 nc={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 K("\\char` missing argument");n=e.text.charCodeAt(0)}else t=10;if(t){if(n=nc[e.text],n==null||n>=t)throw new K("Invalid base-"+t+" digit "+e.text);for(var r;(r=nc[i.future().text])!=null&&r<t;)n*=t,n+=r,i.popToken()}return"\\@char{"+n+"}"});var Ml=(i,e,t,n)=>{var r=i.consumeArg().tokens;if(r.length!==1)throw new K("\\newcommand's first argument must be a macro name");var s=r[0].text,a=i.isDefined(s);if(a&&!e)throw new K("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!a&&!t)throw new K("\\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 K("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=>Ml(i,!1,!0,!1));k("\\renewcommand",i=>Ml(i,!0,!1,!1));k("\\providecommand",i=>Ml(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),zn[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 rc={",":"\\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"},mm=new Set(["bin","rel"]);k("\\dots",function(i){var e="\\dotso",t=i.expandAfterFuture().text;return t in rc?e=rc[t]:(t.slice(0,4)==="\\not"||t in it.math&&mm.has(it.math[t].group))&&(e="\\dotsb"),e});var Sl={")":!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 Sl?"\\ldots\\,":"\\ldots"});k("\\dotsc",function(i){var e=i.future().text;return e in Sl&&e!==","?"\\ldots\\,":"\\ldots"});k("\\cdots",function(i){var e=i.future().text;return e in Sl?"\\@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 K("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 M1=ee(Gi["Main-Regular"][84][1]-.7*Gi["Main-Regular"][65][1]);k("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+M1+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");k("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+M1+"}{\\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 S1=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",S1(!1));k("\\bra@set",S1(!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 z1={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gm{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 fm(pm,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new ic(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 pi("EOF",n.loc)),this.pushTokens(r),new pi("",ii.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 K("Extra }",s)}else if(s.text==="EOF")throw new K("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 K("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 K("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 K("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 K("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 K("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 K("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 pi(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 ic(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)||zn.hasOwnProperty(e)||it.math.hasOwnProperty(e)||it.text.hasOwnProperty(e)||z1.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:zn.hasOwnProperty(e)&&!zn[e].primitive}}var sc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Oo={"́":{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"}},ac={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class eo{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 gm(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 K("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 pi("}")),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(eo.endOfExpression.has(r.text)||t&&r.text===t||e&&zn[r.text]&&zn[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 K("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 K("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 K("Limit controls must follow a math operator",s);this.consume()}else if(s.text==="^"){if(n)throw new K("Double superscript",s);n=this.handleSupSubscript("superscript")}else if(s.text==="_"){if(r)throw new K("Double subscript",s);r=this.handleSupSubscript("subscript")}else if(s.text==="'"){if(n)throw new K("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=sc.test(s.text),c=[];for(c.push(new pi(ca[s.text])),this.consume();;){var d=this.fetch().text;if(!ca[d]||sc.test(d)!==h)break;c.unshift(new pi(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=zn[r];if(!s)return null;if(this.consume(),t&&t!=="atom"&&!s.allowedInArgument)throw new K("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if(this.mode==="text"&&!s.allowedInText)throw new K("Can't use function '"+r+"' in text mode",n);if(this.mode==="math"&&s.allowedInMath===!1)throw new K("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=zn[e];if(o&&o.handler)return o.handler(a,t,n);throw new K("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 K("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 K("A primitive argument cannot be optional");var a=this.parseGroup(e);if(a==null)throw new K("Expected group as "+e,this.fetch());return a}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new K("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 K("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 K("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 K("Invalid size: '"+t.text+"'",t);var s={number:+(r[1]+r[2]),unit:r[3]};if(!Id(s))throw new K("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:ii.range(n,l),body:o,semisimple:r==="\\begingroup"||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),s==null&&r[0]==="\\"&&!z1.hasOwnProperty(r)){if(this.settings.throwOnError)throw new K("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:ii.range(r,o),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:ii.range(r,a),text:"--"}),t-=1)}(s==="'"||s==="`")&&a.text===s&&(e.splice(n,2,{type:"textord",mode:"text",loc:ii.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 K(`\\verb assertion failed --
|
|
567
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:r}}ac.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=ac[t[0]]+t.slice(1));var s=dm.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"&&M0.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=ii.range(e),h;_p(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&&(Dd(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:ii.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(!Oo[d])throw new K("Unknown accent ' "+d+"'",e);var f=Oo[d][this.mode]||Oo[d].text;if(!f)throw new K("Accent "+d+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:ii.range(e),label:f,isStretchy:!1,isShifty:!0,base:a}}return a}}eo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var zl=function(e,t){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new eo(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 K("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new pi("\\df@tag")])}]}return r},C1=function(e,t,n){t.textContent="";var r=Cl(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."),C1=function(){throw new K("KaTeX doesn't work in quirks mode.")});var vm=function(e,t){var n=Cl(e,t).toMarkup();return n},xm=function(e,t){var n=new fl(t);return zl(e,n)},N1=function(e,t,n){if(n.throwOnError||!(e instanceof K))throw e;var r=V(["katex-error"],[new gi(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Cl=function(e,t){var n=new fl(t);try{var r=zl(e,n);return Ep(r,e,n)}catch(s){return N1(s,e,n)}},ym=function(e,t){var n=new fl(t);try{var r=zl(e,n);return Mp(r,e,n)}catch(s){return N1(s,e,n)}},wm="0.16.47",bm={Span:Kr,Anchor:$a,SymbolNode:gi,SvgNode:un,PathNode:_n,LineNode:E0},km={version:wm,render:C1,renderToString:vm,ParseError:K,SETTINGS_SCHEMA:b0,__parse:xm,__renderToDomTree:Cl,__renderToHTMLTree:ym,__setFontMetrics:sp,__defineSymbol:u,__defineFunction:oe,__defineMacro:k,__domTree:bm};const Tm=(function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"})(),Em=function(i,e){return new URL(i,e).href},oc={},Mm=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=Em(c,n),c in oc)return;oc[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":Tm,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)})},lc='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Sm=920,zm=.78,Cm=1200,Bo=new Map;let hc,cc=0;function Nm(i){return/^\s*(?:---\s*\n[\s\S]*?\n---\s*\n\s*)?(?:%%\{[\s\S]*?\}%%\s*)*(?:flowchart|graph)\b/m.test(i)?i.split(`
|
|
568
568
|
`).map(t=>/^\s*%%/.test(t)?t:t.replace(/(\b[A-Za-z0-9_]+)\{(?!\{)((?:"[^"\n]*"|[^}\n])+)\}(?!\})/g,"$1{{$2}}")).join(`
|
|
569
|
-
`):i}async function Lm(){return hc??(hc=Mm(async()=>{const{default:i}=await import("./mermaid.core-
|
|
569
|
+
`):i}async function Lm(){return hc??(hc=Mm(async()=>{const{default:i}=await import("./mermaid.core-BA0ZnaVT.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:lc,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:lc,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:`
|
|
570
570
|
.node rect, .node circle, .node ellipse, .statediagram-state rect.basic { rx: 10px; ry: 10px; stroke-width: 1.5px; }
|
|
571
571
|
.node polygon { fill: #fffbeb !important; stroke: #d97706 !important; stroke-width: 1.6px !important; stroke-linejoin: round; }
|
|
572
572
|
.cluster rect { fill: #f8fafc !important; stroke: #cbd5e1 !important; stroke-width: 1.3px !important; stroke-dasharray: 6 4; rx: 12px; ry: 12px; }
|
|
@@ -575,10 +575,10 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
575
575
|
.arrowheadPath, marker path { fill: #64748b !important; stroke: #64748b !important; }
|
|
576
576
|
.edgeLabel rect, .labelBkg { fill: #ffffff !important; stroke: #e2e8f0 !important; stroke-width: 1px !important; opacity: 0.98 !important; rx: 6px; ry: 6px; }
|
|
577
577
|
.edgeLabel text, .edgeLabel tspan { fill: #334155 !important; font-size: 11.5px !important; font-weight: 500 !important; }
|
|
578
|
-
`}),i))),hc}function H0(){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 Am(i){var v;if(!H0())throw new Error("Mermaid viewport hidden");const e=await Lm(),t=Nm(i);let n;try{({svg:n}=await e.render("inkmap-mermaid-"+ ++cc,t))}catch{if(t===i)throw new Error("Mermaid render failed");({svg:n}=await e.render("inkmap-mermaid-"+ ++cc,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||!H0())throw new Error("Mermaid measured zero-size bounds in hidden viewport");const h=Math.min(1,Sm/o),c=Math.min(h,Math.max(zm,Cm/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);try{window.postMessage({type:"__inkmap_debug",event:"diagram.rendered",width:d,height:f,naturalWidth:o,naturalHeight:l,bounds:a},"*")}catch{}return{src:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(m),width:d,height:f,naturalWidth:o,naturalHeight:l}}function _m(i){if(!H0())return Promise.resolve(void 0);const e=Bo.get(i);if(e)return e;const t=Am(i).catch(n=>{try{window.postMessage({type:"__inkmap_debug",event:"diagram.error",error:String(n instanceof Error?n.message:n),innerW:window.innerWidth,innerH:window.innerHeight},"*")}catch{}Bo.delete(i)});return Bo.set(i,t),t}function Nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var
|
|
579
|
-
]`).replace("lheading",_1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ym=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D1=/^( {2,}|\\)\n(?!\s*$)/,Xm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,io=/[\p{P}\p{S}]/u,Il=/[\s\p{P}\p{S}]/u,I1=/[^\s\p{P}\p{S}]/u,Vm=We(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Il).getRegex(),O1=/(?!~)[\p{P}\p{S}]/u,jm=/(?!~)[\s\p{P}\p{S}]/u,Km=/(?:[^\s\p{P}\p{S}]|~)/u,Zm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,B1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qm=We(B1,"u").replace(/punct/g,io).getRegex(),Jm=We(B1,"u").replace(/punct/g,O1).getRegex(),P1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",e5=We(P1,"gu").replace(/notPunctSpace/g,I1).replace(/punctSpace/g,Il).replace(/punct/g,io).getRegex(),t5=We(P1,"gu").replace(/notPunctSpace/g,Km).replace(/punctSpace/g,jm).replace(/punct/g,O1).getRegex(),i5=We("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I1).replace(/punctSpace/g,Il).replace(/punct/g,io).getRegex(),n5=We(/\\(punct)/,"gu").replace(/punct/g,io).getRegex(),r5=We(/^<(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(),s5=We(Rl).replace("(?:-->|$)","-->").getRegex(),a5=We("^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",s5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_a=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,o5=We(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_a).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F1=We(/^!?\[(label)\]\[(ref)\]/).replace("label",_a).replace("ref",_l).getRegex(),H1=We(/^!?\[(ref)\](?:\[\])?/).replace("ref",_l).getRegex(),l5=We("reflink|nolink(?!\\()","g").replace("reflink",F1).replace("nolink",H1).getRegex(),Ol={_backpedal:Es,anyPunctuation:n5,autolink:r5,blockSkip:Zm,br:D1,code:Ym,del:Es,emStrongLDelim:Qm,emStrongRDelimAst:e5,emStrongRDelimUnd:i5,escape:Wm,link:o5,nolink:H1,punctuation:Vm,reflink:F1,reflinkSearch:l5,tag:a5,text:Xm,url:Es},h5={...Ol,link:We(/^!?\[(label)\]\((.*?)\)/).replace("label",_a).getRegex(),reflink:We(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_a).getRegex()},U0={...Ol,emStrongRDelimAst:t5,emStrongLDelim:Jm,url:We(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},c5={...U0,br:We(D1).replace("{2,}","*").getRegex(),text:We(U0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},da={normal:Dl,gfm:Gm,pedantic:qm},fs={normal:Ol,gfm:U0,breaks:c5,pedantic:h5},d5={"&":"&","<":"<",">":">",'"':""","'":"'"},uc=i=>d5[i];function Hi(i,e){if(e){if(
|
|
578
|
+
`}),i))),hc}function H0(){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 Am(i){var v;if(!H0())throw new Error("Mermaid viewport hidden");const e=await Lm(),t=Nm(i);let n;try{({svg:n}=await e.render("inkmap-mermaid-"+ ++cc,t))}catch{if(t===i)throw new Error("Mermaid render failed");({svg:n}=await e.render("inkmap-mermaid-"+ ++cc,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||!H0())throw new Error("Mermaid measured zero-size bounds in hidden viewport");const h=Math.min(1,Sm/o),c=Math.min(h,Math.max(zm,Cm/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);try{window.postMessage({type:"__inkmap_debug",event:"diagram.rendered",width:d,height:f,naturalWidth:o,naturalHeight:l,bounds:a},"*")}catch{}return{src:"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(m),width:d,height:f,naturalWidth:o,naturalHeight:l}}function _m(i){if(!H0())return Promise.resolve(void 0);const e=Bo.get(i);if(e)return e;const t=Am(i).catch(n=>{try{window.postMessage({type:"__inkmap_debug",event:"diagram.error",error:String(n instanceof Error?n.message:n),innerW:window.innerWidth,innerH:window.innerHeight},"*")}catch{}Bo.delete(i)});return Bo.set(i,t),t}function Nl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ur=Nl();function L1(i){ur=i}var Es={exec:()=>null};function We(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")},Rm=/^(?:[ \t]*(?:\n|$))+/,Dm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Im=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$s=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Om=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ll=/(?:[*+-]|\d{1,9}[.)])/,A1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_1=We(A1).replace(/bull/g,Ll).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(),Bm=We(A1).replace(/bull/g,Ll).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(),Al=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pm=/^[^\n]+/,_l=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Fm=We(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_l).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hm=We(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ll).getRegex(),to="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",Rl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Um=We("^ {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",Rl).replace("tag",to).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R1=We(Al).replace("hr",$s).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",to).getRegex(),$m=We(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",R1).getRegex(),Dl={blockquote:$m,code:Dm,def:Fm,fences:Im,heading:Om,hr:$s,html:Um,lheading:_1,list:Hm,newline:Rm,paragraph:R1,table:Es,text:Pm},dc=We("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$s).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",to).getRegex(),Gm={...Dl,lheading:Bm,table:dc,paragraph:We(Al).replace("hr",$s).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dc).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",to).getRegex()},qm={...Dl,html:We(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Rl).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:Es,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:We(Al).replace("hr",$s).replace("heading",` *#{1,6} *[^
|
|
579
|
+
]`).replace("lheading",_1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ym=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,D1=/^( {2,}|\\)\n(?!\s*$)/,Xm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,io=/[\p{P}\p{S}]/u,Il=/[\s\p{P}\p{S}]/u,I1=/[^\s\p{P}\p{S}]/u,Vm=We(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Il).getRegex(),O1=/(?!~)[\p{P}\p{S}]/u,jm=/(?!~)[\s\p{P}\p{S}]/u,Km=/(?:[^\s\p{P}\p{S}]|~)/u,Zm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,B1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qm=We(B1,"u").replace(/punct/g,io).getRegex(),Jm=We(B1,"u").replace(/punct/g,O1).getRegex(),P1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",e5=We(P1,"gu").replace(/notPunctSpace/g,I1).replace(/punctSpace/g,Il).replace(/punct/g,io).getRegex(),t5=We(P1,"gu").replace(/notPunctSpace/g,Km).replace(/punctSpace/g,jm).replace(/punct/g,O1).getRegex(),i5=We("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I1).replace(/punctSpace/g,Il).replace(/punct/g,io).getRegex(),n5=We(/\\(punct)/,"gu").replace(/punct/g,io).getRegex(),r5=We(/^<(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(),s5=We(Rl).replace("(?:-->|$)","-->").getRegex(),a5=We("^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",s5).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_a=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,o5=We(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_a).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F1=We(/^!?\[(label)\]\[(ref)\]/).replace("label",_a).replace("ref",_l).getRegex(),H1=We(/^!?\[(ref)\](?:\[\])?/).replace("ref",_l).getRegex(),l5=We("reflink|nolink(?!\\()","g").replace("reflink",F1).replace("nolink",H1).getRegex(),Ol={_backpedal:Es,anyPunctuation:n5,autolink:r5,blockSkip:Zm,br:D1,code:Ym,del:Es,emStrongLDelim:Qm,emStrongRDelimAst:e5,emStrongRDelimUnd:i5,escape:Wm,link:o5,nolink:H1,punctuation:Vm,reflink:F1,reflinkSearch:l5,tag:a5,text:Xm,url:Es},h5={...Ol,link:We(/^!?\[(label)\]\((.*?)\)/).replace("label",_a).getRegex(),reflink:We(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_a).getRegex()},U0={...Ol,emStrongRDelimAst:t5,emStrongLDelim:Jm,url:We(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},c5={...U0,br:We(D1).replace("{2,}","*").getRegex(),text:We(U0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},da={normal:Dl,gfm:Gm,pedantic:qm},fs={normal:Ol,gfm:U0,breaks:c5,pedantic:h5},d5={"&":"&","<":"<",">":">",'"':""","'":"'"},uc=i=>d5[i];function Hi(i,e){if(e){if(Vt.escapeTest.test(i))return i.replace(Vt.escapeReplace,uc)}else if(Vt.escapeTestNoEncode.test(i))return i.replace(Vt.escapeReplaceNoEncode,uc);return i}function fc(i){try{i=encodeURI(i).replace(Vt.percentDecode,"%")}catch{return null}return i}function pc(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 ps(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 mc(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 f5(i,e,t){const n=i.match(t.other.indentCodeCompensation);if(n===null)return e;const r=n[1];return e.split(`
|
|
580
580
|
`).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(`
|
|
581
|
-
`)}var Ra=class{constructor(i){
|
|
581
|
+
`)}var Ra=class{constructor(i){ae(this,"options");ae(this,"rules");ae(this,"lexer");this.options=i||ur}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:ps(t,`
|
|
582
582
|
`)}}}fences(i){const e=this.rules.block.fences.exec(i);if(e){const t=e[0],n=f5(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=ps(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:ps(e[0],`
|
|
583
583
|
`)}}blockquote(i){const e=this.rules.block.blockquote.exec(i);if(e){let t=ps(e[0],`
|
|
584
584
|
`).split(`
|
|
@@ -600,8 +600,8 @@ ${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
600
600
|
`+f}!m&&!f.trim()&&(m=!0),h+=O+`
|
|
601
601
|
`,i=i.substring(O.length+1),d=B.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=pc(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(`
|
|
602
602
|
`):[],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(pc(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)===`
|
|
603
|
-
`?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=ps(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)),mc(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 mc(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}}}},hn=class $0{constructor(e){
|
|
604
|
-
`),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(
|
|
603
|
+
`?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=ps(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)),mc(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 mc(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}}}},hn=class $0{constructor(e){ae(this,"tokens");ae(this,"options");ae(this,"state");ae(this,"tokenizer");ae(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ur,this.options.tokenizer=this.options.tokenizer||new Ra,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:fs.normal};this.options.pedantic?(t.block=da.pedantic,t.inline=fs.pedantic):this.options.gfm&&(t.block=da.gfm,this.options.breaks?t.inline=fs.breaks:t.inline=fs.gfm),this.tokenizer.rules=t}static get rules(){return{block:da,inline:fs}}static lex(e,t){return new $0(t).lex(e)}static lexInline(e,t){return new $0(t).inlineTokens(e)}lex(e){e=e.replace(Vt.carriageReturn,`
|
|
604
|
+
`),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+=`
|
|
605
605
|
`: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+=`
|
|
606
606
|
`+o.raw,h.text+=`
|
|
607
607
|
`+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+=`
|
|
@@ -610,7 +610,7 @@ ${c}`:c;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
|
|
|
610
610
|
`+o.raw,h.text+=`
|
|
611
611
|
`+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+=`
|
|
612
612
|
`+o.raw,h.text+=`
|
|
613
|
-
`+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}},Da=class{constructor(i){
|
|
613
|
+
`+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}},Da=class{constructor(i){ae(this,"options");ae(this,"parser");this.options=i||ur}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,"")+`
|
|
614
614
|
`;return n?'<pre><code class="language-'+Hi(n)+'">'+(t?r:Hi(r,!0))+`</code></pre>
|
|
615
615
|
`:"<pre><code>"+(t?r:Hi(r,!0))+`</code></pre>
|
|
616
616
|
`}blockquote({tokens:i}){return`<blockquote>
|
|
@@ -628,21 +628,21 @@ ${this.parser.parse(i)}</blockquote>
|
|
|
628
628
|
`}tablerow({text:i}){return`<tr>
|
|
629
629
|
${i}</tr>
|
|
630
630
|
`}tablecell(i){const e=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+e+`</${t}>
|
|
631
|
-
`}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=fc(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=fc(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)}},Bl=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""}},cn=class G0{constructor(e){
|
|
632
|
-
`+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}},jo,va=(jo=class{constructor(i){
|
|
633
|
-
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}}},
|
|
634
|
-
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 v5(i,e){return p5(i)||m5(i,e)||x5(i,e)||g5()}function x5(i,e){if(i){if(typeof i=="string")return gc(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)?gc(i,e):void 0}}const $1=Object.entries,vc=Object.setPrototypeOf,y5=Object.isFrozen,G1=Object.getPrototypeOf,q1=Object.getOwnPropertyDescriptor;let At=Object.freeze,Bt=Object.seal,Rr=Object.create,W1=typeof Reflect<"u"&&Reflect,q0=W1.apply,W0=W1.construct;At||(At=function(e){return e});Bt||(Bt=function(e){return e});q0||(q0=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)});W0||(W0=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 sn=nt(Array.prototype.forEach),w5=nt(Array.prototype.lastIndexOf),xc=nt(Array.prototype.pop),ms=nt(Array.prototype.push),b5=nt(Array.prototype.slice),k5=nt(Array.prototype.splice),Hr=Array.isArray,Po=Y1(Set),Fo=nt(Set.prototype.add),gs=nt(Set.prototype.has),jn=nt(String.prototype.toLowerCase),Ho=nt(String.prototype.toString),yc=nt(String.prototype.match),vs=nt(String.prototype.replace),wc=nt(String.prototype.indexOf),T5=nt(String.prototype.trim),E5=nt(Number.prototype.toString),M5=nt(Boolean.prototype.toString),bc=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),kc=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),ti=nt(Object.prototype.hasOwnProperty),xs=nt(Object.prototype.toString),It=nt(RegExp.prototype.test),an=Y1(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 q0(i,e,n)}}function Y1(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return W0(i,t)}}function Pe(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jn;if(vc&&vc(i,null),!Hr(e))return i;let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const s=t(r);s!==r&&(y5(e)||(e[n]=s),r=s)}i[r]=!0}return i}function S5(i){for(let e=0;e<i.length;e++)ti(i,e)||(i[e]=null);return i}function di(i){const e=Rr(null);for(const n of $1(i)){var t=v5(n,2);const r=t[0],s=t[1];ti(i,r)&&(Hr(s)?e[r]=S5(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=di(s):e[r]=s)}return e}function z5(i){switch(typeof i){case"string":return i;case"number":return E5(i);case"boolean":return M5(i);case"bigint":return bc?bc(i):"0";case"symbol":return kc?kc(i):"Symbol()";case"undefined":return xs(i);case"function":case"object":{if(i===null)return xs(i);const e=i,t=Ei(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:xs(n)}return xs(i)}default:return xs(i)}}function Ei(i,e){for(;i!==null;){const n=q1(i,e);if(n){if(n.get)return nt(n.get);if(typeof n.value=="function")return nt(n.value)}i=G1(i)}function t(){return null}return t}function C5(i,e){for(;i!==null;){const t=q1(i,e);if(t)return t.get?nt(t.get):null;i=G1(i)}return null}function N5(i){try{return It(i,""),!0}catch{return!1}}const Tc=At(["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"]),Uo=At(["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"]),$o=At(["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"]),L5=At(["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"]),Go=At(["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"]),A5=At(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ec=At(["#text"]),Mc=At(["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"]),qo=At(["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"]),Sc=At(["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=At(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_5=Bt(/{{[\w\W]*|^[\w\W]*}}/g),R5=Bt(/<%[\w\W]*|^[\w\W]*%>/g),D5=Bt(/\${[\w\W]*/g),I5=Bt(/^data-[\-\w.\u00B7-\uFFFF]+$/),O5=Bt(/^aria-[\-\w]+$/),zc=Bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B5=Bt(/^(?:\w+script|data):/i),P5=Bt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),F5=Bt(/^html$/i),H5=Bt(/^[a-z][.\w]*(-[.\w]+)+$/i),Wo=Bt(/<[/\w!]/g),Cc=Bt(/<[/\w]/g),U5=Bt(/<\/no(script|embed|frames)/i),Nc=Bt(/\/>/i),yt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$5=At(Pe({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),G5=function(){return typeof window>"u"?null:window},q5=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}},Lc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},En=function(e,t,n,r){return ti(e,t)&&Hr(e[t])?Pe(r.base?di(r.base):{},e[t],r.transform):n},Yo=function(e,t,n){const r=ti(e,t)?e[t]:void 0;return r&&typeof r=="object"?di(r):n()};function X1(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:G5();const e=q=>X1(q);if(e.version="3.4.17",e.removed=[],!i||!i.document||i.document.nodeType!==yt.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=Ei(d,"cloneNode"),m=Ei(d,"remove"),v=Ei(d,"removeAttributeNode"),g=Ei(d,"nextSibling"),x=Ei(d,"childNodes"),b=Ei(d,"parentNode"),M=Ei(d,"shadowRoot"),E=Ei(d,"attributes"),C=a&&a.prototype?Ei(a.prototype,"nodeType"):null,N=a&&a.prototype?Ei(a.prototype,"nodeName"):null,O=a&&a.prototype?Ei(a.prototype,"ownerDocument"):null,B=function(T){return C?C(T):T.nodeType},H=function(T){return N?N(T):T.nodeName},W=C5(d,"namespaceURI"),ie=function(T){return W?W(T):T.namespaceURI};if(typeof s=="function"){const q=t.createElement("template");q.content&&q.content.ownerDocument&&(t=q.content.ownerDocument)}let $,Y="",ne,V=!1,J=0;const he=function(){if(J>0)throw an('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.')},ue=function(T){he(),J++;try{return $.createHTML(T)}finally{J--}},je=function(T){he(),J++;try{return $.createScriptURL(T)}finally{J--}},Qe=function(){return V||(ne=q5(c,r),V=!0),ne},_e=t,Xe=_e.implementation,ht=_e.createNodeIterator,st=_e.createDocumentFragment,Be=_e.getElementsByTagName,xt=n.importNode;let te=Lc();e.isSupported=typeof $1=="function"&&typeof b=="function"&&Xe&&Xe.createHTMLDocument!==void 0;const Te=_5,Ri=R5,jt=D5,Kt=I5,Tt=O5,ct=B5,Zt=P5,Pt=H5;let Qt=zc,Ne=null;const ai=Pe({},[...Tc,...Uo,...$o,...Go,...Ec]);let Re=null;const Jt=Pe({},[...Mc,...qo,...Sc,...ua]);let Ze=Object.seal(Rr(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}})),Et=null,Vi=null;const dt=Object.seal(Rr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let G=!0,oe=!0,ge=!1,ze=!0,D=!1,xe=!0,Ue=!1,Mt=!1,oi=null,Di=null,dr=!1,Ci=!1,vn=!1,xn=!1,On=!0,ur=!1;const ji="user-content-";let Ii=!0,Ki=!1,ei=null,Oi={},wi=null;const Bn=Pe({},["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 Bi=null;const Gs=Pe({},["audio","video","img","source","image","track"]);let Jr=null;const fr=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),li="http://www.w3.org/1998/Math/MathML",pr="http://www.w3.org/2000/svg",hi="http://www.w3.org/1999/xhtml";let Zi=hi,Ft=!1,Pn=null;const no=Pe({},[li,pr,hi],Ho),Fn=At(["mi","mo","mn","ms","mtext"]);let mr=Pe({},Fn);const es=At(["annotation-xml"]);let gr=Pe({},es);const ts=Pe({},["title","style","font","a","script"]);let Qi=null;const qs=["application/xhtml+xml","text/html"],is="text/html";let tt=null,Ni=null;const vr=t.createElement("form"),Hn=function(T){return T instanceof RegExp||T instanceof Function},yn=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ni&&Ni===T)return;(!T||typeof T!="object")&&(T={}),T=di(T),Qi=qs.indexOf(T.PARSER_MEDIA_TYPE)===-1?is:T.PARSER_MEDIA_TYPE,tt=Qi==="application/xhtml+xml"?Ho:jn,Ne=En(T,"ALLOWED_TAGS",ai,{transform:tt}),Re=En(T,"ALLOWED_ATTR",Jt,{transform:tt}),Pn=En(T,"ALLOWED_NAMESPACES",no,{transform:Ho}),Jr=En(T,"ADD_URI_SAFE_ATTR",fr,{transform:tt,base:fr}),Bi=En(T,"ADD_DATA_URI_TAGS",Gs,{transform:tt,base:Gs}),wi=En(T,"FORBID_CONTENTS",Bn,{transform:tt}),Et=En(T,"FORBID_TAGS",di({}),{transform:tt}),Vi=En(T,"FORBID_ATTR",di({}),{transform:tt}),Oi=ti(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?di(T.USE_PROFILES):T.USE_PROFILES:!1,G=T.ALLOW_ARIA_ATTR!==!1,oe=T.ALLOW_DATA_ATTR!==!1,ge=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ze=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=T.SAFE_FOR_TEMPLATES||!1,xe=T.SAFE_FOR_XML!==!1,Ue=T.WHOLE_DOCUMENT||!1,Ci=T.RETURN_DOM||!1,vn=T.RETURN_DOM_FRAGMENT||!1,xn=T.RETURN_TRUSTED_TYPE||!1,dr=T.FORCE_BODY||!1,On=T.SANITIZE_DOM!==!1,ur=T.SANITIZE_NAMED_PROPS||!1,Ii=T.KEEP_CONTENT!==!1,Ki=T.IN_PLACE||!1,Qt=N5(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:zc,Zi=typeof T.NAMESPACE=="string"?T.NAMESPACE:hi,mr=Yo(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>Pe({},Fn)),gr=Yo(T,"HTML_INTEGRATION_POINTS",()=>Pe({},es));const _=Yo(T,"CUSTOM_ELEMENT_HANDLING",()=>Rr(null));if(Ze=Rr(null),ti(_,"tagNameCheck")&&Hn(_.tagNameCheck)&&(Ze.tagNameCheck=_.tagNameCheck),ti(_,"attributeNameCheck")&&Hn(_.attributeNameCheck)&&(Ze.attributeNameCheck=_.attributeNameCheck),ti(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(Ze.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),Bt(Ze),D&&(oe=!1),vn&&(Ci=!0),Oi&&(Ne=Pe({},Ec),Re=Rr(null),Oi.html===!0&&(Pe(Ne,Tc),Pe(Re,Mc)),Oi.svg===!0&&(Pe(Ne,Uo),Pe(Re,qo),Pe(Re,ua)),Oi.svgFilters===!0&&(Pe(Ne,$o),Pe(Re,qo),Pe(Re,ua)),Oi.mathMl===!0&&(Pe(Ne,Go),Pe(Re,Sc),Pe(Re,ua))),dt.tagCheck=null,dt.attributeCheck=null,ti(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?dt.tagCheck=T.ADD_TAGS:Hr(T.ADD_TAGS)&&(Ne===ai&&(Ne=di(Ne)),Pe(Ne,T.ADD_TAGS,tt))),ti(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?dt.attributeCheck=T.ADD_ATTR:Hr(T.ADD_ATTR)&&(Re===Jt&&(Re=di(Re)),Pe(Re,T.ADD_ATTR,tt))),ti(T,"ADD_FORBID_CONTENTS")&&Hr(T.ADD_FORBID_CONTENTS)&&(wi===Bn&&(wi=di(wi)),Pe(wi,T.ADD_FORBID_CONTENTS,tt)),Ii&&(Ne["#text"]=!0),Ue&&Pe(Ne,["html","head","body"]),Ne.table&&(Pe(Ne,["tbody"]),delete Et.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=$;$=T.TRUSTED_TYPES_POLICY;try{Y=ue("")}catch(F){throw $=U,F}}else T.TRUSTED_TYPES_POLICY===null?($=void 0,Y=""):($===void 0&&($=Qe()),$&&typeof Y=="string"&&(Y=ue("")));At&&At(T),Ni=T},ns=Pe({},[...Uo,...$o,...L5]),rs=Pe({},[...Go,...A5]),Ws=function(T,_,U){return _.namespaceURI===hi?T==="svg":_.namespaceURI===li?T==="svg"&&(U==="annotation-xml"||mr[U]):!!ns[T]},ro=function(T,_,U){return _.namespaceURI===hi?T==="math":_.namespaceURI===pr?T==="math"&&gr[U]:!!rs[T]},so=function(T,_,U){return _.namespaceURI===pr&&!gr[U]||_.namespaceURI===li&&!mr[U]?!1:!rs[T]&&(ts[T]||!ns[T])},ao=function(T){const _=ie(T),U=jn(H(T)),F=b(T);let de,ve;return F&&B(F)===yt.element?(de={namespaceURI:ie(F)},ve=jn(H(F))):(de={namespaceURI:Zi},ve="template"),Pn[_]?_===pr?Ws(U,de,ve):_===li?ro(U,de,ve):_===hi?so(U,de,ve):!!(Qi==="application/xhtml+xml"&&Pn[_]):!1},ci=function(T){ms(e.removed,{element:T});try{b(T).removeChild(T)}catch{if(m(T),!b(T))throw an("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ss=function(T,_,U){try{v(T,_)}catch{try{T.removeAttribute(U)}catch{}}},Ji=function(T){yr(T);const _=x(T);_&&sn(b5(_),F=>{try{m(F)}catch{}});const U=B(T)===yt.element?E(T):null;if(U)for(let F=U.length-1;F>=0;--F){const de=U[F],ve=de&&de.name;typeof ve=="string"&&ss(T,de,ve)}},bi=function(T,_,U){if(!U)try{U=_.getAttributeNode(T)}catch{U=null}ms(e.removed,{attribute:U||null,from:_});try{U?v(_,U):_.removeAttribute(T)}catch{try{_.removeAttribute(T)}catch{}}if(T==="is")if(Ci||vn)try{ci(_)}catch{}else try{_.setAttribute(T,"")}catch{}},xr=function(T){const _=E(T);if(_)for(let U=_.length-1;U>=0;--U){const F=_[U],de=F&&F.name;typeof de!="string"||Re[tt(de)]||ss(T,F,de)}},as=function(T,_){let U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const F=[T];for(;F.length>0;){const de=F.pop();if(_(de)===!1)continue;if(U&&B(de)===yt.element){const Ce=M(de);A(Ce)&&F.push(Ce)}const ve=x(de);if(ve)for(let Ce=ve.length-1;Ce>=0;--Ce)F.push(ve[Ce])}},yr=function(T){as(T,_=>{B(_)===yt.element&&xr(_)})},Un=function(T){const _=[];return as(T,U=>{_.push(U)},!0),_},$n=function(T,_){const U=Po();sn(Un(T),F=>{B(F)===yt.element&&Fo(U,F)}),sn(_,F=>{B(F)===yt.element&&!gs(U,F)&&xr(F)})},os=function(T,_){let U=!1;return sn(e.removed,F=>{F.element&&(U=U||F.element===T,yr(F.element))}),$n(T,_),U},Rt=8,wr=function(T,_){const U=ei;let F=null;const de=()=>(F||(F=Po(),sn(_,ve=>{Fo(F,ve)})),F);for(let ve=0;;ve++){const Ce=Un(T),gt=[T];let ki=!1;if(sn(Ce,St=>{B(St)===yt.documentFragment?ms(gt,St):!ki&&!gs(U,St)&&(ki=gs(de(),St))}),!ki)return;if(ve>=Rt)throw an("the tree kept changing during in-place sanitization; refusing to return it");sn(gt,(St,Nt)=>{oo(St,Nt>0,T,de())})}},oo=function(T,_,U,F){const de=Tr(T);let ve;for(;ve=de.nextNode();)!gs(F,ve)||gs(ei,ve)||(_&&P(te.uponSanitizeShadowNode,ve,null),at(ve,U),zr(ve,U),A(ve.content)&&Ie(ve.content))},br=function(T){ei&&Fo(ei,T)},kr=function(T,_){return xe?T==="patchsrc"?!0:T==="for"&&_!=="label"&&_!=="output":!1},ls=function(T){xe&&as(T,_=>{const U=B(_);if(U===yt.processingInstruction||U===yt.comment&&It(Cc,_.data)){try{m(_)}catch{}return!1}if(U===yt.element){const F=_,de=tt(H(_));try{F.hasAttribute&&F.hasAttribute("patchsrc")&&F.removeAttribute("patchsrc"),F.hasAttribute&&F.hasAttribute("for")&&kr("for",de)&&F.removeAttribute("for")}catch{}}return!0})},hs=function(T){let _=null,U=null;if(dr)T="<remove></remove>"+T;else{const ve=yc(T,/^[\r\n\t ]+/);U=ve&&ve[0]}Qi==="application/xhtml+xml"&&Zi===hi&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const F=$?ue(T):T;if(Zi===hi)try{_=new h().parseFromString(F,Qi)}catch{}if(!_||!_.documentElement){_=Xe.createDocument(Zi,"template",null);try{_.documentElement.innerHTML=Ft?Y:F}catch{}}const de=_.body||_.documentElement;return T&&U&&de.insertBefore(t.createTextNode(U),de.childNodes[0]||null),Zi===hi?Be.call(_,Ue?"html":"body")[0]:Ue?_.documentElement:de},Tr=function(T){const _=O?O(T):T.ownerDocument;return ht.call(_||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Gn=function(T){return T=vs(T,Te," "),T=vs(T,Ri," "),T=vs(T,jt," "),T},Er=function(T){var _;cs(T);const U=(_=T.querySelectorAll)===null||_===void 0?void 0:_.call(T,"template");U&&sn(U,F=>{A(F.content)&&Er(F.content)})},cs=function(T){T.normalize();const _=O?O(T):T.ownerDocument,U=ht.call(_||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let F=U.nextNode();for(;F;)F.data=Gn(F.data),F=U.nextNode()},w=function(T){const _=N?N(T):null;return typeof _!="string"||tt(_)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==E(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!==C(T)||T.childNodes!==x(T)},A=function(T){if(!C||typeof T!="object"||T===null)return!1;try{return C(T)===yt.documentFragment}catch{return!1}},I=function(T){if(!C||typeof T!="object"||T===null)return!1;try{return typeof C(T)=="number"}catch{return!1}};function P(q,T,_){q.length!==0&&sn(q,U=>{U.call(e,T,_,Ni)})}const re=function(T,_){return!!(xe&&T.hasChildNodes()&&!I(T.firstElementChild)&&It(Wo,T.textContent)&&It(Wo,T.innerHTML)||xe&&$5[_]&&B(T)===yt.element&&ie(T)===hi&&(I(T.firstElementChild)||typeof T.textContent=="string"&&It(Wo,T.textContent))||T.nodeType===yt.processingInstruction||xe&&T.nodeType===yt.comment&&It(Cc,T.data))},ce=function(T,_){if(T instanceof RegExp)return It(T,_);if(T instanceof Function){for(var U=arguments.length,F=new Array(U>2?U-2:0),de=2;de<U;de++)F[de-2]=arguments[de];return!!T(_,...F)}return!1},we=function(T,_,U){if(!Et[_]&&en(_)&&ce(Ze.tagNameCheck,_))return!1;if(Ii&&!wi[_]&&!wi[jn(_)]){const F=b(T),de=x(T);if(de&&F){const ve=de.length;for(let Ce=ve-1;Ce>=0;--Ce){const gt=T===U?f(de[Ce],!0):de[Ce];F.insertBefore(gt,g(T))}}}return ci(T),!0},De=function(T,_,U,F){return T.length===0?_:_===U||_===F?di(_):_},fe=function(T,_){return T===_||b(T)!==null?!1:(Ki&&yr(T),!0)},at=function(T,_){if(br(T),P(te.beforeSanitizeElements,T,null),fe(T,_))return!0;if(w(T))return ci(T),!0;const U=tt(H(T));if(Ne=De(te.uponSanitizeElement,Ne,ai,oi),P(te.uponSanitizeElement,T,{tagName:U,allowedTags:Ne}),fe(T,_))return!0;if(re(T,U))return ci(T),!0;if(Et[U]||!(dt.tagCheck instanceof Function&&dt.tagCheck(U))&&!Ne[U]){const F=we(T,U,_);return F===!1&&(P(te.afterSanitizeElements,T,null),fe(T,_))?!0:F}if(B(T)===yt.element&&!ao(T)||(U==="noscript"||U==="noembed"||U==="noframes")&&It(U5,T.innerHTML))return ci(T),!0;if(D&&T.nodeType===yt.text){const F=Gn(T.textContent);T.textContent!==F&&(ms(e.removed,{element:T.cloneNode()}),T.textContent=F)}return P(te.afterSanitizeElements,T,null),fe(T,_)},ut=function(T,_,U){if(Vi[_]||kr(_,T)||On&&(_==="id"||_==="name")&&(U in t||U in vr))return!1;const F=Re[_]||dt.attributeCheck instanceof Function&&dt.attributeCheck(_,T);return oe&&It(Kt,_)||G&&It(Tt,_)?!0:F?Jr[_]||It(Qt,vs(U,Zt,""))||(_==="src"||_==="xlink:href"||_==="href")&&T!=="script"&&wc(U,"data:")===0&&Bi[T]||ge&&!It(ct,vs(U,Zt,""))?!0:!U:en(T)&&ce(Ze.tagNameCheck,T)&&ce(Ze.attributeNameCheck,_,T)||_==="is"&&Ze.allowCustomizedBuiltInElements&&ce(Ze.tagNameCheck,U)},mt=Pe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),en=function(T){return!mt[jn(T)]&&It(Pt,T)},Mr=function(T,_,U,F){if($&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!U)switch(c.getAttributeType(T,_)){case"TrustedHTML":return ue(F);case"TrustedScriptURL":return je(F)}return F},wn=function(T,_,U,F){try{return U?T.setAttributeNS(U,_,F):T.setAttribute(_,F),w(T)?(ci(T),!1):!0}catch{return bi(_,T),!1}},Sr=function(T,_){return xe&&It(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_)?!0:jn(T)==="attributename"&&yc(_,"href")!==null},zr=function(T,_){if(P(te.beforeSanitizeAttributes,T,null),fe(T,_))return;const U=T.attributes;if(!U||w(T))return;Re=De(te.uponSanitizeAttribute,Re,Jt,Di);const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let de=U.length;const ve=tt(T.nodeName);for(;de--;){const Ce=U[de],gt=Ce.name,ki=Ce.namespaceURI,St=Ce.value,Nt=tt(gt),nn=St;let Ht=gt==="value"?nn:T5(nn),Ys=!1;if(F.attrName=Nt,F.attrValue=Ht,F.keepAttr=!0,F.forceKeepAttr=void 0,P(te.uponSanitizeAttribute,T,F),Ht=F.attrValue,ur&&(Nt==="id"||Nt==="name")&&wc(Ht,ji)!==0&&(bi(gt,T,Ce),Ht=ji+Ht,Ys=!0),Sr(gt,Ht)){bi(gt,T,Ce);continue}if(!F.forceKeepAttr){if(!F.keepAttr){bi(gt,T,Ce);continue}if(!ze&&It(Nc,Ht)){bi(gt,T,Ce);continue}if(D&&(Ht=Gn(Ht)),!ut(ve,Nt,Ht)){bi(gt,T,Ce);continue}Ht=Mr(ve,Nt,ki,Ht),Ht!==nn&&wn(T,gt,ki,Ht)&&Ys&&xc(e.removed)}}P(te.afterSanitizeAttributes,T,null),fe(T,_)},Ie=function(T){let _=null;const U=Tr(T);for(P(te.beforeSanitizeShadowDOM,T,null);_=U.nextNode();)if(P(te.uponSanitizeShadowNode,_,null),at(_,T),zr(_,T),A(_.content)&&Ie(_.content),B(_)===yt.element){const F=M(_);A(F)&&(tn(F),Ie(F))}D&&cs(T),P(te.afterSanitizeShadowDOM,T,null)},tn=function(T){const _=[{node:T,shadow:null}];for(;_.length>0;){const U=_.pop();if(U.shadow){Ie(U.shadow);continue}const F=U.node,de=B(F)===yt.element,ve=x(F);if(ve)for(let Ce=ve.length-1;Ce>=0;--Ce)_.push({node:ve[Ce],shadow:null});if(de){const Ce=N?N(F):null;if(typeof Ce=="string"&&tt(Ce)==="template"){const gt=F.content;A(gt)&&_.push({node:gt,shadow:null})}}if(de){const Ce=M(F);A(Ce)&&_.push({node:null,shadow:Ce},{node:Ce,shadow:null})}}};return e.sanitize=function(q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,U=null,F=null,de=null;if(Ft=!q,Ft&&(q="<!-->"),typeof q!="string"&&!I(q)&&(q=z5(q),typeof q!="string"))throw an("dirty is not a string, aborting");if(!e.isSupported)return q;Mt?(Ne=oi,Re=Di):yn(T),(te.uponSanitizeElement.length>0||te.uponSanitizeAttribute.length>0)&&(Ne=di(Ne)),te.uponSanitizeAttribute.length>0&&(Re=di(Re)),e.removed=[];const ve=Ki&&typeof q!="string"&&I(q);let Ce=[];const gt=ei;if(ve){ls(q);const Nt=H(q);if(typeof Nt=="string"){const nn=tt(Nt);if(!Ne[nn]||Et[nn])throw Ji(q),an("root node is forbidden and cannot be sanitized in-place")}if(w(q))throw Ji(q),an("root node is clobbered and cannot be sanitized in-place");Ce=Un(q),ei=Po()}else if(I(q))_=hs("<!---->"),U=_.ownerDocument.importNode(q,!0),U.nodeType===yt.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?_=U:_.appendChild(U),tn(_);else{if(!Ci&&!D&&!Ue&&q.indexOf("<")===-1)return $&&xn?ue(q):q;if(_=hs(q),!_)return Ci?null:xn?Y:""}_&&dr&&ci(_.firstChild);const ki=ve?q:_;try{ve&&tn(q);const Nt=Tr(ki);for(;F=Nt.nextNode();)at(F,ki),zr(F,ki),A(F.content)&&Ie(F.content);ve&&wr(q,Ce)}catch(Nt){throw ve&&(Ji(q),os(q,Ce)),Nt}finally{ei=gt}if(ve){if(os(q,Ce))throw an("a node selected for removal could not be safely returned; refusing to sanitize in place");return D&&Er(q),q}if(Ci){if(D&&Er(_),vn)for(de=st.call(_.ownerDocument);_.firstChild;)de.appendChild(_.firstChild);else de=_;return(Re.shadowroot||Re.shadowrootmode)&&(de=xt.call(n,de,!0)),de}let St=Ue?_.outerHTML:_.innerHTML;return Ue&&Ne["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&It(F5,_.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
635
|
-
`+
|
|
631
|
+
`}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=fc(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=fc(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)}},Bl=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""}},cn=class G0{constructor(e){ae(this,"options");ae(this,"renderer");ae(this,"textRenderer");this.options=e||ur,this.options.renderer=this.options.renderer||new Da,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bl}static parse(e,t){return new G0(t).parse(e)}static parseInline(e,t){return new G0(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+=`
|
|
632
|
+
`+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}},jo,va=(jo=class{constructor(i){ae(this,"options");ae(this,"block");this.options=i||ur}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?hn.lex:hn.lexInline}provideParser(){return this.block?cn.parse:cn.parseInline}},ae(jo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),jo),U1=class{constructor(...i){ae(this,"defaults",Nl());ae(this,"options",this.setOptions);ae(this,"parse",this.parseMarkdown(!0));ae(this,"parseInline",this.parseMarkdown(!1));ae(this,"Parser",cn);ae(this,"Renderer",Da);ae(this,"TextRenderer",Bl);ae(this,"Lexer",hn);ae(this,"Tokenizer",Ra);ae(this,"Hooks",va);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 Da(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 Ra(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 va;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];va.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 hn.lex(i,e??this.defaults)}parser(i,e){return cn.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?hn.lex:hn.lexInline,l=s.hooks?s.hooks.provideParser():i?cn.parse:cn.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+=`
|
|
633
|
+
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}}},ar=new U1;function Ve(i,e){return ar.parse(i,e)}Ve.options=Ve.setOptions=function(i){return ar.setOptions(i),Ve.defaults=ar.defaults,L1(Ve.defaults),Ve};Ve.getDefaults=Nl;Ve.defaults=ur;Ve.use=function(...i){return ar.use(...i),Ve.defaults=ar.defaults,L1(Ve.defaults),Ve};Ve.walkTokens=function(i,e){return ar.walkTokens(i,e)};Ve.parseInline=ar.parseInline;Ve.Parser=cn;Ve.parser=cn.parse;Ve.Renderer=Da;Ve.TextRenderer=Bl;Ve.Lexer=hn;Ve.lexer=hn.lex;Ve.Tokenizer=Ra;Ve.Hooks=va;Ve.parse=Ve;Ve.options;Ve.setOptions;Ve.use;Ve.walkTokens;Ve.parseInline;cn.parse;hn.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 gc(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 p5(i){if(Array.isArray(i))return i}function m5(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 g5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
634
|
+
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 v5(i,e){return p5(i)||m5(i,e)||x5(i,e)||g5()}function x5(i,e){if(i){if(typeof i=="string")return gc(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)?gc(i,e):void 0}}const $1=Object.entries,vc=Object.setPrototypeOf,y5=Object.isFrozen,G1=Object.getPrototypeOf,q1=Object.getOwnPropertyDescriptor;let At=Object.freeze,Bt=Object.seal,Rr=Object.create,W1=typeof Reflect<"u"&&Reflect,q0=W1.apply,W0=W1.construct;At||(At=function(e){return e});Bt||(Bt=function(e){return e});q0||(q0=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)});W0||(W0=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 sn=nt(Array.prototype.forEach),w5=nt(Array.prototype.lastIndexOf),xc=nt(Array.prototype.pop),ms=nt(Array.prototype.push),b5=nt(Array.prototype.slice),k5=nt(Array.prototype.splice),Hr=Array.isArray,Po=Y1(Set),Fo=nt(Set.prototype.add),gs=nt(Set.prototype.has),Zn=nt(String.prototype.toLowerCase),Ho=nt(String.prototype.toString),yc=nt(String.prototype.match),vs=nt(String.prototype.replace),wc=nt(String.prototype.indexOf),T5=nt(String.prototype.trim),E5=nt(Number.prototype.toString),M5=nt(Boolean.prototype.toString),bc=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),kc=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),ti=nt(Object.prototype.hasOwnProperty),xs=nt(Object.prototype.toString),It=nt(RegExp.prototype.test),an=Y1(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 q0(i,e,n)}}function Y1(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return W0(i,t)}}function Pe(i,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zn;if(vc&&vc(i,null),!Hr(e))return i;let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const s=t(r);s!==r&&(y5(e)||(e[n]=s),r=s)}i[r]=!0}return i}function S5(i){for(let e=0;e<i.length;e++)ti(i,e)||(i[e]=null);return i}function di(i){const e=Rr(null);for(const n of $1(i)){var t=v5(n,2);const r=t[0],s=t[1];ti(i,r)&&(Hr(s)?e[r]=S5(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=di(s):e[r]=s)}return e}function z5(i){switch(typeof i){case"string":return i;case"number":return E5(i);case"boolean":return M5(i);case"bigint":return bc?bc(i):"0";case"symbol":return kc?kc(i):"Symbol()";case"undefined":return xs(i);case"function":case"object":{if(i===null)return xs(i);const e=i,t=Mi(e,"toString");if(typeof t=="function"){const n=t(e);return typeof n=="string"?n:xs(n)}return xs(i)}default:return xs(i)}}function Mi(i,e){for(;i!==null;){const n=q1(i,e);if(n){if(n.get)return nt(n.get);if(typeof n.value=="function")return nt(n.value)}i=G1(i)}function t(){return null}return t}function C5(i,e){for(;i!==null;){const t=q1(i,e);if(t)return t.get?nt(t.get):null;i=G1(i)}return null}function N5(i){try{return It(i,""),!0}catch{return!1}}const Tc=At(["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"]),Uo=At(["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"]),$o=At(["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"]),L5=At(["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"]),Go=At(["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"]),A5=At(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ec=At(["#text"]),Mc=At(["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"]),qo=At(["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"]),Sc=At(["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=At(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_5=Bt(/{{[\w\W]*|^[\w\W]*}}/g),R5=Bt(/<%[\w\W]*|^[\w\W]*%>/g),D5=Bt(/\${[\w\W]*/g),I5=Bt(/^data-[\-\w.\u00B7-\uFFFF]+$/),O5=Bt(/^aria-[\-\w]+$/),zc=Bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B5=Bt(/^(?:\w+script|data):/i),P5=Bt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),F5=Bt(/^html$/i),H5=Bt(/^[a-z][.\w]*(-[.\w]+)+$/i),Wo=Bt(/<[/\w!]/g),Cc=Bt(/<[/\w]/g),U5=Bt(/<\/no(script|embed|frames)/i),Nc=Bt(/\/>/i),yt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$5=At(Pe({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),G5=function(){return typeof window>"u"?null:window},q5=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}},Lc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Mn=function(e,t,n,r){return ti(e,t)&&Hr(e[t])?Pe(r.base?di(r.base):{},e[t],r.transform):n},Yo=function(e,t,n){const r=ti(e,t)?e[t]:void 0;return r&&typeof r=="object"?di(r):n()};function X1(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:G5();const e=q=>X1(q);if(e.version="3.4.17",e.removed=[],!i||!i.document||i.document.nodeType!==yt.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=Mi(d,"cloneNode"),m=Mi(d,"remove"),v=Mi(d,"removeAttributeNode"),g=Mi(d,"nextSibling"),x=Mi(d,"childNodes"),b=Mi(d,"parentNode"),M=Mi(d,"shadowRoot"),E=Mi(d,"attributes"),C=a&&a.prototype?Mi(a.prototype,"nodeType"):null,N=a&&a.prototype?Mi(a.prototype,"nodeName"):null,O=a&&a.prototype?Mi(a.prototype,"ownerDocument"):null,B=function(T){return C?C(T):T.nodeType},$=function(T){return N?N(T):T.nodeName},Y=C5(d,"namespaceURI"),ne=function(T){return Y?Y(T):T.namespaceURI};if(typeof s=="function"){const q=t.createElement("template");q.content&&q.content.ownerDocument&&(t=q.content.ownerDocument)}let G,ie="",Q,X=!1,j=0;const le=function(){if(j>0)throw an('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){le(),j++;try{return G.createHTML(T)}finally{j--}},Ue=function(T){le(),j++;try{return G.createScriptURL(T)}finally{j--}},Ze=function(){return X||(Q=q5(c,r),X=!0),Q},_e=t,Xe=_e.implementation,ht=_e.createNodeIterator,st=_e.createDocumentFragment,Ie=_e.getElementsByTagName,xt=n.importNode;let J=Lc();e.isSupported=typeof $1=="function"&&typeof b=="function"&&Xe&&Xe.createHTMLDocument!==void 0;const ke=_5,Di=R5,Kt=D5,Zt=I5,Tt=O5,ct=B5,Qt=P5,Pt=H5;let Jt=zc,ze=null;const ai=Pe({},[...Tc,...Uo,...$o,...Go,...Ec]);let Re=null;const Gt=Pe({},[...Mc,...qo,...Sc,...ua]);let Qe=Object.seal(Rr(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}})),Et=null,Vi=null;const dt=Object.seal(Rr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let oi=!0,U=!0,re=!1,Ne=!0,D=!1,de=!0,Ce=!1,je=!1,Ct=null,wi=null,vn=!1,Ni=!1,xn=!1,yn=!1,Bn=!0,fr=!1;const ji="user-content-";let Ii=!0,Ki=!1,ei=null,Oi={},bi=null;const Pn=Pe({},["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 Bi=null;const Gs=Pe({},["audio","video","img","source","image","track"]);let Jr=null;const pr=Pe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),li="http://www.w3.org/1998/Math/MathML",mr="http://www.w3.org/2000/svg",hi="http://www.w3.org/1999/xhtml";let Zi=hi,Ft=!1,Fn=null;const no=Pe({},[li,mr,hi],Ho),Hn=At(["mi","mo","mn","ms","mtext"]);let gr=Pe({},Hn);const es=At(["annotation-xml"]);let vr=Pe({},es);const ts=Pe({},["title","style","font","a","script"]);let Qi=null;const qs=["application/xhtml+xml","text/html"],is="text/html";let tt=null,Li=null;const xr=t.createElement("form"),Un=function(T){return T instanceof RegExp||T instanceof Function},wn=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Li&&Li===T)return;(!T||typeof T!="object")&&(T={}),T=di(T),Qi=qs.indexOf(T.PARSER_MEDIA_TYPE)===-1?is:T.PARSER_MEDIA_TYPE,tt=Qi==="application/xhtml+xml"?Ho:Zn,ze=Mn(T,"ALLOWED_TAGS",ai,{transform:tt}),Re=Mn(T,"ALLOWED_ATTR",Gt,{transform:tt}),Fn=Mn(T,"ALLOWED_NAMESPACES",no,{transform:Ho}),Jr=Mn(T,"ADD_URI_SAFE_ATTR",pr,{transform:tt,base:pr}),Bi=Mn(T,"ADD_DATA_URI_TAGS",Gs,{transform:tt,base:Gs}),bi=Mn(T,"FORBID_CONTENTS",Pn,{transform:tt}),Et=Mn(T,"FORBID_TAGS",di({}),{transform:tt}),Vi=Mn(T,"FORBID_ATTR",di({}),{transform:tt}),Oi=ti(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?di(T.USE_PROFILES):T.USE_PROFILES:!1,oi=T.ALLOW_ARIA_ATTR!==!1,U=T.ALLOW_DATA_ATTR!==!1,re=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=T.SAFE_FOR_TEMPLATES||!1,de=T.SAFE_FOR_XML!==!1,Ce=T.WHOLE_DOCUMENT||!1,Ni=T.RETURN_DOM||!1,xn=T.RETURN_DOM_FRAGMENT||!1,yn=T.RETURN_TRUSTED_TYPE||!1,vn=T.FORCE_BODY||!1,Bn=T.SANITIZE_DOM!==!1,fr=T.SANITIZE_NAMED_PROPS||!1,Ii=T.KEEP_CONTENT!==!1,Ki=T.IN_PLACE||!1,Jt=N5(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:zc,Zi=typeof T.NAMESPACE=="string"?T.NAMESPACE:hi,gr=Yo(T,"MATHML_TEXT_INTEGRATION_POINTS",()=>Pe({},Hn)),vr=Yo(T,"HTML_INTEGRATION_POINTS",()=>Pe({},es));const _=Yo(T,"CUSTOM_ELEMENT_HANDLING",()=>Rr(null));if(Qe=Rr(null),ti(_,"tagNameCheck")&&Un(_.tagNameCheck)&&(Qe.tagNameCheck=_.tagNameCheck),ti(_,"attributeNameCheck")&&Un(_.attributeNameCheck)&&(Qe.attributeNameCheck=_.attributeNameCheck),ti(_,"allowCustomizedBuiltInElements")&&typeof _.allowCustomizedBuiltInElements=="boolean"&&(Qe.allowCustomizedBuiltInElements=_.allowCustomizedBuiltInElements),Bt(Qe),D&&(U=!1),xn&&(Ni=!0),Oi&&(ze=Pe({},Ec),Re=Rr(null),Oi.html===!0&&(Pe(ze,Tc),Pe(Re,Mc)),Oi.svg===!0&&(Pe(ze,Uo),Pe(Re,qo),Pe(Re,ua)),Oi.svgFilters===!0&&(Pe(ze,$o),Pe(Re,qo),Pe(Re,ua)),Oi.mathMl===!0&&(Pe(ze,Go),Pe(Re,Sc),Pe(Re,ua))),dt.tagCheck=null,dt.attributeCheck=null,ti(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?dt.tagCheck=T.ADD_TAGS:Hr(T.ADD_TAGS)&&(ze===ai&&(ze=di(ze)),Pe(ze,T.ADD_TAGS,tt))),ti(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?dt.attributeCheck=T.ADD_ATTR:Hr(T.ADD_ATTR)&&(Re===Gt&&(Re=di(Re)),Pe(Re,T.ADD_ATTR,tt))),ti(T,"ADD_FORBID_CONTENTS")&&Hr(T.ADD_FORBID_CONTENTS)&&(bi===Pn&&(bi=di(bi)),Pe(bi,T.ADD_FORBID_CONTENTS,tt)),Ii&&(ze["#text"]=!0),Ce&&Pe(ze,["html","head","body"]),ze.table&&(Pe(ze,["tbody"]),delete Et.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw an('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const H=G;G=T.TRUSTED_TYPES_POLICY;try{ie=fe("")}catch(F){throw G=H,F}}else T.TRUSTED_TYPES_POLICY===null?(G=void 0,ie=""):(G===void 0&&(G=Ze()),G&&typeof ie=="string"&&(ie=fe("")));At&&At(T),Li=T},ns=Pe({},[...Uo,...$o,...L5]),rs=Pe({},[...Go,...A5]),Ws=function(T,_,H){return _.namespaceURI===hi?T==="svg":_.namespaceURI===li?T==="svg"&&(H==="annotation-xml"||gr[H]):!!ns[T]},ro=function(T,_,H){return _.namespaceURI===hi?T==="math":_.namespaceURI===mr?T==="math"&&vr[H]:!!rs[T]},so=function(T,_,H){return _.namespaceURI===mr&&!vr[H]||_.namespaceURI===li&&!gr[H]?!1:!rs[T]&&(ts[T]||!ns[T])},ao=function(T){const _=ne(T),H=Zn($(T)),F=b(T);let ue,ve;return F&&B(F)===yt.element?(ue={namespaceURI:ne(F)},ve=Zn($(F))):(ue={namespaceURI:Zi},ve="template"),Fn[_]?_===mr?Ws(H,ue,ve):_===li?ro(H,ue,ve):_===hi?so(H,ue,ve):!!(Qi==="application/xhtml+xml"&&Fn[_]):!1},ci=function(T){ms(e.removed,{element:T});try{b(T).removeChild(T)}catch{if(m(T),!b(T))throw an("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ss=function(T,_,H){try{v(T,_)}catch{try{T.removeAttribute(H)}catch{}}},Ji=function(T){wr(T);const _=x(T);_&&sn(b5(_),F=>{try{m(F)}catch{}});const H=B(T)===yt.element?E(T):null;if(H)for(let F=H.length-1;F>=0;--F){const ue=H[F],ve=ue&&ue.name;typeof ve=="string"&&ss(T,ue,ve)}},ki=function(T,_,H){if(!H)try{H=_.getAttributeNode(T)}catch{H=null}ms(e.removed,{attribute:H||null,from:_});try{H?v(_,H):_.removeAttribute(T)}catch{try{_.removeAttribute(T)}catch{}}if(T==="is")if(Ni||xn)try{ci(_)}catch{}else try{_.setAttribute(T,"")}catch{}},yr=function(T){const _=E(T);if(_)for(let H=_.length-1;H>=0;--H){const F=_[H],ue=F&&F.name;typeof ue!="string"||Re[tt(ue)]||ss(T,F,ue)}},as=function(T,_){let H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const F=[T];for(;F.length>0;){const ue=F.pop();if(_(ue)===!1)continue;if(H&&B(ue)===yt.element){const Se=M(ue);A(Se)&&F.push(Se)}const ve=x(ue);if(ve)for(let Se=ve.length-1;Se>=0;--Se)F.push(ve[Se])}},wr=function(T){as(T,_=>{B(_)===yt.element&&yr(_)})},$n=function(T){const _=[];return as(T,H=>{_.push(H)},!0),_},Gn=function(T,_){const H=Po();sn($n(T),F=>{B(F)===yt.element&&Fo(H,F)}),sn(_,F=>{B(F)===yt.element&&!gs(H,F)&&yr(F)})},os=function(T,_){let H=!1;return sn(e.removed,F=>{F.element&&(H=H||F.element===T,wr(F.element))}),Gn(T,_),H},Rt=8,br=function(T,_){const H=ei;let F=null;const ue=()=>(F||(F=Po(),sn(_,ve=>{Fo(F,ve)})),F);for(let ve=0;;ve++){const Se=$n(T),gt=[T];let Ti=!1;if(sn(Se,Mt=>{B(Mt)===yt.documentFragment?ms(gt,Mt):!Ti&&!gs(H,Mt)&&(Ti=gs(ue(),Mt))}),!Ti)return;if(ve>=Rt)throw an("the tree kept changing during in-place sanitization; refusing to return it");sn(gt,(Mt,Nt)=>{oo(Mt,Nt>0,T,ue())})}},oo=function(T,_,H,F){const ue=Er(T);let ve;for(;ve=ue.nextNode();)!gs(F,ve)||gs(ei,ve)||(_&&P(J.uponSanitizeShadowNode,ve,null),at(ve,H),Cr(ve,H),A(ve.content)&&Oe(ve.content))},kr=function(T){ei&&Fo(ei,T)},Tr=function(T,_){return de?T==="patchsrc"?!0:T==="for"&&_!=="label"&&_!=="output":!1},ls=function(T){de&&as(T,_=>{const H=B(_);if(H===yt.processingInstruction||H===yt.comment&&It(Cc,_.data)){try{m(_)}catch{}return!1}if(H===yt.element){const F=_,ue=tt($(_));try{F.hasAttribute&&F.hasAttribute("patchsrc")&&F.removeAttribute("patchsrc"),F.hasAttribute&&F.hasAttribute("for")&&Tr("for",ue)&&F.removeAttribute("for")}catch{}}return!0})},hs=function(T){let _=null,H=null;if(vn)T="<remove></remove>"+T;else{const ve=yc(T,/^[\r\n\t ]+/);H=ve&&ve[0]}Qi==="application/xhtml+xml"&&Zi===hi&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const F=G?fe(T):T;if(Zi===hi)try{_=new h().parseFromString(F,Qi)}catch{}if(!_||!_.documentElement){_=Xe.createDocument(Zi,"template",null);try{_.documentElement.innerHTML=Ft?ie:F}catch{}}const ue=_.body||_.documentElement;return T&&H&&ue.insertBefore(t.createTextNode(H),ue.childNodes[0]||null),Zi===hi?Ie.call(_,Ce?"html":"body")[0]:Ce?_.documentElement:ue},Er=function(T){const _=O?O(T):T.ownerDocument;return ht.call(_||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},qn=function(T){return T=vs(T,ke," "),T=vs(T,Di," "),T=vs(T,Kt," "),T},Mr=function(T){var _;cs(T);const H=(_=T.querySelectorAll)===null||_===void 0?void 0:_.call(T,"template");H&&sn(H,F=>{A(F.content)&&Mr(F.content)})},cs=function(T){T.normalize();const _=O?O(T):T.ownerDocument,H=ht.call(_||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let F=H.nextNode();for(;F;)F.data=qn(F.data),F=H.nextNode()},w=function(T){const _=N?N(T):null;return typeof _!="string"||tt(_)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==E(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!==C(T)||T.childNodes!==x(T)},A=function(T){if(!C||typeof T!="object"||T===null)return!1;try{return C(T)===yt.documentFragment}catch{return!1}},I=function(T){if(!C||typeof T!="object"||T===null)return!1;try{return typeof C(T)=="number"}catch{return!1}};function P(q,T,_){q.length!==0&&sn(q,H=>{H.call(e,T,_,Li)})}const se=function(T,_){return!!(de&&T.hasChildNodes()&&!I(T.firstElementChild)&&It(Wo,T.textContent)&&It(Wo,T.innerHTML)||de&&$5[_]&&B(T)===yt.element&&ne(T)===hi&&(I(T.firstElementChild)||typeof T.textContent=="string"&&It(Wo,T.textContent))||T.nodeType===yt.processingInstruction||de&&T.nodeType===yt.comment&&It(Cc,T.data))},ce=function(T,_){if(T instanceof RegExp)return It(T,_);if(T instanceof Function){for(var H=arguments.length,F=new Array(H>2?H-2:0),ue=2;ue<H;ue++)F[ue-2]=arguments[ue];return!!T(_,...F)}return!1},ye=function(T,_,H){if(!Et[_]&&en(_)&&ce(Qe.tagNameCheck,_))return!1;if(Ii&&!bi[_]&&!bi[Zn(_)]){const F=b(T),ue=x(T);if(ue&&F){const ve=ue.length;for(let Se=ve-1;Se>=0;--Se){const gt=T===H?f(ue[Se],!0):ue[Se];F.insertBefore(gt,g(T))}}}return ci(T),!0},De=function(T,_,H,F){return T.length===0?_:_===H||_===F?di(_):_},pe=function(T,_){return T===_||b(T)!==null?!1:(Ki&&wr(T),!0)},at=function(T,_){if(kr(T),P(J.beforeSanitizeElements,T,null),pe(T,_))return!0;if(w(T))return ci(T),!0;const H=tt($(T));if(ze=De(J.uponSanitizeElement,ze,ai,Ct),P(J.uponSanitizeElement,T,{tagName:H,allowedTags:ze}),pe(T,_))return!0;if(se(T,H))return ci(T),!0;if(Et[H]||!(dt.tagCheck instanceof Function&&dt.tagCheck(H))&&!ze[H]){const F=ye(T,H,_);return F===!1&&(P(J.afterSanitizeElements,T,null),pe(T,_))?!0:F}if(B(T)===yt.element&&!ao(T)||(H==="noscript"||H==="noembed"||H==="noframes")&&It(U5,T.innerHTML))return ci(T),!0;if(D&&T.nodeType===yt.text){const F=qn(T.textContent);T.textContent!==F&&(ms(e.removed,{element:T.cloneNode()}),T.textContent=F)}return P(J.afterSanitizeElements,T,null),pe(T,_)},ut=function(T,_,H){if(Vi[_]||Tr(_,T)||Bn&&(_==="id"||_==="name")&&(H in t||H in xr))return!1;const F=Re[_]||dt.attributeCheck instanceof Function&&dt.attributeCheck(_,T);return U&&It(Zt,_)||oi&&It(Tt,_)?!0:F?Jr[_]||It(Jt,vs(H,Qt,""))||(_==="src"||_==="xlink:href"||_==="href")&&T!=="script"&&wc(H,"data:")===0&&Bi[T]||re&&!It(ct,vs(H,Qt,""))?!0:!H:en(T)&&ce(Qe.tagNameCheck,T)&&ce(Qe.attributeNameCheck,_,T)||_==="is"&&Qe.allowCustomizedBuiltInElements&&ce(Qe.tagNameCheck,H)},mt=Pe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),en=function(T){return!mt[Zn(T)]&&It(Pt,T)},Sr=function(T,_,H,F){if(G&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!H)switch(c.getAttributeType(T,_)){case"TrustedHTML":return fe(F);case"TrustedScriptURL":return Ue(F)}return F},bn=function(T,_,H,F){try{return H?T.setAttributeNS(H,_,F):T.setAttribute(_,F),w(T)?(ci(T),!1):!0}catch{return ki(_,T),!1}},zr=function(T,_){return de&&It(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,_)?!0:Zn(T)==="attributename"&&yc(_,"href")!==null},Cr=function(T,_){if(P(J.beforeSanitizeAttributes,T,null),pe(T,_))return;const H=T.attributes;if(!H||w(T))return;Re=De(J.uponSanitizeAttribute,Re,Gt,wi);const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let ue=H.length;const ve=tt(T.nodeName);for(;ue--;){const Se=H[ue],gt=Se.name,Ti=Se.namespaceURI,Mt=Se.value,Nt=tt(gt),nn=Mt;let Ht=gt==="value"?nn:T5(nn),Ys=!1;if(F.attrName=Nt,F.attrValue=Ht,F.keepAttr=!0,F.forceKeepAttr=void 0,P(J.uponSanitizeAttribute,T,F),Ht=F.attrValue,fr&&(Nt==="id"||Nt==="name")&&wc(Ht,ji)!==0&&(ki(gt,T,Se),Ht=ji+Ht,Ys=!0),zr(gt,Ht)){ki(gt,T,Se);continue}if(!F.forceKeepAttr){if(!F.keepAttr){ki(gt,T,Se);continue}if(!Ne&&It(Nc,Ht)){ki(gt,T,Se);continue}if(D&&(Ht=qn(Ht)),!ut(ve,Nt,Ht)){ki(gt,T,Se);continue}Ht=Sr(ve,Nt,Ti,Ht),Ht!==nn&&bn(T,gt,Ti,Ht)&&Ys&&xc(e.removed)}}P(J.afterSanitizeAttributes,T,null),pe(T,_)},Oe=function(T){let _=null;const H=Er(T);for(P(J.beforeSanitizeShadowDOM,T,null);_=H.nextNode();)if(P(J.uponSanitizeShadowNode,_,null),at(_,T),Cr(_,T),A(_.content)&&Oe(_.content),B(_)===yt.element){const F=M(_);A(F)&&(tn(F),Oe(F))}D&&cs(T),P(J.afterSanitizeShadowDOM,T,null)},tn=function(T){const _=[{node:T,shadow:null}];for(;_.length>0;){const H=_.pop();if(H.shadow){Oe(H.shadow);continue}const F=H.node,ue=B(F)===yt.element,ve=x(F);if(ve)for(let Se=ve.length-1;Se>=0;--Se)_.push({node:ve[Se],shadow:null});if(ue){const Se=N?N(F):null;if(typeof Se=="string"&&tt(Se)==="template"){const gt=F.content;A(gt)&&_.push({node:gt,shadow:null})}}if(ue){const Se=M(F);A(Se)&&_.push({node:null,shadow:Se},{node:Se,shadow:null})}}};return e.sanitize=function(q){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,H=null,F=null,ue=null;if(Ft=!q,Ft&&(q="<!-->"),typeof q!="string"&&!I(q)&&(q=z5(q),typeof q!="string"))throw an("dirty is not a string, aborting");if(!e.isSupported)return q;je?(ze=Ct,Re=wi):wn(T),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(ze=di(ze)),J.uponSanitizeAttribute.length>0&&(Re=di(Re)),e.removed=[];const ve=Ki&&typeof q!="string"&&I(q);let Se=[];const gt=ei;if(ve){ls(q);const Nt=$(q);if(typeof Nt=="string"){const nn=tt(Nt);if(!ze[nn]||Et[nn])throw Ji(q),an("root node is forbidden and cannot be sanitized in-place")}if(w(q))throw Ji(q),an("root node is clobbered and cannot be sanitized in-place");Se=$n(q),ei=Po()}else if(I(q))_=hs("<!---->"),H=_.ownerDocument.importNode(q,!0),H.nodeType===yt.element&&H.nodeName==="BODY"||H.nodeName==="HTML"?_=H:_.appendChild(H),tn(_);else{if(!Ni&&!D&&!Ce&&q.indexOf("<")===-1)return G&&yn?fe(q):q;if(_=hs(q),!_)return Ni?null:yn?ie:""}_&&vn&&ci(_.firstChild);const Ti=ve?q:_;try{ve&&tn(q);const Nt=Er(Ti);for(;F=Nt.nextNode();)at(F,Ti),Cr(F,Ti),A(F.content)&&Oe(F.content);ve&&br(q,Se)}catch(Nt){throw ve&&(Ji(q),os(q,Se)),Nt}finally{ei=gt}if(ve){if(os(q,Se))throw an("a node selected for removal could not be safely returned; refusing to sanitize in place");return D&&Mr(q),q}if(Ni){if(D&&Mr(_),xn)for(ue=st.call(_.ownerDocument);_.firstChild;)ue.appendChild(_.firstChild);else ue=_;return(Re.shadowroot||Re.shadowrootmode)&&(ue=xt.call(n,ue,!0)),ue}let Mt=Ce?_.outerHTML:_.innerHTML;return Ce&&ze["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&It(F5,_.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
|
|
635
|
+
`+Mt),D&&(Mt=qn(Mt)),G&&yn?fe(Mt):Mt},e.setConfig=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wn(q),je=!0,Ct=ze,wi=Re},e.clearConfig=function(){Li=null,je=!1,Ct=null,wi=null,G=Q,ie=""},e.isValidAttribute=function(q,T,_){Li||wn({});const H=tt(q),F=tt(T);return typeof _=="string"&&(zr(T,_)||!Ne&&It(Nc,_))?!1:ut(H,F,_)},e.addHook=function(q,T){typeof T=="function"&&ti(J,q)&&ms(J[q],T)},e.removeHook=function(q,T){if(ti(J,q)){if(T!==void 0){const _=w5(J[q],T);return _===-1?void 0:k5(J[q],_,1)[0]}return xc(J[q])}},e.removeHooks=function(q){ti(J,q)&&(J[q]=[])},e.removeAllHooks=function(){J=Lc()},e}var W5=X1();const Xo=new Map,Y5=/!\[[^\]]*\]\(\s*<?([^)\s>]+)>?(?:\s+"[^"]*")?\s*\)/g,X5=/\$|\\[([]/,Ac=600,_r=i=>i.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),V1=(i,e)=>km.renderToString(i.trim(),{displayMode:e,output:"html",throwOnError:!1,strict:!1}),V5={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=>V1(i.tex,!0)},j5={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===`
|
|
636
636
|
`&&i[n+1]===`
|
|
637
|
-
`)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=>V1(i.tex,i.display)};function K5(i,e=!1){const t=a=>{const o=/^([a-z][a-z0-9+.-]*:|[\\/])/i.test(a);if(e){if(/^data:image\/(?:png|jpeg|gif|webp);base64,[\w+/=]+$/i.test(a))return a;if(o||!i)return"";const l=new URL(a,location.origin+i);return l.origin===location.origin&&l.pathname.startsWith(i)?l.href:""}return o?a:i+a.replace(/^\.\//,"")},n=new Map,r=new U1({gfm:!0,extensions:[V5,j5],renderer:{html({raw:a}){return e?_r(a):!1},link({href:a,tokens:o}){if(!e)return!1;const l=this.parser.parseInline(o);return/^(https?:\/\/|mailto:)/i.test(a)?`<a href="${_r(a)}" target="_blank" rel="noopener noreferrer">${l}</a>`:l},code({lang:a,text:o}){if((a==null?void 0:a.trim().toLowerCase())!=="mermaid")return!1;const l=n.get(o);return`<div class="ink-diagram">${l?`<div class="ink-diagram-viewport"><img class="ink-diagram-image" src="${l.src}" width="${l.width}" height="${l.height}" data-natural-width="${l.naturalWidth}" data-natural-height="${l.naturalHeight}" alt="Mermaid"></div>`:`<pre class="ink-diagram-error"><code>${_r(o)}</code></pre>`}<div class="ink-diagram-bar">${l?'<button type="button" class="ink-diagram-zoom"></button>':""}<button type="button" class="ink-diagram-edit"></button></div></div>`},image({href:a,title:o,text:l}){const h=t(a);if(!h)return`<span>${_r(l||a)}</span>`;const c=Xo.get(h),d=Number(o)||Math.min((c==null?void 0:c.width)??Ac,Ac),f=c?Math.round(c.height*d/c.width):void 0;return`<img src="${_r(h)}" alt="${_r(l)}" width="${d}"${f?` height="${f}"`:""}>`}}});let s;return{render(a){const o=r.parse(a,{async:!1});return e?W5.sanitize(o):o},async preload(a){const o=new Set,l=new Set;let h=!1;for(const c of a){!h&&X5.test(c)&&(h=!0);for(const d of c.matchAll(Y5)){const f=t(d[1]);f&&o.add(f)}/mermaid/i.test(c)&&r.walkTokens(r.lexer(c),d=>{var f;d.type==="code"&&((f=d.lang)==null?void 0:f.trim().toLowerCase())==="mermaid"&&l.add(d.text)})}h&&typeof document<"u"&&document.fonts&&(s??(s=Promise.all(["1em KaTeX_Main","italic 1em KaTeX_Math","1em KaTeX_Size1","1em KaTeX_AMS"].map(c=>document.fonts.load(c).catch(()=>{}))))),await Promise.all([s,...[...l].map(async c=>{if(!n.get(c)){const d=await _m(c);d&&n.set(c,d)}}),...[...o].filter(c=>!Xo.has(c)).map(c=>new Promise(d=>{const f=new Image;f.onload=()=>{Xo.set(c,{width:f.naturalWidth,height:f.naturalHeight}),d()},f.onerror=()=>d(),f.src=c}))])}}}const on=i=>document.querySelector(i),Z5=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function Q5(i,e,t){const n=new RegExp(Z5(e),"gi");return n.test(i)?i.replace(n,()=>t):null}function J5({mindMap:i,pro:e,showToast:t,rewrite:n,onReplace:r}){const s=on("#search"),a=on("#find-input"),o=on("#replace-input"),l=on("#find-count");let h=[],c=-1;function d(C){const N=C.toLowerCase(),O=[],B=H=>{(x0(Ai(H.data)).toLowerCase().includes(N)||Ai(H.data).toLowerCase().includes(N))&&O.push(String(H.data.uid)),(H.children??[]).forEach(B)};return N&&B(i.renderer.renderTree),O}function f(){l.textContent=a.value?h.length?`${c+1}/${h.length}`:ee("noResults"):""}function m(){const C=h[c];if(!C)return f();i.renderer.expandToNodeUid(C,()=>{const N=i.renderer.findNodeByUid(C);N&&(i.execCommand("CLEAR_ACTIVE_NODE"),N.active(),i.renderer.moveNodeToCenter(N,!1))}),f()}function v(C=!1){h=d(a.value),c=h.length?C?Math.min(Math.max(c,0),h.length-1):0:-1,m()}function g(C){if(!h.length)return v();c=(c+C+h.length)%h.length,m()}function x(){s.hidden=!1;const C=i.renderer.activeNodeList[0];!a.value&&C&&(a.value=x0(Ai(C.getData())).slice(0,60)),a.focus(),a.select(),v()}function b(){s.hidden=!0,a.blur(),o.blur()}async function M(C){if(!e.allow("replace"))return;const N=a.value;if(!N)return a.focus();const O=C?void 0:h[c];if(!C&&!O)return;const B=await n(H=>Q5(H,N,o.value),O);B>0&&(r==null||r()),t(ee("replaced",{n:B})),v(!C)}let E=0;return a.addEventListener("input",()=>{clearTimeout(E),E=window.setTimeout(()=>v(),150)}),a.addEventListener("keydown",C=>{C.key==="Enter"&&g(C.shiftKey?-1:1),C.key==="Escape"&&b()}),o.addEventListener("keydown",C=>{C.key==="Enter"&&M(C.metaKey||C.ctrlKey),C.key==="Escape"&&b()}),on("#find-prev").addEventListener("click",()=>g(-1)),on("#find-next").addEventListener("click",()=>g(1)),on("#replace-one").addEventListener("click",()=>M(!1)),on("#replace-all").addEventListener("click",()=>M(!0)),on("#find-close").addEventListener("click",b),{open:x,close:b,isOpen:()=>!s.hidden}}const xa='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Vo=[{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}],fa=[{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"}}],e7=i=>`layout.${i}`,t7=i=>`theme.${i}`;function _c({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:xa,borderWidth:0,borderRadius:8,marginX:80,marginY:24},second:{fillColor:i.card,color:i.text,fontSize:15,fontWeight:"bold",fontFamily:xa,borderColor:i.second,borderWidth:1.5,borderRadius:6,marginX:60,marginY:16},node:{fillColor:i.card,color:i.text,fontSize:14,fontFamily:xa,borderColor:i.border,borderWidth:1,borderRadius:6,marginX:50,marginY:12}}}function Rc(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 j1=ni;j1.usePlugin(Ed).usePlugin(zd).usePlugin(Sd).usePlugin(Md).usePlugin(kd);const Dc=3,i7=400,Ic=40,Ee=i=>document.querySelector(i),K1=document.createElement("style");K1.textContent=Rd;document.head.append(K1);async function n7(i){var hs,Tr,Gn,Er,cs;su(Ia(i.locale)),X0();const e=Ee("#status"),t=Ee("#toast"),n=Ee("#source"),r=Ee("#source-text"),s=Ee("#node-inline-edit"),a=Ee("#diagram-modal"),o=Ee("#diagram-modal-stage"),l=Ee("#diagram-modal-world"),h=Ee("#diagram-modal-img"),c=Ee("#diagram-zoom-level");let d=0,f=0,m=1,v=0,g=0,x=null;function b(w){return Math.max(.15,Math.min(8,w))}function M(){const w=v-d*m/2,A=g-f*m/2;l.style.transform=`translate(${w}px, ${A}px) scale(${m})`,c.textContent=`${Math.round(m*100)}%`}function E(w,A){const I=o.getBoundingClientRect();return{x:w-I.left-I.width/2,y:A-I.top-I.height/2}}function C(w,A,I){const{x:P,y:re}=E(w,A),ce=b(I),we=ce/m;v=P-(P-v)*we,g=re-(re-g)*we,m=ce,M()}function N(w,A,I){const P=o.getBoundingClientRect();C(A??P.left+P.width/2,I??P.top+P.height/2,m*w)}function O(){const w=o.getBoundingClientRect(),A=48,I=Math.max(120,w.width-A),P=Math.max(120,w.height-A);m=b(Math.min(1,I/d,P/f)),v=0,g=0,M()}function B(){m=1,v=0,g=0,M()}function H(w){d=Number(w.dataset.naturalWidth)||w.naturalWidth||w.width||600,f=Number(w.dataset.naturalHeight)||w.naturalHeight||w.height||400,h.src=w.src,h.style.width=`${d}px`,h.style.height=`${f}px`,a.hidden=!1,o.focus({preventScroll:!0}),requestAnimationFrame(O)}const W=()=>{x=null,o.classList.remove("is-panning"),a.hidden=!0;try{document.body.focus({preventScroll:!0})}catch{}};Ee("#diagram-zoom-in").addEventListener("click",()=>N(1.25)),Ee("#diagram-zoom-out").addEventListener("click",()=>N(1/1.25)),Ee("#diagram-zoom-fit").addEventListener("click",O),Ee("#diagram-zoom-reset").addEventListener("click",B),Ee("#diagram-modal-close").addEventListener("click",W),o.addEventListener("wheel",w=>{if(a.hidden)return;if(w.preventDefault(),w.ctrlKey||w.metaKey){const I=Math.exp(-w.deltaY*.01);C(w.clientX,w.clientY,m*I);return}const A=w.deltaMode===1?16:w.deltaMode===2?o.clientHeight:1;v-=w.deltaX*A,g-=w.deltaY*A,M()},{passive:!1}),o.addEventListener("pointerdown",w=>{w.button!==0&&w.button!==1||(x={pointerId:w.pointerId,x:w.clientX,y:w.clientY,tx:v,ty:g},o.classList.add("is-panning"),o.setPointerCapture(w.pointerId))}),o.addEventListener("pointermove",w=>{!x||w.pointerId!==x.pointerId||(v=x.tx+(w.clientX-x.x),g=x.ty+(w.clientY-x.y),M())});const ie=w=>{!x||w.pointerId!==x.pointerId||(x=null,o.classList.remove("is-panning"))};o.addEventListener("pointerup",ie),o.addEventListener("pointercancel",ie),o.addEventListener("dblclick",w=>{w.target.closest(".diagram-modal-bar")||N(m>=2.5?1/m:1.6,w.clientX,w.clientY)}),window.addEventListener("keydown",w=>{if(a.hidden)return;const A=(I,P)=>{v+=I,g+=P,M()};if(w.key==="Escape"){w.preventDefault(),w.stopPropagation(),W();return}w.key==="+"||w.key==="="?(w.preventDefault(),w.stopPropagation(),N(1.25)):w.key==="-"||w.key==="_"?(w.preventDefault(),w.stopPropagation(),N(1/1.25)):w.key==="0"?(w.preventDefault(),w.stopPropagation(),B()):w.key==="1"||w.key==="f"||w.key==="F"?(w.preventDefault(),w.stopPropagation(),O()):w.key==="ArrowLeft"?(w.preventDefault(),w.stopPropagation(),A(48,0)):w.key==="ArrowRight"?(w.preventDefault(),w.stopPropagation(),A(-48,0)):w.key==="ArrowUp"?(w.preventDefault(),w.stopPropagation(),A(0,48)):w.key==="ArrowDown"&&(w.preventDefault(),w.stopPropagation(),A(0,-48))},!0);let $=await i.load();const{saveTarget:Y,compact:ne,restrictAssets:V}=i.capabilities,J=K5(i.assetBase,V);document.documentElement.classList.toggle("ink-sidebar",!!ne),e.setAttribute("role","status");let he,ue=$.md,je=Promise.resolve(),Qe=0,_e=null;const Xe=()=>$.writable===!1,ht=(w,A)=>{e.dataset.state=w,e.textContent=A};let st=0;const Be=w=>{t.textContent=w,t.hidden=!1,clearTimeout(st),st=window.setTimeout(()=>t.hidden=!0,4e3)},xt=await E4(i,Be);async function te(w,A){const I=v4(w,$.name),{root:P,...re}=I;he=re;const ce=[],we=De=>(ce.push(De.md),De.children.forEach(we));return we(P),await J.preload(ce),Nd(P,A)}const Te=w=>{var A;return w.startsWith(`---
|
|
638
|
-
`)?((A=w.match(/^---\n[\s\S]*?\n---\n/))==null?void 0:A[0])??"":""};function
|
|
637
|
+
`)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=>V1(i.tex,i.display)};function K5(i,e=!1){const t=a=>{const o=/^([a-z][a-z0-9+.-]*:|[\\/])/i.test(a);if(e){if(/^data:image\/(?:png|jpeg|gif|webp);base64,[\w+/=]+$/i.test(a))return a;if(o||!i)return"";const l=new URL(a,location.origin+i);return l.origin===location.origin&&l.pathname.startsWith(i)?l.href:""}return o?a:i+a.replace(/^\.\//,"")},n=new Map,r=new U1({gfm:!0,extensions:[V5,j5],renderer:{html({raw:a}){return e?_r(a):!1},link({href:a,tokens:o}){if(!e)return!1;const l=this.parser.parseInline(o);return/^(https?:\/\/|mailto:)/i.test(a)?`<a href="${_r(a)}" target="_blank" rel="noopener noreferrer">${l}</a>`:l},code({lang:a,text:o}){if((a==null?void 0:a.trim().toLowerCase())!=="mermaid")return!1;const l=n.get(o);return`<div class="ink-diagram">${l?`<div class="ink-diagram-viewport"><img class="ink-diagram-image" src="${l.src}" width="${l.width}" height="${l.height}" data-natural-width="${l.naturalWidth}" data-natural-height="${l.naturalHeight}" alt="Mermaid"></div>`:`<pre class="ink-diagram-error"><code>${_r(o)}</code></pre>`}<div class="ink-diagram-bar">${l?'<button type="button" class="ink-diagram-zoom"></button>':""}<button type="button" class="ink-diagram-edit"></button></div></div>`},image({href:a,title:o,text:l}){const h=t(a);if(!h)return`<span>${_r(l||a)}</span>`;const c=Xo.get(h),d=Number(o)||Math.min((c==null?void 0:c.width)??Ac,Ac),f=c?Math.round(c.height*d/c.width):void 0;return`<img src="${_r(h)}" alt="${_r(l)}" width="${d}"${f?` height="${f}"`:""}>`}}});let s;return{render(a){const o=r.parse(a,{async:!1});return e?W5.sanitize(o):o},async preload(a){const o=new Set,l=new Set;let h=!1;for(const c of a){!h&&X5.test(c)&&(h=!0);for(const d of c.matchAll(Y5)){const f=t(d[1]);f&&o.add(f)}/mermaid/i.test(c)&&r.walkTokens(r.lexer(c),d=>{var f;d.type==="code"&&((f=d.lang)==null?void 0:f.trim().toLowerCase())==="mermaid"&&l.add(d.text)})}h&&typeof document<"u"&&document.fonts&&(s??(s=Promise.all(["1em KaTeX_Main","italic 1em KaTeX_Math","1em KaTeX_Size1","1em KaTeX_AMS"].map(c=>document.fonts.load(c).catch(()=>{}))))),await Promise.all([s,...[...l].map(async c=>{if(!n.get(c)){const d=await _m(c);d&&n.set(c,d)}}),...[...o].filter(c=>!Xo.has(c)).map(c=>new Promise(d=>{const f=new Image;f.onload=()=>{Xo.set(c,{width:f.naturalWidth,height:f.naturalHeight}),d()},f.onerror=()=>d(),f.src=c}))])}}}const on=i=>document.querySelector(i),Z5=i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function Q5(i,e,t){const n=new RegExp(Z5(e),"gi");return n.test(i)?i.replace(n,()=>t):null}function J5({mindMap:i,pro:e,showToast:t,rewrite:n,onReplace:r}){const s=on("#search"),a=on("#find-input"),o=on("#replace-input"),l=on("#find-count");let h=[],c=-1;function d(C){const N=C.toLowerCase(),O=[],B=$=>{(x0(_i($.data)).toLowerCase().includes(N)||_i($.data).toLowerCase().includes(N))&&O.push(String($.data.uid)),($.children??[]).forEach(B)};return N&&B(i.renderer.renderTree),O}function f(){l.textContent=a.value?h.length?`${c+1}/${h.length}`:te("noResults"):""}function m(){const C=h[c];if(!C)return f();i.renderer.expandToNodeUid(C,()=>{const N=i.renderer.findNodeByUid(C);N&&(i.execCommand("CLEAR_ACTIVE_NODE"),N.active(),i.renderer.moveNodeToCenter(N,!1))}),f()}function v(C=!1){h=d(a.value),c=h.length?C?Math.min(Math.max(c,0),h.length-1):0:-1,m()}function g(C){if(!h.length)return v();c=(c+C+h.length)%h.length,m()}function x(){s.hidden=!1;const C=i.renderer.activeNodeList[0];!a.value&&C&&(a.value=x0(_i(C.getData())).slice(0,60)),a.focus(),a.select(),v()}function b(){s.hidden=!0,a.blur(),o.blur()}async function M(C){if(!e.allow("replace"))return;const N=a.value;if(!N)return a.focus();const O=C?void 0:h[c];if(!C&&!O)return;const B=await n($=>Q5($,N,o.value),O);B>0&&(r==null||r()),t(te("replaced",{n:B})),v(!C)}let E=0;return a.addEventListener("input",()=>{clearTimeout(E),E=window.setTimeout(()=>v(),150)}),a.addEventListener("keydown",C=>{C.key==="Enter"&&g(C.shiftKey?-1:1),C.key==="Escape"&&b()}),o.addEventListener("keydown",C=>{C.key==="Enter"&&M(C.metaKey||C.ctrlKey),C.key==="Escape"&&b()}),on("#find-prev").addEventListener("click",()=>g(-1)),on("#find-next").addEventListener("click",()=>g(1)),on("#replace-one").addEventListener("click",()=>M(!1)),on("#replace-all").addEventListener("click",()=>M(!0)),on("#find-close").addEventListener("click",b),{open:x,close:b,isOpen:()=>!s.hidden}}const xa='-apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif',Vo=[{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}],fa=[{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"}}],e7=i=>`layout.${i}`,t7=i=>`theme.${i}`;function _c({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:xa,borderWidth:0,borderRadius:8,marginX:80,marginY:24},second:{fillColor:i.card,color:i.text,fontSize:15,fontWeight:"bold",fontFamily:xa,borderColor:i.second,borderWidth:1.5,borderRadius:6,marginX:60,marginY:16},node:{fillColor:i.card,color:i.text,fontSize:14,fontFamily:xa,borderColor:i.border,borderWidth:1,borderRadius:6,marginX:50,marginY:12}}}function Rc(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 j1=ni;j1.usePlugin(Ed).usePlugin(zd).usePlugin(Sd).usePlugin(Md).usePlugin(kd);const Dc=3,i7=400,Ic=40,Te=i=>document.querySelector(i),K1=document.createElement("style");K1.textContent=Rd;document.head.append(K1);async function n7(i){var hs,Er,qn,Mr,cs;su(Ia(i.locale)),X0();const e=Te("#status"),t=Te("#toast"),n=Te("#source"),r=Te("#source-text"),s=Te("#node-inline-edit"),a=Te("#diagram-modal"),o=Te("#diagram-modal-stage"),l=Te("#diagram-modal-world"),h=Te("#diagram-modal-img"),c=Te("#diagram-zoom-level");let d=0,f=0,m=1,v=0,g=0,x=null;function b(w){return Math.max(.15,Math.min(8,w))}function M(){const w=v-d*m/2,A=g-f*m/2;l.style.transform=`translate(${w}px, ${A}px) scale(${m})`,c.textContent=`${Math.round(m*100)}%`}function E(w,A){const I=o.getBoundingClientRect();return{x:w-I.left-I.width/2,y:A-I.top-I.height/2}}function C(w,A,I){const{x:P,y:se}=E(w,A),ce=b(I),ye=ce/m;v=P-(P-v)*ye,g=se-(se-g)*ye,m=ce,M()}function N(w,A,I){const P=o.getBoundingClientRect();C(A??P.left+P.width/2,I??P.top+P.height/2,m*w)}function O(){const w=o.getBoundingClientRect(),A=48,I=Math.max(120,w.width-A),P=Math.max(120,w.height-A);m=b(Math.min(1,I/d,P/f)),v=0,g=0,M()}function B(){m=1,v=0,g=0,M()}function $(w){d=Number(w.dataset.naturalWidth)||w.naturalWidth||w.width||600,f=Number(w.dataset.naturalHeight)||w.naturalHeight||w.height||400,h.src=w.src,h.style.width=`${d}px`,h.style.height=`${f}px`,a.hidden=!1,o.focus({preventScroll:!0}),requestAnimationFrame(O)}const Y=()=>{x=null,o.classList.remove("is-panning"),a.hidden=!0;try{document.body.focus({preventScroll:!0})}catch{}};Te("#diagram-zoom-in").addEventListener("click",()=>N(1.25)),Te("#diagram-zoom-out").addEventListener("click",()=>N(1/1.25)),Te("#diagram-zoom-fit").addEventListener("click",O),Te("#diagram-zoom-reset").addEventListener("click",B),Te("#diagram-modal-close").addEventListener("click",Y),o.addEventListener("wheel",w=>{if(a.hidden)return;if(w.preventDefault(),w.ctrlKey||w.metaKey){const I=Math.exp(-w.deltaY*.01);C(w.clientX,w.clientY,m*I);return}const A=w.deltaMode===1?16:w.deltaMode===2?o.clientHeight:1;v-=w.deltaX*A,g-=w.deltaY*A,M()},{passive:!1}),o.addEventListener("pointerdown",w=>{w.button!==0&&w.button!==1||(x={pointerId:w.pointerId,x:w.clientX,y:w.clientY,tx:v,ty:g},o.classList.add("is-panning"),o.setPointerCapture(w.pointerId))}),o.addEventListener("pointermove",w=>{!x||w.pointerId!==x.pointerId||(v=x.tx+(w.clientX-x.x),g=x.ty+(w.clientY-x.y),M())});const ne=w=>{!x||w.pointerId!==x.pointerId||(x=null,o.classList.remove("is-panning"))};o.addEventListener("pointerup",ne),o.addEventListener("pointercancel",ne),o.addEventListener("dblclick",w=>{w.target.closest(".diagram-modal-bar")||N(m>=2.5?1/m:1.6,w.clientX,w.clientY)}),window.addEventListener("keydown",w=>{if(a.hidden)return;const A=(I,P)=>{v+=I,g+=P,M()};if(w.key==="Escape"){w.preventDefault(),w.stopPropagation(),Y();return}w.key==="+"||w.key==="="?(w.preventDefault(),w.stopPropagation(),N(1.25)):w.key==="-"||w.key==="_"?(w.preventDefault(),w.stopPropagation(),N(1/1.25)):w.key==="0"?(w.preventDefault(),w.stopPropagation(),B()):w.key==="1"||w.key==="f"||w.key==="F"?(w.preventDefault(),w.stopPropagation(),O()):w.key==="ArrowLeft"?(w.preventDefault(),w.stopPropagation(),A(48,0)):w.key==="ArrowRight"?(w.preventDefault(),w.stopPropagation(),A(-48,0)):w.key==="ArrowUp"?(w.preventDefault(),w.stopPropagation(),A(0,48)):w.key==="ArrowDown"&&(w.preventDefault(),w.stopPropagation(),A(0,-48))},!0);let G=await i.load();const{saveTarget:ie,compact:Q,restrictAssets:X}=i.capabilities,j=K5(i.assetBase,X);document.documentElement.classList.toggle("ink-sidebar",!!Q),e.setAttribute("role","status");let le,fe=G.md,Ue=Promise.resolve(),Ze=0,_e=null;const Xe=()=>G.writable===!1,ht=(w,A)=>{e.dataset.state=w,e.textContent=A};let st=0;const Ie=w=>{t.textContent=w,t.hidden=!1,clearTimeout(st),st=window.setTimeout(()=>t.hidden=!0,4e3)},xt=await E4(i,Ie);async function J(w,A){const I=v4(w,G.name),{root:P,...se}=I;le=se;const ce=[],ye=De=>(ce.push(De.md),De.children.forEach(ye));return ye(P),await j.preload(ce),Nd(P,A)}const ke=w=>{var A;return w.startsWith(`---
|
|
638
|
+
`)?((A=w.match(/^---\n[\s\S]*?\n---\n/))==null?void 0:A[0])??"":""};function Di(w){const A=ke(w),I=Vo.find(P=>P.id===kh(A,"layout"));return I&&(!I.pro||xt.isPro())?I.id:/^\s*layout:\s*["']?(two-sided|mindMap)/m.test(A)?"mindMap":"logicalStructure"}function Kt(w){const A=fa.find(I=>I.id===kh(ke(w),"theme"));return A&&(!A.pro||xt.isPro())?A:fa[0]}const Zt=w=>{var A;return((A=w.match(/^---\n[\s\S]*?^title:\s*["']?(.+?)["']?\s*$/m))==null?void 0:A[1])??G.name};let Tt=Zt(G.md);document.title=`${Tt} · Inkmap`;let ct=Kt(G.md);Rc(ct);const Qt=(hs=G.viewState)==null?void 0:hs.folds;let Pt=(Er=G.viewState)==null?void 0:Er.view,Jt=!1,ze,ai=!1;i.onExternalChange(w=>{ai||(ze=w)});const Re=Te("#map"),Gt=new Set,Qe=Re.getBoundingClientRect.bind(Re);let Et=!1;{const w=Qe();Et=w.width>=160&&w.height>=160}Re.getBoundingClientRect=()=>{const w=Qe();if(w.width>=160&&w.height>=160)return w;const A=window.innerWidth>=160?window.innerWidth:960,I=window.innerHeight>=160?window.innerHeight:720;return new DOMRect(0,0,A,I)};const Vi=await J(G.md,(w,A)=>A===0?!0:(Qt==null?void 0:Qt[w.join("\0")])??A<Dc);{const w=Qe();w.width>=160&&w.height>=160&&(Et=!0)}document.body.tabIndex=-1,document.body.style.outline="none";const dt=Te("#node-menu"),oi=Te("#export-menu");let U=[];const re=()=>{dt.hidden=!0,oi.hidden=!0,U=[]},Ne=w=>{if(!(w instanceof Element)||w.classList.contains("smm-node-edit-wrap"))return!1;const A=w.tagName;return A==="INPUT"||A==="TEXTAREA"||A==="SELECT"||A==="BUTTON"||A==="A"?!0:w.isContentEditable===!0},D=new j1({el:Re,readonly:Xe(),data:Vi,layout:Di(G.md),fit:!Pt,nodeTextEditZIndex:5,enableShortcutOnlyWhenMouseInSvg:!1,enableAutoEnterTextEditWhenKeydown:!0,customCheckEnableShortcut:w=>{if(!a.hidden||document.documentElement.classList.contains("presenting"))return!1;const A=document.getElementById("upgrade");if(A&&!A.hidden)return!1;const I=document.getElementById("account-panel");return!(I&&!I.hidden||Ne(w.target)||Ne(document.activeElement))},beforeShortcutRun:()=>(re(),!1),defaultInsertSecondLevelNodeText:te("newTopic"),defaultInsertBelowSecondLevelNodeText:te("newTopic"),isShowCreateChildBtnIcon:!1,isUseCustomNodeContent:!0,customCreateNodeContent(w){const A=w.getData();if(!A.rich)return null;const I=document.createElement("div");return I.className=`ink-node depth-${Math.min(w.layerIndex,2)}`,I.innerHTML=j.render(A.md),I.querySelectorAll(".ink-diagram-viewport").forEach(P=>{P.addEventListener("wheel",se=>{if(se.ctrlKey||se.metaKey)return;const ce=P.scrollHeight>P.clientHeight+1,ye=P.scrollWidth>P.clientWidth+1;if(!ce&&!ye)return;const De=P.scrollTop<=0&&se.deltaY<0,pe=P.scrollTop+P.clientHeight>=P.scrollHeight-1&&se.deltaY>0,at=P.scrollLeft<=0&&se.deltaX<0,ut=P.scrollLeft+P.clientWidth>=P.scrollWidth-1&&se.deltaX>0;(ce&&!(De||pe)||ye&&!(at||ut))&&se.stopPropagation()},{passive:!0})}),I.querySelectorAll(".ink-diagram-image").forEach(P=>{var se;P.dataset.trackedRender||(P.dataset.trackedRender="1",(se=i.track)==null||se.call(i,"diagram_render")),P.addEventListener("pointerdown",ce=>ce.stopPropagation()),P.addEventListener("click",ce=>{ce.stopPropagation(),$(P)})}),I.querySelectorAll(".ink-diagram-zoom").forEach(P=>{P.textContent=te("zoomDiagram"),P.addEventListener("pointerdown",se=>se.stopPropagation()),P.addEventListener("click",se=>{var ye;se.stopPropagation();const ce=(ye=P.closest(".ink-diagram"))==null?void 0:ye.querySelector(".ink-diagram-image");ce&&$(ce)})}),I.querySelectorAll(".ink-diagram-edit").forEach((P,se)=>{var ye,De;const ce=!!((De=(ye=P.parentElement)==null?void 0:ye.parentElement)!=null&&De.querySelector(".ink-diagram-error"));ce&&Qe().width>0&&!Gt.has(A.md)&&(Gt.add(A.md),j.preload([A.md]).then(()=>{D.reRender()})),P.hidden=Xe(),P.textContent=te(ce?"diagramInvalid":"editDiagram"),P.addEventListener("pointerdown",pe=>pe.stopPropagation()),P.addEventListener("click",pe=>{var mt;pe.stopPropagation(),fr(w);const ut=[...r.value.matchAll(/^ {0,3}(`{3,}|~{3,})[ ]*mermaid[ ]*$/gim)][se];if((ut==null?void 0:ut.index)!==void 0){const en=ut.index+ut[0].length+1,bn=(mt=new RegExp("^ {0,3}"+ut[1][0]+"{"+ut[1].length+",}[ ]*$","m").exec(r.value.slice(en)))==null?void 0:mt.index;r.setSelectionRange(en,bn===void 0?r.value.length:en+bn)}})}),I},themeConfig:_c(ct),expandBtnStyle:{color:ct.palette.line,fill:ct.palette.card,fontSize:12,strokeColor:ct.palette.line},exportPaddingX:Ic,exportPaddingY:Ic,handleBeingExportSvg:w=>(w.node.querySelectorAll(".ink-diagram-bar, .ink-diagram-edit").forEach(A=>A.remove()),w.node.querySelectorAll(".ink-diagram-viewport").forEach(A=>{A.style.maxHeight="none",A.style.maxWidth="none",A.style.overflow="visible"}),w.node.insertAdjacentHTML("afterbegin",`<style>${so()}</style>`),w),demonstrateConfig:{boxShadowColor:"rgba(0, 0, 0, 0.75)",borderColor:ct.palette.line,padding:24,margin:60}}),de=()=>bh(ia(le,D.getData(!1)));let Ce=de();const je=()=>{if(Xe())return te("readOnly");switch(ie){case"copy":return te("savedInCopy");case"file":return te("saved");case"editor":return te("synced")}};ht("saved",je());function Ct(){clearTimeout(Ze),!Xe()&&de()!==Ce&&(ht("pending",te("pending")),Ze=window.setTimeout(()=>Ue=Ue.then(wi),i7))}async function wi(){if(Xe())return;const w=de();if(w===Ce)return ht("saved",je());ht("saving",te("saving"));try{const A=await i.save(w,G.version);A.ok?(fe=w,Ce=w,G={...G,md:w,version:A.version},de()===Ce?ht("saved",je()):Ct()):(await xn(A.doc),Ie(te("conflict")))}catch(A){ht("error",te("saveFailed")),Ie(String(A instanceof Error?A.message:A))}}async function vn(){clearTimeout(Ze),Ze=0,await(Ue=Ue.then(wi))}async function Ni(w,A){var se;Bi(!1),Tt=Zt(w),document.title=`${Tt} · Inkmap`;const I=Ad(D.getData(!1)),P=await J(w,(ce,ye)=>I.get(ce.join("\0"))??ye<Dc);ji(),D.updateData(P),rs(w),A&&((se=i.onMapMarkdownChange)==null||se.call(i,de()),Ct())}async function xn(w){if(w.name===G.name&&w.md===fe&&w.writable===G.writable){G=w;return}G=w,fe=w.md,D.setMode(Xe()?"readonly":"edit"),await Ni(w.md,!1),Ce=de(),clearTimeout(Ze),ht("saved",je())}if(ai=!0,ze){const w=ze;ze=void 0,Ue=Ue.then(()=>xn(w)).catch(()=>{})}D.on("data_change",()=>{var w;(w=i.onMapMarkdownChange)==null||w.call(i,de()),Ct()}),i.onExternalChange(w=>{const A=w.name!==G.name;A&&clearTimeout(Ze),Ue=Ue.then(async()=>{const I=!A&&de()!==Ce&&w.md!==fe;await xn(w),I&&Ie(te("conflict"))}).catch(I=>Ie(String(I instanceof Error?I.message:I)))});const yn=new WeakMap;async function Bn(w,A){const I={};yn.set(w,I),await j.preload([A]),yn.get(w)===I&&D.renderer.setNodeDataRender(w,w0(A))}D.on("hide_text_edit",(w,A,I)=>{const P=String((I==null?void 0:I.getData("text"))??"");I&&Cd(P)&&Bn(I,P),li()});function fr(w,A=!0){_e=w,n.hidden=!1,r.value=_i(w.getData()),r.readOnly=Xe(),A&&r.focus()}function ji(){_e=null,n.hidden=!0,r.blur(),li()}const Ii=new WeakMap;r.addEventListener("input",()=>{const w=_e;if(!w)return;clearTimeout(Ii.get(w)),yn.delete(w);const A=r.value.replace(/\n+$/,"");Ii.set(w,window.setTimeout(()=>void Bn(w,A),250))}),r.addEventListener("keydown",w=>{w.key==="Escape"&&ji()});let Ki=null,ei="",Oi=!1;function bi(){if(!Ki)return;const w=Ki.group.node;if(!w.isConnected)return Bi(!1);const A=w.getBoundingClientRect(),I=Math.max(1,innerWidth-16),P=Math.max(36,innerHeight-24),se=Math.min(I,Math.max(A.width,180)),ce=ei.includes(`
|
|
639
639
|
`)||s.value.includes(`
|
|
640
|
-
`);s.style.width=`${
|
|
641
|
-
`)||s.value.length>80){const I=s.value.length;s.setSelectionRange(I,I)}else s.select()}function Bi(w){const A=Ki;if(!A)return;Ki=null,s.hidden=!0;const I=s.value.replace(/\n+$/,""),P=Oi?I.replace(/^(\d+)([.)])(?=\s)/,"$1\\$2"):I;w&&!Xe()&&P!==ei&&(clearTimeout(Ii.get(A)),
|
|
640
|
+
`);s.style.width=`${se}px`,s.style.height="auto";const ye=Math.max(A.height,s.scrollHeight+2,ce?88:34),De=Math.min(P,ye);s.style.height=`${De}px`,s.style.left=`${Math.max(8,Math.min(A.left,innerWidth-se-8))}px`,s.style.top=`${Math.max(8,Math.min(A.top,innerHeight-De-8))}px`}function Pn(w){if(!w||Xe())return;Bi(!0);const A=_e===w?r.value:_i(w.getData());if(ji(),Ki=w,ei=_i(w.getData()),Oi=/^\d+\\[.)]\s/.test(A),s.value=Oi?A.replace(/^(\d+)\\([.)])/,"$1$2"):A,s.setAttribute("aria-label",te("editNode")),s.hidden=!1,bi(),s.focus({preventScroll:!0}),ei.includes(`
|
|
641
|
+
`)||s.value.length>80){const I=s.value.length;s.setSelectionRange(I,I)}else s.select()}function Bi(w){const A=Ki;if(!A)return;Ki=null,s.hidden=!0;const I=s.value.replace(/\n+$/,""),P=Oi?I.replace(/^(\d+)([.)])(?=\s)/,"$1\\$2"):I;w&&!Xe()&&P!==ei&&(clearTimeout(Ii.get(A)),Bn(A,P)),li()}s.addEventListener("blur",()=>Bi(!0)),s.addEventListener("input",bi),s.addEventListener("keydown",w=>{if(w.stopPropagation(),w.isComposing)return;const A=ei.includes(`
|
|
642
642
|
`)||s.value.includes(`
|
|
643
|
-
`),I=w.key==="Enter"&&(w.metaKey||w.ctrlKey||!w.shiftKey&&!A)||w.key==="Tab"&&!A;(I||w.key==="Escape")&&(w.preventDefault(),Bi(I))});for(const w of["scale","translate","node_tree_render_end"])D.on(w,
|
|
643
|
+
`),I=w.key==="Enter"&&(w.metaKey||w.ctrlKey||!w.shiftKey&&!A)||w.key==="Tab"&&!A;(I||w.key==="Escape")&&(w.preventDefault(),Bi(I))});for(const w of["scale","translate","node_tree_render_end"])D.on(w,bi);window.addEventListener("resize",bi),D.on("node_dblclick",w=>{!w.getData("rich")||Xe()||Pn(w)}),D.on("node_active",(w,A)=>{n.hidden||(A.length===1?fr(A[0],!1):r.value="")});async function Gs(w,A){if(Xe())return 0;const I=D.getData(!1);let P=0;const se=ce=>{if(!A||ce.data.uid===A){const ye=w(_i(ce.data));ye!==null&&ye!==_i(ce.data)&&(Object.assign(ce.data,w0(ye)),P++)}(ce.children??[]).forEach(se)};return se(I),P&&await Ni(bh(ia(le,I)),!0),P}function Jr(){const w=new Map,{lines:A}=v0(ia(le,D.getData(!1),w)),I=new Map;for(const[P,se]of A){const ce=w.get(P);ce&&I.set(ce,se)}return I}let pr=!1;const li=()=>{var A;const w=document.activeElement;if(w&&w!==document.body&&!w.classList.contains("smm-node-edit-wrap")&&w!==s&&typeof w.blur=="function"&&w.blur(),document.activeElement!==s&&!((A=document.activeElement)!=null&&A.classList.contains("smm-node-edit-wrap")))try{window.focus(),document.body.focus({preventScroll:!0})}catch{}};D.on("node_mousedown",li),D.on("svg_mousedown",li),i.select&&D.on("node_click",w=>{if(li(),pr)return;const A=Jr().get(w.getData("uid"));if(A!==void 0){const I=es([w]);i.select(A,(I==null?void 0:I.endLine)??A)}}),(qn=i.onReveal)==null||qn.call(i,w=>{let A,I=-1;for(const[se,ce]of Jr())ce<=w&&ce>I&&([A,I]=[se,ce]);if(!A)return;const P=A;D.renderer.expandToNodeUid(P,()=>{var ce;const se=D.renderer.findNodeByUid(P);se&&(pr=!0,((ce=D.renderer.activeNodeList[0])==null?void 0:ce.getData("uid"))!==P&&(D.renderer.clearActiveNodeList(),se.active()),pr=!1,D.resize(),D.renderer.moveNodeToCenter(se,!1))})});const mr=()=>{const w=D.renderer.activeNodeList;n.hidden?w.length===1?fr(w[0]):Ie(te("selectNode")):ji()};D.keyCommand.addShortcut("Control+e",mr),D.keyCommand.addShortcut("F2",()=>{const w=D.renderer.activeNodeList;w.length===1&&w[0].getData("rich")&&Pn(w[0])}),D.keyCommand.addShortcut("Enter",()=>{var A,I;const w=D.renderer.activeNodeList;!((I=(A=D.renderer.textEdit)==null?void 0:A.isShowTextEdit)!=null&&I.call(A))&&w.length===1&&w[0].isRoot&&D.execCommand("INSERT_CHILD_NODE")}),D.keyCommand.addShortcut("Alt+Up",()=>D.execCommand("UP_NODE")),D.keyCommand.addShortcut("Alt+Down",()=>D.execCommand("DOWN_NODE"));const hi=(w=D.renderer.activeNodeList)=>{if(!w.length)return Ie(te("selectNode"));w.forEach(A=>D.execCommand("EXPAND_ALL",A.getData("uid")))};D.keyCommand.addShortcut("Shift+/",()=>hi()),D.keyCommand.unBindEvent();const Zi=w=>{var A,I,P,se,ce,ye,De;if((w.metaKey||w.ctrlKey)&&!w.altKey&&!w.shiftKey&&w.key.toLowerCase()==="s"){w.preventDefault(),w.stopImmediatePropagation(),(async()=>{var pe,at,ut,mt;s.hidden||Bi(!0),(ut=(at=(pe=D.renderer)==null?void 0:pe.textEdit)==null?void 0:at.isShowTextEdit)!=null&&ut.call(at)&&D.renderer.textEdit.hideEditTextBox(),!n.hidden&&_e&&Ii.has(_e)&&(clearTimeout(Ii.get(_e)),Ii.delete(_e),await Bn(_e,r.value.replace(/\n+$/,""))),await((mt=i.flushPendingEdits)==null?void 0:mt.call(i)),await vn(),Ie(G.name?`${je()} · ${G.name}`:je())})();return}if(!w.isComposing){if(!s.hidden&&(w.target===s||document.activeElement===s)){const pe=ei.includes(`
|
|
644
644
|
`)||s.value.includes(`
|
|
645
|
-
`),at=w.key==="Enter"&&(w.metaKey||w.ctrlKey||!w.shiftKey&&!
|
|
646
|
-
`).length-1;let
|
|
647
|
-
`).length-1)}return De<0?null:{startLine:
|
|
648
|
-
${A}`}async function ao(w){var I;if(
|
|
645
|
+
`),at=w.key==="Enter"&&(w.metaKey||w.ctrlKey||!w.shiftKey&&!pe)||w.key==="Tab"&&!pe;(at||w.key==="Escape")&&(w.preventDefault(),w.stopImmediatePropagation(),Bi(at));return}if((P=(I=(A=D.renderer)==null?void 0:A.textEdit)==null?void 0:I.isShowTextEdit)!=null&&P.call(I)&&w.key==="Escape"){w.preventDefault(),w.stopImmediatePropagation(),D.renderer.textEdit.hideEditTextBox(),li();return}if(D.keyCommand.onKeydown(w),!w.defaultPrevented&&((ce=(se=D.opt).customCheckEnableShortcut)!=null&&ce.call(se,w))){const pe=D.renderer.activeNodeList;pe.length===1&&pe[0].getData("rich")&&((De=(ye=D.renderer.textEdit)==null?void 0:ye.checkIsAutoEnterTextEditKey)!=null&&De.call(ye,w))&&(w.preventDefault(),w.stopPropagation(),Pn(pe[0]))}}};window.addEventListener("keydown",Zi,!0),D.on("beforeDestroy",()=>window.removeEventListener("keydown",Zi,!0)),D.on("node_contextmenu",(w,A)=>{w.preventDefault(),li();const I=D.renderer.activeNodeList;U=I.includes(A)?[...I]:[A];const P=U.every(ce=>ce==null?void 0:ce.isRoot),se=Xe();Te("#menu-insert-child").hidden=se,Te("#menu-insert-sibling").hidden=se||P,Te("#menu-insert-parent").hidden=se||P,Te("#menu-move-up").hidden=se||P,Te("#menu-move-down").hidden=se||P,Te("#menu-remove-node").hidden=se||P,dt.hidden=!1,dt.style.left=`${Math.min(w.clientX,innerWidth-dt.offsetWidth-8)}px`,dt.style.top=`${Math.min(w.clientY,innerHeight-dt.offsetHeight-8)}px`}),window.addEventListener("pointerdown",w=>{const A=w.target;!dt.contains(A)&&!oi.parentElement.contains(A)&&re()},!0),window.addEventListener("keydown",w=>w.key==="Escape"&&re()),D.on("scale",re),D.on("translate",re);const Ft=Te("#chat-add"),Fn=Te("#menu-add-to-chat"),no=await((Mr=i.canAddToChat)==null?void 0:Mr.call(i))===!0,Hn=/Mac|iPhone|iPad/.test(navigator.platform),gr=Hn?"⌘L":"Ctrl+L";Te("#menu-source-kbd").textContent=Hn?"⌘E":"Ctrl+E",Te("#menu-up-kbd").textContent=Hn?"⌘↑":"Ctrl+↑",Te("#menu-down-kbd").textContent=Hn?"⌘↓":"Ctrl+↓",Ft.innerHTML=`<span>${te("addToChat")}</span><kbd>${gr}</kbd>`,Ft.title=te("addToChatTitle"),Fn.innerHTML=`<span>${te("addToChat")}</span><kbd>${gr}</kbd>`;function es(w){const A=new Set(w.map(pe=>pe.getData("uid"))),I=new Map,{md:P,lines:se}=v0(ia(le,D.getData(!1),I)),ce=P.replace(/\n$/,"").split(`
|
|
646
|
+
`).length-1;let ye=1/0,De=-1;for(const[pe,at]of se){if(!A.has(I.get(pe)))continue;const ut=le.syntheticRoot&&pe===se.keys().next().value;ye=Math.min(ye,ut?0:at),De=Math.max(De,ut?ce:at+pe.md.split(`
|
|
647
|
+
`).length-1)}return De<0?null:{startLine:ye,endLine:Math.min(De,ce)}}function vr(){var A;const w=document.activeElement;if(!n.hidden&&_e&&w===r&&r.selectionStart!==r.selectionEnd){const I=r.value.slice(r.selectionStart,r.selectionEnd),P=Te(".source-head button").getBoundingClientRect();return I.trim()?{node:_e,text:I,anchorRight:P.left-6,anchorY:(P.top+P.bottom)/2,outer:{left:P.left-6,right:P.left-6,top:P.top,bottom:P.bottom},inHeader:!0}:null}if(w!=null&&w.classList.contains("smm-node-edit-wrap")){const I=getSelection(),P=D.renderer.activeNodeList[0],se=I&&!I.isCollapsed?I.toString():"";if(P&&se.trim()){const ce=I.getRangeAt(0).getBoundingClientRect(),ye=w.getBoundingClientRect(),De=(A=P.group)==null?void 0:A.node.getBoundingClientRect(),pe={left:De?Math.min(De.left,ye.left):ye.left,right:De?Math.max(De.right,ye.right):ye.right,top:De?Math.min(De.top,ye.top):ye.top,bottom:De?Math.max(De.bottom,ye.bottom):ye.bottom};return{node:P,text:se,anchorRight:ce.width>0?ce.right:pe.right,anchorY:ce.height>0?(ce.top+ce.bottom)/2:(pe.top+pe.bottom)/2,outer:pe}}}return null}async function ts(w){re();const A=w?null:vr();if(w??(w=A?[A.node]:[...D.renderer.activeNodeList]),!w.length)return i.addToChat();if(clearTimeout(Ze),await(Ue=Ue.then(wi)),e.dataset.state!=="saved")return;const I=es(w);I&&i.addToChat({...I,...A&&{text:A.text}})}function Qi(w){const A=[],I=Qe(),P=I.width>=160?I.left:0,se=I.width>=160?I.right:innerWidth,ce=I.height>=160?I.top:0,ye=I.height>=160?I.bottom:innerHeight,De=pe=>{var at,ut;if(pe){if(!w.has(pe)){const mt=(at=pe.group)==null?void 0:at.node.getBoundingClientRect();mt&&mt.width>0&&mt.bottom>ce&&mt.top<ye&&mt.right>P&&mt.left<se&&A.push(mt)}((ut=pe.getData)==null?void 0:ut.call(pe,"expand"))!==!1&&(pe.children??[]).forEach(De)}};return De(D.renderer.root),A}const qs=(w,A)=>Math.max(0,Math.min(w.right,A.right)-Math.max(w.left,A.left))*Math.max(0,Math.min(w.bottom,A.bottom)-Math.max(w.top,A.top)),is=()=>document.documentElement.classList.contains("presenting");let tt=0;function Li(){cancelAnimationFrame(tt),tt=requestAnimationFrame(()=>{var Cr;const w=()=>void(Ft.hidden=!0);if(is())return w();const A=Te("#bar").getBoundingClientRect(),I=A.bottom+6;Ft.hidden=!1;const{offsetWidth:P,offsetHeight:se}=Ft,ce=Oe=>Math.max(8,Math.min(Oe,innerWidth-P-8)),ye=Oe=>Math.max(I,Math.min(Oe,innerHeight-se-8)),De=(Oe,tn,q,T)=>{const _=Qi(T);n.hidden||_.push(n.getBoundingClientRect()),Te("#search").hidden||_.push(Te("#search").getBoundingClientRect());const H=[[tn-P,Oe.top-se-5],[Oe.right-P,Oe.top-se-5],[tn-P,Oe.bottom+5],[Oe.right-P,Oe.bottom+5],[Oe.right+8,q-se/2],[Oe.left-P-8,q-se/2]];let F=null,ue=1/0;for(const[gt,Ti]of H){const Mt=ce(gt),Nt=ye(Ti),nn={left:Mt,right:Mt+P,top:Nt,bottom:Nt+se},Ht=qs(nn,Oe),Ys=_.reduce((Z1,Q1)=>Z1+qs(nn,Q1),0),lo=Ht*100+Ys;if(lo<ue&&(F=[Mt,Nt],ue=lo,lo===0))break}const[ve,Se]=F??[ce(Oe.right-P),ye(Oe.top-se-5)];Ft.style.left=`${ve}px`,Ft.style.top=`${Se}px`},pe=vr();if(pe){if(pe.inHeader){Ft.style.left=`${ce(pe.anchorRight-P)}px`,Ft.style.top=`${Math.max(8,pe.outer.top+(pe.outer.bottom-pe.outer.top-se)/2)}px`;return}return De(pe.outer,pe.anchorRight,pe.anchorY,new Set([pe.node]))}if((Cr=document.activeElement)!=null&&Cr.classList.contains("smm-node-edit-wrap"))return w();const at=D.renderer.activeNodeList,mt=at.map(Oe=>{var tn;return(tn=Oe.group)==null?void 0:tn.node.getBoundingClientRect()}).filter(Oe=>Oe&&Oe.width>0),en=Math.min(...mt.map(Oe=>Oe.left)),Sr=Math.max(...mt.map(Oe=>Oe.right)),bn=Math.min(...mt.map(Oe=>Oe.top)),zr=Math.max(...mt.map(Oe=>Oe.bottom));if(!mt.length||zr<A.bottom||bn>innerHeight||Sr<0||en>innerWidth)return w();De({left:en,right:Sr,top:bn,bottom:zr},Sr,(bn+zr)/2,new Set(at))})}if(no){Fn.hidden=!1;for(const w of["node_active","node_tree_render_end","scale","translate","expand_btn_click","node_dragend","exit_demonstrate","before_show_text_edit","hide_text_edit"])D.on(w,Li);D.on("node_dragging",()=>Ft.hidden=!0),window.addEventListener("resize",Li),document.addEventListener("selectionchange",Li);for(const w of["select","keyup","mouseup","blur"])r.addEventListener(w,Li);Ft.addEventListener("mousedown",w=>(w.stopPropagation(),w.preventDefault())),Ft.addEventListener("click",w=>{w.stopPropagation(),ts()}),Fn.addEventListener("click",()=>ts(U)),(cs=i.onChatRequest)==null||cs.call(i,()=>ts())}const xr=Te("#layout-select"),Un=Te("#theme-select"),wn=()=>{xr.innerHTML=Vo.map(w=>`<option value="${w.id}">${te(e7(w.id))}</option>`).join(""),Un.innerHTML=fa.map(w=>`<option value="${w.id}">${te(t7(w.id))}</option>`).join(""),xr.value=D.getLayout(),Un.value=ct.id};function ns(w){ct=w,Rc(ct),D.updateConfig({expandBtnStyle:{color:ct.palette.line,fill:ct.palette.card,fontSize:12,strokeColor:ct.palette.line}}),D.setThemeConfig(_c(ct))}function rs(w){const A=Di(w);A!==D.getLayout()&&D.setLayout(A);const I=Kt(w);I.id!==ct.id&&ns(I),wn()}function Ws(w,A){var I;Xe()||(le={...le,frontMatter:x4(le.frontMatter,w,A)},(I=i.onMapMarkdownChange)==null||I.call(i,de()),Ct())}xr.addEventListener("change",()=>{var A;const w=Vo.find(I=>I.id===xr.value);if(w.pro&&!xt.allow("layouts"))return wn();(A=i.track)==null||A.call(i,"feature_layouts"),D.setLayout(w.id),Ws("layout",w.id),setTimeout(()=>D.view.fit(),200)}),Un.addEventListener("change",()=>{var A;const w=fa.find(I=>I.id===Un.value);if(w.pro&&!xt.allow("themes"))return wn();(A=i.track)==null||A.call(i,"feature_themes"),ns(w),Ws("theme",w.id)}),xt.onChange(()=>rs(de())),wn();const ro=u4.replace(/@font-face\{[^}]*\}/g,"");function so(){const w=getComputedStyle(document.documentElement),A=Rd.replace(/var\((--[\w-]+),\s*([^()]+)\)/g,(I,P,se)=>w.getPropertyValue(P).trim()||se);return`${ro}
|
|
648
|
+
${A}`}async function ao(w){var I;if(re(),!xt.allow("export"))return;(I=i.track)==null||I.call(i,"feature_export");const A=Tt.replace(/[\\/:*?"<>|]+/g,"_");try{D.execCommand("CLEAR_ACTIVE_NODE");const P=await D.export(w,!1,A),se=`${A}.${w}`;await i.saveFile(se,P)&&Ie(te("exported",{name:se}))}catch(P){Ie(te("exportFailed",{error:String(P instanceof Error?P.message:P)}))}}const ci=Te("#present-bar"),ss=Te("#present-step"),Ji=Te("#present-prev"),ki=Te("#present-next"),yr=Te("#present-exit");async function as(){var w;if(xt.allow("present")){(w=i.track)==null||w.call(i,"feature_present"),re(),ji(),Gn.close(),document.documentElement.classList.add("presenting"),ci&&(ci.hidden=!1);try{await D.el.requestFullscreen()}catch{D.demonstrate._enter()}}}Ji==null||Ji.addEventListener("click",()=>{var w;return(w=D.demonstrate)==null?void 0:w.prev()}),ki==null||ki.addEventListener("click",()=>{var w;return(w=D.demonstrate)==null?void 0:w.next()}),yr==null||yr.addEventListener("click",()=>{var w;return(w=D.demonstrate)==null?void 0:w.exit()}),D.on("demonstrate_jump",(w,A)=>{ss&&(ss.textContent=`${w+1} / ${A}`),Ji&&(Ji.disabled=w<=0),ki&&(ki.disabled=w>=A-1)}),document.addEventListener("fullscreenchange",()=>{const w=D.demonstrate;document.fullscreenElement===D.el&&!w.isInDemonstrate?w._enter():!document.fullscreenElement&&w.isInDemonstrate&&w.exit()}),D.on("exit_demonstrate",()=>{document.documentElement.classList.remove("presenting"),ci&&(ci.hidden=!0)});let wr=0;const $n=()=>{cancelAnimationFrame(wr),wr=requestAnimationFrame(()=>{const{width:w,height:A}=Qe();if(!(w<160||A<160)){if(!Et){Et=!0,Gt.clear(),D.resize(),Ni(de(),!1).then(()=>{D.resize(),D.reRender(()=>{D.view.fit()})});return}D.resize(),Qi(new Set).length===0&&D.view.fit()}})};new ResizeObserver($n).observe(D.el),window.addEventListener("resize",$n),document.addEventListener("visibilitychange",$n);const Gn=J5({mindMap:D,pro:xt,showToast:Ie,rewrite:Gs,onReplace:()=>{var w;return(w=i.track)==null?void 0:w.call(i,"feature_replace")}}),os=Te("#bar");new ResizeObserver(()=>{const w=os.offsetHeight;w&&document.documentElement.style.setProperty("--toolbar-height",`${w}px`)}).observe(os),D.keyCommand.addShortcut("Control+f",()=>Gn.open());const Rt=(w,A)=>Te(w).addEventListener("click",I=>{A(),I.currentTarget.blur()});i.history?(D.keyCommand.removeShortcut("Control+z"),D.keyCommand.removeShortcut("Control+y"),D.keyCommand.addShortcut("Control+z",()=>i.history.undo()),D.keyCommand.addShortcut("Control+y|Control+Shift+z",()=>i.history.redo())):D.keyCommand.addShortcut("Control+Shift+z",()=>D.execCommand("FORWARD")),Rt("#undo",()=>i.history?i.history.undo():D.execCommand("BACK")),Rt("#redo",()=>i.history?i.history.redo():D.execCommand("FORWARD")),Rt("#fit",()=>{D.resize(),D.view.fit()}),Rt("#menu-insert-child",()=>{const w=U;re(),w.length&&D.execCommand("INSERT_CHILD_NODE",!0,w)}),Rt("#menu-insert-sibling",()=>{const w=U;re(),w.length&&D.execCommand("INSERT_NODE",!0,w)}),Rt("#menu-insert-parent",()=>{const w=U;re(),w.length&&D.execCommand("INSERT_PARENT_NODE",!0,w)}),Rt("#menu-move-up",()=>{re(),D.execCommand("UP_NODE")}),Rt("#menu-move-down",()=>{re(),D.execCommand("DOWN_NODE")}),Rt("#menu-remove-node",()=>{const w=U;re(),w.length&&D.execCommand("REMOVE_NODE",w)}),Rt("#menu-source",()=>{const w=U[0];re(),w&&Pn(w)}),Rt("#menu-expand-subtree",()=>{const w=U;re(),hi(w)}),Rt("#close-source",ji),Rt("#find",()=>Gn.isOpen()?Gn.close():Gn.open()),Rt("#export",()=>{xt.allow("export")&&(oi.hidden=!oi.hidden)}),document.querySelectorAll("[data-export]").forEach(w=>w.addEventListener("click",()=>ao(w.dataset.export))),Rt("#present",as);const br=Te("#level-select");br.addEventListener("change",()=>{const w=br.value;w==="all"?D.execCommand("EXPAND_ALL"):w&&D.execCommand("UNEXPAND_TO_LEVEL",Number(w)+1),br.value="",br.blur(),setTimeout(()=>D.view.fit(),300)});function oo(){const w=D.renderer.root,A=D.view.scale,I=w&&Number.isFinite(w.left)?{scale:A,dx:D.view.x+(w.left+w.width/2)*A-D.width/2,dy:D.view.y+(w.top+w.height/2)*A-D.height/2}:void 0;return{folds:_d(D.getData(!1)),...I&&{view:I}}}let kr=0;function Tr(){!Jt||!i.saveView||is()||(clearTimeout(kr),kr=0,i.saveView(oo()))}function ls(){!Jt||!i.saveView||is()||(clearTimeout(kr),kr=window.setTimeout(Tr,250))}return D.on("node_tree_render_end",()=>{if(Pt){const w=Pt;Pt=void 0;const A=D.renderer.root;A&&D.width>0&&D.height>0&&(D.view.scale=w.scale,D.view.x=D.width/2+w.dx-(A.left+A.width/2)*w.scale,D.view.y=D.height/2+w.dy-(A.top+A.height/2)*w.scale,D.view.transform(),Qi(new Set).length===0?D.view.fit():(D.emit("scale",w.scale),D.emit("translate"))),Jt=!0;return}if(!Jt){Jt=!0;return}ls()}),D.on("scale",ls),D.on("translate",ls),document.addEventListener("visibilitychange",()=>document.visibilityState==="hidden"&&Tr()),window.addEventListener("beforeunload",w=>{Tr(),e.dataset.state!=="saved"&&w.preventDefault()}),{mindMap:D,currentMarkdown:de,pro:xt,load:Ni,flushSave:vn}}function r7(i){return n7(i).then(e=>(window.inkmap=e,e))}function s7(i){const e=document.createElement("p");e.style.cssText=`padding:24px;font:14px ${xa}`,e.textContent=String(i instanceof Error?i.message:i),document.body.replaceChildren(e)}r7(uu()).catch(s7);export{Mm as _,o7 as c,vu as g,W5 as p};
|