2025-10-13 09:04:31 +00:00
var F2 = Object . defineProperty ; var q2 = ( t , e , n ) => e in t ? F2 ( t , e , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : n } ) : t [ e ] = n ; var mn = ( t , e , n ) => ( q2 ( t , typeof e != "symbol" ? e + "" : e , n ) , n ) ; ( function ( ) { const e = document . createElement ( "link" ) . relList ; if ( e && e . supports && e . supports ( "modulepreload" ) ) return ; for ( const o of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) r ( o ) ; new MutationObserver ( o => { for ( const l of o ) if ( l . type === "childList" ) for ( const h of l . addedNodes ) h . tagName === "LINK" && h . rel === "modulepreload" && r ( h ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function n ( o ) { const l = { } ; return o . integrity && ( l . integrity = o . integrity ) , o . referrerPolicy && ( l . referrerPolicy = o . referrerPolicy ) , o . crossOrigin === "use-credentials" ? l . credentials = "include" : o . crossOrigin === "anonymous" ? l . credentials = "omit" : l . credentials = "same-origin" , l } function r ( o ) { if ( o . ep ) return ; o . ep = ! 0 ; const l = n ( o ) ; fetch ( o . href , l ) } } ) ( ) ; / * *
* @ vue / shared v3 . 5.20
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * //*! #__NO_SIDE_EFFECTS__ */function Ap(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const gn={},Jo=[],xi=()=>{},h4=()=>!1,Ac=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Mp=t=>t.startsWith("onUpdate:"),sr=Object.assign,Cp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},j2=Object.prototype.hasOwnProperty,rn=(t,e)=>j2.call(t,e),It=Array.isArray,Qo=t=>Mc(t)==="[object Map]",p4=t=>Mc(t)==="[object Set]",Bt=t=>typeof t=="function",Vn=t=>typeof t=="string",io=t=>typeof t=="symbol",Rn=t=>t!==null&&typeof t=="object",f4=t=>(Rn(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),m4=Object.prototype.toString,Mc=t=>m4.call(t),$2=t=>Mc(t).slice(8,-1),g4=t=>Mc(t)==="[object Object]",Lp=t=>Vn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,gl=Ap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cc=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},U2=/-(\w)/g,Xa=Cc(t=>t.replace(U2,(e,n)=>n?n.toUpperCase():"")),V2=/\B([A-Z])/g,ao=Cc(t=>t.replace(V2,"-$1").toLowerCase()),v4=Cc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Dd=Cc(t=>t?`on${v4(t)}`:""),Ka=(t,e)=>!Object.is(t,e),L0=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},b4=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Ch=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let E1;const Lc=()=>E1||(E1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function os(t){if(It(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=Vn(r)?X2(r):os(r);if(o)for(const l in o)e[l]=o[l]}return e}else if(Vn(t)||Rn(t))return t}const W2=/;(?![^(]*\))/g,G2=/:([^]+)/,K2=/\/\*[^]*?\*\//g;function X2(t){const e={};return t.replace(K2,"").split(W2).forEach(n=>{if(n){const r=n.split(G2);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function ss(t){let e="";if(Vn(t))e=t;else if(It(t))for(let n=0;n<t.length;n++){const r=ss(t[n]);r&&(e+=r+" ")}else if(Rn(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const Z2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Y2=Ap(Z2);function y4(t){return!!t||t===""}const w4=t=>!!(t&&t.__v_isRef===!0),Jr=t=>Vn(t)?t:t==null?"":It(t)||Rn(t)&&(t.toString===m4||!Bt(t.toString))?w4(t)?Jr(t.value):JSON.stringify(t,x4,2):String(t),x4=(t,e)=>w4(e)?x4(t,e.value):Qo(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,o],l)=>(n[Rd(r,l)+" =>"]=o,n),{})}:p4(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Rd(n))}:io(e)?Rd(e):Rn(e)&&!It(e)&&!g4(e)?String(e):e,Rd=(t,e="")=>{var n;return io(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
* @ vue / reactivity v3 . 5.20
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * / l e t C r ; c l a s s J 2 { c o n s t r u c t o r ( e = ! 1 ) { t h i s . d e t a c h e d = e , t h i s . _ a c t i v e = ! 0 , t h i s . _ o n = 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . _ i s P a u s e d = ! 1 , t h i s . p a r e n t = C r , ! e & & C r & & ( t h i s . i n d e x = ( C r . s c o p e s | | ( C r . s c o p e s = [ ] ) ) . p u s h ( t h i s ) - 1 ) } g e t a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } p a u s e ( ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ i s P a u s e d = ! 0 ; l e t e , n ; i f ( t h i s . s c o p e s ) f o r ( e = 0 , n = t h i s . s c o p e s . l e n g t h ; e < n ; e + + ) t h i s . s c o p e s [ e ] . p a u s e ( ) ; f o r ( e = 0 , n = t h i s . e f f e c t s . l e n g t h ; e < n ; e + + ) t h i s . e f f e c t s [ e ] . p a u s e ( ) } } r e s u m e ( ) { i f ( t h i s . _ a c t i v e & & t h i s . _ i s P a u s e d ) { t h i s . _ i s P a u s e d = ! 1 ; l e t e , n ; i f ( t h i s . s c o p e s ) f o r ( e = 0 , n = t h i s . s c o p e s . l e n g t h ; e < n ; e + + ) t h i s . s c o p e s [ e ] . r e s u m e ( ) ; f o r ( e = 0 , n = t h i s . e f f e c t s . l e n g t h ; e < n ; e + + ) t h i s . e f f e c t s [ e ] . r e s u m e ( ) } } r u n ( e ) { i f ( t h i s . _ a c t i v e ) { c o n s t n = C r ; t r y { r e t u r n C r = t h i s , e ( ) } f i n a l l y { C r = n } } } o n ( ) { + + t h i s . _ o n = = = 1 & & ( t h i s . p r e v S c o p e = C r , C r = t h i s ) } o f f ( ) { t h i s . _ o n > 0 & & - - t h i s . _ o n = = = 0 & & ( C r = t h i s . p r e v S c o p e , t h i s . p r e v S c o p e = v o i d 0 ) } s t o p ( e ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ a c t i v e = ! 1 ; l e t n , r ; f o r ( n = 0 , r = t h i s . e f f e c t s . l e n g t h ; n < r ; n + + ) t h i s . e f f e c t s [ n ] . s t o p ( ) ; f o r ( t h i s . e f f e c t s . l e n g t h = 0 , n = 0 , r = t h i s . c l e a n u p s . l e n g t h ; n < r ; n + + ) t h i s . c l e a n u p s [ n ] ( ) ; i f ( t h i s . c l e a n u p s . l e n g t h = 0 , t h i s . s c o p e s ) { f o r ( n = 0 , r = t h i s . s c o p e s . l e n g t h ; n < r ; n + + ) t h i s . s c o p e s [ n ] . s t o p ( ! 0 ) ; t h i s . s c o p e s . l e n g t h = 0 } i f ( ! t h i s . d e t a c h e d & & t h i s . p a r e n t & & ! e ) { c o n s t o = t h i s . p a r e n t . s c o p e s . p o p ( ) ; o & & o ! = = t h i s & & ( t h i s . p a r e n t . s c o p e s [ t h i s . i n d e x ] = o , o . i n d e x = t h i s . i n d e x ) } t h i s . p a r e n t = v o i d 0 } } } f u n c t i o n Q 2 ( ) { r e t u r n C r } l e t y n ; c o n s t I d = n e w W e a k S e t ; c l a s s k 4 { c o n s t r u c t o r ( e ) { t h i s . f n = e , t h i s . d e p s = v o i d 0 , t h i s . d e p s T a i l = v o i d 0 , t h i s . f l a g s = 5 , t h i s . n e x t = v o i d 0 , t h i s . c l e a n u p = v o i d 0 , t h i s . s c h e d u l e r = v o i d 0 , C r & & C r . a c t i v e & & C r . e f f e c t s . p u s h ( t h i s ) } p a u s e ( ) { t h i s . f l a g s | = 6 4 } r e s u m e ( ) { t h i s . f l a g s & 6 4 & & ( t h i s . f l a g s & = - 6 5 , I d . h a s ( t h i s ) & & ( I d . d e l e t e ( t h i s ) , t h i s . t r i g g e r ( ) ) ) } n o t i f y ( ) { t h i s . f l a g s & 2 & & ! ( t h i s . f l a g s & 3 2 ) | | t h i s . f l a g s & 8 | | E 4 ( t h i s ) } r u n ( ) { i f ( ! ( t h i s . f l a g s & 1 ) ) r e t u r n t h i s . f n ( ) ; t h i s . f l a g s | = 2 , T 1 ( t h i s ) , T 4 ( t h i s ) ; c o n s t e = y n , n = k i ; y n = t h i s , k i = ! 0 ; t r y { r e t u r n t h i s . f n ( ) } f i n a l l y { A 4 ( t h i s ) , y n = e , k i = n , t h i s . f l a g s & = - 3 } } s t o p ( ) { i f ( t h i s . f l a g s & 1 ) { f o r ( l e t e = t h i s . d e p s ; e ; e = e . n e x t D e p ) D p ( e ) ; t h i s . d e p s = t h i s . d e p s T a i l = v o i d 0 , T 1 ( t h i s ) , t h i s . o n S t o p & & t h i s . o n S t o p ( ) , t h i s . f l a g s & = - 2 } } t r i g g e r ( ) { t h i s . f l a g s & 6 4 ? I d . a d d ( t h i s ) : t h i s . s c h e d u l e r ? t h i s . s c h e d u l e r ( ) : t h i s . r u n I f D i r t y ( ) } r u n I f D i r t y ( ) { L h ( t h i s ) & & t h i s . r u n ( ) } g e t d i r t y ( ) { r e t u r n L h ( t h i s ) } } l e t S 4 = 0 , v l , b l ; f u n c t i o n E 4 ( t , e = ! 1 ) { i f ( t . f l a g s | = 8 , e ) { t . n e x t = b l , b l = t ; r e t u r n } t . n e x t = v l , v l = t } f u n c t i o n _ p ( ) { S 4 + + } f u n c t i o n N p ( ) { i f ( - - S 4 > 0 ) r e t u r n ; i f ( b l ) { l e t e = b l ; f o r ( b l = v o i d 0 ; e ; ) { c o n s t n = e . n e x t ; e . n e x t = v o i d 0 , e . f l a g s & = - 9 , e = n } } l e t t ; f o r ( ; v l ; ) { l e t e = v l ; f o r ( v l = v o i d 0 ; e ; ) { c o n s t n = e . n e x t ; i f ( e . n e x t = v o i d 0 , e . f l a g s & = - 9 , e . f l a g s & 1 ) t r y { e . t r i g g e r ( ) } c a t c h ( r ) { t | | ( t = r ) } e = n } } i f ( t ) t h r o w t } f u n c t i o n T 4 ( t ) { f o r ( l e t e = t . d e p s ; e ; e = e . n e x t D e p ) e . v e r s i o n = - 1 , e . p r e v A c t i v e L i n k = e . d e p . a c t i v e L i n k , e . d e p . a c t i v e L i n k = e } f u n c t i o n A 4 ( t ) { l e t e , n = t . d e p s T a i l , r = n ; f o r ( ; r ; ) { c o n s t o = r . p r e v D e p ; r . v e r s i o n = = = - 1 ? ( r = = = n & & ( n = o ) , D p ( r ) , e 5 ( r ) ) : e = r , r . d e p . a c t i v e L i n k = r . p r e v A c t i v e L i n k , r . p r e v A c t i v e L i n k = v o i d 0 , r = o } t . d e p s = e , t . d e p s T a i l = n } f u n c t i o n L h ( t ) { f o r ( l e t e = t . d e p s ; e ; e = e . n e x t D e p ) i f ( e . d e p . v e r s i o n ! = = e . v e r s i o n | | e . d e p . c o m p u t e d & & ( M 4 ( e . d e p . c o m p u t e d ) | | e . d e p . v e r s i o n ! = = e . v e r s i o n ) ) r e t u r n ! 0 ; r e t u r n ! ! t . _ d i r t y } f u n c t i o n M 4 ( t ) { i f ( t . f l a g s & 4 & & ! ( t . f l a g s & 1 6 ) | | ( t . f l a g s & = - 1 7 , t . g l o b a l V e r s i o n = = = L l ) | | ( t . g l o b a l V e r s i o n = L l , ! t . i s S S R & & t . f l a g s & 1 2 8 & & ( ! t . d e p s & & ! t . _ d i r t y | | ! L h ( t ) ) ) ) r e t u r n ; t . f l a g s | = 2 ; c o n s t e = t . d e p , n = y n , r = k i ; y n = t , k i = ! 0 ; t r y { T 4 ( t ) ; c o n s t o = t . f n ( t . _ v a l u e ) ; ( e . v e r s i o n = = = 0 | | K a ( o , t . _ v a l u e ) ) & & ( t . f l a g s | = 1 2 8 , t . _ v a l u e = o , e . v e r s i o n + + ) } c a t c h ( o ) { t h r o w e . v e r s i o n + + , o } f i n a l l y { y n = n , k i = r , A 4 ( t ) , t . f l a g s & = - 3 } } f u n c t i o n D p ( t , e = ! 1 ) { c o n s t { d e p : n , p r e v S u b : r , n e x t S u b : o } = t ; i f ( r & & ( r . n e x t S u b = o , t . p r e v S u b = v o i d 0 ) , o & & ( o . p r e v S u b = r , t . n e x t S u b = v o i d 0 ) , n . s u b s = = = t & & ( n . s u b s = r , ! r & & n . c o m p u t e d ) ) { n . c o m p u t e d . f l a g s & = - 5 ; f o r ( l e t l = n . c o m p u t e d . d e p s ; l ; l = l . n e x t D e p ) D p ( l , ! 0 ) } ! e & & ! - - n . s c & & n . m a p & & n . m a p . d e l e t e ( n . k e y ) } f u n c t i o n e 5 ( t ) { c o n s t { p r e v D e p : e , n e x t D e p : n } = t ; e & & ( e . n e x t D e p = n , t . p r e v D e p = v o i d 0 ) , n & & ( n . p r e v D e p = e , t . n e x t D e p = v o i d 0 ) } l e t k i = ! 0 ; c o n s t C 4 = [ ] ; f u n c t i o n S a ( ) { C 4 . p u s h ( k i ) , k i = ! 1 } f u n c t i o n E a ( ) { c o n s t t = C 4 . p o p ( ) ; k i = t = = = v o i d 0 ? ! 0 : t } f u n c t i o n T 1 ( t ) { c o n s t { c l e a n u p : e } = t ; i f ( t . c l e a n u p = v o i d 0 , e ) { c o n s t n = y n ; y n = v o i d 0 ; t r y { e ( ) } f i n a l l y { y n = n } } } l e t L l = 0 ; c l a s s t 5 { c o n s t r u c t o r ( e , n ) { t h i s . s u b = e , t h i s . d e p = n , t h i s . v e r s i o n = n . v e r s i o n , t h i s . n e x t D e p = t h i s . p r e v D e p = t
* @ vue / runtime - core v3 . 5.20
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * /function Bl(t,e,n,r){try{return r?t(...r):t()}catch(o){Nc(o,e,n)}}function Ui(t,e,n,r){if(Bt(t)){const o=Bl(t,e,n,r);return o&&f4(o)&&o.catch(l=>{Nc(l,e,n)}),o}if(It(t)){const o=[];for(let l=0;l<t.length;l++)o.push(Ui(t[l],e,n,r));return o}}function Nc(t,e,n,r=!0){const o=e?e.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:h}=e&&e.appContext.config||gn;if(e){let c=e.parent;const p=e.proxy,v=`https:/ / vuejs . org / error - reference / # runtime - $ { n } ` ;for(;c;){const b=c.ec;if(b){for(let g=0;g<b.length;g++)if(b[g](t,p,v)===!1)return}c=c.parent}if(l){Sa(),Bl(l,null,10,[t,p,v]),Ea();return}}C5(t,n,o,r,h)}function C5(t,e,n,r=!0,o=!1){if(o)throw t;console.error(t)}const yr=[];let Hi=-1;const ts=[];let $ a=null,Xo=0;const z4=Promise.resolve();let G0=null;function ja(t){const e=G0||z4;return t?e.then(this?t.bind(this):t):e}function L5(t){let e=Hi+1,n=yr.length;for(;e<n;){const r=e+n>>>1,o=yr[r],l=Nl(o);l<t||l===t&&o.flags&2?e=r+1:n=r}return e}function zp(t){if(!(t.flags&1)){const e=Nl(t),n=yr[yr.length-1];!n||!(t.flags&2)&&e>=Nl(n)?yr.push(t):yr.splice(L5(e),0,t),t.flags|=1,B4()}}function B4(){G0||(G0=z4.then(q4))}function _5(t){It(t)?ts.push(...t): $ a&&t.id===-1? $ a.splice(Xo+1,0,t):t.flags&1||(ts.push(t),t.flags|=1),B4()}function M1(t,e,n=Hi+1){for(;n<yr.length;n++){const r=yr[n];if(r&&r.flags&2){if(t&&r.id!==t.uid)continue;yr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function F4(t){if(ts.length){const e=[...new Set(ts)].sort((n,r)=>Nl(n)-Nl(r));if(ts.length=0, $ a){ $ a.push(...e);return}for( $ a=e,Xo=0;Xo< $ a.length;Xo++){const n= $ a[Xo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2} $ a=null,Xo=0}}const Nl=t=>t.id==null?t.flags&2?-1:1/0:t.id;function q4(t){const e=xi;try{for(Hi=0;Hi<yr.length;Hi++){const n=yr[Hi];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Bl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Hi<yr.length;Hi++){const n=yr[Hi];n&&(n.flags&=-2)}Hi=-1,yr.length=0,F4(),G0=null,(yr.length||ts.length)&&q4()}}let Qr=null,j4=null;function K0(t){const e=Qr;return Qr=t,j4=t&&t.type.__scopeId||null,e}function N5(t,e=Qr,n){if(!e||t._n)return t;const r=(...o)=>{r._d&&O1(-1);const l=K0(e);let h;try{h=t(...o)}finally{K0(l),r._d&&O1(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function X0(t,e){if(Qr===null)return t;const n=Hc(Qr),r=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[l,h,c,p=gn]=e[o];l&&(Bt(l)&&(l={mounted:l,updated:l}),l.deep&&ha(h),r.push({dir:l,instance:n,value:h,oldValue:void 0,arg:c,modifiers:p}))}return t}function ko(t,e,n,r){const o=t.dirs,l=e&&e.dirs;for(let h=0;h<o.length;h++){const c=o[h];l&&(c.oldValue=l[h].value);let p=c.dir[r];p&&(Sa(),Ui(p,n,8,[t.el,c,t,e]),Ea())}}const D5=Symbol("_vte"),R5=t=>t.__isTeleport,I5=Symbol("_leaveCb");function Bp(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Bp(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function $ 4(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function yl(t,e,n,r,o=!1){if(It(t)){t.forEach((w,S)=>yl(w,e&&(It(e)?e[S]:e),n,r,o));return}if(wl(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&yl(t,e,n,r.component.subTree);return}const l=r.shapeFlag&4?Hc(r.component):r.el,h=o?null:l,{i:c,r:p}=t,v=e&&e.r,b=c.refs===gn?c.refs={}:c.refs,g=c.setupState,m=nn(g),x=g===gn?h4:w=>rn(m,w);if(v!=null&&v!==p){if(Vn(v))b[v]=null,x(v)&&(g[v]=null);else if(fr(v)){v.value=null;const w=e;w.k&&(b[w.k]=null)}}if(Bt(p))Bl(p,c,12,[h,b]);else{const w=Vn(p),S=fr(p);if(w||S){const k=()=>{if(t.f){const C=w?x(p)?g[p]:b[p]:p.value;if(o)It(C)&&Cp(C,l);else if(It(C))C.includes(l)||C.push(l);else if(w)b[p]=[l],x(p)&&(g[p]=b[p]);else{const T=[l];p.value=T,t.k&&(b[t.k]=T)}}else w?(b[p]=h,x(p)&&(g[p]=h)):S&&(p.value=h,t.k&&(b[t.k]=h))};h?(k.id=-1,qr(k,n)):k()}}}Lc().requestIdleCallback;Lc().cancelIdleCallback;const wl=t=>!!t.type.__asyncLoader,U4=t=>t.type.__isKeepAlive;function O5(t,e){V4(t,"a",e)}function H5(t,e){V4(t,"da",e)}function V4(t,e,n=wr){const r=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.p
* @ vue / runtime - dom v3 . 5.20
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
* * /let zh;const F1=typeof window<"u"&&window.trustedTypes;if(F1)try{zh=F1.createPolicy("vue",{createHTML:t=>t})}catch{}const mv=zh?t=>zh.createHTML(t):t=>t,Pb="http:/ / www . w3 . org / 2000 / svg ",zb=" http : //www.w3.org/1998/Math/MathML",la=typeof document<"u"?document:null,q1=la&&la.createElement("template"),Bb={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const o=e==="svg"?la.createElementNS(Pb,t):e==="mathml"?la.createElementNS(zb,t):n?la.createElement(t,{is:n}):la.createElement(t);return t==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:t=>la.createTextNode(t),createComment:t=>la.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>la.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,o,l){const h=n?n.previousSibling:e.lastChild;if(o&&(o===l||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{q1.innerHTML=mv(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const c=q1.content;if(r==="svg"||r==="mathml"){const p=c.firstChild;for(;p.firstChild;)c.appendChild(p.firstChild);c.removeChild(p)}e.insertBefore(c,n)}return[h?h.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Fb=Symbol("_vtc");function qb(t,e,n){const r=t[Fb];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const J0=Symbol("_vod"),gv=Symbol("_vsh"),jb={name:"show",beforeMount(t,{value:e},{transition:n}){t[J0]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):tl(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),tl(t,!0),r.enter(t)):r.leave(t,()=>{tl(t,!1)}):tl(t,e))},beforeUnmount(t,{value:e}){tl(t,e)}};function tl(t,e){t.style.display=e?t[J0]:"none",t[gv]=!e}const $b=Symbol(""),Ub=/(^|;)\s*display\s*:/;function Vb(t,e,n){const r=t.style,o=Vn(n);let l=!1;if(n&&!o){if(e)if(Vn(e))for(const h of e.split(";")){const c=h.slice(0,h.indexOf(":")).trim();n[c]==null&&R0(r,c,"")}else for(const h in e)n[h]==null&&R0(r,h,"");for(const h in n)h==="display"&&(l=!0),R0(r,h,n[h])}else if(o){if(e!==n){const h=r[$b];h&&(n+=";"+h),r.cssText=n,l=Ub.test(n)}}else e&&t.removeAttribute("style");J0 in t&&(t[J0]=l?r.display:"",t[gv]&&(r.display="none"))}const j1=/\s*!important$/;function R0(t,e,n){if(It(n))n.forEach(r=>R0(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Wb(t,e);j1.test(n)?t.setProperty(ao(r),n.replace(j1,""),"important"):t[r]=n}}const $1=["Webkit","Moz","ms"],Fd={};function Wb(t,e){const n=Fd[e];if(n)return n;let r=Xa(e);if(r!=="filter"&&r in t)return Fd[e]=r;r=v4(r);for(let o=0;o<$1.length;o++){const l=$1[o]+r;if(l in t)return Fd[e]=l}return e}const U1="http://www.w3.org/1999/xlink";function V1(t,e,n,r,o,l=Y2(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(U1,e.slice(6,e.length)):t.setAttributeNS(U1,e,n):n==null||l&&!y4(n)?t.removeAttribute(e):t.setAttribute(e,l?"":io(n)?String(n):n)}function W1(t,e,n,r,o){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?mv(n):n);return}const l=t.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){const c=l==="OPTION"?t.getAttribute("value")||"":t.value,p=n==null?t.type==="checkbox"?"on":"":String(n);(c!==p||!("_value"in t))&&(t.value=p),n==null&&t.removeAttribute(e),t._value=n;return}let h=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=y4(n):n==null&&c==="string"?(n="",h=!0):c==="number"&&(n=0,h=!0)}try{t[e]=n}catch{}h&&t.removeAttribute(o||e)}function Zo(t,e,n,r){t.addEventListener(e,n,r)}function Gb(t,e,n,r){t.removeEventListener(e,n,r)}const G1=Symbol("_vei");function Kb(t,e,n,r,o=null){const l=t[G1]||(t[G1]={}),h=l[e];if(r&&h)h.value=r;else{const[c,p]=Xb(e);if(r){const v=l[e]=Jb(r,o);Zo(t,c,v,p)}else h&&(Gb(t,c,h,p),l[e]=void 0)}}const K1=/(?:Once|Passive|Capture)$/;function Xb(t
* Vditor v3 . 11.2 - A markdown editor written in TypeScript .
*
* MIT License
*
* Copyright ( c ) 2018 - present B3log 开源 , b3log . org
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the "Software" ) , to deal
* in the Software without restriction , including without limitation the rights
* to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the Software is
* furnished to do so , subject to the following conditions :
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
* IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
* LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE .
*
* / ( f u n c t i o n ( t , e ) { ( f u n c t i o n ( r , o ) { t . e x p o r t s = o ( ) } ) ( B h , f u n c t i o n ( ) { r e t u r n ( ( ) = > { v a r n = { 1 7 3 : h = > { v a r c = f u n c t i o n ( ) { t h i s . D i f f _ T i m e o u t = 1 , t h i s . D i f f _ E d i t C o s t = 4 , t h i s . M a t c h _ T h r e s h o l d = . 5 , t h i s . M a t c h _ D i s t a n c e = 1 e 3 , t h i s . P a t c h _ D e l e t e T h r e s h o l d = . 5 , t h i s . P a t c h _ M a r g i n = 4 , t h i s . M a t c h _ M a x B i t s = 3 2 } , p = - 1 , v = 1 , b = 0 ; c . D i f f = f u n c t i o n ( g , m ) { r e t u r n [ g , m ] } , c . p r o t o t y p e . d i f f _ m a i n = f u n c t i o n ( g , m , x , w ) { t y p e o f w > " u " & & ( t h i s . D i f f _ T i m e o u t < = 0 ? w = N u m b e r . M A X _ V A L U E : w = n e w D a t e ( ) . g e t T i m e ( ) + t h i s . D i f f _ T i m e o u t * 1 e 3 ) ; v a r S = w ; i f ( g = = n u l l | | m = = n u l l ) t h r o w n e w E r r o r ( " N u l l i n p u t . ( d i f f _ m a i n ) " ) ; i f ( g = = m ) r e t u r n g ? [ n e w c . D i f f ( b , g ) ] : [ ] ; t y p e o f x > " u " & & ( x = ! 0 ) ; v a r k = x , C = t h i s . d i f f _ c o m m o n P r e f i x ( g , m ) , T = g . s u b s t r i n g ( 0 , C ) ; g = g . s u b s t r i n g ( C ) , m = m . s u b s t r i n g ( C ) , C = t h i s . d i f f _ c o m m o n S u f f i x ( g , m ) ; v a r A = g . s u b s t r i n g ( g . l e n g t h - C ) ; g = g . s u b s t r i n g ( 0 , g . l e n g t h - C ) , m = m . s u b s t r i n g ( 0 , m . l e n g t h - C ) ; v a r M = t h i s . d i f f _ c o m p u t e _ ( g , m , k , S ) ; r e t u r n T & & M . u n s h i f t ( n e w c . D i f f ( b , T ) ) , A & & M . p u s h ( n e w c . D i f f ( b , A ) ) , t h i s . d i f f _ c l e a n u p M e r g e ( M ) , M } , c . p r o t o t y p e . d i f f _ c o m p u t e _ = f u n c t i o n ( g , m , x , w ) { v a r S ; i f ( ! g ) r e t u r n [ n e w c . D i f f ( v , m ) ] ; i f ( ! m ) r e t u r n [ n e w c . D i f f ( p , g ) ] ; v a r k = g . l e n g t h > m . l e n g t h ? g : m , C = g . l e n g t h > m . l e n g t h ? m : g , T = k . i n d e x O f ( C ) ; i f ( T ! = - 1 ) r e t u r n S = [ n e w c . D i f f ( v , k . s u b s t r i n g ( 0 , T ) ) , n e w c . D i f f ( b , C ) , n e w c . D i f f ( v , k . s u b s t r i n g ( T + C . l e n g t h ) ) ] , g . l e n g t h > m . l e n g t h & & ( S [ 0 ] [ 0 ] = S [ 2 ] [ 0 ] = p ) , S ; i f ( C . l e n g t h = = 1 ) r e t u r n [ n e w c . D i f f ( p , g ) , n e w c . D i f f ( v , m ) ] ; v a r A = t h i s . d i f f _ h a l f M a t c h _ ( g , m ) ; i f ( A ) { v a r M = A [ 0 ] , y = A [ 1 ] , N = A [ 2 ] , z = A [ 3 ] , F = A [ 4 ] , P = t h i s . d i f f _ m a i n ( M , N , x , w ) , Y = t h i s . d i f f _ m a i n ( y , z , x , w ) ; r e t u r n P . c o n c a t ( [ n e w c . D i f f ( b , F ) ] , Y ) } r e t u r n x & & g . l e n g t h > 1 0 0 & & m . l e n g t h > 1 0 0 ? t h i s . d i f f _ l i n e M o d e _ ( g , m , w ) : t h i s . d i f f _ b i s e c t _ ( g , m , w ) } , c . p r o t o t y p e . d i f f _ l i n e M o d e _ = f u n c t i o n ( g , m , x ) { v a r w = t h i s . d i f f _ l i n e s T o C h a r s _ ( g , m ) ; g = w . c h a r s 1 , m = w . c h a r s 2 ; v a r S = w . l i n e A r r a y , k = t h i s . d i f f _ m a i n ( g , m , ! 1 , x ) ; t h i s . d i f f _ c h a r s T o L i n e s _ ( k , S ) , t h i s . d i f f _ c l e a n u p S e m a n t i c ( k ) , k . p u s h ( n e w c . D i f f ( b , " " ) ) ; f o r ( v a r C = 0 , T = 0 , A = 0 , M = " " , y = " " ; C < k . l e n g t h ; ) { s w i t c h ( k [ C ] [ 0 ] ) { c a s e v : A + + , y + = k [ C ] [ 1 ] ; b r e a k ; c a s e p : T + + , M + = k [ C ] [ 1 ] ; b r e a k ; c a s e b : i f ( T > = 1 & & A > = 1 ) { k . s p l i c e ( C - T - A , T + A ) , C = C - T - A ; f o r ( v a r N = t h i s . d i f f _ m a i n ( M , y , ! 1 , x ) , z = N . l e n g t h - 1 ; z > = 0 ; z - - ) k . s p l i c e ( C , 0 , N [ z ] ) ; C = C + N . l e n g t h } A = 0 , T = 0 , M = " " , y = " " ; b r e a k } C + + } r e t u r n k . p o p ( ) , k } , c . p r o t o t y p e . d i f f _ b i s e c t _ = f u n c t i o n ( g , m , x ) { f o r ( v a r w = g . l e n g t h , S = m . l e n g t h , k = M a t h . c e i l ( ( w + S ) / 2 ) , C = k , T = 2 * k , A = n e w A r r a y ( T ) , M = n e w A r r a y ( T ) , y = 0 ; y < T ; y + + ) A [ y ] = - 1 , M [ y ] = - 1 ; A [ C + 1 ] = 0 , M [ C + 1 ] = 0 ; f o r ( v a r N = w - S , z = N % 2 ! = 0 , F = 0 , P = 0 , Y = 0 , t e = 0 , c e = 0 ; c e < k & & ! ( n e w D a t e ( ) . g e t T i m e ( ) > x ) ; c e + + ) { f o r ( v a r M e = - c e + F ; M e < = c e - P ; M e + = 2 ) { v a r F e = C + M e , W e ; M e = = - c e | | M e ! = c e & & A [ F e - 1 ] < A [ F e + 1 ] ? W e = A [ F e + 1 ] : W e = A [ F e - 1 ] + 1 ; f o r ( v a r r t = W e - M e ; W e < w & & r t < S & & g . c h a r A t ( W e ) = = m . c h a r A t ( r t ) ; ) W e + + , r t + + ; i f ( A [ F e ] = W e , W e > w ) P + = 2 ; e l s e i f ( r t > S ) F + = 2 ; e l s e i f ( z ) { v a r j e = C + N - M e ; i f ( j e > = 0 & & j e < T & & M [ j e ] ! = - 1 ) { v a r N e = w - M [ j e ] ; i f ( W e > = N e ) r e t u r n t h i s . d i f f _ b i s e c t S p l i t _ ( g , m , W e , r t , x ) } } } f o r ( v a r n t = - c e + Y ; n t < = c e - t e ; n t + = 2 ) { v a r j e = C + n t , N e ; n t = = - c e | | n t ! = c e & & M [ j e - 1 ] < M [ j e + 1 ] ? N e = M [ j e + 1 ] : N e = M [ j e - 1 ] + 1 ; f o r ( v a r c t = N e - n t ; N e < w & & c t < S & & g . c h a r A t ( w - N e - 1 ) = = m . c h a r A t ( S - c t - 1 ) ; ) N e + + , c t + + ; i f ( M [ j e ] = N e , N e > w ) t e + = 2 ; e l s e i f ( c t > S ) Y + = 2 ; e l s e i f ( ! z ) { v a r F e = C + N - n t ; i f ( F e > = 0 & & F e < T & & A [ F e ] ! = - 1 ) { v a r W e = A [ F e ] , r t = C + W e - F e ; i f ( N e = w - N e , W e > = N e ) r e t u r n t h i s . d i f f _ b i s e c t S p l i t _ ( g , m , W e , r t , x ) } } } } r e t u r n [ n e w c . D i f f ( p , g ) , n e w c . D i f f ( v , m ) ] } , c . p r o t o t y p e . d i f f _ b i s e c t S p l i t _ = f u n c t i o n ( g , m , x , w , S ) { v a r k = g . s u b s t r i n g ( 0 , x ) , C = m . s u b s t r i n g ( 0 , w ) , T = g . s u b s t r i n g ( x ) , A = m . s u b s t r i n g ( w ) , M = t h i s . d i f f _ m a i n ( k , C , ! 1 , S ) , y = t h i s . d i f f _ m a i n ( T , A , ! 1 , S ) ; r e t u r n M . c o n c a t ( y ) } , c . p r o t o t y p e . d i f f _ l i n e s T o C h a r s _ = f u n c t i o n ( g , m ) { v a r x = [ ] , w = { } ; x [ 0 ] = " " ; f u n c t i o n S ( A ) { f o r ( v a r M = " " , y = 0 , N = - 1 , z = x . l e n g t h ; N < A . l e n g t h - 1 ; ) { N = A . i n d e x O f ( `
` ,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var ce=P.substring(te,te+Math.floor(P.length/4)),Me=-1,Fe="",We,rt,je,Ne;(Me=Y.indexOf(ce,Me+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Me)),ct=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Me));Fe.length<ct+nt&&(Fe=Y.substring(Me-ct,Me)+Y.substring(Me,Me+nt),We=P.substring(0,te-ct),rt=P.substring(te+nt),je=Y.substring(0,Me-ct),Ne=Y.substring(Me+nt))}return Fe.length*2>=P.length?[We,rt,je,Ne,Fe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),ce=Y.match(c.nonAlphaNumericRegex_),Me=te.match(c.nonAlphaNumericRegex_),Fe=ce&&Y.match(c.whitespaceRegex_),We=Me&&te.match(c.whitespaceRegex_),rt=Fe&&Y.match(c.linebreakRegex_),je=We&&te.match(c.linebreakRegex_),Ne=rt&&F.match(c.blanklineEndRegex_),nt=je&&P.match(c.blanklineStartRegex_);return Ne||nt?5:rt||je?4:ce&&!Fe&&We?3:Fe||We?2:ce||Me?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-
` ),w=0,S=/^@@ -( \d +),?( \d *) \+ ( \d +),?( \d *) @@ $ /;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+ ` @ @
` ],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+ `
` }return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),ce=p(106),Me=p(673),Fe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},We=p(214),rt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var be=speechSynthesis.getVoices(),le,ye;return be.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(ye=Ae)}),le||(le=ye),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ce='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ce='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var G=J(),X=new SpeechSynthesisUtterance;X.voice=G,X.onend=X.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(be){var le=be.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=Ce):(speechSynthesis.pause(),se.innerHTML=ee)):(X.text=se.getAttribute("data-text"),speechSynthesis.speak(X),se.classList.add("vditor-speech--current"),se.innerHTML=Ce),(0,rt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var ye=getSelection().getRangeAt(0),Ae=ye.toString().trim();if(Ae){window.vditorSpeechRange=ye.cloneRange();var ze=ye.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=ze.top+ze.height+document.queryS
` )&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制", ` "
onmouseover = "this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||" 复制 ",`')"
class = "vditor-tooltipped vditor-tooltipped__w"
onclick = "event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||" 已复制 ",`');this.previousElementSibling.blur()" > ` ).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch(N){console.error("graphviz error",N)}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/ \r \n | \r | \n /g);Y.pop(),Y.map(function(te){var ce="";F&&(N.textContent=te|| `
` ,ce=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ce,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ce=te==null?void 0:te.markmap,Me=y(ce);F.setData(Y,Me),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></
src = "//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true" > < / i f r a m e > ' ) ) , w . r e m o v e ( ) ; e l s e i f ( M & & M [ 0 ] ) w . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ` < i f r a m e c l a s s = " i f r a m e _ _ v i d e o "
src = "https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'" > < / i f r a m e > ' ) ) , w . r e m o v e ( ) ; e l s e i f ( y & & y [ 2 ] ) w . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ` < i f r a m e c l a s s = " i f r a m e _ _ v i d e o "
src = "https://www.dailymotion.com/embed/video/`.concat(y[2],'" > < /iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,ce){if(te){ce===0&&(te=te.substr(1));var Me=te.split("=");F[Me[0]]=Me[1]}});var P="https:/ / player . bilibili . com / player . html ? ",Y=Object.keys(F);Y.forEach(function(te,ce){P+=" ".concat(te," = ").concat(F[te]),ce<Y.length-1&&(P+=" & ")}),w.insertAdjacentHTML(" afterend ",'<iframe class=" iframe _ _video " src=" '.concat(P,' "></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML(" afterend ",'<iframe class=" iframe _ _video " src=" //embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
< div style = "text-align: left" > < small > ` ).concat(P.message.replace(/ \n /,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(
< div class = "vditor-img__bar" >
< span class = "vditor-img__btn" data - deg = "0" >
< svg > < use xlink : href = "#vditor-icon-redo" > < / u s e > < / s v g >
` ).concat(window.VditorI18n.spin, `
< / s p a n >
< span class = "vditor-img__btn" onclick = "this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''" >
X & nbsp ; ` ).concat(window.VditorI18n.close, `
< / s p a n >
< / d i v >
< div class = "vditor-img__img" onclick = "this.parentElement.outerHTML = '';document.body.style.overflow = ''" >
< img style = "width: `).concat(b.width," px ; height : ").concat(b.height," px ; transform : translate3d ( ").concat(x.left," px , ").concat(x.top-w,'px, 0)" src = "').concat(b.getAttribute(" src "),`" >
< / d i v >
< / d i v > ` ) ) , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " h i d d e n " ; v a r S = d o c u m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i m g i m g " ) , k = " t r a n s l a t e 3 d ( " . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r W i d t h - b . n a t u r a l W i d t h ) / 2 , " p x , " ) . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r H e i g h t - w - b . n a t u r a l H e i g h t ) / 2 , " p x , 0 ) " ) ; s e t T i m e o u t ( f u n c t i o n ( ) { S . s e t A t t r i b u t e ( " s t y l e " , " t r a n s i t i o n : t r a n s f o r m . 3 s e a s e - i n - o u t ; t r a n s f o r m : " . c o n c a t ( k ) ) , s e t T i m e o u t ( f u n c t i o n ( ) { S . p a r e n t E l e m e n t . s c r o l l T o ( ( S . p a r e n t E l e m e n t . s c r o l l W i d t h - S . p a r e n t E l e m e n t . c l i e n t W i d t h ) / 2 , ( S . p a r e n t E l e m e n t . s c r o l l H e i g h t - S . p a r e n t E l e m e n t . c l i e n t H e i g h t ) / 2 ) } , 4 0 0 ) } ) ; v a r C = d o c u m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i m g _ _ b t n " ) ; C . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( ) { v a r T = p a r s e I n t ( C . g e t A t t r i b u t e ( " d a t a - d e g " ) , 1 0 ) + 9 0 ; T / 9 0 % 2 = = = 1 & & b . n a t u r a l W i d t h > S . p a r e n t E l e m e n t . c l i e n t H e i g h t ? S . s t y l e . t r a n s f o r m = " t r a n s l a t e 3 d ( " . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r W i d t h - b . n a t u r a l W i d t h ) / 2 , " p x , " ) . c o n c a t ( b . n a t u r a l W i d t h / 2 - b . n a t u r a l H e i g h t / 2 , " p x , 0 ) r o t a t e Z ( " ) . c o n c a t ( T , " d e g ) " ) : S . s t y l e . t r a n s f o r m = " " . c o n c a t ( k , " r o t a t e Z ( " ) . c o n c a t ( T , " d e g ) " ) , C . s e t A t t r i b u t e ( " d a t a - d e g " , T . t o S t r i n g ( ) ) , s e t T i m e o u t ( f u n c t i o n ( ) { S . p a r e n t E l e m e n t . s c r o l l T o ( ( S . p a r e n t E l e m e n t . s c r o l l W i d t h - S . p a r e n t E l e m e n t . c l i e n t W i d t h ) / 2 , ( S . p a r e n t E l e m e n t . s c r o l l H e i g h t - S . p a r e n t E l e m e n t . c l i e n t H e i g h t ) / 2 ) } , 4 0 0 ) } ) } } , 5 8 0 : ( h , c , p ) = > { p . d ( c , { Y : ( ) = > g } ) ; v a r v = p ( 1 4 5 ) , b = p ( 2 9 0 ) , g = f u n c t i o n ( m , x ) { x = = = v o i d 0 & & ( x = v . g . C D N ) , v . g . C O D E _ T H E M E . i n c l u d e s ( m ) | | ( m = " g i t h u b " ) ; v a r w = d o c u m e n t . g e t E l e m e n t B y I d ( " v d i t o r H l j s S t y l e " ) , S = " " . c o n c a t ( x , " / d i s t / j s / h i g h l i g h t . j s / s t y l e s / " ) . c o n c a t ( m , " . m i n . c s s " ) ; w ? w . g e t A t t r i b u t e ( " h r e f " ) ! = = S & & ( w . r e m o v e ( ) , ( 0 , b . c ) ( S , " v d i t o r H l j s S t y l e " ) ) : ( 0 , b . c ) ( S , " v d i t o r H l j s S t y l e " ) } } , 5 3 8 : ( h , c , p ) = > { p . d ( c , { Z : ( ) = > b } ) ; v a r v = p ( 2 9 0 ) , b = f u n c t i o n ( g , m ) { i f ( ! ( ! g | | ! m ) ) { v a r x = d o c u m e n t . g e t E l e m e n t B y I d ( " v d i t o r C o n t e n t T h e m e " ) , w = " " . c o n c a t ( m , " / " ) . c o n c a t ( g , " . c s s " ) ; x ? x . g e t A t t r i b u t e ( " h r e f " ) ! = = w & & ( x . r e m o v e ( ) , ( 0 , v . c ) ( w , " v d i t o r C o n t e n t T h e m e " ) ) : ( 0 , v . c ) ( w , " v d i t o r C o n t e n t T h e m e " ) } } } , 4 1 3 : ( h , c , p ) = > { p . d ( c , { J : ( ) = > v , G : ( ) = > b } ) ; v a r v = f u n c t i o n ( g , m ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n ! 1 ; v a r x = n e w X M L H t t p R e q u e s t ; x . o p e n ( " G E T " , g , ! 1 ) , x . s e t R e q u e s t H e a d e r ( " A c c e p t " , " t e x t / j a v a s c r i p t , a p p l i c a t i o n / j a v a s c r i p t , a p p l i c a t i o n / e c m a s c r i p t , a p p l i c a t i o n / x - e c m a s c r i p t , * / * ; q = 0 . 0 1 " ) , x . s e n d ( " " ) ; v a r w = d o c u m e n t . c r e a t e E l e m e n t ( " s c r i p t " ) ; w . t y p e = " t e x t / j a v a s c r i p t " , w . t e x t = x . r e s p o n s e T e x t , w . i d = m , d o c u m e n t . h e a d . a p p e n d C h i l d ( w ) } , b = f u n c t i o n ( g , m ) { r e t u r n n e w P r o m i s e ( f u n c t i o n ( x , w ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n x ( ! 0 ) , ! 1 ; v a r S = d o c u m e n t . c r e a t e E l e m e n t ( " s c r i p t " ) ; S . s r c = g , S . a s y n c = ! 0 , d o c u m e n t . h e a d . a p p e n d C h i l d ( S ) , S . o n e r r o r = f u n c t i o n ( k ) { w ( k ) } , S . o n l o a d = f u n c t i o n ( ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n S . r e m o v e ( ) , x ( ! 0 ) , ! 1 ; S . i d = m , x ( ! 0 ) } } ) } } , 2 9 0 : ( h , c , p ) = > { p . d ( c , { c : ( ) = > v } ) ; v a r v = f u n c t i o n ( b , g ) { i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( g ) ) { v a r m = d o c u m e n t . c r e a t e E l e m e n t ( " l i n k " ) ; m . i d = g , m . r e l = " s t y l e s h e e t " , m . t y p e = " t e x t / c s s " , m . h r e f = b , d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) [ 0 ] . a p p e n d C h i l d ( m ) } } } , 1 0 5 : ( h , c , p ) = > { p . d ( c , { X : ( ) = > v } ) ; v a r v = f u n c t i o n ( b ) { r e t u r n b . r e p l a c e ( / \ u 0 0 a 0 / g , " " ) } } , 4 1 0 : ( h , c , p ) = > { p . d ( c , { G 6 : ( ) = > v , v U : ( ) = > b , p K : ( ) = > g , L e : ( ) = > m , y l : ( ) = > x , n s : ( ) = > w , i 7 : ( ) = > S } ) ; v a r v = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " S a f a r i " ) > - 1 & & n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " C h r o m e " ) = = = - 1 } , b = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " f i r e f o x " ) > - 1 } , g = f u n c t i o n ( ) { t r y { r e t u r n t y p e o f l o c a l S t o r a g e < " u " } c a t c h { r e t u r n ! 1 } } , m = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " i P h o n e " ) > - 1 ? " t o u c h s t a r t " : " c l i c k " } , x = f u n c t i o n ( k ) { r e t u r n n a v i g a t o r . p l a t f o r m . t o U p p e r C a s e ( ) . i n d e x O f ( " M A C " ) > = 0 ? ! ! ( k . m e t a K e y & & ! k . c t r l K e y ) : ! ! ( ! k . m e t a K e y & & k . c t r l K e y ) } , w = f u n c t i o n ( k ) { r e t u r n / M a c / . t e s t ( n a v i g a t o r . p l a t f o r m ) | | n a v i g a t o r . p l a t f o r m = = = " i P h o n e " ? k . i n d e x O f ( " ⇧ " ) > - 1 & & b ( ) & & ( k = k . r e p l a c e ( " ; " , " : " ) . r e p l a c e ( " = " , " + " ) . r e p l a c e ( " - " , " _ " ) ) : ( k . s t a r t s W i t h ( " ⌘ " ) ? k = k . r e p l a c e ( " ⌘ " , " ⌘ + " ) : k . s t a r t s W i t h ( " ⌥ " ) & & k . s u b s t r ( 1 , 1 ) ! = = " ⌘ " ? k = k . r e p l a c e ( " ⌥ " , " ⌥ + " ) : k = k . r e p l a c e ( " ⇧ ⌘ " , " ⌘ + ⇧ + " ) . r e p l a c e ( " ⌥ ⌘ " , " ⌥ + ⌘ + " ) , k = k . r e p l a c e ( " ⌘ " , " C t r l " ) . r e p l a c e ( " ⇧ " , " S h i f t " ) . r e p l a c e ( " ⌥ " , " A l t " ) , k . i n d e x O f ( " S h i f t " ) > - 1 & & ( k = k . r e p l a c e ( " ; " , " : " ) . r e p l a c e ( " = " , " + " ) . r e p l a c e ( " - " , " _ " ) ) ) , k } , S = f u n c t i o n ( ) { r e t u r n / C h r o m e / . t e s t ( n a v i g a t o r . u s e r A g e n t ) & & / G o o g l e I n c / . t e s t ( n a v i g a t o r . v e n d o r ) } } , 4 9 4 : ( h , c , p ) = > { p . d ( c , { W b : ( ) = > v , o n : ( ) = > b , Q f : ( ) = > g } ) ; v a r v = f u n c t i o n ( ) { r e t u r n ( [ 1 e 7 ] . t o S t r i n g ( ) + - 1 e 3 + - 4 e 3 + - 8 e 3 + - 1 e 1 1 ) . r e p l a c e ( / [ 0 1 8 ] / g
` ).replace(/ \n \n $ /, `
` )):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){u&&console.log("".concat(i," - ").concat(s,": ").concat(a))},F=o(135),P=o(775),Y=o(428),te=o(325),ce=o(483),Me=o(999),Fe=o(472),We=o(637),rt=o(11),je=o(194),Ne=o(229),nt=o(825),ct=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf( `
< p class = "p1" > ` )===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/ \n /.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&").replace(/</g,"<"),"<wbr></code></pre></div>"):" \n ` ` ` \ n "+E.replace(/&/g," & amp ; ").replace(/</g," & lt ; ")+" \ n ` ` ` ":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&").replace(/</g,"<"),"</code><wbr>"):" ` ".concat(E," ` ")}return!1},tt=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,We.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,nt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,rt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,ce.v)(i,a.options.cdn);else if(s==="math")(0,Fe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Me.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},q=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,Fe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}}, $ t=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,q.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),lt(a),!0;if(Pr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,q.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),lt(a),!0;if(pi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),lt(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(fo(d.innerHTML)&&d.previousElementSibling||mo(d.innerHTML))return;for(var f=(0,q.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf( `
` );L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!== `
` ){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $ /.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(it){it.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var K=(0,y.fb)(a.startContainer,"vditor-ir__preview");K?K.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(it){it.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),ve=(0,y.a1)(d,"data-type","footnotes-block"),ue="";if(fe)ue=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),we=(0,y.O9)(a.startContainer);if(we&&(d=we),ke&&(!we||we&&!ke.contains(we))&&(d=ke),ve&&(d=ve),ue=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var de=d.previousElementSibling,Ie=d.nextElementSibling;de&&(de.tagName==="UL"||de.tagName==="OL")&&(ue=de.outerHTML+ue,de.remove()),Ie&&(Ie.tagName==="UL"||Ie.tagName==="OL")&&(ue=ue+Ie.outerHTML,Ie.remove()),ue=ue.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ue=d.previousElementSibling.outerHTML+ue,d.previousElementSibling.remove());d.innerText.startsWith(" ` ` ` ")||(i.ir.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] ").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}),i.ir.element.querySelectorAll(" [ data - type = 'footnotes-block' ] ").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}))}if(z(" SpinVditorIRDOM ",ue," argument ",i.options.debugger),ue=i.lute.SpinVditorIRDOM(ue),z(" SpinVditorIRDOM ",ue," result ",i.options.debugger),fe)d.innerHTML=ue;else if(d.outerHTML=ue,ve){var Te=(0,y.a1)(i.ir.element.querySelector(" wbr ")," data - type "," footnotes - def ");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf(" ] : ")),gt=i.ir.element.querySelector('sup[data-type=" footnotes - ref "][data-footnotes-label=" '.concat(bt,' "]'));gt&>.setAttribute(" aria - label ",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,dn=i.ir.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] ");dn.forEach(function(it,zt){zt===0?kt=it:(kt.insertAdjacentHTML(" beforeend ",it.innerHTML),it.remove())}),dn.length>0&&i.ir.element.insertAdjacentElement(" beforeend ",dn[0]);var Wt,hn=i.ir.element.querySelectorAll(" [ data - type = 'footnotes-block' ] ");hn.forEach(function(it,zt){zt===0?Wt=it:(Wt.insertAdjacentHTML(" beforeend ",it.innerHTML),it.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement(" beforeend ",hn[0]),(0,q.ib)(i.ir.element,a),i.ir.element.querySelectorAll(" . vditor - ir _ _preview [ data - render = '2' ] ").forEach(function(it){tt(it,i)}),Ht(i),Xn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i===" ")return!1;if(i.indexOf(" ⇧ ")===-1&&i.indexOf(" ⌘ ")===-1&&i.indexOf(" ⌥ ")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i===" ⇧ Tab ")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code===" Tab ");var s=i.split(" ");if(i.startsWith(" ⌥ ")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?" Digit ":" Key ")+u)}i===" ⌘ Enter "&&(s=[" ⌘ "," Enter "]);var d=s.length>2&&s[0]===" ⇧ ",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f===" - "?f=" _ ":f===" = "&&(f=" + ")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent===" " ; ) s = s . nextSibling ; if ( s ) { if ( s && s . nodeType
` );D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Ge(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=pe(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Ge(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=pe(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Ge(i);return}}}var K=(0,y.a1)(d,"data-type","math-block-open-marker");if(K){var fe=K.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Ge(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()});var ve=(0,y.a1)(d,"data-type","heading-marker");if(ve&&ve.textContent.indexOf("#")===-1){Ge(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Ge(i);return}}if(f&&f.textContent.trimRight()===" $ $ "){Ge(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(de){de.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(de){de.outerHTML=de.innerHTML});var ue=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ue=f.textContent;else{f.previousElementSibling&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove()),f.previousElementSibling&&ue.indexOf( ` -- -
` )===0&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove());var we="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+ `
` ,de.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+ `
` ,de.parentElement.remove())}),ue=we+ue}ue=Oe(ue,i),ke?f.innerHTML=ue:f.outerHTML=ue,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de){i.sv.element.insertAdjacentElement("beforeend",de.parentElement)}),G(i.sv.element,function(de){i.sv.element.insertAdjacentElement("beforeend",de)}),(0,q.ib)(i.sv.element,u),Z(i),Ge(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},be=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F \d {1,2} $ /.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,q.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,q.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Ge(i),a.preventDefault(),!0;var K=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),ve=K;if(ve||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(ve=fe),!ve&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(ve=_.previousElementSibling),ve){var ue=(0,q.im)(ve,i.sv.element,L).start,ke=ve.getAttribute("data-type")==="task-marker",we=ve;if(ke&&(we=ve.previousElementSibling.previousElementSibling.previousElementSibling),ue===ve.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ve.nextElementSibling.textContent.trim()==="")return((u=we.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(we.previousElementSibling.remove(),X(i)):(ke&&(we.remove(),ve.previousElementSibling.previousElementSibling.remove(),ve.previousElementSibling.remove()),ve.nextElementSibling.remove(),ve.remove(),Ge(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?we.previousElementSibling.getAttribute("data-type")==="padding"&&we.previousElementSibling.remove():we.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(we.textContent.replace(/ \S /g," "),"</span>")),/^ \d /.test(we.textContent)&&(we.textContent=we.textContent.replace(/^ \d {1,}/,"1"),L.selectNodeContents(ve.firstChild),L.collapse(!1)),X(i),a.preventDefault(),!0}}if(go(i,L,a))return!0;var de=(0,y.a1)(D,"data-block","0"),Ie=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&de){var Te=!1, $ e=de.textContent.match(/^ \n +/);(0,q.im)(de,i.sv.element).start<=( $ e? $ e[0].length:0)&&(Te=!0);var bt= `
` ;if(Ie){if(((d=Ie.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Ie.previousElementSibling.remove(),Ge(i),a.preventDefault(),!0;bt+=Je(Ie)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),de&&de.textContent.trim()!==""&&!Te?X(i):Ge(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(Ie&&((f=Ie.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,q.im)(Ie,i.sv.element,L).start===1&&Ie.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Ie,0),L.extractContents(),Ie.textContent.trim()!==""?X(i):Ge(i),a.preventDefault(),!0;if(de&&(0,q.im)(de,i.sv.element,L).start===0&&de.previousElementSibling){L.extractContents();var gt=de.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=de.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",de.innerHTML),de.remove()),de.textContent.trim()!==""&&!(!((E=de.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?X(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Ge(i)),a.preventDefault(),!0}}return!1},le=o(538),ye=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ye(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),er(i,i.options.mode,st(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},ze=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"
` ,s.insertNode(_),s.collapse(!0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var K=document.createElement("p");return K.textContent= `
` ,K.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",K),s.setStart(K,0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&lr(i)}if(Ps(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var ve=(0,y.lG)(u,"A"),ue=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(ve||ue||ke||B&&B.tagName.length===2){var we=i.wysiwyg.popover.querySelector("input");we.focus(),we.select()}}if(Ot(i,a))return!0;if(oe("⇧⌘U",a)){var de=i.wysiwyg.popover.querySelector('[data-type="up"]');if(de)return de.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var de=i.wysiwyg.popover.querySelector('[data-type="down"]');if(de)return de.click(),a.preventDefault(),!0}if(go(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode( `
` +c.g.ZWSP)):s.insertNode(document.createTextNode( `
` )),s.collapse(!1),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var Ie=(0,q.im)(d,i.wysiwyg.element,s).start;if(Ie===0&&s.startOffset===0||Ie===1&&d.innerText.startsWith(c.g.ZWSP))return cr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Re(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)=== `
` &&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Re(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Dt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(Fs(a,d,s))return a.preventDefault(),!0;if(Ts(s,a.key),a.key==="ArrowDown"){var $ e=u.nextSibling; $ e&& $ e.nodeType!==3&& $ e.getAttribute("data-type")==="math-inline"&&s.setStartAfter( $ e)}return d&& $ t(d,i,a,s)?(a.preventDefault(),!0):!1},Ot=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},jn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",pn(u,i),tn(i,"footnotes-block"),en(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var K=(0,y.fb)(s,"vditor-toc");if(K){i.wysiwyg.popover.innerHTML="",pn(K,i),tn(i,"vditor-toc"),en(i,K);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",ur(a,fe,i),nr(a,fe,i),pn(fe,i),tn(i,"blockquote"),en(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",ur(a,d,i),nr(a,d,i),pn(d,i),tn(i,"li"),en(i,d)),_){i.options.lang,i.
< / c o d e > < / p r e > ` : ( K . i n n e r H T M L = " < p r e > < c o d e > " . c o n c a t ( f . t o S t r i n g ( ) , " < w b r > < / c o d e > < / p r e > " ) , f . d e l e t e C o n t e n t s ( ) ) , f . i n s e r t N o d e ( K ) , _ & & ( _ . o u t e r H T M L = i . l u t e . S p i n V d i t o r D O M ( _ . o u t e r H T M L ) ) , ( 0 , q . i b ) ( i . w y s i w y g . e l e m e n t , f ) , i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - w y s i w y g _ _ p r e v i e w [ d a t a - r e n d e r = ' 2 ' ] " ) . f o r E a c h ( f u n c t i o n ( b t ) { t t ( b t , i ) } ) , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - d i s a b l e d " ) } e l s e i f ( E = = = " l i n k " ) { i f ( f . t o S t r i n g ( ) = = = " " ) { v a r f e = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; f e . i n n e r T e x t = c . g . Z W S P , f . i n s e r t N o d e ( f e ) , f . s e t S t a r t ( f e . f i r s t C h i l d , 1 ) , f . c o l l a p s e ( ! 0 ) , T i ( i , f e , f ) ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( " i n p u t " ) ; v e . v a l u e = " " , v e . f o c u s ( ) , d = ! 1 } e l s e { v a r K = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; K . s e t A t t r i b u t e ( " h r e f " , " " ) , K . i n n e r H T M L = f . t o S t r i n g ( ) , f . s u r r o u n d C o n t e n t s ( K ) , f . i n s e r t N o d e ( K ) , ( 0 , q . H c ) ( f ) , T i ( i , K , f ) ; v a r u e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r A l l ( " i n p u t " ) ; u e [ 0 ] . v a l u e = K . i n n e r T e x t , u e [ 1 ] . f o c u s ( ) } u = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) } e l s e i f ( E = = = " t a b l e " ) { v a r k e = ' < t a b l e d a t a - b l o c k = " 0 " > < t h e a d > < t r > < t h > c o l 1 < w b r > < / t h > < t h > c o l 2 < / t h > < t h > c o l 3 < / t h > < / t r > < / t h e a d > < t b o d y > < t r > < t d > < / t d > < t d > < / t d > < t d > < / t d > < / t r > < t r > < t d > < / t d > < t d > < / t d > < t d > < / t d > < / t r > < / t b o d y > < / t a b l e > ' ; i f ( f . t o S t r i n g ( ) . t r i m ( ) = = = " " ) _ & & _ . i n n e r H T M L . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " ? _ . o u t e r H T M L = k e : d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , k e ) , f . s e l e c t N o d e ( i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r ( " w b r " ) . p r e v i o u s S i b l i n g ) , i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r ( " w b r " ) . r e m o v e ( ) , ( 0 , q . H c ) ( f ) ; e l s e { k e = ' < t a b l e d a t a - b l o c k = " 0 " > < t h e a d > < t r > ' ; v a r w e = f . t o S t r i n g ( ) . s p l i t ( `
` ),de=we[0].split(",").length>we[0].split(" ").length?",":" ";we.forEach(function( $ e,bt){bt===0?( $ e.split(de).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>", $ e.split(de).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,q.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Ie= ` < hr data - block = "0" > < p data - block = "0" > < wbr >
< /p>`;_.innerHTML.trim()===""?_.outerHTML=Ie:_.insertAdjacentHTML("afterend",Ie),(0,q.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var K=document.createElement(Te);K.textContent=c.g.ZWSP,f.insertNode(K),K.previousSibling&&K.previousSibling.textContent===c.g.ZWSP&&(K.previousSibling.textContent=""),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else document.execCommand(E,!1,"")}u&&jn(i),d&&Re(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</ ").concat(L," > ");else{this.element.classList.add(" vditor - toolbar _ _item ");var D=document.createElement(L);D.setAttribute(" data - type ",s.name),D.className=" vditor - tooltipped vditor - tooltipped _ _ ".concat(s.tipPosition),D.setAttribute(" aria - label ",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode===" wysiwyg "?bs(a,d.element.children[0],_):a.currentMode===" ir "?vu(a,d.element.children[0],s.prefix||" ",s.suffix||" "):Gt(a,d.element.children[0],s.prefix||" ",s.suffix||" "))})}return i}(),ys=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!=" function "&&s!==null)throw new TypeError(" Class extends value "+String(s)+" is not a constructor or null ");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),er=function(i,a,s){var u;if(typeof s!=" string "?(A(i,[" subToolbar "," hint "]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!=" string ")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode===" both "&&a===" sv "?i.preview.element.style.display=" block ":i.preview.element.style.display=" none ",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,[" outdent "," indent "]),a===" ir ")C(i.toolbar.elements,[" both "]),T(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert - after "]),i.sv.element.style.display=" none ",i.wysiwyg.element.parentElement.style.display=" none ",i.ir.element.parentElement.style.display=" block ",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode=" ir ",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Xn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(" . vditor - ir _ _preview [ data - render = '2' ] ").forEach(function(f){tt(f,i)}),i.ir.element.querySelectorAll(" . vditor - toc ").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a===" wysiwyg ")C(i.toolbar.elements,[" both "]),T(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert - after "]),i.sv.element.style.display=" none ",i.wysiwyg.element.parentElement.style.display=" block ",i.ir.element.parentElement.style.display=" none ",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode=" wysiwyg ",ze(i),uo(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(" . vditor - toc ").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display=" none ";else if(a===" sv "){T(i.toolbar.elements,[" both "]),C(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert -
< button data - mode = "ir" > ` ).concat(window.VditorI18n.instantRendering," <").concat((0,m.ns)("⌥⌘8"), ` > < / b u t t o n >
< button data - mode = "sv" > ` ).concat(window.VditorI18n.splitView," <").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){er(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){er(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){er(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),Or=function(i,a){return(0,q.Gb)(i,a)?getSelection().toString():""},Ai=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},ho=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},Mi=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,q.zh)(i),i.options.blur&&i.options.blur(v(i))})},Ci=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?lt(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ta(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},U=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},Q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Z=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,q.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},xe=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(be(i,s))return}else if(i.currentMode==="wysiwyg"){if(zn(i,s))return}else if(i.currentMode==="ir"&&Ce(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6] $ /.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?lr(i):kn(i,u),Re(i)}else i.currentMode==="sv"?Ct(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&fi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9] $ /.test(s.code))return s.code==="Digit7"?er(i,"wysiwyg",s):s.code==="Digit8"?er(i,"ir",s):s.code==="Digit9"&&er(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.f
< / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < / d i v > < d i v d a t a - b l o c k = " 0 " > < ` ) + " < / d i v > " , u . i s E q u a l N o d e ( i . s v . e l e m e n t ) ? u . i n n e r H T M L = d : u . o u t e r H T M L = d , G ( i . s v . e l e m e n t ) , ( 0 , q . i b ) ( i . s v . e l e m e n t , s ) , Z ( i ) } , p e = f u n c t i o n ( i , a , s ) { s = = = v o i d 0 & & ( s = ! 0 ) ; v a r u = i ; f o r ( u . n o d e T y p e = = = 3 & & ( u = u . p a r e n t E l e m e n t ) ; u ; ) { i f ( u . g e t A t t r i b u t e ( " d a t a - t y p e " ) = = = a ) r e t u r n u ; s ? u = u . p r e v i o u s E l e m e n t S i b l i n g : u = u . n e x t E l e m e n t S i b l i n g } r e t u r n ! 1 } , O e = f u n c t i o n ( i , a ) { z ( " S p i n V d i t o r S V D O M " , i , " a r g u m e n t " , a . o p t i o n s . d e b u g g e r ) ; v a r s = a . l u t e . S p i n V d i t o r S V D O M ( i ) ; r e t u r n i = " < d i v d a t a - b l o c k = ' 0 ' > " + s . r e p l a c e ( / < s p a n d a t a - t y p e = " n e w l i n e " > < b r \ / > < s p a n s t y l e = " d i s p l a y : n o n e " > \ n < \ / s p a n > < \ / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r \ / > < s p a n s t y l e = " d i s p l a y : n o n e " > \ n < \ / s p a n > < \ / s p a n > < / g , ` < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < / d i v > < d i v d a t a - b l o c k = " 0 " > < ` ) + " < / d i v > " , z ( " S p i n V d i t o r S V D O M " , i , " r e s u l t " , a . o p t i o n s . d e b u g g e r ) , i } , J e = f u n c t i o n ( i ) { v a r a = i . g e t A t t r i b u t e ( " d a t a - t y p e " ) , s = i . p r e v i o u s E l e m e n t S i b l i n g , u = a & & a ! = = " t e x t " & & a ! = = " t a b l e " & & a ! = = " h e a d i n g - m a r k e r " & & a ! = = " n e w l i n e " & & a ! = = " y a m l - f r o n t - m a t t e r - o p e n - m a r k e r " & & a ! = = " y a m l - f r o n t - m a t t e r - c l o s e - m a r k e r " & & a ! = = " c o d e - b l o c k - i n f o " & & a ! = = " c o d e - b l o c k - c l o s e - m a r k e r " & & a ! = = " c o d e - b l o c k - o p e n - m a r k e r " ? i . t e x t C o n t e n t : " " , d = ! 1 ; f o r ( a = = = " n e w l i n e " & & ( d = ! 0 ) ; s & & ! d ; ) { v a r f = s . g e t A t t r i b u t e ( " d a t a - t y p e " ) ; i f ( f = = = " l i - m a r k e r " | | f = = = " b l o c k q u o t e - m a r k e r " | | f = = = " t a s k - m a r k e r " | | f = = = " p a d d i n g " ) { v a r E = s . t e x t C o n t e n t ; i f ( f = = = " l i - m a r k e r " & & ( a = = = " c o d e - b l o c k - o p e n - m a r k e r " | | a = = = " c o d e - b l o c k - i n f o " ) ) u = E . r e p l a c e ( / \ S / g , " " ) + u ; e l s e i f ( a = = = " c o d e - b l o c k - c l o s e - m a r k e r " & & s . n e x t E l e m e n t S i b l i n g . i s S a m e N o d e ( i ) ) { v a r L = p e ( i , " c o d e - b l o c k - o p e n - m a r k e r " ) ; L & & L . p r e v i o u s E l e m e n t S i b l i n g & & ( s = L . p r e v i o u s E l e m e n t S i b l i n g , u = E + u ) } e l s e u = E + u } e l s e f = = = " n e w l i n e " & & ( d = ! 0 ) ; s = s . p r e v i o u s E l e m e n t S i b l i n g } r e t u r n u } , G e = f u n c t i o n ( i , a ) { a = = = v o i d 0 & & ( a = { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 1 , e n a b l e I n p u t : ! 0 } ) , a . e n a b l e H i n t & & i . h i n t . r e n d e r ( i ) , i . p r e v i e w . r e n d e r ( i ) ; v a r s = v ( i ) ; t y p e o f i . o p t i o n s . i n p u t = = " f u n c t i o n " & & a . e n a b l e I n p u t & & i . o p t i o n s . i n p u t ( s ) , i . o p t i o n s . c o u n t e r . e n a b l e & & i . c o u n t e r . r e n d e r ( i , s ) , i . o p t i o n s . c a c h e . e n a b l e & & ( 0 , m . p K ) ( ) & & ( l o c a l S t o r a g e . s e t I t e m ( i . o p t i o n s . c a c h e . i d , s ) , i . o p t i o n s . c a c h e . a f t e r & & i . o p t i o n s . c a c h e . a f t e r ( s ) ) , i . d e v t o o l s & & i . d e v t o o l s . r e n d e r E c h a r t ( i ) , c l e a r T i m e o u t ( i . s v . p r o c e s s T i m e o u t I d ) , i . s v . p r o c e s s T i m e o u t I d = w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { a . e n a b l e A d d U n d o S t a c k & & ! i . s v . c o m p o s i n g L o c k & & i . u n d o . a d d T o U n d o S t a c k ( i ) } , i . o p t i o n s . u n d o D e l a y ) } , C t = f u n c t i o n ( i , a ) { v a r s = ( 0 , q . z h ) ( i ) , u = ( 0 , N . S ) ( s . s t a r t C o n t a i n e r , " S P A N " ) ; u & & u . t e x t C o n t e n t . t r i m ( ) ! = = " " & & ( a = `
` +a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Gt=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML= ` < span data - type = "p" data - block = "0" > < span data - type = "text" > < wbr > < / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > ` , ( 0 , q . i b ) ( i . s v . e l e m e n t , d ) ) ; v a r E = ( 0 , y . F 9 ) ( d . s t a r t C o n t a i n e r ) , L = ( 0 , N . S ) ( d . s t a r t C o n t a i n e r , " S P A N " ) ; i f ( E ) { i f ( f = = = " l i n k " ) { v a r D = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? D = " " . c o n c a t ( s ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( u ) : D = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( u . r e p l a c e ( " ) " , L u t e . C a r e t + " ) " ) ) , d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , D ) ; r e t u r n } e l s e i f ( f = = = " i t a l i c " | | f = = = " b o l d " | | f = = = " s t r i k e " | | f = = = " i n l i n e - c o d e " | | f = = = " c o d e " | | f = = = " t a b l e " | | f = = = " l i n e " ) { v a r D = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? D = " " . c o n c a t ( s ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( f = = = " c o d e " ? " " : u ) : D = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( f = = = " c o d e " ? " " : u ) , f = = = " t a b l e " | | f = = = " c o d e " & & L & & L . t e x t C o n t e n t ! = = " " ? D = `
` +D:f==="line"&&(D= `
` .concat(s, `
` ).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=pe(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),X(i);return}(0,q.ib)(i.sv.element,d),Ge(i)}},un=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}}, $ n=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},mr=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},Hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ia=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Li=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var K=a[B],fe=!0;K.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),K.size>i.options.upload.max&&(u+="<li>".concat(K.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var ve=K.name.lastIndexOf("."),ue=K.name.substr(ve),ke=i.options.upload.filename(K.name.substr(0,ve))+ue;if(i.options.upload.accept){var we=i.options.upload.accept.split(",").some(function(de){var Ie=de.trim();if(Ie.indexOf(".")===0){if(ue.toLowerCase()===Ie.toLowerCase())return!0}else if(K.type.split("/")[0]===Ie.split("/")[0])return!0;return!1});we||(u+="<li>".concat(K.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(K),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Oa=function(i,a){var s=un(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase()
data - block = "0" > < pre > < code > & lt ; audio controls = "controls" src = "`.concat(L,'" & gt ; & lt ; / a u d i o & g t ; < / c o d e > < / p r e > < p r e c l a s s = " v d i t o r - w y s i w y g _ _ p r e v i e w " d a t a - r e n d e r = " 1 " > < a u d i o c o n t r o l s = " c o n t r o l s " s r c = " ' ) . c o n c a t ( L , ` " > < / a u d i o > < / p r e > < / d i v >
` ):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L, ` " > < / a u d i o >
` ):f+="[".concat(B,"](").concat(L, ` )
` ):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L, ` " >
` ):f+=".concat(L, ` )
` ):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B, ` < / a >
` ):f+="[".concat(B,"](").concat(L, ` )
` )}),(0,q.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},_i=function(i,a,s){return mr(void 0,void 0,void 0,function(){var u,d,ue,f,E,E,L,D,_,B,K,fe,ve,ue,ke,we;return Hr(this,function(de){switch(de.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ue=0;ue<d;ue++)f=a[ue],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=de.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=de.sent(),de.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=un(i),i.upload.range=(0,q.zh)(i),D=Li(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,K=0,fe=Object.keys(B);K<fe.length;K++)ve=fe[K],_.append(ve,B[ve]);for(ue=0,ke=D.length;ue<ke;ue++)_.append(i.options.upload.fieldName,D[ue]);return we=new XMLHttpRequest,i.upload.xhr=we,we.open("POST",i.options.upload.url),i.options.upload.token&&we.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(we.withCredentials=!0), $ n(i,we),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),we.onreadystatechange=function(){if(we.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),we.status>=200&&we.status<300)if(i.options.upload.success)i.options.upload.success(L,we.responseText);else{var Ie=we.responseText;i.options.upload.format&&(Ie=i.options.upload.format(a,we.responseText)),Oa(Ie,i)}else i.options.upload.error?i.options.upload.error(we.responseText):i.tip.show(we.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},we.upload.onprogress=function(Ie){if(Ie.lengthComputable){var Te=Ie.loaded/Ie.total*100;i.upload.element.style.display="block";var $ e=i.upload.element; $ e.style.width=Te+"%"}},we.send(_),[2]}})})},Zr=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var K=d.previousElementSibling,fe=d.nextElementSibling;K&&(K.tagName==="UL"||K.tagName==="OL")&&(E=K.outerHTML+E,K.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith(" ` ` ` ")||(i.wysiwyg.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] " ) . forEach ( function ( Te ) { Te && ! d . isEqualNode ( Te ) && ( E += Te . outerHTML , Te . re
< / p > ` ) ) , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) , d r ( i ) , l t ( i ) ) } , f u = f u n c t i o n ( i ) { v a r a = ( 0 , y . l G ) ( i , " T A B L E " ) ; r e t u r n a & & a . r o w s [ 0 ] . c e l l s [ 0 ] . i s S a m e N o d e ( i ) ? a : ! 1 } , m u = f u n c t i o n ( i ) { v a r a = ( 0 , y . l G ) ( i , " T A B L E " ) ; r e t u r n a & & a . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . i s S a m e N o d e ( i ) ? a : ! 1 } , A s = f u n c t i o n ( i , a , s ) { s = = = v o i d 0 & & ( s = ! 0 ) ; v a r u = i . p r e v i o u s E l e m e n t S i b l i n g ; r e t u r n u | | ( i . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g ? u = i . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g . l a s t E l e m e n t C h i l d : i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . t a g N a m e = = = " T B O D Y " & & i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g ? u = i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d : u = n u l l ) , u & & ( a . s e l e c t N o d e C o n t e n t s ( u ) , s | | a . c o l l a p s e ( ! 1 ) , ( 0 , q . H c ) ( a ) ) , u } , p i = f u n c t i o n ( i , a , s , u , d ) { v a r f = ( 0 , q . i m ) ( u , i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) ; i f ( a . k e y = = = " A r r o w D o w n " & & u . t e x t C o n t e n t . t r i m R i g h t ( ) . s u b s t r ( f . s t a r t ) . i n d e x O f ( `
` )===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Pr=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf( `
` )===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Ji=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var _=void 0;s==="list"?(_=document.createElement("ul"),_.setAttribute("data-marker","*")):(_=document.createElement("ol"),_.setAttribute("data-marker","1.")),_.setAttribute("data-block","0"),_.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),_.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(_,d.parentElement)}else{var D=(0,y.a1)(a.startContainer,"data-block","0");D||(i[i.currentMode].element.querySelector("wbr").remove(),D=i[i.currentMode].element.querySelector("p"),D.innerHTML="<wbr>"),s==="check"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="list"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="ordered-list"&&(D.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(D.innerHTML,"</li></ol>")),D.remove())}},Ms=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){tt(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},po=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(K){K.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(K,fe){K.nodeType!==3&&a&&K.textContent.trim()!==""&&a.getAttribute("data-node-id")===K.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(K){D&&(_+=K.outerHTML,!K.nextElementSibling&&!K.previousElementSibling?K.parentElement.remove():K.remove()),K.isSam
` ).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ | \* /g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split( `
` ).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},mo=function(i){var a=i.trimRight().split( `
` );return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},lt=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Re(i,a):i.currentMode==="ir"?Xn(i,a):i.currentMode==="sv"&&Ge(i,a)},Cs=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith( `
` )&&E.insertAdjacentText("beforeend", `
` ),i.insertNode(document.createTextNode( `
` )),i.collapse(!1),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,q.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend", `
` ),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?po(a,E,i,E.parentElement):Ms(a,E,i),u.preventDefault(),!0}}return!1},go=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,q.Hc)(a),lt(i),s.preventDefault(),!0},Ls=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(qs||(qs=pu(["",""],["",""])),s.textContent).replace(/ \\ \| /g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+ `
` +E.substring(3,E.length-3)+ `
| < wbr > ` ,s.outerHTML=a.lute.SpinVditorDOM(E),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(fo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split( `
` );return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join( `
` ),"</p>")),s.insertAdjacentHTML("afterend","".concat(L, ` < hr data - block = "0" > < p data - block = "0" > < wbr >
< / p > ` ) ) , s . r e m o v e ( ) , ( 0 , q . i b ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , u ) , l t ( a ) , Z ( a ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( m o ( s . i n n e r H T M L ) ) r e t u r n a . c u r r e n t M o d e = = = " w y s i w y g " ? s . o u t e r H T M L = a . l u t e . S p i n V d i t o r D O M ( s . i n n e r H T M L + ` < p d a t a - b l o c k = " 0 " > < w b r >
< / p > ` ) : s . o u t e r H T M L = a . l u t e . S p i n V d i t o r I R D O M ( s . i n n e r H T M L + ` < p d a t a - b l o c k = " 0 " > < w b r >
< / p > ` ) , ( 0 , q . i b ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , u ) , l t ( a ) , Z ( a ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( u . c o l l a p s e d & & s . p r e v i o u s E l e m e n t S i b l i n g & & i . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( i ) & & ! i . a l t K e y & & ! i . s h i f t K e y & & s . t e x t C o n t e n t . t r i m R i g h t ( ) . s p l i t ( `
` ).length>1&&(0,q.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith( `
` )||(_.textContent=_.textContent+ `
` ),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),!1}return!1}},_s=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),lt(i)},Ns=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/< \/ th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,q.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));lt(i)},ea=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");lt(i)},Ds=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,q.Hc)(a),lt(i)}},Rs=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),dr(i);break}L[d].remove()}(0,q.Hc)(a),lt(i)},Is=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),lt(i),Z(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return As(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,q.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,q.Hc)(s)):hi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,q.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,q.Hc)(s)):hi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,q.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.s
< / p > ` , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) ) : ( s . s e t S t a r t B e f o r e ( L ) , s . c o l l a p s e ( ! 0 ) ) , l t ( i ) ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ F " , a ) ) r e t u r n N s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⌘ = " , a ) ) r e t u r n _ s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ G " , a ) ) r e t u r n e a ( i , L , d , " b e f o r e b e g i n " ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ = " , a ) ) r e t u r n e a ( i , L , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⌘ - " , a ) ) r e t u r n D s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ - " , a ) ) r e t u r n R s ( i , s , L , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ L " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " l e f t " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " l e f t " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ C " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " c e n t e r " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " c e n t e r " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ R " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " r i g h t " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " r i g h t " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , O s = f u n c t i o n ( i , a , s , u ) { i f ( s . t a g N a m e = = = " P R E " & & o e ( " ⌘ A " , a ) ) r e t u r n u . s e l e c t N o d e C o n t e n t s ( s . f i r s t E l e m e n t C h i l d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( i . o p t i o n s . t a b & & a . k e y = = = " T a b " & & ! a . s h i f t K e y & & u . t o S t r i n g ( ) = = = " " ) r e t u r n u . i n s e r t N o d e ( d o c u m e n t . c r e a t e T e x t N o d e ( i . o p t i o n s . t a b ) ) , u . c o l l a p s e ( ! 1 ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( a . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( a ) & & ! a . s h i f t K e y & & ! a . a l t K e y ) { v a r d = ( 0 , q . i m ) ( s , i [ i . c u r r e n t M o d e ] . e l e m e n t , u ) ; i f ( ( d . s t a r t = = = 0 | | d . s t a r t = = = 1 & & s . i n n e r T e x t = = = `
` )&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,q.ib)(i[i.currentMode].element,u),lt(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith( `
` )||s.firstElementChild.insertAdjacentText("beforeend", `
` ),u.extractContents(),u.insertNode(document.createTextNode( `
` )),u.collapse(!1),(0,q.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?Zr(i,u):Nt(i,u)),Z(i),a.preventDefault(),!0):!1},Hs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,q.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")=== `
` ||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith( `
` )&&(0,q.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP, ` < wbr >
< / p > ` ) ) , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } v a r L = ( 0 , y . F 9 ) ( d ) ; i f ( i . c u r r e n t M o d e = = = " w y s i w y g " & & L & & o e ( " ⇧ ⌘ ; " , s ) ) r e t u r n a . i n s e r t N o d e ( d o c u m e n t . c r e a t e E l e m e n t ( " w b r " ) ) , L . o u t e r H T M L = ' < b l o c k q u o t e d a t a - b l o c k = " 0 " > ' . c o n c a t ( L . o u t e r H T M L , " < / b l o c k q u o t e > " ) , ( 0 , q . i b ) ( i . w y s i w y g . e l e m e n t , a ) , R e ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( p i ( i , s , a , f , f ) | | P r ( i , s , a , f , f ) ) r e t u r n ! 0 } r e t u r n ! 1 } , P s = f u n c t i o n ( i , a , s ) { v a r u = a . s t a r t C o n t a i n e r , d = ( 0 , y . l G ) ( u , " L I " ) ; i f ( d & & d . c l a s s L i s t . c o n t a i n s ( " v d i t o r - t a s k " ) ) { i f ( o e ( " ⇧ ⌘ J " , s ) ) { v a r f = d . f i r s t E l e m e n t C h i l d ; r e t u r n f . c h e c k e d ? f . r e m o v e A t t r i b u t e ( " c h e c k e d " ) : f . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( s . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( s ) & & ! s . s h i f t K e y & & ! s . a l t K e y & & a . t o S t r i n g ( ) = = = " " & & a . s t a r t O f f s e t = = = 1 & & ( u . n o d e T y p e = = = 3 & & u . p r e v i o u s S i b l i n g & & u . p r e v i o u s S i b l i n g . t a g N a m e = = = " I N P U T " | | u . n o d e T y p e ! = = 3 ) ) { v a r E = d . p r e v i o u s E l e m e n t S i b l i n g ; i f ( d . q u e r y S e l e c t o r ( " i n p u t " ) . r e m o v e ( ) , E ) { v a r L = ( 0 , y . D X ) ( E ) ; L . p a r e n t E l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , " < w b r > " + d . i n n e r H T M L . t r i m ( ) ) , d . r e m o v e ( ) } e l s e d . p a r e n t E l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e b e g i n " , ' < p d a t a - b l o c k = " 0 " > < w b r > ' . c o n c a t ( d . i n n e r H T M L . t r i m ( ) | | `
` ,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&po(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",K=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?K=!0:K?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,ve=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ue="";B&&(ue=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(ve,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B, ` < p data - block = "0" > < wbr >
< / p > < ` ) . c o n c a t ( f e , `
data - tight = "true" ` ).concat(ve,' data-block="0"').concat(ue,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend", ` < p data - block = "0" > < wbr >
< / p > ` ) , d . p a r e n t E l e m e n t . q u e r y S e l e c t o r A l l ( " l i " ) . l e n g t h = = = 1 ? d . p a r e n t E l e m e n t . r e m o v e ( ) : d . r e m o v e ( ) ; e l s e u . n o d e T y p e ! = = 3 & & a . s t a r t O f f s e t = = = 0 & & u . f i r s t C h i l d . t a g N a m e = = = " I N P U T " ? a . s e t S t a r t ( u . c h i l d N o d e s [ 1 ] , 1 ) : ( a . s e t E n d A f t e r ( d . l a s t C h i l d ) , d . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ' < l i c l a s s = " v d i t o r - t a s k " d a t a - m a r k e r = " ' . c o n c a t ( d . g e t A t t r i b u t e ( " d a t a - m a r k e r " ) , ' " > < i n p u t t y p e = " c h e c k b o x " > < w b r > < / l i > ' ) ) , d o c u m e n t . q u e r y S e l e c t o r ( " w b r " ) . a f t e r ( a . e x t r a c t C o n t e n t s ( ) ) ) ; r e t u r n ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , Z ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , z s = f u n c t i o n ( i , a , s , u ) { i f ( a . s t a r t C o n t a i n e r . n o d e T y p e ! = = 3 ) { v a r d = a . s t a r t C o n t a i n e r . c h i l d r e n [ a . s t a r t O f f s e t ] ; i f ( d & & d . t a g N a m e = = = " H R " ) r e t u r n a . s e l e c t N o d e C o n t e n t s ( d . p r e v i o u s E l e m e n t S i b l i n g ) , a . c o l l a p s e ( ! 1 ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( u ) { v a r f = u . p r e v i o u s E l e m e n t S i b l i n g ; i f ( f & & ( 0 , q . i m ) ( u , i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) . s t a r t = = = 0 & & ( ( 0 , m . v U ) ( ) & & f . t a g N a m e = = = " H R " | | f . t a g N a m e = = = " T A B L E " ) ) { i f ( f . t a g N a m e = = = " T A B L E " ) { v a r E = f . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d ; E . i n n e r H T M L = E . i n n e r H T M L . t r i m L e f t ( ) + " < w b r > " + u . t e x t C o n t e n t . t r i m ( ) , u . r e m o v e ( ) } e l s e f . r e m o v e ( ) ; r e t u r n ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , B s = f u n c t i o n ( i ) { ( 0 , m . v U ) ( ) & & i . s t a r t C o n t a i n e r . n o d e T y p e ! = = 3 & & i . s t a r t C o n t a i n e r . t a g N a m e = = = " H R " & & i . s e t S t a r t B e f o r e ( i . s t a r t C o n t a i n e r ) } , F s = f u n c t i o n ( i , a , s ) { v a r u , d ; i f ( ! ( 0 , m . v U ) ( ) ) r e t u r n ! 1 ; i f ( i . k e y = = = " A r r o w U p " & & a & & ( ( u = a . p r e v i o u s E l e m e n t S i b l i n g ) = = = n u l l | | u = = = v o i d 0 ? v o i d 0 : u . t a g N a m e ) = = = " T A B L E " ) { v a r f = a . p r e v i o u s E l e m e n t S i b l i n g ; r e t u r n s . s e l e c t N o d e C o n t e n t s ( f . r o w s [ f . r o w s . l e n g t h - 1 ] . l a s t E l e m e n t C h i l d ) , s . c o l l a p s e ( ! 1 ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } r e t u r n i . k e y = = = " A r r o w D o w n " & & a & & ( ( d = a . n e x t E l e m e n t S i b l i n g ) = = = n u l l | | d = = = v o i d 0 ? v o i d 0 : d . t a g N a m e ) = = = " T A B L E " ? ( s . s e l e c t N o d e C o n t e n t s ( a . n e x t E l e m e n t S i b l i n g . r o w s [ 0 ] . c e l l s [ 0 ] ) , s . c o l l a p s e ( ! 0 ) , i . p r e v e n t D e f a u l t ( ) , ! 0 ) : ! 1 } , t a = f u n c t i o n ( i , a , s ) { r e t u r n x s ( v o i d 0 , v o i d 0 , v o i d 0 , f u n c t i o n ( ) { v a r u , d , f , E , L , D , _ , B , K , f e , v e , u e , k e , d e , w e , d e , I e ; r e t u r n k s ( t h i s , f u n c t i o n ( T e ) { s w i t c h ( T e . l a b e l ) { c a s e 0 : r e t u r n i [ i . c u r r e n t M o d e ] . e l e m e n t . g e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " ) ! = = " t r u e " ? [ 2 ] : ( a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) , " c l i p b o a r d D a t a " i n a ? ( u = a . c l i p b o a r d D a t a . g e t D a t a ( " t e x t / h t m l " ) , d = a . c l i p b o a r d D a t a . g e t D a t a ( " t e x t / p l a i n " ) , f = a . c l i p b o a r d D a t a . f i l e s ) : ( u = a . d a t a T r a n s f e r . g e t D a t a ( " t e x t / h t m l " ) , d = a . d a t a T r a n s f e r . g e t D a t a ( " t e x t / p l a i n " ) , a . d a t a T r a n s f e r . t y p e s . i n c l u d e s ( " F i l e s " ) & & ( f = a . d a t a T r a n s f e r . i t e m s ) ) , E = { } , L = f u n c t i o n ( $ e , b t ) { i f ( ! b t ) r e t u r n [ " " , L u t e . W a l k C o n t i n u e ] ; i f ( i . o p t i o n s . u p l o a d . r e n d e r L i n k D e s t ) r e t u r n i . o p t i o n s . u p l o a d . r e n d e r L i n k D e s t ( i , $ e , b t ) ; v a r g t = $ e . T o k e n s S t r ( ) ; i f ( $ e . _ _ i n t e r n a l _ o b j e c t _ _ . P a r e n t . T y p e = = = 3 4 & & g t & & g t . i n d e x O f ( " f i l e : / / " ) = = = - 1 & & i . o p t i o n s . u p l o a d . l i n k T o I m g U r l ) { v a r k t = n e w X M L H t t p R e q u e s t ; k t . o p e n ( " P O S T " , i . o p t i o n s . u p l o a d . l i n k T o I m g U r l ) , i . o p t i o n s . u p l o a d . t o k e n & & k t . s e t R e q u e s t H e a d e r ( " X - U p l o a d - T o k e n " , i . o p t i o n s . u p l o a d . t o k e n ) , i . o p t i o n s . u p l o a d . w i t h C r e d e n t i a l s & & ( k t . w i t h C r e d e n t i a l s = ! 0 ) , $ n ( i , k t ) , k t . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " , " a p p l i c a t i o n / j s o n ; c h a r s e t = u t f - 8 " ) , k t . o n r e a d y s t a t e c h a n g e = f u n c t i o n ( ) { i f ( k t . r e a d y S t a t e = = = X M L H t t p R e q u e s t . D O N E ) { i f ( k t . s t a t u s = = = 2 0 0 ) { v a r d n = k t . r e s p o n s e T e x t ; i . o p t i o n s . u p l o a d . l i n k T o I m g F o r m a t & & ( d n = i . o p t i o n s . u p l o a d . l i n k T o I m g F o r m a t ( k t . r e s p o n s e T e x t ) ) ; v a r W t = J S O N . p a r s e ( d n ) ; i f ( W t . c o d e ! = = 0 ) { i . t i p . s h o w ( W t . m s g ) ; r e t u r n } v a r h n = W t . d a t a . o r i g i n a l U R L ; i f ( i . c u r r e n t M o d e = = = " s v " ) i . s v . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - s v _ _ m a r k e r - - l i n k " ) . f o r E a c h ( f u n c t i o n ( z t ) { z t . t e x t C o n t e n t = = = h n & & ( z t . t e x t C o n t e n t = W t . d a t a . u r l ) } ) ; e l s e { v a r i t = i [ i . c u r r e n t M o d e ] . e l e m e n t . q u e r y S e l e c t o r ( ' i m g [ s r c = " ' . c o n c a t ( h n , ' " ] ' ) ) ; i t . s r c = W t . d a t a . u r l , i . c u r r e n t M o d e = = = " i r " & & ( i t . p r e v i o u s E l e m e n t S i b l i n g . p r e v i o u s E l e m e n t S i b l i n g . i n n e r H T M L = W t . d a t a . u r l ) } l t ( i ) } e l s e i . t i p . s h o w ( k t . r e s p o n s e T e x t ) ; i . o p t i o n s . u p l o a d . l i n k T o I m g C a l l b a c k & & i . o p t i o n s . u p l o a d . l i n k T o I m g C a l l b a c k ( k t . r e s p o n s e T e x t ) } } , k t . s e n d ( J S O N . s t r i n g i f y ( { u r l : g t } ) ) } r e t u r n i . c u r r e n t M o d e = = = " i r " ? [ ' < s p a n c l a s s = " v d i t o r - i r _ _ m a r k e r v d i t o r - i r _ _ m a r k e r - - l i n k " > ' . c o n c a t ( L u t e . E s c a p e H T M L S t r ( g t ) , " < / s p a n > " ) , L u t e . W a l k C o n t i n u e ] : i . c u r r e n t M o d e = = = " w y s i w y g " ? [ " " , L u t e . W a l k C o n t i n u e ] : [ ' < s p a n c l a s s = " v d i t o r - s v _ _ m a r k e r - - l i n k " > ' . c o n c a t ( L u t e . E s c a p e H T M L S t r ( g t ) , " < / s p a n > " ) , L u t e . W a l k C o n t i n u e ] } , ( u . r e p l a c e ( / & a m p ; / g , " & " ) . r e p l a c e ( / < ( | \ / ) ( h t m l | b o d y | m e t a ) [ ^ > ] * ? > / i g , " " ) . t r i m ( ) = = = ' < a h r e f = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( d ,
` ): $ e+=".concat(ue.result.toString(), ` )
` ),document.execCommand("insertHTML",!1, $ e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(de=(0,q.zh)(i),de.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(de.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(we=(0,y.F9)((0,q.zh)(i).startContainer),we&&(de=(0,q.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function( $ e){ $ e.remove()}),de.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?we.outerHTML=i.lute.SpinVditorDOM(we.outerHTML):we.outerHTML=i.lute.SpinVditorIRDOM(we.outerHTML),(0,q.ib)(i[i.currentMode].element,de)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function( $ e){tt( $ e,i)})),i.wysiwyg.triggerRemoveComment(i),lt(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Z(i),[2]}})})},gu=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,ke,fe,ve,ue,ke,we,de;return ks(this,function(Ie){switch(Ie.label){case 0:if(!s)return[2];if(u=/{ \\ pict[ \s \S ]+? \\ bliptag-? \d +( \\ blipupi-? \d +)?({ \\ \* \\ blipuid \s ?[ \d a-fA-F]+)?[ \s }]*?/,d=new RegExp("(?:("+u.source+"))([ \\ da-fA-F \\ s]+) \\ }","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes(" \\ pngblip")?B="image/png":_.includes(" \\ jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^ \d a-fA-F]/g,""),type:B});for(K=[],vo(a,function(Te){if(Te.tagName==="V:SHAPE")return vo(Te,function( $ e){ $ e.tagName==="V:IMAGEDATA"&&K.push({shape:Te,img: $ e})}),!1}),ke=0;ke<K.length;ke++)fe=document.createElement("img"),ve="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/ \w {2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=ve,fe.title=K[ke].img.getAttribute("title"),K[ke].shape.parentNode.replaceChild(fe,K[ke].shape);ue=a.querySelectorAll("img"),ke=0,Ie.label=1;case 1:return ke<ue.length?(we=ue[ke].src||"",we?(de=ue[ke],[4,i.options.upload.base64ToLink(we)]):[3,3]):[3,4];case 2:de.src=Ie.sent(),Ie.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},vo=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)vo(i.children[u],a)},qs,js=function(i){var a,s;i.hint.render(i);var u=(0,q.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,q.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,q.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Xn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},fi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!
< / p > ` ; K . i n n e r H T M L . t r i m ( ) = = = " " ? K . o u t e r H T M L = f e : K . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , f e ) } } e l s e i f ( f = = = " q u o t e " ) K & & ( d . i n s e r t N o d e ( d o c u m e n t . c r e a t e E l e m e n t ( " w b r " ) ) , K . o u t e r H T M L = ' < b l o c k q u o t e d a t a - b l o c k = " 0 " > ' . c o n c a t ( K . o u t e r H T M L , " < / b l o c k q u o t e > " ) , L = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) ) ; e l s e i f ( f = = = " l i n k " ) { v a r v e = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? v e = " " . c o n c a t ( s , " < w b r > " ) . c o n c a t ( u ) : v e = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( u . r e p l a c e ( " ) " , " < w b r > ) " ) ) , d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , v e ) , L = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) } e l s e i f ( f = = = " i t a l i c " | | f = = = " b o l d " | | f = = = " s t r i k e " | | f = = = " i n l i n e - c o d e " | | f = = = " c o d e " | | f = = = " t a b l e " ) { v a r v e = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? v e = " " . c o n c a t ( s , " < w b r > " ) . c o n c a t ( u ) : ( f = = = " c o d e " ? v e = " " . c o n c a t ( s , `
` ).concat(d.toString(),"<wbr>").concat(u):f==="table"?ve="".concat(s).concat(d.toString(),"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(ve= `
` +ve+ `
` );var ue=document.createElement("span");ue.innerHTML=ve,d.insertNode(ue),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,q.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,q.ib)(i.ir.element,d),Xn(i),L&&qe(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Xn(d),L.parentElement.querySelectorAll("code").forEach(function(K){K.className="language-"+f.trimRight()}),tt(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,q.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,q.oC)(d.lute.SpinVditorDOM(f),d):(0,q.oC)(d.lute.SpinVditorIRDOM(f),d):(0,q.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,q.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,tt(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,tt(B.nextElementSibling,d))}lt(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.
` ).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(ve,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(K){K.addEventListener("click",function(fe){d.fillEmoji(K,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder, ` "
contenteditable = "true" spellcheck = "false" > < / p r e > ` ) , t h i s . e l e m e n t = s . f i r s t E l e m e n t C h i l d , t h i s . b i n d E v e n t ( a ) , A i ( a , t h i s . e l e m e n t ) , h o ( a , t h i s . e l e m e n t ) , M i ( a , t h i s . e l e m e n t ) , x e ( a , t h i s . e l e m e n t ) , H e ( a , t h i s . e l e m e n t ) , C i ( a , t h i s . e l e m e n t ) , U ( a , t h i s . e l e m e n t , t h i s . c o p y ) , Q ( a , t h i s . e l e m e n t , t h i s . c o p y ) } r e t u r n i . p r o t o t y p e . c o p y = f u n c t i o n ( a , s ) { v a r u = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; i f ( u . t o S t r i n g ( ) ! = = " " ) { a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) ; v a r d = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; d . a p p e n d C h i l d ( u . c l o n e C o n t e n t s ( ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , s . l u t e . V d i t o r I R D O M 2 M d ( d . i n n e r H T M L ) . t r i m ( ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) } } , i . p r o t o t y p e . b i n d E v e n t = f u n c t i o n ( a ) { v a r s = t h i s ; t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " p a s t e " , f u n c t i o n ( u ) { t a ( a , u , { p a s t e C o d e : f u n c t i o n ( d ) { d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , d ) } } ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " s c r o l l " , f u n c t i o n ( ) { A ( a , [ " h i n t " ] ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c o m p o s i t i o n s t a r t " , f u n c t i o n ( u ) { s . c o m p o s i n g L o c k = ! 0 } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c o m p o s i t i o n e n d " , f u n c t i o n ( u ) { ( 0 , m . v U ) ( ) | | N t ( a , g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e R a n g e ( ) ) , s . c o m p o s i n g L o c k = ! 1 } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " i n p u t " , f u n c t i o n ( u ) { i f ( ! ( u . i n p u t T y p e = = = " d e l e t e B y D r a g " | | u . i n p u t T y p e = = = " i n s e r t F r o m D r o p " ) ) { i f ( s . p r e v e n t I n p u t ) { s . p r e v e n t I n p u t = ! 1 , X n ( a , { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 0 , e n a b l e I n p u t : ! 0 } ) ; r e t u r n } s . c o m p o s i n g L o c k | | u . d a t a = = = " ‘ " | | u . d a t a = = = " “ " | | u . d a t a = = = " 《 " | | N t ( a , g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e R a n g e ( ) , ! 1 , u ) } } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( u ) { i f ( u . t a r g e t . t a g N a m e = = = " I N P U T " ) { u . t a r g e t . c h e c k e d ? u . t a r g e t . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " ) : u . t a r g e t . r e m o v e A t t r i b u t e ( " c h e c k e d " ) , s . p r e v e n t I n p u t = ! 0 , X n ( a ) ; r e t u r n } v a r d = ( 0 , q . z h ) ( a ) , f = ( 0 , y . f b ) ( u . t a r g e t , " v d i t o r - i r _ _ p r e v i e w " ) ; i f ( f | | ( f = ( 0 , y . f b ) ( d . s t a r t C o n t a i n e r , " v d i t o r - i r _ _ p r e v i e w " ) ) , f & & ( f . p r e v i o u s E l e m e n t S i b l i n g . f i r s t E l e m e n t C h i l d ? d . s e l e c t N o d e C o n t e n t s ( f . p r e v i o u s E l e m e n t S i b l i n g . f i r s t E l e m e n t C h i l d ) : d . s e l e c t N o d e C o n t e n t s ( f . p r e v i o u s E l e m e n t S i b l i n g ) , d . c o l l a p s e ( ! 0 ) , ( 0 , q . H c ) ( d ) , Z ( a ) ) , u . t a r g e t . t a g N a m e = = = " I M G " ) { v a r E = u . t a r g e t . p a r e n t E l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i r _ _ m a r k e r - - l i n k " ) ; E & & ( d . s e l e c t N o d e ( E ) , ( 0 , q . H c ) ( d ) ) } v a r L = ( 0 , y . a 1 ) ( u . t a r g e t , " d a t a - t y p e " , " a " ) ; i f ( L & & ! L . c l a s s L i s t . c o n t a i n s ( " v d i t o r - i r _ _ n o d e - - e x p a n d " ) ) { a . o p t i o n s . l i n k . c l i c k ? a . o p t i o n s . l i n k . c l i c k ( L . q u e r y S e l e c t o r ( " : s c o p e > . v d i t o r - i r _ _ m a r k e r - - l i n k " ) ) : a . o p t i o n s . l i n k . i s O p e n & & w i n d o w . o p e n ( L . q u e r y S e l e c t o r ( " : s c o p e > . v d i t o r - i r _ _ m a r k e r - - l i n k " ) . t e x t C o n t e n t ) ; r e t u r n } i f ( u . t a r g e t . i s E q u a l N o d e ( s . e l e m e n t ) & & s . e l e m e n t . l a s t E l e m e n t C h i l d & & d . c o l l a p s e d ) { v a r D = s . e l e m e n t . l a s t E l e m e n t C h i l d . g e t B o u n d i n g C l i e n t R e c t ( ) ; u . y > D . t o p + D . h e i g h t & & ( s . e l e m e n t . l a s t E l e m e n t C h i l d . t a g N a m e = = = " P " & & s . e l e m e n t . l a s t E l e m e n t C h i l d . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " ? ( d . s e l e c t N o d e C o n t e n t s ( s . e l e m e n t . l a s t E l e m e n t C h i l d ) , d . c o l l a p s e ( ! 1 ) ) : ( s . e l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , ' < p d a t a - b l o c k = " 0 " > ' . c o n c a t ( c . g . Z W S P , " < w b r > < / p > " ) ) , ( 0 , q . i b ) ( s . e l e m e n t , d ) ) ) } d . t o S t r i n g ( ) = = = " " ? e e ( d , a ) : s e t T i m e o u t ( f u n c t i o n ( ) { e e ( ( 0 , q . z h ) ( a ) , a ) } ) , R t ( u , a ) , q e ( a ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " k e y u p " , f u n c t i o n ( u ) { i f ( ! ( u . i s C o m p o s i n g | | ( 0 , m . y l ) ( u ) ) ) { i f ( u . k e y = = = " E n t e r " & & Z ( a ) , q e ( a ) , ( u . k e y = = = " B a c k s p a c e " | | u . k e y = = = " D e l e t e " ) & & a . i r . e l e m e n t . i n n e r H T M L ! = = " " & & a . i r . e l e m e n t . c h i l d N o d e s . l e n g t h = = = 1 & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d . t a g N a m e = = = " P " & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d . c h i l d E l e m e n t C o u n t = = = 0 & & ( a . i r . e l e m e n t . t e x t C o n t e n t = = = " " | | a . i r . e l e m e n t . t e x t C o n t e n t = = = `
` )){a.ir.element.innerHTML="";return}var d=(0,q.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent=== `
` &&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&js(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(), $ s=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Us=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a, ` < / d i v >
< div class = "vditor-outline__content" > < / d i v > ` ) } r e t u r n i . p r o t o t y p e . r e n d e r = f u n c t i o n ( a ) { v a r s = " " ; r e t u r n a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = = = " b l o c k " ? s = ( 0 , U s . k ) ( a . p r e v i e w . p r e v i e w E l e m e n t , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d , a ) : s = ( 0 , U s . k ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d , a ) , s } , i . p r o t o t y p e . t o g g l e = f u n c t i o n ( a , s , u ) { v a r d ; s = = = v o i d 0 & & ( s = ! 0 ) , u = = = v o i d 0 & & ( u = ! 0 ) ; v a r f = ( d = a . t o o l b a r . e l e m e n t s . o u t l i n e ) = = = n u l l | | d = = = v o i d 0 ? v o i d 0 : d . f i r s t E l e m e n t C h i l d ; i f ( s & & w i n d o w . i n n e r W i d t h > = c . g . M O B I L E _ W I D T H ? ( t h i s . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , t h i s . r e n d e r ( a ) , f = = n u l l | | f . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) ) : ( t h i s . e l e m e n t . s t y l e . d i s p l a y = " n o n e " , f = = n u l l | | f . c l a s s L i s t . r e m o v e ( " v d i t o r - m e n u - - c u r r e n t " ) ) , u & & g e t S e l e c t i o n ( ) . r a n g e C o u n t > 0 ) { v a r E = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; a [ a . c u r r e n t M o d e ] . e l e m e n t . c o n t a i n s ( E . s t a r t C o n t a i n e r ) & & ( 0 , q . H c ) ( E ) } z e ( a ) } , i } ( ) , E u = o ( 2 8 0 ) , T u = f u n c t i o n ( ) { f u n c t i o n i ( a ) { v a r s = t h i s ; t h i s . e l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - p r e v i e w " , t h i s . p r e v i e w E l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . p r e v i e w E l e m e n t . c l a s s N a m e = " v d i t o r - r e s e t " , a . o p t i o n s . c l a s s e s . p r e v i e w & & t h i s . p r e v i e w E l e m e n t . c l a s s L i s t . a d d ( a . o p t i o n s . c l a s s e s . p r e v i e w ) , t h i s . p r e v i e w E l e m e n t . s t y l e . m a x W i d t h = a . o p t i o n s . p r e v i e w . m a x W i d t h + " p x " , t h i s . p r e v i e w E l e m e n t . a d d E v e n t L i s t e n e r ( " c o p y " , f u n c t i o n ( D ) { i f ( D . t a r g e t . t a g N a m e ! = = " T E X T A R E A " ) { v a r _ = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; _ . c l a s s N a m e = " v d i t o r - r e s e t " , _ . a p p e n d C h i l d ( g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e C o n t e n t s ( ) ) , s . c o p y T o X ( a , _ , " d e f a u l t " ) , D . p r e v e n t D e f a u l t ( ) } } ) , t h i s . p r e v i e w E l e m e n t . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( D ) { v a r _ = ( 0 , y . l G ) ( D . t a r g e t , " S P A N " ) ; i f ( _ & & ( 0 , y . f b ) ( _ , " v d i t o r - t o c " ) ) { v a r B = s . p r e v i e w E l e m e n t . q u e r y S e l e c t o r ( " # " + _ . g e t A t t r i b u t e ( " d a t a - t a r g e t - i d " ) ) ; B & & ( s . e l e m e n t . s c r o l l T o p = B . o f f s e t T o p ) ; r e t u r n } i f ( D . t a r g e t . t a g N a m e = = = " A " ) { a . o p t i o n s . l i n k . c l i c k ? a . o p t i o n s . l i n k . c l i c k ( D . t a r g e t ) : a . o p t i o n s . l i n k . i s O p e n & & w i n d o w . o p e n ( D . t a r g e t . g e t A t t r i b u t e ( " h r e f " ) ) , D . p r e v e n t D e f a u l t ( ) ; r e t u r n } D . t a r g e t . t a g N a m e = = = " I M G " & & ( a . o p t i o n s . i m a g e . p r e v i e w ? a . o p t i o n s . i m a g e . p r e v i e w ( D . t a r g e t ) : a . o p t i o n s . i m a g e . i s P r e v i e w & & ( 0 , s e . E ) ( D . t a r g e t , a . o p t i o n s . l a n g , a . o p t i o n s . t h e m e ) ) } ) , t h i s . e l e m e n t . a p p e n d C h i l d ( t h i s . p r e v i e w E l e m e n t ) ; v a r u = a . o p t i o n s . p r e v i e w . a c t i o n s ; i f ( u . l e n g t h ! = = 0 ) { v a r d = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; d . c l a s s N a m e = " v d i t o r - p r e v i e w _ _ a c t i o n " ; f o r ( v a r f = [ ] , E = 0 ; E < u . l e n g t h ; E + + ) { v a r L = u [ E ] ; i f ( t y p e o f L = = " o b j e c t " ) { f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " ' . c o n c a t ( L . k e y , ' " c l a s s = " ' ) . c o n c a t ( L . c l a s s N a m e , ' " ' ) . c o n c a t ( L . t o o l t i p ? ' a r i a - l a b e l = " ' . c o n c a t ( L . t o o l t i p , ' " ' ) : " " , ' " > ' ) . c o n c a t ( L . t e x t , " < / b u t t o n > " ) ) ; c o n t i n u e } s w i t c h ( L ) { c a s e " d e s k t o p " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " c l a s s = " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " d a t a - t y p e = " d e s k t o p " > D e s k t o p < / b u t t o n > ' ) ; b r e a k ; c a s e " t a b l e t " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " t a b l e t " > T a b l e t < / b u t t o n > ' ) ; b r e a k ; c a s e " m o b i l e " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " m o b i l e " > M o b i l e / W e c h a t < / b u t t o n > ' ) ; b r e a k ; c a s e " m p - w e c h a t " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " m p - w e c h a t " c l a s s = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ w " a r i a - l a b e l = " 复 制 到 公 众 号 " > < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - m p - w e c h a t " > < / u s e > < / s v g > < / b u t t o n > ' ) ; b r e a k ; c a s e " z h i h u " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " z h i h u " c l a s s = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ w " a r i a - l a b e l = " 复 制 到 知 乎 " > < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - z h i h u " > < / u s e > < / s v g > < / b u t t o n > ' ) ; b r e a k } } d . i n n e r H T M L = f . j o i n ( " " ) , d . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( D ) { v a r _ = ( 0 , N . S ) ( D . t a r g e t , " B U T T O N " ) ; i f ( _ ) { v a r B = _ . g e t A t t r i b u t e ( " d a t a - t y p e " ) , K = u . f i n d ( f u n c t i o n ( f e ) { r e t u r n ( f e = = n u l l ? v o i d 0 : f e . k e y ) = = = B } ) ; i f ( K ) { K . c l i c k ( B ) ; r e t u r n } i f ( B = = = " m p - w e c h a t " | | B = = = " z h i h u " ) { s . c o p y T o X ( a , s . p r e v i e w E l e m e n t . c l o n e N o d e ( ! 0 ) , B ) ; r e t u r n } B = = = " d e s k t o p " ? s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " a u t o " : B = = = " t a b l e t " ? s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " 7 8 0 p x " : s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " 3 6 0 p x " , s . p r e v i e w E l e m e n t . s c r o l l W i d t h > s . p r e v i e w E l e m e n t . p a r e n t E l e m e n t . c l i e n t W i d t h & & ( s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " a u t o " ) , s . r e n d e r ( a ) , d . q u e r y S e l e c t o r A l l ( " b u t t o n " ) . f o r E a c h ( f u n c t i o n ( f e ) { f e . c l a s s L i s t . r e m o v e ( " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " ) } ) , _ . c l a s s L i s t . a d d ( " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " ) } } ) , t h i s . e l e m e n t . i n s e r t B e f o r e ( d , t h i s . p r e v i e w E l e m e n t ) } } r e t u r n i . p r o t o t y p e . r e n d e r = f u n c t i o n ( a , s ) { v a r u = t h i s ; i f ( c l e a r T i m e o u t ( t h i s . m d T i m e o u t I d ) , t h i s . e l e m e n t . s t
` )){a.sv.element.innerHTML="";return}u.key==="Enter"&&Z(a)}})},i}(),Vs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a, `
< div class = "vditor-tip__close" > X < / d i v > < / d i v > ` ) , t h i s . e l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - t i p _ _ c l o s e " ) . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( ) { u . h i d e ( ) } ) ) : ( t h i s . e l e m e n t . i n n e r H T M L = ' < d i v c l a s s = " v d i t o r - t i p _ _ c o n t e n t " > ' . c o n c a t ( a , " < / d i v > " ) , s e t T i m e o u t ( f u n c t i o n ( ) { u . h i d e ( ) } , s ) ) , t h i s . e l e m e n t . r e m o v e A t t r i b u t e ( " s t y l e " ) , s e t T i m e o u t ( f u n c t i o n ( ) { v a r d = u . e l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) ; d . t o p < 4 6 & & ( u . e l e m e n t . s t y l e . p o s i t i o n = " f i x e d " , u . e l e m e n t . s t y l e . t o p = " 4 6 p x " ) } , 1 5 0 ) } , i . p r o t o t y p e . h i d e = f u n c t i o n ( ) { t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - m e s s a g e E l e m e n t t i p " , t h i s . e l e m e n t . i n n e r H T M L = " " } , i } ( ) , b o = f u n c t i o n ( i , a ) { i f ( a . o p t i o n s . p r e v i e w . m o d e ! = = i ) { s w i t c h ( a . o p t i o n s . p r e v i e w . m o d e = i , i ) { c a s e " b o t h " : a . s v . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . r e n d e r ( a ) , w ( a . t o o l b a r . e l e m e n t s , [ " b o t h " ] ) ; b r e a k ; c a s e " e d i t o r " : a . s v . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = " n o n e " , x ( a . t o o l b a r . e l e m e n t s , [ " b o t h " ] ) ; b r e a k } a . d e v t o o l s & & a . d e v t o o l s . r e n d e r E c h a r t ( a ) } } , C u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , L u = f u n c t i o n ( i ) { C u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n s . o p t i o n s . p r e v i e w . m o d e = = = " b o t h " & & d . e l e m e n t . c h i l d r e n [ 0 ] . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) , d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { v a r E = d . e l e m e n t . f i r s t E l e m e n t C h i l d ; E . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | ( f . p r e v e n t D e f a u l t ( ) , s . c u r r e n t M o d e = = = " s v " & & ( s . o p t i o n s . p r e v i e w . m o d e = = = " b o t h " ? b o ( " e d i t o r " , s ) : b o ( " b o t h " , s ) ) ) } ) , d } r e t u r n a } ( M t ) , _ u = f u n c t i o n ( ) { f u n c t i o n i ( ) { t h i s . e l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - t o o l b a r _ _ b r " } r e t u r n i } ( ) , W s = o ( 5 8 0 ) , N u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , D u = f u n c t i o n ( i ) { N u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) ; v a r L = " " ; r e t u r n c . g . C O D E _ T H E M E . f o r E a c h ( f u n c t i o n ( D ) { L + = " < b u t t o n > " . c o n c a t ( D , " < / b u t t o n > " ) } ) , E . i n n e r H T M L = ' < d i v s t y l e = " o v e r f l o w : a u t o ; m a x - h e i g h t : ' . c o n c a t ( w i n d o w . i n n e r H e i g h t / 2 , ' p x " > ' ) . c o n c a t ( L , " < / d i v > " ) , E . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( D ) { D . t a r g e t . t a g N a m e = = = " B U T T O N " & & ( A ( s , [ " s u b T o o l b a r " ] ) , s . o p t i o n s . p r e v i e w . h l j s . s t y l e = D . t a r g e t . t e x t C o n t e n t , ( 0 , W s . Y ) ( D . t a r g e t . t e x t C o n t e n t , s . o p t i o n s . c d n ) , D . p r e v e n t D e f a u l t ( ) , D . s t o p P r o p a g a t i o n ( ) ) } ) , d . e l e m e n t . a p p e n d C h i l d ( E ) , M ( s , E , f , u . l e v e l ) , d } r e t u r n a } ( M t ) , R u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , I u = f u n c t i o n ( i ) { R u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) ; v a r L = " " ; r e t u r n O b j e c t . k e y s ( s . o p t i o n s . p r e v i e w . t h e m e . l i s t ) . f o r E a c h ( f u n c t i o n ( D ) { L + = ' < b u t t o n d a t a - t y p e = " ' . c o n c a t ( D , ' " > ' ) . c o n c a t ( s . o p t i o n s . p r e v i e w . t h e m e . l i s t [ D ] , " < / b u t t o n > " ) } ) , E . i n n e r H T M L = ' < d i v s t y l e = " o v e r f l o w : a u t o ; m a x - h e i g h t : ' . c o n c a t ( w i n d o w . i n n e r H e i g h t / 2 , ' p x " > ' ) . c o n c a t ( L , " < / d i v > " ) , E . a d d
` )?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L, ` : " > < img
data - value = ":`).concat(L,': " data - key = ":').concat(L,':" class = "vditor-emojis__icon" src = "').concat(D,'" / > < / b u t t o n > ' ) : E + = ' < b u t t o n d a t a - v a l u e = " ' . c o n c a t ( D , ` "
data - key = "`).concat(L,'" > < span class = "vditor-emojis__icon" > ').concat(D,"</span></button>")}),f.innerHTML=' < div class = "vditor-emojis" style = "max-height: '.concat(s.options.height===" auto "?" auto ":s.options.height-80,'px" > ' ) . concat ( E , ` </div><div class="vditor-emojis__tail">
< span class = "vditor-emojis__tip" > < / s p a n > < s p a n > ` ) . c o n c a t ( s . o p t i o n s . h i n t . e m o j i T a i l | | " " , ` < / s p a n >
< / d i v > ` ) , d . e l e m e n t . a p p e n d C h i l d ( f ) , M ( s , f , d . e l e m e n t . f i r s t E l e m e n t C h i l d , u . l e v e l ) , d . b i n d E v e n t ( s ) , d } r e t u r n a . p r o t o t y p e . b i n d E v e n t = f u n c t i o n ( s ) { v a r u = t h i s ; t h i s . e l e m e n t . l a s t E l e m e n t C h i l d . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { v a r f = ( 0 , N . S ) ( d . t a r g e t , " B U T T O N " ) ; i f ( f ) { d . p r e v e n t D e f a u l t ( ) ; v a r E = f . g e t A t t r i b u t e ( " d a t a - v a l u e " ) , L = ( 0 , q . z h ) ( s ) , D = E ; i f ( s . c u r r e n t M o d e = = = " w y s i w y g " ? D = s . l u t e . S p i n V d i t o r D O M ( E ) : s . c u r r e n t M o d e = = = " i r " & & ( D = s . l u t e . S p i n V d i t o r I R D O M ( E ) ) , E . i n d e x O f ( " : " ) > - 1 & & s . c u r r e n t M o d e ! = = " s v " ) { v a r _ = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; _ . i n n e r H T M L = D , D = _ . f i r s t E l e m e n t C h i l d . f i r s t E l e m e n t C h i l d . o u t e r H T M L + " " , ( 0 , q . o C ) ( D , s ) } e l s e L . e x t r a c t C o n t e n t s ( ) , L . i n s e r t N o d e ( d o c u m e n t . c r e a t e T e x t N o d e ( E ) ) , ( 0 , y . F 9 ) ( L . s t a r t C o n t a i n e r ) | | P n ( s , L ) ; L . c o l l a p s e ( ! 1 ) , ( 0 , q . H c ) ( L ) , u . e l e m e n t . l a s t E l e m e n t C h i l d . s t y l e . d i s p l a y = " n o n e " , l t ( s ) } } ) , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d . a d d E v e n t L i s t e n e r ( " m o u s e o v e r " , f u n c t i o n ( d ) { v a r f = ( 0 , N . S ) ( d . t a r g e t , " B U T T O N " ) ; f & & ( u . e l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - e m o j i s _ _ t i p " ) . i n n e r H T M L = f . g e t A t t r i b u t e ( " d a t a - k e y " ) ) } ) } , a } ( M t ) , G s = f u n c t i o n ( i , a , s ) { v a r u = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; " d o w n l o a d " i n u ? ( u . d o w n l o a d = s , u . s t y l e . d i s p l a y = " n o n e " , u . h r e f = U R L . c r e a t e O b j e c t U R L ( n e w B l o b ( [ a ] ) ) , d o c u m e n t . b o d y . a p p e n d C h i l d ( u ) , u . c l i c k ( ) , u . r e m o v e ( ) ) : i . t i p . s h o w ( w i n d o w . V d i t o r I 1 8 n . d o w n l o a d T i p , 0 ) } , $ u = f u n c t i o n ( i ) { v a r a = v ( i ) ; G s ( i , a , a . s u b s t r ( 0 , 1 0 ) + " . m d " ) } , U u = f u n c t i o n ( i ) { i . t i p . s h o w ( w i n d o w . V d i t o r I 1 8 n . g e n e r a t e , 3 8 0 0 ) ; v a r a = d o c u m e n t . q u e r y S e l e c t o r ( " # v d i t o r E x p o r t I f r a m e " ) ; a . c o n t e n t D o c u m e n t . o p e n ( ) , a . c o n t e n t D o c u m e n t . w r i t e ( ' < l i n k r e l = " s t y l e s h e e t " h r e f = " ' . c o n c a t ( i . o p t i o n s . c d n , ` / d i s t / i n d e x . c s s " / >
< script src = "`).concat(i.options.cdn,`/dist/method.min.js" > < \ / script >
< div id = "preview" style = "width: 800px" > < / d i v >
< script >
window . addEventListener ( "message" , ( e ) => {
if ( ! e . data ) {
return ;
}
Vditor . preview ( document . getElementById ( 'preview' ) , e . data , {
cdn : "`).concat(i.options.cdn,`" ,
markdown : {
theme : ` ).concat(JSON.stringify(i.options.preview.theme), `
} ,
hljs : {
style : "`).concat(i.options.preview.hljs.style,`"
}
} ) ;
setTimeout ( ( ) => {
window . print ( ) ;
} , 3600 ) ;
} , false ) ;
< \ / script > ` )),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a= $ s(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn, ` / dist / index . css " / >
< script src = "`).concat(i.options.cdn," / dist / js / i18n / ").concat(i.options.lang,`.js" > < \ / script >
< script src = "`).concat(i.options.cdn,`/dist/method.min.js" > < \ / script > < / h e a d >
< body > < div class = "vditor-reset" id = "preview" > ` ).concat(a, ` < / d i v >
< script >
const previewElement = document . getElementById ( 'preview' )
Vditor . setContentTheme ( '`).concat(i.options.preview.theme.current,"' , '").concat(i.options.preview.theme.path,`' ) ;
Vditor . codeRender ( previewElement ) ;
Vditor . highlightRender ( ` ).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn, ` ' ) ;
Vditor . mathRender ( previewElement , {
cdn : '`).concat(i.options.cdn,`' ,
math : ` ).concat(JSON.stringify(i.options.preview.math), ` ,
} ) ;
Vditor . mermaidRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . SMILESRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . markmapRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . flowchartRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . graphvizRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . chartRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . mindmapRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . abcRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
` ).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"", `
Vditor . speechRender ( previewElement ) ;
< \ / script >
< script src = "`).concat(i.options.cdn," / dist / js / icons / ").concat(i.options.icon,'.js" > < \ / script > < / b o d y > < / h t m l > ' ) ; G s ( i , s , a . s u b s t r ( 0 , 1 0 ) + " . h t m l " ) } , W u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , G u = f u n c t i o n ( i ) { W u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) , E . i n n e r H T M L = ` < b u t t o n d a t a - t y p e = " m a r k d o w n " > M a r k d o w n < / b u t t o n >
< button data - type = "pdf" > PDF < / b u t t o n >
< button data - type = "html" > HTML < / b u t t o n > ` , E . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( L ) { v a r D = L . t a r g e t ; i f ( D . t a g N a m e = = = " B U T T O N " ) { s w i t c h ( D . g e t A t t r i b u t e ( " d a t a - t y p e " ) ) { c a s e " m a r k d o w n " : $ u ( s ) ; b r e a k ; c a s e " p d f " : U u ( s ) ; b r e a k ; c a s e " h t m l " : V u ( s ) ; b r e a k } A ( s , [ " s u b T o o l b a r " ] ) , L . p r e v e n t D e f a u l t ( ) , L . s t o p P r o p a g a t i o n ( ) } } ) , d . e l e m e n t . a p p e n d C h i l d ( E ) , M ( s , E , f , u . l e v e l ) , d } r e t u r n a } ( M t ) , K u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , X u = f u n c t i o n ( i ) { K u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . _ b i n d E v e n t ( s , u ) , d } r e t u r n a . p r o t o t y p e . _ b i n d E v e n t = f u n c t i o n ( s , u ) { t h i s . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { d . p r e v e n t D e f a u l t ( ) , s . e l e m e n t . c l a s s N a m e . i n c l u d e s ( " v d i t o r - - f u l l s c r e e n " ) ? ( u . l e v e l | | ( t h i s . i n n e r H T M L = u . i c o n ) , s . e l e m e n t . s t y l e . z I n d e x = " " , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " " , s . e l e m e n t . c l a s s L i s t . r e m o v e ( " v d i t o r - - f u l l s c r e e n " ) , O b j e c t . k e y s ( s . t o o l b a r . e l e m e n t s ) . f o r E a c h ( f u n c t i o n ( f ) { v a r E = s . t o o l b a r . e l e m e n t s [ f ] . f i r s t C h i l d ; E & & ( E . c l a s s N a m e = E . c l a s s N a m e . r e p l a c e ( " _ _ s " , " _ _ n " ) , s . o p t i o n s . t o o l b a r . f o r E a c h ( f u n c t i o n ( L ) { t y p e o f L ! = " s t r i n g " & & L . t i p P o s i t i o n & & L . n a m e = = = E . d a t a s e t . t y p e & & ( E . c l a s s N a m e = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ " . c o n c a t ( L . t i p P o s i t i o n ) ) } ) ) } ) , s . c o u n t e r & & ( s . c o u n t e r . e l e m e n t . c l a s s N a m e = s . c o u n t e r . e l e m e n t . c l a s s N a m e . r e p l a c e ( " _ _ s " , " _ _ n " ) ) ) : ( u . l e v e l | | ( t h i s . i n n e r H T M L = ' < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - c o n t r a c t " > < / u s e > < / s v g > ' ) , s . e l e m e n t . s t y l e . z I n d e x = s . o p t i o n s . f u l l s c r e e n . i n d e x . t o S t r i n g ( ) , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " h i d d e n " , s . e l e m e n t . c l a s s L i s t . a d d ( " v d i t o r - - f u l l s c r e e n " ) , O b j e c t . k e y s ( s . t o o l b a r . e l e m e n t s ) . f o r E a c h ( f u n c t i o n ( f ) { v a r E = s . t o o l b a r . e l e m e n t s [ f ] . f i r s t C h i l d ; E & & ( E . c l a s s N a m e = E . c l a s s N a m e . r e p l a c e ( " _ _ n " , " _ _ s " ) ) } ) , s . c o u n t e r & & ( s . c o u n t e r . e l e m e n t . c l a s s N a m e = s . c o u n t e r . e l e m e n t . c l a s s N a m e . r e p l a c e ( " _ _ n " , " _ _ s " ) ) ) , s . d e v t o o l s & & s . d e v t o o l s . r e n d e r E c h a r t ( s ) , u . c l i c k & & u . c l i c k ( d , s ) , z e ( s ) , X e ( s ) } ) } , a } ( M t ) , Z u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , Y u = f u n c t i o n ( i ) { Z u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n f . c l a s s N a m e = " v d i t o r - h i n t v d i t o r - p a n e l - - a r r o w " , f . i n n e r H T M L = ' < b u t t o n d a t a - t a g = " h 1 " d a t a - v a l u e = " # " > ' . c o n c a t ( w i n d o w . V d i t o r I 1 8 n . h e a d i n g 1 , " " ) . c o n c a t ( ( 0 , m . n s ) ( " & l t ; ⌥ ⌘ 1 > " ) , ` < / b u t t o n >
< button data - tag = "h2" data - value = "## " > ` ).concat(window.VditorI18n.heading2," <").concat((0,m.ns)("⌥⌘2"), ` > < / b u t t o n >
< button data - tag = "h3" data - value = "### " > ` ).concat(window.VditorI18n.heading3," <").concat((0,m.ns)("⌥⌘3"), ` > < / b u t t o n >
< button data - tag = "h4" data - value = "#### " > ` ).concat(window.VditorI18n.heading4," <").concat((0,m.ns)("⌥⌘4"), ` > < / b u t t o n >
< button data - tag = "h5" data - value = "##### " > ` ).concat(window.VditorI18n.heading5," <").concat((0,m.ns)("⌥⌘5"), ` > < / b u t t o n >
< button data - tag = "h6" data - value = "###### " > ` ).concat(window.VditorI18n.heading6," <").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(lr(s),Re(s)):s.currentMode==="ir"&&fi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Re(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(fi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Ct(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show( ` < div style = "margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;" >
< div style = "margin-top: 14px;flex: 1" >
< div > Markdown 使用指南 < / d i v >
< ul style = "list-style: none" >
< li > < a href = "https://ld246.com/article/1583308420519" target = "_blank" > 语法速查手册 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1583129520165" target = "_blank" > 基础语法 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1583305480675" target = "_blank" > 扩展语法 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1582778815353" target = "_blank" > 键盘快捷键 < / a > < / l i >
< / u l >
< / d i v >
< div style = "margin-top: 14px;flex: 1" >
< div > Vditor 支持 < / d i v >
< ul style = "list-style: none" >
< li > < a href = "https://github.com/Vanessa219/vditor/issues" target = "_blank" > Issues < / a > < / l i >
< li > < a href = "https://ld246.com/tag/vditor" target = "_blank" > 官方讨论区 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1549638745630" target = "_blank" > 开发手册 < / a > < / l i >
< li > < a href = "https://ld246.com/guide/markdown" target = "_blank" > 演示地址 < / a > < / l i >
< / u l >
< / d i v > < / d i v > ` , 0 ) } ) , d } r e t u r n a } ( M t ) , e d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , t d = f u n c t i o n ( i ) { e d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { i f ( f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) ) { v a r E = ( 0 , q . z h ) ( s ) , L = ( 0 , y . l G ) ( E . s t a r t C o n t a i n e r , " L I " ) ; L & & M s ( s , L , E ) } } ) , d } r e t u r n a } ( M t ) , n d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , r d = f u n c t i o n ( i ) { n d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , s . t i p . s h o w ( ` < d i v s t y l e = " m a x - w i d t h : 5 2 0 p x ; f o n t - s i z e : 1 4 p x ; l i n e - h e i g h t : 2 2 p x ; m a r g i n - b o t t o m : 1 4 p x ; " >
< p style = "text-align: center;margin: 14px 0" >
< em > 下一代的 Markdown 编辑器 , 为未来而构建 < / e m >
< / p >
< div style = "display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center" >
< img src = "https://unpkg.com/vditor/dist/images/logo.png" style = "margin: 0 auto;height: 68px" / >
< div > & nbsp ; & nbsp ; < / d i v >
< div style = "flex: 1;min-width: 250px" >
Vditor 是一款浏览器端的 Markdown 编辑器 , 支持所见即所得 、 即时渲染 ( 类似 Typora ) 和分屏预览模式 。
它使用 TypeScript 实现 , 支持原生 JavaScript 以及 Vue 、 React 、 Angular 和 Svelte 等框架 。
< / d i v >
< / d i v >
< div style = "display: flex;flex-wrap: wrap;" >
< ul style = "list-style: none;flex: 1;min-width:148px" >
< li >
项目地址 : < a href = "https://b3log.org/vditor" target = "_blank" > b3log . org / vditor < / a >
< / l i >
< li >
开源协议 : MIT
< / l i >
< / u l >
< ul style = "list-style: none;margin-right: 18px" >
< li >
组件版本 : Vditor v ` .concat(c.H," / Lute v").concat(Lute.Version, `
< / l i >
< li >
赞助捐赠 : < a href = "https://ld246.com/sponsor" target = "_blank" > https : //ld246.com/sponsor</a>
< / l i >
< / u l >
< / d i v >
< / d i v > ` ) , 0 ) } ) , d } r e t u r n a } ( M t ) , i d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , a d = f u n c t i o n ( i ) { i d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) & & h i ( s , " a f t e r e n d " ) } ) , d } r e t u r n a } ( M t ) , o d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , s d = f u n c t i o n ( i ) { o d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) & & h i ( s , " b e f o r e b e g i n " ) } ) , d } r e t u r n a } ( M t ) , l d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , c d = f u n c t i o n ( i ) { l d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { i f ( f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) ) { v a r E = ( 0 , q . z h ) ( s ) , L = ( 0 , y . l G ) ( E . s t a r t C o n t a i n e r , " L I " ) ; L & & p o ( s , L , E , L . p a r e n t E l e m e n t ) } } ) , d } r e t u r n a } ( M t ) , u d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , d d = f u n c t i o n ( i ) { u d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n s . o p t i o n s . o u t l i n e & & d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) , d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) ; v a r E = s . t o o l b a r . e l e m e n t s . o u t l i n e . f i r s t E l e m e n t C h i l d ; E . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | ( s . o p t i o n s . o u t l i n e . e n a b l e = ! d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( " v d i t o r - m e n u - - c u r r e n t " ) , s . o u t l i n e . t o g g l e ( s , s . o p t i o n s . o u t l i n e . e n a b l e ) ) } ) , d } r e t u r n a } ( M t ) , h d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , p d = f u n c t i o n ( i ) { h d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . _ b i n d E v e n t ( s ) , d } r e t u r n a . p r o t o t y p e . _ b i n d E v e n t = f u n c t i o n ( s ) { v a r u = t h i s ; t h i s . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { d . p r e v e n t D e f a u l t ( ) ; v a r f = u . e l e m e n t . f i r s t
| -- - | -- - | -- - |
| | | |
| | | | ` ,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder, ` "
contenteditable = "true" spellcheck = "false" > < / p r e >
< div class = "vditor-panel vditor-panel--none" > < / d i v >
< div class = "vditor-panel vditor-panel--none" >
< button type = "button" aria - label = "`).concat(window.VditorI18n.comment,`" class = "vditor-icon vditor-tooltipped vditor-tooltipped__n" >
< svg > < use xlink : href = "#vditor-icon-comment" > < / u s e > < / s v g >
< / b u t t o n >
< / d i v > ` ) , t h i s . e l e m e n t = u . f i r s t E l e m e n t C h i l d , t h i s . p o p o v e r = u . f i r s t E l e m e n t C h i l d . n e x t E l e m e n t S i b l i n g , t h i s . s e l e c t P o p o v e r = u . l a s t E l e m e n t C h i l d , t h i s . b i n d E v e n t ( a ) , A i ( a , t h i s . e l e m e n t ) , h o ( a , t h i s . e l e m e n t ) , M i ( a , t h i s . e l e m e n t ) , x e ( a , t h i s . e l e m e n t ) , H e ( a , t h i s . e l e m e n t ) , C i ( a , t h i s . e l e m e n t ) , U ( a , t h i s . e l e m e n t , t h i s . c o p y ) , Q ( a , t h i s . e l e m e n t , t h i s . c o p y ) , a . o p t i o n s . c o m m e n t . e n a b l e & & ( t h i s . s e l e c t P o p o v e r . q u e r y S e l e c t o r ( " b u t t o n " ) . o n c l i c k = f u n c t i o n ( ) { v a r d = L u t e . N e w N o d e I D ( ) , f = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) , E = f . c l o n e R a n g e ( ) , L = f . e x t r a c t C o n t e n t s ( ) , D , _ , B = ! 1 , K = ! 1 ; L . c h i l d N o d e s . f o r E a c h ( f u n c t i o n ( u e , k e ) { v a r w e = ! 1 ; i f ( u e . n o d e T y p e = = = 3 ? w e = ! 0 : u e . c l a s s L i s t . c o n t a i n s ( " v d i t o r - c o m m e n t " ) ? u e . c l a s s L i s t . c o n t a i n s ( " v d i t o r - c o m m e n t " ) & & u e . s e t A t t r i b u t e ( " d a t a - c m t i d s " , u e . g e t A t t r i b u t e ( " d a t a - c m t i d s " ) + " " + d ) : w e = ! 0 , w e ) i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " & & k e = = = 0 & & E . s t a r t O f f s e t > 0 ) u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) , D = u e ; e l s e i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " & & k e = = = L . c h i l d N o d e s . l e n g t h - 1 & & E . e n d O f f s e t < E . e n d C o n t a i n e r . t e x t C o n t e n t . l e n g t h ) u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) , _ = u e ; e l s e i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " ) k e = = = 0 ? B = ! 0 : k e = = = L . c h i l d N o d e s . l e n g t h - 1 & & ( K = ! 0 ) , u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) ; e l s e { v a r d e = d o c u m e n t . c r e a t e E l e m e n t ( " s p a n " ) ; d e . c l a s s L i s t . a d d ( " v d i t o r - c o m m e n t " ) , d e . s e t A t t r i b u t e ( " d a t a - c m t i d s " , d ) , u e . p a r e n t N o d e . i n s e r t B e f o r e ( d e , u e ) , d e . a p p e n d C h i l d ( u e ) } } ) ; v a r f e = ( 0 , y . F 9 ) ( E . s t a r t C o n t a i n e r ) ; f e & & ( D ? ( f e . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , D . i n n e r H T M L ) , D . r e m o v e ( ) ) : f e . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " & & B & & f e . r e m o v e ( ) ) ; v a r v e = ( 0 , y . F 9 ) ( E . e n d C o n t a i n e r ) ; v e & & ( _ ? ( v e . i n s e r t A d j a c e n t H T M L ( " a f t e r b e g i n " , _ . i n n e r H T M L ) , _ . r e m o v e ( ) ) : v e . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " & & K & & v e . r e m o v e ( ) ) , f . i n s e r t N o d e ( L ) , a . o p t i o n s . c o m m e n t . a d d ( d , f . t o S t r i n g ( ) , s . g e t C o m m e n t s ( a , ! 0 ) ) , R e ( a , { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 1 , e n a b l e I n p u t : ! 1 } ) , s . h i d e C o m m e n t ( ) } ) } r e t u r n i . p r o t o t y p e . g e t C o m m e n t s = f u n c t i o n ( a , s ) { v a r u = t h i s ; i f ( s = = = v o i d 0 & & ( s = ! 1 ) , a . c u r r e n t M o d e = = = " w y s i w y g " & & a . o p t i o n s . c o m m e n t . e n a b l e ) { t h i s . c o m m e n t I d s = [ ] , t h i s . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - c o m m e n t " ) . f o r E a c h ( f u n c t i o n ( f ) { u . c o m m e n t I d s = u . c o m m e n t I d s . c o n c a t ( f . g e t A t t r i b u t e ( " d a t a - c m t i d s " ) . s p l i t ( " " ) ) } ) , t h i s . c o m m e n t I d s = A r r a y . f r o m ( n e w S e t ( t h i s . c o m m e n t I d s ) ) ; v a r d = [ ] ; i f ( s ) r e t u r n t h i s . c o m m e n t I d s . f o r E a c h ( f u n c t i o n ( f ) { d . p u s h ( { i d : f , t o p : u . e l e m e n t . q u e r y S e l e c t o r ( ' . v d i t o r - c o m m e n t [ d a t a - c m t i d s = " ' . c o n c a t ( f , ' " ] ' ) ) . o f f s e t T o p } ) } ) , d } e l s e r e t u r n [ ] } , i . p r o t o t y p e . t r i g g e r R e m o v e C o m m e n t = f u n c t i o n ( a ) { v a r s = f u n c t i o n ( f , E ) { v a r L = n e w S e t ( E ) ; r e t u r n f . f i l t e r ( f u n c t i o n ( D ) { r e t u r n ! L . h a s ( D ) } ) } ; i f ( a . c u r r e n t M o d e = = = " w y s i w y g " & & a . o p t i o n s . c o m m e n t . e n a b l e & & a . w y s i w y g . c o m m e n t I d s . l e n g t h > 0 ) { v a r u = J S O N . p a r s e ( J S O N . s t r i n g i f y ( t h i s . c o m m e n t I d s ) ) ; t h i s . g e t C o m m e n t s ( a ) ; v a r d = s ( u , t h i s . c o m m e n t I d s ) ; d . l e n g t h > 0 & & a . o p t i o n s . c o m m e n t . r e m o v e ( d ) } } , i . p r o t o t y p e . s h o w C o m m e n t = f u n c t i o n ( ) { v a r a = ( 0 , q . N y ) ( t h i s . e l e m e n t ) ; t h i s . s e l e c t P o p o v e r . s e t A t t r i b u t e ( " s t y l e " , " l e f t : " . c o n c a t ( a . l e f t , " p x ; d i s p l a y : b l o c k ; t o p : " ) . c o n c a t ( M a t h . m a x ( - 8 , a . t o p - 2 1 ) , " p x " ) ) } , i . p r o t o t y p e . h i d e C o m m e n t = f u n c t i o n ( ) { t h i s . s e l e c t P o p o v e r . s e t A t t r i b u t e ( " s t y l e " , " d i s p l a y : n o n e " ) } , i . p r o t o t y p e . u n b i n d L i s t e n e r = f u n c t i o n ( ) { w i n d o w . r e m o v e E v e n t L i s t e n e r ( " s c r o l l " , t h i s . s c r o l l L i s t e n e r ) } , i . p r o t o t y p e . c o p y = f u n c t i o n ( a , s ) { v a r u = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; i f ( u . t o S t r i n g ( ) ! = = " " ) { a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) ; v a r d = ( 0 , y . l G ) ( u . s t a r t C o n t a i n e r , " C O D E " ) , f = ( 0 , y . l G ) ( u . e n d C o n t a i n e r , " C O D E " ) ; i f ( d & & f & & f . i s S a m e N o d e ( d ) ) { v a r E = " " ; d . p a r e n t E l e m e n t . t a g N a m e = = = " P R E " ? E = u . t o S t r i n g ( ) : E = " ` " + u . t o S t r i n g ( ) + " ` " , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , E ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) ; r e t u r n } v a r L = ( 0 , y . l G ) ( u . s t a r t C o n t a i n e r , " A " ) , D = ( 0 , y . l G ) ( u . e n d C o n t a i n e r , " A " ) ; i f ( L & & D & & D . i s S a m e N o d e ( L ) ) { v a r _ = L . g e t A t t r i b u t e ( " t i t l e " ) | | " " ; _ & & ( _ = ' " ' . c o n c a t ( _ , ' " ' ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , " [ " . c o n c a t ( u . t o S t r i n g ( ) , " ] ( " ) . c o n c a t ( L . g e t A t t r i b u t e ( " h r e f " ) ) . c o n c a t ( _ , " ) " ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) ; r e t u r n } v a r B = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; B . a p p e n d C h i l d ( u . c l o n e C o n t e n t s ( ) ) , a . c l i p b o a r d D a t a . s e t D
` );D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!== `
` ){_=!1;break}_&&/^#{1,6} $ /.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||mo(f.innerHTML)||fo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),Zr(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,q.Hc)(getSelection().getRangeAt(0)),Re(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?co(a,u.target):di(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,q.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,E)))}jn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,q.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&cr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Z(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent=== `
` )&&(a.wysiwyg.element.innerHTML="");var d=(0,q.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent=== `
` &&d.startOffset===1&&(d.startContainer.textContent=""),Pn(a,d),jn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?cr(f,a):cr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Hn(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){cr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Vs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ye(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ws.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")
] ` ).replace("lheading",kv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},By=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , Fy = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , Ev = /^( {2,}|\\)\n(?!\s*$)/ , qy = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , Bc = /[\p{P}\p{S}]/u , sf = /[\s\p{P}\p{S}]/u , Tv = /[^\s\p{P}\p{S}]/u , jy = on ( /^((?![*_])punctSpace)/ , "u" ) . replace ( /punctSpace/g , sf ) . getRegex ( ) , Av = /(?!~)[\p{P}\p{S}]/u , $y = /(?!~)[\s\p{P}\p{S}]/u , Uy = /(?:[^\s\p{P}\p{S}]|~)/u , Vy = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g , Mv = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/ , Wy = on ( Mv , "u" ) . replace ( /punct/g , Bc ) . getRegex ( ) , Gy = on ( Mv , "u" ) . replace ( /punct/g , Av ) . getRegex ( ) , Cv = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)" , Ky = on ( Cv , "gu" ) . replace ( /notPunctSpace/g , Tv ) . replace ( /punctSpace/g , sf ) . replace ( /punct/g , Bc ) . getRegex ( ) , Xy = on ( Cv , "gu" ) . replace ( /notPunctSpace/g , Uy ) . replace ( /punctSpace/g , $y ) . replace ( /punct/g , Av ) . getRegex ( ) , Zy = on ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)" , "gu" ) . replace ( /notPunctSpace/g , Tv ) . replace ( /punctSpace/g , sf ) . replace ( /punct/g , Bc ) . getRegex ( ) , Yy = on ( /\\(punct)/ , "gu" ) . replace ( /punct/g , Bc ) . getRegex ( ) , Jy = on ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , Qy = on ( af ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , e7 = on ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , Qy ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , rc = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/ , t7 = on ( /^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/ ) . replace ( "label" , rc ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , Lv = on ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , rc ) . replace ( "ref" , rf ) . getRegex ( ) , _v = on ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , rf ) . getRegex ( ) , n7 = on ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , Lv ) . replace ( "nolink" , _v ) . getRegex ( ) , lf = { _backpedal : El , anyPunctuation : Yy , autolink : Jy , blockSkip : Vy , br : Ev , code : Fy , del : El , emStrongLDelim : Wy , emStrongRDelimAst : Ky , emStrongRDelimUnd : Zy , escape : By , link : t7 , nolink : _v , punctuation : jy , reflink : Lv , reflinkSearch : n7 , tag : e7 , text : qy , url : El } , r7 = { ... lf , link : on ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , rc ) . getRegex ( ) , reflink : on ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , rc ) . getRegex ( ) } , jh = { ... lf , emStrongRDelimAst : Xy , emStrongLDelim : Gy , url : on ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , i7 = { ... jh , br : on ( Ev ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : on ( jh . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , i0 = { normal : of , gfm : Py , pedantic : zy } , rl = { normal : lf , gfm : jh , breaks : i7 , pedantic : r7 } , a7 = { "&" : "&" , "<" : "<" , ">" : ">" , '"' : "
` ).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join( `
` )}var ic=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||zo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:il(n, `
` )}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=s7(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=il(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:il(e[0], `
` )}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=il(e[0], `
` ).split( `
` ),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join( `
` ),b=v.replace(this.rules.other.blockquoteSetextReplace, `
$1 ` ).replace(this.rules.other.blockquoteSetextReplace2,"");r=r? ` $ { r }
$ { v } ` :v,o=o? ` $ { o }
$ { b } ` :b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split( `
` );continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r? ` \ \ d { 1 , 9 } \ \ $ { n . slice ( - 1 ) } ` : ` \ \ $ { n } ` ,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split( `
` ,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split( `
` ,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+ `
` ,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split( `
` ,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+= `
` +z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+= `
` +m}!x&&!m.trim()&&(x=!0),v+=N+ `
` ,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=im(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split( `
` ):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(im(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)=== `
` ?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=il(n.slice(0,-1)," \\ ");if((n.length-l.length)%2===0)return}else{let l=o7(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation," $ 1"),title:o&&o.replace(this.rules.inline.anyPunctuation," $ 1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},pa=class $ h{constructor(e){vt(this,"tokens"),vt(this,"
` ),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(xr.tabCharGlobal," ").replace(xr.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+= `
` :n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},ac=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||zo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(xr.notSpaceStart))==null?void 0:r[0],l=t.replace(xr.endingNewline,"")+ `
` ;return o?'<pre><code class="language-'+Ri(o)+'">'+(n?l:Ri(l,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(n?l:Ri(l,!0))+ ` < / c o d e > < / p r e >
` }blockquote({tokens:t}){return ` < blockquote >
$ { this . parser . parse ( t ) } < / b l o c k q u o t e >
` }html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return ` < h$ { e } > $ { this . parser . parseInline ( t ) } < / h $ { e } >
` }hr(t){return ` < hr >
` }list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+ ` >
` +r+"</"+o+ ` >
` }listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ri(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose), ` < li > $ { n } < / l i >
` }checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return ` < p > $ { this . parser . parseInline ( t ) } < / p >
` }table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r= ` < tbody > $ { r } < / t b o d y > ` ) , ` < t a b l e >
< thead >
` +e+ ` < / t h e a d >
` +r+ ` < / t a b l e >
` }tablerow({text:t}){return ` < tr >
$ { t } < / t r >
` }tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align? ` < $ { n } align = "${t.align}" > ` : ` < $ { n } > ` )+e+ ` < / $ { n } >
` }strong({tokens:t}){return ` < strong > $ { this . parser . parseInline ( t ) } < / s t r o n g > ` } e m ( { t o k e n s : t } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / e m > ` } c o d e s p a n ( { t e x t : t } ) { r e t u r n ` < c o d e > $ { R i ( t , ! 0 ) } < / c o d e > ` } b r ( t ) { r e t u r n " < b r > " } d e l ( { t o k e n s : t } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / d e l > ` } l i n k ( { h r e f : t , t i t l e : e , t o k e n s : n } ) { l e t r = t h i s . p a r s e r . p a r s e I n l i n e ( n ) , o = r m ( t ) ; i f ( o = = = n u l l ) r e t u r n r ; t = o ; l e t l = ' < a h r e f = " ' + t + ' " ' ; r e t u r n e & & ( l + = ' t i t l e = " ' + R i ( e ) + ' " ' ) , l + = " > " + r + " < / a > " , l } i m a g e ( { h r e f : t , t i t l e : e , t e x t : n , t o k e n s : r } ) { r & & ( n = t h i s . p a r s e r . p a r s e I n l i n e ( r , t h i s . p a r s e r . t e x t R e n d e r e r ) ) ; l e t o = r m ( t ) ; i f ( o = = = n u l l ) r e t u r n R i ( n ) ; t = o ; l e t l = ` < i m g s r c = " $ { t } " a l t = " $ { n } " ` ; r e t u r n e & & ( l + = ` t i t l e = " $ { R i ( e ) } " ` ) , l + = " > " , l } t e x t ( t ) { r e t u r n " t o k e n s " i n t & & t . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( t . t o k e n s ) : " e s c a p e d " i n t & & t . e s c a p e d ? t . t e x t : R i ( t . t e x t ) } } , c f = c l a s s { s t r o n g ( { t e x t : t } ) { r e t u r n t } e m ( { t e x t : t } ) { r e t u r n t } c o d e s p a n ( { t e x t : t } ) { r e t u r n t } d e l ( { t e x t : t } ) { r e t u r n t } h t m l ( { t e x t : t } ) { r e t u r n t } t e x t ( { t e x t : t } ) { r e t u r n t } l i n k ( { t e x t : t } ) { r e t u r n " " + t } i m a g e ( { t e x t : t } ) { r e t u r n " " + t } b r ( ) { r e t u r n " " } } , f a = c l a s s U h { c o n s t r u c t o r ( e ) { v t ( t h i s , " o p t i o n s " ) , v t ( t h i s , " r e n d e r e r " ) , v t ( t h i s , " t e x t R e n d e r e r " ) , t h i s . o p t i o n s = e | | z o , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w a c , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w c f } s t a t i c p a r s e ( e , n ) { r e t u r n n e w U h ( n ) . p a r s e ( e ) } s t a t i c p a r s e I n l i n e ( e , n ) { r e t u r n n e w U h ( n ) . p a r s e I n l i n e ( e ) } p a r s e ( e , n = ! 0 ) { v a r r , o ; l e t l = " " ; f o r ( l e t h = 0 ; h < e . l e n g t h ; h + + ) { l e t c = e [ h ] ; i f ( ( o = ( r = t h i s . o p t i o n s . e x t e n s i o n s ) = = n u l l ? v o i d 0 : r . r e n d e r e r s ) ! = n u l l & & o [ c . t y p e ] ) { l e t v = c , b = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ v . t y p e ] . c a l l ( { p a r s e r : t h i s } , v ) ; i f ( b ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " d e f " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( v . t y p e ) ) { l + = b | | " " ; c o n t i n u e } } l e t p = c ; s w i t c h ( p . t y p e ) { c a s e " s p a c e " : { l + = t h i s . r e n d e r e r . s p a c e ( p ) ; c o n t i n u e } c a s e " h r " : { l + = t h i s . r e n d e r e r . h r ( p ) ; c o n t i n u e } c a s e " h e a d i n g " : { l + = t h i s . r e n d e r e r . h e a d i n g ( p ) ; c o n t i n u e } c a s e " c o d e " : { l + = t h i s . r e n d e r e r . c o d e ( p ) ; c o n t i n u e } c a s e " t a b l e " : { l + = t h i s . r e n d e r e r . t a b l e ( p ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { l + = t h i s . r e n d e r e r . b l o c k q u o t e ( p ) ; c o n t i n u e } c a s e " l i s t " : { l + = t h i s . r e n d e r e r . l i s t ( p ) ; c o n t i n u e } c a s e " h t m l " : { l + = t h i s . r e n d e r e r . h t m l ( p ) ; c o n t i n u e } c a s e " d e f " : { l + = t h i s . r e n d e r e r . d e f ( p ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { l + = t h i s . r e n d e r e r . p a r a g r a p h ( p ) ; c o n t i n u e } c a s e " t e x t " : { l e t v = p , b = t h i s . r e n d e r e r . t e x t ( v ) ; f o r ( ; h + 1 < e . l e n g t h & & e [ h + 1 ] . t y p e = = = " t e x t " ; ) v = e [ + + h ] , b + = `
` +this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Ud,I0=(Ud=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||zo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?pa.lex:pa.lexInline}provideParser(){return this.block?fa.parse:fa.parseInline}},vt(Ud,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ud),l7=class{constructor(...t){vt(this,"defaults",ef()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",fa),vt(this,"Renderer",ac),vt(this,"TextRenderer",cf),vt(this,"Lexer",pa),vt(this,"Tokenizer",ic),vt(this,"Hooks",I0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new ac(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error( ` renderer '${l}' does not exist ` );if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new ic(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error( ` tokenizer '${l}' does not exist ` );if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new I0;for(let l in n.hooks){if(!(l in o))throw new Error( ` hook '${l}' does not exist ` );if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p
Please report this to https : //github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ri(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Ro=new l7;function an(t,e){return Ro.parse(t,e)}an.options=an.setOptions=function(t){return Ro.setOptions(t),an.defaults=Ro.defaults,wv(an.defaults),an};an.getDefaults=ef;an.defaults=zo;an.use=function(...t){return Ro.use(...t),an.defaults=Ro.defaults,wv(an.defaults),an};an.walkTokens=function(t,e){return Ro.walkTokens(t,e)};an.parseInline=Ro.parseInline;an.Parser=fa;an.parser=fa.parse;an.Renderer=ac;an.TextRenderer=cf;an.Lexer=pa;an.lexer=pa.lex;an.Tokenizer=ic;an.Hooks=I0;an.parse=an;an.options;an.setOptions;an.use;an.walkTokens;an.parseInline;fa.parse;pa.lex;const Sn=document,Nv=function(t,e){const n=(this!=null&&this.el?this.el:e||document).querySelector(`[data-nodeid="me${t}"]`);if(!n)throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);return n},Fc=function(t,e){if(t.innerHTML="",e.style){const r=e.style;for(const o in r)t.style[o]=r[o]}if(e.dangerouslySetInnerHTML){const r=e.dangerouslySetInnerHTML;if(r.includes("|")&&r.includes("-")||r.includes("![")||r.includes("#")||r.includes("**")||r.includes("`")){t.innerHTML='<div class="node-loading"><div class="loading-spinner"></div><span>渲染中...</span></div>',t.classList.add("mindmap-node-rendering");try{Promise.resolve().then(()=>sk).then(({default:o})=>{o.preview(t,r,{mode:"dark",hljs:{style:"github"},after:()=>{t.classList.remove("mindmap-node-rendering"),t.classList.add("mindmap-node-completed")}})}).catch(o=>{n(t,r)})}catch{n(t,r)}return}n(t,r);return}function n(r,o){let l=o;l.includes("<table")||l.includes("<td>")||l.includes("<th>")?(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*( /g,"( "),l=l.replace(/•\s*\(/g,"(")):(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*( /g,"( "),l=l.replace(/•\s*\(/g,"("),l=l.replace(/^(\s*)•\s*(.+)$/gm,"<li>$2</li>").replace(/(<li>.*<\/li>)/gs,h=>l.includes("<ul>")?h:`<ul>${h}</ul>`).replace(/\n/g,"<br>")),r.innerHTML=l,l.includes("<img"),e.image,r.classList.add("no-image"),r.classList.remove("has-image")}if(e.image){const r=e.image;if(r.url&&r.width&&r.height){const o=Sn.createElement("img");o.src=this.imageProxy?this.imageProxy(r.url):r.url,o.style.width=r.width+"px",o.style.height=r.height+"px",r.fit&&(o.style.objectFit=r.fit),t.appendChild(o),t.image=o}}else t.image&&(t.image=void 0);{const r=Sn.createElement("span");r.className="text";let o="";this.markdown?o=this.markdown(e.topic,e):o=e.topic||"",o=o.replace(/•\s*【/g,"【"),o=o.replace(/•\s*\[/g,"["),o=o.replace(/•\s*( /g,"( "),o=o.replace(/•\s*\(/g,"("),r.innerHTML=o,t.appendChild(r),t.text=r,e.image,o.includes("<img"),t.classList.add("no-image"),t.classList.remove("has-image")}if(e.hyperLink){const r=Sn.createElement("a");r.className="hyper-link",r.target="_blank",r.innerText="🔗",r.href=e.hyperLink,t.appendChild(r),t.link=r}else t.link&&(t.link=void 0);if(e.icons&&e.icons.length){const r=Sn.createElement("span");r.className="icons",r.innerHTML=e.icons.map(o=>`<span>${Fh(o)}</span>`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Sn.createElement("div");r.className="tags",e.tags.forEach(o=>{const l=Sn.createElement("span");typeof o=="string"?l.textContent=o:(l.textContent=o.text,o.className&&(l.className=o.className),o.style&&Object.assign(l.style,o.style)),r.appendChild(l)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},c7=function(t,e){const n=Sn.createElement("me-wrapper"),{p:r,tpc:o}=this.createParent(t);if(n.appendChild(r),!e&&t.children&&t.children.length>0){const l=uf(t.expanded);if(r.appendChild(l),t.expanded!==!1){const h=Ay(this,t.children);n.appendChild(h)}}return{grp:n,top:r,tpc:o}},u7=function(t){const e=Sn.createElement("me-parent"),n=this.createTopic(t);return Fc.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},d7=function(t){const e=Sn.createElement("me-children");return e.append(...t),e},h
color : $ { o . color } ;
padding : $ { o . padding } ;
margin : $ { o . margin } ;
font : $ { o . font } ;
background - color : $ { o . backgroundColor !== "rgba(0, 0, 0, 0)" && o . backgroundColor } ;
border - radius : $ { o . borderRadius } ; ` ,this.direction===0&&(e.style.right="0"),Dv(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",l=>{l.stopPropagation();const h=l.key;if(h==="Enter"||h==="Tab"){if(l.shiftKey)return;l.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var l;if(!e)return;const h=((l=e.textContent)==null?void 0:l.trim())||"";h===""?n.topic=r:(n.topic=h,this.markdown?t.text.innerHTML=this.markdown(n.topic,n):t.text.textContent=h),e.remove(),Fc.call(this,t,n),h!==r&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:n,origin:r}))})},uf=function(t){const e=Sn.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},f7=function(t){if(!t)return;const e=t.nodeObj,n=e.dangerouslySetInnerHTML||"",r=Sn.createElement("div");r.id="table-edit-overlay",r.style.cssText= `
position : fixed ;
top : 0 ;
left : 0 ;
right : 0 ;
bottom : 0 ;
background : rgba ( 0 , 0 , 0 , 0.5 ) ;
z - index : 9999 ;
` ;const o=Sn.createElement("div");o.id="table-edit-container",o.style.cssText= `
position : fixed ;
top : 50 % ;
left : 50 % ;
transform : translate ( - 50 % , - 50 % ) ;
width : 600 px ;
min - height : 400 px ;
max - height : 80 vh ;
background : white ;
border : 2 px solid # 660874 ;
border - radius : 8 px ;
padding : 15 px ;
z - index : 10000 ;
box - shadow : 0 8 px 24 px rgba ( 0 , 0 , 0 , 0.3 ) ;
display : flex ;
flex - direction : column ;
` ;const l=Sn.createElement("div");l.textContent="编辑表格( Markdown格式) ",l.style.cssText= `
font - size : 14 px ;
font - weight : 600 ;
color : # 333 ;
margin - bottom : 10 px ;
padding - bottom : 8 px ;
border - bottom : 1 px solid # e0e0e0 ;
` ;const h=Sn.createElement("textarea");h.value=this.convertTableHTMLToMarkdown(n),h.style.cssText= `
flex : 1 ;
min - height : 300 px ;
border : 1 px solid # ddd ;
border - radius : 4 px ;
padding : 12 px ;
font - family : 'Monaco' , 'Menlo' , 'Ubuntu Mono' , 'Consolas' , monospace ;
font - size : 13 px ;
line - height : 1.5 ;
resize : vertical ;
outline : none ;
background : # fafafa ;
color : # 333 ;
caret - color : # 660874 ;
` ,h.setAttribute("spellcheck","false"),h.setAttribute("autocomplete","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off");const c=Sn.createElement("div");c.style.cssText= `
display : flex ;
justify - content : space - between ;
align - items : center ;
gap : 8 px ;
margin - top : 12 px ;
padding - top : 12 px ;
border - top : 1 px solid # e0e0e0 ;
` ;const p=Sn.createElement("span");p.textContent="提示: Ctrl+Enter保存, Esc取消",p.style.cssText= `
font - size : 11 px ;
color : # 999 ;
` ;const v=Sn.createElement("div");v.style.cssText= `
display : flex ;
gap : 8 px ;
` ;const b=Sn.createElement("button");b.textContent="取消",b.style.cssText= `
padding : 8 px 20 px ;
background : # 6 c757d ;
color : white ;
border : none ;
border - radius : 4 px ;
cursor : pointer ;
font - size : 13 px ;
transition : background 0.2 s ;
` ,b.addEventListener("mouseenter",()=>{b.style.background="#5a6268"}),b.addEventListener("mouseleave",()=>{b.style.background="#6c757d"});const g=Sn.createElement("button");g.textContent="保存",g.style.cssText= `
padding : 8 px 20 px ;
background : # 660874 ;
color : white ;
border : none ;
border - radius : 4 px ;
cursor : pointer ;
font - size : 13 px ;
font - weight : 500 ;
transition : background 0.2 s ;
` ,g.addEventListener("mouseenter",()=>{g.style.background="#4d0655"}),g.addEventListener("mouseleave",()=>{g.style.background="#660874"}),v.appendChild(b),v.appendChild(g),c.appendChild(p),c.appendChild(v),o.appendChild(l),o.appendChild(h),o.appendChild(c),Sn.body.appendChild(r),Sn.body.appendChild(o),r.addEventListener("click",()=>{r.remove(),o.remove()}),setTimeout(()=>{h.focus(),h.setSelectionRange(0,0)},50);const m=()=>{const w=h.value.trim();if(w===this.convertTableHTMLToMarkdown(n)){r.remove(),o.remove();return}an.setOptions({breaks:!1,gfm:!0});const S=an.parse(w).replace(/<table>/g,'<table class="markdown-table">');r.remove(),o.remove(),e.dangerouslySetInnerHTML=S,e.topic=w,t.innerHTML=S,this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),t.classList.add("no-image"),t.classList.remove("has-image"),this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),this.linkDiv()},x=()=>{r.remove(),o.remove()};g.addEventListener("click",m),b.addEventListener("click",x),h.addEventListener("keydown",w=>{w.stopPropagation(),w.key==="Escape"?(w.preventDefault(),x()):w.key==="Enter"&&w.ctrlKey&&(w.preventDefault(),m())})},m7=function(t){const e=Sn.createElement("div");e.innerHTML=t;const n=e.querySelector("table");if(!n)return t;let r="";const o=n.querySelector("thead");if(o){const h=o.querySelector("tr");if(h){const c=Array.from(h.querySelectorAll("th")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+ ` |
` ,r+="| "+c.map(()=>"---").join(" | ")+ ` |
` }}const l=n.querySelector("tbody");return l&&l.querySelectorAll("tr").forEach(h=>{const c=Array.from(h.querySelectorAll("td")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+ ` |
` }),r.trim()},Do=document,ri="http://www.w3.org/2000/svg",Vh=function(t,e,n,r={}){const{anchor:o="middle",color:l,dataType:h}=r,c=document.createElementNS(ri,"text");return En(c,{"text-anchor":o,x:e+"",y:n+"",fill:l||(o==="middle"?"rgb(235, 95, 82)":"#666")}),h&&(c.dataset.type=h),c.innerHTML=t,c},Rv=function(t,e,n){const r=Do.createElementNS(ri,"path");return En(r,{d:t,stroke:e||"#666",fill:"none","stroke-width":n}),r},pl=function(t){const e=Do.createElementNS(ri,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},om=function(){const t=Do.createElementNS(ri,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},g7=function(t,e,n,r){const o=Do.createElementNS(ri,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:n}].forEach((l,h)=>{const c=l.d,p=Do.createElementNS(ri,"path"),v={d:c,stroke:(r==null?void 0:r.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(r==null?void 0:r.strokeLinecap)||"cap","stroke-width":String((r==null?void 0:r.strokeWidth)||"2")};(r==null?void 0:r.opacity)!==void 0&&(v.opacity=String(r.opacity)),En(p,v),h===0&&p.setAttribute("stroke-dasharray",(r==null?void 0:r.strokeDasharray)||"8,2");const b=Do.createElementNS(ri,"path");En(b,{d:c,stroke:"transparent",fill:"none","stroke-width":"15"}),o.appendChild(b),o.appendChild(p),o[l.name]=p}),o},Iv=function(t,e,n){if(!e)return;const r=Do.createElement("div");t.nodes.appendChild(r);const o=e.innerHTML;r.id="input-box",r.textContent=o,r.contentEditable="plaintext-only",r.spellcheck=!1;const l=e.getBBox();r.style.cssText= `
min - width : $ { Math . max ( 88 , l . width ) } px ;
position : absolute ;
left : $ { l . x } px ;
top : $ { l . y } px ;
padding : 2 px 4 px ;
margin : - 2 px - 4 px ;
` ,Dv(r),t.scrollIntoView(r),r.addEventListener("keydown",h=>{h.stopPropagation();const c=h.key;if(c==="Enter"||c==="Tab"){if(h.shiftKey)return;h.preventDefault(),r.blur(),t.container.focus()}}),r.addEventListener("blur",()=>{var h;if(!r)return;const c=((h=r.textContent)==null?void 0:h.trim())||"";c===""?n.label=o:n.label=c,r.remove(),c!==o&&(e.innerHTML=n.label,"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},v7=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,r=e.offsetLeft,o=e.offsetWidth,l=e.offsetHeight,h=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<h.length;c++){const p=h[c],v=p.querySelector("me-tpc"),{offsetLeft:b,offsetTop:g}=ql(this.nodes,v),m=v.offsetWidth,x=v.offsetHeight,w=p.parentNode.className,S=this.generateMainBranch({pT:n,pL:r,pW:o,pH:l,cT:g,cL:b,cW:m,cH:x,direction:w,containerHeight:this.nodes.offsetHeight}),k=this.theme.palette,C=v.nodeObj.branchColor||k[c%k.length];if(v.style.borderColor=C,this.lines.appendChild(Rv(S,C,"3")),t&&t!==p)continue;const T=pl("subLines"),A=p.lastChild;A.tagName==="svg"&&A.remove(),p.appendChild(T),Ov(this,T,C,p,w,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Ov=function(t,e,n,r,o,l){const h=r.firstChild,c=r.children[1].children;if(c.length===0)return;const p=h.offsetTop,v=h.offsetLeft,b=h.offsetWidth,g=h.offsetHeight;for(let m=0;m<c.length;m++){const x=c[m],w=x.firstChild,S=w.offsetTop,k=w.offsetLeft,C=w.offsetWidth,T=w.offsetHeight,A=w.firstChild.nodeObj.branchColor||n,M=t.generateSubBranch({pT:p,pL:v,pW:b,pH:g,cT:S,cL:k,cW:C,cH:T,direction:o,isFirst:l});e.appendChild(Rv(M,A,"2"));const y=w.children[1];if(y){if(!y.expanded)continue}else continue;Ov(t,e,A,x,o)}},sm={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},lm={cn:sm,zh_CN:sm,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi ge
. topic { font - family : Arial , sans - serif ; font - size : 14 px ; color : # 333 ; }
. markdown - content { font - size : 12 px ; line - height : 1.3 ; }
/* 表格样式 */
. markdown - table {
border - collapse : collapse ;
width : 100 % ;
margin : 4 px 0 ;
font - size : 11 px ;
border : 1 px solid # e0e0e0 ;
border - radius : 6 px ;
box - shadow : 0 2 px 8 px rgba ( 0 , 0 , 0 , 0.08 ) ;
background - color : # fafafa ;
overflow : hidden ;
white - space : normal ;
}
. markdown - table th ,
. markdown - table td {
border : 1 px solid # e0e0e0 ;
padding : 8 px 12 px ;
text - align : left ;
vertical - align : top ;
position : relative ;
white - space : normal ;
}
. markdown - table th {
background - color : # f5f5f5 ;
font - weight : 600 ;
color : # 333 ;
text - align : center ;
border - bottom : 1 px solid # d0d0d0 ;
}
. markdown - table td {
background - color : # fff ;
}
. markdown - table tr : nth - child ( even ) td {
background - color : # f8f8f8 ;
}
. markdown - table tr : hover td {
background - color : # f0f8ff ;
}
/* 移除多余的边框,保持简洁 */
. markdown - table th : not ( : last - child ) ,
. markdown - table td : not ( : last - child ) {
border - right : 1 px solid # e0e0e0 ;
}
. markdown - table tr : not ( : last - child ) td {
border - bottom : 1 px solid # e0e0e0 ;
}
` ,l=await e.exportSvg(!0,o);if(!l)return;const h=URL.createObjectURL(l),c=document.createElement("a");c.href=h,c.download= ` $ { r } . $ { t } ` ,c.click(),URL.revokeObjectURL(h)}catch{alert( ` 导出$ { t . toUpperCase ( ) } 失败 , 请重试 ` )}},I7={side:T7,left:A7,right:M7,full:C7,living:L7,zoomin:_7,zoomout:N7,exportSvg:D7},Va=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=I7[e],n};function O7(t){try{const e=document.createElement("div"),n=Va("fullscreen","full"),r=Va("toCenter","living"),o=Va("zoomout","zoomout"),l=Va("zoomin","zoomin"),h=Va("exportSvg","exportSvg");h.title="导出SVG矢量图";const c=document.createElement("span");return c.innerText="100%",e.appendChild(n),e.appendChild(r),e.appendChild(o),e.appendChild(l),e.appendChild(h),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},r.onclick=()=>{t.toCenter()},o.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},l.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},h.onclick=()=>{R7("svg")(t)},setTimeout(()=>{const p=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function H7(t){const e=document.createElement("div"),n=Va("tbltl","left"),r=Va("tbltr","right"),o=Va("tblts","side");return e.appendChild(n),e.appendChild(r),e.appendChild(o),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},r.onclick=()=>{t.initRight()},o.onclick=()=>{t.initSide()},e}function P7(t){try{if(!t.container)return;const e=O7(t),n=H7(t);t.container.append(e),t.container.append(n)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */let z7=class{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,e){const n=this._listeners.get(t)??new Set;return this._listeners.set(t,n),n.add(e),this}removeEventListener(t,e){var n;return(n=this._listeners.get(t))==null||n.delete(e),this}dispatchEvent(t,...e){let n=!0;for(const r of this._listeners.get(t)??[])n=r(...e)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}};const um=(t,e="px")=>typeof t=="number"?t+e:t,Ha=({style:t},e,n)=>{if(typeof e=="object")for(const[r,o]of Object.entries(e))o!==void 0&&(t[r]=um(o));else n!==void 0&&(t[e]=um(n))},dm=(t=0,e=0,n=0,r=0)=>{const o={x:t,y:e,width:n,height:r,top:e,left:t,right:t+n,bottom:e+r};return{...o,toJSON:()=>JSON.stringify(o)}},B7=t=>{let e,n=-1,r=!1;return{next:(...o)=>{e=o,r||(r=!0,n=requestAnimationFrame(()=>{t(...e),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},hm=(t,e,n="touch")=>{switch(n){case"center":{const r=e.left+e.width/2,o=e.top+e.height/2;return r>=t.left&&r<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},F7=()=>matchMedia("(hover: none), (pointer: coarse)").matches,q7=()=>"safari"in window,Kh=t=>Array.isArray(t)?t:[t],Hv=t=>(e,n,r,o={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=Kh(n),e=Kh(e);for(const l of e)if(l)for(const h of n)l[t](h,r,{capture:!1,...o})},Pa=Hv("addEventListener"),vi=Hv("removeEventListener"),a0=t=>{var e;const{clientX:n,clientY:r,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:r,target:o}},Vo=(t,e=document)=>Kh(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),j7=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Eo,max:pm,min:fm,ceil:mm}=Math,gm=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Pv=class extends z7{constructor(t){var e,n,r,o,l;super(),this._selection=gm
` ),c=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,p=parseFloat(e.fontSize),v=parseInt(e.paddingTop)||8,b=parseInt(e.paddingLeft)||8,g=t.offsetWidth||200,m=n+b,x=(h.length-1)*c+p+v+(parseInt(e.paddingBottom)||8),w=t.offsetHeight||100,S=Math.min(x,w),k=document.createElementNS(Yn,"rect");return En(k,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:g+"px",height:S+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),o.appendChild(k),h.forEach((C,T)=>{const A=document.createElementNS(Yn,"text");En(A,{x:m+"",y:r+v+p+c*T+"","text-anchor":"start","font-family":e.fontFamily,"font-size": ` $ { e . fontSize } ` ,"font-weight": ` $ { e . fontWeight } ` ,fill: ` $ { e . color } ` }),A.innerHTML=C,o.appendChild(A)}),o}function wm(t){if(!t)return t;let e=t.replace(/<td[^>]*>([^<]*)<br \s * \/ ?>([^<]*)< \/ td>/gi,(n,r,o)=> ` < td > $ { r } $ { o } < /td>`);return e=e.replace(/ < th [ ^ > ] * > ( [ ^ < ] * ) < br \ s * \ / ? > ( [ ^ < ] * ) < \ / th > / g i , ( n , r , o ) = > ` < t h > $ { r } $ { o } < / t h > ` ) , e = e . r e p l a c e ( / < b r \ s * \ / ? > / g i , " " ) , e = e . r e p l a c e ( / • \ s * 【 / g , " 【 " ) , e = e . r e p l a c e ( / • \ s * \ [ / g , " [ " ) , e = e . r e p l a c e ( / • \ s * ( / g , " ( " ) , e = e . r e p l a c e ( / • \ s * \ ( / g , " ( " ) , e = e . r e p l a c e ( / < ( [ ^ > ] + ) > / g , ( n , r ) = > { c o n s t o = [ " b r " , " h r " , " i m g " , " i n p u t " , " m e t a " , " l i n k " ] , l = r . s p l i t ( " " ) [ 0 ] . t o L o w e r C a s e ( ) ; r e t u r n o . i n c l u d e s ( l ) ? ` < $ { r } / > ` : n } ) , e } f u n c t i o n W d ( t , e , n , r , o = ! 1 ) { c o n s t l = d o c u m e n t . c r e a t e E l e m e n t N S ( Y n , " g " ) ; o | | l . s e t A t t r i b u t e ( " t r a n s f o r m " , ` t r a n s l a t e ( $ { n } , $ { r } ) ` ) ; c o n s t h = t ; l e t c = " " ; h . n o d e O b j & & h . n o d e O b j . d a n g e r o u s l y S e t I n n e r H T M L ? c = h . n o d e O b j . d a n g e r o u s l y S e t I n n e r H T M L : h . t e x t & & h . t e x t . i n n e r H T M L & & ( c = h . t e x t . i n n e r H T M L ) ; c o n s t p = c & & c ! = = t . t e x t C o n t e n t , v = c & & c . i n c l u d e s ( " < t a b l e " ) ; i f ( v ) { c o n s t b = t . o f f s e t W i d t h | | 4 0 0 , g = t . o f f s e t H e i g h t | | 2 0 0 , m = d o c u m e n t . c r e a t e E l e m e n t N S ( Y n , " r e c t " ) ; E n ( m , { x : n + " " , y : r + " " , w i d t h : b + " " , h e i g h t : g + " " , f i l l : " w h i t e " , s t r o k e : " # c c c " , " s t r o k e - w i d t h " : " 1 " } ) , l . a p p e n d C h i l d ( m ) ; c o n s t x = d o c u m e n t . c r e a t e E l e m e n t N S ( Y n , " f o r e i g n O b j e c t " ) ; E n ( x , { x : o ? n + " " : " 0 " , y : o ? r + " " : " 0 " , w i d t h : b + " " , h e i g h t : g + " " } ) ; c o n s t w = `
< div xmlns = "http://www.w3.org/1999/xhtml" style = "
width : 100 % ;
height : 100 % ;
padding : 8 px ;
box - sizing : border - box ;
overflow : hidden ;
font - family : '${(e.fontFamily||"Arial, sans-serif").replace(/"/g,""")}' ;
font - size : $ { e . fontSize || "14px" } ;
line - height : 1.4 ;
" >
$ { wm ( c ) }
< / d i v >
` ;return x.innerHTML=w,l.appendChild(x),l}if(p&&!v){const b=wm(c),g=t.getBoundingClientRect(),m=g.width,x=g.height;b.includes("<img"),h.nodeObj&&h.nodeObj.image;try{const N=document.createElement("div");N.innerHTML=b,N.style.cssText= `
position : absolute ;
top : - 9999 px ;
left : - 9999 px ;
width : $ { m } px ;
font - family : '${(e.fontFamily||"Arial").replace(/"/g,""")}' ;
font - size : $ { e . fontSize } ;
color : $ { e . color } ;
` ,document.body.appendChild(N);const z=(N.textContent||N.innerText||"").split( `
` ).filter(F=>F.trim());if(z.length>0){const F=parseFloat(e.fontSize)||14,P=F*1.4,Y=parseInt(e.paddingTop)||8,te=parseInt(e.paddingBottom)||8,ce=parseInt(e.paddingLeft)||8,Me=(z.length-1)*P+F+Y+te,Fe=Math.min(Me,x),We=b.includes("<img"),rt=We?n+m/2:n+ce,je=r+F+Y;z.forEach((nt,ct)=>{const tt=document.createElementNS(Yn,"text");En(tt,{x:rt+"",y:je+P*ct+"","text-anchor":We?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),tt.innerHTML=nt.trim(),l.appendChild(tt)});const Ne=document.createElementNS(Yn,"rect");return En(Ne,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:Fe+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(Ne,l.firstChild),document.body.removeChild(N),l}document.body.removeChild(N)}catch{}const w=document.createElementNS(Yn,"foreignObject");En(w,{x:n+"",y:r+"",width:m+"px",height:x+"px"});const S=document.createElement("div");S.innerHTML=b;const k=15,C=15,T=parseInt(e.paddingLeft)||8,A=parseInt(e.paddingRight)||8;S.style.cssText= `
width : 100 % ;
height : 100 % ;
font - family : '${(e.fontFamily||"Arial").replace(/"/g,""")}' ;
font - size : $ { e . fontSize } ;
color : $ { e . color } ;
background : transparent ;
padding : $ { k } px $ { A } px $ { C } px $ { T } px ;
box - sizing : border - box ;
overflow : visible ;
text - align : center ! important ;
display : flex ;
flex - direction : column ;
justify - content : center ;
align - items : center ;
position : relative ;
` ,S.querySelectorAll("table").forEach(N=>{const z=N;z.style.cssText= `
width : 100 % ;
border - collapse : collapse ;
font - size : $ { e . fontSize } ;
font - family : '${(e.fontFamily||"Arial").replace(/"/g,""")}' ;
margin : 0 auto 0 px auto ;
border : 1 px solid # ccc ;
` ,N.querySelectorAll("td, th").forEach(F=>{const P=F;P.style.cssText= `
border : 1 px solid # ccc ;
padding : 4 px 8 px ;
text - align : center ;
vertical - align : top ;
font - size : $ { parseFloat ( e . fontSize ) * . 9 } px ;
background : white ;
` })}),S.querySelectorAll("ul, ol").forEach(N=>{const z=N;z.style.cssText= `
margin : 2 px 0 4 px 0 ! important ;
padding - left : 0 ! important ;
text - align : center ! important ;
list - style - position : inside ! important ;
` }),S.querySelectorAll("li").forEach(N=>{const z=N;z.style.cssText= `
margin : 1 px 0 ! important ;
line - height : 1.2 ! important ;
padding : 0 ! important ;
text - align : center ! important ;
list - style - position : inside ! important ;
` }),S.querySelectorAll("p").forEach(N=>{const z=N;z.style.cssText= `
margin : 2 px 0 ! important ;
line - height : 1.4 ! important ;
padding : 0 ! important ;
text - align : center ! important ;
` }),S.querySelectorAll("span, div, strong, em").forEach(N=>{const z=N;z.style.cssText= `
text - align : center ! important ;
display : block ! important ;
margin - left : auto ! important ;
margin - right : auto ! important ;
` });const M=document.createElement("style");M.textContent= `
* {
text - align : center ! important ;
margin - left : auto ! important ;
margin - right : auto ! important ;
}
` ,S.appendChild(M),S.querySelectorAll("img").forEach((N,z)=>{const F=N,P=m-T-A-5,Y=Math.floor(x*.7);F.style.cssText= `
max - width : $ { P } px ! important ;
max - height : $ { Y } px ! important ;
width : auto ! important ;
height : auto ! important ;
display : block ! important ;
margin : 8 px auto 0 px auto ! important ;
border - radius : 4 px ;
object - fit : contain ! important ;
flex - shrink : 0 ! important ;
box - sizing : border - box ! important ;
position : relative ! important ;
top : 0 ! important ;
left : 0 ! important ;
right : 0 ! important ;
bottom : 0 ! important ;
` }),w.appendChild(S);const y=document.createElementNS(Yn,"rect");En(y,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:x+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(y,l.firstChild),l.appendChild(w)}else return Gv(t,e,n,r);return l}function s0(t,e,n=!1,r){var o;const l=getComputedStyle(e);let h,c;if(r)h=r.x,c=r.y;else{const{offsetLeft:x,offsetTop:w}=Qp(t.nodes,e);h=x,c=w}my(e);const p=e;p.nodeObj&&p.nodeObj.dangerouslySetInnerHTML&&((o=p.nodeObj.dangerouslySetInnerHTML)==null||o.includes("<img")),p.nodeObj&&p.nodeObj.image;const v=document.createElementNS(Yn,"g");r||v.setAttribute("transform", ` translate ( $ { h } , $ { c } ) ` );let b=null;const g=e,m=g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML&&g.nodeObj.dangerouslySetInnerHTML.includes("<table");if(g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML){if(m)return Wd(e,l,h,c);b=Wd(e,l,h,c)}else n?b=Wd(e,l,h,c):b=Gv(e,l,h,c);return b&&v.appendChild(b),v}function dw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=ql(t.nodes,e),l=document.createElementNS(Yn,"a"),h=document.createElementNS(Yn,"text");return En(h,{x:r+"",y:o+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size": ` $ { n . fontSize } ` ,"font-weight": ` $ { n . fontWeight } ` ,fill: ` $ { n . color } ` }),h.innerHTML=e.textContent,l.appendChild(h),l.setAttribute("href",e.href),l}async function hw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e);if(!e.nodeObj.image)return null;const l=e.nodeObj.image,h=document.createElementNS(Yn,"image"),c=parseInt(n.width),p=parseInt(n.height),v=Math.min(c-10,300),b=Math.min(p*.6,150),g=Math.min(l.width||200,v),m=Math.min(l.height||150,b);let x=0;if(e.text&&e.text.textContent){const k=e.text.textContent.trim();if(k){const C=k.split( `
` ).length,T=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2;parseFloat(n.fontSize);const A=parseInt(n.paddingTop)||8,M=parseInt(n.paddingBottom)||8;x=C*T+A+M}}const w=r+(c-g)/2,S=o+x+0;try{const k=await Kv(l.url);En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:k})}catch{En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:l.url})}return h}async function pw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e),l=document.createElementNS(Yn,"image"),h=t.imageProxy?t.imageProxy(e.src):e.src,c=Math.min(parseInt(n.width)||300,300),p=Math.min(parseInt(n.height)||200,200);try{const v=await Kv(h);En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:v})}catch{En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:h})}return l}function Kv(t){return new Promise((e,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{try{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l){n(new Error("Failed to get canvas context"));return}l.drawImage(r,0,0);const h=o.toDataURL("image/png");e(h)}catch(o){n(o)}},r.onerror=()=>{n(new Error("Failed to load image"))},r.src=t})}const l0=100,fw='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',xm=(t,e)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return window.getComputedStyle(e).transform,{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}},mw=async()=>{await new Promise(t=>setTimeout(t,0)),await document.fonts.ready,await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>setTimeout(t,100))},gw=async(t,e=!1)=>{var n,r,o;await mw();const l=t.nodes;l.getBoundingClientRect();const h=l.offsetHeight+l0*2,c=l.offsetWidth+l0*2,p=uw(h+"px",c+"px"),v=document.createElementNS(Yn,"svg"),b=document.createElementNS(Yn,"rect");En(b,{x:"0",y:"0",width: ` $ { c } ` ,height: ` $ { h } ` ,fill:t.theme.cssVar["--bgcolor"]}),p.appendChild(b),l.querySelectorAll(".subLines").forEach(k=>{const C=k.cloneNode(!0),T=k.parentElement,A=xm(T,l);C.setAttribute("x", ` $ { A . x } ` ),C.setAttribute("y", ` $ { A . y } ` ),v.appendChild(C)});const g=(n=l.querySelector(".lines"))==null?void 0:n.cloneNode(!0);g&&v.appendChild(g);const m=(r=l.querySelector(".topiclinks"))==null?void 0:r.cloneNode(!0);m&&v.appendChild(m);const x=(o=l.querySelector(".summary"))==null?void 0:o.cloneNode(!0);x&&v.appendChild(x);const w=Array.from(l.querySelectorAll("me-tpc")).map(async k=>{const C=xm(k,l),T=k.nodeObj.dangerouslySetInnerHTML,A=!!(k.text&&k.text.innerHTML&&k.text.innerHTML!==k.text.textContent),M=k.nodeObj.image;if(T||A){const y=s0(t,k,!e,C);v.appendChild(y)}else v.appendChild(s0(t,k,!1,C));if(M)try{const y=await hw(t,k);y&&v.appendChild(y)}catch{}});await Promise.all(w),l.querySelectorAll(".tags > span").forEach(k=>{v.appendChild(s0(t,k))}),l.querySelectorAll(".icons > span").forEach(k=>{v.appendChild(s0(t,k))}),l.querySelectorAll(".hyper-link").forEach(k=>{v.appendChild(dw(t,k))});const S=Array.from(l.querySelectorAll("img")).map(async(k,C)=>{const T=k.closest("me-tpc"),A=k.closest("foreignObject");return T||A?null:await pw(t,k)});return(await Promise.all(S)).filter(k=>k!==null).forEach(k=>{k&&v.appendChild(k)}),En(v,{x:l0+"",y:l0+"",overflow:"visible"}),p.appendChild(v),p},vw=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),fw+t.outerHTML);function bw(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>{e(o.target.result)},r.onerror=o=>{n(o)},r.readAsDataURL(t)})}const yw=async function(t=!1,e){const n=await gw(this,t),r=vw(n,e);return new Blob([r],{type:"image/svg+xml"})},ww=async function(t=!1,e){const n=await this.exportSvg(t,e),r=await bw(n);return new Promise((o,l)=>{const h=new Image;h.setAttribute("crossOrigin","anonymous");const c=setTimeout(()=>{l(new Error("Image loading timeout"))},1e4);h.onload=()=>{clearTimeout(c);try{const p=document.createElement("canvas");p.width=h.width,p.height=h.height;const v=p.getContext("2d");v.fillStyle="#ffffff",v.fillRect(0,0,p.width,p.height),v.drawImage(h,0,0),p.toBlob(o,"image/png",1)}catch(p){l(
] ` ).replace("lheading",Yv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Iw=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , Ow = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , Qv = /^( {2,}|\\)\n(?!\s*$)/ , Hw = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , $c = /[\p{P}\p{S}]/u , wf = /[\s\p{P}\p{S}]/u , e6 = /[^\s\p{P}\p{S}]/u , Pw = sn ( /^((?![*_])punctSpace)/ , "u" ) . replace ( /punctSpace/g , wf ) . getRegex ( ) , t6 = /(?!~)[\p{P}\p{S}]/u , zw = /(?!~)[\s\p{P}\p{S}]/u , Bw = /(?:[^\s\p{P}\p{S}]|~)/u , Fw = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g , n6 = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/ , qw = sn ( n6 , "u" ) . replace ( /punct/g , $c ) . getRegex ( ) , jw = sn ( n6 , "u" ) . replace ( /punct/g , t6 ) . getRegex ( ) , r6 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)" , $w = sn ( r6 , "gu" ) . replace ( /notPunctSpace/g , e6 ) . replace ( /punctSpace/g , wf ) . replace ( /punct/g , $c ) . getRegex ( ) , Uw = sn ( r6 , "gu" ) . replace ( /notPunctSpace/g , Bw ) . replace ( /punctSpace/g , zw ) . replace ( /punct/g , t6 ) . getRegex ( ) , Vw = sn ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)" , "gu" ) . replace ( /notPunctSpace/g , e6 ) . replace ( /punctSpace/g , wf ) . replace ( /punct/g , $c ) . getRegex ( ) , Ww = sn ( /\\(punct)/ , "gu" ) . replace ( /punct/g , $c ) . getRegex ( ) , Gw = sn ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , Kw = sn ( bf ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , Xw = sn ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , Kw ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , sc = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/ , Zw = sn ( /^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/ ) . replace ( "label" , sc ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , i6 = sn ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , sc ) . replace ( "ref" , vf ) . getRegex ( ) , a6 = sn ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , vf ) . getRegex ( ) , Yw = sn ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , i6 ) . replace ( "nolink" , a6 ) . getRegex ( ) , xf = { _backpedal : Tl , anyPunctuation : Ww , autolink : Gw , blockSkip : Fw , br : Qv , code : Ow , del : Tl , emStrongLDelim : qw , emStrongRDelimAst : $w , emStrongRDelimUnd : Vw , escape : Iw , link : Zw , nolink : a6 , punctuation : Pw , reflink : i6 , reflinkSearch : Yw , tag : Xw , text : Hw , url : Tl } , Jw = { ... xf , link : sn ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , sc ) . getRegex ( ) , reflink : sn ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , sc ) . getRegex ( ) } , Xh = { ... xf , emStrongRDelimAst : Uw , emStrongLDelim : jw , url : sn ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , Qw = { ... Xh , br : sn ( Qv ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : sn ( Xh . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , c0 = { normal : yf , gfm : Dw , pedantic : Rw } , al = { normal : xf , gfm : Xh , breaks : Qw , pedantic : Jw } , e9 = { "&" : "&" , "<" : "<" , ">" : ">" , '"' : "
` ).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join( `
` )}var lc=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||Bo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ol(n, `
` )}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=n9(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=ol(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ol(e[0], `
` )}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ol(e[0], `
` ).split( `
` ),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join( `
` ),b=v.replace(this.rules.other.blockquoteSetextReplace, `
$1 ` ).replace(this.rules.other.blockquoteSetextReplace2,"");r=r? ` $ { r }
$ { v } ` :v,o=o? ` $ { o }
$ { b } ` :b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split( `
` );continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r? ` \ \ d { 1 , 9 } \ \ $ { n . slice ( - 1 ) } ` : ` \ \ $ { n } ` ,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split( `
` ,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split( `
` ,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+ `
` ,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split( `
` ,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+= `
` +z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+= `
` +m}!x&&!m.trim()&&(x=!0),v+=N+ `
` ,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=Tm(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split( `
` ):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(Tm(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)=== `
` ?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=ol(n.slice(0,-1)," \\ ");if((n.length-l.length)%2===0)return}else{let l=t9(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation," $ 1"),title:o&&o.replace(this.rules.inline.anyPunctuation," $ 1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},ma=class Zh{constructor(e){vt(this,"tokens"),vt(this,"
` ),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(kr.tabCharGlobal," ").replace(kr.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+= `
` :n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},cc=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||Bo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(kr.notSpaceStart))==null?void 0:r[0],l=t.replace(kr.endingNewline,"")+ `
` ;return o?'<pre><code class="language-'+Ii(o)+'">'+(n?l:Ii(l,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(n?l:Ii(l,!0))+ ` < / c o d e > < / p r e >
` }blockquote({tokens:t}){return ` < blockquote >
$ { this . parser . parse ( t ) } < / b l o c k q u o t e >
` }html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return ` < h$ { e } > $ { this . parser . parseInline ( t ) } < / h $ { e } >
` }hr(t){return ` < hr >
` }list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+ ` >
` +r+"</"+o+ ` >
` }listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ii(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose), ` < li > $ { n } < / l i >
` }checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return ` < p > $ { this . parser . parseInline ( t ) } < / p >
` }table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r= ` < tbody > $ { r } < / t b o d y > ` ) , ` < t a b l e >
< thead >
` +e+ ` < / t h e a d >
` +r+ ` < / t a b l e >
` }tablerow({text:t}){return ` < tr >
$ { t } < / t r >
` }tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align? ` < $ { n } align = "${t.align}" > ` : ` < $ { n } > ` )+e+ ` < / $ { n } >
` }strong({tokens:t}){return ` < strong > $ { this . parser . parseInline ( t ) } < / s t r o n g > ` } e m ( { t o k e n s : t } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / e m > ` } c o d e s p a n ( { t e x t : t } ) { r e t u r n ` < c o d e > $ { I i ( t , ! 0 ) } < / c o d e > ` } b r ( t ) { r e t u r n " < b r > " } d e l ( { t o k e n s : t } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / d e l > ` } l i n k ( { h r e f : t , t i t l e : e , t o k e n s : n } ) { l e t r = t h i s . p a r s e r . p a r s e I n l i n e ( n ) , o = E m ( t ) ; i f ( o = = = n u l l ) r e t u r n r ; t = o ; l e t l = ' < a h r e f = " ' + t + ' " ' ; r e t u r n e & & ( l + = ' t i t l e = " ' + I i ( e ) + ' " ' ) , l + = " > " + r + " < / a > " , l } i m a g e ( { h r e f : t , t i t l e : e , t e x t : n , t o k e n s : r } ) { r & & ( n = t h i s . p a r s e r . p a r s e I n l i n e ( r , t h i s . p a r s e r . t e x t R e n d e r e r ) ) ; l e t o = E m ( t ) ; i f ( o = = = n u l l ) r e t u r n I i ( n ) ; t = o ; l e t l = ` < i m g s r c = " $ { t } " a l t = " $ { n } " ` ; r e t u r n e & & ( l + = ` t i t l e = " $ { I i ( e ) } " ` ) , l + = " > " , l } t e x t ( t ) { r e t u r n " t o k e n s " i n t & & t . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( t . t o k e n s ) : " e s c a p e d " i n t & & t . e s c a p e d ? t . t e x t : I i ( t . t e x t ) } } , k f = c l a s s { s t r o n g ( { t e x t : t } ) { r e t u r n t } e m ( { t e x t : t } ) { r e t u r n t } c o d e s p a n ( { t e x t : t } ) { r e t u r n t } d e l ( { t e x t : t } ) { r e t u r n t } h t m l ( { t e x t : t } ) { r e t u r n t } t e x t ( { t e x t : t } ) { r e t u r n t } l i n k ( { t e x t : t } ) { r e t u r n " " + t } i m a g e ( { t e x t : t } ) { r e t u r n " " + t } b r ( ) { r e t u r n " " } } , g a = c l a s s Y h { c o n s t r u c t o r ( e ) { v t ( t h i s , " o p t i o n s " ) , v t ( t h i s , " r e n d e r e r " ) , v t ( t h i s , " t e x t R e n d e r e r " ) , t h i s . o p t i o n s = e | | B o , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w c c , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w k f } s t a t i c p a r s e ( e , n ) { r e t u r n n e w Y h ( n ) . p a r s e ( e ) } s t a t i c p a r s e I n l i n e ( e , n ) { r e t u r n n e w Y h ( n ) . p a r s e I n l i n e ( e ) } p a r s e ( e , n = ! 0 ) { v a r r , o ; l e t l = " " ; f o r ( l e t h = 0 ; h < e . l e n g t h ; h + + ) { l e t c = e [ h ] ; i f ( ( o = ( r = t h i s . o p t i o n s . e x t e n s i o n s ) = = n u l l ? v o i d 0 : r . r e n d e r e r s ) ! = n u l l & & o [ c . t y p e ] ) { l e t v = c , b = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ v . t y p e ] . c a l l ( { p a r s e r : t h i s } , v ) ; i f ( b ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " d e f " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( v . t y p e ) ) { l + = b | | " " ; c o n t i n u e } } l e t p = c ; s w i t c h ( p . t y p e ) { c a s e " s p a c e " : { l + = t h i s . r e n d e r e r . s p a c e ( p ) ; c o n t i n u e } c a s e " h r " : { l + = t h i s . r e n d e r e r . h r ( p ) ; c o n t i n u e } c a s e " h e a d i n g " : { l + = t h i s . r e n d e r e r . h e a d i n g ( p ) ; c o n t i n u e } c a s e " c o d e " : { l + = t h i s . r e n d e r e r . c o d e ( p ) ; c o n t i n u e } c a s e " t a b l e " : { l + = t h i s . r e n d e r e r . t a b l e ( p ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { l + = t h i s . r e n d e r e r . b l o c k q u o t e ( p ) ; c o n t i n u e } c a s e " l i s t " : { l + = t h i s . r e n d e r e r . l i s t ( p ) ; c o n t i n u e } c a s e " h t m l " : { l + = t h i s . r e n d e r e r . h t m l ( p ) ; c o n t i n u e } c a s e " d e f " : { l + = t h i s . r e n d e r e r . d e f ( p ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { l + = t h i s . r e n d e r e r . p a r a g r a p h ( p ) ; c o n t i n u e } c a s e " t e x t " : { l e t v = p , b = t h i s . r e n d e r e r . t e x t ( v ) ; f o r ( ; h + 1 < e . l e n g t h & & e [ h + 1 ] . t y p e = = = " t e x t " ; ) v = e [ + + h ] , b + = `
` +this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Gd,O0=(Gd=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||Bo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?ma.lex:ma.lexInline}provideParser(){return this.block?ga.parse:ga.parseInline}},vt(Gd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Gd),r9=class{constructor(...t){vt(this,"defaults",ff()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",ga),vt(this,"Renderer",cc),vt(this,"TextRenderer",kf),vt(this,"Lexer",ma),vt(this,"Tokenizer",lc),vt(this,"Hooks",O0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new cc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error( ` renderer '${l}' does not exist ` );if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new lc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error( ` tokenizer '${l}' does not exist ` );if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new O0;for(let l in n.hooks){if(!(l in o))throw new Error( ` hook '${l}' does not exist ` );if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p
Please report this to https : //github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ii(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Io=new r9;function Jt(t,e){return Io.parse(t,e)}Jt.options=Jt.setOptions=function(t){return Io.setOptions(t),Jt.defaults=Io.defaults,Xv(Jt.defaults),Jt};Jt.getDefaults=ff;Jt.defaults=Bo;Jt.use=function(...t){return Io.use(...t),Jt.defaults=Io.defaults,Xv(Jt.defaults),Jt};Jt.walkTokens=function(t,e){return Io.walkTokens(t,e)};Jt.parseInline=Io.parseInline;Jt.Parser=ga;Jt.parser=ga.parse;Jt.Renderer=cc;Jt.TextRenderer=kf;Jt.Lexer=ma;Jt.lexer=ma.lex;Jt.Tokenizer=lc;Jt.Hooks=O0;Jt.parse=Jt;Jt.options;Jt.setOptions;Jt.use;Jt.walkTokens;Jt.parseInline;ga.parse;ma.lex;var Jh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s6={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism : Lightweight , robust , elegant syntax highlighting
*
* @ license MIT < https : //opensource.org/licenses/MIT>
* @ author Lea Verou < https : //lea.verou.me>
* @ namespace
* @ public
* /var n=function(r){var o=/ ( ? : ^ | \ s ) lang ( ? : uage ) ? - ( [ \ w - ] + ) ( ? = \ s | $ ) / i , l = 0 , h = { } , c = { manual : r . Prism && r . Prism . manual , disableWorkerMessageHandler : r . Prism && r . Prism . disableWorkerMessageHandler , util : { encode : function T ( A ) { return A instanceof p ? new p ( A . type , T ( A . content ) , A . alias ) : Array . isArray ( A ) ? A . map ( T ) : A . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( /\u00a0/g , " " ) } , type : function ( T ) { return Object . prototype . toString . call ( T ) . slice ( 8 , - 1 ) } , objId : function ( T ) { return T . _ _id || Object . defineProperty ( T , "__id" , { value : ++ l } ) , T . _ _id } , clone : function T ( A , M ) { M = M || { } ; var y , N ; switch ( c . util . type ( A ) ) { case "Object" : if ( N = c . util . objId ( A ) , M [ N ] ) return M [ N ] ; y = { } , M [ N ] = y ; for ( var z in A ) A . hasOwnProperty ( z ) && ( y [ z ] = T ( A [ z ] , M ) ) ; return y ; case "Array" : return N = c . util . objId ( A ) , M [ N ] ? M [ N ] : ( y = [ ] , M [ N ] = y , A . forEach ( function ( F , P ) { y [ P ] = T ( F , M ) } ) , y ) ; default : return A } } , getLanguage : function ( T ) { for ( ; T ; ) { var A = o . exec ( T . className ) ; if ( A ) return A [ 1 ] . toLowerCase ( ) ; T = T . parentElement } return "none" } , setLanguage : function ( T , A ) { T . className = T . className . replace ( RegExp ( o , "gi" ) , "" ) , T . classList . add ( "language-" + A ) } , currentScript : function ( ) { if ( typeof document > "u" ) return null ; if ( document . currentScript && document . currentScript . tagName === "SCRIPT" && 1 < 2 ) return document . currentScript ; try { throw new Error } catch ( y ) { var T = ( /at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i . exec ( y . stack ) || [ ] ) [ 1 ] ; if ( T ) { var A = document . getElementsByTagName ( "script" ) ; for ( var M in A ) if ( A [ M ] . src == T ) return A [ M ] } return null } } , isActive : function ( T , A , M ) { for ( var y = "no-" + A ; T ; ) { var N = T . classList ; if ( N . contains ( A ) ) return ! 0 ; if ( N . contains ( y ) ) return ! 1 ; T = T . parentElement } return ! ! M } } , languages : { plain : h , plaintext : h , text : h , txt : h , extend : function ( T , A ) { var M = c . util . clone ( c . languages [ T ] ) ; for ( var y in A ) M [ y ] = A [ y ] ; return M } , insertBefore : function ( T , A , M , y ) { y = y || c . languages ; var N = y [ T ] , z = { } ; for ( var F in N ) if ( N . hasOwnProperty ( F ) ) { if ( F == A ) for ( var P in M ) M . hasOwnProperty ( P ) && ( z [ P ] = M [ P ] ) ; M . hasOwnProperty ( F ) || ( z [ F ] = N [ F ] ) } var Y = y [ T ] ; return y [ T ] = z , c . languages . DFS ( c . languages , function ( te , ce ) { ce === Y && te != T && ( this [ te ] = z ) } ) , z } , DFS : function T ( A , M , y , N ) { N = N || { } ; var z = c . util . objId ; for ( var F in A ) if ( A . hasOwnProperty ( F ) ) { M . call ( A , F , A [ F ] , y || F ) ; var P = A [ F ] , Y = c . util . type ( P ) ; Y === "Object" && ! N [ z ( P ) ] ? ( N [ z ( P ) ] = ! 0 , T ( P , M , null , N ) ) : Y === "Array" && ! N [ z ( P ) ] && ( N [ z ( P ) ] = ! 0 , T ( P , M , F , N ) ) } } } , plugins : { } , highlightAll : function ( T , A ) { c . highlightAllUnder ( document , T , A ) } , highlightAllUnder : function ( T , A , M ) { var y = { callback : M , container : T , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; c . hooks . run ( "before-highlightall" , y ) , y . elements = Array . prototype . slice . apply ( y . container . querySelectorAll ( y . selector ) ) , c . hooks . run ( "before-all-elements-highlight" , y ) ; for ( var N = 0 , z ; z = y . elements [ N ++ ] ; ) c . highlightElement ( z , A === ! 0 , y . callback ) } , highlightElement : function ( T , A , M ) { var y = c . util . getLanguage ( T ) , N = c . languages [ y ] ; c . util . setLanguage ( T , y ) ; var z = T . parentElement ; z && z . nodeName . toLowerCase ( ) === "pre" && c . util . setLanguage ( z , y ) ; var F = T . textContent , P = { element : T , language : y , grammar : N , code : F } ; function Y ( ce ) { P . highlightedCode = ce , c . hooks . run ( "before-insert" , P ) , P . element . innerHTML = P . highlightedCode , c . hooks . run ( "after-highlight" , P ) , c . hooks . run ( "complete" , P ) , M && M . call ( P . element ) } if ( c . hooks . run ( "before-sanity-check" , P ) , z = P . element . parentElement , z && z . nodeName . toLowerCase ( ) === "pre" && ! z . hasAttribute ( "tabindex" ) && z . setAttribute ( "tabindex" , "0" ) , ! P . code ) { c . hooks . run ( "complete" , P ) , M && M . call ( P . element ) ; return } if ( c . hooks . run ( "before-highlight" , P ) , ! P . grammar ) { Y ( c . util . encode ( P . code ) ) ; return } if ( A && r . Worker ) { var te = new Worker ( c . filename ) ; te . onmessage = function ( ce ) { Y ( ce . data ) } , te . postMessage ( JSON . stringify ( { language : P . language , code : P . code , immediateClose : ! 0 } ) ) } else Y ( c . highlight ( P . code , P . grammar , P . language ) ) } , highlight : function ( T , A , M ) { var y = { code : T , grammar : A , language : M } ; if ( c . hooks . run ( "before-tokenize" , y ) , ! y . grammar ) throw new Error ( 'The language "' + y . language + '" has no grammar.' ) ; return y . tokens = c . tokenize ( y . code , y . grammar ) , c . hooks . run ( "after-tokenize" , y ) , p . stringify ( c . util . encode ( y . tokens ) , y . language ) } , tokenize : function ( T , A ) { var M = A . rest ; if ( M ) { for ( var y in M ) A [ y ] = M [ y ] ; delete A . rest } var N = new g ; return m ( N , N . head , T )
` ),S.hasAttribute("data-start")||S.setAttribute("data-start",String(F+1))}k.textContent=y,n.highlightElement(k)},function(y){S.setAttribute(c,b),k.textContent=y})}}),n.plugins.fileHighlight={highlight:function(w){for(var S=(w||document).querySelectorAll(g),k=0,C;C=S[k++];)n.highlightElement(C)}},n.fileHighlight=function(){n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(s6);var i9=s6.exports;const Mm=o6(i9);class jr{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new jr(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class ii{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new ii(n,jr.range(this,e))}}let et=class l6{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g," $ &̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=l6.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}};et.prototype.__proto__=Error.prototype;var a9=function(t,e){return t.indexOf(e)!==-1},o9=function(t,e){return t===void 0?e:t},s9=/([A-Z])/g,l9=function(t){return t.replace(s9,"- $ 1").toLowerCase()},c9={"&":"&",">":">","<":"<",'"':""","'":"'"},u9=/[&><"']/g;function d9(t){return String(t).replace(u9,e=>c9[e])}var c6=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},h9=function(t){var e=c6(t);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},p9=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},f9=function(t){var e=/^[ \x 00- \x 20]*([^ \\ /#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+ \- .]* $ /.test(e[1])?null:e[1].toLowerCase():"_relative"},wt={contains:a9,deflt:o9,escape:d9,hyphenate:l9,getBaseElem:c6,isCharacterBox:h9,protocolFromUrl:f9},H0={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:t=>"#"+t},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:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, ` \ \ sqrt ` top lines, ` { array } ` vertical lines, ` \ \ hline ` , ` \ \ hdashline ` , ` \ \ underline ` , ` \ \ overline ` , and the borders of ` \ \ fbox ` , ` \ \ boxed ` , and ` \ \ fcolorbox ` .",processor:t=>Math.max(0,t),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:
c - 2.7 , 0 , - 7.17 , - 2.7 , - 13.5 , - 8 c - 5.8 , - 5.3 , - 9.5 , - 10 , - 9.5 , - 14
c0 , - 2 , 0.3 , - 3.3 , 1 , - 4 c1 . 3 , - 2.7 , 23.83 , - 20.7 , 67.5 , - 54
c44 . 2 , - 33.3 , 65.8 , - 50.3 , 66.5 , - 51 c1 . 3 , - 1.3 , 3 , - 2 , 5 , - 2 c4 . 7 , 0 , 8.7 , 3.3 , 12 , 10
s173 , 378 , 173 , 378 c0 . 7 , 0 , 35.3 , - 71 , 104 , - 213 c68 . 7 , - 142 , 137.5 , - 285 , 206.5 , - 429
c69 , - 144 , 104.5 , - 217.7 , 106.5 , - 221
l ` +t/2.075+" -"+t+ `
c5 . 3 , - 9.3 , 12 , - 14 , 20 , - 14
H400000v ` +(40+t)+ ` H845 . 2724
s - 225.272 , 467 , - 225.272 , 467 s - 235 , 486 , - 235 , 486 c - 2.7 , 4.7 , - 9 , 7 , - 19 , 7
c - 6 , 0 , - 10 , - 1 , - 12 , - 3 s - 194 , - 422 , - 194 , - 422 s - 65 , 47 , - 65 , 47 z
M ` +(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},E9=function(t,e){return"M263,"+(601+t+e)+ ` c0 . 7 , 0 , 18 , 39.7 , 52 , 119
c34 , 79.3 , 68.167 , 158.7 , 102.5 , 238 c34 . 3 , 79.3 , 51.8 , 119.3 , 52.5 , 120
c340 , - 704.7 , 510.7 , - 1060.3 , 512 , - 1067
l ` +t/2.084+" -"+t+ `
c4 . 7 , - 7.3 , 11 , - 11 , 19 , - 11
H40000v ` +(40+t)+ ` H1012 . 3
s - 271.3 , 567 , - 271.3 , 567 c - 38.7 , 80.7 , - 84 , 175 , - 136 , 283 c - 52 , 108 , - 89.167 , 185.3 , - 111.5 , 232
c - 22.3 , 46.7 , - 33.8 , 70.3 , - 34.5 , 71 c - 4.7 , 4.7 , - 12.3 , 7 , - 23 , 7 s - 12 , - 1 , - 12 , - 1
s - 109 , - 253 , - 109 , - 253 c - 72.7 , - 168 , - 109.3 , - 252 , - 110 , - 252 c - 10.7 , 8 , - 22 , 16.7 , - 34 , 26
c - 22 , 17.3 , - 33.3 , 26 , - 34 , 26 s - 26 , - 26 , - 26 , - 26 s76 , - 59 , 76 , - 59 s76 , - 60 , 76 , - 60 z
M ` +(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},T9=function(t,e){return"M983 "+(10+t+e)+ `
l ` +t/3.13+" -"+t+ `
c4 , - 6.7 , 10 , - 10 , 18 , - 10 H400000v ` +(40+t)+ `
H1013 . 1 s - 83.4 , 268 , - 264.1 , 840 c - 180.7 , 572 , - 277 , 876.3 , - 289 , 913 c - 4.7 , 4.7 , - 12.7 , 7 , - 24 , 7
s - 12 , 0 , - 12 , 0 c - 1.3 , - 3.3 , - 3.7 , - 11.7 , - 7 , - 25 c - 35.3 , - 125.3 , - 106.7 , - 373.3 , - 214 , - 744
c - 10 , 12 , - 21 , 25 , - 33 , 39 s - 32 , 39 , - 32 , 39 c - 6 , - 5.3 , - 15 , - 14 , - 27 , - 26 s25 , - 30 , 25 , - 30
c26 . 7 , - 32.7 , 52 , - 63 , 76 , - 91 s52 , - 60 , 52 , - 60 s208 , 722 , 208 , 722
c56 , - 175.3 , 126.3 , - 397.3 , 211 , - 666 c84 . 7 , - 268.7 , 153.8 , - 488.2 , 207.5 , - 658.5
c53 . 7 , - 170.3 , 84.5 , - 266.8 , 92.5 , - 289.5 z
M ` +(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},A9=function(t,e){return"M424,"+(2398+t+e)+ `
c - 1.3 , - 0.7 , - 38.5 , - 172 , - 111.5 , - 514 c - 73 , - 342 , - 109.8 , - 513.3 , - 110.5 , - 514
c0 , - 2 , - 10.7 , 14.3 , - 32 , 49 c - 4.7 , 7.3 , - 9.8 , 15.7 , - 15.5 , 25 c - 5.7 , 9.3 , - 9.8 , 16 , - 12.5 , 20
s - 5 , 7 , - 5 , 7 c - 4 , - 3.3 , - 8.3 , - 7.7 , - 13 , - 13 s - 13 , - 13 , - 13 , - 13 s76 , - 122 , 76 , - 122 s77 , - 121 , 77 , - 121
s209 , 968 , 209 , 968 c0 , - 2 , 84.7 , - 361.7 , 254 , - 1079 c169 . 3 , - 717.3 , 254.7 , - 1077.7 , 256 , - 1081
l ` +t/4.223+" -"+t+ ` c4 , - 6.7 , 10 , - 10 , 18 , - 10 H400000
v ` +(40+t)+ ` H1014 . 6
s - 87.3 , 378.7 , - 272.6 , 1166 c - 185.3 , 787.3 , - 279.3 , 1182.3 , - 282 , 1185
c - 2 , 6 , - 10 , 9 , - 24 , 9
c - 8 , 0 , - 12 , - 0.7 , - 12 , - 2 z M ` +(1001+t)+" "+e+ `
h400000v ` +(40+t)+"h-400000z"},M9=function(t,e){return"M473,"+(2713+t+e)+ `
c339 . 3 , - 1799.3 , 509.3 , - 2700 , 510 , - 2702 l ` +t/5.298+" -"+t+ `
c3 . 3 , - 7.3 , 9.3 , - 11 , 18 , - 11 H400000v ` +(40+t)+ ` H1017 . 7
s - 90.5 , 478 , - 276.2 , 1466 c - 185.7 , 988 , - 279.5 , 1483 , - 281.5 , 1485 c - 2 , 6 , - 10 , 9 , - 24 , 9
c - 8 , 0 , - 12 , - 0.7 , - 12 , - 2 c0 , - 1.3 , - 5.3 , - 32 , - 16 , - 92 c - 50.7 , - 293.3 , - 119.7 , - 693.3 , - 207 , - 1200
c0 , - 1.3 , - 5.3 , 8.7 , - 16 , 30 c - 10.7 , 21.3 , - 21.3 , 42.7 , - 32 , 64 s - 16 , 33 , - 16 , 33 s - 26 , - 26 , - 26 , - 26
s76 , - 153 , 76 , - 153 s77 , - 151 , 77 , - 151 c0 . 7 , 0.7 , 35.7 , 202 , 105 , 604 c67 . 3 , 400.7 , 102 , 602.7 , 104 ,
606 zM ` +(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},C9=function(t){var e=t/2;return"M400000 "+t+" H0 L"+e+" 0 l65 45 L145 "+(t-80)+" H400000z"},L9=function(t,e,n){var r=n-54-e-t;return"M702 "+(t+e)+"H400000"+(40+t)+ `
H742v ` +r+ ` l - 4 4 - 4 4 c - . 667.7 - 2 1.5 - 4 2.5 s - 4.167 1.833 - 6.5 2.5 - 5.5 1 - 9.5 1
h - 12 l - 28 - 84 c - 16.667 - 52 - 96.667 - 294.333 - 240 - 727 l - 212 - 643 - 85 170
c - 4 - 3.333 - 8.333 - 7.667 - 13 - 13 l - 13 - 13 l77 - 155 77 - 156 c66 199.333 139 419.667
219 661 l218 661 zM702 ` +e+"H400000v"+(40+t)+"H742z"},_9=function(t,e,n){e=1e3*e;var r="";switch(t){case"sqrtMain":r=S9(e,Wo);break;case"sqrtSize1":r=E9(e,Wo);break;case"sqrtSize2":r=T9(e,Wo);break;case"sqrtSize3":r=A9(e,Wo);break;case"sqrtSize4":r=M9(e,Wo);break;case"sqrtTall":r=L9(e,Wo,n)}return r},N9=function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣ ":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z"+("M367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z");case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257z"+("M478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z");default:return""}},Cm={doubleleftarrow: ` M262 157
l10 - 10 c34 - 36 62.7 - 77 86 - 123 3.3 - 8 5 - 13.3 5 - 16 0 - 5.3 - 6.7 - 8 - 20 - 8 - 7.3
0 - 12.2 . 5 - 14.5 1.5 - 2.3 1 - 4.8 4.5 - 7.5 10.5 - 49.3 97.3 - 121.7 169.3 - 217 216 - 28
14 - 57.3 25 - 88 33 - 6.7 2 - 11 3.8 - 13 5.5 - 2 1.7 - 3 4.2 - 3 7.5 s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13 h6c12 - . 7 18 - 4 18 - 10 0 - 2 - 1.7 - 7 - 5 - 15 - 23.3 - 46 - 52 - 87
- 86 - 123 l - 10 - 10 h399738v - 40 H218c328 0 0 0 0 0 l - 10 - 8 c - 26.7 - 20 - 65.7 - 43 - 117 - 69 2.7
- 2 6 - 3.7 10 - 5 36.7 - 16 72.3 - 37.3 107 - 64 l10 - 8 h399782v - 40 z
m8 0 v40h399730v - 40 zm0 194 v40h399730v - 40 z ` ,doublerightarrow: ` M399738 392 l
- 10 10 c - 34 36 - 62.7 77 - 86 123 - 3.3 8 - 5 13.3 - 5 16 0 5.3 6.7 8 20 8 7.3 0 12.2 - . 5
14.5 - 1.5 2.3 - 1 4.8 - 4.5 7.5 - 10.5 49.3 - 97.3 121.7 - 169.3 217 - 216 28 - 14 57.3 - 25 88
- 33 6.7 - 2 11 - 3.8 13 - 5.5 2 - 1.7 3 - 4.2 3 - 7.5 s - 1 - 5.8 - 3 - 7.5 c - 2 - 1.7 - 6.3 - 3.5 - 13 - 5.5 - 68
- 17.3 - 128.2 - 47.8 - 180.5 - 91.5 - 52.3 - 43.7 - 93.8 - 96.2 - 124.5 - 157.5 - 9.3 - 8 - 15.3 - 12.3 - 18
- 13 h - 6 c - 12 . 7 - 18 4 - 18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123 l10 10 H0v40h399782
c - 328 0 0 0 0 0 l10 8 c26 . 7 20 65.7 43 117 69 - 2.7 2 - 6 3.7 - 10 5 - 36.7 16 - 72.3 37.3
- 107 64 l - 10 8 H0v40zM0 157 v40h399730v - 40 zm0 194 v40h399730v - 40 z ` ,leftarrow: ` M400000 241 H110l3 - 3 c68 . 7 - 52.7 113.7 - 120
135 - 202 4 - 14.7 6 - 23 6 - 25 0 - 7.3 - 7 - 11 - 21 - 11 - 8 0 - 13.2 . 8 - 15.5 2.5 - 2.3 1.7 - 4.2 5.8
- 5.5 12.5 - 1.3 4.7 - 2.7 10.3 - 4 17 - 12 48.7 - 34.8 92 - 68.5 130 S65 . 3 228.3 18 247
c - 10 4 - 16 7.7 - 18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85 S196 441.3 208
490 c . 7 2 1.3 5 2 9 s1 . 2 6.7 1.5 8 c . 3 1.3 1 3.3 2 6 s2 . 2 4.5 3.5 5.5 c1 . 3 1 3.3
1.8 6 2.5 s6 1 10 1 c14 0 21 - 3.7 21 - 11 0 - 2 - 2 - 10.3 - 6 - 25 - 20 - 79.3 - 65 - 146.7 - 135 - 202
l - 3 - 3 h399890zM100 241 v40h399900v - 40 z ` ,leftbrace: ` M6 548 l - 6 - 6 v - 35 l6 - 11 c56 - 104 135.3 - 181.3 238 - 232 57.3 - 28.7 117
- 45 179 - 50 h399577v120H403c - 43.3 7 - 81 15 - 113 26 - 100.7 33 - 179.7 91 - 237 174 - 2.7
5 - 6 9 - 10 13 - . 7 1 - 7.3 1 - 20 1 H6z ` ,leftbraceunder: ` M0 6 l6 - 6 h17c12 . 688 0 19.313 . 3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5 . 688
0 2 . 3 4 1 18.688 2.7 76 4.3 172 5 h399450v120H429l - 6 - 1 c - 124.688 - 8 - 235 - 61.7
- 331 - 161 C60 . 687 138.7 32.312 99.3 7 54 L0 41 V6z ` ,leftgroup: ` M400000 80
H435C64 80 168.3 229.4 21 260 c - 5.9 1.2 - 18 0 - 18 0 - 2 0 - 3 - 1 - 3 - 3 v - 38 C76 61 257 0
435 0 h399565z ` ,leftgroupunder: ` M400000 262
H435C64 262 168.3 112.6 21 82 c - 5.9 - 1.2 - 18 0 - 18 0 - 2 0 - 3 1 - 3 3 v38c76 158 257 219
435 219 h399565z ` ,leftharpoon: ` M0 267 c . 7 5.3 3 10 7 14 h399993v - 40 H93c3 . 3
- 3.3 10.2 - 9.5 20.5 - 18.5 s17 . 8 - 15.8 22.5 - 20.5 c50 . 7 - 52 88 - 110.3 112 - 175 4 - 11.3 5
- 18.3 3 - 21 - 1.3 - 4 - 7.3 - 6 - 18 - 6 - 8 0 - 13 . 7 - 15 2 s - 4.7 6.7 - 8 16 c - 42 98.7 - 107.3 174.7
- 196 228 - 6.7 4.7 - 10.7 8 - 12 10 - 1.3 2 - 2 5.7 - 2 11 zm100 - 26 v40h399900v - 40 z ` ,leftharpoonplus: ` M0 267 c . 7 5.3 3 10 7 14 h399993v - 40 H93c3 . 3 - 3.3 10.2 - 9.5
20.5 - 18.5 s17 . 8 - 15.8 22.5 - 20.5 c50 . 7 - 52 88 - 110.3 112 - 175 4 - 11.3 5 - 18.3 3 - 21 - 1.3
- 4 - 7.3 - 6 - 18 - 6 - 8 0 - 13 . 7 - 15 2 s - 4.7 6.7 - 8 16 c - 42 98.7 - 107.3 174.7 - 196 228 - 6.7 4.7
- 10.7 8 - 12 10 - 1.3 2 - 2 5.7 - 2 11 zm100 - 26 v40h399900v - 40 zM0 435 v40h400000v - 40 z
m0 0 v40h400000v - 40 z ` ,leftharpoondown: ` M7 241 c - 4 4 - 6.333 8.667 - 7 14 0 5.333 . 667 9 2 11 s5 . 333
5.333 12 10 c90 . 667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 . 667 5
1 9 1 h5c10 . 667 0 16.667 - 2 18 - 6 2 - 2.667 1 - 9.667 - 3 - 21 - 32 - 87.333 - 82.667 - 157.667
- 152 - 211 l - 3 - 3 h399907v - 40 zM93 281 H400000 v - 40 L7 241 z ` ,leftharpoondownplus: ` M7 435 c - 4 4 - 6.3 8.7 - 7 14 0 5.3 . 7 9 2 11 s5 . 3 5.3 12
10 c90 . 7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 . 7 5 1 9 1 h5c10 . 7 0 16.7
- 2 18 - 6 2 - 2.7 1 - 9.7 - 3 - 21 - 32 - 87.3 - 82.7 - 157.7 - 152 - 211 l - 3 - 3 h399907v - 40 H7zm93 0
v40h399900v - 40 zM0 241 v40h399900v - 40 zm0 0 v40h399900v - 40 z ` ,lefthook: ` M400000 281 H103s - 33 - 11.2 - 61 - 33.5 S0 197.3 0 164 s14 . 2 - 61.2 42.5
- 83.5 C70 . 8 58.2 104 47 142 47 c16 . 7 0 25 6.7 25 20 0 12 - 8.7 18.7 - 26 20 - 40 3.3
- 68.7 15.7 - 86 37 - 10 12 - 15 25.3 - 15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23 h399859zM103 281 v - 40 h399897v40z ` ,leftlinesegment: ` M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z ` ,leftmapsto: ` M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z ` ,leftToFrom: ` M0 147 h400000v40H0zm0 214 c68 40 115.7 95.7 143 167 h22c15 . 3 0 23
- . 3 23 - 1 0 - 1.3 - 5.3 - 13.7 - 16 - 37 - 18 - 35.3 - 41.3 - 69 - 70 - 101 l - 7 - 8 h399905v - 40 H95l7 - 8
c28 . 7 - 32 52 - 65.7 70 - 101 10.7 - 23.3 16 - 35.7 16 - 37 0 - . 7 - 7.7 - 1 - 23 - 1 h - 22 C115 . 7 265.3
68 321 0 361 zm0 - 174 v - 40 h399900v40zm100 154 v40h399900v - 40 z ` ,longequal: ` M0 50 h400000 v40H0z m0 194 h40000v40H0z
M0 50 h400000 v40H0z m0 194 h40000v40H0z ` ,midbrace: ` M200428 334
c - 100.7 - 8.3 - 195.3 - 44 - 280 - 108 - 55.3 - 42 - 101.7 - 93 - 139 - 153 l - 9 - 14 c - 2.7 4 - 5.7 8.7 - 9 14
- 53.3 86.7 - 123.7 153 - 211 199 - 66.7 36 - 137.3 56.3 - 212 62 H0V214h199568c178 . 3 - 11.7
311.7 - 78.3 403 - 201 6 - 8 9.7 - 12 11 - 12 . 7 - . 7 6.7 - 1 18 - 1 s17 . 3.3 18 1 c1 . 3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141 s145 . 3 54.3 229 60 h199572v120z ` ,midbraceunder: ` M199572 214
c100 . 7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153 l9 14 c2 . 7 - 4 5.7 - 8.7 9 - 14
53.3 - 86.7 123.7 - 153 211 - 199 66.7 - 36 137.3 - 56.3 212 - 62 h199568v120H200432c - 178.3
11.7 - 311.7 78.3 - 403 201 - 6 8 - 9.7 12 - 11 12 - . 7.7 - 6.7 1 - 18 1 s - 17.3 - . 3 - 18 - 1 c - 1.3 0
- 5 - 4 - 11 - 12 - 44.7 - 59.3 - 101.3 - 106.3 - 170 - 141 s - 145.3 - 54.3 - 229 - 60 H0V214z ` ,oiintSize1: ` M512 . 6 71.6 c272 . 6 0 320.3 106.8 320.3 178.2 0 70.8 - 47.7 177.6
- 320.3 177.6 S193 . 1 320.6 193.1 249.8 c0 - 71.4 46.9 - 178.2 319.5 - 178.2 z
m368 . 1 178.2 c0 - 86.4 - 60.9 - 215.4 - 368.1 - 215.4 - 306.4 0 - 367.3 129 - 367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1 - 129 368.1 - 214.8 z ` ,oiintSize2: ` M757 . 8 100.1 c384 . 7 0 451.1 137.6 451.1 230 0 91.3 - 66.4 228.8
- 451.1 228.8 - 386.3 0 - 452.7 - 137.5 - 452.7 - 228.8 0 - 92.4 66.4 - 230 452.7 - 230 z
m502 . 4 230 c0 - 111.2 - 82.4 - 277.2 - 502.4 - 277.2 s - 504 166 - 504 277.2
c0 110 84 276 504 276 s502 . 4 - 166 502.4 - 276 z ` ,oiiintSize1: ` M681 . 4 71.6 c408 . 9 0 480.5 106.8 480.5 178.2 0 70.8 - 71.6 177.6
- 480.5 177.6 S202 . 1 320.6 202.1 249.8 c0 - 71.4 70.5 - 178.2 479.3 - 178.2 z
m525 . 8 178.2 c0 - 86.4 - 86.8 - 215.4 - 525.7 - 215.4 - 437.9 0 - 524.7 129 - 524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7 - 129 525.7 - 214.8 z ` ,oiiintSize2: ` M1021 . 2 53 c603 . 6 0 707.8 165.8 707.8 277.2 0 110 - 104.2 275.8
- 707.8 275.8 - 606 0 - 710.2 - 165.8 - 710.2 - 275.8 C311 218.8 415.2 53 1021.2 53 z
m770 . 4 277.1 c0 - 131.2 - 126.4 - 327.6 - 770.5 - 327.6 S248 . 4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4 s770 . 5 - 196.4 770.5 - 326.4 z ` ,rightarrow: ` M0 241 v40h399891c - 47.3 35.3 - 84 78 - 110 128
- 16.7 32 - 27.7 63.7 - 33 95 0 1.3 - . 2 2.7 - . 5 4 - . 3 1.3 - . 5 2.3 - . 5 3 0 7.3 6.7 11 20
11 8 0 13.2 - . 8 15.5 - 2.5 2.3 - 1.7 4.2 - 5.5 5.5 - 11.5 2 - 13.3 5.7 - 27 11 - 41 14.7 - 44.7
39 - 84.5 73 - 119.5 s73 . 7 - 60.2 119 - 75.5 c6 - 2 9 - 5.7 9 - 11 s - 3 - 9 - 9 - 11 c - 45.3 - 15.3 - 85
- 40.5 - 119 - 75.5 s - 58.3 - 74.8 - 73 - 119.5 c - 4.7 - 14 - 8.3 - 27.3 - 11 - 40 - 1.3 - 6.7 - 3.2 - 10.8 - 5.5
- 12.5 - 2.3 - 1.7 - 7.5 - 2.5 - 15.5 - 2.5 - 14 0 - 21 3.7 - 21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205 zm0 0 v40h399900v - 40 z ` ,rightbrace: ` M400000 542 l
- 6 6 h - 17 c - 12.7 0 - 19.3 - . 3 - 20 - 1 - 4 - 4 - 7.3 - 8.3 - 10 - 13 - 35.3 - 51.3 - 80.8 - 93.8 - 136.5 - 127.5
s - 117.2 - 55.8 - 184.5 - 66.5 c - . 7 0 - 2 - . 3 - 4 - 1 - 18.7 - 2.7 - 76 - 4.3 - 172 - 5 H0V214h399571l6 1
c124 . 7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118 l7 13 v35z ` ,rightbraceunder: ` M399994 0 l6 6 v35l - 6 11 c - 56 104 - 135.3 181.3 - 238 232 - 57.3
28.7 - 117 45 - 179 50 H - 300 V214h399897c43 . 3 - 7 81 - 15 113 - 26 100.7 - 33 179.7 - 91 237
- 174 2.7 - 5 6 - 9 10 - 13 . 7 - 1 7.3 - 1 20 - 1 h17z ` ,rightgroup: ` M0 80 h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3 - 1 3 - 3 v - 38 c - 76 - 158 - 257 - 219 - 435 - 219 H0z ` ,rightgroupunder: ` M0 262 h399565c371 0 266.7 - 149.4 414 - 180 5.9 - 1.2 18 0 18
0 2 0 3 1 3 3 v38c - 76 158 - 257 219 - 435 219 H0z ` ,rightharpoon: ` M0 241 v40h399993c4 . 7 - 4.7 7 - 9.3 7 - 14 0 - 9.3
- 3.7 - 15.3 - 11 - 18 - 92.7 - 56.7 - 159 - 133.7 - 199 - 231 - 3.3 - 9.3 - 6 - 14.7 - 8 - 16 - 2 - 1.3 - 7 - 2 - 15 - 2
- 10.7 0 - 16.7 2 - 18 6 - 2 2.7 - 1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5 zm0 0 v40h399900v - 40 z ` ,rightharpoonplus: ` M0 241 v40h399993c4 . 7 - 4.7 7 - 9.3 7 - 14 0 - 9.3 - 3.7 - 15.3 - 11
- 18 - 92.7 - 56.7 - 159 - 133.7 - 199 - 231 - 3.3 - 9.3 - 6 - 14.7 - 8 - 16 - 2 - 1.3 - 7 - 2 - 15 - 2 - 10.7 0 - 16.7
2 - 18 6 - 2 2.7 - 1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5 z
m0 0 v40h399900v - 40 z m100 194 v40h399900v - 40 zm0 0 v40h399900v - 40 z ` ,rightharpoondown: ` M399747 511 c0 7.3 6.7 11 20 11 8 0 13 - . 8 15 - 2.5 s4 . 7 - 6.8
8 - 15.5 c40 - 94 99.3 - 166.3 178 - 217 13.3 - 8 20.3 - 12.3 21 - 13 5.3 - 3.3 8.5 - 5.8 9.5
- 7.5 1 - 1.7 1.5 - 5.2 1.5 - 10.5 s - 2.3 - 10.3 - 7 - 15 H0v40h399908c - 34 25.3 - 64.7 57 - 92 95
- 27.3 38 - 48.7 77.7 - 64 119 - 3.3 8.7 - 5 14 - 5 16 zM0 241 v40h399900v - 40 z ` ,rightharpoondownplus: ` M399747 705 c0 7.3 6.7 11 20 11 8 0 13 - . 8
15 - 2.5 s4 . 7 - 6.8 8 - 15.5 c40 - 94 99.3 - 166.3 178 - 217 13.3 - 8 20.3 - 12.3 21 - 13 5.3 - 3.3
8.5 - 5.8 9.5 - 7.5 1 - 1.7 1.5 - 5.2 1.5 - 10.5 s - 2.3 - 10.3 - 7 - 15 H0v40h399908c - 34 25.3
- 64.7 57 - 92 95 - 27.3 38 - 48.7 77.7 - 64 119 - 3.3 8.7 - 5 14 - 5 16 zM0 435 v40h399900v - 40 z
m0 - 194 v40h400000v - 40 zm0 0 v40h400000v - 40 z ` ,righthook: ` M399859 241 c - 764 0 0 0 0 0 40 - 3.3 68.7 - 15.7 86 - 37 10 - 12 15 - 25.3
15 - 40 0 - 22.7 - 9.8 - 40.7 - 29.5 - 54 - 19.7 - 13.3 - 43.5 - 21 - 71.5 - 23 - 17.3 - 1.3 - 26 - 8 - 26 - 20 0
- 13.3 8.7 - 20 26 - 20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8 s - 14 61.2 - 42 83.5 c - 28 22.3 - 61 33.5 - 99 33.5 L0 241 z M0 281 v - 40 h399859v40z ` ,rightlinesegment: ` M399960 241 V94 h40 V428 h - 40 V281 H0 v - 40 z
M399960 241 V94 h40 V428 h - 40 V281 H0 v - 40 z ` ,rightToFrom: ` M400000 167 c - 70.7 - 42 - 118 - 97.7 - 142 - 167 h - 23 c - 15.3 0 - 23 . 3 - 23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101 l7 8 H0v40h399905l - 7 8 c - 28.7 32
- 52 65.7 - 70 101 - 10.7 23.3 - 16 35.7 - 16 37 0 . 7 7.7 1 23 1 h23c24 - 69.3 71.3 - 125 142
- 167 z M100 147 v40h399900v - 40 zM0 341 v40h399900v - 40 z ` ,twoheadleftarrow: ` M0 167 c68 40
115.7 95.7 143 167 h22c15 . 3 0 23 - . 3 23 - 1 0 - 1.3 - 5.3 - 13.7 - 16 - 37 - 18 - 35.3 - 41.3 - 69
- 70 - 101 l - 7 - 8 h125l9 7 c50 . 7 39.3 85 86 103 140 h46c0 - 4.7 - 6.3 - 18.7 - 19 - 42 - 18 - 35.3
- 40 - 67.3 - 66 - 96 l - 9 - 9 h399716v - 40 H284l9 - 9 c26 - 28.7 48 - 60.7 66 - 96 12.7 - 23.333 19
- 37.333 19 - 42 h - 46 c - 18 54 - 52.3 100.7 - 103 140 l - 9 7 H95l7 - 8 c28 . 7 - 32 52 - 65.7 70 - 101
10.7 - 23.333 16 - 35.7 16 - 37 0 - . 7 - 7.7 - 1 - 23 - 1 h - 22 C115 . 7 71.3 68 127 0 167 z ` ,twoheadrightarrow: ` M400000 167
c - 68 - 40 - 115.7 - 95.7 - 143 - 167 h - 22 c - 15.3 0 - 23 . 3 - 23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101 l7 8 h - 125 l - 9 - 7 c - 50.7 - 39.3 - 85 - 86 - 103 - 140 h - 46 c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96 l9 9 H0v40h399716l - 9 9 c - 26 28.7 - 48 60.7 - 66 96 - 12.7 23.333
- 19 37.333 - 19 42 h46c18 - 54 52.3 - 100.7 103 - 140 l9 - 7 h125l - 7 8 c - 28.7 32 - 52 65.7 - 70
101 - 10.7 23.333 - 16 35.7 - 16 37 0 . 7 7.7 1 23 1 h22c27 . 3 - 71.3 75 - 127 143 - 167 z ` ,tilde1: ` M200 55.538 c - 77 0 - 168 73.953 - 177 73.953 - 3 0 - 7
- 2.175 - 9 - 5.437 L2 97 c - 1 - 2 - 2 - 4 - 2 - 6 0 - 4 2 - 7 5 - 9 l20 - 12 C116 12 171 0 207 0 c86 0
114 68 191 68 78 0 168 - 68 177 - 68 4 0 7 2 9 5 l12 19 c1 2.175 2 4.35 2 6.525 0
4.35 - 2 7.613 - 5 9.788 l - 19 13.05 c - 92 63.077 - 116.937 75.308 - 183 76.128
- 68.267 . 847 - 113 - 73.952 - 191 - 73.952 z ` ,tilde2: ` M344 55.266 c - 142 0 - 300.638 81.316 - 311.5 86.418
- 8.01 3.762 - 22.5 10.91 - 23.5 5.562 L1 120 c - 1 - 2 - 1 - 3 - 1 - 4 0 - 5 3 - 9 8 - 10 l18 . 4 - 9 C160 . 9
31.9 283 0 358 0 c148 0 188 122 331 122 s314 - 97 326 - 97 c4 0 8 2 10 7 l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347 - 3 9.626 - 7 10.696 l - 22.3 12.622 C852 . 6 158.372 751
181.476 676 181.476 c - 149 0 - 189 - 126.21 - 332 - 126.21 z ` ,tilde3: ` M786 59 C457 59 32 175.242 13 175.242 c - 6 0 - 10 - 3.457
- 11 - 10.37 L . 15 138 c - 1 - 7 3 - 12 10 - 13 l19 . 2 - 6.4 C378 . 4 40.7 634.3 0 804.3 0 c337 0
411.8 157 746.8 157 328 0 754 - 112 773 - 112 5 0 10 3 11 9 l1 14.075 c1 8.066 - . 697
16.595 - 6.697 17.492 l - 21.052 7.31 c - 367.9 98.146 - 609.15 122.696 - 778.15 122.696
- 338 0 - 409 - 156.573 - 744 - 156.573 z ` ,tilde4: ` M786 58 C457 58 32 177.487 13 177.487 c - 6 0 - 10 - 3.345
- 11 - 10.035 L . 15 143 c - 1 - 7 3 - 12 10 - 13 l22 - 6.7 C381 . 2 35 637.15 0 807.15 0 c337 0 409
177 744 177 328 0 754 - 127 773 - 127 5 0 10 3 11 9 l1 14.794 c1 7.805 - 3 13.38 - 9
14.495 l - 20.7 5.574 c - 366.85 99.79 - 607.3 139.372 - 776.3 139.372 - 338 0 - 409
- 175.236 - 744 - 175.236 z ` ,vec: ` M377 20 c0 - 5.333 1.833 - 10 5.5 - 14 S391 0 397 0 c4 . 667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6 - 1 10 - 3 12 s - 6.667 5 - 14 9 c - 28.667 14.667 - 53.667 35.667 - 75 63
- 1.333 1.333 - 3.167 3.5 - 5.5 6.5 s - 4 4.833 - 5 5.5 c - 1 . 667 - 2.5 1.333 - 4.5 2 s - 4.333 1
- 7 1 c - 4.667 0 - 9.167 - 1.833 - 13.5 - 5.5 S337 184 337 178 c0 - 12.667 15.667 - 32.333 47 - 59
H213l - 171 - 1 c - 8.667 - 6 - 13 - 12.333 - 13 - 19 0 - 4.667 4.333 - 11.333 13 - 20 h359
c - 16 - 25.333 - 24 - 45 - 24 - 59 z ` ,widehat1: ` M529 0 h5l519 115 c5 1 9 5 9 10 0 1 - 1 2 - 1 3 l - 4 22
c - 1 5 - 5 9 - 11 9 h - 2 L532 67 19 159 h - 2 c - 5 0 - 9 - 4 - 11 - 9 l - 5 - 22 c - 1 - 6 2 - 12 8 - 13 z ` ,widehat2: ` M1181 0 h2l1171 176 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 220 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widehat3: ` M1181 0 h2l1171 236 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 280 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widehat4: ` M1181 0 h2l1171 296 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 340 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widecheck1: ` M529 , 159 h5l519 , - 115 c5 , - 1 , 9 , - 5 , 9 , - 10 c0 , - 1 , - 1 , - 2 , - 1 , - 3 l - 4 , - 22 c - 1 ,
- 5 , - 5 , - 9 , - 11 , - 9 h - 2 l - 512 , 92 l - 513 , - 92 h - 2 c - 5 , 0 , - 9 , 4 , - 11 , 9 l - 5 , 22 c - 1 , 6 , 2 , 12 , 8 , 13 z ` ,widecheck2: ` M1181 , 220 h2l1171 , - 176 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 153 l - 1167 , - 153 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,widecheck3: ` M1181 , 280 h2l1171 , - 236 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 213 l - 1167 , - 213 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,widecheck4: ` M1181 , 340 h2l1171 , - 296 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 273 l - 1167 , - 273 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,baraboveleftarrow: ` M400000 620 h - 399890 l3 - 3 c68 . 7 - 52.7 113.7 - 120 135 - 202
c4 - 14.7 6 - 23 6 - 25 c0 - 7.3 - 7 - 11 - 21 - 11 c - 8 0 - 13.2 0.8 - 15.5 2.5
c - 2.3 1.7 - 4.2 5.8 - 5.5 12.5 c - 1.3 4.7 - 2.7 10.3 - 4 17 c - 12 48.7 - 34.8 92 - 68.5 130
s - 74.2 66.3 - 121.5 85 c - 10 4 - 16 7.7 - 18 11 c0 8.7 6 14.3 18 17 c47 . 3 18.7 87.8 47
121.5 85 s56 . 5 81.3 68.5 130 c0 . 7 2 1.3 5 2 9 s1 . 2 6.7 1.5 8 c0 . 3 1.3 1 3.3 2 6
s2 . 2 4.5 3.5 5.5 c1 . 3 1 3.3 1.8 6 2.5 s6 1 10 1 c14 0 21 - 3.7 21 - 11
c0 - 2 - 2 - 10.3 - 6 - 25 c - 20 - 79.3 - 65 - 146.7 - 135 - 202 l - 3 - 3 h399890z
M100 620 v40h399900v - 40 z M0 241 v40h399900v - 40 zM0 241 v40h399900v - 40 z ` ,rightarrowabovebar: ` M0 241 v40h399891c - 47.3 35.3 - 84 78 - 110 128 - 16.7 32
- 27.7 63.7 - 33 95 0 1.3 - . 2 2.7 - . 5 4 - . 3 1.3 - . 5 2.3 - . 5 3 0 7.3 6.7 11 20 11 8 0
13.2 - . 8 15.5 - 2.5 2.3 - 1.7 4.2 - 5.5 5.5 - 11.5 2 - 13.3 5.7 - 27 11 - 41 14.7 - 44.7 39
- 84.5 73 - 119.5 s73 . 7 - 60.2 119 - 75.5 c6 - 2 9 - 5.7 9 - 11 s - 3 - 9 - 9 - 11 c - 45.3 - 15.3 - 85 - 40.5
- 119 - 75.5 s - 58.3 - 74.8 - 73 - 119.5 c - 4.7 - 14 - 8.3 - 27.3 - 11 - 40 - 1.3 - 6.7 - 3.2 - 10.8 - 5.5
- 12.5 - 2.3 - 1.7 - 7.5 - 2.5 - 15.5 - 2.5 - 14 0 - 21 3.7 - 21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205 zm96 379 h399894v40H0zm0 0 h399904v40H0z ` ,baraboveshortleftharpoon: ` M507 , 435 c - 4 , 4 , - 6.3 , 8.7 , - 7 , 14 c0 , 5.3 , 0.7 , 9 , 2 , 11
c1 . 3 , 2 , 5.3 , 5.3 , 12 , 10 c90 . 7 , 54 , 156 , 130 , 196 , 228 c3 . 3 , 10.7 , 6.3 , 16.3 , 9 , 17
c2 , 0.7 , 5 , 1 , 9 , 1 c0 , 0 , 5 , 0 , 5 , 0 c10 . 7 , 0 , 16.7 , - 2 , 18 , - 6 c2 , - 2.7 , 1 , - 9.7 , - 3 , - 21
c - 32 , - 87.3 , - 82.7 , - 157.7 , - 152 , - 211 c0 , 0 , - 3 , - 3 , - 3 , - 3 l399351 , 0 l0 , - 40
c - 398570 , 0 , - 399437 , 0 , - 399437 , 0 z M593 435 v40 H399500 v - 40 z
M0 281 v - 40 H399908 v40z M0 281 v - 40 H399908 v40z ` ,rightharpoonaboveshortbar: ` M0 , 241 l0 , 40 c399126 , 0 , 399993 , 0 , 399993 , 0
c4 . 7 , - 4.7 , 7 , - 9.3 , 7 , - 14 c0 , - 9.3 , - 3.7 , - 15.3 , - 11 , - 18 c - 92.7 , - 56.7 , - 159 , - 133.7 , - 199 ,
- 231 c - 3.3 , - 9.3 , - 6 , - 14.7 , - 8 , - 16 c - 2 , - 1.3 , - 7 , - 2 , - 15 , - 2 c - 10.7 , 0 , - 16.7 , 2 , - 18 , 6
c - 2 , 2.7 , - 1 , 9.7 , 3 , 21 c15 . 3 , 42 , 36.7 , 81.8 , 64 , 119.5 c27 . 3 , 37.7 , 58 , 69.2 , 92 , 94.5 z
M0 241 v40 H399908 v - 40 z M0 475 v - 40 H399500 v40z M0 475 v - 40 H399500 v40z ` ,shortbaraboveleftharpoon: ` M7 , 435 c - 4 , 4 , - 6.3 , 8.7 , - 7 , 14 c0 , 5.3 , 0.7 , 9 , 2 , 11
c1 . 3 , 2 , 5.3 , 5.3 , 12 , 10 c90 . 7 , 54 , 156 , 130 , 196 , 228 c3 . 3 , 10.7 , 6.3 , 16.3 , 9 , 17 c2 , 0.7 , 5 , 1 , 9 ,
1 c0 , 0 , 5 , 0 , 5 , 0 c10 . 7 , 0 , 16.7 , - 2 , 18 , - 6 c2 , - 2.7 , 1 , - 9.7 , - 3 , - 21 c - 32 , - 87.3 , - 82.7 , - 157.7 ,
- 152 , - 211 c0 , 0 , - 3 , - 3 , - 3 , - 3 l399907 , 0 l0 , - 40 c - 399126 , 0 , - 399993 , 0 , - 399993 , 0 z
M93 435 v40 H400000 v - 40 z M500 241 v40 H400000 v - 40 z M500 241 v40 H400000 v - 40 z ` ,shortrightharpoonabovebar: ` M53 , 241 l0 , 40 c398570 , 0 , 399437 , 0 , 399437 , 0
c4 . 7 , - 4.7 , 7 , - 9.3 , 7 , - 14 c0 , - 9.3 , - 3.7 , - 15.3 , - 11 , - 18 c - 92.7 , - 56.7 , - 159 , - 133.7 , - 199 ,
- 231 c - 3.3 , - 9.3 , - 6 , - 14.7 , - 8 , - 16 c - 2 , - 1.3 , - 7 , - 2 , - 15 , - 2 c - 10.7 , 0 , - 16.7 , 2 , - 18 , 6
c - 2 , 2.7 , - 1 , 9.7 , 3 , 21 c15 . 3 , 42 , 36.7 , 81.8 , 64 , 119.5 c27 . 3 , 37.7 , 58 , 69.2 , 92 , 94.5 z
M500 241 v40 H399408 v - 40 z M500 435 v40 H400000 v - 40 z ` },D9=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+ ` v1759 h347 v - 84
H403z M403 1759 V0 H319 V1759 v ` +e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+ ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v ` +e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-e+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M188 15 H145 v585 v ` +e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-e+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M188 15 H145 v585 v ` +e+ ` v585 h43z
M367 15 v585 v ` +e+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-e+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M410 15 H367 v585 v ` +e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+ ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v ` +e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+ ` v1799 H0 v - 84 H319z
MM319 602 V0 H403 V602 v ` +e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+ ` v602 h84z
M403 1759 V0 H319 V1759 v ` +e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+ ` v602 h84z
M347 1759 V0 h - 84 V1759 v ` +e+" v602 h84z";case"lparen":return ` M863 , 9 c0 , - 2 , - 2 , - 5 , - 6 , - 9 c0 , 0 , - 17 , 0 , - 17 , 0 c - 12.7 , 0 , - 19.3 , 0.3 , - 20 , 1
c - 5.3 , 5.3 , - 10.3 , 11 , - 15 , 17 c - 242.7 , 294.7 , - 395.3 , 682 , - 458 , 1162 c - 21.3 , 163.3 , - 33.3 , 349 ,
- 36 , 557 l0 , ` +(e+84)+ ` c0 . 2 , 6 , 0 , 26 , 0 , 60 c2 , 159.3 , 10 , 310.7 , 24 , 454 c53 . 3 , 528 , 210 ,
949.7 , 470 , 1265 c4 . 7 , 6 , 9.7 , 11.7 , 15 , 17 c0 . 7 , 0.7 , 7 , 1 , 19 , 1 c0 , 0 , 18 , 0 , 18 , 0 c4 , - 4 , 6 , - 7 , 6 , - 9
c0 , - 2.7 , - 3.3 , - 8.7 , - 10 , - 18 c - 135.3 , - 192.7 , - 235.5 , - 414.3 , - 300.5 , - 665 c - 65 , - 250.7 , - 102.5 ,
- 544.7 , - 112.5 , - 882 c - 2 , - 104 , - 3 , - 167 , - 3 , - 189
l0 , - ` +(e+92)+ ` c0 , - 162.7 , 5.7 , - 314 , 17 , - 454 c20 . 7 , - 272 , 63.7 , - 513 , 129 , - 723 c65 . 3 ,
- 210 , 155.3 , - 396.3 , 270 , - 559 c6 . 7 , - 9.3 , 10 , - 15.3 , 10 , - 18 z ` ;case"rparen":return ` M76 , 0 c - 16.7 , 0 , - 25 , 3 , - 25 , 9 c0 , 2 , 2 , 6.3 , 6 , 13 c21 . 3 , 28.7 , 42.3 , 60.3 ,
63 , 95 c96 . 7 , 156.7 , 172.8 , 332.5 , 228.5 , 527.5 c55 . 7 , 195 , 92.8 , 416.5 , 111.5 , 664.5
c11 . 3 , 139.3 , 17 , 290.7 , 17 , 454 c0 , 28 , 1.7 , 43 , 3.3 , 45 l0 , ` +(e+9)+ `
c - 3 , 4 , - 3.3 , 16.7 , - 3.3 , 38 c0 , 162 , - 5.7 , 313.7 , - 17 , 455 c - 18.7 , 248 , - 55.8 , 469.3 , - 111.5 , 664
c - 55.7 , 194.7 , - 131.8 , 370.3 , - 228.5 , 527 c - 20.7 , 34.7 , - 41.7 , 66.3 , - 63 , 95 c - 2 , 3.3 , - 4 , 7 , - 6 , 11
c0 , 7.3 , 5.7 , 11 , 17 , 11 c0 , 0 , 11 , 0 , 11 , 0 c9 . 3 , 0 , 14.3 , - 0.3 , 15 , - 1 c5 . 3 , - 5.3 , 10.3 , - 11 , 15 , - 17
c242 . 7 , - 294.7 , 395.3 , - 681.7 , 458 , - 1161 c21 . 3 , - 164.7 , 33.3 , - 350.7 , 36 , - 558
l0 , - ` +(e+144)+ ` c - 2 , - 159.3 , - 10 , - 310.7 , - 24 , - 454 c - 53.3 , - 528 , - 210 , - 949.7 ,
- 470 , - 1265 c - 4.7 , - 6 , - 9.7 , - 11.7 , - 15 , - 17 c - 0.7 , - 0.7 , - 6.7 , - 1 , - 18 , - 1 z ` ;default:throw new Error("Unknown stretchy delimiter.")}};class Vl{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 wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var Fi={"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,.755
` +N+" children.");for(var Y=0;Y<N;Y++){var te=new Qa(T[Y]),ce=new Ta([te],{width:"400em",height:at(y),viewBox:"0 0 "+h+" "+M,preserveAspectRatio:F[Y]+" slice"}),Me=Se.makeSvgSpan([z[Y]],[ce],e);if(N===1)return{span:Me,minWidth:A,height:y};Me.style.height=at(y),k.push(Me)}return{span:Se.makeSpan(["stretchy"],k,e),minWidth:A,height:y}}}var{span:r,minWidth:o,height:l}=n();return r.height=l,r.style.height=at(l),o>0&&(r.style.minWidth=at(o)),r},vx=function(t,e,n,r,o){var l,h=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(l=Se.makeSpan(["stretchy",e],[],o),e==="fbox"){var c=o.color&&o.getColor();c&&(l.style.borderColor=c)}}else{var p=[];/^[bx]cancel $ /.test(e)&&p.push(new tp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel $ /.test(e)&&p.push(new tp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new Ta(p,{width:"100%",height:at(h)});l=Se.makeSvgSpan([],[v],o)}return l.height=h,l.style.height=at(h),l},Ma={encloseSpan:vx,mathMLnode:px,svgSpan:gx};function Ft(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function _f(t){var e=Wc(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function Wc(t){return t&&(t.type==="atom"||j9.hasOwnProperty(t.type))?t:null}var Nf=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=Ft(t.base,"accent"),n=r.base,t.base=n,o=F9(Zt(t,e)),t.base=r):(r=Ft(t,"accent"),n=r.base);var l=Zt(n,e.havingCrampedStyle()),h=r.isShifty&&wt.isCharacterBox(n),c=0;if(h){var p=wt.getBaseElem(n),v=Zt(p,e.havingCrampedStyle());c=Dm(v).skew}var b=r.label===" \\ c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=Ma.svgSpan(r,e),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+at(2*c)+")",marginLeft:at(2*c)}:void 0}]},e);else{var x,w;r.label===" \\ vec"?(x=Se.staticSvg("vec",e),w=Se.svgData.vec[1]):(x=Se.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=Dm(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Se.makeSpan(["accent-body"],[x]);var S=r.label===" \\ textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=at(k),r.label===" \\ textcircled"&&(m.style.top=".2em"),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Se.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},T6=(t,e)=>{var n=t.isStretchy?Ma.mathMLnode(t.label):new Ze.MathNode("mo",[li(t.label,t.mode)]),r=new Ze.MathNode("mover",[vn(t.base,e),n]);return r.setAttribute("accent","true"),r},bx=new RegExp([" \\ acute"," \\ grave"," \\ ddot"," \\ tilde"," \\ bar"," \\ breve"," \\ check"," \\ hat"," \\ vec"," \\ dot"," \\ mathring"].map(t=>" \\ "+t).join("|"));dt({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:(t,e)=>{var n=fc(e[0]),r=!bx.test(t.funcName),o=!r||t.funcName===" \\ widehat"||t.funcName===" \\ widetilde"||t.funcName===" \\ widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});dt({type:"accent",names:[" \\ '"," \\ ` "," \ \ ^ "," \ \ ~ "," \ \ = "," \ \ u "," \ \ . ",'\\" ',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX' s accent "+t.funcName+" works only in text mode "),r=" text "),{type:" accent ",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});dt({type:" accentUnder ",names:[" \ \ underleftarro
] ` ,Vx=" \\ \\ [a-zA-Z@]+",Wx=" \\ \\ [^ \u D800- \u DFFF]",Gx="("+Vx+")"+J6+"*",Kx= ` \ \ \ \ (
| [ \ r ] +
? ) [ \ r ] * ` ,sp="[̀-ͯ]",Xx=new RegExp(sp+"+ $ "),Zx="("+J6+"+)|"+(Kx+"|")+"([!- \\ [ \\ ]-‧-豈-]"+(sp+"*")+"|[ \u D800- \u DBFF][ \u DC00- \u DFFF]"+(sp+"*")+"| \\ \\ verb \\ *([^]).*? \\ 4| \\ \\ verb([^*a-zA-Z]).*? \\ 5"+("|"+Gx)+("|"+Wx+")");class rg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(Zx,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new ii("EOF",new jr(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new et("Unexpected character: '"+e[n]+"'",new ii(e[n],new jr(this,n,n+1)));var o=r[6]||r[3]||(r[2]?" \\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf( `
` ,this.tokenRegex.lastIndex);return l===-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=l+1,this.lex()}return new ii(o,new jr(this,n,this.tokenRegex.lastIndex))}}class Yx{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new et("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}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,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var Jx=q6;V(" \\ noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});V(" \\ expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});V(" \\ @firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});V(" \\ @secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});V(" \\ @ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});V(" \\ @ifstar"," \\ @ifnextchar *{ \\ @firstoftwo{#1}}");V(" \\ TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var ig={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};V(" \\ char",function(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text===" ` ")if(e=t.popToken(),e.text[0]===" \ \ ")r=e.text.charCodeAt(1);else{if(e.text===" EOF ")throw new et(" \ \ char ` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=ig[e.text],r==null||r>=n)throw new et("Invalid base-"+n+" digit "+e.text);for(var o;(o=ig[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return" \\ @char{"+r+"}"});var Bf=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new et(" \\ newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new et(" \\ newcommand{"+l+"} attempting to redefine "+(l+"; use \\ renewcommand"));if(!h&&!n)throw new et(" \\ renewcommand{"+l+"} when command "+l+" does not yet exist; use \\ newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^ \s *[0-9]+ \s * $ /))throw new et("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};V(" \\ newcommand",t=>Bf(t,!1,!0,!1));V(" \\ renewcommand",t=>Bf(t,!0,!1,!1));V(" \\ providecommand",t=>Bf(t,!0,!0,!0));V(" \\ message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});V(" \\ errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});V(" \\ show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Wa[n],wn.math[n],wn.text[n]),""});V(" \\ bgroup","{");V(" \\ egroup","}");V("~"," \\ nobreakspace");V(" \\ lq"," ` ");V(" \ \ rq "," ' ");V(" \ \ aa "," \ \ r a ");V(" \ \ AA "," \ \ r A ");V(" \ \ textcopyright "," \ \ html @ mathml { \ \ textcircled { c } } { \ \ char ` ©}");V(" \\ copyright"," \\ TextOrMath{
please report what input caused this bug ` );return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}sg.hasOwnProperty(n[0])&&!wn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=sg[n[0]]+n.slice(1));var l=Xx.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı ":n==="j"&&(n="ȷ"));var h;if(wn[this.mode][n]){this.settings.strict&&this.mode==="math"&&np.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=wn[this.mode][n].group,p=jr.range(e),v;if(q9.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(u6(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc:jr.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!lh[m])throw new et("Unknown accent ' "+m+"'",e);var x=lh[m][this.mode]||lh[m].text;if(!x)throw new et("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:jr.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}Zc.endOfExpression=["}"," \\ endgroup"," \\ end"," \\ right","&"];var qf=function(t,e){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Zc(t,e);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(!e.displayMode)throw new et(" \\ tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new ii(" \\ df@tag")])}]}return r},n3=function(t,e,n){e.textContent="";var r=jf(t,n).toNode();e.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."),n3=function(){throw new et("KaTeX doesn't work in quirks mode.")});var ek=function(t,e){var n=jf(t,e).toMarkup();return n},tk=function(t,e){var n=new Sf(e);return qf(t,n)},r3=function(t,e,n){if(n.throwOnError||!(t instanceof et))throw t;var r=Se.makeSpan(["katex-error"],[new si(e)]);return r.setAttribute("title",t.toString()),r.setAttribute("style","color:"+n.errorColor),r},jf=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return ux(r,t,n)}catch(o){return r3(o,t,n)}},nk=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return dx(r,t,n)}catch(o){return r3(o,t,n)}},rk="0.16.22",ik={Span:Wl,Anchor:Af,SymbolNode:si,SvgNode:Ta,PathNode:Qa,LineNode:tp},lg={version:rk,render:n3,renderToString:ek,ParseError:et,SETTINGS_SCHEMA:H0,__parse:tk,__renderToDomTree:jf,__renderToHTMLTree:nk,__setFontMetrics:R9,__defineSymbol:R,__defineFunction:dt,__defineMacro:V,__domTree:ik},i3={exports:{}};/*!
* Vditor v3 . 11.2 - A markdown editor written in TypeScript .
*
* MIT License
*
* Copyright ( c ) 2018 - present B3log 开源 , b3log . org
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the "Software" ) , to deal
* in the Software without restriction , including without limitation the rights
* to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the Software is
* furnished to do so , subject to the following conditions :
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
* IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
* LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE .
*
* / ( f u n c t i o n ( t , e ) { ( f u n c t i o n ( n , r ) { t . e x p o r t s = r ( ) } ) ( J h , f u n c t i o n ( ) { r e t u r n ( ( ) = > { v a r n = { 1 7 3 : h = > { v a r c = f u n c t i o n ( ) { t h i s . D i f f _ T i m e o u t = 1 , t h i s . D i f f _ E d i t C o s t = 4 , t h i s . M a t c h _ T h r e s h o l d = . 5 , t h i s . M a t c h _ D i s t a n c e = 1 e 3 , t h i s . P a t c h _ D e l e t e T h r e s h o l d = . 5 , t h i s . P a t c h _ M a r g i n = 4 , t h i s . M a t c h _ M a x B i t s = 3 2 } , p = - 1 , v = 1 , b = 0 ; c . D i f f = f u n c t i o n ( g , m ) { r e t u r n [ g , m ] } , c . p r o t o t y p e . d i f f _ m a i n = f u n c t i o n ( g , m , x , w ) { t y p e o f w > " u " & & ( t h i s . D i f f _ T i m e o u t < = 0 ? w = N u m b e r . M A X _ V A L U E : w = n e w D a t e ( ) . g e t T i m e ( ) + t h i s . D i f f _ T i m e o u t * 1 e 3 ) ; v a r S = w ; i f ( g = = n u l l | | m = = n u l l ) t h r o w n e w E r r o r ( " N u l l i n p u t . ( d i f f _ m a i n ) " ) ; i f ( g = = m ) r e t u r n g ? [ n e w c . D i f f ( b , g ) ] : [ ] ; t y p e o f x > " u " & & ( x = ! 0 ) ; v a r k = x , C = t h i s . d i f f _ c o m m o n P r e f i x ( g , m ) , T = g . s u b s t r i n g ( 0 , C ) ; g = g . s u b s t r i n g ( C ) , m = m . s u b s t r i n g ( C ) , C = t h i s . d i f f _ c o m m o n S u f f i x ( g , m ) ; v a r A = g . s u b s t r i n g ( g . l e n g t h - C ) ; g = g . s u b s t r i n g ( 0 , g . l e n g t h - C ) , m = m . s u b s t r i n g ( 0 , m . l e n g t h - C ) ; v a r M = t h i s . d i f f _ c o m p u t e _ ( g , m , k , S ) ; r e t u r n T & & M . u n s h i f t ( n e w c . D i f f ( b , T ) ) , A & & M . p u s h ( n e w c . D i f f ( b , A ) ) , t h i s . d i f f _ c l e a n u p M e r g e ( M ) , M } , c . p r o t o t y p e . d i f f _ c o m p u t e _ = f u n c t i o n ( g , m , x , w ) { v a r S ; i f ( ! g ) r e t u r n [ n e w c . D i f f ( v , m ) ] ; i f ( ! m ) r e t u r n [ n e w c . D i f f ( p , g ) ] ; v a r k = g . l e n g t h > m . l e n g t h ? g : m , C = g . l e n g t h > m . l e n g t h ? m : g , T = k . i n d e x O f ( C ) ; i f ( T ! = - 1 ) r e t u r n S = [ n e w c . D i f f ( v , k . s u b s t r i n g ( 0 , T ) ) , n e w c . D i f f ( b , C ) , n e w c . D i f f ( v , k . s u b s t r i n g ( T + C . l e n g t h ) ) ] , g . l e n g t h > m . l e n g t h & & ( S [ 0 ] [ 0 ] = S [ 2 ] [ 0 ] = p ) , S ; i f ( C . l e n g t h = = 1 ) r e t u r n [ n e w c . D i f f ( p , g ) , n e w c . D i f f ( v , m ) ] ; v a r A = t h i s . d i f f _ h a l f M a t c h _ ( g , m ) ; i f ( A ) { v a r M = A [ 0 ] , y = A [ 1 ] , N = A [ 2 ] , z = A [ 3 ] , F = A [ 4 ] , P = t h i s . d i f f _ m a i n ( M , N , x , w ) , Y = t h i s . d i f f _ m a i n ( y , z , x , w ) ; r e t u r n P . c o n c a t ( [ n e w c . D i f f ( b , F ) ] , Y ) } r e t u r n x & & g . l e n g t h > 1 0 0 & & m . l e n g t h > 1 0 0 ? t h i s . d i f f _ l i n e M o d e _ ( g , m , w ) : t h i s . d i f f _ b i s e c t _ ( g , m , w ) } , c . p r o t o t y p e . d i f f _ l i n e M o d e _ = f u n c t i o n ( g , m , x ) { v a r w = t h i s . d i f f _ l i n e s T o C h a r s _ ( g , m ) ; g = w . c h a r s 1 , m = w . c h a r s 2 ; v a r S = w . l i n e A r r a y , k = t h i s . d i f f _ m a i n ( g , m , ! 1 , x ) ; t h i s . d i f f _ c h a r s T o L i n e s _ ( k , S ) , t h i s . d i f f _ c l e a n u p S e m a n t i c ( k ) , k . p u s h ( n e w c . D i f f ( b , " " ) ) ; f o r ( v a r C = 0 , T = 0 , A = 0 , M = " " , y = " " ; C < k . l e n g t h ; ) { s w i t c h ( k [ C ] [ 0 ] ) { c a s e v : A + + , y + = k [ C ] [ 1 ] ; b r e a k ; c a s e p : T + + , M + = k [ C ] [ 1 ] ; b r e a k ; c a s e b : i f ( T > = 1 & & A > = 1 ) { k . s p l i c e ( C - T - A , T + A ) , C = C - T - A ; f o r ( v a r N = t h i s . d i f f _ m a i n ( M , y , ! 1 , x ) , z = N . l e n g t h - 1 ; z > = 0 ; z - - ) k . s p l i c e ( C , 0 , N [ z ] ) ; C = C + N . l e n g t h } A = 0 , T = 0 , M = " " , y = " " ; b r e a k } C + + } r e t u r n k . p o p ( ) , k } , c . p r o t o t y p e . d i f f _ b i s e c t _ = f u n c t i o n ( g , m , x ) { f o r ( v a r w = g . l e n g t h , S = m . l e n g t h , k = M a t h . c e i l ( ( w + S ) / 2 ) , C = k , T = 2 * k , A = n e w A r r a y ( T ) , M = n e w A r r a y ( T ) , y = 0 ; y < T ; y + + ) A [ y ] = - 1 , M [ y ] = - 1 ; A [ C + 1 ] = 0 , M [ C + 1 ] = 0 ; f o r ( v a r N = w - S , z = N % 2 ! = 0 , F = 0 , P = 0 , Y = 0 , t e = 0 , c e = 0 ; c e < k & & ! ( n e w D a t e ( ) . g e t T i m e ( ) > x ) ; c e + + ) { f o r ( v a r M e = - c e + F ; M e < = c e - P ; M e + = 2 ) { v a r F e = C + M e , W e ; M e = = - c e | | M e ! = c e & & A [ F e - 1 ] < A [ F e + 1 ] ? W e = A [ F e + 1 ] : W e = A [ F e - 1 ] + 1 ; f o r ( v a r r t = W e - M e ; W e < w & & r t < S & & g . c h a r A t ( W e ) = = m . c h a r A t ( r t ) ; ) W e + + , r t + + ; i f ( A [ F e ] = W e , W e > w ) P + = 2 ; e l s e i f ( r t > S ) F + = 2 ; e l s e i f ( z ) { v a r j e = C + N - M e ; i f ( j e > = 0 & & j e < T & & M [ j e ] ! = - 1 ) { v a r N e = w - M [ j e ] ; i f ( W e > = N e ) r e t u r n t h i s . d i f f _ b i s e c t S p l i t _ ( g , m , W e , r t , x ) } } } f o r ( v a r n t = - c e + Y ; n t < = c e - t e ; n t + = 2 ) { v a r j e = C + n t , N e ; n t = = - c e | | n t ! = c e & & M [ j e - 1 ] < M [ j e + 1 ] ? N e = M [ j e + 1 ] : N e = M [ j e - 1 ] + 1 ; f o r ( v a r c t = N e - n t ; N e < w & & c t < S & & g . c h a r A t ( w - N e - 1 ) = = m . c h a r A t ( S - c t - 1 ) ; ) N e + + , c t + + ; i f ( M [ j e ] = N e , N e > w ) t e + = 2 ; e l s e i f ( c t > S ) Y + = 2 ; e l s e i f ( ! z ) { v a r F e = C + N - n t ; i f ( F e > = 0 & & F e < T & & A [ F e ] ! = - 1 ) { v a r W e = A [ F e ] , r t = C + W e - F e ; i f ( N e = w - N e , W e > = N e ) r e t u r n t h i s . d i f f _ b i s e c t S p l i t _ ( g , m , W e , r t , x ) } } } } r e t u r n [ n e w c . D i f f ( p , g ) , n e w c . D i f f ( v , m ) ] } , c . p r o t o t y p e . d i f f _ b i s e c t S p l i t _ = f u n c t i o n ( g , m , x , w , S ) { v a r k = g . s u b s t r i n g ( 0 , x ) , C = m . s u b s t r i n g ( 0 , w ) , T = g . s u b s t r i n g ( x ) , A = m . s u b s t r i n g ( w ) , M = t h i s . d i f f _ m a i n ( k , C , ! 1 , S ) , y = t h i s . d i f f _ m a i n ( T , A , ! 1 , S ) ; r e t u r n M . c o n c a t ( y ) } , c . p r o t o t y p e . d i f f _ l i n e s T o C h a r s _ = f u n c t i o n ( g , m ) { v a r x = [ ] , w = { } ; x [ 0 ] = " " ; f u n c t i o n S ( A ) { f o r ( v a r M = " " , y = 0 , N = - 1 , z = x . l e n g t h ; N < A . l e n g t h - 1 ; ) { N = A . i n d e x O f ( `
` ,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var ce=P.substring(te,te+Math.floor(P.length/4)),Me=-1,Fe="",We,rt,je,Ne;(Me=Y.indexOf(ce,Me+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Me)),ct=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Me));Fe.length<ct+nt&&(Fe=Y.substring(Me-ct,Me)+Y.substring(Me,Me+nt),We=P.substring(0,te-ct),rt=P.substring(te+nt),je=Y.substring(0,Me-ct),Ne=Y.substring(Me+nt))}return Fe.length*2>=P.length?[We,rt,je,Ne,Fe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),ce=Y.match(c.nonAlphaNumericRegex_),Me=te.match(c.nonAlphaNumericRegex_),Fe=ce&&Y.match(c.whitespaceRegex_),We=Me&&te.match(c.whitespaceRegex_),rt=Fe&&Y.match(c.linebreakRegex_),je=We&&te.match(c.linebreakRegex_),Ne=rt&&F.match(c.blanklineEndRegex_),nt=je&&P.match(c.blanklineStartRegex_);return Ne||nt?5:rt||je?4:ce&&!Fe&&We?3:Fe||We?2:ce||Me?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-
` ),w=0,S=/^@@ -( \d +),?( \d *) \+ ( \d +),?( \d *) @@ $ /;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+ ` @ @
` ],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+ `
` }return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),ce=p(106),Me=p(673),Fe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},We=p(214),rt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var be=speechSynthesis.getVoices(),le,ye;return be.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(ye=Ae)}),le||(le=ye),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ce='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ce='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var G=J(),X=new SpeechSynthesisUtterance;X.voice=G,X.onend=X.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(be){var le=be.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=Ce):(speechSynthesis.pause(),se.innerHTML=ee)):(X.text=se.getAttribute("data-text"),speechSynthesis.speak(X),se.classList.add("vditor-speech--current"),se.innerHTML=Ce),(0,rt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var ye=getSelection().getRangeAt(0),Ae=ye.toString().trim();if(Ae){window.vditorSpeechRange=ye.cloneRange();var ze=ye.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=ze.top+ze.height+document.queryS
` )&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制", ` "
onmouseover = "this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||" 复制 ",`')"
class = "vditor-tooltipped vditor-tooltipped__w"
onclick = "event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||" 已复制 ",`');this.previousElementSibling.blur()" > ` ).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch{}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/ \r \n | \r | \n /g);Y.pop(),Y.map(function(te){var ce="";F&&(N.textContent=te|| `
` ,ce=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ce,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ce=te==null?void 0:te.markmap,Me=y(ce);F.setData(Y,Me),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></
src = "//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true" > < / i f r a m e > ' ) ) , w . r e m o v e ( ) ; e l s e i f ( M & & M [ 0 ] ) w . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ` < i f r a m e c l a s s = " i f r a m e _ _ v i d e o "
src = "https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'" > < / i f r a m e > ' ) ) , w . r e m o v e ( ) ; e l s e i f ( y & & y [ 2 ] ) w . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ` < i f r a m e c l a s s = " i f r a m e _ _ v i d e o "
src = "https://www.dailymotion.com/embed/video/`.concat(y[2],'" > < /iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,ce){if(te){ce===0&&(te=te.substr(1));var Me=te.split("=");F[Me[0]]=Me[1]}});var P="https:/ / player . bilibili . com / player . html ? ",Y=Object.keys(F);Y.forEach(function(te,ce){P+=" ".concat(te," = ").concat(F[te]),ce<Y.length-1&&(P+=" & ")}),w.insertAdjacentHTML(" afterend ",'<iframe class=" iframe _ _video " src=" '.concat(P,' "></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML(" afterend ",'<iframe class=" iframe _ _video " src=" //embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
< div style = "text-align: left" > < small > ` ).concat(P.message.replace(/ \n /,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(
< div class = "vditor-img__bar" >
< span class = "vditor-img__btn" data - deg = "0" >
< svg > < use xlink : href = "#vditor-icon-redo" > < / u s e > < / s v g >
` ).concat(window.VditorI18n.spin, `
< / s p a n >
< span class = "vditor-img__btn" onclick = "this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''" >
X & nbsp ; ` ).concat(window.VditorI18n.close, `
< / s p a n >
< / d i v >
< div class = "vditor-img__img" onclick = "this.parentElement.outerHTML = '';document.body.style.overflow = ''" >
< img style = "width: `).concat(b.width," px ; height : ").concat(b.height," px ; transform : translate3d ( ").concat(x.left," px , ").concat(x.top-w,'px, 0)" src = "').concat(b.getAttribute(" src "),`" >
< / d i v >
< / d i v > ` ) ) , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " h i d d e n " ; v a r S = d o c u m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i m g i m g " ) , k = " t r a n s l a t e 3 d ( " . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r W i d t h - b . n a t u r a l W i d t h ) / 2 , " p x , " ) . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r H e i g h t - w - b . n a t u r a l H e i g h t ) / 2 , " p x , 0 ) " ) ; s e t T i m e o u t ( f u n c t i o n ( ) { S . s e t A t t r i b u t e ( " s t y l e " , " t r a n s i t i o n : t r a n s f o r m . 3 s e a s e - i n - o u t ; t r a n s f o r m : " . c o n c a t ( k ) ) , s e t T i m e o u t ( f u n c t i o n ( ) { S . p a r e n t E l e m e n t . s c r o l l T o ( ( S . p a r e n t E l e m e n t . s c r o l l W i d t h - S . p a r e n t E l e m e n t . c l i e n t W i d t h ) / 2 , ( S . p a r e n t E l e m e n t . s c r o l l H e i g h t - S . p a r e n t E l e m e n t . c l i e n t H e i g h t ) / 2 ) } , 4 0 0 ) } ) ; v a r C = d o c u m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i m g _ _ b t n " ) ; C . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( ) { v a r T = p a r s e I n t ( C . g e t A t t r i b u t e ( " d a t a - d e g " ) , 1 0 ) + 9 0 ; T / 9 0 % 2 = = = 1 & & b . n a t u r a l W i d t h > S . p a r e n t E l e m e n t . c l i e n t H e i g h t ? S . s t y l e . t r a n s f o r m = " t r a n s l a t e 3 d ( " . c o n c a t ( M a t h . m a x ( 0 , w i n d o w . i n n e r W i d t h - b . n a t u r a l W i d t h ) / 2 , " p x , " ) . c o n c a t ( b . n a t u r a l W i d t h / 2 - b . n a t u r a l H e i g h t / 2 , " p x , 0 ) r o t a t e Z ( " ) . c o n c a t ( T , " d e g ) " ) : S . s t y l e . t r a n s f o r m = " " . c o n c a t ( k , " r o t a t e Z ( " ) . c o n c a t ( T , " d e g ) " ) , C . s e t A t t r i b u t e ( " d a t a - d e g " , T . t o S t r i n g ( ) ) , s e t T i m e o u t ( f u n c t i o n ( ) { S . p a r e n t E l e m e n t . s c r o l l T o ( ( S . p a r e n t E l e m e n t . s c r o l l W i d t h - S . p a r e n t E l e m e n t . c l i e n t W i d t h ) / 2 , ( S . p a r e n t E l e m e n t . s c r o l l H e i g h t - S . p a r e n t E l e m e n t . c l i e n t H e i g h t ) / 2 ) } , 4 0 0 ) } ) } } , 5 8 0 : ( h , c , p ) = > { p . d ( c , { Y : ( ) = > g } ) ; v a r v = p ( 1 4 5 ) , b = p ( 2 9 0 ) , g = f u n c t i o n ( m , x ) { x = = = v o i d 0 & & ( x = v . g . C D N ) , v . g . C O D E _ T H E M E . i n c l u d e s ( m ) | | ( m = " g i t h u b " ) ; v a r w = d o c u m e n t . g e t E l e m e n t B y I d ( " v d i t o r H l j s S t y l e " ) , S = " " . c o n c a t ( x , " / d i s t / j s / h i g h l i g h t . j s / s t y l e s / " ) . c o n c a t ( m , " . m i n . c s s " ) ; w ? w . g e t A t t r i b u t e ( " h r e f " ) ! = = S & & ( w . r e m o v e ( ) , ( 0 , b . c ) ( S , " v d i t o r H l j s S t y l e " ) ) : ( 0 , b . c ) ( S , " v d i t o r H l j s S t y l e " ) } } , 5 3 8 : ( h , c , p ) = > { p . d ( c , { Z : ( ) = > b } ) ; v a r v = p ( 2 9 0 ) , b = f u n c t i o n ( g , m ) { i f ( ! ( ! g | | ! m ) ) { v a r x = d o c u m e n t . g e t E l e m e n t B y I d ( " v d i t o r C o n t e n t T h e m e " ) , w = " " . c o n c a t ( m , " / " ) . c o n c a t ( g , " . c s s " ) ; x ? x . g e t A t t r i b u t e ( " h r e f " ) ! = = w & & ( x . r e m o v e ( ) , ( 0 , v . c ) ( w , " v d i t o r C o n t e n t T h e m e " ) ) : ( 0 , v . c ) ( w , " v d i t o r C o n t e n t T h e m e " ) } } } , 4 1 3 : ( h , c , p ) = > { p . d ( c , { J : ( ) = > v , G : ( ) = > b } ) ; v a r v = f u n c t i o n ( g , m ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n ! 1 ; v a r x = n e w X M L H t t p R e q u e s t ; x . o p e n ( " G E T " , g , ! 1 ) , x . s e t R e q u e s t H e a d e r ( " A c c e p t " , " t e x t / j a v a s c r i p t , a p p l i c a t i o n / j a v a s c r i p t , a p p l i c a t i o n / e c m a s c r i p t , a p p l i c a t i o n / x - e c m a s c r i p t , * / * ; q = 0 . 0 1 " ) , x . s e n d ( " " ) ; v a r w = d o c u m e n t . c r e a t e E l e m e n t ( " s c r i p t " ) ; w . t y p e = " t e x t / j a v a s c r i p t " , w . t e x t = x . r e s p o n s e T e x t , w . i d = m , d o c u m e n t . h e a d . a p p e n d C h i l d ( w ) } , b = f u n c t i o n ( g , m ) { r e t u r n n e w P r o m i s e ( f u n c t i o n ( x , w ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n x ( ! 0 ) , ! 1 ; v a r S = d o c u m e n t . c r e a t e E l e m e n t ( " s c r i p t " ) ; S . s r c = g , S . a s y n c = ! 0 , d o c u m e n t . h e a d . a p p e n d C h i l d ( S ) , S . o n e r r o r = f u n c t i o n ( k ) { w ( k ) } , S . o n l o a d = f u n c t i o n ( ) { i f ( d o c u m e n t . g e t E l e m e n t B y I d ( m ) ) r e t u r n S . r e m o v e ( ) , x ( ! 0 ) , ! 1 ; S . i d = m , x ( ! 0 ) } } ) } } , 2 9 0 : ( h , c , p ) = > { p . d ( c , { c : ( ) = > v } ) ; v a r v = f u n c t i o n ( b , g ) { i f ( ! d o c u m e n t . g e t E l e m e n t B y I d ( g ) ) { v a r m = d o c u m e n t . c r e a t e E l e m e n t ( " l i n k " ) ; m . i d = g , m . r e l = " s t y l e s h e e t " , m . t y p e = " t e x t / c s s " , m . h r e f = b , d o c u m e n t . g e t E l e m e n t s B y T a g N a m e ( " h e a d " ) [ 0 ] . a p p e n d C h i l d ( m ) } } } , 1 0 5 : ( h , c , p ) = > { p . d ( c , { X : ( ) = > v } ) ; v a r v = f u n c t i o n ( b ) { r e t u r n b . r e p l a c e ( / \ u 0 0 a 0 / g , " " ) } } , 4 1 0 : ( h , c , p ) = > { p . d ( c , { G 6 : ( ) = > v , v U : ( ) = > b , p K : ( ) = > g , L e : ( ) = > m , y l : ( ) = > x , n s : ( ) = > w , i 7 : ( ) = > S } ) ; v a r v = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " S a f a r i " ) > - 1 & & n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " C h r o m e " ) = = = - 1 } , b = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . t o L o w e r C a s e ( ) . i n d e x O f ( " f i r e f o x " ) > - 1 } , g = f u n c t i o n ( ) { t r y { r e t u r n t y p e o f l o c a l S t o r a g e < " u " } c a t c h { r e t u r n ! 1 } } , m = f u n c t i o n ( ) { r e t u r n n a v i g a t o r . u s e r A g e n t . i n d e x O f ( " i P h o n e " ) > - 1 ? " t o u c h s t a r t " : " c l i c k " } , x = f u n c t i o n ( k ) { r e t u r n n a v i g a t o r . p l a t f o r m . t o U p p e r C a s e ( ) . i n d e x O f ( " M A C " ) > = 0 ? ! ! ( k . m e t a K e y & & ! k . c t r l K e y ) : ! ! ( ! k . m e t a K e y & & k . c t r l K e y ) } , w = f u n c t i o n ( k ) { r e t u r n / M a c / . t e s t ( n a v i g a t o r . p l a t f o r m ) | | n a v i g a t o r . p l a t f o r m = = = " i P h o n e " ? k . i n d e x O f ( " ⇧ " ) > - 1 & & b ( ) & & ( k = k . r e p l a c e ( " ; " , " : " ) . r e p l a c e ( " = " , " + " ) . r e p l a c e ( " - " , " _ " ) ) : ( k . s t a r t s W i t h ( " ⌘ " ) ? k = k . r e p l a c e ( " ⌘ " , " ⌘ + " ) : k . s t a r t s W i t h ( " ⌥ " ) & & k . s u b s t r ( 1 , 1 ) ! = = " ⌘ " ? k = k . r e p l a c e ( " ⌥ " , " ⌥ + " ) : k = k . r e p l a c e ( " ⇧ ⌘ " , " ⌘ + ⇧ + " ) . r e p l a c e ( " ⌥ ⌘ " , " ⌥ + ⌘ + " ) , k = k . r e p l a c e ( " ⌘ " , " C t r l " ) . r e p l a c e ( " ⇧ " , " S h i f t " ) . r e p l a c e ( " ⌥ " , " A l t " ) , k . i n d e x O f ( " S h i f t " ) > - 1 & & ( k = k . r e p l a c e ( " ; " , " : " ) . r e p l a c e ( " = " , " + " ) . r e p l a c e ( " - " , " _ " ) ) ) , k } , S = f u n c t i o n ( ) { r e t u r n / C h r o m e / . t e s t ( n a v i g a t o r . u s e r A g e n t ) & & / G o o g l e I n c / . t e s t ( n a v i g a t o r . v e n d o r ) } } , 4 9 4 : ( h , c , p ) = > { p . d ( c , { W b : ( ) = > v , o n : ( ) = > b , Q f : ( ) = > g } ) ; v a r v = f u n c t i o n ( ) { r e t u r n ( [ 1 e 7 ] . t o S t r i n g ( ) + - 1 e 3 + - 4 e 3 + - 8 e 3 + - 1 e 1 1 ) . r e p l a c e ( / [ 0 1 8 ] / g
` ).replace(/ \n \n $ /, `
` )):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){},F=o(135),P=o(775),Y=o(428),te=o(325),ce=o(483),Me=o(999),Fe=o(472),We=o(637),rt=o(11),je=o(194),Ne=o(229),nt=o(825),ct=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf( `
< p class = "p1" > ` )===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/ \n /.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&").replace(/</g,"<"),"<wbr></code></pre></div>"):" \n ` ` ` \ n "+E.replace(/&/g," & amp ; ").replace(/</g," & lt ; ")+" \ n ` ` ` ":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&").replace(/</g,"<"),"</code><wbr>"):" ` ".concat(E," ` ")}return!1},tt=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,We.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,nt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,rt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,ce.v)(i,a.options.cdn);else if(s==="math")(0,Fe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Me.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},q=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,Fe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}}, $ t=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,q.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),lt(a),!0;if(Pr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,q.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),lt(a),!0;if(pi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),lt(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(fo(d.innerHTML)&&d.previousElementSibling||mo(d.innerHTML))return;for(var f=(0,q.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf( `
` );L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!== `
` ){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $ /.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(it){it.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var K=(0,y.fb)(a.startContainer,"vditor-ir__preview");K?K.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(it){it.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),ve=(0,y.a1)(d,"data-type","footnotes-block"),ue="";if(fe)ue=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),we=(0,y.O9)(a.startContainer);if(we&&(d=we),ke&&(!we||we&&!ke.contains(we))&&(d=ke),ve&&(d=ve),ue=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var de=d.previousElementSibling,Ie=d.nextElementSibling;de&&(de.tagName==="UL"||de.tagName==="OL")&&(ue=de.outerHTML+ue,de.remove()),Ie&&(Ie.tagName==="UL"||Ie.tagName==="OL")&&(ue=ue+Ie.outerHTML,Ie.remove()),ue=ue.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ue=d.previousElementSibling.outerHTML+ue,d.previousElementSibling.remove());d.innerText.startsWith(" ` ` ` ")||(i.ir.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] ").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}),i.ir.element.querySelectorAll(" [ data - type = 'footnotes-block' ] ").forEach(function(it){it&&!d.isEqualNode(it)&&(ue+=it.outerHTML,it.remove())}))}if(z(" SpinVditorIRDOM ",ue," argument ",i.options.debugger),ue=i.lute.SpinVditorIRDOM(ue),z(" SpinVditorIRDOM ",ue," result ",i.options.debugger),fe)d.innerHTML=ue;else if(d.outerHTML=ue,ve){var Te=(0,y.a1)(i.ir.element.querySelector(" wbr ")," data - type "," footnotes - def ");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf(" ] : ")),gt=i.ir.element.querySelector('sup[data-type=" footnotes - ref "][data-footnotes-label=" '.concat(bt,' "]'));gt&>.setAttribute(" aria - label ",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,dn=i.ir.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] ");dn.forEach(function(it,zt){zt===0?kt=it:(kt.insertAdjacentHTML(" beforeend ",it.innerHTML),it.remove())}),dn.length>0&&i.ir.element.insertAdjacentElement(" beforeend ",dn[0]);var Wt,hn=i.ir.element.querySelectorAll(" [ data - type = 'footnotes-block' ] ");hn.forEach(function(it,zt){zt===0?Wt=it:(Wt.insertAdjacentHTML(" beforeend ",it.innerHTML),it.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement(" beforeend ",hn[0]),(0,q.ib)(i.ir.element,a),i.ir.element.querySelectorAll(" . vditor - ir _ _preview [ data - render = '2' ] ").forEach(function(it){tt(it,i)}),Ht(i),Xn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i===" ")return!1;if(i.indexOf(" ⇧ ")===-1&&i.indexOf(" ⌘ ")===-1&&i.indexOf(" ⌥ ")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i===" ⇧ Tab ")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code===" Tab ");var s=i.split(" ");if(i.startsWith(" ⌥ ")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?" Digit ":" Key ")+u)}i===" ⌘ Enter "&&(s=[" ⌘ "," Enter "]);var d=s.length>2&&s[0]===" ⇧ ",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f===" - "?f=" _ ":f===" = "&&(f=" + ")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent===" " ; ) s = s . nextSibling ; if ( s ) { if ( s && s . nodeType
` );D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Ge(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=pe(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Ge(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=pe(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Ge(i);return}}}var K=(0,y.a1)(d,"data-type","math-block-open-marker");if(K){var fe=K.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Ge(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(de){de.textContent.length===1&&de.remove()});var ve=(0,y.a1)(d,"data-type","heading-marker");if(ve&&ve.textContent.indexOf("#")===-1){Ge(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Ge(i);return}}if(f&&f.textContent.trimRight()===" $ $ "){Ge(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(de){de.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(de){de.outerHTML=de.innerHTML});var ue=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ue=f.textContent;else{f.previousElementSibling&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove()),f.previousElementSibling&&ue.indexOf( ` -- -
` )===0&&(ue=f.previousElementSibling.textContent+ue,f.previousElementSibling.remove());var we="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+ `
` ,de.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(de,Ie){de&&!f.isEqualNode(de.parentElement)&&(we+=de.parentElement.textContent+ `
` ,de.parentElement.remove())}),ue=we+ue}ue=Oe(ue,i),ke?f.innerHTML=ue:f.outerHTML=ue,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(de){i.sv.element.insertAdjacentElement("beforeend",de.parentElement)}),G(i.sv.element,function(de){i.sv.element.insertAdjacentElement("beforeend",de)}),(0,q.ib)(i.sv.element,u),Z(i),Ge(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},be=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F \d {1,2} $ /.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,q.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,q.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Ge(i),a.preventDefault(),!0;var K=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),ve=K;if(ve||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(ve=fe),!ve&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(ve=_.previousElementSibling),ve){var ue=(0,q.im)(ve,i.sv.element,L).start,ke=ve.getAttribute("data-type")==="task-marker",we=ve;if(ke&&(we=ve.previousElementSibling.previousElementSibling.previousElementSibling),ue===ve.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ve.nextElementSibling.textContent.trim()==="")return((u=we.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(we.previousElementSibling.remove(),X(i)):(ke&&(we.remove(),ve.previousElementSibling.previousElementSibling.remove(),ve.previousElementSibling.remove()),ve.nextElementSibling.remove(),ve.remove(),Ge(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?we.previousElementSibling.getAttribute("data-type")==="padding"&&we.previousElementSibling.remove():we.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(we.textContent.replace(/ \S /g," "),"</span>")),/^ \d /.test(we.textContent)&&(we.textContent=we.textContent.replace(/^ \d {1,}/,"1"),L.selectNodeContents(ve.firstChild),L.collapse(!1)),X(i),a.preventDefault(),!0}}if(go(i,L,a))return!0;var de=(0,y.a1)(D,"data-block","0"),Ie=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&de){var Te=!1, $ e=de.textContent.match(/^ \n +/);(0,q.im)(de,i.sv.element).start<=( $ e? $ e[0].length:0)&&(Te=!0);var bt= `
` ;if(Ie){if(((d=Ie.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Ie.previousElementSibling.remove(),Ge(i),a.preventDefault(),!0;bt+=Je(Ie)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),de&&de.textContent.trim()!==""&&!Te?X(i):Ge(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(Ie&&((f=Ie.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,q.im)(Ie,i.sv.element,L).start===1&&Ie.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Ie,0),L.extractContents(),Ie.textContent.trim()!==""?X(i):Ge(i),a.preventDefault(),!0;if(de&&(0,q.im)(de,i.sv.element,L).start===0&&de.previousElementSibling){L.extractContents();var gt=de.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=de.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",de.innerHTML),de.remove()),de.textContent.trim()!==""&&!(!((E=de.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?X(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Ge(i)),a.preventDefault(),!0}}return!1},le=o(538),ye=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ye(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),er(i,i.options.mode,st(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},ze=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"
` ,s.insertNode(_),s.collapse(!0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var K=document.createElement("p");return K.textContent= `
` ,K.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",K),s.setStart(K,0),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Re(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&lr(i)}if(Ps(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var ve=(0,y.lG)(u,"A"),ue=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(ve||ue||ke||B&&B.tagName.length===2){var we=i.wysiwyg.popover.querySelector("input");we.focus(),we.select()}}if(Ot(i,a))return!0;if(oe("⇧⌘U",a)){var de=i.wysiwyg.popover.querySelector('[data-type="up"]');if(de)return de.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var de=i.wysiwyg.popover.querySelector('[data-type="down"]');if(de)return de.click(),a.preventDefault(),!0}if(go(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode( `
` +c.g.ZWSP)):s.insertNode(document.createTextNode( `
` )),s.collapse(!1),(0,q.Hc)(s),Re(i),Z(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(zs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var Ie=(0,q.im)(d,i.wysiwyg.element,s).start;if(Ie===0&&s.startOffset===0||Ie===1&&d.innerText.startsWith(c.g.ZWSP))return cr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Re(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)=== `
` &&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Re(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Dt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(Fs(a,d,s))return a.preventDefault(),!0;if(Ts(s,a.key),a.key==="ArrowDown"){var $ e=u.nextSibling; $ e&& $ e.nodeType!==3&& $ e.getAttribute("data-type")==="math-inline"&&s.setStartAfter( $ e)}return d&& $ t(d,i,a,s)?(a.preventDefault(),!0):!1},Ot=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},jn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,q.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",pn(u,i),tn(i,"footnotes-block"),en(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var K=(0,y.fb)(s,"vditor-toc");if(K){i.wysiwyg.popover.innerHTML="",pn(K,i),tn(i,"vditor-toc"),en(i,K);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",ur(a,fe,i),nr(a,fe,i),pn(fe,i),tn(i,"blockquote"),en(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",ur(a,d,i),nr(a,d,i),pn(d,i),tn(i,"li"),en(i,d)),_){i.options.lang,i.
< / c o d e > < / p r e > ` : ( K . i n n e r H T M L = " < p r e > < c o d e > " . c o n c a t ( f . t o S t r i n g ( ) , " < w b r > < / c o d e > < / p r e > " ) , f . d e l e t e C o n t e n t s ( ) ) , f . i n s e r t N o d e ( K ) , _ & & ( _ . o u t e r H T M L = i . l u t e . S p i n V d i t o r D O M ( _ . o u t e r H T M L ) ) , ( 0 , q . i b ) ( i . w y s i w y g . e l e m e n t , f ) , i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - w y s i w y g _ _ p r e v i e w [ d a t a - r e n d e r = ' 2 ' ] " ) . f o r E a c h ( f u n c t i o n ( b t ) { t t ( b t , i ) } ) , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - d i s a b l e d " ) } e l s e i f ( E = = = " l i n k " ) { i f ( f . t o S t r i n g ( ) = = = " " ) { v a r f e = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; f e . i n n e r T e x t = c . g . Z W S P , f . i n s e r t N o d e ( f e ) , f . s e t S t a r t ( f e . f i r s t C h i l d , 1 ) , f . c o l l a p s e ( ! 0 ) , T i ( i , f e , f ) ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( " i n p u t " ) ; v e . v a l u e = " " , v e . f o c u s ( ) , d = ! 1 } e l s e { v a r K = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; K . s e t A t t r i b u t e ( " h r e f " , " " ) , K . i n n e r H T M L = f . t o S t r i n g ( ) , f . s u r r o u n d C o n t e n t s ( K ) , f . i n s e r t N o d e ( K ) , ( 0 , q . H c ) ( f ) , T i ( i , K , f ) ; v a r u e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r A l l ( " i n p u t " ) ; u e [ 0 ] . v a l u e = K . i n n e r T e x t , u e [ 1 ] . f o c u s ( ) } u = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) } e l s e i f ( E = = = " t a b l e " ) { v a r k e = ' < t a b l e d a t a - b l o c k = " 0 " > < t h e a d > < t r > < t h > c o l 1 < w b r > < / t h > < t h > c o l 2 < / t h > < t h > c o l 3 < / t h > < / t r > < / t h e a d > < t b o d y > < t r > < t d > < / t d > < t d > < / t d > < t d > < / t d > < / t r > < t r > < t d > < / t d > < t d > < / t d > < t d > < / t d > < / t r > < / t b o d y > < / t a b l e > ' ; i f ( f . t o S t r i n g ( ) . t r i m ( ) = = = " " ) _ & & _ . i n n e r H T M L . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " ? _ . o u t e r H T M L = k e : d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , k e ) , f . s e l e c t N o d e ( i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r ( " w b r " ) . p r e v i o u s S i b l i n g ) , i . w y s i w y g . e l e m e n t . q u e r y S e l e c t o r ( " w b r " ) . r e m o v e ( ) , ( 0 , q . H c ) ( f ) ; e l s e { k e = ' < t a b l e d a t a - b l o c k = " 0 " > < t h e a d > < t r > ' ; v a r w e = f . t o S t r i n g ( ) . s p l i t ( `
` ),de=we[0].split(",").length>we[0].split(" ").length?",":" ";we.forEach(function( $ e,bt){bt===0?( $ e.split(de).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>", $ e.split(de).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,q.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Ie= ` < hr data - block = "0" > < p data - block = "0" > < wbr >
< /p>`;_.innerHTML.trim()===""?_.outerHTML=Ie:_.insertAdjacentHTML("afterend",Ie),(0,q.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var K=document.createElement(Te);K.textContent=c.g.ZWSP,f.insertNode(K),K.previousSibling&&K.previousSibling.textContent===c.g.ZWSP&&(K.previousSibling.textContent=""),f.setStart(K.firstChild,1),f.collapse(!0),(0,q.Hc)(f)}else document.execCommand(E,!1,"")}u&&jn(i),d&&Re(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</ ").concat(L," > ");else{this.element.classList.add(" vditor - toolbar _ _item ");var D=document.createElement(L);D.setAttribute(" data - type ",s.name),D.className=" vditor - tooltipped vditor - tooltipped _ _ ".concat(s.tipPosition),D.setAttribute(" aria - label ",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode===" wysiwyg "?bs(a,d.element.children[0],_):a.currentMode===" ir "?vu(a,d.element.children[0],s.prefix||" ",s.suffix||" "):Gt(a,d.element.children[0],s.prefix||" ",s.suffix||" "))})}return i}(),ys=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!=" function "&&s!==null)throw new TypeError(" Class extends value "+String(s)+" is not a constructor or null ");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),er=function(i,a,s){var u;if(typeof s!=" string "?(A(i,[" subToolbar "," hint "]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!=" string ")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode===" both "&&a===" sv "?i.preview.element.style.display=" block ":i.preview.element.style.display=" none ",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,[" outdent "," indent "]),a===" ir ")C(i.toolbar.elements,[" both "]),T(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert - after "]),i.sv.element.style.display=" none ",i.wysiwyg.element.parentElement.style.display=" none ",i.ir.element.parentElement.style.display=" block ",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode=" ir ",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Xn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(" . vditor - ir _ _preview [ data - render = '2' ] ").forEach(function(f){tt(f,i)}),i.ir.element.querySelectorAll(" . vditor - toc ").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a===" wysiwyg ")C(i.toolbar.elements,[" both "]),T(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert - after "]),i.sv.element.style.display=" none ",i.wysiwyg.element.parentElement.style.display=" block ",i.ir.element.parentElement.style.display=" none ",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode=" wysiwyg ",ze(i),uo(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(" . vditor - toc ").forEach(function(f){(0,Fe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display=" none ";else if(a===" sv "){T(i.toolbar.elements,[" both "]),C(i.toolbar.elements,[" outdent "," indent "," outline "," insert - before "," insert -
< button data - mode = "ir" > ` ).concat(window.VditorI18n.instantRendering," <").concat((0,m.ns)("⌥⌘8"), ` > < / b u t t o n >
< button data - mode = "sv" > ` ).concat(window.VditorI18n.splitView," <").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){er(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){er(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){er(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),Or=function(i,a){return(0,q.Gb)(i,a)?getSelection().toString():""},Ai=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},ho=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},Mi=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,q.zh)(i),i.options.blur&&i.options.blur(v(i))})},Ci=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?lt(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ta(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},U=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},Q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Z=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,q.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},xe=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(be(i,s))return}else if(i.currentMode==="wysiwyg"){if(zn(i,s))return}else if(i.currentMode==="ir"&&Ce(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6] $ /.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?lr(i):kn(i,u),Re(i)}else i.currentMode==="sv"?Ct(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&fi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9] $ /.test(s.code))return s.code==="Digit7"?er(i,"wysiwyg",s):s.code==="Digit8"?er(i,"ir",s):s.code==="Digit9"&&er(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.f
< / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < / d i v > < d i v d a t a - b l o c k = " 0 " > < ` ) + " < / d i v > " , u . i s E q u a l N o d e ( i . s v . e l e m e n t ) ? u . i n n e r H T M L = d : u . o u t e r H T M L = d , G ( i . s v . e l e m e n t ) , ( 0 , q . i b ) ( i . s v . e l e m e n t , s ) , Z ( i ) } , p e = f u n c t i o n ( i , a , s ) { s = = = v o i d 0 & & ( s = ! 0 ) ; v a r u = i ; f o r ( u . n o d e T y p e = = = 3 & & ( u = u . p a r e n t E l e m e n t ) ; u ; ) { i f ( u . g e t A t t r i b u t e ( " d a t a - t y p e " ) = = = a ) r e t u r n u ; s ? u = u . p r e v i o u s E l e m e n t S i b l i n g : u = u . n e x t E l e m e n t S i b l i n g } r e t u r n ! 1 } , O e = f u n c t i o n ( i , a ) { z ( " S p i n V d i t o r S V D O M " , i , " a r g u m e n t " , a . o p t i o n s . d e b u g g e r ) ; v a r s = a . l u t e . S p i n V d i t o r S V D O M ( i ) ; r e t u r n i = " < d i v d a t a - b l o c k = ' 0 ' > " + s . r e p l a c e ( / < s p a n d a t a - t y p e = " n e w l i n e " > < b r \ / > < s p a n s t y l e = " d i s p l a y : n o n e " > \ n < \ / s p a n > < \ / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r \ / > < s p a n s t y l e = " d i s p l a y : n o n e " > \ n < \ / s p a n > < \ / s p a n > < / g , ` < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r / > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > < / d i v > < d i v d a t a - b l o c k = " 0 " > < ` ) + " < / d i v > " , z ( " S p i n V d i t o r S V D O M " , i , " r e s u l t " , a . o p t i o n s . d e b u g g e r ) , i } , J e = f u n c t i o n ( i ) { v a r a = i . g e t A t t r i b u t e ( " d a t a - t y p e " ) , s = i . p r e v i o u s E l e m e n t S i b l i n g , u = a & & a ! = = " t e x t " & & a ! = = " t a b l e " & & a ! = = " h e a d i n g - m a r k e r " & & a ! = = " n e w l i n e " & & a ! = = " y a m l - f r o n t - m a t t e r - o p e n - m a r k e r " & & a ! = = " y a m l - f r o n t - m a t t e r - c l o s e - m a r k e r " & & a ! = = " c o d e - b l o c k - i n f o " & & a ! = = " c o d e - b l o c k - c l o s e - m a r k e r " & & a ! = = " c o d e - b l o c k - o p e n - m a r k e r " ? i . t e x t C o n t e n t : " " , d = ! 1 ; f o r ( a = = = " n e w l i n e " & & ( d = ! 0 ) ; s & & ! d ; ) { v a r f = s . g e t A t t r i b u t e ( " d a t a - t y p e " ) ; i f ( f = = = " l i - m a r k e r " | | f = = = " b l o c k q u o t e - m a r k e r " | | f = = = " t a s k - m a r k e r " | | f = = = " p a d d i n g " ) { v a r E = s . t e x t C o n t e n t ; i f ( f = = = " l i - m a r k e r " & & ( a = = = " c o d e - b l o c k - o p e n - m a r k e r " | | a = = = " c o d e - b l o c k - i n f o " ) ) u = E . r e p l a c e ( / \ S / g , " " ) + u ; e l s e i f ( a = = = " c o d e - b l o c k - c l o s e - m a r k e r " & & s . n e x t E l e m e n t S i b l i n g . i s S a m e N o d e ( i ) ) { v a r L = p e ( i , " c o d e - b l o c k - o p e n - m a r k e r " ) ; L & & L . p r e v i o u s E l e m e n t S i b l i n g & & ( s = L . p r e v i o u s E l e m e n t S i b l i n g , u = E + u ) } e l s e u = E + u } e l s e f = = = " n e w l i n e " & & ( d = ! 0 ) ; s = s . p r e v i o u s E l e m e n t S i b l i n g } r e t u r n u } , G e = f u n c t i o n ( i , a ) { a = = = v o i d 0 & & ( a = { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 1 , e n a b l e I n p u t : ! 0 } ) , a . e n a b l e H i n t & & i . h i n t . r e n d e r ( i ) , i . p r e v i e w . r e n d e r ( i ) ; v a r s = v ( i ) ; t y p e o f i . o p t i o n s . i n p u t = = " f u n c t i o n " & & a . e n a b l e I n p u t & & i . o p t i o n s . i n p u t ( s ) , i . o p t i o n s . c o u n t e r . e n a b l e & & i . c o u n t e r . r e n d e r ( i , s ) , i . o p t i o n s . c a c h e . e n a b l e & & ( 0 , m . p K ) ( ) & & ( l o c a l S t o r a g e . s e t I t e m ( i . o p t i o n s . c a c h e . i d , s ) , i . o p t i o n s . c a c h e . a f t e r & & i . o p t i o n s . c a c h e . a f t e r ( s ) ) , i . d e v t o o l s & & i . d e v t o o l s . r e n d e r E c h a r t ( i ) , c l e a r T i m e o u t ( i . s v . p r o c e s s T i m e o u t I d ) , i . s v . p r o c e s s T i m e o u t I d = w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { a . e n a b l e A d d U n d o S t a c k & & ! i . s v . c o m p o s i n g L o c k & & i . u n d o . a d d T o U n d o S t a c k ( i ) } , i . o p t i o n s . u n d o D e l a y ) } , C t = f u n c t i o n ( i , a ) { v a r s = ( 0 , q . z h ) ( i ) , u = ( 0 , N . S ) ( s . s t a r t C o n t a i n e r , " S P A N " ) ; u & & u . t e x t C o n t e n t . t r i m ( ) ! = = " " & & ( a = `
` +a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Gt=function(i,a,s,u){var d=(0,q.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML= ` < span data - type = "p" data - block = "0" > < span data - type = "text" > < wbr > < / s p a n > < / s p a n > < s p a n d a t a - t y p e = " n e w l i n e " > < b r > < s p a n s t y l e = " d i s p l a y : n o n e " >
< / s p a n > < / s p a n > ` , ( 0 , q . i b ) ( i . s v . e l e m e n t , d ) ) ; v a r E = ( 0 , y . F 9 ) ( d . s t a r t C o n t a i n e r ) , L = ( 0 , N . S ) ( d . s t a r t C o n t a i n e r , " S P A N " ) ; i f ( E ) { i f ( f = = = " l i n k " ) { v a r D = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? D = " " . c o n c a t ( s ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( u ) : D = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( u . r e p l a c e ( " ) " , L u t e . C a r e t + " ) " ) ) , d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , D ) ; r e t u r n } e l s e i f ( f = = = " i t a l i c " | | f = = = " b o l d " | | f = = = " s t r i k e " | | f = = = " i n l i n e - c o d e " | | f = = = " c o d e " | | f = = = " t a b l e " | | f = = = " l i n e " ) { v a r D = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? D = " " . c o n c a t ( s ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( f = = = " c o d e " ? " " : u ) : D = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( L u t e . C a r e t ) . c o n c a t ( f = = = " c o d e " ? " " : u ) , f = = = " t a b l e " | | f = = = " c o d e " & & L & & L . t e x t C o n t e n t ! = = " " ? D = `
` +D:f==="line"&&(D= `
` .concat(s, `
` ).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=pe(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),X(i);return}(0,q.ib)(i.sv.element,d),Ge(i)}},un=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}}, $ n=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},mr=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},Hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ia=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Li=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var K=a[B],fe=!0;K.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),K.size>i.options.upload.max&&(u+="<li>".concat(K.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var ve=K.name.lastIndexOf("."),ue=K.name.substr(ve),ke=i.options.upload.filename(K.name.substr(0,ve))+ue;if(i.options.upload.accept){var we=i.options.upload.accept.split(",").some(function(de){var Ie=de.trim();if(Ie.indexOf(".")===0){if(ue.toLowerCase()===Ie.toLowerCase())return!0}else if(K.type.split("/")[0]===Ie.split("/")[0])return!0;return!1});we||(u+="<li>".concat(K.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(K),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Oa=function(i,a){var s=un(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase()
data - block = "0" > < pre > < code > & lt ; audio controls = "controls" src = "`.concat(L,'" & gt ; & lt ; / a u d i o & g t ; < / c o d e > < / p r e > < p r e c l a s s = " v d i t o r - w y s i w y g _ _ p r e v i e w " d a t a - r e n d e r = " 1 " > < a u d i o c o n t r o l s = " c o n t r o l s " s r c = " ' ) . c o n c a t ( L , ` " > < / a u d i o > < / p r e > < / d i v >
` ):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L, ` " > < / a u d i o >
` ):f+="[".concat(B,"](").concat(L, ` )
` ):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L, ` " >
` ):f+=".concat(L, ` )
` ):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B, ` < / a >
` ):f+="[".concat(B,"](").concat(L, ` )
` )}),(0,q.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},_i=function(i,a,s){return mr(void 0,void 0,void 0,function(){var u,d,ue,f,E,E,L,D,_,B,K,fe,ve,ue,ke,we;return Hr(this,function(de){switch(de.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ue=0;ue<d;ue++)f=a[ue],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=de.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=de.sent(),de.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=un(i),i.upload.range=(0,q.zh)(i),D=Li(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,K=0,fe=Object.keys(B);K<fe.length;K++)ve=fe[K],_.append(ve,B[ve]);for(ue=0,ke=D.length;ue<ke;ue++)_.append(i.options.upload.fieldName,D[ue]);return we=new XMLHttpRequest,i.upload.xhr=we,we.open("POST",i.options.upload.url),i.options.upload.token&&we.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(we.withCredentials=!0), $ n(i,we),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),we.onreadystatechange=function(){if(we.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),we.status>=200&&we.status<300)if(i.options.upload.success)i.options.upload.success(L,we.responseText);else{var Ie=we.responseText;i.options.upload.format&&(Ie=i.options.upload.format(a,we.responseText)),Oa(Ie,i)}else i.options.upload.error?i.options.upload.error(we.responseText):i.tip.show(we.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},we.upload.onprogress=function(Ie){if(Ie.lengthComputable){var Te=Ie.loaded/Ie.total*100;i.upload.element.style.display="block";var $ e=i.upload.element; $ e.style.width=Te+"%"}},we.send(_),[2]}})})},Zr=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var K=d.previousElementSibling,fe=d.nextElementSibling;K&&(K.tagName==="UL"||K.tagName==="OL")&&(E=K.outerHTML+E,K.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith(" ` ` ` ")||(i.wysiwyg.element.querySelectorAll(" [ data - type = 'link-ref-defs-block' ] " ) . forEach ( function ( Te ) { Te && ! d . isEqualNode ( Te ) && ( E += Te . outerHTML , Te . re
< / p > ` ) ) , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) , d r ( i ) , l t ( i ) ) } , f u = f u n c t i o n ( i ) { v a r a = ( 0 , y . l G ) ( i , " T A B L E " ) ; r e t u r n a & & a . r o w s [ 0 ] . c e l l s [ 0 ] . i s S a m e N o d e ( i ) ? a : ! 1 } , m u = f u n c t i o n ( i ) { v a r a = ( 0 , y . l G ) ( i , " T A B L E " ) ; r e t u r n a & & a . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . i s S a m e N o d e ( i ) ? a : ! 1 } , A s = f u n c t i o n ( i , a , s ) { s = = = v o i d 0 & & ( s = ! 0 ) ; v a r u = i . p r e v i o u s E l e m e n t S i b l i n g ; r e t u r n u | | ( i . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g ? u = i . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g . l a s t E l e m e n t C h i l d : i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . t a g N a m e = = = " T B O D Y " & & i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g ? u = i . p a r e n t E l e m e n t . p a r e n t E l e m e n t . p r e v i o u s E l e m e n t S i b l i n g . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d : u = n u l l ) , u & & ( a . s e l e c t N o d e C o n t e n t s ( u ) , s | | a . c o l l a p s e ( ! 1 ) , ( 0 , q . H c ) ( a ) ) , u } , p i = f u n c t i o n ( i , a , s , u , d ) { v a r f = ( 0 , q . i m ) ( u , i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) ; i f ( a . k e y = = = " A r r o w D o w n " & & u . t e x t C o n t e n t . t r i m R i g h t ( ) . s u b s t r ( f . s t a r t ) . i n d e x O f ( `
` )===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Pr=function(i,a,s,u,d){var f=(0,q.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf( `
` )===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,q.Hc)(s)),a.preventDefault(),!0}return!1},Ji=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var D=void 0;s==="list"?(D=document.createElement("ul"),D.setAttribute("data-marker","*")):(D=document.createElement("ol"),D.setAttribute("data-marker","1.")),D.setAttribute("data-block","0"),D.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),D.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(D,d.parentElement)}else{var _=(0,y.a1)(a.startContainer,"data-block","0");_||(i[i.currentMode].element.querySelector("wbr").remove(),_=i[i.currentMode].element.querySelector("p"),_.innerHTML="<wbr>"),s==="check"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="list"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="ordered-list"&&(_.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(_.innerHTML,"</li></ol>")),_.remove())}},Ms=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,q.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){tt(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),lt(i),dr(i)}else i[i.currentMode].element.focus()},po=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(K){K.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(K,fe){K.nodeType!==3&&a&&K.textContent.trim()!==""&&a.getAttribute("data-node-id")===K.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(K){D&&(_+=K.outerHTML,!K.nextElementSibling&&!K.previousElementSibling?K.parentElement.remove():K.remove()),K.isSam
` ).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ | \* /g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split( `
` ).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},mo=function(i){var a=i.trimRight().split( `
` );return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},lt=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Re(i,a):i.currentMode==="ir"?Xn(i,a):i.currentMode==="sv"&&Ge(i,a)},Cs=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith( `
` )&&E.insertAdjacentText("beforeend", `
` ),i.insertNode(document.createTextNode( `
` )),i.collapse(!1),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,q.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend", `
` ),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,q.ib)(a[a.currentMode].element,i),lt(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?po(a,E,i,E.parentElement):Ms(a,E,i),u.preventDefault(),!0}}return!1},go=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,q.Hc)(a),lt(i),s.preventDefault(),!0},Ls=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(qs||(qs=pu(["",""],["",""])),s.textContent).replace(/ \\ \| /g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+ `
` +E.substring(3,E.length-3)+ `
| < wbr > ` ,s.outerHTML=a.lute.SpinVditorDOM(E),(0,q.ib)(a[a.currentMode].element,u),lt(a),Z(a),i.preventDefault(),!0}if(fo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split( `
` );return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join( `
` ),"</p>")),s.insertAdjacentHTML("afterend","".concat(L, ` < hr data - block = "0" > < p data - block = "0" > < wbr >
< / p > ` ) ) , s . r e m o v e ( ) , ( 0 , q . i b ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , u ) , l t ( a ) , Z ( a ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( m o ( s . i n n e r H T M L ) ) r e t u r n a . c u r r e n t M o d e = = = " w y s i w y g " ? s . o u t e r H T M L = a . l u t e . S p i n V d i t o r D O M ( s . i n n e r H T M L + ` < p d a t a - b l o c k = " 0 " > < w b r >
< / p > ` ) : s . o u t e r H T M L = a . l u t e . S p i n V d i t o r I R D O M ( s . i n n e r H T M L + ` < p d a t a - b l o c k = " 0 " > < w b r >
< / p > ` ) , ( 0 , q . i b ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , u ) , l t ( a ) , Z ( a ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( u . c o l l a p s e d & & s . p r e v i o u s E l e m e n t S i b l i n g & & i . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( i ) & & ! i . a l t K e y & & ! i . s h i f t K e y & & s . t e x t C o n t e n t . t r i m R i g h t ( ) . s p l i t ( `
` ).length>1&&(0,q.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith( `
` )||(_.textContent=_.textContent+ `
` ),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,q.ib)(a[a.currentMode].element,u),!1}return!1}},_s=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),lt(i)},Ns=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/< \/ th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,q.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));lt(i)},ea=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");lt(i)},Ds=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,q.Hc)(a),lt(i)}},Rs=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),dr(i);break}L[d].remove()}(0,q.Hc)(a),lt(i)},Is=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),lt(i),Z(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return As(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,q.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,q.Hc)(s)):hi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,q.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,q.Hc)(s)):hi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,q.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.s
< / p > ` , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , s ) ) : ( s . s e t S t a r t B e f o r e ( L ) , s . c o l l a p s e ( ! 0 ) ) , l t ( i ) ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ F " , a ) ) r e t u r n N s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⌘ = " , a ) ) r e t u r n _ s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ G " , a ) ) r e t u r n e a ( i , L , d , " b e f o r e b e g i n " ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ = " , a ) ) r e t u r n e a ( i , L , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⌘ - " , a ) ) r e t u r n D s ( i , s , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ - " , a ) ) r e t u r n R s ( i , s , L , d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( o e ( " ⇧ ⌘ L " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " l e f t " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " l e f t " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ C " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " c e n t e r " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " c e n t e r " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( o e ( " ⇧ ⌘ R " , a ) ) { i f ( i . c u r r e n t M o d e = = = " i r " ) r e t u r n Q i ( L , " r i g h t " ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; v a r v e = i . w y s i w y g . p o p o v e r . q u e r y S e l e c t o r ( ' [ d a t a - t y p e = " r i g h t " ] ' ) ; i f ( v e ) r e t u r n v e . c l i c k ( ) , a . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , O s = f u n c t i o n ( i , a , s , u ) { i f ( s . t a g N a m e = = = " P R E " & & o e ( " ⌘ A " , a ) ) r e t u r n u . s e l e c t N o d e C o n t e n t s ( s . f i r s t E l e m e n t C h i l d ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( i . o p t i o n s . t a b & & a . k e y = = = " T a b " & & ! a . s h i f t K e y & & u . t o S t r i n g ( ) = = = " " ) r e t u r n u . i n s e r t N o d e ( d o c u m e n t . c r e a t e T e x t N o d e ( i . o p t i o n s . t a b ) ) , u . c o l l a p s e ( ! 1 ) , l t ( i ) , a . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( a . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( a ) & & ! a . s h i f t K e y & & ! a . a l t K e y ) { v a r d = ( 0 , q . i m ) ( s , i [ i . c u r r e n t M o d e ] . e l e m e n t , u ) ; i f ( ( d . s t a r t = = = 0 | | d . s t a r t = = = 1 & & s . i n n e r T e x t = = = `
` )&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,q.ib)(i[i.currentMode].element,u),lt(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith( `
` )||s.firstElementChild.insertAdjacentText("beforeend", `
` ),u.extractContents(),u.insertNode(document.createTextNode( `
` )),u.collapse(!1),(0,q.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?Zr(i,u):Nt(i,u)),Z(i),a.preventDefault(),!0):!1},Hs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,q.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")=== `
` ||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith( `
` )&&(0,q.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP, ` < wbr >
< / p > ` ) ) , ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } v a r L = ( 0 , y . F 9 ) ( d ) ; i f ( i . c u r r e n t M o d e = = = " w y s i w y g " & & L & & o e ( " ⇧ ⌘ ; " , s ) ) r e t u r n a . i n s e r t N o d e ( d o c u m e n t . c r e a t e E l e m e n t ( " w b r " ) ) , L . o u t e r H T M L = ' < b l o c k q u o t e d a t a - b l o c k = " 0 " > ' . c o n c a t ( L . o u t e r H T M L , " < / b l o c k q u o t e > " ) , ( 0 , q . i b ) ( i . w y s i w y g . e l e m e n t , a ) , R e ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 ; i f ( p i ( i , s , a , f , f ) | | P r ( i , s , a , f , f ) ) r e t u r n ! 0 } r e t u r n ! 1 } , P s = f u n c t i o n ( i , a , s ) { v a r u = a . s t a r t C o n t a i n e r , d = ( 0 , y . l G ) ( u , " L I " ) ; i f ( d & & d . c l a s s L i s t . c o n t a i n s ( " v d i t o r - t a s k " ) ) { i f ( o e ( " ⇧ ⌘ J " , s ) ) { v a r f = d . f i r s t E l e m e n t C h i l d ; r e t u r n f . c h e c k e d ? f . r e m o v e A t t r i b u t e ( " c h e c k e d " ) : f . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( s . k e y = = = " B a c k s p a c e " & & ! ( 0 , m . y l ) ( s ) & & ! s . s h i f t K e y & & ! s . a l t K e y & & a . t o S t r i n g ( ) = = = " " & & a . s t a r t O f f s e t = = = 1 & & ( u . n o d e T y p e = = = 3 & & u . p r e v i o u s S i b l i n g & & u . p r e v i o u s S i b l i n g . t a g N a m e = = = " I N P U T " | | u . n o d e T y p e ! = = 3 ) ) { v a r E = d . p r e v i o u s E l e m e n t S i b l i n g ; i f ( d . q u e r y S e l e c t o r ( " i n p u t " ) . r e m o v e ( ) , E ) { v a r L = ( 0 , y . D X ) ( E ) ; L . p a r e n t E l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , " < w b r > " + d . i n n e r H T M L . t r i m ( ) ) , d . r e m o v e ( ) } e l s e d . p a r e n t E l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e b e g i n " , ' < p d a t a - b l o c k = " 0 " > < w b r > ' . c o n c a t ( d . i n n e r H T M L . t r i m ( ) | | `
` ,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,q.ib)(i[i.currentMode].element,a),lt(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&po(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",K=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?K=!0:K?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,ve=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ue="";B&&(ue=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(ve,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B, ` < p data - block = "0" > < wbr >
< / p > < ` ) . c o n c a t ( f e , `
data - tight = "true" ` ).concat(ve,' data-block="0"').concat(ue,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend", ` < p data - block = "0" > < wbr >
< / p > ` ) , d . p a r e n t E l e m e n t . q u e r y S e l e c t o r A l l ( " l i " ) . l e n g t h = = = 1 ? d . p a r e n t E l e m e n t . r e m o v e ( ) : d . r e m o v e ( ) ; e l s e u . n o d e T y p e ! = = 3 & & a . s t a r t O f f s e t = = = 0 & & u . f i r s t C h i l d . t a g N a m e = = = " I N P U T " ? a . s e t S t a r t ( u . c h i l d N o d e s [ 1 ] , 1 ) : ( a . s e t E n d A f t e r ( d . l a s t C h i l d ) , d . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , ' < l i c l a s s = " v d i t o r - t a s k " d a t a - m a r k e r = " ' . c o n c a t ( d . g e t A t t r i b u t e ( " d a t a - m a r k e r " ) , ' " > < i n p u t t y p e = " c h e c k b o x " > < w b r > < / l i > ' ) ) , d o c u m e n t . q u e r y S e l e c t o r ( " w b r " ) . a f t e r ( a . e x t r a c t C o n t e n t s ( ) ) ) ; r e t u r n ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , Z ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , z s = f u n c t i o n ( i , a , s , u ) { i f ( a . s t a r t C o n t a i n e r . n o d e T y p e ! = = 3 ) { v a r d = a . s t a r t C o n t a i n e r . c h i l d r e n [ a . s t a r t O f f s e t ] ; i f ( d & & d . t a g N a m e = = = " H R " ) r e t u r n a . s e l e c t N o d e C o n t e n t s ( d . p r e v i o u s E l e m e n t S i b l i n g ) , a . c o l l a p s e ( ! 1 ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } i f ( u ) { v a r f = u . p r e v i o u s E l e m e n t S i b l i n g ; i f ( f & & ( 0 , q . i m ) ( u , i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) . s t a r t = = = 0 & & ( ( 0 , m . v U ) ( ) & & f . t a g N a m e = = = " H R " | | f . t a g N a m e = = = " T A B L E " ) ) { i f ( f . t a g N a m e = = = " T A B L E " ) { v a r E = f . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d . l a s t E l e m e n t C h i l d ; E . i n n e r H T M L = E . i n n e r H T M L . t r i m L e f t ( ) + " < w b r > " + u . t e x t C o n t e n t . t r i m ( ) , u . r e m o v e ( ) } e l s e f . r e m o v e ( ) ; r e t u r n ( 0 , q . i b ) ( i [ i . c u r r e n t M o d e ] . e l e m e n t , a ) , l t ( i ) , s . p r e v e n t D e f a u l t ( ) , ! 0 } } r e t u r n ! 1 } , B s = f u n c t i o n ( i ) { ( 0 , m . v U ) ( ) & & i . s t a r t C o n t a i n e r . n o d e T y p e ! = = 3 & & i . s t a r t C o n t a i n e r . t a g N a m e = = = " H R " & & i . s e t S t a r t B e f o r e ( i . s t a r t C o n t a i n e r ) } , F s = f u n c t i o n ( i , a , s ) { v a r u , d ; i f ( ! ( 0 , m . v U ) ( ) ) r e t u r n ! 1 ; i f ( i . k e y = = = " A r r o w U p " & & a & & ( ( u = a . p r e v i o u s E l e m e n t S i b l i n g ) = = = n u l l | | u = = = v o i d 0 ? v o i d 0 : u . t a g N a m e ) = = = " T A B L E " ) { v a r f = a . p r e v i o u s E l e m e n t S i b l i n g ; r e t u r n s . s e l e c t N o d e C o n t e n t s ( f . r o w s [ f . r o w s . l e n g t h - 1 ] . l a s t E l e m e n t C h i l d ) , s . c o l l a p s e ( ! 1 ) , i . p r e v e n t D e f a u l t ( ) , ! 0 } r e t u r n i . k e y = = = " A r r o w D o w n " & & a & & ( ( d = a . n e x t E l e m e n t S i b l i n g ) = = = n u l l | | d = = = v o i d 0 ? v o i d 0 : d . t a g N a m e ) = = = " T A B L E " ? ( s . s e l e c t N o d e C o n t e n t s ( a . n e x t E l e m e n t S i b l i n g . r o w s [ 0 ] . c e l l s [ 0 ] ) , s . c o l l a p s e ( ! 0 ) , i . p r e v e n t D e f a u l t ( ) , ! 0 ) : ! 1 } , t a = f u n c t i o n ( i , a , s ) { r e t u r n x s ( v o i d 0 , v o i d 0 , v o i d 0 , f u n c t i o n ( ) { v a r u , d , f , E , L , D , _ , B , K , f e , v e , u e , k e , d e , w e , d e , I e ; r e t u r n k s ( t h i s , f u n c t i o n ( T e ) { s w i t c h ( T e . l a b e l ) { c a s e 0 : r e t u r n i [ i . c u r r e n t M o d e ] . e l e m e n t . g e t A t t r i b u t e ( " c o n t e n t e d i t a b l e " ) ! = = " t r u e " ? [ 2 ] : ( a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) , " c l i p b o a r d D a t a " i n a ? ( u = a . c l i p b o a r d D a t a . g e t D a t a ( " t e x t / h t m l " ) , d = a . c l i p b o a r d D a t a . g e t D a t a ( " t e x t / p l a i n " ) , f = a . c l i p b o a r d D a t a . f i l e s ) : ( u = a . d a t a T r a n s f e r . g e t D a t a ( " t e x t / h t m l " ) , d = a . d a t a T r a n s f e r . g e t D a t a ( " t e x t / p l a i n " ) , a . d a t a T r a n s f e r . t y p e s . i n c l u d e s ( " F i l e s " ) & & ( f = a . d a t a T r a n s f e r . i t e m s ) ) , E = { } , L = f u n c t i o n ( $ e , b t ) { i f ( ! b t ) r e t u r n [ " " , L u t e . W a l k C o n t i n u e ] ; i f ( i . o p t i o n s . u p l o a d . r e n d e r L i n k D e s t ) r e t u r n i . o p t i o n s . u p l o a d . r e n d e r L i n k D e s t ( i , $ e , b t ) ; v a r g t = $ e . T o k e n s S t r ( ) ; i f ( $ e . _ _ i n t e r n a l _ o b j e c t _ _ . P a r e n t . T y p e = = = 3 4 & & g t & & g t . i n d e x O f ( " f i l e : / / " ) = = = - 1 & & i . o p t i o n s . u p l o a d . l i n k T o I m g U r l ) { v a r k t = n e w X M L H t t p R e q u e s t ; k t . o p e n ( " P O S T " , i . o p t i o n s . u p l o a d . l i n k T o I m g U r l ) , i . o p t i o n s . u p l o a d . t o k e n & & k t . s e t R e q u e s t H e a d e r ( " X - U p l o a d - T o k e n " , i . o p t i o n s . u p l o a d . t o k e n ) , i . o p t i o n s . u p l o a d . w i t h C r e d e n t i a l s & & ( k t . w i t h C r e d e n t i a l s = ! 0 ) , $ n ( i , k t ) , k t . s e t R e q u e s t H e a d e r ( " C o n t e n t - T y p e " , " a p p l i c a t i o n / j s o n ; c h a r s e t = u t f - 8 " ) , k t . o n r e a d y s t a t e c h a n g e = f u n c t i o n ( ) { i f ( k t . r e a d y S t a t e = = = X M L H t t p R e q u e s t . D O N E ) { i f ( k t . s t a t u s = = = 2 0 0 ) { v a r d n = k t . r e s p o n s e T e x t ; i . o p t i o n s . u p l o a d . l i n k T o I m g F o r m a t & & ( d n = i . o p t i o n s . u p l o a d . l i n k T o I m g F o r m a t ( k t . r e s p o n s e T e x t ) ) ; v a r W t = J S O N . p a r s e ( d n ) ; i f ( W t . c o d e ! = = 0 ) { i . t i p . s h o w ( W t . m s g ) ; r e t u r n } v a r h n = W t . d a t a . o r i g i n a l U R L ; i f ( i . c u r r e n t M o d e = = = " s v " ) i . s v . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - s v _ _ m a r k e r - - l i n k " ) . f o r E a c h ( f u n c t i o n ( z t ) { z t . t e x t C o n t e n t = = = h n & & ( z t . t e x t C o n t e n t = W t . d a t a . u r l ) } ) ; e l s e { v a r i t = i [ i . c u r r e n t M o d e ] . e l e m e n t . q u e r y S e l e c t o r ( ' i m g [ s r c = " ' . c o n c a t ( h n , ' " ] ' ) ) ; i t . s r c = W t . d a t a . u r l , i . c u r r e n t M o d e = = = " i r " & & ( i t . p r e v i o u s E l e m e n t S i b l i n g . p r e v i o u s E l e m e n t S i b l i n g . i n n e r H T M L = W t . d a t a . u r l ) } l t ( i ) } e l s e i . t i p . s h o w ( k t . r e s p o n s e T e x t ) ; i . o p t i o n s . u p l o a d . l i n k T o I m g C a l l b a c k & & i . o p t i o n s . u p l o a d . l i n k T o I m g C a l l b a c k ( k t . r e s p o n s e T e x t ) } } , k t . s e n d ( J S O N . s t r i n g i f y ( { u r l : g t } ) ) } r e t u r n i . c u r r e n t M o d e = = = " i r " ? [ ' < s p a n c l a s s = " v d i t o r - i r _ _ m a r k e r v d i t o r - i r _ _ m a r k e r - - l i n k " > ' . c o n c a t ( L u t e . E s c a p e H T M L S t r ( g t ) , " < / s p a n > " ) , L u t e . W a l k C o n t i n u e ] : i . c u r r e n t M o d e = = = " w y s i w y g " ? [ " " , L u t e . W a l k C o n t i n u e ] : [ ' < s p a n c l a s s = " v d i t o r - s v _ _ m a r k e r - - l i n k " > ' . c o n c a t ( L u t e . E s c a p e H T M L S t r ( g t ) , " < / s p a n > " ) , L u t e . W a l k C o n t i n u e ] } , ( u . r e p l a c e ( / & a m p ; / g , " & " ) . r e p l a c e ( / < ( | \ / ) ( h t m l | b o d y | m e t a ) [ ^ > ] * ? > / i g , " " ) . t r i m ( ) = = = ' < a h r e f = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( d ,
` ): $ e+=".concat(ue.result.toString(), ` )
` ),document.execCommand("insertHTML",!1, $ e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(de=(0,q.zh)(i),de.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(de.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,q.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Pe(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(we=(0,y.F9)((0,q.zh)(i).startContainer),we&&(de=(0,q.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function( $ e){ $ e.remove()}),de.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?we.outerHTML=i.lute.SpinVditorDOM(we.outerHTML):we.outerHTML=i.lute.SpinVditorIRDOM(we.outerHTML),(0,q.ib)(i[i.currentMode].element,de)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function( $ e){tt( $ e,i)})),i.wysiwyg.triggerRemoveComment(i),lt(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Z(i),[2]}})})},gu=function(i,a,s){return xs(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,K,ke,fe,ve,ue,ke,we,de;return ks(this,function(Ie){switch(Ie.label){case 0:if(!s)return[2];if(u=/{ \\ pict[ \s \S ]+? \\ bliptag-? \d +( \\ blipupi-? \d +)?({ \\ \* \\ blipuid \s ?[ \d a-fA-F]+)?[ \s }]*?/,d=new RegExp("(?:("+u.source+"))([ \\ da-fA-F \\ s]+) \\ }","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes(" \\ pngblip")?B="image/png":_.includes(" \\ jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^ \d a-fA-F]/g,""),type:B});for(K=[],vo(a,function(Te){if(Te.tagName==="V:SHAPE")return vo(Te,function( $ e){ $ e.tagName==="V:IMAGEDATA"&&K.push({shape:Te,img: $ e})}),!1}),ke=0;ke<K.length;ke++)fe=document.createElement("img"),ve="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/ \w {2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=ve,fe.title=K[ke].img.getAttribute("title"),K[ke].shape.parentNode.replaceChild(fe,K[ke].shape);ue=a.querySelectorAll("img"),ke=0,Ie.label=1;case 1:return ke<ue.length?(we=ue[ke].src||"",we?(de=ue[ke],[4,i.options.upload.base64ToLink(we)]):[3,3]):[3,4];case 2:de.src=Ie.sent(),Ie.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},vo=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)vo(i.children[u],a)},qs,js=function(i){var a,s;i.hint.render(i);var u=(0,q.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,q.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,q.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Xn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},fi=function(i,a){var s=(0,q.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!
< / p > ` ; K . i n n e r H T M L . t r i m ( ) = = = " " ? K . o u t e r H T M L = f e : K . i n s e r t A d j a c e n t H T M L ( " a f t e r e n d " , f e ) } } e l s e i f ( f = = = " q u o t e " ) K & & ( d . i n s e r t N o d e ( d o c u m e n t . c r e a t e E l e m e n t ( " w b r " ) ) , K . o u t e r H T M L = ' < b l o c k q u o t e d a t a - b l o c k = " 0 " > ' . c o n c a t ( K . o u t e r H T M L , " < / b l o c k q u o t e > " ) , L = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) ) ; e l s e i f ( f = = = " l i n k " ) { v a r v e = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? v e = " " . c o n c a t ( s , " < w b r > " ) . c o n c a t ( u ) : v e = " " . c o n c a t ( s ) . c o n c a t ( d . t o S t r i n g ( ) ) . c o n c a t ( u . r e p l a c e ( " ) " , " < w b r > ) " ) ) , d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , v e ) , L = ! 1 , a . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) } e l s e i f ( f = = = " i t a l i c " | | f = = = " b o l d " | | f = = = " s t r i k e " | | f = = = " i n l i n e - c o d e " | | f = = = " c o d e " | | f = = = " t a b l e " ) { v a r v e = v o i d 0 ; d . t o S t r i n g ( ) = = = " " ? v e = " " . c o n c a t ( s , " < w b r > " ) . c o n c a t ( u ) : ( f = = = " c o d e " ? v e = " " . c o n c a t ( s , `
` ).concat(d.toString(),"<wbr>").concat(u):f==="table"?ve="".concat(s).concat(d.toString(),"<wbr>").concat(u):ve="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(ve= `
` +ve+ `
` );var ue=document.createElement("span");ue.innerHTML=ve,d.insertNode(ue),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,q.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(Ji(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,q.ib)(i.ir.element,d),Xn(i),L&&qe(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(K){E(K)}}function D(B){try{_(u.throw(B))}catch(K){E(K)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Xn(d),L.parentElement.querySelectorAll("code").forEach(function(K){K.className="language-"+f.trimRight()}),tt(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,q.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,q.oC)(d.lute.SpinVditorDOM(f),d):(0,q.oC)(d.lute.SpinVditorIRDOM(f),d):(0,q.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,q.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,tt(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,tt(B.nextElementSibling,d))}lt(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.
` ).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(ve,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(K){K.addEventListener("click",function(fe){d.fillEmoji(K,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder, ` "
contenteditable = "true" spellcheck = "false" > < / p r e > ` ) , t h i s . e l e m e n t = s . f i r s t E l e m e n t C h i l d , t h i s . b i n d E v e n t ( a ) , A i ( a , t h i s . e l e m e n t ) , h o ( a , t h i s . e l e m e n t ) , M i ( a , t h i s . e l e m e n t ) , x e ( a , t h i s . e l e m e n t ) , H e ( a , t h i s . e l e m e n t ) , C i ( a , t h i s . e l e m e n t ) , U ( a , t h i s . e l e m e n t , t h i s . c o p y ) , Q ( a , t h i s . e l e m e n t , t h i s . c o p y ) } r e t u r n i . p r o t o t y p e . c o p y = f u n c t i o n ( a , s ) { v a r u = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; i f ( u . t o S t r i n g ( ) ! = = " " ) { a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) ; v a r d = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; d . a p p e n d C h i l d ( u . c l o n e C o n t e n t s ( ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , s . l u t e . V d i t o r I R D O M 2 M d ( d . i n n e r H T M L ) . t r i m ( ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) } } , i . p r o t o t y p e . b i n d E v e n t = f u n c t i o n ( a ) { v a r s = t h i s ; t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " p a s t e " , f u n c t i o n ( u ) { t a ( a , u , { p a s t e C o d e : f u n c t i o n ( d ) { d o c u m e n t . e x e c C o m m a n d ( " i n s e r t H T M L " , ! 1 , d ) } } ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " s c r o l l " , f u n c t i o n ( ) { A ( a , [ " h i n t " ] ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c o m p o s i t i o n s t a r t " , f u n c t i o n ( u ) { s . c o m p o s i n g L o c k = ! 0 } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c o m p o s i t i o n e n d " , f u n c t i o n ( u ) { ( 0 , m . v U ) ( ) | | N t ( a , g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e R a n g e ( ) ) , s . c o m p o s i n g L o c k = ! 1 } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " i n p u t " , f u n c t i o n ( u ) { i f ( ! ( u . i n p u t T y p e = = = " d e l e t e B y D r a g " | | u . i n p u t T y p e = = = " i n s e r t F r o m D r o p " ) ) { i f ( s . p r e v e n t I n p u t ) { s . p r e v e n t I n p u t = ! 1 , X n ( a , { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 0 , e n a b l e I n p u t : ! 0 } ) ; r e t u r n } s . c o m p o s i n g L o c k | | u . d a t a = = = " ‘ " | | u . d a t a = = = " “ " | | u . d a t a = = = " 《 " | | N t ( a , g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e R a n g e ( ) , ! 1 , u ) } } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( u ) { i f ( u . t a r g e t . t a g N a m e = = = " I N P U T " ) { u . t a r g e t . c h e c k e d ? u . t a r g e t . s e t A t t r i b u t e ( " c h e c k e d " , " c h e c k e d " ) : u . t a r g e t . r e m o v e A t t r i b u t e ( " c h e c k e d " ) , s . p r e v e n t I n p u t = ! 0 , X n ( a ) ; r e t u r n } v a r d = ( 0 , q . z h ) ( a ) , f = ( 0 , y . f b ) ( u . t a r g e t , " v d i t o r - i r _ _ p r e v i e w " ) ; i f ( f | | ( f = ( 0 , y . f b ) ( d . s t a r t C o n t a i n e r , " v d i t o r - i r _ _ p r e v i e w " ) ) , f & & ( f . p r e v i o u s E l e m e n t S i b l i n g . f i r s t E l e m e n t C h i l d ? d . s e l e c t N o d e C o n t e n t s ( f . p r e v i o u s E l e m e n t S i b l i n g . f i r s t E l e m e n t C h i l d ) : d . s e l e c t N o d e C o n t e n t s ( f . p r e v i o u s E l e m e n t S i b l i n g ) , d . c o l l a p s e ( ! 0 ) , ( 0 , q . H c ) ( d ) , Z ( a ) ) , u . t a r g e t . t a g N a m e = = = " I M G " ) { v a r E = u . t a r g e t . p a r e n t E l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - i r _ _ m a r k e r - - l i n k " ) ; E & & ( d . s e l e c t N o d e ( E ) , ( 0 , q . H c ) ( d ) ) } v a r L = ( 0 , y . a 1 ) ( u . t a r g e t , " d a t a - t y p e " , " a " ) ; i f ( L & & ! L . c l a s s L i s t . c o n t a i n s ( " v d i t o r - i r _ _ n o d e - - e x p a n d " ) ) { a . o p t i o n s . l i n k . c l i c k ? a . o p t i o n s . l i n k . c l i c k ( L . q u e r y S e l e c t o r ( " : s c o p e > . v d i t o r - i r _ _ m a r k e r - - l i n k " ) ) : a . o p t i o n s . l i n k . i s O p e n & & w i n d o w . o p e n ( L . q u e r y S e l e c t o r ( " : s c o p e > . v d i t o r - i r _ _ m a r k e r - - l i n k " ) . t e x t C o n t e n t ) ; r e t u r n } i f ( u . t a r g e t . i s E q u a l N o d e ( s . e l e m e n t ) & & s . e l e m e n t . l a s t E l e m e n t C h i l d & & d . c o l l a p s e d ) { v a r D = s . e l e m e n t . l a s t E l e m e n t C h i l d . g e t B o u n d i n g C l i e n t R e c t ( ) ; u . y > D . t o p + D . h e i g h t & & ( s . e l e m e n t . l a s t E l e m e n t C h i l d . t a g N a m e = = = " P " & & s . e l e m e n t . l a s t E l e m e n t C h i l d . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " ? ( d . s e l e c t N o d e C o n t e n t s ( s . e l e m e n t . l a s t E l e m e n t C h i l d ) , d . c o l l a p s e ( ! 1 ) ) : ( s . e l e m e n t . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , ' < p d a t a - b l o c k = " 0 " > ' . c o n c a t ( c . g . Z W S P , " < w b r > < / p > " ) ) , ( 0 , q . i b ) ( s . e l e m e n t , d ) ) ) } d . t o S t r i n g ( ) = = = " " ? e e ( d , a ) : s e t T i m e o u t ( f u n c t i o n ( ) { e e ( ( 0 , q . z h ) ( a ) , a ) } ) , R t ( u , a ) , q e ( a ) } ) , t h i s . e l e m e n t . a d d E v e n t L i s t e n e r ( " k e y u p " , f u n c t i o n ( u ) { i f ( ! ( u . i s C o m p o s i n g | | ( 0 , m . y l ) ( u ) ) ) { i f ( u . k e y = = = " E n t e r " & & Z ( a ) , q e ( a ) , ( u . k e y = = = " B a c k s p a c e " | | u . k e y = = = " D e l e t e " ) & & a . i r . e l e m e n t . i n n e r H T M L ! = = " " & & a . i r . e l e m e n t . c h i l d N o d e s . l e n g t h = = = 1 & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d . t a g N a m e = = = " P " & & a . i r . e l e m e n t . f i r s t E l e m e n t C h i l d . c h i l d E l e m e n t C o u n t = = = 0 & & ( a . i r . e l e m e n t . t e x t C o n t e n t = = = " " | | a . i r . e l e m e n t . t e x t C o n t e n t = = = `
` )){a.ir.element.innerHTML="";return}var d=(0,q.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent=== `
` &&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&js(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(), $ s=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Us=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a, ` < / d i v >
< div class = "vditor-outline__content" > < / d i v > ` ) } r e t u r n i . p r o t o t y p e . r e n d e r = f u n c t i o n ( a ) { v a r s = " " ; r e t u r n a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = = = " b l o c k " ? s = ( 0 , U s . k ) ( a . p r e v i e w . p r e v i e w E l e m e n t , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d , a ) : s = ( 0 , U s . k ) ( a [ a . c u r r e n t M o d e ] . e l e m e n t , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d , a ) , s } , i . p r o t o t y p e . t o g g l e = f u n c t i o n ( a , s , u ) { v a r d ; s = = = v o i d 0 & & ( s = ! 0 ) , u = = = v o i d 0 & & ( u = ! 0 ) ; v a r f = ( d = a . t o o l b a r . e l e m e n t s . o u t l i n e ) = = = n u l l | | d = = = v o i d 0 ? v o i d 0 : d . f i r s t E l e m e n t C h i l d ; i f ( s & & w i n d o w . i n n e r W i d t h > = c . g . M O B I L E _ W I D T H ? ( t h i s . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , t h i s . r e n d e r ( a ) , f = = n u l l | | f . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) ) : ( t h i s . e l e m e n t . s t y l e . d i s p l a y = " n o n e " , f = = n u l l | | f . c l a s s L i s t . r e m o v e ( " v d i t o r - m e n u - - c u r r e n t " ) ) , u & & g e t S e l e c t i o n ( ) . r a n g e C o u n t > 0 ) { v a r E = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; a [ a . c u r r e n t M o d e ] . e l e m e n t . c o n t a i n s ( E . s t a r t C o n t a i n e r ) & & ( 0 , q . H c ) ( E ) } z e ( a ) } , i } ( ) , E u = o ( 2 8 0 ) , T u = f u n c t i o n ( ) { f u n c t i o n i ( a ) { v a r s = t h i s ; t h i s . e l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - p r e v i e w " , t h i s . p r e v i e w E l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . p r e v i e w E l e m e n t . c l a s s N a m e = " v d i t o r - r e s e t " , a . o p t i o n s . c l a s s e s . p r e v i e w & & t h i s . p r e v i e w E l e m e n t . c l a s s L i s t . a d d ( a . o p t i o n s . c l a s s e s . p r e v i e w ) , t h i s . p r e v i e w E l e m e n t . s t y l e . m a x W i d t h = a . o p t i o n s . p r e v i e w . m a x W i d t h + " p x " , t h i s . p r e v i e w E l e m e n t . a d d E v e n t L i s t e n e r ( " c o p y " , f u n c t i o n ( D ) { i f ( D . t a r g e t . t a g N a m e ! = = " T E X T A R E A " ) { v a r _ = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; _ . c l a s s N a m e = " v d i t o r - r e s e t " , _ . a p p e n d C h i l d ( g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) . c l o n e C o n t e n t s ( ) ) , s . c o p y T o X ( a , _ , " d e f a u l t " ) , D . p r e v e n t D e f a u l t ( ) } } ) , t h i s . p r e v i e w E l e m e n t . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( D ) { v a r _ = ( 0 , y . l G ) ( D . t a r g e t , " S P A N " ) ; i f ( _ & & ( 0 , y . f b ) ( _ , " v d i t o r - t o c " ) ) { v a r B = s . p r e v i e w E l e m e n t . q u e r y S e l e c t o r ( " # " + _ . g e t A t t r i b u t e ( " d a t a - t a r g e t - i d " ) ) ; B & & ( s . e l e m e n t . s c r o l l T o p = B . o f f s e t T o p ) ; r e t u r n } i f ( D . t a r g e t . t a g N a m e = = = " A " ) { a . o p t i o n s . l i n k . c l i c k ? a . o p t i o n s . l i n k . c l i c k ( D . t a r g e t ) : a . o p t i o n s . l i n k . i s O p e n & & w i n d o w . o p e n ( D . t a r g e t . g e t A t t r i b u t e ( " h r e f " ) ) , D . p r e v e n t D e f a u l t ( ) ; r e t u r n } D . t a r g e t . t a g N a m e = = = " I M G " & & ( a . o p t i o n s . i m a g e . p r e v i e w ? a . o p t i o n s . i m a g e . p r e v i e w ( D . t a r g e t ) : a . o p t i o n s . i m a g e . i s P r e v i e w & & ( 0 , s e . E ) ( D . t a r g e t , a . o p t i o n s . l a n g , a . o p t i o n s . t h e m e ) ) } ) , t h i s . e l e m e n t . a p p e n d C h i l d ( t h i s . p r e v i e w E l e m e n t ) ; v a r u = a . o p t i o n s . p r e v i e w . a c t i o n s ; i f ( u . l e n g t h ! = = 0 ) { v a r d = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; d . c l a s s N a m e = " v d i t o r - p r e v i e w _ _ a c t i o n " ; f o r ( v a r f = [ ] , E = 0 ; E < u . l e n g t h ; E + + ) { v a r L = u [ E ] ; i f ( t y p e o f L = = " o b j e c t " ) { f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " ' . c o n c a t ( L . k e y , ' " c l a s s = " ' ) . c o n c a t ( L . c l a s s N a m e , ' " ' ) . c o n c a t ( L . t o o l t i p ? ' a r i a - l a b e l = " ' . c o n c a t ( L . t o o l t i p , ' " ' ) : " " , ' " > ' ) . c o n c a t ( L . t e x t , " < / b u t t o n > " ) ) ; c o n t i n u e } s w i t c h ( L ) { c a s e " d e s k t o p " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " c l a s s = " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " d a t a - t y p e = " d e s k t o p " > D e s k t o p < / b u t t o n > ' ) ; b r e a k ; c a s e " t a b l e t " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " t a b l e t " > T a b l e t < / b u t t o n > ' ) ; b r e a k ; c a s e " m o b i l e " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " m o b i l e " > M o b i l e / W e c h a t < / b u t t o n > ' ) ; b r e a k ; c a s e " m p - w e c h a t " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " m p - w e c h a t " c l a s s = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ w " a r i a - l a b e l = " 复 制 到 公 众 号 " > < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - m p - w e c h a t " > < / u s e > < / s v g > < / b u t t o n > ' ) ; b r e a k ; c a s e " z h i h u " : f . p u s h ( ' < b u t t o n t y p e = " b u t t o n " d a t a - t y p e = " z h i h u " c l a s s = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ w " a r i a - l a b e l = " 复 制 到 知 乎 " > < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - z h i h u " > < / u s e > < / s v g > < / b u t t o n > ' ) ; b r e a k } } d . i n n e r H T M L = f . j o i n ( " " ) , d . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( D ) { v a r _ = ( 0 , N . S ) ( D . t a r g e t , " B U T T O N " ) ; i f ( _ ) { v a r B = _ . g e t A t t r i b u t e ( " d a t a - t y p e " ) , K = u . f i n d ( f u n c t i o n ( f e ) { r e t u r n ( f e = = n u l l ? v o i d 0 : f e . k e y ) = = = B } ) ; i f ( K ) { K . c l i c k ( B ) ; r e t u r n } i f ( B = = = " m p - w e c h a t " | | B = = = " z h i h u " ) { s . c o p y T o X ( a , s . p r e v i e w E l e m e n t . c l o n e N o d e ( ! 0 ) , B ) ; r e t u r n } B = = = " d e s k t o p " ? s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " a u t o " : B = = = " t a b l e t " ? s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " 7 8 0 p x " : s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " 3 6 0 p x " , s . p r e v i e w E l e m e n t . s c r o l l W i d t h > s . p r e v i e w E l e m e n t . p a r e n t E l e m e n t . c l i e n t W i d t h & & ( s . p r e v i e w E l e m e n t . s t y l e . w i d t h = " a u t o " ) , s . r e n d e r ( a ) , d . q u e r y S e l e c t o r A l l ( " b u t t o n " ) . f o r E a c h ( f u n c t i o n ( f e ) { f e . c l a s s L i s t . r e m o v e ( " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " ) } ) , _ . c l a s s L i s t . a d d ( " v d i t o r - p r e v i e w _ _ a c t i o n - - c u r r e n t " ) } } ) , t h i s . e l e m e n t . i n s e r t B e f o r e ( d , t h i s . p r e v i e w E l e m e n t ) } } r e t u r n i . p r o t o t y p e . r e n d e r = f u n c t i o n ( a , s ) { v a r u = t h i s ; i f ( c l e a r T i m e o u t ( t h i s . m d T i m e o u t I d ) , t h i s . e l e m e n t . s t
` )){a.sv.element.innerHTML="";return}u.key==="Enter"&&Z(a)}})},i}(),Vs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a, `
< div class = "vditor-tip__close" > X < / d i v > < / d i v > ` ) , t h i s . e l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - t i p _ _ c l o s e " ) . a d d E v e n t L i s t e n e r ( " c l i c k " , f u n c t i o n ( ) { u . h i d e ( ) } ) ) : ( t h i s . e l e m e n t . i n n e r H T M L = ' < d i v c l a s s = " v d i t o r - t i p _ _ c o n t e n t " > ' . c o n c a t ( a , " < / d i v > " ) , s e t T i m e o u t ( f u n c t i o n ( ) { u . h i d e ( ) } , s ) ) , t h i s . e l e m e n t . r e m o v e A t t r i b u t e ( " s t y l e " ) , s e t T i m e o u t ( f u n c t i o n ( ) { v a r d = u . e l e m e n t . g e t B o u n d i n g C l i e n t R e c t ( ) ; d . t o p < 4 6 & & ( u . e l e m e n t . s t y l e . p o s i t i o n = " f i x e d " , u . e l e m e n t . s t y l e . t o p = " 4 6 p x " ) } , 1 5 0 ) } , i . p r o t o t y p e . h i d e = f u n c t i o n ( ) { t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - m e s s a g e E l e m e n t t i p " , t h i s . e l e m e n t . i n n e r H T M L = " " } , i } ( ) , b o = f u n c t i o n ( i , a ) { i f ( a . o p t i o n s . p r e v i e w . m o d e ! = = i ) { s w i t c h ( a . o p t i o n s . p r e v i e w . m o d e = i , i ) { c a s e " b o t h " : a . s v . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . r e n d e r ( a ) , w ( a . t o o l b a r . e l e m e n t s , [ " b o t h " ] ) ; b r e a k ; c a s e " e d i t o r " : a . s v . e l e m e n t . s t y l e . d i s p l a y = " b l o c k " , a . p r e v i e w . e l e m e n t . s t y l e . d i s p l a y = " n o n e " , x ( a . t o o l b a r . e l e m e n t s , [ " b o t h " ] ) ; b r e a k } a . d e v t o o l s & & a . d e v t o o l s . r e n d e r E c h a r t ( a ) } } , C u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , L u = f u n c t i o n ( i ) { C u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n s . o p t i o n s . p r e v i e w . m o d e = = = " b o t h " & & d . e l e m e n t . c h i l d r e n [ 0 ] . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) , d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { v a r E = d . e l e m e n t . f i r s t E l e m e n t C h i l d ; E . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | ( f . p r e v e n t D e f a u l t ( ) , s . c u r r e n t M o d e = = = " s v " & & ( s . o p t i o n s . p r e v i e w . m o d e = = = " b o t h " ? b o ( " e d i t o r " , s ) : b o ( " b o t h " , s ) ) ) } ) , d } r e t u r n a } ( M t ) , _ u = f u n c t i o n ( ) { f u n c t i o n i ( ) { t h i s . e l e m e n t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) , t h i s . e l e m e n t . c l a s s N a m e = " v d i t o r - t o o l b a r _ _ b r " } r e t u r n i } ( ) , W s = o ( 5 8 0 ) , N u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , D u = f u n c t i o n ( i ) { N u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) ; v a r L = " " ; r e t u r n c . g . C O D E _ T H E M E . f o r E a c h ( f u n c t i o n ( D ) { L + = " < b u t t o n > " . c o n c a t ( D , " < / b u t t o n > " ) } ) , E . i n n e r H T M L = ' < d i v s t y l e = " o v e r f l o w : a u t o ; m a x - h e i g h t : ' . c o n c a t ( w i n d o w . i n n e r H e i g h t / 2 , ' p x " > ' ) . c o n c a t ( L , " < / d i v > " ) , E . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( D ) { D . t a r g e t . t a g N a m e = = = " B U T T O N " & & ( A ( s , [ " s u b T o o l b a r " ] ) , s . o p t i o n s . p r e v i e w . h l j s . s t y l e = D . t a r g e t . t e x t C o n t e n t , ( 0 , W s . Y ) ( D . t a r g e t . t e x t C o n t e n t , s . o p t i o n s . c d n ) , D . p r e v e n t D e f a u l t ( ) , D . s t o p P r o p a g a t i o n ( ) ) } ) , d . e l e m e n t . a p p e n d C h i l d ( E ) , M ( s , E , f , u . l e v e l ) , d } r e t u r n a } ( M t ) , R u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , I u = f u n c t i o n ( i ) { R u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) ; v a r L = " " ; r e t u r n O b j e c t . k e y s ( s . o p t i o n s . p r e v i e w . t h e m e . l i s t ) . f o r E a c h ( f u n c t i o n ( D ) { L + = ' < b u t t o n d a t a - t y p e = " ' . c o n c a t ( D , ' " > ' ) . c o n c a t ( s . o p t i o n s . p r e v i e w . t h e m e . l i s t [ D ] , " < / b u t t o n > " ) } ) , E . i n n e r H T M L = ' < d i v s t y l e = " o v e r f l o w : a u t o ; m a x - h e i g h t : ' . c o n c a t ( w i n d o w . i n n e r H e i g h t / 2 , ' p x " > ' ) . c o n c a t ( L , " < / d i v > " ) , E . a d d
` )?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L, ` : " > < img
data - value = ":`).concat(L,': " data - key = ":').concat(L,':" class = "vditor-emojis__icon" src = "').concat(D,'" / > < / b u t t o n > ' ) : E + = ' < b u t t o n d a t a - v a l u e = " ' . c o n c a t ( D , ` "
data - key = "`).concat(L,'" > < span class = "vditor-emojis__icon" > ').concat(D,"</span></button>")}),f.innerHTML=' < div class = "vditor-emojis" style = "max-height: '.concat(s.options.height===" auto "?" auto ":s.options.height-80,'px" > ' ) . concat ( E , ` </div><div class="vditor-emojis__tail">
< span class = "vditor-emojis__tip" > < / s p a n > < s p a n > ` ) . c o n c a t ( s . o p t i o n s . h i n t . e m o j i T a i l | | " " , ` < / s p a n >
< / d i v > ` ) , d . e l e m e n t . a p p e n d C h i l d ( f ) , M ( s , f , d . e l e m e n t . f i r s t E l e m e n t C h i l d , u . l e v e l ) , d . b i n d E v e n t ( s ) , d } r e t u r n a . p r o t o t y p e . b i n d E v e n t = f u n c t i o n ( s ) { v a r u = t h i s ; t h i s . e l e m e n t . l a s t E l e m e n t C h i l d . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { v a r f = ( 0 , N . S ) ( d . t a r g e t , " B U T T O N " ) ; i f ( f ) { d . p r e v e n t D e f a u l t ( ) ; v a r E = f . g e t A t t r i b u t e ( " d a t a - v a l u e " ) , L = ( 0 , q . z h ) ( s ) , D = E ; i f ( s . c u r r e n t M o d e = = = " w y s i w y g " ? D = s . l u t e . S p i n V d i t o r D O M ( E ) : s . c u r r e n t M o d e = = = " i r " & & ( D = s . l u t e . S p i n V d i t o r I R D O M ( E ) ) , E . i n d e x O f ( " : " ) > - 1 & & s . c u r r e n t M o d e ! = = " s v " ) { v a r _ = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; _ . i n n e r H T M L = D , D = _ . f i r s t E l e m e n t C h i l d . f i r s t E l e m e n t C h i l d . o u t e r H T M L + " " , ( 0 , q . o C ) ( D , s ) } e l s e L . e x t r a c t C o n t e n t s ( ) , L . i n s e r t N o d e ( d o c u m e n t . c r e a t e T e x t N o d e ( E ) ) , ( 0 , y . F 9 ) ( L . s t a r t C o n t a i n e r ) | | P n ( s , L ) ; L . c o l l a p s e ( ! 1 ) , ( 0 , q . H c ) ( L ) , u . e l e m e n t . l a s t E l e m e n t C h i l d . s t y l e . d i s p l a y = " n o n e " , l t ( s ) } } ) , t h i s . e l e m e n t . l a s t E l e m e n t C h i l d . a d d E v e n t L i s t e n e r ( " m o u s e o v e r " , f u n c t i o n ( d ) { v a r f = ( 0 , N . S ) ( d . t a r g e t , " B U T T O N " ) ; f & & ( u . e l e m e n t . q u e r y S e l e c t o r ( " . v d i t o r - e m o j i s _ _ t i p " ) . i n n e r H T M L = f . g e t A t t r i b u t e ( " d a t a - k e y " ) ) } ) } , a } ( M t ) , G s = f u n c t i o n ( i , a , s ) { v a r u = d o c u m e n t . c r e a t e E l e m e n t ( " a " ) ; " d o w n l o a d " i n u ? ( u . d o w n l o a d = s , u . s t y l e . d i s p l a y = " n o n e " , u . h r e f = U R L . c r e a t e O b j e c t U R L ( n e w B l o b ( [ a ] ) ) , d o c u m e n t . b o d y . a p p e n d C h i l d ( u ) , u . c l i c k ( ) , u . r e m o v e ( ) ) : i . t i p . s h o w ( w i n d o w . V d i t o r I 1 8 n . d o w n l o a d T i p , 0 ) } , $ u = f u n c t i o n ( i ) { v a r a = v ( i ) ; G s ( i , a , a . s u b s t r ( 0 , 1 0 ) + " . m d " ) } , U u = f u n c t i o n ( i ) { i . t i p . s h o w ( w i n d o w . V d i t o r I 1 8 n . g e n e r a t e , 3 8 0 0 ) ; v a r a = d o c u m e n t . q u e r y S e l e c t o r ( " # v d i t o r E x p o r t I f r a m e " ) ; a . c o n t e n t D o c u m e n t . o p e n ( ) , a . c o n t e n t D o c u m e n t . w r i t e ( ' < l i n k r e l = " s t y l e s h e e t " h r e f = " ' . c o n c a t ( i . o p t i o n s . c d n , ` / d i s t / i n d e x . c s s " / >
< script src = "`).concat(i.options.cdn,`/dist/method.min.js" > < \ / script >
< div id = "preview" style = "width: 800px" > < / d i v >
< script >
window . addEventListener ( "message" , ( e ) => {
if ( ! e . data ) {
return ;
}
Vditor . preview ( document . getElementById ( 'preview' ) , e . data , {
cdn : "`).concat(i.options.cdn,`" ,
markdown : {
theme : ` ).concat(JSON.stringify(i.options.preview.theme), `
} ,
hljs : {
style : "`).concat(i.options.preview.hljs.style,`"
}
} ) ;
setTimeout ( ( ) => {
window . print ( ) ;
} , 3600 ) ;
} , false ) ;
< \ / script > ` )),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a= $ s(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn, ` / dist / index . css " / >
< script src = "`).concat(i.options.cdn," / dist / js / i18n / ").concat(i.options.lang,`.js" > < \ / script >
< script src = "`).concat(i.options.cdn,`/dist/method.min.js" > < \ / script > < / h e a d >
< body > < div class = "vditor-reset" id = "preview" > ` ).concat(a, ` < / d i v >
< script >
const previewElement = document . getElementById ( 'preview' )
Vditor . setContentTheme ( '`).concat(i.options.preview.theme.current,"' , '").concat(i.options.preview.theme.path,`' ) ;
Vditor . codeRender ( previewElement ) ;
Vditor . highlightRender ( ` ).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn, ` ' ) ;
Vditor . mathRender ( previewElement , {
cdn : '`).concat(i.options.cdn,`' ,
math : ` ).concat(JSON.stringify(i.options.preview.math), ` ,
} ) ;
Vditor . mermaidRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . SMILESRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . markmapRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . flowchartRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . graphvizRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
Vditor . chartRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . mindmapRender ( previewElement , '`).concat(i.options.cdn,"' , '").concat(i.options.theme,`' ) ;
Vditor . abcRender ( previewElement , '`).concat(i.options.cdn,`' ) ;
` ).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"", `
Vditor . speechRender ( previewElement ) ;
< \ / script >
< script src = "`).concat(i.options.cdn," / dist / js / icons / ").concat(i.options.icon,'.js" > < \ / script > < / b o d y > < / h t m l > ' ) ; G s ( i , s , a . s u b s t r ( 0 , 1 0 ) + " . h t m l " ) } , W u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , G u = f u n c t i o n ( i ) { W u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d . e l e m e n t . c h i l d r e n [ 0 ] , E = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n E . c l a s s N a m e = " v d i t o r - h i n t " . c o n c a t ( u . l e v e l = = = 2 ? " " : " v d i t o r - p a n e l - - a r r o w " ) , E . i n n e r H T M L = ` < b u t t o n d a t a - t y p e = " m a r k d o w n " > M a r k d o w n < / b u t t o n >
< button data - type = "pdf" > PDF < / b u t t o n >
< button data - type = "html" > HTML < / b u t t o n > ` , E . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( L ) { v a r D = L . t a r g e t ; i f ( D . t a g N a m e = = = " B U T T O N " ) { s w i t c h ( D . g e t A t t r i b u t e ( " d a t a - t y p e " ) ) { c a s e " m a r k d o w n " : $ u ( s ) ; b r e a k ; c a s e " p d f " : U u ( s ) ; b r e a k ; c a s e " h t m l " : V u ( s ) ; b r e a k } A ( s , [ " s u b T o o l b a r " ] ) , L . p r e v e n t D e f a u l t ( ) , L . s t o p P r o p a g a t i o n ( ) } } ) , d . e l e m e n t . a p p e n d C h i l d ( E ) , M ( s , E , f , u . l e v e l ) , d } r e t u r n a } ( M t ) , K u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , X u = f u n c t i o n ( i ) { K u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . _ b i n d E v e n t ( s , u ) , d } r e t u r n a . p r o t o t y p e . _ b i n d E v e n t = f u n c t i o n ( s , u ) { t h i s . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { d . p r e v e n t D e f a u l t ( ) , s . e l e m e n t . c l a s s N a m e . i n c l u d e s ( " v d i t o r - - f u l l s c r e e n " ) ? ( u . l e v e l | | ( t h i s . i n n e r H T M L = u . i c o n ) , s . e l e m e n t . s t y l e . z I n d e x = " " , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " " , s . e l e m e n t . c l a s s L i s t . r e m o v e ( " v d i t o r - - f u l l s c r e e n " ) , O b j e c t . k e y s ( s . t o o l b a r . e l e m e n t s ) . f o r E a c h ( f u n c t i o n ( f ) { v a r E = s . t o o l b a r . e l e m e n t s [ f ] . f i r s t C h i l d ; E & & ( E . c l a s s N a m e = E . c l a s s N a m e . r e p l a c e ( " _ _ s " , " _ _ n " ) , s . o p t i o n s . t o o l b a r . f o r E a c h ( f u n c t i o n ( L ) { t y p e o f L ! = " s t r i n g " & & L . t i p P o s i t i o n & & L . n a m e = = = E . d a t a s e t . t y p e & & ( E . c l a s s N a m e = " v d i t o r - t o o l t i p p e d v d i t o r - t o o l t i p p e d _ _ " . c o n c a t ( L . t i p P o s i t i o n ) ) } ) ) } ) , s . c o u n t e r & & ( s . c o u n t e r . e l e m e n t . c l a s s N a m e = s . c o u n t e r . e l e m e n t . c l a s s N a m e . r e p l a c e ( " _ _ s " , " _ _ n " ) ) ) : ( u . l e v e l | | ( t h i s . i n n e r H T M L = ' < s v g > < u s e x l i n k : h r e f = " # v d i t o r - i c o n - c o n t r a c t " > < / u s e > < / s v g > ' ) , s . e l e m e n t . s t y l e . z I n d e x = s . o p t i o n s . f u l l s c r e e n . i n d e x . t o S t r i n g ( ) , d o c u m e n t . b o d y . s t y l e . o v e r f l o w = " h i d d e n " , s . e l e m e n t . c l a s s L i s t . a d d ( " v d i t o r - - f u l l s c r e e n " ) , O b j e c t . k e y s ( s . t o o l b a r . e l e m e n t s ) . f o r E a c h ( f u n c t i o n ( f ) { v a r E = s . t o o l b a r . e l e m e n t s [ f ] . f i r s t C h i l d ; E & & ( E . c l a s s N a m e = E . c l a s s N a m e . r e p l a c e ( " _ _ n " , " _ _ s " ) ) } ) , s . c o u n t e r & & ( s . c o u n t e r . e l e m e n t . c l a s s N a m e = s . c o u n t e r . e l e m e n t . c l a s s N a m e . r e p l a c e ( " _ _ n " , " _ _ s " ) ) ) , s . d e v t o o l s & & s . d e v t o o l s . r e n d e r E c h a r t ( s ) , u . c l i c k & & u . c l i c k ( d , s ) , z e ( s ) , X e ( s ) } ) } , a } ( M t ) , Z u = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , Y u = f u n c t i o n ( i ) { Z u ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s , f = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; r e t u r n f . c l a s s N a m e = " v d i t o r - h i n t v d i t o r - p a n e l - - a r r o w " , f . i n n e r H T M L = ' < b u t t o n d a t a - t a g = " h 1 " d a t a - v a l u e = " # " > ' . c o n c a t ( w i n d o w . V d i t o r I 1 8 n . h e a d i n g 1 , " " ) . c o n c a t ( ( 0 , m . n s ) ( " & l t ; ⌥ ⌘ 1 > " ) , ` < / b u t t o n >
< button data - tag = "h2" data - value = "## " > ` ).concat(window.VditorI18n.heading2," <").concat((0,m.ns)("⌥⌘2"), ` > < / b u t t o n >
< button data - tag = "h3" data - value = "### " > ` ).concat(window.VditorI18n.heading3," <").concat((0,m.ns)("⌥⌘3"), ` > < / b u t t o n >
< button data - tag = "h4" data - value = "#### " > ` ).concat(window.VditorI18n.heading4," <").concat((0,m.ns)("⌥⌘4"), ` > < / b u t t o n >
< button data - tag = "h5" data - value = "##### " > ` ).concat(window.VditorI18n.heading5," <").concat((0,m.ns)("⌥⌘5"), ` > < / b u t t o n >
< button data - tag = "h6" data - value = "###### " > ` ).concat(window.VditorI18n.heading6," <").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(lr(s),Re(s)):s.currentMode==="ir"&&fi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Re(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(fi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Ct(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show( ` < div style = "margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;" >
< div style = "margin-top: 14px;flex: 1" >
< div > Markdown 使用指南 < / d i v >
< ul style = "list-style: none" >
< li > < a href = "https://ld246.com/article/1583308420519" target = "_blank" > 语法速查手册 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1583129520165" target = "_blank" > 基础语法 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1583305480675" target = "_blank" > 扩展语法 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1582778815353" target = "_blank" > 键盘快捷键 < / a > < / l i >
< / u l >
< / d i v >
< div style = "margin-top: 14px;flex: 1" >
< div > Vditor 支持 < / d i v >
< ul style = "list-style: none" >
< li > < a href = "https://github.com/Vanessa219/vditor/issues" target = "_blank" > Issues < / a > < / l i >
< li > < a href = "https://ld246.com/tag/vditor" target = "_blank" > 官方讨论区 < / a > < / l i >
< li > < a href = "https://ld246.com/article/1549638745630" target = "_blank" > 开发手册 < / a > < / l i >
< li > < a href = "https://ld246.com/guide/markdown" target = "_blank" > 演示地址 < / a > < / l i >
< / u l >
< / d i v > < / d i v > ` , 0 ) } ) , d } r e t u r n a } ( M t ) , e d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , t d = f u n c t i o n ( i ) { e d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { i f ( f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) ) { v a r E = ( 0 , q . z h ) ( s ) , L = ( 0 , y . l G ) ( E . s t a r t C o n t a i n e r , " L I " ) ; L & & M s ( s , L , E ) } } ) , d } r e t u r n a } ( M t ) , n d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , r d = f u n c t i o n ( i ) { n d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , s . t i p . s h o w ( ` < d i v s t y l e = " m a x - w i d t h : 5 2 0 p x ; f o n t - s i z e : 1 4 p x ; l i n e - h e i g h t : 2 2 p x ; m a r g i n - b o t t o m : 1 4 p x ; " >
< p style = "text-align: center;margin: 14px 0" >
< em > 下一代的 Markdown 编辑器 , 为未来而构建 < / e m >
< / p >
< div style = "display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center" >
< img src = "https://unpkg.com/vditor/dist/images/logo.png" style = "margin: 0 auto;height: 68px" / >
< div > & nbsp ; & nbsp ; < / d i v >
< div style = "flex: 1;min-width: 250px" >
Vditor 是一款浏览器端的 Markdown 编辑器 , 支持所见即所得 、 即时渲染 ( 类似 Typora ) 和分屏预览模式 。
它使用 TypeScript 实现 , 支持原生 JavaScript 以及 Vue 、 React 、 Angular 和 Svelte 等框架 。
< / d i v >
< / d i v >
< div style = "display: flex;flex-wrap: wrap;" >
< ul style = "list-style: none;flex: 1;min-width:148px" >
< li >
项目地址 : < a href = "https://b3log.org/vditor" target = "_blank" > b3log . org / vditor < / a >
< / l i >
< li >
开源协议 : MIT
< / l i >
< / u l >
< ul style = "list-style: none;margin-right: 18px" >
< li >
组件版本 : Vditor v ` .concat(c.H," / Lute v").concat(Lute.Version, `
< / l i >
< li >
赞助捐赠 : < a href = "https://ld246.com/sponsor" target = "_blank" > https : //ld246.com/sponsor</a>
< / l i >
< / u l >
< / d i v >
< / d i v > ` ) , 0 ) } ) , d } r e t u r n a } ( M t ) , i d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , a d = f u n c t i o n ( i ) { i d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) & & h i ( s , " a f t e r e n d " ) } ) , d } r e t u r n a } ( M t ) , o d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , s d = f u n c t i o n ( i ) { o d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) & & h i ( s , " b e f o r e b e g i n " ) } ) , d } r e t u r n a } ( M t ) , l d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , c d = f u n c t i o n ( i ) { l d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { i f ( f . p r e v e n t D e f a u l t ( ) , ! ( d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | s . c u r r e n t M o d e = = = " s v " ) ) { v a r E = ( 0 , q . z h ) ( s ) , L = ( 0 , y . l G ) ( E . s t a r t C o n t a i n e r , " L I " ) ; L & & p o ( s , L , E , L . p a r e n t E l e m e n t ) } } ) , d } r e t u r n a } ( M t ) , u d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , d d = f u n c t i o n ( i ) { u d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n s . o p t i o n s . o u t l i n e & & d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . a d d ( " v d i t o r - m e n u - - c u r r e n t " ) , d . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( f ) { f . p r e v e n t D e f a u l t ( ) ; v a r E = s . t o o l b a r . e l e m e n t s . o u t l i n e . f i r s t E l e m e n t C h i l d ; E . c l a s s L i s t . c o n t a i n s ( c . g . C L A S S _ M E N U _ D I S A B L E D ) | | ( s . o p t i o n s . o u t l i n e . e n a b l e = ! d . e l e m e n t . f i r s t E l e m e n t C h i l d . c l a s s L i s t . c o n t a i n s ( " v d i t o r - m e n u - - c u r r e n t " ) , s . o u t l i n e . t o g g l e ( s , s . o p t i o n s . o u t l i n e . e n a b l e ) ) } ) , d } r e t u r n a } ( M t ) , h d = f u n c t i o n ( ) { v a r i = f u n c t i o n ( a , s ) { r e t u r n i = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( u , d ) { u . _ _ p r o t o _ _ = d } | | f u n c t i o n ( u , d ) { f o r ( v a r f i n d ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( d , f ) & & ( u [ f ] = d [ f ] ) } , i ( a , s ) } ; r e t u r n f u n c t i o n ( a , s ) { i f ( t y p e o f s ! = " f u n c t i o n " & & s ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( s ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; i ( a , s ) ; f u n c t i o n u ( ) { t h i s . c o n s t r u c t o r = a } a . p r o t o t y p e = s = = = n u l l ? O b j e c t . c r e a t e ( s ) : ( u . p r o t o t y p e = s . p r o t o t y p e , n e w u ) } } ( ) , p d = f u n c t i o n ( i ) { h d ( a , i ) ; f u n c t i o n a ( s , u ) { v a r d = i . c a l l ( t h i s , s , u ) | | t h i s ; r e t u r n d . _ b i n d E v e n t ( s ) , d } r e t u r n a . p r o t o t y p e . _ b i n d E v e n t = f u n c t i o n ( s ) { v a r u = t h i s ; t h i s . e l e m e n t . c h i l d r e n [ 0 ] . a d d E v e n t L i s t e n e r ( ( 0 , m . L e ) ( ) , f u n c t i o n ( d ) { d . p r e v e n t D e f a u l t ( ) ; v a r f = u . e l e m e n t . f i r s t
| -- - | -- - | -- - |
| | | |
| | | | ` ,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder, ` "
contenteditable = "true" spellcheck = "false" > < / p r e >
< div class = "vditor-panel vditor-panel--none" > < / d i v >
< div class = "vditor-panel vditor-panel--none" >
< button type = "button" aria - label = "`).concat(window.VditorI18n.comment,`" class = "vditor-icon vditor-tooltipped vditor-tooltipped__n" >
< svg > < use xlink : href = "#vditor-icon-comment" > < / u s e > < / s v g >
< / b u t t o n >
< / d i v > ` ) , t h i s . e l e m e n t = u . f i r s t E l e m e n t C h i l d , t h i s . p o p o v e r = u . f i r s t E l e m e n t C h i l d . n e x t E l e m e n t S i b l i n g , t h i s . s e l e c t P o p o v e r = u . l a s t E l e m e n t C h i l d , t h i s . b i n d E v e n t ( a ) , A i ( a , t h i s . e l e m e n t ) , h o ( a , t h i s . e l e m e n t ) , M i ( a , t h i s . e l e m e n t ) , x e ( a , t h i s . e l e m e n t ) , H e ( a , t h i s . e l e m e n t ) , C i ( a , t h i s . e l e m e n t ) , U ( a , t h i s . e l e m e n t , t h i s . c o p y ) , Q ( a , t h i s . e l e m e n t , t h i s . c o p y ) , a . o p t i o n s . c o m m e n t . e n a b l e & & ( t h i s . s e l e c t P o p o v e r . q u e r y S e l e c t o r ( " b u t t o n " ) . o n c l i c k = f u n c t i o n ( ) { v a r d = L u t e . N e w N o d e I D ( ) , f = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) , E = f . c l o n e R a n g e ( ) , L = f . e x t r a c t C o n t e n t s ( ) , D , _ , B = ! 1 , K = ! 1 ; L . c h i l d N o d e s . f o r E a c h ( f u n c t i o n ( u e , k e ) { v a r w e = ! 1 ; i f ( u e . n o d e T y p e = = = 3 ? w e = ! 0 : u e . c l a s s L i s t . c o n t a i n s ( " v d i t o r - c o m m e n t " ) ? u e . c l a s s L i s t . c o n t a i n s ( " v d i t o r - c o m m e n t " ) & & u e . s e t A t t r i b u t e ( " d a t a - c m t i d s " , u e . g e t A t t r i b u t e ( " d a t a - c m t i d s " ) + " " + d ) : w e = ! 0 , w e ) i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " & & k e = = = 0 & & E . s t a r t O f f s e t > 0 ) u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) , D = u e ; e l s e i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " & & k e = = = L . c h i l d N o d e s . l e n g t h - 1 & & E . e n d O f f s e t < E . e n d C o n t a i n e r . t e x t C o n t e n t . l e n g t h ) u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) , _ = u e ; e l s e i f ( u e . n o d e T y p e ! = = 3 & & u e . g e t A t t r i b u t e ( " d a t a - b l o c k " ) = = = " 0 " ) k e = = = 0 ? B = ! 0 : k e = = = L . c h i l d N o d e s . l e n g t h - 1 & & ( K = ! 0 ) , u e . i n n e r H T M L = ' < s p a n c l a s s = " v d i t o r - c o m m e n t " d a t a - c m t i d s = " ' . c o n c a t ( d , ' " > ' ) . c o n c a t ( u e . i n n e r H T M L , " < / s p a n > " ) ; e l s e { v a r d e = d o c u m e n t . c r e a t e E l e m e n t ( " s p a n " ) ; d e . c l a s s L i s t . a d d ( " v d i t o r - c o m m e n t " ) , d e . s e t A t t r i b u t e ( " d a t a - c m t i d s " , d ) , u e . p a r e n t N o d e . i n s e r t B e f o r e ( d e , u e ) , d e . a p p e n d C h i l d ( u e ) } } ) ; v a r f e = ( 0 , y . F 9 ) ( E . s t a r t C o n t a i n e r ) ; f e & & ( D ? ( f e . i n s e r t A d j a c e n t H T M L ( " b e f o r e e n d " , D . i n n e r H T M L ) , D . r e m o v e ( ) ) : f e . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " & & B & & f e . r e m o v e ( ) ) ; v a r v e = ( 0 , y . F 9 ) ( E . e n d C o n t a i n e r ) ; v e & & ( _ ? ( v e . i n s e r t A d j a c e n t H T M L ( " a f t e r b e g i n " , _ . i n n e r H T M L ) , _ . r e m o v e ( ) ) : v e . t e x t C o n t e n t . t r i m ( ) . r e p l a c e ( c . g . Z W S P , " " ) = = = " " & & K & & v e . r e m o v e ( ) ) , f . i n s e r t N o d e ( L ) , a . o p t i o n s . c o m m e n t . a d d ( d , f . t o S t r i n g ( ) , s . g e t C o m m e n t s ( a , ! 0 ) ) , R e ( a , { e n a b l e A d d U n d o S t a c k : ! 0 , e n a b l e H i n t : ! 1 , e n a b l e I n p u t : ! 1 } ) , s . h i d e C o m m e n t ( ) } ) } r e t u r n i . p r o t o t y p e . g e t C o m m e n t s = f u n c t i o n ( a , s ) { v a r u = t h i s ; i f ( s = = = v o i d 0 & & ( s = ! 1 ) , a . c u r r e n t M o d e = = = " w y s i w y g " & & a . o p t i o n s . c o m m e n t . e n a b l e ) { t h i s . c o m m e n t I d s = [ ] , t h i s . e l e m e n t . q u e r y S e l e c t o r A l l ( " . v d i t o r - c o m m e n t " ) . f o r E a c h ( f u n c t i o n ( f ) { u . c o m m e n t I d s = u . c o m m e n t I d s . c o n c a t ( f . g e t A t t r i b u t e ( " d a t a - c m t i d s " ) . s p l i t ( " " ) ) } ) , t h i s . c o m m e n t I d s = A r r a y . f r o m ( n e w S e t ( t h i s . c o m m e n t I d s ) ) ; v a r d = [ ] ; i f ( s ) r e t u r n t h i s . c o m m e n t I d s . f o r E a c h ( f u n c t i o n ( f ) { d . p u s h ( { i d : f , t o p : u . e l e m e n t . q u e r y S e l e c t o r ( ' . v d i t o r - c o m m e n t [ d a t a - c m t i d s = " ' . c o n c a t ( f , ' " ] ' ) ) . o f f s e t T o p } ) } ) , d } e l s e r e t u r n [ ] } , i . p r o t o t y p e . t r i g g e r R e m o v e C o m m e n t = f u n c t i o n ( a ) { v a r s = f u n c t i o n ( f , E ) { v a r L = n e w S e t ( E ) ; r e t u r n f . f i l t e r ( f u n c t i o n ( D ) { r e t u r n ! L . h a s ( D ) } ) } ; i f ( a . c u r r e n t M o d e = = = " w y s i w y g " & & a . o p t i o n s . c o m m e n t . e n a b l e & & a . w y s i w y g . c o m m e n t I d s . l e n g t h > 0 ) { v a r u = J S O N . p a r s e ( J S O N . s t r i n g i f y ( t h i s . c o m m e n t I d s ) ) ; t h i s . g e t C o m m e n t s ( a ) ; v a r d = s ( u , t h i s . c o m m e n t I d s ) ; d . l e n g t h > 0 & & a . o p t i o n s . c o m m e n t . r e m o v e ( d ) } } , i . p r o t o t y p e . s h o w C o m m e n t = f u n c t i o n ( ) { v a r a = ( 0 , q . N y ) ( t h i s . e l e m e n t ) ; t h i s . s e l e c t P o p o v e r . s e t A t t r i b u t e ( " s t y l e " , " l e f t : " . c o n c a t ( a . l e f t , " p x ; d i s p l a y : b l o c k ; t o p : " ) . c o n c a t ( M a t h . m a x ( - 8 , a . t o p - 2 1 ) , " p x " ) ) } , i . p r o t o t y p e . h i d e C o m m e n t = f u n c t i o n ( ) { t h i s . s e l e c t P o p o v e r . s e t A t t r i b u t e ( " s t y l e " , " d i s p l a y : n o n e " ) } , i . p r o t o t y p e . u n b i n d L i s t e n e r = f u n c t i o n ( ) { w i n d o w . r e m o v e E v e n t L i s t e n e r ( " s c r o l l " , t h i s . s c r o l l L i s t e n e r ) } , i . p r o t o t y p e . c o p y = f u n c t i o n ( a , s ) { v a r u = g e t S e l e c t i o n ( ) . g e t R a n g e A t ( 0 ) ; i f ( u . t o S t r i n g ( ) ! = = " " ) { a . s t o p P r o p a g a t i o n ( ) , a . p r e v e n t D e f a u l t ( ) ; v a r d = ( 0 , y . l G ) ( u . s t a r t C o n t a i n e r , " C O D E " ) , f = ( 0 , y . l G ) ( u . e n d C o n t a i n e r , " C O D E " ) ; i f ( d & & f & & f . i s S a m e N o d e ( d ) ) { v a r E = " " ; d . p a r e n t E l e m e n t . t a g N a m e = = = " P R E " ? E = u . t o S t r i n g ( ) : E = " ` " + u . t o S t r i n g ( ) + " ` " , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , E ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) ; r e t u r n } v a r L = ( 0 , y . l G ) ( u . s t a r t C o n t a i n e r , " A " ) , D = ( 0 , y . l G ) ( u . e n d C o n t a i n e r , " A " ) ; i f ( L & & D & & D . i s S a m e N o d e ( L ) ) { v a r _ = L . g e t A t t r i b u t e ( " t i t l e " ) | | " " ; _ & & ( _ = ' " ' . c o n c a t ( _ , ' " ' ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / p l a i n " , " [ " . c o n c a t ( u . t o S t r i n g ( ) , " ] ( " ) . c o n c a t ( L . g e t A t t r i b u t e ( " h r e f " ) ) . c o n c a t ( _ , " ) " ) ) , a . c l i p b o a r d D a t a . s e t D a t a ( " t e x t / h t m l " , " " ) ; r e t u r n } v a r B = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; B . a p p e n d C h i l d ( u . c l o n e C o n t e n t s ( ) ) , a . c l i p b o a r d D a t a . s e t D
` );D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!== `
` ){_=!1;break}_&&/^#{1,6} $ /.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||mo(f.innerHTML)||fo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),Zr(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,q.Hc)(getSelection().getRangeAt(0)),Re(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?co(a,u.target):di(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,q.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,q.ib)(s.element,E)))}jn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,q.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&cr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Z(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent=== `
` )&&(a.wysiwyg.element.innerHTML="");var d=(0,q.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent=== `
` &&d.startOffset===1&&(d.startContainer.textContent=""),Pn(a,d),jn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?cr(f,a):cr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Hn(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){cr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Vs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ye(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ws.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")
] ` ).replace("lheading",c3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lk=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , _k = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , d3 = /^( {2,}|\\)\n(?!\s*$)/ , Nk = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , Jc = /[\p{P}\p{S}]/u , Xf = /[\s\p{P}\p{S}]/u , h3 = /[^\s\p{P}\p{S}]/u , Dk = ln ( /^((?![*_])punctSpace)/ , "u" ) . replace ( /punctSpace/g , Xf ) . getRegex ( ) , p3 = /(?!~)[\p{P}\p{S}]/u , Rk = /(?!~)[\s\p{P}\p{S}]/u , Ik = /(?:[^\s\p{P}\p{S}]|~)/u , Ok = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g , f3 = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/ , Hk = ln ( f3 , "u" ) . replace ( /punct/g , Jc ) . getRegex ( ) , Pk = ln ( f3 , "u" ) . replace ( /punct/g , p3 ) . getRegex ( ) , m3 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)" , zk = ln ( m3 , "gu" ) . replace ( /notPunctSpace/g , h3 ) . replace ( /punctSpace/g , Xf ) . replace ( /punct/g , Jc ) . getRegex ( ) , Bk = ln ( m3 , "gu" ) . replace ( /notPunctSpace/g , Ik ) . replace ( /punctSpace/g , Rk ) . replace ( /punct/g , p3 ) . getRegex ( ) , Fk = ln ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)" , "gu" ) . replace ( /notPunctSpace/g , h3 ) . replace ( /punctSpace/g , Xf ) . replace ( /punct/g , Jc ) . getRegex ( ) , qk = ln ( /\\(punct)/ , "gu" ) . replace ( /punct/g , Jc ) . getRegex ( ) , jk = ln ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , $k = ln ( Gf ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , Uk = ln ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , $k ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , mc = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/ , Vk = ln ( /^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/ ) . replace ( "label" , mc ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , g3 = ln ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , mc ) . replace ( "ref" , Wf ) . getRegex ( ) , v3 = ln ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , Wf ) . getRegex ( ) , Wk = ln ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , g3 ) . replace ( "nolink" , v3 ) . getRegex ( ) , Zf = { _backpedal : Ml , anyPunctuation : qk , autolink : jk , blockSkip : Ok , br : d3 , code : _k , del : Ml , emStrongLDelim : Hk , emStrongRDelimAst : zk , emStrongRDelimUnd : Fk , escape : Lk , link : Vk , nolink : v3 , punctuation : Dk , reflink : g3 , reflinkSearch : Wk , tag : Uk , text : Nk , url : Ml } , Gk = { ... Zf , link : ln ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , mc ) . getRegex ( ) , reflink : ln ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , mc ) . getRegex ( ) } , lp = { ... Zf , emStrongRDelimAst : Bk , emStrongLDelim : Pk , url : ln ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , Kk = { ... lp , br : ln ( d3 ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : ln ( lp . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , y0 = { normal : Kf , gfm : Mk , pedantic : Ck } , ll = { normal : Zf , gfm : lp , breaks : Kk , pedantic : Gk } , Xk = { "&" : "&" , "<" : "<" , ">" : ">" , '"' : "
` ).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join( `
` )}var gc=class{constructor(t){mn(this,"options");mn(this,"rules");mn(this,"lexer");this.options=t||qo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cl(n, `
` )}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=Yk(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=cl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:cl(e[0], `
` )}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=cl(e[0], `
` ).split( `
` ),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join( `
` ),b=v.replace(this.rules.other.blockquoteSetextReplace, `
$1 ` ).replace(this.rules.other.blockquoteSetextReplace2,"");r=r? ` $ { r }
$ { v } ` :v,o=o? ` $ { o }
$ { b } ` :b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+ `
` +n.join( `
` ),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split( `
` );continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r? ` \ \ d { 1 , 9 } \ \ $ { n . slice ( - 1 ) } ` : ` \ \ $ { n } ` ,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split( `
` ,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split( `
` ,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+ `
` ,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split( `
` ,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+= `
` +z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+= `
` +m}!x&&!m.trim()&&(x=!0),v+=N+ `
` ,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var h;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=pg(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=e[3])!=null&&h.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split( `
` ):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<n.length;c++)l.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(pg(c,l.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:l.align[v]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)=== `
` ?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=cl(n.slice(0,-1)," \\ ");if((n.length-l.length)%2===0)return}else{let l=Zk(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),fg(e,{href:r&&r.replace(this.rules.inline.anyPunctuation," $ 1"),title:o&&o.replace(this.rules.inline.anyPunctuation," $ 1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return fg(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let r,o;if(e[2]==="@")r=e[0],o="mailto:"+r;else{let l;do l=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(l!==e[0]);r=e[0],e[1]==="www."?o="http://"+e[0]:o=e[0]}return{type:"link",raw:e[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},va=class cp{constructor(e){mn(this,"tokens");mn(this,"
` ),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(Er.tabCharGlobal," ").replace(Er.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+= `
` :n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith( `
` )?"": `
` )+c.raw,v.text+= `
` +c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var c,p,v;let r=e,o=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)b.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,h="";for(;e;){l||(h=""),l=!1;let b;if((p=(c=this.options.extensions)==null?void 0:c.inline)!=null&&p.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,r,h)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((v=this.options.extensions)!=null&&v.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(h=b.raw.slice(-1)),l=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},vc=class{constructor(t){mn(this,"options");mn(this,"parser");this.options=t||qo}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let r=(l=(e||"").match(Er.notSpaceStart))==null?void 0:l[0],o=t.replace(Er.endingNewline,"")+ `
` ;return r?'<pre><code class="language-'+Oi(r)+'">'+(n?o:Oi(o,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(n?o:Oi(o,!0))+ ` < / c o d e > < / p r e >
` }blockquote({tokens:t}){return ` < blockquote >
$ { this . parser . parse ( t ) } < / b l o c k q u o t e >
` }html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return ` < h$ { e } > $ { this . parser . parseInline ( t ) } < / h $ { e } >
` }hr(t){return ` < hr >
` }list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+ ` >
` +r+"</"+o+ ` >
` }listitem(t){var n;let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Oi(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose), ` < li > $ { e } < / l i >
` }checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return ` < p > $ { this . parser . parseInline ( t ) } < / p >
` }table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r= ` < tbody > $ { r } < / t b o d y > ` ) , ` < t a b l e >
< thead >
` +e+ ` < / t h e a d >
` +r+ ` < / t a b l e >
` }tablerow({text:t}){return ` < tr >
$ { t } < / t r >
` }tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align? ` < $ { n } align = "${t.align}" > ` : ` < $ { n } > ` )+e+ ` < / $ { n } >
` }strong({tokens:t}){return ` < strong > $ { this . parser . parseInline ( t ) } < / s t r o n g > ` } e m ( { t o k e n s : t } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / e m > ` } c o d e s p a n ( { t e x t : t } ) { r e t u r n ` < c o d e > $ { O i ( t , ! 0 ) } < / c o d e > ` } b r ( t ) { r e t u r n " < b r > " } d e l ( { t o k e n s : t } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( t ) } < / d e l > ` } l i n k ( { h r e f : t , t i t l e : e , t o k e n s : n } ) { l e t r = t h i s . p a r s e r . p a r s e I n l i n e ( n ) , o = h g ( t ) ; i f ( o = = = n u l l ) r e t u r n r ; t = o ; l e t l = ' < a h r e f = " ' + t + ' " ' ; r e t u r n e & & ( l + = ' t i t l e = " ' + O i ( e ) + ' " ' ) , l + = " > " + r + " < / a > " , l } i m a g e ( { h r e f : t , t i t l e : e , t e x t : n , t o k e n s : r } ) { r & & ( n = t h i s . p a r s e r . p a r s e I n l i n e ( r , t h i s . p a r s e r . t e x t R e n d e r e r ) ) ; l e t o = h g ( t ) ; i f ( o = = = n u l l ) r e t u r n O i ( n ) ; t = o ; l e t l = ` < i m g s r c = " $ { t } " a l t = " $ { n } " ` ; r e t u r n e & & ( l + = ` t i t l e = " $ { O i ( e ) } " ` ) , l + = " > " , l } t e x t ( t ) { r e t u r n " t o k e n s " i n t & & t . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( t . t o k e n s ) : " e s c a p e d " i n t & & t . e s c a p e d ? t . t e x t : O i ( t . t e x t ) } } , Y f = c l a s s { s t r o n g ( { t e x t : e } ) { r e t u r n e } e m ( { t e x t : e } ) { r e t u r n e } c o d e s p a n ( { t e x t : e } ) { r e t u r n e } d e l ( { t e x t : e } ) { r e t u r n e } h t m l ( { t e x t : e } ) { r e t u r n e } t e x t ( { t e x t : e } ) { r e t u r n e } l i n k ( { t e x t : e } ) { r e t u r n " " + e } i m a g e ( { t e x t : e } ) { r e t u r n " " + e } b r ( ) { r e t u r n " " } } , b a = c l a s s u p { c o n s t r u c t o r ( e ) { m n ( t h i s , " o p t i o n s " ) ; m n ( t h i s , " r e n d e r e r " ) ; m n ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = e | | q o , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w v c , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w Y f } s t a t i c p a r s e ( e , n ) { r e t u r n n e w u p ( n ) . p a r s e ( e ) } s t a t i c p a r s e I n l i n e ( e , n ) { r e t u r n n e w u p ( n ) . p a r s e I n l i n e ( e ) } p a r s e ( e , n = ! 0 ) { v a r o , l ; l e t r = " " ; f o r ( l e t h = 0 ; h < e . l e n g t h ; h + + ) { l e t c = e [ h ] ; i f ( ( l = ( o = t h i s . o p t i o n s . e x t e n s i o n s ) = = n u l l ? v o i d 0 : o . r e n d e r e r s ) ! = n u l l & & l [ c . t y p e ] ) { l e t v = c , b = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ v . t y p e ] . c a l l ( { p a r s e r : t h i s } , v ) ; i f ( b ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " d e f " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( v . t y p e ) ) { r + = b | | " " ; c o n t i n u e } } l e t p = c ; s w i t c h ( p . t y p e ) { c a s e " s p a c e " : { r + = t h i s . r e n d e r e r . s p a c e ( p ) ; c o n t i n u e } c a s e " h r " : { r + = t h i s . r e n d e r e r . h r ( p ) ; c o n t i n u e } c a s e " h e a d i n g " : { r + = t h i s . r e n d e r e r . h e a d i n g ( p ) ; c o n t i n u e } c a s e " c o d e " : { r + = t h i s . r e n d e r e r . c o d e ( p ) ; c o n t i n u e } c a s e " t a b l e " : { r + = t h i s . r e n d e r e r . t a b l e ( p ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { r + = t h i s . r e n d e r e r . b l o c k q u o t e ( p ) ; c o n t i n u e } c a s e " l i s t " : { r + = t h i s . r e n d e r e r . l i s t ( p ) ; c o n t i n u e } c a s e " h t m l " : { r + = t h i s . r e n d e r e r . h t m l ( p ) ; c o n t i n u e } c a s e " d e f " : { r + = t h i s . r e n d e r e r . d e f ( p ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { r + = t h i s . r e n d e r e r . p a r a g r a p h ( p ) ; c o n t i n u e } c a s e " t e x t " : { l e t v = p , b = t h i s . r e n d e r e r . t e x t ( v ) ; f o r ( ; h + 1 < e . l e n g t h & & e [ h + 1 ] . t y p e = = = " t e x t " ; ) v = e [ + + h ] , b + = `
` +this.renderer.text(v);n?r+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):r+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}parseInline(e,n=this.renderer){var o,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=v||"";continue}}let p=c;switch(p.type){case"escape":{r+=n.text(p);break}case"html":{r+=n.html(p);break}case"link":{r+=n.link(p);break}case"image":{r+=n.image(p);break}case"strong":{r+=n.strong(p);break}case"em":{r+=n.em(p);break}case"codespan":{r+=n.codespan(p);break}case"br":{r+=n.br(p);break}case"del":{r+=n.del(p);break}case"text":{r+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}},Mh,z0=(Mh=class{constructor(t){mn(this,"options");mn(this,"block");this.options=t||qo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?va.lex:va.lexInline}provideParser(){return this.block?ba.parse:ba.parseInline}},mn(Mh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mh),Jk=class{constructor(...t){mn(this,"defaults", $ f());mn(this,"options",this.setOptions);mn(this,"parse",this.parseMarkdown(!0));mn(this,"parseInline",this.parseMarkdown(!1));mn(this,"Parser",ba);mn(this,"Renderer",vc);mn(this,"TextRenderer",Yf);mn(this,"Lexer",va);mn(this,"Tokenizer",gc);mn(this,"Hooks",z0);this.use(...t)}walkTokens(t,e){var r,o;let n=[];for(let l of t)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)n=n.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)n=n.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;n=n.concat(this.walkTokens(h.items,e));break}default:{let h=l;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);n=n.concat(this.walkTokens(p,e))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new vc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error( ` renderer '${l}' does not exist ` );if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new gc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error( ` tokenizer '${l}' does not exist ` );if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new z0;for(let l in n.hooks){if(!(l in o))throw new Error( ` hook '${l}' does not exist ` );if(["options","block"].include
Please report this to https : //github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Oi(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Oo=new Jk;function Qt(t,e){return Oo.parse(t,e)}Qt.options=Qt.setOptions=function(t){return Oo.setOptions(t),Qt.defaults=Oo.defaults,s3(Qt.defaults),Qt};Qt.getDefaults=$f;Qt.defaults=qo;Qt.use=function(...t){return Oo.use(...t),Qt.defaults=Oo.defaults,s3(Qt.defaults),Qt};Qt.walkTokens=function(t,e){return Oo.walkTokens(t,e)};Qt.parseInline=Oo.parseInline;Qt.Parser=ba;Qt.parser=ba.parse;Qt.Renderer=vc;Qt.TextRenderer=Yf;Qt.Lexer=va;Qt.lexer=va.lex;Qt.Tokenizer=gc;Qt.Hooks=z0;Qt.parse=Qt;Qt.options;Qt.setOptions;Qt.use;Qt.walkTokens;Qt.parseInline;ba.parse;va.lex;var b3={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism : Lightweight , robust , elegant syntax highlighting
*
* @ license MIT < https : //opensource.org/licenses/MIT>
* @ author Lea Verou < https : //lea.verou.me>
* @ namespace
* @ public
* /var n=function(r){var o=/ ( ? : ^ | \ s ) lang ( ? : uage ) ? - ( [ \ w - ] + ) ( ? = \ s | $ ) / i , l = 0 , h = { } , c = { manual : r . Prism && r . Prism . manual , disableWorkerMessageHandler : r . Prism && r . Prism . disableWorkerMessageHandler , util : { encode : function T ( A ) { return A instanceof p ? new p ( A . type , T ( A . content ) , A . alias ) : Array . isArray ( A ) ? A . map ( T ) : A . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( /\u00a0/g , " " ) } , type : function ( T ) { return Object . prototype . toString . call ( T ) . slice ( 8 , - 1 ) } , objId : function ( T ) { return T . _ _id || Object . defineProperty ( T , "__id" , { value : ++ l } ) , T . _ _id } , clone : function T ( A , M ) { M = M || { } ; var y , N ; switch ( c . util . type ( A ) ) { case "Object" : if ( N = c . util . objId ( A ) , M [ N ] ) return M [ N ] ; y = { } , M [ N ] = y ; for ( var z in A ) A . hasOwnProperty ( z ) && ( y [ z ] = T ( A [ z ] , M ) ) ; return y ; case "Array" : return N = c . util . objId ( A ) , M [ N ] ? M [ N ] : ( y = [ ] , M [ N ] = y , A . forEach ( function ( F , P ) { y [ P ] = T ( F , M ) } ) , y ) ; default : return A } } , getLanguage : function ( T ) { for ( ; T ; ) { var A = o . exec ( T . className ) ; if ( A ) return A [ 1 ] . toLowerCase ( ) ; T = T . parentElement } return "none" } , setLanguage : function ( T , A ) { T . className = T . className . replace ( RegExp ( o , "gi" ) , "" ) , T . classList . add ( "language-" + A ) } , currentScript : function ( ) { if ( typeof document > "u" ) return null ; if ( document . currentScript && document . currentScript . tagName === "SCRIPT" && 1 < 2 ) return document . currentScript ; try { throw new Error } catch ( y ) { var T = ( /at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i . exec ( y . stack ) || [ ] ) [ 1 ] ; if ( T ) { var A = document . getElementsByTagName ( "script" ) ; for ( var M in A ) if ( A [ M ] . src == T ) return A [ M ] } return null } } , isActive : function ( T , A , M ) { for ( var y = "no-" + A ; T ; ) { var N = T . classList ; if ( N . contains ( A ) ) return ! 0 ; if ( N . contains ( y ) ) return ! 1 ; T = T . parentElement } return ! ! M } } , languages : { plain : h , plaintext : h , text : h , txt : h , extend : function ( T , A ) { var M = c . util . clone ( c . languages [ T ] ) ; for ( var y in A ) M [ y ] = A [ y ] ; return M } , insertBefore : function ( T , A , M , y ) { y = y || c . languages ; var N = y [ T ] , z = { } ; for ( var F in N ) if ( N . hasOwnProperty ( F ) ) { if ( F == A ) for ( var P in M ) M . hasOwnProperty ( P ) && ( z [ P ] = M [ P ] ) ; M . hasOwnProperty ( F ) || ( z [ F ] = N [ F ] ) } var Y = y [ T ] ; return y [ T ] = z , c . languages . DFS ( c . languages , function ( te , ce ) { ce === Y && te != T && ( this [ te ] = z ) } ) , z } , DFS : function T ( A , M , y , N ) { N = N || { } ; var z = c . util . objId ; for ( var F in A ) if ( A . hasOwnProperty ( F ) ) { M . call ( A , F , A [ F ] , y || F ) ; var P = A [ F ] , Y = c . util . type ( P ) ; Y === "Object" && ! N [ z ( P ) ] ? ( N [ z ( P ) ] = ! 0 , T ( P , M , null , N ) ) : Y === "Array" && ! N [ z ( P ) ] && ( N [ z ( P ) ] = ! 0 , T ( P , M , F , N ) ) } } } , plugins : { } , highlightAll : function ( T , A ) { c . highlightAllUnder ( document , T , A ) } , highlightAllUnder : function ( T , A , M ) { var y = { callback : M , container : T , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; c . hooks . run ( "before-highlightall" , y ) , y . elements = Array . prototype . slice . apply ( y . container . querySelectorAll ( y . selector ) ) , c . hooks . run ( "before-all-elements-highlight" , y ) ; for ( var N = 0 , z ; z = y . elements [ N ++ ] ; ) c . highlightElement ( z , A === ! 0 , y . callback ) } , highlightElement : function ( T , A , M ) { var y = c . util . getLanguage ( T ) , N = c . languages [ y ] ; c . util . setLanguage ( T , y ) ; var z = T . parentElement ; z && z . nodeName . toLowerCase ( ) === "pre" && c . util . setLanguage ( z , y ) ; var F = T . textContent , P = { element : T , language : y , grammar : N , code : F } ; function Y ( ce ) { P . highlightedCode = ce , c . hooks . run ( "before-insert" , P ) , P . element . innerHTML = P . highlightedCode , c . hooks . run ( "after-highlight" , P ) , c . hooks . run ( "complete" , P ) , M && M . call ( P . element ) } if ( c . hooks . run ( "before-sanity-check" , P ) , z = P . element . parentElement , z && z . nodeName . toLowerCase ( ) === "pre" && ! z . hasAttribute ( "tabindex" ) && z . setAttribute ( "tabindex" , "0" ) , ! P . code ) { c . hooks . run ( "complete" , P ) , M && M . call ( P . element ) ; return } if ( c . hooks . run ( "before-highlight" , P ) , ! P . grammar ) { Y ( c . util . encode ( P . code ) ) ; return } if ( A && r . Worker ) { var te = new Worker ( c . filename ) ; te . onmessage = function ( ce ) { Y ( ce . data ) } , te . postMessage ( JSON . stringify ( { language : P . language , code : P . code , immediateClose : ! 0 } ) ) } else Y ( c . highlight ( P . code , P . grammar , P . language ) ) } , highlight : function ( T , A , M ) { var y = { code : T , grammar : A , language : M } ; if ( c . hooks . run ( "before-tokenize" , y ) , ! y . grammar ) throw new Error ( 'The language "' + y . language + '" has no grammar.' ) ; return y . tokens = c . tokenize ( y . code , y . grammar ) , c . hooks . run ( "after-tokenize" , y ) , p . stringify ( c . util . encode ( y . tokens ) , y . language ) } , tokenize : function ( T , A ) { var M = A . rest ; if ( M ) { for ( var y in M ) A [ y ] = M [ y ] ; delete A . rest } var N = new g ; return m ( N , N . head , T )
` ),k.hasAttribute("data-start")||k.setAttribute("data-start",String(P+1))}C.textContent=N,n.highlightElement(C)},function(N){k.setAttribute(c,b),C.textContent=N})}}),n.plugins.fileHighlight={highlight:function(k){for(var C=(k||document).querySelectorAll(g),T=0,A;A=C[T++];)n.highlightElement(A)}};var w=!1;n.fileHighlight=function(){w||(console.warn("Prism.fileHighlight is deprecated. Use ` Prism . plugins . fileHighlight . highlight ` instead."),w=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(b3);var Qk=b3.exports;const mg=vv(Qk);class $ r{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new $ r(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class ai{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new ai(n, $ r.range(this,e))}}class Qe{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g," $ &̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=Qe.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}}Qe.prototype.__proto__=Error.prototype;var eS=function(e,n){return e.indexOf(n)!==-1},tS=function(e,n){return e===void 0?n:e},nS=/([A-Z])/g,rS=function(e){return e.replace(nS,"- $ 1").toLowerCase()},iS={"&":"&",">":">","<":"<",'"':""","'":"'"},aS=/[&><"']/g;function oS(t){return String(t).replace(aS,e=>iS[e])}var y3=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},sS=function(e){var n=y3(e);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},lS=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},cS=function(e){var n=/^[ \x 00- \x 20]*([^ \\ /#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+ \- .]* $ /.test(n[1])?null:n[1].toLowerCase():"_relative"},xt={contains:eS,deflt:tS,escape:oS,hyphenate:rS,getBaseElem:y3,isCharacterBox:sS,protocolFromUrl:cS},B0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\ int and \\ sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},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:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, ` \ \ sqrt ` top lines, ` { array } ` vertical lines, ` \ \ hline ` , ` \ \ hdashline ` , ` \ \ underline ` , ` \ \ overline ` , and the borders of ` \ \ fbox ` , ` \ \ boxed ` , and ` \ \ fcolorbox ` .",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\ color behave like LaTeX's 2-a
c - 2.7 , 0 , - 7.17 , - 2.7 , - 13.5 , - 8 c - 5.8 , - 5.3 , - 9.5 , - 10 , - 9.5 , - 14
c0 , - 2 , 0.3 , - 3.3 , 1 , - 4 c1 . 3 , - 2.7 , 23.83 , - 20.7 , 67.5 , - 54
c44 . 2 , - 33.3 , 65.8 , - 50.3 , 66.5 , - 51 c1 . 3 , - 1.3 , 3 , - 2 , 5 , - 2 c4 . 7 , 0 , 8.7 , 3.3 , 12 , 10
s173 , 378 , 173 , 378 c0 . 7 , 0 , 35.3 , - 71 , 104 , - 213 c68 . 7 , - 142 , 137.5 , - 285 , 206.5 , - 429
c69 , - 144 , 104.5 , - 217.7 , 106.5 , - 221
l ` +e/2.075+" -"+e+ `
c5 . 3 , - 9.3 , 12 , - 14 , 20 , - 14
H400000v ` +(40+e)+ ` H845 . 2724
s - 225.272 , 467 , - 225.272 , 467 s - 235 , 486 , - 235 , 486 c - 2.7 , 4.7 , - 9 , 7 , - 19 , 7
c - 6 , 0 , - 10 , - 1 , - 12 , - 3 s - 194 , - 422 , - 194 , - 422 s - 65 , 47 , - 65 , 47 z
M ` +(834+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},yS=function(e,n){return"M263,"+(601+e+n)+ ` c0 . 7 , 0 , 18 , 39.7 , 52 , 119
c34 , 79.3 , 68.167 , 158.7 , 102.5 , 238 c34 . 3 , 79.3 , 51.8 , 119.3 , 52.5 , 120
c340 , - 704.7 , 510.7 , - 1060.3 , 512 , - 1067
l ` +e/2.084+" -"+e+ `
c4 . 7 , - 7.3 , 11 , - 11 , 19 , - 11
H40000v ` +(40+e)+ ` H1012 . 3
s - 271.3 , 567 , - 271.3 , 567 c - 38.7 , 80.7 , - 84 , 175 , - 136 , 283 c - 52 , 108 , - 89.167 , 185.3 , - 111.5 , 232
c - 22.3 , 46.7 , - 33.8 , 70.3 , - 34.5 , 71 c - 4.7 , 4.7 , - 12.3 , 7 , - 23 , 7 s - 12 , - 1 , - 12 , - 1
s - 109 , - 253 , - 109 , - 253 c - 72.7 , - 168 , - 109.3 , - 252 , - 110 , - 252 c - 10.7 , 8 , - 22 , 16.7 , - 34 , 26
c - 22 , 17.3 , - 33.3 , 26 , - 34 , 26 s - 26 , - 26 , - 26 , - 26 s76 , - 59 , 76 , - 59 s76 , - 60 , 76 , - 60 z
M ` +(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},wS=function(e,n){return"M983 "+(10+e+n)+ `
l ` +e/3.13+" -"+e+ `
c4 , - 6.7 , 10 , - 10 , 18 , - 10 H400000v ` +(40+e)+ `
H1013 . 1 s - 83.4 , 268 , - 264.1 , 840 c - 180.7 , 572 , - 277 , 876.3 , - 289 , 913 c - 4.7 , 4.7 , - 12.7 , 7 , - 24 , 7
s - 12 , 0 , - 12 , 0 c - 1.3 , - 3.3 , - 3.7 , - 11.7 , - 7 , - 25 c - 35.3 , - 125.3 , - 106.7 , - 373.3 , - 214 , - 744
c - 10 , 12 , - 21 , 25 , - 33 , 39 s - 32 , 39 , - 32 , 39 c - 6 , - 5.3 , - 15 , - 14 , - 27 , - 26 s25 , - 30 , 25 , - 30
c26 . 7 , - 32.7 , 52 , - 63 , 76 , - 91 s52 , - 60 , 52 , - 60 s208 , 722 , 208 , 722
c56 , - 175.3 , 126.3 , - 397.3 , 211 , - 666 c84 . 7 , - 268.7 , 153.8 , - 488.2 , 207.5 , - 658.5
c53 . 7 , - 170.3 , 84.5 , - 266.8 , 92.5 , - 289.5 z
M ` +(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},xS=function(e,n){return"M424,"+(2398+e+n)+ `
c - 1.3 , - 0.7 , - 38.5 , - 172 , - 111.5 , - 514 c - 73 , - 342 , - 109.8 , - 513.3 , - 110.5 , - 514
c0 , - 2 , - 10.7 , 14.3 , - 32 , 49 c - 4.7 , 7.3 , - 9.8 , 15.7 , - 15.5 , 25 c - 5.7 , 9.3 , - 9.8 , 16 , - 12.5 , 20
s - 5 , 7 , - 5 , 7 c - 4 , - 3.3 , - 8.3 , - 7.7 , - 13 , - 13 s - 13 , - 13 , - 13 , - 13 s76 , - 122 , 76 , - 122 s77 , - 121 , 77 , - 121
s209 , 968 , 209 , 968 c0 , - 2 , 84.7 , - 361.7 , 254 , - 1079 c169 . 3 , - 717.3 , 254.7 , - 1077.7 , 256 , - 1081
l ` +e/4.223+" -"+e+ ` c4 , - 6.7 , 10 , - 10 , 18 , - 10 H400000
v ` +(40+e)+ ` H1014 . 6
s - 87.3 , 378.7 , - 272.6 , 1166 c - 185.3 , 787.3 , - 279.3 , 1182.3 , - 282 , 1185
c - 2 , 6 , - 10 , 9 , - 24 , 9
c - 8 , 0 , - 12 , - 0.7 , - 12 , - 2 z M ` +(1001+e)+" "+n+ `
h400000v ` +(40+e)+"h-400000z"},kS=function(e,n){return"M473,"+(2713+e+n)+ `
c339 . 3 , - 1799.3 , 509.3 , - 2700 , 510 , - 2702 l ` +e/5.298+" -"+e+ `
c3 . 3 , - 7.3 , 9.3 , - 11 , 18 , - 11 H400000v ` +(40+e)+ ` H1017 . 7
s - 90.5 , 478 , - 276.2 , 1466 c - 185.7 , 988 , - 279.5 , 1483 , - 281.5 , 1485 c - 2 , 6 , - 10 , 9 , - 24 , 9
c - 8 , 0 , - 12 , - 0.7 , - 12 , - 2 c0 , - 1.3 , - 5.3 , - 32 , - 16 , - 92 c - 50.7 , - 293.3 , - 119.7 , - 693.3 , - 207 , - 1200
c0 , - 1.3 , - 5.3 , 8.7 , - 16 , 30 c - 10.7 , 21.3 , - 21.3 , 42.7 , - 32 , 64 s - 16 , 33 , - 16 , 33 s - 26 , - 26 , - 26 , - 26
s76 , - 153 , 76 , - 153 s77 , - 151 , 77 , - 151 c0 . 7 , 0.7 , 35.7 , 202 , 105 , 604 c67 . 3 , 400.7 , 102 , 602.7 , 104 ,
606 zM ` +(1001+e)+" "+n+"h400000v"+(40+e)+"H1017.7z"},SS=function(e){var n=e/2;return"M400000 "+e+" H0 L"+n+" 0 l65 45 L145 "+(e-80)+" H400000z"},ES=function(e,n,r){var o=r-54-n-e;return"M702 "+(e+n)+"H400000"+(40+e)+ `
H742v ` +o+ ` l - 4 4 - 4 4 c - . 667.7 - 2 1.5 - 4 2.5 s - 4.167 1.833 - 6.5 2.5 - 5.5 1 - 9.5 1
h - 12 l - 28 - 84 c - 16.667 - 52 - 96.667 - 294.333 - 240 - 727 l - 212 - 643 - 85 170
c - 4 - 3.333 - 8.333 - 7.667 - 13 - 13 l - 13 - 13 l77 - 155 77 - 156 c66 199.333 139 419.667
219 661 l218 661 zM702 ` +n+"H400000v"+(40+e)+"H742z"},TS=function(e,n,r){n=1e3*n;var o="";switch(e){case"sqrtMain":o=bS(n,Go);break;case"sqrtSize1":o=yS(n,Go);break;case"sqrtSize2":o=wS(n,Go);break;case"sqrtSize3":o=xS(n,Go);break;case"sqrtSize4":o=kS(n,Go);break;case"sqrtTall":o=ES(n,Go,r)}return o},AS=function(e,n){switch(e){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣ ":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},gg={doubleleftarrow: ` M262 157
l10 - 10 c34 - 36 62.7 - 77 86 - 123 3.3 - 8 5 - 13.3 5 - 16 0 - 5.3 - 6.7 - 8 - 20 - 8 - 7.3
0 - 12.2 . 5 - 14.5 1.5 - 2.3 1 - 4.8 4.5 - 7.5 10.5 - 49.3 97.3 - 121.7 169.3 - 217 216 - 28
14 - 57.3 25 - 88 33 - 6.7 2 - 11 3.8 - 13 5.5 - 2 1.7 - 3 4.2 - 3 7.5 s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13 h6c12 - . 7 18 - 4 18 - 10 0 - 2 - 1.7 - 7 - 5 - 15 - 23.3 - 46 - 52 - 87
- 86 - 123 l - 10 - 10 h399738v - 40 H218c328 0 0 0 0 0 l - 10 - 8 c - 26.7 - 20 - 65.7 - 43 - 117 - 69 2.7
- 2 6 - 3.7 10 - 5 36.7 - 16 72.3 - 37.3 107 - 64 l10 - 8 h399782v - 40 z
m8 0 v40h399730v - 40 zm0 194 v40h399730v - 40 z ` ,doublerightarrow: ` M399738 392 l
- 10 10 c - 34 36 - 62.7 77 - 86 123 - 3.3 8 - 5 13.3 - 5 16 0 5.3 6.7 8 20 8 7.3 0 12.2 - . 5
14.5 - 1.5 2.3 - 1 4.8 - 4.5 7.5 - 10.5 49.3 - 97.3 121.7 - 169.3 217 - 216 28 - 14 57.3 - 25 88
- 33 6.7 - 2 11 - 3.8 13 - 5.5 2 - 1.7 3 - 4.2 3 - 7.5 s - 1 - 5.8 - 3 - 7.5 c - 2 - 1.7 - 6.3 - 3.5 - 13 - 5.5 - 68
- 17.3 - 128.2 - 47.8 - 180.5 - 91.5 - 52.3 - 43.7 - 93.8 - 96.2 - 124.5 - 157.5 - 9.3 - 8 - 15.3 - 12.3 - 18
- 13 h - 6 c - 12 . 7 - 18 4 - 18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123 l10 10 H0v40h399782
c - 328 0 0 0 0 0 l10 8 c26 . 7 20 65.7 43 117 69 - 2.7 2 - 6 3.7 - 10 5 - 36.7 16 - 72.3 37.3
- 107 64 l - 10 8 H0v40zM0 157 v40h399730v - 40 zm0 194 v40h399730v - 40 z ` ,leftarrow: ` M400000 241 H110l3 - 3 c68 . 7 - 52.7 113.7 - 120
135 - 202 4 - 14.7 6 - 23 6 - 25 0 - 7.3 - 7 - 11 - 21 - 11 - 8 0 - 13.2 . 8 - 15.5 2.5 - 2.3 1.7 - 4.2 5.8
- 5.5 12.5 - 1.3 4.7 - 2.7 10.3 - 4 17 - 12 48.7 - 34.8 92 - 68.5 130 S65 . 3 228.3 18 247
c - 10 4 - 16 7.7 - 18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85 S196 441.3 208
490 c . 7 2 1.3 5 2 9 s1 . 2 6.7 1.5 8 c . 3 1.3 1 3.3 2 6 s2 . 2 4.5 3.5 5.5 c1 . 3 1 3.3
1.8 6 2.5 s6 1 10 1 c14 0 21 - 3.7 21 - 11 0 - 2 - 2 - 10.3 - 6 - 25 - 20 - 79.3 - 65 - 146.7 - 135 - 202
l - 3 - 3 h399890zM100 241 v40h399900v - 40 z ` ,leftbrace: ` M6 548 l - 6 - 6 v - 35 l6 - 11 c56 - 104 135.3 - 181.3 238 - 232 57.3 - 28.7 117
- 45 179 - 50 h399577v120H403c - 43.3 7 - 81 15 - 113 26 - 100.7 33 - 179.7 91 - 237 174 - 2.7
5 - 6 9 - 10 13 - . 7 1 - 7.3 1 - 20 1 H6z ` ,leftbraceunder: ` M0 6 l6 - 6 h17c12 . 688 0 19.313 . 3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5 . 688
0 2 . 3 4 1 18.688 2.7 76 4.3 172 5 h399450v120H429l - 6 - 1 c - 124.688 - 8 - 235 - 61.7
- 331 - 161 C60 . 687 138.7 32.312 99.3 7 54 L0 41 V6z ` ,leftgroup: ` M400000 80
H435C64 80 168.3 229.4 21 260 c - 5.9 1.2 - 18 0 - 18 0 - 2 0 - 3 - 1 - 3 - 3 v - 38 C76 61 257 0
435 0 h399565z ` ,leftgroupunder: ` M400000 262
H435C64 262 168.3 112.6 21 82 c - 5.9 - 1.2 - 18 0 - 18 0 - 2 0 - 3 1 - 3 3 v38c76 158 257 219
435 219 h399565z ` ,leftharpoon: ` M0 267 c . 7 5.3 3 10 7 14 h399993v - 40 H93c3 . 3
- 3.3 10.2 - 9.5 20.5 - 18.5 s17 . 8 - 15.8 22.5 - 20.5 c50 . 7 - 52 88 - 110.3 112 - 175 4 - 11.3 5
- 18.3 3 - 21 - 1.3 - 4 - 7.3 - 6 - 18 - 6 - 8 0 - 13 . 7 - 15 2 s - 4.7 6.7 - 8 16 c - 42 98.7 - 107.3 174.7
- 196 228 - 6.7 4.7 - 10.7 8 - 12 10 - 1.3 2 - 2 5.7 - 2 11 zm100 - 26 v40h399900v - 40 z ` ,leftharpoonplus: ` M0 267 c . 7 5.3 3 10 7 14 h399993v - 40 H93c3 . 3 - 3.3 10.2 - 9.5
20.5 - 18.5 s17 . 8 - 15.8 22.5 - 20.5 c50 . 7 - 52 88 - 110.3 112 - 175 4 - 11.3 5 - 18.3 3 - 21 - 1.3
- 4 - 7.3 - 6 - 18 - 6 - 8 0 - 13 . 7 - 15 2 s - 4.7 6.7 - 8 16 c - 42 98.7 - 107.3 174.7 - 196 228 - 6.7 4.7
- 10.7 8 - 12 10 - 1.3 2 - 2 5.7 - 2 11 zm100 - 26 v40h399900v - 40 zM0 435 v40h400000v - 40 z
m0 0 v40h400000v - 40 z ` ,leftharpoondown: ` M7 241 c - 4 4 - 6.333 8.667 - 7 14 0 5.333 . 667 9 2 11 s5 . 333
5.333 12 10 c90 . 667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 . 667 5
1 9 1 h5c10 . 667 0 16.667 - 2 18 - 6 2 - 2.667 1 - 9.667 - 3 - 21 - 32 - 87.333 - 82.667 - 157.667
- 152 - 211 l - 3 - 3 h399907v - 40 zM93 281 H400000 v - 40 L7 241 z ` ,leftharpoondownplus: ` M7 435 c - 4 4 - 6.3 8.7 - 7 14 0 5.3 . 7 9 2 11 s5 . 3 5.3 12
10 c90 . 7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 . 7 5 1 9 1 h5c10 . 7 0 16.7
- 2 18 - 6 2 - 2.7 1 - 9.7 - 3 - 21 - 32 - 87.3 - 82.7 - 157.7 - 152 - 211 l - 3 - 3 h399907v - 40 H7zm93 0
v40h399900v - 40 zM0 241 v40h399900v - 40 zm0 0 v40h399900v - 40 z ` ,lefthook: ` M400000 281 H103s - 33 - 11.2 - 61 - 33.5 S0 197.3 0 164 s14 . 2 - 61.2 42.5
- 83.5 C70 . 8 58.2 104 47 142 47 c16 . 7 0 25 6.7 25 20 0 12 - 8.7 18.7 - 26 20 - 40 3.3
- 68.7 15.7 - 86 37 - 10 12 - 15 25.3 - 15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23 h399859zM103 281 v - 40 h399897v40z ` ,leftlinesegment: ` M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z ` ,leftmapsto: ` M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z ` ,leftToFrom: ` M0 147 h400000v40H0zm0 214 c68 40 115.7 95.7 143 167 h22c15 . 3 0 23
- . 3 23 - 1 0 - 1.3 - 5.3 - 13.7 - 16 - 37 - 18 - 35.3 - 41.3 - 69 - 70 - 101 l - 7 - 8 h399905v - 40 H95l7 - 8
c28 . 7 - 32 52 - 65.7 70 - 101 10.7 - 23.3 16 - 35.7 16 - 37 0 - . 7 - 7.7 - 1 - 23 - 1 h - 22 C115 . 7 265.3
68 321 0 361 zm0 - 174 v - 40 h399900v40zm100 154 v40h399900v - 40 z ` ,longequal: ` M0 50 h400000 v40H0z m0 194 h40000v40H0z
M0 50 h400000 v40H0z m0 194 h40000v40H0z ` ,midbrace: ` M200428 334
c - 100.7 - 8.3 - 195.3 - 44 - 280 - 108 - 55.3 - 42 - 101.7 - 93 - 139 - 153 l - 9 - 14 c - 2.7 4 - 5.7 8.7 - 9 14
- 53.3 86.7 - 123.7 153 - 211 199 - 66.7 36 - 137.3 56.3 - 212 62 H0V214h199568c178 . 3 - 11.7
311.7 - 78.3 403 - 201 6 - 8 9.7 - 12 11 - 12 . 7 - . 7 6.7 - 1 18 - 1 s17 . 3.3 18 1 c1 . 3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141 s145 . 3 54.3 229 60 h199572v120z ` ,midbraceunder: ` M199572 214
c100 . 7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153 l9 14 c2 . 7 - 4 5.7 - 8.7 9 - 14
53.3 - 86.7 123.7 - 153 211 - 199 66.7 - 36 137.3 - 56.3 212 - 62 h199568v120H200432c - 178.3
11.7 - 311.7 78.3 - 403 201 - 6 8 - 9.7 12 - 11 12 - . 7.7 - 6.7 1 - 18 1 s - 17.3 - . 3 - 18 - 1 c - 1.3 0
- 5 - 4 - 11 - 12 - 44.7 - 59.3 - 101.3 - 106.3 - 170 - 141 s - 145.3 - 54.3 - 229 - 60 H0V214z ` ,oiintSize1: ` M512 . 6 71.6 c272 . 6 0 320.3 106.8 320.3 178.2 0 70.8 - 47.7 177.6
- 320.3 177.6 S193 . 1 320.6 193.1 249.8 c0 - 71.4 46.9 - 178.2 319.5 - 178.2 z
m368 . 1 178.2 c0 - 86.4 - 60.9 - 215.4 - 368.1 - 215.4 - 306.4 0 - 367.3 129 - 367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1 - 129 368.1 - 214.8 z ` ,oiintSize2: ` M757 . 8 100.1 c384 . 7 0 451.1 137.6 451.1 230 0 91.3 - 66.4 228.8
- 451.1 228.8 - 386.3 0 - 452.7 - 137.5 - 452.7 - 228.8 0 - 92.4 66.4 - 230 452.7 - 230 z
m502 . 4 230 c0 - 111.2 - 82.4 - 277.2 - 502.4 - 277.2 s - 504 166 - 504 277.2
c0 110 84 276 504 276 s502 . 4 - 166 502.4 - 276 z ` ,oiiintSize1: ` M681 . 4 71.6 c408 . 9 0 480.5 106.8 480.5 178.2 0 70.8 - 71.6 177.6
- 480.5 177.6 S202 . 1 320.6 202.1 249.8 c0 - 71.4 70.5 - 178.2 479.3 - 178.2 z
m525 . 8 178.2 c0 - 86.4 - 86.8 - 215.4 - 525.7 - 215.4 - 437.9 0 - 524.7 129 - 524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7 - 129 525.7 - 214.8 z ` ,oiiintSize2: ` M1021 . 2 53 c603 . 6 0 707.8 165.8 707.8 277.2 0 110 - 104.2 275.8
- 707.8 275.8 - 606 0 - 710.2 - 165.8 - 710.2 - 275.8 C311 218.8 415.2 53 1021.2 53 z
m770 . 4 277.1 c0 - 131.2 - 126.4 - 327.6 - 770.5 - 327.6 S248 . 4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4 s770 . 5 - 196.4 770.5 - 326.4 z ` ,rightarrow: ` M0 241 v40h399891c - 47.3 35.3 - 84 78 - 110 128
- 16.7 32 - 27.7 63.7 - 33 95 0 1.3 - . 2 2.7 - . 5 4 - . 3 1.3 - . 5 2.3 - . 5 3 0 7.3 6.7 11 20
11 8 0 13.2 - . 8 15.5 - 2.5 2.3 - 1.7 4.2 - 5.5 5.5 - 11.5 2 - 13.3 5.7 - 27 11 - 41 14.7 - 44.7
39 - 84.5 73 - 119.5 s73 . 7 - 60.2 119 - 75.5 c6 - 2 9 - 5.7 9 - 11 s - 3 - 9 - 9 - 11 c - 45.3 - 15.3 - 85
- 40.5 - 119 - 75.5 s - 58.3 - 74.8 - 73 - 119.5 c - 4.7 - 14 - 8.3 - 27.3 - 11 - 40 - 1.3 - 6.7 - 3.2 - 10.8 - 5.5
- 12.5 - 2.3 - 1.7 - 7.5 - 2.5 - 15.5 - 2.5 - 14 0 - 21 3.7 - 21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205 zm0 0 v40h399900v - 40 z ` ,rightbrace: ` M400000 542 l
- 6 6 h - 17 c - 12.7 0 - 19.3 - . 3 - 20 - 1 - 4 - 4 - 7.3 - 8.3 - 10 - 13 - 35.3 - 51.3 - 80.8 - 93.8 - 136.5 - 127.5
s - 117.2 - 55.8 - 184.5 - 66.5 c - . 7 0 - 2 - . 3 - 4 - 1 - 18.7 - 2.7 - 76 - 4.3 - 172 - 5 H0V214h399571l6 1
c124 . 7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118 l7 13 v35z ` ,rightbraceunder: ` M399994 0 l6 6 v35l - 6 11 c - 56 104 - 135.3 181.3 - 238 232 - 57.3
28.7 - 117 45 - 179 50 H - 300 V214h399897c43 . 3 - 7 81 - 15 113 - 26 100.7 - 33 179.7 - 91 237
- 174 2.7 - 5 6 - 9 10 - 13 . 7 - 1 7.3 - 1 20 - 1 h17z ` ,rightgroup: ` M0 80 h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3 - 1 3 - 3 v - 38 c - 76 - 158 - 257 - 219 - 435 - 219 H0z ` ,rightgroupunder: ` M0 262 h399565c371 0 266.7 - 149.4 414 - 180 5.9 - 1.2 18 0 18
0 2 0 3 1 3 3 v38c - 76 158 - 257 219 - 435 219 H0z ` ,rightharpoon: ` M0 241 v40h399993c4 . 7 - 4.7 7 - 9.3 7 - 14 0 - 9.3
- 3.7 - 15.3 - 11 - 18 - 92.7 - 56.7 - 159 - 133.7 - 199 - 231 - 3.3 - 9.3 - 6 - 14.7 - 8 - 16 - 2 - 1.3 - 7 - 2 - 15 - 2
- 10.7 0 - 16.7 2 - 18 6 - 2 2.7 - 1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5 zm0 0 v40h399900v - 40 z ` ,rightharpoonplus: ` M0 241 v40h399993c4 . 7 - 4.7 7 - 9.3 7 - 14 0 - 9.3 - 3.7 - 15.3 - 11
- 18 - 92.7 - 56.7 - 159 - 133.7 - 199 - 231 - 3.3 - 9.3 - 6 - 14.7 - 8 - 16 - 2 - 1.3 - 7 - 2 - 15 - 2 - 10.7 0 - 16.7
2 - 18 6 - 2 2.7 - 1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5 z
m0 0 v40h399900v - 40 z m100 194 v40h399900v - 40 zm0 0 v40h399900v - 40 z ` ,rightharpoondown: ` M399747 511 c0 7.3 6.7 11 20 11 8 0 13 - . 8 15 - 2.5 s4 . 7 - 6.8
8 - 15.5 c40 - 94 99.3 - 166.3 178 - 217 13.3 - 8 20.3 - 12.3 21 - 13 5.3 - 3.3 8.5 - 5.8 9.5
- 7.5 1 - 1.7 1.5 - 5.2 1.5 - 10.5 s - 2.3 - 10.3 - 7 - 15 H0v40h399908c - 34 25.3 - 64.7 57 - 92 95
- 27.3 38 - 48.7 77.7 - 64 119 - 3.3 8.7 - 5 14 - 5 16 zM0 241 v40h399900v - 40 z ` ,rightharpoondownplus: ` M399747 705 c0 7.3 6.7 11 20 11 8 0 13 - . 8
15 - 2.5 s4 . 7 - 6.8 8 - 15.5 c40 - 94 99.3 - 166.3 178 - 217 13.3 - 8 20.3 - 12.3 21 - 13 5.3 - 3.3
8.5 - 5.8 9.5 - 7.5 1 - 1.7 1.5 - 5.2 1.5 - 10.5 s - 2.3 - 10.3 - 7 - 15 H0v40h399908c - 34 25.3
- 64.7 57 - 92 95 - 27.3 38 - 48.7 77.7 - 64 119 - 3.3 8.7 - 5 14 - 5 16 zM0 435 v40h399900v - 40 z
m0 - 194 v40h400000v - 40 zm0 0 v40h400000v - 40 z ` ,righthook: ` M399859 241 c - 764 0 0 0 0 0 40 - 3.3 68.7 - 15.7 86 - 37 10 - 12 15 - 25.3
15 - 40 0 - 22.7 - 9.8 - 40.7 - 29.5 - 54 - 19.7 - 13.3 - 43.5 - 21 - 71.5 - 23 - 17.3 - 1.3 - 26 - 8 - 26 - 20 0
- 13.3 8.7 - 20 26 - 20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8 s - 14 61.2 - 42 83.5 c - 28 22.3 - 61 33.5 - 99 33.5 L0 241 z M0 281 v - 40 h399859v40z ` ,rightlinesegment: ` M399960 241 V94 h40 V428 h - 40 V281 H0 v - 40 z
M399960 241 V94 h40 V428 h - 40 V281 H0 v - 40 z ` ,rightToFrom: ` M400000 167 c - 70.7 - 42 - 118 - 97.7 - 142 - 167 h - 23 c - 15.3 0 - 23 . 3 - 23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101 l7 8 H0v40h399905l - 7 8 c - 28.7 32
- 52 65.7 - 70 101 - 10.7 23.3 - 16 35.7 - 16 37 0 . 7 7.7 1 23 1 h23c24 - 69.3 71.3 - 125 142
- 167 z M100 147 v40h399900v - 40 zM0 341 v40h399900v - 40 z ` ,twoheadleftarrow: ` M0 167 c68 40
115.7 95.7 143 167 h22c15 . 3 0 23 - . 3 23 - 1 0 - 1.3 - 5.3 - 13.7 - 16 - 37 - 18 - 35.3 - 41.3 - 69
- 70 - 101 l - 7 - 8 h125l9 7 c50 . 7 39.3 85 86 103 140 h46c0 - 4.7 - 6.3 - 18.7 - 19 - 42 - 18 - 35.3
- 40 - 67.3 - 66 - 96 l - 9 - 9 h399716v - 40 H284l9 - 9 c26 - 28.7 48 - 60.7 66 - 96 12.7 - 23.333 19
- 37.333 19 - 42 h - 46 c - 18 54 - 52.3 100.7 - 103 140 l - 9 7 H95l7 - 8 c28 . 7 - 32 52 - 65.7 70 - 101
10.7 - 23.333 16 - 35.7 16 - 37 0 - . 7 - 7.7 - 1 - 23 - 1 h - 22 C115 . 7 71.3 68 127 0 167 z ` ,twoheadrightarrow: ` M400000 167
c - 68 - 40 - 115.7 - 95.7 - 143 - 167 h - 22 c - 15.3 0 - 23 . 3 - 23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101 l7 8 h - 125 l - 9 - 7 c - 50.7 - 39.3 - 85 - 86 - 103 - 140 h - 46 c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96 l9 9 H0v40h399716l - 9 9 c - 26 28.7 - 48 60.7 - 66 96 - 12.7 23.333
- 19 37.333 - 19 42 h46c18 - 54 52.3 - 100.7 103 - 140 l9 - 7 h125l - 7 8 c - 28.7 32 - 52 65.7 - 70
101 - 10.7 23.333 - 16 35.7 - 16 37 0 . 7 7.7 1 23 1 h22c27 . 3 - 71.3 75 - 127 143 - 167 z ` ,tilde1: ` M200 55.538 c - 77 0 - 168 73.953 - 177 73.953 - 3 0 - 7
- 2.175 - 9 - 5.437 L2 97 c - 1 - 2 - 2 - 4 - 2 - 6 0 - 4 2 - 7 5 - 9 l20 - 12 C116 12 171 0 207 0 c86 0
114 68 191 68 78 0 168 - 68 177 - 68 4 0 7 2 9 5 l12 19 c1 2.175 2 4.35 2 6.525 0
4.35 - 2 7.613 - 5 9.788 l - 19 13.05 c - 92 63.077 - 116.937 75.308 - 183 76.128
- 68.267 . 847 - 113 - 73.952 - 191 - 73.952 z ` ,tilde2: ` M344 55.266 c - 142 0 - 300.638 81.316 - 311.5 86.418
- 8.01 3.762 - 22.5 10.91 - 23.5 5.562 L1 120 c - 1 - 2 - 1 - 3 - 1 - 4 0 - 5 3 - 9 8 - 10 l18 . 4 - 9 C160 . 9
31.9 283 0 358 0 c148 0 188 122 331 122 s314 - 97 326 - 97 c4 0 8 2 10 7 l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347 - 3 9.626 - 7 10.696 l - 22.3 12.622 C852 . 6 158.372 751
181.476 676 181.476 c - 149 0 - 189 - 126.21 - 332 - 126.21 z ` ,tilde3: ` M786 59 C457 59 32 175.242 13 175.242 c - 6 0 - 10 - 3.457
- 11 - 10.37 L . 15 138 c - 1 - 7 3 - 12 10 - 13 l19 . 2 - 6.4 C378 . 4 40.7 634.3 0 804.3 0 c337 0
411.8 157 746.8 157 328 0 754 - 112 773 - 112 5 0 10 3 11 9 l1 14.075 c1 8.066 - . 697
16.595 - 6.697 17.492 l - 21.052 7.31 c - 367.9 98.146 - 609.15 122.696 - 778.15 122.696
- 338 0 - 409 - 156.573 - 744 - 156.573 z ` ,tilde4: ` M786 58 C457 58 32 177.487 13 177.487 c - 6 0 - 10 - 3.345
- 11 - 10.035 L . 15 143 c - 1 - 7 3 - 12 10 - 13 l22 - 6.7 C381 . 2 35 637.15 0 807.15 0 c337 0 409
177 744 177 328 0 754 - 127 773 - 127 5 0 10 3 11 9 l1 14.794 c1 7.805 - 3 13.38 - 9
14.495 l - 20.7 5.574 c - 366.85 99.79 - 607.3 139.372 - 776.3 139.372 - 338 0 - 409
- 175.236 - 744 - 175.236 z ` ,vec: ` M377 20 c0 - 5.333 1.833 - 10 5.5 - 14 S391 0 397 0 c4 . 667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6 - 1 10 - 3 12 s - 6.667 5 - 14 9 c - 28.667 14.667 - 53.667 35.667 - 75 63
- 1.333 1.333 - 3.167 3.5 - 5.5 6.5 s - 4 4.833 - 5 5.5 c - 1 . 667 - 2.5 1.333 - 4.5 2 s - 4.333 1
- 7 1 c - 4.667 0 - 9.167 - 1.833 - 13.5 - 5.5 S337 184 337 178 c0 - 12.667 15.667 - 32.333 47 - 59
H213l - 171 - 1 c - 8.667 - 6 - 13 - 12.333 - 13 - 19 0 - 4.667 4.333 - 11.333 13 - 20 h359
c - 16 - 25.333 - 24 - 45 - 24 - 59 z ` ,widehat1: ` M529 0 h5l519 115 c5 1 9 5 9 10 0 1 - 1 2 - 1 3 l - 4 22
c - 1 5 - 5 9 - 11 9 h - 2 L532 67 19 159 h - 2 c - 5 0 - 9 - 4 - 11 - 9 l - 5 - 22 c - 1 - 6 2 - 12 8 - 13 z ` ,widehat2: ` M1181 0 h2l1171 176 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 220 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widehat3: ` M1181 0 h2l1171 236 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 280 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widehat4: ` M1181 0 h2l1171 296 c6 0 10 5 10 11 l - 2 23 c - 1 6 - 5 10
- 11 10 h - 1 L1182 67 15 340 h - 1 c - 6 0 - 10 - 4 - 11 - 10 l - 2 - 23 c - 1 - 6 4 - 11 10 - 11 z ` ,widecheck1: ` M529 , 159 h5l519 , - 115 c5 , - 1 , 9 , - 5 , 9 , - 10 c0 , - 1 , - 1 , - 2 , - 1 , - 3 l - 4 , - 22 c - 1 ,
- 5 , - 5 , - 9 , - 11 , - 9 h - 2 l - 512 , 92 l - 513 , - 92 h - 2 c - 5 , 0 , - 9 , 4 , - 11 , 9 l - 5 , 22 c - 1 , 6 , 2 , 12 , 8 , 13 z ` ,widecheck2: ` M1181 , 220 h2l1171 , - 176 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 153 l - 1167 , - 153 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,widecheck3: ` M1181 , 280 h2l1171 , - 236 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 213 l - 1167 , - 213 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,widecheck4: ` M1181 , 340 h2l1171 , - 296 c6 , 0 , 10 , - 5 , 10 , - 11 l - 2 , - 23 c - 1 , - 6 , - 5 , - 10 ,
- 11 , - 10 h - 1 l - 1168 , 273 l - 1167 , - 273 h - 1 c - 6 , 0 , - 10 , 4 , - 11 , 10 l - 2 , 23 c - 1 , 6 , 4 , 11 , 10 , 11 z ` ,baraboveleftarrow: ` M400000 620 h - 399890 l3 - 3 c68 . 7 - 52.7 113.7 - 120 135 - 202
c4 - 14.7 6 - 23 6 - 25 c0 - 7.3 - 7 - 11 - 21 - 11 c - 8 0 - 13.2 0.8 - 15.5 2.5
c - 2.3 1.7 - 4.2 5.8 - 5.5 12.5 c - 1.3 4.7 - 2.7 10.3 - 4 17 c - 12 48.7 - 34.8 92 - 68.5 130
s - 74.2 66.3 - 121.5 85 c - 10 4 - 16 7.7 - 18 11 c0 8.7 6 14.3 18 17 c47 . 3 18.7 87.8 47
121.5 85 s56 . 5 81.3 68.5 130 c0 . 7 2 1.3 5 2 9 s1 . 2 6.7 1.5 8 c0 . 3 1.3 1 3.3 2 6
s2 . 2 4.5 3.5 5.5 c1 . 3 1 3.3 1.8 6 2.5 s6 1 10 1 c14 0 21 - 3.7 21 - 11
c0 - 2 - 2 - 10.3 - 6 - 25 c - 20 - 79.3 - 65 - 146.7 - 135 - 202 l - 3 - 3 h399890z
M100 620 v40h399900v - 40 z M0 241 v40h399900v - 40 zM0 241 v40h399900v - 40 z ` ,rightarrowabovebar: ` M0 241 v40h399891c - 47.3 35.3 - 84 78 - 110 128 - 16.7 32
- 27.7 63.7 - 33 95 0 1.3 - . 2 2.7 - . 5 4 - . 3 1.3 - . 5 2.3 - . 5 3 0 7.3 6.7 11 20 11 8 0
13.2 - . 8 15.5 - 2.5 2.3 - 1.7 4.2 - 5.5 5.5 - 11.5 2 - 13.3 5.7 - 27 11 - 41 14.7 - 44.7 39
- 84.5 73 - 119.5 s73 . 7 - 60.2 119 - 75.5 c6 - 2 9 - 5.7 9 - 11 s - 3 - 9 - 9 - 11 c - 45.3 - 15.3 - 85 - 40.5
- 119 - 75.5 s - 58.3 - 74.8 - 73 - 119.5 c - 4.7 - 14 - 8.3 - 27.3 - 11 - 40 - 1.3 - 6.7 - 3.2 - 10.8 - 5.5
- 12.5 - 2.3 - 1.7 - 7.5 - 2.5 - 15.5 - 2.5 - 14 0 - 21 3.7 - 21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205 zm96 379 h399894v40H0zm0 0 h399904v40H0z ` ,baraboveshortleftharpoon: ` M507 , 435 c - 4 , 4 , - 6.3 , 8.7 , - 7 , 14 c0 , 5.3 , 0.7 , 9 , 2 , 11
c1 . 3 , 2 , 5.3 , 5.3 , 12 , 10 c90 . 7 , 54 , 156 , 130 , 196 , 228 c3 . 3 , 10.7 , 6.3 , 16.3 , 9 , 17
c2 , 0.7 , 5 , 1 , 9 , 1 c0 , 0 , 5 , 0 , 5 , 0 c10 . 7 , 0 , 16.7 , - 2 , 18 , - 6 c2 , - 2.7 , 1 , - 9.7 , - 3 , - 21
c - 32 , - 87.3 , - 82.7 , - 157.7 , - 152 , - 211 c0 , 0 , - 3 , - 3 , - 3 , - 3 l399351 , 0 l0 , - 40
c - 398570 , 0 , - 399437 , 0 , - 399437 , 0 z M593 435 v40 H399500 v - 40 z
M0 281 v - 40 H399908 v40z M0 281 v - 40 H399908 v40z ` ,rightharpoonaboveshortbar: ` M0 , 241 l0 , 40 c399126 , 0 , 399993 , 0 , 399993 , 0
c4 . 7 , - 4.7 , 7 , - 9.3 , 7 , - 14 c0 , - 9.3 , - 3.7 , - 15.3 , - 11 , - 18 c - 92.7 , - 56.7 , - 159 , - 133.7 , - 199 ,
- 231 c - 3.3 , - 9.3 , - 6 , - 14.7 , - 8 , - 16 c - 2 , - 1.3 , - 7 , - 2 , - 15 , - 2 c - 10.7 , 0 , - 16.7 , 2 , - 18 , 6
c - 2 , 2.7 , - 1 , 9.7 , 3 , 21 c15 . 3 , 42 , 36.7 , 81.8 , 64 , 119.5 c27 . 3 , 37.7 , 58 , 69.2 , 92 , 94.5 z
M0 241 v40 H399908 v - 40 z M0 475 v - 40 H399500 v40z M0 475 v - 40 H399500 v40z ` ,shortbaraboveleftharpoon: ` M7 , 435 c - 4 , 4 , - 6.3 , 8.7 , - 7 , 14 c0 , 5.3 , 0.7 , 9 , 2 , 11
c1 . 3 , 2 , 5.3 , 5.3 , 12 , 10 c90 . 7 , 54 , 156 , 130 , 196 , 228 c3 . 3 , 10.7 , 6.3 , 16.3 , 9 , 17 c2 , 0.7 , 5 , 1 , 9 ,
1 c0 , 0 , 5 , 0 , 5 , 0 c10 . 7 , 0 , 16.7 , - 2 , 18 , - 6 c2 , - 2.7 , 1 , - 9.7 , - 3 , - 21 c - 32 , - 87.3 , - 82.7 , - 157.7 ,
- 152 , - 211 c0 , 0 , - 3 , - 3 , - 3 , - 3 l399907 , 0 l0 , - 40 c - 399126 , 0 , - 399993 , 0 , - 399993 , 0 z
M93 435 v40 H400000 v - 40 z M500 241 v40 H400000 v - 40 z M500 241 v40 H400000 v - 40 z ` ,shortrightharpoonabovebar: ` M53 , 241 l0 , 40 c398570 , 0 , 399437 , 0 , 399437 , 0
c4 . 7 , - 4.7 , 7 , - 9.3 , 7 , - 14 c0 , - 9.3 , - 3.7 , - 15.3 , - 11 , - 18 c - 92.7 , - 56.7 , - 159 , - 133.7 , - 199 ,
- 231 c - 3.3 , - 9.3 , - 6 , - 14.7 , - 8 , - 16 c - 2 , - 1.3 , - 7 , - 2 , - 15 , - 2 c - 10.7 , 0 , - 16.7 , 2 , - 18 , 6
c - 2 , 2.7 , - 1 , 9.7 , 3 , 21 c15 . 3 , 42 , 36.7 , 81.8 , 64 , 119.5 c27 . 3 , 37.7 , 58 , 69.2 , 92 , 94.5 z
M500 241 v40 H399408 v - 40 z M500 435 v40 H400000 v - 40 z ` },MS=function(e,n){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+ ` v1759 h347 v - 84
H403z M403 1759 V0 H319 V1759 v ` +n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+ ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v ` +n+" v1759 h84z";case"vert":return"M145 15 v585 v"+n+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-n+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M188 15 H145 v585 v ` +n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-n+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M188 15 H145 v585 v ` +n+ ` v585 h43z
M367 15 v585 v ` +n+ ` v585 c2 . 667 , 10 , 9.667 , 15 , 21 , 15
c10 , 0 , 16.667 , - 5 , 20 , - 15 v - 585 v ` +-n+ ` v - 585 c - 2.667 , - 10 , - 9.667 , - 15 , - 21 , - 15
c - 10 , 0 , - 16.667 , 5 , - 20 , 15 z M410 15 H367 v585 v ` +n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+ ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v ` +n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+ ` v1799 H0 v - 84 H319z
MM319 602 V0 H403 V602 v ` +n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+ ` v602 h84z
M403 1759 V0 H319 V1759 v ` +n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+ ` v602 h84z
M347 1759 V0 h - 84 V1759 v ` +n+" v602 h84z";case"lparen":return ` M863 , 9 c0 , - 2 , - 2 , - 5 , - 6 , - 9 c0 , 0 , - 17 , 0 , - 17 , 0 c - 12.7 , 0 , - 19.3 , 0.3 , - 20 , 1
c - 5.3 , 5.3 , - 10.3 , 11 , - 15 , 17 c - 242.7 , 294.7 , - 395.3 , 682 , - 458 , 1162 c - 21.3 , 163.3 , - 33.3 , 349 ,
- 36 , 557 l0 , ` +(n+84)+ ` c0 . 2 , 6 , 0 , 26 , 0 , 60 c2 , 159.3 , 10 , 310.7 , 24 , 454 c53 . 3 , 528 , 210 ,
949.7 , 470 , 1265 c4 . 7 , 6 , 9.7 , 11.7 , 15 , 17 c0 . 7 , 0.7 , 7 , 1 , 19 , 1 c0 , 0 , 18 , 0 , 18 , 0 c4 , - 4 , 6 , - 7 , 6 , - 9
c0 , - 2.7 , - 3.3 , - 8.7 , - 10 , - 18 c - 135.3 , - 192.7 , - 235.5 , - 414.3 , - 300.5 , - 665 c - 65 , - 250.7 , - 102.5 ,
- 544.7 , - 112.5 , - 882 c - 2 , - 104 , - 3 , - 167 , - 3 , - 189
l0 , - ` +(n+92)+ ` c0 , - 162.7 , 5.7 , - 314 , 17 , - 454 c20 . 7 , - 272 , 63.7 , - 513 , 129 , - 723 c65 . 3 ,
- 210 , 155.3 , - 396.3 , 270 , - 559 c6 . 7 , - 9.3 , 10 , - 15.3 , 10 , - 18 z ` ;case"rparen":return ` M76 , 0 c - 16.7 , 0 , - 25 , 3 , - 25 , 9 c0 , 2 , 2 , 6.3 , 6 , 13 c21 . 3 , 28.7 , 42.3 , 60.3 ,
63 , 95 c96 . 7 , 156.7 , 172.8 , 332.5 , 228.5 , 527.5 c55 . 7 , 195 , 92.8 , 416.5 , 111.5 , 664.5
c11 . 3 , 139.3 , 17 , 290.7 , 17 , 454 c0 , 28 , 1.7 , 43 , 3.3 , 45 l0 , ` +(n+9)+ `
c - 3 , 4 , - 3.3 , 16.7 , - 3.3 , 38 c0 , 162 , - 5.7 , 313.7 , - 17 , 455 c - 18.7 , 248 , - 55.8 , 469.3 , - 111.5 , 664
c - 55.7 , 194.7 , - 131.8 , 370.3 , - 228.5 , 527 c - 20.7 , 34.7 , - 41.7 , 66.3 , - 63 , 95 c - 2 , 3.3 , - 4 , 7 , - 6 , 11
c0 , 7.3 , 5.7 , 11 , 17 , 11 c0 , 0 , 11 , 0 , 11 , 0 c9 . 3 , 0 , 14.3 , - 0.3 , 15 , - 1 c5 . 3 , - 5.3 , 10.3 , - 11 , 15 , - 17
c242 . 7 , - 294.7 , 395.3 , - 681.7 , 458 , - 1161 c21 . 3 , - 164.7 , 33.3 , - 350.7 , 36 , - 558
l0 , - ` +(n+144)+ ` c - 2 , - 159.3 , - 10 , - 310.7 , - 24 , - 454 c - 53.3 , - 528 , - 210 , - 949.7 ,
- 470 , - 1265 c - 4.7 , - 6 , - 9.7 , - 11.7 , - 15 , - 17 c - 0.7 , - 0.7 , - 6.7 , - 1 , - 18 , - 1 z ` ;default:throw new Error("Unknown stretchy delimiter.")}};class Xl{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 xt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var ji={"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,.755
` +z+" children.");for(var te=0;te<z;te++){var ce=new no(A[te]),Me=new Ca([ce],{width:"400em",height:ot(N),viewBox:"0 0 "+c+" "+y,preserveAspectRatio:P[te]+" slice"}),Fe=Ee.makeSvgSpan([F[te]],[Me],n);if(z===1)return{span:Fe,minWidth:M,height:N};Fe.style.height=ot(N),C.push(Fe)}return{span:Ee.makeSpan(["stretchy"],C,n),minWidth:M,height:N}}}var{span:o,minWidth:l,height:h}=r();return o.height=h,o.style.height=ot(h),l>0&&(o.style.minWidth=ot(l)),o},hE=function(e,n,r,o,l){var h,c=e.height+e.depth+r+o;if(/fbox|color|angl/.test(n)){if(h=Ee.makeSpan(["stretchy",n],[],l),n==="fbox"){var p=l.color&&l.getColor();p&&(h.style.borderColor=p)}}else{var v=[];/^[bx]cancel $ /.test(n)&&v.push(new pp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel $ /.test(n)&&v.push(new pp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var b=new Ca(v,{width:"100%",height:ot(c)});h=Ee.makeSvgSpan([],[b],l)}return h.height=c,h.style.height=ot(c),h},_a={encloseSpan:hE,mathMLnode:lE,svgSpan:dE};function qt(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function a1(t){var e=tu(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function tu(t){return t&&(t.type==="atom"||PS.hasOwnProperty(t.type))?t:null}var o1=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=qt(t.base,"accent"),n=r.base,t.base=n,o=OS(Yt(t,e)),t.base=r):(r=qt(t,"accent"),n=r.base);var l=Yt(n,e.havingCrampedStyle()),h=r.isShifty&&xt.isCharacterBox(n),c=0;if(h){var p=xt.getBaseElem(n),v=Yt(p,e.havingCrampedStyle());c=wg(v).skew}var b=r.label===" \\ c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=_a.svgSpan(r,e),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+ot(2*c)+")",marginLeft:ot(2*c)}:void 0}]},e);else{var x,w;r.label===" \\ vec"?(x=Ee.staticSvg("vec",e),w=Ee.svgData.vec[1]):(x=Ee.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=wg(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Ee.makeSpan(["accent-body"],[x]);var S=r.label===" \\ textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=ot(k),r.label===" \\ textcircled"&&(m.style.top=".2em"),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Ee.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},O3=(t,e)=>{var n=t.isStretchy?_a.mathMLnode(t.label):new Ye.MathNode("mo",[ui(t.label,t.mode)]),r=new Ye.MathNode("mover",[bn(t.base,e),n]);return r.setAttribute("accent","true"),r},pE=new RegExp([" \\ acute"," \\ grave"," \\ ddot"," \\ tilde"," \\ bar"," \\ breve"," \\ check"," \\ hat"," \\ vec"," \\ dot"," \\ mathring"].map(t=>" \\ "+t).join("|"));ht({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:(t,e)=>{var n=kc(e[0]),r=!pE.test(t.funcName),o=!r||t.funcName===" \\ widehat"||t.funcName===" \\ widetilde"||t.funcName===" \\ widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:o1,mathmlBuilder:O3});ht({type:"accent",names:[" \\ '"," \\ ` "," \ \ ^ "," \ \ ~ "," \ \ = "," \ \ u "," \ \ . ",'\\" ',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX' s accent "+t.funcName+" works only in text mode "),r=" text "),{type:" accent ",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:o1,mathmlBuilder:O3});ht({type:" accentUnder ",names:[" \ \ underle
] ` ,FE=" \\ \\ [a-zA-Z@]+",qE=" \\ \\ [^ \u D800- \u DFFF]",jE="("+FE+")"+l2+"*", $ E= ` \ \ \ \ (
| [ \ r ] +
? ) [ \ r ] * ` ,yp="[̀-ͯ]",UE=new RegExp(yp+"+ $ "),VE="("+l2+"+)|"+( $ E+"|")+"([!- \\ [ \\ ]-‧-豈-]"+(yp+"*")+"|[ \u D800- \u DBFF][ \u DC00- \u DFFF]"+(yp+"*")+"| \\ \\ verb \\ *([^]).*? \\ 4| \\ \\ verb([^*a-zA-Z]).*? \\ 5"+("|"+jE)+("|"+qE+")");class Vg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(VE,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new ai("EOF",new $ r(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new Qe("Unexpected character: '"+e[n]+"'",new ai(e[n],new $ r(this,n,n+1)));var o=r[6]||r[3]||(r[2]?" \\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf( `
` ,this.tokenRegex.lastIndex);return l===-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=l+1,this.lex()}return new ai(o,new $ r(this,n,this.tokenRegex.lastIndex))}}class WE{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Qe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}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,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var GE=Y3;W(" \\ noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});W(" \\ expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});W(" \\ @firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});W(" \\ @secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});W(" \\ @ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});W(" \\ @ifstar"," \\ @ifnextchar *{ \\ @firstoftwo{#1}}");W(" \\ TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Wg={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};W(" \\ char",function(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text===" ` ")if(e=t.popToken(),e.text[0]===" \ \ ")r=e.text.charCodeAt(1);else{if(e.text===" EOF ")throw new Qe(" \ \ char ` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=Wg[e.text],r==null||r>=n)throw new Qe("Invalid base-"+n+" digit "+e.text);for(var o;(o=Wg[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return" \\ @char{"+r+"}"});var f1=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new Qe(" \\ newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new Qe(" \\ newcommand{"+l+"} attempting to redefine "+(l+"; use \\ renewcommand"));if(!h&&!n)throw new Qe(" \\ renewcommand{"+l+"} when command "+l+" does not yet exist; use \\ newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^ \s *[0-9]+ \s * $ /))throw new Qe("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};W(" \\ newcommand",t=>f1(t,!1,!0,!1));W(" \\ renewcommand",t=>f1(t,!0,!1,!1));W(" \\ providecommand",t=>f1(t,!0,!0,!0));W(" \\ message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});W(" \\ errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});W(" \\ show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Ga[n],xn.math[n],xn.text[n]),""});W(" \\ bgroup","{");W(" \\ egroup","}");W("~"," \\ nobreakspace");W(" \\ lq"," ` ");W(" \ \ rq "," ' ");W(" \ \ aa "," \ \ r a ");W(" \ \ AA "," \ \ r A ");W(" \ \ textcopyright "," \ \ html @ mathml { \ \ textcircled { c } } { \ \ char ` ©}");W(" \\ copyright"," \\ TextOrMath{
please report what input caused this bug ` );return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}Xg.hasOwnProperty(n[0])&&!xn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=Xg[n[0]]+n.slice(1));var l=UE.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı ":n==="j"&&(n="ȷ"));var h;if(xn[this.mode][n]){this.settings.strict&&this.mode==="math"&&fp.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=xn[this.mode][n].group,p= $ r.range(e),v;if(HS.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(w3(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc: $ r.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!Sh[m])throw new Qe("Unknown accent ' "+m+"'",e);var x=Sh[m][this.mode]||Sh[m].text;if(!x)throw new Qe("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc: $ r.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}au.endOfExpression=["}"," \\ endgroup"," \\ end"," \\ right","&"];var g1=function(e,n){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new au(e,n);delete r.gullet.macros.current[" \\ df@tag"];var o=r.parse();if(delete r.gullet.macros.current[" \\ current@color"],delete r.gullet.macros.current[" \\ color"],r.gullet.macros.get(" \\ df@tag")){if(!n.displayMode)throw new Qe(" \\ tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new ai(" \\ df@tag")])}]}return o},h2=function(e,n,r){n.textContent="";var o=v1(e,r).toNode();n.appendChild(o)};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."),h2=function(){throw new Qe("KaTeX doesn't work in quirks mode.")});var XE=function(e,n){var r=v1(e,n).toMarkup();return r},ZE=function(e,n){var r=new Jf(n);return g1(e,r)},p2=function(e,n,r){if(r.throwOnError||!(e instanceof Qe))throw e;var o=Ee.makeSpan(["katex-error"],[new ci(n)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},v1=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return aE(o,e,r)}catch(l){return p2(l,e,r)}},YE=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return oE(o,e,r)}catch(l){return p2(l,e,r)}},JE="0.16.22",QE={Span:Zl,Anchor:t1,SymbolNode:ci,SvgNode:Ca,PathNode:no,LineNode:pp},Zg={version:JE,render:h2,renderToString:XE,ParseError:Qe,SETTINGS_SCHEMA:B0,__parse:ZE,__renderToDomTree:v1,__renderToHTMLTree:YE,__setFontMetrics:CS,__defineSymbol:I,__defineFunction:ht,__defineMacro:W,__domTree:QE};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^ $ \w \x A0- \u FFFF])(?! \s )[_ $ A-Z \x A0- \u FFFF](?:(?! \s )[ $ \w \x A0- \u FFFF])*(?= \. (?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^| \} ) \s *)catch \b /,lookbehind:!0},{pattern:/(^|[^.]| \. \. \. \s *) \b (?:as|assert(?= \s * \{ )|async(?= \s *(?:function \b | \( |[ $ \w \x A0- \u FFFF]| $ ))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?= \s *(?: \{ | $ ))|for|from(?= \s *(?:['"]| $ ))|function|(?:get|set)(?= \s *(?:[# \[ $ \w \x A0- \u FFFF]| $ ))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield) \b /,lookbehind:!0}],function:/#?(?! \s )[_ $ a-zA-Z \x A0- \u FFFF](?:(?! \s )[ $ \w \x A0- \u FFFF])*(?= \s *(?: \.
` );let n=!1,r=!1;for(const h of e){const c=h.trim();c.includes("|")&&c.split("|").length>=3&&(n=!0),c.includes("|")&&c.includes("-")&&/^[ \s \| \- \: ]+ $ /.test(c)&&(r=!0)}const o=(t.match(/ \| /g)||[]).length,l=o>=6;return n&&r||n&&l||n&&o>=4},rT=t=>!t||typeof t!="string"?!1:nT(t)?!0:[/#{1,6} \s +/,/ \* \* .*? \* \* /,/ \* .*? \* /,/ ` . * ? ` /,/ ` ` ` [ \ s \ S ] * ? ` ` ` /,/^ \s *[-*+] \s +/m,/^ \s * \d + \. \s +/m,/ \[ .*? \] \( .*? \) /,/! \[ .*? \] \( .*? \) /,/ \$ \$ .*? \$ \$ /,/ \$ .*? \$ /].some(n=>n.test(t)),ul=t=>{if(!t||typeof t!="string")return t||"";const e=rT(t),n=t.includes("|")&&t.includes("-");return e||n?(console.log("🎯 同步渲染Markdown内容"),m2(t)):t};function g2(t,e){return function(){return t.apply(e,arguments)}}const{toString:iT}=Object.prototype,{getPrototypeOf:b1}=Object,{iterator:ou,toStringTag:v2}=Symbol,su=(t=>e=>{const n=iT.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ei=t=>(t=t.toLowerCase(),e=>su(e)===t),lu=t=>e=>typeof e===t,{isArray:gs}=Array,zl=lu("undefined");function Jl(t){return t!==null&&!zl(t)&&t.constructor!==null&&!zl(t.constructor)&&Nr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const b2=Ei("ArrayBuffer");function aT(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&b2(t.buffer),e}const oT=lu("string"),Nr=lu("function"),y2=lu("number"),Ql=t=>t!==null&&typeof t=="object",sT=t=>t===!0||t===!1,q0=t=>{if(su(t)!=="object")return!1;const e=b1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(v2 in t)&&!(ou in t)},lT=t=>{if(!Ql(t)||Jl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},cT=Ei("Date"),uT=Ei("File"),dT=Ei("Blob"),hT=Ei("FileList"),pT=t=>Ql(t)&&Nr(t.pipe),fT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Nr(t.append)&&((e=su(t))==="formdata"||e==="object"&&Nr(t.toString)&&t.toString()==="[object FormData]"))},mT=Ei("URLSearchParams"),[gT,vT,bT,yT]=["ReadableStream","Request","Response","Headers"].map(Ei),wT=t=>t.trim?t.trim():t.replace(/^[ \s \u FEFF \x A0]+|[ \s \u FEFF \x A0]+ $ /g,"");function e0(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),gs(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Jl(t))return;const l=n?Object.getOwnPropertyNames(t):Object.keys(t),h=l.length;let c;for(r=0;r<h;r++)c=l[r],e.call(null,t[c],c,t)}}function w2(t,e){if(Jl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const _o=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),x2=t=>!zl(t)&&t!==_o;function wp(){const{caseless:t}=x2(this)&&this||{},e={},n=(r,o)=>{const l=t&&w2(e,o)||o;q0(e[l])&&q0(r)?e[l]=wp(e[l],r):q0(r)?e[l]=wp({},r):gs(r)?e[l]=r.slice():e[l]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&e0(arguments[r],n);return e}const xT=(t,e,n,{allOwnKeys:r}={})=>(e0(e,(o,l)=>{n&&Nr(o)?t[l]=g2(o,n):t[l]=o},{allOwnKeys:r}),t),kT=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ST=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ET=(t,e,n,r)=>{let o,l,h;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)h=o[l],(!r||r(h,t,e))&&!c[h]&&(e[h]=t[h],c[h]=!0);t=n!==!1&&b1(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},TT=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},AT=t=>{if(!t)return null;if(gs(t))return t;let e=t.length;if(!y2(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},MT=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&b1(Uint8Array)),CT=(t,e)=>{const r=(t&&t[ou]).call(t);let o;for(;(o=r.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},LT=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},_T=Ei("HTMLFormElement"),NT=t=>t.toLowerCase().replace(/[-_ \s ]([a-z \d ])( \w *)/g,function(n,r,o
` ).forEach(function(h){o=h.indexOf(":"),n=h.substring(0,o).trim().toLowerCase(),r=h.substring(o+1).trim(),!(!n||e[n]&&oA[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},t4=Symbol("internals");function dl(t){return t&&String(t).trim().toLowerCase()}function j0(t){return t===!1||t==null?t:_e.isArray(t)?t.map(j0):String(t)}function lA(t){const e=Object.create(null),n=/([^ \s ,;=]+) \s *(?:= \s *([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cA=t=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( t . trim ( ) ) ; function Eh ( t , e , n , r , o ) { if ( _e . isFunction ( r ) ) return r . call ( this , e , n ) ; if ( o && ( e = n ) , ! ! _e . isString ( e ) ) { if ( _e . isString ( r ) ) return e . indexOf ( r ) !== - 1 ; if ( _e . isRegExp ( r ) ) return r . test ( e ) } } function uA ( t ) { return t . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( e , n , r ) => n . toUpperCase ( ) + r ) } function dA ( t , e ) { const n = _e . toCamelCase ( " " + e ) ; [ "get" , "set" , "has" ] . forEach ( r => { Object . defineProperty ( t , r + n , { value : function ( o , l , h ) { return this [ r ] . call ( this , e , o , l , h ) } , configurable : ! 0 } ) } ) } class uu { constructor ( e ) { e && this . set ( e ) } set ( e , n , r ) { const o = this ; function l ( c , p , v ) { const b = dl ( p ) ; if ( ! b ) throw new Error ( "header name must be a non-empty string" ) ; const g = _e . findKey ( o , b ) ; ( ! g || o [ g ] === void 0 || v === ! 0 || v === void 0 && o [ g ] !== ! 1 ) && ( o [ g || p ] = j0 ( c ) ) } const h = ( c , p ) => _e . forEach ( c , ( v , b ) => l ( v , b , p ) ) ; if ( _e . isPlainObject ( e ) || e instanceof this . constructor ) h ( e , n ) ; else if ( _e . isString ( e ) && ( e = e . trim ( ) ) && ! cA ( e ) ) h ( sA ( e ) , n ) ; else if ( _e . isObject ( e ) && _e . isIterable ( e ) ) { let c = { } , p , v ; for ( const b of e ) { if ( ! _e . isArray ( b ) ) throw TypeError ( "Object iterator must return a key-value pair" ) ; c [ v = b [ 0 ] ] = ( p = c [ v ] ) ? _e . isArray ( p ) ? [ ... p , b [ 1 ] ] : [ p , b [ 1 ] ] : b [ 1 ] } h ( c , n ) } else e != null && l ( n , e , r ) ; return this } get ( e , n ) { if ( e = dl ( e ) , e ) { const r = _e . findKey ( this , e ) ; if ( r ) { const o = this [ r ] ; if ( ! n ) return o ; if ( n === ! 0 ) return lA ( o ) ; if ( _e . isFunction ( n ) ) return n . call ( this , o , r ) ; if ( _e . isRegExp ( n ) ) return n . exec ( o ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( e , n ) { if ( e = dl ( e ) , e ) { const r = _e . findKey ( this , e ) ; return ! ! ( r && this [ r ] !== void 0 && ( ! n || Eh ( this , this [ r ] , r , n ) ) ) } return ! 1 } delete ( e , n ) { const r = this ; let o = ! 1 ; function l ( h ) { if ( h = dl ( h ) , h ) { const c = _e . findKey ( r , h ) ; c && ( ! n || Eh ( r , r [ c ] , c , n ) ) && ( delete r [ c ] , o = ! 0 ) } } return _e . isArray ( e ) ? e . forEach ( l ) : l ( e ) , o } clear ( e ) { const n = Object . keys ( this ) ; let r = n . length , o = ! 1 ; for ( ; r -- ; ) { const l = n [ r ] ; ( ! e || Eh ( this , this [ l ] , l , e , ! 0 ) ) && ( delete this [ l ] , o = ! 0 ) } return o } normalize ( e ) { const n = this , r = { } ; return _e . forEach ( this , ( o , l ) => { const h = _e . findKey ( r , l ) ; if ( h ) { n [ h ] = j0 ( o ) , delete n [ l ] ; return } const c = e ? uA ( l ) : String ( l ) . trim ( ) ; c !== l && delete n [ l ] , n [ c ] = j0 ( o ) , r [ c ] = ! 0 } ) , this } concat ( ... e ) { return this . constructor . concat ( this , ... e ) } toJSON ( e ) { const n = Object . create ( null ) ; return _e . forEach ( this , ( r , o ) => { r != null && r !== ! 1 && ( n [ o ] = e && _e . isArray ( r ) ? r . join ( ", " ) : r ) } ) , n } [ Symbol . iterator ] ( ) { return Object . entries ( this . toJSON ( ) ) [ Symbol . iterator ] ( ) } toString ( ) { return Object . entries ( this . toJSON ( ) ) . map ( ( [ e , n ] ) => e + ": " + n ) . join ( `
` )}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[t4]=this[t4]={accessors:{}}).accessors,o=this.prototype;function l(h){const c=dl(h);r[c]||(dA(o,h),r[c]=!0)}return _e.isArray(e)?e.forEach(l):l(e),this}}uu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(uu.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_e.freezeMethods(uu);const Si=uu;function Th(t,e){const n=this||k1,r=e||n,o=Si.from(r.headers);let l=r.data;return _e.forEach(t,function(c){l=c.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function N2(t){return!!(t&&t.__CANCEL__)}function vs(t,e,n){Pt.call(this,t??"canceled",Pt.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(vs,Pt,{__CANCEL__:!0});function D2(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Pt("Request failed with status code "+n.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hA(t){const e=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(t);return e&&e[1]||""}function pA(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,l=0,h;return e=e!==void 0?e:1e3,function(p){const v=Date.now(),b=r[l];h||(h=v),n[o]=p,r[o]=v;let g=l,m=0;for(;g!==o;)m+=n[g++],g=g%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),v-h<e)return;const x=b&&v-b;return x?Math.round(m*1e3/x):void 0}}function fA(t,e){let n=0,r=1e3/e,o,l;const h=(v,b=Date.now())=>{n=b,o=null,l&&(clearTimeout(l),l=null),t(...v)};return[(...v)=>{const b=Date.now(),g=b-n;g>=r?h(v,b):(o=v,l||(l=setTimeout(()=>{l=null,h(o)},r-g)))},()=>o&&h(o)]}const Sc=(t,e,n=3)=>{let r=0;const o=pA(50,250);return fA(l=>{const h=l.loaded,c=l.lengthComputable?l.total:void 0,p=h-r,v=o(p),b=h<=c;r=h;const g={loaded:h,total:c,progress:c?h/c:void 0,bytes:p,rate:v||void 0,estimated:v&&c&&b?(c-h)/v:void 0,event:l,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},n4=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},r4=t=>(...e)=>_e.asap(()=>t(...e)),mA=pr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,pr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,gA=pr.hasStandardBrowserEnv?{write(t,e,n,r,o,l){const h=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&h.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&h.push("path="+r),_e.isString(o)&&h.push("domain="+o),l===!0&&h.push("secure"),document.cookie=h.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|; \\ s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vA(t){return/^([a-z][a-z \d + \- .]*:)? \/ \/ /i.test(t)}function bA(t,e){return e?t.replace(/ \/ ? \/ $ /,"")+"/"+e.replace(/^ \/ +/,""):t}function R2(t,e,n){let r=!vA(e);return t&&(r||n==!1)?bA(t,e):e}const i4=t=>t instanceof Si?{...t}:t;function Ho(t,e){e=e||{};const n={};function r(v,b,g,m){return _e.isPlainObject(v)&&_e.isPlainObject(b)?_e.merge.call({caseless:m},v,b):_e.isPlainObject(b)?_e.merge({},b):_e.isArray(b)?b.slice():b}function o(v,b,g,m){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v,g,m)}else return r(v,b,g,m)}function l(v,b){if(!_e.isUndefined(b))return r(void 0,b)}function h(v,b){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v)}else return r(void 0,b)}function c(v,b,g){if(g in e)return r(v,b);if(g in t)return r(void 0,v)}const p={url:l,method:l,data:l,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:
` +l.map(s4).join( `
` ):" "+s4(l[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:Ep};function Ah(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vs(null,t)}function l4(t){return Ah(t),t.headers=Si.from(t.headers),t.data=Th.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),P2.getAdapter(t.adapter||k1.adapter)(t).then(function(r){return Ah(t),r.data=Th.call(t,t.transformResponse,r),r.headers=Si.from(r.headers),r},function(r){return N2(r)||(Ah(t),r&&r.response&&(r.response.data=Th.call(t,t.transformResponse,r.response),r.response.headers=Si.from(r.response.headers))),Promise.reject(r)})}const z2="1.11.0",hu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{hu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const c4={};hu.transitional=function(e,n,r){function o(l,h){return"[Axios v"+z2+"] Transitional option '"+l+"'"+h+(r?". "+r:"")}return(l,h,c)=>{if(e===!1)throw new Pt(o(h," has been removed"+(n?" in "+n:"")),Pt.ERR_DEPRECATED);return n&&!c4[h]&&(c4[h]=!0,console.warn(o(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,h,c):!0}};hu.spelling=function(e){return(n,r)=>(console.warn( ` $ { r } is likely a misspelling of $ { e } ` ),!0)};function DA(t,e,n){if(typeof t!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const l=r[o],h=e[l];if(h){const c=t[l],p=c===void 0||h(c,l,t);if(p!==!0)throw new Pt("option "+l+" must be "+p,Pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pt("Unknown option "+l,Pt.ERR_BAD_OPTION)}}const $ 0={assertOptions:DA,validators:hu},Di= $ 0.validators;class Tc{constructor(e){this.defaults=e||{},this.interceptors={request:new e4,response:new e4}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=o.stack?o.stack.replace(/^.+ \n /,""):"";try{r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+ \n .+ \n /,""))&&(r.stack+= `
` +l):r.stack=l}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ho(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:l}=n;r!==void 0&& $ 0.assertOptions(r,{silentJSONParsing:Di.transitional(Di.boolean),forcedJSONParsing:Di.transitional(Di.boolean),clarifyTimeoutError:Di.transitional(Di.boolean)},!1),o!=null&&(_e.isFunction(o)?n.paramsSerializer={serialize:o}: $ 0.assertOptions(o,{encode:Di.function,serialize:Di.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0), $ 0.assertOptions(n,{baseUrl:Di.spelling("baseURL"),withXsrfToken:Di.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=l&&_e.merge(l.common,l[n.method]);l&&_e.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=Si.concat(h,l);const c=[];let p=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(p=p&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const v=[];this.interceptors.response.forEach(function(S){v.push(S.fulfilled,S.rejected)});let b,g=0,m;if(!p){const w=[l4.bind(this),void 0];for(w.unshift(...c),w.push(...v),m=w.length,b=Promise.resolve(n);g<m;)b=b.then(w[g++],w[g++]);return b}m=c.length;let x=n;for(g=0;g<m;){const w=c[g++],S=c[g++];try{x=w(x)}catch(k){S.call(this,k);break}}try{b=l4.call(this,x)}catch(w){return Promise.reject(w)}for(g=0,m=v.length;g<m;)b=b.then(v[g++],v[g++]);return b}getUri(e){e=Ho(this.defaults,e);const n=R2(e.baseURL,e.url,e.allowAbsoluteUrls);return C2(n,e.params,e.paramsSerializer)}}_e.forEach(["delete","get","head","options"],function(e){Tc.prototype[e]=function(n,r){return this.request(Ho(r||{},{method:e,url:n,data:(r||{}).data}))}});_e.forEach(["post","put","patch"],function(e){function n(r){return function(l,h,c){return this.request(Ho(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:h}))}}Tc.prototype[e]=n(),Tc.prototype[e+"Form"]=n(!0)});const U0=Tc;class S1{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(o=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](o);r._listeners=null}),this.promise.then=o=>{let l;const h=new Promise(c=>{r.subscribe(c),l=c}).then(o);return h.cancel=function(){r.unsubscribe(l)},h},e(function(l,h,c){r.reason||(r.reason=new vs(l,h,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new S1(function(o){e=o}),cancel:e}}}const RA=S1;function IA(t){return function(n){return t.apply(null,n)}}function OA(t){return _e.isObject(t)&&t.isAxiosError===!0}const Tp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHead
` +Pe}parseExistingImages(),y.value=!0,console.log("📝 富文本编辑器已打开")},ct=()=>{y.value=!1,N.value="",z.value="",F.value=null,P.value=null,Y.value=[],q()},tt=async()=>{if(!ce.value){console.error("❌ vditorContainer未找到");return}console.log("🎯 开始初始化Vditor编辑器..."),console.log("🔍 vditorContainer元素:",ce.value),console.log("🔍 容器可见性:",ce.value.offsetParent!==null),console.log("🔍 容器尺寸:",{width:ce.value.offsetWidth,height:ce.value.offsetHeight});try{ce.value.innerHTML="",Me=new nl(ce.value,{height:400,placeholder:"请输入节点内容...",mode:"wysiwyg",theme:"classic",toolbarConfig:{pin:!0},cache:{enable:!1},preview:{hljs:{style:"github"}},toolbar:["emoji","headings","bold","italic","strike","|","list","ordered-list","check","|","quote","line","code","inline-code","|","link","table","image","upload","|","undo","redo","fullscreen","edit-mode"],upload:{accept:"image/*",multiple:!1,fieldName:"file",max:5*1024*1024,url:"",linkToImgUrl:"",success:(U,Q)=>{console.log("图片上传成功:",Q)},error:U=>{console.error("图片上传失败:",U)}},after:()=>{console.log("✅ Vditor编辑器初始化完成"),setTimeout(()=>{z.value&&z.value.trim()?(Me.setValue(z.value),console.log("✅ 内容已设置到WYSIWYG编辑器:",z.value.substring(0,100)+"..."),console.log("✅ 编辑器当前模式: wysiwyg (所见即所得模式)")):(console.warn("⚠️ editorContent.value为空, 设置空内容"),Me.setValue("")),Me.focus(),Me.on?Me.on("input",U=>{const Q=Me.getValue();z.value=Q,console.log("📝 编辑器内容变化(Markdown):",Q.substring(0,50)+"...")}):console.warn("⚠️ Vditor实例没有on方法"),setTimeout(()=>{const U=document.querySelector(".vditor-toolbar"),Q=document.querySelector(".vditor-wysiwyg");console.log("🔍 Vditor工具栏:",U),console.log("🔍 Vditor编辑器区域:",Q),!U||!Q?(console.error("❌ Vditor组件没有正确渲染"),console.error("工具栏状态:",U?"存在":"不存在"),console.error("编辑器状态:",Q?"存在":"不存在")):(console.log("✅ Vditor组件渲染成功"),console.log("工具栏按钮数量:",U.querySelectorAll("button").length),console.log("工具栏高度:",U.offsetHeight))},100)},100)}}),console.log("✅ Vditor编辑器创建成功")}catch(U){console.error("❌ Vditor编辑器初始化失败:",U),console.error("错误详情:",U.stack)}},q=()=>{Me&&(Me.destroy(),Me=null,console.log("🗑️ Vditor编辑器已销毁"))},Ht=async()=>{var He,Pe,pe,Oe;if(console.log("🚀 saveRichTextChanges函数被调用! "),console.log("🚀 开始保存 Vditor 富文本内容..."),console.log("📝 当前editorTitle:",N.value),console.log("📝 当前editorContent:",z.value.substring(0,100)+"..."),console.log("📝 当前节点:",F.value),console.log("📝 Vditor实例状态:",!!Me),!F.value){alert("节点信息丢失");return}if(!Me){console.error("❌ Vditor实例不存在, 无法获取内容"),alert("编辑器未初始化,请重试");return}const U=Me?Me.getValue():z.value,Q=Me?Me.getHTML():z.value,Z=U.trim()||"";console.log("📝 获取到的Markdown内容:",Z.substring(0,100)+"..."),console.log("📝 获取到的HTML内容:",Q.substring(0,100)+"...");const xe=N.value!==(F.value.title||"");if(console.log("🔍 标题变化检查:",{editorTitle:N.value,currentNodeTitle:F.value.title||"",titleChanged:xe}),F.value.topic=Z,F.value.title=N.value,F.value.dangerouslySetInnerHTML=Q,P.value&&(P.value.innerHTML=Q,xe)){const Je=P.value.querySelector(".tpc");Je&&(Je.textContent=N.value,console.log("📝 DOM文本元素已更新:",N.value))}try{const Je=F.value.id.replace(/^me/,""),Ge={newTitle:N.value,newDes:((He=F.value.data)==null?void 0:He.des)||"",newParentId:F.value.parentId||((Pe=F.value.parent)==null?void 0:Pe.id),newDangerouslySetInnerHTML:Q||""};console.log("🔍 直接发送到后端的更新数据:",Ge),console.log("🔍 清理后的节点ID:",Je);const Ct=await Un.updateNode(Je,Ge);if(Ct.data&&Ct.data.success){if(console.log("✅ 节点数据已保存到后端"),o.value&&F.value&&P.value){const un=P.value.querySelector(".
font - size : 11 px ;
color : # 666 ;
margin - top : 6 px ;
padding : 6 px 8 px ;
background : rgba ( 0 , 0 , 0 , 0.03 ) ;
border - radius : 4 px ;
max - width : 250 px ;
word - wrap : break - word ;
line - height : 1.3 ;
border - left : 3 px solid # e0e0e0 ;
display : block ;
` ,Q.appendChild(Oe));const Je=Pe.data.des;Je.length>150?(Oe.textContent=Je.substring(0,150)+"...",Oe.title=Je):Oe.textContent=Je}})},1e3)},X=()=>{try{if(o.value&&o.value.toCenter){o.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const U=r.value;if(!U)return;const Q=U.querySelector(".map-canvas");if(!Q)return;const Z=Q.querySelectorAll("me-tpc");if(Z.length===0)return;let xe=1/0,He=-1/0,Pe=1/0,pe=-1/0;Z.forEach(Ia=>{const Li=Ia.getBoundingClientRect(),Oa=U.getBoundingClientRect(),_i=Li.left-Oa.left,Zr=Li.top-Oa.top;xe=Math.min(xe,_i),He=Math.max(He,_i+Li.width),Pe=Math.min(Pe,Zr),pe=Math.max(pe,Zr+Li.height)});const Oe=(xe+He)/2,Je=(Pe+pe)/2,Ge=U.clientWidth/2,Ct=U.clientHeight/2,Gt=Ge-Oe,un=Ct-Je;Q.style.transform= ` translate ( $ { Gt } px , $ { un } px ) ` ,Q.style.opacity="1",Q.style.transition="opacity 0.3s ease";const $ n=100,mr=Math.max(Gt, $ n),Hr=Math.max(un, $ n);Q.style.transform= ` translate ( $ { mr } px , $ { Hr } px ) ` ,Q.style.opacity="1",Q.style.visibility="visible"}catch{}},be=async U=>{if(!(!o.value||!U))try{console.log("🎯 开始处理新节点:",U);let Q=null,Z=0;const xe=5;for(;!Q&&Z<xe;)Q=o.value.findEle(U),Q||(Z++,await new Promise(He=>setTimeout(He,50)));Q?(console.log("✅ 找到节点元素:",Q),o.value.scrollIntoView&&(o.value.scrollIntoView(Q),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{o.value.beginEdit&&(o.value.beginEdit(Q),console.log("✅ 节点已进入编辑状态"))},350)):console.error("❌ 多次尝试后仍未找到节点元素:",U)}catch(Q){console.error("❌ 居中显示节点失败:",Q)}},le=()=>{if(!l.value)return;if(o.value&&o.value.getNodeById)try{const Q=o.value.getNodeById(l.value.id);if(Q){const Z=Q.getBoundingClientRect(),xe=r.value.getBoundingClientRect(),He=Z.left-xe.left+Z.width/2,Pe=Z.bottom-xe.top+10;h.value={left: ` $ { He } px ` ,top: ` $ { Pe } px ` };return}}catch{}let U=document.querySelector( ` [ data - id = "${l.value.id}" ] ` );if(U||(U=document.querySelector( ` . topic [ data - id = "${l.value.id}" ] ` )),U||(U=document.querySelector( ` [ data - node - id = "${l.value.id}" ] ` )),U||(U=document.querySelector( ` [ data - nodeid = "me${l.value.id}" ] ` )),!U){const Q=document.querySelectorAll("me-tpc");for(const Z of Q)if(Z.getAttribute("data-nodeid")=== ` me$ { l . value . id } ` ){U=Z;break}}if(!U){const Q=document.querySelectorAll(".topic");for(const Z of Q)if(Z.textContent.trim()===l.value.topic){U=Z;break}}if(U){const Q=U.getBoundingClientRect(),Z=r.value.getBoundingClientRect(),xe=Q.left-Z.left+Q.width/2,He=Q.bottom-Z.top+10;h.value={left: ` $ { xe } px ` ,top: ` $ { He } px ` }}else h.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},ye=async()=>{l.value&&(await en(l.value),l.value=null)},Ae=async()=>{l.value&&(await co(l.value),l.value=null)},ze=async()=>{l.value&&(await ur(l.value),l.value=null)},Xe=async()=>{if(!l.value)return;console.log("Ask AI for node:",l.value);const U=parseFloat(h.value.left)||0,Q=parseFloat(h.value.top)||0;c.value={left: ` $ { U } px ` ,top: ` $ { Q + 60 } px ` ,transform:"translateX(-50%)"},m.value=!0,x.value=l.value},Ke=()=>{m.value=!1,x.value=null,w.value="",S.value=!1,l.value=null},Be=U=>{if(!U)return"";const Q=[];return U.parent&&U.parent.topic&&Q.push( ` 父节点 : $ { U . parent . topic } ` ),U.parent&&U.parent.parent&&U.parent.parent.topic&&Q.push( ` 祖父节点 : $ { U . parent . parent . topic } ` ),Q.join(" | ")},st=U=>{U.ctrlKey||U.metaKey||(U.preventDefault(),qe())},qe=async()=>{if(!(!w.value.trim()||!x.value||S.value)){S.value=!0;try{const U="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",Q= ` 节点信息 :
当前节点 : $ { x . value . topic }
上下文 : $ { Be ( x . value ) }
用户问题 : $ { w . value }
请给出详细的回答 , 回答应该 :
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中 , 便于在思维导图中展示 ` ;console.log("发送AI请求:",{systemPrompt:U,userPrompt:Q});const Z=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:U,user_prompt:Q,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!Z.ok)throw new Error( ` HTTP error ! status : $ { Z . status } ` );let xe="";const He=Z.body.getReader(),Pe=new TextDecoder;let pe="";for(;;){const{done:Oe,value:Je}=await He.read();if(Oe)break;pe+=Pe.decode(Je,{stream:!0});const Ge=pe.split( `
` );pe=Ge.pop()||"";for(const Ct of Ge)if(Ct.startsWith("data: "))try{const Gt=JSON.parse(Ct.slice(6));if(Gt.type==="chunk")xe+=Gt.content;else if(Gt.type==="error")throw new Error(Gt.content)}catch(Gt){console.warn("解析流式数据失败:",Gt)}}await Ut(x.value,w.value,xe),Ke()}catch(U){console.error("AI请求失败:",U),alert("AI请求失败, 请稍后重试")}finally{S.value=!1}}},Re=U=>U.replace(/^### (.* $ )/gim,"📋 $ 1").replace(/^## (.* $ )/gim,"📌 $ 1").replace(/^# (.* $ )/gim,"🎯 $ 1").replace(/ \* \* (.*?) \* \* /g,(Q,Z)=>{if(Z.includes(":")){const xe=Z.split(":");if(xe.length>1)return ` 【 $ { xe [ 0 ] } 】 : $ { xe . slice ( 1 ) . join ( ":" ) } ` }return ` 【 $ { Z } 】 ` }).replace(/ \* (.*?) \* /g,"《 $ 1》").replace(/^- (.* $ )/gim," • $ 1").replace(/^ \d + \. (.* $ )/gim," $ &").replace(/ ` ` ` ( . * ? ) ` ` ` /gims,"💻 $ 1").replace(/ ` ( . * ? ) ` /g,"「 $ 1」").replace(/ \[ ([^ \] ]+) \] \( [^)]+ \) /g,"🔗 $ 1").replace(/ \n \n /g, `
` ).replace(/ \n /g, `
` ),mt=(U,Q,Z)=>{const xe=U.split( `
` );let He=Z,Pe=[];for(let pe=0;pe<xe.length;pe++){const Je=xe[pe].trim(),Ge=Je.match(/^[-*+] \s *【(.+)】/);if(Ge){const Ct=Ge[1].trim(),Gt={id: ` node _$ { He ++ } ` ,topic:Ct,children:[],level:(Q.level||0)+1,data:{}};let un=[], $ n=pe+1;for(; $ n<xe.length;){const mr=xe[ $ n].trim();if(mr.match(/^[-*+] \s *【(.+)】/))break;const Ia=mr.match(/^[-*+] \s +(.+) $ /);if(Ia){const Li=Ia[1].trim(),Oa=Re(Li);un.push("• "+Oa)} $ n++}if(un.length>0){const mr=Re(un.join( `
` ));Gt.topic=Gt.topic+ `
` +mr}Q.children.push(Gt),pe= $ n-1}else Je&&Pe.push(Je)}if(Pe.length>0){const pe=Pe.join( `
` ).trim();pe&&pe.split( `
` ).filter(Je=>Je.trim()).forEach(Je=>{const Ge=Re(Je.trim());if(Ge){const Ct={id: ` node _$ { He ++ } ` ,topic:Ge,children:[],level:(Q.level||0)+1,data:{}};Q.children.push(Ct)}})}return{nodeCounter:He}},Dt=U=>{const Q=U.split( `
` );let Z=null;const xe=[];let He=0,Pe=[];if(Q.forEach((pe,Oe)=>{const Je=pe.trim(),Ge=Je.match(/^(#{1,6}) \s +(.+) $ /);if(Ge){if(Pe.length>0&&xe.length>0){const mr=Pe.join( `
` ).trim();mr&&(He=mt(mr,xe[xe.length-1],He).nodeCounter),Pe=[]}const Ct=Ge[1].length,Gt=Ge[2].trim(),un=Re(Gt), $ n={id: ` node _$ { He ++ } ` ,topic:un,children:[],level:Ct,data:{}};if(Ct===1&&!Z)Z= $ n,xe.length=0,xe.push(Z);else{for(;xe.length>1&&xe[xe.length-1].level>=Ct;)xe.pop();xe.length>0&&xe[xe.length-1].children.push( $ n),xe.push( $ n)}}else Je&&Pe.push(Je)}),Pe.length>0&&xe.length>0){const pe=Pe.join( `
` ).trim();pe&&(He=mt(pe,xe[xe.length-1],He).nodeCounter)}return Z||(Z={id:"root",topic:"根节点",children:[],data:{}}),Z},Ut=async(U,Q,Z)=>{var xe,He,Pe;try{const Oe=(Hr=>Hr.replace(/^#+ \s */gm,"").replace(/ \* \* (.*?) \* \* /g," $ 1").replace(/ \* (.*?) \* /g," $ 1").replace(/^ \s *[-*+] \s *(?![|])/gm,"• ").replace(/ \n {3,}/g, `
` ).trim())(Z),Je= ` # $ { Q }
$ { Oe } ` ,Ge=Dt(Je),Ct={title:Q,des: ` AI追问产生的节点 - $ { new Date ( ) . toLocaleString ( ) } ` ,parentId:U.id,isRoot:!1},Gt=[];if(Ge.children&&Ge.children.length>0&&Ge.children.forEach(Hr=>{Gt.push({title:Hr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",p.value),!p.value)throw new Error("没有找到当前思维导图ID, 无法创建节点");const un=await Un.addNodes(p.value,[Ct]);if(!un.data||!un.data.success)throw new Error("AI父节点创建失败");const $ n=(Pe=(He=(xe=un.data.data)==null?void 0:xe.nodes)==null?void 0:He[0])==null?void 0:Pe.id;if(! $ n)throw new Error("无法获取创建的父节点ID");Gt.forEach(Hr=>{Hr.parentId= $ n});let mr=null;if(Gt.length>0&&(mr=await Un.addNodes(p.value,Gt)),un.data&&un.data.success)await er();else throw new Error("AI父节点创建失败")}catch(pe){console.error("创建AI节点失败:",pe),alert("创建AI回答节点失败: "+pe.message)}},jt=async()=>{if(l.value){try{const U=l.value.topic||l.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(U),Hn();else{const Q=document.createElement("textarea");Q.value=U,Q.style.position="fixed",Q.style.left="-999999px",Q.style.top="-999999px",document.body.appendChild(Q),Q.focus(),Q.select();const Z=document.execCommand("copy");document.body.removeChild(Q),Z?Hn():Mn()}}catch{Mn()}l.value=null}},Hn=()=>{const U=document.createElement("div");U.textContent="文本已复制到剪贴板",U.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
background : # 4 CAF50 ;
color : white ;
padding : 12 px 20 px ;
border - radius : 6 px ;
font - size : 14 px ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
` ;const Q=document.createElement("style");Q.textContent= `
@ keyframes slideIn {
from { transform : translateX ( 100 % ) ; opacity : 0 ; }
to { transform : translateX ( 0 ) ; opacity : 1 ; }
}
` ,document.head.appendChild(Q),document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U),Q.parentNode&&Q.parentNode.removeChild(Q)},3e3)},Mn=()=>{const U=document.createElement("div");U.textContent="复制失败,请手动复制",U.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
background : # f44336 ;
color : white ;
padding : 12 px 20 px ;
border - radius : 6 px ;
font - size : 14 px ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
` ,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},3e3)},Pn=(U,Q="success")=>{const Z=document.createElement("div");Z.textContent=U;const xe=Q==="success"?"#4CAF50":Q==="error"?"#f44336":"#ff9800";Z.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
background : $ { xe } ;
color : white ;
padding : 12 px 20 px ;
border - radius : 6 px ;
font - size : 14 px ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
` ,document.body.appendChild(Z),setTimeout(()=>{Z.parentNode&&Z.parentNode.removeChild(Z)},2e3)},kn=()=>{const U=document.createElement("div");U.textContent="✅ 节点编辑已保存",U.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
background : # 4 CAF50 ;
color : white ;
padding : 12 px 20 px ;
border - radius : 6 px ;
font - size : 14 px ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
` ,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},2e3)},lr=()=>{const U=document.createElement("div");U.textContent="❌ 节点编辑保存失败",U.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
background : # f44336 ;
color : white ;
padding : 12 px 20 px ;
border - radius : 6 px ;
font - size : 14 px ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
` ,document.body.appendChild(U),setTimeout(()=>{U.parentNode&&U.parentNode.removeChild(U)},3e3)},cr=async U=>{try{console.log("🎯 处理节点拖拽操作:",U.name),console.log("📦 操作详情:",{name:U.name,objs:U.objs,toObj:U.toObj}),setTimeout(async()=>{var Q;try{const Z=U.objs||[],xe=U.toObj;if(!Z.length||!xe){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log( ` 📦 准备保存 $ { Z . length } 个节点的父子关系 ` );let He=null;U.name==="moveNodeIn"?(He=xe.id,console.log( ` 📌 拖入操作 : 新父节点为 $ { He } ` )):(U.name==="moveNodeBefore"||U.name==="moveNodeAfter")&&(He=((Q=xe.parent)==null?void 0:Q.id)||null,console.log( ` 📌 拖到兄弟位置 : 新父节点为 $ { He || "根节点" } ` ));const Pe=Z.map(async Ge=>{try{console.log( ` 🔄 更新节点 $ { Ge . id } 的父节点为 $ { He || "根节点" } ` );const Ct=await Un.updateNode(Ge.id,{newParentId:He});return Ct.data&&Ct.data.success?(console.log( ` ✅ 节点 $ { Ge . id } 父子关系更新成功 ` ),{success:!0,nodeId:Ge.id}):(console.warn( ` ⚠ ️ 节点 $ { Ge . id } 父子关系更新失败 : ` ,Ct),{success:!1,nodeId:Ge.id})}catch(Ct){return console.error( ` ❌ 节点 $ { Ge . id } 父子关系更新失败 : ` ,Ct),{success:!1,nodeId:Ge.id,error:Ct}}}),pe=await Promise.all(Pe),Oe=pe.filter(Ge=>Ge.success).length,Je=pe.filter(Ge=>!Ge.success).length;console.log( ` 📊 拖拽保存结果 : $ { Oe } 成功 , $ { Je } 失败 ` )}catch(Z){console.error("❌ 保存拖拽后的结构失败:",Z),Pn("❌ 节点拖拽保存失败","error")}},500)}catch(Q){console.error("❌ 处理节点拖拽操作失败:",Q)}},zn=new Set,Ot=async U=>{var Z;const Q= ` $ { U . name } - $ { ( Z = U . obj ) == null ? void 0 : Z . id } ` ;if(zn.has(Q)){console.log("⚠️ 跳过重复的编辑操作:",Q);return}zn.add(Q);try{console.log("🔍 处理编辑完成:",U);const xe=U.obj;xe?(console.log("🔍 保存编辑的节点:",{nodeId:xe.id,nodeTopic:xe.topic,hasDangerouslySetInnerHTML:!!xe.dangerouslySetInnerHTML}),await jn(xe)):console.error("无法解析编辑操作:",U)}catch(xe){console.error("处理编辑完成失败:",xe)}finally{zn.delete(Q)}},jn=async U=>{var Q,Z,xe;try{const He=U.id.replace(/^me/,"");if(console.log("🔍 更新节点编辑:",{originalNodeId:U.id,cleanNodeId:He,nodeTopic:U.topic,dangerouslySetInnerHTML:U.dangerouslySetInnerHTML,currentMindmapId:p.value}),!p.value){console.error("无法获取思维导图ID");return}const Pe={newTitle:U.topic,newDes:((Q=U.data)==null?void 0:Q.des)||"",newParentId:U.parentId||((Z=U.parent)==null?void 0:Z.id),newDangerouslySetInnerHTML:U.dangerouslySetInnerHTML||""};console.log("🔍 发送到后端的更新数据:",Pe);const pe=await Un.updateNode(He,Pe);if(pe.data&&pe.data.success){if(o.value&&U){let Oe=U.id;if(Oe.startsWith("me")&&(Oe=Oe.substring(2)),!Oe.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} $ /i)){console.error("❌ 无效的UUID格式:",Oe,"原始ID:",U.id);return}console.log("🔍 查找DOM元素, 纯净ID:",Oe,"原始ID:",U.id),console.log("🔍 调试信息 - node对象:",{id:U.id,topic:((xe=U.topic)==null?void 0:xe.substring(0,50))+"...",hasDangerouslySetInnerHTML:!!U.dangerouslySetInnerHTML});try{const Je=o.value.findEle(Oe);console.log("🔍 找到的DOM元素:",Je),Je?(console.log("✅ DOM元素存在, 直接更新内容..."),U.dangerouslySetInnerHTML?(console.log("🔍 更新HTML内容:",U.dangerouslySetInnerHTML.substring(0,100)+"..."),Je.innerHTML=U.dangerouslySetInnerHTML,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 直接设置HTML")):U.topic?(console.log("🔍 更新文本内容:",U.topic.substring(0,100)+"..."),Je.textContent=U.topic,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 设置文本")):console.warn("⚠️ node对象没有dangerouslySetInnerHTML或topic")):console.warn("⚠️ findEle返回了null或undefined")}catch(Je){console.warn("⚠️ 无法找到DOM元素:",Je.message,"纯净ID:",Oe)}}kn()}else console.error("更新节点编辑失败:",pe.data),lr()}catch(He){console.error("更新节点编辑失败:",He),lr()}},en=async U=>{var Q;try{await nr();const Z=p.value||U.mindmap_id
` ).replace(/< \/ p>/gi, `
` ).replace(/<p[^>]*>/gi,"").replace(/<strong>(.*?)< \/ strong>/gi,"** $ 1**").replace(/<b>(.*?)< \/ b>/gi,"** $ 1**").replace(/<em>(.*?)< \/ em>/gi,"* $ 1*").replace(/<i>(.*?)< \/ i>/gi,"* $ 1*").replace(/<ul[^>]*>/gi, `
` ).replace(/< \/ ul>/gi, `
` ).replace(/<li[^>]*>/gi,"- ").replace(/< \/ li>/gi, `
` ).replace(/<[^>]+>/g,"").replace(/ \n {3,}/g, `
2025-10-15 02:08:04 +00:00
` ).trim(),console.log("✅ 使用简单转换逻辑成功:",Z.substring(0,100)+"..."))}catch(Oe){console.error("❌ HTML 转 Markdown 失败:",Oe),Z=(U==null?void 0:U.dangerouslySetInnerHTML)||""}}else console.warn("⚠️ 没有找到任何可用的内容字段"),Z="";N.value=U.topic||U.title||"",z.value=Z,F.value=U,P.value=Q,console.log("🎯 最终设置的Markdown内容:",Z),console.log("🎯 编辑器标题:",N.value),y.value=!0,ja(()=>{setTimeout(()=>{if(console.log("🔄 准备初始化Vditor, 容器状态:",ce.value),ce.value&&ce.value.offsetParent!==null)console.log("✅ 容器已可见, 开始初始化Vditor"),tt();else{console.warn("⚠️ 容器未准备好,延迟初始化");let Oe=0;const Je=10,Ge=()=>{Oe++,ce.value&&ce.value.offsetParent!==null?(console.log("✅ 容器在第",Oe,"次尝试后可见"),tt()):Oe<Je?(console.log("🔄 第",Oe,"次检查,容器仍未准备好,继续等待..."),setTimeout(Ge,100)):(console.error("❌ 容器在",Je,"次尝试后仍未准备好"),alert("编辑器初始化失败,请刷新页面重试"))};setTimeout(Ge,100)}},50)})},Yi=()=>{if(!o.value)return;console.log("绑定事件监听器..."),di&&r.value.removeEventListener("wheel",di),cn&&r.value.removeEventListener("click",cn),di=Z=>{if(Z.ctrlKey||Z.metaKey){Z.preventDefault();const xe=Z.deltaY>0?.9:1.1,He=Math.max(.3,Math.min(3,v.value*xe));if(o.value){const Pe=r.value.querySelector(".map-container");Pe&&(Pe.style.transform= ` scale ( $ { He } ) ` ,v.value=He,localStorage.setItem("mindmap-zoom-level",He.toString()))}}},r.value.addEventListener("wheel",di),o.value.bus.addListener("select",Z=>{l.value=Z,setTimeout(()=>{le()},50)}),o.value.bus.addListener("selectNode",Z=>{l.value=Z,setTimeout(()=>{le()},50)}),o.value.bus.addListener("scale",Z=>{Math.abs(Z-1)<.01&&Math.abs(v.value-1)>.01&&setTimeout(()=>{bs()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const U=setInterval(()=>{v.value!==1&&r.value&&Mt()},500);window.zoomIntervalId=U;let Q=0;cn=Z=>{const xe=Date.now();if(xe-Q<100)return;Q=xe;const He=Z.target,Pe=He.closest("me-tpc")||He.closest(".topic")||(He.classList.contains("topic")?He:null)||(He.tagName==="ME-TPC"?He:null);if(Pe){const pe=Pe.nodeObj;if(pe){l.value=pe;const Oe=r.value.getBoundingClientRect(),Je=Pe.getBoundingClientRect(),Ge=Je.left-Oe.left+Je.width/2,Ct=Je.bottom-Oe.top+8;h.value={left: ` $ { Ge } px ` ,top: ` $ { Ct } px ` }}}else l.value=null,m.value&&(m.value=!1,x.value=null,w.value="",S.value=!1)},r.value.addEventListener("click",cn),o.value.bus.addListener("edit",Z=>{console.log("edit事件触发:",Z),Ir(Z)}),o.value.bus.addListener("editFinish",Z=>{console.log("editFinish事件触发:",Z),Ot(Z)}),o.value.bus.addListener("operation",Z=>{console.log("Mind Elixir操作事件:",Z),Z.name==="moveNodeIn"||Z.name==="moveNodeBefore"||Z.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",Z.name,Z),cr(Z)):(Z.name==="finishEdit"||Z.name==="finishEditTable")&&(console.log("🔍 检测到编辑完成操作:",Z.name,Z),Ot(Z))}),o.value.bus.addListener("removeNode",Z=>{console.log("删除节点:",Z),ur(Z)})},bs=()=>{if(o.value){const U=localStorage.getItem("mindmap-zoom-level");if(U){const Q=parseFloat(U);if(Q>=.3&&Q<=3){const Z=r.value.querySelector(".map-container");Z&&(Z.style.transform= ` scale ( $ { Q } ) ` ,v.value=Q)}}}},Mt=()=>{if(o.value&&v.value!==1&&r.value){const U=r.value.querySelector(".map-container");U&&(U.style.transform= ` scale ( $ { v . value } ) ` )}},ys=async()=>{var U;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",o.value),console.log("🔍 currentMindmapId.value:",p.value),console.log("🔍 mindmapEl.value:",r.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",b.value),console.log("🔍 - 是否有思维导图容器:",!!r.value),console.log("🔍 - MindElixir实例状态:",!!o.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),o.value&&o.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",o.value.d
2025-10-13 09:04:31 +00:00
1. 提取主要主题和关键概念
2. 组织成层次分明的结构
3. 使用清晰的标题和子标题
4. 保持内容的逻辑性和完整性
5. 对于长文档 , 请确保完整处理所有内容 , 不要截断
6. * * 重要 : 如果原文档中包含图片 , 请按以下方式处理 :
- 识别图片在文档中的位置和上下文
- 根据图片内容生成准确的描述文字
- 在相应位置插入图片占位符 : ! [ 图片描述 ] ( 图片路径 )
- 图片描述要准确反映图片内容 , 图片路径可以是相对路径或占位符
- 确保图片占位符放在逻辑上合适的位置 * *
7. * * 重要 : 如果原文档中包含表格 , 请完整保留表格结构 :
- 保持表格的Markdown格式
- 确保所有表格行都被包含
- 不要省略任何表格内容
- 对于合并单元格的表格 , 请使用HTML格式并正确使用rowspan和colspan属性
- 如果表格结构复杂 , 优先使用HTML table标签而不是Markdown表格语法 * *
8. * * 重要 : 确保内容完整性 :
- 不要截断任何内容
- 保持原文的完整性
- 所有重要信息都要包含在思维导图中 * *
9. 输出格式 : 直接输出Markdown内容 , 不要添加任何说明文字或代码块标记 ` ,ee= ` 请分析以下文档内容并生成结构化Markdown :
2025-10-15 02:08:04 +00:00
$ { he } ` ;await te(J,ee),await Me(),Rt(w.value.name,l.value),setTimeout(async()=>{try{await tt()}catch(Ce){console.error("自动保存失败:",Ce)}},1500)}catch(he){console.error("从文件生成Markdown失败:",he),q("生成失败: "+he.message,"error")}finally{c.value=!1}},z=he=>new Promise(async(J,ee)=>{try{const Ce=he.type.includes("text")||he.name.endsWith(".txt")||he.name.endsWith(".md"),se=he.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||he.type==="application/msword"||he.name.endsWith(".docx")||he.name.endsWith(".doc"),G=he.type==="application/pdf"||he.name.endsWith(".pdf");if(Ce){const X=new FileReader;X.onload=be=>J(be.target.result),X.onerror=()=>ee(new Error("文本文件读取失败")),X.readAsText(he)}else if(se){const X=await F(he);J(X)}else if(G){const X=await P(he);J(X)}else{const X=new FileReader;X.onload=be=>J(be.target.result),X.onerror=()=>ee(new Error("文件读取失败")),X.readAsText(he)}}catch(Ce){ee(Ce)}}),F=async he=>{try{if(he.name.endsWith(".docx")){const J=await d4(()=>import("./index-8a9a2cec.js").then(se=>se.i),[]),ee=await he.arrayBuffer();return(await J.extractRawText({arrayBuffer:ee})).value}else if(he.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式, 或安装相应的解析库")}catch(J){throw new Error( ` Office文档解析失败 : $ { J . message } ` )}},P=async he=>{try{const J=await d4(()=>import("./pdf-493de69e.js"),[]);J.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const ee=await he.arrayBuffer(),Ce=await J.getDocument({data:ee}).promise;let se="";for(let G=1;G<=Ce.numPages;G++){const le=(await(await Ce.getPage(G)).getTextContent()).items.map(ye=>ye.str).join(" ");se+=le+ `
2025-10-13 09:04:31 +00:00
` }return se}catch(J){throw new Error( ` PDF文件解析失败 : $ { J . message } ` )}},Y=he=>he&&he.replace(/^好的[, ,]?作为.*?专家[, ,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^好的[, ,]?作为.*?专业的.*?专家[, ,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^以下是.*?结构化的.*?思维导图[: :] \s */i,"").replace(/^以下是.*?Markdown.*?思维导图[: :] \s */i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[: :] \s */i,"").replace(/^ ` ` ` ( ? : markdown ) ? \ s * /gm,"").replace(/ ` ` ` \s * $ /gm,"").replace(/^「」 ` markdown \ s * /gm,"").replace(/ ^ 「 」 ` \s */gm,"").replace(/^ \s *「」 ` markdown \ s * /gm,"").replace(/ ^ \ s * 「 」 ` \s */gm,"").replace(/^作为.*?专家[, ,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[: :] \s */i,"").replace(/^以下是.*?分析.*?结果[: :] \s */i,"").replace(/^以下是.*?整理.*?结果[: :] \s */i,"").replace(/^以下是.*?结构化.*?内容[: :] \s */i,"").replace(/ \n {3,}/g, `
` ).trim(),te=async(he,J)=>{const Ce=he|| ` 你是一位Markdown格式转换专家 。 你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式 。 请遵循以下步骤 :
提取主标题 : 识别文章最顶层的主标题 ( 通常为文章题目或书名 ) , 并使用Markdown的 # 级别表示 。
识别层级标题 : 从文章内容中提取所有层级的内容标题 ( 从主标题后的第一个标题开始 , Level 1 至 Level 4 ) 。 判断层级依据 :
视觉与结构特征 : 如独立成行 / 段 、 位置 ( 行首 ) 、 格式 ( 加粗 、 编号如 1. , 1.1 , ( 1 ) , - 等 ) 。
语义逻辑 : 标题之间的包含和并列关系 。
在Markdown中 , 使用相应标题级别 :
Level 1 标题用 # #
Level 2 标题用 # # #
Level 3 标题用 # # # #
Level 4 标题用 # # # # #
精确保留原文标题文字 , 不得修改 、 概括或润色 。
处理正文内容 : 对于每个标题下的正文内容区块 ( 从该标题后开始 , 直到下一个同级或更高级别标题前 ) :
直接保留原文文本 , 但根据内容结构适当格式化为Markdown 。
如果内容是列表 ( 如项目符号或编号列表 ) , 使用Markdown列表语法 ( 例如 - 用于无序列表 , 1. 用于有序列表 ) 。
保持段落和换行不变 。
* * 重要 : 如果原文档中包含图片 , 请按以下方式处理 :
1. 识别图片在文档中的位置和上下文
2. 根据图片内容生成准确的描述文字
3. 在相应位置插入图片占位符 : ! [ 图片描述 ] ( 图片路径 )
4. 图片描述要准确反映图片内容 , 图片路径可以是相对路径或占位符
5. 确保图片占位符放在逻辑上合适的位置 * *
输出格式 : 输出必须是纯Markdown格式的文本 , 不得包含任何额外说明 、 JSON或非Markdown元素 。 确保输出与示例风格一致 。 直接输出Markdown内容 , 不要添加任何说明文字 。 ` ,se=J||"请将以下内容转换为结构化的Markdown格式: ";try{const G=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:Ce,user_prompt:se,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!G.ok)throw new Error( ` HTTP error ! status : $ { G . status } ` );const X=G.body.getReader(),be=new TextDecoder;let le="",ye=0;for(;;){const{done:Ae,value:ze}=await X.read();if(Ae)break;le+=be.decode(ze,{stream:!0});const Xe=le.split( `
` );le=Xe.pop()||"";for(const Ke of Xe)if(Ke.startsWith("data: "))try{const Be=JSON.parse(Ke.slice(6));if(Be.type==="start")q("AI开始生成内容...","info");else if(Be.type==="chunk"){if(ye++,l.value+=Be.content,ye%15===0&&l.value.length>100)try{const st=Y(l.value);if(st.length<10||!st.includes("#")){console.log("⚠️ 内容还不够完整,跳过此次转换"),console.log("⚠️ 内容长度:",st.length),console.log("⚠️ 内容预览:",st.substring(0,200));return}console.log("🔍 准备转换的内容长度:",st.length),console.log("🔍 准备转换的内容预览:",st.substring(0,500)),console.log("🔍 内容是否包含标题:",st.includes("#")),console.log("🔍 内容行数:",st.split( `
` ).length);const qe=await Ne(st);if(!qe||!qe.topic){console.log("⚠️ 转换结果无效,跳过此次更新"),console.log("🔍 转换结果详情:",qe),console.log("🔍 内容长度:",st.length),console.log("🔍 内容预览:",st.substring(0,200));return}h.value=JSON.stringify(qe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:qe.topic||"AI生成中...",source:"ai-streaming",chunkCount:ye,isIncremental:!0}}))}catch(st){if(console.warn("⚠️ 实时转换JSON失败:",st.message),console.warn("⚠️ 当前内容长度:",l.value.length),console.warn("⚠️ 当前内容预览:",l.value.substring(0,200)),l.value.length>50)try{const qe=je(l.value);window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:"AI生成中...",source:"ai-streaming-fallback",chunkCount:ye,isIncremental:!0}}))}catch(qe){console.warn("⚠️ 回退处理也失败:",qe)}}}else if(Be.type==="end")try{const st=Y(l.value),qe=Fe(st),Re=await Ne(st);h.value=JSON.stringify(Re,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Re,title:Re.topic||"AI生成完成",source:"ai-final",chunkCount:ye}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:Re,title:Re.topic||"AI生成思维导图",source:"ai-generated",timestamp:Date.now()}}))},2e3),q("AI内容生成完成! 正在保存到数据库...","success")}catch(st){console.error("⚠️ 最终处理失败:",st),console.error("⚠️ 错误详情:",st.message);try{const qe=je(l.value);h.value=JSON.stringify(qe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:qe,title:"AI生成完成( 简化版) ",source:"ai-final-fallback",chunkCount:ye}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:qe,title:qe.topic||"AI生成思维导图(回退)",source:"ai-final-fallback",timestamp:Date.now()}}))},2e3),q("AI内容生成完成( 简化版) ! 正在保存到数据库...","success")}catch(qe){console.error("⚠️ 回退处理也失败:",qe),q("AI内容生成完成, 但格式处理遇到问题","warning")}}else if(Be.type==="error")throw new Error(Be.content)}catch(Be){console.warn("解析流式数据失败:",Be)}}}catch(G){throw console.error("流式AI API调用失败:",G),G}},ce=he=>{if(he.includes("|")&&he.includes("-")){const J=he.split( `
` );let ee=!1,Ce=!1;for(const se of J){const G=se.trim();G.includes("|")&&G.split("|").length>=3&&(ee=!0),G.includes("|")&&G.includes("-")&&/^[ \s \| \- \: ]+ $ /.test(G)&&(Ce=!0)}if(ee&&Ce)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),he}return he.replace(/^### (.* $ )/gim,"📋 $ 1").replace(/^## (.* $ )/gim,"📌 $ 1").replace(/^# (.* $ )/gim,"🎯 $ 1").replace(/ \* \* (.*?) \* \* /g,(J,ee)=>{if(ee.includes(":")){const Ce=ee.split(":");if(Ce.length>1)return ` 【 $ { Ce [ 0 ] } 】 : $ { Ce . slice ( 1 ) . join ( ":" ) } ` }return ` 【 $ { ee } 】 ` }).replace(/ \* (.*?) \* /g,"《 $ 1》").replace(/^- (.* $ )/gim," • $ 1").replace(/^ \d + \. (.* $ )/gim," $ &").replace(/ ` ` ` ( . * ? ) ` ` ` /gims,"💻 $ 1").replace(/ ` ( . * ? ) ` /g,"「 $ 1」").replace(/ \[ ([^ \] ]+) \] \( [^)]+ \) /g,"🔗 $ 1").replace(/ \n \n /g, `
` ).replace(/ \n /g, `
` ).split( `
` ).map(J=>J.length>80?J.substring(0,77)+"...":J).join( `
` ).trim()},Me=async()=>{if(!l.value.trim()){q("请输入Markdown内容","error");return}p.value=!0;try{const he=Y(l.value),J=Ne(he);h.value=JSON.stringify(J,null,2)}catch(he){console.error("转换失败:",he),q("转换失败, 请检查Markdown格式","error")}finally{p.value=!1}},Fe=he=>{const J=/! \[ ([^ \] ]*) \] \( ([^)]*) \) /g,ee=[];let Ce;for(;(Ce=J.exec(he))!==null;){let se=Ce[2];const G=Ce[1]||"";if(console.log( ` 🔍 发现图片匹配 : alt = "${G}" , url = "${se}" ` ),se&&se.trim()){if(se=se.trim(),se.endsWith("...")||se.endsWith("..")||se.length<10){console.log( ` ⚠ ️ 检测到不完整的图片URL : $ { se } ` );continue}se.startsWith("http")||se.startsWith("data:")||se.startsWith("/")||se.startsWith("./")?(ee.push({alt:G,url:se,fullMatch:Ce[0]}),console.log( ` ✅ 有效图片URL : $ { se } ` )):console.warn( ` ⚠ ️ 跳过格式不支持的图片URL : $ { se } ` )}else console.warn("⚠️ 跳过空的图片URL")}return console.log( ` 🔍 从内容中提取到 $ { ee . length } 张图片 : ` ,ee),ee},We=he=>{if(!he)return"";let J=he.replace(/! \[ ([^ \] ]*) \] \( ([^)]+) \) /g,"");return J=J.replace(/ \n {3,}/g, `
` ),J.trim()},rt=he=>{if(!he)return"";let J=he;J=J.replace(/! \[ ([^ \] ]*) \] \( ([^)]* \. \. \. ?) \) /g,""),J=J.replace(/! \[ ([^ \] ]*) \] \( ([^)]*) \) /g,(G,X,be)=>!be||be.length<10||be.endsWith("...")||be.endsWith("..")?(console.log("🔧 移除不完整的图片引用:",G),""):G);const ee=J.split( `
` );let Ce=!1;for(const G of ee)if(G.trim().match(/^#{1,6} \s +.+/)){Ce=!0;break}if(!Ce&&ee.length>0){const G=ee[0].trim();G&&!G.startsWith("#")&&G.length>0&&(J= ` # $ { G }
$ { ee . slice ( 1 ) . join ( `
` )} ` , console . log ( "🔧 修复:将第一行转换为标题" ) ) } J = J . replace ( /^[-*+]\s*$/gm , "" ) ; const se = J . match ( /```/g ) ; return se && se . length % 2 === 1 && ( J += "\n```" , console . log ( "🔧 修复:添加缺失的代码块闭合标记" ) ) , J = J . replace ( /\*\*([^*]*)$/ , "**$1**" ) , J = J . replace ( /\*([^*]*)$/ , "*$1*" ) , J = J . replace ( /\n{3,}/g , `
` ),J&&!J.endsWith( `
` )&&(J+= `
` ),console.log("🔧 预处理完成,原始长度:",he.length,"处理后长度:",J.length),J},je=he=>{if(!he)return{id:"root",topic:"AI生成中...",children:[{id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}]};const J=he.split( `
` ).filter(G=>G.trim());let ee="AI生成中...";for(const G of J){const X=G.trim();if(X.startsWith("#")){ee=X.replace(/^#+ \s */,"").trim();break}else if(X.length>5&&!X.startsWith(" ` ` ` ")&&!X.startsWith(" * * ")){ee=X.substring(0,30)+(X.length>30?" ... ":" ");break}}const Ce=J.filter(G=>{const X=G.trim();return X.length>10&&!X.startsWith(" # ")&&!X.startsWith(" ` ` ` ")&&!X.startsWith("**")&&!X.startsWith("- ")&&!X.startsWith("* ")&&!X.startsWith("+ ")}),se=[];return Ce.slice(0,3).forEach((G,X)=>{const be=G.trim().substring(0,50);be&&se.push({id: ` node _$ { X + 1 } ` ,topic:be+(G.trim().length>50?"...":""),children:[],level:1,data:{},expanded:!0})}),se.length===0&&se.push({id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}),{id:"root",topic:ee,children:se}},Ne=async he=>{try{if(!he||typeof he!="string")throw new Error("Markdown内容为空或格式错误");const ee=rt(he).split( `
` );let Ce=null;const se=[];let G=0,X=[];for(let ye=0;ye<ee.length;ye++){const ze=ee[ye].trim(),Xe=ze.match(/^(#{1,6}) \s +(.+) $ /);if(Xe){if(X.length>0&&se.length>0){const mt=X.join( `
` ).trim();if(mt){const Dt={id: ` node _$ { G ++ } ` ,topic:mt,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Dt)}X=[]}const Ke=Xe[1].length,Be=Xe[2].trim(),st=Fe(Be),qe=We(ce(Be));st.length>0&&console.log( ` 🖼 ️ 在标题中发现 $ { st . length } 张图片 : $ { Be } ` );const Re={id: ` node _$ { G ++ } ` ,topic:qe,children:[],level:Ke,data:{},expanded:!0};if(st.length>0){const mt=st[0];if(mt.url&&mt.url.trim()!==""){let Dt=mt.url;Dt.includes("cdn-mineru.openxlab.org.cn")&&(Dt= ` / proxy - image$ { Dt . replace ( "https://cdn-mineru.openxlab.org.cn" , "" ) } ` );const Ut= ` ! [ $ { mt . alt || qe } ] ( $ { Dt } ) ` ;Re.topic=qe||"图片节点",Re.dangerouslySetInnerHTML=Ut,console.log( ` ✅ 成功为标题节点设置图片Markdown : $ { Ut } ` )}else console.error("❌ 标题图片URL无效:",mt)}if(Ke===1&&!Ce)Ce=Re,se.length=0,se.push(Ce);else{for(;se.length>1&&se[se.length-1].level>=Ke;)se.pop();se.length>0&&se[se.length-1].children.push(Re),se.push(Re)}}else ze&&X.push(ze)}if(X.length>0&&se.length>0){const ye=X.join( `
` ).trim();if(ye){ye.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",ye.substring(0,200)+"...");const Ae={id: ` node _$ { G ++ } ` ,topic:ye,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Ae)}}Ce||(console.warn("⚠️ 没有找到根节点,创建默认结构"),console.log("🔍 原因分析:"),console.log("- Markdown内容长度:",he.length),console.log("- 是否包含标题(#):",he.includes("#")),console.log("- 前几行内容:",he.split( `
` ).slice(0,5)),Ce={id:"root",topic:"根节点",children:[],data:{},expanded:!0});const be=ye=>{let Ae=1;return ye.children&&ye.children.forEach(ze=>{Ae+=be(ze)}),Ae},le=be(Ce);return console.log("🔍 markdownToJSON返回结果:"),console.log("- 根节点ID:",Ce.id),console.log("- 根节点topic:",Ce.topic),console.log("- 子节点数量:",Ce.children?Ce.children.length:0),console.log("- 总节点数:",le),Ce}catch(J){return console.error("❌ Markdown转JSON失败:",J),console.error("❌ 错误详情:",J.message),console.error("❌ 输入内容长度:",(he==null?void 0:he.length)||0),console.error("❌ 输入内容预览:",(he==null?void 0:he.substring(0,200))||"无内容"),je(he||"")}},nt=async()=>{if(!l.value){q("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(l.value),q("Markdown已复制到剪贴板","success")}catch{const J=document.createElement("textarea");J.value=l.value,document.body.appendChild(J),J.select(),document.execCommand("copy"),J.remove(),q("Markdown已复制到剪贴板","success")}},ct=async()=>{try{await navigator.clipboard.writeText(h.value),q("JSON已复制到剪贴板","success")}catch(he){console.error("复制失败:",he),q("复制失败","error")}},tt=async()=>{if(!h.value){q("请先生成或转换JSON数据","error");return}try{const he=JSON.parse(h.value),J=he.topic||he.title|| ` AI生成的思维导图 _$ { new Date ( ) . toLocaleString ( ) } ` ,ee=new CustomEvent("save-preview-to-database",{detail:{data:he,title:J,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(ee),setTimeout(()=>{q("思维导图已保存成功!","success"),w.value=null,x.value&&(x.value.value="")},2e3)}catch(he){console.error("JSON解析失败:",he),q("JSON格式错误, 请检查数据","error")}},q=(he,J="info")=>{const ee=document.createElement("div");switch(ee.className= ` notification notification - $ { J } ` ,ee.textContent=he,ee.style.cssText= `
position : fixed ;
top : 20 px ;
right : 20 px ;
padding : 12 px 20 px ;
border - radius : 8 px ;
font - size : 14 px ;
font - weight : 500 ;
z - index : 10000 ;
box - shadow : 0 4 px 12 px rgba ( 0 , 0 , 0 , 0.15 ) ;
animation : slideIn 0.3 s ease ;
max - width : 300 px ;
word - wrap : break - word ;
` ,J){case"success":ee.style.background="#4CAF50",ee.style.color="white";break;case"error":ee.style.background="#f44336",ee.style.color="white";break;case"info":default:ee.style.background="#2196F3",ee.style.color="white";break}if(!document.querySelector("#notification-styles")){const Ce=document.createElement("style");Ce.id="notification-styles",Ce.textContent= `
@ keyframes slideIn {
from { transform : translateX ( 100 % ) ; opacity : 0 ; }
to { transform : translateX ( 0 ) ; opacity : 1 ; }
}
@ keyframes slideOut {
from { transform : translateX ( 0 ) ; opacity : 1 ; }
to { transform : translateX ( 100 % ) ; opacity : 0 ; }
}
` ,document.head.appendChild(Ce)}document.body.appendChild(ee),setTimeout(()=>{ee.style.animation="slideOut 0.3s ease",setTimeout(()=>{ee.parentNode&&ee.parentNode.removeChild(ee)},300)},3e3)},Ht=()=>{l.value="",h.value="",q("内容已清空","info")},Rt=(he,J,ee=null)=>{const Ce={title:he,content:J,mindmapId:ee,timestamp:new Date};v.value.unshift(Ce),v.value.length>10&&(v.value=v.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))}, $ t=async he=>{he.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:he.mindmapId,title:he.title}})):(l.value=he.content,await Me(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:he.content,json:h.value,title:he.title}})))},Nt=he=>new Date(he).toLocaleString("zh-CN");Fp(()=>{const he=localStorage.getItem("ai-sidebar-history");if(he)try{v.value=JSON.parse(he)}catch(J){console.error("加载历史记录失败:",J)}window.addEventListener("add-to-history",J=>{const{title:ee,content:Ce,timestamp:se}=J.detail;Rt(ee,Ce,null)}),window.addEventListener("mindmap-saved",J=>{const{mindmapId:ee,title:Ce,timestamp:se}=J.detail,G=v.value.find(X=>X.title===Ce||X.timestamp&&Math.abs(X.timestamp-se)<5e3);G?(G.mindmapId=ee,localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))):Rt(Ce,"",ee)}),kl(o,(J,ee)=>{}),kl(l,(J,ee)=>{})});const oe=async()=>{try{const he=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!he.ok)throw new Error( ` HTTP error ! status : $ { he . status } ` );const J=he.body.getReader(),ee=new TextDecoder;let Ce="";for(;;){const{done:se,value:G}=await J.read();if(se)break;Ce+=ee.decode(G,{stream:!0});const X=Ce.split( `
` );Ce=X.pop()||"";for(const be of X)if(be.startsWith("data: "))try{const le=JSON.parse(be.slice(6))}catch(le){console.warn("解析测试数据失败:",le)}}}catch(he){console.error("❌ 测试流式API失败:",he)}};return window.testStreamAPI=oe,Rc(()=>{}),(he,J)=>(Kt(),Xt("div",sM,[De("div",{class:"sidebar-toggle",onClick:S,title:r.value?"展开AI助手":"折叠AI助手",style:os({left:r.value?"10px":"420px"})},[r.value?(Kt(),Xt("svg",cM,[...J[1]||(J[1]=[De("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Kt(),Xt("svg",uM,[...J[2]||(J[2]=[De("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,lM),De("div",{class:ss(["ai-sidebar",{"sidebar-collapsed":r.value}])},[X0(De("div",dM,[J[12]||(J[12]=De("div",{class:"sidebar-header"},[De("h3",null,"🤖 AI 助手"),De("p",null,"文档转思维导图工具"),De("div",{class:"collapse-hint"},[De("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),De("div",hM,[J[6]||(J[6]=De("h4",null,"📁 生成思维导图",-1)),De("div",pM,[J[4]||(J[4]=De("label",null,"上传文件:",-1)),De("div",{class:"file-upload-area",onDrop:C,onDragover:T,onDragleave:A},[De("input",{type:"file",ref_key:"fileInput",ref:x,onChange:k,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),De("div",{class:ss(["file-upload-placeholder",{"drag-over":b.value}])},[...J[3]||(J[3]=[De("span",{class:"upload-icon"},"📎",-1),De("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),De("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),w.value?(Kt(),Xt("div",fM,[De("div",mM,[De("div",gM,[De("span",vM,"📄 "+Jr(w.value.name),1),De("span",bM,"("+Jr(y(w.value.size))+")",1)]),De("button",{onClick:M,class:"btn-remove",title:"删除文件"},[...J[5]||(J[5]=[De("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[De("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):Yr("",!0),De("div",yM,[De("button",{onClick:N,disabled:!w.value||c.value,class:"btn-primary"},[c.value?(Kt(),Xt("span",xM,"AI生成中...")):(Kt(),Xt("span",kM,"AI生成思维导图"))],8,wM)])]),v.value.length>0?(Kt(),Xt("div",SM,[J[7]||(J[7]=De("h4",null,"📚 历史记录",-1)),De("div",EM,[(Kt(!0),Xt(wi,null,W4(v.value,(ee,Ce)=>(Kt(),Xt("div",{key:Ce,class:"history-item",onClick:se=> $ t(ee)},[De("div",AM,Jr(ee.title),1),De("div",MM,Jr(Nt(ee.timestamp)),1)],8,TM))),128))])])):Yr("",!0),De("div",CM,[J[9]||(J[9]=De("h4",null,"📝 AI生成的Markdown结果",-1)),De("div",LM,[J[8]||(J[8]=De("label",null,"Markdown内容: ",-1)),X0(De("textarea",{"onUpdate:modelValue":J[0]||(J[0]=ee=>l.value=ee),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Wp,l.value]])]),De("div",_M,[De("button",{onClick:Me,disabled:p.value,class:"btn-secondary"},[p.value?(Kt(),Xt("span",DM,"转换中...")):(Kt(),Xt("span",RM,"🔄 转换为JSON"))],8,NM),De("button",{onClick:Ht,class:"btn-clear"},"清空"),De("button",{onClick:nt,class:"btn-copy"},"📋 复制Markdown")])]),De("div",IM,[J[11]||(J[11]=De("h4",null,"📊 Markdown转JSON结果",-1)),g.value?(Kt(),Xt("div",OM,[J[10]||(J[10]=De("div",{class:"spinner"},null,-1)),De("span",null,Jr(m.value),1)])):Yr("",!0),De("div",HM,[De("pre",PM,Jr(h.value||"JSON转换结果将显示在这里"),1),De("div",zM,[De("button",{onClick:ct,class:"btn-copy"},"📋 复制JSON"),De("button",{onClick:tt,disabled:g.value,class:"btn-copy"},Jr(g.value?"处理中...":"👁️ 预览"),9,BM)])])])],512),[[jb,!r.value]])],2)]))}},qM=Gp(FM,[["__scopeId","data-v-4edf6f37"]]);const jM={class:"markdown-test"}, $ M={class:"test-section"},UM={class:"test-section"},VM=["innerHTML"],WM={class:"test-section"},GM={class:"test-cases"},KM=["onClick"],XM={__name:"MarkdownTest",setup(t){const e=yt( ` # 测试标题
这是一个 * * 粗体 * * 和 * 斜体 * 的测试 。
# # 表格测试
| 产品 | 价格 | 库存 |
| -- -- -- | -- -- -- | -- -- -- |
| 苹果 | 4 元 | 100 个 |
| 香蕉 | 2 元 | 50 个 |
# # 代码测试
\ ` \` \` javascript
function hello ( ) {
console . log ( 'Hello World!' ) ;
}
\ ` \` \`
行内代码 : \ ` const name = 'test' \`
# # 列表测试
- 项目1
- 项目2
- 子项目2 . 1
- 子项目2 . 2
- 项目3
# # 链接测试
- [ GitHub ] ( https : //github.com)
- [ Vue . js ] ( https : //vuejs.org)`),n=yt([{name:"基础表格",content:`# 产品价格表
| 产品 | 价格 |
| -- -- -- | -- -- -- |
| 苹果 | 4 元 |
| 香蕉 | 2 元 | ` },{name:"复杂表格",content: ` # 技术栈对比
| 技术 | 前端 | 后端 | 数据库 |
| -- -- -- | -- -- -- | -- -- -- | -- -- -- -- |
| Vue . js | ✅ | ❌ | ❌ |
| Django | ❌ | ✅ | ❌ |
| PostgreSQL | ❌ | ❌ | ✅ | ` },{name:"代码块",content: ` # 代码示例
\ ` \` \` javascript
function markdownToJSON ( markdown ) {
const lines = markdown . split ( '\\n' ) ;
// 处理逻辑...
return result ;
}
\ ` \` \` ` } , { name : "混合内容" , content : ` # 混合内容测试
这是一个包含 * * 粗体 * * 、 * 斜体 * 和 \ ` 行内代码 \` 的段落。
# # 表格
| 功能 | 状态 | 说明 |
| -- -- -- | -- -- -- | -- -- -- |
| 表格渲染 | ✅ | 支持markdown表格 |
| 代码高亮 | ✅ | 支持代码块 |
# # 代码
\ ` \` \` python
def hello _world ( ) :
print ( "Hello, World!" )
\ ` \` \` ` } ] ) , r = fv ( ( ) => { if ( ! e . value ) return "" ; try { return m2 ( e . value ) } catch ( h ) { return ` <div class="error">渲染失败: ${ h . message } </div> ` } } ) , o = ( ) => { } , l = h => { e . value = h . content } ; return ( h , c ) => ( Kt ( ) , Xt ( "div" , jM , [ c [ 4 ] || ( c [ 4 ] = De ( "h2" , null , "Markdown渲染测试" , - 1 ) ) , De ( "div" , $M , [ c [ 1 ] || ( c [ 1 ] = De ( "h3" , null , "输入Markdown内容" , - 1 ) ) , X0 ( De ( "textarea" , { "onUpdate:modelValue" : c [ 0 ] || ( c [ 0 ] = p => e . value = p ) , placeholder : "输入markdown内容..." , rows : "10" , class : "markdown-input" } , null , 512 ) , [ [ Wp , e . value ] ] ) ] ) , De ( "div" , UM , [ c [ 2 ] || ( c [ 2 ] = De ( "h3" , null , "渲染结果" , - 1 ) ) , De ( "div" , { class : "rendered-content" , innerHTML : r . value } , null , 8 , VM ) ] ) , De ( "div" , WM , [ c [ 3 ] || ( c [ 3 ] = De ( "h3" , null , "测试用例" , - 1 ) ) , De ( "button" , { onClick : o , class : "test-btn" } , "加载测试用例" ) , De ( "div" , GM , [ ( Kt ( ! 0 ) , Xt ( wi , null , W4 ( n . value , ( p , v ) => ( Kt ( ) , Xt ( "button" , { key : v , onClick : b => l ( p ) , class : "test-case-btn" } , Jr ( p . name ) , 9 , KM ) ) ) , 128 ) ) ] ) ] ) ] ) ) } } , ZM = Gp ( XM , [ [ "__scopeId" , "data-v-68a00828" ] ] ) ; const YM = { id : "app" } , JM = { class : "test-mode-toggle" , style : { display : "none" } } , QM = { key : 0 , class : "test-mode" } , eC = { key : 1 } , tC = { class : "main-content" } , nC = { _ _name : "App" , setup ( t ) { const e = yt ( null ) , n = yt ( ! 1 ) , r = ( ) => { n . value = ! n . value } , o = ( ) => { e . value && e . value . showMindMapPage ( ) } ; return ( l , h ) => ( Kt ( ) , Xt ( "div" , YM , [ h [ 0 ] || ( h [ 0 ] = Up ( "« " , - 1 ) ) , De ( "div" , JM , [ De ( "button" , { onClick : r , class : "test-btn" } , Jr ( n . value ? "切换到思维导图" : "测试Markdown渲染" ) , 1 ) ] ) , n . value ? ( Kt ( ) , Xt ( "div" , QM , [ Gr ( ZM ) ] ) ) : ( Kt ( ) , Xt ( "div" , eC , [ Gr ( qM , { onStartRealtimeGeneration : o } ) , De ( "div" , tC , [ Gr ( iM , { ref _key : "mindMapRef" , ref : e } , null , 512 ) ] ) ] ) ) ] ) ) } } ; ly ( nC ) . mount ( "#app" ) ; export { d4 as _ , Bh as c , iC as g } ;