@billtaofbj/mindmap 1.0.0
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/LICENSE +21 -0
- package/dist/AutoMove-B6piuV1l.mjs +21 -0
- package/dist/Base-B8xfItDp.mjs +289 -0
- package/dist/Drag-BNJqZaaB.mjs +458 -0
- package/dist/Export-C11gtER2.mjs +307 -0
- package/dist/Formula-rim6V3Ro.mjs +29081 -0
- package/dist/KeyboardNavigation-BznWjRqo.mjs +106 -0
- package/dist/MindMapNode-CKCds6wa.mjs +1865 -0
- package/dist/MiniMap-BtFFvLbR.mjs +98 -0
- package/dist/NodeImgAdjust-CU_ka96q.mjs +138 -0
- package/dist/OuterFrame-D-P0EKq5.mjs +325 -0
- package/dist/Painter-D3byksYq.mjs +42 -0
- package/dist/RainbowLines-CGp8BmNt.mjs +52 -0
- package/dist/Scrollbar-5bObtsl_.mjs +117 -0
- package/dist/Search-1GRF2dmm.mjs +124 -0
- package/dist/Select-CY_n5-r2.mjs +99 -0
- package/dist/Watermark-B-zBgHXG.mjs +88 -0
- package/dist/api-D2rfJWe_.mjs +16 -0
- package/dist/btns-Cf5zZK5X.mjs +9 -0
- package/dist/index.cjs.js +1515 -0
- package/dist/index.es.js +2745 -0
- package/dist/mindmap.css +2 -0
- package/dist/simple-mind-map-DFGmd5vc.mjs +3188 -0
- package/dist/utils-DjW7eJ1w.mjs +4295 -0
- package/package.json +26 -0
|
@@ -0,0 +1,1515 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t(require("vue"),require("@billtaofbj/core"),require("vue-router"),require("element-plus"),require("@element-plus/icons-vue"),require("axios"),require("yjs"),require("@hocuspocus/provider")):typeof define==`function`&&define.amd?define([`vue`,`@billtaofbj/core`,`vue-router`,`element-plus`,`@element-plus/icons-vue`,`axios`,`yjs`,`@hocuspocus/provider`],t):(e=typeof globalThis<`u`?globalThis:e||self,e.YourCompanyMindmap=t(e.Vue,e._billtaofbj_core,e.VueRouter,e.ElementPlus,e.ElementPlusIconsVue,e.axios,e.yjs,e._hocuspocus_provider))})(this,function(e,t,n,r,i,a,o,s){var c=Object.create,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,m=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g=(e,t)=>{let n={};for(var r in e)l(n,r,{get:e[r],enumerable:!0});return t||l(n,Symbol.toStringTag,{value:`Module`}),n},_=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=d(t),a=0,o=i.length,s;a<o;a++)s=i[a],!p.call(e,s)&&s!==n&&l(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=u(t,s))||r.enumerable});return e},v=(e,t,n)=>(n=e==null?{}:c(f(e)),_(t||!e||!e.__esModule?l(n,`default`,{value:e,enumerable:!0}):n,e));a=v(a,1),o=v(o,1);var y=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},b={class:`chat-header`},x={class:`chat-header-left`},S={class:`chat-title`},C={class:`online-users-list`},w={class:`online-user-item`},T={class:`online-user-name`},E={key:1},ee={class:`online-user-name`},te={class:`chat-header-right`},ne={key:0,class:`chat-empty`},re={class:`chat-empty-hint`},ie={key:1},ae={class:`message-content`},oe={key:0,class:`message-meta`},se={key:0,class:`message-mention`},D=[`innerHTML`],ce={class:`message-time`},le={key:1,class:`chat-message chat-message-ai`},ue={class:`message-avatar ai`},de={class:`chat-input-area`},fe={key:0,class:`mention-popup`},pe=[`onClick`,`onMouseenter`],me={key:1},he=y({__name:`AiChatPanel`,props:{visible:{type:Boolean,default:!1},messages:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},panelWidth:{type:Number,default:360},isCollab:{type:Boolean,default:!1},collabUsers:{type:Array,default:()=>[]},currentUser:{type:Object,default:()=>({id:``,name:``,color:``})},isOwner:{type:Boolean,default:!0},unreadMention:{type:Boolean,default:!1}},emits:[`send`,`close`,`clear`,`clear-unread`],setup(t,{emit:n}){let r=t,a=n,o=(0,e.ref)(``),s=(0,e.ref)(null),c=(0,e.ref)(null),l=(0,e.ref)(!1),u=(0,e.ref)([]),d=(0,e.ref)(0),f=``,p=-1,m={id:`ai-assistant`,name:`AI助手`,color:`#409EFF`,isAi:!0},h=(0,e.computed)(()=>{let e=r.currentUser.id,t=new Set;return[m,...r.collabUsers.filter(n=>{let r=n.clientId||n.id||``;if(r&&r===e)return!1;let i=String(r||n.name||``);return t.has(i)?!1:(t.add(i),!0)})]}),g=(0,e.computed)(()=>h.value.length+1),_=e=>e.role===`ai`?`chat-message-ai`:r.isCollab&&e.user_id&&e.user_id!==r.currentUser.id?`chat-message-other`:`chat-message-user`,v=e=>e.role===`ai`?{background:`linear-gradient(135deg, #409EFF, #337ECC)`}:{background:e.user_color||`#67C23A`},y=e=>(e.user_name||`U`).charAt(0),he=e=>{if(!r.isCollab)return;let t=typeof e==`string`?e:e.target?.value||o.value,n=t.length,i=t.lastIndexOf(`@`,n);if(i!==-1&&i<n){let e=t.slice(i+1,n);if(!e.includes(` `)&&!e.includes(`
|
|
2
|
+
`)){f=e,p=i,u.value=h.value.filter(t=>t.name&&t.name.toLowerCase().includes(e.toLowerCase())),l.value=u.value.length>0,d.value=0;return}}l.value=!1},ge=()=>{l.value&&(d.value=Math.min(d.value+1,u.value.length-1))},_e=()=>{l.value&&(d.value=Math.max(d.value-1,0))},ve=e=>{let t=o.value.slice(0,p),n=o.value.slice(p+f.length+1);o.value=`${t}@${e.name} ${n}`,l.value=!1},ye=e=>{if(e){if(e.shiftKey)return;if(l.value){let t=u.value[d.value];if(t){e.preventDefault(),ve(t);return}}e.preventDefault()}let t=o.value.trim();if(!t||r.loading)return;let n=null;if(r.isCollab){let e=t.match(/@(\S+)/);e&&(n=e[1])}a(`send`,t,{mentionedUser:n}),o.value=``,l.value=!1},be=()=>{(0,e.nextTick)(()=>{s.value&&(s.value.scrollTop=s.value.scrollHeight)})};return(0,e.watch)(()=>r.messages.length,be),(0,e.watch)(()=>r.messages,be,{deep:!0}),(n,r)=>{let f=(0,e.resolveComponent)(`el-icon`),p=(0,e.resolveComponent)(`el-tag`),m=(0,e.resolveComponent)(`el-popover`),be=(0,e.resolveComponent)(`el-button`),xe=(0,e.resolveComponent)(`el-input`);return t.visible?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:`ai-chat-panel`,style:(0,e.normalizeStyle)({width:t.panelWidth+`px`})},[(0,e.createElementVNode)(`div`,b,[(0,e.createElementVNode)(`div`,x,[(0,e.createVNode)(f,{size:18,color:`#409EFF`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1}),(0,e.createElementVNode)(`span`,S,(0,e.toDisplayString)(t.isCollab?`协作聊天`:`AI 助手`),1),t.isCollab?((0,e.openBlock)(),(0,e.createBlock)(m,{key:0,width:200,placement:`bottom-start`,trigger:`click`},{reference:(0,e.withCtx)(()=>[(0,e.createVNode)(p,{size:`small`,type:`success`,effect:`plain`,class:`online-tag`},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(g.value)+`人在线 `,1)]),_:1})]),default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,C,[(0,e.createElementVNode)(`div`,w,[(0,e.createElementVNode)(`div`,{class:`online-user-avatar`,style:(0,e.normalizeStyle)({background:t.currentUser.color||`#409EFF`})},(0,e.toDisplayString)((t.currentUser.name||`U`).charAt(0)),5),(0,e.createElementVNode)(`span`,T,(0,e.toDisplayString)(t.currentUser.name||`我`),1),(0,e.createVNode)(p,{size:`small`,type:t.isOwner?`warning`:`success`,effect:`plain`,class:`role-tag`},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(t.isOwner?`发起人`:`协作人`),1)]),_:1},8,[`type`]),r[4]||=(0,e.createElementVNode)(`span`,{class:`self-tag`},`(我)`,-1)]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(h.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id||t.clientId,class:`online-user-item`},[(0,e.createElementVNode)(`div`,{class:`online-user-avatar`,style:(0,e.normalizeStyle)({background:t.color||`#909399`})},[t.isAi?((0,e.openBlock)(),(0,e.createBlock)(f,{key:0,size:14},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1})):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,E,(0,e.toDisplayString)((t.name||`U`).charAt(0)),1))],4),(0,e.createElementVNode)(`span`,ee,(0,e.toDisplayString)(t.name||`未知用户`),1),t.isAi?((0,e.openBlock)(),(0,e.createBlock)(p,{key:0,size:`small`,type:`primary`,effect:`plain`,class:`role-tag`},{default:(0,e.withCtx)(()=>[...r[5]||=[(0,e.createTextVNode)(`AI助手`,-1)]]),_:1})):((0,e.openBlock)(),(0,e.createBlock)(p,{key:1,size:`small`,type:`success`,effect:`plain`,class:`role-tag`},{default:(0,e.withCtx)(()=>[...r[6]||=[(0,e.createTextVNode)(`协作人`,-1)]]),_:1}))]))),128))])]),_:1})):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`div`,te,[t.isCollab&&t.unreadMention?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:`mention-bell`,title:`有新消息`,onClick:r[0]||=e=>a(`clear-unread`)},[(0,e.createVNode)(f,{size:18,color:`#F56C6C`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Bell))]),_:1})])):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(be,{text:``,circle:``,size:`small`,onClick:r[1]||=e=>n.$emit(`clear`),title:`清空对话`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(f,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Delete))]),_:1})]),_:1}),(0,e.createVNode)(be,{text:``,circle:``,size:`small`,onClick:r[2]||=e=>n.$emit(`close`),title:`关闭`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(f,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Close))]),_:1})]),_:1})])]),(0,e.createElementVNode)(`div`,{class:`chat-messages`,ref_key:`messagesRef`,ref:s},[t.messages.length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ne,[(0,e.createVNode)(f,{size:40,color:`#c0c4cc`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1}),(0,e.createElementVNode)(`p`,null,(0,e.toDisplayString)(t.isCollab?`协作聊天室`:`你好!我是 AI 助手`),1),(0,e.createElementVNode)(`p`,re,(0,e.toDisplayString)(t.isCollab?`与团队成员和AI助手实时聊天`:`可以问我任何关于文档编辑的问题`),1)])):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.messages,n=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:n._msgId||n.time+n.content,class:(0,e.normalizeClass)([`chat-message`,_(n)])},[(0,e.createElementVNode)(`div`,{class:`message-avatar`,style:(0,e.normalizeStyle)(v(n))},[n.role===`ai`?((0,e.openBlock)(),(0,e.createBlock)(f,{key:0,size:16},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1})):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,ie,(0,e.toDisplayString)(y(n)),1))],4),(0,e.createElementVNode)(`div`,ae,[t.isCollab&&n.role===`user`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,oe,[(0,e.createElementVNode)(`span`,{class:`message-sender`,style:(0,e.normalizeStyle)({color:n.user_color||`#67C23A`})},(0,e.toDisplayString)(n.user_name||`用户`),5),n.mentioned_user?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,se,`@`+(0,e.toDisplayString)(n.mentioned_user),1)):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,{class:`message-text`,innerHTML:n.content},null,8,D),(0,e.createElementVNode)(`div`,ce,(0,e.toDisplayString)(n.time),1)])],2))),128)),t.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,le,[(0,e.createElementVNode)(`div`,ue,[(0,e.createVNode)(f,{size:16},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1})]),r[7]||=(0,e.createElementVNode)(`div`,{class:`message-content`},[(0,e.createElementVNode)(`div`,{class:`message-text typing-indicator`},[(0,e.createElementVNode)(`span`),(0,e.createElementVNode)(`span`),(0,e.createElementVNode)(`span`)])],-1)])):(0,e.createCommentVNode)(``,!0)],512),(0,e.createElementVNode)(`div`,de,[(0,e.createElementVNode)(`div`,{class:`chat-input-wrapper`,ref_key:`inputWrapperRef`,ref:c},[(0,e.createVNode)(xe,{modelValue:o.value,"onUpdate:modelValue":r[3]||=e=>o.value=e,type:`textarea`,autosize:{minRows:1,maxRows:4},placeholder:t.isCollab?`输入消息... @提及成员`:`输入消息...`,onKeydown:[(0,e.withKeys)((0,e.withModifiers)(ye,[`exact`]),[`enter`]),(0,e.withKeys)((0,e.withModifiers)(ge,[`prevent`]),[`down`]),(0,e.withKeys)((0,e.withModifiers)(_e,[`prevent`]),[`up`])],onInput:he,resize:`none`},null,8,[`modelValue`,`placeholder`,`onKeydown`]),l.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,fe,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(u.value,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id||t.clientId,class:(0,e.normalizeClass)([`mention-item`,{active:n===d.value}]),onClick:e=>ve(t),onMouseenter:e=>d.value=n},[(0,e.createElementVNode)(`div`,{class:`mention-avatar`,style:(0,e.normalizeStyle)({background:t.color||`#909399`})},[t.isAi?((0,e.openBlock)(),(0,e.createBlock)(f,{key:0,size:12},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1})):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,me,(0,e.toDisplayString)((t.name||`U`).charAt(0)),1))],4),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.name),1)],42,pe))),128))])):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(be,{class:`send-btn`,type:`primary`,circle:``,disabled:!o.value.trim()||t.loading,onClick:ye},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(f,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Promotion))]),_:1})]),_:1},8,[`disabled`])],512)])],4)):(0,e.createCommentVNode)(``,!0)}}},[[`__scopeId`,`data-v-01960100`]]);function ge(){let t=(0,e.ref)([]),n=(0,e.ref)(!1),r=(0,e.ref)(!1),i=(0,e.ref)([]),o=(0,e.ref)({id:``,name:``,color:``}),s=(0,e.ref)(!1),c=null,l=null,u=null,d=new Set,f=`/api/chat`,p=null,m=({ydoc:n,provider:a,onlineUsers:l})=>{if(n){r.value=!0,u=l,p&&p(),p=(0,e.watch)(u,e=>{i.value=Array.isArray(e)?e:[]},{immediate:!0,deep:!0});try{c=n.getArray(`chat-messages`),c.observe(e=>{try{e.changes.added.forEach(e=>{e.content.getContent().forEach(e=>{e&&e._msgId&&!d.has(e._msgId)&&(d.add(e._msgId),t.value=[...t.value,e],e.mentioned_user&&e.user_id!==o.value.id&&(s.value=!0))})})}catch(e){console.warn(`[useChat] Y.Array observer error:`,e)}})}catch(e){console.warn(`[useChat] Failed to create Y.Array:`,e)}}},h=e=>{o.value={...o.value,...e}},g=e=>{i.value=e||[]},_=()=>{let e=new Date;return`${e.getHours().toString().padStart(2,`0`)}:${e.getMinutes().toString().padStart(2,`0`)}`},v=async(n,i={})=>{let s={_msgId:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:`user`,content:n,time:_(),user_id:o.value.id,user_name:o.value.name,user_color:o.value.color,mentioned_user:i.mentionedUser||null};if(d.add(s._msgId),t.value=[...t.value,s],c&&(0,e.unref)(r))try{c.push([s])}catch(e){console.warn(`[useChat] Failed to push to Y.Array:`,e)}if(i.roomId)try{await a.default.post(f,{room_id:i.roomId,role:`user`,content:n,user_id:o.value.id,user_name:o.value.name,mentioned_user:i.mentionedUser||null})}catch(e){console.warn(`[useChat] Failed to persist message:`,e)}},y=async(n,i)=>{let o={_msgId:`msg-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,role:`ai`,content:n,time:_(),user_id:`ai-assistant`,user_name:`AI助手`};if(d.add(o._msgId),t.value=[...t.value,o],c&&(0,e.unref)(r))try{c.push([o])}catch(e){console.warn(`[useChat] Failed to push AI message to Y.Array:`,e)}if(i)try{await a.default.post(f,{room_id:i,role:`ai`,content:n,user_id:`ai-assistant`,user_name:`AI助手`})}catch(e){console.warn(`[useChat] Failed to persist AI message:`,e)}},b=async e=>{if(e)try{let n=await a.default.get(f,{params:{room_id:e}});if(Array.isArray(n.data)){let e=n.data.map(e=>({_msgId:e._msgId||`hist-${e.id||Date.now()}`,role:e.role,content:e.content,time:e.time||_(),user_id:e.user_id||``,user_name:e.user_name||``,user_color:e.user_color||``,mentioned_user:e.mentioned_user||null}));e.forEach(e=>d.add(e._msgId)),t.value=[...e,...t.value]}}catch(e){console.warn(`[useChat] Failed to load history:`,e)}},x=async e=>{if(t.value=[],d.clear(),e)try{await a.default.delete(f,{params:{room_id:e}})}catch(e){console.warn(`[useChat] Failed to clear messages on server:`,e)}},S=()=>{s.value=!1},C=()=>{if(p&&=(p(),null),c&&l){try{c.unobserve(l)}catch{}l=null}c=null,u=null,d.clear()};return(0,e.onUnmounted)(()=>C()),{messages:t,loading:n,isCollabMode:r,collabUsers:i,currentUser:o,unreadMention:s,setCollabContext:m,setCurrentUser:h,updateCollabUsers:g,sendMessage:v,sendAiMessage:y,loadHistory:b,clearMessages:x,clearUnreadMention:S,destroy:C}}var _e=`/api/document-versions`,ve=5e3,ye=()=>{let t=(0,e.ref)([]),n=(0,e.ref)(!1);return{versions:t,loading:n,saveVersion:async({documentId:e,docType:t,content:n,userId:r,userName:i})=>{if(!e||!t||!n)return null;try{let{data:o}=await a.default.post(_e,{document_id:e,doc_type:t,content:typeof n==`string`?n:JSON.stringify(n),user_id:r||null,user_name:i||null},{timeout:ve});return o}catch(e){return console.warn(`[useVersionHistory] Failed to save version:`,e),null}},loadVersions:async e=>{if(!e)return[];n.value=!0;try{let{data:n}=await a.default.get(_e,{params:{document_id:e},timeout:ve});return t.value=n,n}catch(e){return console.warn(`[useVersionHistory] Failed to load versions:`,e),t.value=[],[]}finally{n.value=!1}},getVersionContent:async e=>{try{let{data:t}=await a.default.get(`${_e}/${e}`,{timeout:ve});return t}catch(e){return console.warn(`[useVersionHistory] Failed to get version content:`,e),null}}}},be={class:`version-history-panel`},xe={key:0,class:`loading-state`},Se={key:1,class:`empty-state`},Ce={key:2,class:`version-list`},we={key:0,class:`current-version`},Te={class:`current-version-header`},Ee={class:`version-number`},De=[`onClick`],Oe={class:`version-number`},ke={class:`version-user`},Ae={class:`panel-footer`},je=y({__name:`VersionHistoryPanel`,props:{modelValue:{type:Boolean,default:!1},documentId:{type:[Number,String],default:null}},emits:[`update:modelValue`,`apply`],setup(t,{expose:n,emit:a}){let o=t,s=a,{versions:c,loading:l,loadVersions:u,getVersionContent:d}=ye(),f=(0,e.ref)(!1),p=(0,e.ref)(null),m=(0,e.ref)(!1),h=(0,e.ref)(null);(0,e.watch)(()=>o.modelValue,e=>{f.value=e,e&&o.documentId&&(p.value=null,u(o.documentId).then(e=>{e&&e.length>0&&(h.value=e[0])}))}),(0,e.watch)(f,e=>{s(`update:modelValue`,e)});let g=e=>{p.value=e},_=async()=>{if(p.value){m.value=!0;try{let e=await d(p.value.id);e&&e.content?(h.value=p.value,p.value=null,s(`apply`,e.content),r.ElMessage.success(`已切换到版本 v`+h.value.version_number)):r.ElMessage.error(`获取版本内容失败`)}finally{m.value=!1}}},v=()=>{f.value=!1},y=e=>{if(!e)return``;let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`};return n({currentVersion:h}),(t,n)=>{let r=(0,e.resolveComponent)(`el-icon`),a=(0,e.resolveComponent)(`el-tag`),o=(0,e.resolveComponent)(`el-timeline-item`),s=(0,e.resolveComponent)(`el-timeline`),u=(0,e.resolveComponent)(`el-button`),d=(0,e.resolveComponent)(`el-drawer`);return(0,e.openBlock)(),(0,e.createBlock)(d,{modelValue:f.value,"onUpdate:modelValue":n[0]||=e=>f.value=e,title:`更新履历`,direction:`rtl`,size:`420px`,"before-close":v},{footer:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,Ae,[(0,e.createVNode)(u,{type:`primary`,disabled:!p.value,loading:m.value,onClick:_},{default:(0,e.withCtx)(()=>[...n[4]||=[(0,e.createTextVNode)(` 切换到此版本 `,-1)]]),_:1},8,[`disabled`,`loading`])])]),default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,be,[(0,e.unref)(l)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,xe,[(0,e.createVNode)(r,{class:`is-loading`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Loading))]),_:1}),n[1]||=(0,e.createElementVNode)(`span`,null,`加载中...`,-1)])):(0,e.unref)(c).length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Se,[(0,e.createVNode)(r,{size:48,color:`#c0c4cc`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Clock))]),_:1}),n[2]||=(0,e.createElementVNode)(`p`,null,`暂无历史版本`,-1)])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ce,[h.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,we,[(0,e.createElementVNode)(`div`,Te,[(0,e.createVNode)(a,{type:`success`,size:`small`},{default:(0,e.withCtx)(()=>[...n[3]||=[(0,e.createTextVNode)(`当前版本`,-1)]]),_:1}),(0,e.createElementVNode)(`span`,Ee,`v`+(0,e.toDisplayString)(h.value.version_number),1)])])):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(s,null,{default:(0,e.withCtx)(()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(c),t=>((0,e.openBlock)(),(0,e.createBlock)(o,{key:t.id,timestamp:y(t.created_at),placement:`top`,type:p.value?.id===t.id?`primary`:``,hollow:p.value?.id!==t.id},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`version-item`,{active:p.value?.id===t.id}]),onClick:e=>g(t)},[(0,e.createElementVNode)(`span`,Oe,`版本号:v`+(0,e.toDisplayString)(t.version_number),1),(0,e.createElementVNode)(`span`,ke,`提交人:`+(0,e.toDisplayString)(t.user_name||`未知用户`),1)],10,De)]),_:2},1032,[`timestamp`,`type`,`hollow`]))),128))]),_:1})]))])]),_:1},8,[`modelValue`])}}},[[`__scopeId`,`data-v-87924b7c`]]),Me=[{label:`默认`,value:`default`,config:{}},{label:`海洋蓝`,value:`ocean`,config:{lineColor:`#1E90FF`,backgroundColor:`#F0F8FF`,root:{fillColor:`#1E90FF`,color:`#fff`,borderColor:`#1E90FF`},second:{fillColor:`#E3F2FD`,color:`#1565C0`,borderColor:`#1E90FF`},node:{color:`#333`}}},{label:`深海`,value:`deepSea`,config:{lineColor:`#003366`,backgroundColor:`#E6F3FF`,root:{fillColor:`#003366`,color:`#fff`,borderColor:`#003366`},second:{fillColor:`#E3F2FD`,color:`#0D47A1`,borderColor:`#006994`},node:{color:`#333`}}},{label:`珊瑚红`,value:`coral`,config:{lineColor:`#FF7F50`,backgroundColor:`#FFF5F5`,root:{fillColor:`#FF7F50`,color:`#fff`,borderColor:`#FF7F50`},second:{fillColor:`#FFEBEE`,color:`#C62828`,borderColor:`#FF6B6B`},node:{color:`#333`}}},{label:`薄荷绿`,value:`mint`,config:{lineColor:`#3EB489`,backgroundColor:`#F0FFF0`,root:{fillColor:`#3EB489`,color:`#fff`,borderColor:`#3EB489`},second:{fillColor:`#E8F5E9`,color:`#1B5E20`,borderColor:`#3EB489`},node:{color:`#333`}}},{label:`日落橙`,value:`sunset`,config:{lineColor:`#FF6B35`,backgroundColor:`#FFF8F0`,root:{fillColor:`#FF6B35`,color:`#fff`,borderColor:`#FF6B35`},second:{fillColor:`#FFF3E0`,color:`#E65100`,borderColor:`#F7931E`},node:{color:`#333`}}},{label:`晨曦金`,value:`dawn`,config:{lineColor:`#FFB347`,backgroundColor:`#FFFAF0`,root:{fillColor:`#FFB347`,color:`#fff`,borderColor:`#FFB347`},second:{fillColor:`#FFFDE7`,color:`#F57F17`,borderColor:`#FFCC33`},node:{color:`#333`}}},{label:`秋棕`,value:`autumn`,config:{lineColor:`#D2691E`,backgroundColor:`#FFF8DC`,root:{fillColor:`#D2691E`,color:`#fff`,borderColor:`#D2691E`},second:{fillColor:`#EFEBE9`,color:`#4E342E`,borderColor:`#CD853F`},node:{color:`#333`}}},{label:`琥珀`,value:`amber`,config:{lineColor:`#FFBF00`,backgroundColor:`#FFFFF0`,root:{fillColor:`#FFBF00`,color:`#333`,borderColor:`#FFBF00`},second:{fillColor:`#FFFDE7`,color:`#F57F17`,borderColor:`#FFD700`},node:{color:`#333`}}},{label:`森林绿`,value:`forest`,config:{lineColor:`#228B22`,backgroundColor:`#F0FFF0`,root:{fillColor:`#228B22`,color:`#fff`,borderColor:`#228B22`},second:{fillColor:`#E8F5E9`,color:`#1B5E20`,borderColor:`#32CD32`},node:{color:`#333`}}},{label:`翡翠`,value:`emerald`,config:{lineColor:`#50C878`,backgroundColor:`#F5FFFA`,root:{fillColor:`#50C878`,color:`#fff`,borderColor:`#50C878`},second:{fillColor:`#E8F5E9`,color:`#2E7D32`,borderColor:`#98FB98`},node:{color:`#333`}}},{label:`橄榄`,value:`olive`,config:{lineColor:`#808000`,backgroundColor:`#FAFAD2`,root:{fillColor:`#808000`,color:`#fff`,borderColor:`#808000`},second:{fillColor:`#F1F8E9`,color:`#33691E`,borderColor:`#9ACD32`},node:{color:`#333`}}},{label:`紫罗兰`,value:`violet`,config:{lineColor:`#8A2BE2`,backgroundColor:`#F8F0FF`,root:{fillColor:`#8A2BE2`,color:`#fff`,borderColor:`#8A2BE2`},second:{fillColor:`#F3E5F5`,color:`#6A1B9A`,borderColor:`#9370DB`},node:{color:`#333`}}},{label:`薰衣草`,value:`lavender`,config:{lineColor:`#9C27B0`,backgroundColor:`#FAF0FF`,root:{fillColor:`#9C27B0`,color:`#fff`,borderColor:`#9C27B0`},second:{fillColor:`#F3E5F5`,color:`#7B1FA2`,borderColor:`#CE93D8`},node:{color:`#333`}}},{label:`李子紫`,value:`plum`,config:{lineColor:`#8E4585`,backgroundColor:`#FFF0F5`,root:{fillColor:`#8E4585`,color:`#fff`,borderColor:`#8E4585`},second:{fillColor:`#FCE4EC`,color:`#AD1457`,borderColor:`#DDA0DD`},node:{color:`#333`}}},{label:`兰花粉`,value:`orchid`,config:{lineColor:`#DA70D6`,backgroundColor:`#FFF0FF`,root:{fillColor:`#DA70D6`,color:`#fff`,borderColor:`#DA70D6`},second:{fillColor:`#F3E5F5`,color:`#C2185B`,borderColor:`#EE82EE`},node:{color:`#333`}}},{label:`现代灰`,value:`modern`,config:{lineColor:`#333333`,backgroundColor:`#FAFAFA`,root:{fillColor:`#333333`,color:`#fff`,borderColor:`#333333`},second:{fillColor:`#F5F5F5`,color:`#212121`,borderColor:`#555555`},node:{color:`#333`}}},{label:`极简`,value:`minimal`,config:{lineColor:`#2C3E50`,backgroundColor:`#ECF0F1`,root:{fillColor:`#2C3E50`,color:`#fff`,borderColor:`#2C3E50`},second:{fillColor:`#ECEFF1`,color:`#263238`,borderColor:`#34495E`},node:{color:`#333`}}},{label:`商务蓝`,value:`corporate`,config:{lineColor:`#2C3E50`,backgroundColor:`#F5F6FA`,root:{fillColor:`#2C3E50`,color:`#fff`,borderColor:`#2C3E50`},second:{fillColor:`#E3F2FD`,color:`#1565C0`,borderColor:`#3498DB`},node:{color:`#333`}}},{label:`科技蓝`,value:`tech`,config:{lineColor:`#00D4FF`,backgroundColor:`#F0F8FF`,root:{fillColor:`#00D4FF`,color:`#fff`,borderColor:`#00D4FF`},second:{fillColor:`#E0F7FA`,color:`#006064`,borderColor:`#7B2FBE`},node:{color:`#333`}}},{label:`霓虹`,value:`neon`,config:{lineColor:`#00FF88`,backgroundColor:`#1A1A2E`,root:{fillColor:`#00FF88`,color:`#1A1A2E`,borderColor:`#00FF88`},second:{fillColor:`#16213E`,color:`#00FF88`,borderColor:`#FF00FF`},node:{color:`#ccc`}}},{label:`樱花粉`,value:`sakura`,config:{lineColor:`#FFB7C5`,backgroundColor:`#FFF5F5`,root:{fillColor:`#FFB7C5`,color:`#fff`,borderColor:`#FFB7C5`},second:{fillColor:`#FFF0F5`,color:`#C2185B`,borderColor:`#FF69B4`},node:{color:`#333`}}},{label:`蜜桃`,value:`peach`,config:{lineColor:`#FFDAB9`,backgroundColor:`#FFFAF0`,root:{fillColor:`#FFA07A`,color:`#fff`,borderColor:`#FFA07A`},second:{fillColor:`#FFF3E0`,color:`#E65100`,borderColor:`#FFDAB9`},node:{color:`#333`}}},{label:`暗夜`,value:`dark`,config:{lineColor:`#4FC3F7`,backgroundColor:`#1a1a2e`,root:{fillColor:`#4FC3F7`,color:`#1a1a2e`,borderColor:`#4FC3F7`},second:{fillColor:`#2d2d44`,color:`#E0E0E0`,borderColor:`#4FC3F7`},node:{color:`#B0B0B0`}}},{label:`抹茶`,value:`matcha`,config:{lineColor:`#6B8E23`,backgroundColor:`#F5F5DC`,root:{fillColor:`#6B8E23`,color:`#fff`,borderColor:`#6B8E23`},second:{fillColor:`#F1F8E9`,color:`#33691E`,borderColor:`#8BC34A`},node:{color:`#333`}}},{label:`玫瑰金`,value:`roseGold`,config:{lineColor:`#B76E79`,backgroundColor:`#FFF5F5`,root:{fillColor:`#B76E79`,color:`#fff`,borderColor:`#B76E79`},second:{fillColor:`#FCE4EC`,color:`#880E4F`,borderColor:`#E8A0B0`},node:{color:`#333`}}},{label:`克莱因蓝`,value:`kleinBlue`,config:{lineColor:`#002FA7`,backgroundColor:`#F0F4FF`,root:{fillColor:`#002FA7`,color:`#fff`,borderColor:`#002FA7`},second:{fillColor:`#E8EAF6`,color:`#1A237E`,borderColor:`#3F51B5`},node:{color:`#333`}}},{label:`大地棕`,value:`earth`,config:{lineColor:`#8B4513`,backgroundColor:`#FAF0E6`,root:{fillColor:`#8B4513`,color:`#fff`,borderColor:`#8B4513`},second:{fillColor:`#EFEBE9`,color:`#3E2723`,borderColor:`#A0522D`},node:{color:`#333`}}},{label:`天空蓝`,value:`skyBlue`,config:{lineColor:`#87CEEB`,backgroundColor:`#E8F4FD`,root:{fillColor:`#42A5F5`,color:`#fff`,borderColor:`#42A5F5`},second:{fillColor:`#E3F2FD`,color:`#1565C0`,borderColor:`#90CAF9`},node:{color:`#333`}}}],Ne={class:`toolbar-left`},Pe={class:`toolbar-center`},Fe={class:`option-list`},Ie=[`onClick`],Le={class:`theme-picker`},Re={class:`theme-header`},ze={class:`theme-count`},Be={class:`theme-grid`},Ve=[`onClick`,`title`],He={class:`theme-name`},Ue={class:`zoom-value`},We={class:`toolbar-right`},Ge={key:0,class:`collab-users`},Ke=[`title`],qe={key:0,class:`collab-more`},Je=y({__name:`MindMapToolbar`,props:{undoCount:{type:Number,default:0},redoCount:{type:Number,default:0},currentLayout:{type:String,default:`mindMap`},currentTheme:{type:String,default:`default`},zoomPercent:{type:Number,default:100},autoFit:{type:Boolean,default:!0},isCollaborating:{type:Boolean,default:!1},isCollabOwner:{type:Boolean,default:!1},collabUsers:{type:Array,default:()=>[]},modelTitle:{type:String,default:``},modelAuthor:{type:String,default:``},isRootNode:{type:Boolean,default:!1},showHistory:{type:Boolean,default:!1}},emits:[`back`,`undo`,`redo`,`insert-child`,`insert-sibling`,`reverse-layout`,`delete-node`,`change-layout`,`change-theme`,`zoom-in`,`zoom-out`,`fit-view`,`toggle-auto-fit`,`reset-view`,`export`,`save`,`toggle-collab`,`share-collab`,`update:title`,`update:author`,`ai-generate`,`history`],setup(t,{emit:n}){let r=e=>{e.target.closest(`input, textarea, .el-input, .el-select`)||e.preventDefault()},a=t,o=n,s=(0,e.ref)(a.modelTitle),c=(0,e.ref)(a.modelAuthor);(0,e.watch)(s,e=>o(`update:title`,e)),(0,e.watch)(c,e=>o(`update:author`,e)),(0,e.watch)(()=>a.modelTitle,e=>{s.value=e}),(0,e.watch)(()=>a.modelAuthor,e=>{c.value=e});let l=(0,e.ref)(!1),u=(0,e.ref)(``),d=()=>{u.value.trim()&&(o(`ai-generate`,u.value.trim()),l.value=!1,u.value=``)},f=[{label:`思维导图`,value:`mindMap`},{label:`逻辑结构图`,value:`logicalStructure`},{label:`向左逻辑结构图`,value:`logicalStructureLeft`},{label:`组织结构图`,value:`organizationStructure`},{label:`目录组织图`,value:`catalogOrganization`},{label:`时间轴(右)`,value:`timeline`},{label:`时间轴(下)`,value:`timeline2`},{label:`竖向时间轴`,value:`verticalTimeline`},{label:`竖向时间轴2`,value:`verticalTimeline2`},{label:`竖向时间轴3`,value:`verticalTimeline3`},{label:`鱼骨图`,value:`fishbone`},{label:`鱼骨图2`,value:`fishbone2`}],p=Me;return(n,a)=>{let o=(0,e.resolveComponent)(`el-icon`),m=(0,e.resolveComponent)(`el-button`),h=(0,e.resolveComponent)(`el-input`),g=(0,e.resolveComponent)(`el-divider`),_=(0,e.resolveComponent)(`el-popover`),v=(0,e.resolveComponent)(`el-dropdown-item`),y=(0,e.resolveComponent)(`el-dropdown-menu`),b=(0,e.resolveComponent)(`el-dropdown`),x=(0,e.resolveComponent)(`Clock`),S=(0,e.resolveComponent)(`el-dialog`);return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)(`div`,{class:`mindmap-toolbar`,onMousedown:r},[(0,e.createElementVNode)(`div`,Ne,[(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[0]||=e=>n.$emit(`back`),title:`返回`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.ArrowLeft))]),_:1})]),_:1}),(0,e.createVNode)(h,{modelValue:s.value,"onUpdate:modelValue":a[1]||=e=>s.value=e,class:`title-input`,placeholder:`思维导图标题 *`,size:`small`,style:{width:`200px`},disabled:t.isCollaborating&&!t.isCollabOwner,required:``},null,8,[`modelValue`,`disabled`]),(0,e.createVNode)(h,{modelValue:c.value,"onUpdate:modelValue":a[2]||=e=>c.value=e,class:`author-input`,placeholder:`作者 *`,size:`small`,style:{width:`120px`},required:``},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,Pe,[(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[3]||=e=>n.$emit(`undo`),disabled:t.undoCount<=0,title:`撤销`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.RefreshLeft))]),_:1})]),_:1},8,[`disabled`]),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[4]||=e=>n.$emit(`redo`),disabled:t.redoCount<=0,title:`重做`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.RefreshRight))]),_:1})]),_:1},8,[`disabled`]),(0,e.createVNode)(g,{direction:`vertical`}),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[5]||=e=>l.value=!0,title:`AI生成`},{default:(0,e.withCtx)(()=>[...a[24]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`},[(0,e.createElementVNode)(`path`,{d:`M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5`})],-1)]]),_:1}),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[6]||=e=>n.$emit(`insert-child`),title:`插入子节点`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Plus))]),_:1})]),_:1}),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[7]||=e=>n.$emit(`insert-sibling`),title:`插入同级节点`,disabled:t.isRootNode},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.CopyDocument))]),_:1})]),_:1},8,[`disabled`]),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[8]||=e=>n.$emit(`reverse-layout`),title:`反转方向`,disabled:t.isCollaborating&&!t.isCollabOwner},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Switch))]),_:1})]),_:1},8,[`disabled`]),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[9]||=e=>n.$emit(`delete-node`),title:`删除节点`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Delete))]),_:1})]),_:1}),(0,e.createVNode)(g,{direction:`vertical`}),(0,e.createVNode)(_,{trigger:`click`,width:`220`,placement:`bottom-start`},{reference:(0,e.withCtx)(()=>[(0,e.createVNode)(m,{size:`small`,circle:``,title:`布局类型`,disabled:t.isCollaborating&&!t.isCollabOwner},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Grid))]),_:1})]),_:1},8,[`disabled`])]),default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,Fe,[((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(f,r=>(0,e.createElementVNode)(`div`,{key:r.value,class:(0,e.normalizeClass)([`option-item`,{active:t.currentLayout===r.value}]),onClick:e=>n.$emit(`change-layout`,r.value)},(0,e.toDisplayString)(r.label),11,Ie)),64))])]),_:1}),(0,e.createVNode)(_,{trigger:`click`,width:`380`,placement:`bottom-end`},{reference:(0,e.withCtx)(()=>[(0,e.createVNode)(m,{size:`small`,circle:``,title:`主题`,disabled:t.isCollaborating&&!t.isCollabOwner},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Brush))]),_:1})]),_:1},8,[`disabled`])]),default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,Le,[(0,e.createElementVNode)(`div`,Re,[a[25]||=(0,e.createElementVNode)(`h4`,null,`选择主题`,-1),(0,e.createElementVNode)(`span`,ze,(0,e.toDisplayString)((0,e.unref)(p).length)+` 种配色`,1)]),(0,e.createElementVNode)(`div`,Be,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(p),r=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r.value,class:(0,e.normalizeClass)([`theme-item`,{active:t.currentTheme===r.value}]),onClick:e=>n.$emit(`change-theme`,r.value),onMousedown:a[10]||=(0,e.withModifiers)(()=>{},[`prevent`]),title:r.label},[(0,e.createElementVNode)(`div`,{class:`theme-preview`,style:(0,e.normalizeStyle)({background:r.config?.backgroundColor||`#fff`})},[(0,e.createElementVNode)(`div`,{class:`theme-line`,style:(0,e.normalizeStyle)({background:r.config?.root?.fillColor||`#549688`})},null,4)],4),(0,e.createElementVNode)(`span`,He,(0,e.toDisplayString)(r.label),1)],42,Ve))),128))])])]),_:1}),(0,e.createVNode)(g,{direction:`vertical`}),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[11]||=e=>n.$emit(`zoom-in`),title:`放大`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.ZoomIn))]),_:1})]),_:1}),(0,e.createElementVNode)(`span`,Ue,(0,e.toDisplayString)(t.zoomPercent)+`%`,1),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[12]||=e=>n.$emit(`zoom-out`),title:`缩小`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.ZoomOut))]),_:1})]),_:1}),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[13]||=e=>n.$emit(`fit-view`),title:`适应画布`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.FullScreen))]),_:1})]),_:1}),(0,e.createVNode)(m,{size:`small`,circle:``,type:t.autoFit?`primary`:`default`,onClick:a[14]||=e=>n.$emit(`toggle-auto-fit`),title:`自动适应画布`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Aim))]),_:1})]),_:1},8,[`type`]),(0,e.createVNode)(m,{size:`small`,circle:``,onClick:a[15]||=e=>n.$emit(`reset-view`),title:`复位`,disabled:t.isCollaborating&&!t.isCollabOwner},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Refresh))]),_:1})]),_:1},8,[`disabled`])]),(0,e.createElementVNode)(`div`,We,[t.collabUsers.length>0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ge,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.collabUsers.slice(0,5),t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.clientId,class:`collab-avatar`,style:(0,e.normalizeStyle)({background:t.color}),title:t.name},(0,e.toDisplayString)(t.name?.charAt(0)),13,Ke))),128)),t.collabUsers.length>5?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,qe,`+`+(0,e.toDisplayString)(t.collabUsers.length-5),1)):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0),!t.isCollaborating||t.isCollabOwner?((0,e.openBlock)(),(0,e.createBlock)(m,{key:1,size:`small`,type:t.isCollaborating?`success`:`default`,onClick:a[16]||=e=>n.$emit(`toggle-collab`),title:`协作`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Share))]),_:1}),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.isCollaborating?`协作中`:`协作`),1)]),_:1},8,[`type`])):(0,e.createCommentVNode)(``,!0),!t.isCollaborating||t.isCollabOwner?((0,e.openBlock)(),(0,e.createBlock)(m,{key:2,size:`small`,circle:``,onClick:a[17]||=e=>n.$emit(`share-collab`),title:`分享链接`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Link))]),_:1})]),_:1})):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(b,{trigger:`click`,onCommand:a[18]||=e=>n.$emit(`export`,e)},{dropdown:(0,e.withCtx)(()=>[(0,e.createVNode)(y,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)(v,{command:`png`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Picture))]),_:1}),a[27]||=(0,e.createTextVNode)(`导出 PNG `,-1)]),_:1}),(0,e.createVNode)(v,{command:`svg`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Document))]),_:1}),a[28]||=(0,e.createTextVNode)(`导出 SVG `,-1)]),_:1}),(0,e.createVNode)(v,{command:`pdf`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Document))]),_:1}),a[29]||=(0,e.createTextVNode)(`导出 PDF `,-1)]),_:1})]),_:1})]),default:(0,e.withCtx)(()=>[(0,e.createVNode)(m,{size:`small`,type:`warning`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Download))]),_:1}),a[26]||=(0,e.createElementVNode)(`span`,null,`导出`,-1)]),_:1})]),_:1}),(0,e.createVNode)(m,{size:`small`,onClick:a[19]||=e=>n.$emit(`save`),type:`primary`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Check))]),_:1}),a[30]||=(0,e.createElementVNode)(`span`,null,`保存`,-1)]),_:1}),t.showHistory?((0,e.openBlock)(),(0,e.createBlock)(m,{key:3,size:`small`,circle:``,title:`更新履历`,onClick:a[20]||=e=>n.$emit(`history`)},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)(x)]),_:1})]),_:1})):(0,e.createCommentVNode)(``,!0)])],32),(0,e.createVNode)(S,{modelValue:l.value,"onUpdate:modelValue":a[23]||=e=>l.value=e,title:`AI生成思维导图`,width:`70vw`,top:`50px`,center:``,class:`ai-dialog`},{footer:(0,e.withCtx)(()=>[(0,e.createVNode)(m,{onClick:a[22]||=e=>l.value=!1},{default:(0,e.withCtx)(()=>[...a[31]||=[(0,e.createTextVNode)(`取消`,-1)]]),_:1}),(0,e.createVNode)(m,{type:`primary`,onClick:d},{default:(0,e.withCtx)(()=>[...a[32]||=[(0,e.createTextVNode)(`生成`,-1)]]),_:1})]),default:(0,e.withCtx)(()=>[(0,e.createVNode)(h,{modelValue:u.value,"onUpdate:modelValue":a[21]||=e=>u.value=e,type:`textarea`,autosize:{minRows:27,maxRows:27},placeholder:`请输入提示词,描述你想要生成的思维导图...`,class:`ai-textarea`},null,8,[`modelValue`])]),_:1},8,[`modelValue`])],64)}}},[[`__scopeId`,`data-v-47a9ddfc`]]),Ye={class:`mindmap-property-panel`},Xe={class:`panel-header`},Ze={key:0,class:`panel-content`},Qe={class:`section`},$e={class:`section`},et={class:`setting-row`},tt={class:`setting-row`},nt={class:`setting-row`},rt={class:`setting-row`},it={class:`setting-row`},at={class:`section`},ot={class:`section`},st={class:`tags-list`},ct={class:`tag-input-row`},lt={class:`section`},ut={key:1,class:`panel-empty`},dt=y({__name:`MindMapPropertyPanel`,props:{visible:{type:Boolean,default:!0},node:{type:Object,default:null}},emits:[`close`,`update-text`,`update-style`,`update-note`,`update-tags`,`update-hyperlink`],setup(t,{emit:n}){let r=t,a=n,o=(0,e.ref)(``),s=(0,e.ref)(14),c=(0,e.ref)(``),l=(0,e.ref)(``),u=(0,e.ref)(``),d=(0,e.ref)(`rect`),f=(0,e.ref)(``),p=(0,e.ref)([]),m=(0,e.ref)(``),h=(0,e.ref)(``),g=(0,e.ref)(``);(0,e.watch)(()=>r.node,e=>{if(!e)return;let t=e.nodeData?.data||{};o.value=t.text||``,f.value=t.note||``,p.value=t.tag?[...t.tag]:[],h.value=t.hyperlink||``,g.value=t.hyperlinkTitle||``;let n=e.getData?.(`style`)||{};s.value=parseInt(n.fontSize)||14,c.value=n.color||``,l.value=n.background||``,u.value=n.borderColor||``,d.value=n.shape||`rect`},{immediate:!0});let _=()=>{a(`update-text`,o.value)},v=(e,t)=>{a(`update-style`,{[e]:t})},y=()=>{a(`update-note`,f.value)},b=()=>{a(`update-hyperlink`,{hyperlink:h.value,hyperlinkTitle:g.value})},x=()=>{m.value.trim()&&(p.value.push({text:m.value.trim()}),a(`update-tags`,[...p.value]),m.value=``)},S=e=>{p.value.splice(e,1),a(`update-tags`,[...p.value])};return(n,r)=>{let a=(0,e.resolveComponent)(`el-icon`),C=(0,e.resolveComponent)(`el-button`),w=(0,e.resolveComponent)(`el-input`),T=(0,e.resolveComponent)(`el-slider`),E=(0,e.resolveComponent)(`el-color-picker`),ee=(0,e.resolveComponent)(`el-option`),te=(0,e.resolveComponent)(`el-select`),ne=(0,e.resolveComponent)(`el-tag`);return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ye,[(0,e.createElementVNode)(`div`,Xe,[r[16]||=(0,e.createElementVNode)(`span`,{class:`header-label`},`属性`,-1),(0,e.createVNode)(C,{size:`small`,circle:``,onClick:r[0]||=e=>n.$emit(`close`)},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(a,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Close))]),_:1})]),_:1})]),t.node?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ze,[(0,e.createElementVNode)(`div`,Qe,[r[17]||=(0,e.createElementVNode)(`div`,{class:`section-title`},`节点文本`,-1),(0,e.createVNode)(w,{modelValue:o.value,"onUpdate:modelValue":r[1]||=e=>o.value=e,size:`small`,onChange:_,placeholder:`输入节点文本`},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,$e,[r[23]||=(0,e.createElementVNode)(`div`,{class:`section-title`},`样式`,-1),(0,e.createElementVNode)(`div`,et,[r[18]||=(0,e.createElementVNode)(`label`,null,`字体大小`,-1),(0,e.createVNode)(T,{modelValue:s.value,"onUpdate:modelValue":r[2]||=e=>s.value=e,min:12,max:30,step:1,onChange:r[3]||=e=>v(`fontSize`,e+`px`),style:{width:`140px`}},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,tt,[r[19]||=(0,e.createElementVNode)(`label`,null,`字体颜色`,-1),(0,e.createVNode)(E,{modelValue:c.value,"onUpdate:modelValue":r[4]||=e=>c.value=e,onChange:r[5]||=e=>v(`color`,e),size:`small`},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,nt,[r[20]||=(0,e.createElementVNode)(`label`,null,`背景色`,-1),(0,e.createVNode)(E,{modelValue:l.value,"onUpdate:modelValue":r[6]||=e=>l.value=e,onChange:r[7]||=e=>v(`background`,e),size:`small`},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,rt,[r[21]||=(0,e.createElementVNode)(`label`,null,`边框色`,-1),(0,e.createVNode)(E,{modelValue:u.value,"onUpdate:modelValue":r[8]||=e=>u.value=e,onChange:r[9]||=e=>v(`borderColor`,e),size:`small`},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,it,[r[22]||=(0,e.createElementVNode)(`label`,null,`形状`,-1),(0,e.createVNode)(te,{modelValue:d.value,"onUpdate:modelValue":r[10]||=e=>d.value=e,size:`small`,onChange:r[11]||=e=>v(`shape`,e)},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(ee,{label:`矩形`,value:`rect`}),(0,e.createVNode)(ee,{label:`圆角矩形`,value:`roundedRect`}),(0,e.createVNode)(ee,{label:`胶囊`,value:`capsule`})]),_:1},8,[`modelValue`])])]),(0,e.createElementVNode)(`div`,at,[r[24]||=(0,e.createElementVNode)(`div`,{class:`section-title`},`备注`,-1),(0,e.createVNode)(w,{modelValue:f.value,"onUpdate:modelValue":r[12]||=e=>f.value=e,type:`textarea`,rows:3,size:`small`,onChange:y,placeholder:`添加备注...`},null,8,[`modelValue`])]),(0,e.createElementVNode)(`div`,ot,[r[26]||=(0,e.createElementVNode)(`div`,{class:`section-title`},`标签`,-1),(0,e.createElementVNode)(`div`,st,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(p.value,(t,n)=>((0,e.openBlock)(),(0,e.createBlock)(ne,{key:n,closable:``,size:`small`,onClose:e=>S(n)},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(t.text||t),1)]),_:2},1032,[`onClose`]))),128))]),(0,e.createElementVNode)(`div`,ct,[(0,e.createVNode)(w,{modelValue:m.value,"onUpdate:modelValue":r[13]||=e=>m.value=e,size:`small`,placeholder:`新标签`,onKeyup:(0,e.withKeys)(x,[`enter`]),style:{width:`120px`}},null,8,[`modelValue`]),(0,e.createVNode)(C,{size:`small`,onClick:x,disabled:!m.value.trim()},{default:(0,e.withCtx)(()=>[...r[25]||=[(0,e.createTextVNode)(`添加`,-1)]]),_:1},8,[`disabled`])])]),(0,e.createElementVNode)(`div`,lt,[r[27]||=(0,e.createElementVNode)(`div`,{class:`section-title`},`超链接`,-1),(0,e.createVNode)(w,{modelValue:h.value,"onUpdate:modelValue":r[14]||=e=>h.value=e,size:`small`,placeholder:`https://...`,onChange:b},null,8,[`modelValue`]),(0,e.createVNode)(w,{modelValue:g.value,"onUpdate:modelValue":r[15]||=e=>g.value=e,size:`small`,placeholder:`链接标题`,onChange:b,style:{"margin-top":`6px`}},null,8,[`modelValue`])])])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ut,[(0,e.createVNode)(a,{size:32,color:`#c0c4cc`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.InfoFilled))]),_:1}),r[28]||=(0,e.createElementVNode)(`p`,null,`点击节点编辑属性`,-1)]))],512)),[[e.vShow,t.visible]])}}},[[`__scopeId`,`data-v-c06f1443`]]),ft=y({__name:`MindMapContextMenu`,props:{visible:{type:Boolean,default:!1},x:{type:Number,default:0},y:{type:Number,default:0}},emits:[`command`,`close`],setup(t,{emit:n}){let r=n,a=e=>{r(`command`,e),r(`close`)};return(n,r)=>{let o=(0,e.resolveComponent)(`el-icon`);return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`mindmap-context-menu`,style:(0,e.normalizeStyle)({left:t.x+`px`,top:t.y+`px`})},[(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[0]||=e=>a(`insertChild`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Plus))]),_:1}),r[7]||=(0,e.createTextVNode)(`插入子节点 `,-1)]),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[1]||=e=>a(`insertSibling`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.CopyDocument))]),_:1}),r[8]||=(0,e.createTextVNode)(`插入同级节点 `,-1)]),r[14]||=(0,e.createElementVNode)(`div`,{class:`menu-divider`},null,-1),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[2]||=e=>a(`edit`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Edit))]),_:1}),r[9]||=(0,e.createTextVNode)(`编辑文本 `,-1)]),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[3]||=e=>a(`delete`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Delete))]),_:1}),r[10]||=(0,e.createTextVNode)(`删除节点 `,-1)]),r[15]||=(0,e.createElementVNode)(`div`,{class:`menu-divider`},null,-1),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[4]||=e=>a(`copy`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Document))]),_:1}),r[11]||=(0,e.createTextVNode)(`复制 `,-1)]),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[5]||=e=>a(`cut`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Scissor))]),_:1}),r[12]||=(0,e.createTextVNode)(`剪切 `,-1)]),(0,e.createElementVNode)(`div`,{class:`menu-item`,onClick:r[6]||=e=>a(`paste`)},[(0,e.createVNode)(o,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.DocumentCopy))]),_:1}),r[13]||=(0,e.createTextVNode)(`粘贴 `,-1)])],4)),[[e.vShow,t.visible]])}}},[[`__scopeId`,`data-v-0ca9bee8`]]),pt={class:`export-options`},mt=y({__name:`MindMapExportDialog`,props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`,`export`],setup(t,{emit:n}){let r=n,a=e=>{r(`export`,e),r(`update:visible`,!1)};return(n,r)=>{let o=(0,e.resolveComponent)(`el-icon`),s=(0,e.resolveComponent)(`el-button`),c=(0,e.resolveComponent)(`el-dialog`);return(0,e.openBlock)(),(0,e.createBlock)(c,{"model-value":t.visible,title:`导出思维导图`,width:`400px`,"onUpdate:modelValue":r[4]||=e=>n.$emit(`update:visible`,e),onClose:r[5]||=e=>n.$emit(`update:visible`,!1)},{footer:(0,e.withCtx)(()=>[(0,e.createVNode)(s,{onClick:r[3]||=e=>n.$emit(`update:visible`,!1)},{default:(0,e.withCtx)(()=>[...r[9]||=[(0,e.createTextVNode)(`取消`,-1)]]),_:1})]),default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,pt,[(0,e.createElementVNode)(`div`,{class:`export-item`,onClick:r[0]||=e=>a(`png`)},[(0,e.createVNode)(o,{size:32,color:`#409eff`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Picture))]),_:1}),r[6]||=(0,e.createElementVNode)(`div`,{class:`export-info`},[(0,e.createElementVNode)(`div`,{class:`export-name`},`PNG 图片`),(0,e.createElementVNode)(`div`,{class:`export-desc`},`高清位图,适合分享和预览`)],-1)]),(0,e.createElementVNode)(`div`,{class:`export-item`,onClick:r[1]||=e=>a(`svg`)},[(0,e.createVNode)(o,{size:32,color:`#67c23a`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Document))]),_:1}),r[7]||=(0,e.createElementVNode)(`div`,{class:`export-info`},[(0,e.createElementVNode)(`div`,{class:`export-name`},`SVG 矢量图`),(0,e.createElementVNode)(`div`,{class:`export-desc`},`无损缩放,适合印刷和编辑`)],-1)]),(0,e.createElementVNode)(`div`,{class:`export-item`,onClick:r[2]||=e=>a(`pdf`)},[(0,e.createVNode)(o,{size:32,color:`#f56c6c`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Document))]),_:1}),r[8]||=(0,e.createElementVNode)(`div`,{class:`export-info`},[(0,e.createElementVNode)(`div`,{class:`export-name`},`PDF 文档`),(0,e.createElementVNode)(`div`,{class:`export-desc`},`通用格式,适合打印和归档`)],-1)])])]),_:1},8,[`model-value`])}}},[[`__scopeId`,`data-v-c9798127`]]),ht=t=>{let n=new o.Doc,r=(0,e.ref)(!1),i=(0,e.ref)([]),a=(0,e.ref)(``),c=(0,e.ref)(!1),l=!1,u=null;n.getXmlFragment(`default`);let d=`ws://${window.location.hostname||`localhost`}:1234`,f=null,p=new s.HocuspocusProvider({url:d,name:t,document:n,connect:!1,reconnect:!0,onClose:()=>{r.value=!1,h()},onConnect:()=>{r.value=!0,m()}}),m=()=>{h(),f=setInterval(()=>{if(p.connection&&p.connection.ws)try{p.connection.ws.send(JSON.stringify({type:`ping`}))}catch{}},3e4)},h=()=>{f&&=(clearInterval(f),null)},g=n.getMap(`mindmap`);n.getMap(`meta`),p.awareness.on(`change`,()=>{i.value=Array.from(p.awareness.getStates().entries()).filter(([e,t])=>t.user).map(([e,t])=>({clientId:e,...t.user}))}),g.observe(e=>{e.keysChanged.has(`_closed`)&&(c.value=g.get(`_closed`)===!0)});let _=e=>{p.awareness.setLocalStateField(`user`,{id:e.id||`user-${Date.now()}`,name:e.name||`用户${Math.floor(Math.random()*1e3)}`,color:e.color||v(),...e})},v=()=>{let e=[`#409EFF`,`#67C23A`,`#E6A23C`,`#F56C6C`,`#909399`,`#9B59B6`,`#1ABC9C`,`#3498DB`];return e[Math.floor(Math.random()*e.length)]},y=()=>{p.connect()},b=()=>g,x=()=>{p.disconnect()},S=()=>{c.value=!0,n.transact(()=>{g.set(`_closed`,!0)}),p.disconnect()},C=()=>g.get(`_closed`)===!0?(c.value=!0,!0):!1,w=e=>{l||(u&&clearTimeout(u),u=setTimeout(()=>{let t=JSON.stringify(e);g.get(`root`)!==t&&n.transact(()=>{g.set(`root`,t)})},50))},T=e=>{g.observe(t=>{if(t.keysChanged.has(`root`)){let t=g.get(`root`);if(t)try{l=!0,e(JSON.parse(t)),setTimeout(()=>{l=!1},100)}catch(e){console.error(`Failed to parse remote mind map data:`,e),l=!1}}})},E=()=>{let e=`${window.location.origin}/mindmap-editor/${t}?collab=1`;return a.value=e,e};return{ydoc:n,provider:p,isConnected:r,onlineUsers:i,shareUrl:a,collaborationClosed:c,setUserInfo:_,connect:y,disconnect:x,closeCollaboration:S,checkCollaborationClosed:C,syncToYjs:w,getYData:b,onRemoteChange:T,generateShareUrl:E,copyShareUrl:async()=>{let e=a.value||E();try{return await navigator.clipboard.writeText(e),!0}catch{return!1}},destroy:()=>{h(),u&&clearTimeout(u),p.awareness.setLocalState(null),p.disconnect(),n.destroy()}}},O,gt,_t,vt,yt,bt,xt,St,Ct,wt=m((()=>{O={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`},PASTE_TYPE:{CLIP_BOARD:`clipBoard`,CANVAS:`canvas`},SCROLL_BAR_DIR:{VERTICAL:`vertical`,HORIZONTAL:`horizontal`},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`}},gt={[O.INIT_ROOT_NODE_POSITION.LEFT]:0,[O.INIT_ROOT_NODE_POSITION.TOP]:0,[O.INIT_ROOT_NODE_POSITION.RIGHT]:1,[O.INIT_ROOT_NODE_POSITION.BOTTOM]:1,[O.INIT_ROOT_NODE_POSITION.CENTER]:.5},O.LAYOUT.LOGICAL_STRUCTURE,O.LAYOUT.LOGICAL_STRUCTURE_LEFT,O.LAYOUT.MIND_MAP,O.LAYOUT.ORGANIZATION_STRUCTURE,O.LAYOUT.CATALOG_ORGANIZATION,O.LAYOUT.TIMELINE,O.LAYOUT.TIMELINE2,O.LAYOUT.VERTICAL_TIMELINE,O.LAYOUT.VERTICAL_TIMELINE2,O.LAYOUT.VERTICAL_TIMELINE3,O.LAYOUT.FISHBONE,O.LAYOUT.FISHBONE2,O.LAYOUT.RIGHT_FISHBONE,O.LAYOUT.RIGHT_FISHBONE2,_t=[O.LAYOUT.LOGICAL_STRUCTURE,O.LAYOUT.LOGICAL_STRUCTURE_LEFT,O.LAYOUT.MIND_MAP,O.LAYOUT.CATALOG_ORGANIZATION,O.LAYOUT.ORGANIZATION_STRUCTURE,O.LAYOUT.TIMELINE,O.LAYOUT.TIMELINE2,O.LAYOUT.VERTICAL_TIMELINE,O.LAYOUT.VERTICAL_TIMELINE2,O.LAYOUT.VERTICAL_TIMELINE3,O.LAYOUT.FISHBONE,O.LAYOUT.FISHBONE2,O.LAYOUT.RIGHT_FISHBONE,O.LAYOUT.RIGHT_FISHBONE2],vt=`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`.split(`.`),yt={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`},bt=`
|
|
3
|
+
/* 鼠标hover和激活时渲染的矩形 */
|
|
4
|
+
.smm-hover-node{
|
|
5
|
+
display: none;
|
|
6
|
+
opacity: 0.6;
|
|
7
|
+
stroke-width: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.smm-node:not(.smm-node-dragging):hover .smm-hover-node{
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.smm-node.active .smm-hover-node, .smm-node-highlight .smm-hover-node{
|
|
15
|
+
display: block;
|
|
16
|
+
opacity: 1;
|
|
17
|
+
stroke-width: 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.smm-text-node-wrap, .smm-expand-btn-text {
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
`,xt=[`img`,`br`,`hr`,`input`,`link`,`meta`,`area`],St=1.2,Ct=[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`textDecoration`,`color`,`textAlign`]})),Tt,Et=m((()=>{wt(),Tt=class{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=>{let{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)=>{let{customHandleMousewheel:i,mousewheelAction:a,mouseScaleCenterUseMousePosition:o,mousewheelMoveStep:s,mousewheelZoomActionReverse:c,disableMouseWheelZoom:l,translateRatio:u}=this.mindMap.opt;if(i&&typeof i==`function`)return i(e);if(a===O.MOUSE_WHEEL_ACTION.ZOOM||e.ctrlKey||e.metaKey){if(l)return;let{x:n,y:i}=this.mindMap.toPos(e.clientX,e.clientY),a=o?n:void 0,s=o?i:void 0;switch(r&&(t.includes(O.DIR.LEFT)||t.includes(O.DIR.RIGHT))&&(t=t.filter(e=>![O.DIR.LEFT,O.DIR.RIGHT].includes(e))),!0){case t.includes(O.DIR.UP||O.DIR.LEFT):c?this.enlarge(a,s,r):this.narrow(a,s,r);break;case t.includes(O.DIR.DOWN||O.DIR.RIGHT):c?this.narrow(a,s,r):this.enlarge(a,s,r);break}}else{let n=0,i=0;r?(n=Math.abs(e.wheelDeltaX),i=Math.abs(e.wheelDeltaY)):n=i=s;let a=0,o=0;t.includes(O.DIR.DOWN)&&(o=-i),t.includes(O.DIR.UP)&&(o=i),t.includes(O.DIR.LEFT)&&(a=n),t.includes(O.DIR.RIGHT)&&(a=-n),this.translateXY(a*u,o*u)}}),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(){let 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:i}=this.mindMap.opt;r/=n?5:1;let a=Math.max(this.scale-r,i/100);this.scaleInCenter(a,e,t),this.transform(),this.emitEvent(`scale`)}enlarge(e,t,n){let{scaleRatio:r,maxZoomRatio:i}=this.mindMap.opt;r/=n?5:1;let a=0;a=i===-1?this.scale+r:Math.min(this.scale+r,i/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);let r=1-e/this.scale,i=(t-this.x)*r,a=(n-this.y)*r;this.x+=i,this.y+=a,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;let r=this.mindMap.draw,i=r.transform(),a=e()||r.rbox(),o=a.width/i.scaleX,s=a.height/i.scaleY,c=o/s,{width:l,height:u}=this.mindMap.elRect;l-=n*2,u-=n*2;let d=l/u,f=0,p=``;if(o<=l&&s<=u&&!t)f=1,p=1;else{let e=0;c>d?(e=l,l/c,p=2):(e=u*c,p=3),f=e/o}this.setScale(f);let m=e()||r.rbox();m.x-=this.mindMap.elRect.left,m.y-=this.mindMap.elRect.top;let h=0,g=0;p===1?(h=-m.x+n+(l-m.width)/2,g=-m.y+n+(u-m.height)/2):p===2?(h=-m.x+n,g=-m.y+n+(u-m.height)/2):p===3&&(h=-m.x+n+(l-m.width)/2,g=-m.y+n),this.translateXY(h,g)}checkNeedMindMapInCanvas(){if(this.mindMap.demonstrate&&this.mindMap.demonstrate.isInDemonstrate)return!1;let{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:i}=this.getPositionLimit(),a=(this.mindMap.width-this.mindMap.initWidth)/2*e,o=(this.mindMap.height-this.mindMap.initHeight)/2*e,s=this.scale/e;t*=s,r*=s,n*=s,i*=s;let c=this.mindMap.width/2,l=this.mindMap.height/2,u=this.scale-1;t-=u*c-a,r-=u*c-a,n-=u*l-o,i-=u*l-o,this.x>t&&(this.x=t),this.x<r&&(this.x=r),this.y>n&&(this.y=n),this.y<i&&(this.y=i)}getPositionLimit(){let{scaleX:e,scaleY:t}=this.mindMap.draw.transform(),n=this.mindMap.draw.rbox(),r=this.mindMap.renderer.root.group.rbox(),i=this.mindMap.renderer.layout.getRootCenterOffset(r.width,r.height);return{scale:e,left:r.x-n.x-i.x*e,right:r.x-n.x2-i.x*e,top:r.y-n.y-i.y*t,bottom:r.y-n.y2-i.y*t}}emitEvent(e){switch(e){case`scale`:this.mindMap.emit(`scale`,this.scale);case`translate`:this.mindMap.emit(`translate`,this.x,this.y)}}}})),Dt=h(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),Ot,kt,At=m((()=>{Ot=v(Dt()),wt(),kt=class extends Ot.default{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();let t=[];e.deltaY<0&&t.push(O.DIR.UP),e.deltaY>0&&t.push(O.DIR.DOWN),e.deltaX<0&&t.push(O.DIR.LEFT),e.deltaX>0&&t.push(O.DIR.RIGHT);let n=!1,{customCheckIsTouchPad:r}=this.mindMap.opt;n=typeof r==`function`?r(e):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)}}})),jt=h(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t&&t.clone===!0&&n(e)?d(s(e),e,t):e}function l(e,t,r){var i=e.slice();return t.forEach(function(t,a){i[a]===void 0?i[a]=c(t,r):n(t)?i[a]=d(e[a],t,r):e.indexOf(t)===-1&&i.push(c(t,r))}),i}function u(e,t,r){var i={};return n(e)&&Object.keys(e).forEach(function(t){i[t]=c(e[t],r)}),Object.keys(t).forEach(function(a){!n(t[a])||!e[a]?i[a]=c(t[a],r):i[a]=d(e[a],t[a],r)}),i}function d(e,t,n){var r=Array.isArray(t);return r===Array.isArray(e)?r?((n||{arrayMerge:l}).arrayMerge||l)(e,t,n):u(e,t,n):c(t,n)}d.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw Error(`first argument should be an array with at least two elements`);return e.reduce(function(e,n){return d(e,n,t)})},t.exports=d})),Mt,Nt,Pt=m((()=>{Mt=typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Nt={randomUUID:Mt}}));function Ft(){if(!It&&(It=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!It))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return It(Lt)}var It,Lt,Rt=m((()=>{Lt=new Uint8Array(16)}));function zt(e,t=0){return Bt[e[t+0]]+Bt[e[t+1]]+Bt[e[t+2]]+Bt[e[t+3]]+`-`+Bt[e[t+4]]+Bt[e[t+5]]+`-`+Bt[e[t+6]]+Bt[e[t+7]]+`-`+Bt[e[t+8]]+Bt[e[t+9]]+`-`+Bt[e[t+10]]+Bt[e[t+11]]+Bt[e[t+12]]+Bt[e[t+13]]+Bt[e[t+14]]+Bt[e[t+15]]}var Bt,Vt=m((()=>{Bt=[];for(let e=0;e<256;++e)Bt.push((e+256).toString(16).slice(1))}));function Ht(e,t,n){if(Nt.randomUUID&&!t&&!e)return Nt.randomUUID();e||={};let r=e.random||(e.rng||Ft)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return zt(r)}var Ut=m((()=>{Pt(),Rt(),Vt()})),Wt=m((()=>{Ut()}));function Gt(e){this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=Array(this.N),this.mti=this.N+1,this.init_genrand(e)}var Kt=m((()=>{Gt.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++)e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30,this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0},Gt.prototype.genrand_int32=function(){var e,t=[0,this.MATRIX_A];if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_genrand(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[e&1],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0}}));function k(e,t){if(Array.isArray(e)){for(let n of e)k(n,t);return}if(typeof e==`object`){for(let t in e)k(t,e[t]);return}Yt(Object.getOwnPropertyNames(t)),yi[e]=Object.assign(yi[e]||{},t)}function qt(e){return yi[e]||{}}function Jt(){return[...new Set(bi)]}function Yt(e){bi.push(...e)}function Xt(e,t){let n,r=e.length,i=[];for(n=0;n<r;n++)i.push(t(e[n]));return i}function Zt(e,t){let n,r=e.length,i=[];for(n=0;n<r;n++)t(e[n])&&i.push(e[n]);return i}function Qt(e){return e%360*Math.PI/180}function $t(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function en(e){return e.replace(/([A-Z])/g,function(e,t){return`-`+t.toLowerCase()})}function tn(e){return e.charAt(0).toUpperCase()+e.slice(1)}function nn(e,t,n,r){return(t==null||n==null)&&(r||=e.bbox(),t==null?t=r.width/r.height*n:n??=r.height/r.width*t),{width:t,height:n}}function rn(e,t){let n=e.origin,r=e.ox==null?e.originX==null?`center`:e.originX:e.ox,i=e.oy==null?e.originY==null?`center`:e.originY:e.oy;n!=null&&([r,i]=Array.isArray(n)?n:typeof n==`object`?[n.x,n.y]:[n,n]);let a=typeof r==`string`,o=typeof i==`string`;if(a||o){let{height:e,width:n,x:s,y:c}=t.bbox();a&&(r=r.includes(`left`)?s:r.includes(`right`)?s+n:s+n/2),o&&(i=i.includes(`top`)?c:i.includes(`bottom`)?c+e:c+e/2)}return[r,i]}function an(e,t=xi){return Ei.document.createElementNS(t,e)}function on(e,t=!1){if(e instanceof Di)return e;if(typeof e==`object`)return Ai(e);if(e==null)return new Oi[ki];if(typeof e==`string`&&e.charAt(0)!==`<`)return Ai(Ei.document.querySelector(e));let n=t?Ei.document.createElement(`div`):an(`svg`);return n.innerHTML=e,e=Ai(n.firstChild),n.removeChild(n.firstChild),e}function sn(e,t){return t&&t.ownerDocument&&t instanceof t.ownerDocument.defaultView.Node?t:an(e)}function cn(e){if(!e)return null;if(e.instance instanceof Di)return e.instance;if(e.nodeName===`#document-fragment`)return new Oi.Fragment(e);let t=tn(e.nodeName||`Dom`);return t===`LinearGradient`||t===`RadialGradient`?t=`Gradient`:Oi[t]||(t=`Dom`),new Oi[t](e)}function A(e,t=e.name,n=!1){return Oi[t]=e,n&&(Oi[ki]=e),Yt(Object.getOwnPropertyNames(e.prototype)),e}function ln(e){return Oi[e]}function un(e){return`Svgjs`+tn(e)+ji++}function dn(e){for(let t=e.children.length-1;t>=0;t--)dn(e.children[t]);return e.id&&=un(e.nodeName),e}function j(e,t){let n,r;for(e=Array.isArray(e)?e:[e],r=e.length-1;r>=0;r--)for(n in t)e[r].prototype[n]=t[n]}function fn(e){return function(...t){let n=t[t.length-1];return n&&n.constructor===Object&&!(n instanceof Array)?e.apply(this,t.slice(0,-1)).attr(n):e.apply(this,t)}}function pn(){return this.parent().children()}function mn(){return this.parent().index(this)}function hn(){return this.siblings()[this.position()+1]}function gn(){return this.siblings()[this.position()-1]}function _n(){let e=this.position();return this.parent().add(this.remove(),e+1),this}function vn(){let e=this.position();return this.parent().add(this.remove(),e?e-1:0),this}function yn(){return this.parent().add(this.remove()),this}function bn(){return this.parent().add(this.remove(),0),this}function xn(e){e=on(e),e.remove();let t=this.position();return this.parent().add(e,t),this}function Sn(e){e=on(e),e.remove();let t=this.position();return this.parent().add(e,t+1),this}function Cn(e){return e=on(e),e.before(this),this}function wn(e){return e=on(e),e.after(this),this}function Tn(){let e=this.attr(`class`);return e==null?[]:e.trim().split(Ui)}function En(e){return this.classes().indexOf(e)!==-1}function Dn(e){if(!this.hasClass(e)){let t=this.classes();t.push(e),this.attr(`class`,t.join(` `))}return this}function On(e){return this.hasClass(e)&&this.attr(`class`,this.classes().filter(function(t){return t!==e}).join(` `)),this}function kn(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)}function An(e,t){let n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(e){return!!e.length}).forEach(function(e){let t=e.split(/\s*:\s*/);n[t[0]]=t[1]}),n;if(arguments.length<2){if(Array.isArray(e)){for(let t of e){let e=$t(t);n[t]=this.node.style[e]}return n}if(typeof e==`string`)return this.node.style[$t(e)];if(typeof e==`object`)for(let t in e)this.node.style[$t(t)]=e[t]==null||Bi.test(e[t])?``:e[t]}return arguments.length===2&&(this.node.style[$t(e)]=t==null||Bi.test(t)?``:t),this}function jn(){return this.css(`display`,``)}function Mn(){return this.css(`display`,`none`)}function Nn(){return this.css(`display`)!==`none`}function Pn(e,t,n){if(e==null)return this.data(Xt(Zt(this.node.attributes,e=>e.nodeName.indexOf(`data-`)===0),e=>e.nodeName.slice(5)));if(e instanceof Array){let t={};for(let n of e)t[n]=this.data(n);return t}else if(typeof e==`object`)for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr(`data-`+e))}catch{return this.attr(`data-`+e)}else this.attr(`data-`+e,t===null?null:n===!0||typeof t==`string`||typeof t==`number`?t:JSON.stringify(t));return this}function Fn(e,t){if(typeof arguments[0]==`object`)for(let t in e)this.remember(t,e[t]);else if(arguments.length===1)return this.memory()[e];else this.memory()[e]=t;return this}function In(){if(arguments.length===0)this._memory={};else for(let e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this}function Ln(){return this._memory=this._memory||{}}function Rn(e){return e.length===4?[`#`,e.substring(1,2),e.substring(1,2),e.substring(2,3),e.substring(2,3),e.substring(3,4),e.substring(3,4)].join(``):e}function zn(e){let t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return t.length===1?`0`+t:t}function Bn(e,t){for(let n=t.length;n--;)if(e[t[n]]==null)return!1;return!0}function Vn(e,t){let n=Bn(e,`rgb`)?{_a:e.r,_b:e.g,_c:e.b,_d:0,space:`rgb`}:Bn(e,`xyz`)?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:`xyz`}:Bn(e,`hsl`)?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:`hsl`}:Bn(e,`lab`)?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:`lab`}:Bn(e,`lch`)?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:`lch`}:Bn(e,`cmyk`)?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:`cmyk`}:{_a:0,_b:0,_c:0,space:`rgb`};return n.space=t||n.space,n}function Hn(e){return e===`lab`||e===`xyz`||e===`lch`}function Un(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wn(e,t){return new Ki(e,t).transformO(this.screenCTM().inverseO())}function Gn(e,t,n){return Math.abs(t-e)<(n||1e-6)}function Kn(){return new qi(this.node.getCTM())}function qn(){if(typeof this.isRoot==`function`&&!this.isRoot()){let e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new qi(t)}return new qi(this.node.getScreenCTM())}function Jn(){if(!Jn.nodes){let e=on().size(2,0);e.node.style.cssText=[`opacity: 0`,`position: absolute`,`left: -100%`,`top: -100%`,`overflow: hidden`].join(`;`),e.attr(`focusable`,`false`),e.attr(`aria-hidden`,`true`),Jn.nodes={svg:e,path:e.path().node}}if(!Jn.nodes.svg.node.parentNode){let e=Ei.document.body||Ei.document.documentElement;Jn.nodes.svg.addTo(e)}return Jn.nodes}function Yn(e){return!e.width&&!e.height&&!e.x&&!e.y}function Xn(e){return e===Ei.document||(Ei.document.documentElement.contains||function(e){for(;e.parentNode;)e=e.parentNode;return e===Ei.document}).call(Ei.document.documentElement,e)}function Zn(e,t,n){let r;try{if(r=t(e.node),Yn(r)&&!Xn(e.node))throw Error(`Element not in the dom`)}catch{r=n(e)}return r}function Qn(){return new Ji(Zn(this,e=>e.getBBox(),e=>{try{let t=e.clone().addTo(Jn().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${t.toString()}`)}}))}function $n(e){let t=new Ji(Zn(this,e=>e.getBoundingClientRect(),e=>{throw Error(`Getting rbox of element "${e.node.nodeName}" is not possible`)}));return e?t.transform(e.screenCTM().inverseO()):t.addOffset()}function er(e,t){let n=this.bbox();return e>n.x&&t>n.y&&e<n.x+n.width&&t<n.y+n.height}function tr(e,t){return new Yi(Xt((t||Ei.document).querySelectorAll(e),function(e){return cn(e)}))}function nr(e){return tr(e,this.node)}function rr(e){return cn(this.node.querySelector(e))}function ir(e){let t=e.getEventHolder();return t===Ei.window&&(t=Qi),t.events||={},t.events}function ar(e){return e.getEventTarget()}function or(e){let t=e.getEventHolder();t===Ei.window&&(t=Qi),t.events&&={}}function sr(e,t,n,r,i){let a=n.bind(r||e),o=on(e),s=ir(o),c=ar(o);t=Array.isArray(t)?t:t.split(Ui),n._svgjsListenerId||=++Zi,t.forEach(function(e){let t=e.split(`.`)[0],r=e.split(`.`)[1]||`*`;s[t]=s[t]||{},s[t][r]=s[t][r]||{},s[t][r][n._svgjsListenerId]=a,c.addEventListener(t,a,i||!1)})}function cr(e,t,n,r){let i=on(e),a=ir(i),o=ar(i);typeof n==`function`&&(n=n._svgjsListenerId,!n)||(t=Array.isArray(t)?t:(t||``).split(Ui),t.forEach(function(e){let t=e&&e.split(`.`)[0],s=e&&e.split(`.`)[1],c,l;if(n)a[t]&&a[t][s||`*`]&&(o.removeEventListener(t,a[t][s||`*`][n],r||!1),delete a[t][s||`*`][n]);else if(t&&s){if(a[t]&&a[t][s]){for(l in a[t][s])cr(o,[t,s].join(`.`),l);delete a[t][s]}}else if(s)for(e in a)for(c in a[e])s===c&&cr(o,[e,s].join(`.`));else if(t){if(a[t]){for(c in a[t])cr(o,[t,c].join(`.`));delete a[t]}}else{for(e in a)cr(o,e);or(i)}}))}function lr(e,t,n,r){let i=ar(e);return t instanceof Ei.window.Event||(t=new Ei.window.CustomEvent(t,{detail:n,cancelable:!0,...r})),i.dispatchEvent(t),t}function ur(){}function dr(e){ia.push(e)}function fr(e,t,n){if(e==null){e={},t=this.node.attributes;for(let n of t)e[n.nodeName]=Vi.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return e}else if(e instanceof Array)return e.reduce((e,t)=>(e[t]=this.attr(t),e),{});else if(typeof e==`object`&&e.constructor===Object)for(t in e)this.attr(t,e[t]);else if(t===null)this.node.removeAttribute(e);else if(t==null)return t=this.node.getAttribute(e),t==null?ta[e]:Vi.test(t)?parseFloat(t):t;else t=ia.reduce((t,n)=>n(e,t,this),t),typeof t==`number`?t=new ra(t):Gi.isColor(t)?t=new Gi(t):t.constructor===Array&&(t=new na(t)),e===`leading`?this.leading&&this.leading(t):typeof n==`string`?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),this.rebuild&&(e===`font-size`||e===`x`)&&this.rebuild();return this}function pr(){return this.attr(`transform`,null)}function mr(){return(this.attr(`transform`)||``).split(Ii).slice(0,-1).map(function(e){let t=e.trim().split(`(`);return[t[0],t[1].split(Ui).map(function(e){return parseFloat(e)})]}).reverse().reduce(function(e,t){return t[0]===`matrix`?e.lmultiply(qi.fromArray(t[1])):e[t[0]].apply(e,t[1])},new qi)}function hr(e,t){if(this===e)return this;let n=this.screenCTM(),r=e.screenCTM().inverse();return this.addTo(e,t).untransform().transform(r.multiply(n)),this}function gr(e){return this.toParent(this.root(),e)}function _r(e,t){if(e==null||typeof e==`string`){let t=new qi(this).decompose();return e==null?t:t[e]}qi.isMatrixLike(e)||(e={...e,origin:rn(e,this)});let n=new qi(t===!0?this:t||!1).transform(e);return this.attr(`transform`,n)}function vr(e){return this.attr(`rx`,e)}function yr(e){return this.attr(`ry`,e)}function br(e){return e==null?this.cx()-this.rx():this.cx(e+this.rx())}function xr(e){return e==null?this.cy()-this.ry():this.cy(e+this.ry())}function Sr(e){return this.attr(`cx`,e)}function Cr(e){return this.attr(`cy`,e)}function wr(e){return e==null?this.rx()*2:this.rx(new ra(e).divide(2))}function Tr(e){return e==null?this.ry()*2:this.ry(new ra(e).divide(2))}function Er(e,t){return(this._element||this).type===`radialGradient`?this.attr({fx:new ra(e),fy:new ra(t)}):this.attr({x1:new ra(e),y1:new ra(t)})}function Dr(e,t){return(this._element||this).type===`radialGradient`?this.attr({cx:new ra(e),cy:new ra(t)}):this.attr({x2:new ra(e),y2:new ra(t)})}function Or(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}function kr(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}function Ar(e){let t=this.bbox();return e==null?t.width:this.size(e,t.height)}function jr(e){let t=this.bbox();return e==null?t.height:this.size(t.width,e)}function Mr(e,t){return function(n){return n==null?this[e]:(this[e]=n,t&&t.call(this),this)}}function Nr(){let e=(this._duration||500)/1e3,t=this._overshoot||0,n=Math.PI,r=Math.log(t/100+1e-10),i=-r/Math.sqrt(n*n+r*r),a=3.9/(i*e);this.d=2*i*a,this.k=a*a}function Pr(e){return Aa[e.segment[0]](e.segment.slice(1),e.p,e.p0)}function Fr(e){return e.segment.length&&e.segment.length-1===ka[e.segment[0].toUpperCase()]}function Ir(e,t){e.inNumber&&Lr(e,!1);let n=Wi.test(t);if(n)e.segment=[t];else{let t=e.lastCommand,n=t.toLowerCase();e.segment=[n===`m`?t===n?`l`:`L`:t]}return e.inSegment=!0,e.lastCommand=e.segment[0],n}function Lr(e,t){if(!e.inNumber)throw Error(`Parser Error`);e.number&&e.segment.push(parseFloat(e.number)),e.inNumber=t,e.number=``,e.pointSeen=!1,e.hasExponent=!1,Fr(e)&&Rr(e)}function Rr(e){e.inSegment=!1,e.absolute&&(e.segment=Pr(e)),e.segments.push(e.segment)}function zr(e){if(!e.segment.length)return!1;let t=e.segment[0].toUpperCase()===`A`,n=e.segment.length;return t&&(n===4||n===5)}function Br(e){return e.lastToken.toUpperCase()===`E`}function Vr(e,t=!0){let n=0,r=``,i={segment:[],inNumber:!1,number:``,lastToken:``,inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:t,p0:new Ki,p:new Ki};for(;i.lastToken=r,r=e.charAt(n++);)if(!(!i.inSegment&&Ir(i,r))){if(r===`.`){if(i.pointSeen||i.hasExponent){Lr(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r;continue}if(!isNaN(parseInt(r))){if(i.number===`0`||zr(i)){i.inNumber=!0,i.number=r,Lr(i,!0);continue}i.inNumber=!0,i.number+=r;continue}if(r===` `||r===`,`){i.inNumber&&Lr(i,!1);continue}if(r===`-`){if(i.inNumber&&!Br(i)){Lr(i,!1),--n;continue}i.number+=r,i.inNumber=!0;continue}if(r.toUpperCase()===`E`){i.number+=r,i.hasExponent=!0;continue}if(Wi.test(r)){if(i.inNumber)Lr(i,!1);else if(Fr(i))Rr(i);else throw Error(`parser Error`);--n}}return i.inNumber&&Lr(i,!1),i.inSegment&&Fr(i)&&Rr(i),i.segments}function Hr(e){let t=``;for(let n=0,r=e.length;n<r;n++)t+=e[n][0],e[n][1]!=null&&(t+=e[n][1],e[n][2]!=null&&(t+=` `,t+=e[n][2],e[n][3]!=null&&(t+=` `,t+=e[n][3],t+=` `,t+=e[n][4],e[n][5]!=null&&(t+=` `,t+=e[n][5],t+=` `,t+=e[n][6],e[n][7]!=null&&(t+=` `,t+=e[n][7])))));return t+` `}function Ur(e=[]){za.push(...[].concat(e))}function Wr(){j(za,{to(e){return new Pa().type(this.constructor).from(this.toArray()).to(e)},fromArray(e){return this.init(e),this},toConsumable(){return this.toArray()},morph(e,t,n,r,i){return this.fromArray(e.map(function(e,a){return r.step(e,t[a],n,i[a],i)}))}})}function Gr(){return this._array||=new va(this.attr(`points`))}function Kr(){return delete this._array,this}function qr(e,t){return this.attr(`points`,this.array().move(e,t))}function Jr(e){return e==null?this.array():this.clear().attr(`points`,typeof e==`string`?e:this._array=new va(e))}function Yr(e,t){let n=nn(this,e,t);return this.attr(`points`,this.array().size(n.width,n.height))}function Xr(){let e=this._transformationRunners.runners.map($a).reduce(Qa,new qi);this.transform(e),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}function Zr(e){return this._build===!1&&this.clear(),this.node.appendChild(Ei.document.createTextNode(e)),this}function Qr(){return this.node.getComputedTextLength()}function $r(e,t=this.bbox()){return e==null?t.x:this.attr(`x`,this.attr(`x`)+e-t.x)}function ei(e,t=this.bbox()){return e==null?t.y:this.attr(`y`,this.attr(`y`)+e-t.y)}function ti(e,t,n=this.bbox()){return this.x(e,n).y(t,n)}function ni(e,t=this.bbox()){return e==null?t.cx:this.attr(`x`,this.attr(`x`)+e-t.cx)}function ri(e,t=this.bbox()){return e==null?t.cy:this.attr(`y`,this.attr(`y`)+e-t.cy)}function ii(e,t,n=this.bbox()){return this.cx(e,n).cy(t,n)}function ai(e){return this.attr(`x`,e)}function oi(e){return this.attr(`y`,e)}function si(e,t){return this.ax(e).ay(t)}function ci(e){return this._build=!!e,this}function li(e,t){return this.children().forEach((n,r)=>{let i;try{i=n.bbox()}catch{return}let a=new qi(n),o=a.translate(e,t).transform(a.inverse()),s=new Ki(i.x,i.y).transform(o);n.move(s.x,s.y)}),this}function ui(e){return this.dmove(e,0)}function di(e){return this.dmove(0,e)}function fi(e,t=this.bbox()){return e==null?t.height:this.size(t.width,e,t)}function pi(e=0,t=0,n=this.bbox()){let r=e-n.x,i=t-n.y;return this.dmove(r,i)}function mi(e,t,n=this.bbox()){let r=nn(this,e,t,n),i=r.width/n.width,a=r.height/n.height;return this.children().forEach((e,t)=>{let r=new Ki(n).transform(new qi(e).inverse());e.scale(i,a,r.x,r.y)}),this}function hi(e,t=this.bbox()){return e==null?t.width:this.size(e,t.height,t)}function gi(e,t=this.bbox()){return e==null?t.x:this.move(e,t.y,t)}function _i(e,t=this.bbox()){return e==null?t.y:this.move(t.x,e,t)}function vi(e,t){if(!e)return``;if(!t)return e;let n=e+`{`;for(let e in t)n+=en(e)+`:`+t[e]+`;`;return n+=`}`,n}var yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa,ca,la,ua,da,fa,pa,ma,ha,ga,_a,va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo=m((()=>{yi={},bi=[],xi=`http://www.w3.org/2000/svg`,Si=`http://www.w3.org/1999/xhtml`,Ci=`http://www.w3.org/2000/xmlns/`,wi=`http://www.w3.org/1999/xlink`,Ti=`http://svgjs.dev/svgjs`,Ei={window:typeof window>`u`?null:window,document:typeof document>`u`?null:document},Di=class{},Oi={},ki=`___SYMBOL___ROOT___`,Ai=cn,ji=1e3,k(`Dom`,{siblings:pn,position:mn,next:hn,prev:gn,forward:_n,backward:vn,front:yn,back:bn,before:xn,after:Sn,insertBefore:Cn,insertAfter:wn}),Mi=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Ni=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Pi=/rgb\((\d+),(\d+),(\d+)\)/,Fi=/(#[a-z_][a-z0-9\-_]*)/i,Ii=/\)\s*,?\s*/,Li=/\s/g,Ri=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,zi=/^rgb\(/,Bi=/^(\s+)?$/,Vi=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hi=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ui=/[\s,]+/,Wi=/[MLHVCSQTAZ]/i,k(`Dom`,{classes:Tn,hasClass:En,addClass:Dn,removeClass:On,toggleClass:kn}),k(`Dom`,{css:An,show:jn,hide:Mn,visible:Nn}),k(`Dom`,{data:Pn}),k(`Dom`,{remember:Fn,forget:In,memory:Ln}),Gi=class e{constructor(...e){this.init(...e)}static isColor(t){return t&&(t instanceof e||this.isRgb(t)||this.test(t))}static isRgb(e){return e&&typeof e.r==`number`&&typeof e.g==`number`&&typeof e.b==`number`}static random(t=`vibrant`,n,r){let{random:i,round:a,sin:o,PI:s}=Math;if(t===`vibrant`)return new e(24*i()+57,38*i()+45,360*i(),`lch`);if(t===`sine`)return n??=i(),new e(a(80*o(2*s*n/.5+.01)+150),a(50*o(2*s*n/.5+4.6)+200),a(100*o(2*s*n/.5+2.3)+150));if(t===`pastel`)return new e(8*i()+86,17*i()+9,360*i(),`lch`);if(t===`dark`)return new e(10+10*i(),50*i()+86,360*i(),`lch`);if(t===`rgb`)return new e(255*i(),255*i(),255*i());if(t===`lab`)return new e(100*i(),256*i()-128,256*i()-128,`lab`);if(t===`grey`){let t=255*i();return new e(t,t,t)}else throw Error(`Unsupported random color mode`)}static test(e){return typeof e==`string`&&(Ri.test(e)||zi.test(e))}cmyk(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map(e=>e/255),s=Math.min(1-i,1-a,1-o);return s===1?new e(0,0,0,1,`cmyk`):new e((1-i-s)/(1-s),(1-a-s)/(1-s),(1-o-s)/(1-s),s,`cmyk`)}hsl(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map(e=>e/255),s=Math.max(i,a,o),c=Math.min(i,a,o),l=(s+c)/2,u=s===c,d=s-c,f=u?0:l>.5?d/(2-s-c):d/(s+c);return new e(360*(u?0:s===i?((a-o)/d+(a<o?6:0))/6:s===a?((o-i)/d+2)/6:s===o?((i-a)/d+4)/6:0),100*f,100*l,`hsl`)}init(e=0,t=0,n=0,r=0,i=`rgb`){if(e||=0,this.space)for(let e in this.space)delete this[this.space[e]];if(typeof e==`number`)i=typeof r==`string`?r:i,r=typeof r==`string`?0:r,Object.assign(this,{_a:e,_b:t,_c:n,_d:r,space:i});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){let n=Vn(e,t);Object.assign(this,n)}else if(typeof e==`string`)if(zi.test(e)){let t=e.replace(Li,``),[n,r,i]=Pi.exec(t).slice(1,4).map(e=>parseInt(e));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:`rgb`})}else if(Ri.test(e)){let[,t,n,r]=Ni.exec(Rn(e)).map(e=>parseInt(e,16));Object.assign(this,{_a:t,_b:n,_c:r,_d:0,space:`rgb`})}else throw Error(`Unsupported string format, can't construct Color`);let{_a:a,_b:o,_c:s,_d:c}=this,l=this.space===`rgb`?{r:a,g:o,b:s}:this.space===`xyz`?{x:a,y:o,z:s}:this.space===`hsl`?{h:a,s:o,l:s}:this.space===`lab`?{l:a,a:o,b:s}:this.space===`lch`?{l:a,c:o,h:s}:this.space===`cmyk`?{c:a,m:o,y:s,k:c}:{};Object.assign(this,l)}lab(){let{x:t,y:n,z:r}=this.xyz();return new e(116*n-16,500*(t-n),200*(n-r),`lab`)}lch(){let{l:t,a:n,b:r}=this.lab(),i=Math.sqrt(n**2+r**2),a=180*Math.atan2(r,n)/Math.PI;return a<0&&(a*=-1,a=360-a),new e(t,i,a,`lch`)}rgb(){if(this.space===`rgb`)return this;if(Hn(this.space)){let{x:t,y:n,z:r}=this;if(this.space===`lab`||this.space===`lch`){let{l:e,a:i,b:a}=this;if(this.space===`lch`){let{c:e,h:t}=this,n=Math.PI/180;i=e*Math.cos(n*t),a=e*Math.sin(n*t)}let o=(e+16)/116,s=i/500+o,c=o-a/200,l=16/116,u=.008856,d=7.787;t=.95047*(s**3>u?s**3:(s-l)/d),n=1*(o**3>u?o**3:(o-l)/d),r=1.08883*(c**3>u?c**3:(c-l)/d)}let i=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,s=Math.pow,c=.0031308,l=i>c?1.055*s(i,1/2.4)-.055:12.92*i,u=a>c?1.055*s(a,1/2.4)-.055:12.92*a,d=o>c?1.055*s(o,1/2.4)-.055:12.92*o;return new e(255*l,255*u,255*d)}else if(this.space===`hsl`){let{h:t,s:n,l:r}=this;if(t/=360,n/=100,r/=100,n===0)return r*=255,new e(r,r,r);let i=r<.5?r*(1+n):r+n-r*n,a=2*r-i;return new e(255*Un(a,i,t+1/3),255*Un(a,i,t),255*Un(a,i,t-1/3))}else if(this.space===`cmyk`){let{c:t,m:n,y:r,k:i}=this;return new e(255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)))}else return this}toArray(){let{_a:e,_b:t,_c:n,_d:r,space:i}=this;return[e,t,n,r,i]}toHex(){let[e,t,n]=this._clamped().map(zn);return`#${e}${t}${n}`}toRgb(){let[e,t,n]=this._clamped();return`rgb(${e},${t},${n})`}toString(){return this.toHex()}xyz(){let{_a:t,_b:n,_c:r}=this.rgb(),[i,a,o]=[t,n,r].map(e=>e/255),s=i>.04045?((i+.055)/1.055)**2.4:i/12.92,c=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=o>.04045?((o+.055)/1.055)**2.4:o/12.92,u=(s*.4124+c*.3576+l*.1805)/.95047,d=(s*.2126+c*.7152+l*.0722)/1,f=(s*.0193+c*.1192+l*.9505)/1.08883;return new e(u>.008856?u**(1/3):7.787*u+16/116,d>.008856?d**(1/3):7.787*d+16/116,f>.008856?f**(1/3):7.787*f+16/116,`xyz`)}_clamped(){let{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:i,round:a}=Math;return[e,t,n].map(e=>r(0,i(a(e),255)))}},Ki=class e{constructor(...e){this.init(...e)}clone(){return new e(this)}init(e,t){let 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){qi.isMatrixLike(e)||(e=new qi(e));let{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}},qi=class e{constructor(...e){this.init(...e)}static formatTransforms(e){let 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,i=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,s=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,c=e.shear||0,l=e.rotate||e.theta||0,u=new Ki(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),d=u.x,f=u.y,p=new Ki(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,h=p.y,g=new Ki(e.translate||e.tx||e.translateX,e.ty||e.translateY),_=g.x,v=g.y,y=new Ki(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:o,scaleY:s,skewX:i,skewY:a,shear:c,theta:l,rx:y.x,ry:y.y,tx:_,ty:v,ox:d,oy:f,px:m,py:h}}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){let r=e.a*t.a+e.c*t.b,i=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,s=e.e+e.a*t.e+e.c*t.f,c=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=i,n.c=a,n.d=o,n.e=s,n.f=c,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){let r=e||0,i=t||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new e(this)}decompose(e=0,t=0){let n=this.a,r=this.b,i=this.c,a=this.d,o=this.e,s=this.f,c=n*a-r*i,l=c>0?1:-1,u=l*Math.sqrt(n*n+r*r),d=Math.atan2(l*r,l*n),f=180/Math.PI*d,p=Math.cos(d),m=Math.sin(d),h=(n*i+r*a)/c,g=i*u/(h*n-r)||a*u/(h*r+n);return{scaleX:u,scaleY:g,shear:h,rotate:f,translateX:o-e+e*p*u+t*(h*p*u-m*g),translateY:s-t+e*m*u+t*(h*m*u+p*g),originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;let n=new e(t);return Gn(this.a,n.a)&&Gn(this.b,n.b)&&Gn(this.c,n.c)&&Gn(this.d,n.d)&&Gn(this.e,n.e)&&Gn(this.f,n.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(t){let n=e.fromArray([1,0,0,1,0,0]);return t=t instanceof oa?t.matrixify():typeof t==`string`?e.fromArray(t.split(Ui).map(parseFloat)):Array.isArray(t)?e.fromArray(t):typeof t==`object`&&e.isMatrixLike(t)?t:typeof t==`object`?new e().transform(t):arguments.length===6?e.fromArray([].slice.call(arguments)):n,this.a=t.a==null?n.a:t.a,this.b=t.b==null?n.b:t.b,this.c=t.c==null?n.c:t.c,this.d=t.d==null?n.d:t.d,this.e=t.e==null?n.e:t.e,this.f=t.f==null?n.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){let e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,a=this.f,o=e*r-t*n;if(!o)throw Error(`Cannot invert `+this);let s=r/o,c=-t/o,l=-n/o,u=e/o,d=-(s*i+l*a),f=-(c*i+u*a);return this.a=s,this.b=c,this.c=l,this.d=u,this.e=d,this.f=f,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(t){let n=this,r=t instanceof e?t:new e(t);return e.matrixMultiply(r,n,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(t){let n=this,r=t instanceof e?t:new e(t);return e.matrixMultiply(n,r,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=Qt(e);let r=Math.cos(e),i=Math.sin(e),{a,b:o,c:s,d:c,e:l,f:u}=this;return this.a=a*r-o*i,this.b=o*r+a*i,this.c=s*r-c*i,this.d=c*r+s*i,this.e=l*r-u*i+n*i-t*r+t,this.f=u*r+l*i-t*i-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);let{a:i,b:a,c:o,d:s,e:c,f:l}=this;return this.a=i*e,this.b=a*t,this.c=o*e,this.d=s*t,this.e=c*e-n*e+n,this.f=l*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){let{a:r,b:i,c:a,d:o,e:s,f:c}=this;return this.a=r+i*e,this.c=a+o*e,this.e=s+c*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=Qt(e),t=Qt(t);let i=Math.tan(e),a=Math.tan(t),{a:o,b:s,c,d:l,e:u,f:d}=this;return this.a=o+s*i,this.b=s+o*a,this.c=c+l*i,this.d=l+c*a,this.e=u+d*i-r*i,this.f=d+u*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(t){if(e.isMatrixLike(t))return new e(t).multiplyO(this);let n=e.formatTransforms(t),r=this,{x:i,y:a}=new Ki(n.ox,n.oy).transform(r),o=new e().translateO(n.rx,n.ry).lmultiplyO(r).translateO(-i,-a).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(i,a);if(isFinite(n.px)||isFinite(n.py)){let e=new Ki(i,a).transform(o),t=isFinite(n.px)?n.px-e.x:0,r=isFinite(n.py)?n.py-e.y:0;o.translateO(t,r)}return o.translateO(n.tx,n.ty),o}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}}},A(qi,`Matrix`),Ji=class e{constructor(...e){this.init(...e)}addOffset(){return this.x+=Ei.window.pageXOffset,this.y+=Ei.window.pageYOffset,new e(this)}init(e){return e=typeof e==`string`?e.split(Ui).map(parseFloat):Array.isArray(e)?e:typeof e==`object`?[e.left==null?e.x:e.left,e.top==null?e.y:e.top,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],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 Yn(this)}merge(t){let n=Math.min(this.x,t.x),r=Math.min(this.y,t.y);return new e(n,r,Math.max(this.x+this.width,t.x+t.width)-n,Math.max(this.y+this.height,t.y+t.height)-r)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+` `+this.y+` `+this.width+` `+this.height}transform(t){t instanceof qi||(t=new qi(t));let n=1/0,r=-1/0,i=1/0,a=-1/0;return[new Ki(this.x,this.y),new Ki(this.x2,this.y),new Ki(this.x,this.y2),new Ki(this.x2,this.y2)].forEach(function(e){e=e.transform(t),n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y)}),new e(n,i,r-n,a-i)}},k({viewbox:{viewbox(e,t,n,r){return e==null?new Ji(this.attr(`viewBox`)):this.attr(`viewBox`,new Ji(e,t,n,r))},zoom(e,t){let{width:n,height:r}=this.attr([`width`,`height`]);if((!n&&!r||typeof n==`string`||typeof r==`string`)&&(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw Error(`Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element`);let i=this.viewbox(),a=n/i.width,o=r/i.height,s=Math.min(a,o);if(e==null)return s;let c=s/e;c===1/0&&(c=(2**53-1)/100),t||=new Ki(n/2/a+i.x,r/2/o+i.y);let l=new Ji(i).transform(new qi({scale:c,origin:t}));return this.viewbox(l)}}}),A(Ji,`Box`),Yi=class extends Array{constructor(e=[],...t){if(super(e,...t),typeof e==`number`)return this;this.length=0,this.push(...e)}},j([Yi],{each(e,...t){return typeof e==`function`?this.map((t,n,r)=>e.call(t,t,n,r)):this.map(n=>n[e](...t))},toArray(){return Array.prototype.concat.apply([],this)}}),Xi=[`toArray`,`constructor`,`each`],Yi.extend=function(e){e=e.reduce((e,t)=>(Xi.includes(t)||t[0]===`_`||(e[t]=function(...e){return this.each(t,...e)}),e),{}),j([Yi],e)},Zi=0,Qi={},$i=class extends Di{addEventListener(){}dispatch(e,t,n){return lr(this,e,t,n)}dispatchEvent(e){let t=this.getEventHolder().events;if(!t)return!0;let n=t[e.type];for(let t in n)for(let r in n[t])n[t][r](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 cr(this,e,t,n),this}on(e,t,n,r){return sr(this,e,t,n,r),this}removeEventListener(){}},A($i,`EventTarget`),ea={duration:400,ease:`>`,delay:0},ta={"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`},na=class 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(Ui).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(` `)}valueOf(){let e=[];return e.push(...this),e}},ra=class e{constructor(...e){this.init(...e)}convert(t){return new e(this.value,t)}divide(t){return t=new e(t),new e(this/t,this.unit||t.unit)}init(t,n){return n=Array.isArray(t)?t[1]:n,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=n||``,typeof t==`number`?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:typeof t==`string`?(n=t.match(Mi),n&&(this.value=parseFloat(n[1]),n[5]===`%`?this.value/=100:n[5]===`s`&&(this.value*=1e3),this.unit=n[5])):t instanceof e&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new e(t),new e(this-t,this.unit||t.unit)}plus(t){return t=new e(t),new e(this+t,this.unit||t.unit)}times(t){return t=new e(t),new e(this*t,this.unit||t.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}},ia=[],aa=class e extends $i{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=on(e),e.removeNamespace&&this.node instanceof Ei.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 on(e).put(this,t)}children(){return new Yi(Xt(this.node.children,function(e){return cn(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=dn(n)),new this.constructor(n)}each(e,t){let n=this.children(),r,i;for(r=0,i=n.length;r<i;r++)e.apply(n[r],[r,n]),t&&n[r].each(e,t);return this}element(t,n){return this.put(new e(an(t),n))}first(){return cn(this.node.firstChild)}get(e){return cn(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,Si)}id(e){return e===void 0&&!this.node.id&&(this.node.id=un(this.type)),this.attr(`id`,e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return cn(this.node.lastChild)}matches(e){let 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=cn(t.node.parentNode),!e)return t;do if(typeof e==`string`?t.matches(e):t instanceof e)return t;while(t=cn(t.node.parentNode));return t}put(e,t){return e=on(e),this.add(e,t),e}putIn(e,t){return on(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=on(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){let n=10**e,r=this.attr(t);for(let e in r)typeof r[e]==`number`&&(r[e]=Math.round(r[e]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,xi)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){let t=this.parent();if(!t)return this.addTo(e);let 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??=!0,this.writeDataToDom();let n=this;if(e!=null){if(n=cn(n.node.cloneNode(!0)),t){let t=e(n);if(n=t||n,t===!1)return``}n.each(function(){let t=e(this),n=t||this;t===!1?this.remove():t&&this!==n&&this.replace(n)},!0)}return t?n.node.outerHTML:n.node.innerHTML}t??=!1;let r=an(`wrapper`,n),i=Ei.document.createDocumentFragment();r.innerHTML=e;for(let e=r.children.length;e--;)i.appendChild(r.firstElementChild);let a=this.parent();return t?this.replace(i)&&a:this.add(i)}},j(aa,{attr:fr,find:nr,findOne:rr}),A(aa,`Dom`),oa=class extends aa{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(){let e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new ra(e).plus(this.x()))}dy(e=0){return this.y(new ra(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()){let t=typeof e==`string`;t||(e=on(e));let n=new Yi,r=this;for(;(r=r.parent())&&r.node!==Ei.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;let t=(e+``).match(Fi);return t?on(t[1]):null}root(){let e=this.parent(ln(ki));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){let n=nn(this,e,t);return this.width(new ra(n.width)).height(new ra(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)}},j(oa,{bbox:Qn,rbox:$n,inside:er,point:Wn,ctm:Kn,screenCTM:qn}),A(oa,`Element`),sa={stroke:[`color`,`width`,`opacity`,`linecap`,`linejoin`,`miterlimit`,`dasharray`,`dashoffset`],fill:[`color`,`opacity`,`rule`],prefix:function(e,t){return t===`color`?e:e+`-`+t}},[`fill`,`stroke`].forEach(function(e){let t={},n;t[e]=function(t){if(t===void 0)return this.attr(e);if(typeof t==`string`||t instanceof Gi||Gi.isRgb(t)||t instanceof oa)this.attr(e,t);else for(n=sa[e].length-1;n>=0;n--)t[sa[e][n]]!=null&&this.attr(sa.prefix(e,sa[e][n]),t[sa[e][n]]);return this},k([`Element`,`Runner`],t)}),k([`Element`,`Runner`],{matrix:function(e,t,n,r,i,a){return e==null?new qi(this):this.attr(`transform`,new qi(e,t,n,r,i,a))},rotate:function(e,t,n){return this.transform({rotate:e,ox:t,oy:n},!0)},skew:function(e,t,n,r){return arguments.length===1||arguments.length===3?this.transform({skew:e,ox:t,oy:n},!0):this.transform({skew:[e,t],ox:n,oy:r},!0)},shear:function(e,t,n){return this.transform({shear:e,ox:t,oy:n},!0)},scale:function(e,t,n,r){return arguments.length===1||arguments.length===3?this.transform({scale:e,ox:t,oy:n},!0):this.transform({scale:[e,t],ox:n,oy:r},!0)},translate:function(e,t){return this.transform({translate:[e,t]},!0)},relative:function(e,t){return this.transform({relative:[e,t]},!0)},flip:function(e=`both`,t=`center`){return`xybothtrue`.indexOf(e)===-1&&(t=e,e=`both`),this.transform({flip:e,origin:t},!0)},opacity:function(e){return this.attr(`opacity`,e)}}),k(`radius`,{radius:function(e,t=e){return(this._element||this).type===`radialGradient`?this.attr(`r`,new ra(e)):this.rx(e).ry(t)}}),k(`Path`,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return new Ki(this.node.getPointAtLength(e))}}),k([`Element`,`Runner`],{font:function(e,t){if(typeof e==`object`){for(t in e)this.font(t,e[t]);return this}return e===`leading`?this.leading(t):e===`anchor`?this.attr(`text-anchor`,t):e===`size`||e===`family`||e===`weight`||e===`stretch`||e===`variant`||e===`style`?this.attr(`font-`+e,t):this.attr(e,t)}}),k(`Element`,[`click`,`dblclick`,`mousedown`,`mouseup`,`mouseover`,`mouseout`,`mousemove`,`mouseenter`,`mouseleave`,`touchstart`,`touchmove`,`touchleave`,`touchend`,`touchcancel`].reduce(function(e,t){return e[t]=function(e){return e===null?this.off(t):this.on(t,e),this},e},{})),k(`Element`,{untransform:pr,matrixify:mr,toParent:hr,toRoot:gr,transform:_r}),ca=class e extends oa{flatten(t=this,n){return this.each(function(){if(this instanceof e)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()}},A(ca,`Container`),la=class extends ca{constructor(e,t=e){super(sn(`defs`,e),t)}flatten(){return this}ungroup(){return this}},A(la,`Defs`),ua=class extends oa{},A(ua,`Shape`),da={__proto__:null,rx:vr,ry:yr,x:br,y:xr,cx:Sr,cy:Cr,width:wr,height:Tr},fa=class extends ua{constructor(e,t=e){super(sn(`ellipse`,e),t)}size(e,t){let n=nn(this,e,t);return this.rx(new ra(n.width).divide(2)).ry(new ra(n.height).divide(2))}},j(fa,da),k(`Container`,{ellipse:fn(function(e=0,t=e){return this.put(new fa).size(e,t).move(0,0)})}),A(fa,`Ellipse`),pa=class extends aa{constructor(e=Ei.document.createDocumentFragment()){super(e)}xml(e,t,n){if(typeof e==`boolean`&&(n=t,t=e,e=null),e==null||typeof e==`function`){let e=new aa(an(`wrapper`,n));return e.add(this.node.cloneNode(!0)),e.xml(!1,n)}return super.xml(e,!1,n)}},A(pa,`Fragment`),ma={__proto__:null,from:Er,to:Dr},ha=class extends ca{constructor(e,t){super(sn(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 Ji}targets(){return tr(`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()+`)`}},j(ha,ma),k({Container:{gradient(...e){return this.defs().gradient(...e)}},Defs:{gradient:fn(function(e,t){return this.put(new ha(e)).update(t)})}}),A(ha,`Gradient`),ga=class extends ca{constructor(e,t=e){super(sn(`pattern`,e),t)}attr(e,t,n){return e===`transform`&&(e=`patternTransform`),super.attr(e,t,n)}bbox(){return new Ji}targets(){return tr(`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()+`)`}},k({Container:{pattern(...e){return this.defs().pattern(...e)}},Defs:{pattern:fn(function(e,t,n){return this.put(new ga).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:`userSpaceOnUse`})})}}),A(ga,`Pattern`),_a=class extends ua{constructor(e,t=e){super(sn(`image`,e),t)}load(e,t){if(!e)return this;let n=new Ei.window.Image;return sr(n,`load`,function(e){let r=this.parent(ga);this.width()===0&&this.height()===0&&this.size(n.width,n.height),r instanceof ga&&r.width()===0&&r.height()===0&&r.size(this.width(),this.height()),typeof t==`function`&&t.call(this,e)},this),sr(n,`load error`,function(){cr(n)}),this.attr(`href`,n.src=e,wi)}},dr(function(e,t,n){return(e===`fill`||e===`stroke`)&&Hi.test(t)&&(t=n.root().defs().image(t)),t instanceof _a&&(t=n.root().defs().pattern(0,0,e=>{e.add(t)})),t}),k({Container:{image:fn(function(e,t){return this.put(new _a).size(0,0).load(e,t)})}}),A(_a,`Image`),va=class extends na{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach(function(i){e=Math.max(i[0],e),t=Math.max(i[1],t),n=Math.min(i[0],n),r=Math.min(i[1],r)}),new Ji(n,r,e-n,t-r)}move(e,t){let n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+e,this[n][1]+t];return this}parse(e=[0,0]){let t=[];e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Ui).map(parseFloat),e.length%2!=0&&e.pop();for(let n=0,r=e.length;n<r;n+=2)t.push([e[n],e[n+1]]);return t}size(e,t){let n,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(){let 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){qi.isMatrixLike(e)||(e=new qi(e));for(let t=this.length;t--;){let[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}},ya=va,ba={__proto__:null,MorphArray:ya,x:Or,y:kr,width:Ar,height:jr},xa=class extends ua{constructor(e,t=e){super(sn(`line`,e),t)}array(){return new va([[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():(e=t===void 0?new va(e).toLine():{x1:e,y1:t,x2:n,y2:r},this.attr(e))}size(e,t){let n=nn(this,e,t);return this.attr(this.array().size(n.width,n.height).toLine())}},j(xa,ba),k({Container:{line:fn(function(...e){return xa.prototype.plot.apply(this.put(new xa),e[0]==null?[0,0,0,0]:e)})}}),A(xa,`Line`),Sa=class extends ca{constructor(e,t=e){super(sn(`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)}},k({Container:{marker(...e){return this.defs().marker(...e)}},Defs:{marker:fn(function(e,t,n){return this.put(new Sa).size(e,t).ref(e/2,t/2).viewbox(0,0,e,t).attr(`orient`,`auto`).update(n)})},marker:{marker(e,t,n,r){let i=[`marker`];return e!==`all`&&i.push(e),i=i.join(`-`),e=arguments[1]instanceof Sa?arguments[1]:this.defs().marker(t,n,r),this.attr(i,e)}}}),A(Sa,`Marker`),Ca={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return-Math.cos(e*Math.PI/2)+1},bezier:function(e,t,n,r){return function(i){return i<0?e>0?t/e*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):e<1?(1-t)/(1-e)*i+(t-e)/(1-e):1:3*i*(1-i)**2*t+3*i**2*(1-i)*r+i**3}},steps:function(e,t=`end`){t=t.split(`-`).reverse()[0];let n=e;return t===`none`?--n:t===`both`&&++n,(r,i=!1)=>{let a=Math.floor(r*e),o=r*a%1==0;return(t===`start`||t===`both`)&&++a,i&&o&&--a,r>=0&&a<0&&(a=0),r<=1&&a>n&&(a=n),a/n}}},wa=class{done(){return!1}},Ta=class extends wa{constructor(e=ea.ease){super(),this.ease=Ca[e]||e}step(e,t,n){return typeof e==`number`?e+(t-e)*this.ease(n):n<1?e:t}},Ea=class extends wa{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}},Da=class 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;let i=r.velocity||0,a=-this.d*i-this.k*(e-t),o=e+i*n+a*n*n/2;return r.velocity=i+a*n,r.done=Math.abs(t-o)+Math.abs(i)<.002,r.done?t:o}},j(Da,{duration:Mr(`_duration`,Nr),overshoot:Mr(`_overshoot`,Nr)}),Oa=class 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;let i=t-e,a=(r.integral||0)+i*n,o=(i-(r.error||0))/n,s=this._windup;return s!==!1&&(a=Math.max(-s,Math.min(a,s))),r.error=i,r.integral=a,r.done=Math.abs(i)<.001,r.done?t:e+(this.P*i+this.I*a+this.D*o)}},j(Oa,{windup:Mr(`_windup`),p:Mr(`P`),i:Mr(`I`),d:Mr(`D`)}),ka={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Aa={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],[`M`,t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],[`L`,e[0],e[1]]},H:function(e,t){return t.x=e[0],[`H`,e[0]]},V:function(e,t){return t.y=e[0],[`V`,e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],[`C`,e[0],e[1],e[2],e[3],e[4],e[5]]},S:function(e,t){return t.x=e[2],t.y=e[3],[`S`,e[0],e[1],e[2],e[3]]},Q:function(e,t){return t.x=e[2],t.y=e[3],[`Q`,e[0],e[1],e[2],e[3]]},T:function(e,t){return t.x=e[0],t.y=e[1],[`T`,e[0],e[1]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,[`Z`]},A:function(e,t){return t.x=e[5],t.y=e[6],[`A`,e[0],e[1],e[2],e[3],e[4],e[5],e[6]]}},ja=`mlhvqtcsaz`.split(``);for(let e=0,t=ja.length;e<t;++e)Aa[ja[e]]=function(e){return function(t,n,r){if(e===`H`)t[0]+=n.x;else if(e===`V`)t[0]+=n.y;else if(e===`A`)t[5]+=n.x,t[6]+=n.y;else for(let e=0,r=t.length;e<r;++e)t[e]=t[e]+(e%2?n.y:n.x);return Aa[e](t,n,r)}}(ja[e].toUpperCase());Ma=class extends na{bbox(){return Jn().path.setAttribute(`d`,this.toString()),new Ji(Jn.nodes.path.getBBox())}move(e,t){let n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],n===`M`||n===`L`||n===`T`?(this[r][1]+=e,this[r][2]+=t):n===`H`?this[r][1]+=e:n===`V`?this[r][1]+=t:n===`C`||n===`S`||n===`Q`?(this[r][1]+=e,this[r][2]+=t,this[r][3]+=e,this[r][4]+=t,n===`C`&&(this[r][5]+=e,this[r][6]+=t)):n===`A`&&(this[r][6]+=e,this[r][7]+=t);return this}parse(e=`M0 0`){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),Vr(e)}size(e,t){let n=this.bbox(),r,i;for(n.width=n.width===0?1:n.width,n.height=n.height===0?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],i===`M`||i===`L`||i===`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):i===`H`?this[r][1]=(this[r][1]-n.x)*e/n.width+n.x:i===`V`?this[r][1]=(this[r][1]-n.y)*t/n.height+n.y:i===`C`||i===`S`||i===`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,i===`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)):i===`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 Hr(this)}},Na=e=>{let t=typeof e;return t===`number`?ra:t===`string`?Gi.isColor(e)?Gi:Ui.test(e)?Wi.test(e)?Ma:na:Mi.test(e)?ra:Fa:za.indexOf(e.constructor)>-1?e.constructor:Array.isArray(e)?na:t===`object`?Ra:Fa},Pa=class{constructor(e){this._stepper=e||new Ta(`-`),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(e,t){return e&&t},!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(Na(e));let t=new this._type(e);return this._type===Gi&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===Ra&&(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(e){return e.done=!0,e}),t}},Fa=class{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}},Ia=class e{constructor(...e){this.init(...e)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t),this}toArray(){let e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}},Ia.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0},La=(e,t)=>e[0]<t[0]?-1:+(e[0]>t[0]),Ra=class{constructor(...e){this.init(...e)}align(e){let t=this.values;for(let n=0,r=t.length;n<r;++n){if(t[n+1]===e[n+1]){if(t[n+1]===Gi&&e[n+7]!==t[n+7]){let t=e[n+7],r=new Gi(this.values.splice(n+3,5))[t]().toArray();this.values.splice(n+3,0,...r)}n+=t[n+2]+2;continue}if(!e[n+1])return this;let r=new e[n+1]().toArray(),i=t[n+2]+3;t.splice(n,i,e[n],e[n+1],e[n+2],...r),n+=t[n+2]+2}return this}init(e){if(this.values=[],Array.isArray(e)){this.values=e.slice();return}e||={};let t=[];for(let n in e){let r=Na(e[n]),i=new r(e[n]).toArray();t.push([n,r,i.length,...i])}return t.sort(La),this.values=t.reduce((e,t)=>e.concat(t),[]),this}toArray(){return this.values}valueOf(){let e={},t=this.values;for(;t.length;){let n=t.shift(),r=t.shift(),i=t.shift();e[n]=new r(t.splice(0,i))}return e}},za=[Fa,Ia,Ra],Ba=class extends ua{constructor(e,t=e){super(sn(`path`,e),t)}array(){return this._array||=new Ma(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 Ma(e))}size(e,t){let n=nn(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)}},Ba.prototype.MorphArray=Ma,k({Container:{path:fn(function(e){return this.put(new Ba).plot(e||new Ma)})}}),A(Ba,`Path`),Va={__proto__:null,array:Gr,clear:Kr,move:qr,plot:Jr,size:Yr},Ha=class extends ua{constructor(e,t=e){super(sn(`polygon`,e),t)}},k({Container:{polygon:fn(function(e){return this.put(new Ha).plot(e||new va)})}}),j(Ha,ba),j(Ha,Va),A(Ha,`Polygon`),Ua=class extends ua{constructor(e,t=e){super(sn(`polyline`,e),t)}},k({Container:{polyline:fn(function(e){return this.put(new Ua).plot(e||new va)})}}),j(Ua,ba),j(Ua,Va),A(Ua,`Polyline`),Wa=class extends ua{constructor(e,t=e){super(sn(`rect`,e),t)}},j(Wa,{rx:vr,ry:yr}),k({Container:{rect:fn(function(e,t){return this.put(new Wa).size(e,t)})}}),A(Wa,`Rect`),Ga=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){let t=e.next===void 0?{value:e,next:null,prev:null}:e;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(){let 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}},Ka={nextDraw:null,frames:new Ga,timeouts:new Ga,immediates:new Ga,timer:()=>Ei.window.performance||Ei.window.Date,transforms:[],frame(e){let t=Ka.frames.push({run:e});return Ka.nextDraw===null&&(Ka.nextDraw=Ei.window.requestAnimationFrame(Ka._draw)),t},timeout(e,t){t||=0;let n=Ka.timer().now()+t,r=Ka.timeouts.push({run:e,time:n});return Ka.nextDraw===null&&(Ka.nextDraw=Ei.window.requestAnimationFrame(Ka._draw)),r},immediate(e){let t=Ka.immediates.push(e);return Ka.nextDraw===null&&(Ka.nextDraw=Ei.window.requestAnimationFrame(Ka._draw)),t},cancelFrame(e){e!=null&&Ka.frames.remove(e)},clearTimeout(e){e!=null&&Ka.timeouts.remove(e)},cancelImmediate(e){e!=null&&Ka.immediates.remove(e)},_draw(e){let t=null,n=Ka.timeouts.last();for(;(t=Ka.timeouts.shift())&&(e>=t.time?t.run():Ka.timeouts.push(t),t!==n););let r=null,i=Ka.frames.last();for(;r!==i&&(r=Ka.frames.shift());)r.run(e);let a=null;for(;a=Ka.immediates.shift();)a();Ka.nextDraw=Ka.timeouts.first()||Ka.frames.first()?Ei.window.requestAnimationFrame(Ka._draw):null}},qa=function(e){let t=e.start,n=e.runner.duration();return{start:t,duration:n,end:t+n,runner:e.runner}},Ja=function(){let e=Ei.window;return(e.performance||e.Date).now()},Ya=class extends $i{constructor(e=Ja){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(){let e=this.getLastRunnerInfo(),t=e?e.runner.duration():0;return(e?e.start:this._time)+t}getEndTimeOfTimeline(){let e=this._runners.map(e=>e.start+e.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){let t=this.speed();if(e==null)return this.speed(-t);let n=Math.abs(t);return this.speed(e?-n:n)}schedule(e,t,n){if(e==null)return this._runners.map(qa);let r=0,i=this.getEndTime();if(t||=0,n==null||n===`last`||n===`after`)r=i;else if(n===`absolute`||n===`start`)r=t,t=0;else if(n===`now`)r=this._time;else if(n===`relative`){let n=this.getRunnerInfoById(e.id);n&&(r=n.start+t,t=0)}else if(n===`with-last`){let e=this.getLastRunnerInfo();r=e?e.start:this._time}else throw Error(`Invalid value for the "when" parameter`);e.unschedule(),e.timeline(this);let 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((e,t)=>e.start-t.start),this._runnerIds=this._runners.map(e=>e.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){let 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 Ka.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Ka.frame(this._step)),this)}_stepFn(e=!1){let t=this._timeSource(),n=t-this._lastSourceTime;e&&(n=0);let 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 e=this._runners.length;e--;){let t=this._runners[e],n=t.runner;this._time-t.start<=0&&n.reset()}let i=!1;for(let e=0,t=this._runners.length;e<t;e++){let n=this._runners[e],a=n.runner,o=r,s=this._time-n.start;if(s<=0){i=!0;continue}else s<o&&(o=s);a.active()&&(a.step(o).done?n.persist!==!0&&a.duration()-a.time()+this._time+n.persist<this._time&&(a.unschedule(),--e,--t):i=!0)}return i&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire(`finished`)),this}},k({Element:{timeline:function(e){return e==null?(this._timeline=this._timeline||new Ya,this._timeline):(this._timeline=e,this)}}}),Xa=class e extends $i{constructor(t){super(),this.id=e.id++,t??=ea.duration,t=typeof t==`function`?new Ea(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof t==`number`&&t,this._isDeclarative=t instanceof Ea,this._stepper=this._isDeclarative?t:new Ta,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new qi,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,i=!1,a=0;return e||=ea.duration,t||=ea.delay,n||=`last`,typeof e==`object`&&!(e instanceof wa)&&(t=e.delay||t,n=e.when||n,i=e.swing||i,r=e.times||r,a=e.wait||a,e=e.duration||ea.duration),{duration:e,delay:t,swing:i,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(t,n,r){let i=e.sanitise(t,n,r),a=new e(i.duration);return this._timeline&&a.timeline(this._timeline),this._element&&a.element(this._element),a.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new qi,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 Ta(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){let t=this._duration+this._wait;if(e==null){let e=Math.floor(this._time/t),n=(this._time-e*t)/this._duration;return Math.min(e+n,this._times)}let n=Math.floor(e),r=e%1,i=t*n+this._duration*r;return this.time(i)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){let t=this._time,n=this._duration,r=this._wait,i=this._times,a=this._swing,o=this._reverse,s;if(e==null){let e=function(e){let t=a*Math.floor(e%(2*(r+n))/(r+n)),i=t&&!o||!t&&o,s=(-1)**i*(e%(r+n))/n+i;return Math.max(Math.min(s,1),0)},c=i*(r+n)-r;return s=t<=0?Math.round(e(1e-5)):t<c?e(t):Math.round(e(c-1e-5)),s}let c=Math.floor(this.loops()),l=a&&c%2==0;return s=c+(l&&!o||o&&l?e:1-e),this.loops(s)}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||ur,runner:t||ur,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 Ya||(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??=16,this._time+=e;let t=this.position(),n=this._lastPosition!==t&&this._time>=0;this._lastPosition=t;let r=this.duration(),i=this._lastTime<=0&&this._time>0,a=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire(`start`,this);let o=this._isDeclarative;this.done=!o&&!a&&this._time>=r,this._reseted=!1;let s=!1;return(n||o)&&(this._initialise(n),this.transforms=new qi,s=this._run(o?e:t),this.fire(`step`,this)),this.done=this.done||s&&o,a&&this.fire(`finished`,this),this}time(e){if(e==null)return this._time;let t=e-this._time;return this.step(t),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){let 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){let n=this._queue[t],r=this._isDeclarative||!n.initialised&&e;e=!n.finished,r&&e&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(e,t){if(this._history[e]={morpher:t,caller:this._queue[this._queue.length-1]},this._isDeclarative){let e=this.timeline();e&&e.play()}}_run(e){let t=!0;for(let n=0,r=this._queue.length;n<r;++n){let r=this._queue[n],i=r.runner.call(this,e);r.finished=r.finished||i===!0,t&&=r.finished}return t}_tryRetarget(e,t,n){if(this._history[e]){if(!this._history[e].caller.initialised){let t=this._queue.indexOf(this._history[e].caller);return this._queue.splice(t,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;let r=this.timeline();return r&&r.play(),!0}return!1}},Xa.id=0,Za=class{constructor(e=new qi,t=-1,n=!0){this.transforms=e,this.id=t,this.done=n}clearTransformsFromQueue(){}},j([Xa,Za],{mergeWith(e){return new Za(e.transforms.lmultiply(this.transforms),e.id)}}),Qa=(e,t)=>e.lmultiplyO(t),$a=e=>e.transforms,eo=class{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;let t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){let t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new Za).forEach(e=>e.clearTransformsFromQueue()),this}edit(e,t){let 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){let 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);let r=n.mergeWith(e);this.edit(e.id,r),e=r,--t}else e=n}return this}remove(e){let t=this.ids.indexOf(e+1);return this.ids.splice(t,1),this.runners.splice(t,1),this}},k({Element:{animate(e,t,n){let r=Xa.sanitise(e,t,n),i=this.timeline();return new Xa(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(e,t){return this.animate(0,e,t)},_clearTransformRunnersBefore(e){this._transformationRunners.clearBefore(e.id)},_currentTransform(e){return this._transformationRunners.runners.filter(t=>t.id<=e.id).map($a).reduce(Qa,new qi)},_addRunner(e){this._transformationRunners.add(e),Ka.cancelImmediate(this._frameId),this._frameId=Ka.immediate(Xr.bind(this))},_prepareRunner(){this._frameId??(this._transformationRunners=new eo().add(new Za(new qi(this))))}}}),to=(e,t)=>e.filter(e=>!t.includes(e)),j(Xa,{attr(e,t){return this.styleAttr(`attr`,e,t)},css(e,t){return this.styleAttr(`css`,e,t)},styleAttr(e,t,n){if(typeof t==`string`)return this.styleAttr(e,{[t]:n});let r=t;if(this._tryRetarget(e,r))return this;let i=new Pa(this._stepper).to(r),a=Object.keys(r);return this.queue(function(){i=i.from(this.element()[e](a))},function(t){return this.element()[e](i.at(t).valueOf()),i.done()},function(t){let n=Object.keys(t),o=to(n,a);if(o.length){let t=this.element()[e](o),n=new Ra(i.from()).valueOf();Object.assign(n,t),i.from(n)}let s=new Ra(i.to()).valueOf();Object.assign(s,t),i.to(s),a=n,r=t}),this._rememberMorpher(e,i),this},zoom(e,t){if(this._tryRetarget(`zoom`,e,t))return this;let n=new Pa(this._stepper).to(new ra(e));return this.queue(function(){n=n.from(this.element().zoom())},function(e){return this.element().zoom(n.at(e),t),n.done()},function(e,r){t=r,n.to(e)}),this._rememberMorpher(`zoom`,n),this},transform(e,t,n){if(t=e.relative||t,this._isDeclarative&&!t&&this._tryRetarget(`transform`,e))return this;let r=qi.isMatrixLike(e);n=e.affine==null?n??!r:e.affine;let i=new Pa(this._stepper).type(n?Ia:qi),a,o,s,c,l;function u(){o||=this.element(),a||=rn(e,o),l=new qi(t?void 0:o),o._addRunner(this),t||o._clearTransformRunnersBefore(this)}function d(u){t||this.clearTransform();let{x:d,y:f}=new Ki(a).transform(o._currentTransform(this)),p=new qi({...e,origin:[d,f]}),m=this._isDeclarative&&s?s:l;if(n){p=p.decompose(d,f),m=m.decompose(d,f);let e=p.rotate,t=m.rotate,n=[e-360,e,e+360],r=n.map(e=>Math.abs(e-t)),i=Math.min(...r),a=r.indexOf(i);p.rotate=n[a]}t&&(r||(p.rotate=e.rotate||0),this._isDeclarative&&c&&(m.rotate=c)),i.from(m),i.to(p);let h=i.at(u);return c=h.rotate,s=new qi(h),this.addTransform(s),o._addRunner(this),i.done()}function f(t){(t.origin||`center`).toString()!==(e.origin||`center`).toString()&&(a=rn(t,o)),e={...t,origin:a}}return this.queue(u,d,f,!0),this._isDeclarative&&this._rememberMorpher(`transform`,i),this},x(e,t){return this._queueNumber(`x`,e)},y(e){return this._queueNumber(`y`,e)},dx(e=0){return this._queueNumberDelta(`x`,e)},dy(e=0){return this._queueNumberDelta(`y`,e)},dmove(e,t){return this.dx(e).dy(t)},_queueNumberDelta(e,t){if(t=new ra(t),this._tryRetarget(e,t))return this;let n=new Pa(this._stepper).to(t),r=null;return this.queue(function(){r=this.element()[e](),n.from(r),n.to(r+t)},function(t){return this.element()[e](n.at(t)),n.done()},function(e){n.to(r+new ra(e))}),this._rememberMorpher(e,n),this},_queueObject(e,t){if(this._tryRetarget(e,t))return this;let n=new Pa(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber(e,t){return this._queueObject(e,new ra(t))},cx(e){return this._queueNumber(`cx`,e)},cy(e){return this._queueNumber(`cy`,e)},move(e,t){return this.x(e).y(t)},center(e,t){return this.cx(e).cy(t)},size(e,t){let n;return(!e||!t)&&(n=this._element.bbox()),e||=n.width/n.height*t,t||=n.height/n.width*e,this.width(e).height(t)},width(e){return this._queueNumber(`width`,e)},height(e){return this._queueNumber(`height`,e)},plot(e,t,n,r){if(arguments.length===4)return this.plot([e,t,n,r]);if(this._tryRetarget(`plot`,e))return this;let i=new Pa(this._stepper).type(this._element.MorphArray).to(e);return this.queue(function(){i.from(this._element.array())},function(e){return this._element.plot(i.at(e)),i.done()}),this._rememberMorpher(`plot`,i),this},leading(e){return this._queueNumber(`leading`,e)},viewbox(e,t,n,r){return this._queueObject(`viewbox`,new Ji(e,t,n,r))},update(e){return typeof e==`object`?(e.opacity!=null&&this.attr(`stop-opacity`,e.opacity),e.color!=null&&this.attr(`stop-color`,e.color),e.offset!=null&&this.attr(`offset`,e.offset),this):this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]})}}),j(Xa,{rx:vr,ry:yr,from:Er,to:Dr}),A(Xa,`Runner`),no=class extends ca{constructor(e,t=e){super(sn(`svg`,e),t),this.namespace()}defs(){return this.isRoot()?cn(this.node.querySelector(`defs`))||this.put(new la):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Ei.window.SVGElement)&&this.node.parentNode.nodeName!==`#document-fragment`}namespace(){return this.isRoot()?this.attr({xmlns:xi,version:`1.1`}).attr(`xmlns:xlink`,wi,Ci).attr(`xmlns:svgjs`,Ti,Ci):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr(`xmlns:xlink`,null,Ci).attr(`xmlns:svgjs`,null,Ci)}root(){return this.isRoot()?this:super.root()}},k({Container:{nested:fn(function(){return this.put(new no)})}}),A(no,`Svg`,!0),ro=class extends ca{constructor(e,t=e){super(sn(`symbol`,e),t)}},k({Container:{symbol:fn(function(){return this.put(new ro)})}}),A(ro,`Symbol`),io={__proto__:null,plain:Zr,length:Qr,x:$r,y:ei,move:ti,cx:ni,cy:ri,center:ii,ax:ai,ay:oi,amove:si,build:ci},ao=class extends ua{constructor(e,t=e){super(sn(`text`,e),t),this.dom.leading=new ra(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new ra(e),this.rebuild())}rebuild(e){if(typeof e==`boolean`&&(this._rebuild=e),this._rebuild){let e=this,t=0,n=this.dom.leading;this.each(function(r){let i=n*new ra(Ei.window.getComputedStyle(this.node).getPropertyValue(`font-size`));this.dom.newLined&&(this.attr(`x`,e.attr(`x`)),this.text()===`
|
|
24
|
+
`?t+=i:(this.attr(`dy`,r?i+t:0),t=0))}),this.fire(`rebuild`)}return this}setData(e){return this.dom=e,this.dom.leading=new ra(e.leading||1.3),this}text(e){if(e===void 0){let t=this.node.childNodes,n=0;e=``;for(let r=0,i=t.length;r<i;++r){if(t[r].nodeName===`textPath`){r===0&&(n=1);continue}r!==n&&t[r].nodeType!==3&&cn(t[r]).dom.newLined===!0&&(e+=`
|
|
25
|
+
`),e+=t[r].textContent}return e}if(this.clear().build(!0),typeof e==`function`)e.call(this,this);else{e=(e+``).split(`
|
|
26
|
+
`);for(let t=0,n=e.length;t<n;t++)this.newLine(e[t])}return this.build(!1).rebuild()}},j(ao,io),k({Container:{text:fn(function(e=``){return this.put(new ao).text(e)}),plain:fn(function(e=``){return this.put(new ao).plain(e)})}}),A(ao,`Text`),oo=class extends ua{constructor(e,t=e){super(sn(`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;let e=this.parent();if(!(e instanceof ao))return this;let t=e.index(this),n=Ei.window.getComputedStyle(this.node).getPropertyValue(`font-size`),r=e.dom.leading*new ra(n);return this.dy(t?r:0).attr(`x`,e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
|
|
27
|
+
`:``):(typeof e==`function`?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}},j(oo,io),k({Tspan:{tspan:fn(function(e=``){let t=new oo;return this._build||this.clear(),this.put(t).text(e)})},Text:{newLine:function(e=``){return this.tspan(e).newLine()}}}),A(oo,`Tspan`),so=class extends ua{constructor(e,t=e){super(sn(`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 ra(e).divide(2))}},j(so,{x:br,y:xr,cx:Sr,cy:Cr,width:wr,height:Tr}),k({Container:{circle:fn(function(e=0){return this.put(new so).size(e).move(0,0)})}}),A(so,`Circle`),co=class extends ca{constructor(e,t=e){super(sn(`clipPath`,e),t)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return tr(`svg [clip-path*=`+this.id()+`]`)}},k({Container:{clip:fn(function(){return this.defs().put(new co)})},Element:{clipper(){return this.reference(`clip-path`)},clipWith(e){let t=e instanceof co?e:this.parent().clip().add(e);return this.attr(`clip-path`,`url(#`+t.id()+`)`)},unclip(){return this.attr(`clip-path`,null)}}}),A(co,`ClipPath`),lo=class extends oa{constructor(e,t=e){super(sn(`foreignObject`,e),t)}},k({Container:{foreignObject:fn(function(e,t){return this.put(new lo).size(e,t)})}}),A(lo,`ForeignObject`),uo={__proto__:null,dmove:li,dx:ui,dy:di,height:fi,move:pi,size:mi,width:hi,x:gi,y:_i},fo=class extends ca{constructor(e,t=e){super(sn(`g`,e),t)}},j(fo,uo),k({Container:{group:fn(function(){return this.put(new fo)})}}),A(fo,`G`),po=class extends ca{constructor(e,t=e){super(sn(`a`,e),t)}target(e){return this.attr(`target`,e)}to(e){return this.attr(`href`,e,wi)}},j(po,uo),k({Container:{link:fn(function(e){return this.put(new po).to(e)})},Element:{unlink(){let e=this.linker();if(!e)return this;let t=e.parent();if(!t)return this.remove();let n=t.index(e);return t.add(this,n),e.remove(),this},linkTo(e){let t=this.linker();return t||(t=new po,this.wrap(t)),typeof e==`function`?e.call(t,t):t.to(e),this},linker(){let e=this.parent();return e&&e.node.nodeName.toLowerCase()===`a`?e:null}}}),A(po,`A`),mo=class extends ca{constructor(e,t=e){super(sn(`mask`,e),t)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return tr(`svg [mask*=`+this.id()+`]`)}},k({Container:{mask:fn(function(){return this.defs().put(new mo)})},Element:{masker(){return this.reference(`mask`)},maskWith(e){let t=e instanceof mo?e:this.parent().mask().add(e);return this.attr(`mask`,`url(#`+t.id()+`)`)},unmask(){return this.attr(`mask`,null)}}}),A(mo,`Mask`),ho=class extends oa{constructor(e,t=e){super(sn(`stop`,e),t)}update(e){return(typeof e==`number`||e instanceof ra)&&(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 ra(e.offset)),this}},k({Gradient:{stop:function(e,t,n){return this.put(new ho).update(e,t,n)}}}),A(ho,`Stop`),go=class extends oa{constructor(e,t=e){super(sn(`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(vi(e,t))}},k(`Dom`,{style(e,t){return this.put(new go).rule(e,t)},fontface(e,t,n){return this.put(new go).font(e,t,n)}}),A(go,`Style`),_o=class extends ao{constructor(e,t=e){super(sn(`textPath`,e),t)}array(){let e=this.track();return e?e.array():null}plot(e){let t=this.track(),n=null;return t&&(n=t.plot(e)),e==null?n:this}track(){return this.reference(`href`)}},k({Container:{textPath:fn(function(e,t){return e instanceof ao||(e=this.text(e)),e.path(t)})},Text:{path:fn(function(e,t=!0){let n=new _o;e instanceof Ba||(e=this.defs().path(e)),n.attr(`href`,`#`+e,wi);let r;if(t)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)}),textPath(){return this.findOne(`textPath`)}},Path:{text:fn(function(e){return e instanceof ao||(e=new ao().addTo(this.parent()).text(e)),e.path(this)}),targets(){return tr(`svg textPath`).filter(e=>(e.attr(`href`)||``).includes(this.id()))}}}),_o.prototype.MorphArray=Ma,A(_o,`TextPath`),vo=class extends ua{constructor(e,t=e){super(sn(`use`,e),t)}use(e,t){return this.attr(`href`,(t||``)+`#`+e,wi)}},k({Container:{use:fn(function(e,t){return this.put(new vo).use(e,t)})}}),A(vo,`Use`),yo=on,j([no,ro,_a,ga,Sa],qt(`viewbox`)),j([xa,Ua,Ha,Ba],qt(`marker`)),j(ao,qt(`Text`)),j(Ba,qt(`Path`)),j(la,qt(`Defs`)),j([ao,oo],qt(`Tspan`)),j([Wa,fa,ha,Xa],qt(`radius`)),j($i,qt(`EventTarget`)),j(aa,qt(`Dom`)),j(oa,qt(`Element`)),j(ua,qt(`Shape`)),j([ca,pa],qt(`Container`)),j(ha,qt(`Gradient`)),j(Xa,qt(`Runner`)),Yi.extend(Jt()),Ur([ra,Gi,Ji,qi,na,va,Ma,Ki]),Wr()})),xo,So,Co,wo,To=m((()=>{xo={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`}},So=`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`.split(`.`),Co=e=>{let t=Object.keys(e);for(let e=0;e<t.length;e++)if(!So.find(n=>n===t[e]))return!1;return!0},wo=[`lineColor`,`lineDasharray`,`lineWidth`,`lineMarkerDir`,`lineFlow`,`lineFlowDuration`,`lineFlowForward`]})),Eo,Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,M=m((()=>{Wt(),wt(),Kt(),bo(),Eo=v(jt()),To(),Do=(e,t,n,r,i,a=0,o=0,s=[])=>{let c=!1;if(n&&(c=n(e,t,i,a,o,s)),!c&&e.children&&e.children.length>0){let t=a+1;e.children.forEach((i,a)=>{Do(i,e,n,r,!1,t,a,[...s,e])})}r&&r(e,t,i,a,o,s)},Oo=(e,t)=>{let n=[e],r=!1;for(t(e,null)===`stop`&&(r=!0);n.length&&!r;){let e=n.shift();e.children&&e.children.length&&e.children.forEach(i=>{r||(n.push(i),t(i,e)===`stop`&&(r=!0))})}},ko=(e,t,n,r)=>{let i=[],a=e/t;return i=a>n/r?[n,n/a]:[a*r,r],i},Ao=(e,t,n,r)=>{let i=e/t,a=[];return n&&r?a=e<=n&&t<=r?[e,t]:i>n/r?[n,n/i]:[i*r,r]:n?a=e<=n?[e,t]:[n,n/i]:r&&(a=t<=r?[e,t]:[i*r,r]),a},jo=e=>{e=e.replace(/<br>/gim,`
|
|
28
|
+
`);let t=document.createElement(`div`);return t.innerHTML=e,e=t.textContent,e},Mo=e=>{try{return JSON.parse(JSON.stringify(e))}catch{return null}},No=(e,t,n=!1)=>(e.data=Mo(t.data),n&&(e.data.isActive=!1,Ws(e.data).forEach(e=>{e.isActive=!1})),e.children=[],t.children&&t.children.length>0&&t.children.forEach((t,r)=>{e.children[r]=No({},t,n)}),Object.keys(t).forEach(n=>{![`data`,`children`].includes(n)&&!/^_/.test(n)&&(e[n]=t[n])}),e),Po=(e,t,n=!1,r=!0)=>{let i=t.nodeData?t.nodeData:t;return e.data=Mo(i.data),r?delete e.data.uid:e.data.uid||(e.data.uid=Jo()),n&&(e.data.isActive=!1),e.children=[],t.children&&t.children.length>0?t.children.forEach((t,i)=>{e.children[i]=Po({},t,n,r)}):t.nodeData&&t.nodeData.children&&t.nodeData.children.length>0&&t.nodeData.children.forEach((t,i)=>{e.children[i]=Po({},t,n,r)}),Object.keys(i).forEach(t=>{![`data`,`children`].includes(t)&&!/^_/.test(t)&&(e[t]=i[t])}),e},Fo=(e,t=!1)=>new Promise((n,r)=>{let i=new Image;i.setAttribute(`crossOrigin`,`anonymous`),i.onload=()=>{try{let e=document.createElement(`canvas`);e.width=i.width,e.height=i.height,e.getContext(`2d`).drawImage(i,0,0,i.width,i.height),t?e.toBlob(e=>{n(e)}):n(e.toDataURL())}catch(e){r(e)}},i.onerror=e=>{r(e)},i.src=e}),Io=(e,t)=>{let n=document.createElement(`a`);n.href=e,n.download=t,n.click()},Lo=(e,t=300,n)=>{let r=null;return(...i)=>{r||=setTimeout(()=>{e.call(n,...i),r=null},t)}},Ro=(e,t=300,n)=>{let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{r=null,e.apply(n,i)},t)}},zo=(e,t=()=>{})=>{let n=0,r=e.length;if(r<=0)return t();let i=()=>{if(n>=r){t();return}e[n](),setTimeout(()=>{n++,i()},0)};i()},Bo=e=>Math.PI/180*e,Vo=e=>e.replace(/([a-z])([A-Z])/g,(...e)=>e[1]+`-`+e[2].toLowerCase()),Ho=function(e,t){let n=!1,r=null,i=()=>{n=!1,t?e.call(t):e()};if(typeof MutationObserver<`u`){let e=1,t=new MutationObserver(i),n=document.createTextNode(e);t.observe(n,{characterData:!0}),r=function(){e=(e+1)%2,n.data=e}}else r=setTimeout;return function(){n||(n=!0,r(i,0))}},Uo=(e,t,n=0,r=0)=>{let i=e.elRect,{scaleX:a,scaleY:o,translateX:s,translateY:c}=e.draw.transform(),{left:l,top:u,width:d,height:f}=t,p=(l+d)*a+s,m=(u+f)*o+c;l=l*a+s,u=u*o+c;let h=0,g=0;return l<0+n&&(h=-l+n),p>i.width-n&&(h=-(p-i.width)-n),u<0+r&&(g=-u+r),m>i.height-r&&(g=-(m-i.height)-r),{isOuter:h!==0||g!==0,offsetLeft:h,offsetTop:g}},Wo=null,Go=e=>(Wo||=document.createElement(`div`),Wo.innerHTML=e,Wo.textContent),Ko=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target.result)},r.onerror=e=>{n(e)},r.readAsDataURL(e)}),qo=e=>new Promise(t=>{let n=new Image;n.src=e,n.onload=()=>{t({width:n.width,height:n.height})},n.onerror=()=>{t({width:0,height:0})}}),Jo=()=>Ht(),Yo=e=>new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=async e=>{let n=e.target.result;t({url:n,size:await qo(n)})},r.onerror=e=>{n(e)}}),Xo=e=>([[` `,` `]].forEach(t=>{e=e.replace(new RegExp(t[0],`g`),t[1])}),e),Zo=e=>Object.prototype.toString.call(e).slice(8,-1),Qo=e=>e==null||e===``,$o=null,es=e=>{$o||=document.createElement(`div`),$o.innerHTML=e;for(let e=$o.childNodes,t=e.length;t--;)if(e[t].nodeType==1)return!0;return!1},ts=null,ns=(e,t,n)=>{ts||=document.createElement(`div`),ts.innerHTML=e;let r=e=>{e.childNodes.forEach(i=>{i.nodeType===1?r(i):i.nodeType===3&&e.replaceChild(document.createTextNode(i.nodeValue.replace(new RegExp(t,`g`),n)),i)})};return r(ts),ts.innerHTML},rs=e=>(e=String(e).replace(/\s+/g,``),[`#fff`,`#ffffff`,`#FFF`,`#FFFFFF`,`rgb(255,255,255)`].includes(e)||/rgba\(255,255,255,[^)]+\)/.test(e)),is=e=>(e=String(e).replace(/\s+/g,``),[``,`transparent`].includes(e)||/rgba\(\d+,\d+,\d+,0\)/.test(e)),as=e=>{let{lineColor:t,root:n,second:r,node:i}=e,a=[t,n.fillColor,n.color,r.fillColor,r.color,i.fillColor,i.color,n.borderColor,r.borderColor,i.borderColor];for(let e=0;e<a.length;e++){let t=a[e];if(!is(t)&&!rs(t))return t}},os=e=>{let t=e=>{e.childNodes.forEach(e=>{e.nodeType===1&&(e.classList.contains(`ql-formula`)?e.parentNode.removeChild(e):t(e))})};t(e)},ss=null,cs=e=>{ss||=document.createElement(`div`),ss.innerHTML=e;let t=ss.childNodes,n=``;for(let e=0;e<t.length;e++){let r=t[e];r.nodeType===1?(os(r),r.tagName.toLowerCase()===`p`?n+=r.textContent+`
|
|
29
|
+
`:n+=r.textContent):r.nodeType===3&&(n+=r.nodeValue)}return n.replace(/\n$/,``)},ls=null,us=e=>{ls||=document.createElement(`div`),ls.innerHTML=e;let t=ls.querySelectorAll(`.ql-formula`);Array.from(t).forEach(e=>{let t=document.createTextNode(`$smmformula$`);e.parentNode.replaceChild(t,e)});let n=ls.childNodes,r=[];for(let e=0;e<n.length;e++){let t=n[e];t.nodeType===1?r.push(t.textContent):t.nodeType===3&&r.push(t.nodeValue)}if(e=r.map(e=>`<p><span>${Es(e)}</span></p>`).join(``),t.length>0){e=e.replace(/\$smmformula\$/g,`<span class="smmformula"></span>`),ls.innerHTML=e;let n=ls.querySelectorAll(`.smmformula`);Array.from(n).forEach((e,n)=>{e.parentNode.replaceChild(t[n],e)}),e=ls.innerHTML}return e},ds=(e,t)=>{let n={};return Object.keys(t).forEach(r=>{let i=e[r],a=t[r];if(Zo(i)!==Zo(a)){n[r]=a;return}if(Zo(i)===`Object`){if(JSON.stringify(i)!==JSON.stringify(a)){n[r]=a;return}}else if(i!==a){n[r]=a;return}}),n},fs=e=>/^_/.test(e)?!1:!vt.includes(e),ps=e=>{let t=[...wo],n=Object.keys(e);for(let e=0;e<n.length;e++)if(!t.includes(n[e]))return!1;return!0},ms=e=>e.reduce((e,t)=>{let n=e.find(e=>e.type===t.type);return n?t.list.forEach(e=>{let t=n.list.find(t=>t.name===e.name);t?t.icon=e.icon:n.list.push(e)}):e.push({...t}),e},[]),hs=e=>{let t=[];return e.forEach(n=>{e.find(e=>e.uid!==n.uid&&e.isAncestor(n))||t.push(n)}),t},gs=e=>{let t={},n={};e.forEach(e=>{let r=e.parent;if(r){let i=r.uid;n[i]=r;let a={node:e,index:e.getIndexInBrothers()};t[i]?t[i].find(e=>e.index===a.index)||t[i].push(a):t[i]=[a]}});let r=[];return Object.keys(t).forEach(e=>{if(t[e].length>1){let i=t[e].map(e=>e.index).sort((e,t)=>e-t);r.push({node:n[e],range:[i[0],i[i.length-1]]})}else r.push({node:t[e][0].node})}),r},_s=(e,t,n,r,i,a,o,s)=>t>i&&a>e&&r>o&&s>n,vs=e=>{let t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),n.collapse(),t.removeAllRanges(),t.addRange(n)},ys=e=>{let t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)},bs=(e,t={})=>{t={...t},t&&t.richText&&t.resetRichText&&delete t.resetRichText;let n=e=>{e.forEach(e=>{e.data={...e.data,...t},e.children&&e.children.length>0&&n(e.children)})};return n(e),e},xs=(e,t=!1,n=null,r=!1)=>{let i=e=>{e.forEach(e=>{e.data||={},(t||Qo(e.data.uid))&&(e.data.uid=Jo()),r&&Ws(e.data).forEach(e=>{(t||Qo(e.uid))&&(e.uid=Jo())}),n&&n(e),e.children&&e.children.length>0&&i(e.children)})};return i(e),e},Ss=e=>e?Array.isArray(e)?e:[e]:[],Cs=e=>e.parent?e.parent.nodeData.children.findIndex(t=>t.data.uid===e.uid):0,ws=(e,t)=>t.findIndex(t=>t.uid===e.uid),Ts=e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return`hsla(`+new Gt(t).genrand_int32()%360+`, 50%, 50%, 1)`},Es=e=>([[`&`,`&`],[`<`,`<`],[`>`,`>`]].forEach(t=>{e=e.replace(new RegExp(t[0],`g`),t[1])}),e),Ds=(e,t)=>{let n=Zo(e);if(n!==Zo(t))return!1;if(n===`Object`){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){let a=n[i];if(!r.includes(a)||!Ds(e[a],t[a]))return!1}return!0}else if(n===`Array`){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(Zo(r)!==Zo(i)||!Ds(r,i))return!1}return!0}else return e===t},Os=()=>navigator.clipboard&&typeof navigator.clipboard.read==`function`,ks=e=>{navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(JSON.stringify(e))},As=async()=>{let e=null,t=null;if(Os()){let n=await navigator.clipboard.read();if(n&&n.length>0)for(let r of n)for(let n of r.types)/^image\//.test(n)?t=await r.getType(n):n===`text/plain`&&(e=await(await r.getType(n)).text())}return{text:e,img:t}},js=e=>{if(!e||!e.parent)return;let t=Cs(e);t!==-1&&e.parent.nodeData.children.splice(t,1)},Ms=e=>(xt.forEach(t=>{e=e.replace(RegExp(`<${t}([^>]*)>`,`g`),`<${t} $1 />`)}),e),Ns=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!t.find(t=>t.uid===e[n].uid))return!1;return!0},Ps=()=>{let e=navigator.userAgent.match(/\s+Chrome\/(.*)\s+/);return e&&e[1]?Number.parseFloat(e[1]):``},Fs=e=>({simpleMindMap:!0,data:e}),Is=e=>{let t=null;if(typeof e==`string`)try{let n=JSON.parse(e);typeof n==`object`&&n.simpleMindMap&&(t=n.data)}catch{}else typeof e==`object`&&e.simpleMindMap&&(t=e.data);let n=!!t;return{isSmm:n,data:n?t:String(e)}},Ls=(e,t)=>{e.preventDefault();let n=window.getSelection();if(!n.rangeCount)return;n.deleteFromDocument(),t||=e.clipboardData.getData(`text`),t=Es(t),t=Go(t);let r=t.split(/\n/g),i=document.createDocumentFragment();r.forEach((e,t)=>{let n=document.createTextNode(e);if(i.appendChild(n),t<r.length-1){let e=document.createElement(`br`);i.appendChild(e)}}),n.getRangeAt(0).insertNode(i),n.collapseToEnd()},Rs=e=>{let t={},n=(e,r)=>{let i=e.data.uid;r&&r.children.push(i),t[i]={isRoot:!r,data:{...e.data},children:[]},e.children&&e.children.length>0&&e.children.forEach(e=>{n(e,t[i])})};return n(e,null),t},zs=({addContentToHeader:e,addContentToFooter:t})=>{let n=[],r=null,i=0,a=null,o=0,s=(e,t)=>{if(typeof e==`function`){let r=e();if(!r)return;let{el:i,cssText:a,height:o}=r;i instanceof HTMLElement&&(Gs(i),t(Us({el:i,height:o}),o)),a&&n.push(a)}};return s(e,(e,t)=>{r=e,i=t}),s(t,(e,t)=>{a=e,o=t}),{cssTextList:n,header:r,headerHeight:i,footer:a,footerHeight:o}},Bs=(e,t=0,n=0,r=0,i=0,a=!1,o=!1)=>{let s=1/0,c=-1/0,l=1/0,u=-1/0,d=(e,t)=>{if(!(t&&a)&&e.group)try{let{x:t,y:n,width:r,height:i}=e.group.findOne(`.smm-node-shape`).rbox();t<s&&(s=t),t+r>c&&(c=t+r),n<l&&(l=n),n+i>u&&(u=n+i)}catch{}!o&&e._generalizationList.length>0&&e._generalizationList.forEach(e=>{d(e.generalizationNode)}),e.children&&e.children.forEach(e=>{d(e)})};return d(e,!0),s=s-t+r,l=l-n+i,c=c-t+r,u=u-n+i,{left:s,top:l,width:c-s,height:u-l}},Vs=(e,t=0,n=0,r=0,i=0)=>{let a=1/0,o=-1/0,s=1/0,c=-1/0;return e.forEach(e=>{let{left:l,top:u,width:d,height:f}=Bs(e,t,n,r,i,!1,!0);l<a&&(a=l),l+d>o&&(o=l+d),u<s&&(s=u),u+f>c&&(c=u+f)}),{left:a,top:s,width:o-a,height:c-s}},Hs=()=>{if(document.documentElement.requestFullScreen)return`fullscreenchange`;if(document.documentElement.webkitRequestFullScreen)return`webkitfullscreenchange`;if(document.documentElement.mozRequestFullScreen)return`mozfullscreenchange`;if(document.documentElement.msRequestFullscreen)return`msfullscreenchange`},Hs(),Us=({el:e,width:t,height:n})=>{let r=new lo;return t!==void 0&&r.width(t),n!==void 0&&r.height(n),r.add(e),r},Ws=e=>{let t=e.generalization;return t?Array.isArray(t)?t:[t]:[]},Gs=e=>{e.setAttribute(`xmlns`,`http://www.w3.org/1999/xhtml`)},Ks=e=>(e=[...e],e.sort((e,t)=>e.sortIndex-t.sortIndex),e),qs=(e,t)=>(0,Eo.default)(e,t,{arrayMerge:(e,t)=>t}),Js=e=>{let t={};return Ct.forEach(n=>{let r=e.style.merge(n);n===`fontSize`&&(r+=`px`),t[n]=r}),t}})),Ys,Xs,Zs,Qs=m((()=>{M(),Ys=[`backgroundColor`,`backgroundImage`,`backgroundRepeat`,`backgroundPosition`,`backgroundSize`],Xs=[`gradientStyle`,`startColor`,`endColor`,`startDir`,`endDir`,`fillColor`,`borderColor`,`borderWidth`,`borderDasharray`],Zs=class e{static setBackgroundStyle(t,n){if(!t)return;if(!e.cacheStyle){e.cacheStyle={};let n=window.getComputedStyle(t);Ys.forEach(t=>{e.cacheStyle[t]=n[t]})}let{backgroundColor:r,backgroundImage:i,backgroundRepeat:a,backgroundPosition:o,backgroundSize:s}=n;t.style.backgroundColor=r,i&&i!==`none`?(t.style.backgroundImage=`url(${i})`,t.style.backgroundRepeat=a,t.style.backgroundPosition=o,t.style.backgroundSize=s):t.style.backgroundImage=`none`}static removeBackgroundStyle(t){e.cacheStyle&&=(Ys.forEach(n=>{t.style[n]=e.cacheStyle[n]}),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,i=!1;t?(i=!0,r=n):r=this.ctx.isGeneralization?n.generalization:this.ctx.layerIndex===0?n.root:this.ctx.layerIndex===1?n.second:n.node;let a=``;return a=this.getSelfStyle(e)===void 0?r[e]===void 0?n[e]:r[e]:this.getSelfStyle(e),i||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){let t={};Xs.forEach(e=>{t[e]=this.merge(e)}),t.gradientStyle?(this._gradient||=this.ctx.nodeDraw.gradient(`linear`),this._gradient.update(e=>{e.stop(0,t.startColor),e.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){let 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){let 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}={},i,a){let{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`}),i){let t=this.merge(`showLineMarker`,!0),r=a.style;if(t){r._marker=r._marker||r.createMarker(),r._markerPath.stroke({color:n}).fill({color:n}),e.attr(`marker-start`,``),e.attr(`marker-end`,``);let t=r.merge(`lineMarkerDir`);e.marker(t,r._marker)}else r._marker&&=(e.attr(`marker-start`,``),e.attr(`marker-end`,``),r._marker.remove(),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:i,fontSize:a,fontColor:o}=this.ctx.mindMap.opt.expandBtnStyle||{color:`#808080`,fill:`#fff`,fontSize:12,strokeColor:`#333333`,fontColor:`#333333`};e.fill({color:r}),t.fill({color:r}),n.fill({color:i}),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=>{fs(t)&&(e=!0)}),e}getCustomStyle(){let e={};return Object.keys(this.ctx.getData()).forEach(t=>{fs(t)&&(e[t]=this.ctx.getData(t))}),e}hoverNode(e){let 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(),null),this._markerPath&&=(this._markerPath.remove(),null),this._gradient&&=(this._gradient.remove(),null)}},Zs.cacheStyle=null})),$s,ec,tc=m((()=>{bo(),wt(),$s=class{constructor(e){this.node=e,this.mindMap=e.mindMap}getShapePadding(e,t,n,r){let i=this.node.getShape(),a=e+n*2,o=t+r*2,s=Math.abs(a-o);switch(i){case O.SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case O.SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case O.SHAPE.PARALLELOGRAM:return{paddingX:n<=0?15:0,paddingY:0};case O.SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?15:0,paddingY:0};case O.SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?15:0,paddingY:0};case O.SHAPE.ELLIPSE:return{paddingX:n<=0?15:0,paddingY:r<=0?5:0};case O.SHAPE.CIRCLE:return{paddingX:o>a?s/2:0,paddingY:o<a?s/2:0}}let c=this.getShapeFromExtendList(i);return c&&c.getPadding({node:this.node,width:e,height:t,paddingX:n,paddingY:r})||{paddingX:0,paddingY:0}}getShapeFromExtendList(e){return this.mindMap.extendShapeList.find(t=>t.name===e)}createShape(){let e=this.node.getShape(),t=null;if(e===O.SHAPE.RECTANGLE?t=this.createRect():e===O.SHAPE.DIAMOND?t=this.createDiamond():e===O.SHAPE.PARALLELOGRAM?t=this.createParallelogram():e===O.SHAPE.ROUNDED_RECTANGLE?t=this.createRoundedRectangle():e===O.SHAPE.OCTAGONAL_RECTANGLE?t=this.createOctagonalRectangle():e===O.SHAPE.OUTER_TRIANGULAR_RECTANGLE?t=this.createOuterTriangularRectangle():e===O.SHAPE.INNER_TRIANGULAR_RECTANGLE?t=this.createInnerTriangularRectangle():e===O.SHAPE.ELLIPSE?t=this.createEllipse():e===O.SHAPE.CIRCLE&&(t=this.createCircle()),!t){let n=this.getShapeFromExtendList(e);n&&(t=n.createShape(this.node))}return t||this.createRect()}getNodeSize(){let e=this.node.getBorderWidth(),{width:t,height:n}=this.node;return t-=e,n-=e,{width:t,height:n}}createPath(e){let{customCreateNodePath:t}=this.mindMap.opt;return t?yo(t(e)):new Ba().plot(e)}createPolygon(e){let{customCreateNodePolygon:t}=this.mindMap.opt;return t?yo(t(e)):new Ha().plot(e)}createRect(){let{width:e,height:t}=this.getNodeSize(),n=this.node.style.merge(`borderRadius`),r=`
|
|
30
|
+
M${n},0
|
|
31
|
+
L${e-n},0
|
|
32
|
+
C${e-n},0 ${e},0 ${e},${n}
|
|
33
|
+
L${e},${t-n}
|
|
34
|
+
C${e},${t-n} ${e},${t} ${e-n},${t}
|
|
35
|
+
L${n},${t}
|
|
36
|
+
C${n},${t} 0,${t} 0,${t-n}
|
|
37
|
+
L0,${n}
|
|
38
|
+
C0,${n} 0,0 ${n},0
|
|
39
|
+
Z
|
|
40
|
+
`;return this.createPath(r)}createDiamond(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2,i=[[n,0],[e,r],[n,t],[0,r]];return this.createPolygon(i)}createParallelogram(){let{paddingX:e}=this.node.getPaddingVale();e||=this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize(),r=[[e,0],[t,0],[t-e,n],[0,n]];return this.createPolygon(r)}createRoundedRectangle(){let{width:e,height:t}=this.getNodeSize(),n=t/2,r=`
|
|
41
|
+
M${n},0
|
|
42
|
+
L${e-n},0
|
|
43
|
+
A${t/2},${t/2} 0 0,1 ${e-n},${t}
|
|
44
|
+
L${n},${t}
|
|
45
|
+
A${t/2},${t/2} 0 0,1 ${n},0
|
|
46
|
+
`;return this.createPath(r)}createOctagonalRectangle(){let{width:e,height:t}=this.getNodeSize(),n=[[0,5],[5,0],[e-5,0],[e,5],[e,t-5],[e-5,t],[5,t],[0,t-5]];return this.createPolygon(n)}createOuterTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e||=this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize(),r=[[e,0],[t-e,0],[t,n/2],[t-e,n],[e,n],[0,n/2]];return this.createPolygon(r)}createInnerTriangularRectangle(){let{paddingX:e}=this.node.getPaddingVale();e||=this.node.shapePadding.paddingX;let{width:t,height:n}=this.getNodeSize(),r=[[0,0],[t,0],[t-e/2,n/2],[t,n],[0,n],[e/2,n/2]];return this.createPolygon(r)}createEllipse(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2,i=`
|
|
47
|
+
M${n},0
|
|
48
|
+
A${n},${r} 0 0,1 ${n},${t}
|
|
49
|
+
M${n},${t}
|
|
50
|
+
A${n},${r} 0 0,1 ${n},0
|
|
51
|
+
`;return this.createPath(i)}createCircle(){let{width:e,height:t}=this.getNodeSize(),n=e/2,r=t/2,i=`
|
|
52
|
+
M${n},0
|
|
53
|
+
A${n},${r} 0 0,1 ${n},${t}
|
|
54
|
+
M${n},${t}
|
|
55
|
+
A${n},${r} 0 0,1 ${n},0
|
|
56
|
+
`;return this.createPath(i)}},ec=[O.SHAPE.RECTANGLE,O.SHAPE.DIAMOND,O.SHAPE.PARALLELOGRAM,O.SHAPE.ROUNDED_RECTANGLE,O.SHAPE.OCTAGONAL_RECTANGLE,O.SHAPE.OUTER_TRIANGULAR_RECTANGLE,O.SHAPE.INNER_TRIANGULAR_RECTANGLE,O.SHAPE.ELLIPSE,O.SHAPE.CIRCLE]}));function nc(){let e=this.getData(`generalization`);return Array.isArray(e)?e:e?[e]:[]}function rc(){return this.formatGetGeneralization().length>0}function ic(){return!!this.formatGetGeneralization().find(e=>!e.range||e.range.length<=0)}function ac(e){return this._generalizationList.findIndex(t=>t.generalizationNode.uid===e.uid)}function oc(){if(this.isGeneralization||!this.checkHasGeneralization())return;let e=0,t=0;this.formatGetGeneralization().forEach((n,r)=>{let i=this._generalizationList[r];i||=this._generalizationList[r]={},i.node=this,i.range=n.range,i.generalizationLine||=this.lineDraw.path(),i.generalizationNode||=new eu({data:{inserting:n.inserting,data:n},uid:Jo(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0}),delete n.inserting,i.generalizationNode.generalizationBelongNode=this,i.generalizationNode.width>e&&(e=i.generalizationNode.width),i.generalizationNode.height>t&&(t=i.generalizationNode.height),n.isActive&&this.renderer.addNodeToActiveList(i.generalizationNode)}),this._generalizationNodeWidth=e,this._generalizationNodeHeight=t}function sc(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function cc(e){if(this.isGeneralization)return;this.updateGeneralizationData();let t=this.formatGetGeneralization();if(t.length<=0||this.getData(`expand`)===!1){this.removeGeneralization();return}t.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(()=>{},e)})}function lc(){let e=this.getChildrenLength(),t=this.formatGetGeneralization(),n=[];t.forEach(t=>{if(!t.range){n.push(t);return}t.range.length>0&&t.range[0]<=e-1&&t.range[1]<=e-1&&n.push(t)}),n.length!==t.length&&this.setData({generalization:n})}function uc(){this.isGeneralization||(this._generalizationList.forEach(e=>{e.generalizationNode.style.onRemove(),e.generalizationLine&&=(e.generalizationLine.remove(),null),e.generalizationNode&&=(this.renderer.removeNodeFromActiveList(e.generalizationNode),e.generalizationNode.remove(),null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(`.generalization_`+this.generalizationBelongNode.uid).remove())}function dc(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.hide(),e.generalizationNode&&e.generalizationNode.hide()})}function fc(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.show(),e.generalizationNode&&e.generalizationNode.show()})}function pc(e){this._generalizationList.forEach(t=>{t.generalizationLine.opacity(e),t.generalizationNode.group.opacity(e)})}function mc(){let e=this.generalizationBelongNode,t=e.formatGetGeneralization()[e.getGeneralizationNodeIndex(this)],n=this.getStyle(`hoverRectColor`)||this.mindMap.opt.hoverRectColor,r=n?{stroke:n}:null;Array.isArray(t.range)&&t.range.length>0?this.mindMap.renderer.highlightNode(e,t.range,r):this.mindMap.renderer.highlightNode(e,null,r)}function hc(){this.mindMap.renderer.closeHighlightNode()}var gc,_c=m((()=>{tu(),M(),gc={formatGetGeneralization:nc,checkHasGeneralization:rc,checkHasSelfGeneralization:ic,getGeneralizationNodeIndex:ac,createGeneralizationNode:oc,updateGeneralization:sc,updateGeneralizationData:lc,renderGeneralization:cc,removeGeneralization:uc,hideGeneralization:dc,showGeneralization:fc,setGeneralizationOpacity:pc,handleGeneralizationMouseenter:mc,handleGeneralizationMouseleave:hc}})),vc,yc,bc,xc,Sc,Cc,wc=m((()=>{vc=`<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>`,yc=`<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>`,bc=`<svg width="14px" height="14px" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path fill="#ffffff" 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 fill="#ffffff" d="M252.928 474.624h518.144v74.24h-518.144z"></path></svg>`,xc=`<svg width="12px" height="12px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M1008.128 614.4a25.6 25.6 0 0 0-27.648 5.632l-142.848 142.848L259.072 186.88 401.92 43.52A25.6 25.6 0 0 0 384 0h-358.4a25.6 25.6 0 0 0-25.6 25.6v358.4a25.6 25.6 0 0 0 43.52 17.92l143.36-142.848 578.048 578.048-142.848 142.848a25.6 25.6 0 0 0 17.92 43.52h358.4a25.6 25.6 0 0 0 25.6-25.6v-358.4a25.6 25.6 0 0 0-15.872-25.088z" /></svg>`,Sc=`<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>`,Cc={open:vc,close:yc,remove:bc,imgAdjust:xc,quickCreateChild:Sc}}));function Tc(){if(this._openExpandNode)return;let{expandBtnSize:e,expandBtnIcon:t,isShowExpandNum:n}=this.mindMap.opt,{close:r,open:i}=t||{};n?(this._openExpandNode=new ao,this._openExpandNode.addClass(`smm-expand-btn-text`),this._openExpandNode.attr({"text-anchor":`middle`,"dominant-baseline":`middle`,x:e/2,y:2})):(this._openExpandNode=yo(i||Cc.open).size(e,e),this._openExpandNode.x(0).y(-e/2)),this._closeExpandNode=yo(r||Cc.close).size(e,e),this._closeExpandNode.x(0).y(-e/2),this._fillExpandNode=new so().size(e),this._fillExpandNode.x(0).y(-e/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function Ec(e=[]){return e.reduce((e,t)=>e+this.sumNode(t.children||[]),e.length)}function Dc(){let{expand:e}=this.getData();if(e===this._lastExpandBtnType)return;this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent();let t;if(e===!1?(t=this._openExpandNode,this._lastExpandBtnType=!1):(t=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn){let{isShowExpandNum:n,expandBtnStyle:r,expandBtnNumHandler:i}=this.mindMap.opt;if(n)if(e)this._fillExpandNode.stroke(`none`);else{this._fillExpandNode.stroke({color:r.strokeColor});let e=this.sumNode(this.nodeData.children||[]);if(typeof i==`function`){let t=i(e,this);Qo(t)||(e=t)}t.text(String(e))}this._expandBtn.add(this._fillExpandNode).add(t)}}function Oc(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function kc(){this.getChildrenLength()<=0||this.isRoot||(this._expandBtn?this.group.add(this._expandBtn):(this._expandBtn=new fo,this._expandBtn.on(`mouseover`,e=>{e.stopPropagation(),this._expandBtn.css({cursor:`pointer`})}),this._expandBtn.on(`mouseout`,e=>{e.stopPropagation(),this._expandBtn.css({cursor:`auto`})}),this._expandBtn.on(`click`,e=>{e.stopPropagation(),this.mindMap.execCommand(`SET_NODE_EXPAND`,this,!this.getData(`expand`)),this.mindMap.emit(`expand_btn_click`,this)}),this._expandBtn.on(`dblclick`,e=>{e.stopPropagation()}),this._expandBtn.addClass(`smm-expand-btn`),this.group.add(this._expandBtn)),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function Ac(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function jc(){let{alwaysShowExpandBtn:e,notShowExpandBtn:t}=this.mindMap.opt;e||t||setTimeout(()=>{this.renderExpandBtn()},0)}function Mc(){let{alwaysShowExpandBtn:e,notShowExpandBtn:t}=this.mindMap.opt;if(e||this._isMouseenter||t)return;let{isActive:n,expand:r}=this.getData();!n&&r&&setTimeout(()=>{this.removeExpandBtn()},0)}var Nc,Pc=m((()=>{wc(),bo(),M(),Nc={createExpandNodeContent:Tc,updateExpandBtnNode:Dc,updateExpandBtnPos:Oc,renderExpandBtn:kc,removeExpandBtn:Ac,showExpandBtn:jc,hideExpandBtn:Mc,sumNode:Ec}}));function Fc(e={}){this.mindMap.execCommand(`SET_NODE_DATA`,this,e)}function Ic(e,t,n){this.mindMap.execCommand(`SET_NODE_TEXT`,this,e,t,n)}function Lc(e){this.mindMap.execCommand(`SET_NODE_IMAGE`,this,e)}function Rc(e){this.mindMap.execCommand(`SET_NODE_ICON`,this,e)}function zc(e,t){this.mindMap.execCommand(`SET_NODE_HYPERLINK`,this,e,t)}function Bc(e){this.mindMap.execCommand(`SET_NODE_NOTE`,this,e)}function Vc(e,t){this.mindMap.execCommand(`SET_NODE_ATTACHMENT`,this,e,t)}function Hc(e){this.mindMap.execCommand(`SET_NODE_TAG`,this,e)}function Uc(e){this.mindMap.execCommand(`SET_NODE_SHAPE`,this,e)}function Wc(e,t){this.mindMap.execCommand(`SET_NODE_STYLE`,this,e,t)}function Gc(e){this.mindMap.execCommand(`SET_NODE_STYLES`,this,e)}var Kc,qc=m((()=>{Kc={setData:Fc,setText:Ic,setImage:Lc,setIcon:Rc,setHyperlink:zc,setNote:Bc,setAttachment:Vc,setTag:Hc,setShape:Uc,setStyle:Wc,setStyles:Gc}})),Jc,Yc,Xc,Zc,Qc,$c,el=m((()=>{M(),Jc=`<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>`,Yc=`<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>`,Xc=`<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>`,Zc=[{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>`}]}],Qc=(e,t=[])=>{let n=e.split(`_`),r=ms([...Zc,...t]).find(e=>e.type===n[0]);if(r){let e=r.list.find(e=>e.name===n[1]);return e?e.icon:``}else return``},$c={hyperlink:Jc,note:Yc,attachment:Xc,nodeIconList:Zc,getNodeIconListIcon:Qc}}));function tl(){let e=this.getData(`image`);return(this.mindMap.renderer.renderTree.data.imgMap||{})[e]||e}function nl(){let e=this.getImageUrl();if(!e)return;e=(this.mindMap.renderer.renderTree.data.imgMap||{})[e]||e;let t=this.getImgShowSize(),n=new _a().load(e).size(...t),{defaultNodeImage:r}=this.mindMap.opt;if(r){let t=new Image;t.onerror=()=>{n.load(r)},t.src=e}return this.getData(`imageTitle`)&&n.attr(`title`,this.getData(`imageTitle`)),n.on(`click`,e=>{this.mindMap.emit(`node_img_click`,this,n,e)}),n.on(`dblclick`,e=>{this.mindMap.emit(`node_img_dblclick`,this,e,n)}),n.on(`mouseenter`,e=>{this.mindMap.emit(`node_img_mouseenter`,this,n,e)}),n.on(`mouseleave`,e=>{this.mindMap.emit(`node_img_mouseleave`,this,n,e)}),n.on(`mousemove`,e=>{this.mindMap.emit(`node_img_mousemove`,this,n,e)}),{node:n,width:t[0],height:t[1]}}function rl(){let{custom:e,width:t,height:n}=this.getData(`imageSize`);return e?[t,n]:Ao(t,n,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function il(){let e=this.getData();if(!e.icon||e.icon.length<=0)return[];let t=this.mindMap.themeConfig.iconSize;return e.icon.map(e=>{let n=$c.getNodeIconListIcon(e,this.mindMap.opt.iconList||[]),r=null;return r=/^<svg/.test(n)?yo(n):new _a().load(n),r.size(t,t),r.on(`click`,t=>{this.mindMap.emit(`node_icon_click`,this,e,t,r)}),r.on(`mouseenter`,t=>{this.mindMap.emit(`node_icon_mouseenter`,this,e,t,r)}),r.on(`mouseleave`,t=>{this.mindMap.emit(`node_icon_mouseleave`,this,e,t,r)}),{node:r,width:t,height:t}})}function al(e){let t=this.hasCustomWidth(),n=typeof e==`string`?e:this.getData(`text`),{textAutoWrapWidth:r,emptyTextMeasureHeightText:i}=this.mindMap.opt;r=t?this.customTextWidth:r;let a=new fo,o=!1;this.getData(`resetRichText`)&&(delete this.nodeData.data.resetRichText,o=!0),o&&!Qo(n)&&(n=es(n)?us(n):`<p>${n}</p>`,this.setData({text:n}));let s=[],c=Js(this);Object.keys(c).forEach(e=>{s.push([e,c[e]])}),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));let l=this.mindMap.commonCaches.measureRichtextNodeTextSizeEl;s.forEach(([e,t])=>{l.style[e]=t}),l.style.lineHeight=1.2;let u=`<div>${n}</div>`;l.innerHTML=u;let d=l.children[0];d.classList.add(`smm-richtext-node-wrap`),Gs(d),d.style.maxWidth=r+`px`,t?d.style.width=this.customTextWidth+`px`:d.style.width=``;let{width:f,height:p}=d.getBoundingClientRect();if(p<=0){l.innerHTML=`<p>${i}</p>`;let e=l.children[0];e.classList.add(`smm-richtext-node-wrap`),p=e.getBoundingClientRect().height,l.innerHTML=u}f=Math.min(Math.ceil(f)+1,r),p=Math.ceil(p),a.attr(`data-width`,f),a.attr(`data-height`,p);let m=Us({el:l.children[0],width:f,height:p}),h={"line-height":1.2};return s.forEach(([e,t])=>{h[Vo(e)]=t}),m.css(h),a.add(m),{node:a,nodeContent:m,width:f,height:p}}function ol(e){if(this.getData(`needUpdate`)&&delete this.nodeData.data.needUpdate,this.getData(`richText`))return this.createRichTextNode(e);let t=typeof e==`string`?e:this.getData(`text`);this.getData(`resetRichText`)&&delete this.nodeData.data.resetRichText;let n=new fo,r=this.getStyle(`fontSize`,!1),i=this.getStyle(`textAlign`,!1),a=[];Qo(t)||(a=String(t).split(/\n/gim));let{textAutoWrapWidth:o,emptyTextMeasureHeightText:s}=this.mindMap.opt,c=a.length>1;a.forEach((e,t)=>{let n=e.split(``),r=[],i=[];for(;n.length;){let e=n.shift();hl([...i,e].join(``),this.style).width<=o?i.push(e):(r.push(i.join(``)),i=[e])}i.length>0&&r.push(i.join(``)),r.length>1&&(c=!0),a[t]=r.join(`
|
|
57
|
+
`)}),a=a.join(`
|
|
58
|
+
`).replace(/\n$/g,``).split(/\n/gim),a.forEach((e,t)=>{e===``&&(e=``);let a=new ao().text(e);a.addClass(`smm-text-node-wrap`),a.attr(`text-anchor`,{left:`start`,center:`middle`,right:`end`}[i]||`start`),this.style.text(a),a.y(r*St*t+(St-1)*r/2),n.add(a)});let{width:l,height:u}=n.bbox();if(u<=0){let e=new ao().text(s);this.style.text(e),u=e.bbox().height}return l=Math.min(Math.ceil(l),o),u=Math.ceil(u),n.attr(`data-width`,l),n.attr(`data-height`,u),n.attr(`data-ismultiLine`,c||a.length>1),{node:n,width:l,height:u}}function sl(){let{hyperlink:e,hyperlinkTitle:t}=this.getData();if(!e)return;let{customHyperlinkJump:n,hyperlinkIcon:r}=this.mindMap.opt,{icon:i,style:a}=r,o=this.getNodeIconSize(`hyperlinkIcon`),s=new yo().size(o,o),c=new po().to(e).target(`_blank`);c.node.addEventListener(`click`,t=>{typeof n==`function`&&(t.preventDefault(),n(e,this))}),t&&s.add(yo(`<title>${t}</title>`)),c.rect(o,o).fill({color:`transparent`});let l=yo(i||$c.hyperlink).size(o,o);return this.style.iconNode(l,a.color),c.add(l),s.add(c),{node:s,width:o,height:o}}function cl(){let e=this.getData(`tag`);if(!e||e.length<=0)return[];let{maxTag:t,tagsColorMap:n}=this.mindMap.opt;n||={};let r=[];return e.slice(0,t).forEach((e,t)=>{let i=``,a={...gl};typeof e==`string`?i=e:(i=e.text,a={...gl,...e.style});let o=a.width!==void 0,s=new fo;s.on(`click`,()=>{this.mindMap.emit(`node_tag_click`,this,e,t,s)});let c=new ao().text(i);this.style.tagText(c,a);let{width:l,height:u}=c.bbox(),d=o?a.width:l+a.paddingX*2,f=o?Math.max(d,l):d,p=Math.max(a.height,u);o?c.x((f-l)/2):c.x(o?0:a.paddingX),c.cy(-p/2);let m=new Wa().size(d,a.height).cy(-p/2);o&&m.x((f-d)/2),this.style.tagRect(m,{...a,fill:a.fill||n[c.node.textContent]||Ts(c.node.textContent)}),s.add(m).add(c),r.push({node:s,width:f,height:p})}),r}function ll(){if(!this.getData(`note`))return null;let{icon:e,style:t}=this.mindMap.opt.noteIcon,n=this.getNodeIconSize(`noteIcon`),r=new yo().attr(`cursor`,`pointer`).addClass(`smm-node-note`).size(n,n);r.add(new Wa().size(n,n).fill({color:`transparent`}));let i=yo(e||$c.note).size(n,n);return this.style.iconNode(i,t.color),r.add(i),this.mindMap.opt.customNoteContentShow||(this.noteEl||(this.noteEl=document.createElement(`div`),this.noteEl.style.cssText=`
|
|
59
|
+
position: fixed;
|
|
60
|
+
padding: 10px;
|
|
61
|
+
border-radius: 5px;
|
|
62
|
+
box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
|
|
63
|
+
display: none;
|
|
64
|
+
background-color: #fff;
|
|
65
|
+
z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}
|
|
66
|
+
`,(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.noteEl)),this.noteEl.innerText=this.getData(`note`)),r.on(`mouseover`,()=>{let{left:e,top:t}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData(`note`),e,t,this):(this.noteEl.style.left=e+`px`,this.noteEl.style.top=t+`px`,this.noteEl.style.display=`block`)}),r.on(`mouseout`,()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display=`none`}),r.on(`click`,e=>{this.mindMap.emit(`node_note_click`,this,e,r)}),r.on(`dblclick`,e=>{this.mindMap.emit(`node_note_dblclick`,this,e,r)}),{node:r,width:n,height:n}}function ul(){let{attachmentUrl:e,attachmentName:t}=this.getData();if(!e)return;let n=this.getNodeIconSize(`attachmentIcon`),{icon:r,style:i}=this.mindMap.opt.attachmentIcon,a=new yo().attr(`cursor`,`pointer`).size(n,n);t&&a.add(yo(`<title>${t}</title>`)),a.add(new Wa().size(n,n).fill({color:`transparent`}));let o=yo(r||$c.attachment).size(n,n);return this.style.iconNode(o,i.color),a.add(o),a.on(`click`,e=>{this.mindMap.emit(`node_attachmentClick`,this,e,a)}),a.on(`contextmenu`,e=>{this.mindMap.emit(`node_attachmentContextmenu`,this,e,a)}),{node:a,width:n,height:n}}function dl(e){let{style:t}=this.mindMap.opt[e];return Qo(t.size)?this.mindMap.themeConfig.iconSize:t.size}function fl(){let e=this.getNodeIconSize(`noteIcon`),{scaleY:t}=this.mindMap.view.getTransformData().transform,n=e*t,{left:r,top:i}=this._noteData.node.node.getBoundingClientRect();return i+=n,{left:r,top:i}}function pl(e){this.mindMap.commonCaches.measureCustomNodeContentSizeEl||(this.mindMap.commonCaches.measureCustomNodeContentSizeEl=document.createElement(`div`),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.style.cssText=`
|
|
67
|
+
position: fixed;
|
|
68
|
+
left: -99999px;
|
|
69
|
+
top: -99999px;
|
|
70
|
+
`,this.mindMap.el.appendChild(this.mindMap.commonCaches.measureCustomNodeContentSizeEl)),this.mindMap.commonCaches.measureCustomNodeContentSizeEl.innerHTML=``,this.mindMap.commonCaches.measureCustomNodeContentSizeEl.appendChild(e);let t=this.mindMap.commonCaches.measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:t.width,height:t.height}}function ml(){return!!this._customNodeContent}var hl,gl,_l,vl=m((()=>{M(),bo(),el(),wt(),hl=(e,t)=>{let n=new fo,r=new ao().text(e);return t.text(r),n.add(r),n.bbox()},gl={radius:3,fontSize:12,fill:``,height:20,paddingX:8},_l={getImageUrl:tl,createImgNode:nl,getImgShowSize:rl,createIconNode:il,createRichTextNode:al,createTextNode:ol,createHyperlinkNode:sl,createTagNode:cl,createNoteNode:ll,createAttachmentNode:ul,getNoteContentPosition:fl,getNodeIconSize:dl,measureCustomNodeContentSize:pl,isUseCustomNodeContent:ml}}));function yl(){if(this.getChildrenLength()<=0||this.isRoot)return;let{alwaysShowExpandBtn:e,notShowExpandBtn:t,expandBtnSize:n}=this.mindMap.opt;if(!e&&!t){let{width:e,height:t}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new Wa,this._unVisibleRectRegionNode.fill({color:`transparent`})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,n,e,t,this)}}function bl(){this._unVisibleRectRegionNode&&=(this._unVisibleRectRegionNode.remove(),null)}function xl(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.getChildrenLength()>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}var Sl,Cl=m((()=>{bo(),Sl={renderExpandBtnPlaceholderRect:yl,clearExpandBtnPlaceholderRect:bl,updateExpandBtnPlaceholderRect:xl}}));function wl(){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 Tl(e){if(!this.isDragHandleMousedown)return;e.stopPropagation(),e.preventDefault();let{minNodeTextModifyWidth:t,maxNodeTextModifyWidth:n,isUseCustomNodeContent:r,customCreateNodeContent:i}=this.mindMap.opt,a=r&&i&&this._customNodeContent;document.body.style.cursor=`ew-resize`,this.group.css({cursor:`ew-resize`});let{scaleX:o}=this.mindMap.draw.transform(),s=e.clientX-this.dragHandleMousedownX,c=this.dragHandleMousedownCustomTextWidth+(this.dragHandleIndex===0?-s:s)/o;if(c=Math.max(c,t),n!==-1&&(c=Math.min(c,n)),!a&&this.getData(`image`)){let e=this.getImgShowSize();this._rectInfo.textContentWidth-this.customTextWidth+c<=e[0]&&(c=e[0]+this.customTextWidth-this._rectInfo.textContentWidth)}this.customTextWidth=c,this.dragHandleIndex===0&&(this.left=this.dragHandleMousedownLeft+s/o),this.reRender(a?[]:[`text`],{ignoreUpdateCustomTextWidth:!0})}function El(){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 Dl(){let e=[new Wa,new Wa];return e.forEach((e,t)=>{e.size(this.dragHandleWidth,this.height).fill({color:`transparent`}).css({cursor:`ew-resize`}),e.on(`mousedown`,e=>{e.stopPropagation(),e.preventDefault(),this.dragHandleMousedownX=e.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})}),e}function Ol(){this.checkEnableDragModifyNodeWidth()&&(this._dragHandleNodes||=this.createDragHandleNode(),this.getData(`isActive`)?(this._dragHandleNodes.forEach(e=>{e.height(this.height),this.group.add(e)}),this._dragHandleNodes[1].x(this.width-this.dragHandleWidth)):this._dragHandleNodes.forEach(e=>{e.remove()}))}var kl,Al=m((()=>{bo(),kl={initDragHandle:wl,onDragMousemoveHandle:Tl,onDragMouseupHandle:El,createDragHandleNode:Dl,updateDragHandle:Ol}}));function jl(){this.mindMap.cooperate&&(this._userListGroup=new fo,this.group.add(this._userListGroup))}function Ml(e){let{avatarSize:t,fontSize:n}=this.mindMap.opt.cooperateStyle,r=new fo,i=e.isMore?e.name:String(e.name)[0],a=new so().size(t,t);a.fill({color:e.color||Ts(i)});let o=new ao().text(i).fill({color:`#fff`}).css({"font-size":n+`px`}).dx(-n/2).dy((t-n)/2);return r.add(a).add(o),r}function Nl(e){let{avatarSize:t}=this.mindMap.opt.cooperateStyle;return new _a().load(e.avatar).size(t,t)}function Pl(){if(!this._userListGroup)return;let{avatarSize:e}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();let t=this.userList.length,n=Math.floor(this.width/e),r=[];t>n?r.push(...this.userList.slice(0,n-1),{isMore:!0,name:`+`+(t-n+1)}):r.push(...this.userList),r.forEach((t,n)=>{let r=null;r=t.avatar?this.createImageAvatar(t):this.createTextAvatar(t),r.on(`click`,e=>{this.mindMap.emit(`node_cooperate_avatar_click`,t,this,r,e)}),r.on(`mouseenter`,e=>{this.mindMap.emit(`node_cooperate_avatar_mouseenter`,t,this,r,e)}),r.on(`mouseleave`,e=>{this.mindMap.emit(`node_cooperate_avatar_mouseleave`,t,this,r,e)}),r.x(n*e).cy(-e/2),this._userListGroup.add(r)})}function Fl(e){this.userList.find(t=>t.id==e.id)||(this.userList.push(e),this.updateUserListNode())}function Il(e){let t=this.userList.findIndex(t=>t.id==e.id);t!==-1&&(this.userList.splice(t,1),this.updateUserListNode())}function Ll(){this.userList=[],this.updateUserListNode()}var Rl,zl=m((()=>{bo(),M(),Rl={createUserListNode:jl,updateUserListNode:Pl,createTextAvatar:Ml,createImageAvatar:Nl,addUser:Fl,removeUser:Il,emptyUser:Ll}}));function Bl(){this.isGeneralization||(this._quickCreateChildBtn=null,this._showQuickCreateChildBtn=!1)}function Vl(){if(!(this.isGeneralization||this.getChildrenLength()>0)){if(this._quickCreateChildBtn)this.group.add(this._quickCreateChildBtn);else{let{quickCreateChildBtnIcon:e,expandBtnStyle:t,expandBtnSize:n}=this.mindMap.opt,{icon:r,style:i}=e,{color:a,fill:o}=t||{color:`#808080`,fill:`#fff`};a=i.color||a;let s=yo(r||Cc.quickCreateChild).size(n,n);s.css({cursor:`pointer`}),s.x(0).y(-n/2),this.style.iconNode(s,a);let c=new so().size(n);c.x(0).y(-n/2),c.fill({color:o}).css({cursor:`pointer`}),this._quickCreateChildBtn=new fo,this._quickCreateChildBtn.add(c).add(s),this._quickCreateChildBtn.on(`click`,e=>{e.stopPropagation(),this.mindMap.emit(`quick_create_btn_click`,this);let{customQuickCreateChildBtnClick:t}=this.mindMap.opt;if(typeof t==`function`){t(this);return}this.mindMap.execCommand(`INSERT_CHILD_NODE`,!0,[this])}),this._quickCreateChildBtn.on(`dblclick`,e=>{e.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 Hl(){this.isGeneralization||this._quickCreateChildBtn&&this._showQuickCreateChildBtn&&(this._quickCreateChildBtn.remove(),this._showQuickCreateChildBtn=!1)}function Ul(){if(this.isGeneralization)return;let{isActive:e}=this.getData();e||this.removeQuickCreateChildBtn()}var Wl,Gl=m((()=>{wc(),bo(),Wl={initQuickCreateChildBtn:Bl,showQuickCreateChildBtn:Vl,removeQuickCreateChildBtn:Hl,hideQuickCreateChildBtn:Ul}}));function Kl(e,t,n,r,i){let{imgTextMargin:a}=this.mindMap.opt;return e===`v`?r>0&&i>0?a:0:t>0&&n>0?a:0}function ql(e){let t=0,n=this._tagData.reduce((e,n)=>(t=Math.max(t,n.height),e+=n.width),0);return n+=(this._tagData.length-1)*e,{width:n,height:t}}function Jl(){if(this.isUseCustomNodeContent()){let e=this.measureCustomNodeContentSize(this._customNodeContent.cloneNode(!0));return{width:this.hasCustomWidth()?this.customTextWidth:e.width,height:e.height}}let{TAG_PLACEMENT:e,IMG_PLACEMENT:t}=O,{textContentMargin:n}=this.mindMap.opt,r=(this.getStyle(`tagPlacement`)||e.RIGHT)===e.BOTTOM,i=this.getStyle(`imgPlacement`)||t.TOP,a=0,o=0,s=0,c=0,l=0,u=0,d=0;if(this._imgData&&(a=this._imgData.width,o=this._imgData.height),this.mindMap.nodeInnerPrefixList.forEach(e=>{let t=this[`_${e.name}Data`];t&&(s+=t.width,c=Math.max(c,t.height),d++)}),this._prefixData&&(s+=this._prefixData.width,c=Math.max(c,this._prefixData.height),d++),this._iconData.length>0&&(s+=this._iconData.reduce((e,t)=>(c=Math.max(c,t.height),e+=t.width),0)+(this._iconData.length-1)*n,d++),this._textData&&(s+=this._textData.width,c=Math.max(c,this._textData.height),d++),this._hyperlinkData&&(s+=this._hyperlinkData.width,c=Math.max(c,this._hyperlinkData.height),d++),this._tagData.length>0){let{width:e,height:t}=this.getTagContentSize(n);r?(l=e,u=t):(s+=e,c=Math.max(c,t),d++)}this._noteData&&(s+=this._noteData.width,c=Math.max(c,this._noteData.height),d++),this._attachmentData&&(s+=this._attachmentData.width,c=Math.max(c,this._attachmentData.height),d++),this._postfixData&&(s+=this._postfixData.width,c=Math.max(c,this._postfixData.height),d++),this.mindMap.nodeInnerPostfixList.forEach(e=>{let t=this[`_${e.name}Data`];t&&(s+=t.width,c=Math.max(c,t.height),d++)}),s+=(d-1)*n,r&&s>0&&u>0&&(this._rectInfo.textContentWidthWithoutTag=s,s=Math.max(s,l),c=c+n+u),this._rectInfo.textContentWidth=s,this._rectInfo.textContentHeight=c;let f=0,p=0;[t.TOP,t.BOTTOM].includes(i)?(f=Math.max(a,s),p=o+c+this.getImgTextMarin(`v`,0,0,o,c)):(f=a+s+this.getImgTextMarin(`h`,a,s),p=Math.max(o,c));let{paddingX:m,paddingY:h}=this.getPaddingVale(),{paddingX:g,paddingY:_}=this.shapeInstance.getShapePadding(f,p,m,h);this.shapePadding.paddingX=g,this.shapePadding.paddingY=_;let v=this.getBorderWidth();return{width:f+m*2+g*2+v,height:p+h*2+_*2+v}}function Yl(e,t){let{hoverRectPadding:n}=this.mindMap.opt;this.hoverNode=new Wa().size(e+n*2,t+n*2).x(-n).y(-n),this.hoverNode.addClass(`smm-hover-node`),this.style.hoverNode(this.hoverNode,e,t),this.group.add(this.hoverNode)}function Xl(){if(!this.group||!this.isUseCustomNodeContent())return;this.shapeNode&&this.shapeNode.remove(),this._unVisibleRectRegionNode&&this._unVisibleRectRegionNode.remove(),this.hoverNode&&this.hoverNode.remove();let{width:e,height:t}=this,n=this.getBorderWidth()/2;this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass(`smm-node-shape`),this.shapeNode.translate(n,n),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass(`generalization_`+this.generalizationBelongNode.uid),this.addHoverNode(e,t),this.shapeNode.back(),this.group.findOne(`foreignObject`).size(e,t)}function Zl(){if(!this.group)return;this.group.clear();let{openRealtimeRenderOnNodeTextEdit:e,textContentMargin:t,addCustomContentToNode:n}=this.mindMap.opt,{width:r,height:i}=this,{paddingX:a,paddingY:o}=this.getPaddingVale(),s=this.getBorderWidth()/2;if(a+=this.shapePadding.paddingX+s,o+=this.shapePadding.paddingY+s,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass(`smm-node-shape`),this.shapeNode.translate(s,s),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),this.isUseCustomNodeContent()){let e=Us({el:this._customNodeContent,width:r,height:i});this.group.add(e),this.addHoverNode(r,i);return}let{IMG_PLACEMENT:c,TAG_PLACEMENT:l}=O,u=this.getStyle(`imgPlacement`)||c.TOP,d=(this.getStyle(`tagPlacement`)||l.RIGHT)===l.BOTTOM,{textContentWidth:f,textContentHeight:p,textContentWidthWithoutTag:m}=this._rectInfo,h=p,g=0,_=0,v=this._tagData&&this._tagData.length>0;if(v){let e=this.getTagContentSize(t);g=e.width,_=e.height,d&&(p-=_+t)}let y=0,b=0;if(this._imgData)switch(y=this._imgData.width,b=this._imgData.height,this.group.add(this._imgData.node),u){case c.TOP:this._imgData.node.cx(r/2).y(o);break;case c.BOTTOM:this._imgData.node.cx(r/2).y(i-o-b);break;case c.LEFT:this._imgData.node.x(a).cy(i/2);break;case c.RIGHT:this._imgData.node.x(r-a-y).cy(i/2);break;default:break}let x=new fo,S=0;if(v&&d&&(S=m<f?(f-m)/2:0),this.mindMap.nodeInnerPrefixList.forEach(e=>{let n=this[`_${e.name}Data`];n&&(n.node.x(S).y((p-n.height)/2),x.add(n.node),S+=n.width+t)}),this._prefixData){let e=Us({el:this._prefixData.el,width:this._prefixData.width,height:this._prefixData.height});e.x(S).y((p-this._prefixData.height)/2),x.add(e),S+=this._prefixData.width+t}let C=new fo;if(this._iconData&&this._iconData.length>0){let e=0;this._iconData.forEach(n=>{n.node.x(S+e).y((p-n.height)/2),C.add(n.node),e+=n.width+t}),x.add(C),S+=e}if(this._textData){let n=this._textData.node.attr(`data-offsetx`)||0;this._textData.node.attr(`data-offsetx`,S),(this._textData.nodeContent||this._textData.node).x(-n).x(S).y((p-this._textData.height)/2),e&&this._textData.node.opacity(this.mindMap.renderer.textEdit.getCurrentEditNode()===this?0:1),x.add(this._textData.node),S+=this._textData.width+t}this._hyperlinkData&&(this._hyperlinkData.node.x(S).y((p-this._hyperlinkData.height)/2),x.add(this._hyperlinkData.node),S+=this._hyperlinkData.width+t);let w=new fo;if(v)if(d){let e=0;this._tagData.forEach(n=>{n.node.x(e).y((_-n.height)/2),w.add(n.node),e+=n.width+t}),w.x((f-g)/2).y(h-_),x.add(w)}else{let e=0;this._tagData.forEach(n=>{n.node.x(S+e).y((p-n.height)/2),w.add(n.node),e+=n.width+t}),x.add(w),S+=e}if(this._noteData&&(this._noteData.node.x(S).y((p-this._noteData.height)/2),x.add(this._noteData.node),S+=this._noteData.width+t),this._attachmentData&&(this._attachmentData.node.x(S).y((p-this._attachmentData.height)/2),x.add(this._attachmentData.node),S+=this._attachmentData.width+t),this._postfixData){let e=Us({el:this._postfixData.el,width:this._postfixData.width,height:this._postfixData.height});e.x(S).y((p-this._postfixData.height)/2),x.add(e),S+=this._postfixData.width+t}this.mindMap.nodeInnerPostfixList.forEach(e=>{let n=this[`_${e.name}Data`];n&&(n.node.x(S).y((p-n.height)/2),x.add(n.node),S+=n.width+t)}),this.group.add(x);let{width:T,height:E}=x.bbox(),ee=0,te=0;switch(u){case c.TOP:ee=r/2-T/2,te=o+b+this.getImgTextMarin(`v`,0,0,b,h);break;case c.BOTTOM:ee=r/2-T/2,te=o;break;case c.LEFT:ee=y+a+this.getImgTextMarin(`h`,y,f),te=i/2-E/2;break;case c.RIGHT:ee=a,te=i/2-E/2;break}if(x.translate(ee,te),this.addHoverNode(r,i),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el){let e=Us(this._customContentAddToNodeAdd);this.group.add(e),n&&typeof n.handle==`function`&&n.handle({content:this._customContentAddToNodeAdd,element:e,node:this})}this.mindMap.emit(`node_layout_end`,this)}var Ql,$l=m((()=>{wt(),bo(),M(),Ql={getImgTextMarin:Kl,getTagContentSize:ql,getNodeRect:Jl,addHoverNode:Yl,layout:Zl,customNodeContentRealtimeLayout:Xl}})),eu,tu=m((()=>{Qs(),tc(),bo(),_c(),Pc(),qc(),vl(),Cl(),Al(),zl(),Gl(),$l(),wt(),M(),eu=class e{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 Zs(this),this.effectiveStyles={},this.shapeInstance=new $s(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;let t=Object.getPrototypeOf(this);t.bindEvent||=(Object.keys(Ql).forEach(e=>{t[e]=Ql[e]}),Object.keys(gc).forEach(e=>{t[e]=gc[e]}),Object.keys(Nc).forEach(e=>{t[e]=Nc[e]}),Object.keys(Sl).forEach(e=>{t[e]=Sl[e]}),Object.keys(Kc).forEach(e=>{t[e]=Kc[e]}),Object.keys(_l).forEach(e=>{t[e]=_l[e]}),this.mindMap.cooperate&&Object.keys(Rl).forEach(e=>{t[e]=Rl[e]}),Object.keys(kl).forEach(e=>{t[e]=kl[e]}),this.mindMap.opt.isShowCreateChildBtnIcon&&(Object.keys(Wl).forEach(e=>{t[e]=Wl[e]}),this.initQuickCreateChildBtn()),!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){let{isUseCustomNodeContent:t,customCreateNodeContent:n,createNodePrefixContent:r,createNodePostfixContent:i,addCustomContentToNode:a}=this.mindMap.opt,o=[`custom`,`image`,`icon`,`text`,`hyperlink`,`tag`,`note`,`attachment`,`prefix`,`postfix`,...this.mindMap.nodeInnerPrefixList.map(e=>e.name),...this.mindMap.nodeInnerPostfixList.map(e=>e.name)],s={};if(Array.isArray(e)?o.forEach(t=>{e.includes(t)&&(s[t]=!0)}):o.forEach(e=>{s[e]=!0}),t&&n&&s.custom&&(this._customNodeContent=n(this)),this._customNodeContent){Gs(this._customNodeContent);return}s.image&&(this._imgData=this.createImgNode()),s.icon&&(this._iconData=this.createIconNode()),s.text&&(this._textData=this.createTextNode()),s.hyperlink&&(this._hyperlinkData=this.createHyperlinkNode()),s.tag&&(this._tagData=this.createTagNode()),s.note&&(this._noteData=this.createNoteNode()),s.attachment&&(this._attachmentData=this.createAttachmentNode()),this.mindMap.nodeInnerPrefixList.forEach(e=>{s[e.name]&&(this[`_${e.name}Data`]=e.createContent(this))}),s.prefix&&(this._prefixData=r?r(this):null,this._prefixData&&this._prefixData.el&&Gs(this._prefixData.el)),s.postfix&&(this._postfixData=i?i(this):null,this._postfixData&&this._postfixData.el&&Gs(this._postfixData.el)),this.mindMap.nodeInnerPostfixList.forEach(e=>{s[e.name]&&(this[`_${e.name}Data`]=e.createContent(this))}),a&&typeof a.create==`function`&&(this._customContentAddToNodeAdd=a.create(this),this._customContentAddToNodeAdd&&this._customContentAddToNodeAdd.el&&Gs(this._customContentAddToNodeAdd.el))}getSize(e,t={}){t.ignoreUpdateCustomTextWidth||(this.customTextWidth=this.getData(`customTextWidth`)||void 0),this.customLeft=this.getData(`customLeft`)||void 0,this.customTop=this.getData(`customTop`)||void 0,this.createNodeData(e);let{width:n,height:r}=this.getNodeRect(),i=this.width!==n||this.height!==r;return this.width=n,this.height=r,i}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=>{let{readonly:t,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:r,mousedownEventPreventDefault:i}=this.mindMap.opt;if(i&&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;let e=this.getData(`isActive`);e||this.mindMap.emit(`before_node_active`,this,this.renderer.activeNodeList),this.mindMap.renderer[e?`removeNodeFromActiveList`:`addNodeToActiveList`](this,!0),this.renderer.emitNodeActiveEvent(e?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=>{let{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=>{let{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();let{alwaysShowExpandBtn:t,notShowExpandBtn:n,isShowCreateChildBtnIcon:r,readonly:i}=this.mindMap.opt,a=this.getChildrenLength();if(!n)if(t)this._expandBtn&&a<=0?this.removeExpandBtn():this.renderExpandBtn();else{let{isActive:e,expand:t}=this.getData();a<=0?this.removeExpandBtn():t&&!e&&!this._isMouseenter?this.hideExpandBtn():this.showExpandBtn()}if(r)if(a>0)this.removeQuickCreateChildBtn();else{let{isActive:e}=this.getData();e?this.showQuickCreateChildBtn():this.hideQuickCreateChildBtn()}this.updateDragHandle(),this.renderGeneralization(e),this.updateUserListNode&&this.updateUserListNode();let o=this.group.transform();this.nodeDataSnapshot=i?``: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){let{scaleX:n,scaleY:r,translateX:i,translateY:a}=this.mindMap.draw.transform();return{left:e*n+i,top:t*r+a}}checkIsInClient(e=0){let{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){let n=this.getSize(e,t);return this.layout(),this.update(),n}updateNodeActiveClass(){if(!this.group)return;let e=this.getData(`isActive`);this.group[e?`addClass`:`removeClass`](`active`)}updateNodeByActive(e){if(this.group){let{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();let{openPerformance:r,performanceConfig:i}=this.mindMap.opt;if(t||!r||this.checkIsInClient(i.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 fo,this.group.addClass(`smm-node`),this.group.css({cursor:`default`}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update(t)):r&&i.removeNodeWhenOutCanvas&&this.removeSelf(),this.children&&this.children.length&&this.getData(`expand`)!==!1){let r=0;this.children.forEach(i=>{let a=()=>{i.render(()=>{r++,r>=this.children.length&&e()},t,n)};n?setTimeout(a,0):a()})}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){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].hide(),this._lines.forEach(e=>{e.hide()})}this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].show(),this._lines.forEach(e=>{e.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?Array(t-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):t<this._lines.length&&(this._lines.slice(t).forEach(e=>{e.remove()}),this._lines=this._lines.slice(0,t)),this.renderer.layout.renderLine(this,this._lines,(...e)=>{this.styleLine(...e)},this.style.getStyle(`lineStyle`,!0)),e&&this.children&&this.children.length>0&&this.children.forEach(t=>{t.renderLine(e)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?O.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){let{enableInheritAncestorLineStyle:r}=this.mindMap.opt,i=r?`getSelfInhertStyle`:`getSelfStyle`,a=t[i](`lineWidth`)||t.getStyle(`lineWidth`,!0),o=t[i](`lineColor`)||this.getRainbowLineColor(t)||t.getStyle(`lineColor`,!0),s=t[i](`lineDasharray`)||t.getStyle(`lineDasharray`,!0);this.style.line(e,{width:a,color:o,dasharray:s},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;let 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){let 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 Po({},this,e,t)}getAncestorNodes(){let e=[],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(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),{left:i,top:a,width:o,height:s}=this,c=(i+o)*e+n,l=(a+s)*t+r;return i=i*e+n,a=a*t+r,{left:i,right:c,top:a,bottom:l,width:o*e,height:s*t}}highlight(){this.group&&this.group.addClass(`smm-node-highlight`)}closeHighlight(){this.group&&this.group.removeClass(`smm-node-highlight`)}fakeClone(){let t=new e({...this.opt,uid:Jo()});return Object.keys(this).forEach(e=>{t[e]=this[e]}),t}createSvgTextNode(e=``){return new ao().text(e)}getSvgObjects(){return{SVG:yo,G:fo,Rect:Wa}}checkEnableDragModifyNodeWidth(){let{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}}})),nu,ru=m((()=>{nu=class{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}}})),iu,au=m((()=>{tu(),wt(),ru(),M(),iu=class{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 nu(this.mindMap.opt.maxNodeCacheCount),this.rootNodeCenterOffset=null}doLayout(){throw Error(`【computed】方法为必要方法,需要子类进行重写!`)}renderLine(){throw Error(`【renderLine】方法为必要方法,需要子类进行重写!`)}renderExpandBtn(){throw Error(`【renderExpandBtn】方法为必要方法,需要子类进行重写!`)}renderGeneralization(){}cacheNode(e,t){this.renderer.nodeCache[e]=t,this.lru.add(e,t)}checkIsNeedResizeSources(){return this.renderer.checkHasRenderSource(O.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(O.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(n=>{if(n.updateNodeData){let i=n.updateNodeData(e,t);i&&(r=i)}});let i=!1;return this.mindMap.nodeInnerPostfixList.forEach(t=>{if(t.updateNodeData){let r=t.updateNodeData(e,n);r&&(i=r)}}),r||i}createNode(e,t,n,r,i,a){let o={};this.mindMap.nodeInnerPrefixList.forEach(n=>{if(n.createNodeData){let[s,c]=n.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:i});o[s]=c}});let s={};this.mindMap.nodeInnerPostfixList.forEach(n=>{if(n.createNodeData){let[o,c]=n.createNodeData({data:e,parent:t,ancestors:a,layerIndex:r,index:i});s[o]=c}});let c=e.data.uid,l=null;if(e&&e._node&&!this.renderer.reRender){l=e._node;let i=this.checkIsLayerTypeChange(l.layerIndex,r);l.reset(),l.layerIndex=r,n?l.isRoot=!0:l.parent=t._node,this.cacheNode(e._node.uid,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l);let a=this.checkNodeFixChange(l,o,s),c=this.checkIsNeedResizeSources(),u=this.checkIsNodeDataChange(e._node.nodeDataSnapshot,e.data);(c||u||i||l.getData(`resetRichText`)&&!l.isUseCustomNodeContent()||l.getData(`needUpdate`)||a)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,c)}else if((this.lru.has(c)||this.renderer.lastNodeCache[c])&&!this.renderer.reRender){l=this.lru.get(c)||this.renderer.lastNodeCache[c];let i=JSON.stringify(l.getData()),a=this.checkIsLayerTypeChange(l.layerIndex,r);l.reset(),l.nodeData=l.handleData(e||{}),l.layerIndex=r,n?l.isRoot=!0:l.parent=t._node,this.cacheNode(c,l),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(l),e._node=l;let u=this.checkIsNeedResizeSources(),d=this.checkIsNodeDataChange(i,e.data),f=this.checkNodeFixChange(l,o,s);(u||d||a||l.getData(`resetRichText`)&&!l.isUseCustomNodeContent()||l.getData(`needUpdate`)||f)&&(l.getSize(),l.needLayout=!0),this.checkGetGeneralizationChange(l,u)}else{let i=c||Jo();l=new eu({data:e,uid:i,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:r,isRoot:n,parent:n?null:t._node,...o}),e.data.uid=i,this.cacheNode(i,l),e._node=l}return e.data.isActive&&this.renderer.addNodeToActiveList(l),this.mindMap.renderer.findActiveNodeIndex(l)!==-1&&l.setData({isActive:!0}),n?this.root=l:t._node.addChildren(l),l}checkGetGeneralizationChange(e,t){let n=e.getData(`generalization`);n&&e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach((e,r)=>{let i=e.generalizationNode,a=i.getData(),o=n[r];(t||o&&JSON.stringify(a)!==JSON.stringify(o))&&(o&&(i.nodeData.data=o),i.getSize(),i.needLayout=!0)})}formatPosition(e,t,n){return typeof e==`number`?e:gt[e]===void 0?/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2:t*gt[e]}formatInitRootNodePosition(e){let{CENTER:t}=O.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,{CENTER:r}=O.INIT_ROOT_NODE_POSITION;if(n=this.formatInitRootNodePosition(n),n[0]===r&&n[1]===r)this.rootNodeCenterOffset={x:0,y:0};else{let n={width:e,height:t},i={width:e,height:t};this.setNodeCenter(n,[r,r]),this.setNodeCenter(i),this.rootNodeCenterOffset={x:i.left-n.left,y:i.top-n.top}}return this.rootNodeCenterOffset}updateChildren(e,t,n){e.forEach(e=>{e[t]+=n,e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildren(e.children,t,n)})}updateChildrenPro(e,t){e.forEach(e=>{Object.keys(t).forEach(n=>{e[n]+=t[n]}),e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildrenPro(e.children,t)})}getNodeAreaWidth(e,t=!1){let n=[],r=0,i=(e,a)=>{t&&e.checkHasGeneralization()&&(r+=e._generalizationNodeWidth),e.children.length?(a+=e.width/2,e.children.forEach(e=>{i(e,a)})):(a+=e.width,n.push(a))};return i(e,0),Math.max(...n)+r}quadraticCurvePath(e,t,n,r,i=!1){let a,o;return i?(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,i=!1){let a,o,s,c;return i?(a=e,o=t+(r-t)/2,s=n,c=o):(a=e+(n-e)/2,o=t,s=a,c=r),`M ${e},${t} C ${a},${o} ${s},${c} ${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){let{lineRadius:t}=this.mindMap.themeConfig,n=e.length,r=``,i=``;if(n>=3&&t>0){let r=e[n-3],a=e[n-2],o=e[n-1];if(!(r[0].toFixed(0)===a[0].toFixed(0)&&a[0].toFixed(0)===o[0].toFixed(0)||r[1].toFixed(0)===a[1].toFixed(0)&&a[1].toFixed(0)===o[1].toFixed(0))){let s=this.computeNewPoint(r,a,t),c=this.computeNewPoint(o,a,t);i=`Q ${a[0]},${a[1]} ${c[0]},${c[1]}`,e.splice(n-2,1,s,i)}}return e.forEach((e,t)=>{if(typeof e==`string`)r+=e;else{let[n,i]=e;t===0?r+=`M ${n},${i}`:r+=`L ${n},${i}`}}),r}getMarginX(e){let{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,a=n.hoverRectPadding*2;return e===1?r.marginX+a:i.marginX+a}getMarginY(e){let{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,a=n.hoverRectPadding*2;return e===1?r.marginY+a:i.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,i=e=>{let n=1/0,a=-1/0,o=1/0,s=-1/0;e.children&&e.children.length>0&&e.children.forEach(e=>{let{left:c,right:l,top:u,bottom:d}=i(e),f=e.checkHasGeneralization()&&e.getData(`expand`)?e._generalizationNodeWidth+r:0,p=e.checkHasGeneralization()&&e.getData(`expand`)?e._generalizationNodeHeight+r:0;c-(t===`h`?f:0)<n&&(n=c-(t===`h`?f:0)),l+(t===`h`?f:0)>a&&(a=l+(t===`h`?f:0)),u<o&&(o=u),d+(t===`v`?p:0)>s&&(s=d+(t===`v`?p:0))});let c={left:e.left,right:e.left+e.width,top:e.top,bottom:e.top+e.height};return{left:c.left<n?c.left:n,right:c.right>a?c.right:a,top:c.top<o?c.top:o,bottom:c.bottom>s?c.bottom:s}},{left:a,right:o,top:s,bottom:c}=i(e);return{left:a,right:o,top:s,bottom:c,generalizationLineMargin:n,generalizationNodeMargin:r}}getChildrenBoundaries(e,t,n=0,r){let{generalizationLineMargin:i,generalizationNodeMargin:a}=this.mindMap.themeConfig,o=e.children.slice(n,r+1),s=1/0,c=-1/0,l=1/0,u=-1/0;return o.forEach(e=>{let n=this.getNodeBoundaries(e,t);s=n.left<s?n.left:s,c=n.right>c?n.right:c,l=n.top<l?n.top:l,u=n.bottom>u?n.bottom:u}),{left:s,right:c,top:l,bottom:u,generalizationLineMargin:i,generalizationNodeMargin:a}}getNodeGeneralizationRenderBoundaries(e,t){let n=null;return n=e.range?this.getChildrenBoundaries(e.node,t,e.range[0],e.range[1]):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){let{customTransformNodeLinePath:t}=this.mindMap.opt;return t?t(e):e}}})),ou,su=m((()=>{au(),M(),wt(),ou=class extends iu{constructor(e={},t){super(e),this.isUseLeft=t===O.LAYOUT.LOGICAL_STRUCTURE_LEFT}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){let e=0;Do(this.renderer.renderTree,null,(t,n,r,i,a,o)=>{let s=this.createNode(t,n,r,i,a,o);if(s.sortIndex=e,e++,r?this.setNodeCenter(s):this.isUseLeft?s.left=n._node.left-s.width-this.getMarginX(i):s.left=n._node.left+n._node.width+this.getMarginX(i),!t.data.expand)return!0},(e,t,n,r)=>{let i=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0;let a=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.childrenAreaHeight2=Math.max(e._node.childrenAreaHeight,a)},!0,0)}computedTopValue(){Do(this.root,null,(e,t,n,r)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2-e.childrenAreaHeight/2+t;e.children.forEach(e=>{e.top=n,n+=e.height+t})}},null,!0)}adjustTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;let i=e.childrenAreaHeight2-this.getMarginY(r+1)*2-e.height;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=ws(e,n);n.forEach((n,i)=>{if(n.uid===e.uid||n.hasCustomPosition())return;let a=0;i<r?a=-t:i>r&&(a=t),n.top+=a,n.children&&n.children.length&&this.updateChildren(n.children,`top`,a)}),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:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let u=(this.getMarginX(e.layerIndex+1)-s)*.6;this.isUseLeft&&(u*=-1);let d=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,l)=>{let f;f=this.isUseLeft?e.layerIndex===0?r:r-s:e.layerIndex===0?r+a:r+a+s;let p=i+o/2,m=this.isUseLeft?c.left+c.width:c.left,h=c.top+c.height/2,g=d?c.width*(this.isUseLeft?-1:1):0;p=d&&!e.isRoot?p+o/2:p,h=d?h+c.height/2:h;let _=this.createFoldLine([[f,p],[f+u,p],[f+u,h],[m+g,h]]);this.setLineStyle(n,t[l],_,c)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let{nodeUseLineStyle:u}=this.mindMap.themeConfig;e.children.forEach((c,l)=>{e.layerIndex===0&&(s=0);let d=this.isUseLeft?r-s:r+a+s,f=i+o/2,p=this.isUseLeft?c.left+c.width:c.left,m=c.top+c.height/2;f=u&&!e.isRoot?f+o/2:f,m=u?m+c.height/2:m;let h=u?` L ${this.isUseLeft?c.left:c.left+c.width},${m}`:``,g=`M ${d},${f} L ${p},${m}`+h;this.setLineStyle(n,t[l],g,c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let{nodeUseLineStyle:u,rootLineStartPositionKeepSameInCurve:d,rootLineKeepSameInCurve:f}=this.mindMap.themeConfig;e.children.forEach((c,l)=>{e.layerIndex===0&&(s=0);let p;p=this.isUseLeft?e.layerIndex===0&&!d?r+a/2:r-s:e.layerIndex===0&&!d?r+a/2:r+a+s;let m=i+o/2,h=this.isUseLeft?c.left+c.width:c.left,g=c.top+c.height/2,_=``;m=u&&!e.isRoot?m+o/2:m,g=u?g+c.height/2:g;let v;v=this.isUseLeft?u?` L ${c.left},${g}`:``:u?` L ${c.left+c.width},${g}`:``,_=e.isRoot&&!f?this.quadraticCurvePath(p,m,h,g)+v:this.cubicBezierPath(p,m,h,g)+v,this.setLineStyle(n,t[l],_,c)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,layerIndex:a}=e;a===0&&(i=0);let{translateX:o,translateY:s}=t.transform(),c=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,l=this.isUseLeft?0-i:n,u=r/2+c;l===o&&u===s||t.translate(l-o,u-s)}renderGeneralization(e){e.forEach(e=>{let{left:t,top:n,bottom:r,right:i,generalizationLineMargin:a,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,`h`),s=this.isUseLeft?t-a:i+a,c=s,l=n,u=s,d=r,f=`M ${c},${l} Q ${c+(this.isUseLeft?-20:20)},${l+(d-l)/2} ${u},${d}`;e.generalizationLine.plot(f),e.generalizationNode.left=s+(this.isUseLeft?-o:o)-(this.isUseLeft?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.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)}}})),cu,lu=m((()=>{au(),M(),wt(),cu=class extends iu{constructor(e={}){super(e)}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}])}computedBaseValue(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{let o=this.createNode(e,t,n,r,i,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=o.getData(`dir`)||(i%2==0?O.LAYOUT_GROW_DIR.RIGHT:O.LAYOUT_GROW_DIR.LEFT),o.left=o.dir===O.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 i=0,a=0,o=0,s=0;e._node.children.forEach(e=>{e.dir===O.LAYOUT_GROW_DIR.LEFT?(i++,o+=e.height):(a++,s+=e.height)}),e._node.leftChildrenAreaHeight=o+(i+1)*this.getMarginY(r+1),e._node.rightChildrenAreaHeight=s+(a+1)*this.getMarginY(r+1);let c=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.leftChildrenAreaHeight2=Math.max(e._node.leftChildrenAreaHeight,c),e._node.rightChildrenAreaHeight2=Math.max(e._node.rightChildrenAreaHeight,c)},!0,0)}computedTopValue(){Do(this.root,null,(e,t,n,r)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2+t,i=n-e.leftChildrenAreaHeight/2,a=n-e.rightChildrenAreaHeight/2;e.children.forEach(e=>{e.dir===O.LAYOUT_GROW_DIR.LEFT?(e.top=i,i+=e.height+t):(e.top=a,a+=e.height+t)})}},null,!0)}adjustTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;let i=this.getMarginY(r+1)*2+e.height,a=e.leftChildrenAreaHeight2-i,o=e.rightChildrenAreaHeight2-i;(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(t=>t.dir===e.dir),i=ws(e,r);r.forEach((e,r)=>{if(e.hasCustomPosition())return;let a=0,o=e.dir===O.LAYOUT_GROW_DIR.LEFT?t:n;r<i?a=-o:r>i&&(a=o),e.top+=a,e.children&&e.children.length&&this.updateChildren(e.children,`top`,a)}),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:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let u=(this.getMarginX(e.layerIndex+1)-s)*.6,d=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,l)=>{let f=0,p=0,m=d?c.width:0;c.dir===O.LAYOUT_GROW_DIR.LEFT?(p=-u,f=e.layerIndex===0?r:r-s,m=-m):(p=u,f=e.layerIndex===0?r+a:r+a+s);let h=i+o/2,g=c.dir===O.LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,_=c.top+c.height/2;h=d&&!e.isRoot?h+o/2:h,_=d?_+c.height/2:_;let v=this.createFoldLine([[f,h],[f+p,h],[f+p,_],[g+m,_]]);this.setLineStyle(n,t[l],v,c)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let{nodeUseLineStyle:u}=this.mindMap.themeConfig;e.children.forEach((c,l)=>{e.layerIndex===0&&(s=0);let d=c.dir===O.LAYOUT_GROW_DIR.LEFT?r-s:r+a+s,f=i+o/2,p=c.dir===O.LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,m=c.top+c.height/2;f=u&&!e.isRoot?f+o/2:f,m=u?m+c.height/2:m;let h=``;u&&(h=c.dir===O.LAYOUT_GROW_DIR.LEFT?` L ${c.left},${m}`:` L ${c.left+c.width},${m}`);let g=`M ${d},${f} L ${p},${m}`+h;this.setLineStyle(n,t[l],g,c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let{nodeUseLineStyle:u,rootLineKeepSameInCurve:d,rootLineStartPositionKeepSameInCurve:f}=this.mindMap.themeConfig;e.children.forEach((c,l)=>{e.layerIndex===0&&(s=0);let p=e.layerIndex===0&&!f?r+a/2:c.dir===O.LAYOUT_GROW_DIR.LEFT?r-s:r+a+s,m=i+o/2,h=c.dir===O.LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,g=c.top+c.height/2,_=``;m=u&&!e.isRoot?m+o/2:m,g=u?g+c.height/2:g;let v=``;u&&(v=c.dir===O.LAYOUT_GROW_DIR.LEFT?` L ${c.left},${g}`:` L ${c.left+c.width},${g}`),_=e.isRoot&&!d?this.quadraticCurvePath(p,m,h,g)+v:this.cubicBezierPath(p,m,h,g)+v,this.setLineStyle(n,t[l],_,c)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:a,translateY:o}=t.transform(),s=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,c=e.dir===O.LAYOUT_GROW_DIR.LEFT?0-i:n,l=r/2+s;if(c===a&&l===o)return;let u=c-a,d=l-o;t.translate(u,d)}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===O.LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:a,generalizationLineMargin:o,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,`h`),c=t?i-o:a+o,l=c,u=n,d=c,f=r,p=`M ${l},${u} Q ${l+(t?-20:20)},${u+(f-u)/2} ${d},${f}`;e.generalizationLine.plot(p),e.generalizationNode.left=c+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===O.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}})),uu,du=m((()=>{au(),M(),uu=class extends iu{constructor(e={}){super(e)}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{let o=this.createNode(e,t,n,r,i,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 t=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=t?e._node.children.reduce((e,t)=>e+t.width,0)+(t+1)*this.getMarginX(r+1):0}},!0,0)}computedLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width/2-e.childrenAreaWidth/2+t;e.children.forEach(e=>{e.left=n,n+=e.width+t})}else{let t=e.top+this.getNodeHeightWithGeneralization(e)+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+e.width*.5,n.top=t,t+=this.getNodeHeightWithGeneralization(n)+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;if(t&&t.isRoot){let t=this.getNodeAreaWidth(e,!0)-e.width;t>0&&this.updateBrothersLeft(e,t)}let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+this.getNodeHeightWithGeneralization(t)+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n)=>{if(n){let{right:t,left:n}=this.getNodeBoundaries(e,`h`),r=t-n,i=e.left-n-(r-e.width)/2;this.updateChildren(e.children,`left`,i)}},!0)}updateBrothersLeft(e,t){if(e.parent){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{e.hasCustomPosition()||n<=r||(e.left+=t,e.children&&e.children.length&&this.updateChildren(e.children,`left`,t))}),this.updateBrothersLeft(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,`top`,i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let u=e.children.length,d=this.getMarginX(e.layerIndex+1);if(e.isRoot){let s=r+a/2,c=i+o,l=d*.7,f=1/0,p=-1/0;e.children.forEach((e,r)=>{let i=e.left+e.width/2,a=e.top;i<f&&(f=i),i>p&&(p=i);let o=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${a} L ${e.left+e.width},${a}`:``,s=`M ${i},${c+l} L ${i},${c+l>a?a+e.height:a}`+o;this.setLineStyle(n,t[r],s,e)}),f=Math.min(f,s),p=Math.max(p,s);let m=this.lineDraw.path();if(e.style.line(m),m.plot(this.transformPath(`M ${s},${c} L ${s},${c+l}`)),e._lines.push(m),n&&n(m,e),u>0){let t=this.lineDraw.path();e.style.line(t),t.plot(this.transformPath(`M ${f},${c+l} L ${p},${c+l}`)),e._lines.push(t),n&&n(t,e)}}else{let r=i+o,a=-1/0,c=e.left+e.width*.3;if(e.children.forEach((o,s)=>{let l=o.top+o.height/2;l>a&&(a=l);let u=``,d=o.left,f=o.left+o.width<c,p=!1;f?d=o.left+o.width:o.left<c&&o.left+o.width>c&&(p=!0,l=o.top,a=l),l>i&&l<r?u=`M ${f?e.left:e.left+e.width},${l} L ${d},${l}`:l<r?(p&&(l=o.top+o.height,d=c),u=`M ${c},${i} L ${c},${l} L ${d},${l}`):(p&&(d=c),u=`M ${c},${l} L ${d},${l}`);let m=this.mindMap.themeConfig.nodeUseLineStyle?` L ${d},${l-o.height/2} L ${d},${l+o.height/2}`:``;u+=m,this.setLineStyle(n,t[s],u,o)}),u>0){let t=this.lineDraw.path();s=u>0?s:0,e.style.line(t),a<r+s?t.hide():(t.plot(this.transformPath(`M ${c},${r+s} L ${c},${a}`)),t.show()),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:a}=e;if(!a){let{translateX:e,translateY:a}=t.transform();t.translate(n*.3-i/2-e,r+i/2-a)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:a}=this.getNodeGeneralizationRenderBoundaries(e,`h`),o=r+i,s=t,c=r+i,l=n,u=`M ${o},${s} Q ${o+20},${s+(l-s)/2} ${c},${l}`;e.generalizationLine.plot(this.transformPath(u)),e.generalizationNode.left=r+a,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}})),fu,pu=m((()=>{au(),M(),fu=class extends iu{constructor(e={}){super(e)}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}])}computedBaseValue(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{let o=this.createNode(e,t,n,r,i,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 i=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaWidth=i?e._node.children.reduce((e,t)=>e+t.width,0)+(i+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(){Do(this.root,null,(e,t,n,r)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.left+e.width/2-e.childrenAreaWidth/2+t;e.children.forEach(e=>{e.left=n,n+=e.width+t})}},null,!0)}adjustLeftValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;let i=e.childrenAreaWidth2-this.getMarginY(r+1)*2-e.width;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n<r?i=-t:n>r&&(i=t),e.left+=i,e.children&&e.children.length&&this.updateChildren(e.children,`left`,i)}),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:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let{nodeUseLineStyle:u,rootLineStartPositionKeepSameInCurve:d,rootLineKeepSameInCurve:f}=this.mindMap.themeConfig;e.children.forEach((c,l)=>{e.layerIndex===0&&(s=0);let p=r+a/2,m=e.layerIndex===0&&!d?i+o/2:i+o+s,h=c.left+c.width/2,g=c.top,_=``,v=u?` L ${c.left},${g} L ${c.left+c.width},${g}`:``;_=e.isRoot&&!f?this.quadraticCurvePath(p,m,h,g,!0)+v:this.cubicBezierPath(p,m,h,g,!0)+v,this.setLineStyle(n,t[l],_,c)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o}=e,{nodeUseLineStyle:s}=this.mindMap.themeConfig,c=r+a/2,l=i+o;e.children.forEach((e,r)=>{let i=e.left+e.width/2,a=e.top,o=s?` L ${e.left},${a} L ${e.left+e.width},${a}`:``,u=`M ${c},${l} L ${i},${a}`+o;this.setLineStyle(n,t[r],u,e)})}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s,isRoot:c}=e,{alwaysShowExpandBtn:l,notShowExpandBtn:u}=this.mindMap.opt;(!l||u)&&(s=0);let d=r+a/2,f=i+o,p=this.getMarginX(e.layerIndex+1)*.7,m=1/0,h=-1/0,g=e.children.length;e.children.forEach((e,r)=>{let i=e.left+e.width/2,a=f+p>e.top?e.top+e.height:e.top;i<m&&(m=i),i>h&&(h=i);let o=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${a} L ${e.left+e.width},${a}`:``,s=`M ${i},${f+p} L ${i},${a}`+o;this.setLineStyle(n,t[r],s,e)}),m=Math.min(d,m),h=Math.max(d,h);let _=this.lineDraw.path();if(e.style.line(_),s=g>0&&!c?s:0,_.plot(this.transformPath(`M ${d},${f+s} L ${d},${f+p}`)),e._lines.push(_),n&&n(_,e),g>0){let t=this.lineDraw.path();e.style.line(t),t.plot(this.transformPath(`M ${m},${f+p} L ${h},${f+p}`)),e._lines.push(t),n&&n(t,e)}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:a,translateY:o}=t.transform();t.translate(n/2-i/2-a,r+i/2-o)}renderGeneralization(e){e.forEach(e=>{let{bottom:t,left:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:a}=this.getNodeGeneralizationRenderBoundaries(e,`v`),o=n,s=t+i,c=r,l=t+i,u=`M ${o},${s} Q ${o+(c-o)/2},${s+20} ${c},${l}`;e.generalizationLine.plot(this.transformPath(u)),e.generalizationNode.top=t+a,e.generalizationNode.left=n+(r-n-e.generalizationNode.width)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}})),mu,hu=m((()=>{au(),M(),wt(),mu=class extends iu{constructor(e={},t){super(e),this.layout=t}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{let o=this.createNode(e,t,n,r,i,a);if(n?this.setNodeCenter(o):(this.layout===O.LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=i%2==0?O.LAYOUT_GROW_DIR.BOTTOM:O.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(){Do(this.root,null,(e,t,n,r,i)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width+t;e.children.forEach(e=>{e.left=n,n+=e.width+t})}else{let t=e.top+e.height+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+e.width*.5,n.top=t,t+=n.height+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;e.isRoot&&this.updateBrothersLeft(e);let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n,r)=>{t&&t.isRoot&&e.dir===O.LAYOUT_GROW_DIR.TOP&&e.children.forEach(t=>{let n=this.getNodeAreaHeight(t),r=t.top;t.top=e.top-(t.top-e.top)-n+e.height,this.updateChildren(t.children,`top`,t.top-r)})},!0)}getNodeAreaHeight(e){let t=0,n=e=>{t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+this.getMarginY(e.layerIndex),e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,`left`,n);let{left:t,right:r}=this.getNodeBoundaries(e,`h`),i=r-t-e.width;i>0&&(n+=i)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,`top`,i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0);let u=e.children.length;if(e.isRoot){let r=e;e.children.forEach((i,a)=>{let o=r.left+r.width,s=i.left,c=e.top+e.height/2,l=`M ${o},${c} L ${s},${c}`;this.setLineStyle(n,t[a],l,i),r=i})}else{let r=-1/0,a=1/0,c=e.left+e.width*.3;if(e.children.forEach((e,i)=>{let o=e.top+e.height/2;o>r&&(r=o),o<a&&(a=o);let s=`M ${c},${o} L ${e.left},${o}`;this.setLineStyle(n,t[i],s,e)}),u>0){let t=this.lineDraw.path();s=u>0?s:0,e.parent&&e.parent.isRoot&&e.dir===O.LAYOUT_GROW_DIR.TOP?t.plot(this.transformPath(`M ${c},${i} L ${c},${a}`)):t.plot(this.transformPath(`M ${c},${i+o+s} L ${c},${r}`)),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:a}=e;if(!a){let{translateX:a,translateY:o}=t.transform();e.parent&&e.parent.isRoot&&e.dir===O.LAYOUT_GROW_DIR.TOP?t.translate(n*.3-i/2-a,-i/2-o):t.translate(n*.3-i/2-a,r+i/2-o)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:a}=this.getNodeGeneralizationRenderBoundaries(e,`h`),o=r+i,s=t,c=r+i,l=n,u=`M ${o},${s} Q ${o+20},${s+(l-s)/2} ${c},${l}`;e.generalizationLine.plot(this.transformPath(u)),e.generalizationNode.left=r+a,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){if(this.layout===O.LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let a=``;a=i.dir===O.LAYOUT_GROW_DIR.TOP&&i.layerIndex===1?O.LAYOUT_GROW_DIR.TOP:O.LAYOUT_GROW_DIR.BOTTOM,a===O.LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}})),gu,_u=m((()=>{au(),M(),wt(),gu=class extends iu{constructor(e={},t){super(e),this.layout=t}doLayout(e){zo([()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}])}computedBaseValue(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{let o=this.createNode(e,t,n,r,i,a);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:this.layout===O.LAYOUT.VERTICAL_TIMELINE2?o.dir=O.LAYOUT_GROW_DIR.LEFT:this.layout===O.LAYOUT.VERTICAL_TIMELINE3?o.dir=O.LAYOUT_GROW_DIR.RIGHT:o.dir=i%2==0?O.LAYOUT_GROW_DIR.RIGHT:O.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===O.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 i=e.data.expand===!1?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0},!0,0)}computedTopValue(){Do(this.root,null,(e,t,n,r,i)=>{if(e.getData(`expand`)&&e.children&&e.children.length){let t=this.getMarginY(r+1);if(n){let n=e.top+e.height+t;e.children.forEach(e=>{e.top=n,n+=e.height+t})}else{let t=this.getMarginY(r+1),n=e.top+e.height/2+t-e.childrenAreaHeight/2;e.children.forEach(e=>{e.top=n,n+=e.height+t})}}},null,!0)}adjustLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`)||n)return;let i=this.getMarginY(r+1)*2+e.height,a=e.childrenAreaHeight-i;a>0&&this.updateBrothers(e,a/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=ws(e,n);n.forEach((n,i)=>{if(n.hasCustomPosition()||!e.parent.isRoot&&n.uid===e.uid)return;let a=0;e.parent.isRoot?a=i<r?0:i>r?t*2:t:i<r?a=-t:i>r&&(a=t),n.top+=a,n.children&&n.children.length&&this.updateChildren(n.children,`top`,a)}),this.updateBrothers(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,`top`,i)}),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,{alwaysShowExpandBtn:i,notShowExpandBtn:a}=this.mindMap.opt;if((!i||a)&&(r=0),e.isRoot){let r=e;e.children.forEach((i,a)=>{let o=r.top+r.height,s=i.top,c=e.left+e.width/2,l=`M ${c},${o} L ${c},${s}`;this.setLineStyle(n,t[a],l,i),r=i})}else if(e.dir===O.LAYOUT_GROW_DIR.RIGHT){let i=e.left+e.width,a=e.top+e.height/2,o=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((e,r)=>{let s=e.left,c=e.top+e.height/2,l=this.createFoldLine([[i,a],[i+o,a],[i+o,c],[s,c]]);this.setLineStyle(n,t[r],l,e)})}else{let i=e.left,a=e.top+e.height/2,o=(this.getMarginX(e.layerIndex+1)-r)*.6;e.children.forEach((e,r)=>{let s=e.left+e.width,c=e.top+e.height/2,l=this.createFoldLine([[i,a],[i-o,a],[i-o,c],[s,c]]);this.setLineStyle(n,t[r],l,e)})}}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0),e.children.forEach((c,l)=>{if(e.isRoot){let r=e;e.children.forEach((i,a)=>{let o=r.top+r.height,s=i.top,c=e.left+e.width/2,l=`M ${c},${o} L ${c},${s}`;this.setLineStyle(n,t[a],l,i),r=i})}else{let e=`M ${c.dir===O.LAYOUT_GROW_DIR.LEFT?r-s:r+a+s},${i+o/2} L ${c.dir===O.LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left},${c.top+c.height/2}`;this.setLineStyle(n,t[l],e,c)}})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:a,height:o,expandBtnSize:s}=e,{alwaysShowExpandBtn:c,notShowExpandBtn:l}=this.mindMap.opt;(!c||l)&&(s=0),e.children.forEach((c,l)=>{if(e.isRoot){let r=e;e.children.forEach((i,a)=>{let o=r.top+r.height,s=i.top,c=e.left+e.width/2,l=`M ${c},${o} L ${c},${s}`;this.setLineStyle(n,t[a],l,i),r=i})}else{let e=c.dir===O.LAYOUT_GROW_DIR.LEFT?r-s:r+a+s,u=i+o/2,d=c.dir===O.LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,f=c.top+c.height/2,p=this.cubicBezierPath(e,u,d,f);this.setLineStyle(n,t[l],p,c)}})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:a}=e;if(!a){let{translateX:a,translateY:o}=t.transform();e.dir===O.LAYOUT_GROW_DIR.RIGHT?t.translate(n-a,r/2-o):t.translate(-i-a,r/2-o)}}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===O.LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:a,generalizationLineMargin:o,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,`h`),c=t?i-o:a+o,l=c,u=n,d=c,f=r,p=`M ${l},${u} Q ${l+(t?-20:20)},${u+(f-u)/2} ${d},${f}`;e.generalizationLine.plot(this.transformPath(p)),e.generalizationNode.left=c+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===O.LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}})),vu,yu=m((()=>{M(),vu={top:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:a,height:o}){e.parent&&e.parent.isRoot?t.translate(a*.3-n/2-r,-n/2-i):t.translate(a*.3-n/2-r,o+n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:a,expandBtnSize:o,maxy:s,ctx:c}){e.parent&&e.parent.isRoot?t.plot(c.transformPath(`M ${r},${n} L ${r+i},${n-Math.tan(Bo(c.mindMap.opt.fishboneDeg))*i}`)):t.plot(c.transformPath(`M ${r},${n+a+o} L ${r},${s}`))},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){if(e>=1&&t.children){let r=n.getMarginY(e+1),i=t.left+t.width*n.childIndent,a=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(e=>{e.left=i,e.top+=a,a+=e.height+(n.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,parent:t,ctx:n,layerIndex:r}){let i=e.children.length,a=n.getMarginY(r+1);if(t&&!t.isRoot&&i>0){let t=e.children.reduce((e,t)=>e+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+a,0);n.updateBrothersTop(e,t)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=t.expandBtnSize+e;t.children.forEach(e=>{let i=n.getNodeAreaHeight(e),a=e.top,o=e.left;e.top=t.top-(e.top-t.top)-i+t.height,e.left=t.left+t.width*n.indent+(i+r)/Math.tan(Bo(n.mindMap.opt.fishboneDeg)),r+=i,n.updateChildrenPro(e.children,{top:e.top-a,left:e.left-o})})}}},bottom:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:a,height:o}){e.parent&&e.parent.isRoot?t.translate(a*.3-n/2-r,o+n/2-i):t.translate(a*.3-n/2-r,-n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:a,miny:o,ctx:s}){e.parent&&e.parent.isRoot?t.plot(s.transformPath(`M ${r},${n+a} L ${r+i},${n+a+Math.tan(Bo(s.mindMap.opt.fishboneDeg))*i}`)):t.plot(s.transformPath(`M ${r},${n} L ${r},${o}`))},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){let r=n.getMarginY(e+1);if(e===1&&t.children){let e=t.left+t.width*n.childIndent,i=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(t=>{t.left=e,t.top=i+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),i+=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}if(e>1&&t.children){let e=t.left+t.width*n.childIndent,i=t.top-(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)-r;t.children.forEach(t=>{t.left=e,t.top=i-t.height,i-=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,ctx:t,layerIndex:n}){let r=t.getMarginY(n+1),i=e.children.length;if(n>2&&i>0){let n=e.children.reduce((e,n)=>e+n.height+(t.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)+r,0);t.updateBrothersTop(e,-n)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=0,i=t.expandBtnSize;t.children.forEach(a=>{let o=n.getNodeActChildrenLength(a)>0,s=n.getNodeAreaHeight(a),c=o?s-a.height-(o?a.expandBtnSize:0):0;c-=o?e:0;let l=r+c,u=a.left;a.top+=l,a.left=t.left+t.width*n.indent+(s+i)/Math.tan(Bo(n.mindMap.opt.fishboneDeg)),r+=c,i+=s,n.updateChildrenPro(a.children,{top:l,left:a.left-u})})}}}}})),bu,xu=m((()=>{au(),M(),wt(),yu(),bo(),Qs(),bu=class extends iu{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===O.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=>{let t=yo(`<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 i=this.paddingXRatio*e,a=0;return e+=i*2,a=(e/this.headRatio-t)/2,{paddingX:i,paddingY:a}}})}doLayout(e){zo([()=>{this.computedBaseValue(),this.addFishTail()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue(),this.updateFishTailPosition()},()=>{e(this.root)}])}addFishTail(){if(!this.isFishbone2())return;let e=this.mindMap.lineDraw.findOne(`.smm-layout-fishbone-tail`);e?this.fishTail=e:(this.fishTail=yo(`<path d="${this.fishTailPathStr}"></path>`),this.fishTail.addClass(`smm-layout-fishbone-tail`));let 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 e=!1;Object.keys(n).forEach(t=>{Xs.includes(t)&&(e=!0)}),e&&this.styleFishTail()}}styleFishTail(){this.root.style.shape(this.fishTail)}removeFishTail(){let 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(){Do(this.renderer.renderTree,null,(e,t,n,r,i,a)=>{n&&this.isFishbone2()&&(e.data.shape=`fishHead`);let o=this.createNode(e,t,n,r,i,a);if(n)this.setNodeCenter(o);else if(t._node.dir?o.dir=t._node.dir:o.dir=i%2==0?O.LAYOUT_GROW_DIR.TOP:O.LAYOUT_GROW_DIR.BOTTOM,t._node.isRoot){let e=this.getMarginY(r),n=this.isFishbone2()?t._node.height/4:0;this.checkIsTop(o)?o.top=t._node.top-o.height-e+n:o.top=t._node.top+t._node.height+e-n}if(!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(e.isRoot){let t=this.getMarginX(r+1),n=this.isFishbone2()?2:1,i=e.left+e.width+e.height/n+t,a=e.left+e.width+e.height/n+t;e.children.forEach(e=>{this.checkIsTop(e)?(e.left=i,i+=e.width+t):(e.left=a+20,a+=e.width+t)})}let i={layerIndex:r,node:e,ctx:this};this.checkIsTop(e)?vu.top.computedLeftTopValue(i):vu.bottom.computedLeftTopValue(i)},null,!0)}adjustLeftTopValue(){Do(this.root,null,(e,t,n,r)=>{if(!e.getData(`expand`))return;let i={node:e,parent:t,layerIndex:r,ctx:this};this.checkIsTop(e)?vu.top.adjustLeftTopValueBefore(i):vu.bottom.adjustLeftTopValueBefore(i)},(e,t)=>{let n={parent:t,node:e,ctx:this};if(this.checkIsTop(e)?vu.top.adjustLeftTopValueAfter(n):vu.bottom.adjustLeftTopValueAfter(n),e.isRoot){let t=0,n=0,r=-1/0;e.children.forEach(e=>{if(this.checkIsTop(e)){e.left+=t,this.updateChildren(e.children,`left`,t);let{left:n,right:i}=this.getNodeBoundaries(e,`h`);i>r&&(r=i),t+=i-n}else{e.left+=n,this.updateChildren(e.children,`left`,n);let{left:t,right:i}=this.getNodeBoundaries(e,`h`);i>r&&(r=i),n+=i-t}}),this.maxx=r}},!0)}getNodeAreaHeight(e){let t=0,n=e=>{let r=this.getMarginY(e.layerIndex);t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r,e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,`left`,n);let{left:t,right:r}=this.getNodeBoundaries(e,`h`),i=r-t-e.width;i>0&&(n+=i)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=ws(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,`top`,i)}),this.checkIsTop(e)?this.updateBrothersTop(e.parent,t):this.updateBrothersTop(e.parent,e.layerIndex===3?0:t)}}checkIsTop(e){return e.dir===O.LAYOUT_GROW_DIR.TOP}renderLine(e,t,n){if(e.layerIndex!==1&&e.children.length<=0)return[];let{top:r,height:i,expandBtnSize:a}=e,{alwaysShowExpandBtn:o,notShowExpandBtn:s}=this.mindMap.opt;(!o||s)&&(a=0);let c=e.children.length;if(e.isRoot){let t=-1/0;e.children.forEach(r=>{r.left>t&&(t=r.left);let i=this.getMarginY(r.layerIndex),a=r.left,o=e.height/2+i-(this.isFishbone2()?e.height/4:0),s=o/Math.tan(Bo(this.mindMap.opt.fishboneDeg)),c=this.lineDraw.path();this.checkIsTop(r)?c.plot(this.transformPath(`M ${a-s},${r.top+r.height+o} L ${r.left},${r.top+r.height}`)):c.plot(this.transformPath(`M ${a-s},${r.top-o} L ${a},${r.top}`)),e.style.line(c),e._lines.push(c),n&&n(c,e)});let r=e.top+e.height/2,i=e.height/2+this.getMarginY(e.layerIndex+1),a=this.lineDraw.path(),o=this.isFishbone2()?this.maxx:t-i/Math.tan(Bo(this.mindMap.opt.fishboneDeg));a.plot(this.transformPath(`M ${e.left+e.width},${r} L ${o},${r}`)),e.style.line(a),e._lines.push(a),n&&n(a,e)}else{let o=-1/0,s=1/0,l=-1/0,u=e.left+e.width*this.indent;if(e.children.forEach((r,i)=>{r.left>l&&(l=r.left);let a=r.top+r.height/2;if(a>o&&(o=a),a<s&&(s=a),e.layerIndex>1){let e=`M ${u},${a} L ${r.left},${a}`;this.setLineStyle(n,t[i],e,r)}}),c>=0){let t=this.lineDraw.path();a=c>0?a:0;let d=l-e.left-e.width*this.indent;d=Math.max(d,0);let f={node:e,line:t,top:r,x:u,lineLength:d,height:i,expandBtnSize:a,maxy:o,miny:s,ctx:this};this.checkIsTop(e)?vu.top.renderLine(f):vu.bottom.renderLine(f),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:a}=e;if(!a){let{translateX:a,translateY:o}=t.transform(),s={node:e,btn:t,expandBtnSize:i,translateX:a,translateY:o,width:n,height:r};this.checkIsTop(e)?vu.top.renderExpandBtn(s):vu.bottom.renderExpandBtn(s)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:a}=this.getNodeGeneralizationRenderBoundaries(e,`h`),o=r+i,s=t,c=r+i,l=n,u=`M ${o},${s} Q ${o+20},${s+(l-s)/2} ${c},${l}`;e.generalizationLine.plot(this.transformPath(u)),e.generalizationNode.left=r+a,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){let a=``;a=i.dir===O.LAYOUT_GROW_DIR.TOP?i.layerIndex===1?O.LAYOUT_GROW_DIR.TOP:O.LAYOUT_GROW_DIR.BOTTOM:i.layerIndex===1?O.LAYOUT_GROW_DIR.BOTTOM:O.LAYOUT_GROW_DIR.TOP,a===O.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=O.SHAPE.RECTANGLE,this.removeFishTail(),this.unBindEvent(),this.mindMap.removeShape(`fishHead`))}}})),Su,Cu,wu=m((()=>{M(),wt(),Su=`smm-node-edit-wrap`,Cu=class{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(Su),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===O.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;let t=this.mindMap.renderer.activeNodeList;if(t.length<=0||t.length>1)return;let n=t[0];n&&this.checkIsAutoEnterTextEditKey(e)&&(e.preventDefault(),this.show({node:n,e,isInserting:!1,isFromKeyDown:!0}))}checkIsAutoEnterTextEditKey(e){let 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();let{beforeTextEdit:i,openRealtimeRenderOnNodeTextEdit:a}=this.mindMap.opt;if(typeof i==`function`){let n=!1;try{n=await i(e,t)}catch(e){n=!1,this.mindMap.opt.errorHandler(yt.BEFORE_TEXT_EDIT_ERROR,e)}if(!n)return}let{offsetLeft:o,offsetTop:s}=Uo(this.mindMap,e);this.mindMap.view.translateXY(o,s);let c=e._textData.node;a&&c.show();let l=c.node.getBoundingClientRect();a&&c.hide();let u={node:e,rect:l,isInserting:t,isFromKeyDown:n,isFromScale:r};if(this.mindMap.richText){this.mindMap.richText.showEditText(u);return}this.currentNode=e,this.showEditTextBox(u)}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(){let 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:i}){if(this.showTextEdit)return;let{nodeTextEditZIndex:a,textAutoWrapWidth:o,selectTextOnEnterEditText:s,openRealtimeRenderOnNodeTextEdit:c,autoEmptyTextWhenKeydownEnterEdit:l}=this.mindMap.opt;i||this.mindMap.emit(`before_show_text_edit`),this.registerTmpShortcut(),this.textEditNode||(this.textEditNode=document.createElement(`div`),this.textEditNode.classList.add(Su),this.textEditNode.style.cssText=`
|
|
71
|
+
position: fixed;
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
${c?``:`box-shadow: 0 0 20px rgba(0,0,0,.5);`}
|
|
74
|
+
padding: ${this.textNodePaddingY}px ${this.textNodePaddingX}px;
|
|
75
|
+
margin-left: -${this.textNodePaddingX}px;
|
|
76
|
+
margin-top: -${this.textNodePaddingY}px;
|
|
77
|
+
outline: none;
|
|
78
|
+
word-break: break-all;
|
|
79
|
+
line-break: anywhere;
|
|
80
|
+
`,this.textEditNode.setAttribute(`contenteditable`,!0),this.textEditNode.addEventListener(`keyup`,e=>{e.stopPropagation()}),this.textEditNode.addEventListener(`click`,e=>{e.stopPropagation()}),this.textEditNode.addEventListener(`mousedown`,e=>{e.stopPropagation()}),this.textEditNode.addEventListener(`keydown`,e=>{this.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()}),this.textEditNode.addEventListener(`paste`,e=>{let{isSmm:t,data:n}=Is(e.clipboardData.getData(`text`));t&&n[0]&&n[0].data?Ls(e,Go(n[0].data.text)):Ls(e),this.emitTextChangeEvent()}),this.textEditNode.addEventListener(`input`,()=>{this.emitTextChangeEvent()}),(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.textEditNode));let u=this.mindMap.view.scale,d=e.style.merge(`fontSize`),f=(this.cacheEditingText||e.getData(`text`)).split(/\n/gim).map(e=>Es(e)),p=e._textData.node.attr(`data-ismultiLine`)===`true`;e.style.domText(this.textEditNode,u),c||(this.textEditNode.style.background=this.getBackground(e)),this.textEditNode.style.zIndex=a,r&&l?this.textEditNode.innerHTML=``:this.textEditNode.innerHTML=f.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*u+`px`,p?(this.textEditNode.style.lineHeight=St,this.textEditNode.style.transform=`translateY(${(St-1)*d/2*u}px)`):this.textEditNode.style.lineHeight=`normal`,this.setIsShowTextEdit(!0),n||s&&!r?ys(this.textEditNode):vs(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;let 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`))return`linear-gradient(to right, ${e.style.merge(`startColor`)}, ${e.style.merge(`endColor`)})`;{let t=e.style.merge(`fillColor`),n=e.style.merge(`color`);return t===`transparent`?rs(n)?as(this.mindMap.themeConfig):`#fff`:t}}removeTextEditEl(){if(this.mindMap.richText){this.mindMap.richText.removeTextEditEl();return}this.textEditNode&&(this.mindMap.opt.customInnerElsAppendTo||document.body).removeChild(this.textEditNode)}getEditText(){return jo(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.mindMap.richText)return this.mindMap.richText.hideEditText();if(!this.showTextEdit)return;let 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}}})),Tu,Eu,Du,Ou=m((()=>{Tu=v(jt()),su(),lu(),du(),pu(),hu(),_u(),xu(),wu(),M(),tc(),To(),wt(),bo(),Eu={[O.LAYOUT.LOGICAL_STRUCTURE]:ou,[O.LAYOUT.LOGICAL_STRUCTURE_LEFT]:ou,[O.LAYOUT.MIND_MAP]:cu,[O.LAYOUT.CATALOG_ORGANIZATION]:uu,[O.LAYOUT.ORGANIZATION_STRUCTURE]:fu,[O.LAYOUT.TIMELINE]:mu,[O.LAYOUT.TIMELINE2]:mu,[O.LAYOUT.VERTICAL_TIMELINE]:gu,[O.LAYOUT.VERTICAL_TIMELINE2]:gu,[O.LAYOUT.VERTICAL_TIMELINE3]:gu,[O.LAYOUT.FISHBONE]:bu,[O.LAYOUT.FISHBONE2]:bu},Du=class{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=this.mindMap.opt.data?(0,Tu.default)({},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 Cu(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();let{layout:e}=this.mindMap.opt,t=Eu[e]||this.mindMap[e];t||(t=Eu[O.LAYOUT.LOGICAL_STRUCTURE],this.mindMap.opt.layout=O.LAYOUT.LOGICAL_STRUCTURE),this.layout=new t(this,e)}setData(e){this.renderTree=e||null}bindEvent(){let{openPerformance:e,performanceConfig:t,openRealtimeRenderOnNodeTextEdit:n}=this.mindMap.opt;this.mindMap.on(`draw_click`,e=>{this.clearActiveNodeListOnDrawClick(e,`click`)}),this.mindMap.on(`contextmenu`,e=>{this.clearActiveNodeListOnDrawClick(e,`contextmenu`)}),this.mindMap.svg.on(`dblclick`,()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()});let r=Lo(()=>{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=Ro(this.onNodeTextEditChange,100,this),n&&this.mindMap.on(`node_text_edit_change`,this.onNodeTextEditChange),this.mindMap.on(`after_update_config`,(e,t)=>{e.openPerformance!==t.openPerformance&&(this.mindMap[e.openPerformance?`on`:`off`](`view_data_change`,r),this.forceLoadNode()),e.openRealtimeRenderOnNodeTextEdit!==t.openRealtimeRenderOnNodeTextEdit&&this.mindMap[e.openRealtimeRenderOnNodeTextEdit?`on`:`off`](`node_text_edit_change`,this.onNodeTextEditChange)})}onNodeTextEditChange({node:e,text:t}){e._textData=e.createTextNode(t);let{width:n,height:r}=e.getNodeRect();e.width=n,e.height=r,e.layout(),this.mindMap.render(()=>{this.textEdit.updateTextEditNode()})}forceLoadNode(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]){Ns(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,{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(t===`contextmenu`?!r:r){let t=this.mindMap.event.mousedownPos;n=Math.abs(e.clientX-t.x)<=5&&Math.abs(e.clientY-t.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(t=>t===e)===-1&&this.renderCallbackList.push(e),t&&this.renderSourceList.findIndex(e=>e===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(O.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(e=>{this.nodeCache[e]||(this.removeNodeFromActiveList(this.lastNodeCache[e]),this.emitNodeActiveEvent(),this.lastNodeCache[e].destroy())}),this.root=e,this.root.render(()=>{if(this.isRendering=!1,this.hasWaitRendering){this.hasWaitRendering=!1,this.render();return}this.onRenderEnd()})}),this.emitNodeActiveEvent()}renderByCustomNodeContentNode(e){e.getSize(),e.customNodeContentRealtimeLayout(),this.mindMap.render()}resetUnExpandNodeStyle(){this.renderTree&&Do(this.renderTree,null,e=>{if(!e.data.expand)return Do(e,null,e=>{e.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){this.mindMap.opt.onlyOneEnableActiveNodeOnCooperate&&e.userList.length>0||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(e=>{this.mindMap.emit(`before_node_active`,e,this.activeNodeList),this.addNodeToActiveList(e,!0),this.emitNodeActiveEvent(e)})}cancelActiveMultiNode(e=[]){e.forEach(e=>{this.removeNodeFromActiveList(e),this.emitNodeActiveEvent(null)})}findActiveNodeIndex(e){return ws(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Do(this.root,null,e=>{e.getData(`isActive`)||this.addNodeToActiveList(e),e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach(e=>{let t=e.generalizationNode;t.getData(`isActive`)||this.addNodeToActiveList(t)})},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`);let n=this.mindMap.command[e](t);n&&(this.renderTree=n,this.mindMap.render()),this.mindMap.emit(`data_change`,n)}getNewNodeBehavior(e=!1,t=!1){let{createNewNodeBehavior:n}=this.mindMap.opt,r=!1,i=!1;switch(n){case O.CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,i=t?!1:e;break;case O.CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,i=!1;break;case O.CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:r=!0,i=!1;break;default:break}return{focusNewNode:r,inserting:i}}insertNode(e=!0,t=[],n=null,r=[]){if(t=Ss(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();let{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,s=o.length>1,c=this.hasRichTextPlugin(),{focusNewNode:l,inserting:u}=this.getNewNodeBehavior(e,s),d={expand:!0,richText:c,isActive:l};c&&(d.resetRichText=!0),r=bs(r,d);let f=n&&n.richText,p=!1;o.forEach(e=>{if(e.isGeneralization||e.isRoot)return;r=Mo(r);let t=e.parent,o=e.layerIndex===1?i:a,s=Cs(e);f&&d.resetRichText&&delete d.resetRichText;let c={inserting:u,data:{text:o,...d,uid:Jo(),...n||{}},children:[...xs(r,p)]};p=!0,t.nodeData.children.splice(s+1,0,c)}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0||(e=Ss(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();let n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:i};r&&(a.resetRichText=!0),t=bs(t,a);let o=!1;n.forEach(e=>{if(e.isGeneralization||e.isRoot)return;t=Mo(t);let n=e.parent,r=Cs(e),i=xs(t,o);o=!0,n.nodeData.children.splice(r+1,0,...i)}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(e=!0,t=[],n=null,r=[]){if(t=Ss(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();let{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:a}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,s=o.length>1,c=this.hasRichTextPlugin(),{focusNewNode:l,inserting:u}=this.getNewNodeBehavior(e,s),d={expand:!0,richText:c,isActive:l};c&&(d.resetRichText=!0),r=bs(r,d);let f=n&&n.richText,p=!1;o.forEach(e=>{if(e.isGeneralization)return;r=Mo(r),e.nodeData.children||(e.nodeData.children=[]);let t=e.isRoot?i:a;f&&d.resetRichText&&delete d.resetRichText;let o={inserting:u,data:{text:t,uid:Jo(),...d,...n||{}},children:[...xs(r,p)]};p=!0,e.nodeData.children.push(o),e.setData({expand:!0})}),l&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0||(e=Ss(e),this.activeNodeList.length<=0&&e.length<=0))return;this.textEdit.hideEditTextBox();let n=e.length>0?e:this.activeNodeList,r=this.hasRichTextPlugin(),{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),a={expand:!0,richText:r,isActive:i};r&&(a.resetRichText=!0),t=bs(t,a);let o=!1;n.forEach(e=>{e.isGeneralization||(t=Mo(t),e.nodeData.children||(e.nodeData.children=[]),t=xs(t,o),o=!0,e.nodeData.children.push(...t),e.setData({expand:!0}))}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(e=!0,t,n){if(t=Ss(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();let{defaultInsertSecondLevelNodeText:r,defaultInsertBelowSecondLevelNodeText:i}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,o=a.length>1,s=this.hasRichTextPlugin(),{focusNewNode:c,inserting:l}=this.getNewNodeBehavior(e,o),u={expand:!0,richText:s,isActive:c};s&&(u.resetRichText=!0);let d=n&&n.richText;a.forEach(e=>{if(e.isGeneralization||e.isRoot)return;let t=e.layerIndex===1?r:i;d&&u.resetRichText&&delete u.resetRichText;let a={inserting:l,data:{text:t,uid:Jo(),...u,...n||{}},children:[e.nodeData]},o=e.parent,s=Cs(e);o.nodeData.children.splice(s,1,a)}),c&&this.clearActiveNodeList(),this.mindMap.render()}upNode(e){if(this.activeNodeList.length<=0&&!e)return;let t=(e?[e]:this.activeNodeList)[0];if(t.isRoot)return;let n=t.parent,r=n.children,i=ws(t,r);if(i===-1||i===0)return;let a=i-1;r.splice(i,1),r.splice(a,0,t),n.nodeData.children.splice(i,1),n.nodeData.children.splice(a,0,t.nodeData),this.mindMap.render()}downNode(e){if(this.activeNodeList.length<=0&&!e)return;let t=(e?[e]:this.activeNodeList)[0];if(t.isRoot)return;let n=t.parent,r=n.children,i=ws(t,r);if(i===-1||i===r.length-1)return;let a=i+1;r.splice(i,1),r.splice(a,0,t),n.nodeData.children.splice(i,1),n.nodeData.children.splice(a,0,t.nodeData),this.mindMap.render()}moveUpOneLevel(e){if(e||=this.activeNodeList[0],!e||e.isRoot||e.layerIndex<=1)return;let t=e.parent,n=t.parent,r=ws(e,t.children),i=ws(t,n.children);t.nodeData.children.splice(r,1),n.nodeData.children.splice(i+1,0,e.nodeData),this.mindMap.render()}_handleRemoveCustomStyles(e){let t=!1;return Object.keys(e).forEach(n=>{fs(n)&&(t=!0,delete e[n])}),this.hasRichTextPlugin()&&(t=!0,e.resetRichText=!0),t}removeCustomStyles(e){e||=this.activeNodeList[0],e&&this._handleRemoveCustomStyles(e.getData())&&this.reRenderNodeCheckChange(e)}removeAllNodeCustomStyles(e){e=Ss(e);let t=!1;if(e.length>0)e.forEach(e=>{this._handleRemoveCustomStyles(e.getData())&&(t=!0)});else{if(!this.renderTree)return;Do(this.renderTree,null,e=>{this._handleRemoveCustomStyles(e.data)&&(t=!0);let n=Ws(e.data);n.length>0&&n.forEach(e=>{this._handleRemoveCustomStyles(e)&&(t=!0)})})}t&&this.mindMap.reRender()}copy(){this.beingCopyData=this.copyNode(),this.beingCopyData&&(this.mindMap.opt.disabledClipboard||ks(Fs(this.beingCopyData)))}cut(){this.mindMap.execCommand(`CUT_NODE`,e=>{this.beingCopyData=e,this.mindMap.opt.disabledClipboard||ks(Fs(e))})}handlePaste(e){let{disabledClipboard:t}=this.mindMap.opt;if(t)return;let n=e.clipboardData||e.originalEvent.clipboardData,r=n.items;Array.from(r).forEach(e=>{e.type.indexOf(`image`)>-1&&e.getAsFile(),e.type.indexOf(`text`)>-1&&n.getData(`text`)}),this.paste()}async paste(){let{errorHandler:e,handleIsSplitByWrapOnPasteCreateNewNode:t,handleNodePasteImg:n,disabledClipboard:r,onlyPasteTextWhenHasImgAndText:i}=this.mindMap.opt;if(!r&&Os())try{let r=await As(),a=r.text||``,o=r.img||null;if(a){let n=null,r=!0;if(this.mindMap.opt.customHandleClipboardText)try{let e=await this.mindMap.opt.customHandleClipboardText(a);if(!Qo(e)){r=!1;let t=Is(e);t.isSmm?n=t.data:a=t.data}}catch(t){e(yt.CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,t)}if(r){let e=Is(a);e.isSmm?n=e.data:a=e.data}if(n)this.mindMap.execCommand(`INSERT_MULTI_CHILD_NODE`,[],Array.isArray(n)?n:[n]);else{this.hasRichTextPlugin()&&(a=Es(a));let e=a.split(RegExp(`\r?
|
|
81
|
+
|(?<!
|
|
82
|
+
)\r`,`g`)).filter(e=>!!e);e.length>1&&t?t().then(()=>{this.mindMap.execCommand(`INSERT_MULTI_CHILD_NODE`,[],e.map(e=>({data:{text:e},children:[]})))}).catch(()=>{this.mindMap.execCommand(`INSERT_CHILD_NODE`,!1,[],{text:a})}):this.mindMap.execCommand(`INSERT_CHILD_NODE`,!1,[],{text:a})}}if(o&&(!a||!i))try{let e=null;e=n&&typeof n==`function`?await n(o):await Yo(o),this.activeNodeList.length>0&&this.activeNodeList.forEach(t=>{this.mindMap.execCommand(`SET_NODE_IMAGE`,t,{url:e.url,title:``,width:e.size.width,height:e.size.height})})}catch(t){e(yt.LOAD_CLIPBOARD_IMAGE_ERROR,t)}}catch(t){e(yt.READ_CLIPBOARD_ERROR,t)}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=Ss(e);r=r.filter(e=>!e.isRoot),n===`after`&&r.reverse(),r.forEach(e=>{let r=e.parent,i=r.children,a=ws(e,i);if(a===-1)return;i.splice(a,1),r.nodeData.children.splice(a,1);let o=t.parent,s=o.children,c=ws(t,s);c!==-1&&(n===`after`&&c++,s.splice(c,0,e),o.nodeData.children.splice(c,0,e.nodeData))}),this.mindMap.render()}removeNode(e=[]){if(e=Ss(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=null,n=e.length>0,r=n?e:this.activeNodeList,i=r.find(e=>e.isRoot);if(i)this.clearActiveNodeList(),i.children=[],i.nodeData.children=[];else{t=this.getNextActiveNode(r);for(let e=0;e<r.length;e++){let t=r[e],i=this.textEdit.getCurrentEditNode();i&&i.getData(`uid`)===t.getData(`uid`)&&this.textEdit.hideEditTextBox(),n&&r.splice(e,1),t.isGeneralization?(this.deleteNodeGeneralization(t),this.removeNodeFromActiveList(t),e--):(this.removeNodeFromActiveList(t),js(t),e--)}}this.activeNodeList=[],t&&this.addNodeToActiveList(t),this.emitNodeActiveEvent(),this.mindMap.render()}deleteNodeGeneralization(e){let t=e.generalizationBelongNode,n=t.getGeneralizationNodeIndex(e),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=Ss(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=e.length>0?e:this.activeNodeList;t=t.filter(e=>!e.isRoot);let n=this.getNextActiveNode(t);for(let e=0;e<t.length;e++){let n=t[e];if(n.isGeneralization)this.deleteNodeGeneralization(n);else{let e=n.parent,t=Cs(n);e.nodeData.children.splice(t,1,...n.nodeData.children||[])}}this.activeNodeList=[],n&&this.addNodeToActiveList(n),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){let e=this.activeNodeList[0],n=e.parent.children,r=ws(e,n);t=r<n.length-1?n[r+1]:r>0?n[r-1]:e.parent}return t}copyNode(){if(this.activeNodeList.length<=0)return null;let e=hs(this.activeNodeList);return e=Ks(e),e.map(e=>Po({},e,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;let t=hs(this.activeNodeList).filter(e=>!e.isRoot);t=Ks(t);let n=t.map(e=>Po({},e,!0));t.forEach(e=>{js(e)}),this.clearActiveNodeList(),this.mindMap.render(),e&&typeof e==`function`&&e(n)}moveNodeTo(e,t){let n=Ss(e);n=n.filter(e=>!e.isRoot),n.forEach(e=>{this.removeNodeFromActiveList(e),js(e),t.setData({expand:!0}),t.nodeData.children.push(e.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Ss(e),this.mindMap.execCommand(`INSERT_MULTI_CHILD_NODE`,[],e)}setNodeStyle(e,t,n){let r={[t]:n};this.setNodeDataRender(e,r),wo.includes(t)&&(e.parent||e).renderLine(!0)}setNodeStyles(e,t){let n={...t};this.setNodeDataRender(e,n);let r=Object.keys(t),i=!1;r.forEach(e=>{wo.includes(e)&&(i=!0)}),i&&(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;let 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(e=>{t(e,r)})};t(this.renderTree,!e),this.mindMap.render()}unexpandAllNode(e=!0,t=``){if(!this.renderTree)return;let n=(e,r,i)=>{!i&&e.data.uid===t&&(i=!0),i&&!r&&e.children&&e.children.length>0&&(e.data.expand=!1),e.children&&e.children.length>0&&e.children.forEach(e=>{n(e,!1,i)})};n(this.renderTree,!0,!t),this.mindMap.render(()=>{e&&this.setRootNodeCenter()})}expandToLevel(e){this.renderTree&&(Do(this.renderTree,null,(t,n,r,i)=>{i<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){let{url:n,title:r,width:i,height:a,custom:o=!1}=t||{url:``,title:``,width:0,height:0,custom:!1};this.setNodeDataRender(e,{image:n,imageTitle:r||``,imageSize:{width:i,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=[]){!this.hasRichTextPlugin()||!this.mindMap.formula||(t=Ss(t),(t.length>0?t:this.activeNodeList).forEach(t=>{this.mindMap.formula.insertFormulaToNode(t,e)}))}addGeneralization(e,t=!0){if(this.activeNodeList.length<=0)return;let n=gs(this.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization&&!e.checkHasSelfGeneralization()));if(n.length<=0)return;let r=this.hasRichTextPlugin(),{focusNewNode:i,inserting:a}=this.getNewNodeBehavior(t,n.length>1),o=!1,s=e&&e.richText;n.forEach(t=>{let n={inserting:a,...e||{text:this.mindMap.opt.defaultGeneralizationText},range:t.range||null,uid:Jo(),richText:r,isActive:i};r&&!s&&(n.resetRichText=r);let c=t.node.getData(`generalization`);if(c=c?Array.isArray(c)?c:[c]:[],t.range){if(c.find(e=>e.range&&e.range[0]===t.range[0]&&e.range[1]===t.range[1]))return;c.push(n)}else c.push(n);o=!0,this.mindMap.execCommand(`SET_NODE_DATA`,t.node,{generalization:c}),t.node.setData({expand:!0})}),o&&(i&&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(e=>{this.mindMap.execCommand(`SET_NODE_DATA`,e,{customLeft:t,customTop:n})})}resetLayout(){Do(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){!t||!ec.includes(t)||[e].forEach(e=>{this.setNodeStyle(e,`shape`,t)})}goTargetNode(e,t=()=>{}){let n=typeof e==`string`?e:e.getData(`uid`);n&&this.expandToNodeUid(n,()=>{let e=this.findNodeByUid(n);e&&(e.active(),this.moveNodeToCenter(e),t(e))})}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),ps(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:i}=this.mindMap.view.getTransformData(),{left:a,top:o,width:s,height:c}=e;n||(a*=r.scaleX,o*=r.scaleY,s*=r.scaleX,c*=r.scaleY);let l=this.mindMap.width/2,u=this.mindMap.height/2,d=a+s/2,f=o+c/2,p=l-i.x,m=u-i.y,h=p-d,g=m-f;this.mindMap.view.translateX(h),this.mindMap.view.translateY(g),n&&this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(e,t=()=>{}){if(!this.renderTree){t();return}let n=[],r=!1,i={};Oo(this.renderTree,(t,a)=>{if(t.data.uid===e)return n=a?[...i[a.data.uid],a]:[],`stop`;if(Ws(t.data).forEach(o=>{o.uid===e&&(n=a?[...i[a.data.uid],a,t]:[],r=!0)}),r)return`stop`;i[t.data.uid]=a?[...i[a.data.uid],a]:[]});let a=!1;if(n.forEach(e=>{e.data.expand||(a=!0,e.data.expand=!0)}),r){let e=n[n.length-1];e&&Do(e,null,e=>{e.data.expand||(a=!0,e.data.expand=!0)})}a?this.mindMap.render(t):t()}findNodeByUid(e){if(!this.root)return;let t=null;return Do(this.root,null,n=>{if(n.getData(`uid`)===e)return t=n,!0;let r=!1;if((n._generalizationList||[]).forEach(n=>{n.generalizationNode.getData(`uid`)===e&&(t=n.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 Ha().stroke({color:n.stroke||`transparent`}).fill({color:n.fill||`transparent`}),this.highlightBoxNodeStyle={...n};let r=1/0,i=1/0,a=-1/0,o=-1/0;t?e.children.slice(t[0],t[1]+1).forEach(e=>{e.left<r&&(r=e.left),e.top<i&&(i=e.top);let t=e.left+e.width,n=e.top+e.height;t>a&&(a=t),n>o&&(o=n)}):(r=e.left,i=e.top,a=e.left+e.width,o=e.top+e.height),this.highlightBoxNode.plot([[r,i],[a,i],[a,o],[r,o]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode&&this.highlightBoxNode.remove()}hasRichTextPlugin(){return!!this.mindMap.richText}}})),ku,Au=m((()=>{To(),ku={default:xo}})),ju,Mu,Nu=m((()=>{ju={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 e=0;e<=9;e++)ju[e]=e+48;`abcdefghijklmnopqrstuvwxyz`.split(``).forEach((e,t)=>{ju[e]=t+65}),Mu=ju})),Pu,Fu=m((()=>{Nu(),Pu=class{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){Mu[e]=t}removeKeyMap(e){Mu[e]!==void 0&&delete Mu[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(){let{enableShortcutOnlyWhenMouseInSvg:e}=this.mindMap.opt;e&&(this.isStopCheckInSvg=!0)}recoveryCheckInSvg(){let{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){let t=e.target;if(t===document.body)return!0;for(let e=0;e<this.mindMap.editNodeClassList.length;e++){let n=this.mindMap.editNodeClassList[e];if(t.classList.contains(n))return!0}return!1}onKeydown(e){let{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(t=>{if(this.checkKey(e,t)){if(this.checkKey(e,`Control+v`)||(e.stopPropagation(),e.preventDefault()),typeof n==`function`&&n(t,[...this.mindMap.renderer.activeNodeList]))return;this.shortcutMap[t].forEach(e=>{e()})}}))}checkKey(e,t){let n=this.getOriginEventCodeArr(e),r=this.getKeyCodeArr(t);if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){let t=r.findIndex(t=>t===n[e]);if(t===-1)return!1;r.splice(t,1)}return!0}getOriginEventCodeArr(e){let t=[];return(e.ctrlKey||e.metaKey)&&t.push(Mu.Control),e.altKey&&t.push(Mu.Alt),e.shiftKey&&t.push(Mu.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(e=>{n.push(Mu[e])}),n}addShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{this.shortcutMap[e]?this.shortcutMap[e].push(t):this.shortcutMap[e]=[t]})}removeShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{if(this.shortcutMap[e])if(t){let n=this.shortcutMap[e].findIndex(e=>e===t);n!==-1&&this.shortcutMap[e].splice(n,1)}else this.shortcutMap[e]=[],delete this.shortcutMap[e]})}getShortcutFn(e){let t=[];return e.split(/\s*\|\s*/).forEach(e=>{t=this.shortcutMap[e]||[]}),t}}})),Iu,Lu,Ru,zu,Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu=m((()=>{Iu=`simple-mind-map`,Lu=`0.14.0-fix.2`,Ru=`一个简单的web在线思维导图`,zu=[{name:`街角小林`,email:`1013335014@qq.com`},{name:`理想青年实验室`,url:`http://lxqnsys.com/`}],Bu=`./types/index.d.ts`,Vu=`./types/index.d.ts`,Hu={type:`git`,url:`https://github.com/wanglin2/mind-map`},Uu={lint:`eslint src/`,format:`prettier --write .`,types:`npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types --target es2017 --skipLibCheck & node ./bin/createPluginsTypeFiles.js`,wsServe:`node ./bin/wsServer.mjs`},Wu=`index.js`,Gu=`./dist/simpleMindMap.umd.min.js`,Ku={"@svgdotjs/svg.js":`3.2.0`,deepmerge:`^1.5.2`,eventemitter3:`^4.0.7`,jszip:`^3.10.1`,katex:`^0.16.8`,"mdast-util-from-markdown":`^1.3.0`,"pdf-lib":`^1.17.1`,quill:`^2.0.3`,tern:`^0.24.3`,uuid:`^9.0.0`,ws:`^7.5.9`,"xml-js":`^1.6.11`,"y-webrtc":`^10.2.5`,yjs:`^13.6.8`},qu=[`javascript`,`svg`,`mind-map`,`mindMap`,`MindMap`],Ju={eslint:`^8.25.0`,prettier:`^2.7.1`},Yu={name:Iu,version:Lu,description:Ru,authors:zu,types:Bu,typings:Vu,license:`MIT`,repository:Hu,scripts:Uu,module:Wu,main:Gu,dependencies:Ku,keywords:qu,devDependencies:Ju}})),Zu,Qu=m((()=>{M(),wt(),Xu(),Zu=class{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=Lo(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(e=>{e(...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(e=>e===t);n!==-1&&this.commands[e].splice(n,1)}}addHistory(){if(this.mindMap.opt.readonly||this.isPause)return;this.mindMap.emit(`beforeAddHistory`);let 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){let t=this.history[this.activeHistoryIndex];this.activeHistoryIndex-=e,this.mindMap.emit(`back_forward`,this.activeHistoryIndex,this.history.length);let 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){let t=this.history[this.activeHistoryIndex];this.activeHistoryIndex+=e,this.mindMap.emit(`back_forward`,this.activeHistoryIndex,this.history.length);let n=this.history[this.activeHistoryIndex],r=JSON.parse(n);return this.emitDataUpdatesEvent(t,n),r}}getCopyData(){if(!this.mindMap.renderer.renderTree)return null;let e=No({},this.mindMap.renderer.renderTree,!0);return e.smmVersion=Yu.version,e}removeDataUid(e){e=Mo(e);let t=e=>{delete e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};return t(e),e}emitDataUpdatesEvent(e,t){try{let n=`data_change_detail`;if(this.mindMap.event.listenerCount(n)>0&&e&&t){let r=JSON.parse(e),i=JSON.parse(t),a=Mo(Rs(r)),o=Mo(Rs(i)),s=[],c=(e,t)=>(e.children&&e.children.length>0&&e.children.forEach((n,r)=>{e.children[r]=typeof n==`string`?t[n]:t[n.data.uid],c(e.children[r],t)}),e);Object.keys(o).forEach(e=>{a[e]?Ds(a[e],o[e])||s.push({action:`update`,oldData:c(a[e],a),data:c(o[e],o)}):s.push({action:`create`,data:c(o[e],o)})}),Object.keys(a).forEach(e=>{o[e]||s.push({action:`delete`,data:c(a[e],a)})}),this.mindMap.emit(n,s)}}catch(e){this.mindMap.opt.errorHandler(yt.DATA_CHANGE_DETAIL_EVENT_ERROR,e)}}}})),$u,ed=m((()=>{M(),$u=class{constructor(){this.has={},this.queue=[],this.nextTick=Ho(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){let n=this.queue.findIndex(t=>t.name===e);n!==-1&&(this.queue[n]={name:e,fn:t})}flush(){let e=this.queue.slice(0);this.queue=[],e.forEach(({name:e,fn:t})=>{this.has[e]=!1,t()})}}})),td,nd=m((()=>{wt(),td={el:null,data:null,viewData:null,readonly:!1,layout:O.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:O.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:(e,t)=>{console.error(e,t)},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:O.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:`
|
|
83
|
+
* {
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
}
|
|
88
|
+
`,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:``}})),rd=g({default:()=>ad}),id,ad,od,sd=m((()=>{Et(),At(),Ou(),id=v(jt()),Au(),Qs(),Fu(),Qu(),ed(),wt(),bo(),M(),To(),nd(),ad=class e{constructor(t={}){if(e.instanceCount++,this.opt=this.handleOpt((0,id.default)(td,t)),this.opt.data=this.handleData(this.opt.data),this.el=this.opt.el,!this.el)throw 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(),e.pluginList.filter(e=>e.preload).forEach(e=>{this.initPlugin(e)}),this.event=new kt({mindMap:this}),this.keyCommand=new Pu({mindMap:this}),this.command=new Zu({mindMap:this}),this.renderer=new Du({mindMap:this}),this.view=new Tt({mindMap:this}),this.batchExecution=new $u,e.pluginList.filter(e=>!e.preload).forEach(e=>{this.initPlugin(e)}),this.addCss(),this.render(this.opt.fit?()=>this.view.fit():()=>{}),this.opt.addHistoryOnInit&&this.opt.data&&this.command.addHistory()}handleOpt(e){return _t.includes(e.layout)||(e.layout=O.LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&ku[e.theme]?e.theme:`default`,e}handleData(e){return Qo(e)||Object.keys(e).length<=0?null:(e=Mo(e||{}),e.data&&!e.data.expand&&(e.data.expand=!0),xs([e],!1,null,!0),e)}initContainer(){let{associativeLineIsAlwaysAboveNode:e}=this.opt;this.el.classList.add(`smm-mind-map-container`);let t=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass(`smm-associative-line-container`)};this.svg=yo().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 bt+Object.keys(this.cssTextMap).map(e=>this.cssTextMap[e]).join(`
|
|
89
|
+
`)}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){let 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 Error(`容器元素el的宽高不能为0`)}resize(){let 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.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=qs(ku[this.opt.theme]||ku.default,this.opt.themeConfig),Zs.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand(`CLEAR_ACTIVE_NODE`),this.opt.theme=e,t||this.render(null,O.CHANGE_THEME),this.emit(`view_theme_change`,e)}getTheme(){return this.opt.theme}setThemeConfig(e,t=!1){let n=ds(this.themeConfig,e);if(this.opt.themeConfig=e,!t){let e=Co(n);this.render(null,e?``:O.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);let t={...this.opt};this.opt=this.handleOpt(id.default.all([td,this.opt,e])),this.emit(`after_update_config`,this.opt,t)}getLayout(){return this.opt.layout}setLayout(e,t=!1){_t.includes(e)||(e=O.LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,O.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 n=e?{layout:this.getLayout(),root:t,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:t,Mo(n)}async export(...e){try{if(!this.doExport)throw Error(`请注册Export插件!`);return await this.doExport.export(...e)}catch(e){this.opt.errorHandler(yt.EXPORT_ERROR,e)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){if(![O.MODE.READONLY,O.MODE.EDIT].includes(e))return;let t=e===O.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:i,node:a}={}){let{watermarkConfig:o,openPerformance:s}=this.opt;s&&this.renderer.forceLoadNode(a);let{cssTextList:c,header:l,headerHeight:u,footer:d,footerHeight:f}=zs({addContentToHeader:r,addContentToFooter:i}),p=this.svg,m=this.draw,h=p.width(),g=p.height(),_=m.transform(),v=this.elRect;m.scale(1/_.scaleX,1/_.scaleY);let y=m.rbox(),b=null;a&&(b=Bs(a,y.x,y.y,e,t)),y.width+=e*2,y.height+=t*2+0+u+f,m.translate(e,t),p.size(y.width,y.height),m.translate(-y.x+v.left,-y.y+v.top);let x=p.clone(),S=this.watermark&&this.watermark.hasWatermark();if(!n&&S){this.watermark.isInExport=!0;let{onlyExport:e}=o;y.width>h||y.height>g?(this.width=y.width,this.height=y.height,this.watermark.onResize(),x=p.clone(),this.width=h,this.height=g,this.watermark.onResize()):e&&(this.watermark.onResize(),x=p.clone()),e&&this.watermark.clear(),this.watermark.isInExport=!1}[this.joinCss(),...c].forEach(e=>{x.add(yo(`<style>${e}</style>`))}),l&&u>0&&(x.findOne(`.smm-container`).translate(0,u),l.width(y.width),l.y(t),x.add(l,0)),d&&f>0&&(d.width(y.width),d.y(y.height-t-f),x.add(d));let C=p.find(`defs`),w=x.find(`defs`);return C.forEach((e,t)=>{let n=w[t];if(!n)return;let r=e.children(),i=n.children();for(let e=0;e<r.length;e++){let t=r[e],n=i[e];t&&n&&n.attr(`id`,t.attr(`id`))}}),p.size(h,g),m.transform(_),{svg:x,svgHTML:x.svg(),clipData:b,rect:{...y,ratio:y.width/y.height},origWidth:h,origHeight:g,scaleX:_.scaleX,scaleY:_.scaleY}}addShape(e){e&&(this.extendShapeList.find(t=>t.name===e.name)||this.extendShapeList.push(e))}removeShape(e){let t=this.extendShapeList.findIndex(t=>t.name===e);t!==-1&&this.extendShapeList.splice(t,1)}getSvgObjects(){return{SVG:yo,G:fo,Rect:Wa}}addPlugin(t,n){e.hasPlugin(t)===-1&&e.usePlugin(t,n),this.initPlugin(t)}removePlugin(t){let n=e.hasPlugin(t);n!==-1&&(e.pluginList.splice(n,1),this[t.instanceName]&&(this[t.instanceName].beforePluginRemove&&this[t.instanceName].beforePluginRemove(),delete this[t.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(),[...e.pluginList].forEach(e=>{this[e.instanceName]&&this[e.instanceName].beforePluginDestroy&&this[e.instanceName].beforePluginDestroy(),this[e.instanceName]=null}),this.event.unbind(),this.svg.remove(),Zs.removeBackgroundStyle(this.el),this.el.classList.remove(`smm-mind-map-container`),this.el.innerHTML=``,this.el=null,this.removeCss(),e.instanceCount--}},od=[],ad.extendNodeDataNoStylePropList=(e=[])=>{od.push(...e),vt.push(...e)},ad.resetNodeDataNoStylePropList=()=>{od.forEach(e=>{let t=vt.findIndex(t=>t===e);t!==-1&&vt.splice(t,1)}),od=[]},ad.pluginList=[],ad.usePlugin=(e,t={})=>ad.hasPlugin(e)===-1?(e.pluginOpt=t,ad.pluginList.push(e),ad):ad,ad.hasPlugin=e=>ad.pluginList.findIndex(t=>t===e),ad.instanceCount=0,ad.defineTheme=(e,t={})=>{if(ku[e])return Error(`该主题名称已存在`);ku[e]=qs(xo,t)},ad.removeTheme=e=>{ku[e]&&(ku[e]=null)}})),cd,ld,ud,dd,fd,pd,md,hd,gd,_d=m((()=>{cd=e=>String(e).split(/\s+/).map(e=>{if(/^[\d.]+/.test(e)){let t=/^([\d.]+)(.*)$/.exec(e);return[Number(t[1]),t[2]]}else return e}),ld=(e,t)=>e*t,ud=(e,t)=>t/e,dd={left:0,top:0,center:50,bottom:100,right:100},fd=({backgroundSize:e,drawOpt:t,imageRatio:n,canvasWidth:r,canvasHeight:i,canvasRatio:a})=>{if(e){let o=cd(e);if(o[0]===`auto`&&o[1]===`auto`)return;if(o[0]===`cover`){n>a?(t.height=i,t.width=ld(n,i)):(t.width=r,t.height=ud(n,r));return}if(o[0]===`contain`){n>a?(t.width=r,t.height=ud(n,r)):(t.height=i,t.width=ld(n,i));return}let s=-1;o[0]&&(Array.isArray(o[0])?o[0][1]===`%`?(t.width=o[0][0]/100*r,s=t.width):(t.width=o[0][0],s=o[0][0]):o[0]===`auto`&&o[1]&&(o[1][1]===`%`?t.width=ld(n,o[1][0]/100*i):t.width=ld(n,o[1][0]))),o[1]&&Array.isArray(o[1])?o[1][1]===`%`?t.height=o[1][0]/100*i:t.height=o[1][0]:s!==-1&&(t.height=ud(n,s))}},pd=({backgroundPosition:e,drawOpt:t,imgWidth:n,imgHeight:r,canvasWidth:i,canvasHeight:a})=>{if(e){let o=cd(e);o=o.map(e=>typeof e==`string`?dd[e]===void 0?e:[dd[e],`%`]:e),Array.isArray(o[0])&&(o.length===1&&o.push([50,`%`]),o[0][1]===`%`?t.x=o[0][0]/100*i-o[0][0]/100*n:t.x=o[0][0],o[1][1]===`%`?t.y=o[1][0]/100*a-o[1][0]/100*r:t.y=o[1][0])}},md=({ctx:e,image:t,backgroundRepeat:n,drawOpt:r,imgWidth:i,imgHeight:a,canvasWidth:o,canvasHeight:s})=>{if(n){let c=r.x,l=r.y,u=Math.ceil(c/i),d=Math.ceil(l/a),f=c-u*i,p=l-d*a,m=cd(n);if(m[0]===`no-repeat`||i>=o&&a>=s)return;if(m[0]===`repeat-x`&&o>i){let n=f;for(;n<o;)hd(e,t,{...r,x:n}),n+=i;return!0}if(m[0]===`repeat-y`&&s>a){let n=p;for(;n<s;)hd(e,t,{...r,y:n}),n+=a;return!0}if(m[0]===`repeat`){let n=f;for(;n<o;){if(s>a){let i=p;for(;i<s;)hd(e,t,{...r,x:n,y:i}),i+=a}n+=i}return!0}}},hd=(e,t,n)=>{e.drawImage(t,n.sx,n.sy,n.swidth,n.sheight,n.x,n.y,n.width,n.height)},gd=(e,t,n,r,{backgroundSize:i,backgroundPosition:a,backgroundRepeat:o},s=()=>{})=>{let c=t/n,l=new Image;l.src=r,l.onload=()=>{let r=l.width,u=l.height,d=r/u,f={sx:0,sy:0,swidth:r,sheight:u,x:0,y:0,width:r,height:u};fd({backgroundSize:i,drawOpt:f,imageRatio:d,canvasWidth:t,canvasHeight:n,canvasRatio:c}),pd({backgroundPosition:a,drawOpt:f,imgWidth:f.width,imgHeight:f.height,imageRatio:d,canvasWidth:t,canvasHeight:n,canvasRatio:c}),md({ctx:e,image:l,backgroundRepeat:o,drawOpt:f,imgWidth:f.width,imgHeight:f.height,imageRatio:d,canvasWidth:t,canvasHeight:n,canvasRatio:c})||hd(e,l,f),s()},l.onerror=e=>{s(e)}}})),vd,yd,bd,xd,Sd=m((()=>{M(),vd=e=>e.richText?cs(e.text):e.text,yd=e=>Array(e).fill(`#`).join(``),bd=e=>Array(e-6).fill(` `).join(``)+`*`,xd=e=>{let t=``;return Do(e,null,(e,n,r,i)=>{let a=i+1;a<=6?t+=yd(a):t+=bd(a),t+=` `+vd(e.data);let o=e.data.generalization;if(Array.isArray(o))t+=o.map(e=>` [${vd(e)}]`);else if(o&&o.text){let e=vd(o);t+=` [${e}]`}t+=`
|
|
90
|
+
|
|
91
|
+
`,e.data.note&&(t+=e.data.note+`
|
|
92
|
+
|
|
93
|
+
`)},()=>{},!0),t}})),Cd,wd,Td,Ed=m((()=>{M(),Cd=e=>e.richText?cs(e.text):e.text,wd=e=>Array(e).fill(` `).join(``),Td=e=>{let t=``;return Do(e,null,(e,n,r,i)=>{t+=wd(i),t+=` `+Cd(e.data);let a=e.data.generalization;Array.isArray(a)?t+=a.map(e=>` [${Cd(e)}]`):a&&a.text&&(t+=` [${Cd(a)}]`),t+=`
|
|
94
|
+
|
|
95
|
+
`},()=>{},!0),t}})),Dd=g({default:()=>Od}),Od,kd=m((()=>{M(),bo(),_d(),Sd(),wt(),Ed(),Od=class{constructor(e){this.mindMap=e.mindMap}async export(e,t=!0,n=`思维导图`,...r){if(this[e]){let i=await this[e](n,...r);return t&&Io(i,n+`.`+e),i}else return null}createTransformImgTaskList(e,t,n,r){return e.find(t).map(async e=>{let t=r(e);if(/^data:/.test(t)||t===`none`)return;let i=await Fo(t);e.attr(n,i)})}async getSvgData(e){let{exportPaddingX:t,exportPaddingY:n,errorHandler:r,resetCss:i,addContentToHeader:a,addContentToFooter:o,handleBeingExportSvg:s}=this.mindMap.opt,{svg:c,svgHTML:l,clipData:u}=this.mindMap.getSvgData({paddingX:t,paddingY:n,addContentToHeader:a,addContentToFooter:o,node:e});u&&(u.paddingX=t,u.paddingY=n);let d=!1,f=this.createTransformImgTaskList(c,`image`,`href`,e=>e.attr(`href`)||e.attr(`xlink:href`)),p=this.createTransformImgTaskList(c,`img`,`src`,e=>e.attr(`src`)),m=[...f,...p];try{await Promise.all(m)}catch(e){r(yt.EXPORT_LOAD_IMAGE_ERROR,e)}if(this.mindMap.richText){let e=c.find(`foreignObject`);if(e.length>0&&(e[0].add(yo(`<style>${i}</style>`)),d=!0),this.mindMap.formula&&c.find(`.ql-formula`).length>0){let t=this.mindMap.formula.getStyleText();if(t){let n=document.createElement(`style`);n.innerHTML=t,Gs(n),e[0].add(n),d=!0}}}return typeof s==`function`&&(d=!0,c=s(c)),(m.length>0||d)&&(l=c.svg()),{node:c,str:l,clipData:u}}svgToPng(e,t,n=null,r=!1,i=`image/png`){let{maxCanvasSize:a,minExportImgCanvasScale:o}=this.mindMap.opt;return new Promise((s,c)=>{let l=new Image;l.setAttribute(`crossOrigin`,`anonymous`),l.onload=async()=>{try{let e=document.createElement(`canvas`),c=Math.max(window.devicePixelRatio,o),u=l.width,d=l.height,f=0,p=0;n&&(f=n.paddingX,p=n.paddingY,u=n.width+f*2,d=n.height+p*2);let m=0,h=0,{backgroundImage:g}=this.mindMap.themeConfig;if(r&&g&&!t){let e=await new Promise(e=>{let t=new Image;t.onload=()=>{e([t.width,t.height])},t.onerror=()=>{e(null)},t.src=g});if(e){let t=u/d,n=e[0]/e[1];t>n?(m=u,h=u/n):(h=d,m=d*n)}}let _=1,v=1,y=(m||u)*c,b=(h||d)*c;if(y>a||b>a){let e=null,t=null;y>a?e=a:b>a&&(t=a);let n=Ao(y,b,e,t);_=n[0]/y,v=n[1]/b,y=n[0],b=n[1]}e.width=y,e.height=b;let x=y/c,S=b/c;e.style.width=x+`px`,e.style.height=S+`px`;let C=e.getContext(`2d`);C.scale(c,c),t||await this.drawBackgroundToCanvas(C,x,S);let w=(m>0?(m-u)/2:0)*_,T=(h>0?(h-d)/2:0)*v;n?C.drawImage(l,n.left,n.top,n.width,n.height,f*_+w,p*v+T,n.width*_,n.height*v):C.drawImage(l,w,T,u*_,d*v),s(e.toDataURL(i))}catch(e){c(e)}},l.onerror=e=>{c(e)},l.src=e})}drawBackgroundToCanvas(e,t,n){return new Promise((r,i)=>{let{backgroundColor:a=`#fff`,backgroundImage:o,backgroundRepeat:s=`no-repeat`,backgroundPosition:c=`center center`,backgroundSize:l=`cover`}=this.mindMap.themeConfig;e.save(),e.rect(0,0,t,n),e.fillStyle=a,e.fill(),e.restore(),o&&o!==`none`?(e.save(),gd(e,t,n,o,{backgroundRepeat:s,backgroundPosition:c,backgroundSize:l},t=>{t?i(t):r(),e.restore()})):r()})}drawBackgroundToSvg(e){return new Promise(async t=>{let{backgroundColor:n=`#fff`,backgroundImage:r,backgroundRepeat:i=`repeat`}=this.mindMap.themeConfig;if(e.css(`background-color`,n),r&&r!==`none`){let n=await Fo(r);e.css(`background-image`,`url(${n})`),e.css(`background-repeat`,i),t()}else t()})}async _image(e,t,n=!1,r=null,i=!1){this.mindMap.renderer.textEdit.hideEditTextBox(),this.handleNodeExport(r);let{str:a,clipData:o}=await this.getSvgData(r),s=await this.fixSvgStrAndToBlob(a);return await this.svgToPng(s,n,o,i,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();let{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 Error(`请注册ExportPDF插件`);let r=await this.png(e,t,null,n);return await this.mindMap.doExportPDF.pdf(r)}async xmind(e){if(!this.mindMap.doExportXMind)throw Error(`请注册ExportXMind插件`);let t=this.mindMap.getData();return await Ko(await this.mindMap.doExportXMind.xmind(t,e))}async svg(e){this.mindMap.renderer.textEdit.hideEditTextBox();let{node:t}=await this.getSvgData();t.first().before(yo(`<title>${e}</title>`)),await this.drawBackgroundToSvg(t);let n=t.svg();return await this.fixSvgStrAndToBlob(n)}async fixSvgStrAndToBlob(e){return e=Xo(e),e=Ms(e),await Ko(new Blob([e],{type:`image/svg+xml`}))}async json(e,t=!0){let n=this.mindMap.getData(t),r=JSON.stringify(n);return await Ko(new Blob([r]))}async smm(e,t){return await this.json(e,t)}async md(){let e=xd(this.mindMap.getData());return await Ko(new Blob([e]))}async txt(){let e=Td(this.mindMap.getData());return await Ko(new Blob([e]))}},Od.instanceName=`doExport`})),Ad,jd=m((()=>{Ad=class{constructor(e){this.mindMap=e,this.autoMoveTimer=null}onMove(e,t,n=()=>{},r=()=>{}){n();let i=this.mindMap.opt.selectTranslateStep,a=this.mindMap.opt.selectTranslateLimit,o=0;e<=this.mindMap.elRect.left+a&&(r(`left`,i),this.mindMap.view.translateX(i),o++),e>=this.mindMap.elRect.right-a&&(r(`right`,i),this.mindMap.view.translateX(-i),o++),t<=this.mindMap.elRect.top+a&&(r(`top`,i),this.mindMap.view.translateY(i),o++),t>=this.mindMap.elRect.bottom-a&&(r(`bottom`,i),this.mindMap.view.translateY(-i),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)}}})),Md=g({default:()=>Nd}),Nd,Pd=m((()=>{M(),au(),wt(),jd(),Nd=class extends iu{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.autoMove=new Ad(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=Lo(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;let{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();let{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;let{autoMoveWhenMouseInEdgeOnDrag:t,enableFreeDrag:n,beforeDragEnd:r}=this.mindMap.opt;t&&this.mindMap.select&&this.autoMove.clearAutoMoveTimer(),this.isMousedown=!1,this.beingDragNodeList.forEach(e=>{e.setOpacity(1),e.showChildren(),e.endDrag()}),this.removeCloneNode();let i=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:i,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:t,y:n}=this.mindMap.toPos(e.clientX-this.offsetX,e.clientY-this.offsetY),{scaleX:r,scaleY:i,translateX:a,translateY:o}=this.drawTransform;t=(t-a)/r,n=(n-o)/i,this.mousedownNode.left=t,this.mousedownNode.top=n,this.mousedownNode.customLeft=t,this.mousedownNode.customTop=n,this.mindMap.execCommand(`SET_NODE_CUSTOM_POSITION`,this.mousedownNode,t,n),this.mindMap.render()}this.isDragging&&this.mindMap.emit(`node_dragend`,{overlapNodeUid:i,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:i,translateX:a,translateY:o}=this.drawTransform,s=e-this.offsetX,c=t-this.offsetY;e=(s-a)/r,t=(c-o)/i;let l=this.clone.transform();this.clone.translate(e-l.translateX,t-l.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:i}=this.drawTransform;this.offsetX=this.mouseDownX-(e.left*t+r),this.offsetY=this.mouseDownY-(e.top*n+i),e.getData(`isActive`)?this.beingDragNodeList=Ks(hs(this.mindMap.renderer.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization))):this.beingDragNodeList=[e];let{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(){let e=[];Oo(this.mindMap.renderer.root,t=>{this.checkIsInBeingDragNodeList(t)||(e[t.layerIndex]||(e[t.layerIndex]=[]),e[t.layerIndex].push(t))}),this.nodeList=e.reduceRight((e,t)=>[...e,...t],[])}createCloneNode(){if(!this.clone){let{dragMultiNodeRectConfig:e,dragPlaceholderRectFill:t,dragPlaceholderLineConfig:n,dragOpacityConfig:r,handleDragCloneNode:i}=this.mindMap.opt,{width:a,height:o,fill:s}=e,c=this.beingDragNodeList[0],l=c.style.merge(`lineColor`,!0);if(this.beingDragNodeList.length>1)this.clone=this.mindMap.otherDraw.rect().size(a,o).radius(o/2).fill({color:s||l}),this.offsetX=a/2,this.offsetY=o/2;else{this.clone=c.group.clone();let e=this.clone.findOne(`.smm-expand-btn`);e&&e.remove(),this.mindMap.otherDraw.add(this.clone),typeof i==`function`&&i(this.clone)}this.clone.opacity(r.cloneNodeOpacity),this.clone.css(`z-index`,99999),this.placeholder=this.mindMap.otherDraw.rect().fill({color:t||l}).radius(5),this.placeHolderLine=this.mindMap.otherDraw.path().stroke({color:n.color||l,width:n.width}).fill({color:`none`}),this.beingDragNodeList.forEach(e=>{e.setOpacity(r.beingDragNodeOpacity),e.hideChildren(),e.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;let{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:i,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:s,VERTICAL_TIMELINE2:c,VERTICAL_TIMELINE3:l,FISHBONE:u,FISHBONE2:d,RIGHT_FISHBONE:f,RIGHT_FISHBONE2:p}=O.LAYOUT;this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.placeholder.size(0,0),this.placeHolderLine.hide(),this.removeExtraLines(),this.nodeList.forEach(m=>{if(m.getData(`isActive`)&&this.mindMap.execCommand(`SET_NODE_ACTIVE`,m,!1),!(this.overlapNode||this.prevNode&&this.nextNode))switch(this.mindMap.opt.layout){case e:case t:this.handleLogicalStructure(m);break;case n:this.handleMindMap(m);break;case r:this.handleOrganizationStructure(m);break;case i:this.handleCatalogOrganization(m);break;case a:this.handleTimeLine(m);break;case o:this.handleTimeLine2(m);break;case s:case c:case l:this.handleLogicalStructure(m);break;case u:case d:case f:case p:this.handleFishbone(m);break;default:this.handleLogicalStructure(m)}}),this.overlapNode&&this.handleOverlapNode()}handleOverlapNode(){let{LOGICAL_STRUCTURE:e,LOGICAL_STRUCTURE_LEFT:t,MIND_MAP:n,ORGANIZATION_STRUCTURE:r,CATALOG_ORGANIZATION:i,TIMELINE:a,TIMELINE2:o,VERTICAL_TIMELINE:s,VERTICAL_TIMELINE2:c,VERTICAL_TIMELINE3:l,FISHBONE:u,FISHBONE2:d,RIGHT_FISHBONE:f,RIGHT_FISHBONE2:p}=O.LAYOUT,{LEFT:m,TOP:h,RIGHT:g,BOTTOM:_}=O.LAYOUT_GROW_DIR,v=this.overlapNode.layerIndex,y=this.overlapNode.children,b=this.mindMap.renderer.layout.getMarginX(v+1),x=this.mindMap.renderer.layout.getMarginY(v+1),S=this.placeholderWidth/2,C=this.placeholderHeight/2,w=``,T=``,E=``,ee=!1,te=!1;if(y.length>0){let _=y[y.length-1],b=this.getNodeRect(_);switch(w=this.getNewChildNodeDir(_),this.mindMap.opt.layout){case e:case n:T=w===m?b.originRight-this.placeholderWidth:b.originLeft,E=b.originBottom+this.minOffset-C;break;case t:T=b.originRight-this.placeholderWidth,E=b.originBottom+this.minOffset-C;break;case r:ee=!0,T=b.originRight+this.minOffset-C,E=b.originTop;break;case i:v===0?(ee=!0,T=b.originRight+this.minOffset-C,E=b.originTop):(T=b.originLeft,E=b.originBottom+this.minOffset-C);break;case a:v===0?(ee=!0,T=b.originRight+this.minOffset-C,E=b.originTop+b.originHeight/2-S):(T=b.originLeft,E=b.originBottom+this.minOffset-C);break;case o:v===0?(ee=!0,T=b.originRight+this.minOffset-C,E=b.originTop+b.originHeight/2-S):(T=b.originLeft,E=v===1&&w===h?b.originTop-this.placeholderHeight-this.minOffset+C:b.originBottom+this.minOffset-C);break;case s:case c:case l:v===0?(T=b.originLeft+b.originWidth/2-S,E=b.originBottom+this.minOffset-C):(T=w===g?b.originLeft:b.originRight-this.placeholderWidth,E=b.originBottom+this.minOffset-C);break;case u:case d:case f:case p:v<=1?(te=!0,this.mindMap.execCommand(`SET_NODE_ACTIVE`,this.overlapNode,!0)):(T=b.originLeft,E=w===h?b.originBottom+this.minOffset-C:b.originTop-this.placeholderHeight-this.minOffset+C);break;default:}}else{let m=this.getNodeRect(this.overlapNode);switch(w=this.getNewChildNodeDir(this.overlapNode),this.mindMap.opt.layout){case e:case n:T=w===g?m.originRight+b:m.originLeft-this.placeholderWidth-b,E=m.originTop+(m.originHeight-this.placeholderHeight)/2;break;case t:T=m.originLeft-this.placeholderWidth-b,E=m.originTop+(m.originHeight-this.placeholderHeight)/2;break;case r:ee=!0,T=m.originLeft+(m.originWidth-this.placeholderHeight)/2,E=m.originBottom+b;break;case i:v===0&&(ee=!0),T=m.originLeft+m.originWidth*.5,E=m.originBottom+b;break;case a:v===0&&(ee=!0),T=m.originLeft+m.originWidth*.5,E=m.originBottom+x;break;case o:v===0&&(ee=!0),T=m.originLeft+m.originWidth*.5,E=v===1&&w===h?m.originTop-this.placeholderHeight-b:m.originBottom+b;break;case s:case c:case l:v===0&&(ee=!0),T=w===g?m.originRight+b:m.originLeft-this.placeholderWidth-b,E=m.originTop+m.originHeight/2-C;break;case u:case d:case f:case p:v<=1?(te=!0,this.mindMap.execCommand(`SET_NODE_ACTIVE`,this.overlapNode,!0)):(T=m.originLeft+m.originWidth*.5,E=w===_?m.originTop-this.placeholderHeight-this.minOffset+C:m.originBottom+this.minOffset-C);break;default:}}te||this.setPlaceholderRect({x:T,y:E,dir:w,rotate:ee})}getNewChildNodeDir(e){let{LOGICAL_STRUCTURE:t,LOGICAL_STRUCTURE_LEFT:n,MIND_MAP:r,TIMELINE2:i,VERTICAL_TIMELINE:a,VERTICAL_TIMELINE2:o,VERTICAL_TIMELINE3:s,FISHBONE:c,FISHBONE2:l,RIGHT_FISHBONE:u,RIGHT_FISHBONE2:d}=O.LAYOUT;switch(this.mindMap.opt.layout){case t:return O.LAYOUT_GROW_DIR.RIGHT;case n:return O.LAYOUT_GROW_DIR.LEFT;case r:case i:case a:case o:case s:case c:case l:case u:case d:return e.dir;default:return``}}handleVerticalCheck(e,t,n=!1){let{layout:r}=this.mindMap.opt,{LAYOUT:i,LAYOUT_GROW_DIR:a}=O,{VERTICAL_TIMELINE:o,VERTICAL_TIMELINE2:s,VERTICAL_TIMELINE3:c,FISHBONE:l,FISHBONE2:u,RIGHT_FISHBONE:d,RIGHT_FISHBONE2:f}=i,{LEFT:p}=a,m=this.mouseMoveX,h=this.mouseMoveY,g=this.getNodeRect(e),_=this.getNewChildNodeDir(e),v=e.layerIndex;n&&(t=t.reverse());let y=g.originHeight/4,{prevBrotherOffset:b,nextBrotherOffset:x}=this.getNodeDistanceToSiblingNode(t,e,g,`v`);if(g.left<=m&&g.right>=m){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=x>0?h>g.bottom&&h<=g.bottom+x:h>=g.bottom-y&&h<=g.bottom,i=b>0?h<g.top&&h>=g.top-b:h>=g.top&&h<=g.top+y,{scaleY:a}=this.drawTransform,m=_===p?g.originRight-this.placeholderWidth:g.originLeft,S=!1;switch(r){case o:case s:case c:v===1&&(m=g.originLeft+g.originWidth/2-this.placeholderWidth/2);break;case d:case f:m=g.originLeft+g.originWidth-this.placeholderWidth;break;default:}if(t){n?this.nextNode=e:this.prevNode=e;let t=g.originBottom+x/a-this.placeholderHeight/2;switch(r){case l:case u:case d:case f:v===2&&(S=!0,t=g.originBottom+this.minOffset-this.placeholderHeight/2);break;default:}this.setPlaceholderRect({x:m,y:t,dir:_,notRenderLine:S})}else if(i){n?this.prevNode=e:this.nextNode=e;let t=g.originTop-this.placeholderHeight-b/a+this.placeholderHeight/2;switch(r){case l:case u:case d:case f:v===2&&(S=!0,t=g.originTop-this.placeholderHeight-this.minOffset+this.placeholderHeight/2);break;default:}this.setPlaceholderRect({x:m,y:t,dir:_,notRenderLine:S})}}this.checkIsOverlap({node:e,dir:`v`,prevBrotherOffset:b,nextBrotherOffset:x,size:y,pos:h,nodeRect:g})}}handleHorizontalCheck(e,t){let{layout:n}=this.mindMap.opt,{LAYOUT:r}=O,{FISHBONE:i,FISHBONE2:a,RIGHT_FISHBONE:o,RIGHT_FISHBONE2:s,TIMELINE:c,TIMELINE2:l}=r,u=this.mouseMoveX,d=this.mouseMoveY,f=this.getNodeRect(e),p=f.originWidth/4,{prevBrotherOffset:m,nextBrotherOffset:h}=this.getNodeDistanceToSiblingNode(t,e,f,`h`);if(f.top<=d&&f.bottom>=d){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=h>0?u<f.right+h&&u>=f.right:u<=f.right&&u>=f.right-p,r=m>0?u>f.left-m&&u<=f.left:u<=f.left+p&&u>=f.left,{scaleX:d}=this.drawTransform,g=e.layerIndex,_=f.originTop,v=!1;switch(n){case c:case l:_=f.originTop+f.originHeight/2-this.placeholderWidth/2;break;case i:case a:case o:case s:g===1&&(v=!0,_=f.originTop+f.originHeight/2-this.placeholderWidth/2);break;default:}t?([o,s].includes(n)?this.nextNode=e:this.prevNode=e,this.setPlaceholderRect({x:f.originRight+h/d-this.placeholderHeight/2,y:_,rotate:!0,notRenderLine:v})):r&&([o,s].includes(n)?this.prevNode=e:this.nextNode=e,this.setPlaceholderRect({x:f.originLeft-this.placeholderHeight-m/d+this.placeholderHeight/2,y:_,rotate:!0,notRenderLine:v}))}this.checkIsOverlap({node:e,dir:`h`,prevBrotherOffset:m,nextBrotherOffset:h,size:p,pos:u,nodeRect:f})}}getNodeDistanceToSiblingNode(e,t,n,r){let{TOP:i,LEFT:a,BOTTOM:o,RIGHT:s}=O.LAYOUT_GROW_DIR,{scaleX:c,scaleY:l}=this.drawTransform,u=r===`v`?i:a,d=r===`v`?o:s,f=r===`v`?l:c,p=this.minOffset*f,m=ws(t,e),h=null,g=null;m!==-1&&(m-1>=0&&(h=e[m-1]),m+1<=e.length-1&&(g=e[m+1]));let _=0;if(h){let e=this.getNodeRect(h);_=n[u]-e[d],_=_>=p?_/2:0}else _=p;let v=0;return g?(v=this.getNodeRect(g)[u]-n[d],v=v>=p?v/2:0):v=p,{prevBrother:h,prevBrotherOffset:_,nextBrother:g,nextBrotherOffset:v}}setPlaceholderRect({x:e,y:t,dir:n,rotate:r,notRenderLine:i}){let a=this.placeholderWidth,o=this.placeholderHeight;if(r){let e=a;a=o,o=e}if(this.placeholder.size(a,o).move(e,t),i)return;let{dragPlaceholderLineConfig:s}=this.mindMap.opt,c=null,l=null;this.overlapNode?(c=this.overlapNode,l=this.overlapNode):(c=this.prevNode||this.nextNode,l=c.parent),l=l.fakeClone(),c=c.fakeClone();let u=this.beingDragNodeList[0].fakeClone();u.dir=n,u.left=e,u.top=t,u.width=a,u.height=o,l.children=[u],l._lines=[],this.placeHolderLine.show(),this.mindMap.renderer.layout.renderLine(l,[this.placeHolderLine],(...e)=>{},c.style.getStyle(`lineStyle`,!0)),this.placeHolderExtraLines=[...l._lines],this.placeHolderExtraLines.forEach(e=>{this.mindMap.otherDraw.add(e),e.stroke({color:s.color,width:s.width}).fill({color:`none`})})}checkIsOverlap({node:e,dir:t,prevBrotherOffset:n,nextBrotherOffset:r,size:i,pos:a,nodeRect:o}){let{TOP:s,LEFT:c,BOTTOM:l,RIGHT:u}=O.LAYOUT_GROW_DIR,d=t===`v`?s:c,f=t===`v`?l:u;!this.overlapNode&&!this.prevNode&&!this.nextNode&&o[d]+(n>0?0:i)<=a&&o[f]-(r>0?0:i)>=a&&(this.overlapNode=e)}handleLogicalStructure(e){let t=this.commonGetNodeCheckList(e);this.handleVerticalCheck(e,t)}handleMindMap(e){let t=e.parent?e.parent.children.filter(t=>{let n=!0;return e.layerIndex===1&&(n=t.dir===e.dir),n&&!this.checkIsInBeingDragNodeList(t)}):[];this.handleVerticalCheck(e,t)}handleOrganizationStructure(e){let t=this.commonGetNodeCheckList(e);this.handleHorizontalCheck(e,t)}handleCatalogOrganization(e){let 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===O.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(e=>e.layerIndex>1&&!this.checkIsInBeingDragNodeList(e)):[];if(e.layerIndex===1)this.handleHorizontalCheck(e,t);else{let n=e.dir===O.LAYOUT_GROW_DIR.TOP&&e.layerIndex===2,r=e.dir===O.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(e=>!this.checkIsInBeingDragNodeList(e)):[]}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.drawTransform,{left:a,top:o,width:s,height:c}=e,l=s,u=c,d=a,f=o,p=o+c,m=a+s,h=(a+s)*t+r,g=(o+c)*n+i;return a=a*t+r,o=o*n+i,{left:a,top:o,right:h,bottom:g,originWidth:l,originHeight:u,originLeft:d,originTop:f,originBottom:p,originRight:m}}checkIsInBeingDragNodeList(e){return!!this.beingDragNodeList.find(t=>t.uid===e.uid||t.isAncestor(e))}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},Nd.instanceName=`drag`})),Fd=g({default:()=>Id}),Id,Ld=m((()=>{M(),jd(),Id=class{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 Ad(e),this.bindEvent()}bindEvent(){this.onMousedown=this.onMousedown.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.checkInNodes=Lo(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){let{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:i,y:a}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseDownX=i,this.mouseDownY=a,this.createRect(i,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()},(e,t)=>{switch(e){case`left`:this.mouseDownX+=t;break;case`top`:this.mouseDownY+=t;break;case`right`:this.mouseDownX-=t;break;case`bottom`:this.mouseDownY-=t;break;default: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 e=0;e<this.cacheActiveList.length;e++){let n=this.cacheActiveList[e];if(!this.mindMap.renderer.activeNodeList.find(e=>e.getData(`uid`)===n.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(),i=Math.min(this.mouseDownX,this.mouseMoveX),a=Math.min(this.mouseDownY,this.mouseMoveY),o=Math.max(this.mouseDownX,this.mouseMoveX),s=Math.max(this.mouseDownY,this.mouseMoveY),c=c=>{let{left:l,top:u,width:d,height:f}=c,p=(l+d)*e+n,m=(u+f)*t+r;if(l=l*e+n,u=u*t+r,_s(i,o,a,s,l,p,u,m)){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()}};Oo(this.mindMap.renderer.root,e=>{c(e),e._generalizationList&&e._generalizationList.length>0&&e._generalizationList.forEach(e=>{c(e.generalizationNode)})})}hasSelectRange(){return this.isSelecting}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},Id.instanceName=`select`})),Rd=g({default:()=>zd}),zd,Bd=m((()=>{M(),wt(),zd=class{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(O.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.addShortcut(O.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.addShortcut(O.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.addShortcut(O.KEY_DIR.DOWN,this.onDownKeyUp)}removeShortcut(){this.mindMap.keyCommand.removeShortcut(O.KEY_DIR.LEFT,this.onLeftKeyUp),this.mindMap.keyCommand.removeShortcut(O.KEY_DIR.UP,this.onUpKeyUp),this.mindMap.keyCommand.removeShortcut(O.KEY_DIR.RIGHT,this.onRightKeyUp),this.mindMap.keyCommand.removeShortcut(O.KEY_DIR.DOWN,this.onDownKeyUp)}onLeftKeyUp(){this.onKeyup(O.KEY_DIR.LEFT)}onUpKeyUp(){this.onKeyup(O.KEY_DIR.UP)}onRightKeyUp(){this.onKeyup(O.KEY_DIR.RIGHT)}onDownKeyUp(){this.onKeyup(O.KEY_DIR.DOWN)}onKeyup(e){if(this.mindMap.renderer.activeNodeList.length>0)this.focus(e);else{let e=this.mindMap.renderer.root;this.mindMap.execCommand(`GO_TARGET_NODE`,e)}}focus(e){let t=this.mindMap.renderer.activeNodeList[0],n=this.getNodeRect(t),r=null,i=1/0,a=(e,t)=>{let a=this.getDistance(n,e);a<i&&(r=t,i=a)};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}){Oo(this.mindMap.renderer.root,i=>{if(i.uid===e.uid)return;let a=this.getNodeRect(i),{left:o,top:s,right:c,bottom:l}=a,u=!1;n===O.KEY_DIR.LEFT?u=c<=t.left:n===O.KEY_DIR.RIGHT?u=o>=t.right:n===O.KEY_DIR.UP?u=l<=t.top:n===O.KEY_DIR.DOWN&&(u=s>=t.bottom),u&&r(a,i)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Oo(this.mindMap.renderer.root,i=>{if(i.uid===e.uid)return;let a=this.getNodeRect(i),{left:o,top:s,right:c,bottom:l}=a,u=!1;n===O.KEY_DIR.LEFT?u=o<t.left&&s<t.bottom&&l>t.top:n===O.KEY_DIR.RIGHT?u=c>t.right&&s<t.bottom&&l>t.top:n===O.KEY_DIR.UP?u=s<t.top&&o<t.right&&c>t.left:n===O.KEY_DIR.DOWN&&(u=l>t.bottom&&o<t.right&&c>t.left),u&&r(a,i)})}getFocusNodeByAreaAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){let i=(t.right+t.left)/2,a=(t.bottom+t.top)/2;Oo(this.mindMap.renderer.root,t=>{if(t.uid===e.uid)return;let o=this.getNodeRect(t),{left:s,top:c,right:l,bottom:u}=o,d=(l+s)/2,f=(u+c)/2,p=d-i,m=f-a;if(p===0&&m===0)return;let h=!1;n===O.KEY_DIR.LEFT?h=p<=0&&p<=m&&p<=-m:n===O.KEY_DIR.RIGHT?h=p>0&&p>=-m&&p>=m:n===O.KEY_DIR.UP?h=m<=0&&m<p&&m<-p:n===O.KEY_DIR.DOWN&&(h=m>0&&-m<p&&m>p),h&&r(o,t)})}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:a,top:o,width:s,height:c}=e;return{right:(a+s)*t+r,bottom:(o+c)*n+i,left:a*t+r,top:o*n+i}}getDistance(e,t){let n=this.getCenter(e),r=this.getCenter(t);return Math.sqrt((n.x-r.x)**2+(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()}},zd.instanceName=`keyboardNavigation`})),Vd=g({default:()=>Hd}),Hd,Ud=m((()=>{M(),wt(),Hd=class{constructor(e){this.mindMap=e.mindMap,this.scrollbarWrapSize={width:0,height:0},this.chartHeight=0,this.chartWidth=0,this.reset(),this.bindEvent()}reset(){this.currentScrollType=``,this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.mousedownScrollbarPos=0}bindEvent(){this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.updateScrollbar=this.updateScrollbar.bind(this),this.updateScrollbar=Lo(this.updateScrollbar,16,this),this.mindMap.on(`mousemove`,this.onMousemove),this.mindMap.on(`mouseup`,this.onMouseup),this.mindMap.on(`node_tree_render_end`,this.updateScrollbar),this.mindMap.on(`view_data_change`,this.updateScrollbar),this.mindMap.on(`resize`,this.updateScrollbar)}unBindEvent(){this.mindMap.off(`mousemove`,this.onMousemove),this.mindMap.off(`mouseup`,this.onMouseup),this.mindMap.off(`node_tree_render_end`,this.updateScrollbar),this.mindMap.off(`view_data_change`,this.updateScrollbar),this.mindMap.off(`resize`,this.updateScrollbar)}updateScrollbar(){if(this.isMousedown)return;let e=this.calculationScrollbar();this.emitEvent(e)}emitEvent(e){this.mindMap.emit(`scrollbar_change`,e)}setScrollBarWrapSize(e,t){this.scrollbarWrapSize.width=e,this.scrollbarWrapSize.height=t}calculationScrollbar(){let e=this.mindMap.draw.rbox(),t=this.mindMap.elRect;e.x-=t.left,e.y-=t.top;let n=this.mindMap.height,r=n/2,i=e.height+r*2;this.chartHeight=i;let a=e.y-r,o=Math.min(n/i*100,100),s=-a/i*100;s<0&&(s=0),s>100-o&&(s=100-o);let c=this.mindMap.width,l=c/2,u=e.width+l*2;this.chartWidth=u;let d=e.x-l,f=Math.min(c/u*100,100),p=-d/u*100;return p<0&&(p=0),p>100-f&&(p=100-f),{vertical:{top:s,height:o},horizontal:{left:p,width:f}}}onMousedown(e,t){e.preventDefault(),e.stopPropagation(),this.currentScrollType=t,this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};let n=window.getComputedStyle(e.target);t===O.SCROLL_BAR_DIR.VERTICAL?this.mousedownScrollbarPos=Number.parseFloat(n.top):this.mousedownScrollbarPos=Number.parseFloat(n.left)}onMousemove(e){if(this.isMousedown)if(e.preventDefault(),e.stopPropagation(),this.currentScrollType===O.SCROLL_BAR_DIR.VERTICAL){let t=e.clientY-this.mousedownPos.y+this.mousedownScrollbarPos;this.updateMindMapView(O.SCROLL_BAR_DIR.VERTICAL,t)}else{let t=e.clientX-this.mousedownPos.x+this.mousedownScrollbarPos;this.updateMindMapView(O.SCROLL_BAR_DIR.HORIZONTAL,t)}}onMouseup(){this.isMousedown=!1,this.reset()}updateMindMapView(e,t){let n=this.calculationScrollbar(),r=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),a=this.mindMap.renderer.root.group.rbox(),o=this.mindMap.renderer.layout.getRootCenterOffset(a.width,a.height);if(e===O.SCROLL_BAR_DIR.VERTICAL){let e=t;e<=0&&(e=0);let s=(100-n.vertical.height)/100*this.scrollbarWrapSize.height;e>=s&&(e=s);let c=e/this.scrollbarWrapSize.height*100,l=-c/100*this.chartHeight,u=a.y-i.y,d=this.mindMap.height/2,f=l+u-d*r.scaleY+d-o.y*r.scaleY+(this.mindMap.height-this.mindMap.initHeight)/2*r.scaleY;this.mindMap.view.translateYTo(f),this.emitEvent({horizontal:n.horizontal,vertical:{top:c,height:n.vertical.height}})}else{let e=t;e<=0&&(e=0);let s=(100-n.horizontal.width)/100*this.scrollbarWrapSize.width;e>=s&&(e=s);let c=e/this.scrollbarWrapSize.width*100,l=-c/100*this.chartWidth,u=a.x-i.x,d=this.mindMap.width/2,f=l+u-d*r.scaleX+d-o.x*r.scaleX+(this.mindMap.width-this.mindMap.initWidth)/2*r.scaleX;this.mindMap.view.translateXTo(f),this.emitEvent({vertical:n.vertical,horizontal:{left:c,width:n.horizontal.width}})}}onClick(e,t){let n=0;n=t===O.SCROLL_BAR_DIR.VERTICAL?e.clientY-e.currentTarget.getBoundingClientRect().top:e.clientX-e.currentTarget.getBoundingClientRect().left,this.updateMindMapView(t,n)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},Hd.instanceName=`scrollbar`})),Wd=g({default:()=>Gd}),Gd,Kd=m((()=>{M(),Gd=class{constructor(e){this.mindMap=e.mindMap,this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.startViewPos={x:0,y:0},this.currentState=null}calculationMiniMap(e,t){let{svg:n,rect:r,origWidth:i,origHeight:a,scaleX:o,scaleY:s}=this.mindMap.getSvgData({ignoreWatermark:!0}),c=this.mindMap.elRect;r.x-=c.left,r.x2-=c.left,r.y-=c.top,r.y2-=c.top;let l=e/t,u=0,d=0;l>r.ratio?(d=t,u=r.ratio*d):(u=e,d=u/r.ratio);let f=u/r.width,p=(e-u)/2,m=(t-d)/2,h=r.width*o,g=r.height*s,_=(h-r.width)/2,v=(g-r.height)/2,y=r.x-_,b=r.x2+_,x=r.y-v,S=r.y2+v,C={left:0,top:0,right:0,bottom:0};C.left=Math.max(0,-y/h*u)+p,C.right=Math.max(0,(b-i)/h*u)+p,C.top=Math.max(0,-x/g*d)+m,C.bottom=Math.max(0,(S-a)/g*d)+m,C.top>m+d&&(C.top=m+d),C.left>p+u&&(C.left=p+u),Object.keys(C).forEach(e=>{C[e]=C[e]+`px`}),this.removeNodeContent(n);let w=n.svg();return this.currentState={viewBoxStyle:{...C},miniMapBoxScale:f,miniMapBoxLeft:p,miniMapBoxTop:m},{getImgUrl:async e=>{e(await this.mindMap.doExport.fixSvgStrAndToBlob(w))},svgHTML:w,viewBoxStyle:C,miniMapBoxScale:f,miniMapBoxLeft:p,miniMapBoxTop:m}}removeNodeContent(e){if(e.hasClass(`smm-node`)){let t=e.findOne(`.smm-node-shape`),n=t.attr(`fill`);(rs(n)||is(n))&&t.attr(`fill`,as(this.mindMap.themeConfig)),e.clear(),e.add(t);return}let t=e.children();t&&t.length>0&&t.forEach(e=>{this.removeNodeContent(e)})}onMousedown(e){this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};let t=this.mindMap.view.getTransformData();this.startViewPos={x:t.state.x,y:t.state.y}}onMousemove(e,t=5){if(!this.isMousedown||this.isViewBoxMousedown)return;let n=e.clientX-this.mousedownPos.x,r=e.clientY-this.mousedownPos.y;this.mindMap.view.translateXTo(n*t+this.startViewPos.x),this.mindMap.view.translateYTo(r*t+this.startViewPos.y)}onMouseup(){this.isMousedown=!1,this.isViewBoxMousedown=!1}onViewBoxMousedown(e){this.isViewBoxMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};let t=this.mindMap.view.getTransformData();this.startViewPos={x:t.state.x,y:t.state.y}}onViewBoxMousemove(e){if(!this.isViewBoxMousedown||!this.currentState||this.isMousedown)return;let t=e.clientX-this.mousedownPos.x,n=e.clientY-this.mousedownPos.y,{viewBoxStyle:r,miniMapBoxScale:i,miniMapBoxLeft:a,miniMapBoxTop:o}=this.currentState,s=Math.max(a,Number.parseFloat(r.left)+t),c=Math.max(a,Number.parseFloat(r.right)-t),l=Math.max(o,Number.parseFloat(r.top)+n),u=Math.max(o,Number.parseFloat(r.bottom)-n);this.mindMap.emit(`mini_map_view_box_position_change`,{left:s+`px`,right:c+`px`,top:l+`px`,bottom:u+`px`}),this.mindMap.view.translateXTo(-t/i+this.startViewPos.x),this.mindMap.view.translateYTo(-n/i+this.startViewPos.y)}},Gd.instanceName=`miniMap`})),qd,Jd,Yd=m((()=>{M(),qd=e=>{e=hs(e);let t={},n={};e.forEach(e=>{let r=e.parent;if(r){let i=r.uid;n[i]=r;let a={node:e,index:e.getIndexInBrothers()};t[i]?t[i].find(e=>e.index===a.index)||t[i].push(a):t[i]=[a]}});let r=[];return Object.keys(t).forEach(e=>{let i=t[e],a=n[e];if(i.length>1){let e=i.map(e=>e.index).sort((e,t)=>e-t),t=e[0],n=e[e.length-1],o=-1,s=-1;for(let i=t;i<=n;i++)e.includes(i)?(o===-1&&(o=i),s=i):(o!==-1&&s!==-1&&r.push({node:a,range:[o,s]}),o=-1,s=-1);o!==-1&&s!==-1&&r.push({node:a,range:[o,s]})}else r.push({node:a,range:[i[0].index,i[0].index]})}),r},Jd=e=>{let t=e.children;if(!t||t.length<=0)return;let n=[],r={};return t.forEach((e,t)=>{let i=e.getData(`outerFrame`);if(!i)return;let a=i.groupId;a?(r[a]||(r[a]=[]),r[a].push({node:e,index:t})):n.push({nodeList:[e],range:[t,t]})}),Object.keys(r).forEach(e=>{let t=r[e];n.push({nodeList:t.map(e=>e.node),range:[t[0].index,t[t.length-1].index]})}),n}}));function Xd(e,t,n){let r=this.draw.group(),i=()=>{(!this.activeOuterFrame||this.activeOuterFrame.el!==e)&&this.setActiveOuterFrame(e,t,n,r)};return r.click(e=>{e.stopPropagation(),i()}),r.on(`dblclick`,e=>{e.stopPropagation(),i(),this.showEditTextBox(r)}),r}function Zd(e){this.mindMap.emit(`before_show_text_edit`),this.mindMap.keyCommand.addShortcut(`Enter`,()=>{this.hideEditTextBox()}),this.textEditNode||(this.textEditNode=document.createElement(`div`),this.textEditNode.className=cf,this.textEditNode.style.cssText=`
|
|
96
|
+
position: fixed;
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
background-color: #fff;
|
|
99
|
+
box-shadow: 0 0 20px rgba(0,0,0,.5);
|
|
100
|
+
outline: none;
|
|
101
|
+
word-break: break-all;
|
|
102
|
+
`,this.textEditNode.setAttribute(`contenteditable`,!0),this.textEditNode.addEventListener(`keyup`,e=>{e.stopPropagation()}),this.textEditNode.addEventListener(`click`,e=>{e.stopPropagation()}),(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.textEditNode));let{node:t,range:n}=this.activeOuterFrame,r=this.getStyle(this.getNodeRangeFirstNode(t,n)),[i,a,o,s]=r.textFillPadding,{defaultOuterFrameText:c,nodeTextEditZIndex:l}=this.mindMap.opt,u=this.mindMap.view.scale,d=this.getText(this.getNodeRangeFirstNode(t,n)),f=(d||c).split(/\n/gim);this.textEditNode.style.padding=`${i}px ${a}px ${o}px ${s}px`,this.textEditNode.style.fontFamily=r.fontFamily,this.textEditNode.style.fontSize=r.fontSize*u+`px`,this.textEditNode.style.fontWeight=r.fontWeight,this.textEditNode.style.fontStyle=r.fontStyle,this.textEditNode.style.lineHeight=f.length>1?r.lineHeight:`normal`,this.textEditNode.style.zIndex=l,this.textEditNode.innerHTML=f.join(`<br>`),this.textEditNode.style.display=`block`,this.updateTextEditBoxPos(e),this.setIsShowTextEdit(!0),d===``||d===c?ys(this.textEditNode):vs(this.textEditNode)}function Qd(e){this.showTextEdit=e,e?this.mindMap.keyCommand.stopCheckInSvg():this.mindMap.keyCommand.recoveryCheckInSvg()}function $d(){this.textEditNode&&(this.mindMap.opt.customInnerElsAppendTo||document.body).removeChild(this.textEditNode)}function ef(){this.hideEditTextBox()}function tf(e){let t=e.node.getBoundingClientRect();this.textEditNode&&(this.textEditNode.style.minWidth=`${t.width}px`,this.textEditNode.style.minHeight=`${t.height}px`,this.textEditNode.style.left=`${t.left}px`,this.textEditNode.style.top=`${t.top}px`)}function nf(){if(!this.showTextEdit)return;let{el:e,textNode:t,node:n,range:r}=this.activeOuterFrame,i=jo(this.textEditNode.innerHTML);i=i===this.mindMap.opt.defaultOuterFrameText?``:i,this.updateActiveOuterFrame({text:i}),this.textEditNode.style.display=`none`,this.textEditNode.innerHTML=``,this.setIsShowTextEdit(!1),this.renderText(i,e,t,n,r),this.mindMap.emit(`hide_text_edit`)}function rf(e,t,n,r,i){if(!e)return;n.clear();let a=new Wa;n.add(a);let o=this.getStyle(this.getNodeRangeFirstNode(r,i)),[s,c,l,u]=o.textFillPadding,d=e.replace(/\n$/g,``).split(/\n/gim),f=new fo;d.forEach((e,t)=>{e===``&&(e=``);let n=new ao().text(e);n.y(o.fontSize*o.lineHeight*t),this.styleText(n,o),f.add(n)}),n.add(f);let{width:p,height:m}=n.bbox(),h=p+s+l,g=m+c+u;a.size(h,g).x(0).dy(0),this.styleTextShape(a,o);let _=0;switch(o.textAlign){case`left`:_=t.x();break;case`center`:_=t.x()+t.width()/2-h/2;break;case`right`:_=t.x()+t.width()-h;break;default:break}let v=t.y()-g;a.x(_),a.y(v),f.x(_+s),f.y(v+c)}function af(e,t){e.fill({color:t.textFill}).radius(t.textFillRadius)}function of(e,t){e.fill({color:t.color}).css({"font-family":t.fontFamily,"font-size":t.fontSize+`px`,"font-weight":t.fontWeight,"font-style":t.fontStyle})}function sf(e){let t=e.getData(`outerFrame`);return t&&t.text?t.text:``}var cf,lf,uf=m((()=>{bo(),M(),cf=`outer-frame-text-edit-warp`,lf={getText:sf,createText:Xd,styleTextShape:af,styleText:of,onScale:ef,showEditTextBox:Zd,setIsShowTextEdit:Qd,removeTextEditEl:$d,hideEditTextBox:nf,updateTextEditBoxPos:tf,renderText:rf}})),df=g({default:()=>mf}),ff,pf,mf,hf=m((()=>{M(),Yd(),uf(),ff={radius:5,strokeWidth:2,strokeColor:`#0984e3`,strokeDasharray:`5,5`,fill:`rgba(9,132,227,0.05)`,fontSize:14,fontFamily:`微软雅黑, Microsoft YaHei`,fontWeight:`normal`,fontStyle:`normal`,color:`#fff`,lineHeight:1.2,textFill:`#0984e3`,textFillRadius:5,textFillPadding:[5,5,5,5],textAlign:`left`},pf=`outer-frame-text-edit-warp`,mf=class{constructor(e={}){this.mindMap=e.mindMap,this.draw=null,this.createDrawContainer(),this.isNotRenderOuterFrames=!1,this.textNodeList=[],this.outerFrameElList=[],this.activeOuterFrame=null,this.textEditNode=null,this.showTextEdit=!1,Object.keys(lf).forEach(e=>{this[e]=lf[e].bind(this)}),this.mindMap.addEditNodeClass(pf),this.bindEvent()}createDrawContainer(){this.draw=this.mindMap.draw.group(),this.draw.addClass(`smm-outer-frame-container`),this.draw.back(),this.draw.forward()}bindEvent(){this.renderOuterFrames=this.renderOuterFrames.bind(this),this.mindMap.on(`node_tree_render_end`,this.renderOuterFrames),this.mindMap.on(`data_change`,this.renderOuterFrames),this.clearActiveOuterFrame=this.clearActiveOuterFrame.bind(this),this.mindMap.on(`draw_click`,this.clearActiveOuterFrame),this.mindMap.on(`node_click`,this.clearActiveOuterFrame),this.mindMap.on(`scale`,this.onScale),this.onBeforeDestroy=this.onBeforeDestroy.bind(this),this.mindMap.on(`beforeDestroy`,this.onBeforeDestroy),this.addOuterFrame=this.addOuterFrame.bind(this),this.mindMap.command.add(`ADD_OUTER_FRAME`,this.addOuterFrame),this.removeActiveOuterFrame=this.removeActiveOuterFrame.bind(this),this.mindMap.keyCommand.addShortcut(`Del|Backspace`,this.removeActiveOuterFrame)}unBindEvent(){this.mindMap.off(`node_tree_render_end`,this.renderOuterFrames),this.mindMap.off(`data_change`,this.renderOuterFrames),this.mindMap.off(`draw_click`,this.clearActiveOuterFrame),this.mindMap.off(`node_click`,this.clearActiveOuterFrame),this.mindMap.off(`scale`,this.onScale),this.mindMap.off(`beforeDestroy`,this.onBeforeDestroy),this.mindMap.command.remove(`ADD_OUTER_FRAME`,this.addOuterFrame),this.mindMap.keyCommand.removeShortcut(`Del|Backspace`,this.removeActiveOuterFrame)}onBeforeDestroy(){this.hideEditTextBox(),this.removeTextEditEl()}addOuterFrame(e,t={}){e=Ss(e);let n=this.mindMap.renderer.activeNodeList;if(n.length<=0&&e.length<=0)return;let r=e.length>0?e:n;r=r.filter(e=>!e.isRoot&&!e.isGeneralization),qd(r).forEach(({node:e,range:n})=>{let r=e.children.slice(n[0],n[1]+1),i=Jo();r.forEach(e=>{let n=e.getData(`outerFrame`);n=n?{...n,...t,groupId:i}:{...t,groupId:i},this.mindMap.execCommand(`SET_NODE_DATA`,e,{outerFrame:n})})})}getActiveOuterFrame(){return this.activeOuterFrame?{...this.activeOuterFrame}:null}removeActiveOuterFrame(){if(!this.activeOuterFrame)return;let{node:e,range:t}=this.activeOuterFrame;this.getRangeNodeList(e,t).forEach(e=>{this.mindMap.execCommand(`SET_NODE_DATA`,e,{outerFrame:null})}),this.mindMap.emit(`outer_frame_delete`)}removeActiveOuterFrameText(){this.updateActiveOuterFrame({text:``})}updateActiveOuterFrame(e={}){if(!this.activeOuterFrame)return;this.isNotRenderOuterFrames=!0;let{el:t,node:n,range:r}=this.activeOuterFrame,i=``;this.getRangeNodeList(n,r).forEach(t=>{let n={...t.getData(`outerFrame`),...e};i=n.strokeDasharray,this.mindMap.execCommand(`SET_NODE_DATA`,t,{outerFrame:n})}),t.cacheStyle={dasharray:i},this.updateOuterFrameStyle()}updateOuterFrameStyle(){let{el:e,node:t,range:n,textNode:r}=this.activeOuterFrame,i=this.getNodeRangeFirstNode(t,n),a=this.getStyle(i);this.styleOuterFrame(e,{...a,strokeDasharray:`none`});let o=this.getText(i);this.renderText(o,e,r,t,n)}getRangeNodeList(e,t){return e.children.slice(t[0],t[1]+1).filter(e=>e.getData(`outerFrame`))}getNodeRangeFirstNode(e,t){return e.children[t[0]]}renderOuterFrames(){if(this.isNotRenderOuterFrames){this.isNotRenderOuterFrames=!1;return}this.clearActiveOuterFrame(),this.clearTextNodes(),this.clearOuterFrameElList();let e=this.mindMap.renderer.root;if(!e)return;let t=this.mindMap.draw.transform(),{outerFramePaddingX:n,outerFramePaddingY:r}=this.mindMap.opt;Do(e,null,e=>{if(!e)return;let i=Jd(e);i&&i.length>0&&i.forEach(({nodeList:i,range:a})=>{if(a[0]===-1||a[1]===-1)return;let{left:o,top:s,width:c,height:l}=Vs(i);if(!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(l))return;let u=this.createOuterFrameEl((o-n-this.mindMap.elRect.left-t.translateX)/t.scaleX,(s-r-this.mindMap.elRect.top-t.translateY)/t.scaleY,(c+n*2)/t.scaleX,(l+r*2)/t.scaleY,this.getStyle(i[0])),d=this.createText(u,e,a);this.textNodeList.push(d),this.renderText(this.getText(i[0]),u,d,e,a),u.on(`click`,t=>{t.stopPropagation(),this.setActiveOuterFrame(u,e,a,d)})})},()=>{},!0,0)}setActiveOuterFrame(e,t,n,r){this.mindMap.execCommand(`CLEAR_ACTIVE_NODE`),this.clearActiveOuterFrame(),this.activeOuterFrame={el:e,node:t,range:n,textNode:r},e.stroke({dasharray:`none`}),this.getText(this.getNodeRangeFirstNode(t,n))||this.renderText(this.mindMap.opt.defaultOuterFrameText,e,r,t,n),this.mindMap.emit(`outer_frame_active`,e,t,n)}clearActiveOuterFrame(){if(!this.activeOuterFrame)return;let{el:e,textNode:t,node:n,range:r}=this.activeOuterFrame;e.stroke({dasharray:e.cacheStyle.dasharray||ff.strokeDasharray}),this.hideEditTextBox(),this.getText(this.getNodeRangeFirstNode(n,r))||t.clear(),this.activeOuterFrame=null,this.mindMap.emit(`outer_frame_deactivate`)}getStyle(e){return{...ff,...e.getData(`outerFrame`)||{}}}createOuterFrameEl(e,t,n,r,i={}){let a=this.draw.rect().size(n,r).x(e).y(t);return this.styleOuterFrame(a,i),a.cacheStyle={dasharray:i.strokeDasharray},this.outerFrameElList.push(a),a}styleOuterFrame(e,t){e.radius(t.radius).stroke({width:t.strokeWidth,color:t.strokeColor,dasharray:t.strokeDasharray}).fill({color:t.fill})}clearTextNodes(){this.textNodeList.forEach(e=>{e.remove()})}clearOuterFrameElList(){this.outerFrameElList.forEach(e=>{e.remove()}),this.outerFrameElList=[],this.activeOuterFrame=null}beforePluginRemove(){this.mindMap.deleteEditNodeClass(pf),this.unBindEvent()}beforePluginDestroy(){this.mindMap.deleteEditNodeClass(pf),this.unBindEvent()}},mf.instanceName=`outerFrame`,mf.defaultStyle=ff})),gf=g({default:()=>vf}),_f,vf,yf=m((()=>{M(),_f=[`rgb(255, 213, 73)`,`rgb(255, 136, 126)`,`rgb(107, 225, 141)`,`rgb(151, 171, 255)`,`rgb(129, 220, 242)`,`rgb(255, 163, 125)`,`rgb(152, 132, 234)`],vf=class{constructor({mindMap:e}){this.mindMap=e}updateRainLinesConfig(e={}){let t=this.mindMap.opt.rainbowLinesConfig||{};t.open=!!e.open,t.colorsList=Array.isArray(e.colorsList)?e.colorsList:[],this.mindMap.opt.rainbowLinesConfig.open&&this.removeNodeLineColor(),this.mindMap.render()}removeNodeLineColor(){let e=this.mindMap.renderer.renderTree;e&&(Do(e,null,e=>{delete e.data.lineColor},null,!0),this.mindMap.command.addHistory())}getSecondLayerAncestor(e){if(e.layerIndex===0)return null;if(e.layerIndex===1)return e;{let t=e.parent;for(;t;){if(t.layerIndex===1)return t;t=t.parent}return null}}getColorsList(){let{rainbowLinesConfig:e}=this.mindMap.opt;return e&&Array.isArray(e.colorsList)&&e.colorsList.length>0?e.colorsList:[..._f]}getNodeColor(e){let{rainbowLinesConfig:t}=this.mindMap.opt;if(!t||!t.open)return``;let n=this.getSecondLayerAncestor(e);if(!n)return;let r=Cs(n),i=this.getColorsList();return i[r%i.length]}},vf.instanceName=`rainbowLines`})),bf=g({default:()=>xf}),xf,Sf=m((()=>{M(),xf=class{constructor({mindMap:e}){this.mindMap=e,this.isInPainter=!1,this.painterNode=null,this.bindEvent()}bindEvent(){this.painterOneNode=this.painterOneNode.bind(this),this.onEndPainter=this.onEndPainter.bind(this),this.mindMap.on(`node_click`,this.painterOneNode),this.mindMap.on(`draw_click`,this.onEndPainter)}unBindEvent(){this.mindMap.off(`node_click`,this.painterOneNode),this.mindMap.off(`draw_click`,this.onEndPainter)}startPainter(){if(this.mindMap.opt.readonly)return;let e=this.mindMap.renderer.activeNodeList;e.length<=0||(this.painterNode=e[0],this.isInPainter=!0,this.mindMap.emit(`painter_start`))}endPainter(){this.painterNode=null,this.isInPainter=!1}onEndPainter(){this.isInPainter&&(this.endPainter(),this.mindMap.emit(`painter_end`))}painterOneNode(e){if(!e||!this.isInPainter||!this.painterNode||!e||e.uid===this.painterNode.uid)return;let t={};this.mindMap.opt.onlyPainterNodeCustomStyles||(t={...this.painterNode.effectiveStyles});let n=this.painterNode.getData();Object.keys(n).forEach(e=>{fs(e)&&(t[e]=n[e])}),this.mindMap.renderer._handleRemoveCustomStyles(e.getData()),e.setStyles(t)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},xf.instanceName=`painter`})),Cf=g({default:()=>wf}),wf,Tf=m((()=>{M(),tu(),wt(),wf=class{constructor({mindMap:e}){this.mindMap=e,this.isSearching=!1,this.searchText=``,this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isJumpNext=!1,this.bindEvent()}bindEvent(){this.onDataChange=this.onDataChange.bind(this),this.onModeChange=this.onModeChange.bind(this),this.mindMap.on(`data_change`,this.onDataChange),this.mindMap.on(`mode_change`,this.onModeChange)}unBindEvent(){this.mindMap.off(`data_change`,this.onDataChange),this.mindMap.off(`mode_change`,this.onModeChange)}onDataChange(){if(this.isJumpNext){this.isJumpNext=!1,this.search(this.searchText);return}if(this.notResetSearchText){this.notResetSearchText=!1;return}this.searchText=``}onModeChange(e){e!==O.MODE.READONLY&&this.isSearching&&this.matchNodeList[this.currentIndex]&&this.matchNodeList[this.currentIndex].closeHighlight()}search(e,t=()=>{}){if(Qo(e))return this.endSearch();e=String(e),this.isSearching=!0,this.searchText===e?this.searchNext(t):(this.searchText=e,this.doSearch(),this.searchNext(t)),this.emitEvent()}updateMatchNodeList(e){this.matchNodeList=e,this.mindMap.emit(`search_match_node_list_change`,e)}endSearch(){this.isSearching&&(this.mindMap.opt.readonly&&this.matchNodeList[this.currentIndex]&&this.matchNodeList[this.currentIndex].closeHighlight(),this.searchText=``,this.updateMatchNodeList([]),this.currentIndex=-1,this.notResetSearchText=!1,this.isSearching=!1,this.emitEvent())}doSearch(){this.clearHighlightOnReadonly(),this.updateMatchNodeList([]),this.currentIndex=-1;let{isOnlySearchCurrentRenderNodes:e}=this.mindMap.opt,t=e?this.mindMap.renderer.root:this.mindMap.renderer.renderTree;if(!t)return;let n=[];Oo(t,t=>{let{richText:r,text:i,generalization:a}=e?t.getData():t.data;r&&(i=Go(i)),i.includes(this.searchText)&&n.push(t),Ws({generalization:a}).forEach(t=>{let{richText:r,text:i,uid:a}=t;e&&!this.mindMap.renderer.findNodeByUid(a)||(r&&(i=Go(i)),i.includes(this.searchText)&&n.push({data:t}))})}),this.updateMatchNodeList(n)}isNodeInstance(e){return e instanceof eu}searchNext(e,t){if(!this.isSearching||this.matchNodeList.length<=0)return;t!==void 0&&Number.isInteger(t)&&t>=0&&t<this.matchNodeList.length?this.currentIndex=t:this.currentIndex<this.matchNodeList.length-1?this.currentIndex++:this.currentIndex=0;let{readonly:n}=this.mindMap.opt;this.clearHighlightOnReadonly();let r=this.matchNodeList[this.currentIndex];this.notResetSearchText=!0;let i=this.isNodeInstance(r)?r.getData(`uid`):r.data.uid;if(!i){e();return}let a=this.mindMap.renderer.findNodeByUid(i);this.mindMap.execCommand(`GO_TARGET_NODE`,i,t=>{this.isNodeInstance(r)||(this.matchNodeList[this.currentIndex]=t,this.updateMatchNodeList(this.matchNodeList)),e(),n&&t.highlight(),a&&(this.notResetSearchText=!1)})}clearHighlightOnReadonly(){let{readonly:e}=this.mindMap.opt;e&&this.matchNodeList.forEach(e=>{this.isNodeInstance(e)&&e.closeHighlight()})}jump(e,t=()=>{}){this.searchNext(t,e)}replace(e,t=!1){if(e==null||!this.isSearching||this.matchNodeList.length<=0)return;this.isJumpNext=t,e=String(e);let n=this.matchNodeList[this.currentIndex];if(!n)return;let r=e.includes(this.searchText),i=this.getReplacedText(n,this.searchText,e);if(this.notResetSearchText=!0,n.setText(i,n.getData(`richText`)),r){this.updateMatchNodeList(this.matchNodeList);return}let a=this.matchNodeList.filter(e=>n!==e);this.updateMatchNodeList(a),this.currentIndex>this.matchNodeList.length-1?this.currentIndex=-1:this.currentIndex--,this.emitEvent()}replaceAll(e){if(e==null||!this.isSearching||this.matchNodeList.length<=0)return;e=String(e);let t=e.includes(this.searchText);this.notResetSearchText=!0,this.matchNodeList.forEach(t=>{let n=this.getReplacedText(t,this.searchText,e);if(this.isNodeInstance(t)){let e={text:n};this.mindMap.renderer.setNodeDataRender(t,e,!0)}else t.data.text=n}),this.mindMap.render(),this.mindMap.command.addHistory(),t?this.updateMatchNodeList(this.matchNodeList):this.endSearch()}getReplacedText(e,t,n){let{richText:r,text:i}=this.isNodeInstance(e)?e.getData():e.data;return r?ns(i,t,n):i.replace(new RegExp(t,`g`),n)}emitEvent(){this.mindMap.emit(`search_info_change`,{currentIndex:this.currentIndex,total:this.matchNodeList.length})}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},wf.instanceName=`search`})),Ef=g({default:()=>Df}),Df,Of=m((()=>{M(),wc(),Df=class{constructor({mindMap:e}){this.mindMap=e,this.handleEl=null,this.isShowHandleEl=!1,this.node=null,this.img=null,this.rect=null,this.isMousedown=!1,this.mousedownDrawTransform=null,this.mousedownOffset={x:0,y:0},this.currentImgWidth=0,this.currentImgHeight=0,this.isAdjusted=!1,this.bindEvent()}bindEvent(){this.onNodeImgMouseleave=this.onNodeImgMouseleave.bind(this),this.onNodeImgMousemove=this.onNodeImgMousemove.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onRenderEnd=this.onRenderEnd.bind(this),this.onScale=this.onScale.bind(this),this.mindMap.on(`node_img_mouseleave`,this.onNodeImgMouseleave),this.mindMap.on(`node_img_mousemove`,this.onNodeImgMousemove),this.mindMap.on(`mousemove`,this.onMousemove),this.mindMap.on(`mouseup`,this.onMouseup),this.mindMap.on(`node_mouseup`,this.onMouseup),this.mindMap.on(`node_tree_render_end`,this.onRenderEnd),this.mindMap.on(`scale`,this.onScale)}unBindEvent(){this.mindMap.off(`node_img_mouseleave`,this.onNodeImgMouseleave),this.mindMap.off(`node_img_mousemove`,this.onNodeImgMousemove),this.mindMap.off(`mousemove`,this.onMousemove),this.mindMap.off(`mouseup`,this.onMouseup),this.mindMap.off(`node_mouseup`,this.onMouseup),this.mindMap.off(`node_tree_render_end`,this.onRenderEnd),this.mindMap.off(`scale`,this.onScale)}onScale(){this.node&&this.img&&this.isShowHandleEl&&(this.rect=this.img.rbox(),this.setHandleElRect())}onNodeImgMousemove(e,t){this.isMousedown||this.isAdjusted||this.mindMap.opt.readonly||this.node&&this.node.uid===e.uid&&this.isShowHandleEl||(this.node=e,this.img=t,this.rect=this.img.rbox(),this.showHandleEl())}onNodeImgMouseleave(){this.isMousedown||this.hideHandleEl()}hideNodeImage(){this.img&&this.img.hide()}showNodeImage(){this.img&&this.img.show()}showHandleEl(){this.isShowHandleEl||=(this.handleEl||this.createResizeBtnEl(),this.setHandleElRect(),this.handleEl.style.display=`block`,!0)}hideHandleEl(){this.isShowHandleEl&&(this.isShowHandleEl=!1,this.handleEl.style.display=`none`,this.handleEl.style.backgroundImage=``,this.handleEl.style.width=0,this.handleEl.style.height=0,this.handleEl.style.left=0,this.handleEl.style.top=0)}setHandleElRect(){let{width:e,height:t,x:n,y:r}=this.rect;this.handleEl.style.left=`${n}px`,this.handleEl.style.top=`${r}px`,this.currentImgWidth=e,this.currentImgHeight=t,this.updateHandleElSize()}updateHandleElSize(){this.handleEl.style.width=`${this.currentImgWidth}px`,this.handleEl.style.height=`${this.currentImgHeight}px`}createResizeBtnEl(){let{imgResizeBtnSize:e,customResizeBtnInnerHTML:t,customDeleteBtnInnerHTML:n}=this.mindMap.opt;this.handleEl=document.createElement(`div`),this.handleEl.style.cssText=`
|
|
103
|
+
pointer-events: none;
|
|
104
|
+
position: fixed;
|
|
105
|
+
display:none;
|
|
106
|
+
background-size: cover;
|
|
107
|
+
`,this.handleEl.className=`node-img-handle`;let r=document.createElement(`div`);r.innerHTML=t||Cc.imgAdjust,r.style.cssText=`
|
|
108
|
+
position: absolute;
|
|
109
|
+
right: 0;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
pointer-events: auto;
|
|
112
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
113
|
+
width: ${e}px;
|
|
114
|
+
height: ${e}px;
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
align-items: center;
|
|
118
|
+
cursor: nwse-resize;
|
|
119
|
+
`,r.className=`node-image-resize`,r.addEventListener(`mouseenter`,()=>{this.showHandleEl()}),r.addEventListener(`mouseleave`,()=>{this.isMousedown||this.hideHandleEl()}),r.addEventListener(`mousedown`,e=>{e.stopPropagation(),e.preventDefault(),this.onMousedown(e)}),r.addEventListener(`mouseup`,e=>{setTimeout(()=>{this.hideHandleEl(),this.isAdjusted=!1},0)}),r.addEventListener(`click`,e=>{e.stopPropagation()}),this.handleEl.appendChild(r);let i=document.createElement(`div`);this.handleEl.prepend(i),i.className=`node-image-remove`,i.innerHTML=n||Cc.remove,i.style.cssText=`
|
|
120
|
+
position: absolute;
|
|
121
|
+
right: 0;top:0;color:#fff;
|
|
122
|
+
pointer-events: auto;
|
|
123
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
124
|
+
width: ${e}px;
|
|
125
|
+
height: ${e}px;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
align-items: center;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
`,i.addEventListener(`mouseenter`,e=>{this.showHandleEl()}),i.addEventListener(`mouseleave`,e=>{this.isMousedown||this.hideHandleEl()}),i.addEventListener(`click`,async e=>{let t=!1;typeof this.mindMap.opt.beforeDeleteNodeImg==`function`&&(t=await this.mindMap.opt.beforeDeleteNodeImg(this.node)),t||(this.mindMap.execCommand(`SET_NODE_IMAGE`,this.node,{url:null}),this.mindMap.emit(`delete_node_img_from_delete_btn`,this.node))}),(this.mindMap.opt.customInnerElsAppendTo||document.body).appendChild(this.handleEl)}onMousedown(e){this.mindMap.emit(`node_img_adjust_btn_mousedown`,this.node),this.isMousedown=!0,this.mousedownDrawTransform=this.mindMap.draw.transform(),this.hideNodeImage(),this.mousedownOffset.x=e.clientX-this.rect.x2,this.mousedownOffset.y=e.clientY-this.rect.y2,this.handleEl.style.backgroundImage=`url(${this.node.getData(`image`)})`}onMousemove(e){if(!this.isMousedown)return;e.preventDefault();let{scaleX:t,scaleY:n}=this.mousedownDrawTransform,{width:r,height:i}=this.node.getData(`imageSize`),{minImgResizeWidth:a,minImgResizeHeight:o,maxImgResizeWidthInheritTheme:s,maxImgResizeWidth:c,maxImgResizeHeight:l}=this.mindMap.opt,u=a/o,d=r/i;u>d?o=a/d:a=o*d;let f,p;s?(f=this.mindMap.getThemeConfig(`imgMaxWidth`),p=this.mindMap.getThemeConfig(`imgMaxHeight`)):(f=c,p=l),f*=t,p*=n;let m=Math.abs(e.clientX-this.rect.x-this.mousedownOffset.x),h=Math.abs(e.clientY-this.rect.y-this.mousedownOffset.y);m<a&&(m=a),h<o&&(h=o),m>f&&(m=f),h>p&&(h=p);let[g,_]=ko(r,i,m,h);this.currentImgWidth=g,this.currentImgHeight=_,this.updateHandleElSize()}onMouseup(){if(!this.isMousedown)return;this.showNodeImage(),this.hideHandleEl();let{image:e,imageTitle:t}=this.node.getData(),{scaleX:n,scaleY:r}=this.mousedownDrawTransform,i=this.currentImgWidth/n,a=this.currentImgHeight/r;(Math.abs(i-this.rect.width)>1||Math.abs(a-this.rect.height)>1)&&(this.mindMap.execCommand(`SET_NODE_IMAGE`,this.node,{url:e,title:t,width:i,height:a,custom:!0}),this.isAdjusted=!0),this.isMousedown=!1,this.mousedownDrawTransform=null,this.mousedownOffset.x=0,this.mousedownOffset.y=0}onRenderEnd(){if(!this.isAdjusted){this.hideHandleEl();return}this.isAdjusted=!1}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}},Df.instanceName=`nodeImgAdjust`})),kf=g({default:()=>jf}),Af,jf,Mf=m((()=>{bo(),M(),Af=v(jt()),jf=class{constructor(e={}){this.mindMap=e.mindMap,this.lineSpacing=0,this.textSpacing=0,this.angle=0,this.text=``,this.textStyle={},this.watermarkDraw=null,this.isInExport=!1,this.maxLong=this.getMaxLong(),this.updateWatermark(this.mindMap.opt.watermarkConfig||{}),this.bindEvent()}getMaxLong(){return Math.sqrt(this.mindMap.width**2+this.mindMap.height**2)}bindEvent(){this.onResize=this.onResize.bind(this),this.mindMap.on(`resize`,this.onResize)}unBindEvent(){this.mindMap.off(`resize`,this.onResize)}onResize(){this.maxLong=this.getMaxLong(),this.draw()}createContainer(){this.watermarkDraw||(this.watermarkDraw=new fo().css({"pointer-events":`none`,"user-select":`none`}).addClass(`smm-water-mark-container`),this.updateLayer())}updateLayer(){if(!this.watermarkDraw)return;let{belowNode:e}=this.mindMap.opt.watermarkConfig;e?this.watermarkDraw.insertBefore(this.mindMap.draw):this.mindMap.svg.add(this.watermarkDraw)}removeContainer(){this.watermarkDraw&&=(this.watermarkDraw.remove(),null)}hasWatermark(){return!!this.text.trim()}handleConfig({text:e,lineSpacing:t,textSpacing:n,angle:r,textStyle:i}){this.text=e===void 0?``:String(e).trim(),this.lineSpacing=typeof t==`number`&&t>0?t:100,this.textSpacing=typeof n==`number`&&n>0?n:100,this.angle=typeof r==`number`&&r>=0&&r<=90?r:30,this.textStyle=Object.assign(this.textStyle,i||{})}clear(){this.watermarkDraw&&this.watermarkDraw.clear()}draw(){this.clear();let{onlyExport:e}=this.mindMap.opt.watermarkConfig;if(e&&!this.isInExport)return;if(!this.hasWatermark()){this.removeContainer();return}this.createContainer();let t=0;for(;t<this.mindMap.width;)this.drawText(t),t+=this.lineSpacing/Math.sin(Bo(this.angle));let n=this.lineSpacing/Math.cos(Bo(this.angle))||this.lineSpacing,r=n;for(;r<this.mindMap.height;)this.drawText(0,r),r+=n}drawText(e,t){let n=Math.min(this.maxLong,(this.mindMap.width-e)/Math.cos(Bo(this.angle))),r=new fo,i=null,a=0,o=-1;for(;a<n;){let e=new ao().text(this.text);r.add(e),e.transform({translateX:a}),this.setTextStyle(e),i=r.bbox(),o===-1&&(o=i.height),a=i.width+this.textSpacing}let s={rotate:this.angle,origin:`top left`,translateX:e,translateY:o};t!==void 0&&(s.translateY=t+o),r.transform(s),this.watermarkDraw.add(r)}setTextStyle(e){Object.keys(this.textStyle).forEach(t=>{let n=this.textStyle[t];t===`color`?e.fill(n):e.css(Vo(t),n)})}updateWatermark(e){this.mindMap.opt.watermarkConfig=(0,Af.default)(this.mindMap.opt.watermarkConfig,e),this.updateLayer(),this.handleConfig(e),this.draw()}beforePluginRemove(){this.unBindEvent(),this.removeContainer()}beforePluginDestroy(){this.unBindEvent(),this.removeContainer()}},jf.instanceName=`watermark`}));function Nf(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Pf(e){return e.default===void 0?Nf(Array.isArray(e.type)?e.type[0]:e.type):e.default}function Ff(e,t,n,r){var i=n[t];e[t]=i===void 0?Pf(r):r.processor?r.processor(i):i}function If(e){for(var t=0;t<Bp.length;t++)for(var n=Bp[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}function Lf(e){for(var t=0;t<Vp.length;t+=2)if(e>=Vp[t]&&e<=Vp[t+1])return!0;return!1}function Rf(e){return`toText`in e}function zf(e){if(e instanceof gm)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Bf(e){if(e instanceof fm)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}function Vf(e,t){xm[e]=t}function Hf(e,t,n){if(!xm[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=xm[t][r];if(!i&&e[0]in Cm&&(r=Cm[e[0]].charCodeAt(0),i=xm[t][r]),!i&&n===`text`&&Lf(r)&&(i=xm[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Uf(e){var t=e>=5?0:e>=3?1:2;if(!wm[t]){var n=wm[t]={cssEmPerMu:Sm.quad[t]/18};for(var r in Sm)Sm.hasOwnProperty(r)&&(n[r]=Sm[r][t])}return wm[t]}function N(e,t,n,r,i,a){Tm[e][i]={font:t,group:n,replace:r},a&&r&&(Tm[e][r]=Tm[e][i])}function P(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)Ih[n[c]]=s;t&&(a&&(Lh[t]=a),o&&(Rh[t]=o))}function Wf(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;P({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}function Gf(e,t){var n=Y([`base`],e,t),r=Y([`strut`]);return r.style.height=z(n.height+n.depth),n.depth&&(r.style.verticalAlign=z(-n.depth)),n.children.unshift(r),n}function Kf(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=Gh(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(Gf(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(Gf(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(Gf(o,t));var l;n?(l=Gf(Gh(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=Y([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=z(u.height+u.depth),u.depth&&(d.style.verticalAlign=z(-u.depth))}return u}function qf(e){return new tm(e)}function Jf(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof Qh&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof Qh&&n.text===`,`}else return!1}function Yf(e,t,n,r,i){var a=og(e,n),o=a.length===1&&a[0]instanceof X&&tg.has(a[0].type)?a[0]:new X(`mrow`,a),s=new X(`annotation`,[new Qh(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new X(`math`,[new X(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),Y([i?`katex`:`katex-mathml`],[c])}function Xf(e){return e in Cg}function F(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Zf(e){var t=Qf(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Qf(e){return e&&(e.type===`atom`||wg.hasOwnProperty(e.type))?e:null}function $f(e,t){var n=Gh(e.body,t,!0);return Y([e.mclass],n,t)}function ep(e,t){var n,r=og(e.body,t);return e.mclass===`minner`?n=new X(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new X(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new X(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}function tp(e,t,n){var r=jg[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function np(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new L(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=Mg(),c=0;c<o.length;c++)if(!Ng(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=Zf(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l))if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(Pg(o[p],l)){f=!1,c=p;break}if(Ng(o[p]))throw new L(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new L(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new L(`Expected one of "<>AV=|." after @`,o[c]);var m={type:`styling`,body:[tp(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=Mg()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}function rp(e){return`isMiddle`in e}function ip(e,t){var n=Qf(e);if(n&&__.has(n.text))return n;throw n?new L(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new L(`Invalid delimiter type '`+e.type+`'`,e)}function ap(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}function op(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)b_[n[c]]=s;a&&(Lh[t]=a),o&&(Rh[t]=o)}function I(e,t){x_[e]=t}function sp(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}function cp(e){if(!e.includes(`ed`))return!e.includes(`*`)}function lp(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new L(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new C_(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(sp(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new L(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(C===`\\\\`){e.consume();var w=void 0;e.gullet.future().text!==` `&&(w=e.parseSizeGroup(!0)),g.push(w?w.value:null),b(),_.push(sp(e)),m=[],h.push(m),y()}else throw new L(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function up(e){return e.slice(0,1)===`d`?`display`:`text`}function dp(e,t,n){for(var r=Gh(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return Sh(r)}function fp(e){return e in $_}var L,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,R,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,z,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,B,V,H,U,Em,W,Dm,Om,G,km,Am,jm,K,Mm,q,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,J,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,Y,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,X,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_,E_,D_,O_,k_,A_,j_,M_,N_,P_,F_,I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_,Y_,X_,Z_,Q_,$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv,fv,pv,mv,hv,gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv,Gv,Kv=m((()=>{for(L=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},pp=/([A-Z])/g,mp=e=>e.replace(pp,`-$1`).toLowerCase(),hp={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},gp=/[&><"']/g,_p=e=>String(e).replace(gp,e=>hp[e]),vp=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?vp(e.body[0]):e:e.type===`font`?vp(e.body):e,yp=new Set([`mathord`,`textord`,`atom`]),bp=e=>yp.has(vp(e).type),xp=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Sp={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:e=>`#`+e},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:(e,t)=>(t.push(e),t)},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:e=>Math.max(0,e),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:e=>Math.max(0,e),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:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}},Cp=class{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||={};for(var t of Object.keys(Sp)){var n=Sp[t];n&&Ff(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 L(`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=xp(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},wp=class{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 Np[Pp[this.id]]}sub(){return Np[Fp[this.id]]}fracNum(){return Np[Ip[this.id]]}fracDen(){return Np[Lp[this.id]]}cramp(){return Np[Rp[this.id]]}text(){return Np[zp[this.id]]}isTight(){return this.size>=2}},Tp=0,Ep=1,Dp=2,Op=3,kp=4,Ap=5,jp=6,Mp=7,Np=[new wp(Tp,0,!1),new wp(Ep,0,!0),new wp(Dp,1,!1),new wp(Op,1,!0),new wp(kp,2,!1),new wp(Ap,2,!0),new wp(jp,3,!1),new wp(Mp,3,!0)],Pp=[kp,Ap,kp,Ap,jp,Mp,jp,Mp],Fp=[Ap,Ap,Ap,Ap,Mp,Mp,Mp,Mp],Ip=[Dp,Op,kp,Ap,jp,Mp,jp,Mp],Lp=[Op,Op,Ap,Ap,Mp,Mp,Mp,Mp],Rp=[Ep,Ep,Op,Op,Ap,Ap,Mp,Mp],zp=[Tp,Ep,Dp,Op,Dp,Op,Dp,Op],R={DISPLAY:Np[Tp],TEXT:Np[Dp],SCRIPT:Np[kp],SCRIPTSCRIPT:Np[jp]},Bp=[{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]]}],Vp=[],Bp.forEach(e=>e.blocks.forEach(e=>Vp.push(...e))),Hp=e=>e+` `+e,Up=80,Wp=function(e,t){return`M95,`+(622+e+t)+`
|
|
131
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
132
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
133
|
+
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
|
|
134
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
135
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
136
|
+
l`+e/2.075+` -`+e+`
|
|
137
|
+
c5.3,-9.3,12,-14,20,-14
|
|
138
|
+
H400000v`+(40+e)+`H845.2724
|
|
139
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
140
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
141
|
+
M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Gp=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119
|
|
142
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
143
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
144
|
+
l`+e/2.084+` -`+e+`
|
|
145
|
+
c4.7,-7.3,11,-11,19,-11
|
|
146
|
+
H40000v`+(40+e)+`H1012.3
|
|
147
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
148
|
+
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
|
149
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
150
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
151
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Kp=function(e,t){return`M983 `+(10+e+t)+`
|
|
152
|
+
l`+e/3.13+` -`+e+`
|
|
153
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
|
154
|
+
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
|
155
|
+
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
|
156
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
157
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
158
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
159
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
160
|
+
M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},qp=function(e,t){return`M424,`+(2398+e+t)+`
|
|
161
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
162
|
+
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
163
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
164
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
165
|
+
l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000
|
|
166
|
+
v`+(40+e)+`H1014.6
|
|
167
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
168
|
+
c-2,6,-10,9,-24,9
|
|
169
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`
|
|
170
|
+
h400000v`+(40+e)+`h-400000z`},Jp=function(e,t){return`M473,`+(2713+e+t)+`
|
|
171
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`
|
|
172
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
|
173
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
174
|
+
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
|
175
|
+
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
|
176
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
177
|
+
606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Yp=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},Xp=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`
|
|
178
|
+
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
|
|
179
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
180
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
181
|
+
219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Zp=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Wp(t,Up);break;case`sqrtSize1`:r=Gp(t,Up);break;case`sqrtSize2`:r=Kp(t,Up);break;case`sqrtSize3`:r=qp(t,Up);break;case`sqrtSize4`:r=Jp(t,Up);break;case`sqrtTall`:r=Xp(t,Up,n)}return r},Qp=function(e,t){switch(e){case`⎜`:return Hp(`M291 0 H417 V`+t+` H291z`);case`∣`:return Hp(`M145 0 H188 V`+t+` H145z`);case`∥`:return Hp(`M145 0 H188 V`+t+` H145z`)+Hp(`M367 0 H410 V`+t+` H367z`);case`⎟`:return Hp(`M457 0 H583 V`+t+` H457z`);case`⎢`:return Hp(`M319 0 H403 V`+t+` H319z`);case`⎥`:return Hp(`M263 0 H347 V`+t+` H263z`);case`⎪`:return Hp(`M384 0 H504 V`+t+` H384z`);case`⏐`:return Hp(`M312 0 H355 V`+t+` H312z`);case`‖`:return Hp(`M257 0 H300 V`+t+` H257z`)+Hp(`M478 0 H521 V`+t+` H478z`);default:return``}},$p={doubleleftarrow:`M262 157
|
|
182
|
+
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
|
|
183
|
+
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
|
|
184
|
+
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
|
|
185
|
+
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
186
|
+
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
187
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
188
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
189
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
190
|
+
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
191
|
+
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
192
|
+
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
193
|
+
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
194
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
195
|
+
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
196
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
197
|
+
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
198
|
+
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
199
|
+
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
200
|
+
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
201
|
+
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
202
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
203
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
204
|
+
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
205
|
+
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
206
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
207
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
208
|
+
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
209
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
210
|
+
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
211
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
212
|
+
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
213
|
+
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
214
|
+
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
215
|
+
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
216
|
+
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
217
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
218
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
219
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
220
|
+
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
221
|
+
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
222
|
+
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
223
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
224
|
+
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
|
|
225
|
+
-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
|
|
226
|
+
-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
|
|
227
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Hp(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:Hp(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:Hp(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:Hp(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
228
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
229
|
+
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
|
|
230
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Hp(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334
|
|
231
|
+
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
|
|
232
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
233
|
+
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
|
|
234
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
235
|
+
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
236
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
237
|
+
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
238
|
+
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
239
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
240
|
+
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
241
|
+
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
242
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
243
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
244
|
+
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
245
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
246
|
+
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
247
|
+
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
248
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
249
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
250
|
+
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
251
|
+
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
252
|
+
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
253
|
+
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
254
|
+
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
255
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
256
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
257
|
+
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
258
|
+
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
259
|
+
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
260
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
261
|
+
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
262
|
+
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
263
|
+
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
264
|
+
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
265
|
+
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
266
|
+
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
267
|
+
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
268
|
+
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
269
|
+
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
270
|
+
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
271
|
+
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
272
|
+
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
273
|
+
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
274
|
+
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
275
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
276
|
+
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
|
|
277
|
+
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
|
|
278
|
+
-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
|
|
279
|
+
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Hp(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:Hp(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:Hp(`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
|
|
280
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
281
|
+
-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
|
|
282
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
283
|
+
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
284
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
285
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
286
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
287
|
+
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
288
|
+
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
289
|
+
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
290
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
291
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
292
|
+
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
293
|
+
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
294
|
+
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
295
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
296
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
297
|
+
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
298
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
299
|
+
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
300
|
+
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
301
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
302
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
303
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
304
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
305
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
306
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
307
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
308
|
+
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
309
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
310
|
+
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
311
|
+
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
312
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
313
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
314
|
+
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
315
|
+
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
316
|
+
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
317
|
+
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
318
|
+
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
319
|
+
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
320
|
+
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
321
|
+
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
322
|
+
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
323
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
324
|
+
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
325
|
+
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
326
|
+
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
327
|
+
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
328
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
329
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
330
|
+
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
331
|
+
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
332
|
+
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
333
|
+
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
334
|
+
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
335
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
336
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
337
|
+
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
338
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
339
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
340
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
341
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
342
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
343
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
344
|
+
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
345
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
346
|
+
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
347
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
348
|
+
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
349
|
+
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
350
|
+
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
351
|
+
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
352
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},em=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84
|
|
353
|
+
H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z
|
|
354
|
+
M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
355
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
356
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
357
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
358
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z
|
|
359
|
+
M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15
|
|
360
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
361
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z
|
|
362
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z
|
|
363
|
+
MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z
|
|
364
|
+
M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z
|
|
365
|
+
M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
|
366
|
+
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
|
367
|
+
-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
368
|
+
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
|
369
|
+
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
|
370
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
371
|
+
l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
372
|
+
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
|
373
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
374
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`
|
|
375
|
+
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
|
376
|
+
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
|
377
|
+
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
|
|
378
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
379
|
+
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
380
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},tm=class{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(Rf(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},nm={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},rm={ex:!0,em:!0,mu:!0},im=function(e){return typeof e!=`string`&&(e=e.unit),e in nm||e in rm||e===`ex`},am=function(e,t){var n;if(e.unit in nm)n=nm[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new L(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},z=function(e){return+e.toFixed(4)+`em`},om=function(e){return e.filter(e=>e).join(` `)},sm=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=mp(n)+`:`+r+`;`)}return t},cm=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)}},lm=function(e){var t=document.createElement(e);t.className=om(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},um=/[\s"'>/=\x00-\x1f]/,dm=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+_p(om(this.classes))+`"`);var n=sm(this.style);n&&(t+=` style="`+_p(n)+`"`);for(var r of Object.keys(this.attributes)){if(um.test(r))throw new L(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+_p(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},fm=class{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,cm.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return lm.call(this,`span`)}toMarkup(){return dm.call(this,`span`)}},pm=class{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,cm.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 lm.call(this,`a`)}toMarkup(){return dm.call(this,`a`)}},mm=class{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="`+_p(this.src)+`"`+(` alt="`+_p(this.alt)+`"`),t=sm(this.style);return t&&(e+=` style="`+_p(t)+`"`),e+=`'/>`,e}},hm={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},gm=class{constructor(e,t,n,r,i,a,o,s){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=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=If(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=hm[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=z(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=om(this.classes)),Object.keys(this.style).length>0&&(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+=_p(om(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+z(this.italic)+`;`),n+=sm(this.style),n&&(e=!0,t+=` style="`+_p(n)+`"`);var r=_p(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},_m=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+_p(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},vm=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,$p[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+_p(this.alternate)+`"/>`:`<path d="`+_p($p[this.pathName])+`"/>`}},ym=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+_p(this.attributes[t])+`"`;return e+=`/>`,e}},bm=e=>e instanceof fm||e instanceof pm||e instanceof tm,xm={"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]}},Sm={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]},Cm={Å:`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`},wm={},Tm={math:{},text:{}},B=`math`,V=`text`,H=`main`,U=`ams`,Em=`accent-token`,W=`bin`,Dm=`close`,Om=`inner`,G=`mathord`,km=`op-token`,Am=`open`,jm=`punct`,K=`rel`,Mm=`spacing`,q=`textord`,N(B,H,K,`≡`,`\\equiv`,!0),N(B,H,K,`≺`,`\\prec`,!0),N(B,H,K,`≻`,`\\succ`,!0),N(B,H,K,`∼`,`\\sim`,!0),N(B,H,K,`⊥`,`\\perp`),N(B,H,K,`⪯`,`\\preceq`,!0),N(B,H,K,`⪰`,`\\succeq`,!0),N(B,H,K,`≃`,`\\simeq`,!0),N(B,H,K,`∣`,`\\mid`,!0),N(B,H,K,`≪`,`\\ll`,!0),N(B,H,K,`≫`,`\\gg`,!0),N(B,H,K,`≍`,`\\asymp`,!0),N(B,H,K,`∥`,`\\parallel`),N(B,H,K,`⋈`,`\\bowtie`,!0),N(B,H,K,`⌣`,`\\smile`,!0),N(B,H,K,`⊑`,`\\sqsubseteq`,!0),N(B,H,K,`⊒`,`\\sqsupseteq`,!0),N(B,H,K,`≐`,`\\doteq`,!0),N(B,H,K,`⌢`,`\\frown`,!0),N(B,H,K,`∋`,`\\ni`,!0),N(B,H,K,`∝`,`\\propto`,!0),N(B,H,K,`⊢`,`\\vdash`,!0),N(B,H,K,`⊣`,`\\dashv`,!0),N(B,H,K,`∋`,`\\owns`),N(B,H,jm,`.`,`\\ldotp`),N(B,H,jm,`⋅`,`\\cdotp`),N(B,H,jm,`⋅`,`·`),N(V,H,q,`⋅`,`·`),N(B,H,q,`#`,`\\#`),N(V,H,q,`#`,`\\#`),N(B,H,q,`&`,`\\&`),N(V,H,q,`&`,`\\&`),N(B,H,q,`ℵ`,`\\aleph`,!0),N(B,H,q,`∀`,`\\forall`,!0),N(B,H,q,`ℏ`,`\\hbar`,!0),N(B,H,q,`∃`,`\\exists`,!0),N(B,H,q,`∇`,`\\nabla`,!0),N(B,H,q,`♭`,`\\flat`,!0),N(B,H,q,`ℓ`,`\\ell`,!0),N(B,H,q,`♮`,`\\natural`,!0),N(B,H,q,`♣`,`\\clubsuit`,!0),N(B,H,q,`℘`,`\\wp`,!0),N(B,H,q,`♯`,`\\sharp`,!0),N(B,H,q,`♢`,`\\diamondsuit`,!0),N(B,H,q,`ℜ`,`\\Re`,!0),N(B,H,q,`♡`,`\\heartsuit`,!0),N(B,H,q,`ℑ`,`\\Im`,!0),N(B,H,q,`♠`,`\\spadesuit`,!0),N(B,H,q,`§`,`\\S`,!0),N(V,H,q,`§`,`\\S`),N(B,H,q,`¶`,`\\P`,!0),N(V,H,q,`¶`,`\\P`),N(B,H,q,`†`,`\\dag`),N(V,H,q,`†`,`\\dag`),N(V,H,q,`†`,`\\textdagger`),N(B,H,q,`‡`,`\\ddag`),N(V,H,q,`‡`,`\\ddag`),N(V,H,q,`‡`,`\\textdaggerdbl`),N(B,H,Dm,`⎱`,`\\rmoustache`,!0),N(B,H,Am,`⎰`,`\\lmoustache`,!0),N(B,H,Dm,`⟯`,`\\rgroup`,!0),N(B,H,Am,`⟮`,`\\lgroup`,!0),N(B,H,W,`∓`,`\\mp`,!0),N(B,H,W,`⊖`,`\\ominus`,!0),N(B,H,W,`⊎`,`\\uplus`,!0),N(B,H,W,`⊓`,`\\sqcap`,!0),N(B,H,W,`∗`,`\\ast`),N(B,H,W,`⊔`,`\\sqcup`,!0),N(B,H,W,`◯`,`\\bigcirc`,!0),N(B,H,W,`∙`,`\\bullet`,!0),N(B,H,W,`‡`,`\\ddagger`),N(B,H,W,`≀`,`\\wr`,!0),N(B,H,W,`⨿`,`\\amalg`),N(B,H,W,`&`,`\\And`),N(B,H,K,`⟵`,`\\longleftarrow`,!0),N(B,H,K,`⇐`,`\\Leftarrow`,!0),N(B,H,K,`⟸`,`\\Longleftarrow`,!0),N(B,H,K,`⟶`,`\\longrightarrow`,!0),N(B,H,K,`⇒`,`\\Rightarrow`,!0),N(B,H,K,`⟹`,`\\Longrightarrow`,!0),N(B,H,K,`↔`,`\\leftrightarrow`,!0),N(B,H,K,`⟷`,`\\longleftrightarrow`,!0),N(B,H,K,`⇔`,`\\Leftrightarrow`,!0),N(B,H,K,`⟺`,`\\Longleftrightarrow`,!0),N(B,H,K,`↦`,`\\mapsto`,!0),N(B,H,K,`⟼`,`\\longmapsto`,!0),N(B,H,K,`↗`,`\\nearrow`,!0),N(B,H,K,`↩`,`\\hookleftarrow`,!0),N(B,H,K,`↪`,`\\hookrightarrow`,!0),N(B,H,K,`↘`,`\\searrow`,!0),N(B,H,K,`↼`,`\\leftharpoonup`,!0),N(B,H,K,`⇀`,`\\rightharpoonup`,!0),N(B,H,K,`↙`,`\\swarrow`,!0),N(B,H,K,`↽`,`\\leftharpoondown`,!0),N(B,H,K,`⇁`,`\\rightharpoondown`,!0),N(B,H,K,`↖`,`\\nwarrow`,!0),N(B,H,K,`⇌`,`\\rightleftharpoons`,!0),N(B,U,K,`≮`,`\\nless`,!0),N(B,U,K,``,`\\@nleqslant`),N(B,U,K,``,`\\@nleqq`),N(B,U,K,`⪇`,`\\lneq`,!0),N(B,U,K,`≨`,`\\lneqq`,!0),N(B,U,K,``,`\\@lvertneqq`),N(B,U,K,`⋦`,`\\lnsim`,!0),N(B,U,K,`⪉`,`\\lnapprox`,!0),N(B,U,K,`⊀`,`\\nprec`,!0),N(B,U,K,`⋠`,`\\npreceq`,!0),N(B,U,K,`⋨`,`\\precnsim`,!0),N(B,U,K,`⪹`,`\\precnapprox`,!0),N(B,U,K,`≁`,`\\nsim`,!0),N(B,U,K,``,`\\@nshortmid`),N(B,U,K,`∤`,`\\nmid`,!0),N(B,U,K,`⊬`,`\\nvdash`,!0),N(B,U,K,`⊭`,`\\nvDash`,!0),N(B,U,K,`⋪`,`\\ntriangleleft`),N(B,U,K,`⋬`,`\\ntrianglelefteq`,!0),N(B,U,K,`⊊`,`\\subsetneq`,!0),N(B,U,K,``,`\\@varsubsetneq`),N(B,U,K,`⫋`,`\\subsetneqq`,!0),N(B,U,K,``,`\\@varsubsetneqq`),N(B,U,K,`≯`,`\\ngtr`,!0),N(B,U,K,``,`\\@ngeqslant`),N(B,U,K,``,`\\@ngeqq`),N(B,U,K,`⪈`,`\\gneq`,!0),N(B,U,K,`≩`,`\\gneqq`,!0),N(B,U,K,``,`\\@gvertneqq`),N(B,U,K,`⋧`,`\\gnsim`,!0),N(B,U,K,`⪊`,`\\gnapprox`,!0),N(B,U,K,`⊁`,`\\nsucc`,!0),N(B,U,K,`⋡`,`\\nsucceq`,!0),N(B,U,K,`⋩`,`\\succnsim`,!0),N(B,U,K,`⪺`,`\\succnapprox`,!0),N(B,U,K,`≆`,`\\ncong`,!0),N(B,U,K,``,`\\@nshortparallel`),N(B,U,K,`∦`,`\\nparallel`,!0),N(B,U,K,`⊯`,`\\nVDash`,!0),N(B,U,K,`⋫`,`\\ntriangleright`),N(B,U,K,`⋭`,`\\ntrianglerighteq`,!0),N(B,U,K,``,`\\@nsupseteqq`),N(B,U,K,`⊋`,`\\supsetneq`,!0),N(B,U,K,``,`\\@varsupsetneq`),N(B,U,K,`⫌`,`\\supsetneqq`,!0),N(B,U,K,``,`\\@varsupsetneqq`),N(B,U,K,`⊮`,`\\nVdash`,!0),N(B,U,K,`⪵`,`\\precneqq`,!0),N(B,U,K,`⪶`,`\\succneqq`,!0),N(B,U,K,``,`\\@nsubseteqq`),N(B,U,W,`⊴`,`\\unlhd`),N(B,U,W,`⊵`,`\\unrhd`),N(B,U,K,`↚`,`\\nleftarrow`,!0),N(B,U,K,`↛`,`\\nrightarrow`,!0),N(B,U,K,`⇍`,`\\nLeftarrow`,!0),N(B,U,K,`⇏`,`\\nRightarrow`,!0),N(B,U,K,`↮`,`\\nleftrightarrow`,!0),N(B,U,K,`⇎`,`\\nLeftrightarrow`,!0),N(B,U,K,`△`,`\\vartriangle`),N(B,U,q,`ℏ`,`\\hslash`),N(B,U,q,`▽`,`\\triangledown`),N(B,U,q,`◊`,`\\lozenge`),N(B,U,q,`Ⓢ`,`\\circledS`),N(B,U,q,`®`,`\\circledR`),N(V,U,q,`®`,`\\circledR`),N(B,U,q,`∡`,`\\measuredangle`,!0),N(B,U,q,`∄`,`\\nexists`),N(B,U,q,`℧`,`\\mho`),N(B,U,q,`Ⅎ`,`\\Finv`,!0),N(B,U,q,`⅁`,`\\Game`,!0),N(B,U,q,`‵`,`\\backprime`),N(B,U,q,`▲`,`\\blacktriangle`),N(B,U,q,`▼`,`\\blacktriangledown`),N(B,U,q,`■`,`\\blacksquare`),N(B,U,q,`⧫`,`\\blacklozenge`),N(B,U,q,`★`,`\\bigstar`),N(B,U,q,`∢`,`\\sphericalangle`,!0),N(B,U,q,`∁`,`\\complement`,!0),N(B,U,q,`ð`,`\\eth`,!0),N(V,H,q,`ð`,`ð`),N(B,U,q,`╱`,`\\diagup`),N(B,U,q,`╲`,`\\diagdown`),N(B,U,q,`□`,`\\square`),N(B,U,q,`□`,`\\Box`),N(B,U,q,`◊`,`\\Diamond`),N(B,U,q,`¥`,`\\yen`,!0),N(V,U,q,`¥`,`\\yen`,!0),N(B,U,q,`✓`,`\\checkmark`,!0),N(V,U,q,`✓`,`\\checkmark`),N(B,U,q,`ℶ`,`\\beth`,!0),N(B,U,q,`ℸ`,`\\daleth`,!0),N(B,U,q,`ℷ`,`\\gimel`,!0),N(B,U,q,`ϝ`,`\\digamma`,!0),N(B,U,q,`ϰ`,`\\varkappa`),N(B,U,Am,`┌`,`\\@ulcorner`,!0),N(B,U,Dm,`┐`,`\\@urcorner`,!0),N(B,U,Am,`└`,`\\@llcorner`,!0),N(B,U,Dm,`┘`,`\\@lrcorner`,!0),N(B,U,K,`≦`,`\\leqq`,!0),N(B,U,K,`⩽`,`\\leqslant`,!0),N(B,U,K,`⪕`,`\\eqslantless`,!0),N(B,U,K,`≲`,`\\lesssim`,!0),N(B,U,K,`⪅`,`\\lessapprox`,!0),N(B,U,K,`≊`,`\\approxeq`,!0),N(B,U,W,`⋖`,`\\lessdot`),N(B,U,K,`⋘`,`\\lll`,!0),N(B,U,K,`≶`,`\\lessgtr`,!0),N(B,U,K,`⋚`,`\\lesseqgtr`,!0),N(B,U,K,`⪋`,`\\lesseqqgtr`,!0),N(B,U,K,`≑`,`\\doteqdot`),N(B,U,K,`≓`,`\\risingdotseq`,!0),N(B,U,K,`≒`,`\\fallingdotseq`,!0),N(B,U,K,`∽`,`\\backsim`,!0),N(B,U,K,`⋍`,`\\backsimeq`,!0),N(B,U,K,`⫅`,`\\subseteqq`,!0),N(B,U,K,`⋐`,`\\Subset`,!0),N(B,U,K,`⊏`,`\\sqsubset`,!0),N(B,U,K,`≼`,`\\preccurlyeq`,!0),N(B,U,K,`⋞`,`\\curlyeqprec`,!0),N(B,U,K,`≾`,`\\precsim`,!0),N(B,U,K,`⪷`,`\\precapprox`,!0),N(B,U,K,`⊲`,`\\vartriangleleft`),N(B,U,K,`⊴`,`\\trianglelefteq`),N(B,U,K,`⊨`,`\\vDash`,!0),N(B,U,K,`⊪`,`\\Vvdash`,!0),N(B,U,K,`⌣`,`\\smallsmile`),N(B,U,K,`⌢`,`\\smallfrown`),N(B,U,K,`≏`,`\\bumpeq`,!0),N(B,U,K,`≎`,`\\Bumpeq`,!0),N(B,U,K,`≧`,`\\geqq`,!0),N(B,U,K,`⩾`,`\\geqslant`,!0),N(B,U,K,`⪖`,`\\eqslantgtr`,!0),N(B,U,K,`≳`,`\\gtrsim`,!0),N(B,U,K,`⪆`,`\\gtrapprox`,!0),N(B,U,W,`⋗`,`\\gtrdot`),N(B,U,K,`⋙`,`\\ggg`,!0),N(B,U,K,`≷`,`\\gtrless`,!0),N(B,U,K,`⋛`,`\\gtreqless`,!0),N(B,U,K,`⪌`,`\\gtreqqless`,!0),N(B,U,K,`≖`,`\\eqcirc`,!0),N(B,U,K,`≗`,`\\circeq`,!0),N(B,U,K,`≜`,`\\triangleq`,!0),N(B,U,K,`∼`,`\\thicksim`),N(B,U,K,`≈`,`\\thickapprox`),N(B,U,K,`⫆`,`\\supseteqq`,!0),N(B,U,K,`⋑`,`\\Supset`,!0),N(B,U,K,`⊐`,`\\sqsupset`,!0),N(B,U,K,`≽`,`\\succcurlyeq`,!0),N(B,U,K,`⋟`,`\\curlyeqsucc`,!0),N(B,U,K,`≿`,`\\succsim`,!0),N(B,U,K,`⪸`,`\\succapprox`,!0),N(B,U,K,`⊳`,`\\vartriangleright`),N(B,U,K,`⊵`,`\\trianglerighteq`),N(B,U,K,`⊩`,`\\Vdash`,!0),N(B,U,K,`∣`,`\\shortmid`),N(B,U,K,`∥`,`\\shortparallel`),N(B,U,K,`≬`,`\\between`,!0),N(B,U,K,`⋔`,`\\pitchfork`,!0),N(B,U,K,`∝`,`\\varpropto`),N(B,U,K,`◀`,`\\blacktriangleleft`),N(B,U,K,`∴`,`\\therefore`,!0),N(B,U,K,`∍`,`\\backepsilon`),N(B,U,K,`▶`,`\\blacktriangleright`),N(B,U,K,`∵`,`\\because`,!0),N(B,U,K,`⋘`,`\\llless`),N(B,U,K,`⋙`,`\\gggtr`),N(B,U,W,`⊲`,`\\lhd`),N(B,U,W,`⊳`,`\\rhd`),N(B,U,K,`≂`,`\\eqsim`,!0),N(B,H,K,`⋈`,`\\Join`),N(B,U,K,`≑`,`\\Doteq`,!0),N(B,U,W,`∔`,`\\dotplus`,!0),N(B,U,W,`∖`,`\\smallsetminus`),N(B,U,W,`⋒`,`\\Cap`,!0),N(B,U,W,`⋓`,`\\Cup`,!0),N(B,U,W,`⩞`,`\\doublebarwedge`,!0),N(B,U,W,`⊟`,`\\boxminus`,!0),N(B,U,W,`⊞`,`\\boxplus`,!0),N(B,U,W,`⋇`,`\\divideontimes`,!0),N(B,U,W,`⋉`,`\\ltimes`,!0),N(B,U,W,`⋊`,`\\rtimes`,!0),N(B,U,W,`⋋`,`\\leftthreetimes`,!0),N(B,U,W,`⋌`,`\\rightthreetimes`,!0),N(B,U,W,`⋏`,`\\curlywedge`,!0),N(B,U,W,`⋎`,`\\curlyvee`,!0),N(B,U,W,`⊝`,`\\circleddash`,!0),N(B,U,W,`⊛`,`\\circledast`,!0),N(B,U,W,`⋅`,`\\centerdot`),N(B,U,W,`⊺`,`\\intercal`,!0),N(B,U,W,`⋒`,`\\doublecap`),N(B,U,W,`⋓`,`\\doublecup`),N(B,U,W,`⊠`,`\\boxtimes`,!0),N(B,U,K,`⇢`,`\\dashrightarrow`,!0),N(B,U,K,`⇠`,`\\dashleftarrow`,!0),N(B,U,K,`⇇`,`\\leftleftarrows`,!0),N(B,U,K,`⇆`,`\\leftrightarrows`,!0),N(B,U,K,`⇚`,`\\Lleftarrow`,!0),N(B,U,K,`↞`,`\\twoheadleftarrow`,!0),N(B,U,K,`↢`,`\\leftarrowtail`,!0),N(B,U,K,`↫`,`\\looparrowleft`,!0),N(B,U,K,`⇋`,`\\leftrightharpoons`,!0),N(B,U,K,`↶`,`\\curvearrowleft`,!0),N(B,U,K,`↺`,`\\circlearrowleft`,!0),N(B,U,K,`↰`,`\\Lsh`,!0),N(B,U,K,`⇈`,`\\upuparrows`,!0),N(B,U,K,`↿`,`\\upharpoonleft`,!0),N(B,U,K,`⇃`,`\\downharpoonleft`,!0),N(B,H,K,`⊶`,`\\origof`,!0),N(B,H,K,`⊷`,`\\imageof`,!0),N(B,U,K,`⊸`,`\\multimap`,!0),N(B,U,K,`↭`,`\\leftrightsquigarrow`,!0),N(B,U,K,`⇉`,`\\rightrightarrows`,!0),N(B,U,K,`⇄`,`\\rightleftarrows`,!0),N(B,U,K,`↠`,`\\twoheadrightarrow`,!0),N(B,U,K,`↣`,`\\rightarrowtail`,!0),N(B,U,K,`↬`,`\\looparrowright`,!0),N(B,U,K,`↷`,`\\curvearrowright`,!0),N(B,U,K,`↻`,`\\circlearrowright`,!0),N(B,U,K,`↱`,`\\Rsh`,!0),N(B,U,K,`⇊`,`\\downdownarrows`,!0),N(B,U,K,`↾`,`\\upharpoonright`,!0),N(B,U,K,`⇂`,`\\downharpoonright`,!0),N(B,U,K,`⇝`,`\\rightsquigarrow`,!0),N(B,U,K,`⇝`,`\\leadsto`),N(B,U,K,`⇛`,`\\Rrightarrow`,!0),N(B,U,K,`↾`,`\\restriction`),N(B,H,q,`‘`,"`"),N(B,H,q,`$`,`\\$`),N(V,H,q,`$`,`\\$`),N(V,H,q,`$`,`\\textdollar`),N(B,H,q,`%`,`\\%`),N(V,H,q,`%`,`\\%`),N(B,H,q,`_`,`\\_`),N(V,H,q,`_`,`\\_`),N(V,H,q,`_`,`\\textunderscore`),N(B,H,q,`∠`,`\\angle`,!0),N(B,H,q,`∞`,`\\infty`,!0),N(B,H,q,`′`,`\\prime`),N(B,H,q,`△`,`\\triangle`),N(B,H,q,`Γ`,`\\Gamma`,!0),N(B,H,q,`Δ`,`\\Delta`,!0),N(B,H,q,`Θ`,`\\Theta`,!0),N(B,H,q,`Λ`,`\\Lambda`,!0),N(B,H,q,`Ξ`,`\\Xi`,!0),N(B,H,q,`Π`,`\\Pi`,!0),N(B,H,q,`Σ`,`\\Sigma`,!0),N(B,H,q,`Υ`,`\\Upsilon`,!0),N(B,H,q,`Φ`,`\\Phi`,!0),N(B,H,q,`Ψ`,`\\Psi`,!0),N(B,H,q,`Ω`,`\\Omega`,!0),N(B,H,q,`A`,`Α`),N(B,H,q,`B`,`Β`),N(B,H,q,`E`,`Ε`),N(B,H,q,`Z`,`Ζ`),N(B,H,q,`H`,`Η`),N(B,H,q,`I`,`Ι`),N(B,H,q,`K`,`Κ`),N(B,H,q,`M`,`Μ`),N(B,H,q,`N`,`Ν`),N(B,H,q,`O`,`Ο`),N(B,H,q,`P`,`Ρ`),N(B,H,q,`T`,`Τ`),N(B,H,q,`X`,`Χ`),N(B,H,q,`¬`,`\\neg`,!0),N(B,H,q,`¬`,`\\lnot`),N(B,H,q,`⊤`,`\\top`),N(B,H,q,`⊥`,`\\bot`),N(B,H,q,`∅`,`\\emptyset`),N(B,U,q,`∅`,`\\varnothing`),N(B,H,G,`α`,`\\alpha`,!0),N(B,H,G,`β`,`\\beta`,!0),N(B,H,G,`γ`,`\\gamma`,!0),N(B,H,G,`δ`,`\\delta`,!0),N(B,H,G,`ϵ`,`\\epsilon`,!0),N(B,H,G,`ζ`,`\\zeta`,!0),N(B,H,G,`η`,`\\eta`,!0),N(B,H,G,`θ`,`\\theta`,!0),N(B,H,G,`ι`,`\\iota`,!0),N(B,H,G,`κ`,`\\kappa`,!0),N(B,H,G,`λ`,`\\lambda`,!0),N(B,H,G,`μ`,`\\mu`,!0),N(B,H,G,`ν`,`\\nu`,!0),N(B,H,G,`ξ`,`\\xi`,!0),N(B,H,G,`ο`,`\\omicron`,!0),N(B,H,G,`π`,`\\pi`,!0),N(B,H,G,`ρ`,`\\rho`,!0),N(B,H,G,`σ`,`\\sigma`,!0),N(B,H,G,`τ`,`\\tau`,!0),N(B,H,G,`υ`,`\\upsilon`,!0),N(B,H,G,`ϕ`,`\\phi`,!0),N(B,H,G,`χ`,`\\chi`,!0),N(B,H,G,`ψ`,`\\psi`,!0),N(B,H,G,`ω`,`\\omega`,!0),N(B,H,G,`ε`,`\\varepsilon`,!0),N(B,H,G,`ϑ`,`\\vartheta`,!0),N(B,H,G,`ϖ`,`\\varpi`,!0),N(B,H,G,`ϱ`,`\\varrho`,!0),N(B,H,G,`ς`,`\\varsigma`,!0),N(B,H,G,`φ`,`\\varphi`,!0),N(B,H,W,`∗`,`*`,!0),N(B,H,W,`+`,`+`),N(B,H,W,`−`,`-`,!0),N(B,H,W,`⋅`,`\\cdot`,!0),N(B,H,W,`∘`,`\\circ`,!0),N(B,H,W,`÷`,`\\div`,!0),N(B,H,W,`±`,`\\pm`,!0),N(B,H,W,`×`,`\\times`,!0),N(B,H,W,`∩`,`\\cap`,!0),N(B,H,W,`∪`,`\\cup`,!0),N(B,H,W,`∖`,`\\setminus`,!0),N(B,H,W,`∧`,`\\land`),N(B,H,W,`∨`,`\\lor`),N(B,H,W,`∧`,`\\wedge`,!0),N(B,H,W,`∨`,`\\vee`,!0),N(B,H,q,`√`,`\\surd`),N(B,H,Am,`⟨`,`\\langle`,!0),N(B,H,Am,`∣`,`\\lvert`),N(B,H,Am,`∥`,`\\lVert`),N(B,H,Dm,`?`,`?`),N(B,H,Dm,`!`,`!`),N(B,H,Dm,`⟩`,`\\rangle`,!0),N(B,H,Dm,`∣`,`\\rvert`),N(B,H,Dm,`∥`,`\\rVert`),N(B,H,K,`=`,`=`),N(B,H,K,`:`,`:`),N(B,H,K,`≈`,`\\approx`,!0),N(B,H,K,`≅`,`\\cong`,!0),N(B,H,K,`≥`,`\\ge`),N(B,H,K,`≥`,`\\geq`,!0),N(B,H,K,`←`,`\\gets`),N(B,H,K,`>`,`\\gt`,!0),N(B,H,K,`∈`,`\\in`,!0),N(B,H,K,``,`\\@not`),N(B,H,K,`⊂`,`\\subset`,!0),N(B,H,K,`⊃`,`\\supset`,!0),N(B,H,K,`⊆`,`\\subseteq`,!0),N(B,H,K,`⊇`,`\\supseteq`,!0),N(B,U,K,`⊈`,`\\nsubseteq`,!0),N(B,U,K,`⊉`,`\\nsupseteq`,!0),N(B,H,K,`⊨`,`\\models`),N(B,H,K,`←`,`\\leftarrow`,!0),N(B,H,K,`≤`,`\\le`),N(B,H,K,`≤`,`\\leq`,!0),N(B,H,K,`<`,`\\lt`,!0),N(B,H,K,`→`,`\\rightarrow`,!0),N(B,H,K,`→`,`\\to`),N(B,U,K,`≱`,`\\ngeq`,!0),N(B,U,K,`≰`,`\\nleq`,!0),N(B,H,Mm,`\xA0`,`\\ `),N(B,H,Mm,`\xA0`,`\\space`),N(B,H,Mm,`\xA0`,`\\nobreakspace`),N(V,H,Mm,`\xA0`,`\\ `),N(V,H,Mm,`\xA0`,` `),N(V,H,Mm,`\xA0`,`\\space`),N(V,H,Mm,`\xA0`,`\\nobreakspace`),N(B,H,Mm,``,`\\nobreak`),N(B,H,Mm,``,`\\allowbreak`),N(B,H,jm,`,`,`,`),N(B,H,jm,`;`,`;`),N(B,U,W,`⊼`,`\\barwedge`,!0),N(B,U,W,`⊻`,`\\veebar`,!0),N(B,H,W,`⊙`,`\\odot`,!0),N(B,H,W,`⊕`,`\\oplus`,!0),N(B,H,W,`⊗`,`\\otimes`,!0),N(B,H,q,`∂`,`\\partial`,!0),N(B,H,W,`⊘`,`\\oslash`,!0),N(B,U,W,`⊚`,`\\circledcirc`,!0),N(B,U,W,`⊡`,`\\boxdot`,!0),N(B,H,W,`△`,`\\bigtriangleup`),N(B,H,W,`▽`,`\\bigtriangledown`),N(B,H,W,`†`,`\\dagger`),N(B,H,W,`⋄`,`\\diamond`),N(B,H,W,`⋆`,`\\star`),N(B,H,W,`◃`,`\\triangleleft`),N(B,H,W,`▹`,`\\triangleright`),N(B,H,Am,`{`,`\\{`),N(V,H,q,`{`,`\\{`),N(V,H,q,`{`,`\\textbraceleft`),N(B,H,Dm,`}`,`\\}`),N(V,H,q,`}`,`\\}`),N(V,H,q,`}`,`\\textbraceright`),N(B,H,Am,`{`,`\\lbrace`),N(B,H,Dm,`}`,`\\rbrace`),N(B,H,Am,`[`,`\\lbrack`,!0),N(V,H,q,`[`,`\\lbrack`,!0),N(B,H,Dm,`]`,`\\rbrack`,!0),N(V,H,q,`]`,`\\rbrack`,!0),N(B,H,Am,`(`,`\\lparen`,!0),N(B,H,Dm,`)`,`\\rparen`,!0),N(V,H,q,`<`,`\\textless`,!0),N(V,H,q,`>`,`\\textgreater`,!0),N(B,H,Am,`⌊`,`\\lfloor`,!0),N(B,H,Dm,`⌋`,`\\rfloor`,!0),N(B,H,Am,`⌈`,`\\lceil`,!0),N(B,H,Dm,`⌉`,`\\rceil`,!0),N(B,H,q,`\\`,`\\backslash`),N(B,H,q,`∣`,`|`),N(B,H,q,`∣`,`\\vert`),N(V,H,q,`|`,`\\textbar`,!0),N(B,H,q,`∥`,`\\|`),N(B,H,q,`∥`,`\\Vert`),N(V,H,q,`∥`,`\\textbardbl`),N(V,H,q,`~`,`\\textasciitilde`),N(V,H,q,`\\`,`\\textbackslash`),N(V,H,q,`^`,`\\textasciicircum`),N(B,H,K,`↑`,`\\uparrow`,!0),N(B,H,K,`⇑`,`\\Uparrow`,!0),N(B,H,K,`↓`,`\\downarrow`,!0),N(B,H,K,`⇓`,`\\Downarrow`,!0),N(B,H,K,`↕`,`\\updownarrow`,!0),N(B,H,K,`⇕`,`\\Updownarrow`,!0),N(B,H,km,`∐`,`\\coprod`),N(B,H,km,`⋁`,`\\bigvee`),N(B,H,km,`⋀`,`\\bigwedge`),N(B,H,km,`⨄`,`\\biguplus`),N(B,H,km,`⋂`,`\\bigcap`),N(B,H,km,`⋃`,`\\bigcup`),N(B,H,km,`∫`,`\\int`),N(B,H,km,`∫`,`\\intop`),N(B,H,km,`∬`,`\\iint`),N(B,H,km,`∭`,`\\iiint`),N(B,H,km,`∏`,`\\prod`),N(B,H,km,`∑`,`\\sum`),N(B,H,km,`⨂`,`\\bigotimes`),N(B,H,km,`⨁`,`\\bigoplus`),N(B,H,km,`⨀`,`\\bigodot`),N(B,H,km,`∮`,`\\oint`),N(B,H,km,`∯`,`\\oiint`),N(B,H,km,`∰`,`\\oiiint`),N(B,H,km,`⨆`,`\\bigsqcup`),N(B,H,km,`∫`,`\\smallint`),N(V,H,Om,`…`,`\\textellipsis`),N(B,H,Om,`…`,`\\mathellipsis`),N(V,H,Om,`…`,`\\ldots`,!0),N(B,H,Om,`…`,`\\ldots`,!0),N(B,H,Om,`⋯`,`\\@cdots`,!0),N(B,H,Om,`⋱`,`\\ddots`,!0),N(B,H,q,`⋮`,`\\varvdots`),N(V,H,q,`⋮`,`\\varvdots`),N(B,H,Em,`ˊ`,`\\acute`),N(B,H,Em,`ˋ`,`\\grave`),N(B,H,Em,`¨`,`\\ddot`),N(B,H,Em,`~`,`\\tilde`),N(B,H,Em,`ˉ`,`\\bar`),N(B,H,Em,`˘`,`\\breve`),N(B,H,Em,`ˇ`,`\\check`),N(B,H,Em,`^`,`\\hat`),N(B,H,Em,`⃗`,`\\vec`),N(B,H,Em,`˙`,`\\dot`),N(B,H,Em,`˚`,`\\mathring`),N(B,H,G,``,`\\@imath`),N(B,H,G,``,`\\@jmath`),N(B,H,q,`ı`,`ı`),N(B,H,q,`ȷ`,`ȷ`),N(V,H,q,`ı`,`\\i`,!0),N(V,H,q,`ȷ`,`\\j`,!0),N(V,H,q,`ß`,`\\ss`,!0),N(V,H,q,`æ`,`\\ae`,!0),N(V,H,q,`œ`,`\\oe`,!0),N(V,H,q,`ø`,`\\o`,!0),N(V,H,q,`Æ`,`\\AE`,!0),N(V,H,q,`Œ`,`\\OE`,!0),N(V,H,q,`Ø`,`\\O`,!0),N(V,H,Em,`ˊ`,`\\'`),N(V,H,Em,`ˋ`,"\\`"),N(V,H,Em,`ˆ`,`\\^`),N(V,H,Em,`˜`,`\\~`),N(V,H,Em,`ˉ`,`\\=`),N(V,H,Em,`˘`,`\\u`),N(V,H,Em,`˙`,`\\.`),N(V,H,Em,`¸`,`\\c`),N(V,H,Em,`˚`,`\\r`),N(V,H,Em,`ˇ`,`\\v`),N(V,H,Em,`¨`,`\\"`),N(V,H,Em,`˝`,`\\H`),N(V,H,Em,`◯`,`\\textcircled`),Nm={"--":!0,"---":!0,"``":!0,"''":!0},N(V,H,q,`–`,`--`,!0),N(V,H,q,`–`,`\\textendash`),N(V,H,q,`—`,`---`,!0),N(V,H,q,`—`,`\\textemdash`),N(V,H,q,`‘`,"`",!0),N(V,H,q,`‘`,`\\textquoteleft`),N(V,H,q,`’`,`'`,!0),N(V,H,q,`’`,`\\textquoteright`),N(V,H,q,`“`,"``",!0),N(V,H,q,`“`,`\\textquotedblleft`),N(V,H,q,`”`,`''`,!0),N(V,H,q,`”`,`\\textquotedblright`),N(B,H,q,`°`,`\\degree`,!0),N(V,H,q,`°`,`\\degree`),N(V,H,q,`°`,`\\textdegree`,!0),N(B,H,q,`£`,`\\pounds`),N(B,H,q,`£`,`\\mathsterling`,!0),N(V,H,q,`£`,`\\pounds`),N(V,H,q,`£`,`\\textsterling`,!0),N(B,U,q,`✠`,`\\maltese`),N(V,U,q,`✠`,`\\maltese`),Pm=`0123456789/@."`,Fm=0;Fm<Pm.length;Fm++)Im=Pm.charAt(Fm),N(B,H,q,Im,Im);for(Lm=`0123456789!@*()-=+";:?/.,`,Rm=0;Rm<Lm.length;Rm++)zm=Lm.charAt(Rm),N(V,H,q,zm,zm);for(Bm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,Vm=0;Vm<Bm.length;Vm++)Hm=Bm.charAt(Vm),N(B,H,G,Hm,Hm),N(V,H,q,Hm,Hm);for(N(B,U,q,`C`,`ℂ`),N(V,U,q,`C`,`ℂ`),N(B,U,q,`H`,`ℍ`),N(V,U,q,`H`,`ℍ`),N(B,U,q,`N`,`ℕ`),N(V,U,q,`N`,`ℕ`),N(B,U,q,`P`,`ℙ`),N(V,U,q,`P`,`ℙ`),N(B,U,q,`Q`,`ℚ`),N(V,U,q,`Q`,`ℚ`),N(B,U,q,`R`,`ℝ`),N(V,U,q,`R`,`ℝ`),N(B,U,q,`Z`,`ℤ`),N(V,U,q,`Z`,`ℤ`),N(B,H,G,`h`,`ℎ`),N(V,H,G,`h`,`ℎ`),Um=0;Um<Bm.length;Um++)Wm=Bm.charAt(Um),J=String.fromCharCode(55349,56320+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56372+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56424+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56580+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56684+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56736+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56788+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56840+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56944+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),Um<26&&(J=String.fromCharCode(55349,56632+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J),J=String.fromCharCode(55349,56476+Um),N(B,H,G,Wm,J),N(V,H,q,Wm,J));for(J=String.fromCharCode(55349,56668),N(B,H,G,`k`,J),N(V,H,q,`k`,J),Gm=0;Gm<10;Gm++)Km=Gm.toString(),J=String.fromCharCode(55349,57294+Gm),N(B,H,G,Km,J),N(V,H,q,Km,J),J=String.fromCharCode(55349,57314+Gm),N(B,H,G,Km,J),N(V,H,q,Km,J),J=String.fromCharCode(55349,57324+Gm),N(B,H,G,Km,J),N(V,H,q,Km,J),J=String.fromCharCode(55349,57334+Gm),N(B,H,G,Km,J),N(V,H,q,Km,J);for(qm=`ÐÞþ`,Jm=0;Jm<qm.length;Jm++)Ym=qm.charAt(Jm),N(B,H,G,Ym,Ym),N(V,H,q,Ym,Ym);Xm={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Zm={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},Qm={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},$m={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},eh={mathClass:``,textClass:``,font:``},th={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},nh={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},rh={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},ih={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},ah={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},oh={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},sh={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},ch=[Xm,Xm,Zm,Zm,Qm,Qm,$m,eh,eh,eh,th,th,nh,nh,rh,rh,ih,ih,ah,ah,oh,oh,eh,eh,sh,sh],lh=[Xm,eh,ih,ah,sh],uh=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return ch[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return lh[Math.floor((r-120782)/10)];if(r===120485||r===120486)return ch[0];if(120486<r&&r<120782)return eh;throw new L(`Unsupported character: `+e)},dh=function(e,t,n){if(Tm[n][e]){var r=Tm[n][e].replace;r&&(e=r)}return{value:e,metrics:Hf(e,t,n)}},fh=function(e,t,n,r,i){var a=dh(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new gm(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new gm(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},ph=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&dh(e,`Main-Bold`,t).metrics?fh(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||Tm[t][e].font===`main`?fh(e,`Main-Regular`,t,n,r):fh(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},mh=function(e,t,n){return n!==`textord`&&dh(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},hh=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=uh(i);f=m.font,p=m[r+`Class`]}if(f)return fh(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=mh(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=Oh[o].fontName,g=[o]):(h=Dh(s,c,l),g=[s,c,l]);if(dh(i,h,r).metrics)return fh(i,h,r,t,a.concat(g));if(Nm.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(fh(i[y],h,r,t,a.concat(g)));return Sh(v)}}if(n===`mathord`)return fh(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=Tm[r][i]&&Tm[r][i].font;if(b===`ams`)return fh(i,Dh(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return fh(i,Dh(`textrm`,c,l),r,t,a.concat(c,l));var x=Dh(b,c,l);return fh(i,x,r,t,a.concat(x,c,l))}else throw Error(`unexpected type: `+n+` in makeOrd`)},gh=(e,t)=>{if(om(e.classes)!==om(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},_h=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof gm&&r instanceof gm&&gh(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},vh=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];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},Y=function(e,t,n,r){var i=new fm(e,t,n,r);return vh(i),i},yh=(e,t,n,r)=>new fm(e,t,n,r),bh=function(e,t,n){var r=Y([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=z(r.height),r.maxFontSize=1,r},xh=function(e,t,n,r){var i=new pm(e,t,n,r);return vh(i),i},Sh=function(e){var t=new tm(e);return vh(t),t},Ch=function(e,t){return e instanceof tm?Y([],[e],t):e},wh=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},Th=function(e,t){for(var{children:n,depth:r}=wh(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=Y([`pstrut`],[]);c.style.height=z(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=Y(g,[c,h],void 0,_);v.style.top=z(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=Y([`vlist`],l);y.style.height=z(d);var b;if(u<0){var x=Y([`vlist`],[Y([],[])]);x.style.height=z(-u),b=[Y([`vlist-r`],[y,Y([`vlist-s`],[new gm(``)])]),Y([`vlist-r`],[x])]}else b=[Y([`vlist-r`],[y])];var S=Y([`vlist-t`],b);return b.length===2&&S.classes.push(`vlist-t2`),S.height=d,S.depth=-u,S},Eh=(e,t)=>{var n=Y([`mspace`],[],t),r=am(e,t);return n.style.marginRight=z(r),n},Dh=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},Oh={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`}},kh={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Ah=function(e,t){var[n,r,i]=kh[e],a=yh([`overlay`],[new _m([new vm(n)],{width:z(r),height:z(i),style:`width:`+z(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=z(i),a.style.width=z(r),a},jh={number:3,unit:`mu`},Mh={number:4,unit:`mu`},Nh={number:5,unit:`mu`},Ph={mord:{mop:jh,mbin:Mh,mrel:Nh,minner:jh},mop:{mord:jh,mop:jh,mrel:Nh,minner:jh},mbin:{mord:Mh,mop:Mh,mopen:Mh,minner:Mh},mrel:{mord:Nh,mop:Nh,mopen:Nh,minner:Nh},mopen:{},mclose:{mop:jh,mbin:Mh,mrel:Nh,minner:jh},mpunct:{mord:jh,mop:jh,mrel:Nh,mopen:jh,mclose:jh,mpunct:jh,minner:jh},minner:{mord:jh,mop:jh,mbin:Mh,mrel:Nh,mopen:jh,mpunct:jh,minner:jh}},Fh={mord:{mop:jh},mop:{mord:jh,mop:jh},mbin:{},mrel:{},mopen:{},mclose:{mop:jh},mpunct:{},minner:{mop:jh}},Ih={},Lh={},Rh={},zh=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},Bh=function(e){return e.type===`ordgroup`?e.body:[e]},Vh=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),Hh=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),Uh={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},Wh={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},Gh=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=Zh(e[a],t);if(o instanceof tm){var s=o.children;i.push(...s)}else i.push(o)}if(_h(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(Uh[l.style]))}var u=Y([r[0]||`leftmost`],[],t),d=Y([r[1]||`rightmost`],[],t),f=n===`root`;return Kh(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Hh.has(r)?t.classes[0]=`mord`:r===`mbin`&&Vh.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),Kh(i,(e,t)=>{var n=Yh(t),r=Yh(e),i=n&&r?e.hasClass(`mtight`)?Fh[n]?.[r]:Ph[n]?.[r]:null;if(i)return Eh(i,c)},{node:u},d,f),i},Kh=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=qh(o);if(s){Kh(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=Y([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},qh=function(e){return e instanceof tm||e instanceof pm||e instanceof fm&&e.hasClass(`enclosing`)?e:null},Jh=function(e,t){var n=qh(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Jh(r[r.length-1],`right`);if(t===`left`)return Jh(r[0],`left`)}}return e},Yh=function(e,t){return e?(t&&(e=Jh(e,t)),Wh[e.classes[0]]||null):null},Xh=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return Y(t.concat(n))},Zh=function(e,t,n){if(!e)return Y();if(Lh[e.type]){var r=Lh[e.type](e,t);if(n&&t.size!==n.size){r=Y(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}else throw new L(`Got group of unknown type: '`+e.type+`'`)},X=class{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=om(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Qh&&this.children[n+1]instanceof Qh){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Qh;)r+=this.children[++n].toText();e.appendChild(new Qh(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+=_p(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+_p(om(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(``)}},Qh=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return _p(this.toText())}toText(){return this.text}},$h=class{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`,z(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+z(this.width)+`"/>`}toText(){return this.character?this.character:` `}},eg=new Set([`\\imath`,`\\jmath`]),tg=new Set([`mrow`,`mtable`]),ng=function(e,t,n){return Tm[t][e]&&Tm[t][e].replace&&e.charCodeAt(0)!==55349&&!(Nm.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=Tm[t][e].replace),new Qh(e)},rg=function(e){return e.length===1?e[0]:new X(`mrow`,e)},ig={mathit:`italic`,boldsymbol:e=>e.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`},ag=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=ig[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(eg.has(a))return null;if(Tm[r][a]){var o=Tm[r][a].replace;o&&(a=o)}var s=Oh[n].fontName;return Hf(a,s,r)?Oh[n].variant:null},og=function(e,t,n){if(e.length===1){var r=cg(e[0],t);return n&&r instanceof X&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=cg(e[o],t);if(s instanceof X&&a instanceof X){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}else if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}else if(Jf(s)&&a.type===`mn`){a.children.push(...s.children);continue}else if(s.type===`mn`&&Jf(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||Jf(a))){var c=s.children[0];c instanceof X&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof Qh&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof Qh&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},sg=function(e,t,n){return rg(og(e,t,n))},cg=function(e,t){if(!e)return new X(`mrow`);if(Rh[e.type])return Rh[e.type](e,t);throw new L(`Got group of unknown type: '`+e.type+`'`)},lg=[[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]],ug=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dg=function(e,t){return t.size<2?e:lg[e-1][t.size-1]},fg=class e{constructor(t){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=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=ug[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={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(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:dg(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:ug[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=dg(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}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===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Uf(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}},fg.BASESIZE=6,pg=function(e){return new fg({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},mg=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=Y(n,[e])}return e},hg=function(e,t,n){var r=pg(n),i;return n.output===`mathml`?Yf(e,t,r,n.displayMode,!0):(i=n.output===`html`?Y([`katex`],[Kf(e,r)]):Y([`katex`],[Yf(e,t,r,n.displayMode,!1),Kf(e,r)]),mg(i,n))},gg=function(e,t,n){return mg(Y([`katex`],[Kf(e,pg(n))]),n)},_g={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":`=`},vg=function(e){var t=new X(`mo`,[new Qh(_g[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},yg={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]},bg=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),xg=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(bg.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:yh([],[new _m([new vm(o)],{width:`100%`,height:z(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}else{var l=[],u=yg[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
381
|
+
`+h+` children.`);for(var v=0;v<h;v++){var y=new _m([new vm(d[v])],{width:`400em`,height:z(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=yh([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=z(m),l.push(b)}return{span:Y([`stretchy`],l,t),minWidth:f,height:m}}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=z(a),i>0&&(r.style.minWidth=z(i)),r},Sg=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=Y([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new ym({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new ym({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=yh([],[new _m(c,{width:`100%`,height:z(o)})],i)}return a.height=o,a.style.height=z(o),a},Cg={bin:1,close:1,inner:1,open:1,punct:1,rel:1},wg={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Tg=e=>{if(e instanceof gm)return e;if(bm(e)&&e.children.length===1)return Tg(e.children[0])},Eg=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=F(e.base,`accent`),n=r.base,e.base=n,i=Bf(Zh(e,t)),e.base=r):(r=F(e,`accent`),n=r.base);var a=Zh(n,t.havingCrampedStyle()),o=r.isShifty&&bp(n),s=0;o&&(s=Tg(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=xg(r,t),u=Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+z(2*s)+`)`,marginLeft:z(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=Ah(`vec`,t),f=kh.vec[1]):(d=hh({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=zf(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=Y([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=z(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=Y([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},Dg=(e,t)=>{var n=e.isStretchy?vg(e.label):new X(`mo`,[ng(e.label,e.mode)]),r=new X(`mover`,[cg(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Og=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`)),P({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=zh(t[0]),r=!Og.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Eg,mathmlBuilder:Dg}),P({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Eg,mathmlBuilder:Dg}),P({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Zh(e.base,t),r=xg(e,t),i=e.label===`\\utilde`?.12:0;return Y([`mord`,`accentunder`],[Th({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=vg(e.label),r=new X(`munder`,[cg(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),kg=e=>{var t=new X(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t},P({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Ch(Zh(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Ch(Zh(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=xg(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=Th({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=Th({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return Y([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=vg(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=kg(cg(e.body,t));r=e.below?new X(`munderover`,[n,kg(cg(e.below,t)),i]):new X(`mover`,[n,i])}else e.below?r=new X(`munder`,[n,kg(cg(e.below,t))]):(r=kg(),r=new X(`mover`,[n,r]));return r}}),P({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:Bh(i),isCharacterBox:bp(i)}},htmlBuilder:$f,mathmlBuilder:ep}),Ag=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`},P({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:Ag(t[0]),body:Bh(t[1]),isCharacterBox:bp(t[1])}}}),P({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Ag(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:Bh(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:bp(c)}},htmlBuilder:$f,mathmlBuilder:ep}),P({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:Ag(t[0]),body:Bh(t[0])}},htmlBuilder(e,t){var n=Gh(e.body,t,!0),r=Y([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new X(`mstyle`,og(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}}),jg={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Mg=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Ng=e=>e.type===`textord`&&e.text===`@`,Pg=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t,P({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ch(Zh(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=z(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new X(`mrow`,[cg(e.label,t)]);return n=new X(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new X(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),P({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ch(Zh(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new X(`mrow`,[cg(e.fragment,t)])}}),P({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=F(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=F(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new L(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new L(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}}),Fg=(e,t)=>Sh(Gh(e.body,t.withColor(e.color),!1)),Ig=(e,t)=>{var n=new X(`mstyle`,og(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n},P({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=F(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:Bh(i)}},htmlBuilder:Fg,mathmlBuilder:Ig}),P({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=F(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:Fg,mathmlBuilder:Ig}),P({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&F(i,`size`).value}},htmlBuilder(e,t){var n=Y([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=z(am(e.size,t)))),n},mathmlBuilder(e,t){var n=new X(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,z(am(e.size,t)))),n}}),Lg={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Rg=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new L(`Expected a control sequence`,e);return t},zg=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Bg=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)},P({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Lg[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Lg[r.text]),F(t.parseFunction(),`internal`);throw new L(`Invalid token after macro prefix`,r)}}),P({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new L(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new L(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new L(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new L(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Lg[n]),{type:`internal`,mode:t.mode}}}),P({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Rg(t.gullet.popToken());return t.gullet.consumeSpaces(),Bg(t,r,zg(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),P({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Rg(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Bg(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}}),Vg=function(e,t,n){var r=Hf(Tm.math[e]&&Tm.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},Hg=function(e,t,n,r){var i=n.havingBaseStyle(t),a=Y(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},Ug=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=z(i),e.height-=i,e.depth+=i},Wg=function(e,t,n,r,i,a){var o=Hg(fh(e,`Main-Regular`,i,r),t,r,a);return n&&Ug(o,r,t),o},Gg=function(e,t,n,r){return fh(e,`Size`+t+`-Regular`,n,r)},Kg=function(e,t,n,r,i,a){var o=Gg(e,t,i,r),s=Hg(Y([`delimsizing`,`size`+t],[o],r),R.TEXT,r,a);return n&&Ug(s,r,R.TEXT),s},qg=function(e,t,n){return{type:`elem`,elem:Y([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[Y([],[fh(e,t,n)])])}},Jg=function(e,t,n){var r=xm[`Size4-Regular`][e.charCodeAt(0)]?xm[`Size4-Regular`][e.charCodeAt(0)][4]:xm[`Size1-Regular`][e.charCodeAt(0)][4],i=yh([],[new _m([new vm(`inner`,Qp(e,Math.round(1e3*t)))],{width:z(r),height:z(t),style:`width:`+z(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=z(t),i.style.width=z(r),{type:`elem`,elem:i}},Yg=.008,Xg={type:`kern`,size:-1*Yg},Zg=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Qg=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),$g=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):Zg.has(e)?(c=`∣`,u=`vert`,d=333):Qg.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=Vg(o,f,i),m=p.height+p.depth,h=Vg(c,f,i),g=h.height+h.depth,_=Vg(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=Vg(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var T=C/2-w,E=[];if(u.length>0){var ee=C-m-v,te=Math.round(C*1e3),ne=em(u,Math.round(ee*1e3)),re=new vm(u,ne),ie=z(d/1e3),ae=z(te/1e3),oe=yh([],[new _m([re],{width:ie,height:ae,viewBox:`0 0 `+d+` `+te})],r);oe.height=te/1e3,oe.style.width=ie,oe.style.height=ae,E.push({type:`elem`,elem:oe})}else{if(E.push(qg(l,f,i)),E.push(Xg),s===null){var se=C-m-v+2*Yg;E.push(Jg(c,se,r))}else{var D=(C-m-v-y)/2+2*Yg;E.push(Jg(c,D,r)),E.push(Xg),E.push(qg(s,f,i)),E.push(Xg),E.push(Jg(c,D,r))}E.push(Xg),E.push(qg(o,f,i))}var ce=r.havingBaseStyle(R.TEXT);return Hg(Y([`delimsizing`,`mult`],[Th({positionType:`bottom`,positionData:T,children:E})],ce),R.TEXT,r,a)},e_=80,t_=.08,n_=function(e,t,n,r,i){return yh([`hide-tail`],[new _m([new vm(e,Zp(e,r,n))],{width:`400em`,height:z(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},r_=function(e,t){var n=t.havingBaseSizing(),r=p_(`\\surd`,e*n.sizeMultiplier,d_,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+e_,e<1?i=1:e<1.4&&(i=.7),s=(1+a+t_)/i,c=(1+a)/i,o=n_(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+e_)*s_[r.size],c=(s_[r.size]+a)/i,s=(s_[r.size]+a+t_)/i,o=n_(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+t_,c=e+a,l=Math.floor(1e3*e+a)+e_,o=n_(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=z(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},i_=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),a_=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),o_=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),s_=[0,1.2,1.8,2.4,3],c_=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),i_.has(e)||o_.has(e))return Kg(e,t,!1,n,r,i);if(a_.has(e))return $g(e,s_[t],!1,n,r,i);throw new L(`Illegal delimiter: '`+e+`'`)},l_=[{type:`small`,style:R.SCRIPTSCRIPT},{type:`small`,style:R.SCRIPT},{type:`small`,style:R.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],u_=[{type:`small`,style:R.SCRIPTSCRIPT},{type:`small`,style:R.SCRIPT},{type:`small`,style:R.TEXT},{type:`stack`}],d_=[{type:`small`,style:R.SCRIPTSCRIPT},{type:`small`,style:R.SCRIPT},{type:`small`,style:R.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],f_=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 Error(`Add support for delim type '`+t+`' here.`)},p_=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=Vg(e,f_(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},m_=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=o_.has(e)?l_:i_.has(e)?d_:u_,s=p_(e,t,o,r);return s.type===`small`?Wg(e,s.style,n,r,i,a):s.type===`large`?Kg(e,s.size,n,r,i,a):$g(e,t,n,r,i,a)},h_=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return m_(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},g_={"\\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}},__=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,.`.split(`,`)),P({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=ip(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:g_[e.funcName].size,mclass:g_[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?Y([e.mclass]):c_(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(ng(e.delim,e.mode));var n=new X(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=z(s_[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}}),P({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new L(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:ip(t[0],e).text,color:n}}}),P({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=ip(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=F(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{ap(e);for(var n=Gh(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];rp(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?Xh(t,[`mopen`]):h_(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(rp(u)){var d=u.isMiddle;n[l]=h_(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=Xh(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=h_(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),Y([`minner`],n,t)},mathmlBuilder:(e,t)=>{ap(e);var n=og(e.body,t);if(e.left!==`.`){var r=new X(`mo`,[ng(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new X(`mo`,[ng(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return rg(n)}}),P({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=ip(t[0],e);if(!e.parser.leftrightDepth)throw new L(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Xh(t,[]):(n=c_(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new X(`mo`,[e.delim===`\\vert`||e.delim===`|`?ng(`|`,`text`):ng(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),v_=(e,t)=>{var n=Ch(Zh(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=bp(e.body);if(r===`sout`)a=Y([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=am({number:.6,unit:`pt`},t),l=am({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=z(d/2+c);var f=Math.floor(1e3*d*i);a=yh([`hide-tail`],[new _m([new vm(`phase`,Yp(f))],{width:`400em`,height:z(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=z(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=Sg(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=z(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=z(h),a.style.borderRightWidth=z(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=Th({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=Th({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?Y([`mord`,`cancel-lap`],[g],t):Y([`mord`],[g],t)},y_=(e,t)=>{var n,r=new X(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[cg(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+z(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r},P({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=F(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:v_,mathmlBuilder:y_}),P({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=F(t[0],`color-token`).color,o=F(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:v_,mathmlBuilder:y_}),P({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),P({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:v_,mathmlBuilder:y_}),P({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:v_,mathmlBuilder:y_}),P({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}}),b_={},x_={},S_=class e{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(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},C_=class e{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(t,n){return new e(n,S_.range(this,t))}},w_=e=>{if(!e.parser.settings.displayMode)throw new L(`{`+e.envName+`} can be used only in display mode.`)},T_=new Set([`gather`,`gather*`]),E_=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(R.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?am({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var S={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var C=Zh(y[r],t);x<C.depth&&(x=C.depth),b<C.height&&(b=C.height),S.cells[r]=C}var w=e.rowGaps[n],T=0;w&&(T=am(w,t),T>0&&(T+=g,x<T&&(x=T),T=0)),e.addJot&&n<e.body.length-1&&(x+=p),S.height=b,S.depth=x,_+=b,S.pos=_,_+=x+T,s[n]=S,v(a[n+1])}var E=_/2+t.fontMetrics().axisHeight,ee=e.cols||[],te=[],ne,re,ie=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ae=s[n],oe=ae.pos-E,se=e.tags[n],D=void 0;D=se===!0?Y([`eqn-num`],[],t):se===!1?Y([],[],t):Y([],Gh(se,t,!0),t),D.depth=ae.depth,D.height=ae.height,ie.push({type:`elem`,elem:D,shift:oe})}for(r=0,re=0;r<o||re<ee.length;++r,++re){for(var ce=ee[re],le=!0;(ue=ce)?.type===`separator`;){var ue;if(le||(ne=Y([`arraycolsep`],[]),ne.style.width=z(t.fontMetrics().doubleRuleSep),te.push(ne)),ce.separator===`|`||ce.separator===`:`){var de=ce.separator===`|`?`solid`:`dashed`,fe=Y([`vertical-separator`],[],t);fe.style.height=z(_),fe.style.borderRightWidth=z(l),fe.style.borderRightStyle=de,fe.style.margin=`0 `+z(-l/2);var pe=_-E;pe&&(fe.style.verticalAlign=z(-pe)),te.push(fe)}else throw new L(`Invalid separator type: `+ce.separator);re++,ce=ee[re],le=!1}if(!(r>=o)){var me=void 0;(r>0||e.hskipBeforeAndAfter)&&(me=ce?.pregap??d,me!==0&&(ne=Y([`arraycolsep`],[]),ne.style.width=z(me),te.push(ne)));var he=[];for(n=0;n<i;++n){var ge=s[n],_e=ge.cells[r];if(_e){var ve=ge.pos-E;_e.depth=ge.depth,_e.height=ge.height,he.push({type:`elem`,elem:_e,shift:ve})}}var ye=Th({positionType:`individualShift`,children:he}),be=Y([`col-align-`+(ce?.align||`c`)],[ye]);te.push(be),(r<o-1||e.hskipBeforeAndAfter)&&(me=ce?.postgap??d,me!==0&&(ne=Y([`arraycolsep`],[]),ne.style.width=z(me),te.push(ne)))}}var xe=Y([`mtable`],te);if(c.length>0){for(var Se=bh(`hline`,t,l),Ce=bh(`hdashline`,t,l),we=[{type:`elem`,elem:xe,shift:0}];c.length>0;){var Te=c.pop(),Ee=Te.pos-E;Te.isDashed?we.push({type:`elem`,elem:Ce,shift:Ee}):we.push({type:`elem`,elem:Se,shift:Ee})}xe=Th({positionType:`individualShift`,children:we})}if(ie.length===0)return Y([`mord`],[xe],t);var De=Y([`tag`],[Th({positionType:`individualShift`,children:ie})],t);return Sh([xe,De])},D_={c:`center `,l:`left `,r:`right `},O_=function(e,t){for(var n=[],r=new X(`mtd`,[],[`mtr-glue`]),i=new X(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new X(`mtd`,[cg(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new X(`mtr`,s))}var l=new X(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,z(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=D_[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S<b.length;S++)x+=S%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var C=``,w=e.hLinesBeforeRow;d+=w[0].length>0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var T=1;T<w.length-1;T++)C+=w[T].length===0?`none `:w[T][0]?`dashed `:`solid `;return/[sd]/.test(C)&&l.setAttribute(`rowlines`,C.trim()),d!==``&&(l=new X(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new X(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},k_=function(e,t){e.envName.includes(`ed`)||w_(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=lp(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:cp(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=F(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)F(F(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new L(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a},op({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(Qf(t[0])?[t[0]]:F(t[0],`ordgroup`).body).map(function(e){var t=Zf(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new L(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return lp(e.parser,r,up(e.envName))},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new L(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=lp(e.parser,r,up(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=lp(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(Qf(t[0])?[t[0]]:F(t[0],`ordgroup`).body).map(function(e){var t=Zf(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new L(`Unknown column alignment: `+t,e)});if(n.length>1)throw new L(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=lp(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new L(`{subarray} can contain only one column`);return i},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=lp(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},up(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:k_,htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){T_.has(e.envName)&&w_(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:cp(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return lp(e.parser,t,`display`)},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:k_,htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){w_(e);var t={autoTag:cp(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return lp(e.parser,t,`display`)},htmlBuilder:E_,mathmlBuilder:O_}),op({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return w_(e),np(e.parser)},htmlBuilder:E_,mathmlBuilder:O_}),I(`\\nonumber`,`\\gdef\\@eqnsw{0}`),I(`\\notag`,`\\nonumber`),P({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new L(e.funcName+` valid only within array environment`)}}),A_=b_,P({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new L(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=F(i.body[o],`textord`).text;if(r===`\\begin`){if(!A_.hasOwnProperty(a))throw new L(`No such environment: `+a,i);var s=A_[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=F(n.parseFunction(),`environment`);if(p.name!==a)throw new L(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}}),j_=(e,t)=>{var n=e.font,r=t.withFont(n);return Zh(e.body,r)},M_=(e,t)=>{var n=e.font,r=t.withFont(n);return cg(e.body,r)},N_={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`},P({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=zh(t[0]),a=r;return a in N_&&(a=N_[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:j_,mathmlBuilder:M_}),P({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Ag(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:bp(r)}}}),P({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:j_,mathmlBuilder:M_}),P_=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=Zh(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=Zh(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=am(e.barSize,t),u=bh(`frac-line`,t,d)):u=bh(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===R.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=Th({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=Th({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===R.DISPLAY.size?t.fontMetrics().delim1:n.size===R.SCRIPTSCRIPT.size?t.havingStyle(R.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?Xh(t,[`mopen`]):m_(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),S=e.continued?Y([]):e.rightDelim==null?Xh(t,[`mclose`]):m_(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return Y([`mord`].concat(a.sizingClasses(t)),[x,Y([`mfrac`],[g]),S],t)},F_=(e,t)=>{var n=new X(`mfrac`,[cg(e.numer,t),cg(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=am(e.barSize,t);n.setAttribute(`linethickness`,z(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new X(`mo`,[new Qh(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new X(`mo`,[new Qh(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return rg(i)}return n},I_=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e,P({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),I_({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:P_,mathmlBuilder:F_}),P({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}}),L_=[`display`,`text`,`script`,`scriptscript`],R_=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t},P({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=zh(t[0]),o=a.type===`atom`&&a.family===`open`?R_(a.text):null,s=zh(t[1]),c=s.type===`atom`&&s.family===`close`?R_(s.text):null,l=F(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=F(p.body[0],`textord`);f=L_[Number(m.text)]}}else p=F(p,`textord`),f=L_[Number(p.text)];return I_({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),P({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:F(t[0],`size`).value,token:i}}}),P({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=F(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}}),z_=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?Zh(e.sup,t.havingStyle(n.sup()),t):Zh(e.sub,t.havingStyle(n.sub()),t),i=F(e.base,`horizBrace`)):i=F(e,`horizBrace`);var a=Zh(i.base,t.havingBaseStyle(R.DISPLAY)),o=xg(i,t),s=i.isOver?Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):Th({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=Y([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):Th({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return Y([`minner`,i.isOver?`mover`:`munder`],[s],t)},B_=(e,t)=>{var n=vg(e.label);return new X(e.isOver?`mover`:`munder`,[cg(e.base,t),n])},P({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:z_,mathmlBuilder:B_}),P({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=F(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:Bh(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=Gh(e.body,t,!1);return xh(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=sg(e.body,t);return n instanceof X||(n=new X(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),P({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=F(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:Bh(s)}}}),P({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:Bh(t[0])}},htmlBuilder(e,t){return Sh(Gh(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new X(`mrow`,og(e.body,t.withFont(``)))}}),P({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=F(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new L(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:Bh(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Gh(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=Y(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>sg(e.body,t)}),P({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:Bh(t[0]),mathml:Bh(t[1])}},htmlBuilder:(e,t)=>Sh(Gh(e.html,t,!1)),mathmlBuilder:(e,t)=>sg(e.mathml,t)}),V_=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 L(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!im(n))throw new L(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n},P({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=F(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=V_(d);break;case`height`:a=V_(d);break;case`totalheight`:o=V_(d);break;default:throw new L(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=F(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=am(e.height,t),r=0;e.totalheight.number>0&&(r=am(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=am(e.width,t));var a={height:z(n+r)};i>0&&(a.width=z(i)),r>0&&(a.verticalAlign=z(-r));var o=new mm(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new X(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=am(e.height,t),i=0;if(e.totalheight.number>0&&(i=am(e.totalheight,t)-r,n.setAttribute(`valign`,z(-i))),n.setAttribute(`height`,z(r+i)),e.width.number>0){var a=am(e.width,t);n.setAttribute(`width`,z(a))}return n.setAttribute(`src`,e.src),n}}),P({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=F(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Eh(e.dimension,t)},mathmlBuilder(e,t){return new $h(am(e.dimension,t))}}),P({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=Y([],[Zh(e.body,t)]),n=Y([`inner`],[n],t)):n=Y([`inner`],[Zh(e.body,t)]);var r=Y([`fix`],[]),i=Y([e.alignment],[n,r],t),a=Y([`strut`]);return a.style.height=z(i.height+i.depth),i.depth&&(a.style.verticalAlign=z(-i.depth)),i.children.unshift(a),i=Y([`thinbox`],[i],t),Y([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[cg(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),P({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),P({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new L(`Mismatched `+e.funcName)}}),H_=(e,t)=>{switch(t.style.size){case R.DISPLAY.size:return e.display;case R.TEXT.size:return e.text;case R.SCRIPT.size:return e.script;case R.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},P({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:Bh(t[0]),text:Bh(t[1]),script:Bh(t[2]),scriptscript:Bh(t[3])}},htmlBuilder:(e,t)=>Sh(Gh(H_(e,t),t,!1)),mathmlBuilder:(e,t)=>sg(H_(e,t),t)}),U_=(e,t,n,r,i,a,o)=>{e=Y([],[e]);var s=n&&bp(n),c,l;if(t){var u=Zh(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=Zh(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=Th({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:z(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:z(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=Th({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:z(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=Th({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:z(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=Y([`mspace`],[],r);m.style.marginRight=z(a),p.unshift(m)}return Y([`mop`,`op-limits`],p,r)},W_=new Set([`\\smallint`]),G_=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=F(e.base,`op`),i=!0):a=F(e,`op`);var o=t.style,s=!1;o.size===R.DISPLAY.size&&a.symbol&&!W_.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=fh(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=Ah(d+`Size`+(s?`2`:`1`),t);c=Th({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=Gh(a.body,t,!0);p.length===1&&p[0]instanceof gm?(c=p[0],c.classes[0]=`mop`):c=Y([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(ph(a.name[h],a.mode,t));c=Y([`mop`],m,t)}var g=0,_=0;return(c instanceof gm||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?U_(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=z(g)),c)},K_=(e,t)=>{var n;if(e.symbol)n=new X(`mo`,[ng(e.name,e.mode)]),W_.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new X(`mo`,og(e.body,t));else{n=new X(`mi`,[new Qh(e.name.slice(1))]);var r=new X(`mo`,[ng(``,`text`)]);n=e.parentIsSupSub?new X(`mrow`,[n,r]):qf([n,r])}return n},q_={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`},P({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=q_[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:G_,mathmlBuilder:K_}),P({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Bh(r)}},htmlBuilder:G_,mathmlBuilder:K_}),J_={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`},P({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`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:G_,mathmlBuilder:K_}),P({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:G_,mathmlBuilder:K_}),P({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=J_[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:G_,mathmlBuilder:K_}),Y_=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=F(e.base,`operatorname`),i=!0):a=F(e,`operatorname`);var o;if(a.body.length>0){for(var s=Gh(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof gm&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=Y([`mop`],s,t)}else o=Y([`mop`],[],t);return i?U_(o,n,r,t,t.style,0,0):o},X_=(e,t)=>{for(var n=og(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof $h))if(a instanceof X)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof Qh?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}r&&(n=[new Qh(n.map(e=>e.toText()).join(``))]);var s=new X(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new X(`mo`,[ng(``,`text`)]);return e.parentIsSupSub?new X(`mrow`,[s,c]):qf([s,c])},P({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:Bh(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Y_,mathmlBuilder:X_}),I(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),Wf({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Sh(Gh(e.body,t,!1)):Y([`mord`],Gh(e.body,t,!0),t)},mathmlBuilder(e,t){return sg(e.body,t,!0)}}),P({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=Zh(e.body,t.havingCrampedStyle()),r=bh(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Y([`mord`,`overline`],[Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new Qh(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`mover`,[cg(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),P({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:Bh(r)}},htmlBuilder:(e,t)=>Sh(Gh(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new X(`mphantom`,og(e.body,t))}),I(`\\hphantom`,`\\smash{\\phantom{#1}}`),P({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>Y([`mord`,`rlap`],[Y([`inner`],[Zh(e.body,t.withPhantom())]),Y([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[new X(`mphantom`,og(Bh(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),P({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=F(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Zh(e.body,t);return Th({positionType:`shift`,positionData:-am(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new X(`mpadded`,[cg(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),P({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),P({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=F(t[0],`size`),o=F(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&F(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=Y([`mord`,`rule`],[],t),r=am(e.width,t),i=am(e.height,t),a=e.shift?am(e.shift,t):0;return n.style.borderRightWidth=z(r),n.style.borderTopWidth=z(i),n.style.bottom=z(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=am(e.width,t),r=am(e.height,t),i=e.shift?am(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new X(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,z(n)),o.setAttribute(`height`,z(r));var s=new X(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,z(i)):(s.setAttribute(`height`,z(i)),s.setAttribute(`depth`,z(-i))),s.setAttribute(`voffset`,z(i)),s}}),Z_=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`],Q_=(e,t)=>{var n=t.havingSize(e.size);return dp(e.body,n,t)},P({type:`sizing`,names:Z_,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Z_.indexOf(r)+1,body:a}},htmlBuilder:Q_,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new X(`mstyle`,og(e.body,n));return r.setAttribute(`mathsize`,z(n.sizeMultiplier)),r}}),P({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&F(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=Zf(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=Y([],[Zh(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return Y([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return Y([`mord`],[Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[cg(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),P({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Zh(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Ch(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<R.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=r_(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=z(c);var d=Th({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(R.SCRIPTSCRIPT),p=Zh(e.index,f,t);return Y([`mord`,`sqrt`],[Y([`root`],[Th({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return Y([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new X(`mroot`,[cg(n,t),cg(r,t)]):new X(`msqrt`,[cg(n,t)])}}),$_={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},P({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!fp(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=$_[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),dp(e.body,r,t)},mathmlBuilder(e,t){var n=$_[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new X(`mstyle`,og(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}}),ev=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===R.DISPLAY.size||n.alwaysHandleSupSub)?G_:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===R.DISPLAY.size||n.limits)?Y_:null:n.type===`accent`?bp(n.base)?Eg:null:n.type===`horizBrace`&&!e.sub===n.isOver?z_:null:null},Wf({type:`supsub`,htmlBuilder(e,t){var n=ev(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=Zh(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&bp(r);if(i){var p=t.havingStyle(t.style.sup());s=Zh(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=Zh(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===R.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=z(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof gm||y)&&(v=z(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var S=.8*l.xHeight-(u-s.depth);S>0&&(u+=S,d-=S)}b=Th({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=Th({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=Th({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return Y([Yh(o,`right`)||`mord`],[o,Y([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[cg(e.base,t)];e.sub&&a.push(cg(e.sub,t)),e.sup&&a.push(cg(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===R.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===R.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===R.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===R.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===R.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===R.DISPLAY)?`munder`:`msub`}return new X(o,a)}}),Wf({type:`atom`,htmlBuilder(e,t){return ph(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new X(`mo`,[ng(e.text,e.mode)]);if(e.family===`bin`){var r=ag(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}}),tv={mi:`italic`,mn:`normal`,mtext:`normal`},Wf({type:`mathord`,htmlBuilder(e,t){return hh(e,t,`mathord`)},mathmlBuilder(e,t){var n=new X(`mi`,[ng(e.text,e.mode,t)]),r=ag(e,t)||`italic`;return r!==tv[n.type]&&n.setAttribute(`mathvariant`,r),n}}),Wf({type:`textord`,htmlBuilder(e,t){return hh(e,t,`textord`)},mathmlBuilder(e,t){var n=ng(e.text,e.mode,t),r=ag(e,t)||`normal`,i=e.mode===`text`?new X(`mtext`,[n]):/[0-9]/.test(e.text)?new X(`mn`,[n]):e.text===`\\prime`?new X(`mo`,[n]):new X(`mi`,[n]);return r!==tv[i.type]&&i.setAttribute(`mathvariant`,r),i}}),nv={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},rv={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}},Wf({type:`spacing`,htmlBuilder(e,t){if(rv.hasOwnProperty(e.text)){var n=rv[e.text].className||``;if(e.mode===`text`){var r=hh(e,t,`textord`);return r.classes.push(n),r}else return Y([`mspace`,n],[ph(e.text,e.mode,t)],t)}else if(nv.hasOwnProperty(e.text))return Y([`mspace`,nv[e.text]],[],t);else throw new L(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(rv.hasOwnProperty(e.text))n=new X(`mtext`,[new Qh(`\xA0`)]);else if(nv.hasOwnProperty(e.text))return new X(`mspace`);else throw new L(`Unknown type of space "`+e.text+`"`);return n}}),iv=()=>{var e=new X(`mtd`,[]);return e.setAttribute(`width`,`50%`),e},Wf({type:`tag`,mathmlBuilder(e,t){var n=new X(`mtable`,[new X(`mtr`,[iv(),new X(`mtd`,[sg(e.body,t)]),iv(),new X(`mtd`,[sg(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}}),av={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},ov={"\\textbf":`textbf`,"\\textmd":`textmd`},sv={"\\textit":`textit`,"\\textup":`textup`},cv=(e,t)=>{var n=e.font;return n?av[n]?t.withTextFontFamily(av[n]):ov[n]?t.withTextFontWeight(ov[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(sv[n]):t},P({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:Bh(i),font:r}},htmlBuilder(e,t){var n=cv(e,t);return Y([`mord`,`text`],Gh(e.body,n,!0),n)},mathmlBuilder(e,t){var n=cv(e,t);return sg(e.body,n)}}),P({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Zh(e.body,t),r=bh(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return Y([`mord`,`underline`],[Th({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new Qh(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`munder`,[cg(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),P({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Zh(e.body,t),r=t.fontMetrics().axisHeight;return Th({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new X(`mrow`,[new X(`mpadded`,[cg(e.body,t)],[`vcenter`])])}}),P({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new L(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=lv(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(fh(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return Y([`mord`,`text`].concat(i.sizingClasses(t)),_h(r),i)},mathmlBuilder(e,t){var n=new X(`mtext`,[new Qh(lv(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}}),lv=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),uv=Ih,dv=`[ \r
|
|
382
|
+
]`,fv=`\\\\[a-zA-Z@]+`,pv=`\\\\[^\ud800-\udfff]`,mv=`(`+fv+`)`+dv+`*`,hv=`\\\\(
|
|
383
|
+
|[ \r ]+
|
|
384
|
+
?)[ \r ]*`,gv=`[̀-ͯ]`,_v=RegExp(gv+`+$`),vv=`(`+dv+`+)|`+(hv+`|`)+`([!-\\[\\]-‧-豈-]`+(gv+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(gv+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+mv)+(`|`+pv+`)`),yv=class{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(vv,`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 C_(`EOF`,new S_(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new L(`Unexpected character: '`+e[t]+`'`,new C_(e[t],new S_(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|
|
385
|
+
`,this.tokenRegex.lastIndex);return i===-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=i+1,this.lex()}return new C_(r,new S_(this,t,this.tokenRegex.lastIndex))}},bv=class{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 L(`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 i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},xv=x_,I(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),I(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),I(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),I(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),I(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),I(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),I(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),Sv={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},I(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new L("\\char` missing argument");else r=t.text.charCodeAt(0);else n=10;if(n){if(r=Sv[t.text],r==null||r>=n)throw new L(`Invalid base-`+n+` digit `+t.text);for(var i;(i=Sv[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`}),Cv=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new L(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new L(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new L(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new L(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``},I(`\\newcommand`,e=>Cv(e,!1,!0,!1)),I(`\\renewcommand`,e=>Cv(e,!0,!1,!1)),I(`\\providecommand`,e=>Cv(e,!0,!0,!0)),I(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),I(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),I(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),uv[n],Tm.math[n],Tm.text[n]),``}),I(`\\bgroup`,`{`),I(`\\egroup`,`}`),I(`~`,`\\nobreakspace`),I(`\\lq`,"`"),I(`\\rq`,`'`),I(`\\aa`,`\\r a`),I(`\\AA`,`\\r A`),I(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),I(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),I(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),I(`ℬ`,`\\mathscr{B}`),I(`ℰ`,`\\mathscr{E}`),I(`ℱ`,`\\mathscr{F}`),I(`ℋ`,`\\mathscr{H}`),I(`ℐ`,`\\mathscr{I}`),I(`ℒ`,`\\mathscr{L}`),I(`ℳ`,`\\mathscr{M}`),I(`ℛ`,`\\mathscr{R}`),I(`ℭ`,`\\mathfrak{C}`),I(`ℌ`,`\\mathfrak{H}`),I(`ℨ`,`\\mathfrak{Z}`),I(`\\Bbbk`,`\\Bbb{k}`),I(`\\llap`,`\\mathllap{\\textrm{#1}}`),I(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),I(`\\clap`,`\\mathclap{\\textrm{#1}}`),I(`\\mathstrut`,`\\vphantom{(}`),I(`\\underbar`,`\\underline{\\text{#1}}`),I(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),I(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),I(`\\ne`,`\\neq`),I(`≠`,`\\neq`),I(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),I(`∉`,`\\notin`),I(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),I(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),I(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),I(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),I(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),I(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),I(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),I(`⟂`,`\\perp`),I(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),I(`∌`,`\\notni`),I(`⌜`,`\\ulcorner`),I(`⌝`,`\\urcorner`),I(`⌞`,`\\llcorner`),I(`⌟`,`\\lrcorner`),I(`©`,`\\copyright`),I(`®`,`\\textregistered`),I(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),I(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),I(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),I(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),I(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),I(`⋮`,`\\vdots`),I(`\\varGamma`,`\\mathit{\\Gamma}`),I(`\\varDelta`,`\\mathit{\\Delta}`),I(`\\varTheta`,`\\mathit{\\Theta}`),I(`\\varLambda`,`\\mathit{\\Lambda}`),I(`\\varXi`,`\\mathit{\\Xi}`),I(`\\varPi`,`\\mathit{\\Pi}`),I(`\\varSigma`,`\\mathit{\\Sigma}`),I(`\\varUpsilon`,`\\mathit{\\Upsilon}`),I(`\\varPhi`,`\\mathit{\\Phi}`),I(`\\varPsi`,`\\mathit{\\Psi}`),I(`\\varOmega`,`\\mathit{\\Omega}`),I(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),I(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),I(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),I(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),I(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),I(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),I(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),I(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`),wv={",":`\\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`},Tv=new Set([`bin`,`rel`]),I(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in wv?t=wv[n]:(n.slice(0,4)===`\\not`||n in Tm.math&&Tv.has(Tm.math[n].group))&&(t=`\\dotsb`),t}),Ev={")":!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},I(`\\dotso`,function(e){return e.future().text in Ev?`\\ldots\\,`:`\\ldots`}),I(`\\dotsc`,function(e){var t=e.future().text;return t in Ev&&t!==`,`?`\\ldots\\,`:`\\ldots`}),I(`\\cdots`,function(e){return e.future().text in Ev?`\\@cdots\\,`:`\\@cdots`}),I(`\\dotsb`,`\\cdots`),I(`\\dotsm`,`\\cdots`),I(`\\dotsi`,`\\!\\cdots`),I(`\\dotsx`,`\\ldots\\,`),I(`\\DOTSI`,`\\relax`),I(`\\DOTSB`,`\\relax`),I(`\\DOTSX`,`\\relax`),I(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),I(`\\,`,`\\tmspace+{3mu}{.1667em}`),I(`\\thinspace`,`\\,`),I(`\\>`,`\\mskip{4mu}`),I(`\\:`,`\\tmspace+{4mu}{.2222em}`),I(`\\medspace`,`\\:`),I(`\\;`,`\\tmspace+{5mu}{.2777em}`),I(`\\thickspace`,`\\;`),I(`\\!`,`\\tmspace-{3mu}{.1667em}`),I(`\\negthinspace`,`\\!`),I(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),I(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),I(`\\enspace`,`\\kern.5em `),I(`\\enskip`,`\\hskip.5em\\relax`),I(`\\quad`,`\\hskip1em\\relax`),I(`\\qquad`,`\\hskip2em\\relax`),I(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),I(`\\tag@paren`,`\\tag@literal{({#1})}`),I(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new L(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),I(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),I(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),I(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),I(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),I(`\\newline`,`\\\\\\relax`),I(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`),Dv=z(xm[`Main-Regular`][84][1]-.7*xm[`Main-Regular`][65][1]),I(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Dv+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),I(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Dv+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),I(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),I(`\\@hspace`,`\\hskip #1\\relax`),I(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),I(`\\ordinarycolon`,`:`),I(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),I(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),I(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),I(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),I(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),I(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),I(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),I(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),I(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),I(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),I(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),I(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),I(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),I(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),I(`∷`,`\\dblcolon`),I(`∹`,`\\eqcolon`),I(`≔`,`\\coloneqq`),I(`≕`,`\\eqqcolon`),I(`⩴`,`\\Coloneqq`),I(`\\ratio`,`\\vcentcolon`),I(`\\coloncolon`,`\\dblcolon`),I(`\\colonequals`,`\\coloneqq`),I(`\\coloncolonequals`,`\\Coloneqq`),I(`\\equalscolon`,`\\eqqcolon`),I(`\\equalscoloncolon`,`\\Eqqcolon`),I(`\\colonminus`,`\\coloneq`),I(`\\coloncolonminus`,`\\Coloneq`),I(`\\minuscolon`,`\\eqcolon`),I(`\\minuscoloncolon`,`\\Eqcolon`),I(`\\coloncolonapprox`,`\\Colonapprox`),I(`\\coloncolonsim`,`\\Colonsim`),I(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),I(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),I(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),I(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),I(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),I(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),I(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),I(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),I(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),I(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),I(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),I(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),I(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),I(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),I(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),I(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),I(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),I(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),I(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),I(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),I(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),I(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),I(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),I(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),I(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),I(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),I(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),I(`\\imath`,`\\html@mathml{\\@imath}{ı}`),I(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),I(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),I(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),I(`⟦`,`\\llbracket`),I(`⟧`,`\\rrbracket`),I(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),I(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),I(`⦃`,`\\lBrace`),I(`⦄`,`\\rBrace`),I(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),I(`⦵`,`\\minuso`),I(`\\darr`,`\\downarrow`),I(`\\dArr`,`\\Downarrow`),I(`\\Darr`,`\\Downarrow`),I(`\\lang`,`\\langle`),I(`\\rang`,`\\rangle`),I(`\\uarr`,`\\uparrow`),I(`\\uArr`,`\\Uparrow`),I(`\\Uarr`,`\\Uparrow`),I(`\\N`,`\\mathbb{N}`),I(`\\R`,`\\mathbb{R}`),I(`\\Z`,`\\mathbb{Z}`),I(`\\alef`,`\\aleph`),I(`\\alefsym`,`\\aleph`),I(`\\Alpha`,`\\mathrm{A}`),I(`\\Beta`,`\\mathrm{B}`),I(`\\bull`,`\\bullet`),I(`\\Chi`,`\\mathrm{X}`),I(`\\clubs`,`\\clubsuit`),I(`\\cnums`,`\\mathbb{C}`),I(`\\Complex`,`\\mathbb{C}`),I(`\\Dagger`,`\\ddagger`),I(`\\diamonds`,`\\diamondsuit`),I(`\\empty`,`\\emptyset`),I(`\\Epsilon`,`\\mathrm{E}`),I(`\\Eta`,`\\mathrm{H}`),I(`\\exist`,`\\exists`),I(`\\harr`,`\\leftrightarrow`),I(`\\hArr`,`\\Leftrightarrow`),I(`\\Harr`,`\\Leftrightarrow`),I(`\\hearts`,`\\heartsuit`),I(`\\image`,`\\Im`),I(`\\infin`,`\\infty`),I(`\\Iota`,`\\mathrm{I}`),I(`\\isin`,`\\in`),I(`\\Kappa`,`\\mathrm{K}`),I(`\\larr`,`\\leftarrow`),I(`\\lArr`,`\\Leftarrow`),I(`\\Larr`,`\\Leftarrow`),I(`\\lrarr`,`\\leftrightarrow`),I(`\\lrArr`,`\\Leftrightarrow`),I(`\\Lrarr`,`\\Leftrightarrow`),I(`\\Mu`,`\\mathrm{M}`),I(`\\natnums`,`\\mathbb{N}`),I(`\\Nu`,`\\mathrm{N}`),I(`\\Omicron`,`\\mathrm{O}`),I(`\\plusmn`,`\\pm`),I(`\\rarr`,`\\rightarrow`),I(`\\rArr`,`\\Rightarrow`),I(`\\Rarr`,`\\Rightarrow`),I(`\\real`,`\\Re`),I(`\\reals`,`\\mathbb{R}`),I(`\\Reals`,`\\mathbb{R}`),I(`\\Rho`,`\\mathrm{P}`),I(`\\sdot`,`\\cdot`),I(`\\sect`,`\\S`),I(`\\spades`,`\\spadesuit`),I(`\\sub`,`\\subset`),I(`\\sube`,`\\subseteq`),I(`\\supe`,`\\supseteq`),I(`\\Tau`,`\\mathrm{T}`),I(`\\thetasym`,`\\vartheta`),I(`\\weierp`,`\\wp`),I(`\\Zeta`,`\\mathrm{Z}`),I(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),I(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),I(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),I(`\\bra`,`\\mathinner{\\langle{#1}|}`),I(`\\ket`,`\\mathinner{|{#1}\\rangle}`),I(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),I(`\\Bra`,`\\left\\langle#1\\right|`),I(`\\Ket`,`\\left|#1\\right\\rangle`),Ov=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}},I(`\\bra@ket`,Ov(!1)),I(`\\bra@set`,Ov(!0)),I(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),I(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),I(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),I(`\\angln`,`{\\angl n}`),I(`\\blue`,`\\textcolor{##6495ed}{#1}`),I(`\\orange`,`\\textcolor{##ffa500}{#1}`),I(`\\pink`,`\\textcolor{##ff00af}{#1}`),I(`\\red`,`\\textcolor{##df0030}{#1}`),I(`\\green`,`\\textcolor{##28ae7b}{#1}`),I(`\\gray`,`\\textcolor{gray}{#1}`),I(`\\purple`,`\\textcolor{##9d38bd}{#1}`),I(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),I(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),I(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),I(`\\blueD`,`\\textcolor{##11accd}{#1}`),I(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),I(`\\tealA`,`\\textcolor{##94fff5}{#1}`),I(`\\tealB`,`\\textcolor{##26edd5}{#1}`),I(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),I(`\\tealD`,`\\textcolor{##01a995}{#1}`),I(`\\tealE`,`\\textcolor{##208170}{#1}`),I(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),I(`\\greenB`,`\\textcolor{##8af281}{#1}`),I(`\\greenC`,`\\textcolor{##74cf70}{#1}`),I(`\\greenD`,`\\textcolor{##1fab54}{#1}`),I(`\\greenE`,`\\textcolor{##0d923f}{#1}`),I(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),I(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),I(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),I(`\\goldD`,`\\textcolor{##e07d10}{#1}`),I(`\\goldE`,`\\textcolor{##a75a05}{#1}`),I(`\\redA`,`\\textcolor{##fca9a9}{#1}`),I(`\\redB`,`\\textcolor{##ff8482}{#1}`),I(`\\redC`,`\\textcolor{##f9685d}{#1}`),I(`\\redD`,`\\textcolor{##e84d39}{#1}`),I(`\\redE`,`\\textcolor{##bc2612}{#1}`),I(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),I(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),I(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),I(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),I(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),I(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),I(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),I(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),I(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),I(`\\purpleE`,`\\textcolor{##543b78}{#1}`),I(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),I(`\\mintB`,`\\textcolor{##edf2df}{#1}`),I(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),I(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),I(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),I(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),I(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),I(`\\grayE`,`\\textcolor{##babec2}{#1}`),I(`\\grayF`,`\\textcolor{##888d93}{#1}`),I(`\\grayG`,`\\textcolor{##626569}{#1}`),I(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),I(`\\grayI`,`\\textcolor{##21242c}{#1}`),I(`\\kaBlue`,`\\textcolor{##314453}{#1}`),I(`\\kaGreen`,`\\textcolor{##71B307}{#1}`),kv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Av=class{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 bv(xv,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new yv(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 C_(`EOF`,n.loc)),this.pushTokens(r),new C_(``,S_.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new L(`Extra }`,i)}else if(i.text===`EOF`)throw new L(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n)if((a===0||a===1&&e[o]===`{`)&&i.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:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new L(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new L(`Use of the macro doesn't match its definition`,i)}}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 L(`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 L(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new L(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new L(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.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 C_(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,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.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 i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new yv(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||uv.hasOwnProperty(e)||Tm.math.hasOwnProperty(e)||Tm.text.hasOwnProperty(e)||kv.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?uv.hasOwnProperty(e)&&!uv[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},jv=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Mv=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`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Nv={"́":{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`}},Pv={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Fv=class e{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 Av(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 L(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return 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 C_(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&uv[i.text]&&uv[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new L(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),c=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=c.length===1&&c[0].type===`ordgroup`?c[0]:{type:`ordgroup`,mode:this.mode,body:c},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}else return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new L(`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};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new L(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new L(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new L(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new L(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(Mv[i.text]){var s=jv.test(i.text),c=[];for(c.push(new C_(Mv[i.text])),this.consume();;){var l=this.fetch().text;if(!Mv[l]||jv.test(l)!==s)break;c.unshift(new C_(Mv[l])),this.consume()}var u=this.subparse(c);s?r={type:`ordgroup`,mode:`math`,body:u}:n={type:`ordgroup`,mode:`math`,body:u}}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,i=uv[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new L(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new L(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new L(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=uv[e];if(o&&o.handler)return o.handler(a,t,n);throw new L(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var c=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(c);else if(c!=null)r.push(c);else throw new L(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}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?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new L(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new L(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new L(`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=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new L(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}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 L(`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(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):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 L(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!im(i))throw new L(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,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 i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:S_.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!kv.hasOwnProperty(r)){if(this.settings.throwOnError)throw new L(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&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:S_.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:S_.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:S_.range(r,a),text:i+i}),--t)}}}}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 L(`\\verb assertion failed --
|
|
386
|
+
please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}Pv.hasOwnProperty(t[0])&&!Tm[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=Pv[t[0]]+t.slice(1));var i=_v.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(Tm[this.mode][t]){this.settings.strict&&this.mode===`math`&&qm.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=Tm[this.mode][t].group,s=S_.range(e);a=Xf(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(Lf(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:S_.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c<i[0].length;c++){var l=i[0][c];if(!Nv[l])throw new L(`Unknown accent ' `+l+`'`,e);var u=Nv[l][this.mode]||Nv[l].text;if(!u)throw new L(`Accent `+l+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:S_.range(e),label:u,isStretchy:!1,isShifty:!0,base:a}}return a}},Fv.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]),Iv=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new Fv(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 L(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new C_(`\\df@tag`)])}]}return r},Lv=function(e,t,n){t.textContent=``;var r=Vv(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.`),Lv=function(){throw new L(`KaTeX doesn't work in quirks mode.`)}),Rv=function(e,t){return Vv(e,t).toMarkup()},zv=function(e,t){return Iv(e,new Cp(t))},Bv=function(e,t,n){if(n.throwOnError||!(e instanceof L))throw e;var r=Y([`katex-error`],[new gm(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Vv=function(e,t){var n=new Cp(t);try{return hg(Iv(e,n),e,n)}catch(t){return Bv(t,e,n)}},Hv=function(e,t){var n=new Cp(t);try{return gg(Iv(e,n),e,n)}catch(t){return Bv(t,e,n)}},Uv=`0.16.47`,Wv={Span:fm,Anchor:pm,SymbolNode:gm,SvgNode:_m,PathNode:vm,LineNode:ym},Gv={version:Uv,render:Lv,renderToString:Rv,ParseError:L,SETTINGS_SCHEMA:Sp,__parse:zv,__renderToDomTree:Vv,__renderToHTMLTree:Hv,__setFontMetrics:Vf,__defineSymbol:N,__defineFunction:P,__defineMacro:I,__domTree:Wv}}));function qv(){this.__data__=[],this.size=0}var Jv=m((()=>{}));function Yv(e,t){return e===t||e!==e&&t!==t}var Xv=m((()=>{}));function Zv(e,t){for(var n=e.length;n--;)if(Yv(e[n][0],t))return n;return-1}var Qv=m((()=>{Xv()}));function $v(e){var t=this.__data__,n=Zv(t,e);return n<0?!1:(n==t.length-1?t.pop():ey.call(t,n,1),--this.size,!0)}var ey,ty=m((()=>{Qv(),ey=Array.prototype.splice}));function ny(e){var t=this.__data__,n=Zv(t,e);return n<0?void 0:t[n][1]}var ry=m((()=>{Qv()}));function iy(e){return Zv(this.__data__,e)>-1}var ay=m((()=>{Qv()}));function oy(e,t){var n=this.__data__,r=Zv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var sy=m((()=>{Qv()}));function cy(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var ly=m((()=>{Jv(),ty(),ry(),ay(),sy(),cy.prototype.clear=qv,cy.prototype.delete=$v,cy.prototype.get=ny,cy.prototype.has=iy,cy.prototype.set=oy}));function uy(){this.__data__=new cy,this.size=0}var dy=m((()=>{ly()}));function fy(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var py=m((()=>{}));function my(e){return this.__data__.get(e)}var hy=m((()=>{}));function gy(e){return this.__data__.has(e)}var _y=m((()=>{})),vy,yy=m((()=>{vy=typeof global==`object`&&global&&global.Object===Object&&global})),by,xy,Sy=m((()=>{yy(),by=typeof self==`object`&&self&&self.Object===Object&&self,xy=vy||by||Function(`return this`)()})),Cy,wy=m((()=>{Sy(),Cy=xy.Symbol}));function Ty(e){var t=Dy.call(e,ky),n=e[ky];try{e[ky]=void 0;var r=!0}catch{}var i=Oy.call(e);return r&&(t?e[ky]=n:delete e[ky]),i}var Ey,Dy,Oy,ky,Ay=m((()=>{wy(),Ey=Object.prototype,Dy=Ey.hasOwnProperty,Oy=Ey.toString,ky=Cy?Cy.toStringTag:void 0}));function jy(e){return My.call(e)}var My,Ny=m((()=>{My=Object.prototype.toString}));function Py(e){return e==null?e===void 0?Iy:Fy:Ly&&Ly in Object(e)?Ty(e):jy(e)}var Fy,Iy,Ly,Ry=m((()=>{wy(),Ay(),Ny(),Fy=`[object Null]`,Iy=`[object Undefined]`,Ly=Cy?Cy.toStringTag:void 0}));function zy(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var By=m((()=>{}));function Vy(e){if(!zy(e))return!1;var t=Py(e);return t==Uy||t==Wy||t==Hy||t==Gy}var Hy,Uy,Wy,Gy,Ky=m((()=>{Ry(),By(),Hy=`[object AsyncFunction]`,Uy=`[object Function]`,Wy=`[object GeneratorFunction]`,Gy=`[object Proxy]`})),qy,Jy=m((()=>{Sy(),qy=xy[`__core-js_shared__`]}));function Yy(e){return!!Xy&&Xy in e}var Xy,Zy=m((()=>{Jy(),Xy=function(){var e=/[^.]+$/.exec(qy&&qy.keys&&qy.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function Qy(e){if(e!=null){try{return $y.call(e)}catch{}try{return e+``}catch{}}return``}var $y,eb=m((()=>{$y=Function.prototype.toString}));function tb(e){return!zy(e)||Yy(e)?!1:(Vy(e)?cb:rb).test(Qy(e))}var nb,rb,ib,ab,ob,sb,cb,lb=m((()=>{Ky(),Zy(),By(),eb(),nb=/[\\^$.*+?()[\]{}|]/g,rb=/^\[object .+?Constructor\]$/,ib=Function.prototype,ab=Object.prototype,ob=ib.toString,sb=ab.hasOwnProperty,cb=RegExp(`^`+ob.call(sb).replace(nb,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function ub(e,t){return e?.[t]}var db=m((()=>{}));function fb(e,t){var n=ub(e,t);return tb(n)?n:void 0}var pb=m((()=>{lb(),db()})),mb,hb=m((()=>{pb(),Sy(),mb=fb(xy,`Map`)})),gb,_b=m((()=>{pb(),gb=fb(Object,`create`)}));function vb(){this.__data__=gb?gb(null):{},this.size=0}var yb=m((()=>{_b()}));function bb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var xb=m((()=>{}));function Sb(e){var t=this.__data__;if(gb){var n=t[e];return n===Cb?void 0:n}return wb.call(t,e)?t[e]:void 0}var Cb,wb,Tb=m((()=>{_b(),Cb=`__lodash_hash_undefined__`,wb=Object.prototype.hasOwnProperty}));function Eb(e){var t=this.__data__;return gb?t[e]!==void 0:Db.call(t,e)}var Db,Ob=m((()=>{_b(),Db=Object.prototype.hasOwnProperty}));function kb(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=gb&&t===void 0?Ab:t,this}var Ab,jb=m((()=>{_b(),Ab=`__lodash_hash_undefined__`}));function Mb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var Nb=m((()=>{yb(),xb(),Tb(),Ob(),jb(),Mb.prototype.clear=vb,Mb.prototype.delete=bb,Mb.prototype.get=Sb,Mb.prototype.has=Eb,Mb.prototype.set=kb}));function Pb(){this.size=0,this.__data__={hash:new Mb,map:new(mb||cy),string:new Mb}}var Fb=m((()=>{Nb(),ly(),hb()}));function Ib(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var Lb=m((()=>{}));function Rb(e,t){var n=e.__data__;return Ib(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var zb=m((()=>{Lb()}));function Bb(e){var t=Rb(this,e).delete(e);return this.size-=+!!t,t}var Vb=m((()=>{zb()}));function Hb(e){return Rb(this,e).get(e)}var Ub=m((()=>{zb()}));function Wb(e){return Rb(this,e).has(e)}var Gb=m((()=>{zb()}));function Kb(e,t){var n=Rb(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var qb=m((()=>{zb()}));function Jb(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var Yb=m((()=>{Fb(),Vb(),Ub(),Gb(),qb(),Jb.prototype.clear=Pb,Jb.prototype.delete=Bb,Jb.prototype.get=Hb,Jb.prototype.has=Wb,Jb.prototype.set=Kb}));function Xb(e,t){var n=this.__data__;if(n instanceof cy){var r=n.__data__;if(!mb||r.length<Zb-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jb(r)}return n.set(e,t),this.size=n.size,this}var Zb,Qb=m((()=>{ly(),hb(),Yb(),Zb=200}));function $b(e){var t=this.__data__=new cy(e);this.size=t.size}var ex=m((()=>{ly(),dy(),py(),hy(),_y(),Qb(),$b.prototype.clear=uy,$b.prototype.delete=fy,$b.prototype.get=my,$b.prototype.has=gy,$b.prototype.set=Xb}));function tx(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var nx=m((()=>{})),rx,ix=m((()=>{pb(),rx=function(){try{var e=fb(Object,`defineProperty`);return e({},``,{}),e}catch{}}()}));function ax(e,t,n){t==`__proto__`&&rx?rx(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ox=m((()=>{ix()}));function sx(e,t,n){var r=e[t];(!(cx.call(e,t)&&Yv(r,n))||n===void 0&&!(t in e))&&ax(e,t,n)}var cx,lx=m((()=>{ox(),Xv(),cx=Object.prototype.hasOwnProperty}));function ux(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?ax(n,s,c):sx(n,s,c)}return n}var dx=m((()=>{lx(),ox()}));function fx(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var px=m((()=>{}));function mx(e){return typeof e==`object`&&!!e}var hx=m((()=>{}));function gx(e){return mx(e)&&Py(e)==_x}var _x,vx=m((()=>{Ry(),hx(),_x=`[object Arguments]`})),yx,bx,xx,Sx,Cx=m((()=>{vx(),hx(),yx=Object.prototype,bx=yx.hasOwnProperty,xx=yx.propertyIsEnumerable,Sx=gx(function(){return arguments}())?gx:function(e){return mx(e)&&bx.call(e,`callee`)&&!xx.call(e,`callee`)}})),wx,Tx=m((()=>{wx=Array.isArray}));function Ex(){return!1}var Dx=m((()=>{})),Ox,kx,Ax,jx,Mx=m((()=>{Sy(),Dx(),Ox=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kx=Ox&&typeof module==`object`&&module&&!module.nodeType&&module,Ax=kx&&kx.exports===Ox?xy.Buffer:void 0,jx=(Ax?Ax.isBuffer:void 0)||Ex}));function Nx(e,t){var n=typeof e;return t??=Px,!!t&&(n==`number`||n!=`symbol`&&Fx.test(e))&&e>-1&&e%1==0&&e<t}var Px,Fx,Ix=m((()=>{Px=9007199254740991,Fx=/^(?:0|[1-9]\d*)$/}));function Lx(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Rx}var Rx,zx=m((()=>{Rx=9007199254740991}));function Bx(e){return mx(e)&&Lx(e.length)&&!!dS[Py(e)]}var Vx,Hx,Ux,Wx,Gx,Kx,qx,Jx,Yx,Xx,Zx,Qx,$x,eS,tS,nS,rS,iS,aS,oS,sS,cS,lS,uS,dS,fS=m((()=>{Ry(),zx(),hx(),Vx=`[object Arguments]`,Hx=`[object Array]`,Ux=`[object Boolean]`,Wx=`[object Date]`,Gx=`[object Error]`,Kx=`[object Function]`,qx=`[object Map]`,Jx=`[object Number]`,Yx=`[object Object]`,Xx=`[object RegExp]`,Zx=`[object Set]`,Qx=`[object String]`,$x=`[object WeakMap]`,eS=`[object ArrayBuffer]`,tS=`[object DataView]`,nS=`[object Float32Array]`,rS=`[object Float64Array]`,iS=`[object Int8Array]`,aS=`[object Int16Array]`,oS=`[object Int32Array]`,sS=`[object Uint8Array]`,cS=`[object Uint8ClampedArray]`,lS=`[object Uint16Array]`,uS=`[object Uint32Array]`,dS={},dS[nS]=dS[rS]=dS[iS]=dS[aS]=dS[oS]=dS[sS]=dS[cS]=dS[lS]=dS[uS]=!0,dS[Vx]=dS[Hx]=dS[eS]=dS[Ux]=dS[tS]=dS[Wx]=dS[Gx]=dS[Kx]=dS[qx]=dS[Jx]=dS[Yx]=dS[Xx]=dS[Zx]=dS[Qx]=dS[$x]=!1}));function pS(e){return function(t){return e(t)}}var mS=m((()=>{})),hS,gS,_S,vS,yS=m((()=>{yy(),hS=typeof exports==`object`&&exports&&!exports.nodeType&&exports,gS=hS&&typeof module==`object`&&module&&!module.nodeType&&module,_S=gS&&gS.exports===hS&&vy.process,vS=function(){try{return gS&&gS.require&&gS.require(`util`).types||_S&&_S.binding&&_S.binding(`util`)}catch{}}()})),bS,xS,SS=m((()=>{fS(),mS(),yS(),bS=vS&&vS.isTypedArray,xS=bS?pS(bS):Bx}));function CS(e,t){var n=wx(e),r=!n&&Sx(e),i=!n&&!r&&jx(e),a=!n&&!r&&!i&&xS(e),o=n||r||i||a,s=o?fx(e.length,String):[],c=s.length;for(var l in e)(t||wS.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Nx(l,c)))&&s.push(l);return s}var wS,TS=m((()=>{px(),Cx(),Tx(),Mx(),Ix(),SS(),wS=Object.prototype.hasOwnProperty}));function ES(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||DS)}var DS,OS=m((()=>{DS=Object.prototype}));function kS(e,t){return function(n){return e(t(n))}}var AS=m((()=>{})),jS,MS=m((()=>{AS(),jS=kS(Object.keys,Object)}));function NS(e){if(!ES(e))return jS(e);var t=[];for(var n in Object(e))PS.call(e,n)&&n!=`constructor`&&t.push(n);return t}var PS,FS=m((()=>{OS(),MS(),PS=Object.prototype.hasOwnProperty}));function IS(e){return e!=null&&Lx(e.length)&&!Vy(e)}var LS=m((()=>{Ky(),zx()}));function RS(e){return IS(e)?CS(e):NS(e)}var zS=m((()=>{TS(),FS(),LS()}));function BS(e,t){return e&&ux(t,RS(t),e)}var VS=m((()=>{dx(),zS()}));function HS(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var US=m((()=>{}));function WS(e){if(!zy(e))return HS(e);var t=ES(e),n=[];for(var r in e)r==`constructor`&&(t||!GS.call(e,r))||n.push(r);return n}var GS,KS=m((()=>{By(),OS(),US(),GS=Object.prototype.hasOwnProperty}));function qS(e){return IS(e)?CS(e,!0):WS(e)}var JS=m((()=>{TS(),KS(),LS()}));function YS(e,t){return e&&ux(t,qS(t),e)}var XS=m((()=>{dx(),JS()}));function ZS(e,t){if(t)return e.slice();var n=e.length,r=tC?tC(n):new e.constructor(n);return e.copy(r),r}var QS,$S,eC,tC,nC=m((()=>{Sy(),QS=typeof exports==`object`&&exports&&!exports.nodeType&&exports,$S=QS&&typeof module==`object`&&module&&!module.nodeType&&module,eC=$S&&$S.exports===QS?xy.Buffer:void 0,tC=eC?eC.allocUnsafe:void 0}));function rC(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var iC=m((()=>{}));function aC(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var oC=m((()=>{}));function sC(){return[]}var cC=m((()=>{})),lC,uC,dC,fC=m((()=>{oC(),cC(),lC=Object.prototype.propertyIsEnumerable,uC=Object.getOwnPropertySymbols,dC=uC?function(e){return e==null?[]:(e=Object(e),aC(uC(e),function(t){return lC.call(e,t)}))}:sC}));function pC(e,t){return ux(e,dC(e),t)}var mC=m((()=>{dx(),fC()}));function hC(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var gC=m((()=>{})),_C,vC=m((()=>{AS(),_C=kS(Object.getPrototypeOf,Object)})),yC,bC=m((()=>{gC(),vC(),fC(),cC(),yC=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)hC(t,dC(e)),e=_C(e);return t}:sC}));function xC(e,t){return ux(e,yC(e),t)}var SC=m((()=>{dx(),bC()}));function CC(e,t,n){var r=t(e);return wx(e)?r:hC(r,n(e))}var wC=m((()=>{gC(),Tx()}));function TC(e){return CC(e,RS,dC)}var EC=m((()=>{wC(),fC(),zS()}));function DC(e){return CC(e,qS,yC)}var OC=m((()=>{wC(),bC(),JS()})),kC,AC=m((()=>{pb(),Sy(),kC=fb(xy,`DataView`)})),jC,MC=m((()=>{pb(),Sy(),jC=fb(xy,`Promise`)})),NC,PC=m((()=>{pb(),Sy(),NC=fb(xy,`Set`)})),FC,IC=m((()=>{pb(),Sy(),FC=fb(xy,`WeakMap`)})),LC,RC,zC,BC,VC,HC,UC,WC,GC,KC,qC,JC,YC,XC=m((()=>{AC(),hb(),MC(),PC(),IC(),Ry(),eb(),LC=`[object Map]`,RC=`[object Object]`,zC=`[object Promise]`,BC=`[object Set]`,VC=`[object WeakMap]`,HC=`[object DataView]`,UC=Qy(kC),WC=Qy(mb),GC=Qy(jC),KC=Qy(NC),qC=Qy(FC),JC=Py,(kC&&JC(new kC(new ArrayBuffer(1)))!=HC||mb&&JC(new mb)!=LC||jC&&JC(jC.resolve())!=zC||NC&&JC(new NC)!=BC||FC&&JC(new FC)!=VC)&&(JC=function(e){var t=Py(e),n=t==RC?e.constructor:void 0,r=n?Qy(n):``;if(r)switch(r){case UC:return HC;case WC:return LC;case GC:return zC;case KC:return BC;case qC:return VC}return t}),YC=JC}));function ZC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&QC.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var QC,$C=m((()=>{QC=Object.prototype.hasOwnProperty})),ew,tw=m((()=>{Sy(),ew=xy.Uint8Array}));function nw(e){var t=new e.constructor(e.byteLength);return new ew(t).set(new ew(e)),t}var rw=m((()=>{tw()}));function iw(e,t){var n=t?nw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var aw=m((()=>{rw()}));function ow(e){var t=new e.constructor(e.source,sw.exec(e));return t.lastIndex=e.lastIndex,t}var sw,cw=m((()=>{sw=/\w*$/}));function lw(e){return dw?Object(dw.call(e)):{}}var uw,dw,fw=m((()=>{wy(),uw=Cy?Cy.prototype:void 0,dw=uw?uw.valueOf:void 0}));function pw(e,t){var n=t?nw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var mw=m((()=>{rw()}));function hw(e,t,n){var r=e.constructor;switch(t){case ww:return nw(e);case gw:case _w:return new r(+e);case Tw:return iw(e,n);case Ew:case Dw:case Ow:case kw:case Aw:case jw:case Mw:case Nw:case Pw:return pw(e,n);case vw:return new r;case yw:case Sw:return new r(e);case bw:return ow(e);case xw:return new r;case Cw:return lw(e)}}var gw,_w,vw,yw,bw,xw,Sw,Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw,Mw,Nw,Pw,Fw=m((()=>{rw(),aw(),cw(),fw(),mw(),gw=`[object Boolean]`,_w=`[object Date]`,vw=`[object Map]`,yw=`[object Number]`,bw=`[object RegExp]`,xw=`[object Set]`,Sw=`[object String]`,Cw=`[object Symbol]`,ww=`[object ArrayBuffer]`,Tw=`[object DataView]`,Ew=`[object Float32Array]`,Dw=`[object Float64Array]`,Ow=`[object Int8Array]`,kw=`[object Int16Array]`,Aw=`[object Int32Array]`,jw=`[object Uint8Array]`,Mw=`[object Uint8ClampedArray]`,Nw=`[object Uint16Array]`,Pw=`[object Uint32Array]`})),Iw,Lw,Rw=m((()=>{By(),Iw=Object.create,Lw=function(){function e(){}return function(t){if(!zy(t))return{};if(Iw)return Iw(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function zw(e){return typeof e.constructor==`function`&&!ES(e)?Lw(_C(e)):{}}var Bw=m((()=>{Rw(),vC(),OS()}));function Vw(e){return mx(e)&&YC(e)==Hw}var Hw,Uw=m((()=>{XC(),hx(),Hw=`[object Map]`})),Ww,Gw,Kw=m((()=>{Uw(),mS(),yS(),Ww=vS&&vS.isMap,Gw=Ww?pS(Ww):Vw}));function qw(e){return mx(e)&&YC(e)==Jw}var Jw,Yw=m((()=>{XC(),hx(),Jw=`[object Set]`})),Xw,Zw,Qw=m((()=>{Yw(),mS(),yS(),Xw=vS&&vS.isSet,Zw=Xw?pS(Xw):qw}));function $w(e,t,n,r,i,a){var o,s=t&eT,c=t&tT,l=t&nT;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!zy(e))return e;var u=wx(e);if(u){if(o=ZC(e),!s)return rC(e,o)}else{var d=YC(e),f=d==cT||d==lT;if(jx(e))return ZS(e,s);if(d==fT||d==rT||f&&!i){if(o=c||f?{}:zw(e),!s)return c?xC(e,YS(o,e)):pC(e,BS(o,e))}else{if(!kT[d])return i?e:{};o=hw(e,d,s)}}a||=new $b;var p=a.get(e);if(p)return p;a.set(e,o),Zw(e)?e.forEach(function(r){o.add($w(r,t,n,r,e,a))}):Gw(e)&&e.forEach(function(r,i){o.set(i,$w(r,t,n,i,e,a))});var m=u?void 0:(l?c?DC:TC:c?qS:RS)(e);return tx(m||e,function(r,i){m&&(i=r,r=e[i]),sx(o,i,$w(r,t,n,i,e,a))}),o}var eT,tT,nT,rT,iT,aT,oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT,xT,ST,CT,wT,TT,ET,DT,OT,kT,AT=m((()=>{ex(),nx(),lx(),VS(),XS(),nC(),iC(),mC(),SC(),EC(),OC(),XC(),$C(),Fw(),Bw(),Tx(),Mx(),Kw(),By(),Qw(),zS(),JS(),eT=1,tT=2,nT=4,rT=`[object Arguments]`,iT=`[object Array]`,aT=`[object Boolean]`,oT=`[object Date]`,sT=`[object Error]`,cT=`[object Function]`,lT=`[object GeneratorFunction]`,uT=`[object Map]`,dT=`[object Number]`,fT=`[object Object]`,pT=`[object RegExp]`,mT=`[object Set]`,hT=`[object String]`,gT=`[object Symbol]`,_T=`[object WeakMap]`,vT=`[object ArrayBuffer]`,yT=`[object DataView]`,bT=`[object Float32Array]`,xT=`[object Float64Array]`,ST=`[object Int8Array]`,CT=`[object Int16Array]`,wT=`[object Int32Array]`,TT=`[object Uint8Array]`,ET=`[object Uint8ClampedArray]`,DT=`[object Uint16Array]`,OT=`[object Uint32Array]`,kT={},kT[rT]=kT[iT]=kT[vT]=kT[yT]=kT[aT]=kT[oT]=kT[bT]=kT[xT]=kT[ST]=kT[CT]=kT[wT]=kT[uT]=kT[dT]=kT[fT]=kT[pT]=kT[mT]=kT[hT]=kT[gT]=kT[TT]=kT[ET]=kT[DT]=kT[OT]=!0,kT[sT]=kT[cT]=kT[_T]=!1}));function jT(e){return $w(e,MT|NT)}var MT,NT,PT=m((()=>{AT(),MT=1,NT=4}));function FT(e){return this.__data__.set(e,IT),this}var IT,LT=m((()=>{IT=`__lodash_hash_undefined__`}));function RT(e){return this.__data__.has(e)}var zT=m((()=>{}));function BT(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Jb;++t<n;)this.add(e[t])}var VT=m((()=>{Yb(),LT(),zT(),BT.prototype.add=BT.prototype.push=FT,BT.prototype.has=RT}));function HT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var UT=m((()=>{}));function WT(e,t){return e.has(t)}var GT=m((()=>{}));function KT(e,t,n,r,i,a){var o=n&qT,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&JT?new BT:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!HT(t,function(e,t){if(!WT(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var qT,JT,YT=m((()=>{VT(),UT(),GT(),qT=1,JT=2}));function XT(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var ZT=m((()=>{}));function QT(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var $T=m((()=>{}));function eE(e,t,n,r,i,a,o){switch(n){case pE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fE:return!(e.byteLength!=t.byteLength||!a(new ew(e),new ew(t)));case rE:case iE:case sE:return Yv(+e,+t);case aE:return e.name==t.name&&e.message==t.message;case cE:case uE:return e==t+``;case oE:var s=XT;case lE:var c=r&tE;if(s||=QT,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=nE,o.set(e,t);var u=KT(s(e),s(t),r,i,a,o);return o.delete(e),u;case dE:if(hE)return hE.call(e)==hE.call(t)}return!1}var tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE=m((()=>{wy(),tw(),Xv(),YT(),ZT(),$T(),tE=1,nE=2,rE=`[object Boolean]`,iE=`[object Date]`,aE=`[object Error]`,oE=`[object Map]`,sE=`[object Number]`,cE=`[object RegExp]`,lE=`[object Set]`,uE=`[object String]`,dE=`[object Symbol]`,fE=`[object ArrayBuffer]`,pE=`[object DataView]`,mE=Cy?Cy.prototype:void 0,hE=mE?mE.valueOf:void 0}));function _E(e,t,n,r,i,a){var o=n&vE,s=TC(e),c=s.length;if(c!=TC(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:yE.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var vE,yE,bE=m((()=>{EC(),vE=1,yE=Object.prototype.hasOwnProperty}));function xE(e,t,n,r,i,a){var o=wx(e),s=wx(t),c=o?wE:YC(e),l=s?wE:YC(t);c=c==CE?TE:c,l=l==CE?TE:l;var u=c==TE,d=l==TE,f=c==l;if(f&&jx(e)){if(!jx(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new $b,o||xS(e)?KT(e,t,n,r,i,a):eE(e,t,c,n,r,i,a);if(!(n&SE)){var p=u&&EE.call(e,`__wrapped__`),m=d&&EE.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new $b,i(h,g,n,r,a)}}return f?(a||=new $b,_E(e,t,n,r,i,a)):!1}var SE,CE,wE,TE,EE,DE=m((()=>{ex(),YT(),gE(),bE(),XC(),Tx(),Mx(),SS(),SE=1,CE=`[object Arguments]`,wE=`[object Array]`,TE=`[object Object]`,EE=Object.prototype.hasOwnProperty}));function OE(e,t,n,r,i){return e===t?!0:e==null||t==null||!mx(e)&&!mx(t)?e!==e&&t!==t:xE(e,t,n,r,OE,i)}var kE=m((()=>{DE(),hx()}));function AE(e,t){return OE(e,t)}var jE=m((()=>{kE()}));function ME(e,t,n){(n!==void 0&&!Yv(e[t],n)||n===void 0&&!(t in e))&&ax(e,t,n)}var NE=m((()=>{ox(),Xv()}));function PE(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var FE=m((()=>{})),IE,LE=m((()=>{FE(),IE=PE()}));function RE(e){return mx(e)&&IS(e)}var zE=m((()=>{LS(),hx()}));function BE(e){if(!mx(e)||Py(e)!=VE)return!1;var t=_C(e);if(t===null)return!0;var n=GE.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&WE.call(n)==KE}var VE,HE,UE,WE,GE,KE,qE=m((()=>{Ry(),vC(),hx(),VE=`[object Object]`,HE=Function.prototype,UE=Object.prototype,WE=HE.toString,GE=UE.hasOwnProperty,KE=WE.call(Object)}));function JE(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var YE=m((()=>{}));function XE(e){return ux(e,qS(e))}var ZE=m((()=>{dx(),JS()}));function QE(e,t,n,r,i,a,o){var s=JE(e,n),c=JE(t,n),l=o.get(c);if(l){ME(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=wx(c),p=!f&&jx(c),m=!f&&!p&&xS(c);u=c,f||p||m?wx(s)?u=s:RE(s)?u=rC(s):p?(d=!1,u=ZS(c,!0)):m?(d=!1,u=pw(c,!0)):u=[]:BE(c)||Sx(c)?(u=s,Sx(s)?u=XE(s):(!zy(s)||Vy(s))&&(u=zw(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),ME(e,n,u)}var $E=m((()=>{NE(),nC(),mw(),iC(),Bw(),Cx(),Tx(),zE(),Mx(),Ky(),By(),qE(),SS(),YE(),ZE()}));function eD(e,t,n,r,i){e!==t&&IE(t,function(a,o){if(i||=new $b,zy(a))QE(e,t,o,n,eD,r,i);else{var s=r?r(JE(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),ME(e,o,s)}},qS)}var tD=m((()=>{ex(),NE(),LE(),$E(),By(),JS(),YE()}));function nD(e){return e}var rD=m((()=>{}));function iD(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var aD=m((()=>{}));function oD(e,t,n){return t=sD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=sD(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),iD(e,this,s)}}var sD,cD=m((()=>{aD(),sD=Math.max}));function lD(e){return function(){return e}}var uD=m((()=>{})),dD,fD=m((()=>{uD(),ix(),rD(),dD=rx?function(e,t){return rx(e,`toString`,{configurable:!0,enumerable:!1,value:lD(t),writable:!0})}:nD}));function pD(e){var t=0,n=0;return function(){var r=gD(),i=hD-(r-n);if(n=r,i>0){if(++t>=mD)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mD,hD,gD,_D=m((()=>{mD=800,hD=16,gD=Date.now})),vD,yD=m((()=>{fD(),_D(),vD=pD(dD)}));function bD(e,t){return vD(oD(e,t,nD),e+``)}var xD=m((()=>{rD(),cD(),yD()}));function SD(e,t,n){if(!zy(n))return!1;var r=typeof t;return(r==`number`?IS(n)&&Nx(t,n.length):r==`string`&&t in n)?Yv(n[t],e):!1}var CD=m((()=>{Xv(),LS(),Ix(),By()}));function wD(e){return bD(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&SD(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var TD=m((()=>{xD(),CD()})),ED,DD=m((()=>{tD(),TD(),ED=wD(function(e,t,n){eD(e,t,n)})})),OD=m((()=>{PT(),jE(),DD()})),kD=g({Attributor:()=>PD,AttributorStore:()=>UD,BlockBlot:()=>eO,ClassAttributor:()=>zD,ContainerBlot:()=>nO,EmbedBlot:()=>iO,InlineBlot:()=>QD,LeafBlot:()=>qD,ParentBlot:()=>XD,Registry:()=>LD,Scope:()=>Z,ScrollBlot:()=>cO,StyleAttributor:()=>VD,TextBlot:()=>uO});function AD(e,t){return(e.getAttribute(`class`)||``).split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}function jD(e){let t=e.split(`-`),n=t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``);return t[0]+n}function MD(e,t){let n=t.find(e);if(n)return n;try{return t.create(e)}catch{let n=t.create(Z.INLINE);return Array.from(e.childNodes).forEach(e=>{n.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}function ND(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}var Z,PD,FD,ID,LD,RD,zD,BD,VD,HD,UD,WD,GD,KD,qD,JD,YD,XD,ZD,QD,$D,eO,tO,nO,rO,iO,aO,oO,sO,cO,lO,uO,dO=m((()=>{Z=(e=>(e[e.TYPE=3]=`TYPE`,e[e.LEVEL=12]=`LEVEL`,e[e.ATTRIBUTE=13]=`ATTRIBUTE`,e[e.BLOT=14]=`BLOT`,e[e.INLINE=7]=`INLINE`,e[e.BLOCK=11]=`BLOCK`,e[e.BLOCK_BLOT=10]=`BLOCK_BLOT`,e[e.INLINE_BLOT=6]=`INLINE_BLOT`,e[e.BLOCK_ATTRIBUTE=9]=`BLOCK_ATTRIBUTE`,e[e.INLINE_ATTRIBUTE=5]=`INLINE_ATTRIBUTE`,e[e.ANY=15]=`ANY`,e))(Z||{}),PD=class{constructor(e,t,n={}){this.attrName=e,this.keyName=t;let r=Z.TYPE&Z.ATTRIBUTE;this.scope=n.scope==null?Z.ATTRIBUTE:n.scope&Z.LEVEL|r,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(e){return Array.from(e.attributes).map(e=>e.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t==`string`?this.whitelist.indexOf(t.replace(/["']/g,``))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){let t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:``}},FD=class extends Error{constructor(e){e=`[Parchment] `+e,super(e),this.message=e,this.name=this.constructor.name}},ID=class e{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let n=null;try{n=e.parentNode}catch{return null}return this.find(n,t)}return null}create(t,n,r){let i=this.query(n);if(i==null)throw new FD(`Unable to create ${n} blot`);let a=i,o=new a(t,n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),r);return e.blots.set(o.domNode,o),o}find(t,n=!1){return e.find(t,n)}query(e,t=Z.ANY){let n;return typeof e==`string`?n=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?n=this.types.text:typeof e==`number`?e&Z.LEVEL&Z.BLOCK?n=this.types.block:e&Z.LEVEL&Z.INLINE&&(n=this.types.inline):e instanceof Element&&((e.getAttribute(`class`)||``).split(/\s+/).some(e=>(n=this.classes[e],!!n)),n||=this.tags[e.tagName]),n==null?null:`scope`in n&&t&Z.LEVEL&n.scope&&t&Z.TYPE&n.scope?n:null}register(...e){return e.map(e=>{let t=`blotName`in e,n=`attrName`in e;if(!t&&!n)throw new FD(`Invalid definition`);if(t&&e.blotName===`abstract`)throw new FD(`Cannot register abstract class`);let r=t?e.blotName:n?e.attrName:void 0;return this.types[r]=e,n?typeof e.keyName==`string`&&(this.attributes[e.keyName]=e):t&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(e=>e.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(t=>{(this.tags[t]==null||e.className==null)&&(this.tags[t]=e)}))),e})}},ID.blots=new WeakMap,LD=ID,RD=class extends PD{static keys(e){return(e.getAttribute(`class`)||``).split(/\s+/).map(e=>e.split(`-`).slice(0,-1).join(`-`))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){AD(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute(`class`)}value(e){let t=(AD(e,this.keyName)[0]||``).slice(this.keyName.length+1);return this.canAdd(e,t)?t:``}},zD=RD,BD=class extends PD{static keys(e){return(e.getAttribute(`style`)||``).split(`;`).map(e=>e.split(`:`)[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[jD(this.keyName)]=t,!0):!1}remove(e){e.style[jD(this.keyName)]=``,e.getAttribute(`style`)||e.removeAttribute(`style`)}value(e){let t=e.style[jD(this.keyName)];return this.canAdd(e,t)?t:``}},VD=BD,HD=class{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)==null?delete this.attributes[e.attrName]:this.attributes[e.attrName]=e):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};let e=LD.find(this.domNode);if(e==null)return;let t=PD.keys(this.domNode),n=zD.keys(this.domNode),r=VD.keys(this.domNode);t.concat(n).concat(r).forEach(t=>{let n=e.scroll.query(t,Z.ATTRIBUTE);n instanceof PD&&(this.attributes[n.attrName]=n)})}copy(e){Object.keys(this.attributes).forEach(t=>{let n=this.attributes[t].value(this.domNode);e.format(t,n)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}},UD=HD,WD=class{constructor(e,t){this.scroll=e,this.domNode=t,LD.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new FD(`Blot definition missing tagName`);let t,n;return Array.isArray(this.tagName)?(typeof e==`string`?(n=e.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):typeof e==`number`&&(n=e),t=typeof n==`number`?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),LD.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,n,r){let i=this.isolate(e,t);if(this.scroll.query(n,Z.BLOT)!=null&&r)i.wrap(n,r);else if(this.scroll.query(n,Z.ATTRIBUTE)!=null){let e=this.scroll.create(this.statics.scope);i.wrap(e),e.format(n,r)}}insertAt(e,t,n){let r=n==null?this.scroll.create(`text`,t):this.scroll.create(t,n),i=this.split(e);this.parent.insertBefore(r,i||void 0)}isolate(e,t){let n=this.split(e);if(n==null)throw Error(`Attempt to isolate at end`);return n.split(t),n}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){let n=typeof e==`string`?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){let n=typeof e==`string`?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(n,this.next||void 0),typeof n.appendChild!=`function`)throw new FD(`Cannot wrap ${e}`);return n.appendChild(this),n}},WD.blotName=`abstract`,GD=WD,KD=class extends GD{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}},KD.scope=Z.INLINE_BLOT,qD=KD,JD=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){let t=e.slice(1);this.append(...t)}}at(e){let t=this.iterator(),n=t();for(;n&&e>0;)--e,n=t();return n}contains(e){let t=this.iterator(),n=t();for(;n;){if(n===e)return!0;n=t()}return!1}indexOf(e){let t=this.iterator(),n=t(),r=0;for(;n;){if(n===e)return r;r+=1,n=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t==null?this.tail==null?(e.prev=null,this.head=this.tail=e):(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)),this.length+=1)}offset(e){let t=0,n=this.head;for(;n!=null;){if(n===e)return t;t+=n.length(),n=n.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),--this.length)}iterator(e=this.head){return()=>{let t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){let n=this.iterator(),r=n();for(;r;){let i=r.length();if(e<i||t&&e===i&&(r.next==null||r.next.length()!==0))return[r,e];e-=i,r=n()}return[null,0]}forEach(e){let t=this.iterator(),n=t();for(;n;)e(n),n=t()}forEachAt(e,t,n){if(t<=0)return;let[r,i]=this.find(e),a=e-i,o=this.iterator(r),s=o();for(;s&&a<e+t;){let r=s.length();e>a?n(s,e-a,Math.min(t,a+r-e)):n(s,0,Math.min(r,e+t-a)),a+=r,s=o()}}map(e){return this.reduce((t,n)=>(t.push(e(n)),t),[])}reduce(e,t){let n=this.iterator(),r=n();for(;r;)t=e(t,r),r=n();return t}},YD=class e extends GD{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute(`contenteditable`,`false`),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new JD,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{let t=MD(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(e){if(e instanceof FD)return;throw e}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(e,t,n)=>{e.deleteAt(t,n)})}descendant(t,n=0){let[r,i]=this.children.find(n);return t.blotName==null&&t(r)||t.blotName!=null&&r instanceof t?[r,i]:r instanceof e?r.descendant(t,i):[null,-1]}descendants(t,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(n,r,o)=>{(t.blotName==null&&t(n)||t.blotName!=null&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,a))),a-=o}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(n=>{t||this.statics.allowedChildren.some(e=>n instanceof e)||(n.statics.scope===Z.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),t=!0):n instanceof e?n.unwrap():n.remove())})}formatAt(e,t,n,r){this.children.forEachAt(e,t,(e,t,i)=>{e.formatAt(t,i,n,r)})}insertAt(e,t,n){let[r,i]=this.children.find(e);if(r)r.insertAt(i,t,n);else{let e=n==null?this.scroll.create(`text`,t):this.scroll.create(t,n);this.appendChild(e)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let n=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(n=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(e.domNode,n),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(n=>{e.insertBefore(n,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,n=!1){let[r,i]=this.children.find(t,n),a=[[this,t]];return r instanceof e?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(t,n){let r=typeof t==`string`?this.scroll.create(t,n):t;return r instanceof e&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}let n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(e,this.length(),(e,r,i)=>{let a=e.split(r,t);a!=null&&n.appendChild(a)}),n}splitAfter(e){let t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){let n=[],r=[];e.forEach(e=>{e.target===this.domNode&&e.type===`childList`&&(n.push(...e.addedNodes),r.push(...e.removedNodes))}),r.forEach(e=>{if(e.parentNode!=null&&e.tagName!==`IFRAME`&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let t=this.scroll.find(e);t!=null&&(t.domNode.parentNode==null||t.domNode.parentNode===this.domNode)&&t.detach()}),n.filter(e=>e.parentNode===this.domNode&&e!==this.uiNode).sort((e,t)=>e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(e=>{let t=null;e.nextSibling!=null&&(t=this.scroll.find(e.nextSibling));let n=MD(e,this.scroll);(n.next!==t||n.next==null)&&(n.parent!=null&&n.parent.removeChild(this),this.insertBefore(n,t||void 0))}),this.enforceAllowedChildren()}},YD.uiClass=``,XD=YD,ZD=class e extends XD{static create(e){return super.create(e)}static formats(t,n){let r=n.query(e.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName==`string`)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new UD(this.domNode)}format(t,n){if(t===this.statics.blotName&&!n)this.children.forEach(t=>{t instanceof e||(t=t.wrap(e.blotName,!0)),this.attributes.copy(t)}),this.unwrap();else{let e=this.scroll.query(t,Z.INLINE);if(e==null)return;e instanceof PD?this.attributes.attribute(e,n):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n)}}formats(){let e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){this.formats()[n]!=null||this.scroll.query(n,Z.ATTRIBUTE)?this.isolate(e,t).format(n,r):super.formatAt(e,t,n,r)}optimize(t){super.optimize(t);let n=this.formats();if(Object.keys(n).length===0)return this.unwrap();let r=this.next;r instanceof e&&r.prev===this&&ND(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){let n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(e=>e.target===this.domNode&&e.type===`attributes`)&&this.attributes.build()}wrap(t,n){let r=super.wrap(t,n);return r instanceof e&&this.attributes.move(r),r}},ZD.allowedChildren=[ZD,qD],ZD.blotName=`inline`,ZD.scope=Z.INLINE_BLOT,ZD.tagName=`SPAN`,QD=ZD,$D=class e extends XD{static create(e){return super.create(e)}static formats(t,n){let r=n.query(e.blotName);if(!(r!=null&&t.tagName===r.tagName)){if(typeof this.tagName==`string`)return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new UD(this.domNode)}format(t,n){let r=this.scroll.query(t,Z.BLOCK);r!=null&&(r instanceof PD?this.attributes.attribute(r,n):t===this.statics.blotName&&!n?this.replaceWith(e.blotName):n&&(t!==this.statics.blotName||this.formats()[t]!==n)&&this.replaceWith(t,n))}formats(){let e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,n,r){this.scroll.query(n,Z.BLOCK)==null?super.formatAt(e,t,n,r):this.format(n,r)}insertAt(e,t,n){if(n==null||this.scroll.query(t,Z.INLINE)!=null)super.insertAt(e,t,n);else{let r=this.split(e);if(r!=null){let e=this.scroll.create(t,n);r.parent.insertBefore(e,r)}else throw Error(`Attempt to insertAt after block boundaries`)}}replaceWith(e,t){let n=super.replaceWith(e,t);return this.attributes.copy(n),n}update(e,t){super.update(e,t),e.some(e=>e.target===this.domNode&&e.type===`attributes`)&&this.attributes.build()}},$D.blotName=`block`,$D.scope=Z.BLOCK_BLOT,$D.tagName=`P`,$D.allowedChildren=[QD,$D,qD],eO=$D,tO=class extends XD{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.enforceAllowedChildren()}insertAt(e,t,n){super.insertAt(e,t,n),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}},tO.blotName=`container`,tO.scope=Z.BLOCK_BLOT,nO=tO,rO=class extends qD{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,n,r){e===0&&t===this.length()?this.format(n,r):super.formatAt(e,t,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}},iO=rO,aO={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},oO=100,sO=class extends XD{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(e=>{this.update(e)}),this.observer.observe(this.domNode,aO),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){let n=this.registry.find(e,t);return n?n.scroll===this?n:t?this.find(n.scroll.domNode.parentNode,!0):null:null}query(e,t=Z.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(e=>{e.remove()}):super.deleteAt(e,t)}formatAt(e,t,n,r){this.update(),super.formatAt(e,t,n,r)}insertAt(e,t,n){this.update(),super.insertAt(e,t,n)}optimize(e=[],t={}){super.optimize(t);let n=t.mutationsMap||new WeakMap,r=Array.from(this.observer.takeRecords());for(;r.length>0;)e.push(r.pop());let i=(e,t=!0)=>{e==null||e===this||e.domNode.parentNode!=null&&(n.has(e.domNode)||n.set(e.domNode,[]),t&&i(e.parent))},a=e=>{n.has(e.domNode)&&(e instanceof XD&&e.children.forEach(a),n.delete(e.domNode),e.optimize(t))},o=e;for(let t=0;o.length>0;t+=1){if(t>=oO)throw Error(`[Parchment] Maximum optimize iterations reached`);for(o.forEach(e=>{let t=this.find(e.target,!0);t!=null&&(t.domNode===e.target&&(e.type===`childList`?(i(this.find(e.previousSibling,!1)),Array.from(e.addedNodes).forEach(e=>{let t=this.find(e,!1);i(t,!1),t instanceof XD&&t.children.forEach(e=>{i(e,!1)})})):e.type===`attributes`&&i(t.prev)),i(t))}),this.children.forEach(a),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)e.push(r.pop())}}update(e,t={}){e||=this.observer.takeRecords();let n=new WeakMap;e.map(e=>{let t=this.find(e.target,!0);return t==null?null:n.has(t.domNode)?(n.get(t.domNode).push(e),null):(n.set(t.domNode,[e]),t)}).forEach(e=>{e!=null&&e!==this&&n.has(e.domNode)&&e.update(n.get(e.domNode)||[],t)}),t.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),t),this.optimize(e,t)}},sO.blotName=`scroll`,sO.defaultChild=eO,sO.allowedChildren=[eO,nO],sO.scope=Z.BLOCK_BLOT,sO.tagName=`DIV`,cO=sO,lO=class e extends qD{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,n){n==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}let n=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(e,t){e.some(e=>e.type===`characterData`&&e.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}},lO.blotName=`text`,lO.scope=Z.INLINE_BLOT,uO=lO})),fO=h(((e,t)=>{var n=-1,r=1,i=0;function a(e,t,n,r,a){if(e===t)return e?[[i,e]]:[];if(n!=null){var s=ee(e,t,n);if(s)return s}var c=l(e,t),u=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=d(e,t);var f=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var m=o(e,t);return u&&m.unshift([i,u]),f&&m.push([i,f]),b(m,a),r&&p(m),m}function o(e,t){var o;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,l=e.length>t.length?t:e,u=c.indexOf(l);if(u!==-1)return o=[[r,c.substring(0,u)],[i,l],[r,c.substring(u+l.length)]],e.length>t.length&&(o[0][0]=o[2][0]=n),o;if(l.length===1)return[[n,e],[r,t]];var d=f(e,t);if(d){var p=d[0],m=d[1],h=d[2],g=d[3],_=d[4],v=a(p,h),y=a(m,g);return v.concat([[i,_]],y)}return s(e,t)}function s(e,t){for(var i=e.length,a=t.length,o=Math.ceil((i+a)/2),s=o,l=2*o,u=Array(l),d=Array(l),f=0;f<l;f++)u[f]=-1,d[f]=-1;u[s+1]=0,d[s+1]=0;for(var p=i-a,m=p%2!=0,h=0,g=0,_=0,v=0,y=0;y<o;y++){for(var b=-y+h;b<=y-g;b+=2){for(var x=s+b,S=b===-y||b!==y&&u[x-1]<u[x+1]?u[x+1]:u[x-1]+1,C=S-b;S<i&&C<a&&e.charAt(S)===t.charAt(C);)S++,C++;if(u[x]=S,S>i)g+=2;else if(C>a)h+=2;else if(m){var w=s+p-b;if(w>=0&&w<l&&d[w]!==-1){var T=i-d[w];if(S>=T)return c(e,t,S,C)}}}for(var E=-y+_;E<=y-v;E+=2){for(var w=s+E,T=E===-y||E!==y&&d[w-1]<d[w+1]?d[w+1]:d[w-1]+1,ee=T-E;T<i&&ee<a&&e.charAt(i-T-1)===t.charAt(a-ee-1);)T++,ee++;if(d[w]=T,T>i)v+=2;else if(ee>a)_+=2;else if(!m){var x=s+p-E;if(x>=0&&x<l&&u[x]!==-1){var S=u[x],C=s+S-x;if(T=i-T,S>=T)return c(e,t,S,C)}}}}return[[n,e],[r,t]]}function c(e,t,n,r){var i=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=a(i,o),u=a(s,c);return l.concat(u)}function l(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return x(e.charCodeAt(i-1))&&i--,i}function u(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}}function d(e,t){if(!e||!t||e.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return S(e.charCodeAt(e.length-i))&&i--,i}function f(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;function i(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),i=-1,a=``,o,s,c,u;(i=t.indexOf(r,i+1))!==-1;){var f=l(e.substring(n),t.substring(i)),p=d(e.substring(0,n),t.substring(0,i));a.length<p+f&&(a=t.substring(i-p,i)+t.substring(i,i+f),o=e.substring(0,n-p),s=e.substring(n+f),c=t.substring(0,i-p),u=t.substring(i+f))}return a.length*2>=e.length?[o,s,c,u,a]:null}var a=i(n,r,Math.ceil(n.length/4)),o=i(n,r,Math.ceil(n.length/2)),s;if(!a&&!o)return null;s=o?a&&a[4].length>o[4].length?a:o:a;var c,u,f,p;e.length>t.length?(c=s[0],u=s[1],f=s[2],p=s[3]):(f=s[0],p=s[1],c=s[2],u=s[3]);var m=s[4];return[c,u,f,p,m]}function p(e){for(var t=!1,a=[],o=0,s=null,c=0,l=0,d=0,f=0,p=0;c<e.length;)e[c][0]==i?(a[o++]=c,l=f,d=p,f=0,p=0,s=e[c][1]):(e[c][0]==r?f+=e[c][1].length:p+=e[c][1].length,s&&s.length<=Math.max(l,d)&&s.length<=Math.max(f,p)&&(e.splice(a[o-1],0,[n,s]),e[a[o-1]+1][0]=r,o--,o--,c=o>0?a[o-1]:-1,l=0,d=0,f=0,p=0,s=null,t=!0)),c++;for(t&&b(e),y(e),c=1;c<e.length;){if(e[c-1][0]==n&&e[c][0]==r){var m=e[c-1][1],h=e[c][1],g=u(m,h),_=u(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(c,0,[i,h.substring(0,g)]),e[c-1][1]=m.substring(0,m.length-g),e[c+1][1]=h.substring(g),c++):(_>=m.length/2||_>=h.length/2)&&(e.splice(c,0,[i,m.substring(0,_)]),e[c-1][0]=r,e[c-1][1]=h.substring(0,h.length-_),e[c+1][0]=n,e[c+1][1]=m.substring(_),c++),c++}c++}}var m=/[^a-zA-Z0-9]/,h=/\s/,g=/[\r\n]/,_=/\n\r?\n$/,v=/^\r?\n\r?\n/;function y(e){function t(e,t){if(!e||!t)return 6;var n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(m),a=r.match(m),o=i&&n.match(h),s=a&&r.match(h),c=o&&n.match(g),l=s&&r.match(g),u=c&&e.match(_),d=l&&t.match(v);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}for(var n=1;n<e.length-1;){if(e[n-1][0]==i&&e[n+1][0]==i){var r=e[n-1][1],a=e[n][1],o=e[n+1][1],s=d(r,a);if(s){var c=a.substring(a.length-s);r=r.substring(0,r.length-s),a=c+a.substring(0,a.length-s),o=c+o}for(var l=r,u=a,f=o,p=t(r,a)+t(a,o);a.charAt(0)===o.charAt(0);){r+=a.charAt(0),a=a.substring(1)+o.charAt(0),o=o.substring(1);var y=t(r,a)+t(a,o);y>=p&&(p=y,l=r,u=a,f=o)}e[n-1][1]!=l&&(l?e[n-1][1]=l:(e.splice(n-1,1),n--),e[n][1]=u,f?e[n+1][1]=f:(e.splice(n+1,1),n--))}n++}}function b(e,t){e.push([i,``]);for(var a=0,o=0,s=0,c=``,u=``,f;a<e.length;){if(a<e.length-1&&!e[a][1]){e.splice(a,1);continue}switch(e[a][0]){case r:s++,u+=e[a][1],a++;break;case n:o++,c+=e[a][1],a++;break;case i:var p=a-s-o-1;if(t){if(p>=0&&w(e[p][1])){var m=e[p][1].slice(-1);if(e[p][1]=e[p][1].slice(0,-1),c=m+c,u=m+u,!e[p][1]){e.splice(p,1),a--;var h=p-1;e[h]&&e[h][0]===r&&(s++,u=e[h][1]+u,h--),e[h]&&e[h][0]===n&&(o++,c=e[h][1]+c,h--),p=h}}if(C(e[a][1])){var m=e[a][1].charAt(0);e[a][1]=e[a][1].slice(1),c+=m,u+=m}}if(a<e.length-1&&!e[a][1]){e.splice(a,1);break}if(c.length>0||u.length>0){c.length>0&&u.length>0&&(f=l(u,c),f!==0&&(p>=0?e[p][1]+=u.substring(0,f):(e.splice(0,0,[i,u.substring(0,f)]),a++),u=u.substring(f),c=c.substring(f)),f=d(u,c),f!==0&&(e[a][1]=u.substring(u.length-f)+e[a][1],u=u.substring(0,u.length-f),c=c.substring(0,c.length-f)));var g=s+o;c.length===0&&u.length===0?(e.splice(a-g,g),a-=g):c.length===0?(e.splice(a-g,g,[r,u]),a=a-g+1):u.length===0?(e.splice(a-g,g,[n,c]),a=a-g+1):(e.splice(a-g,g,[n,c],[r,u]),a=a-g+2)}a!==0&&e[a-1][0]===i?(e[a-1][1]+=e[a][1],e.splice(a,1)):a++,s=0,o=0,c=``,u=``;break}}e[e.length-1][1]===``&&e.pop();var _=!1;for(a=1;a<e.length-1;)e[a-1][0]===i&&e[a+1][0]===i&&(e[a][1].substring(e[a][1].length-e[a-1][1].length)===e[a-1][1]?(e[a][1]=e[a-1][1]+e[a][1].substring(0,e[a][1].length-e[a-1][1].length),e[a+1][1]=e[a-1][1]+e[a+1][1],e.splice(a-1,1),_=!0):e[a][1].substring(0,e[a+1][1].length)==e[a+1][1]&&(e[a-1][1]+=e[a+1][1],e[a][1]=e[a][1].substring(e[a+1][1].length)+e[a+1][1],e.splice(a+1,1),_=!0)),a++;_&&b(e,t)}function x(e){return e>=55296&&e<=56319}function S(e){return e>=56320&&e<=57343}function C(e){return S(e.charCodeAt(0))}function w(e){return x(e.charCodeAt(e.length-1))}function T(e){for(var t=[],n=0;n<e.length;n++)e[n][1].length>0&&t.push(e[n]);return t}function E(e,t,a,o){return w(e)||C(o)?null:T([[i,e],[n,t],[r,a],[i,o]])}function ee(e,t,n){var r=typeof n==`number`?{index:n,length:0}:n.oldRange,i=typeof n==`number`?null:n.newRange,a=e.length,o=t.length;if(r.length===0&&(i===null||i.length===0)){var s=r.index,c=e.slice(0,s),l=e.slice(s),u=i?i.index:null;editBefore:{var d=s+o-a;if(u!==null&&u!==d||d<0||d>o)break editBefore;var f=t.slice(0,d),p=t.slice(d);if(p!==l)break editBefore;var m=Math.min(s,d),h=c.slice(0,m),g=f.slice(0,m);if(h!==g)break editBefore;var _=c.slice(m),v=f.slice(m);return E(h,_,v,l)}editAfter:{if(u!==null&&u!==s)break editAfter;var y=s,f=t.slice(0,y),p=t.slice(y);if(f!==c)break editAfter;var b=Math.min(a-y,o-y),x=l.slice(l.length-b),S=p.slice(p.length-b);if(x!==S)break editAfter;var _=l.slice(0,l.length-b),v=p.slice(0,p.length-b);return E(c,_,v,x)}}if(r.length>0&&i&&i.length===0)replaceRange:{var h=e.slice(0,r.index),x=e.slice(r.index+r.length),m=h.length,b=x.length;if(o<m+b)break replaceRange;var g=t.slice(0,m),S=t.slice(o-b);if(h!==g||x!==S)break replaceRange;var _=e.slice(m,a-b),v=t.slice(m,o-b);return E(h,_,v,x)}return null}function te(e,t,n,r){return a(e,t,n,r,!0)}te.INSERT=r,te.DELETE=n,te.EQUAL=i,t.exports=te})),pO=h(((e,t)=>{var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Array]`,o=`[object Boolean]`,s=`[object Date]`,c=`[object Error]`,l=`[object Function]`,u=`[object GeneratorFunction]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object Promise]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object WeakMap]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=`[object Float32Array]`,C=`[object Float64Array]`,w=`[object Int8Array]`,T=`[object Int16Array]`,E=`[object Int32Array]`,ee=`[object Uint8Array]`,te=`[object Uint8ClampedArray]`,ne=`[object Uint16Array]`,re=`[object Uint32Array]`,ie=/[\\^$.*+?()[\]{}|]/g,ae=/\w*$/,oe=/^\[object .+?Constructor\]$/,se=/^(?:0|[1-9]\d*)$/,D={};D[i]=D[a]=D[b]=D[x]=D[o]=D[s]=D[S]=D[C]=D[w]=D[T]=D[E]=D[d]=D[f]=D[p]=D[h]=D[g]=D[_]=D[v]=D[ee]=D[te]=D[ne]=D[re]=!0,D[c]=D[l]=D[y]=!1;var ce=typeof global==`object`&&global&&global.Object===Object&&global,le=typeof self==`object`&&self&&self.Object===Object&&self,ue=ce||le||Function(`return this`)(),de=typeof e==`object`&&e&&!e.nodeType&&e,fe=de&&typeof t==`object`&&t&&!t.nodeType&&t,pe=fe&&fe.exports===de;function me(e,t){return e.set(t[0],t[1]),e}function he(e,t){return e.add(t),e}function ge(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function _e(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function ve(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function ye(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function be(e,t){return e?.[t]}function xe(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}function Se(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Ce(e,t){return function(n){return e(t(n))}}function we(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Te=Array.prototype,Ee=Function.prototype,De=Object.prototype,Oe=ue[`__core-js_shared__`],ke=function(){var e=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Ae=Ee.toString,je=De.hasOwnProperty,Me=De.toString,Ne=RegExp(`^`+Ae.call(je).replace(ie,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Pe=pe?ue.Buffer:void 0,Fe=ue.Symbol,Ie=ue.Uint8Array,Le=Ce(Object.getPrototypeOf,Object),Re=Object.create,ze=De.propertyIsEnumerable,Be=Te.splice,Ve=Object.getOwnPropertySymbols,He=Pe?Pe.isBuffer:void 0,Ue=Ce(Object.keys,Object),We=Jt(ue,`DataView`),Ge=Jt(ue,`Map`),Ke=Jt(ue,`Promise`),qe=Jt(ue,`Set`),Je=Jt(ue,`WeakMap`),Ye=Jt(Object,`create`),Xe=an(We),Ze=an(Ge),Qe=an(Ke),$e=an(qe),et=an(Je),tt=Fe?Fe.prototype:void 0,nt=tt?tt.valueOf:void 0;function rt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function it(){this.__data__=Ye?Ye(null):{}}function at(e){return this.has(e)&&delete this.__data__[e]}function ot(e){var t=this.__data__;if(Ye){var r=t[e];return r===n?void 0:r}return je.call(t,e)?t[e]:void 0}function st(e){var t=this.__data__;return Ye?t[e]!==void 0:je.call(t,e)}function ct(e,t){var r=this.__data__;return r[e]=Ye&&t===void 0?n:t,this}rt.prototype.clear=it,rt.prototype.delete=at,rt.prototype.get=ot,rt.prototype.has=st,rt.prototype.set=ct;function lt(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ut(){this.__data__=[]}function dt(e){var t=this.__data__,n=Ot(t,e);return n<0?!1:(n==t.length-1?t.pop():Be.call(t,n,1),!0)}function ft(e){var t=this.__data__,n=Ot(t,e);return n<0?void 0:t[n][1]}function pt(e){return Ot(this.__data__,e)>-1}function mt(e,t){var n=this.__data__,r=Ot(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}lt.prototype.clear=ut,lt.prototype.delete=dt,lt.prototype.get=ft,lt.prototype.has=pt,lt.prototype.set=mt;function ht(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(){this.__data__={hash:new rt,map:new(Ge||lt),string:new rt}}function gt(e){return qt(this,e).delete(e)}function _t(e){return qt(this,e).get(e)}function vt(e){return qt(this,e).has(e)}function yt(e,t){return qt(this,e).set(e,t),this}ht.prototype.clear=O,ht.prototype.delete=gt,ht.prototype.get=_t,ht.prototype.has=vt,ht.prototype.set=yt;function bt(e){this.__data__=new lt(e)}function xt(){this.__data__=new lt}function St(e){return this.__data__.delete(e)}function Ct(e){return this.__data__.get(e)}function wt(e){return this.__data__.has(e)}function Tt(e,t){var n=this.__data__;if(n instanceof lt){var r=n.__data__;if(!Ge||r.length<199)return r.push([e,t]),this;n=this.__data__=new ht(r)}return n.set(e,t),this}bt.prototype.clear=xt,bt.prototype.delete=St,bt.prototype.get=Ct,bt.prototype.has=wt,bt.prototype.set=Tt;function Et(e,t){var n=A(e)||cn(e)?ye(e.length,String):[],r=n.length,i=!!r;for(var a in e)(t||je.call(e,a))&&!(i&&(a==`length`||en(a,r)))&&n.push(a);return n}function Dt(e,t,n){var r=e[t];(!(je.call(e,t)&&sn(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function Ot(e,t){for(var n=e.length;n--;)if(sn(e[n][0],t))return n;return-1}function kt(e,t){return e&&Gt(t,hn(t),e)}function At(e,t,n,r,a,o,s){var c;if(r&&(c=o?r(e,a,o,s):r(e)),c!==void 0)return c;if(!pn(e))return e;var d=A(e);if(d){if(c=Zt(e),!t)return Wt(e,c)}else{var f=Xt(e),m=f==l||f==u;if(dn(e))return It(e,t);if(f==p||f==i||m&&!o){if(xe(e))return o?e:{};if(c=Qt(m?{}:e),!t)return Kt(e,kt(c,e))}else{if(!D[f])return o?e:{};c=$t(e,f,At,t)}}s||=new bt;var h=s.get(e);if(h)return h;if(s.set(e,c),!d)var g=n?k(e):hn(e);return ge(g||e,function(i,a){g&&(a=i,i=e[a]),Dt(c,a,At(i,t,n,r,a,e,s))}),c}function jt(e){return pn(e)?Re(e):{}}function Mt(e,t,n){var r=t(e);return A(e)?r:_e(r,n(e))}function Nt(e){return Me.call(e)}function Pt(e){return!pn(e)||nn(e)?!1:(j(e)||xe(e)?Ne:oe).test(an(e))}function Ft(e){if(!rn(e))return Ue(e);var t=[];for(var n in Object(e))je.call(e,n)&&n!=`constructor`&&t.push(n);return t}function It(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function Lt(e){var t=new e.constructor(e.byteLength);return new Ie(t).set(new Ie(e)),t}function Rt(e,t){var n=t?Lt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function zt(e,t,n){return ve(t?n(Se(e),!0):Se(e),me,new e.constructor)}function Bt(e){var t=new e.constructor(e.source,ae.exec(e));return t.lastIndex=e.lastIndex,t}function Vt(e,t,n){return ve(t?n(we(e),!0):we(e),he,new e.constructor)}function Ht(e){return nt?Object(nt.call(e)):{}}function Ut(e,t){var n=t?Lt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Wt(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function Gt(e,t,n,r){n||={};for(var i=-1,a=t.length;++i<a;){var o=t[i],s=r?r(n[o],e[o],o,n,e):void 0;Dt(n,o,s===void 0?e[o]:s)}return n}function Kt(e,t){return Gt(e,Yt(e),t)}function k(e){return Mt(e,hn,Yt)}function qt(e,t){var n=e.__data__;return tn(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Jt(e,t){var n=be(e,t);return Pt(n)?n:void 0}var Yt=Ve?Ce(Ve,Object):gn,Xt=Nt;(We&&Xt(new We(new ArrayBuffer(1)))!=x||Ge&&Xt(new Ge)!=d||Ke&&Xt(Ke.resolve())!=m||qe&&Xt(new qe)!=g||Je&&Xt(new Je)!=y)&&(Xt=function(e){var t=Me.call(e),n=t==p?e.constructor:void 0,r=n?an(n):void 0;if(r)switch(r){case Xe:return x;case Ze:return d;case Qe:return m;case $e:return g;case et:return y}return t});function Zt(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]==`string`&&je.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function Qt(e){return typeof e.constructor==`function`&&!rn(e)?jt(Le(e)):{}}function $t(e,t,n,r){var i=e.constructor;switch(t){case b:return Lt(e);case o:case s:return new i(+e);case x:return Rt(e,r);case S:case C:case w:case T:case E:case ee:case te:case ne:case re:return Ut(e,r);case d:return zt(e,r,n);case f:case _:return new i(e);case h:return Bt(e);case g:return Vt(e,r,n);case v:return Ht(e)}}function en(e,t){return t??=r,!!t&&(typeof e==`number`||se.test(e))&&e>-1&&e%1==0&&e<t}function tn(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function nn(e){return!!ke&&ke in e}function rn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||De)}function an(e){if(e!=null){try{return Ae.call(e)}catch{}try{return e+``}catch{}}return``}function on(e){return At(e,!0,!0)}function sn(e,t){return e===t||e!==e&&t!==t}function cn(e){return un(e)&&je.call(e,`callee`)&&(!ze.call(e,`callee`)||Me.call(e)==i)}var A=Array.isArray;function ln(e){return e!=null&&fn(e.length)&&!j(e)}function un(e){return mn(e)&&ln(e)}var dn=He||_n;function j(e){var t=pn(e)?Me.call(e):``;return t==l||t==u}function fn(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=r}function pn(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function mn(e){return!!e&&typeof e==`object`}function hn(e){return ln(e)?Et(e):Ft(e)}function gn(){return[]}function _n(){return!1}t.exports=on})),mO=h(((e,t)=>{var n=`__lodash_hash_undefined__`,r=1,i=2,a=9007199254740991,o=`[object Arguments]`,s=`[object Array]`,c=`[object Boolean]`,l=`[object Date]`,u=`[object Error]`,d=`[object Function]`,f=`[object Map]`,p=`[object Number]`,m=`[object Object]`,h=`[object Promise]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object WeakMap]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=`[object Float32Array]`,C=`[object Float64Array]`,w=`[object Int8Array]`,T=`[object Int16Array]`,E=`[object Int32Array]`,ee=`[object Uint8Array]`,te=`[object Uint8ClampedArray]`,ne=`[object Uint16Array]`,re=`[object Uint32Array]`,ie=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,oe=/^(?:0|[1-9]\d*)$/,se={};se[S]=se[C]=se[w]=se[T]=se[E]=se[ee]=se[te]=se[ne]=se[re]=!0,se[o]=se[s]=se[b]=se[c]=se[x]=se[l]=se[u]=se[d]=se[f]=se[p]=se[m]=se[g]=se[_]=se[v]=se[y]=!1;var D=typeof global==`object`&&global&&global.Object===Object&&global,ce=typeof self==`object`&&self&&self.Object===Object&&self,le=D||ce||Function(`return this`)(),ue=typeof e==`object`&&e&&!e.nodeType&&e,de=ue&&typeof t==`object`&&t&&!t.nodeType&&t,fe=de&&de.exports===ue,pe=fe&&D.process,me=function(){try{return pe&&pe.binding&&pe.binding(`util`)}catch{}}(),he=me&&me.isTypedArray;function ge(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function _e(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function ve(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ye(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function be(e){return function(t){return e(t)}}function xe(e,t){return e.has(t)}function Se(e,t){return e?.[t]}function Ce(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function we(e,t){return function(n){return e(t(n))}}function Te(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ee=Array.prototype,De=Function.prototype,Oe=Object.prototype,ke=le[`__core-js_shared__`],Ae=De.toString,je=Oe.hasOwnProperty,Me=function(){var e=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Ne=Oe.toString,Pe=RegExp(`^`+Ae.call(je).replace(ie,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Fe=fe?le.Buffer:void 0,Ie=le.Symbol,Le=le.Uint8Array,Re=Oe.propertyIsEnumerable,ze=Ee.splice,Be=Ie?Ie.toStringTag:void 0,Ve=Object.getOwnPropertySymbols,He=Fe?Fe.isBuffer:void 0,Ue=we(Object.keys,Object),We=Wt(le,`DataView`),Ge=Wt(le,`Map`),Ke=Wt(le,`Promise`),qe=Wt(le,`Set`),Je=Wt(le,`WeakMap`),Ye=Wt(Object,`create`),Xe=Qt(We),Ze=Qt(Ge),Qe=Qt(Ke),$e=Qt(qe),et=Qt(Je),tt=Ie?Ie.prototype:void 0,nt=tt?tt.valueOf:void 0;function rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function it(){this.__data__=Ye?Ye(null):{},this.size=0}function at(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function ot(e){var t=this.__data__;if(Ye){var r=t[e];return r===n?void 0:r}return je.call(t,e)?t[e]:void 0}function st(e){var t=this.__data__;return Ye?t[e]!==void 0:je.call(t,e)}function ct(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=Ye&&t===void 0?n:t,this}rt.prototype.clear=it,rt.prototype.delete=at,rt.prototype.get=ot,rt.prototype.has=st,rt.prototype.set=ct;function lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ut(){this.__data__=[],this.size=0}function dt(e){var t=this.__data__,n=At(t,e);return n<0?!1:(n==t.length-1?t.pop():ze.call(t,n,1),--this.size,!0)}function ft(e){var t=this.__data__,n=At(t,e);return n<0?void 0:t[n][1]}function pt(e){return At(this.__data__,e)>-1}function mt(e,t){var n=this.__data__,r=At(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}lt.prototype.clear=ut,lt.prototype.delete=dt,lt.prototype.get=ft,lt.prototype.has=pt,lt.prototype.set=mt;function ht(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(){this.size=0,this.__data__={hash:new rt,map:new(Ge||lt),string:new rt}}function gt(e){var t=Ut(this,e).delete(e);return this.size-=+!!t,t}function _t(e){return Ut(this,e).get(e)}function vt(e){return Ut(this,e).has(e)}function yt(e,t){var n=Ut(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}ht.prototype.clear=O,ht.prototype.delete=gt,ht.prototype.get=_t,ht.prototype.has=vt,ht.prototype.set=yt;function bt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ht;++t<n;)this.add(e[t])}function xt(e){return this.__data__.set(e,n),this}function St(e){return this.__data__.has(e)}bt.prototype.add=bt.prototype.push=xt,bt.prototype.has=St;function Ct(e){var t=this.__data__=new lt(e);this.size=t.size}function wt(){this.__data__=new lt,this.size=0}function Tt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Et(e){return this.__data__.get(e)}function Dt(e){return this.__data__.has(e)}function Ot(e,t){var n=this.__data__;if(n instanceof lt){var r=n.__data__;if(!Ge||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ht(r)}return n.set(e,t),this.size=n.size,this}Ct.prototype.clear=wt,Ct.prototype.delete=Tt,Ct.prototype.get=Et,Ct.prototype.has=Dt,Ct.prototype.set=Ot;function kt(e,t){var n=tn(e),r=!n&&en(e),i=!n&&!r&&rn(e),a=!n&&!r&&!i&&ln(e),o=n||r||i||a,s=o?ye(e.length,String):[],c=s.length;for(var l in e)(t||je.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||qt(l,c)))&&s.push(l);return s}function At(e,t){for(var n=e.length;n--;)if($t(e[n][0],t))return n;return-1}function jt(e,t,n){var r=t(e);return tn(e)?r:_e(r,n(e))}function Mt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Be&&Be in Object(e)?Gt(e):Zt(e)}function Nt(e){return A(e)&&Mt(e)==o}function Pt(e,t,n,r,i){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:Ft(e,t,n,r,Pt,i)}function Ft(e,t,n,i,a,c){var l=tn(e),u=tn(t),d=l?s:k(e),f=u?s:k(t);d=d==o?m:d,f=f==o?m:f;var p=d==m,h=f==m,g=d==f;if(g&&rn(e)){if(!rn(t))return!1;l=!0,p=!1}if(g&&!p)return c||=new Ct,l||ln(e)?zt(e,t,n,i,a,c):Bt(e,t,d,n,i,a,c);if(!(n&r)){var _=p&&je.call(e,`__wrapped__`),v=h&&je.call(t,`__wrapped__`);if(_||v){var y=_?e.value():e,b=v?t.value():t;return c||=new Ct,a(y,b,n,i,c)}}return g?(c||=new Ct,Vt(e,t,n,i,a,c)):!1}function It(e){return!cn(e)||Yt(e)?!1:(on(e)?Pe:ae).test(Qt(e))}function Lt(e){return A(e)&&sn(e.length)&&!!se[Mt(e)]}function Rt(e){if(!Xt(e))return Ue(e);var t=[];for(var n in Object(e))je.call(e,n)&&n!=`constructor`&&t.push(n);return t}function zt(e,t,n,a,o,s){var c=n&r,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var f=-1,p=!0,m=n&i?new bt:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var h=e[f],g=t[f];if(a)var _=c?a(g,h,f,t,e,s):a(h,g,f,e,t,s);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!ve(t,function(e,t){if(!xe(m,t)&&(h===e||o(h,e,n,a,s)))return m.push(t)})){p=!1;break}}else if(!(h===g||o(h,g,n,a,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Bt(e,t,n,a,o,s,d){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!s(new Le(e),new Le(t)));case c:case l:case p:return $t(+e,+t);case u:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+``;case f:var m=Ce;case _:var h=a&r;if(m||=Te,e.size!=t.size&&!h)return!1;var y=d.get(e);if(y)return y==t;a|=i,d.set(e,t);var S=zt(m(e),m(t),a,o,s,d);return d.delete(e),S;case`[object Symbol]`:if(nt)return nt.call(e)==nt.call(t)}return!1}function Vt(e,t,n,i,a,o){var s=n&r,c=Ht(e),l=c.length;if(l!=Ht(t).length&&!s)return!1;for(var u=l;u--;){var d=c[u];if(!(s?d in t:je.call(t,d)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var p=!0;o.set(e,t),o.set(t,e);for(var m=s;++u<l;){d=c[u];var h=e[d],g=t[d];if(i)var _=s?i(g,h,d,t,e,o):i(h,g,d,e,t,o);if(!(_===void 0?h===g||a(h,g,n,i,o):_)){p=!1;break}m||=d==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return o.delete(e),o.delete(t),p}function Ht(e){return jt(e,un,Kt)}function Ut(e,t){var n=e.__data__;return Jt(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Wt(e,t){var n=Se(e,t);return It(n)?n:void 0}function Gt(e){var t=je.call(e,Be),n=e[Be];try{e[Be]=void 0;var r=!0}catch{}var i=Ne.call(e);return r&&(t?e[Be]=n:delete e[Be]),i}var Kt=Ve?function(e){return e==null?[]:(e=Object(e),ge(Ve(e),function(t){return Re.call(e,t)}))}:dn,k=Mt;(We&&k(new We(new ArrayBuffer(1)))!=x||Ge&&k(new Ge)!=f||Ke&&k(Ke.resolve())!=h||qe&&k(new qe)!=_||Je&&k(new Je)!=y)&&(k=function(e){var t=Mt(e),n=t==m?e.constructor:void 0,r=n?Qt(n):``;if(r)switch(r){case Xe:return x;case Ze:return f;case Qe:return h;case $e:return _;case et:return y}return t});function qt(e,t){return t??=a,!!t&&(typeof e==`number`||oe.test(e))&&e>-1&&e%1==0&&e<t}function Jt(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Yt(e){return!!Me&&Me in e}function Xt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Oe)}function Zt(e){return Ne.call(e)}function Qt(e){if(e!=null){try{return Ae.call(e)}catch{}try{return e+``}catch{}}return``}function $t(e,t){return e===t||e!==e&&t!==t}var en=Nt(function(){return arguments}())?Nt:function(e){return A(e)&&je.call(e,`callee`)&&!Re.call(e,`callee`)},tn=Array.isArray;function nn(e){return e!=null&&sn(e.length)&&!on(e)}var rn=He||j;function an(e,t){return Pt(e,t)}function on(e){if(!cn(e))return!1;var t=Mt(e);return t==d||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`}function sn(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=a}function cn(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function A(e){return typeof e==`object`&&!!e}var ln=he?be(he):Lt;function un(e){return nn(e)?kt(e):Rt(e)}function dn(){return[]}function j(){return!1}t.exports=an})),hO=h((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=pO(),n=mO(),r;(function(e){function r(e={},n={},r=!1){typeof e!=`object`&&(e={}),typeof n!=`object`&&(n={});let i=t(n);r||(i=Object.keys(i).reduce((e,t)=>(i[t]!=null&&(e[t]=i[t]),e),{}));for(let t in e)e[t]!==void 0&&n[t]===void 0&&(i[t]=e[t]);return Object.keys(i).length>0?i:void 0}e.compose=r;function i(e={},t={}){typeof e!=`object`&&(e={}),typeof t!=`object`&&(t={});let r=Object.keys(e).concat(Object.keys(t)).reduce((r,i)=>(n(e[i],t[i])||(r[i]=t[i]===void 0?null:t[i]),r),{});return Object.keys(r).length>0?r:void 0}e.diff=i;function a(e={},t={}){e||={};let n=Object.keys(t).reduce((n,r)=>(t[r]!==e[r]&&e[r]!==void 0&&(n[r]=t[r]),n),{});return Object.keys(e).reduce((n,r)=>(e[r]!==t[r]&&t[r]===void 0&&(n[r]=null),n),n)}e.invert=a;function o(e,t,n=!1){if(typeof e!=`object`)return t;if(typeof t!=`object`)return;if(!n)return t;let r=Object.keys(t).reduce((n,r)=>(e[r]===void 0&&(n[r]=t[r]),n),{});return Object.keys(r).length>0?r:void 0}e.transform=o})(r||={}),e.default=r})),gO=h((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t;(function(e){function t(e){return typeof e.delete==`number`?e.delete:typeof e.retain==`number`?e.retain:typeof e.retain==`object`&&e.retain!==null?1:typeof e.insert==`string`?e.insert.length:1}e.length=t})(t||={}),e.default=t})),_O=h((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=gO();e.default=class{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||=1/0;let n=this.ops[this.index];if(n){let r=this.offset,i=t.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete==`number`)return{delete:e};{let t={};return n.attributes&&(t.attributes=n.attributes),typeof n.retain==`number`?t.retain=e:typeof n.retain==`object`&&n.retain!==null?t.retain=n.retain:typeof n.insert==`string`?t.insert=n.insert.substr(r,e):t.insert=n.insert,t}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let e=this.ops[this.index];return e?typeof e.delete==`number`?`delete`:typeof e.retain==`number`||typeof e.retain==`object`&&e.retain!==null?`retain`:`insert`:`retain`}rest(){if(!this.hasNext())return[];if(this.offset===0)return this.ops.slice(this.index);{let e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)}}}})),vO=h(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;var n=fO(),r=pO(),i=mO(),a=hO();e.AttributeMap=a.default;var o=gO();e.Op=o.default;var s=_O();e.OpIterator=s.default;var c=`\0`,l=(e,t)=>{if(typeof e!=`object`||!e)throw Error(`cannot retain a ${typeof e}`);if(typeof t!=`object`||!t)throw Error(`cannot retain a ${typeof t}`);let n=Object.keys(e)[0];if(!n||n!==Object.keys(t)[0])throw Error(`embed types not matched: ${n} != ${Object.keys(t)[0]}`);return[n,e[n],t[n]]},u=class e{constructor(e){Array.isArray(e)?this.ops=e:e!=null&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]}static registerEmbed(e,t){this.handlers[e]=t}static unregisterEmbed(e){delete this.handlers[e]}static getHandler(e){let t=this.handlers[e];if(!t)throw Error(`no handlers for embed type "${e}"`);return t}insert(e,t){let n={};return typeof e==`string`&&e.length===0?this:(n.insert=e,typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))}delete(e){return e<=0?this:this.push({delete:e})}retain(e,t){if(typeof e==`number`&&e<=0)return this;let n={retain:e};return typeof t==`object`&&t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)}push(e){let t=this.ops.length,n=this.ops[t-1];if(e=r(e),typeof n==`object`){if(typeof e.delete==`number`&&typeof n.delete==`number`)return this.ops[t-1]={delete:n.delete+e.delete},this;if(typeof n.delete==`number`&&e.insert!=null&&(--t,n=this.ops[t-1],typeof n!=`object`))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if(typeof e.insert==`string`&&typeof n.insert==`string`)return this.ops[t-1]={insert:n.insert+e.insert},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this;if(typeof e.retain==`number`&&typeof n.retain==`number`)return this.ops[t-1]={retain:n.retain+e.retain},typeof e.attributes==`object`&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this}chop(){let e=this.ops[this.ops.length-1];return e&&typeof e.retain==`number`&&!e.attributes&&this.ops.pop(),this}filter(e){return this.ops.filter(e)}forEach(e){this.ops.forEach(e)}map(e){return this.ops.map(e)}partition(e){let t=[],n=[];return this.forEach(r=>{(e(r)?t:n).push(r)}),[t,n]}reduce(e,t){return this.ops.reduce(e,t)}changeLength(){return this.reduce((e,t)=>t.insert?e+o.default.length(t):t.delete?e-t.delete:e,0)}length(){return this.reduce((e,t)=>e+o.default.length(t),0)}slice(t=0,n=1/0){let r=[],i=new s.default(this.ops),a=0;for(;a<n&&i.hasNext();){let e;a<t?e=i.next(t-a):(e=i.next(n-a),r.push(e)),a+=o.default.length(e)}return new e(r)}compose(t){let n=new s.default(this.ops),r=new s.default(t.ops),o=[],c=r.peek();if(c!=null&&typeof c.retain==`number`&&c.attributes==null){let e=c.retain;for(;n.peekType()===`insert`&&n.peekLength()<=e;)e-=n.peekLength(),o.push(n.next());c.retain-e>0&&r.next(c.retain-e)}let u=new e(o);for(;n.hasNext()||r.hasNext();)if(r.peekType()===`insert`)u.push(r.next());else if(n.peekType()===`delete`)u.push(n.next());else{let t=Math.min(n.peekLength(),r.peekLength()),o=n.next(t),s=r.next(t);if(s.retain){let c={};if(typeof o.retain==`number`)c.retain=typeof s.retain==`number`?t:s.retain;else if(typeof s.retain==`number`)o.retain==null?c.insert=o.insert:c.retain=o.retain;else{let t=o.retain==null?`insert`:`retain`,[n,r,i]=l(o[t],s.retain),a=e.getHandler(n);c[t]={[n]:a.compose(r,i,t===`retain`)}}let d=a.default.compose(o.attributes,s.attributes,typeof o.retain==`number`);if(d&&(c.attributes=d),u.push(c),!r.hasNext()&&i(u.ops[u.ops.length-1],c)){let t=new e(n.rest());return u.concat(t).chop()}}else typeof s.delete==`number`&&(typeof o.retain==`number`||typeof o.retain==`object`&&o.retain!==null)&&u.push(s)}return u.chop()}concat(t){let n=new e(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n}diff(t,r){if(this.ops===t.ops)return new e;let o=[this,t].map(e=>e.map(n=>{if(n.insert!=null)return typeof n.insert==`string`?n.insert:c;throw Error(`diff() called `+(e===t?`on`:`with`)+` non-document`)}).join(``)),l=new e,u=n(o[0],o[1],r,!0),d=new s.default(this.ops),f=new s.default(t.ops);return u.forEach(e=>{let t=e[1].length;for(;t>0;){let r=0;switch(e[0]){case n.INSERT:r=Math.min(f.peekLength(),t),l.push(f.next(r));break;case n.DELETE:r=Math.min(t,d.peekLength()),d.next(r),l.delete(r);break;case n.EQUAL:r=Math.min(d.peekLength(),f.peekLength(),t);let e=d.next(r),o=f.next(r);i(e.insert,o.insert)?l.retain(r,a.default.diff(e.attributes,o.attributes)):l.push(o).delete(r);break}t-=r}}),l.chop()}eachLine(t,n=`
|
|
387
|
+
`){let r=new s.default(this.ops),i=new e,a=0;for(;r.hasNext();){if(r.peekType()!==`insert`)return;let s=r.peek(),c=o.default.length(s)-r.peekLength(),l=typeof s.insert==`string`?s.insert.indexOf(n,c)-c:-1;if(l<0)i.push(r.next());else if(l>0)i.push(r.next(l));else{if(t(i,r.next(1).attributes||{},a)===!1)return;a+=1,i=new e}}i.length()>0&&t(i,{},a)}invert(t){let n=new e;return this.reduce((r,i)=>{if(i.insert)n.delete(o.default.length(i));else if(typeof i.retain==`number`&&i.attributes==null)return n.retain(i.retain),r+i.retain;else if(i.delete||typeof i.retain==`number`){let e=i.delete||i.retain;return t.slice(r,r+e).forEach(e=>{i.delete?n.push(e):i.retain&&i.attributes&&n.retain(o.default.length(e),a.default.invert(i.attributes,e.attributes))}),r+e}else if(typeof i.retain==`object`&&i.retain!==null){let o=t.slice(r,r+1),c=new s.default(o.ops).next(),[u,d,f]=l(i.retain,c.insert),p=e.getHandler(u);return n.retain({[u]:p.invert(d,f)},a.default.invert(i.attributes,c.attributes)),r+1}return r},0),n.chop()}transform(t,n=!1){if(n=!!n,typeof t==`number`)return this.transformPosition(t,n);let r=t,i=new s.default(this.ops),c=new s.default(r.ops),l=new e;for(;i.hasNext()||c.hasNext();)if(i.peekType()===`insert`&&(n||c.peekType()!==`insert`))l.retain(o.default.length(i.next()));else if(c.peekType()===`insert`)l.push(c.next());else{let t=Math.min(i.peekLength(),c.peekLength()),r=i.next(t),o=c.next(t);if(r.delete)continue;if(o.delete)l.push(o);else{let i=r.retain,s=o.retain,c=typeof s==`object`&&s?s:t;if(typeof i==`object`&&i&&typeof s==`object`&&s){let t=Object.keys(i)[0];if(t===Object.keys(s)[0]){let r=e.getHandler(t);r&&(c={[t]:r.transform(i[t],s[t],n)})}}l.retain(c,a.default.transform(r.attributes,o.attributes,n))}}return l.chop()}transformPosition(e,t=!1){t=!!t;let n=new s.default(this.ops),r=0;for(;n.hasNext()&&r<=e;){let i=n.peekLength(),a=n.peekType();if(n.next(),a===`delete`){e-=Math.min(i,e-r);continue}else a===`insert`&&(r<e||!t)&&(e+=i);r+=i}return e}};u.Op=o.default,u.OpIterator=s.default,u.AttributeMap=a.default,u.handlers={},e.default=u,typeof t==`object`&&(t.exports=u,t.exports.default=u)})),yO,bO=m((()=>{dO(),yO=class extends iO{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return``}},yO.blotName=`break`,yO.tagName=`BR`}));function xO(e){return e.replace(/[&<>"']/g,e=>CO[e])}var SO,CO,wO=m((()=>{dO(),SO=class extends uO{},CO={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`}})),TO,EO=m((()=>{dO(),bO(),wO(),TO=class e extends QD{static allowedChildren=[e,yO,iO,SO];static order=[`cursor`,`inline`,`link`,`underline`,`strike`,`italic`,`bold`,`script`,`code`];static compare(t,n){let r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t<n?-1:1}formatAt(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&this.scroll.query(r,Z.BLOT)){let e=this.isolate(t,n);i&&e.wrap(r,i)}else super.formatAt(t,n,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){let e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}}));function DO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(qD).reduce((e,n)=>n.length()===0?e:e.insert(n.value(),OO(n,{},t)),new kO.default).insert(`
|
|
388
|
+
`,OO(e))}function OO(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e==null||(`formats`in e&&typeof e.formats==`function`&&(t={...t,...e.formats()},n&&delete t[`code-token`]),e.parent==null||e.parent.statics.blotName===`scroll`||e.parent.statics.scope!==e.statics.scope)?t:OO(e.parent,t,n)}var kO,AO,jO,MO,NO=m((()=>{dO(),kO=v(vO(),1),bO(),EO(),wO(),AO=1,jO=class extends eO{cache={};delta(){return this.cache.delta??(this.cache.delta=DO(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,n,r){t<=0||(this.scroll.query(n,Z.BLOCK)?e+t===this.length()&&this.format(n,r):super.formatAt(e,Math.min(t,this.length()-e-1),n,r),this.cache={})}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n),this.cache={};return}if(t.length===0)return;let r=t.split(`
|
|
389
|
+
`),i=r.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let a=this;r.reduce((e,t)=>(a=a.split(e,!0),a.insertAt(0,t),t.length),e+i.length)}insertBefore(e,t){let{head:n}=this.children;super.insertBefore(e,t),n instanceof yO&&n.remove(),this.cache={}}length(){return this.cache.length??(this.cache.length=super.length()+AO),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-AO)){let t=this.clone();return e===0?(this.parent.insertBefore(t,this),this):(this.parent.insertBefore(t,this.next),t)}let n=super.split(e,t);return this.cache={},n}},jO.blotName=`block`,jO.tagName=`P`,jO.defaultChild=yO,jO.allowedChildren=[yO,TO,iO,SO],MO=class extends iO{attach(){super.attach(),this.attributes=new UD(this.domNode)}delta(){return new kO.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){let n=this.scroll.query(e,Z.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,t)}formatAt(e,t,n,r){this.format(n,r)}insertAt(e,t,n){if(n!=null){super.insertAt(e,t,n);return}let r=t.split(`
|
|
390
|
+
`),i=r.pop(),a=r.map(e=>{let t=this.scroll.create(jO.blotName);return t.insertAt(0,e),t}),o=this.split(e);a.forEach(e=>{this.parent.insertBefore(e,o)}),i&&this.parent.insertBefore(this.scroll.create(`text`,i),o)}},MO.scope=Z.BLOCK_BLOT})),PO,FO=m((()=>{dO(),wO(),PO=class e extends iO{static blotName=`cursor`;static className=`ql-cursor`;static tagName=`span`;static CONTENTS=``;static value(){}constructor(t,n,r){super(t,n),this.selection=r,this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,n){if(this.savedLength!==0){super.format(t,n);return}let r=this,i=0;for(;r!=null&&r.statics.scope!==Z.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let n=this.prev instanceof SO?this.prev:null,r=n?n.length():0,i=this.next instanceof SO?this.next:null,a=i?i.text:``,{textNode:o}=this,s=o.data.split(e.CONTENTS).join(``);o.data=e.CONTENTS;let c;if(n)c=n,(s||i)&&(n.insertAt(n.length(),s+a),i&&i.remove());else if(i)c=i,i.insertAt(0,s);else{let e=document.createTextNode(s);c=this.scroll.create(e),this.parent.insertBefore(c,this)}if(this.remove(),t){let e=(e,t)=>n&&e===n.domNode?t:e===o?r+t-1:i&&e===i.domNode?r+s.length+t:null,a=e(t.start.node,t.start.offset),l=e(t.end.node,t.end.offset);if(a!==null&&l!==null)return{startNode:c.domNode,startOffset:a,endNode:c.domNode,endOffset:l}}return null}update(e,t){if(e.some(e=>e.type===`characterData`&&e.target===this.textNode)){let e=this.restore();e&&(t.range=e)}}optimize(t){super.optimize(t);let{parent:n}=this;for(;n;){if(n.domNode.tagName===`A`){this.savedLength=e.CONTENTS.length,n.isolate(this.offset(n),this.length()).unwrap(),this.savedLength=0;break}n=n.parent}}value(){return``}}})),IO=h(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)})),LO,RO=m((()=>{LO=v(IO(),1)})),zO,BO=m((()=>{zO=new WeakMap}));function VO(e){if(WO&&UO.indexOf(e)<=UO.indexOf(WO)){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console[e](...n)}}function HO(e){return UO.reduce((t,n)=>(t[n]=VO.bind(console,n,e),t),{})}var UO,WO,GO=m((()=>{UO=[`error`,`warn`,`log`,`info`],WO=`warn`,HO.level=e=>{WO=e},VO.level=HO.level})),KO,Q,qO=m((()=>{RO(),BO(),GO(),KO=HO(`quill:events`),[`selectionchange`,`mousedown`,`mouseup`,`click`].forEach(e=>{document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.from(document.querySelectorAll(`.ql-container`)).forEach(e=>{let n=zO.get(e);n&&n.emitter&&n.emitter.handleDOM(...t)})})}),Q=class extends LO.default{static events={EDITOR_CHANGE:`editor-change`,SCROLL_BEFORE_UPDATE:`scroll-before-update`,SCROLL_BLOT_MOUNT:`scroll-blot-mount`,SCROLL_BLOT_UNMOUNT:`scroll-blot-unmount`,SCROLL_OPTIMIZE:`scroll-optimize`,SCROLL_UPDATE:`scroll-update`,SCROLL_EMBED_UPDATE:`scroll-embed-update`,SELECTION_CHANGE:`selection-change`,TEXT_CHANGE:`text-change`,COMPOSITION_BEFORE_START:`composition-before-start`,COMPOSITION_START:`composition-start`,COMPOSITION_BEFORE_END:`composition-before-end`,COMPOSITION_END:`composition-end`};static sources={API:`api`,SILENT:`silent`,USER:`user`};constructor(){super(),this.domListeners={},this.on(`error`,KO.error)}emit(){var e=[...arguments];return KO.log.call(KO,...e),super.emit(...e)}handleDOM(e){var t=[...arguments].slice(1);(this.domListeners[e.type]||[]).forEach(n=>{let{node:r,handler:i}=n;(e.target===r||r.contains(e.target))&&i(e,...t)})}listenDOM(e,t,n){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:n})}}}));function JO(e,t){try{t.parentNode}catch{return!1}return e.contains(t)}var YO,XO,ZO,QO=m((()=>{dO(),OD(),qO(),GO(),YO=HO(`quill:selection`),XO=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}},ZO=class{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create(`cursor`,this),this.savedRange=new XO(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM(`selectionchange`,document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Q.sources.USER),1)}),this.emitter.on(Q.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let e=this.getNativeRange();e!=null&&e.start.node!==this.cursor.textNode&&this.emitter.once(Q.events.SCROLL_UPDATE,(t,n)=>{try{this.root.contains(e.start.node)&&this.root.contains(e.end.node)&&this.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset);let r=n.some(e=>e.type===`characterData`||e.type===`childList`||e.type===`attributes`&&e.target===this.root);this.update(r?Q.sources.SILENT:t)}catch{}})}),this.emitter.on(Q.events.SCROLL_OPTIMIZE,(e,t)=>{if(t.range){let{startNode:e,startOffset:n,endNode:r,endOffset:i}=t.range;this.setNativeRange(e,n,r,i),this.update(Q.sources.SILENT)}}),this.update(Q.sources.SILENT)}handleComposition(){this.emitter.on(Q.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Q.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM(`mousedown`,document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM(`mouseup`,document.body,()=>{this.mouseDown=!1,this.update(Q.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();let n=this.getNativeRange();if(!(n==null||!n.native.collapsed||this.scroll.query(e,Z.BLOCK))){if(n.start.node!==this.cursor.textNode){let e=this.scroll.find(n.start.node,!1);if(e==null)return;if(e instanceof qD){let t=e.split(n.start.offset);e.parent.insertBefore(this.cursor,t)}else e.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;let r,[i,a]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&a===i.length()){let[t]=this.scroll.leaf(e+1);if(t){let[n]=this.scroll.line(e),[r]=this.scroll.line(e+1);n===r&&(i=t,a=0)}}[r,a]=i.position(a,!0);let o=document.createRange();if(t>0)return o.setStart(r,a),[i,a]=this.scroll.leaf(e+t),i==null?null:([r,a]=i.position(a,!0),o.setEnd(r,a),o.getBoundingClientRect());let s=`left`,c;if(r instanceof Text){if(!r.data.length)return null;a<r.data.length?(o.setStart(r,a),o.setEnd(r,a+1)):(o.setStart(r,a-1),o.setEnd(r,a),s=`right`),c=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;c=i.domNode.getBoundingClientRect(),a>0&&(s=`right`)}return{bottom:c.top+c.height,height:c.height,left:c[s],right:c[s],top:c.top,width:0}}getNativeRange(){let e=document.getSelection();if(e==null||e.rangeCount<=0)return null;let t=e.getRangeAt(0);if(t==null)return null;let n=this.normalizeNative(t);return YO.info(`getNativeRange`,n),n}getRange(){let e=this.scroll.domNode;if(`isConnected`in e&&!e.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&JO(this.root,document.activeElement)}normalizedToRange(e){let t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);let n=t.map(e=>{let[t,n]=e,r=this.scroll.find(t,!0),i=r.offset(this.scroll);return n===0?i:r instanceof qD?i+r.index(t,n):i+r.length()}),r=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(r,...n);return new XO(i,r-i)}normalizeNative(e){if(!JO(this.root,e.startContainer)||!e.collapsed&&!JO(this.root,e.endContainer))return null;let t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(e=>{let{node:t,offset:n}=e;for(;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else if(t.childNodes.length===n)t=t.lastChild,n=t instanceof Text?t.data.length:t.childNodes.length>0?t.childNodes.length:t.childNodes.length+1;else break;e.node=t,e.offset=n}),t}rangeToNative(e){let t=this.scroll.length(),n=(e,n)=>{e=Math.min(t-1,e);let[r,i]=this.scroll.leaf(e);return r?r.position(i,n):[null,-1]};return[...n(e.index,!1),...n(e.index+e.length,!0)]}setNativeRange(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(YO.info(`setNativeRange`,e,t,n,r),e!=null&&(this.root.parentNode==null||e.parentNode==null||n.parentNode==null))return;let a=document.getSelection();if(a!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:o}=this.getNativeRange()||{};if(o==null||i||e!==o.startContainer||t!==o.startOffset||n!==o.endContainer||r!==o.endOffset){e instanceof Element&&e.tagName===`BR`&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),n instanceof Element&&n.tagName===`BR`&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);let i=document.createRange();i.setStart(e,t),i.setEnd(n,r),a.removeAllRanges(),a.addRange(i)}}else a.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Q.sources.API;if(typeof t==`string`&&(n=t,t=!1),YO.info(`setRange`,e),e!=null){let n=this.rangeToNative(e);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(n)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q.sources.USER,t=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,this.lastRange!=null&&(this.savedRange=this.lastRange),!AE(t,this.lastRange)){if(!this.composing&&r!=null&&r.native.collapsed&&r.start.node!==this.cursor.textNode){let e=this.cursor.restore();e&&this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}let n=[Q.events.SELECTION_CHANGE,jT(this.lastRange),jT(t),e];this.emitter.emit(Q.events.EDITOR_CHANGE,...n),e!==Q.sources.SILENT&&this.emitter.emit(...n)}}}}));function $O(e,t,n){if(e.length===0){let[e]=nk(n.pop());return t<=0?`</li></${e}>`:`</li></${e}>${$O([],t-1,n)}`}let[{child:r,offset:i,length:a,indent:o,type:s},...c]=e,[l,u]=nk(s);if(o>t)return n.push(s),o===t+1?`<${l}><li${u}>${ek(r,i,a)}${$O(c,o,n)}`:`<${l}><li>${$O(e,t+1,n)}`;let d=n[n.length-1];if(o===t&&s===d)return`</li><li${u}>${ek(r,i,a)}${$O(c,o,n)}`;let[f]=nk(n.pop());return`</li></${f}>${$O(e,t-1,n)}`}function ek(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(`html`in e&&typeof e.html==`function`)return e.html(t,n);if(e instanceof SO)return xO(e.value().slice(t,t+n)).replaceAll(` `,` `);if(e instanceof XD){if(e.statics.blotName===`list-container`){let r=[];return e.children.forEachAt(t,n,(e,t,n)=>{let i=`formats`in e&&typeof e.formats==`function`?e.formats():{};r.push({child:e,offset:t,length:n,indent:i.indent||0,type:i.list})}),$O(r,-1,[])}let i=[];if(e.children.forEachAt(t,n,(e,t,n)=>{i.push(ek(e,t,n))}),r||e.statics.blotName===`list`)return i.join(``);let{outerHTML:a,innerHTML:o}=e.domNode,[s,c]=a.split(`>${o}<`);return s===`<table`?`<table style="border: 1px solid #000;">${i.join(``)}<${c}`:`${s}>${i.join(``)}<${c}`}return e.domNode instanceof Element?e.domNode.outerHTML:``}function tk(e,t){return Object.keys(t).reduce((n,r)=>{if(e[r]==null)return n;let i=t[r];return i===e[r]?n[r]=i:Array.isArray(i)?i.indexOf(e[r])<0?n[r]=i.concat([e[r]]):n[r]=i:n[r]=[i,e[r]],n},{})}function nk(e){let t=e===`ordered`?`ol`:`ul`;switch(e){case`checked`:return[t,` data-list="checked"`];case`unchecked`:return[t,` data-list="unchecked"`];default:return[t,``]}}function rk(e){return e.reduce((e,t)=>{if(typeof t.insert==`string`){let n=t.insert.replace(/\r\n/g,`
|
|
391
|
+
`).replace(/\r/g,`
|
|
392
|
+
`);return e.insert(n,t.attributes)}return e.push(t)},new ok.default)}function ik(e,t){let{index:n,length:r}=e;return new XO(n+t,r)}function ak(e){let t=[];return e.forEach(e=>{typeof e.insert==`string`?e.insert.split(`
|
|
393
|
+
`).forEach((n,r)=>{r&&t.push({insert:`
|
|
394
|
+
`,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}var ok,sk,ck,lk=m((()=>{OD(),dO(),ok=v(vO(),1),NO(),bO(),FO(),wO(),QO(),sk=/^[ -~]*$/,ck=class{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let n=rk(e),r=new ok.default;return ak(n.ops.slice()).reduce((e,n)=>{let i=ok.Op.length(n),a=n.attributes||{},o=!1,s=!1;if(n.insert!=null){if(r.retain(i),typeof n.insert==`string`){let r=n.insert;s=!r.endsWith(`
|
|
395
|
+
`)&&(t<=e||!!this.scroll.descendant(MO,e)[0]),this.scroll.insertAt(e,r);let[i,o]=this.scroll.line(e),c=ED({},OO(i));if(i instanceof jO){let[e]=i.descendant(qD,o);e&&(c=ED(c,OO(e)))}a=ok.AttributeMap.diff(c,a)||{}}else if(typeof n.insert==`object`){let r=Object.keys(n.insert)[0];if(r==null)return e;let i=this.scroll.query(r,Z.INLINE)!=null;if(i)(t<=e||this.scroll.descendant(MO,e)[0])&&(s=!0);else if(e>0){let[t,n]=this.scroll.descendant(qD,e-1);t instanceof SO?t.value()[n]!==`
|
|
396
|
+
`&&(o=!0):t instanceof iO&&t.statics.scope===Z.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(e,r,n.insert[r]),i){let[t]=this.scroll.descendant(qD,e);if(t){let e=ED({},OO(t));a=ok.AttributeMap.diff(e,a)||{}}}}t+=i}else if(r.push(n),n.retain!==null&&typeof n.retain==`object`){let t=Object.keys(n.retain)[0];if(t==null)return e;this.scroll.updateEmbedAt(e,t,n.retain[t])}Object.keys(a).forEach(t=>{this.scroll.formatAt(e,i,t,a[t])});let c=+!!o,l=+!!s;return t+=c+l,r.retain(c),r.delete(l),e+i+c+l},0),r.reduce((e,t)=>typeof t.delete==`number`?(this.scroll.deleteAt(e,t.delete),e):e+ok.Op.length(t),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new ok.default().retain(e).delete(t))}formatLine(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach(r=>{this.scroll.lines(e,Math.max(t,1)).forEach(e=>{e.format(r,n[r])})}),this.scroll.optimize();let r=new ok.default().retain(e).retain(t,jT(n));return this.update(r)}formatText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t,r,n[r])});let r=new ok.default().retain(e).retain(t,jT(n));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new ok.default)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=[],r=[];t===0?this.scroll.path(e).forEach(e=>{let[t]=e;t instanceof jO?n.push(t):t instanceof qD&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(qD,e,t));let[i,a]=[n,r].map(e=>{let t=e.shift();if(t==null)return{};let n=OO(t);for(;Object.keys(n).length>0;){let t=e.shift();if(t==null)return n;n=tk(OO(t),n)}return n});return{...i,...a}}getHTML(e,t){let[n,r]=this.scroll.line(e);if(n){let i=n.length();return n.length()>=r+t&&!(r===0&&t===i)?ek(n,r,t,!0):ek(this.scroll,e,t,!0)}return``}getText(e,t){return this.getContents(e,t).filter(e=>typeof e.insert==`string`).map(e=>e.insert).join(``)}insertContents(e,t){let n=rk(t),r=new ok.default().retain(e).concat(n);return this.scroll.insertContents(e,n),this.update(r)}insertEmbed(e,t,n){return this.scroll.insertAt(e,t,n),this.update(new ok.default().retain(e).insert({[t]:n}))}insertText(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
|
|
397
|
+
`).replace(/\r/g,`
|
|
398
|
+
`),this.scroll.insertAt(e,t),Object.keys(n).forEach(r=>{this.scroll.formatAt(e,t.length,r,n[r])}),this.update(new ok.default().retain(e).insert(t,jT(n)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let e=this.scroll.children.head;if(e?.statics.blotName!==jO.blotName)return!1;let t=e;return t.children.length>1?!1:t.children.head instanceof yO}removeFormat(e,t){let n=this.getText(e,t),[r,i]=this.scroll.line(e+t),a=0,o=new ok.default;r!=null&&(a=r.length()-i,o=r.delta().slice(i,i+a-1).insert(`
|
|
399
|
+
`));let s=this.getContents(e,t+a).diff(new ok.default().insert(n).concat(o)),c=new ok.default().retain(e).concat(s);return this.applyDelta(c)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this.delta;if(t.length===1&&t[0].type===`characterData`&&t[0].target.data.match(sk)&&this.scroll.find(t[0].target)){let i=this.scroll.find(t[0].target),a=OO(i),o=i.offset(this.scroll),s=t[0].oldValue.replace(PO.CONTENTS,``),c=new ok.default().insert(s),l=new ok.default().insert(i.value()),u=n&&{oldRange:ik(n.oldRange,-o),newRange:ik(n.newRange,-o)};e=new ok.default().retain(o).concat(c.diff(l,u)).reduce((e,t)=>t.insert?e.insert(t.insert,a):e.push(t),new ok.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),(!e||!AE(r.compose(e),this.delta))&&(e=r.diff(this.delta,n));return e}}})),uk,dk=m((()=>{uk=class{static DEFAULTS={};constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}})),fk,pk,mk=m((()=>{dO(),wO(),fk=``,pk=class extends iO{constructor(e,t){super(e,t),this.contentNode=document.createElement(`span`),this.contentNode.setAttribute(`contenteditable`,`false`),Array.from(this.domNode.childNodes).forEach(e=>{this.contentNode.appendChild(e)}),this.leftGuard=document.createTextNode(fk),this.rightGuard=document.createTextNode(fk),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,n,r=e.data.split(fk).join(``);if(e===this.leftGuard)if(this.prev instanceof SO){let e=this.prev.length();this.prev.insertAt(e,r),t={startNode:this.prev.domNode,startOffset:e+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof SO?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=fk,t}update(e,t){e.forEach(e=>{if(e.type===`characterData`&&(e.target===this.leftGuard||e.target===this.rightGuard)){let n=this.restore(e.target);n&&(t.range=n)}})}}})),hk,gk=m((()=>{mk(),qO(),hk=class{isComposing=!1;constructor(e,t){this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener(`compositionstart`,e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener(`compositionend`,e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){let t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof pk)&&(this.emitter.emit(Q.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(Q.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(Q.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(Q.events.COMPOSITION_END,e),this.isComposing=!1}}})),_k,vk=m((()=>{_k=class e{static DEFAULTS={modules:{}};static themes={default:e};modules={};constructor(e,t){this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]??this.addModule(e)})}addModule(e){let t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}})),yk,bk,xk,Sk,Ck,wk=m((()=>{yk=e=>e.parentElement||e.getRootNode().host||null,bk=e=>{let t=e.getBoundingClientRect(),n=`offsetWidth`in e&&Math.abs(t.width)/e.offsetWidth||1,r=`offsetHeight`in e&&Math.abs(t.height)/e.offsetHeight||1;return{top:t.top,right:t.left+e.clientWidth*n,bottom:t.top+e.clientHeight*r,left:t.left}},xk=e=>{let t=parseInt(e,10);return Number.isNaN(t)?0:t},Sk=(e,t,n,r,i,a)=>e<n&&t>r?0:e<n?-(n-e+i):t>r?t-e>r-n?e+i-n:t-r+a:0,Ck=(e,t)=>{let n=e.ownerDocument,r=t,i=e;for(;i;){let e=i===n.body,t=e?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:bk(i),a=getComputedStyle(i),o=Sk(r.left,r.right,t.left,t.right,xk(a.scrollPaddingLeft),xk(a.scrollPaddingRight)),s=Sk(r.top,r.bottom,t.top,t.bottom,xk(a.scrollPaddingTop),xk(a.scrollPaddingBottom));if(o||s)if(e)n.defaultView?.scrollBy(o,s);else{let{scrollLeft:e,scrollTop:t}=i;s&&(i.scrollTop+=s),o&&(i.scrollLeft+=o);let n=i.scrollLeft-e,a=i.scrollTop-t;r={left:r.left-n,top:r.top-a,right:r.right-n,bottom:r.bottom-a}}i=e||a.position===`fixed`?null:yk(i)}}})),Tk,Ek,Dk,Ok=m((()=>{dO(),Tk=100,Ek=[`block`,`break`,`cursor`,`inline`,`scroll`,`text`],Dk=(e,t,n)=>{let r=new LD;return Ek.forEach(e=>{let n=t.query(e);n&&r.register(n)}),e.forEach(e=>{let i=t.query(e);i||n.error(`Cannot register "${e}" specified in "formats" config. Are you sure it was registered?`);let a=0;for(;i;)if(r.register(i),i=`blotName`in i?i.requiredContainer??null:null,a+=1,a>Tk){n.error(`Cycle detected in registering blot requiredContainer: "${e}"`);break}}),r}}));function kk(e){return typeof e==`string`?document.querySelector(e):e}function Ak(e){return Object.entries(e??{}).reduce((e,t)=>{let[n,r]=t;return{...e,[n]:r===!0?{}:r}},{})}function jk(e){return Object.fromEntries(Object.entries(e).filter(e=>e[1]!==void 0))}function Mk(e,t){let n=kk(e);if(!n)throw Error(`Invalid Quill container`);let r=!t.theme||t.theme===$.DEFAULTS.theme?_k:$.import(`themes/${t.theme}`);if(!r)throw Error(`Invalid theme ${t.theme}. Did you register it?`);let{modules:i,...a}=$.DEFAULTS,{modules:o,...s}=r.DEFAULTS,c=Ak(t.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});let l=ED({},Ak(i),Ak(o),c),u={...a,...jk(s),...jk(t)},d=t.registry;return d?t.formats&&Lk.warn(`Ignoring "formats" option because "registry" is specified`):d=t.formats?Dk(t.formats,u.registry,Lk):u.registry,{...u,registry:d,container:n,theme:r,modules:Object.entries(l).reduce((e,t)=>{let[n,r]=t;if(!r)return e;let i=$.import(`modules/${n}`);return i==null?(Lk.error(`Cannot load ${n} module. Are you sure you registered it?`),e):{...e,[n]:ED({},i.DEFAULTS||{},r)}},{}),bounds:kk(u.bounds)}}function Nk(e,t,n,r){if(!this.isEnabled()&&t===Q.sources.USER&&!this.allowReadOnlyEdits)return new Ik.default;let i=n==null?null:this.getSelection(),a=this.editor.delta,o=e();if(i!=null&&(n===!0&&(n=i.index),r==null?i=Fk(i,o,t):r!==0&&(i=Fk(i,n,r,t)),this.setSelection(i,Q.sources.SILENT)),o.length()>0){let e=[Q.events.TEXT_CHANGE,o,a,t];this.emitter.emit(Q.events.EDITOR_CHANGE,...e),t!==Q.sources.SILENT&&this.emitter.emit(...e)}return o}function Pk(e,t,n,r,i){let a={};return typeof e.index==`number`&&typeof e.length==`number`?typeof t==`number`?(t=e.length,e=e.index):(i=r,r=n,n=t,t=e.length,e=e.index):typeof t!=`number`&&(i=r,r=n,n=t,t=0),typeof n==`object`?(a=n,i=r):typeof n==`string`&&(r==null?i=n:a[n]=r),i||=Q.sources.API,[e,t,a,i]}function Fk(e,t,n,r){let i=typeof n==`number`?n:0;if(e==null)return null;let a,o;return t&&typeof t.transformPosition==`function`?[a,o]=[e.index,e.index+e.length].map(e=>t.transformPosition(e,r!==Q.sources.USER)):[a,o]=[e.index,e.index+e.length].map(e=>e<t||e===t&&r===Q.sources.USER?e:i>=0?e+i:Math.max(t,e+i)),new XO(a,o-a)}var Ik,Lk,Rk,$,zk=m((()=>{OD(),dO(),Ik=v(vO(),1),lk(),qO(),BO(),GO(),dk(),QO(),gk(),vk(),wk(),Ok(),Lk=HO(`quill`),Rk=new LD,XD.uiClass=`ql-ui`,$=class e{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:``,readOnly:!1,registry:Rk,theme:`default`};static events=Q.events;static sources=Q.sources;static version=`2.0.3`;static imports={delta:Ik.default,parchment:kD,"core/module":uk,"core/theme":_k};static debug(e){e===!0&&(e=`log`),HO.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return zO.get(e)||Rk.find(e,t)}static import(e){return this.imports[e]??Lk.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!=`string`){let e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),n=`attrName`in e?e.attrName:e.blotName;typeof n==`string`?this.register(`formats/${n}`,e,t):Object.keys(e).forEach(n=>{this.register(n,e[n],t)})}else{let e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!n&&Lk.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith(`blots/`)||e.startsWith(`formats/`))&&t&&typeof t!=`boolean`&&t.blotName!==`abstract`&&Rk.register(t),typeof t.register==`function`&&t.register(Rk)}}constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Mk(t,n),this.container=this.options.container,this.container==null){Lk.error(`Invalid Quill container`,t);return}this.options.debug&&e.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add(`ql-container`),this.container.innerHTML=``,zO.set(this.container,this),this.root=this.addContainer(`ql-editor`),this.root.classList.add(`ql-blank`),this.emitter=new Q;let i=cO.blotName,a=this.options.registry.query(i);if(!a||!(`blotName`in a))throw Error(`Cannot initialize Quill without "${i}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new ck(this.scroll),this.selection=new ZO(this.scroll,this.emitter),this.composition=new hk(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule(`keyboard`),this.clipboard=this.theme.addModule(`clipboard`),this.history=this.theme.addModule(`history`),this.uploader=this.theme.addModule(`uploader`),this.theme.addModule(`input`),this.theme.addModule(`uiNode`),this.theme.init(),this.emitter.on(Q.events.EDITOR_CHANGE,e=>{e===Q.events.TEXT_CHANGE&&this.root.classList.toggle(`ql-blank`,this.editor.isBlank())}),this.emitter.on(Q.events.SCROLL_UPDATE,(e,t)=>{let n=this.selection.lastRange,[r]=this.selection.getRange(),i=n&&r?{oldRange:n,newRange:r}:void 0;Nk.call(this,()=>this.editor.update(null,t,i),e)}),this.emitter.on(Q.events.SCROLL_EMBED_UPDATE,(t,n)=>{let r=this.selection.lastRange,[i]=this.selection.getRange(),a=r&&i?{oldRange:r,newRange:i}:void 0;Nk.call(this,()=>{let e=new Ik.default().retain(t.offset(this)).retain({[t.statics.blotName]:n});return this.editor.update(e,[],a)},e.sources.USER)}),r){let e=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
|
|
400
|
+
`});this.setContents(e)}this.history.clear(),this.options.placeholder&&this.root.setAttribute(`data-placeholder`,this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e==`string`){let t=e;e=document.createElement(`div`),e.classList.add(t)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,n){return[e,t,,n]=Pk(e,t,n),Nk.call(this,()=>this.editor.deleteText(e,t),n,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;let t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle(`ql-disabled`,!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Q.sources.API;return Nk.call(this,()=>{let n=this.getSelection(!0),r=new Ik.default;if(n==null)return r;if(this.scroll.query(e,Z.BLOCK))r=this.editor.formatLine(n.index,n.length,{[e]:t});else if(n.length===0)return this.selection.format(e,t),r;else r=this.editor.formatText(n.index,n.length,{[e]:t});return this.setSelection(n,Q.sources.SILENT),r},n)}formatLine(e,t,n,r,i){let a;return[e,t,a,i]=Pk(e,t,n,r,i),Nk.call(this,()=>this.editor.formatLine(e,t,a),i,e,0)}formatText(e,t,n,r,i){let a;return[e,t,a,i]=Pk(e,t,n,r,i),Nk.call(this,()=>this.editor.formatText(e,t,a),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=null;if(n=typeof e==`number`?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length),!n)return null;let r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=Pk(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e==`number`?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e==`number`?this.scroll.lines(e,t):this.scroll.lines(e.index,e.length)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e==`number`&&(t??=this.getLength()-e),[e,t]=Pk(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e==`number`&&(t??=this.getLength()-e),[e,t]=Pk(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e.sources.API;return Nk.call(this,()=>this.editor.insertEmbed(t,n,r),i,t)}insertText(e,t,n,r,i){let a;return[e,,a,i]=Pk(e,0,n,r,i),Nk.call(this,()=>this.editor.insertText(e,t,a),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,n){return[e,t,,n]=Pk(e,t,n),Nk.call(this,()=>this.editor.removeFormat(e,t),n,e)}scrollRectIntoView(e){Ck(this.root,e)}scrollIntoView(){console.warn(`Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead.`),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API;return Nk.call(this,()=>{e=new Ik.default(e);let t=this.getLength(),n=this.editor.deleteText(0,t),r=this.editor.insertContents(0,e),i=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(i)},t)}setSelection(t,n,r){t==null?this.selection.setRange(null,n||e.sources.API):([t,n,,r]=Pk(t,n,r),this.selection.setRange(new XO(Math.max(0,t),n),r),r!==Q.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API,n=new Ik.default().insert(e);return this.setContents(n,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API;return Nk.call(this,()=>(e=new Ik.default(e),this.editor.applyDelta(e)),t,!0)}}})),Bk,Vk=m((()=>{dO(),Bk=class extends nO{}}));function Hk(e){return e instanceof jO||e instanceof MO}function Uk(e){return typeof e.updateContent==`function`}function Wk(e,t,n){n.reduce((t,n)=>{let r=Gk.Op.length(n),i=n.attributes||{};if(n.insert!=null){if(typeof n.insert==`string`){let r=n.insert;e.insertAt(t,r);let[a]=e.descendant(qD,t),o=OO(a);i=Gk.AttributeMap.diff(o,i)||{}}else if(typeof n.insert==`object`){let r=Object.keys(n.insert)[0];if(r==null)return t;if(e.insertAt(t,r,n.insert[r]),e.scroll.query(r,Z.INLINE)!=null){let[n]=e.descendant(qD,t),r=OO(n);i=Gk.AttributeMap.diff(r,i)||{}}}}return Object.keys(i).forEach(n=>{e.formatAt(t,r,n,i[n])}),t+r},t)}var Gk,Kk,qk=m((()=>{dO(),Gk=v(vO(),1),qO(),NO(),bO(),Vk(),Kk=class extends cO{static blotName=`scroll`;static className=`ql-editor`;static tagName=`DIV`;static defaultChild=jO;static allowedChildren=[jO,MO,Bk];constructor(e,t,n){let{emitter:r}=n;super(e,t),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener(`dragstart`,e=>this.handleDragStart(e))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(Q.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(Q.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(Q.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){let[n,r]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&n!==i&&r>0){if(n instanceof MO||i instanceof MO){this.optimize();return}let e=i.children.head instanceof yO?null:i.children.head;n.moveChildren(i,e),n.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute(`contenteditable`,e?`true`:`false`)}formatAt(e,t,n,r){super.formatAt(e,t,n,r),this.optimize()}insertAt(e,t,n){if(e>=this.length())if(n==null||this.scroll.query(t,Z.BLOCK)==null){let e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e),n==null&&t.endsWith(`
|
|
401
|
+
`)?e.insertAt(0,t.slice(0,-1),n):e.insertAt(0,t,n)}else{let e=this.scroll.create(t,n);this.appendChild(e)}else super.insertAt(e,t,n);this.optimize()}insertBefore(e,t){if(e.statics.scope===Z.INLINE_BLOT){let n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(e),super.insertBefore(n,t)}else super.insertBefore(e,t)}insertContents(e,t){let n=this.deltaToRenderBlocks(t.concat(new Gk.default().insert(`
|
|
402
|
+
`))),r=n.pop();if(r==null)return;this.batchStart();let i=n.shift();if(i){let t=i.type===`block`&&(i.delta.length()===0||!this.descendant(MO,e)[0]&&e<this.length()),n=i.type===`block`?i.delta:new Gk.default().insert({[i.key]:i.value});Wk(this,e,n);let r=+(i.type===`block`),a=e+n.length()+r;t&&this.insertAt(a-1,`
|
|
403
|
+
`);let o=OO(this.line(e)[0]),s=Gk.AttributeMap.diff(o,i.attributes)||{};Object.keys(s).forEach(e=>{this.formatAt(a-1,1,e,s[e])}),e=a}let[a,o]=this.children.find(e);if(n.length&&(a&&(a=a.split(o),o=0),n.forEach(e=>{if(e.type===`block`)Wk(this.createBlock(e.attributes,a||void 0),0,e.delta);else{let t=this.create(e.key,e.value);this.insertBefore(t,a||void 0),Object.keys(e.attributes).forEach(n=>{t.format(n,e.attributes[n])})}})),r.type===`block`&&r.delta.length()){let e=a?a.offset(a.scroll)+o:this.length();Wk(this,e,r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute(`contenteditable`)===`true`}leaf(e){let t=this.path(e).pop();if(!t)return[null,-1];let[n,r]=t;return n instanceof qD?[n,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Hk,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,n=(e,t,r)=>{let i=[],a=r;return e.children.forEachAt(t,r,(e,t,r)=>{Hk(e)?i.push(e):e instanceof nO&&(i=i.concat(n(e,t,a))),a-=r}),i};return n(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(Q.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=Q.sources.USER;typeof e==`string`&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(e=>{let{target:t}=e,n=this.find(t,!0);return n&&!Uk(n)}),e.length>0&&this.emitter.emit(Q.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(Q.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,n){let[r]=this.descendant(e=>e instanceof MO,e);r&&r.statics.blotName===t&&Uk(r)&&r.updateContent(n)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){let t=[],n=new Gk.default;return e.forEach(e=>{let r=e?.insert;if(r)if(typeof r==`string`){let i=r.split(`
|
|
404
|
+
`);i.slice(0,-1).forEach(r=>{n.insert(r,e.attributes),t.push({type:`block`,delta:n,attributes:e.attributes??{}}),n=new Gk.default});let a=i[i.length-1];a&&n.insert(a,e.attributes)}else{let i=Object.keys(r)[0];if(!i)return;this.query(i,Z.INLINE)?n.push(e):(n.length()&&t.push({type:`block`,delta:n,attributes:{}}),n=new Gk.default,t.push({type:`blockEmbed`,key:i,value:r[i],attributes:e.attributes??{}}))}}),n.length()&&t.push({type:`block`,delta:n,attributes:{}}),t}createBlock(e,t){let n,r={};Object.entries(e).forEach(e=>{let[t,i]=e;this.query(t,Z.BLOCK&Z.BLOT)==null?r[t]=i:n=t});let i=this.create(n||this.statics.defaultChild.blotName,n?e[n]:void 0);this.insertBefore(i,t||void 0);let a=i.length();return Object.entries(r).forEach(e=>{let[t,n]=e;i.formatAt(0,a,t,n)}),i}}})),Jk,Yk,Xk,Zk,Qk=m((()=>{dO(),Jk={scope:Z.BLOCK,whitelist:[`right`,`center`,`justify`]},Yk=new PD(`align`,`align`,Jk),Xk=new zD(`align`,`ql-align`,Jk),Zk=new VD(`align`,`text-align`,Jk)})),$k,eA,tA,nA=m((()=>{dO(),$k=class extends VD{value(e){let t=super.value(e);return t.startsWith(`rgb(`)?(t=t.replace(/^[^\d]+/,``).replace(/[^\d]+$/,``),`#${t.split(`,`).map(e=>`00${parseInt(e,10).toString(16)}`.slice(-2)).join(``)}`):t}},eA=new zD(`color`,`ql-color`,{scope:Z.INLINE}),tA=new $k(`color`,`color`,{scope:Z.INLINE})})),rA,iA,aA=m((()=>{dO(),nA(),rA=new zD(`background`,`ql-bg`,{scope:Z.INLINE}),iA=new $k(`background`,`background-color`,{scope:Z.INLINE})})),oA,sA,cA,lA=m((()=>{NO(),bO(),FO(),EO(),wO(),Vk(),zk(),oA=class extends Bk{static create(e){let t=super.create(e);return t.setAttribute(`spellcheck`,`false`),t}code(e,t){return this.children.map(e=>e.length()<=1?``:e.domNode.innerText).join(`
|
|
405
|
+
`).slice(e,e+t)}html(e,t){return`<pre>\n${xO(this.code(e,t))}\n</pre>`}},sA=class extends jO{static TAB=` `;static register(){$.register(oA)}},cA=class extends TO{},cA.blotName=`code`,cA.tagName=`CODE`,sA.blotName=`code-block`,sA.className=`ql-code-block`,sA.tagName=`DIV`,oA.blotName=`code-block-container`,oA.className=`ql-code-block-container`,oA.tagName=`DIV`,oA.allowedChildren=[sA],sA.allowedChildren=[SO,yO,PO],sA.requiredContainer=oA})),uA,dA,fA,pA,mA=m((()=>{dO(),uA={scope:Z.BLOCK,whitelist:[`rtl`]},dA=new PD(`direction`,`dir`,uA),fA=new zD(`direction`,`ql-direction`,uA),pA=new VD(`direction`,`direction`,uA)})),hA,gA,_A,vA,yA=m((()=>{dO(),hA={scope:Z.INLINE,whitelist:[`serif`,`monospace`]},gA=new zD(`font`,`ql-font`,hA),_A=class extends VD{value(e){return super.value(e).replace(/["']/g,``)}},vA=new _A(`font`,`font-family`,hA)})),bA,xA,SA=m((()=>{dO(),bA=new zD(`size`,`ql-size`,{scope:Z.INLINE,whitelist:[`small`,`large`,`huge`]}),xA=new VD(`size`,`font-size`,{scope:Z.INLINE,whitelist:[`10px`,`18px`,`32px`]})}));function CA(e){return{key:`Tab`,shiftKey:!e,format:{"code-block":!0},handler(t,n){let{event:r}=n,{TAB:i}=this.quill.scroll.query(`code-block`);if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,i,$.sources.USER),this.quill.setSelection(t.index+i.length,$.sources.SILENT);return}let a=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t),{index:o,length:s}=t;a.forEach((t,n)=>{e?(t.insertAt(0,i),n===0?o+=i.length:s+=i.length):t.domNode.textContent.startsWith(i)&&(t.deleteAt(0,i.length),n===0?o-=i.length:s-=i.length)}),this.quill.update($.sources.USER),this.quill.setSelection(o,s,$.sources.SILENT)}}}function wA(e,t){return{key:e,shiftKey:t,altKey:null,[e===`ArrowLeft`?`prefix`:`suffix`]:/^$/,handler(n){let{index:r}=n;e===`ArrowRight`&&(r+=n.length+1);let[i]=this.quill.getLeaf(r);return i instanceof iO?(e===`ArrowLeft`?t?this.quill.setSelection(n.index-1,n.length+1,$.sources.USER):this.quill.setSelection(n.index-1,$.sources.USER):t?this.quill.setSelection(n.index,n.length+1,$.sources.USER):this.quill.setSelection(n.index+n.length+1,$.sources.USER),!1):!0}}}function TA(e){return{key:e[0],shortKey:!0,handler(t,n){this.quill.format(e,!n.format[e],$.sources.USER)}}}function EA(e){return{key:e?`ArrowUp`:`ArrowDown`,collapsed:!0,format:[`table`],handler(t,n){let r=e?`prev`:`next`,i=n.line,a=i.parent[r];if(a!=null){if(a.statics.blotName===`table-row`){let e=a.children.head,t=i;for(;t.prev!=null;)t=t.prev,e=e.next;let r=e.offset(this.quill.scroll)+Math.min(n.offset,e.length()-1);this.quill.setSelection(r,0,$.sources.USER)}}else{let t=i.table()[r];t!=null&&(e?this.quill.setSelection(t.offset(this.quill.scroll)+t.length()-1,0,$.sources.USER):this.quill.setSelection(t.offset(this.quill.scroll),0,$.sources.USER))}return!1}}}function DA(e){if(typeof e==`string`||typeof e==`number`)e={key:e};else if(typeof e==`object`)e=jT(e);else return null;return e.shortKey&&(e[MA]=e.shortKey,delete e.shortKey),e}function OA(e){let{quill:t,range:n}=e,r=t.getLines(n),i={};if(r.length>1){let e=r[0].formats(),t=r[r.length-1].formats();i=AA.AttributeMap.diff(t,e)||{}}t.deleteText(n,$.sources.USER),Object.keys(i).length>0&&t.formatLine(n.index,1,i,$.sources.USER),t.setSelection(n.index,$.sources.SILENT)}function kA(e,t,n,r){return t.prev==null&&t.next==null?n.prev==null&&n.next==null?r===0?-1:1:n.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}var AA,jA,MA,NA,PA=m((()=>{OD(),AA=v(vO(),1),dO(),zk(),GO(),dk(),jA=HO(`quill:keyboard`),MA=/Mac/i.test(navigator.platform)?`metaKey`:`ctrlKey`,NA=class e extends uk{static match(e,t){return[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].some(n=>!!t[n]!==e[n]&&t[n]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(e=>{this.options.bindings[e]&&this.addBinding(this.options.bindings[e])}),this.addBinding({key:`Enter`,shiftKey:null},this.handleEnter),this.addBinding({key:`Enter`,metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:`Backspace`},{collapsed:!0},this.handleBackspace),this.addBinding({key:`Delete`},{collapsed:!0},this.handleDelete)):(this.addBinding({key:`Backspace`},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:`Delete`},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:`Backspace`},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:`Delete`},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:`Backspace`,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=DA(e);if(r==null){jA.warn(`Attempted to add invalid keyboard binding`,r);return}typeof t==`function`&&(t={handler:t}),typeof n==`function`&&(n={handler:n}),(Array.isArray(r.key)?r.key:[r.key]).forEach(e=>{let i={...r,key:e,...t,...n};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)})}listen(){this.quill.root.addEventListener(`keydown`,t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key===`Enter`||t.key===`Backspace`))return;let n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(n=>e.match(t,n));if(n.length===0)return;let r=$.find(t.target,!0);if(r&&r.scroll!==this.quill.scroll)return;let i=this.quill.getSelection();if(i==null||!this.quill.hasFocus())return;let[a,o]=this.quill.getLine(i.index),[s,c]=this.quill.getLeaf(i.index),[l,u]=i.length===0?[s,c]:this.quill.getLeaf(i.index+i.length),d=s instanceof uO?s.value().slice(0,c):``,f=l instanceof uO?l.value().slice(u):``,p={collapsed:i.length===0,empty:i.length===0&&a.length()<=1,format:this.quill.getFormat(i),line:a,offset:o,prefix:d,suffix:f,event:t};n.some(e=>{if(e.collapsed!=null&&e.collapsed!==p.collapsed||e.empty!=null&&e.empty!==p.empty||e.offset!=null&&e.offset!==p.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(e=>p.format[e]==null))return!1}else if(typeof e.format==`object`&&!Object.keys(e.format).every(t=>e.format[t]===!0?p.format[t]!=null:e.format[t]===!1?p.format[t]==null:AE(e.format[t],p.format[t])))return!1;return e.prefix!=null&&!e.prefix.test(p.prefix)||e.suffix!=null&&!e.suffix.test(p.suffix)?!1:e.handler.call(this,i,p,e)!==!0})&&t.preventDefault()})}handleBackspace(e,t){let n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let r={},[i]=this.quill.getLine(e.index),a=new AA.default().retain(e.index-n).delete(n);if(t.offset===0){let[t]=this.quill.getLine(e.index-1);if(t&&!(t.statics.blotName===`block`&&t.length()<=1)){let t=i.formats(),n=this.quill.getFormat(e.index-1,1);if(r=AA.AttributeMap.diff(t,n)||{},Object.keys(r).length>0){let t=new AA.default().retain(e.index+i.length()-2).retain(1,r);a=a.compose(t)}}}this.quill.updateContents(a,$.sources.USER),this.quill.focus()}handleDelete(e,t){let n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-n)return;let r={},[i]=this.quill.getLine(e.index),a=new AA.default().retain(e.index).delete(n);if(t.offset>=i.length()-1){let[t]=this.quill.getLine(e.index+1);if(t){let n=i.formats(),o=this.quill.getFormat(e.index,1);r=AA.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(a=a.retain(t.length()-1).retain(1,r))}}this.quill.updateContents(a,$.sources.USER),this.quill.focus()}handleDeleteRange(e){OA({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){let n=Object.keys(t.format).reduce((e,n)=>(this.quill.scroll.query(n,Z.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e),{}),r=new AA.default().retain(e.index).delete(e.length).insert(`
|
|
406
|
+
`,n);this.quill.updateContents(r,$.sources.USER),this.quill.setSelection(e.index+1,$.sources.SILENT),this.quill.focus()}},NA.DEFAULTS={bindings:{bold:TA(`bold`),italic:TA(`italic`),underline:TA(`underline`),indent:{key:`Tab`,format:[`blockquote`,`indent`,`list`],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format(`indent`,`+1`,$.sources.USER),!1)}},outdent:{key:`Tab`,shiftKey:!0,format:[`blockquote`,`indent`,`list`],handler(e,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format(`indent`,`-1`,$.sources.USER),!1)}},"outdent backspace":{key:`Backspace`,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:[`indent`,`list`],offset:0,handler(e,t){t.format.indent==null?t.format.list!=null&&this.quill.format(`list`,!1,$.sources.USER):this.quill.format(`indent`,`-1`,$.sources.USER)}},"indent code-block":CA(!0),"outdent code-block":CA(!1),"remove tab":{key:`Tab`,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(e){this.quill.deleteText(e.index-1,1,$.sources.USER)}},tab:{key:`Tab`,handler(e,t){if(t.format.table)return!0;this.quill.history.cutoff();let n=new AA.default().retain(e.index).delete(e.length).insert(` `);return this.quill.updateContents(n,$.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,$.sources.SILENT),!1}},"blockquote empty enter":{key:`Enter`,collapsed:!0,format:[`blockquote`],empty:!0,handler(){this.quill.format(`blockquote`,!1,$.sources.USER)}},"list empty enter":{key:`Enter`,collapsed:!0,format:[`list`],empty:!0,handler(e,t){let n={list:!1};t.format.indent&&(n.indent=!1),this.quill.formatLine(e.index,e.length,n,$.sources.USER)}},"checklist enter":{key:`Enter`,collapsed:!0,format:{list:`checked`},handler(e){let[t,n]=this.quill.getLine(e.index),r={...t.formats(),list:`checked`},i=new AA.default().retain(e.index).insert(`
|
|
407
|
+
`,r).retain(t.length()-n-1).retain(1,{list:`unchecked`});this.quill.updateContents(i,$.sources.USER),this.quill.setSelection(e.index+1,$.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:`Enter`,collapsed:!0,format:[`header`],suffix:/^$/,handler(e,t){let[n,r]=this.quill.getLine(e.index),i=new AA.default().retain(e.index).insert(`
|
|
408
|
+
`,t.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,$.sources.USER),this.quill.setSelection(e.index+1,$.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:`Backspace`,format:[`table`],collapsed:!0,offset:0,handler(){}},"table delete":{key:`Delete`,format:[`table`],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:`Enter`,shiftKey:null,format:[`table`],handler(e){let t=this.quill.getModule(`table`);if(t){let[n,r,i,a]=t.getTable(e),o=kA(n,r,i,a);if(o==null)return;let s=n.offset();if(o<0){let t=new AA.default().retain(s).insert(`
|
|
409
|
+
`);this.quill.updateContents(t,$.sources.USER),this.quill.setSelection(e.index+1,e.length,$.sources.SILENT)}else if(o>0){s+=n.length();let e=new AA.default().retain(s).insert(`
|
|
410
|
+
`);this.quill.updateContents(e,$.sources.USER),this.quill.setSelection(s,$.sources.USER)}}}},"table tab":{key:`Tab`,shiftKey:null,format:[`table`],handler(e,t){let{event:n,line:r}=t,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,$.sources.USER):this.quill.setSelection(i+r.length(),$.sources.USER)}},"list autofill":{key:` `,shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(e,t){if(this.quill.scroll.query(`list`)==null)return!0;let{length:n}=t.prefix,[r,i]=this.quill.getLine(e.index);if(i>n)return!0;let a;switch(t.prefix.trim()){case`[]`:case`[ ]`:a=`unchecked`;break;case`[x]`:a=`checked`;break;case`-`:case`*`:a=`bullet`;break;default:a=`ordered`}this.quill.insertText(e.index,` `,$.sources.USER),this.quill.history.cutoff();let o=new AA.default().retain(e.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:a});return this.quill.updateContents(o,$.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,$.sources.SILENT),!1}},"code exit":{key:`Enter`,collapsed:!0,format:[`code-block`],prefix:/^$/,suffix:/^\s*$/,handler(e){let[t,n]=this.quill.getLine(e.index),r=2,i=t;for(;i!=null&&i.length()<=1&&i.formats()[`code-block`];)if(i=i.prev,--r,r<=0){let r=new AA.default().retain(e.index+t.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,$.sources.USER),this.quill.setSelection(e.index-1,$.sources.SILENT),!1}return!0}},"embed left":wA(`ArrowLeft`,!1),"embed left shift":wA(`ArrowLeft`,!0),"embed right":wA(`ArrowRight`,!1),"embed right shift":wA(`ArrowRight`,!0),"table down":EA(!1),"table up":EA(!0)}}}));function FA(e){e.querySelector(`[id^="docs-internal-guid-"]`)&&(BA(e),zA(e))}var IA,LA,RA,zA,BA,VA=m((()=>{IA=/font-weight:\s*normal/,LA=[`P`,`OL`,`UL`],RA=e=>e&&LA.includes(e.tagName),zA=e=>{Array.from(e.querySelectorAll(`br`)).filter(e=>RA(e.previousElementSibling)&&RA(e.nextElementSibling)).forEach(e=>{e.parentNode?.removeChild(e)})},BA=e=>{Array.from(e.querySelectorAll(`b[style*="font-weight"]`)).filter(e=>e.getAttribute(`style`)?.match(IA)).forEach(t=>{let n=e.createDocumentFragment();n.append(...t.childNodes),t.parentNode?.replaceChild(n,t)})}}));function HA(e){e.documentElement.getAttribute(`xmlns:w`)===`urn:schemas-microsoft-com:office:word`&&qA(e)}var UA,WA,GA,KA,qA,JA=m((()=>{UA=/\bmso-list:[^;]*ignore/i,WA=/\bmso-list:[^;]*\bl(\d+)/i,GA=/\bmso-list:[^;]*\blevel(\d+)/i,KA=(e,t)=>{let n=e.getAttribute(`style`),r=n?.match(WA);if(!r)return null;let i=Number(r[1]),a=n?.match(GA),o=a?Number(a[1]):1,s=RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,`i`),c=t.match(s);return{id:i,indent:o,type:c&&c[1]===`bullet`?`bullet`:`ordered`,element:e}},qA=e=>{let t=Array.from(e.querySelectorAll(`[style*=mso-list]`)),n=[],r=[];t.forEach(e=>{(e.getAttribute(`style`)||``).match(UA)?n.push(e):r.push(e)}),n.forEach(e=>e.parentNode?.removeChild(e));let i=e.documentElement.innerHTML,a=r.map(e=>KA(e,i)).filter(e=>e);for(;a.length;){let e=[],t=a.shift();for(;t;)e.push(t),t=a.length&&a[0]?.element===t.element.nextElementSibling&&a[0].id===t.id?a.shift():null;let n=document.createElement(`ul`);e.forEach(e=>{let t=document.createElement(`li`);t.setAttribute(`data-list`,e.type),e.indent>1&&t.setAttribute(`class`,`ql-indent-${e.indent-1}`),t.innerHTML=e.element.innerHTML,n.appendChild(t)});let r=e[0]?.element,{parentNode:i}=r??{};r&&i?.replaceChild(n,r),e.slice(1).forEach(e=>{let{element:t}=e;i?.removeChild(t)})}}})),YA,XA,ZA=m((()=>{VA(),JA(),YA=[HA,FA],XA=e=>{e.documentElement&&YA.forEach(t=>{t(e)})}}));function QA(e,t,n,r){return r.query(t)?e.reduce((e,r)=>{if(!r.insert)return e;if(r.attributes&&r.attributes[t])return e.push(r);let i=n?{[t]:n}:{};return e.insert(r.insert,{...i,...r.attributes})},new gj.default):e}function $A(e,t){let n=``;for(let r=e.ops.length-1;r>=0&&n.length<t.length;--r){let t=e.ops[r];if(typeof t.insert!=`string`)break;n=t.insert+n}return n.slice(-1*t.length)===t}function ej(e,t){if(!(e instanceof Element))return!1;let n=t.query(e);return n&&n.prototype instanceof iO?!1:`address.article.blockquote.canvas.dd.div.dl.dt.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.iframe.li.main.nav.ol.output.p.pre.section.table.td.tr.ul.video`.split(`.`).includes(e.tagName.toLowerCase())}function tj(e,t){return e.previousElementSibling&&e.nextElementSibling&&!ej(e.previousElementSibling,t)&&!ej(e.nextElementSibling,t)}function nj(e){return e==null?!1:(Sj.has(e)||(e.tagName===`PRE`?Sj.set(e,!0):Sj.set(e,nj(e.parentNode))),Sj.get(e))}function rj(e,t,n,r,i){return t.nodeType===t.TEXT_NODE?r.reduce((n,r)=>r(t,n,e),new gj.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((a,o)=>{let s=rj(e,o,n,r,i);return o.nodeType===t.ELEMENT_NODE&&(s=n.reduce((t,n)=>n(o,t,e),s),s=(i.get(o)||[]).reduce((t,n)=>n(o,t,e),s)),a.concat(s)},new gj.default):new gj.default}function ij(e){return(t,n,r)=>QA(n,e,!0,r)}function aj(e,t,n){let r=PD.keys(e),i=zD.keys(e),a=VD.keys(e),o={};return r.concat(i).concat(a).forEach(t=>{let r=n.query(t,Z.ATTRIBUTE);r!=null&&(o[r.attrName]=r.value(e),o[r.attrName])||(r=yj[t],r!=null&&(r.attrName===t||r.keyName===t)&&(o[r.attrName]=r.value(e)||void 0),r=bj[t],r!=null&&(r.attrName===t||r.keyName===t)&&(r=bj[t],o[r.attrName]=r.value(e)||void 0))}),Object.entries(o).reduce((e,t)=>{let[r,i]=t;return QA(e,r,i,n)},t)}function oj(e,t,n){let r=n.query(e);if(r==null)return t;if(r.prototype instanceof iO){let t={},i=r.value(e);if(i!=null)return t[r.blotName]=i,new gj.default().insert(t,r.formats(e,n))}else if(r.prototype instanceof eO&&!$A(t,`
|
|
411
|
+
`)&&t.insert(`
|
|
412
|
+
`),`blotName`in r&&`formats`in r&&typeof r.formats==`function`)return QA(t,r.blotName,r.formats(e,n),n);return t}function sj(e,t){return $A(t,`
|
|
413
|
+
`)||t.insert(`
|
|
414
|
+
`),t}function cj(e,t,n){let r=n.query(`code-block`);return QA(t,`code-block`,r&&`formats`in r&&typeof r.formats==`function`?r.formats(e,n):!0,n)}function lj(){return new gj.default}function uj(e,t,n){let r=n.query(e);if(r==null||r.blotName!==`list`||!$A(t,`
|
|
415
|
+
`))return t;let i=-1,a=e.parentNode;for(;a!=null;)[`OL`,`UL`].includes(a.tagName)&&(i+=1),a=a.parentNode;return i<=0?t:t.reduce((e,t)=>t.insert?t.attributes&&typeof t.attributes.indent==`number`?e.push(t):e.insert(t.insert,{indent:i,...t.attributes||{}}):e,new gj.default)}function dj(e,t,n){let r=e,i=r.tagName===`OL`?`ordered`:`bullet`,a=r.getAttribute(`data-checked`);return a&&(i=a===`true`?`checked`:`unchecked`),QA(t,`list`,i,n)}function fj(e,t,n){if(!$A(t,`
|
|
416
|
+
`)){if(ej(e,n)&&(e.childNodes.length>0||e instanceof HTMLParagraphElement))return t.insert(`
|
|
417
|
+
`);if(t.length()>0&&e.nextSibling){let r=e.nextSibling;for(;r!=null;){if(ej(r,n))return t.insert(`
|
|
418
|
+
`);let e=n.query(r);if(e&&e.prototype instanceof MO)return t.insert(`
|
|
419
|
+
`);r=r.firstChild}}}return t}function pj(e,t,n){let r={},i=e.style||{};return i.fontStyle===`italic`&&(r.italic=!0),i.textDecoration===`underline`&&(r.underline=!0),i.textDecoration===`line-through`&&(r.strike=!0),(i.fontWeight?.startsWith(`bold`)||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((e,t)=>{let[r,i]=t;return QA(e,r,i,n)},t),parseFloat(i.textIndent||0)>0?new gj.default().insert(` `).concat(t):t}function mj(e,t,n){let r=e.parentElement?.tagName===`TABLE`?e.parentElement:e.parentElement?.parentElement;return r==null?t:QA(t,`table`,Array.from(r.querySelectorAll(`tr`)).indexOf(e)+1,n)}function hj(e,t,n){let r=e.data;if(e.parentElement?.tagName===`O:P`)return t.insert(r.trim());if(!nj(e)){if(r.trim().length===0&&r.includes(`
|
|
420
|
+
`)&&!tj(e,n))return t;r=r.replace(/[^\S\u00a0]/g,` `),r=r.replace(/ {2,}/g,` `),(e.previousSibling==null&&e.parentElement!=null&&ej(e.parentElement,n)||e.previousSibling instanceof Element&&ej(e.previousSibling,n))&&(r=r.replace(/^ /,``)),(e.nextSibling==null&&e.parentElement!=null&&ej(e.parentElement,n)||e.nextSibling instanceof Element&&ej(e.nextSibling,n))&&(r=r.replace(/ $/,``)),r=r.replaceAll(`\xA0`,` `)}return t.insert(r)}var gj,_j,vj,yj,bj,xj,Sj,Cj=m((()=>{dO(),gj=v(vO(),1),NO(),GO(),dk(),zk(),Qk(),aA(),lA(),nA(),mA(),yA(),SA(),PA(),ZA(),_j=HO(`quill:clipboard`),vj=[[Node.TEXT_NODE,hj],[Node.TEXT_NODE,fj],[`br`,sj],[Node.ELEMENT_NODE,fj],[Node.ELEMENT_NODE,oj],[Node.ELEMENT_NODE,aj],[Node.ELEMENT_NODE,pj],[`li`,uj],[`ol, ul`,dj],[`pre`,cj],[`tr`,mj],[`b`,ij(`bold`)],[`i`,ij(`italic`)],[`strike`,ij(`strike`)],[`style`,lj]],yj=[Yk,dA].reduce((e,t)=>(e[t.keyName]=t,e),{}),bj=[Zk,iA,tA,pA,vA,xA].reduce((e,t)=>(e[t.keyName]=t,e),{}),xj=class extends uk{static DEFAULTS={matchers:[]};constructor(e,t){super(e,t),this.quill.root.addEventListener(`copy`,e=>this.onCaptureCopy(e,!1)),this.quill.root.addEventListener(`cut`,e=>this.onCaptureCopy(e,!0)),this.quill.root.addEventListener(`paste`,this.onCapturePaste.bind(this)),this.matchers=[],vj.concat(this.options.matchers??[]).forEach(e=>{let[t,n]=e;this.addMatcher(t,n)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:n}=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r[sA.blotName])return new gj.default().insert(n||``,{[sA.blotName]:r[sA.blotName]});if(!t)return new gj.default().insert(n||``,r);let i=this.convertHTML(t);return $A(i,`
|
|
421
|
+
`)&&(i.ops[i.ops.length-1].attributes==null||r.table)?i.compose(new gj.default().retain(i.length()-1).delete(1)):i}normalizeHTML(e){XA(e)}convertHTML(e){let t=new DOMParser().parseFromString(e,`text/html`);this.normalizeHTML(t);let n=t.body,r=new WeakMap,[i,a]=this.prepareMatching(n,r);return rj(this.quill.scroll,n,i,a,r)}dangerouslyPasteHTML(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$.sources.API;if(typeof e==`string`){let n=this.convert({html:e,text:``});this.quill.setContents(n,t),this.quill.setSelection(0,$.sources.SILENT)}else{let r=this.convert({html:t,text:``});this.quill.updateContents(new gj.default().retain(e).concat(r),n),this.quill.setSelection(e+r.length(),$.sources.SILENT)}}onCaptureCopy(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();let[n]=this.quill.selection.getRange();if(n==null)return;let{html:r,text:i}=this.onCopy(n,t);e.clipboardData?.setData(`text/plain`,i),e.clipboardData?.setData(`text/html`,r),t&&OA({range:n,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(e=>e[0]!==`#`).join(`
|
|
422
|
+
`)}onCapturePaste(e){if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let n=e.clipboardData?.getData(`text/html`),r=e.clipboardData?.getData(`text/plain`);if(!n&&!r){let t=e.clipboardData?.getData(`text/uri-list`);t&&(r=this.normalizeURIList(t))}let i=Array.from(e.clipboardData?.files||[]);if(!n&&i.length>0){this.quill.uploader.upload(t,i);return}if(n&&i.length>0){let e=new DOMParser().parseFromString(n,`text/html`);if(e.body.childElementCount===1&&e.body.firstElementChild?.tagName===`IMG`){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:n,text:r})}onCopy(e){let t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:n,html:r}=t,i=this.quill.getFormat(e.index),a=this.convert({text:n,html:r},i);_j.log(`onPaste`,a,{text:n,html:r});let o=new gj.default().retain(e.index).delete(e.length).concat(a);this.quill.updateContents(o,$.sources.USER),this.quill.setSelection(o.length()-e.length,$.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){let n=[],r=[];return this.matchers.forEach(i=>{let[a,o]=i;switch(a){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(e.querySelectorAll(a)).forEach(e=>{t.has(e)?t.get(e)?.push(o):t.set(e,[o])});break}}),[n,r]}},Sj=new WeakMap}));function wj(e,t){let n=t;for(let t=e.length-1;t>=0;--t){let r=e[t];e[t]={delta:n.transform(r.delta,!0),range:r.range&&Dj(r.range,n)},n=r.delta.transform(n),e[t].delta.length()===0&&e.splice(t,1)}}function Tj(e,t){let n=t.ops[t.ops.length-1];return n==null?!1:n.insert==null?n.attributes==null?!1:Object.keys(n.attributes).some(t=>e.query(t,Z.BLOCK)!=null):typeof n.insert==`string`&&n.insert.endsWith(`
|
|
423
|
+
`)}function Ej(e,t){let n=t.reduce((e,t)=>e+(t.delete||0),0),r=t.length()-n;return Tj(e,t)&&--r,r}function Dj(e,t){if(!e)return e;let n=t.transformPosition(e.index);return{index:n,length:t.transformPosition(e.index+e.length)-n}}var Oj,kj=m((()=>{dO(),dk(),zk(),Oj=class extends uk{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(e,t){super(e,t),this.quill.on($.events.EDITOR_CHANGE,(e,t,n,r)=>{e===$.events.SELECTION_CHANGE?t&&r!==$.sources.SILENT&&(this.currentRange=t):e===$.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||r===$.sources.USER?this.record(t,n):this.transform(t)),this.currentRange=Dj(this.currentRange,t))}),this.quill.keyboard.addBinding({key:`z`,shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:[`z`,`Z`],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:`y`,shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener(`beforeinput`,e=>{e.inputType===`historyUndo`?(this.undo(),e.preventDefault()):e.inputType===`historyRedo`&&(this.redo(),e.preventDefault())})}change(e,t){if(this.stack[e].length===0)return;let n=this.stack[e].pop();if(!n)return;let r=this.quill.getContents(),i=n.delta.invert(r);this.stack[t].push({delta:i,range:Dj(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,$.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(t),r=this.currentRange,i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){let e=this.stack.undo.pop();e&&(n=n.compose(e.delta),r=e.range)}else this.lastRecorded=i;n.length()!==0&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change(`redo`,`undo`)}transform(e){wj(this.stack.undo,e),wj(this.stack.redo,e)}undo(){this.change(`undo`,`redo`)}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,$.sources.USER);else{let t=Ej(this.quill.scroll,e.delta);this.quill.setSelection(t,$.sources.USER)}}}})),Aj,jj,Mj=m((()=>{Aj=v(vO(),1),qO(),dk(),jj=class extends uk{constructor(e,t){super(e,t),e.root.addEventListener(`drop`,t=>{t.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(t.clientX,t.clientY);else if(document.caretPositionFromPoint){let e=document.caretPositionFromPoint(t.clientX,t.clientY);n=document.createRange(),n.setStart(e.offsetNode,e.offset),n.setEnd(e.offsetNode,e.offset)}let r=n&&e.selection.normalizeNative(n);if(r){let n=e.selection.normalizedToRange(r);t.dataTransfer?.files&&this.upload(n,t.dataTransfer.files)}})}upload(e,t){let n=[];Array.from(t).forEach(e=>{e&&this.options.mimetypes?.includes(e.type)&&n.push(e)}),n.length>0&&this.options.handler.call(this,e,n)}},jj.DEFAULTS={mimetypes:[`image/png`,`image/jpeg`],handler(e,t){if(!this.quill.scroll.query(`image`))return;let n=t.map(e=>new Promise(t=>{let n=new FileReader;n.onload=()=>{t(n.result)},n.readAsDataURL(e)}));Promise.all(n).then(t=>{let n=t.reduce((e,t)=>e.insert({image:t}),new Aj.default().retain(e.index).delete(e.length));this.quill.updateContents(n,Q.sources.USER),this.quill.setSelection(e.index+t.length,Q.sources.SILENT)})}}}));function Nj(e){return typeof e.data==`string`?e.data:e.dataTransfer?.types.includes(`text/plain`)?e.dataTransfer.getData(`text/plain`):null}var Pj,Fj,Ij,Lj=m((()=>{Pj=v(vO(),1),dk(),zk(),PA(),Fj=[`insertText`,`insertReplacementText`],Ij=class extends uk{constructor(e,t){super(e,t),e.root.addEventListener(`beforeinput`,e=>{this.handleBeforeInput(e)}),/Android/i.test(navigator.userAgent)||e.on($.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){OA({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``;if(e.length===0)return!1;if(t){let n=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new Pj.default().retain(e.index).insert(t,n),$.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,$.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!Fj.includes(e.inputType))return;let t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let n=Nj(e);if(n==null)return;let r=this.quill.selection.normalizeNative(t),i=r?this.quill.selection.normalizedToRange(r):null;i&&this.replaceText(i,n)&&e.preventDefault()}handleCompositionStart(){let e=this.quill.getSelection();e&&this.replaceText(e)}}})),Rj,zj,Bj,Vj=m((()=>{dO(),dk(),zk(),Rj=/Mac/i.test(navigator.platform),zj=e=>!!(e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`Home`||Rj&&e.key===`a`&&e.ctrlKey===!0),Bj=class extends uk{isListening=!1;selectionChangeDeadline=0;constructor(e,t){super(e,t),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:[`ArrowLeft`,`ArrowRight`],offset:0,shiftKey:null,handler(e,t){let{line:n,event:r}=t;if(!(n instanceof XD)||!n.uiNode)return!0;let i=getComputedStyle(n.domNode).direction===`rtl`;return i&&r.key!==`ArrowRight`||!i&&r.key!==`ArrowLeft`?!0:(this.quill.setSelection(e.index-1,e.length+ +!!r.shiftKey,$.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener(`keydown`,e=>{!e.defaultPrevented&&zj(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,!this.isListening&&(this.isListening=!0,document.addEventListener(`selectionchange`,()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()},{once:!0}))}handleSelectionChange(){let e=document.getSelection();if(!e)return;let t=e.getRangeAt(0);if(t.collapsed!==!0||t.startOffset!==0)return;let n=this.quill.scroll.find(t.startContainer);if(!(n instanceof XD)||!n.uiNode)return;let r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(r)}}})),Hj,Uj=m((()=>{zk(),NO(),bO(),Vk(),FO(),mk(),EO(),qk(),wO(),Cj(),kj(),PA(),Mj(),vO(),Lj(),Vj(),dk(),$.register({"blots/block":jO,"blots/block/embed":MO,"blots/break":yO,"blots/container":Bk,"blots/cursor":PO,"blots/embed":pk,"blots/inline":TO,"blots/scroll":Kk,"blots/text":SO,"modules/clipboard":xj,"modules/history":Oj,"modules/keyboard":NA,"modules/uploader":jj,"modules/input":Ij,"modules/uiNode":Bj}),Hj=$})),Wj,Gj,Kj=m((()=>{dO(),Wj=class extends zD{add(e,t){let n=0;if(t===`+1`||t===`-1`){let r=this.value(e)||0;n=t===`+1`?r+1:r-1}else typeof t==`number`&&(n=t);return n===0?(this.remove(e),!0):super.add(e,n.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}},Gj=new Wj(`indent`,`ql-indent`,{scope:Z.BLOCK,whitelist:[1,2,3,4,5,6,7,8]})})),qj,Jj=m((()=>{NO(),qj=class extends jO{static blotName=`blockquote`;static tagName=`blockquote`}})),Yj,Xj=m((()=>{NO(),Yj=class extends jO{static blotName=`header`;static tagName=[`H1`,`H2`,`H3`,`H4`,`H5`,`H6`];static formats(e){return this.tagName.indexOf(e.tagName)+1}}})),Zj,Qj,$j=m((()=>{NO(),Vk(),zk(),Zj=class extends Bk{},Zj.blotName=`list-container`,Zj.tagName=`OL`,Qj=class extends jO{static create(e){let t=super.create();return t.setAttribute(`data-list`,e),t}static formats(e){return e.getAttribute(`data-list`)||void 0}static register(){$.register(Zj)}constructor(e,t){super(e,t);let n=t.ownerDocument.createElement(`span`),r=n=>{if(!e.isEnabled())return;let r=this.statics.formats(t,e);r===`checked`?(this.format(`list`,`unchecked`),n.preventDefault()):r===`unchecked`&&(this.format(`list`,`checked`),n.preventDefault())};n.addEventListener(`mousedown`,r),n.addEventListener(`touchstart`,r),this.attachUI(n)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute(`data-list`,t):super.format(e,t)}},Qj.blotName=`list`,Qj.tagName=`LI`,Zj.allowedChildren=[Qj],Qj.requiredContainer=Zj})),eM,tM=m((()=>{EO(),eM=class extends TO{static blotName=`bold`;static tagName=[`STRONG`,`B`];static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}})),nM,rM=m((()=>{tM(),nM=class extends eM{static blotName=`italic`;static tagName=[`EM`,`I`]}}));function iM(e,t){let n=document.createElement(`a`);n.href=e;let r=n.href.slice(0,n.href.indexOf(`:`));return t.indexOf(r)>-1}var aM,oM=m((()=>{EO(),aM=class extends TO{static blotName=`link`;static tagName=`A`;static SANITIZED_URL=`about:blank`;static PROTOCOL_WHITELIST=[`http`,`https`,`mailto`,`tel`,`sms`];static create(e){let t=super.create(e);return t.setAttribute(`href`,this.sanitize(e)),t.setAttribute(`rel`,`noopener noreferrer`),t.setAttribute(`target`,`_blank`),t}static formats(e){return e.getAttribute(`href`)}static sanitize(e){return iM(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute(`href`,this.constructor.sanitize(t))}}})),sM,cM=m((()=>{EO(),sM=class extends TO{static blotName=`script`;static tagName=[`SUB`,`SUP`];static create(e){return e===`super`?document.createElement(`sup`):e===`sub`?document.createElement(`sub`):super.create(e)}static formats(e){if(e.tagName===`SUB`)return`sub`;if(e.tagName===`SUP`)return`super`}}})),lM,uM=m((()=>{tM(),lM=class extends eM{static blotName=`strike`;static tagName=[`S`,`STRIKE`]}})),dM,fM=m((()=>{EO(),dM=class extends TO{static blotName=`underline`;static tagName=`U`}})),pM,mM=m((()=>{mk(),pM=class extends pk{static blotName=`formula`;static className=`ql-formula`;static tagName=`SPAN`;static create(e){if(window.katex==null)throw Error(`Formula module requires KaTeX.`);let t=super.create(e);return typeof e==`string`&&(window.katex.render(e,t,{throwOnError:!1,errorColor:`#f00`}),t.setAttribute(`data-value`,e)),t}static value(e){return e.getAttribute(`data-value`)}html(){let{formula:e}=this.value();return`<span>${e}</span>`}}})),hM,gM,_M=m((()=>{dO(),oM(),hM=[`alt`,`height`,`width`],gM=class extends iO{static blotName=`image`;static tagName=`IMG`;static create(e){let t=super.create(e);return typeof e==`string`&&t.setAttribute(`src`,this.sanitize(e)),t}static formats(e){return hM.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return iM(e,[`http`,`https`,`data`])?e:`//:0`}static value(e){return e.getAttribute(`src`)}format(e,t){hM.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}})),vM,yM,bM=m((()=>{NO(),oM(),vM=[`height`,`width`],yM=class extends MO{static blotName=`video`;static className=`ql-video`;static tagName=`IFRAME`;static create(e){let t=super.create(e);return t.setAttribute(`frameborder`,`0`),t.setAttribute(`allowfullscreen`,`true`),t.setAttribute(`src`,this.sanitize(e)),t}static formats(e){return vM.reduce((t,n)=>(e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t),{})}static sanitize(e){return aM.sanitize(e)}static value(e){return e.getAttribute(`src`)}format(e,t){vM.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){let{video:e}=this.value();return`<a href="${e}">${e}</a>`}}})),xM,SM,CM,wM,TM,EM,DM,OM=m((()=>{xM=v(vO(),1),dO(),EO(),zk(),dk(),NO(),bO(),FO(),wO(),lA(),Cj(),SM=new zD(`code-token`,`hljs`,{scope:Z.INLINE}),CM=class e extends TO{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(sA.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,n){super(e,t,n),SM.add(this.domNode,n)}format(t,n){t===e.blotName?n?SM.add(this.domNode,n):(SM.remove(this.domNode),this.domNode.classList.remove(this.statics.className)):super.format(t,n)}optimize(){super.optimize(...arguments),SM.value(this.domNode)||this.unwrap()}},CM.blotName=`code-token`,CM.className=`ql-token`,wM=class extends sA{static create(e){let t=super.create(e);return typeof e==`string`&&t.setAttribute(`data-language`,e),t}static formats(e){return e.getAttribute(`data-language`)||`plain`}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute(`data-language`,t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),CM.blotName,!1),super.replaceWith(e,t)}},TM=class extends oA{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===wM.blotName&&(this.forceNext=!0,this.children.forEach(n=>{n.format(e,t)}))}formatAt(e,t,n,r){n===wM.blotName&&(this.forceNext=!0),super.formatAt(e,t,n,r)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).map(e=>e.textContent).join(`
|
|
424
|
+
`)}\n`,r=wM.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let t=this.children.reduce((e,t)=>e.concat(DO(t,!1)),new xM.default),i=e(n,r);t.diff(i).reduce((e,t)=>{let{retain:n,attributes:r}=t;return n?(r&&Object.keys(r).forEach(t=>{[wM.blotName,CM.blotName].includes(t)&&this.formatAt(e,n,t,r[t])}),e+n):e},0)}this.cachedText=n,this.forceNext=!1}}html(e,t){let[n]=this.children.find(e);return`<pre data-language="${n?wM.formats(n.domNode):`plain`}">\n${xO(this.code(e,t))}\n</pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let e=wM.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}},TM.allowedChildren=[wM],wM.requiredContainer=TM,wM.allowedChildren=[CM,PO,SO,yO],EM=(e,t,n)=>{if(typeof e.versionString==`string`){let r=e.versionString.split(`.`)[0];if(parseInt(r,10)>=11)return e.highlight(n,{language:t}).value}return e.highlight(t,n).value},DM=class extends uk{static register(){$.register(CM,!0),$.register(wM,!0),$.register(TM,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw Error(`Syntax module requires highlight.js. Please include the library on the page before Quill.`);this.languages=this.options.languages.reduce((e,t)=>{let{key:n}=t;return e[n]=!0,e},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on($.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof TM))return;let t=this.quill.root.ownerDocument.createElement(`select`);this.options.languages.forEach(e=>{let{key:n,label:r}=e,i=t.ownerDocument.createElement(`option`);i.textContent=r,i.setAttribute(`value`,n),t.appendChild(i)}),t.addEventListener(`change`,()=>{e.format(wM.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode??(e.attachUI(t),e.children.head&&(t.value=wM.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on($.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update($.sources.USER);let n=this.quill.getSelection();(e==null?this.quill.scroll.descendants(TM):[e]).forEach(e=>{e.highlight(this.highlightBlot,t)}),this.quill.update($.sources.SILENT),n!=null&&this.quill.setSelection(n,$.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`plain`;if(t=this.languages[t]?t:`plain`,t===`plain`)return xO(e).split(`
|
|
425
|
+
`).reduce((e,n,r)=>(r!==0&&e.insert(`
|
|
426
|
+
`,{[sA.blotName]:t}),e.insert(n)),new xM.default);let n=this.quill.root.ownerDocument.createElement(`div`);return n.classList.add(sA.className),n.innerHTML=EM(this.options.hljs,t,e),rj(this.quill.scroll,n,[(e,t)=>{let n=SM.value(e);return n?t.compose(new xM.default().retain(t.length(),{[CM.blotName]:n})):t}],[(e,n)=>e.data.split(`
|
|
427
|
+
`).reduce((e,n,r)=>(r!==0&&e.insert(`
|
|
428
|
+
`,{[sA.blotName]:t}),e.insert(n)),n)],new WeakMap)}},DM.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:`plain`,label:`Plain`},{key:`bash`,label:`Bash`},{key:`cpp`,label:`C++`},{key:`cs`,label:`C#`},{key:`css`,label:`CSS`},{key:`diff`,label:`Diff`},{key:`xml`,label:`HTML/XML`},{key:`java`,label:`Java`},{key:`javascript`,label:`JavaScript`},{key:`markdown`,label:`Markdown`},{key:`php`,label:`PHP`},{key:`python`,label:`Python`},{key:`ruby`,label:`Ruby`},{key:`sql`,label:`SQL`}]}}));function kM(){return`row-${Math.random().toString(36).slice(2,6)}`}var AM,jM,MM,NM,PM=m((()=>{NO(),Vk(),AM=class e extends jO{static blotName=`table`;static tagName=`TD`;static create(e){let t=super.create();return e?t.setAttribute(`data-row`,e):t.setAttribute(`data-row`,kM()),t}static formats(e){if(e.hasAttribute(`data-row`))return e.getAttribute(`data-row`)}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,n){t===e.blotName&&n?this.domNode.setAttribute(`data-row`,n):super.format(t,n)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}},jM=class extends Bk{static blotName=`table-row`;static tagName=`TR`;checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach(e=>{if(e.next==null)return;let t=e.formats(),n=e.next.formats();if(t.table!==n.table){let t=this.splitAfter(e);t&&t.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}},MM=class extends Bk{static blotName=`table-body`;static tagName=`TBODY`},NM=class extends Bk{static blotName=`table-container`;static tagName=`TABLE`;balanceCells(){let e=this.descendants(jM),t=e.reduce((e,t)=>Math.max(t.children.length,e),0);e.forEach(e=>{Array(t-e.children.length).fill(0).forEach(()=>{let t;e.children.head!=null&&(t=AM.formats(e.children.head.domNode));let n=this.scroll.create(AM.blotName,t);e.appendChild(n),n.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){let[t]=this.descendant(MM);t==null||t.children.head==null||t.children.forEach(t=>{t.children.at(e)?.remove()})}insertColumn(e){let[t]=this.descendant(MM);t==null||t.children.head==null||t.children.forEach(t=>{let n=t.children.at(e),r=AM.formats(t.children.head.domNode),i=this.scroll.create(AM.blotName,r);t.insertBefore(i,n)})}insertRow(e){let[t]=this.descendant(MM);if(t==null||t.children.head==null)return;let n=kM(),r=this.scroll.create(jM.blotName);t.children.head.children.forEach(()=>{let e=this.scroll.create(AM.blotName,n);r.appendChild(e)});let i=t.children.at(e);t.insertBefore(r,i)}rows(){let e=this.children.head;return e==null?[]:e.children.map(e=>e)}},NM.allowedChildren=[MM],MM.requiredContainer=NM,MM.allowedChildren=[jM],jM.requiredContainer=MM,jM.allowedChildren=[AM],AM.requiredContainer=jM})),FM,IM,LM=m((()=>{FM=v(vO(),1),zk(),dk(),PM(),IM=class extends uk{static register(){$.register(AM),$.register(jM),$.register(MM),$.register(NM)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(NM).forEach(e=>{e.balanceCells()})}deleteColumn(){let[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update($.sources.USER))}deleteRow(){let[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update($.sources.USER))}deleteTable(){let[e]=this.getTable();if(e==null)return;let t=e.offset();e.remove(),this.quill.update($.sources.USER),this.quill.setSelection(t,$.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];let[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==AM.blotName)return[null,null,null,-1];let r=t.parent;return[r.parent.parent,r,t,n]}insertColumn(e){let t=this.quill.getSelection();if(!t)return;let[n,r,i]=this.getTable(t);if(i==null)return;let a=i.cellOffset();n.insertColumn(a+e),this.quill.update($.sources.USER);let o=r.rowOffset();e===0&&(o+=1),this.quill.setSelection(t.index+o,t.length,$.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){let t=this.quill.getSelection();if(!t)return;let[n,r,i]=this.getTable(t);if(i==null)return;let a=r.rowOffset();n.insertRow(a+e),this.quill.update($.sources.USER),e>0?this.quill.setSelection(t,$.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,$.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){let n=this.quill.getSelection();if(n==null)return;let r=Array(e).fill(0).reduce(e=>{let n=Array(t).fill(`
|
|
429
|
+
`).join(``);return e.insert(n,{table:kM()})},new FM.default().retain(n.index));this.quill.updateContents(r,$.sources.USER),this.quill.setSelection(n.index,$.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on($.events.SCROLL_OPTIMIZE,e=>{e.some(e=>[`TD`,`TR`,`TBODY`,`TABLE`].includes(e.target.tagName)?(this.quill.once($.events.TEXT_CHANGE,(e,t,n)=>{n===$.sources.USER&&this.balanceTables()}),!0):!1)})}}}));function RM(e,t,n){let r=document.createElement(`button`);r.setAttribute(`type`,`button`),r.classList.add(`ql-${t}`),r.setAttribute(`aria-pressed`,`false`),n==null?r.setAttribute(`aria-label`,t):(r.value=n,r.setAttribute(`aria-label`,`${t}: ${n}`)),e.appendChild(r)}function zM(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(t=>{let n=document.createElement(`span`);n.classList.add(`ql-formats`),t.forEach(e=>{if(typeof e==`string`)RM(n,e);else{let t=Object.keys(e)[0],r=e[t];Array.isArray(r)?BM(n,t,r):RM(n,t,r)}}),e.appendChild(n)})}function BM(e,t,n){let r=document.createElement(`select`);r.classList.add(`ql-${t}`),n.forEach(e=>{let t=document.createElement(`option`);e===!1?t.setAttribute(`selected`,`selected`):t.setAttribute(`value`,String(e)),r.appendChild(t)}),e.appendChild(r)}var VM,HM,UM,WM=m((()=>{VM=v(vO(),1),dO(),zk(),GO(),dk(),HM=HO(`quill:toolbar`),UM=class extends uk{constructor(e,t){if(super(e,t),Array.isArray(this.options.container)){let t=document.createElement(`div`);t.setAttribute(`role`,`toolbar`),zM(t,this.options.container),e.container?.parentNode?.insertBefore(t,e.container),this.container=t}else typeof this.options.container==`string`?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){HM.error(`Container required for toolbar`,this.options);return}this.container.classList.add(`ql-toolbar`),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(e=>{let t=this.options.handlers?.[e];t&&this.addHandler(e,t)}),Array.from(this.container.querySelectorAll(`button, select`)).forEach(e=>{this.attach(e)}),this.quill.on($.events.EDITOR_CHANGE,()=>{let[e]=this.quill.selection.getRange();this.update(e)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(e=>e.indexOf(`ql-`)===0);if(!t)return;if(t=t.slice(3),e.tagName===`BUTTON`&&e.setAttribute(`type`,`button`),this.handlers[t]==null&&this.quill.scroll.query(t)==null){HM.warn(`ignoring attaching to nonexistent format`,t,e);return}let n=e.tagName===`SELECT`?`change`:`click`;e.addEventListener(n,n=>{let r;if(e.tagName===`SELECT`){if(e.selectedIndex<0)return;let t=e.options[e.selectedIndex];r=t.hasAttribute(`selected`)?!1:t.value||!1}else r=e.classList.contains(`ql-active`)?!1:e.value||!e.hasAttribute(`value`),n.preventDefault();this.quill.focus();let[i]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,r);else if(this.quill.scroll.query(t).prototype instanceof iO){if(r=prompt(`Enter ${t}`),!r)return;this.quill.updateContents(new VM.default().retain(i.index).delete(i.length).insert({[t]:r}),$.sources.USER)}else this.quill.format(t,r,$.sources.USER);this.update(i)}),this.controls.push([t,e])}update(e){let t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{let[r,i]=n;if(i.tagName===`SELECT`){let n=null;if(e==null)n=null;else if(t[r]==null)n=i.querySelector(`option[selected]`);else if(!Array.isArray(t[r])){let e=t[r];typeof e==`string`&&(e=e.replace(/"/g,`\\"`)),n=i.querySelector(`option[value="${e}"]`)}n==null?(i.value=``,i.selectedIndex=-1):n.selected=!0}else if(e==null)i.classList.remove(`ql-active`),i.setAttribute(`aria-pressed`,`false`);else if(i.hasAttribute(`value`)){let e=t[r],n=e===i.getAttribute(`value`)||e!=null&&e.toString()===i.getAttribute(`value`)||e==null&&!i.getAttribute(`value`);i.classList.toggle(`ql-active`,n),i.setAttribute(`aria-pressed`,n.toString())}else{let e=t[r]!=null;i.classList.toggle(`ql-active`,e),i.setAttribute(`aria-pressed`,e.toString())}})}},UM.DEFAULTS={},UM.DEFAULTS={container:null,handlers:{clean(){let e=this.quill.getSelection();if(e!=null)if(e.length===0){let e=this.quill.getFormat();Object.keys(e).forEach(e=>{this.quill.scroll.query(e,Z.INLINE)!=null&&this.quill.format(e,!1,$.sources.USER)})}else this.quill.removeFormat(e.index,e.length,$.sources.USER)},direction(e){let{align:t}=this.quill.getFormat();e===`rtl`&&t==null?this.quill.format(`align`,`right`,$.sources.USER):!e&&t===`right`&&this.quill.format(`align`,!1,$.sources.USER),this.quill.format(`direction`,e,$.sources.USER)},indent(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0,10);if(e===`+1`||e===`-1`){let t=e===`+1`?1:-1;n.direction===`rtl`&&(t*=-1),this.quill.format(`indent`,r+t,$.sources.USER)}},link(e){e===!0&&(e=prompt(`Enter link URL:`)),this.quill.format(`link`,e,$.sources.USER)},list(e){let t=this.quill.getSelection(),n=this.quill.getFormat(t);e===`check`?n.list===`checked`||n.list===`unchecked`?this.quill.format(`list`,!1,$.sources.USER):this.quill.format(`list`,`unchecked`,$.sources.USER):this.quill.format(`list`,e,$.sources.USER)}}}})),GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,bN,xN,SN,CN,wN,TN=m((()=>{GM=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>`,KM=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>`,qM=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>`,JM=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>`,YM=`<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>`,XM=`<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>`,ZM=`<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>`,QM=`<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>`,$M=`<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>`,eN=`<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>`,tN=`<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>`,nN=`<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>`,rN=`<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>`,iN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>`,aN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>`,oN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>`,sN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>`,cN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>`,lN=`<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>`,uN=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>`,dN=`<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>`,fN=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>`,pN=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>`,mN=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>`,hN=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>`,gN=`<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>`,_N=`<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>`,vN=`<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>`,yN=`<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>`,bN=`<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>`,xN=`<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>`,SN=`<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>`,CN=`<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>`,wN={align:{"":GM,center:KM,right:qM,justify:JM},background:YM,blockquote:XM,bold:ZM,clean:QM,code:$M,"code-block":$M,color:eN,direction:{"":tN,rtl:nN},formula:rN,header:{1:iN,2:aN,3:oN,4:sN,5:cN,6:lN},italic:uN,image:dN,indent:{"+1":fN,"-1":pN},link:mN,list:{bullet:hN,check:gN,ordered:_N},script:{sub:vN,super:yN},strike:bN,table:xN,underline:SN,video:CN}}));function EN(e,t){e.setAttribute(t,`${e.getAttribute(t)!==`true`}`)}var DN,ON,kN,AN=m((()=>{DN=`<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>`,ON=0,kN=class{constructor(e){this.select=e,this.container=document.createElement(`span`),this.buildPicker(),this.select.style.display=`none`,this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener(`mousedown`,()=>{this.togglePicker()}),this.label.addEventListener(`keydown`,e=>{switch(e.key){case`Enter`:this.togglePicker();break;case`Escape`:this.escape(),e.preventDefault();break;default:}}),this.select.addEventListener(`change`,this.update.bind(this))}togglePicker(){this.container.classList.toggle(`ql-expanded`),EN(this.label,`aria-expanded`),EN(this.options,`aria-hidden`)}buildItem(e){let t=document.createElement(`span`);t.tabIndex=`0`,t.setAttribute(`role`,`button`),t.classList.add(`ql-picker-item`);let n=e.getAttribute(`value`);return n&&t.setAttribute(`data-value`,n),e.textContent&&t.setAttribute(`data-label`,e.textContent),t.addEventListener(`click`,()=>{this.selectItem(t,!0)}),t.addEventListener(`keydown`,e=>{switch(e.key){case`Enter`:this.selectItem(t,!0),e.preventDefault();break;case`Escape`:this.escape(),e.preventDefault();break;default:}}),t}buildLabel(){let e=document.createElement(`span`);return e.classList.add(`ql-picker-label`),e.innerHTML=DN,e.tabIndex=`0`,e.setAttribute(`role`,`button`),e.setAttribute(`aria-expanded`,`false`),this.container.appendChild(e),e}buildOptions(){let e=document.createElement(`span`);e.classList.add(`ql-picker-options`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=`-1`,e.id=`ql-picker-options-${ON}`,ON+=1,this.label.setAttribute(`aria-controls`,e.id),this.options=e,Array.from(this.select.options).forEach(t=>{let n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add(`ql-picker`),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove(`ql-expanded`),this.label.setAttribute(`aria-expanded`,`false`),this.options.setAttribute(`aria-hidden`,`true`)}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(`.ql-selected`);e!==n&&(n?.classList.remove(`ql-selected`),e!=null&&(e.classList.add(`ql-selected`),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute(`data-value`)?this.label.setAttribute(`data-value`,e.getAttribute(`data-value`)):this.label.removeAttribute(`data-value`),e.hasAttribute(`data-label`)?this.label.setAttribute(`data-label`,e.getAttribute(`data-label`)):this.label.removeAttribute(`data-label`),t&&(this.select.dispatchEvent(new Event(`change`)),this.close())))}update(){let e;if(this.select.selectedIndex>-1){let t=this.container.querySelector(`.ql-picker-options`).children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);let t=e!=null&&e!==this.select.querySelector(`option[selected]`);this.label.classList.toggle(`ql-active`,t)}}})),jN,MN=m((()=>{AN(),jN=class extends kN{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add(`ql-color-picker`),Array.from(this.container.querySelectorAll(`.ql-picker-item`)).slice(0,7).forEach(e=>{e.classList.add(`ql-primary`)})}buildItem(e){let t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute(`value`)||``,t}selectItem(e,t){super.selectItem(e,t);let n=this.label.querySelector(`.ql-color-label`),r=e&&e.getAttribute(`data-value`)||``;n&&(n.tagName===`line`?n.style.stroke=r:n.style.fill=r)}}})),NN,PN=m((()=>{AN(),NN=class extends kN{constructor(e,t){super(e),this.container.classList.add(`ql-icon-picker`),Array.from(this.container.querySelectorAll(`.ql-picker-item`)).forEach(e=>{e.innerHTML=t[e.getAttribute(`data-value`)||``]}),this.defaultItem=this.container.querySelector(`.ql-selected`),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);let n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}})),FN,IN,LN=m((()=>{FN=e=>{let{overflowY:t}=getComputedStyle(e,null);return t!==`visible`&&t!==`clip`},IN=class{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer(`ql-tooltip`),this.root.innerHTML=this.constructor.TEMPLATE,FN(this.quill.root)&&this.quill.root.addEventListener(`scroll`,()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add(`ql-hidden`)}position(e){let t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove(`ql-flip`);let r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),a=0;if(i.right>r.right&&(a=r.right-i.right,this.root.style.left=`${t+a}px`),i.left<r.left&&(a=r.left-i.left,this.root.style.left=`${t+a}px`),i.bottom>r.bottom){let t=i.bottom-i.top,r=e.bottom-e.top+t;this.root.style.top=`${n-r}px`,this.root.classList.add(`ql-flip`)}return a}show(){this.root.classList.remove(`ql-editing`),this.root.classList.remove(`ql-hidden`)}}}));function RN(e){let t=e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||`https`}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||`https`}://player.vimeo.com/video/${t[2]}/`:e}function zN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(t=>{let r=document.createElement(`option`);t===n?r.setAttribute(`selected`,`selected`):r.setAttribute(`value`,String(t)),e.appendChild(r)})}var BN,VN,HN,UN,WN,GN,KN,qN=m((()=>{OD(),qO(),vk(),MN(),PN(),AN(),LN(),BN=[!1,`center`,`right`,`justify`],VN=`#000000.#e60000.#ff9900.#ffff00.#008a00.#0066cc.#9933ff.#ffffff.#facccc.#ffebcc.#ffffcc.#cce8cc.#cce0f5.#ebd6ff.#bbbbbb.#f06666.#ffc266.#ffff66.#66b966.#66a3e0.#c285ff.#888888.#a10000.#b26b00.#b2b200.#006100.#0047b2.#6b24b2.#444444.#5c0000.#663d00.#666600.#003700.#002966.#3d1466`.split(`.`),HN=[!1,`serif`,`monospace`],UN=[`1`,`2`,`3`,!1],WN=[`small`,!1,`large`,`huge`],GN=class extends _k{constructor(e,t){super(e,t);let n=t=>{if(!document.body.contains(e.root)){document.body.removeEventListener(`click`,n);return}this.tooltip!=null&&!this.tooltip.root.contains(t.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(e=>{e.container.contains(t.target)||e.close()})};e.emitter.listenDOM(`click`,document.body,n)}addModule(e){let t=super.addModule(e);return e===`toolbar`&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(e=>{(e.getAttribute(`class`)||``).split(/\s+/).forEach(n=>{if(n.startsWith(`ql-`)&&(n=n.slice(3),t[n]!=null))if(n===`direction`)e.innerHTML=t[n][``]+t[n].rtl;else if(typeof t[n]==`string`)e.innerHTML=t[n];else{let r=e.value||``;r!=null&&t[n][r]&&(e.innerHTML=t[n][r])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(e=>{if(e.classList.contains(`ql-align`)&&(e.querySelector(`option`)??zN(e,BN),typeof t.align==`object`))return new NN(e,t.align);if(e.classList.contains(`ql-background`)||e.classList.contains(`ql-color`)){let n=e.classList.contains(`ql-background`)?`background`:`color`;return e.querySelector(`option`)??zN(e,VN,n===`background`?`#ffffff`:`#000000`),new jN(e,t[n])}return e.querySelector(`option`)??(e.classList.contains(`ql-font`)?zN(e,HN):e.classList.contains(`ql-header`)?zN(e,UN):e.classList.contains(`ql-size`)&&zN(e,WN)),new kN(e)}),this.quill.on(Q.events.EDITOR_CHANGE,()=>{this.pickers.forEach(e=>{e.update()})})}},GN.DEFAULTS=ED({},_k.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit(`formula`)},image(){let e=this.container.querySelector(`input.ql-image[type=file]`);e??(e=document.createElement(`input`),e.setAttribute(`type`,`file`),e.setAttribute(`accept`,this.quill.uploader.options.mimetypes.join(`, `)),e.classList.add(`ql-image`),e.addEventListener(`change`,()=>{let t=this.quill.getSelection(!0);this.quill.uploader.upload(t,e.files),e.value=``}),this.container.appendChild(e)),e.click()},video(){this.quill.theme.tooltip.edit(`video`)}}}}}),KN=class extends IN{constructor(e,t){super(e,t),this.textbox=this.root.querySelector(`input[type="text"]`),this.listen()}listen(){this.textbox.addEventListener(`keydown`,e=>{e.key===`Enter`?(this.save(),e.preventDefault()):e.key===`Escape`&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`link`,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove(`ql-hidden`),this.root.classList.add(`ql-editing`),this.textbox==null)return;t==null?e!==this.root.getAttribute(`data-mode`)&&(this.textbox.value=``):this.textbox.value=t;let n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute(`placeholder`,this.textbox.getAttribute(`data-${e}`)||``),this.root.setAttribute(`data-mode`,e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute(`data-mode`)){case`link`:{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,`link`,e,Q.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format(`link`,e,Q.sources.USER)),this.quill.root.scrollTop=t;break}case`video`:e=RN(e);case`formula`:{if(!e)break;let t=this.quill.getSelection(!0);if(t!=null){let n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute(`data-mode`),e,Q.sources.USER),this.root.getAttribute(`data-mode`)===`formula`&&this.quill.insertText(n+1,` `,Q.sources.USER),this.quill.setSelection(n+2,Q.sources.USER)}break}default:}this.textbox.value=``,this.hide()}}})),JN,YN,XN,ZN=m((()=>{OD(),qO(),qN(),QO(),TN(),zk(),JN=[[`bold`,`italic`,`link`],[{header:1},{header:2},`blockquote`]],YN=class extends KN{static TEMPLATE=[`<span class="ql-tooltip-arrow"></span>`,`<div class="ql-tooltip-editor">`,`<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">`,`<a class="ql-close"></a>`,`</div>`].join(``);constructor(e,t){super(e,t),this.quill.on(Q.events.EDITOR_CHANGE,(e,t,n,r)=>{if(e===Q.events.SELECTION_CHANGE)if(t!=null&&t.length>0&&r===Q.sources.USER){this.show(),this.root.style.left=`0px`,this.root.style.width=``,this.root.style.width=`${this.root.offsetWidth}px`;let e=this.quill.getLines(t.index,t.length);if(e.length===1){let e=this.quill.getBounds(t);e!=null&&this.position(e)}else{let n=e[e.length-1],r=this.quill.getIndex(n),i=Math.min(n.length()-1,t.index+t.length-r),a=this.quill.getBounds(new XO(r,i));a!=null&&this.position(a)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(`.ql-close`).addEventListener(`click`,()=>{this.root.classList.remove(`ql-editing`)}),this.quill.on(Q.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains(`ql-hidden`))return;let e=this.quill.getSelection();if(e!=null){let t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){let t=super.position(e),n=this.root.querySelector(`.ql-tooltip-arrow`);return n.style.marginLeft=``,t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}},XN=class extends GN{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=JN),super(e,t),this.quill.container.classList.add(`ql-bubble`)}extendToolbar(e){this.tooltip=new YN(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll(`button`),wN),this.buildPickers(e.container.querySelectorAll(`select`),wN))}},XN.DEFAULTS=ED({},GN.DEFAULTS,{modules:{toolbar:{handlers:{link(e){e?this.quill.theme.tooltip.edit():this.quill.format(`link`,!1,$.sources.USER)}}}}})})),QN,$N,eP,tP=m((()=>{OD(),qO(),qN(),oM(),QO(),TN(),zk(),QN=[[{header:[`1`,`2`,`3`,!1]}],[`bold`,`italic`,`underline`,`link`],[{list:`ordered`},{list:`bullet`}],[`clean`]],$N=class extends KN{static TEMPLATE=[`<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>`,`<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">`,`<a class="ql-action"></a>`,`<a class="ql-remove"></a>`].join(``);preview=this.root.querySelector(`a.ql-preview`);listen(){super.listen(),this.root.querySelector(`a.ql-action`).addEventListener(`click`,e=>{this.root.classList.contains(`ql-editing`)?this.save():this.edit(`link`,this.preview.textContent),e.preventDefault()}),this.root.querySelector(`a.ql-remove`).addEventListener(`click`,e=>{if(this.linkRange!=null){let e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,`link`,!1,Q.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(Q.events.SELECTION_CHANGE,(e,t,n)=>{if(e!=null){if(e.length===0&&n===Q.sources.USER){let[t,n]=this.quill.scroll.descendant(aM,e.index);if(t!=null){this.linkRange=new XO(e.index-n,t.length());let r=aM.formats(t.domNode);this.preview.textContent=r,this.preview.setAttribute(`href`,r),this.show();let i=this.quill.getBounds(this.linkRange);i!=null&&this.position(i);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute(`data-mode`)}},eP=class extends GN{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=QN),super(e,t),this.quill.container.classList.add(`ql-snow`)}extendToolbar(e){e.container!=null&&(e.container.classList.add(`ql-snow`),this.buildButtons(e.container.querySelectorAll(`button`),wN),this.buildPickers(e.container.querySelectorAll(`select`),wN),this.tooltip=new $N(this.quill,this.options.bounds),e.container.querySelector(`.ql-link`)&&this.quill.keyboard.addBinding({key:`k`,shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}},eP.DEFAULTS=ED({},GN.DEFAULTS,{modules:{toolbar:{handlers:{link(e){if(e){let e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf(`mailto:`)!==0&&(t=`mailto:${t}`);let{tooltip:n}=this.quill.theme;n.edit(`link`,t)}else this.quill.format(`link`,!1,$.sources.USER)}}}}})})),nP,rP=m((()=>{Uj(),Qk(),mA(),Kj(),Jj(),Xj(),$j(),aA(),nA(),yA(),SA(),tM(),rM(),oM(),cM(),uM(),fM(),mM(),_M(),bM(),lA(),OM(),LM(),WM(),TN(),AN(),MN(),PN(),LN(),ZN(),tP(),Hj.register({"attributors/attribute/direction":dA,"attributors/class/align":Xk,"attributors/class/background":rA,"attributors/class/color":eA,"attributors/class/direction":fA,"attributors/class/font":gA,"attributors/class/size":bA,"attributors/style/align":Zk,"attributors/style/background":iA,"attributors/style/color":tA,"attributors/style/direction":pA,"attributors/style/font":vA,"attributors/style/size":xA},!0),Hj.register({"formats/align":Xk,"formats/direction":fA,"formats/indent":Gj,"formats/background":iA,"formats/color":tA,"formats/font":gA,"formats/size":bA,"formats/blockquote":qj,"formats/code-block":sA,"formats/header":Yj,"formats/list":Qj,"formats/bold":eM,"formats/code":cA,"formats/italic":nM,"formats/link":aM,"formats/script":sM,"formats/strike":lM,"formats/underline":dM,"formats/formula":pM,"formats/image":gM,"formats/video":yM,"modules/syntax":DM,"modules/table":IM,"modules/toolbar":UM,"themes/bubble":XN,"themes/snow":eP,"ui/icons":wN,"ui/picker":kN,"ui/icon-picker":NN,"ui/color-picker":jN,"ui/tooltip":IN},!0),nP=Hj})),iP,aP,oP=m((()=>{iP=e=>`
|
|
430
|
+
@font-face {
|
|
431
|
+
font-family: 'KaTeX_AMS';
|
|
432
|
+
src: url(${e}fonts/KaTeX_AMS-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_AMS-Regular.woff) format('woff'), url(${e}fonts/KaTeX_AMS-Regular.ttf) format('truetype');
|
|
433
|
+
font-weight: normal;
|
|
434
|
+
font-style: normal;
|
|
435
|
+
}
|
|
436
|
+
@font-face {
|
|
437
|
+
font-family: 'KaTeX_Caligraphic';
|
|
438
|
+
src: url(${e}fonts/KaTeX_Caligraphic-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Caligraphic-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Caligraphic-Bold.ttf) format('truetype');
|
|
439
|
+
font-weight: bold;
|
|
440
|
+
font-style: normal;
|
|
441
|
+
}
|
|
442
|
+
@font-face {
|
|
443
|
+
font-family: 'KaTeX_Caligraphic';
|
|
444
|
+
src: url(${e}fonts/KaTeX_Caligraphic-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Caligraphic-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Caligraphic-Regular.ttf) format('truetype');
|
|
445
|
+
font-weight: normal;
|
|
446
|
+
font-style: normal;
|
|
447
|
+
}
|
|
448
|
+
@font-face {
|
|
449
|
+
font-family: 'KaTeX_Fraktur';
|
|
450
|
+
src: url(${e}fonts/KaTeX_Fraktur-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Fraktur-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Fraktur-Bold.ttf) format('truetype');
|
|
451
|
+
font-weight: bold;
|
|
452
|
+
font-style: normal;
|
|
453
|
+
}
|
|
454
|
+
@font-face {
|
|
455
|
+
font-family: 'KaTeX_Fraktur';
|
|
456
|
+
src: url(${e}fonts/KaTeX_Fraktur-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Fraktur-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Fraktur-Regular.ttf) format('truetype');
|
|
457
|
+
font-weight: normal;
|
|
458
|
+
font-style: normal;
|
|
459
|
+
}
|
|
460
|
+
@font-face {
|
|
461
|
+
font-family: 'KaTeX_Main';
|
|
462
|
+
src: url(${e}fonts/KaTeX_Main-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Bold.woff) format('woff'), url(${e}fonts/KaTeX_Main-Bold.ttf) format('truetype');
|
|
463
|
+
font-weight: bold;
|
|
464
|
+
font-style: normal;
|
|
465
|
+
}
|
|
466
|
+
@font-face {
|
|
467
|
+
font-family: 'KaTeX_Main';
|
|
468
|
+
src: url(${e}fonts/KaTeX_Main-BoldItalic.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-BoldItalic.woff) format('woff'), url(${e}fonts/KaTeX_Main-BoldItalic.ttf) format('truetype');
|
|
469
|
+
font-weight: bold;
|
|
470
|
+
font-style: italic;
|
|
471
|
+
}
|
|
472
|
+
@font-face {
|
|
473
|
+
font-family: 'KaTeX_Main';
|
|
474
|
+
src: url(${e}fonts/KaTeX_Main-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Italic.woff) format('woff'), url(${e}fonts/KaTeX_Main-Italic.ttf) format('truetype');
|
|
475
|
+
font-weight: normal;
|
|
476
|
+
font-style: italic;
|
|
477
|
+
}
|
|
478
|
+
@font-face {
|
|
479
|
+
font-family: 'KaTeX_Main';
|
|
480
|
+
src: url(${e}fonts/KaTeX_Main-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Main-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Main-Regular.ttf) format('truetype');
|
|
481
|
+
font-weight: normal;
|
|
482
|
+
font-style: normal;
|
|
483
|
+
}
|
|
484
|
+
@font-face {
|
|
485
|
+
font-family: 'KaTeX_Math';
|
|
486
|
+
src: url(${e}fonts/KaTeX_Math-BoldItalic.woff2) format('woff2'), url(${e}fonts/KaTeX_Math-BoldItalic.woff) format('woff'), url(${e}fonts/KaTeX_Math-BoldItalic.ttf) format('truetype');
|
|
487
|
+
font-weight: bold;
|
|
488
|
+
font-style: italic;
|
|
489
|
+
}
|
|
490
|
+
@font-face {
|
|
491
|
+
font-family: 'KaTeX_Math';
|
|
492
|
+
src: url(${e}fonts/KaTeX_Math-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_Math-Italic.woff) format('woff'), url(${e}fonts/KaTeX_Math-Italic.ttf) format('truetype');
|
|
493
|
+
font-weight: normal;
|
|
494
|
+
font-style: italic;
|
|
495
|
+
}
|
|
496
|
+
@font-face {
|
|
497
|
+
font-family: 'KaTeX_SansSerif';
|
|
498
|
+
src: url(${e}fonts/KaTeX_SansSerif-Bold.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Bold.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Bold.ttf) format('truetype');
|
|
499
|
+
font-weight: bold;
|
|
500
|
+
font-style: normal;
|
|
501
|
+
}
|
|
502
|
+
@font-face {
|
|
503
|
+
font-family: 'KaTeX_SansSerif';
|
|
504
|
+
src: url(${e}fonts/KaTeX_SansSerif-Italic.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Italic.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Italic.ttf) format('truetype');
|
|
505
|
+
font-weight: normal;
|
|
506
|
+
font-style: italic;
|
|
507
|
+
}
|
|
508
|
+
@font-face {
|
|
509
|
+
font-family: 'KaTeX_SansSerif';
|
|
510
|
+
src: url(${e}fonts/KaTeX_SansSerif-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_SansSerif-Regular.woff) format('woff'), url(${e}fonts/KaTeX_SansSerif-Regular.ttf) format('truetype');
|
|
511
|
+
font-weight: normal;
|
|
512
|
+
font-style: normal;
|
|
513
|
+
}
|
|
514
|
+
@font-face {
|
|
515
|
+
font-family: 'KaTeX_Script';
|
|
516
|
+
src: url(${e}fonts/KaTeX_Script-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Script-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Script-Regular.ttf) format('truetype');
|
|
517
|
+
font-weight: normal;
|
|
518
|
+
font-style: normal;
|
|
519
|
+
}
|
|
520
|
+
@font-face {
|
|
521
|
+
font-family: 'KaTeX_Size1';
|
|
522
|
+
src: url(${e}fonts/KaTeX_Size1-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size1-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size1-Regular.ttf) format('truetype');
|
|
523
|
+
font-weight: normal;
|
|
524
|
+
font-style: normal;
|
|
525
|
+
}
|
|
526
|
+
@font-face {
|
|
527
|
+
font-family: 'KaTeX_Size2';
|
|
528
|
+
src: url(${e}fonts/KaTeX_Size2-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size2-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size2-Regular.ttf) format('truetype');
|
|
529
|
+
font-weight: normal;
|
|
530
|
+
font-style: normal;
|
|
531
|
+
}
|
|
532
|
+
@font-face {
|
|
533
|
+
font-family: 'KaTeX_Size3';
|
|
534
|
+
src: url(${e}fonts/KaTeX_Size3-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size3-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size3-Regular.ttf) format('truetype');
|
|
535
|
+
font-weight: normal;
|
|
536
|
+
font-style: normal;
|
|
537
|
+
}
|
|
538
|
+
@font-face {
|
|
539
|
+
font-family: 'KaTeX_Size4';
|
|
540
|
+
src: url(${e}fonts/KaTeX_Size4-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Size4-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Size4-Regular.ttf) format('truetype');
|
|
541
|
+
font-weight: normal;
|
|
542
|
+
font-style: normal;
|
|
543
|
+
}
|
|
544
|
+
@font-face {
|
|
545
|
+
font-family: 'KaTeX_Typewriter';
|
|
546
|
+
src: url(${e}fonts/KaTeX_Typewriter-Regular.woff2) format('woff2'), url(${e}fonts/KaTeX_Typewriter-Regular.woff) format('woff'), url(${e}fonts/KaTeX_Typewriter-Regular.ttf) format('truetype');
|
|
547
|
+
font-weight: normal;
|
|
548
|
+
font-style: normal;
|
|
549
|
+
}
|
|
550
|
+
`,aP=()=>`
|
|
551
|
+
.katex {
|
|
552
|
+
font: normal 1.21em KaTeX_Main, Times New Roman, serif;
|
|
553
|
+
line-height: 1.2;
|
|
554
|
+
text-indent: 0;
|
|
555
|
+
text-rendering: auto;
|
|
556
|
+
}
|
|
557
|
+
.katex * {
|
|
558
|
+
-ms-high-contrast-adjust: none !important;
|
|
559
|
+
}
|
|
560
|
+
.katex * {
|
|
561
|
+
border-color: currentColor;
|
|
562
|
+
}
|
|
563
|
+
.katex .katex-version::after {
|
|
564
|
+
content: "0.16.9";
|
|
565
|
+
}
|
|
566
|
+
.katex .katex-mathml {
|
|
567
|
+
/* Accessibility hack to only show to screen readers
|
|
568
|
+
Found at: http://a11yproject.com/posts/how-to-hide-content/ */
|
|
569
|
+
position: absolute;
|
|
570
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
571
|
+
padding: 0;
|
|
572
|
+
border: 0;
|
|
573
|
+
height: 1px;
|
|
574
|
+
width: 1px;
|
|
575
|
+
overflow: hidden;
|
|
576
|
+
}
|
|
577
|
+
.katex .katex-html {
|
|
578
|
+
/*
|
|
579
|
+
ewline is an empty block at top level, between .base elements */
|
|
580
|
+
}
|
|
581
|
+
.katex .katex-html > .newline {
|
|
582
|
+
display: block;
|
|
583
|
+
}
|
|
584
|
+
.katex .base {
|
|
585
|
+
position: relative;
|
|
586
|
+
display: inline-block;
|
|
587
|
+
white-space: nowrap;
|
|
588
|
+
width: -webkit-min-content;
|
|
589
|
+
width: -moz-min-content;
|
|
590
|
+
width: min-content;
|
|
591
|
+
}
|
|
592
|
+
.katex .strut {
|
|
593
|
+
display: inline-block;
|
|
594
|
+
}
|
|
595
|
+
.katex .textbf {
|
|
596
|
+
font-weight: bold;
|
|
597
|
+
}
|
|
598
|
+
.katex .textit {
|
|
599
|
+
font-style: italic;
|
|
600
|
+
}
|
|
601
|
+
.katex .textrm {
|
|
602
|
+
font-family: KaTeX_Main;
|
|
603
|
+
}
|
|
604
|
+
.katex .textsf {
|
|
605
|
+
font-family: KaTeX_SansSerif;
|
|
606
|
+
}
|
|
607
|
+
.katex .texttt {
|
|
608
|
+
font-family: KaTeX_Typewriter;
|
|
609
|
+
}
|
|
610
|
+
.katex .mathnormal {
|
|
611
|
+
font-family: KaTeX_Math;
|
|
612
|
+
font-style: italic;
|
|
613
|
+
}
|
|
614
|
+
.katex .mathit {
|
|
615
|
+
font-family: KaTeX_Main;
|
|
616
|
+
font-style: italic;
|
|
617
|
+
}
|
|
618
|
+
.katex .mathrm {
|
|
619
|
+
font-style: normal;
|
|
620
|
+
}
|
|
621
|
+
.katex .mathbf {
|
|
622
|
+
font-family: KaTeX_Main;
|
|
623
|
+
font-weight: bold;
|
|
624
|
+
}
|
|
625
|
+
.katex .boldsymbol {
|
|
626
|
+
font-family: KaTeX_Math;
|
|
627
|
+
font-weight: bold;
|
|
628
|
+
font-style: italic;
|
|
629
|
+
}
|
|
630
|
+
.katex .amsrm {
|
|
631
|
+
font-family: KaTeX_AMS;
|
|
632
|
+
}
|
|
633
|
+
.katex .mathbb,
|
|
634
|
+
.katex .textbb {
|
|
635
|
+
font-family: KaTeX_AMS;
|
|
636
|
+
}
|
|
637
|
+
.katex .mathcal {
|
|
638
|
+
font-family: KaTeX_Caligraphic;
|
|
639
|
+
}
|
|
640
|
+
.katex .mathfrak,
|
|
641
|
+
.katex .textfrak {
|
|
642
|
+
font-family: KaTeX_Fraktur;
|
|
643
|
+
}
|
|
644
|
+
.katex .mathboldfrak,
|
|
645
|
+
.katex .textboldfrak {
|
|
646
|
+
font-family: KaTeX_Fraktur;
|
|
647
|
+
font-weight: bold;
|
|
648
|
+
}
|
|
649
|
+
.katex .mathtt {
|
|
650
|
+
font-family: KaTeX_Typewriter;
|
|
651
|
+
}
|
|
652
|
+
.katex .mathscr,
|
|
653
|
+
.katex .textscr {
|
|
654
|
+
font-family: KaTeX_Script;
|
|
655
|
+
}
|
|
656
|
+
.katex .mathsf,
|
|
657
|
+
.katex .textsf {
|
|
658
|
+
font-family: KaTeX_SansSerif;
|
|
659
|
+
}
|
|
660
|
+
.katex .mathboldsf,
|
|
661
|
+
.katex .textboldsf {
|
|
662
|
+
font-family: KaTeX_SansSerif;
|
|
663
|
+
font-weight: bold;
|
|
664
|
+
}
|
|
665
|
+
.katex .mathitsf,
|
|
666
|
+
.katex .textitsf {
|
|
667
|
+
font-family: KaTeX_SansSerif;
|
|
668
|
+
font-style: italic;
|
|
669
|
+
}
|
|
670
|
+
.katex .mainrm {
|
|
671
|
+
font-family: KaTeX_Main;
|
|
672
|
+
font-style: normal;
|
|
673
|
+
}
|
|
674
|
+
.katex .vlist-t {
|
|
675
|
+
display: inline-table;
|
|
676
|
+
table-layout: fixed;
|
|
677
|
+
border-collapse: collapse;
|
|
678
|
+
}
|
|
679
|
+
.katex .vlist-r {
|
|
680
|
+
display: table-row;
|
|
681
|
+
}
|
|
682
|
+
.katex .vlist {
|
|
683
|
+
display: table-cell;
|
|
684
|
+
vertical-align: bottom;
|
|
685
|
+
position: relative;
|
|
686
|
+
}
|
|
687
|
+
.katex .vlist > span {
|
|
688
|
+
display: block;
|
|
689
|
+
height: 0;
|
|
690
|
+
position: relative;
|
|
691
|
+
}
|
|
692
|
+
.katex .vlist > span > span {
|
|
693
|
+
display: inline-block;
|
|
694
|
+
}
|
|
695
|
+
.katex .vlist > span > .pstrut {
|
|
696
|
+
overflow: hidden;
|
|
697
|
+
width: 0;
|
|
698
|
+
}
|
|
699
|
+
.katex .vlist-t2 {
|
|
700
|
+
margin-right: -2px;
|
|
701
|
+
}
|
|
702
|
+
.katex .vlist-s {
|
|
703
|
+
display: table-cell;
|
|
704
|
+
vertical-align: bottom;
|
|
705
|
+
font-size: 1px;
|
|
706
|
+
width: 2px;
|
|
707
|
+
min-width: 2px;
|
|
708
|
+
}
|
|
709
|
+
.katex .vbox {
|
|
710
|
+
display: inline-flex;
|
|
711
|
+
flex-direction: column;
|
|
712
|
+
align-items: baseline;
|
|
713
|
+
}
|
|
714
|
+
.katex .hbox {
|
|
715
|
+
display: inline-flex;
|
|
716
|
+
flex-direction: row;
|
|
717
|
+
width: 100%;
|
|
718
|
+
}
|
|
719
|
+
.katex .thinbox {
|
|
720
|
+
display: inline-flex;
|
|
721
|
+
flex-direction: row;
|
|
722
|
+
width: 0;
|
|
723
|
+
max-width: 0;
|
|
724
|
+
}
|
|
725
|
+
.katex .msupsub {
|
|
726
|
+
text-align: left;
|
|
727
|
+
}
|
|
728
|
+
.katex .mfrac > span > span {
|
|
729
|
+
text-align: center;
|
|
730
|
+
}
|
|
731
|
+
.katex .mfrac .frac-line {
|
|
732
|
+
display: inline-block;
|
|
733
|
+
width: 100%;
|
|
734
|
+
border-bottom-style: solid;
|
|
735
|
+
}
|
|
736
|
+
.katex .mfrac .frac-line,
|
|
737
|
+
.katex .overline .overline-line,
|
|
738
|
+
.katex .underline .underline-line,
|
|
739
|
+
.katex .hline,
|
|
740
|
+
.katex .hdashline,
|
|
741
|
+
.katex .rule {
|
|
742
|
+
min-height: 1px;
|
|
743
|
+
}
|
|
744
|
+
.katex .mspace {
|
|
745
|
+
display: inline-block;
|
|
746
|
+
}
|
|
747
|
+
.katex .llap,
|
|
748
|
+
.katex .rlap,
|
|
749
|
+
.katex .clap {
|
|
750
|
+
width: 0;
|
|
751
|
+
position: relative;
|
|
752
|
+
}
|
|
753
|
+
.katex .llap > .inner,
|
|
754
|
+
.katex .rlap > .inner,
|
|
755
|
+
.katex .clap > .inner {
|
|
756
|
+
position: absolute;
|
|
757
|
+
}
|
|
758
|
+
.katex .llap > .fix,
|
|
759
|
+
.katex .rlap > .fix,
|
|
760
|
+
.katex .clap > .fix {
|
|
761
|
+
display: inline-block;
|
|
762
|
+
}
|
|
763
|
+
.katex .llap > .inner {
|
|
764
|
+
right: 0;
|
|
765
|
+
}
|
|
766
|
+
.katex .rlap > .inner,
|
|
767
|
+
.katex .clap > .inner {
|
|
768
|
+
left: 0;
|
|
769
|
+
}
|
|
770
|
+
.katex .clap > .inner > span {
|
|
771
|
+
margin-left: -50%;
|
|
772
|
+
margin-right: 50%;
|
|
773
|
+
}
|
|
774
|
+
.katex .rule {
|
|
775
|
+
display: inline-block;
|
|
776
|
+
border: solid 0;
|
|
777
|
+
position: relative;
|
|
778
|
+
}
|
|
779
|
+
.katex .overline .overline-line,
|
|
780
|
+
.katex .underline .underline-line,
|
|
781
|
+
.katex .hline {
|
|
782
|
+
display: inline-block;
|
|
783
|
+
width: 100%;
|
|
784
|
+
border-bottom-style: solid;
|
|
785
|
+
}
|
|
786
|
+
.katex .hdashline {
|
|
787
|
+
display: inline-block;
|
|
788
|
+
width: 100%;
|
|
789
|
+
border-bottom-style: dashed;
|
|
790
|
+
}
|
|
791
|
+
.katex .sqrt > .root {
|
|
792
|
+
margin-left: 0.27777778em;
|
|
793
|
+
margin-right: -0.55555556em;
|
|
794
|
+
}
|
|
795
|
+
.katex .sizing.reset-size1.size1,
|
|
796
|
+
.katex .fontsize-ensurer.reset-size1.size1 {
|
|
797
|
+
font-size: 1em;
|
|
798
|
+
}
|
|
799
|
+
.katex .sizing.reset-size1.size2,
|
|
800
|
+
.katex .fontsize-ensurer.reset-size1.size2 {
|
|
801
|
+
font-size: 1.2em;
|
|
802
|
+
}
|
|
803
|
+
.katex .sizing.reset-size1.size3,
|
|
804
|
+
.katex .fontsize-ensurer.reset-size1.size3 {
|
|
805
|
+
font-size: 1.4em;
|
|
806
|
+
}
|
|
807
|
+
.katex .sizing.reset-size1.size4,
|
|
808
|
+
.katex .fontsize-ensurer.reset-size1.size4 {
|
|
809
|
+
font-size: 1.6em;
|
|
810
|
+
}
|
|
811
|
+
.katex .sizing.reset-size1.size5,
|
|
812
|
+
.katex .fontsize-ensurer.reset-size1.size5 {
|
|
813
|
+
font-size: 1.8em;
|
|
814
|
+
}
|
|
815
|
+
.katex .sizing.reset-size1.size6,
|
|
816
|
+
.katex .fontsize-ensurer.reset-size1.size6 {
|
|
817
|
+
font-size: 2em;
|
|
818
|
+
}
|
|
819
|
+
.katex .sizing.reset-size1.size7,
|
|
820
|
+
.katex .fontsize-ensurer.reset-size1.size7 {
|
|
821
|
+
font-size: 2.4em;
|
|
822
|
+
}
|
|
823
|
+
.katex .sizing.reset-size1.size8,
|
|
824
|
+
.katex .fontsize-ensurer.reset-size1.size8 {
|
|
825
|
+
font-size: 2.88em;
|
|
826
|
+
}
|
|
827
|
+
.katex .sizing.reset-size1.size9,
|
|
828
|
+
.katex .fontsize-ensurer.reset-size1.size9 {
|
|
829
|
+
font-size: 3.456em;
|
|
830
|
+
}
|
|
831
|
+
.katex .sizing.reset-size1.size10,
|
|
832
|
+
.katex .fontsize-ensurer.reset-size1.size10 {
|
|
833
|
+
font-size: 4.148em;
|
|
834
|
+
}
|
|
835
|
+
.katex .sizing.reset-size1.size11,
|
|
836
|
+
.katex .fontsize-ensurer.reset-size1.size11 {
|
|
837
|
+
font-size: 4.976em;
|
|
838
|
+
}
|
|
839
|
+
.katex .sizing.reset-size2.size1,
|
|
840
|
+
.katex .fontsize-ensurer.reset-size2.size1 {
|
|
841
|
+
font-size: 0.83333333em;
|
|
842
|
+
}
|
|
843
|
+
.katex .sizing.reset-size2.size2,
|
|
844
|
+
.katex .fontsize-ensurer.reset-size2.size2 {
|
|
845
|
+
font-size: 1em;
|
|
846
|
+
}
|
|
847
|
+
.katex .sizing.reset-size2.size3,
|
|
848
|
+
.katex .fontsize-ensurer.reset-size2.size3 {
|
|
849
|
+
font-size: 1.16666667em;
|
|
850
|
+
}
|
|
851
|
+
.katex .sizing.reset-size2.size4,
|
|
852
|
+
.katex .fontsize-ensurer.reset-size2.size4 {
|
|
853
|
+
font-size: 1.33333333em;
|
|
854
|
+
}
|
|
855
|
+
.katex .sizing.reset-size2.size5,
|
|
856
|
+
.katex .fontsize-ensurer.reset-size2.size5 {
|
|
857
|
+
font-size: 1.5em;
|
|
858
|
+
}
|
|
859
|
+
.katex .sizing.reset-size2.size6,
|
|
860
|
+
.katex .fontsize-ensurer.reset-size2.size6 {
|
|
861
|
+
font-size: 1.66666667em;
|
|
862
|
+
}
|
|
863
|
+
.katex .sizing.reset-size2.size7,
|
|
864
|
+
.katex .fontsize-ensurer.reset-size2.size7 {
|
|
865
|
+
font-size: 2em;
|
|
866
|
+
}
|
|
867
|
+
.katex .sizing.reset-size2.size8,
|
|
868
|
+
.katex .fontsize-ensurer.reset-size2.size8 {
|
|
869
|
+
font-size: 2.4em;
|
|
870
|
+
}
|
|
871
|
+
.katex .sizing.reset-size2.size9,
|
|
872
|
+
.katex .fontsize-ensurer.reset-size2.size9 {
|
|
873
|
+
font-size: 2.88em;
|
|
874
|
+
}
|
|
875
|
+
.katex .sizing.reset-size2.size10,
|
|
876
|
+
.katex .fontsize-ensurer.reset-size2.size10 {
|
|
877
|
+
font-size: 3.45666667em;
|
|
878
|
+
}
|
|
879
|
+
.katex .sizing.reset-size2.size11,
|
|
880
|
+
.katex .fontsize-ensurer.reset-size2.size11 {
|
|
881
|
+
font-size: 4.14666667em;
|
|
882
|
+
}
|
|
883
|
+
.katex .sizing.reset-size3.size1,
|
|
884
|
+
.katex .fontsize-ensurer.reset-size3.size1 {
|
|
885
|
+
font-size: 0.71428571em;
|
|
886
|
+
}
|
|
887
|
+
.katex .sizing.reset-size3.size2,
|
|
888
|
+
.katex .fontsize-ensurer.reset-size3.size2 {
|
|
889
|
+
font-size: 0.85714286em;
|
|
890
|
+
}
|
|
891
|
+
.katex .sizing.reset-size3.size3,
|
|
892
|
+
.katex .fontsize-ensurer.reset-size3.size3 {
|
|
893
|
+
font-size: 1em;
|
|
894
|
+
}
|
|
895
|
+
.katex .sizing.reset-size3.size4,
|
|
896
|
+
.katex .fontsize-ensurer.reset-size3.size4 {
|
|
897
|
+
font-size: 1.14285714em;
|
|
898
|
+
}
|
|
899
|
+
.katex .sizing.reset-size3.size5,
|
|
900
|
+
.katex .fontsize-ensurer.reset-size3.size5 {
|
|
901
|
+
font-size: 1.28571429em;
|
|
902
|
+
}
|
|
903
|
+
.katex .sizing.reset-size3.size6,
|
|
904
|
+
.katex .fontsize-ensurer.reset-size3.size6 {
|
|
905
|
+
font-size: 1.42857143em;
|
|
906
|
+
}
|
|
907
|
+
.katex .sizing.reset-size3.size7,
|
|
908
|
+
.katex .fontsize-ensurer.reset-size3.size7 {
|
|
909
|
+
font-size: 1.71428571em;
|
|
910
|
+
}
|
|
911
|
+
.katex .sizing.reset-size3.size8,
|
|
912
|
+
.katex .fontsize-ensurer.reset-size3.size8 {
|
|
913
|
+
font-size: 2.05714286em;
|
|
914
|
+
}
|
|
915
|
+
.katex .sizing.reset-size3.size9,
|
|
916
|
+
.katex .fontsize-ensurer.reset-size3.size9 {
|
|
917
|
+
font-size: 2.46857143em;
|
|
918
|
+
}
|
|
919
|
+
.katex .sizing.reset-size3.size10,
|
|
920
|
+
.katex .fontsize-ensurer.reset-size3.size10 {
|
|
921
|
+
font-size: 2.96285714em;
|
|
922
|
+
}
|
|
923
|
+
.katex .sizing.reset-size3.size11,
|
|
924
|
+
.katex .fontsize-ensurer.reset-size3.size11 {
|
|
925
|
+
font-size: 3.55428571em;
|
|
926
|
+
}
|
|
927
|
+
.katex .sizing.reset-size4.size1,
|
|
928
|
+
.katex .fontsize-ensurer.reset-size4.size1 {
|
|
929
|
+
font-size: 0.625em;
|
|
930
|
+
}
|
|
931
|
+
.katex .sizing.reset-size4.size2,
|
|
932
|
+
.katex .fontsize-ensurer.reset-size4.size2 {
|
|
933
|
+
font-size: 0.75em;
|
|
934
|
+
}
|
|
935
|
+
.katex .sizing.reset-size4.size3,
|
|
936
|
+
.katex .fontsize-ensurer.reset-size4.size3 {
|
|
937
|
+
font-size: 0.875em;
|
|
938
|
+
}
|
|
939
|
+
.katex .sizing.reset-size4.size4,
|
|
940
|
+
.katex .fontsize-ensurer.reset-size4.size4 {
|
|
941
|
+
font-size: 1em;
|
|
942
|
+
}
|
|
943
|
+
.katex .sizing.reset-size4.size5,
|
|
944
|
+
.katex .fontsize-ensurer.reset-size4.size5 {
|
|
945
|
+
font-size: 1.125em;
|
|
946
|
+
}
|
|
947
|
+
.katex .sizing.reset-size4.size6,
|
|
948
|
+
.katex .fontsize-ensurer.reset-size4.size6 {
|
|
949
|
+
font-size: 1.25em;
|
|
950
|
+
}
|
|
951
|
+
.katex .sizing.reset-size4.size7,
|
|
952
|
+
.katex .fontsize-ensurer.reset-size4.size7 {
|
|
953
|
+
font-size: 1.5em;
|
|
954
|
+
}
|
|
955
|
+
.katex .sizing.reset-size4.size8,
|
|
956
|
+
.katex .fontsize-ensurer.reset-size4.size8 {
|
|
957
|
+
font-size: 1.8em;
|
|
958
|
+
}
|
|
959
|
+
.katex .sizing.reset-size4.size9,
|
|
960
|
+
.katex .fontsize-ensurer.reset-size4.size9 {
|
|
961
|
+
font-size: 2.16em;
|
|
962
|
+
}
|
|
963
|
+
.katex .sizing.reset-size4.size10,
|
|
964
|
+
.katex .fontsize-ensurer.reset-size4.size10 {
|
|
965
|
+
font-size: 2.5925em;
|
|
966
|
+
}
|
|
967
|
+
.katex .sizing.reset-size4.size11,
|
|
968
|
+
.katex .fontsize-ensurer.reset-size4.size11 {
|
|
969
|
+
font-size: 3.11em;
|
|
970
|
+
}
|
|
971
|
+
.katex .sizing.reset-size5.size1,
|
|
972
|
+
.katex .fontsize-ensurer.reset-size5.size1 {
|
|
973
|
+
font-size: 0.55555556em;
|
|
974
|
+
}
|
|
975
|
+
.katex .sizing.reset-size5.size2,
|
|
976
|
+
.katex .fontsize-ensurer.reset-size5.size2 {
|
|
977
|
+
font-size: 0.66666667em;
|
|
978
|
+
}
|
|
979
|
+
.katex .sizing.reset-size5.size3,
|
|
980
|
+
.katex .fontsize-ensurer.reset-size5.size3 {
|
|
981
|
+
font-size: 0.77777778em;
|
|
982
|
+
}
|
|
983
|
+
.katex .sizing.reset-size5.size4,
|
|
984
|
+
.katex .fontsize-ensurer.reset-size5.size4 {
|
|
985
|
+
font-size: 0.88888889em;
|
|
986
|
+
}
|
|
987
|
+
.katex .sizing.reset-size5.size5,
|
|
988
|
+
.katex .fontsize-ensurer.reset-size5.size5 {
|
|
989
|
+
font-size: 1em;
|
|
990
|
+
}
|
|
991
|
+
.katex .sizing.reset-size5.size6,
|
|
992
|
+
.katex .fontsize-ensurer.reset-size5.size6 {
|
|
993
|
+
font-size: 1.11111111em;
|
|
994
|
+
}
|
|
995
|
+
.katex .sizing.reset-size5.size7,
|
|
996
|
+
.katex .fontsize-ensurer.reset-size5.size7 {
|
|
997
|
+
font-size: 1.33333333em;
|
|
998
|
+
}
|
|
999
|
+
.katex .sizing.reset-size5.size8,
|
|
1000
|
+
.katex .fontsize-ensurer.reset-size5.size8 {
|
|
1001
|
+
font-size: 1.6em;
|
|
1002
|
+
}
|
|
1003
|
+
.katex .sizing.reset-size5.size9,
|
|
1004
|
+
.katex .fontsize-ensurer.reset-size5.size9 {
|
|
1005
|
+
font-size: 1.92em;
|
|
1006
|
+
}
|
|
1007
|
+
.katex .sizing.reset-size5.size10,
|
|
1008
|
+
.katex .fontsize-ensurer.reset-size5.size10 {
|
|
1009
|
+
font-size: 2.30444444em;
|
|
1010
|
+
}
|
|
1011
|
+
.katex .sizing.reset-size5.size11,
|
|
1012
|
+
.katex .fontsize-ensurer.reset-size5.size11 {
|
|
1013
|
+
font-size: 2.76444444em;
|
|
1014
|
+
}
|
|
1015
|
+
.katex .sizing.reset-size6.size1,
|
|
1016
|
+
.katex .fontsize-ensurer.reset-size6.size1 {
|
|
1017
|
+
font-size: 0.5em;
|
|
1018
|
+
}
|
|
1019
|
+
.katex .sizing.reset-size6.size2,
|
|
1020
|
+
.katex .fontsize-ensurer.reset-size6.size2 {
|
|
1021
|
+
font-size: 0.6em;
|
|
1022
|
+
}
|
|
1023
|
+
.katex .sizing.reset-size6.size3,
|
|
1024
|
+
.katex .fontsize-ensurer.reset-size6.size3 {
|
|
1025
|
+
font-size: 0.7em;
|
|
1026
|
+
}
|
|
1027
|
+
.katex .sizing.reset-size6.size4,
|
|
1028
|
+
.katex .fontsize-ensurer.reset-size6.size4 {
|
|
1029
|
+
font-size: 0.8em;
|
|
1030
|
+
}
|
|
1031
|
+
.katex .sizing.reset-size6.size5,
|
|
1032
|
+
.katex .fontsize-ensurer.reset-size6.size5 {
|
|
1033
|
+
font-size: 0.9em;
|
|
1034
|
+
}
|
|
1035
|
+
.katex .sizing.reset-size6.size6,
|
|
1036
|
+
.katex .fontsize-ensurer.reset-size6.size6 {
|
|
1037
|
+
font-size: 1em;
|
|
1038
|
+
}
|
|
1039
|
+
.katex .sizing.reset-size6.size7,
|
|
1040
|
+
.katex .fontsize-ensurer.reset-size6.size7 {
|
|
1041
|
+
font-size: 1.2em;
|
|
1042
|
+
}
|
|
1043
|
+
.katex .sizing.reset-size6.size8,
|
|
1044
|
+
.katex .fontsize-ensurer.reset-size6.size8 {
|
|
1045
|
+
font-size: 1.44em;
|
|
1046
|
+
}
|
|
1047
|
+
.katex .sizing.reset-size6.size9,
|
|
1048
|
+
.katex .fontsize-ensurer.reset-size6.size9 {
|
|
1049
|
+
font-size: 1.728em;
|
|
1050
|
+
}
|
|
1051
|
+
.katex .sizing.reset-size6.size10,
|
|
1052
|
+
.katex .fontsize-ensurer.reset-size6.size10 {
|
|
1053
|
+
font-size: 2.074em;
|
|
1054
|
+
}
|
|
1055
|
+
.katex .sizing.reset-size6.size11,
|
|
1056
|
+
.katex .fontsize-ensurer.reset-size6.size11 {
|
|
1057
|
+
font-size: 2.488em;
|
|
1058
|
+
}
|
|
1059
|
+
.katex .sizing.reset-size7.size1,
|
|
1060
|
+
.katex .fontsize-ensurer.reset-size7.size1 {
|
|
1061
|
+
font-size: 0.41666667em;
|
|
1062
|
+
}
|
|
1063
|
+
.katex .sizing.reset-size7.size2,
|
|
1064
|
+
.katex .fontsize-ensurer.reset-size7.size2 {
|
|
1065
|
+
font-size: 0.5em;
|
|
1066
|
+
}
|
|
1067
|
+
.katex .sizing.reset-size7.size3,
|
|
1068
|
+
.katex .fontsize-ensurer.reset-size7.size3 {
|
|
1069
|
+
font-size: 0.58333333em;
|
|
1070
|
+
}
|
|
1071
|
+
.katex .sizing.reset-size7.size4,
|
|
1072
|
+
.katex .fontsize-ensurer.reset-size7.size4 {
|
|
1073
|
+
font-size: 0.66666667em;
|
|
1074
|
+
}
|
|
1075
|
+
.katex .sizing.reset-size7.size5,
|
|
1076
|
+
.katex .fontsize-ensurer.reset-size7.size5 {
|
|
1077
|
+
font-size: 0.75em;
|
|
1078
|
+
}
|
|
1079
|
+
.katex .sizing.reset-size7.size6,
|
|
1080
|
+
.katex .fontsize-ensurer.reset-size7.size6 {
|
|
1081
|
+
font-size: 0.83333333em;
|
|
1082
|
+
}
|
|
1083
|
+
.katex .sizing.reset-size7.size7,
|
|
1084
|
+
.katex .fontsize-ensurer.reset-size7.size7 {
|
|
1085
|
+
font-size: 1em;
|
|
1086
|
+
}
|
|
1087
|
+
.katex .sizing.reset-size7.size8,
|
|
1088
|
+
.katex .fontsize-ensurer.reset-size7.size8 {
|
|
1089
|
+
font-size: 1.2em;
|
|
1090
|
+
}
|
|
1091
|
+
.katex .sizing.reset-size7.size9,
|
|
1092
|
+
.katex .fontsize-ensurer.reset-size7.size9 {
|
|
1093
|
+
font-size: 1.44em;
|
|
1094
|
+
}
|
|
1095
|
+
.katex .sizing.reset-size7.size10,
|
|
1096
|
+
.katex .fontsize-ensurer.reset-size7.size10 {
|
|
1097
|
+
font-size: 1.72833333em;
|
|
1098
|
+
}
|
|
1099
|
+
.katex .sizing.reset-size7.size11,
|
|
1100
|
+
.katex .fontsize-ensurer.reset-size7.size11 {
|
|
1101
|
+
font-size: 2.07333333em;
|
|
1102
|
+
}
|
|
1103
|
+
.katex .sizing.reset-size8.size1,
|
|
1104
|
+
.katex .fontsize-ensurer.reset-size8.size1 {
|
|
1105
|
+
font-size: 0.34722222em;
|
|
1106
|
+
}
|
|
1107
|
+
.katex .sizing.reset-size8.size2,
|
|
1108
|
+
.katex .fontsize-ensurer.reset-size8.size2 {
|
|
1109
|
+
font-size: 0.41666667em;
|
|
1110
|
+
}
|
|
1111
|
+
.katex .sizing.reset-size8.size3,
|
|
1112
|
+
.katex .fontsize-ensurer.reset-size8.size3 {
|
|
1113
|
+
font-size: 0.48611111em;
|
|
1114
|
+
}
|
|
1115
|
+
.katex .sizing.reset-size8.size4,
|
|
1116
|
+
.katex .fontsize-ensurer.reset-size8.size4 {
|
|
1117
|
+
font-size: 0.55555556em;
|
|
1118
|
+
}
|
|
1119
|
+
.katex .sizing.reset-size8.size5,
|
|
1120
|
+
.katex .fontsize-ensurer.reset-size8.size5 {
|
|
1121
|
+
font-size: 0.625em;
|
|
1122
|
+
}
|
|
1123
|
+
.katex .sizing.reset-size8.size6,
|
|
1124
|
+
.katex .fontsize-ensurer.reset-size8.size6 {
|
|
1125
|
+
font-size: 0.69444444em;
|
|
1126
|
+
}
|
|
1127
|
+
.katex .sizing.reset-size8.size7,
|
|
1128
|
+
.katex .fontsize-ensurer.reset-size8.size7 {
|
|
1129
|
+
font-size: 0.83333333em;
|
|
1130
|
+
}
|
|
1131
|
+
.katex .sizing.reset-size8.size8,
|
|
1132
|
+
.katex .fontsize-ensurer.reset-size8.size8 {
|
|
1133
|
+
font-size: 1em;
|
|
1134
|
+
}
|
|
1135
|
+
.katex .sizing.reset-size8.size9,
|
|
1136
|
+
.katex .fontsize-ensurer.reset-size8.size9 {
|
|
1137
|
+
font-size: 1.2em;
|
|
1138
|
+
}
|
|
1139
|
+
.katex .sizing.reset-size8.size10,
|
|
1140
|
+
.katex .fontsize-ensurer.reset-size8.size10 {
|
|
1141
|
+
font-size: 1.44027778em;
|
|
1142
|
+
}
|
|
1143
|
+
.katex .sizing.reset-size8.size11,
|
|
1144
|
+
.katex .fontsize-ensurer.reset-size8.size11 {
|
|
1145
|
+
font-size: 1.72777778em;
|
|
1146
|
+
}
|
|
1147
|
+
.katex .sizing.reset-size9.size1,
|
|
1148
|
+
.katex .fontsize-ensurer.reset-size9.size1 {
|
|
1149
|
+
font-size: 0.28935185em;
|
|
1150
|
+
}
|
|
1151
|
+
.katex .sizing.reset-size9.size2,
|
|
1152
|
+
.katex .fontsize-ensurer.reset-size9.size2 {
|
|
1153
|
+
font-size: 0.34722222em;
|
|
1154
|
+
}
|
|
1155
|
+
.katex .sizing.reset-size9.size3,
|
|
1156
|
+
.katex .fontsize-ensurer.reset-size9.size3 {
|
|
1157
|
+
font-size: 0.40509259em;
|
|
1158
|
+
}
|
|
1159
|
+
.katex .sizing.reset-size9.size4,
|
|
1160
|
+
.katex .fontsize-ensurer.reset-size9.size4 {
|
|
1161
|
+
font-size: 0.46296296em;
|
|
1162
|
+
}
|
|
1163
|
+
.katex .sizing.reset-size9.size5,
|
|
1164
|
+
.katex .fontsize-ensurer.reset-size9.size5 {
|
|
1165
|
+
font-size: 0.52083333em;
|
|
1166
|
+
}
|
|
1167
|
+
.katex .sizing.reset-size9.size6,
|
|
1168
|
+
.katex .fontsize-ensurer.reset-size9.size6 {
|
|
1169
|
+
font-size: 0.5787037em;
|
|
1170
|
+
}
|
|
1171
|
+
.katex .sizing.reset-size9.size7,
|
|
1172
|
+
.katex .fontsize-ensurer.reset-size9.size7 {
|
|
1173
|
+
font-size: 0.69444444em;
|
|
1174
|
+
}
|
|
1175
|
+
.katex .sizing.reset-size9.size8,
|
|
1176
|
+
.katex .fontsize-ensurer.reset-size9.size8 {
|
|
1177
|
+
font-size: 0.83333333em;
|
|
1178
|
+
}
|
|
1179
|
+
.katex .sizing.reset-size9.size9,
|
|
1180
|
+
.katex .fontsize-ensurer.reset-size9.size9 {
|
|
1181
|
+
font-size: 1em;
|
|
1182
|
+
}
|
|
1183
|
+
.katex .sizing.reset-size9.size10,
|
|
1184
|
+
.katex .fontsize-ensurer.reset-size9.size10 {
|
|
1185
|
+
font-size: 1.20023148em;
|
|
1186
|
+
}
|
|
1187
|
+
.katex .sizing.reset-size9.size11,
|
|
1188
|
+
.katex .fontsize-ensurer.reset-size9.size11 {
|
|
1189
|
+
font-size: 1.43981481em;
|
|
1190
|
+
}
|
|
1191
|
+
.katex .sizing.reset-size10.size1,
|
|
1192
|
+
.katex .fontsize-ensurer.reset-size10.size1 {
|
|
1193
|
+
font-size: 0.24108004em;
|
|
1194
|
+
}
|
|
1195
|
+
.katex .sizing.reset-size10.size2,
|
|
1196
|
+
.katex .fontsize-ensurer.reset-size10.size2 {
|
|
1197
|
+
font-size: 0.28929605em;
|
|
1198
|
+
}
|
|
1199
|
+
.katex .sizing.reset-size10.size3,
|
|
1200
|
+
.katex .fontsize-ensurer.reset-size10.size3 {
|
|
1201
|
+
font-size: 0.33751205em;
|
|
1202
|
+
}
|
|
1203
|
+
.katex .sizing.reset-size10.size4,
|
|
1204
|
+
.katex .fontsize-ensurer.reset-size10.size4 {
|
|
1205
|
+
font-size: 0.38572806em;
|
|
1206
|
+
}
|
|
1207
|
+
.katex .sizing.reset-size10.size5,
|
|
1208
|
+
.katex .fontsize-ensurer.reset-size10.size5 {
|
|
1209
|
+
font-size: 0.43394407em;
|
|
1210
|
+
}
|
|
1211
|
+
.katex .sizing.reset-size10.size6,
|
|
1212
|
+
.katex .fontsize-ensurer.reset-size10.size6 {
|
|
1213
|
+
font-size: 0.48216008em;
|
|
1214
|
+
}
|
|
1215
|
+
.katex .sizing.reset-size10.size7,
|
|
1216
|
+
.katex .fontsize-ensurer.reset-size10.size7 {
|
|
1217
|
+
font-size: 0.57859209em;
|
|
1218
|
+
}
|
|
1219
|
+
.katex .sizing.reset-size10.size8,
|
|
1220
|
+
.katex .fontsize-ensurer.reset-size10.size8 {
|
|
1221
|
+
font-size: 0.69431051em;
|
|
1222
|
+
}
|
|
1223
|
+
.katex .sizing.reset-size10.size9,
|
|
1224
|
+
.katex .fontsize-ensurer.reset-size10.size9 {
|
|
1225
|
+
font-size: 0.83317261em;
|
|
1226
|
+
}
|
|
1227
|
+
.katex .sizing.reset-size10.size10,
|
|
1228
|
+
.katex .fontsize-ensurer.reset-size10.size10 {
|
|
1229
|
+
font-size: 1em;
|
|
1230
|
+
}
|
|
1231
|
+
.katex .sizing.reset-size10.size11,
|
|
1232
|
+
.katex .fontsize-ensurer.reset-size10.size11 {
|
|
1233
|
+
font-size: 1.19961427em;
|
|
1234
|
+
}
|
|
1235
|
+
.katex .sizing.reset-size11.size1,
|
|
1236
|
+
.katex .fontsize-ensurer.reset-size11.size1 {
|
|
1237
|
+
font-size: 0.20096463em;
|
|
1238
|
+
}
|
|
1239
|
+
.katex .sizing.reset-size11.size2,
|
|
1240
|
+
.katex .fontsize-ensurer.reset-size11.size2 {
|
|
1241
|
+
font-size: 0.24115756em;
|
|
1242
|
+
}
|
|
1243
|
+
.katex .sizing.reset-size11.size3,
|
|
1244
|
+
.katex .fontsize-ensurer.reset-size11.size3 {
|
|
1245
|
+
font-size: 0.28135048em;
|
|
1246
|
+
}
|
|
1247
|
+
.katex .sizing.reset-size11.size4,
|
|
1248
|
+
.katex .fontsize-ensurer.reset-size11.size4 {
|
|
1249
|
+
font-size: 0.32154341em;
|
|
1250
|
+
}
|
|
1251
|
+
.katex .sizing.reset-size11.size5,
|
|
1252
|
+
.katex .fontsize-ensurer.reset-size11.size5 {
|
|
1253
|
+
font-size: 0.36173633em;
|
|
1254
|
+
}
|
|
1255
|
+
.katex .sizing.reset-size11.size6,
|
|
1256
|
+
.katex .fontsize-ensurer.reset-size11.size6 {
|
|
1257
|
+
font-size: 0.40192926em;
|
|
1258
|
+
}
|
|
1259
|
+
.katex .sizing.reset-size11.size7,
|
|
1260
|
+
.katex .fontsize-ensurer.reset-size11.size7 {
|
|
1261
|
+
font-size: 0.48231511em;
|
|
1262
|
+
}
|
|
1263
|
+
.katex .sizing.reset-size11.size8,
|
|
1264
|
+
.katex .fontsize-ensurer.reset-size11.size8 {
|
|
1265
|
+
font-size: 0.57877814em;
|
|
1266
|
+
}
|
|
1267
|
+
.katex .sizing.reset-size11.size9,
|
|
1268
|
+
.katex .fontsize-ensurer.reset-size11.size9 {
|
|
1269
|
+
font-size: 0.69453376em;
|
|
1270
|
+
}
|
|
1271
|
+
.katex .sizing.reset-size11.size10,
|
|
1272
|
+
.katex .fontsize-ensurer.reset-size11.size10 {
|
|
1273
|
+
font-size: 0.83360129em;
|
|
1274
|
+
}
|
|
1275
|
+
.katex .sizing.reset-size11.size11,
|
|
1276
|
+
.katex .fontsize-ensurer.reset-size11.size11 {
|
|
1277
|
+
font-size: 1em;
|
|
1278
|
+
}
|
|
1279
|
+
.katex .delimsizing.size1 {
|
|
1280
|
+
font-family: KaTeX_Size1;
|
|
1281
|
+
}
|
|
1282
|
+
.katex .delimsizing.size2 {
|
|
1283
|
+
font-family: KaTeX_Size2;
|
|
1284
|
+
}
|
|
1285
|
+
.katex .delimsizing.size3 {
|
|
1286
|
+
font-family: KaTeX_Size3;
|
|
1287
|
+
}
|
|
1288
|
+
.katex .delimsizing.size4 {
|
|
1289
|
+
font-family: KaTeX_Size4;
|
|
1290
|
+
}
|
|
1291
|
+
.katex .delimsizing.mult .delim-size1 > span {
|
|
1292
|
+
font-family: KaTeX_Size1;
|
|
1293
|
+
}
|
|
1294
|
+
.katex .delimsizing.mult .delim-size4 > span {
|
|
1295
|
+
font-family: KaTeX_Size4;
|
|
1296
|
+
}
|
|
1297
|
+
.katex .nulldelimiter {
|
|
1298
|
+
display: inline-block;
|
|
1299
|
+
width: 0.12em;
|
|
1300
|
+
}
|
|
1301
|
+
.katex .delimcenter {
|
|
1302
|
+
position: relative;
|
|
1303
|
+
}
|
|
1304
|
+
.katex .op-symbol {
|
|
1305
|
+
position: relative;
|
|
1306
|
+
}
|
|
1307
|
+
.katex .op-symbol.small-op {
|
|
1308
|
+
font-family: KaTeX_Size1;
|
|
1309
|
+
}
|
|
1310
|
+
.katex .op-symbol.large-op {
|
|
1311
|
+
font-family: KaTeX_Size2;
|
|
1312
|
+
}
|
|
1313
|
+
.katex .op-limits > .vlist-t {
|
|
1314
|
+
text-align: center;
|
|
1315
|
+
}
|
|
1316
|
+
.katex .accent > .vlist-t {
|
|
1317
|
+
text-align: center;
|
|
1318
|
+
}
|
|
1319
|
+
.katex .accent .accent-body {
|
|
1320
|
+
position: relative;
|
|
1321
|
+
}
|
|
1322
|
+
.katex .accent .accent-body:not(.accent-full) {
|
|
1323
|
+
width: 0;
|
|
1324
|
+
}
|
|
1325
|
+
.katex .overlay {
|
|
1326
|
+
display: block;
|
|
1327
|
+
}
|
|
1328
|
+
.katex .mtable .vertical-separator {
|
|
1329
|
+
display: inline-block;
|
|
1330
|
+
min-width: 1px;
|
|
1331
|
+
}
|
|
1332
|
+
.katex .mtable .arraycolsep {
|
|
1333
|
+
display: inline-block;
|
|
1334
|
+
}
|
|
1335
|
+
.katex .mtable .col-align-c > .vlist-t {
|
|
1336
|
+
text-align: center;
|
|
1337
|
+
}
|
|
1338
|
+
.katex .mtable .col-align-l > .vlist-t {
|
|
1339
|
+
text-align: left;
|
|
1340
|
+
}
|
|
1341
|
+
.katex .mtable .col-align-r > .vlist-t {
|
|
1342
|
+
text-align: right;
|
|
1343
|
+
}
|
|
1344
|
+
.katex .svg-align {
|
|
1345
|
+
text-align: left;
|
|
1346
|
+
}
|
|
1347
|
+
.katex svg {
|
|
1348
|
+
display: block;
|
|
1349
|
+
position: absolute;
|
|
1350
|
+
width: 100%;
|
|
1351
|
+
height: inherit;
|
|
1352
|
+
fill: currentColor;
|
|
1353
|
+
stroke: currentColor;
|
|
1354
|
+
fill-rule: nonzero;
|
|
1355
|
+
fill-opacity: 1;
|
|
1356
|
+
stroke-width: 1;
|
|
1357
|
+
stroke-linecap: butt;
|
|
1358
|
+
stroke-linejoin: miter;
|
|
1359
|
+
stroke-miterlimit: 4;
|
|
1360
|
+
stroke-dasharray: none;
|
|
1361
|
+
stroke-dashoffset: 0;
|
|
1362
|
+
stroke-opacity: 1;
|
|
1363
|
+
}
|
|
1364
|
+
.katex svg path {
|
|
1365
|
+
stroke: none;
|
|
1366
|
+
}
|
|
1367
|
+
.katex img {
|
|
1368
|
+
border-style: none;
|
|
1369
|
+
min-width: 0;
|
|
1370
|
+
min-height: 0;
|
|
1371
|
+
max-width: none;
|
|
1372
|
+
max-height: none;
|
|
1373
|
+
}
|
|
1374
|
+
.katex .stretchy {
|
|
1375
|
+
width: 100%;
|
|
1376
|
+
display: block;
|
|
1377
|
+
position: relative;
|
|
1378
|
+
overflow: hidden;
|
|
1379
|
+
}
|
|
1380
|
+
.katex .stretchy::before,
|
|
1381
|
+
.katex .stretchy::after {
|
|
1382
|
+
content: "";
|
|
1383
|
+
}
|
|
1384
|
+
.katex .hide-tail {
|
|
1385
|
+
width: 100%;
|
|
1386
|
+
position: relative;
|
|
1387
|
+
overflow: hidden;
|
|
1388
|
+
}
|
|
1389
|
+
.katex .halfarrow-left {
|
|
1390
|
+
position: absolute;
|
|
1391
|
+
left: 0;
|
|
1392
|
+
width: 50.2%;
|
|
1393
|
+
overflow: hidden;
|
|
1394
|
+
}
|
|
1395
|
+
.katex .halfarrow-right {
|
|
1396
|
+
position: absolute;
|
|
1397
|
+
right: 0;
|
|
1398
|
+
width: 50.2%;
|
|
1399
|
+
overflow: hidden;
|
|
1400
|
+
}
|
|
1401
|
+
.katex .brace-left {
|
|
1402
|
+
position: absolute;
|
|
1403
|
+
left: 0;
|
|
1404
|
+
width: 25.1%;
|
|
1405
|
+
overflow: hidden;
|
|
1406
|
+
}
|
|
1407
|
+
.katex .brace-center {
|
|
1408
|
+
position: absolute;
|
|
1409
|
+
left: 25%;
|
|
1410
|
+
width: 50%;
|
|
1411
|
+
overflow: hidden;
|
|
1412
|
+
}
|
|
1413
|
+
.katex .brace-right {
|
|
1414
|
+
position: absolute;
|
|
1415
|
+
right: 0;
|
|
1416
|
+
width: 25.1%;
|
|
1417
|
+
overflow: hidden;
|
|
1418
|
+
}
|
|
1419
|
+
.katex .x-arrow-pad {
|
|
1420
|
+
padding: 0 0.5em;
|
|
1421
|
+
}
|
|
1422
|
+
.katex .cd-arrow-pad {
|
|
1423
|
+
padding: 0 0.55556em 0 0.27778em;
|
|
1424
|
+
}
|
|
1425
|
+
.katex .x-arrow,
|
|
1426
|
+
.katex .mover,
|
|
1427
|
+
.katex .munder {
|
|
1428
|
+
text-align: center;
|
|
1429
|
+
}
|
|
1430
|
+
.katex .boxpad {
|
|
1431
|
+
padding: 0 0.3em;
|
|
1432
|
+
}
|
|
1433
|
+
.katex .fbox,
|
|
1434
|
+
.katex .fcolorbox {
|
|
1435
|
+
box-sizing: border-box;
|
|
1436
|
+
border: 0.04em solid;
|
|
1437
|
+
}
|
|
1438
|
+
.katex .cancel-pad {
|
|
1439
|
+
padding: 0 0.2em;
|
|
1440
|
+
}
|
|
1441
|
+
.katex .cancel-lap {
|
|
1442
|
+
margin-left: -0.2em;
|
|
1443
|
+
margin-right: -0.2em;
|
|
1444
|
+
}
|
|
1445
|
+
.katex .sout {
|
|
1446
|
+
border-bottom-style: solid;
|
|
1447
|
+
border-bottom-width: 0.08em;
|
|
1448
|
+
}
|
|
1449
|
+
.katex .angl {
|
|
1450
|
+
box-sizing: border-box;
|
|
1451
|
+
border-top: 0.049em solid;
|
|
1452
|
+
border-right: 0.049em solid;
|
|
1453
|
+
margin-right: 0.03889em;
|
|
1454
|
+
}
|
|
1455
|
+
.katex .anglpad {
|
|
1456
|
+
padding: 0 0.03889em;
|
|
1457
|
+
}
|
|
1458
|
+
.katex .eqn-num::before {
|
|
1459
|
+
counter-increment: katexEqnNo;
|
|
1460
|
+
content: "(" counter(katexEqnNo) ")";
|
|
1461
|
+
}
|
|
1462
|
+
.katex .mml-eqn-num::before {
|
|
1463
|
+
counter-increment: mmlEqnNo;
|
|
1464
|
+
content: "(" counter(mmlEqnNo) ")";
|
|
1465
|
+
}
|
|
1466
|
+
.katex .mtr-glue {
|
|
1467
|
+
width: 50%;
|
|
1468
|
+
}
|
|
1469
|
+
.katex .cd-vert-arrow {
|
|
1470
|
+
display: inline-block;
|
|
1471
|
+
position: relative;
|
|
1472
|
+
}
|
|
1473
|
+
.katex .cd-label-left {
|
|
1474
|
+
display: inline-block;
|
|
1475
|
+
position: absolute;
|
|
1476
|
+
right: calc(50% + 0.3em);
|
|
1477
|
+
text-align: left;
|
|
1478
|
+
}
|
|
1479
|
+
.katex .cd-label-right {
|
|
1480
|
+
display: inline-block;
|
|
1481
|
+
position: absolute;
|
|
1482
|
+
left: calc(50% + 0.3em);
|
|
1483
|
+
text-align: right;
|
|
1484
|
+
}
|
|
1485
|
+
.katex-display {
|
|
1486
|
+
display: block;
|
|
1487
|
+
margin: 1em 0;
|
|
1488
|
+
text-align: center;
|
|
1489
|
+
}
|
|
1490
|
+
.katex-display > .katex {
|
|
1491
|
+
display: block;
|
|
1492
|
+
text-align: center;
|
|
1493
|
+
white-space: nowrap;
|
|
1494
|
+
}
|
|
1495
|
+
.katex-display > .katex > .katex-html {
|
|
1496
|
+
display: block;
|
|
1497
|
+
position: relative;
|
|
1498
|
+
}
|
|
1499
|
+
.katex-display > .katex > .katex-html > .tag {
|
|
1500
|
+
position: absolute;
|
|
1501
|
+
right: 0;
|
|
1502
|
+
}
|
|
1503
|
+
.katex-display.leqno > .katex > .katex-html > .tag {
|
|
1504
|
+
left: 0;
|
|
1505
|
+
right: auto;
|
|
1506
|
+
}
|
|
1507
|
+
.katex-display.fleqn > .katex {
|
|
1508
|
+
text-align: left;
|
|
1509
|
+
padding-left: 2em;
|
|
1510
|
+
}
|
|
1511
|
+
body {
|
|
1512
|
+
counter-reset: katexEqnNo mmlEqnNo;
|
|
1513
|
+
}
|
|
1514
|
+
`})),sP=g({default:()=>uP}),cP,lP,uP,dP=m((()=>{Kv(),rP(),M(),oP(),cP=!1,lP=nP.import(`formats/formula`),uP=class{constructor(e){this.opt=e,this.mindMap=e.mindMap,window.katex=Gv,this.init(),this.config=this.getKatexConfig(),this.cssEl=null,this.addStyle(),this.extendQuill(),this.onDestroy=this.onDestroy.bind(this),this.mindMap.on(`beforeDestroy`,this.onDestroy)}onDestroy(){Object.getPrototypeOf(this.mindMap).constructor.instanceCount<=1&&(cP=!1,nP.register(`formats/formula`,lP,!0))}init(){this.mindMap.opt.enableEditFormulaInRichTextEdit&&(this.mindMap.opt.transformRichTextOnEnterEdit=this.latexRichToText.bind(this),this.mindMap.opt.beforeHideRichTextEdit=this.formatLatex.bind(this))}getKatexConfig(){let e={throwOnError:!1,errorColor:`#f00`,output:`mathml`},{getKatexOutputType:t}=this.mindMap.opt;t||=function(){let e=Ps();if(e&&e<=100)return`html`};let n=t()||`mathml`;return e.output=[`mathml`,`html`].includes(n)?n:`mathml`,e}extendQuill(){if(cP)return;cP=!0;let e=this;class t extends lP{static create(t){let n=super.create(t);return typeof t==`string`&&(Gv.render(t,n,e.config),n.setAttribute(`data-value`,Es(t))),n}}nP.register(`formats/formula`,t,!0)}getStyleText(){let{katexFontPath:e}=this.mindMap.opt,t=``;return this.config.output===`html`&&(t=iP(e)),t+=aP(),t}addStyle(){this.cssEl=document.createElement(`style`),this.cssEl.type=`text/css`,this.cssEl.innerHTML=this.getStyleText(),document.head.appendChild(this.cssEl)}removeStyle(){document.head.removeChild(this.cssEl)}insertFormulaToNode(e,t){let n=this.mindMap.richText;n.showEditText({node:e}),n.quill.insertEmbed(n.quill.getLength()-1,`formula`,t),n.hideEditText([e])}latexRichToText(e){if(e.indexOf(`class="ql-formula"`)!==-1){let t=new DOMParser().parseFromString(e,`text/html`).getElementsByClassName(`ql-formula`);for(let n of t)e=e.replace(n.outerHTML,`$${n.getAttribute(`data-value`)}$`);this.mindMap.opt.openRealtimeRenderOnNodeTextEdit&&setTimeout(()=>{this.mindMap.emit(`node_text_edit_change`,{node:this.mindMap.richText.node,text:this.mindMap.richText.getEditText(),richText:!0})},0)}return e}formatLatex(e){let t=e.quill.getContents(),n=t.ops,r=!1;for(let e=n.length-1;e>=0;e--){let t=n[e].insert;if(t&&typeof t!=`object`&&t!==`
|
|
1515
|
+
`&&/\$.+?\$/g.test(t)){let i=[...t.matchAll(/\$.+?\$/g)],a=t.split(/\$.+?\$/g);for(let e=i.length-1;e>=0;e--){let t=i[e]&&i[e][0]&&i[e][0].slice(1,-1)||null;t!==null&&t.trim().length>0&&this.checkFormulaIsLegal(t)?(a.splice(e+1,0,{insert:{formula:t}}),r=!0):a.splice(e+1,0,``)}for(;a.length>0;){let t=a.pop();if(typeof t==`string`){if(t.length<1)continue;t={insert:t}}t.attributes=n[e].attributes,n.splice(e+1,0,t)}n.splice(e,1)}}r&&e.quill.setContents(t)}checkFormulaIsLegal(e){try{return Gv.renderToString(e),!0}catch{return!1}}beforePluginRemove(){this.removeStyle(),this.mindMap.off(`beforeDestroy`,this.onDestroy)}beforePluginDestroy(){this.removeStyle(),this.mindMap.off(`beforeDestroy`,this.onDestroy)}},uP.instanceName=`formula`})),fP=g({default:()=>pP,documentAPI:()=>mP,exportAPI:()=>gP,fileAPI:()=>hP,iKnowAPI:()=>_P,officeAPI:()=>vP}),pP,mP,hP,gP,_P,vP,yP=m((()=>{pP=a.default.create({baseURL:`/api`,timeout:3e4}),mP={list:e=>pP.get(`/documents/`,{params:e}),get:e=>pP.get(`/documents/${e}`),create:e=>pP.post(`/documents/`,e),update:(e,t)=>pP.put(`/documents/${e}`,t),delete:e=>pP.delete(`/documents/${e}`),addAttachment:(e,t)=>pP.post(`/documents/${e}/attachments`,t),listAttachments:e=>pP.get(`/documents/${e}/attachments`)},hP={uploadImage:e=>{let t=new FormData;return t.append(`file`,e),pP.post(`/files/upload/image`,t,{headers:{"Content-Type":`multipart/form-data`}})},uploadAttachment:(e,t=`default`)=>{let n=new FormData;return n.append(`file`,e),n.append(`icon_type`,t),pP.post(`/files/upload/attachment`,n,{headers:{"Content-Type":`multipart/form-data`}})},importWord:e=>{let t=new FormData;return t.append(`file`,e),pP.post(`/files/import`,t,{headers:{"Content-Type":`multipart/form-data`},timeout:6e4})},importWordV2:e=>{let t=new FormData;return t.append(`file`,e),pP.post(`/files/import-v2`,t,{headers:{"Content-Type":`multipart/form-data`},timeout:12e4})}},gP={toWord:e=>pP.post(`/export/word/${e}`,{},{responseType:`blob`}),toWps:e=>pP.post(`/export/wps/${e}`,{},{responseType:`blob`}),toHtml:e=>pP.post(`/export/html/${e}`,{},{responseType:`blob`}),toPdf:e=>pP.post(`/export/pdf/${e}`,{},{responseType:`blob`})},_P={getDocuments:(e,t=``)=>pP.get(`/iknow/documents`,{params:{source_type:e,keyword:t}})},vP={createNew:(e,t)=>{let n=new URLSearchParams({type:e});return t&&n.append(`title`,t),pP.post(`/office/new?${n.toString()}`)},uploadFile:(e,t=null)=>{let n=new FormData;return n.append(`file`,e),t&&n.append(`doc_id`,t),pP.post(`/office/upload`,n,{headers:{"Content-Type":`multipart/form-data`},timeout:12e4})},getConfig:e=>pP.get(`/office/config/${e}`),getConfigByDoc:e=>pP.get(`/office/config-by-doc/${e}`),downloadFile:e=>`/api/office/download/${e}`,deleteFile:e=>pP.delete(`/office/${e}`),listFiles:()=>pP.get(`/office/list`),saveMetadata:(e,t)=>pP.post(`/office/save/${e}`,t),exportFile:(e,t)=>`/api/office/export/${e}/${t}`,getFileStatus:e=>pP.get(`/office/status/${e}`)}})),bP={class:`mindmap-editor`},xP={class:`editor-main`},SP=`mindmap`,CP=y({__name:`MindMapEditor`,setup(t){let a=(0,n.useRoute)(),o=(0,n.useRouter)(),s=(0,e.ref)(null),c=(0,e.ref)(null),l=(0,e.ref)(!1),u=(0,e.ref)(!1),d=(0,e.ref)(!1),{saveVersion:f}=ye(),p=ge(),m=(0,e.ref)({visible:!1,x:0,y:0}),h=null,g=!1,_=null,v=(0,e.ref)(!1),y=(0,e.ref)(!1),b=(0,e.ref)(!1),x=(0,e.ref)([]),S=(0,e.ref)(``),C=(0,e.ref)(``),w=(0,e.ref)(a.params.id||null),T=(0,e.ref)(null),E=(0,e.computed)(()=>!!T.value),ee=(0,e.ref)(!1);(0,e.watch)(E,()=>{(0,e.nextTick)(()=>{h&&(h.getElRectInfo(),h.resize(),oe.value&&h.view.fit(void 0,!0))})});let te=(0,e.ref)(`mindMap`),ne=(0,e.ref)(`default`),re=(0,e.ref)(0),ie=(0,e.ref)(0),ae=(0,e.ref)(100),oe=(0,e.ref)(!0),se={data:{text:`中心主题`,expand:!0},children:[{data:{text:`分支主题 1`,expand:!0},children:[{data:{text:`子主题 1.1`},children:[]},{data:{text:`子主题 1.2`},children:[]}]},{data:{text:`分支主题 2`,expand:!0},children:[{data:{text:`子主题 2.1`},children:[]},{data:{text:`子主题 2.2`},children:[]}]}]},D=JSON.parse(JSON.stringify(se)),ce=async()=>{if(!s.value)return;let t=await Promise.resolve().then(()=>(sd(),rd)),n=t.default||t,[r,i,o,c,l,u,d,f,p,m,_,v,y]=await Promise.all([Promise.resolve().then(()=>(kd(),Dd)),Promise.resolve().then(()=>(Pd(),Md)),Promise.resolve().then(()=>(Ld(),Fd)),Promise.resolve().then(()=>(Bd(),Rd)),Promise.resolve().then(()=>(Ud(),Vd)),Promise.resolve().then(()=>(Kd(),Wd)),Promise.resolve().then(()=>(hf(),df)),Promise.resolve().then(()=>(yf(),gf)),Promise.resolve().then(()=>(Sf(),bf)),Promise.resolve().then(()=>(Tf(),Cf)),Promise.resolve().then(()=>(Of(),Ef)),Promise.resolve().then(()=>(Mf(),kf)),Promise.resolve().then(()=>(dP(),sP))]),b=r.default,x=i.default,w=o.default,E=c.default,ce=l.default,ue=u.default,de=d.default,fe=f.default,pe=p.default,me=m.default,he=_.default,ge=v.default,_e=y.default,ve=se,ye=a.params.id;if(ye)try{let{documentAPI:e}=await Promise.resolve().then(()=>(yP(),fP)),t=await e.get(ye);if(t.data?.content){let e=JSON.parse(t.data.content);e&&e.data&&(ve=e,D=JSON.parse(JSON.stringify(e)))}t.data?.title&&(S.value=t.data.title),t.data?.author&&(C.value=t.data.author)}catch(e){console.warn(`Failed to load document:`,e)}h=new n({el:s.value,data:ve,layout:te.value,theme:ne.value,scaleRatio:.1,mousewheelAction:`move`,mousewheelMoveStep:100,initRootNodePosition:[`center`,`center`],fitPadding:50,enableCtrlKeyNodeSelection:!0,deleteNodeActive:!0,maxHistoryCount:500,fit:!0,enableAutoEnterTextEditWhenKeydown:!1,enableShortcutOnlyWhenMouseInSvg:!0}),h.addPlugin(b),h.addPlugin(x),h.addPlugin(w),h.addPlugin(E),h.addPlugin(ce),h.addPlugin(ue),h.addPlugin(de),h.addPlugin(fe),h.addPlugin(pe),h.addPlugin(me),h.addPlugin(he),h.addPlugin(ge),h.addPlugin(_e),h.on(`node_click`,e=>{T.value=e,ee.value=!e.parent}),h.on(`draw_click`,()=>{T.value=null,ee.value=!1}),h.on(`history_change`,()=>{le()}),h.on(`back_forward`,(e,t)=>{re.value=e||0,ie.value=(t||1)-1-(e||0)}),h.on(`data_change`,()=>{Oe()}),h.on(`before_show_text_edit`,()=>{De=!0,Ee&&clearTimeout(Ee)}),h.on(`hide_text_edit`,()=>{De=!1,oe.value&&(0,e.nextTick)(()=>ke())}),h.on(`scale`,e=>{ae.value=Math.round(e*100)}),h.on(`node_tree_render_end`,()=>{le(),g||(g=!0,(0,e.nextTick)(()=>{h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0),Pe()}))})},le=()=>{if(h)try{let e=h.command;re.value=e.activeHistoryIndex||0,ie.value=(e.history?.length||1)-1-(e.activeHistoryIndex||0)}catch{re.value=0,ie.value=0}},ue=async()=>{if(!h)return;_=ht(a.params.id||`mindmap-${Date.now()}`),_.connect();let e=`用户${Math.floor(Math.random()*1e3)}`;_.setUserInfo({name:e}),p.setCollabContext({ydoc:_.ydoc,provider:_.provider,onlineUsers:x}),p.setCurrentUser({id:_.provider.awareness.clientID,name:e,color:`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,`0`)}`}),_.syncToYjs(h.getData()),_.onRemoteChange(e=>{h&&h.setData(e)}),h.on(`data_change`,()=>{_&&_.syncToYjs(h.getData())}),b.value=!0,v.value=!0,y.value=!0;let t=setInterval(()=>{_&&(x.value=[..._.onlineUsers.value])},1e3);_._userSyncTimer=t,a.params.id||await Ge();let n=_.generateShareUrl();r.ElMessage.success(`协作已开启,分享链接已复制`);try{await navigator.clipboard.writeText(n)}catch{}},de=()=>{_&&=(_._userSyncTimer&&clearInterval(_._userSyncTimer),_.closeCollaboration(),null),b.value=!1,v.value=!1,y.value=!1,x.value=[],r.ElMessage.info(`协作已关闭`)},fe=async()=>{if(!h)return;let t=a.params.id;if(!t)return;_=ht(t),_.connect();let n=`协作人${Math.floor(Math.random()*1e3)}`;if(_.setUserInfo({name:n}),p.setCollabContext({ydoc:_.ydoc,provider:_.provider,onlineUsers:x}),p.setCurrentUser({id:_.provider.awareness.clientID,name:n,color:`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,`0`)}`}),_.onRemoteChange(e=>{h&&h.setData(e)}),h.on(`data_change`,()=>{_&&_.syncToYjs(h.getData())}),await new Promise(t=>{let n=()=>{let e=_.getYData().get(`root`);if(e)try{let t=JSON.parse(e);h.setData(t)}catch{}t()};if(_.isConnected.value)n();else{let t=(0,e.watch)(()=>_.isConnected.value,e=>{e&&(t(),n())})}}),_.checkCollaborationClosed()){r.ElMessage.warning(`该协作已关闭,无法加入`),_.disconnect(),_=null;return}b.value=!0,v.value=!0,y.value=!1;let i=setInterval(()=>{_&&(x.value=[..._.onlineUsers.value])},1e3);_._userSyncTimer=i,r.ElMessage.success(`已加入协作`)},pe=async()=>{if(!_)await ue();else{let e=_.generateShareUrl();try{await navigator.clipboard.writeText(e),r.ElMessage.success(`分享链接已复制到剪贴板`)}catch{r.ElMessage.info(`分享链接: `+e)}}},me=()=>o.push(`/`),_e=e=>{h&&(e===`child`?h.execCommand(`INSERT_CHILD_NODE`):h.execCommand(`INSERT_NODE`))},ve=()=>{h&&h.execCommand(`REMOVE_NODE`)},be=()=>{if(!h)return;let t=h.getData(),n=e=>{e.children&&e.children.length>0&&(e.children.reverse(),e.children.forEach(n))};n(t),h.setData(t),(0,e.nextTick)(()=>{h&&(h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0))})},xe=()=>h?.execCommand(`BACK`),Se=()=>h?.execCommand(`FORWARD`),Ce=()=>h?.view.enlarge(),we=()=>h?.view.narrow(),Te=()=>{h&&(h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0))},Ee=null,De=!1,Oe=()=>{!oe.value||!h||De||(Ee&&clearTimeout(Ee),Ee=setTimeout(()=>{De||(h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0))},200))},ke=()=>{h&&(Ee&&clearTimeout(Ee),h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0))},Ae=async()=>{if(h){try{await r.ElMessageBox.confirm(`确定要复位思维导图吗?将恢复到最近一次保存的状态。`,`复位确认`,{confirmButtonText:`确定`,cancelButtonText:`取消`,type:`warning`})}catch{return}h.setData(D),(0,e.nextTick)(()=>{h&&(h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0))})}},Ne=null,Pe=()=>{!s.value||!h||(Ne=new ResizeObserver(()=>{h&&(h.getElRectInfo(),h.resize())}),Ne.observe(s.value))},Fe=e=>{te.value=e,h&&h.svg?.attr({opacity:0}),h?.setLayout(e);let t=()=>{h&&(h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0),h.svg?.attr({opacity:1}),h.off(`node_tree_render_end`,t))};h?.on(`node_tree_render_end`,t),setTimeout(()=>{h&&(h.svg?.attr({opacity:1}),h.off(`node_tree_render_end`,t))},3e3)},Ie=e=>{ne.value=e;let t=Me.find(t=>t.value===e);t&&t.config&&Object.keys(t.config).length>0?h?.setThemeConfig(t.config):h?.setTheme(`default`)},Le=e=>{!h||!T.value||(T.value.setData({text:e}),h.render())},Re=e=>{if(!h||!T.value)return;let t=T.value.getData(`style`)||{};T.value.setData(`style`,{...t,...e}),h.render()},ze=e=>{!h||!T.value||T.value.setData({note:e})},Be=e=>{!h||!T.value||T.value.setData({tag:e})},Ve=({hyperlink:e,hyperlinkTitle:t})=>{!h||!T.value||T.value.setData({hyperlink:e,hyperlinkTitle:t})},He=e=>{e===`png`||e===`svg`?l.value=!0:We(e)},Ue=async e=>{r.ElMessage.info(`AI生成功能开发中,敬请期待...`)},We=async e=>{if(h)try{e===`png`?await h.export.exportImg():e===`svg`?await h.export.exportSvg():e===`pdf`&&await h.export.exportPdf(),r.ElMessage.success(`导出成功`)}catch(e){r.ElMessage.error(`导出失败: `+e.message)}},Ge=async()=>{if(h){if(v.value&&!y.value&&(!_||!_.isConnected.value||_.collaborationClosed.value)){r.ElMessage.error(`协作已关闭,无法提交保存`);return}if(!S.value?.trim()){r.ElMessage.warning(`请输入思维导图标题`);return}if(!C.value?.trim()){r.ElMessage.warning(`请输入作者`);return}try{let e=h.getData(),t=JSON.stringify(e),n=a.params.id,{documentAPI:i}=await Promise.resolve().then(()=>(yP(),fP));if(n)await i.update(n,{content:t,title:S.value.trim(),doc_type:`mindmap`}),w.value=n;else{let e=await i.create({title:S.value.trim(),content:t,doc_type:`mindmap`});w.value=e.data.id,o.replace(`/mindmap-editor/${e.data.id}`)}D=JSON.parse(JSON.stringify(e)),r.ElMessage.success(`保存成功`),f({documentId:String(w.value||``),docType:`mindmap`,content:JSON.stringify(e),userId:String(p.currentUser.value?.id||``),userName:p.currentUser.value?.name||C.value||`未知`})}catch(e){r.ElMessage.error(`保存失败: `+e.message)}}},Ke=e=>{m.value={visible:!0,x:e.clientX,y:e.clientY}},qe=e=>{switch(e){case`insertChild`:_e(`child`);break;case`insertSibling`:_e(`sibling`);break;case`edit`:T.value&&(h?.execCommand(`ACTIVE_NODE`,T.value),h?.textEdit.enterTextEdit());break;case`delete`:ve();break;case`copy`:h?.execCommand(`COPY`);break;case`cut`:h?.execCommand(`CUT`);break;case`paste`:h?.execCommand(`PASTE`);break}},Ye=()=>{m.value.visible=!1},Xe=[`我可以帮您梳理思维导图结构、扩展节点内容,或者提供思路启发。请问有什么需要帮助的?`,`这个思维导图的层级结构很清晰。建议在二级节点下添加更多细节,让内容更加丰富。`,`根据当前的主题,我建议您尝试从不同维度展开思考,比如时间、空间、因果、对比等角度。`,`思维导图中的关键词提炼得很好。如果需要,我可以帮您将某些节点展开为更详细的描述。`,`我可以帮您检查思维导图中是否存在重复或遗漏的分支。需要我逐个节点分析吗?`,`建议使用不同的颜色和图标来区分不同分支的重要性,这样可以让思维导图更加直观。`,`这个思维导图的逻辑框架不错。建议在关键节点添加备注,方便后续回顾和补充。`,`我可以帮您将思维导图转换为大纲文本,或者根据现有内容生成新的分支建议。`],Ze=async(e,t={})=>{let n=a.params.id?`${SP}-${a.params.id}`:null;await p.sendMessage(e,{...t,roomId:n});let r=t.mentionedUser,i=r&&r.toLowerCase().includes(`ai`),o=p.collabUsers.value.filter(e=>e.name!==p.currentUser.value.name);(!r||i||o.length===0)&&(p.loading.value=!0,setTimeout(()=>{p.sendAiMessage(Xe[Math.floor(Math.random()*Xe.length)],n),p.loading.value=!1},800+Math.random()*1200))},Qe=()=>{let e=a.params.id?`${SP}-${a.params.id}`:null;p.clearMessages(e)},$e=()=>{if(!a.params.id){r.ElMessage.warning(`请先保存文档`);return}d.value=!0},et=t=>{try{let n=typeof t==`string`?JSON.parse(t):t;n&&h&&(h.setData(n),(0,e.nextTick)(()=>{h.getElRectInfo(),h.resize(),h.view.fit(void 0,!0)}))}catch(e){console.error(`Version apply error:`,e)}};return(0,e.onMounted)(async()=>{await(0,e.nextTick)(),await ce(),document.addEventListener(`click`,Ye),a.query.collab===`1`&&a.params.id&&await fe()}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`click`,Ye),Ee&&clearTimeout(Ee),_&&=(_.destroy(),null),Ne&&=(Ne.disconnect(),null),h&&=(h.destroy(),null)}),(t,n)=>{let r=(0,e.resolveComponent)(`el-icon`),a=(0,e.resolveComponent)(`el-button`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,bP,[(0,e.createVNode)(Je,{"undo-count":re.value,"redo-count":ie.value,"current-layout":te.value,"current-theme":ne.value,"zoom-percent":ae.value,"auto-fit":oe.value,"is-collaborating":v.value,"is-collab-owner":y.value,"collab-users":x.value,"model-title":S.value,"model-author":C.value,"is-root-node":ee.value,onBack:me,onUndo:xe,onRedo:Se,onInsertChild:n[0]||=e=>_e(`child`),onInsertSibling:n[1]||=e=>_e(`sibling`),onReverseLayout:be,onDeleteNode:ve,onChangeLayout:Fe,onChangeTheme:Ie,onZoomIn:Ce,onZoomOut:we,onFitView:Te,onToggleAutoFit:n[2]||=e=>oe.value=!oe.value,onResetView:Ae,onExport:He,onSave:Ge,onToggleCollab:n[3]||=e=>v.value?de():ue(),onShareCollab:pe,"onUpdate:title":n[4]||=e=>S.value=e,"onUpdate:author":n[5]||=e=>C.value=e,onAiGenerate:Ue,"show-history":!!w.value,onHistory:$e},null,8,[`undo-count`,`redo-count`,`current-layout`,`current-theme`,`zoom-percent`,`auto-fit`,`is-collaborating`,`is-collab-owner`,`collab-users`,`model-title`,`model-author`,`is-root-node`,`show-history`]),(0,e.createElementVNode)(`div`,xP,[(0,e.createElementVNode)(`div`,{class:`canvas-area`,ref_key:`canvasRef`,ref:c,onContextmenu:(0,e.withModifiers)(Ke,[`prevent`])},[(0,e.createElementVNode)(`div`,{class:`mindmap-container`,ref_key:`containerRef`,ref:s},null,512)],544),(0,e.createVNode)(dt,{visible:E.value,node:T.value,onClose:n[6]||=e=>T.value=null,onUpdateText:Le,onUpdateStyle:Re,onUpdateNote:ze,onUpdateTags:Be,onUpdateHyperlink:Ve},null,8,[`visible`,`node`])]),(0,e.createVNode)(ft,{visible:m.value.visible,x:m.value.x,y:m.value.y,onCommand:qe,onClose:n[7]||=e=>m.value.visible=!1},null,8,[`visible`,`x`,`y`]),(0,e.createVNode)(mt,{visible:l.value,"onUpdate:visible":n[8]||=e=>l.value=e,onExport:We},null,8,[`visible`]),(0,e.createVNode)(a,{class:`ai-chat-fab`,type:u.value?`primary`:`default`,circle:``,size:`large`,onClick:n[9]||=e=>u.value=!u.value,title:`AI助手`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(r,null,{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(i.Monitor))]),_:1})]),_:1},8,[`type`]),(0,e.createVNode)(he,{visible:u.value,messages:(0,e.unref)(p).messages.value,loading:(0,e.unref)(p).loading.value,"is-collab":(0,e.unref)(p).isCollabMode.value,"collab-users":(0,e.unref)(p).collabUsers.value,"current-user":(0,e.unref)(p).currentUser.value,"is-owner":y.value,onSend:Ze,onClose:n[10]||=e=>u.value=!1,"unread-mention":(0,e.unref)(p).unreadMention.value,onClearUnread:n[11]||=t=>(0,e.unref)(p).clearUnreadMention(),onClear:Qe},null,8,[`visible`,`messages`,`loading`,`is-collab`,`collab-users`,`current-user`,`is-owner`,`unread-mention`]),(0,e.createVNode)(je,{modelValue:d.value,"onUpdate:modelValue":n[12]||=e=>d.value=e,"document-id":w.value,onApply:et},null,8,[`modelValue`,`document-id`])])}}},[[`__scopeId`,`data-v-6b850065`]]);return(0,e.defineComponent)({name:`YourCompanyMindmap`,props:{docId:{type:[Number,String],default:null},apiBase:{type:String,default:`/api`},wsUrl:{type:String,default:``},user:{type:Object,default:()=>({id:``,name:``,color:``})},roomId:{type:String,default:``}},setup(n,{slots:r}){return()=>(0,e.h)(`div`,{class:`yourcompany-mindmap-wrapper`,style:`position:relative`},[(0,e.h)(CP,{...n}),(0,e.h)(t.BrandWatermark)])}})});
|