@wangeditor-next/list-module 1.1.9 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i18nAddResources as t,DomEditor as e,t as r}from"@wangeditor-next/core";import{Text as n,Path as o,Editor as i,Transforms as u,Range as a}from"slate";import{jsx as c}from"snabbdom";import f,{append as l,attr as s,parent as d}from"dom7";t("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var v=function(t){try{return!!t()}catch(t){return!0}},p=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),y=Function.prototype,h=y.call,g=p&&y.bind.bind(h,h),b=p?g:function(t){return function(){return h.apply(t,arguments)}},m=b({}.toString),w=b("".slice),O=function(t){return w(m(t),8,-1)},S=Object,x=b("".split),E=v((function(){return!S("z").propertyIsEnumerable(0)}))?function(t){return"String"===O(t)?x(t,""):S(t)}:S,j=function(t){return null==t},T=TypeError,A=function(t){if(j(t))throw new T("Can't call method on "+t);return t},I=function(t){return E(A(t))},P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(t){var e={exports:{}};return t(e,e.exports),e.exports}var R,k,N=function(t){return t&&t.Math===Math&&t},z=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof P&&P)||N("object"==typeof P&&P)||function(){return this}()||Function("return this")(),M=Object.defineProperty,_=function(t,e){try{M(z,t,{value:e,configurable:!0,writable:!0})}catch(r){z[t]=e}return e},C=L((function(t){var e="__core-js_shared__",r=t.exports=z[e]||_(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),F=function(t,e){return C[t]||(C[t]=e||{})},D=Object,B=function(t){return D(A(t))},H=b({}.hasOwnProperty),$=Object.hasOwn||function(t,e){return H(B(t),e)},G=0,V=Math.random(),W=b(1..toString),U=function(t){return"Symbol("+(void 0===t?"":t)+")_"+W(++G+V,36)},K=z.navigator,Y=K&&K.userAgent,X=Y?String(Y):"",q=z.process,J=z.Deno,Q=q&&q.versions||J&&J.version,Z=Q&&Q.v8;Z&&(k=(R=Z.split("."))[0]>0&&R[0]<4?1:+(R[0]+R[1])),!k&&X&&(!(R=X.match(/Edge\/(\d+)/))||R[1]>=74)&&(R=X.match(/Chrome\/(\d+)/))&&(k=+R[1]);var tt,et=k,rt=z.String,nt=!!Object.getOwnPropertySymbols&&!v((function(){var t=Symbol("symbol detection");return!rt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=z.Symbol,ut=F("wks"),at=ot?it.for||it:it&&it.withoutSetter||U,ct=function(t){return $(ut,t)||(ut[t]=nt&&$(it,t)?it[t]:at("Symbol."+t)),ut[t]},ft="object"==typeof document&&document.all,lt=void 0===ft&&void 0!==ft?function(t){return"function"==typeof t||t===ft}:function(t){return"function"==typeof t},st=function(t){return"object"==typeof t?null!==t:lt(t)},dt=String,vt=TypeError,pt=function(t){if(st(t))return t;throw new vt(dt(t)+" is not an object")},yt=!v((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ht=yt&&v((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),gt=z.document,bt=st(gt)&&st(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},wt=!yt&&!v((function(){return 7!==Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),Ot=Function.prototype.call,St=p?Ot.bind(Ot):function(){return Ot.apply(Ot,arguments)},xt=function(t,e){return arguments.length<2?(r=z[t],lt(r)?r:void 0):z[t]&&z[t][e];var r},Et=b({}.isPrototypeOf),jt=Object,Tt=ot?function(t){return"symbol"==typeof t}:function(t){var e=xt("Symbol");return lt(e)&&Et(e.prototype,jt(t))},At=String,It=function(t){try{return At(t)}catch(t){return"Object"}},Pt=TypeError,Lt=function(t){if(lt(t))return t;throw new Pt(It(t)+" is not a function")},Rt=function(t,e){var r=t[e];return j(r)?void 0:Lt(r)},kt=TypeError,Nt=TypeError,zt=ct("toPrimitive"),Mt=function(t,e){if(!st(t)||Tt(t))return t;var r,n=Rt(t,zt);if(n){if(void 0===e&&(e="default"),r=St(n,t,e),!st(r)||Tt(r))return r;throw new Nt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&<(r=t.toString)&&!st(n=St(r,t)))return n;if(lt(r=t.valueOf)&&!st(n=St(r,t)))return n;if("string"!==e&<(r=t.toString)&&!st(n=St(r,t)))return n;throw new kt("Can't convert object to primitive value")}(t,e)},_t=function(t){var e=Mt(t,"string");return Tt(e)?e:e+""},Ct=TypeError,Ft=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Bt="enumerable",Ht="configurable",$t="writable",Gt={f:yt?ht?function(t,e,r){if(pt(t),e=_t(e),pt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&$t in r&&!r[$t]){var n=Dt(t,e);n&&n[$t]&&(t[e]=r.value,r={configurable:Ht in r?r[Ht]:n[Ht],enumerable:Bt in r?r[Bt]:n[Bt],writable:!1})}return Ft(t,e,r)}:Ft:function(t,e,r){if(pt(t),e=_t(e),pt(r),wt)try{return Ft(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Ct("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Vt=Math.ceil,Wt=Math.floor,Ut=Math.trunc||function(t){var e=+t;return(e>0?Wt:Vt)(e)},Kt=function(t){var e=+t;return e!=e||0===e?0:Ut(e)},Yt=Math.max,Xt=Math.min,qt=Math.min,Jt=function(t){var e=Kt(t);return e>0?qt(e,9007199254740991):0},Qt=function(t){return Jt(t.length)},Zt=function(t){return function(e,r,n){var o=I(e),i=Qt(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Kt(t);return r<0?Yt(r+e,0):Xt(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},te={includes:Zt(!0),indexOf:Zt(!1)},ee={},re=te.indexOf,ne=b([].push),oe=function(t,e){var r,n=I(t),o=0,i=[];for(r in n)!$(ee,r)&&$(n,r)&&ne(i,r);for(;e.length>o;)$(n,r=e[o++])&&(~re(i,r)||ne(i,r));return i},ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ue=Object.keys||function(t){return oe(t,ie)},ae=yt&&!ht?Object.defineProperties:function(t,e){pt(t);for(var r,n=I(e),o=ue(e),i=o.length,u=0;i>u;)Gt.f(t,r=o[u++],n[r]);return t},ce={f:ae},fe=xt("document","documentElement"),le=F("keys"),se=function(t){return le[t]||(le[t]=U(t))},de="prototype",ve="script",pe=se("IE_PROTO"),ye=function(){},he=function(t){return"<"+ve+">"+t+"</"+ve+">"},ge=function(t){t.write(he("")),t.close();var e=t.parentWindow.Object;return t=null,e},be=function(){try{tt=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;be="undefined"!=typeof document?document.domain&&tt?ge(tt):(e=mt("iframe"),r="java"+ve+":",e.style.display="none",fe.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(he("document.F=Object")),t.close(),t.F):ge(tt);for(var n=ie.length;n--;)delete be[de][ie[n]];return be()};ee[pe]=!0;var me=Object.create||function(t,e){var r;return null!==t?(ye[de]=pt(t),r=new ye,ye[de]=null,r[pe]=t):r=be(),void 0===e?r:ce.f(r,e)},we=Gt.f,Oe=ct("unscopables"),Se=Array.prototype;void 0===Se[Oe]&&we(Se,Oe,{configurable:!0,value:me(null)});var xe,Ee,je,Te=function(t){Se[Oe][t]=!0},Ae={},Ie=z.WeakMap,Pe=lt(Ie)&&/native code/.test(String(Ie)),Le=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Re=yt?function(t,e,r){return Gt.f(t,e,Le(1,r))}:function(t,e,r){return t[e]=r,t},ke="Object already initialized",Ne=z.TypeError,ze=z.WeakMap;if(Pe||C.state){var Me=C.state||(C.state=new ze);Me.get=Me.get,Me.has=Me.has,Me.set=Me.set,xe=function(t,e){if(Me.has(t))throw new Ne(ke);return e.facade=t,Me.set(t,e),e},Ee=function(t){return Me.get(t)||{}},je=function(t){return Me.has(t)}}else{var _e=se("state");ee[_e]=!0,xe=function(t,e){if($(t,_e))throw new Ne(ke);return e.facade=t,Re(t,_e,e),e},Ee=function(t){return $(t,_e)?t[_e]:{}},je=function(t){return $(t,_e)}}var Ce={set:xe,get:Ee,has:je,enforce:function(t){return je(t)?Ee(t):xe(t,{})},getterFor:function(t){return function(e){var r;if(!st(e)||(r=Ee(e)).type!==t)throw new Ne("Incompatible receiver, "+t+" required");return r}}},Fe={}.propertyIsEnumerable,De=Object.getOwnPropertyDescriptor,Be={f:De&&!Fe.call({1:2},1)?function(t){var e=De(this,t);return!!e&&e.enumerable}:Fe},He=Object.getOwnPropertyDescriptor,$e={f:yt?He:function(t,e){if(t=I(t),e=_t(e),wt)try{return He(t,e)}catch(t){}if($(t,e))return Le(!St(Be.f,t,e),t[e])}},Ge=Function.prototype,Ve=yt&&Object.getOwnPropertyDescriptor,We=$(Ge,"name"),Ue={EXISTS:We,PROPER:We&&"something"===function(){}.name,CONFIGURABLE:We&&(!yt||yt&&Ve(Ge,"name").configurable)},Ke=b(Function.toString);lt(C.inspectSource)||(C.inspectSource=function(t){return Ke(t)});var Ye,Xe,qe,Je=C.inspectSource,Qe=L((function(t){var e=Ue.CONFIGURABLE,r=Ce.enforce,n=Ce.get,o=String,i=Object.defineProperty,u=b("".slice),a=b("".replace),c=b([].join),f=yt&&!v((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!$(t,"name")||e&&t.name!==n)&&(yt?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&$(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&$(s,"constructor")&&s.constructor?yt&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return $(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return lt(this)&&n(this).source||Je(this)}),"toString")})),Ze=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(lt(r)&&Qe(r,i,n),n.global)o?t[e]=r:_(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Gt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},tr=ie.concat("length","prototype"),er={f:Object.getOwnPropertyNames||function(t){return oe(t,tr)}},rr={f:Object.getOwnPropertySymbols},nr=b([].concat),or=xt("Reflect","ownKeys")||function(t){var e=er.f(pt(t)),r=rr.f;return r?nr(e,r(t)):e},ir=function(t,e,r){for(var n=or(e),o=Gt.f,i=$e.f,u=0;u<n.length;u++){var a=n[u];$(t,a)||r&&$(r,a)||o(t,a,i(e,a))}},ur=/#|\.prototype\./,ar=function(t,e){var r=fr[cr(t)];return r===sr||r!==lr&&(lt(e)?v(e):!!e)},cr=ar.normalize=function(t){return String(t).replace(ur,".").toLowerCase()},fr=ar.data={},lr=ar.NATIVE="N",sr=ar.POLYFILL="P",dr=ar,vr=$e.f,pr=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?z:f?z[a]||_(a,{}):z[a]&&z[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=vr(r,n))&&u.value:r[n],!dr(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ir(i,o)}(t.sham||o&&o.sham)&&Re(i,"sham",!0),Ze(r,n,i,t)}},yr=!v((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),hr=se("IE_PROTO"),gr=Object,br=gr.prototype,mr=yr?gr.getPrototypeOf:function(t){var e=B(t);if($(e,hr))return e[hr];var r=e.constructor;return lt(r)&&e instanceof r?r.prototype:e instanceof gr?br:null},wr=ct("iterator"),Or=!1;[].keys&&("next"in(qe=[].keys())?(Xe=mr(mr(qe)))!==Object.prototype&&(Ye=Xe):Or=!0);var Sr=!st(Ye)||v((function(){var t={};return Ye[wr].call(t)!==t}));Sr&&(Ye={}),lt(Ye[wr])||Ze(Ye,wr,(function(){return this}));var xr={IteratorPrototype:Ye,BUGGY_SAFARI_ITERATORS:Or},Er=Gt.f,jr=ct("toStringTag"),Tr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!$(t,jr)&&Er(t,jr,{configurable:!0,value:e})},Ar=xr.IteratorPrototype,Ir=function(){return this},Pr=String,Lr=TypeError,Rr=function(t){if(function(t){return st(t)||null===t}(t))return t;throw new Lr("Can't set "+Pr(t)+" as a prototype")},kr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return b(Lt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return A(r),Rr(n),st(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Nr=Ue.PROPER,zr=Ue.CONFIGURABLE,Mr=xr.IteratorPrototype,_r=xr.BUGGY_SAFARI_ITERATORS,Cr=ct("iterator"),Fr="keys",Dr="values",Br="entries",Hr=function(){return this},$r=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=me(Ar,{next:Le(+!n,r)}),Tr(t,o,!1),Ae[o]=Ir}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!_r&&t&&t in v)return v[t];switch(t){case Fr:case Dr:case Br:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,v=t.prototype,p=v[Cr]||v["@@iterator"]||o&&v[o],y=!_r&&p||l(o),h="Array"===e&&v.entries||p;if(h&&(a=mr(h.call(new t)))!==Object.prototype&&a.next&&(mr(a)!==Mr&&(kr?kr(a,Mr):lt(a[Cr])||Ze(a,Cr,Hr)),Tr(a,s,!0)),Nr&&o===Dr&&p&&p.name!==Dr&&(zr?Re(v,"name",Dr):(d=!0,y=function(){return St(p,this)})),o)if(c={values:l(Dr),keys:i?y:l(Fr),entries:l(Br)},u)for(f in c)(_r||d||!(f in v))&&Ze(v,f,c[f]);else pr({target:e,proto:!0,forced:_r||d},c);return v[Cr]!==y&&Ze(v,Cr,y,{name:o}),Ae[e]=y,c},Gr=function(t,e){return{value:t,done:e}},Vr=Gt.f,Wr="Array Iterator",Ur=Ce.set,Kr=Ce.getterFor(Wr),Yr=$r(Array,"Array",(function(t,e){Ur(this,{type:Wr,target:I(t),index:0,kind:e})}),(function(){var t=Kr(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Gr(void 0,!0);switch(t.kind){case"keys":return Gr(r,!1);case"values":return Gr(e[r],!1)}return Gr([r,e[r]],!1)}),"values"),Xr=Ae.Arguments=Ae.Array;if(Te("keys"),Te("values"),Te("entries"),yt&&"values"!==Xr.name)try{Vr(Xr,"name",{value:"values"})}catch(t){}var qr={};qr[ct("toStringTag")]="z";var Jr="[object z]"===String(qr),Qr=ct("toStringTag"),Zr=Object,tn="Arguments"===O(function(){return arguments}()),en=Jr?O:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Zr(t),Qr))?r:tn?O(e):"Object"===(n=O(e))&<(e.callee)?"Arguments":n},rn=Jr?{}.toString:function(){return"[object "+en(this)+"]"};Jr||Ze(Object.prototype,"toString",rn,{unsafe:!0});var nn=String,on=function(t){if("Symbol"===en(t))throw new TypeError("Cannot convert a Symbol value to a string");return nn(t)},un=b("".charAt),an=b("".charCodeAt),cn=b("".slice),fn=function(t){return function(e,r){var n,o,i=on(A(e)),u=Kt(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=an(i,u))<55296||n>56319||u+1===a||(o=an(i,u+1))<56320||o>57343?t?un(i,u):n:t?cn(i,u,u+2):o-56320+(n-55296<<10)+65536}},ln={codeAt:fn(!1),charAt:fn(!0)},sn=ln.charAt,dn="String Iterator",vn=Ce.set,pn=Ce.getterFor(dn);$r(String,"String",(function(t){vn(this,{type:dn,string:on(t),index:0})}),(function(){var t,e=pn(this),r=e.string,n=e.index;return n>=r.length?Gr(void 0,!0):(t=sn(r,n),e.index+=t.length,Gr(t,!1))}));var yn=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),hn=function(t,e,r){for(var n in e)Ze(t,n,e[n],r);return t},gn=b([].slice),bn=er.f,mn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function(t){return mn&&"Window"===O(t)?function(t){try{return bn(t)}catch(t){return gn(mn)}}(t):bn(I(t))}},On=v((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Sn=Object.isExtensible,xn=v((function(){Sn(1)}))||On?function(t){return!!st(t)&&((!On||"ArrayBuffer"!==O(t))&&(!Sn||Sn(t)))}:Sn,En=L((function(t){var e=Gt.f,r=!1,n=U("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=er.f,e=b([].splice),o={};o[n]=1,t(o).length&&(er.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},pr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wn.f}))},fastKey:function(t,e){if(!st(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!$(t,n)){if(!xn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!$(t,n)){if(!xn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return yn&&r&&xn(t)&&!$(t,n)&&i(t),t}};ee[n]=!0})),jn=function(t){if("Function"===O(t))return b(t)},Tn=jn(jn.bind),An=function(t,e){return Lt(t),void 0===e?t:p?Tn(t,e):function(){return t.apply(e,arguments)}},In=ct("iterator"),Pn=Array.prototype,Ln=ct("iterator"),Rn=function(t){if(!j(t))return Rt(t,Ln)||Rt(t,"@@iterator")||Ae[en(t)]},kn=TypeError,Nn=function(t,e,r){var n,o;pt(t);try{if(!(n=Rt(t,"return"))){if("throw"===e)throw r;return r}n=St(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return pt(n),r},zn=TypeError,Mn=function(t,e){this.stopped=t,this.result=e},_n=Mn.prototype,Cn=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=An(e,s),g=function(t){return n&&Nn(n,"normal",t),new Mn(!0,t)},b=function(t){return d?(pt(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=Rn(t)))throw new zn(It(t)+" is not iterable");if(void 0!==(l=o)&&(Ae.Array===l||Pn[In]===l)){for(i=0,u=Qt(t);u>i;i++)if((a=b(t[i]))&&Et(_n,a))return a;return new Mn(!1)}n=function(t,e){var r=arguments.length<2?Rn(t):e;if(Lt(r))return pt(St(r,t));throw new kn(It(t)+" is not iterable")}(t,o)}for(c=v?t.next:n.next;!(f=St(c,n)).done;){try{a=b(f.value)}catch(t){Nn(n,"throw",t)}if("object"==typeof a&&a&&Et(_n,a))return a}return new Mn(!1)},Fn=TypeError,Dn=function(t,e){if(Et(e,t))return t;throw new Fn("Incorrect invocation")},Bn=ct("iterator"),Hn=!1;try{var $n=0,Gn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Gn[Bn]=function(){return this},Array.from(Gn,(function(){throw 2}))}catch(t){}var Vn=Array.isArray||function(t){return"Array"===O(t)},Wn=function(){},Un=xt("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Yn=b(Kn.exec),Xn=!Kn.test(Wn),qn=function(t){if(!lt(t))return!1;try{return Un(Wn,[],t),!0}catch(t){return!1}},Jn=function(t){if(!lt(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xn||!!Yn(Kn,Je(t))}catch(t){return!0}};Jn.sham=!0;var Qn=!Un||v((function(){var t;return qn(qn.call)||!qn(Object)||!qn((function(){t=!0}))||t}))?Jn:qn,Zn=ct("species"),to=Array,eo=function(t,e){return new(function(t){var e;return Vn(t)&&(e=t.constructor,(Qn(e)&&(e===to||Vn(e.prototype))||st(e)&&null===(e=e[Zn]))&&(e=void 0)),void 0===e?to:e}(t))(0===e?0:e)},ro=b([].push),no=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,v,p=B(c),y=E(p),h=Qt(y),g=An(f,l),b=0,m=s||eo,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(v=g(d=y[b],b,p),t))if(e)w[b]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ro(w,d)}else switch(t){case 4:return!1;case 7:ro(w,d)}return i?-1:n||o?o:w}},oo={forEach:no(0),map:no(1),filter:no(2),some:no(3),every:no(4),find:no(5),findIndex:no(6),filterReject:no(7)},io=En.getWeakData,uo=Ce.set,ao=Ce.getterFor,co=oo.find,fo=oo.findIndex,lo=b([].splice),so=0,vo=function(t){return t.frozen||(t.frozen=new po)},po=function(){this.entries=[]},yo=function(t,e){return co(t.entries,(function(t){return t[0]===e}))};po.prototype={get:function(t){var e=yo(this,t);if(e)return e[1]},has:function(t){return!!yo(this,t)},set:function(t,e){var r=yo(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=fo(this.entries,(function(e){return e[0]===t}));return~e&&lo(this.entries,e,1),!!~e}};var ho,go={getConstructor:function(t,e,r,n){var o=t((function(t,o){Dn(t,i),uo(t,{type:e,id:so++,frozen:null}),j(o)||Cn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=ao(e),a=function(t,e,r){var n=u(t),o=io(pt(e),!0);return!0===o?vo(n).set(e,r):o[n.id]=r,t};return hn(i,{delete:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).delete(t):r&&$(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).has(t):r&&$(r,e.id)}}),hn(i,r?{get:function(t){var e=u(this);if(st(t)){var r=io(t);if(!0===r)return vo(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},bo=Ce.enforce,mo=Object,wo=Array.isArray,Oo=mo.isExtensible,So=mo.isFrozen,xo=mo.isSealed,Eo=mo.freeze,jo=mo.seal,To=!z.ActiveXObject&&"ActiveXObject"in z,Ao=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Io=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=z[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=b(a[t]);Ze(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!st(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(dr(t,!lt(u)||!(o||a.forEach&&!v((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),En.enable();else if(dr(t,!0)){var s=new c,d=s[i](o?{}:-0,1)!==s,p=v((function(){s.has(1)})),y=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[Bn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),h=!o&&v((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));y||((c=e((function(t,e){Dn(t,a);var r=function(t,e,r){var n,o;return kr&<(n=e.constructor)&&n!==r&&st(o=n.prototype)&&o!==r.prototype&&kr(t,o),t}(new u,t,c);return j(e)||Cn(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(p||h)&&(l("delete"),l("has"),n&&l("get")),(h||d)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,pr({global:!0,constructor:!0,forced:c!==u},f),Tr(c,t),o||r.setStrong(c,t,n),c}("WeakMap",Ao,go),Po=Io.prototype,Lo=b(Po.set);if(Pe)if(To){ho=go.getConstructor(Ao,"WeakMap",!0),En.enable();var Ro=b(Po.delete),ko=b(Po.has),No=b(Po.get);hn(Po,{delete:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),Ro(this,t)||e.frozen.delete(t)}return Ro(this,t)},has:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)||e.frozen.has(t)}return ko(this,t)},get:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)?No(this,t):e.frozen.get(t)}return No(this,t)},set:function(t,e){if(st(t)&&!Oo(t)){var r=bo(this);r.frozen||(r.frozen=new ho),ko(this,t)?Lo(this,t,e):r.frozen.set(t,e)}else Lo(this,t,e);return this}})}else yn&&v((function(){var t=Eo([]);return Lo(new Io,t,1),!So(t)}))&&hn(Po,{set:function(t,e){var r;return wo(t)&&(So(t)?r=Eo:xo(t)&&(r=jo)),Lo(this,t,e),r&&r(t),this}});var zo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Mo=mt("span").classList,_o=Mo&&Mo.constructor&&Mo.constructor.prototype,Co=_o===Object.prototype?void 0:_o,Fo=ct("iterator"),Do=Yr.values,Bo=function(t,e){if(t){if(t[Fo]!==Do)try{Re(t,Fo,Do)}catch(e){t[Fo]=Do}if(Tr(t,e,!0),zo[e])for(var r in Yr)if(t[r]!==Yr[r])try{Re(t,r,Yr[r])}catch(e){t[r]=Yr[r]}}};for(var Ho in zo)Bo(z[Ho]&&z[Ho].prototype,Ho);Bo(Co,"DOMTokenList");var $o=new WeakMap;function Go(t){var e,r=t.children||[],o=r.length;if(0===o)return"";for(var i=0;i<o&&!e;i++){var u=r[i];n.isText(u)&&(e=u)}return null==e?"":e.color||""}var Vo={type:"list-item",renderElem:function(t,r,n){$o.set(t,n);var u=t,a=u.level,f=void 0===a?0:a,l=u.ordered,s={margin:"5px 0 5px "+20*f+"px"},d="";if(void 0!==l&&l){var v=function(t,r){var n=r,u=n.type,a=n.level,c=void 0===a?0:a,f=n.ordered,l=void 0!==f&&f,s=1,d=r,v=e.findPath(t,d);if(0===v[0])return 1;for(;v[0]>0;){var p=o.previous(v),y=i.node(t,p);if(null==y)break;var h=y[0],g=h.level,b=void 0===g?0:g,m=h.type,w=h.ordered;if(m!==u)break;if(b<c)break;if(b===c){if(w!==l)break;s++}d=h,v=p}return s}(n,t);d=v+"."}else d=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(f);var p=Go(t);return c("div",{style:s},c("span",{contentEditable:!1,style:{marginRight:"0.5em",color:p},"data-w-e-reserve":!0},d),c("span",null,r))}},Wo=function(t,e){return Wo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Wo(t,e)};function Uo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Wo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Ko(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yo(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function Xo(t,r,n){for(var u=r.type,a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(r,["type"]),c=void 0!==n?n:a.level||0,f=e.findPath(t,r),l=f;;){if(0===l.length||0===f[f.length-1])return null;l=o.previous(l);var s=i.node(t,l);if(!s)return null;var d=Yo(s,1)[0],v=d.level,p=void 0===v?0:v;if(e.getNodeType(d)!==u)return null;if(p===c)return d}}function qo(t,e,r){var n=Xo(t,e,r);return!!n&&n.ordered===e.ordered}function Jo(t){return i.nodes(t,{at:t.selection||void 0,match:function(r){return 1===e.findPath(t,r).length}})}"function"==typeof SuppressedError&&SuppressedError;var Qo=te.includes,Zo=v((function(){return!Array(1).includes()}));pr({target:"Array",proto:!0,forced:Zo},{includes:function(t){return Qo(this,t,arguments.length>1?arguments[1]:void 0)}}),Te("includes");var ti,ei,ri=function(){var t=pt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},ni=z.RegExp,oi=v((function(){var t=ni("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ii=oi||v((function(){return!ni("a","y").sticky})),ui={BROKEN_CARET:oi||v((function(){var t=ni("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ii,UNSUPPORTED_Y:oi},ai=z.RegExp,ci=v((function(){var t=ai(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),fi=z.RegExp,li=v((function(){var t=fi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),si=Ce.get,di=F("native-string-replace",String.prototype.replace),vi=RegExp.prototype.exec,pi=vi,yi=b("".charAt),hi=b("".indexOf),gi=b("".replace),bi=b("".slice),mi=(ei=/b*/g,St(vi,ti=/a/,"a"),St(vi,ei,"a"),0!==ti.lastIndex||0!==ei.lastIndex),wi=ui.BROKEN_CARET,Oi=void 0!==/()??/.exec("")[1];(mi||Oi||wi||ci||li)&&(pi=function(t){var e,r,n,o,i,u,a,c=this,f=si(c),l=on(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=St(pi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,v=wi&&c.sticky,p=St(ri,c),y=c.source,h=0,g=l;if(v&&(p=gi(p,"y",""),-1===hi(p,"g")&&(p+="g"),g=bi(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==yi(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",p)),Oi&&(r=new RegExp("^"+y+"$(?!\\s)",p)),mi&&(n=c.lastIndex),o=St(vi,v?r:c,g),v?o?(o.input=bi(o.input,h),o[0]=bi(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:mi&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Oi&&o&&o.length>1&&St(di,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=me(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Si=pi;pr({target:"RegExp",proto:!0,forced:/./.exec!==Si},{exec:Si});var xi=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(t){var r=this.type;return e.getSelectedNodeByType(t,r)},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},t.prototype.isDisabled=function(t){return null==t.selection||!!e.getSelectedElems(t).some((function(e){if(i.isVoid(t,e)&&i.isBlock(t,e))return!0;var r=e.type;return!!["pre","code","table"].includes(r)||void 0}))},t.prototype.exec=function(t,e){this.isActive(t)?u.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):u.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),Ei=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!1,e.title=r("listModule.unOrderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',e}return Uo(e,t),e}(xi),ji=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!0,e.title=r("listModule.orderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',e}return Uo(e,t),e}(xi),Ti={key:"bulletedList",factory:function(){return new Ei}},Ai={key:"numberedList",factory:function(){return new ji}};var Ii=[];var Pi,Li={type:"list-item",elemToHtml:function(t,r){var n="",u="",a=t.ordered,c=void 0!==a&&a?"ol":"ul",f=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(0===s[0])return l+1;var d=o.previous(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?l-m:m>l?qo(r,t)?0:1:m===l?g===c?0:1:0}(t);if(f>0)for(var l=0;l<f;l++)n+="<"+c+">",Ii.push(c);var s=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(s[0]===r.children.length-1)return l+1;var d=o.next(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?qo(r,p)?l-m:l-m+1:m>l?0:m===l?g===c?0:1:0}(t);if(s>0)for(l=0;l<s;l++){u+="</"+Ii.pop()+">"}var d=Go(t);return{html:"<li"+(d?' style="color:'+d+'"':"")+">"+r+"</li>",prefix:n,suffix:u}}},Ri=ct("species"),ki=oo.filter,Ni=(Pi="filter",et>=51||!v((function(){var t=[];return(t.constructor={})[Ri]=function(){return{foo:1}},1!==t[Pi](Boolean).foo})));pr({target:"Array",proto:!0,forced:!Ni},{filter:function(t){return ki(this,t,arguments.length>1?arguments[1]:void 0)}});var zi=TypeError,Mi=function(t){if(t>9007199254740991)throw zi("Maximum allowed index exceeded");return t},_i=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&An(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Vn(c)?(f=Qt(c),l=_i(t,e,c,f,l,i-1)-1):(Mi(l+1),t[l]=c),l++),s++;return l},Ci=_i;pr({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=B(this),r=Qt(e),n=eo(e,0);return n.length=Ci(n,e,e,r,0,void 0===t?1:Kt(t)),n}}),Te("flat");var Fi=Function.prototype,Di=Fi.apply,Bi=Fi.call,Hi="object"==typeof Reflect&&Reflect.apply||(p?Bi.bind(Di):function(){return Bi.apply(Di,arguments)}),$i=ct("species"),Gi=RegExp.prototype,Vi=ln.charAt,Wi=function(t,e,r){return e+(r?Vi(t,e).length:1)},Ui=Math.floor,Ki=b("".charAt),Yi=b("".replace),Xi=b("".slice),qi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ji=/\$([$&'`]|\d{1,2})/g,Qi=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=Ji;return void 0!==o&&(o=B(o),c=qi),Yi(i,c,(function(i,c){var f;switch(Ki(c,0)){case"$":return"$";case"&":return t;case"`":return Xi(e,0,r);case"'":return Xi(e,u);case"<":f=o[Xi(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Ui(l/10);return 0===s?i:s<=a?void 0===n[s-1]?Ki(c,1):n[s-1]+Ki(c,1):i}f=n[l-1]}return void 0===f?"":f}))},Zi=TypeError,tu=function(t,e){var r=t.exec;if(lt(r)){var n=St(r,t,e);return null!==n&&pt(n),n}if("RegExp"===O(t))return St(Si,t,e);throw new Zi("RegExp#exec called on incompatible receiver")},eu=ct("replace"),ru=Math.max,nu=Math.min,ou=b([].concat),iu=b([].push),uu=b("".indexOf),au=b("".slice),cu="$0"==="a".replace(/./,"$0"),fu=!!/./[eu]&&""===/./[eu]("a","$0");function lu(t){return t.length?t[0].tagName.toLowerCase():""}!function(t,e,r,n){var o=ct(t),i=!v((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!v((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[$i]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Si||u===Gi.exec?i&&!o?{done:!0,value:St(a,e,r,n)}:{done:!0,value:St(t,r,e,n)}:{done:!1}}));Ze(String.prototype,t,c[0]),Ze(Gi,o,c[1])}n&&Re(Gi[o],"sham",!0)}("replace",(function(t,e,r){var n=fu?"$":"$0";return[function(t,r){var n=A(this),o=j(t)?void 0:Rt(t,eu);return o?St(o,t,n,r):St(e,on(n),t,r)},function(t,o){var i=pt(this),u=on(t);if("string"==typeof o&&-1===uu(o,n)&&-1===uu(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=lt(o);c||(o=on(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=tu(i,u))&&(iu(d,s),l);){""===on(s[0])&&(i.lastIndex=Wi(u,Jt(i.lastIndex),f))}for(var v,p="",y=0,h=0;h<d.length;h++){for(var g,b=on((s=d[h])[0]),m=ru(nu(Kt(s.index),u.length),0),w=[],O=1;O<s.length;O++)iu(w,void 0===(v=s[O])?v:String(v));var S=s.groups;if(c){var x=ou([b],w,m,u);void 0!==S&&iu(x,S),g=on(Hi(o,void 0,x))}else g=Qi(b,u,m,w,S,o);m>=y&&(p+=au(u,y,m)+g,y=m+b.length)}return p+au(u,y)}]}),!!v((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!cu||fu),pr({global:!0,forced:z.globalThis!==z},{globalThis:z}),l&&(f.fn.append=l),s&&(f.fn.attr=s),d&&(f.fn.parent=d);var su={renderElems:[Vo],editorPlugin:function(t){var r=t.deleteBackward,n=t.handleTab,o=t.normalizeNode,c=t.insertBreak,f=t;return f.insertBreak=function(){var r=Yo(i.nodes(t,{match:function(t){return e.checkNodeType(t,"list-item")},universal:!0}),1)[0];return r?""!==r[0].children[0].text?c():void u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0}):c()},f.deleteBackward=function(n){var o=f.selection;if(null!=o)if(a.isExpanded(o))r(n);else{var i=e.getSelectedNodeByType(f,"list-item");if(null!=i)if(0!==o.focus.offset)r(n);else{var c=i,l=c.level,s=void 0===l?0:l,d=c.ordered,v=void 0!==d&&d;if(s>0){var p=Xo(t,i,s-1);p&&p.ordered!==v?u.setNodes(f,{level:s-1,ordered:!v}):u.setNodes(f,{level:s-1})}else u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0})}else r(n)}else r(n)},f.handleTab=function(){var t,r,o,i,c=f.selection;if(null!=c){if(a.isCollapsed(c)){var l=e.getSelectedNodeByType(f,"list-item");if(null==l)return void n();if(0===c.focus.offset){var s=l.level,d=void 0===s?0:s;return void u.setNodes(f,{level:d+1})}}if(a.isExpanded(c)){var v=0,p=!1;try{for(var y=Ko(Jo(f)),h=y.next();!h.done;h=y.next()){var g=Yo(h.value,1)[0];"list-item"===e.getNodeType(g)?v++:p=!0}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(p||v<=1)return void n();try{for(var b=Ko(Jo(f)),m=b.next();!m.done;m=b.next()){var w=Yo(m.value,2),O=(g=w[0],w[1]),S=g.level;d=void 0===S?0:S;u.setNodes(f,{level:d+1},{at:O})}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}else n()}else n()},f.normalizeNode=function(t){var r=Yo(t,2),n=r[0],i=r[1],a=e.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||u.unwrapNodes(f,{at:i}),o([n,i])},f},menus:[Ti,Ai],elemsToHtml:[Li],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,r){var o=f(t);0===(e=e.filter((function(t){return!!n.isText(t)||!!r.isInline(t)}))).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var i=function(t){return"ol"===lu(t.parent())}(o),u=function(t){for(var e=0,r=t.parent(),n=lu(r);"ul"===n||"ol"===n;)n=lu(r=r.parent()),e++;return e-1}(o);return{type:"list-item",ordered:i,level:u,children:e}}}]};export{su as default};
|
|
1
|
+
import{i18nAddResources as t,DomEditor as e,t as r}from"@wangeditor-next/core";import{Text as n,Path as o,Editor as i,Transforms as u,Range as a}from"slate";import{jsx as c}from"snabbdom";import f,{append as l,attr as s,parent as d}from"dom7";t("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var v=function(t){try{return!!t()}catch(t){return!0}},p=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),y=Function.prototype,h=y.call,g=p&&y.bind.bind(h,h),b=p?g:function(t){return function(){return h.apply(t,arguments)}},m=b({}.toString),w=b("".slice),O=function(t){return w(m(t),8,-1)},S=Object,x=b("".split),E=v((function(){return!S("z").propertyIsEnumerable(0)}))?function(t){return"String"===O(t)?x(t,""):S(t)}:S,j=function(t){return null==t},T=TypeError,A=function(t){if(j(t))throw new T("Can't call method on "+t);return t},I=function(t){return E(A(t))},P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(t){var e={exports:{}};return t(e,e.exports),e.exports}var R,k,N=function(t){return t&&t.Math===Math&&t},z=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof P&&P)||N("object"==typeof P&&P)||function(){return this}()||Function("return this")(),M=Object.defineProperty,_=function(t,e){try{M(z,t,{value:e,configurable:!0,writable:!0})}catch(r){z[t]=e}return e},C=L((function(t){var e="__core-js_shared__",r=t.exports=z[e]||_(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),F=function(t,e){return C[t]||(C[t]=e||{})},D=Object,B=function(t){return D(A(t))},H=b({}.hasOwnProperty),$=Object.hasOwn||function(t,e){return H(B(t),e)},G=0,V=Math.random(),W=b(1..toString),U=function(t){return"Symbol("+(void 0===t?"":t)+")_"+W(++G+V,36)},K=z.navigator,Y=K&&K.userAgent,X=Y?String(Y):"",q=z.process,J=z.Deno,Q=q&&q.versions||J&&J.version,Z=Q&&Q.v8;Z&&(k=(R=Z.split("."))[0]>0&&R[0]<4?1:+(R[0]+R[1])),!k&&X&&(!(R=X.match(/Edge\/(\d+)/))||R[1]>=74)&&(R=X.match(/Chrome\/(\d+)/))&&(k=+R[1]);var tt,et=k,rt=z.String,nt=!!Object.getOwnPropertySymbols&&!v((function(){var t=Symbol("symbol detection");return!rt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=z.Symbol,ut=F("wks"),at=ot?it.for||it:it&&it.withoutSetter||U,ct=function(t){return $(ut,t)||(ut[t]=nt&&$(it,t)?it[t]:at("Symbol."+t)),ut[t]},ft="object"==typeof document&&document.all,lt=void 0===ft&&void 0!==ft?function(t){return"function"==typeof t||t===ft}:function(t){return"function"==typeof t},st=function(t){return"object"==typeof t?null!==t:lt(t)},dt=String,vt=TypeError,pt=function(t){if(st(t))return t;throw new vt(dt(t)+" is not an object")},yt=!v((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ht=yt&&v((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),gt=z.document,bt=st(gt)&&st(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},wt=!yt&&!v((function(){return 7!==Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),Ot=Function.prototype.call,St=p?Ot.bind(Ot):function(){return Ot.apply(Ot,arguments)},xt=function(t,e){return arguments.length<2?(r=z[t],lt(r)?r:void 0):z[t]&&z[t][e];var r},Et=b({}.isPrototypeOf),jt=Object,Tt=ot?function(t){return"symbol"==typeof t}:function(t){var e=xt("Symbol");return lt(e)&&Et(e.prototype,jt(t))},At=String,It=function(t){try{return At(t)}catch(t){return"Object"}},Pt=TypeError,Lt=function(t){if(lt(t))return t;throw new Pt(It(t)+" is not a function")},Rt=function(t,e){var r=t[e];return j(r)?void 0:Lt(r)},kt=TypeError,Nt=TypeError,zt=ct("toPrimitive"),Mt=function(t,e){if(!st(t)||Tt(t))return t;var r,n=Rt(t,zt);if(n){if(void 0===e&&(e="default"),r=St(n,t,e),!st(r)||Tt(r))return r;throw new Nt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&<(r=t.toString)&&!st(n=St(r,t)))return n;if(lt(r=t.valueOf)&&!st(n=St(r,t)))return n;if("string"!==e&<(r=t.toString)&&!st(n=St(r,t)))return n;throw new kt("Can't convert object to primitive value")}(t,e)},_t=function(t){var e=Mt(t,"string");return Tt(e)?e:e+""},Ct=TypeError,Ft=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Bt="enumerable",Ht="configurable",$t="writable",Gt={f:yt?ht?function(t,e,r){if(pt(t),e=_t(e),pt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&$t in r&&!r[$t]){var n=Dt(t,e);n&&n[$t]&&(t[e]=r.value,r={configurable:Ht in r?r[Ht]:n[Ht],enumerable:Bt in r?r[Bt]:n[Bt],writable:!1})}return Ft(t,e,r)}:Ft:function(t,e,r){if(pt(t),e=_t(e),pt(r),wt)try{return Ft(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Ct("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Vt=Math.ceil,Wt=Math.floor,Ut=Math.trunc||function(t){var e=+t;return(e>0?Wt:Vt)(e)},Kt=function(t){var e=+t;return e!=e||0===e?0:Ut(e)},Yt=Math.max,Xt=Math.min,qt=Math.min,Jt=function(t){var e=Kt(t);return e>0?qt(e,9007199254740991):0},Qt=function(t){return Jt(t.length)},Zt=function(t){return function(e,r,n){var o=I(e),i=Qt(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Kt(t);return r<0?Yt(r+e,0):Xt(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},te={includes:Zt(!0),indexOf:Zt(!1)},ee={},re=te.indexOf,ne=b([].push),oe=function(t,e){var r,n=I(t),o=0,i=[];for(r in n)!$(ee,r)&&$(n,r)&&ne(i,r);for(;e.length>o;)$(n,r=e[o++])&&(~re(i,r)||ne(i,r));return i},ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ue=Object.keys||function(t){return oe(t,ie)},ae=yt&&!ht?Object.defineProperties:function(t,e){pt(t);for(var r,n=I(e),o=ue(e),i=o.length,u=0;i>u;)Gt.f(t,r=o[u++],n[r]);return t},ce={f:ae},fe=xt("document","documentElement"),le=F("keys"),se=function(t){return le[t]||(le[t]=U(t))},de="prototype",ve="script",pe=se("IE_PROTO"),ye=function(){},he=function(t){return"<"+ve+">"+t+"</"+ve+">"},ge=function(t){t.write(he("")),t.close();var e=t.parentWindow.Object;return t=null,e},be=function(){try{tt=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;be="undefined"!=typeof document?document.domain&&tt?ge(tt):(e=mt("iframe"),r="java"+ve+":",e.style.display="none",fe.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(he("document.F=Object")),t.close(),t.F):ge(tt);for(var n=ie.length;n--;)delete be[de][ie[n]];return be()};ee[pe]=!0;var me=Object.create||function(t,e){var r;return null!==t?(ye[de]=pt(t),r=new ye,ye[de]=null,r[pe]=t):r=be(),void 0===e?r:ce.f(r,e)},we=Gt.f,Oe=ct("unscopables"),Se=Array.prototype;void 0===Se[Oe]&&we(Se,Oe,{configurable:!0,value:me(null)});var xe,Ee,je,Te=function(t){Se[Oe][t]=!0},Ae={},Ie=z.WeakMap,Pe=lt(Ie)&&/native code/.test(String(Ie)),Le=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Re=yt?function(t,e,r){return Gt.f(t,e,Le(1,r))}:function(t,e,r){return t[e]=r,t},ke="Object already initialized",Ne=z.TypeError,ze=z.WeakMap;if(Pe||C.state){var Me=C.state||(C.state=new ze);Me.get=Me.get,Me.has=Me.has,Me.set=Me.set,xe=function(t,e){if(Me.has(t))throw new Ne(ke);return e.facade=t,Me.set(t,e),e},Ee=function(t){return Me.get(t)||{}},je=function(t){return Me.has(t)}}else{var _e=se("state");ee[_e]=!0,xe=function(t,e){if($(t,_e))throw new Ne(ke);return e.facade=t,Re(t,_e,e),e},Ee=function(t){return $(t,_e)?t[_e]:{}},je=function(t){return $(t,_e)}}var Ce={set:xe,get:Ee,has:je,enforce:function(t){return je(t)?Ee(t):xe(t,{})},getterFor:function(t){return function(e){var r;if(!st(e)||(r=Ee(e)).type!==t)throw new Ne("Incompatible receiver, "+t+" required");return r}}},Fe={}.propertyIsEnumerable,De=Object.getOwnPropertyDescriptor,Be={f:De&&!Fe.call({1:2},1)?function(t){var e=De(this,t);return!!e&&e.enumerable}:Fe},He=Object.getOwnPropertyDescriptor,$e={f:yt?He:function(t,e){if(t=I(t),e=_t(e),wt)try{return He(t,e)}catch(t){}if($(t,e))return Le(!St(Be.f,t,e),t[e])}},Ge=Function.prototype,Ve=yt&&Object.getOwnPropertyDescriptor,We=$(Ge,"name"),Ue={EXISTS:We,PROPER:We&&"something"===function(){}.name,CONFIGURABLE:We&&(!yt||yt&&Ve(Ge,"name").configurable)},Ke=b(Function.toString);lt(C.inspectSource)||(C.inspectSource=function(t){return Ke(t)});var Ye,Xe,qe,Je=C.inspectSource,Qe=L((function(t){var e=Ue.CONFIGURABLE,r=Ce.enforce,n=Ce.get,o=String,i=Object.defineProperty,u=b("".slice),a=b("".replace),c=b([].join),f=yt&&!v((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!$(t,"name")||e&&t.name!==n)&&(yt?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&$(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&$(s,"constructor")&&s.constructor?yt&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return $(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return lt(this)&&n(this).source||Je(this)}),"toString")})),Ze=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(lt(r)&&Qe(r,i,n),n.global)o?t[e]=r:_(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Gt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},tr=ie.concat("length","prototype"),er={f:Object.getOwnPropertyNames||function(t){return oe(t,tr)}},rr={f:Object.getOwnPropertySymbols},nr=b([].concat),or=xt("Reflect","ownKeys")||function(t){var e=er.f(pt(t)),r=rr.f;return r?nr(e,r(t)):e},ir=function(t,e,r){for(var n=or(e),o=Gt.f,i=$e.f,u=0;u<n.length;u++){var a=n[u];$(t,a)||r&&$(r,a)||o(t,a,i(e,a))}},ur=/#|\.prototype\./,ar=function(t,e){var r=fr[cr(t)];return r===sr||r!==lr&&(lt(e)?v(e):!!e)},cr=ar.normalize=function(t){return String(t).replace(ur,".").toLowerCase()},fr=ar.data={},lr=ar.NATIVE="N",sr=ar.POLYFILL="P",dr=ar,vr=$e.f,pr=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?z:f?z[a]||_(a,{}):z[a]&&z[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=vr(r,n))&&u.value:r[n],!dr(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ir(i,o)}(t.sham||o&&o.sham)&&Re(i,"sham",!0),Ze(r,n,i,t)}},yr=!v((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),hr=se("IE_PROTO"),gr=Object,br=gr.prototype,mr=yr?gr.getPrototypeOf:function(t){var e=B(t);if($(e,hr))return e[hr];var r=e.constructor;return lt(r)&&e instanceof r?r.prototype:e instanceof gr?br:null},wr=ct("iterator"),Or=!1;[].keys&&("next"in(qe=[].keys())?(Xe=mr(mr(qe)))!==Object.prototype&&(Ye=Xe):Or=!0);var Sr=!st(Ye)||v((function(){var t={};return Ye[wr].call(t)!==t}));Sr&&(Ye={}),lt(Ye[wr])||Ze(Ye,wr,(function(){return this}));var xr={IteratorPrototype:Ye,BUGGY_SAFARI_ITERATORS:Or},Er=Gt.f,jr=ct("toStringTag"),Tr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!$(t,jr)&&Er(t,jr,{configurable:!0,value:e})},Ar=xr.IteratorPrototype,Ir=function(){return this},Pr=String,Lr=TypeError,Rr=function(t){if(function(t){return st(t)||null===t}(t))return t;throw new Lr("Can't set "+Pr(t)+" as a prototype")},kr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return b(Lt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return A(r),Rr(n),st(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Nr=Ue.PROPER,zr=Ue.CONFIGURABLE,Mr=xr.IteratorPrototype,_r=xr.BUGGY_SAFARI_ITERATORS,Cr=ct("iterator"),Fr="keys",Dr="values",Br="entries",Hr=function(){return this},$r=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=me(Ar,{next:Le(+!n,r)}),Tr(t,o,!1),Ae[o]=Ir}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!_r&&t&&t in v)return v[t];switch(t){case Fr:case Dr:case Br:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,v=t.prototype,p=v[Cr]||v["@@iterator"]||o&&v[o],y=!_r&&p||l(o),h="Array"===e&&v.entries||p;if(h&&(a=mr(h.call(new t)))!==Object.prototype&&a.next&&(mr(a)!==Mr&&(kr?kr(a,Mr):lt(a[Cr])||Ze(a,Cr,Hr)),Tr(a,s,!0)),Nr&&o===Dr&&p&&p.name!==Dr&&(zr?Re(v,"name",Dr):(d=!0,y=function(){return St(p,this)})),o)if(c={values:l(Dr),keys:i?y:l(Fr),entries:l(Br)},u)for(f in c)(_r||d||!(f in v))&&Ze(v,f,c[f]);else pr({target:e,proto:!0,forced:_r||d},c);return v[Cr]!==y&&Ze(v,Cr,y,{name:o}),Ae[e]=y,c},Gr=function(t,e){return{value:t,done:e}},Vr=Gt.f,Wr="Array Iterator",Ur=Ce.set,Kr=Ce.getterFor(Wr),Yr=$r(Array,"Array",(function(t,e){Ur(this,{type:Wr,target:I(t),index:0,kind:e})}),(function(){var t=Kr(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Gr(void 0,!0);switch(t.kind){case"keys":return Gr(r,!1);case"values":return Gr(e[r],!1)}return Gr([r,e[r]],!1)}),"values"),Xr=Ae.Arguments=Ae.Array;if(Te("keys"),Te("values"),Te("entries"),yt&&"values"!==Xr.name)try{Vr(Xr,"name",{value:"values"})}catch(t){}var qr={};qr[ct("toStringTag")]="z";var Jr="[object z]"===String(qr),Qr=ct("toStringTag"),Zr=Object,tn="Arguments"===O(function(){return arguments}()),en=Jr?O:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Zr(t),Qr))?r:tn?O(e):"Object"===(n=O(e))&<(e.callee)?"Arguments":n},rn=Jr?{}.toString:function(){return"[object "+en(this)+"]"};Jr||Ze(Object.prototype,"toString",rn,{unsafe:!0});var nn=String,on=function(t){if("Symbol"===en(t))throw new TypeError("Cannot convert a Symbol value to a string");return nn(t)},un=b("".charAt),an=b("".charCodeAt),cn=b("".slice),fn=function(t){return function(e,r){var n,o,i=on(A(e)),u=Kt(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=an(i,u))<55296||n>56319||u+1===a||(o=an(i,u+1))<56320||o>57343?t?un(i,u):n:t?cn(i,u,u+2):o-56320+(n-55296<<10)+65536}},ln={codeAt:fn(!1),charAt:fn(!0)},sn=ln.charAt,dn="String Iterator",vn=Ce.set,pn=Ce.getterFor(dn);$r(String,"String",(function(t){vn(this,{type:dn,string:on(t),index:0})}),(function(){var t,e=pn(this),r=e.string,n=e.index;return n>=r.length?Gr(void 0,!0):(t=sn(r,n),e.index+=t.length,Gr(t,!1))}));var yn=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),hn=function(t,e,r){for(var n in e)Ze(t,n,e[n],r);return t},gn=b([].slice),bn=er.f,mn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function(t){return mn&&"Window"===O(t)?function(t){try{return bn(t)}catch(t){return gn(mn)}}(t):bn(I(t))}},On=v((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Sn=Object.isExtensible,xn=v((function(){Sn(1)}))||On?function(t){return!!st(t)&&((!On||"ArrayBuffer"!==O(t))&&(!Sn||Sn(t)))}:Sn,En=L((function(t){var e=Gt.f,r=!1,n=U("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=er.f,e=b([].splice),o={};o[n]=1,t(o).length&&(er.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},pr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wn.f}))},fastKey:function(t,e){if(!st(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!$(t,n)){if(!xn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!$(t,n)){if(!xn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return yn&&r&&xn(t)&&!$(t,n)&&i(t),t}};ee[n]=!0})),jn=function(t){if("Function"===O(t))return b(t)},Tn=jn(jn.bind),An=function(t,e){return Lt(t),void 0===e?t:p?Tn(t,e):function(){return t.apply(e,arguments)}},In=ct("iterator"),Pn=Array.prototype,Ln=ct("iterator"),Rn=function(t){if(!j(t))return Rt(t,Ln)||Rt(t,"@@iterator")||Ae[en(t)]},kn=TypeError,Nn=function(t,e,r){var n,o;pt(t);try{if(!(n=Rt(t,"return"))){if("throw"===e)throw r;return r}n=St(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return pt(n),r},zn=TypeError,Mn=function(t,e){this.stopped=t,this.result=e},_n=Mn.prototype,Cn=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=An(e,s),g=function(t){return n&&Nn(n,"normal",t),new Mn(!0,t)},b=function(t){return d?(pt(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=Rn(t)))throw new zn(It(t)+" is not iterable");if(void 0!==(l=o)&&(Ae.Array===l||Pn[In]===l)){for(i=0,u=Qt(t);u>i;i++)if((a=b(t[i]))&&Et(_n,a))return a;return new Mn(!1)}n=function(t,e){var r=arguments.length<2?Rn(t):e;if(Lt(r))return pt(St(r,t));throw new kn(It(t)+" is not iterable")}(t,o)}for(c=v?t.next:n.next;!(f=St(c,n)).done;){try{a=b(f.value)}catch(t){Nn(n,"throw",t)}if("object"==typeof a&&a&&Et(_n,a))return a}return new Mn(!1)},Fn=TypeError,Dn=function(t,e){if(Et(e,t))return t;throw new Fn("Incorrect invocation")},Bn=ct("iterator"),Hn=!1;try{var $n=0,Gn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Gn[Bn]=function(){return this},Array.from(Gn,(function(){throw 2}))}catch(t){}var Vn=Array.isArray||function(t){return"Array"===O(t)},Wn=function(){},Un=xt("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Yn=b(Kn.exec),Xn=!Kn.test(Wn),qn=function(t){if(!lt(t))return!1;try{return Un(Wn,[],t),!0}catch(t){return!1}},Jn=function(t){if(!lt(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xn||!!Yn(Kn,Je(t))}catch(t){return!0}};Jn.sham=!0;var Qn=!Un||v((function(){var t;return qn(qn.call)||!qn(Object)||!qn((function(){t=!0}))||t}))?Jn:qn,Zn=ct("species"),to=Array,eo=function(t,e){return new(function(t){var e;return Vn(t)&&(e=t.constructor,(Qn(e)&&(e===to||Vn(e.prototype))||st(e)&&null===(e=e[Zn]))&&(e=void 0)),void 0===e?to:e}(t))(0===e?0:e)},ro=b([].push),no=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,v,p=B(c),y=E(p),h=Qt(y),g=An(f,l),b=0,m=s||eo,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(v=g(d=y[b],b,p),t))if(e)w[b]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ro(w,d)}else switch(t){case 4:return!1;case 7:ro(w,d)}return i?-1:n||o?o:w}},oo={forEach:no(0),map:no(1),filter:no(2),some:no(3),every:no(4),find:no(5),findIndex:no(6),filterReject:no(7)},io=En.getWeakData,uo=Ce.set,ao=Ce.getterFor,co=oo.find,fo=oo.findIndex,lo=b([].splice),so=0,vo=function(t){return t.frozen||(t.frozen=new po)},po=function(){this.entries=[]},yo=function(t,e){return co(t.entries,(function(t){return t[0]===e}))};po.prototype={get:function(t){var e=yo(this,t);if(e)return e[1]},has:function(t){return!!yo(this,t)},set:function(t,e){var r=yo(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=fo(this.entries,(function(e){return e[0]===t}));return~e&&lo(this.entries,e,1),!!~e}};var ho,go={getConstructor:function(t,e,r,n){var o=t((function(t,o){Dn(t,i),uo(t,{type:e,id:so++,frozen:null}),j(o)||Cn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=ao(e),a=function(t,e,r){var n=u(t),o=io(pt(e),!0);return!0===o?vo(n).set(e,r):o[n.id]=r,t};return hn(i,{delete:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).delete(t):r&&$(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).has(t):r&&$(r,e.id)}}),hn(i,r?{get:function(t){var e=u(this);if(st(t)){var r=io(t);if(!0===r)return vo(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},bo=Ce.enforce,mo=Object,wo=Array.isArray,Oo=mo.isExtensible,So=mo.isFrozen,xo=mo.isSealed,Eo=mo.freeze,jo=mo.seal,To=!z.ActiveXObject&&"ActiveXObject"in z,Ao=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Io=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=z[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=b(a[t]);Ze(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!st(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(dr(t,!lt(u)||!(o||a.forEach&&!v((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),En.enable();else if(dr(t,!0)){var s=new c,d=s[i](o?{}:-0,1)!==s,p=v((function(){s.has(1)})),y=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[Bn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),h=!o&&v((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));y||((c=e((function(t,e){Dn(t,a);var r=function(t,e,r){var n,o;return kr&<(n=e.constructor)&&n!==r&&st(o=n.prototype)&&o!==r.prototype&&kr(t,o),t}(new u,t,c);return j(e)||Cn(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(p||h)&&(l("delete"),l("has"),n&&l("get")),(h||d)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,pr({global:!0,constructor:!0,forced:c!==u},f),Tr(c,t),o||r.setStrong(c,t,n),c}("WeakMap",Ao,go),Po=Io.prototype,Lo=b(Po.set);if(Pe)if(To){ho=go.getConstructor(Ao,"WeakMap",!0),En.enable();var Ro=b(Po.delete),ko=b(Po.has),No=b(Po.get);hn(Po,{delete:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),Ro(this,t)||e.frozen.delete(t)}return Ro(this,t)},has:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)||e.frozen.has(t)}return ko(this,t)},get:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)?No(this,t):e.frozen.get(t)}return No(this,t)},set:function(t,e){if(st(t)&&!Oo(t)){var r=bo(this);r.frozen||(r.frozen=new ho),ko(this,t)?Lo(this,t,e):r.frozen.set(t,e)}else Lo(this,t,e);return this}})}else yn&&v((function(){var t=Eo([]);return Lo(new Io,t,1),!So(t)}))&&hn(Po,{set:function(t,e){var r;return wo(t)&&(So(t)?r=Eo:xo(t)&&(r=jo)),Lo(this,t,e),r&&r(t),this}});var zo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Mo=mt("span").classList,_o=Mo&&Mo.constructor&&Mo.constructor.prototype,Co=_o===Object.prototype?void 0:_o,Fo=ct("iterator"),Do=Yr.values,Bo=function(t,e){if(t){if(t[Fo]!==Do)try{Re(t,Fo,Do)}catch(e){t[Fo]=Do}if(Tr(t,e,!0),zo[e])for(var r in Yr)if(t[r]!==Yr[r])try{Re(t,r,Yr[r])}catch(e){t[r]=Yr[r]}}};for(var Ho in zo)Bo(z[Ho]&&z[Ho].prototype,Ho);Bo(Co,"DOMTokenList");var $o=new WeakMap;function Go(t){var e,r=t.children||[],o=r.length;if(0===o)return"";for(var i=0;i<o&&!e;i++){var u=r[i];n.isText(u)&&(e=u)}return null==e?"":e.color||""}var Vo={type:"list-item",renderElem:function(t,r,n){$o.set(t,n);var u=t,a=u.level,f=void 0===a?0:a,l=u.ordered,s=void 0!==l&&l,d={margin:"5px 0 5px ".concat(20*f,"px")},v="";if(s){var p=function(t,r){var n=r,u=n.type,a=n.level,c=void 0===a?0:a,f=n.ordered,l=void 0!==f&&f,s=1,d=r,v=e.findPath(t,d);if(0===v[0])return 1;for(;v[0]>0;){var p=o.previous(v),y=i.node(t,p);if(null==y)break;var h=y[0],g=h.level,b=void 0===g?0:g,m=h.type,w=h.ordered;if(m!==u)break;if(b<c)break;if(b===c){if(w!==l)break;s++}d=h,v=p}return s}(n,t);v="".concat(p,".")}else v=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(f);var y=Go(t);return c("div",{style:d},c("span",{contentEditable:!1,style:{marginRight:"0.5em",color:y},"data-w-e-reserve":!0},v),c("span",null,r))}},Wo=function(t,e){return Wo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Wo(t,e)};function Uo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Wo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Ko(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yo(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function Xo(t,r,n){for(var u=r.type,a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(r,["type"]),c=void 0!==n?n:a.level||0,f=e.findPath(t,r),l=f;;){if(0===l.length||0===f[f.length-1])return null;l=o.previous(l);var s=i.node(t,l);if(!s)return null;var d=Yo(s,1)[0],v=d.level,p=void 0===v?0:v;if(e.getNodeType(d)!==u)return null;if(p===c)return d}}function qo(t,e,r){var n=Xo(t,e,r);return!!n&&n.ordered===e.ordered}function Jo(t){return i.nodes(t,{at:t.selection||void 0,match:function(r){return 1===e.findPath(t,r).length}})}"function"==typeof SuppressedError&&SuppressedError;var Qo=te.includes,Zo=v((function(){return!Array(1).includes()}));pr({target:"Array",proto:!0,forced:Zo},{includes:function(t){return Qo(this,t,arguments.length>1?arguments[1]:void 0)}}),Te("includes");var ti,ei,ri=function(){var t=pt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},ni=z.RegExp,oi=v((function(){var t=ni("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ii=oi||v((function(){return!ni("a","y").sticky})),ui={BROKEN_CARET:oi||v((function(){var t=ni("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ii,UNSUPPORTED_Y:oi},ai=z.RegExp,ci=v((function(){var t=ai(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),fi=z.RegExp,li=v((function(){var t=fi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),si=Ce.get,di=F("native-string-replace",String.prototype.replace),vi=RegExp.prototype.exec,pi=vi,yi=b("".charAt),hi=b("".indexOf),gi=b("".replace),bi=b("".slice),mi=(ei=/b*/g,St(vi,ti=/a/,"a"),St(vi,ei,"a"),0!==ti.lastIndex||0!==ei.lastIndex),wi=ui.BROKEN_CARET,Oi=void 0!==/()??/.exec("")[1];(mi||Oi||wi||ci||li)&&(pi=function(t){var e,r,n,o,i,u,a,c=this,f=si(c),l=on(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=St(pi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,v=wi&&c.sticky,p=St(ri,c),y=c.source,h=0,g=l;if(v&&(p=gi(p,"y",""),-1===hi(p,"g")&&(p+="g"),g=bi(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==yi(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",p)),Oi&&(r=new RegExp("^"+y+"$(?!\\s)",p)),mi&&(n=c.lastIndex),o=St(vi,v?r:c,g),v?o?(o.input=bi(o.input,h),o[0]=bi(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:mi&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Oi&&o&&o.length>1&&St(di,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=me(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Si=pi;pr({target:"RegExp",proto:!0,forced:/./.exec!==Si},{exec:Si});var xi=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(t){var r=this.type;return e.getSelectedNodeByType(t,r)},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},t.prototype.isDisabled=function(t){return null==t.selection||!!e.getSelectedElems(t).some((function(e){if(i.isVoid(t,e)&&i.isBlock(t,e))return!0;var r=e.type;return!!["pre","code","table"].includes(r)||void 0}))},t.prototype.exec=function(t,e){this.isActive(t)?u.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):u.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),Ei=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!1,e.title=r("listModule.unOrderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',e}return Uo(e,t),e}(xi),ji=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!0,e.title=r("listModule.orderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',e}return Uo(e,t),e}(xi),Ti={key:"bulletedList",factory:function(){return new Ei}},Ai={key:"numberedList",factory:function(){return new ji}},Ii=TypeError,Pi=function(t){if(t>9007199254740991)throw Ii("Maximum allowed index exceeded");return t},Li=function(t,e,r){yt?Gt.f(t,e,Le(0,r)):t[e]=r},Ri=ct("species"),ki=function(t){return et>=51||!v((function(){var e=[];return(e.constructor={})[Ri]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Ni=ct("isConcatSpreadable"),zi=et>=51||!v((function(){var t=[];return t[Ni]=!1,t.concat()[0]!==t})),Mi=function(t){if(!st(t))return!1;var e=t[Ni];return void 0!==e?!!e:Vn(t)},_i=!zi||!ki("concat");pr({target:"Array",proto:!0,arity:1,forced:_i},{concat:function(t){var e,r,n,o,i,u=B(this),a=eo(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Mi(i=-1===e?u:arguments[e]))for(o=Qt(i),Pi(c+o),r=0;r<o;r++,c++)r in i&&Li(a,c,i[r]);else Pi(c+1),Li(a,c++,i);return a.length=c,a}});var Ci=[];var Fi={type:"list-item",elemToHtml:function(t,r){var n="",u="",a=t.ordered,c=void 0!==a&&a?"ol":"ul",f=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(0===s[0])return l+1;var d=o.previous(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?l-m:m>l?qo(r,t)?0:1:m===l?g===c?0:1:0}(t);if(f>0)for(var l=0;l<f;l++)n+="<".concat(c,">"),Ci.push(c);var s=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(s[0]===r.children.length-1)return l+1;var d=o.next(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?qo(r,p)?l-m:l-m+1:m>l?0:m===l?g===c?0:1:0}(t);if(s>0)for(l=0;l<s;l++){var d=Ci.pop();u+="</".concat(d,">")}var v=Go(t),p=v?' style="color:'.concat(v,'"'):"";return{html:"<li".concat(p,">").concat(r,"</li>"),prefix:n,suffix:u}}},Di=oo.filter,Bi=ki("filter");pr({target:"Array",proto:!0,forced:!Bi},{filter:function(t){return Di(this,t,arguments.length>1?arguments[1]:void 0)}});var Hi=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&An(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Vn(c)?(f=Qt(c),l=Hi(t,e,c,f,l,i-1)-1):(Pi(l+1),t[l]=c),l++),s++;return l},$i=Hi;pr({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=B(this),r=Qt(e),n=eo(e,0);return n.length=$i(n,e,e,r,0,void 0===t?1:Kt(t)),n}}),Te("flat");var Gi=Function.prototype,Vi=Gi.apply,Wi=Gi.call,Ui="object"==typeof Reflect&&Reflect.apply||(p?Wi.bind(Vi):function(){return Wi.apply(Vi,arguments)}),Ki=ct("species"),Yi=RegExp.prototype,Xi=ln.charAt,qi=function(t,e,r){return e+(r?Xi(t,e).length:1)},Ji=Math.floor,Qi=b("".charAt),Zi=b("".replace),tu=b("".slice),eu=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ru=/\$([$&'`]|\d{1,2})/g,nu=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=ru;return void 0!==o&&(o=B(o),c=eu),Zi(i,c,(function(i,c){var f;switch(Qi(c,0)){case"$":return"$";case"&":return t;case"`":return tu(e,0,r);case"'":return tu(e,u);case"<":f=o[tu(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Ji(l/10);return 0===s?i:s<=a?void 0===n[s-1]?Qi(c,1):n[s-1]+Qi(c,1):i}f=n[l-1]}return void 0===f?"":f}))},ou=TypeError,iu=function(t,e){var r=t.exec;if(lt(r)){var n=St(r,t,e);return null!==n&&pt(n),n}if("RegExp"===O(t))return St(Si,t,e);throw new ou("RegExp#exec called on incompatible receiver")},uu=ct("replace"),au=Math.max,cu=Math.min,fu=b([].concat),lu=b([].push),su=b("".indexOf),du=b("".slice),vu="$0"==="a".replace(/./,"$0"),pu=!!/./[uu]&&""===/./[uu]("a","$0");function yu(t){return t.length?t[0].tagName.toLowerCase():""}!function(t,e,r,n){var o=ct(t),i=!v((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!v((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ki]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Si||u===Yi.exec?i&&!o?{done:!0,value:St(a,e,r,n)}:{done:!0,value:St(t,r,e,n)}:{done:!1}}));Ze(String.prototype,t,c[0]),Ze(Yi,o,c[1])}n&&Re(Yi[o],"sham",!0)}("replace",(function(t,e,r){var n=pu?"$":"$0";return[function(t,r){var n=A(this),o=j(t)?void 0:Rt(t,uu);return o?St(o,t,n,r):St(e,on(n),t,r)},function(t,o){var i=pt(this),u=on(t);if("string"==typeof o&&-1===su(o,n)&&-1===su(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=lt(o);c||(o=on(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=iu(i,u))&&(lu(d,s),l);){""===on(s[0])&&(i.lastIndex=qi(u,Jt(i.lastIndex),f))}for(var v,p="",y=0,h=0;h<d.length;h++){for(var g,b=on((s=d[h])[0]),m=au(cu(Kt(s.index),u.length),0),w=[],O=1;O<s.length;O++)lu(w,void 0===(v=s[O])?v:String(v));var S=s.groups;if(c){var x=fu([b],w,m,u);void 0!==S&&lu(x,S),g=on(Ui(o,void 0,x))}else g=nu(b,u,m,w,S,o);m>=y&&(p+=du(u,y,m)+g,y=m+b.length)}return p+du(u,y)}]}),!!v((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!vu||pu),pr({global:!0,forced:z.globalThis!==z},{globalThis:z}),l&&(f.fn.append=l),s&&(f.fn.attr=s),d&&(f.fn.parent=d);var hu={renderElems:[Vo],editorPlugin:function(t){var r=t.deleteBackward,n=t.handleTab,o=t.normalizeNode,c=t.insertBreak,f=t;return f.insertBreak=function(){var r=Yo(i.nodes(t,{match:function(t){return e.checkNodeType(t,"list-item")},universal:!0}),1)[0];return r?""!==r[0].children[0].text?c():void u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0}):c()},f.deleteBackward=function(n){var o=f.selection;if(null!=o)if(a.isExpanded(o))r(n);else{var i=e.getSelectedNodeByType(f,"list-item");if(null!=i)if(0!==o.focus.offset)r(n);else{var c=i,l=c.level,s=void 0===l?0:l,d=c.ordered,v=void 0!==d&&d;if(s>0){var p=Xo(t,i,s-1);p&&p.ordered!==v?u.setNodes(f,{level:s-1,ordered:!v}):u.setNodes(f,{level:s-1})}else u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0})}else r(n)}else r(n)},f.handleTab=function(){var t,r,o,i,c=f.selection;if(null!=c){if(a.isCollapsed(c)){var l=e.getSelectedNodeByType(f,"list-item");if(null==l)return void n();if(0===c.focus.offset){var s=l.level,d=void 0===s?0:s;return void u.setNodes(f,{level:d+1})}}if(a.isExpanded(c)){var v=0,p=!1;try{for(var y=Ko(Jo(f)),h=y.next();!h.done;h=y.next()){var g=Yo(h.value,1)[0];"list-item"===e.getNodeType(g)?v++:p=!0}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(p||v<=1)return void n();try{for(var b=Ko(Jo(f)),m=b.next();!m.done;m=b.next()){var w=Yo(m.value,2),O=(g=w[0],w[1]),S=g.level;d=void 0===S?0:S;u.setNodes(f,{level:d+1},{at:O})}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}else n()}else n()},f.normalizeNode=function(t){var r=Yo(t,2),n=r[0],i=r[1],a=e.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||u.unwrapNodes(f,{at:i}),o([n,i])},f},menus:[Ti,Ai],elemsToHtml:[Fi],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,r){var o=f(t);0===(e=e.filter((function(t){return!!n.isText(t)||!!r.isInline(t)}))).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var i=function(t){return"ol"===yu(t.parent())}(o),u=function(t){for(var e=0,r=t.parent(),n=yu(r);"ul"===n||"ol"===n;)n=yu(r=r.parent()),e++;return e-1}(o);return{type:"list-item",ordered:i,level:u,children:e}}}]};export{hu as default};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|