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