@wangeditor-next/core 1.7.6 → 1.7.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.
Files changed (94) hide show
  1. package/dist/core/src/config/index.d.ts +13 -13
  2. package/dist/core/src/config/interface.d.ts +58 -58
  3. package/dist/core/src/config/register.d.ts +12 -12
  4. package/dist/core/src/constants/index.d.ts +1 -1
  5. package/dist/core/src/constants/svg.d.ts +12 -12
  6. package/dist/core/src/create/bind-node-relation.d.ts +15 -15
  7. package/dist/core/src/create/create-editor.d.ts +21 -21
  8. package/dist/core/src/create/create-toolbar.d.ts +14 -14
  9. package/dist/core/src/create/helper.d.ts +30 -30
  10. package/dist/core/src/create/index.d.ts +7 -7
  11. package/dist/core/src/editor/dom-editor.d.ts +143 -143
  12. package/dist/core/src/editor/interface.d.ts +67 -67
  13. package/dist/core/src/editor/plugins/with-config.d.ts +7 -6
  14. package/dist/core/src/editor/plugins/with-content.d.ts +7 -6
  15. package/dist/core/src/editor/plugins/with-dom.d.ts +10 -9
  16. package/dist/core/src/editor/plugins/with-emitter.d.ts +7 -6
  17. package/dist/core/src/editor/plugins/with-event-data.d.ts +7 -6
  18. package/dist/core/src/editor/plugins/with-max-length.d.ts +7 -6
  19. package/dist/core/src/editor/plugins/with-selection.d.ts +7 -6
  20. package/dist/core/src/i18n/index.d.ts +32 -32
  21. package/dist/core/src/index.d.ts +32 -32
  22. package/dist/core/src/menus/bar/HoverBar.d.ts +48 -48
  23. package/dist/core/src/menus/bar/Toolbar.d.ts +35 -35
  24. package/dist/core/src/menus/bar-item/BaseButton.d.ts +26 -26
  25. package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +14 -14
  26. package/dist/core/src/menus/bar-item/GroupButton.d.ts +17 -17
  27. package/dist/core/src/menus/bar-item/ModalButton.d.ts +25 -25
  28. package/dist/core/src/menus/bar-item/Select.d.ts +22 -22
  29. package/dist/core/src/menus/bar-item/SimpleButton.d.ts +11 -11
  30. package/dist/core/src/menus/bar-item/index.d.ts +24 -24
  31. package/dist/core/src/menus/bar-item/tooltip.d.ts +6 -6
  32. package/dist/core/src/menus/helpers/helpers.d.ts +18 -18
  33. package/dist/core/src/menus/helpers/position.d.ts +36 -36
  34. package/dist/core/src/menus/index.d.ts +9 -9
  35. package/dist/core/src/menus/interface.d.ts +66 -66
  36. package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +26 -26
  37. package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +14 -14
  38. package/dist/core/src/menus/panel-and-modal/Modal.d.ts +44 -44
  39. package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +20 -20
  40. package/dist/core/src/menus/register.d.ts +16 -16
  41. package/dist/core/src/parse-html/helper.d.ts +10 -10
  42. package/dist/core/src/parse-html/index.d.ts +35 -35
  43. package/dist/core/src/parse-html/parse-common-elem-html.d.ts +15 -15
  44. package/dist/core/src/parse-html/parse-elem-html.d.ts +15 -15
  45. package/dist/core/src/parse-html/parse-text-elem-html.d.ts +15 -15
  46. package/dist/core/src/render/element/getRenderElem.d.ts +11 -11
  47. package/dist/core/src/render/element/renderElement.d.ts +9 -9
  48. package/dist/core/src/render/element/renderStyle.d.ts +13 -13
  49. package/dist/core/src/render/helper.d.ts +6 -6
  50. package/dist/core/src/render/index.d.ts +27 -27
  51. package/dist/core/src/render/node2Vnode.d.ts +15 -15
  52. package/dist/core/src/render/text/genVnode.d.ts +9 -9
  53. package/dist/core/src/render/text/renderStyle.d.ts +13 -13
  54. package/dist/core/src/render/text/renderText.d.ts +9 -9
  55. package/dist/core/src/text-area/TextArea.d.ts +47 -47
  56. package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +8 -8
  57. package/dist/core/src/text-area/event-handlers/blur.d.ts +8 -8
  58. package/dist/core/src/text-area/event-handlers/click.d.ts +8 -8
  59. package/dist/core/src/text-area/event-handlers/composition.d.ts +27 -27
  60. package/dist/core/src/text-area/event-handlers/copy.d.ts +8 -8
  61. package/dist/core/src/text-area/event-handlers/cut.d.ts +8 -8
  62. package/dist/core/src/text-area/event-handlers/drag.d.ts +9 -9
  63. package/dist/core/src/text-area/event-handlers/drop.d.ts +8 -8
  64. package/dist/core/src/text-area/event-handlers/focus.d.ts +8 -8
  65. package/dist/core/src/text-area/event-handlers/index.d.ts +35 -35
  66. package/dist/core/src/text-area/event-handlers/keydown.d.ts +8 -8
  67. package/dist/core/src/text-area/event-handlers/keypress.d.ts +8 -8
  68. package/dist/core/src/text-area/event-handlers/paste.d.ts +8 -8
  69. package/dist/core/src/text-area/helpers.d.ts +26 -26
  70. package/dist/core/src/text-area/place-holder.d.ts +18 -18
  71. package/dist/core/src/text-area/syncSelection.d.ts +19 -19
  72. package/dist/core/src/text-area/update-view.d.ts +13 -13
  73. package/dist/core/src/to-html/elem2html.d.ts +8 -8
  74. package/dist/core/src/to-html/index.d.ts +32 -32
  75. package/dist/core/src/to-html/node2html.d.ts +8 -8
  76. package/dist/core/src/to-html/text2html.d.ts +8 -8
  77. package/dist/core/src/upload/createUploader.d.ts +8 -8
  78. package/dist/core/src/upload/index.d.ts +7 -7
  79. package/dist/core/src/upload/interface.d.ts +28 -28
  80. package/dist/core/src/utils/dom.d.ts +102 -102
  81. package/dist/core/src/utils/hotkeys.d.ts +35 -35
  82. package/dist/core/src/utils/key.d.ts +11 -11
  83. package/dist/core/src/utils/line.d.ts +14 -14
  84. package/dist/core/src/utils/ua.d.ts +14 -14
  85. package/dist/core/src/utils/util.d.ts +28 -28
  86. package/dist/core/src/utils/vdom.d.ts +34 -34
  87. package/dist/core/src/utils/weak-maps.d.ts +56 -56
  88. package/dist/index.js +7 -7
  89. package/dist/index.js.map +1 -1
  90. package/dist/index.mjs +9 -0
  91. package/dist/index.mjs.map +1 -0
  92. package/package.json +12 -9
  93. package/dist/index.esm.js +0 -9
  94. package/dist/index.esm.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("slate"),require("lodash.toarray"),require("dom7"),require("lodash.foreach"),require("nanoid"),require("lodash.throttle"),require("snabbdom"),require("lodash.camelcase"),require("is-hotkey"),require("lodash.debounce"),require("lodash.clonedeep"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.toarray","dom7","lodash.foreach","nanoid","lodash.throttle","snabbdom","lodash.camelcase","is-hotkey","lodash.debounce","lodash.clonedeep","@uppy/core","@uppy/xhr-upload"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).WangEditorCore={},e.slate,e.toArray,e.$,e.forEach$1,null,e.throttle,e.snabbdom,e.camelCase,e.isHotkey,e.debounce,e.cloneDeep,e.Uppy,e.XHRUpload)}(this,(function(e,t,n,r,o,i,a,s,l,u,c,f,d,p){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=h(t),v=h(n),y=h(r),m=h(o),b=h(a),w=h(l),x=h(c),E=h(f),S=h(d),O=h(p),k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e){var t={exports:{}};return e(t,t.exports),t.exports}var T,N,M=function(e){return e&&e.Math===Math&&e},L=M("object"==typeof globalThis&&globalThis)||M("object"==typeof window&&window)||M("object"==typeof self&&self)||M("object"==typeof k&&k)||M("object"==typeof k&&k)||function(){return this}()||Function("return this")(),R=function(e){try{return!!e()}catch(e){return!0}},P=!R((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=!R((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),j=Function.prototype.call,A=D?j.bind(j):function(){return j.apply(j,arguments)},I={}.propertyIsEnumerable,_=Object.getOwnPropertyDescriptor,F=_&&!I.call({1:2},1)?function(e){var t=_(this,e);return!!t&&t.enumerable}:I,B={f:F},$=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},W=Function.prototype,H=W.call,V=D&&W.bind.bind(H,H),z=D?V:function(e){return function(){return H.apply(e,arguments)}},U=z({}.toString),K=z("".slice),q=function(e){return K(U(e),8,-1)},G=Object,J=z("".split),Y=R((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"===q(e)?J(e,""):G(e)}:G,X=function(e){return null==e},Q=TypeError,Z=function(e){if(X(e))throw new Q("Can't call method on "+e);return e},ee=function(e){return Y(Z(e))},te="object"==typeof document&&document.all,ne=void 0===te&&void 0!==te?function(e){return"function"==typeof e||e===te}:function(e){return"function"==typeof e},re=function(e){return"object"==typeof e?null!==e:ne(e)},oe=function(e,t){return arguments.length<2?(n=L[e],ne(n)?n:void 0):L[e]&&L[e][t];var n},ie=z({}.isPrototypeOf),ae=L.navigator,se=ae&&ae.userAgent,le=se?String(se):"",ue=L.process,ce=L.Deno,fe=ue&&ue.versions||ce&&ce.version,de=fe&&fe.v8;de&&(N=(T=de.split("."))[0]>0&&T[0]<4?1:+(T[0]+T[1])),!N&&le&&(!(T=le.match(/Edge\/(\d+)/))||T[1]>=74)&&(T=le.match(/Chrome\/(\d+)/))&&(N=+T[1]);var pe=N,he=L.String,ge=!!Object.getOwnPropertySymbols&&!R((function(){var e=Symbol("symbol detection");return!he(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&pe&&pe<41})),ve=ge&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ye=Object,me=ve?function(e){return"symbol"==typeof e}:function(e){var t=oe("Symbol");return ne(t)&&ie(t.prototype,ye(e))},be=String,we=function(e){try{return be(e)}catch(e){return"Object"}},xe=TypeError,Ee=function(e){if(ne(e))return e;throw new xe(we(e)+" is not a function")},Se=function(e,t){var n=e[t];return X(n)?void 0:Ee(n)},Oe=TypeError,ke=Object.defineProperty,Ce=function(e,t){try{ke(L,e,{value:t,configurable:!0,writable:!0})}catch(n){L[e]=t}return t},Te=C((function(e){var t="__core-js_shared__",n=e.exports=L[t]||Ce(t,{});(n.versions||(n.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"})})),Ne=function(e,t){return Te[e]||(Te[e]=t||{})},Me=Object,Le=function(e){return Me(Z(e))},Re=z({}.hasOwnProperty),Pe=Object.hasOwn||function(e,t){return Re(Le(e),t)},De=0,je=Math.random(),Ae=z(1..toString),Ie=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++De+je,36)},_e=L.Symbol,Fe=Ne("wks"),Be=ve?_e.for||_e:_e&&_e.withoutSetter||Ie,$e=function(e){return Pe(Fe,e)||(Fe[e]=ge&&Pe(_e,e)?_e[e]:Be("Symbol."+e)),Fe[e]},We=TypeError,He=$e("toPrimitive"),Ve=function(e,t){if(!re(e)||me(e))return e;var n,r=Se(e,He);if(r){if(void 0===t&&(t="default"),n=A(r,e,t),!re(n)||me(n))return n;throw new We("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&ne(n=e.toString)&&!re(r=A(n,e)))return r;if(ne(n=e.valueOf)&&!re(r=A(n,e)))return r;if("string"!==t&&ne(n=e.toString)&&!re(r=A(n,e)))return r;throw new Oe("Can't convert object to primitive value")}(e,t)},ze=function(e){var t=Ve(e,"string");return me(t)?t:t+""},Ue=L.document,Ke=re(Ue)&&re(Ue.createElement),qe=function(e){return Ke?Ue.createElement(e):{}},Ge=!P&&!R((function(){return 7!==Object.defineProperty(qe("div"),"a",{get:function(){return 7}}).a})),Je=Object.getOwnPropertyDescriptor,Ye={f:P?Je:function(e,t){if(e=ee(e),t=ze(t),Ge)try{return Je(e,t)}catch(e){}if(Pe(e,t))return $(!A(B.f,e,t),e[t])}},Xe=P&&R((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Qe=String,Ze=TypeError,et=function(e){if(re(e))return e;throw new Ze(Qe(e)+" is not an object")},tt=TypeError,nt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,ot="enumerable",it="configurable",at="writable",st={f:P?Xe?function(e,t,n){if(et(e),t=ze(t),et(n),"function"==typeof e&&"prototype"===t&&"value"in n&&at in n&&!n[at]){var r=rt(e,t);r&&r[at]&&(e[t]=n.value,n={configurable:it in n?n[it]:r[it],enumerable:ot in n?n[ot]:r[ot],writable:!1})}return nt(e,t,n)}:nt:function(e,t,n){if(et(e),t=ze(t),et(n),Ge)try{return nt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new tt("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},lt=P?function(e,t,n){return st.f(e,t,$(1,n))}:function(e,t,n){return e[t]=n,e},ut=Function.prototype,ct=P&&Object.getOwnPropertyDescriptor,ft=Pe(ut,"name"),dt={EXISTS:ft,PROPER:ft&&"something"===function(){}.name,CONFIGURABLE:ft&&(!P||P&&ct(ut,"name").configurable)},pt=z(Function.toString);ne(Te.inspectSource)||(Te.inspectSource=function(e){return pt(e)});var ht,gt,vt,yt=Te.inspectSource,mt=L.WeakMap,bt=ne(mt)&&/native code/.test(String(mt)),wt=Ne("keys"),xt=function(e){return wt[e]||(wt[e]=Ie(e))},Et={},St="Object already initialized",Ot=L.TypeError,kt=L.WeakMap;if(bt||Te.state){var Ct=Te.state||(Te.state=new kt);Ct.get=Ct.get,Ct.has=Ct.has,Ct.set=Ct.set,ht=function(e,t){if(Ct.has(e))throw new Ot(St);return t.facade=e,Ct.set(e,t),t},gt=function(e){return Ct.get(e)||{}},vt=function(e){return Ct.has(e)}}else{var Tt=xt("state");Et[Tt]=!0,ht=function(e,t){if(Pe(e,Tt))throw new Ot(St);return t.facade=e,lt(e,Tt,t),t},gt=function(e){return Pe(e,Tt)?e[Tt]:{}},vt=function(e){return Pe(e,Tt)}}var Nt={set:ht,get:gt,has:vt,enforce:function(e){return vt(e)?gt(e):ht(e,{})},getterFor:function(e){return function(t){var n;if(!re(t)||(n=gt(t)).type!==e)throw new Ot("Incompatible receiver, "+e+" required");return n}}},Mt=C((function(e){var t=dt.CONFIGURABLE,n=Nt.enforce,r=Nt.get,o=String,i=Object.defineProperty,a=z("".slice),s=z("".replace),l=z([].join),u=P&&!R((function(){return 8!==i((function(){}),"length",{value:8}).length})),c=String(String).split("String"),f=e.exports=function(e,r,f){"Symbol("===a(o(r),0,7)&&(r="["+s(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),f&&f.getter&&(r="get "+r),f&&f.setter&&(r="set "+r),(!Pe(e,"name")||t&&e.name!==r)&&(P?i(e,"name",{value:r,configurable:!0}):e.name=r),u&&f&&Pe(f,"arity")&&e.length!==f.arity&&i(e,"length",{value:f.arity});try{f&&Pe(f,"constructor")&&f.constructor?P&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=n(e);return Pe(d,"source")||(d.source=l(c,"string"==typeof r?r:"")),e};Function.prototype.toString=f((function(){return ne(this)&&r(this).source||yt(this)}),"toString")})),Lt=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(ne(n)&&Mt(n,i,r),r.global)o?e[t]=n:Ce(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:st.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Rt=Math.ceil,Pt=Math.floor,Dt=Math.trunc||function(e){var t=+e;return(t>0?Pt:Rt)(t)},jt=function(e){var t=+e;return t!=t||0===t?0:Dt(t)},At=Math.max,It=Math.min,_t=function(e,t){var n=jt(e);return n<0?At(n+t,0):It(n,t)},Ft=Math.min,Bt=function(e){var t=jt(e);return t>0?Ft(t,9007199254740991):0},$t=function(e){return Bt(e.length)},Wt=function(e){return function(t,n,r){var o=ee(t),i=$t(o);if(0===i)return!e&&-1;var a,s=_t(r,i);if(e&&n!=n){for(;i>s;)if((a=o[s++])!=a)return!0}else for(;i>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},Ht={includes:Wt(!0),indexOf:Wt(!1)},Vt=Ht.indexOf,zt=z([].push),Ut=function(e,t){var n,r=ee(e),o=0,i=[];for(n in r)!Pe(Et,n)&&Pe(r,n)&&zt(i,n);for(;t.length>o;)Pe(r,n=t[o++])&&(~Vt(i,n)||zt(i,n));return i},Kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qt=Kt.concat("length","prototype"),Gt={f:Object.getOwnPropertyNames||function(e){return Ut(e,qt)}},Jt={f:Object.getOwnPropertySymbols},Yt=z([].concat),Xt=oe("Reflect","ownKeys")||function(e){var t=Gt.f(et(e)),n=Jt.f;return n?Yt(t,n(e)):t},Qt=function(e,t,n){for(var r=Xt(t),o=st.f,i=Ye.f,a=0;a<r.length;a++){var s=r[a];Pe(e,s)||n&&Pe(n,s)||o(e,s,i(t,s))}},Zt=/#|\.prototype\./,en=function(e,t){var n=nn[tn(e)];return n===on||n!==rn&&(ne(t)?R(t):!!t)},tn=en.normalize=function(e){return String(e).replace(Zt,".").toLowerCase()},nn=en.data={},rn=en.NATIVE="N",on=en.POLYFILL="P",an=en,sn=Ye.f,ln=function(e,t){var n,r,o,i,a,s=e.target,l=e.global,u=e.stat;if(n=l?L:u?L[s]||Ce(s,{}):L[s]&&L[s].prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=sn(n,r))&&a.value:n[r],!an(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Qt(i,o)}(e.sham||o&&o.sham)&&lt(i,"sham",!0),Lt(n,r,i,e)}},un=Object.keys||function(e){return Ut(e,Kt)},cn=R((function(){un(1)}));ln({target:"Object",stat:!0,forced:cn},{keys:function(e){return un(Le(e))}});var fn={};fn[$e("toStringTag")]="z";var dn="[object z]"===String(fn),pn=$e("toStringTag"),hn=Object,gn="Arguments"===q(function(){return arguments}()),vn=dn?q:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=hn(e),pn))?n:gn?q(t):"Object"===(r=q(t))&&ne(t.callee)?"Arguments":r},yn=dn?{}.toString:function(){return"[object "+vn(this)+"]"};dn||Lt(Object.prototype,"toString",yn,{unsafe:!0});var mn={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},bn=qe("span").classList,wn=bn&&bn.constructor&&bn.constructor.prototype,xn=wn===Object.prototype?void 0:wn,En=function(e){if("Function"===q(e))return z(e)},Sn=En(En.bind),On=function(e,t){return Ee(e),void 0===t?e:D?Sn(e,t):function(){return e.apply(t,arguments)}},kn=Array.isArray||function(e){return"Array"===q(e)},Cn=function(){},Tn=oe("Reflect","construct"),Nn=/^\s*(?:class|function)\b/,Mn=z(Nn.exec),Ln=!Nn.test(Cn),Rn=function(e){if(!ne(e))return!1;try{return Tn(Cn,[],e),!0}catch(e){return!1}},Pn=function(e){if(!ne(e))return!1;switch(vn(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ln||!!Mn(Nn,yt(e))}catch(e){return!0}};Pn.sham=!0;var Dn=!Tn||R((function(){var e;return Rn(Rn.call)||!Rn(Object)||!Rn((function(){e=!0}))||e}))?Pn:Rn,jn=$e("species"),An=Array,In=function(e,t){return new(function(e){var t;return kn(e)&&(t=e.constructor,(Dn(t)&&(t===An||kn(t.prototype))||re(t)&&null===(t=t[jn]))&&(t=void 0)),void 0===t?An:t}(e))(0===t?0:t)},_n=z([].push),Fn=function(e){var t=1===e,n=2===e,r=3===e,o=4===e,i=6===e,a=7===e,s=5===e||i;return function(l,u,c,f){for(var d,p,h=Le(l),g=Y(h),v=$t(g),y=On(u,c),m=0,b=f||In,w=t?b(l,v):n||a?b(l,0):void 0;v>m;m++)if((s||m in g)&&(p=y(d=g[m],m,h),e))if(t)w[m]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:_n(w,d)}else switch(e){case 4:return!1;case 7:_n(w,d)}return i?-1:r||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)},$n=function(e,t){var n=[][e];return!!n&&R((function(){n.call(null,t||function(){return 1},1)}))},Wn=Bn.forEach,Hn=$n("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Vn=function(e){if(e&&e.forEach!==Hn)try{lt(e,"forEach",Hn)}catch(t){e.forEach=Hn}};for(var zn in mn)mn[zn]&&Vn(L[zn]&&L[zn].prototype);
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("slate"),require("lodash.toarray"),require("dom7"),require("lodash.foreach"),require("nanoid"),require("lodash.throttle"),require("snabbdom"),require("lodash.camelcase"),require("is-hotkey"),require("lodash.debounce"),require("lodash.clonedeep"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.toarray","dom7","lodash.foreach","nanoid","lodash.throttle","snabbdom","lodash.camelcase","is-hotkey","lodash.debounce","lodash.clonedeep","@uppy/core","@uppy/xhr-upload"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorCore={},t.require$$1,t.toArray,t.$,t.forEach,null,t.throttle,t.snabbdom,t.camelCase,t.isHotkey,t.debounce,t.cloneDeep,t.Uppy,t.XHRUpload)}(this,(function(t,e,n,r,o,i,a,s,u,l,c,f,d,h){"use strict";var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var v,m,y={};function b(){if(m)return v;m=1;var t=function(t){return t&&t.Math===Math&&t};return v=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var w,x,E,S,O,k,C,T,N={};function R(){return x?w:(x=1,w=function(t){try{return!!t()}catch(t){return!0}})}function L(){if(S)return E;S=1;var t=R();return E=!t((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function M(){if(k)return O;k=1;var t=R();return O=!t((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function P(){if(T)return C;T=1;var t=M(),e=Function.prototype.call;return C=t?e.bind(e):function(){return e.apply(e,arguments)},C}var D,A,j,I,$,F,_,B,W,H,V,U,z,K,q,J,G,Y,X,Q,Z,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ft,dt,ht,pt,gt,vt,mt,yt,bt,wt={};function xt(){if(D)return wt;D=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return wt.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,wt}function Et(){return j?A:(j=1,A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function St(){if($)return I;$=1;var t=M(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return I=t?r:function(t){return function(){return n.apply(t,arguments)}},I}function Ot(){if(_)return F;_=1;var t=St(),e=t({}.toString),n=t("".slice);return F=function(t){return n(e(t),8,-1)}}function kt(){if(W)return B;W=1;var t=St(),e=R(),n=Ot(),r=Object,o=t("".split);return B=e((function(){return!r("z").propertyIsEnumerable(0)}))?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function Ct(){return V?H:(V=1,H=function(t){return null==t})}function Tt(){if(z)return U;z=1;var t=Ct(),e=TypeError;return U=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function Nt(){if(q)return K;q=1;var t=kt(),e=Tt();return K=function(n){return t(e(n))}}function Rt(){if(G)return J;G=1;var t="object"==typeof document&&document.all;return J=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function Lt(){if(X)return Y;X=1;var t=Rt();return Y=function(e){return"object"==typeof e?null!==e:t(e)}}function Mt(){if(Z)return Q;Z=1;var t=b(),e=Rt();return Q=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Q}function Pt(){if(et)return tt;et=1;var t=St();return tt=t({}.isPrototypeOf)}function Dt(){if(rt)return nt;rt=1;var t=b().navigator,e=t&&t.userAgent;return nt=e?String(e):""}function At(){if(it)return ot;it=1;var t,e,n=b(),r=Dt(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),ot=e}function jt(){if(st)return at;st=1;var t=At(),e=R(),n=b().String;return at=!!Object.getOwnPropertySymbols&&!e((function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}))}function It(){if(lt)return ut;lt=1;var t=jt();return ut=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function $t(){if(ft)return ct;ft=1;var t=Mt(),e=Rt(),n=Pt(),r=It(),o=Object;return ct=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ft(){if(ht)return dt;ht=1;var t=String;return dt=function(e){try{return t(e)}catch(t){return"Object"}}}function _t(){if(gt)return pt;gt=1;var t=Rt(),e=Ft(),n=TypeError;return pt=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Bt(){if(mt)return vt;mt=1;var t=_t(),e=Ct();return vt=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function Wt(){if(bt)return yt;bt=1;var t=P(),e=Rt(),n=Lt(),r=TypeError;return yt=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}var Ht,Vt,Ut,zt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le,ce,fe,de={exports:{}};function he(){return Vt?Ht:(Vt=1,Ht=!1)}function pe(){if(zt)return Ut;zt=1;var t=b(),e=Object.defineProperty;return Ut=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function ge(){if(Kt)return de.exports;Kt=1;var t=he(),e=b(),n=pe(),r="__core-js_shared__",o=de.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:t?"pure":"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"}),de.exports}function ve(){if(Jt)return qt;Jt=1;var t=ge();return qt=function(e,n){return t[e]||(t[e]=n||{})}}function me(){if(Yt)return Gt;Yt=1;var t=Tt(),e=Object;return Gt=function(n){return e(t(n))}}function ye(){if(Qt)return Xt;Qt=1;var t=St(),e=me(),n=t({}.hasOwnProperty);return Xt=Object.hasOwn||function(t,r){return n(e(t),r)}}function be(){if(te)return Zt;te=1;var t=St(),e=0,n=Math.random(),r=t(1..toString);return Zt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function we(){if(ne)return ee;ne=1;var t=b(),e=ve(),n=ye(),r=be(),o=jt(),i=It(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return ee=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function xe(){if(oe)return re;oe=1;var t=P(),e=Lt(),n=$t(),r=Bt(),o=Wt(),i=we(),a=TypeError,s=i("toPrimitive");return re=function(i,u){if(!e(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=t(c,i,u),!e(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Ee(){if(ae)return ie;ae=1;var t=xe(),e=$t();return ie=function(n){var r=t(n,"string");return e(r)?r:r+""}}function Se(){if(ue)return se;ue=1;var t=b(),e=Lt(),n=t.document,r=e(n)&&e(n.createElement);return se=function(t){return r?n.createElement(t):{}}}function Oe(){if(ce)return le;ce=1;var t=L(),e=R(),n=Se();return le=!t&&!e((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function ke(){if(fe)return N;fe=1;var t=L(),e=P(),n=xt(),r=Et(),o=Nt(),i=Ee(),a=ye(),s=Oe(),u=Object.getOwnPropertyDescriptor;return N.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},N}var Ce,Te,Ne,Re,Le,Me,Pe,De={};function Ae(){if(Te)return Ce;Te=1;var t=L(),e=R();return Ce=t&&e((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function je(){if(Re)return Ne;Re=1;var t=Lt(),e=String,n=TypeError;return Ne=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Ie(){if(Le)return De;Le=1;var t=L(),e=Oe(),n=Ae(),r=je(),o=Ee(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return De.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},De}function $e(){if(Pe)return Me;Pe=1;var t=L(),e=Ie(),n=Et();return Me=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var Fe,_e,Be,We,He,Ve,Ue,ze,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze={exports:{}};function tn(){if(_e)return Fe;_e=1;var t=L(),e=ye(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,o=e(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!t||t&&r(n,"name").configurable);return Fe={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function en(){if(We)return Be;We=1;var t=St(),e=Rt(),n=ge(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Be=n.inspectSource}function nn(){if(Ve)return He;Ve=1;var t=b(),e=Rt(),n=t.WeakMap;return He=e(n)&&/native code/.test(String(n))}function rn(){if(ze)return Ue;ze=1;var t=ve(),e=be(),n=t("keys");return Ue=function(t){return n[t]||(n[t]=e(t))}}function on(){return qe?Ke:(qe=1,Ke={})}function an(){if(Ge)return Je;Ge=1;var t,e,n,r=nn(),o=b(),i=Lt(),a=$e(),s=ye(),u=ge(),l=rn(),c=on(),f="Object already initialized",d=o.TypeError,h=o.WeakMap;if(r||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,t=function(t,e){if(p.has(t))throw new d(f);return e.facade=t,p.set(t,e),e},e=function(t){return p.get(t)||{}},n=function(t){return p.has(t)}}else{var g=l("state");c[g]=!0,t=function(t,e){if(s(t,g))throw new d(f);return e.facade=t,a(t,g,e),e},e=function(t){return s(t,g)?t[g]:{}},n=function(t){return s(t,g)}}return Je={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!i(n)||(r=e(n)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r}}}}function sn(){if(Ye)return Ze.exports;Ye=1;var t=St(),e=R(),n=Rt(),r=ye(),o=L(),i=tn().CONFIGURABLE,a=en(),s=an(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=t("".slice),h=t("".replace),p=t([].join),g=o&&!e((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),m=Ze.exports=function(t,e,n){"Symbol("===d(c(e),0,7)&&(e="["+h(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||i&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&r(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=u(t);return r(a,"source")||(a.source=p(v,"string"==typeof e?e:"")),t};return Function.prototype.toString=m((function(){return n(this)&&l(this).source||a(this)}),"toString"),Ze.exports}function un(){if(Qe)return Xe;Qe=1;var t=Rt(),e=Ie(),n=sn(),r=pe();return Xe=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(t(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(t){}u?o[i]=a:e.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var ln,cn,fn,dn,hn,pn,gn,vn,mn,yn,bn,wn,xn,En,Sn,On,kn,Cn={};function Tn(){if(dn)return fn;dn=1;var t=function(){if(cn)return ln;cn=1;var t=Math.ceil,e=Math.floor;return ln=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},ln}();return fn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function Nn(){if(pn)return hn;pn=1;var t=Tn(),e=Math.max,n=Math.min;return hn=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Rn(){if(vn)return gn;vn=1;var t=Tn(),e=Math.min;return gn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Ln(){if(yn)return mn;yn=1;var t=Rn();return mn=function(e){return t(e.length)}}function Mn(){if(wn)return bn;wn=1;var t=Nt(),e=Nn(),n=Ln(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return bn={includes:r(!0),indexOf:r(!1)}}function Pn(){if(En)return xn;En=1;var t=St(),e=ye(),n=Nt(),r=Mn().indexOf,o=on(),i=t([].push);return xn=function(t,a){var s,u=n(t),l=0,c=[];for(s in u)!e(o,s)&&e(u,s)&&i(c,s);for(;a.length>l;)e(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function Dn(){return On?Sn:(On=1,Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function An(){if(kn)return Cn;kn=1;var t=Pn(),e=Dn().concat("length","prototype");return Cn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},Cn}var jn,In,$n,Fn,_n,Bn,Wn,Hn,Vn,Un,zn,Kn,qn={};function Jn(){return jn||(jn=1,qn.f=Object.getOwnPropertySymbols),qn}function Gn(){if($n)return In;$n=1;var t=Mt(),e=St(),n=An(),r=Jn(),o=je(),i=e([].concat);return In=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},In}function Yn(){if(_n)return Fn;_n=1;var t=ye(),e=Gn(),n=ke(),r=Ie();return Fn=function(o,i,a){for(var s=e(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];t(o,f)||a&&t(a,f)||u(o,f,l(i,f))}},Fn}function Xn(){if(Wn)return Bn;Wn=1;var t=R(),e=Rt(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Bn=r}function Qn(){if(Vn)return Hn;Vn=1;var t=b(),e=ke().f,n=$e(),r=un(),o=pe(),i=Yn(),a=Xn();return Hn=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?t:v?t[p]||o(p,{}):t[p]&&t[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=e(l,c))&&h.value:l[c],!a(g?c:p+(v?".":"#")+c,s.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(s.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,s)}}}function Zn(){if(zn)return Un;zn=1;var t=Pn(),e=Dn();return Un=Object.keys||function(n){return t(n,e)}}!function(){if(Kn)return y;Kn=1;var t=Qn(),e=me(),n=Zn();t({target:"Object",stat:!0,forced:R()((function(){n(1)}))},{keys:function(t){return n(e(t))}})}();var tr,er,nr,rr,or,ir,ar,sr={};function ur(){if(er)return tr;er=1;var t={};return t[we()("toStringTag")]="z",tr="[object z]"===String(t)}function lr(){if(rr)return nr;rr=1;var t=ur(),e=Rt(),n=Ot(),r=we()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return nr=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}!function(){if(ar)return sr;ar=1;var t=ur(),e=un(),n=function(){if(ir)return or;ir=1;var t=ur(),e=lr();return or=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var cr,fr,dr,hr,pr,gr,vr,mr,yr,br,wr,xr,Er,Sr,Or,kr,Cr,Tr,Nr,Rr,Lr,Mr,Pr,Dr={};function Ar(){return fr?cr:(fr=1,cr={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})}function jr(){if(hr)return dr;hr=1;var t=Se()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return dr=e===Object.prototype?void 0:e}function Ir(){if(gr)return pr;gr=1;var t=Ot(),e=St();return pr=function(n){if("Function"===t(n))return e(n)}}function $r(){if(mr)return vr;mr=1;var t=Ir(),e=_t(),n=M(),r=t(t.bind);return vr=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},vr}function Fr(){if(br)return yr;br=1;var t=Ot();return yr=Array.isArray||function(e){return"Array"===t(e)}}function _r(){if(xr)return wr;xr=1;var t=St(),e=R(),n=Rt(),r=lr(),o=Mt(),i=en(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=t(u.exec),c=!u.test(a),f=function(t){if(!n(t))return!1;try{return s(a,[],t),!0}catch(t){return!1}},d=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(t))}catch(t){return!0}};return d.sham=!0,wr=!s||e((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?d:f}function Br(){if(Sr)return Er;Sr=1;var t=Fr(),e=_r(),n=Lt(),r=we()("species"),o=Array;return Er=function(i){var a;return t(i)&&(a=i.constructor,(e(a)&&(a===o||t(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function Wr(){if(kr)return Or;kr=1;var t=Br();return Or=function(e,n){return new(t(e))(0===n?0:n)}}function Hr(){if(Tr)return Cr;Tr=1;var t=$r(),e=St(),n=kt(),r=me(),o=Ln(),i=Wr(),a=e([].push),s=function(e){var s=1===e,u=2===e,l=3===e,c=4===e,f=6===e,d=7===e,h=5===e||f;return function(p,g,v,m){for(var y,b,w=r(p),x=n(w),E=o(x),S=t(g,v),O=0,k=m||i,C=s?k(p,E):u||d?k(p,0):void 0;E>O;O++)if((h||O in x)&&(b=S(y=x[O],O,w),e))if(s)C[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:a(C,y)}else switch(e){case 4:return!1;case 7:a(C,y)}return f?-1:l||c?c:C}};return Cr={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function Vr(){if(Rr)return Nr;Rr=1;var t=R();return Nr=function(e,n){var r=[][e];return!!r&&t((function(){r.call(null,n||function(){return 1},1)}))}}!function(){if(Pr)return Dr;Pr=1;var t=b(),e=Ar(),n=jr(),r=function(){if(Mr)return Lr;Mr=1;var t=Hr().forEach,e=Vr()("forEach");return Lr=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Lr}(),o=$e(),i=function(t){if(t&&t.forEach!==r)try{o(t,"forEach",r)}catch(e){t.forEach=r}};for(var a in e)e[a]&&i(t[a]&&t[a].prototype);i(n)}();var Ur,zr,Kr={},qr={};function Jr(){if(Ur)return qr;
2
2
  /*!
3
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
- *
5
- * Copyright (c) 2014-2017, Jon Schlinkert.
6
- * Released under the MIT License.
7
- */
8
- function Un(e){return"[object Object]"===Object.prototype.toString.call(e)}Vn(xn);var Kn=function(e){var t,n;return!1!==Un(e)&&(void 0===(t=e.constructor)||!1!==Un(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))},qn=Object.defineProperty({isPlainObject:Kn},"__esModule",{value:!0}),Gn=function(e){return qn.isPlainObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||g.default.Operation.isOperationList(e.redos[0].operations))&&(0===e.undos.length||g.default.Operation.isOperationList(e.undos[0].operations))},Jn=new WeakMap,Yn=new WeakMap,Xn={isHistoryEditor:function(e){return Gn(e.history)&&g.default.Editor.isEditor(e)},isMerging:function(e){return Yn.get(e)},isSaving:function(e){return Jn.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=Xn.isMerging(e);Yn.set(e,!0),t(),Yn.set(e,n)},withoutMerging:function(e,t){var n=Xn.isMerging(e);Yn.set(e,!1),t(),Yn.set(e,n)},withoutSaving:function(e,t){var n=Xn.isSaving(e);Jn.set(e,!1),t(),Jn.set(e,n)}};function Qn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var er=function(e,t){return!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!g.default.Path.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!g.default.Path.equals(e.path,t.path))},tr=function(e,t){return"set_selection"!==e.type},nr=function(e){var t=e,n=t.apply;return t.history={undos:[],redos:[]},t.redo=function(){var e=t.history,n=e.redos;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&g.default.Transforms.setSelection(t,r.selectionBefore),Xn.withoutSaving(t,(function(){g.default.Editor.withoutNormalizing(t,(function(){var e,n=Qn(r.operations);try{for(n.s();!(e=n.n()).done;){var o=e.value;t.apply(o)}}catch(e){n.e(e)}finally{n.f()}}))})),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=function(){var e=t.history,n=e.undos;if(n.length>0){var r=n[n.length-1];Xn.withoutSaving(t,(function(){g.default.Editor.withoutNormalizing(t,(function(){var e,n=Qn(r.operations.map(g.default.Operation.inverse).reverse());try{for(n.s();!(e=n.n()).done;){var o=e.value;t.apply(o)}}catch(e){n.e(e)}finally{n.f()}r.selectionBefore&&g.default.Transforms.setSelection(t,r.selectionBefore)}))})),t.writeHistory("redos",r),e.undos.pop()}},t.apply=function(e){var r=t.operations,o=t.history,i=o.undos,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],l=Xn.isSaving(t),u=Xn.isMerging(t);if(null==l&&(l=tr(e)),l){if(null==u&&(u=null!=a&&(0!==r.length||er(e,s))),a&&u)a.operations.push(e);else{var c={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",c)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},t.writeHistory=function(e,n){t.history[e].push(n)},t},rr=String,or=function(e){if("Symbol"===vn(e))throw new TypeError("Cannot convert a Symbol value to a string");return rr(e)},ir=function(){var e=et(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ar=RegExp.prototype,sr=function(e){var t=e.flags;return void 0!==t||"flags"in ar||Pe(e,"flags")||!ie(ar,e)?t:A(ir,e)},lr=dt.PROPER,ur="toString",cr=RegExp.prototype,fr=cr[ur],dr=R((function(){return"/a/b"!==fr.call({source:"a",flags:"b"})})),pr=lr&&fr.name!==ur;(dr||pr)&&Lt(cr,ur,(function(){var e=et(this);return"/"+or(e.source)+"/"+or(sr(e))}),{unsafe:!0});var hr=function(e,t,n){var r,o;et(e);try{if(!(r=Se(e,"return"))){if("throw"===t)throw n;return n}r=A(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return et(r),n},gr=function(e,t,n,r){try{return r?t(et(n)[0],n[1]):t(n)}catch(t){hr(e,"throw",t)}},vr={},yr=$e("iterator"),mr=Array.prototype,br=function(e){return void 0!==e&&(vr.Array===e||mr[yr]===e)},wr=function(e,t,n){P?st.f(e,t,$(0,n)):e[t]=n},xr=$e("iterator"),Er=function(e){if(!X(e))return Se(e,xr)||Se(e,"@@iterator")||vr[vn(e)]},Sr=TypeError,Or=function(e,t){var n=arguments.length<2?Er(e):t;if(Ee(n))return et(A(n,e));throw new Sr(we(e)+" is not iterable")},kr=Array,Cr=$e("iterator"),Tr=!1;try{var Nr=0,Mr={next:function(){return{done:!!Nr++}},return:function(){Tr=!0}};Mr[Cr]=function(){return this},Array.from(Mr,(function(){throw 2}))}catch(e){}var Lr=function(e,t){try{if(!t&&!Tr)return!1}catch(e){return!1}var n=!1;try{var r={};r[Cr]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Rr=!Lr((function(e){Array.from(e)}));ln({target:"Array",stat:!0,forced:Rr},{from:function(e){var t=Le(e),n=Dn(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=On(o,r>2?arguments[2]:void 0));var a,s,l,u,c,f,d=Er(t),p=0;if(!d||this===kr&&br(d))for(a=$t(t),s=n?new this(a):kr(a);a>p;p++)f=i?o(t[p],p):t[p],wr(s,p,f);else for(s=n?new this:[],c=(u=Or(t,d)).next;!(l=A(c,u)).done;p++)f=i?gr(u,o,[l.value,p],!0):l.value,wr(s,p,f);return s.length=p,s}});var Pr,Dr=P&&!Xe?Object.defineProperties:function(e,t){et(e);for(var n,r=ee(t),o=un(t),i=o.length,a=0;i>a;)st.f(e,n=o[a++],r[n]);return e},jr={f:Dr},Ar=oe("document","documentElement"),Ir="prototype",_r="script",Fr=xt("IE_PROTO"),Br=function(){},$r=function(e){return"<"+_r+">"+e+"</"+_r+">"},Wr=function(e){e.write($r("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hr=function(){try{Pr=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Hr="undefined"!=typeof document?document.domain&&Pr?Wr(Pr):(t=qe("iframe"),n="java"+_r+":",t.style.display="none",Ar.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write($r("document.F=Object")),e.close(),e.F):Wr(Pr);for(var r=Kt.length;r--;)delete Hr[Ir][Kt[r]];return Hr()};Et[Fr]=!0;var Vr=Object.create||function(e,t){var n;return null!==e?(Br[Ir]=et(e),n=new Br,Br[Ir]=null,n[Fr]=e):n=Hr(),void 0===t?n:jr.f(n,t)},zr=st.f,Ur=$e("unscopables"),Kr=Array.prototype;void 0===Kr[Ur]&&zr(Kr,Ur,{configurable:!0,value:Vr(null)});var qr=function(e){Kr[Ur][e]=!0},Gr=Ht.includes,Jr=R((function(){return!Array(1).includes()}));ln({target:"Array",proto:!0,forced:Jr},{includes:function(e){return Gr(this,e,arguments.length>1?arguments[1]:void 0)}}),qr("includes");var Yr=z([].join),Xr=Y!==Object||!$n("join",",");ln({target:"Array",proto:!0,forced:Xr},{join:function(e){return Yr(ee(this),void 0===e?",":e)}});var Qr=$e("species"),Zr=function(e){return pe>=51||!R((function(){var t=[];return(t.constructor={})[Qr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},eo=Bn.map,to=Zr("map");ln({target:"Array",proto:!0,forced:!to},{map:function(e){return eo(this,e,arguments.length>1?arguments[1]:void 0)}});var no=!R((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ro=xt("IE_PROTO"),oo=Object,io=oo.prototype,ao=no?oo.getPrototypeOf:function(e){var t=Le(e);if(Pe(t,ro))return t[ro];var n=t.constructor;return ne(n)&&t instanceof n?n.prototype:t instanceof oo?io:null};ln({target:"Reflect",stat:!0},{get:function e(t,n){var r,o,i=arguments.length<3?t:arguments[2];return et(t)===i?t[n]:(r=Ye.f(t,n))?function(e){return void 0!==e&&(Pe(e,"value")||Pe(e,"writable"))}(r)?r.value:void 0===r.get?void 0:A(r.get,i):re(o=ao(t))?e(o,n,i):void 0}});var so=L.RegExp,lo=R((function(){var e=so("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),uo=lo||R((function(){return!so("a","y").sticky})),co={BROKEN_CARET:lo||R((function(){var e=so("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:uo,UNSUPPORTED_Y:lo},fo=L.RegExp,po=R((function(){var e=fo(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ho=L.RegExp,go=R((function(){var e=ho("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),vo=Nt.get,yo=Ne("native-string-replace",String.prototype.replace),mo=RegExp.prototype.exec,bo=mo,wo=z("".charAt),xo=z("".indexOf),Eo=z("".replace),So=z("".slice),Oo=function(){var e=/a/,t=/b*/g;return A(mo,e,"a"),A(mo,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ko=co.BROKEN_CARET,Co=void 0!==/()??/.exec("")[1];(Oo||Co||ko||po||go)&&(bo=function(e){var t,n,r,o,i,a,s,l=this,u=vo(l),c=or(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=A(bo,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,p=ko&&l.sticky,h=A(ir,l),g=l.source,v=0,y=c;if(p&&(h=Eo(h,"y",""),-1===xo(h,"g")&&(h+="g"),y=So(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==wo(c,l.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,v++),n=new RegExp("^(?:"+g+")",h)),Co&&(n=new RegExp("^"+g+"$(?!\\s)",h)),Oo&&(r=l.lastIndex),o=A(mo,p?n:l,y),p?o?(o.input=So(o.input,v),o[0]=So(o[0],v),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:Oo&&o&&(l.lastIndex=l.global?o.index+o[0].length:r),Co&&o&&o.length>1&&A(yo,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=Vr(null),i=0;i<d.length;i++)a[(s=d[i])[0]]=o[s[1]];return o});var To=bo;ln({target:"RegExp",proto:!0,forced:/./.exec!==To},{exec:To});var No,Mo=$e("match"),Lo=function(e){var t;return re(e)&&(void 0!==(t=e[Mo])?!!t:"RegExp"===q(e))},Ro=TypeError,Po=function(e){if(Lo(e))throw new Ro("The method doesn't accept regular expressions");return e},Do=$e("match"),jo=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Do]=!1,"/./"[e](t)}catch(e){}}return!1},Ao=Ye.f,Io=En("".slice),_o=Math.min,Fo=jo("endsWith"),Bo=!(Fo||(No=Ao(String.prototype,"endsWith"),!No||No.writable));ln({target:"String",proto:!0,forced:!Bo&&!Fo},{endsWith:function(e){var t=or(Z(this));Po(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:_o(Bt(n),r),i=or(e);return Io(t,o-i.length,o)===i}});var $o=z("".indexOf);ln({target:"String",proto:!0,forced:!jo("includes")},{includes:function(e){return!!~$o(or(Z(this)),or(Po(e)),arguments.length>1?arguments[1]:void 0)}});var Wo,Ho,Vo,zo=z("".charAt),Uo=z("".charCodeAt),Ko=z("".slice),qo=function(e){return function(t,n){var r,o,i=or(Z(t)),a=jt(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=Uo(i,a))<55296||r>56319||a+1===s||(o=Uo(i,a+1))<56320||o>57343?e?zo(i,a):r:e?Ko(i,a,a+2):o-56320+(r-55296<<10)+65536}},Go={codeAt:qo(!1),charAt:qo(!0)},Jo=$e("iterator"),Yo=!1;[].keys&&("next"in(Vo=[].keys())?(Ho=ao(ao(Vo)))!==Object.prototype&&(Wo=Ho):Yo=!0);var Xo=!re(Wo)||R((function(){var e={};return Wo[Jo].call(e)!==e}));Xo&&(Wo={}),ne(Wo[Jo])||Lt(Wo,Jo,(function(){return this}));var Qo={IteratorPrototype:Wo,BUGGY_SAFARI_ITERATORS:Yo},Zo=st.f,ei=$e("toStringTag"),ti=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Pe(e,ei)&&Zo(e,ei,{configurable:!0,value:t})},ni=Qo.IteratorPrototype,ri=function(){return this},oi=String,ii=TypeError,ai=function(e){if(function(e){return re(e)||null===e}(e))return e;throw new ii("Can't set "+oi(e)+" as a prototype")},si=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=function(e,t,n){try{return z(Ee(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}(Object.prototype,"__proto__","set"),e(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Z(n),ai(r),re(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0),li=dt.PROPER,ui=dt.CONFIGURABLE,ci=Qo.IteratorPrototype,fi=Qo.BUGGY_SAFARI_ITERATORS,di=$e("iterator"),pi="keys",hi="values",gi="entries",vi=function(){return this},yi=function(e,t,n,r,o,i,a){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Vr(ni,{next:$(+!r,n)}),ti(e,o,!1),vr[o]=ri}(n,t,r);var s,l,u,c=function(e){if(e===o&&g)return g;if(!fi&&e&&e in p)return p[e];switch(e){case pi:case hi:case gi:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,p=e.prototype,h=p[di]||p["@@iterator"]||o&&p[o],g=!fi&&h||c(o),v="Array"===t&&p.entries||h;if(v&&(s=ao(v.call(new e)))!==Object.prototype&&s.next&&(ao(s)!==ci&&(si?si(s,ci):ne(s[di])||Lt(s,di,vi)),ti(s,f,!0)),li&&o===hi&&h&&h.name!==hi&&(ui?lt(p,"name",hi):(d=!0,g=function(){return A(h,this)})),o)if(l={values:c(hi),keys:i?g:c(pi),entries:c(gi)},a)for(u in l)(fi||d||!(u in p))&&Lt(p,u,l[u]);else ln({target:t,proto:!0,forced:fi||d},l);return p[di]!==g&&Lt(p,di,g,{name:o}),vr[t]=g,l},mi=function(e,t){return{value:e,done:t}},bi=Go.charAt,wi="String Iterator",xi=Nt.set,Ei=Nt.getterFor(wi);yi(String,"String",(function(e){xi(this,{type:wi,string:or(e),index:0})}),(function(){var e,t=Ei(this),n=t.string,r=t.index;return r>=n.length?mi(void 0,!0):(e=bi(n,r),t.index+=e.length,mi(e,!1))}));var Si=Function.prototype,Oi=Si.apply,ki=Si.call,Ci="object"==typeof Reflect&&Reflect.apply||(D?ki.bind(Oi):function(){return ki.apply(Oi,arguments)}),Ti=$e("species"),Ni=RegExp.prototype,Mi=function(e,t,n,r){var o=$e(e),i=!R((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!R((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ti]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=/./[o],l=t(o,""[e],(function(e,t,n,r,o){var a=t.exec;return a===To||a===Ni.exec?i&&!o?{done:!0,value:A(s,t,n,r)}:{done:!0,value:A(e,n,t,r)}:{done:!1}}));Lt(String.prototype,e,l[0]),Lt(Ni,o,l[1])}r&&lt(Ni[o],"sham",!0)},Li=Go.charAt,Ri=function(e,t,n){return t+(n?Li(e,t).length:1)},Pi=Math.floor,Di=z("".charAt),ji=z("".replace),Ai=z("".slice),Ii=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_i=/\$([$&'`]|\d{1,2})/g,Fi=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=_i;return void 0!==o&&(o=Le(o),l=Ii),ji(i,l,(function(i,l){var u;switch(Di(l,0)){case"$":return"$";case"&":return e;case"`":return Ai(t,0,n);case"'":return Ai(t,a);case"<":u=o[Ai(l,1,-1)];break;default:var c=+l;if(0===c)return i;if(c>s){var f=Pi(c/10);return 0===f?i:f<=s?void 0===r[f-1]?Di(l,1):r[f-1]+Di(l,1):i}u=r[c-1]}return void 0===u?"":u}))},Bi=TypeError,$i=function(e,t){var n=e.exec;if(ne(n)){var r=A(n,e,t);return null!==r&&et(r),r}if("RegExp"===q(e))return A(To,e,t);throw new Bi("RegExp#exec called on incompatible receiver")},Wi=$e("replace"),Hi=Math.max,Vi=Math.min,zi=z([].concat),Ui=z([].push),Ki=z("".indexOf),qi=z("".slice),Gi="$0"==="a".replace(/./,"$0"),Ji=!!/./[Wi]&&""===/./[Wi]("a","$0");Mi("replace",(function(e,t,n){var r=Ji?"$":"$0";return[function(e,n){var r=Z(this),o=X(e)?void 0:Se(e,Wi);return o?A(o,e,r,n):A(t,or(r),e,n)},function(e,o){var i=et(this),a=or(e);if("string"==typeof o&&-1===Ki(o,r)&&-1===Ki(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var l=ne(o);l||(o=or(o));var u,c=i.global;c&&(u=i.unicode,i.lastIndex=0);for(var f,d=[];null!==(f=$i(i,a))&&(Ui(d,f),c);){""===or(f[0])&&(i.lastIndex=Ri(a,Bt(i.lastIndex),u))}for(var p,h="",g=0,v=0;v<d.length;v++){for(var y,m=or((f=d[v])[0]),b=Hi(Vi(jt(f.index),a.length),0),w=[],x=1;x<f.length;x++)Ui(w,void 0===(p=f[x])?p:String(p));var E=f.groups;if(l){var S=zi([m],w,b,a);void 0!==E&&Ui(S,E),y=or(Ci(o,void 0,S))}else y=Fi(m,a,b,w,E,o);b>=g&&(h+=qi(a,g,b)+y,g=b+m.length)}return h+qi(a,g)}]}),!!R((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Gi||Ji);var Yi,Xi=/"/g,Qi=z("".replace);ln({target:"String",proto:!0,forced:(Yi="anchor",R((function(){var e=""[Yi]('"');return e!==e.toLowerCase()||e.split('"').length>3})))},{anchor:function(e){return t="a",n="name",r=e,o=or(Z(this)),i="<"+t,""!==n&&(i+=" "+n+'="'+Qi(or(r),Xi,"&quot;")+'"'),i+">"+o+"</"+t+">";var t,n,r,o,i}});var Zi=function(e,t){return Zi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zi(e,t)};function ea(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Zi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ta=function(){return ta=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ta.apply(this,arguments)};function na(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ra(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function oa(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var ia=Bn.find,aa="find",sa=!0;aa in[]&&Array(1)[aa]((function(){sa=!1})),ln({target:"Array",proto:!0,forced:sa},{find:function(e){return ia(this,e,arguments.length>1?arguments[1]:void 0)}}),qr(aa),ln({global:!0,forced:L.globalThis!==L},{globalThis:L});const la=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];var ua=TypeError,ca=function(e){if(e>9007199254740991)throw ua("Maximum allowed index exceeded");return e},fa=$e("isConcatSpreadable"),da=pe>=51||!R((function(){var e=[];return e[fa]=!1,e.concat()[0]!==e})),pa=function(e){if(!re(e))return!1;var t=e[fa];return void 0!==t?!!t:kn(e)},ha=!da||!Zr("concat");ln({target:"Array",proto:!0,arity:1,forced:ha},{concat:function(e){var t,n,r,o,i,a=Le(this),s=In(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(pa(i=-1===t?a:arguments[t]))for(o=$t(i),ca(l+o),n=0;n<o;n++,l++)n in i&&wr(s,l,i[n]);else ca(l+1),wr(s,l++,i);return s.length=l,s}});var ga,va,ya,ma,ba=function(e){return le.slice(0,e.length)===e},wa=ba("Bun/")?"BUN":ba("Cloudflare-Workers")?"CLOUDFLARE":ba("Deno/")?"DENO":ba("Node.js/")?"NODE":L.Bun&&"string"==typeof Bun.version?"BUN":L.Deno&&"object"==typeof Deno.version?"DENO":"process"===q(L.process)?"NODE":L.window&&L.document?"BROWSER":"REST",xa="NODE"===wa,Ea=function(e,t,n){return n.get&&Mt(n.get,t,{getter:!0}),n.set&&Mt(n.set,t,{setter:!0}),st.f(e,t,n)},Sa=$e("species"),Oa=function(e){var t=oe(e);P&&t&&!t[Sa]&&Ea(t,Sa,{configurable:!0,get:function(){return this}})},ka=TypeError,Ca=function(e,t){if(ie(t,e))return e;throw new ka("Incorrect invocation")},Ta=TypeError,Na=$e("species"),Ma=function(e,t){var n,r=et(e).constructor;return void 0===r||X(n=et(r)[Na])?t:function(e){if(Dn(e))return e;throw new Ta(we(e)+" is not a constructor")}(n)},La=z([].slice),Ra=TypeError,Pa=/(?:ipad|iphone|ipod).*applewebkit/i.test(le),Da=L.setImmediate,ja=L.clearImmediate,Aa=L.process,Ia=L.Dispatch,_a=L.Function,Fa=L.MessageChannel,Ba=L.String,$a=0,Wa={},Ha="onreadystatechange";R((function(){ga=L.location}));var Va=function(e){if(Pe(Wa,e)){var t=Wa[e];delete Wa[e],t()}},za=function(e){return function(){Va(e)}},Ua=function(e){Va(e.data)},Ka=function(e){L.postMessage(Ba(e),ga.protocol+"//"+ga.host)};Da&&ja||(Da=function(e){!function(e,t){if(e<t)throw new Ra("Not enough arguments")}(arguments.length,1);var t=ne(e)?e:_a(e),n=La(arguments,1);return Wa[++$a]=function(){Ci(t,void 0,n)},va($a),$a},ja=function(e){delete Wa[e]},xa?va=function(e){Aa.nextTick(za(e))}:Ia&&Ia.now?va=function(e){Ia.now(za(e))}:Fa&&!Pa?(ma=(ya=new Fa).port2,ya.port1.onmessage=Ua,va=On(ma.postMessage,ma)):L.addEventListener&&ne(L.postMessage)&&!L.importScripts&&ga&&"file:"!==ga.protocol&&!R(Ka)?(va=Ka,L.addEventListener("message",Ua,!1)):va=Ha in qe("script")?function(e){Ar.appendChild(qe("script"))[Ha]=function(){Ar.removeChild(this),Va(e)}}:function(e){setTimeout(za(e),0)});var qa={set:Da,clear:ja},Ga=Object.getOwnPropertyDescriptor,Ja=function(){this.head=null,this.tail=null};Ja.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ya,Xa,Qa,Za,es,ts=Ja,ns=/ipad|iphone|ipod/i.test(le)&&"undefined"!=typeof Pebble,rs=/web0s(?!.*chrome)/i.test(le),os=qa.set,is=L.MutationObserver||L.WebKitMutationObserver,as=L.document,ss=L.process,ls=L.Promise,us=function(e){if(!P)return L[e];var t=Ga(L,e);return t&&t.value}("queueMicrotask");if(!us){var cs=new ts,fs=function(){var e,t;for(xa&&(e=ss.domain)&&e.exit();t=cs.get();)try{t()}catch(e){throw cs.head&&Ya(),e}e&&e.enter()};Pa||xa||rs||!is||!as?!ns&&ls&&ls.resolve?((Za=ls.resolve(void 0)).constructor=ls,es=On(Za.then,Za),Ya=function(){es(fs)}):xa?Ya=function(){ss.nextTick(fs)}:(os=On(os,L),Ya=function(){os(fs)}):(Xa=!0,Qa=as.createTextNode(""),new is(fs).observe(Qa,{characterData:!0}),Ya=function(){Qa.data=Xa=!Xa}),us=function(e){cs.head||Ya(),cs.add(e)}}var ds=us,ps=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},hs=L.Promise;hs&&hs.prototype;var gs,vs,ys,ms=$e("species"),bs=!1,ws=ne(L.PromiseRejectionEvent),xs=an("Promise",(function(){var e=yt(hs),t=e!==String(hs);if(!t&&66===pe)return!0;if(!pe||pe<51||!/native code/.test(e)){var n=new hs((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[ms]=r,!(bs=n.then((function(){}))instanceof r))return!0}return!(t||"BROWSER"!==wa&&"DENO"!==wa||ws)})),Es={CONSTRUCTOR:xs,REJECTION_EVENT:ws,SUBCLASSING:bs},Ss=TypeError,Os=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new Ss("Bad Promise constructor");t=e,n=r})),this.resolve=Ee(t),this.reject=Ee(n)},ks={f:function(e){return new Os(e)}},Cs=qa.set,Ts="Promise",Ns=Es.CONSTRUCTOR,Ms=Es.REJECTION_EVENT,Ls=Es.SUBCLASSING,Rs=Nt.getterFor(Ts),Ps=Nt.set,Ds=hs&&hs.prototype,js=hs,As=Ds,Is=L.TypeError,_s=L.document,Fs=L.process,Bs=ks.f,$s=Bs,Ws=!!(_s&&_s.createEvent&&L.dispatchEvent),Hs="unhandledrejection",Vs=function(e){var t;return!(!re(e)||!ne(t=e.then))&&t},zs=function(e,t){var n,r,o,i=t.value,a=1===t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Js(t),t.rejection=1),!0===s?n=i:(c&&c.enter(),n=s(i),c&&(c.exit(),o=!0)),n===e.promise?u(new Is("Promise-chain cycle")):(r=Vs(n))?A(r,n,l,u):l(n)):u(i)}catch(e){c&&!o&&c.exit(),u(e)}},Us=function(e,t){e.notified||(e.notified=!0,ds((function(){for(var n,r=e.reactions;n=r.get();)zs(n,e);e.notified=!1,t&&!e.rejection&&qs(e)})))},Ks=function(e,t,n){var r,o;Ws?((r=_s.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),L.dispatchEvent(r)):r={promise:t,reason:n},!Ms&&(o=L["on"+e])?o(r):e===Hs&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},qs=function(e){A(Cs,L,(function(){var t,n=e.facade,r=e.value;if(Gs(e)&&(t=ps((function(){xa?Fs.emit("unhandledRejection",r,n):Ks(Hs,n,r)})),e.rejection=xa||Gs(e)?2:1,t.error))throw t.value}))},Gs=function(e){return 1!==e.rejection&&!e.parent},Js=function(e){A(Cs,L,(function(){var t=e.facade;xa?Fs.emit("rejectionHandled",t):Ks("rejectionhandled",t,e.value)}))},Ys=function(e,t,n){return function(r){e(t,r,n)}},Xs=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Us(e,!0))},Qs=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new Is("Promise can't be resolved itself");var r=Vs(t);r?ds((function(){var n={done:!1};try{A(r,t,Ys(Qs,n,e),Ys(Xs,n,e))}catch(t){Xs(n,t,e)}})):(e.value=t,e.state=1,Us(e,!1))}catch(t){Xs({done:!1},t,e)}}};if(Ns&&(As=(js=function(e){Ca(this,As),Ee(e),A(gs,this);var t=Rs(this);try{e(Ys(Qs,t),Ys(Xs,t))}catch(e){Xs(t,e)}}).prototype,(gs=function(e){Ps(this,{type:Ts,done:!1,notified:!1,parent:!1,reactions:new ts,rejection:!1,state:0,value:null})}).prototype=Lt(As,"then",(function(e,t){var n=Rs(this),r=Bs(Ma(this,js));return n.parent=!0,r.ok=!ne(e)||e,r.fail=ne(t)&&t,r.domain=xa?Fs.domain:void 0,0===n.state?n.reactions.add(r):ds((function(){zs(r,n)})),r.promise})),vs=function(){var e=new gs,t=Rs(e);this.promise=e,this.resolve=Ys(Qs,t),this.reject=Ys(Xs,t)},ks.f=Bs=function(e){return e===js||undefined===e?new vs(e):$s(e)},ne(hs)&&Ds!==Object.prototype)){ys=Ds.then,Ls||Lt(Ds,"then",(function(e,t){var n=this;return new js((function(e,t){A(ys,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Ds.constructor}catch(e){}si&&si(Ds,As)}ln({global:!0,constructor:!0,wrap:!0,forced:Ns},{Promise:js}),ti(js,Ts,!1),Oa(Ts);var Zs=TypeError,el=function(e,t){this.stopped=e,this.result=t},tl=el.prototype,nl=function(e,t,n){var r,o,i,a,s,l,u,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),g=On(t,c),v=function(e){return r&&hr(r,"normal",e),new el(!0,e)},y=function(e){return f?(et(e),h?g(e[0],e[1],v):g(e[0],e[1])):h?g(e,v):g(e)};if(d)r=e.iterator;else if(p)r=e;else{if(!(o=Er(e)))throw new Zs(we(e)+" is not iterable");if(br(o)){for(i=0,a=$t(e);a>i;i++)if((s=y(e[i]))&&ie(tl,s))return s;return new el(!1)}r=Or(e,o)}for(l=d?e.next:r.next;!(u=A(l,r)).done;){try{s=y(u.value)}catch(e){hr(r,"throw",e)}if("object"==typeof s&&s&&ie(tl,s))return s}return new el(!1)},rl=Es.CONSTRUCTOR||!Lr((function(e){hs.all(e).then(void 0,(function(){}))}));ln({target:"Promise",stat:!0,forced:rl},{all:function(e){var t=this,n=ks.f(t),r=n.resolve,o=n.reject,i=ps((function(){var n=Ee(t.resolve),i=[],a=0,s=1;nl(e,(function(e){var l=a++,u=!1;s++,A(n,t,e).then((function(e){u||(u=!0,i[l]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise}});var ol=Es.CONSTRUCTOR,il=hs&&hs.prototype;if(ln({target:"Promise",proto:!0,forced:ol,real:!0},{catch:function(e){return this.then(void 0,e)}}),ne(hs)){var al=oe("Promise").prototype.catch;il.catch!==al&&Lt(il,"catch",al,{unsafe:!0})}ln({target:"Promise",stat:!0,forced:rl},{race:function(e){var t=this,n=ks.f(t),r=n.reject,o=ps((function(){var o=Ee(t.resolve);nl(e,(function(e){A(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),ln({target:"Promise",stat:!0,forced:Es.CONSTRUCTOR},{reject:function(e){var t=ks.f(this);return(0,t.reject)(e),t.promise}});var sl=Es.CONSTRUCTOR;function ll(e){Promise.resolve().then(e)}oe("Promise"),ln({target:"Promise",stat:!0,forced:sl},{resolve:function(e){return function(e,t){if(et(e),re(t)&&t.constructor===e)return t;var n=ks.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var ul=function(e){return Object.prototype.toString.call(e)};r.css&&(y.default.fn.css=r.css),r.append&&(y.default.fn.append=r.append),r.addClass&&(y.default.fn.addClass=r.addClass),r.removeClass&&(y.default.fn.removeClass=r.removeClass),r.hasClass&&(y.default.fn.hasClass=r.hasClass),r.on&&(y.default.fn.on=r.on),r.focus&&(y.default.fn.focus=r.focus),r.attr&&(y.default.fn.attr=r.attr),r.removeAttr&&(y.default.fn.removeAttr=r.removeAttr),r.hide&&(y.default.fn.hide=r.hide),r.show&&(y.default.fn.show=r.show),r.offset&&(y.default.fn.offset=r.offset),r.width&&(y.default.fn.width=r.width),r.height&&(y.default.fn.height=r.height),r.parent&&(y.default.fn.parent=r.parent),r.parents&&(y.default.fn.parents=r.parents),r.is&&(y.default.fn.is=r.is),r.dataset&&(y.default.fn.dataset=r.dataset),r.val&&(y.default.fn.val=r.val),r.text&&(y.default.fn.text=r.text),r.html&&(y.default.fn.html=r.html),r.children&&(y.default.fn.children=r.children),r.remove&&(y.default.fn.remove=r.remove),r.find&&(y.default.fn.find=r.find),r.each&&(y.default.fn.each=r.each),r.empty&&(y.default.fn.empty=r.empty);var cl,fl=function(e){return"[object HTMLDocument]"===ul(e)},dl=function(e){return"[object ShadowRoot]"===ul(e)},pl=function(e){return"[object DataTransfer]"===ul(e)},hl=/\[object HTML([A-Z][a-z]*)*Element\]/,gl=function(e){return hl.test(ul(e))},vl=globalThis.Node,yl=globalThis.Comment,ml=globalThis.Element,bl=globalThis.Text,wl=globalThis.Range,xl=globalThis.Selection,El=globalThis.StaticRange,Sl=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},Ol=function(e){return Cl(e)&&8===e.nodeType},kl=function(e){return Cl(e)&&1===e.nodeType},Cl=function(e){return null!=e&&"number"==typeof e.nodeType},Tl=function(e){return"[object Selection]"===ul(e)},Nl=function(e){return Cl(e)&&3===e.nodeType},Ml=function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length},Ll=function(e){var t,n=ra(e,2),r=n[0],o=n[1];if(kl(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=ra(Dl(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;kl(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=jl(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Rl=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Pl=function(e){var t,n,r;return null!==(t=window.document.getElementById(e))&&void 0!==t?t:(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Dl=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(Ol(o)||kl(o)&&0===o.childNodes.length||kl(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},jl=function(e,t,n){return ra(Dl(e,t,n),1)[0]},Al=function(e){var t,n,r="";if(Nl(e)&&e.nodeValue)return e.nodeValue;if(kl(e)){try{for(var o=na(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Al(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Il(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if(++n>1e4)break;var o=r.nodeName;if(1===r.nodeType){var i=o.toLowerCase();if(la.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var l=s-1;l>=0;l--)t.push(a[l])}}return null}function _l(e,t){if(!gl(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r--;){var o=n[r],i=o.nodeType;3==i?t(o,e):1!=i&&9!=i&&11!=i||_l(o,t)}}function Fl(t){if(0===t.length)return"";var n=t[0];return n.nodeType!==e.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}e.NodeType=void 0,(cl=e.NodeType||(e.NodeType={}))[cl.ELEMENT_NODE=1]="ELEMENT_NODE",cl[cl.TEXT_NODE=3]="TEXT_NODE",cl[cl.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",cl[cl.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",cl[cl.COMMENT_NODE=8]="COMMENT_NODE",cl[cl.DOCUMENT_NODE=9]="DOCUMENT_NODE",cl[cl.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",cl[cl.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var Bl=0,$l=function(){this.id="".concat(Bl++)};void 0!==globalThis.navigator&&void 0!==globalThis.window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var Wl="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Hl="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);"undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var Vl="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),zl="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ul="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Kl="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent);"undefined"!=typeof navigator&&/.*QQBrowser/.test(navigator.userAgent);var ql=!Ul&&!zl&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Gl=st.f,Jl="Array Iterator",Yl=Nt.set,Xl=Nt.getterFor(Jl),Ql=yi(Array,"Array",(function(e,t){Yl(this,{type:Jl,target:ee(e),index:0,kind:t})}),(function(){var e=Xl(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,mi(void 0,!0);switch(e.kind){case"keys":return mi(n,!1);case"values":return mi(t[n],!1)}return mi([n,t[n]],!1)}),"values"),Zl=vr.Arguments=vr.Array;if(qr("keys"),qr("values"),qr("entries"),P&&"values"!==Zl.name)try{Gl(Zl,"name",{value:"values"})}catch(e){}var eu=!R((function(){return Object.isExtensible(Object.preventExtensions({}))})),tu=function(e,t,n){for(var r in t)Lt(e,r,t[r],n);return e},nu=Gt.f,ru="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ou={f:function(e){return ru&&"Window"===q(e)?function(e){try{return nu(e)}catch(e){return La(ru)}}(e):nu(ee(e))}},iu=R((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),au=Object.isExtensible,su=R((function(){au(1)}))||iu?function(e){return!!re(e)&&((!iu||"ArrayBuffer"!==q(e))&&(!au||au(e)))}:au,lu=C((function(e){var t=st.f,n=!1,r=Ie("meta"),o=0,i=function(e){t(e,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=Gt.f,t=z([].splice),o={};o[r]=1,e(o).length&&(Gt.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===r){t(o,i,1);break}return o},ln({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ou.f}))},fastKey:function(e,t){if(!re(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Pe(e,r)){if(!su(e))return"F";if(!t)return"E";i(e)}return e[r].objectID},getWeakData:function(e,t){if(!Pe(e,r)){if(!su(e))return!0;if(!t)return!1;i(e)}return e[r].weakData},onFreeze:function(e){return eu&&n&&su(e)&&!Pe(e,r)&&i(e),e}};Et[r]=!0})),uu=function(e,t,n){var r,o;return si&&ne(r=t.constructor)&&r!==n&&re(o=r.prototype)&&o!==n.prototype&&si(e,o),e},cu=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=L[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=z(s[e]);Lt(s,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(o&&!re(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return o&&!re(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(o&&!re(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(an(e,!ne(a)||!(o||s.forEach&&!R((function(){(new a).entries().next()})))))l=n.getConstructor(t,e,r,i),lu.enable();else if(an(e,!0)){var f=new l,d=f[i](o?{}:-0,1)!==f,p=R((function(){f.has(1)})),h=Lr((function(e){new a(e)})),g=!o&&R((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));h||((l=t((function(e,t){Ca(e,s);var n=uu(new a,e,l);return X(t)||nl(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=l),(p||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(i),o&&s.clear&&delete s.clear}return u[e]=l,ln({global:!0,constructor:!0,forced:l!==a},u),ti(l,e),o||n.setStrong(l,e,r),l},fu=lu.getWeakData,du=Nt.set,pu=Nt.getterFor,hu=Bn.find,gu=Bn.findIndex,vu=z([].splice),yu=0,mu=function(e){return e.frozen||(e.frozen=new bu)},bu=function(){this.entries=[]},wu=function(e,t){return hu(e.entries,(function(e){return e[0]===t}))};bu.prototype={get:function(e){var t=wu(this,e);if(t)return t[1]},has:function(e){return!!wu(this,e)},set:function(e,t){var n=wu(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=gu(this.entries,(function(t){return t[0]===e}));return~t&&vu(this.entries,t,1),!!~t}};var xu,Eu={getConstructor:function(e,t,n,r){var o=e((function(e,o){Ca(e,i),du(e,{type:t,id:yu++,frozen:null}),X(o)||nl(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=pu(t),s=function(e,t,n){var r=a(e),o=fu(et(t),!0);return!0===o?mu(r).set(t,n):o[r.id]=n,e};return tu(i,{delete:function(e){var t=a(this);if(!re(e))return!1;var n=fu(e);return!0===n?mu(t).delete(e):n&&Pe(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!re(e))return!1;var n=fu(e);return!0===n?mu(t).has(e):n&&Pe(n,t.id)}}),tu(i,n?{get:function(e){var t=a(this);if(re(e)){var n=fu(e);if(!0===n)return mu(t).get(e);if(n)return n[t.id]}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},Su=Nt.enforce,Ou=Object,ku=Array.isArray,Cu=Ou.isExtensible,Tu=Ou.isFrozen,Nu=Ou.isSealed,Mu=Ou.freeze,Lu=Ou.seal,Ru=!L.ActiveXObject&&"ActiveXObject"in L,Pu=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Du=cu("WeakMap",Pu,Eu),ju=Du.prototype,Au=z(ju.set);if(bt)if(Ru){xu=Eu.getConstructor(Pu,"WeakMap",!0),lu.enable();var Iu=z(ju.delete),_u=z(ju.has),Fu=z(ju.get);tu(ju,{delete:function(e){if(re(e)&&!Cu(e)){var t=Su(this);return t.frozen||(t.frozen=new xu),Iu(this,e)||t.frozen.delete(e)}return Iu(this,e)},has:function(e){if(re(e)&&!Cu(e)){var t=Su(this);return t.frozen||(t.frozen=new xu),_u(this,e)||t.frozen.has(e)}return _u(this,e)},get:function(e){if(re(e)&&!Cu(e)){var t=Su(this);return t.frozen||(t.frozen=new xu),_u(this,e)?Fu(this,e):t.frozen.get(e)}return Fu(this,e)},set:function(e,t){if(re(e)&&!Cu(e)){var n=Su(this);n.frozen||(n.frozen=new xu),_u(this,e)?Au(this,e,t):n.frozen.set(e,t)}else Au(this,e,t);return this}})}else eu&&R((function(){var e=Mu([]);return Au(new Du,e,1),!Tu(e)}))&&tu(ju,{set:function(e,t){var n;return ku(e)&&(Tu(e)?n=Mu:Nu(e)&&(n=Lu)),Au(this,e,t),n&&n(e),this}});var Bu=$e("iterator"),$u=Ql.values,Wu=function(e,t){if(e){if(e[Bu]!==$u)try{lt(e,Bu,$u)}catch(t){e[Bu]=$u}if(ti(e,t,!0),mn[t])for(var n in Ql)if(e[n]!==Ql[n])try{lt(e,n,Ql[n])}catch(t){e[n]=Ql[n]}}};for(var Hu in mn)Wu(L[Hu]&&L[Hu].prototype,Hu);Wu(xn,"DOMTokenList");var Vu=new WeakMap,zu=new WeakMap,Uu=new WeakMap,Ku=new WeakMap,qu=new WeakMap,Gu=new WeakMap,Ju=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Qu=new WeakMap,Zu=new WeakMap,ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,rc=new WeakMap,oc=new WeakMap,ic=new WeakMap,ac=new WeakMap,sc=new WeakMap,lc=new WeakMap,uc=new WeakMap,cc=new WeakMap,fc=new WeakMap,dc=new WeakMap,pc=new WeakMap,hc={getWindow:function(e){var t=uc.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=lc.get(t);return n||(n=new $l,lc.set(t,n)),n},setNewKey:function(e){var t=new $l;lc.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=rc.get(o);if(null==i){if(t.Editor.isEditor(o))return r;break}var a=nc.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=hc.toDOMNode(e,e),n=t.getRootNode();return(fl(n)||dl(n))&&null!=Reflect.get(n,"getSelection")?n:t.ownerDocument},getParentNode:function(e,t){return rc.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=hc.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,n){var r=[hc.findPath(e,n)[0]];return t.Node.get(e,r)},toDOMNode:function(e,n){var r;if(t.Editor.isEditor(n))r=oc.get(e);else{var o=hc.findKey(e,n);r=ac.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=hc.toDOMNode(e,e);try{r=kl(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,n){var r=n.anchor,o=n.focus,i=t.Range.isBackward(n),a=hc.toDOMPoint(e,r),s=t.Range.isCollapsed(n)?a:hc.toDOMPoint(e,o),l=hc.getWindow(e).document.createRange(),u=ra(i?s:a,2),c=u[0],f=u[1],d=ra(i?a:s,2),p=d[0],h=d[1],g=!!(kl(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(kl(p)?p:p.parentElement).getAttribute("data-slate-zero-width");return l.setStart(c,g?1:f),l.setEnd(p,v?1:h),l},toDOMPoint:function(e,n){var r,o,i,a=ra(t.Editor.node(e,n.path),1)[0],s=hc.toDOMNode(e,a);t.Editor.void(e,{at:n})&&(n={path:n.path,offset:0});var l=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var c=na(l),f=c.next();!f.done;f=c.next()){var d=f.value,p=d.childNodes[0];if(null!=p&&null!=p.textContent){var h=p.textContent.length,g=d.getAttribute("data-slate-length"),v=u+(null==g?h:parseInt(g,10));if(n.offset<=v){i=[p,Math.min(h,Math.max(0,n.offset-u))];break}u=v}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(e,t){var n=kl(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?ic.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=hc.toSlateNode(e,n.target),l=hc.findPath(e,s);if(t.Editor.isVoid(e,s)){var u=i.getBoundingClientRect(),c=e.isInline(s)?r-u.left<u.left+u.width-r:o-u.top<u.top+u.height-o,f=t.Editor.point(e,l,{edge:c?"start":"end"}),d=c?t.Editor.before(e,f):t.Editor.after(e,f);if(d)return t.Editor.range(e,d)}var p=this.getWindow(e).document;if(p.caretRangeFromPoint)a=p.caretRangeFromPoint(r,o);else{var h=p.caretPositionFromPoint(r,o);h&&((a=p.createRange()).setStart(h.offsetNode,h.offset),a.setEnd(h.offsetNode,h.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return hc.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,a,s,l,u=r.exactMatch,c=r.suppressThrow;if((Tl(n)?n.anchorNode:n.startContainer)&&(Tl(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,l=Kl&&Rl()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,l=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=hc.toSlatePoint(e,[o,i],{exactMatch:u,suppressThrow:c});if(!f)return null;var d=l?f:hc.toSlatePoint(e,[a,s],{exactMatch:u,suppressThrow:c});if(!d)return null;var p={anchor:f,focus:d};return t.Range.isExpanded(p)&&t.Range.isForward(p)&&kl(a)&&t.Editor.void(e,{at:p.focus,mode:"highest"})&&(p=t.Editor.unhangRange(e,p,{voids:!0})),p},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=ra(o?t:Ll(t),2),s=a[0],l=a[1],u=s.parentNode,c=null,f=0;if(u){var d=u.closest('[data-slate-void="true"]'),p=u.closest("[data-slate-leaf]"),h=null;if(p){c=p.closest('[data-slate-node="text"]');var g=hc.getWindow(e).document.createRange();g.setStart(c,0),g.setEnd(s,l);var y=g.cloneContents();oa(oa([],ra(v.default(y.querySelectorAll("[data-slate-zero-width]"))),!1),ra(v.default(y.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),f=y.textContent.length,h=c}else d&&((p=d.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),f=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach((function(e){f-=e.textContent.length}))):f=1);h&&f===h.textContent.length&&(u.hasAttribute("data-slate-zero-width")||Hl&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(f-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var m=hc.toSlateNode(e,c);return{path:hc.findPath(e,m),offset:f}},hasRange:function(e,n){var r=n.anchor,o=n.focus;return t.Editor.hasPath(e,r.path)&&t.Editor.hasPath(e,o.path)},getNodeType:function(e){return t.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return t.Node.string(e)})).join("")},getSelectedElems:function(e){var n,r,o=[],i=t.Editor.nodes(e,{universal:!0});try{for(var a=na(i),s=a.next();!s.done;s=a.next()){var l=ra(s.value,1)[0];t.Element.isElement(l)&&o.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(e,n){var r=this,o=ra(t.Editor.nodes(e,{match:function(e){return r.checkNodeType(e,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(e){var n=ra(t.Editor.nodes(e,{match:function(e){return t.Text.isText(e)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(e,n){var r=ra(t.Editor.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&ra(o,1)[0]===n},isSelectionAtLineEnd:function(e,n){var r=e.selection;return!!r&&(t.Editor.isEnd(e,r.anchor,n)||t.Editor.isEnd(e,r.focus,n))},getTextarea:function(e){var t=Vu.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Ku.get(e)||null},getHoverbar:function(e){return Gu.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,o,i,a=hc.getTextarea(e).$textArea,s=null==a?void 0:a[0].childNodes;if(s)try{for(var l=na(Array.from(s)),u=l.next();!u.done;u=l.next()){var c=u.value;if(3!==c.nodeType)break;c.remove()}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var f=t.Editor.nodes(e,{match:function(n){return!(!t.Element.isElement(n)||e.isInline(n))},universal:!0});try{for(var d=na(f),p=d.next();!p.done;p=d.next()){var h=p.value;if(null!=h){var g=h[0];_l(hc.toDOMNode(e,g),(function(e,t){var n=y.default(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var n,r,o=t.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var a=na(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(e){var n=e.selection;if(null==n)return!1;if(t.Range.isExpanded(n))return!1;var r=hc.getSelectedNodeByType(e,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(e,n){var r=t.Editor.node(e,n);if(null==r)return!1;var o=ra(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}},gc=1,vc={};var yc={};var mc=Bn.filter,bc=Zr("filter");ln({target:"Array",proto:!0,forced:!bc},{filter:function(e){return mc(this,e,arguments.length>1?arguments[1]:void 0)}});var wc="\t\n\v\f\r                 \u2028\u2029\ufeff",xc=z("".replace),Ec=RegExp("^["+wc+"]+"),Sc=RegExp("(^|[^"+wc+"])["+wc+"]+$"),Oc=function(e){return function(t){var n=or(Z(t));return 1&e&&(n=xc(n,Ec,"")),2&e&&(n=xc(n,Sc,"$1")),n}},kc={start:Oc(1),end:Oc(2),trim:Oc(3)},Cc=dt.PROPER,Tc=kc.trim;ln({target:"String",proto:!0,forced:function(e){return R((function(){return!!wc[e]()||"​…᠎"!=="​…᠎"[e]()||Cc&&wc[e].name!==e}))}("trim")},{trim:function(){return Tc(this)}});var Nc=[];var Mc={};function Lc(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function Rc(e,n){var r=e.type,o=void 0===r?"":r,i=e.children,a=void 0===i?[]:i,s=t.Editor.isVoid(n,e),l="";s||(l=a.map((function(e){return Pc(e,n)})).join(""));var u=function(e){return Mc[e]||Lc}(o),c=u(e,l,n),f="";if(f="string"==typeof c?c:c.html||"",s||Nc.forEach((function(t){return f=t(e,f)})),"string"==typeof c)return f;var d=c.prefix,p=void 0===d?"":d,h=c.suffix,g=void 0===h?"":h;return p&&(f=p+f),g&&(f+=g),f}function Pc(e,n){return t.Element.isElement(e)?Rc(e,n):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(r);var o=hc.getParentsNodes(t,e).some((function(e){return"pre"===hc.getNodeType(e)}));if(o||(r=r.replace(/\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=hc.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Nc.forEach((function(t){return r=t(e,r)})),r}(e,n)}function Dc(e){return"w-e-element-".concat(e)}var jc=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Ac=function(e,t,n){var r=hc.toDOMRange(e,t).getBoundingClientRect(),o=hc.toDOMRange(e,n).getBoundingClientRect();return jc(r,o)&&jc(o,r)},Ic=["span","b","strong","i","em","s","strike","u","font","sub","sup"],_c=[];var Fc=[];var Bc={};var $c=st.f,Wc=function(e,t,n){n in e||$c(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Hc=Gt.f,Vc=Nt.enforce,zc=$e("match"),Uc=L.RegExp,Kc=Uc.prototype,qc=L.SyntaxError,Gc=z(Kc.exec),Jc=z("".charAt),Yc=z("".replace),Xc=z("".indexOf),Qc=z("".slice),Zc=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ef=/a/g,tf=/a/g,nf=new Uc(ef)!==ef,rf=co.MISSED_STICKY,of=co.UNSUPPORTED_Y,af=P&&(!nf||rf||po||go||R((function(){return tf[zc]=!1,Uc(ef)!==ef||Uc(tf)===tf||"/a/i"!==String(Uc(ef,"i"))})));if(an("RegExp",af)){for(var sf=function(e,t){var n,r,o,i,a,s,l=ie(Kc,this),u=Lo(e),c=void 0===t,f=[],d=e;if(!l&&u&&c&&e.constructor===sf)return e;if((u||ie(Kc,e))&&(e=e.source,c&&(t=sr(d))),e=void 0===e?"":or(e),t=void 0===t?"":or(t),d=e,po&&"dotAll"in ef&&(r=!!t&&Xc(t,"s")>-1)&&(t=Yc(t,/s/g,"")),n=t,rf&&"sticky"in ef&&(o=!!t&&Xc(t,"y")>-1)&&of&&(t=Yc(t,/y/g,"")),go&&(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a=Vr(null),s=!1,l=!1,u=0,c="";r<=n;r++){if("\\"===(t=Jc(e,r)))t+=Jc(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:if(o+=t,"?:"===Qc(e,r+1,r+3))continue;Gc(Zc,Qc(e,r+1))&&(r+=2,l=!0),u++;continue;case">"===t&&l:if(""===c||Pe(a,c))throw new qc("Invalid capture group name");a[c]=!0,i[i.length]=[c,u],l=!1,c="";continue}l?c+=t:o+=t}return[o,i]}(e),e=i[0],f=i[1]),a=uu(Uc(e,t),l?this:Kc,sf),(r||o||f.length)&&(s=Vc(a),r&&(s.dotAll=!0,s.raw=sf(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=Jc(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+Jc(e,++r);return o}(e),n)),o&&(s.sticky=!0),f.length&&(s.groups=f)),e!==d)try{lt(a,"source",""===d?"(?:)":d)}catch(e){}return a},lf=Hc(Uc),uf=0;lf.length>uf;)Wc(sf,Uc,lf[uf++]);Kc.constructor=sf,sf.prototype=Kc,Lt(L,"RegExp",sf,{constructor:!0})}Oa("RegExp");var cf=new RegExp(String.fromCharCode(160),"g");function ff(e){return e.replace(cf," ")}function df(e,n){var r=e.length;if(r){var o=e[r-1];if(t.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text=o.text+n,!0}}return!1}function pf(e,t,n){return{type:"paragraph",children:[{text:y.default(e).text().replace(/\s+/gm," ")}]}}function hf(n,r){var o=function(t,n){var r=[];if(null!=t.attr("data-w-e-is-void"))return r;var o=t[0].childNodes;return 1===o.length&&"BR"===o[0].nodeName?(r.push({text:""}),r):(o.forEach((function(t){if(t.nodeType!==e.NodeType.ELEMENT_NODE)if(t.nodeType!==e.NodeType.TEXT_NODE);else{var o=t.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=ff(o),df(r,o)||r.push({text:o}))}else{if("BR"===t.nodeName)return void(df(r,"\n")||r.push({text:"\n"}));var i=vf(y.default(t),n);Array.isArray(i)?i.forEach((function(e){return r.push(e)})):r.push(i)}})),r)}(n,r),i=function(e){for(var t in Bc)if(e[0].matches(t))return Bc[t];return pf}(n),a=i(n[0],o,r);return Array.isArray(a)||(a=[a]),a.forEach((function(e){t.Editor.isVoid(r,e)||(0===o.length&&(e.children=[{text:n.text().replace(/\s+/gm," ")}]),Fc.forEach((function(t){e=t(n[0],e,r)})))})),a}function gf(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(n);var r={text:n=ff(n)};return Fc.forEach((function(n){r=n(e[0],r,t)})),r}function vf(e,t){_c.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=y.default(r(e[0])))}));var n=Fl(e);if("span"===n){if(e.attr("data-w-e-type"))return hf(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes;return Array.from(r).map((function(e){return gf(y.default(e),t)}))}return gf(e,t)}if("code"===n)return"pre"===Fl(e.parent())?hf(e,t):gf(e,t);if(Ic.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return ta(ta({},vf(y.default(r[0]),t)),gf(e,t))}return gf(e,t)}return hf(e,t)}var yf=co.UNSUPPORTED_Y,mf=Math.min,bf=z([].push),wf=z("".slice),xf=!R((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Ef="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;function Sf(e,t,n){var r=y.default(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",(function(){r.removeAttr(t)})),!1)}function Of(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map((function(e){return"<p>".concat(e,"</p>")})).join(""));var r=y.default("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=vf(y.default(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}Mi("split",(function(e,t,n){var r="0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:A(t,this,e,n)}:t;return[function(t,n){var o=Z(this),i=X(t)?void 0:Se(t,e);return i?A(i,t,o,n):A(r,or(o),t,n)},function(e,o){var i=et(this),a=or(e);if(!Ef){var s=n(r,i,a,o,r!==t);if(s.done)return s.value}var l=Ma(i,RegExp),u=i.unicode,c=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(yf?"g":"y"),f=new l(yf?"^(?:"+i.source+")":i,c),d=void 0===o?4294967295:o>>>0;if(0===d)return[];if(0===a.length)return null===$i(f,a)?[a]:[];for(var p=0,h=0,g=[];h<a.length;){f.lastIndex=yf?0:h;var v,y=$i(f,yf?wf(a,h):a);if(null===y||(v=mf(Bt(f.lastIndex+(yf?h:0)),a.length))===p)h=Ri(a,h,u);else{if(bf(g,wf(a,p,h)),g.length===d)return g;for(var m=1;m<=y.length-1;m++)if(bf(g,y[m]),g.length===d)return g;h=p=v}}return bf(g,wf(a,p)),g}]}),Ef||!xf,yf);var kf=lu.fastKey,Cf=Nt.set,Tf=Nt.getterFor,Nf={getConstructor:function(e,t,n,r){var o=e((function(e,o){Ca(e,i),Cf(e,{type:t,index:Vr(null),first:null,last:null,size:0}),P||(e.size=0),X(o)||nl(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=Tf(t),s=function(e,t,n){var r,o,i=a(e),s=l(e,t);return s?s.value=n:(i.last=s={index:o=kf(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=s),r&&(r.next=s),P?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},l=function(e,t){var n,r=a(e),o=kf(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return tu(i,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=Vr(null),P?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=l(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),P?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=On(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),tu(i,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),P&&Ea(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=Tf(t),i=Tf(r);yi(e,t,(function(e,t){Cf(this,{type:r,target:e,state:o(e),kind:t,last:null})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?mi("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,mi(void 0,!0))}),n?"entries":"values",!n,!0),Oa(t)}};cu("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Nf);var Mf=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Lf(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.Transforms.insertNodes(e,n,{mode:"highest"})}var Rf=function(n){var r=n,o=r.onChange,i=r.insertText,a=r.apply,s=r.deleteBackward;return r.insertText=function(e){r.getConfig().readOnly||i(e)},r.apply=function(e){var n,o,i,s,l,u,c,f,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var p=na(t.Editor.levels(r,{at:e.path})),h=p.next();!h.done;h=p.next()){var g=ra(h.value,2),v=g[0],y=g[1],m=hc.findKey(r,v);d.push([y,m])}}catch(e){n={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var b=na(t.Editor.levels(r,{at:t.Path.parent(e.path)})),w=b.next();!w.done;w=b.next()){var x=ra(w.value,2);v=x[0],y=x[1],m=hc.findKey(r,v);d.push([y,m])}}catch(e){i={error:e}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}break;case"move_node":try{for(var E=na(t.Editor.levels(r,{at:t.Path.common(t.Path.parent(e.path),t.Path.parent(e.newPath))})),S=E.next();!S.done;S=E.next()){var O=ra(S.value,2);v=O[0],y=O[1],m=hc.findKey(r,v);d.push([y,m])}}catch(e){l={error:e}}finally{try{S&&!S.done&&(u=E.return)&&u.call(E)}finally{if(l)throw l.error}}}a(e);try{for(var k=na(d),C=k.next();!C.done;C=k.next()){var T=ra(C.value,2);y=T[0],m=T[1],v=ra(t.Editor.node(r,y),1)[0];lc.set(v,m)}}catch(e){c={error:e}}finally{try{C&&!C.done&&(f=k.return)&&f.call(k)}finally{if(c)throw c.error}}},r.deleteBackward=function(e){if("line"!==e)return s(e);if(n.selection&&t.Range.isCollapsed(n.selection)){var o=t.Editor.above(n,{match:function(e){return t.Editor.isBlock(n,e)},at:n.selection});if(o){var i=ra(o,2)[1],a=t.Editor.range(n,i,n.selection.anchor),l=function(e,n){var r=t.Editor.range(e,t.Range.end(n)),o=Array.from(t.Editor.positions(e,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(Ac(e,t.Editor.range(e,o[i]),r))return t.Editor.range(e,o[i],r);if(o.length<2)return t.Editor.range(e,o[o.length-1],r);for(;s!==o.length&&s!==i;)Ac(e,t.Editor.range(e,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return t.Editor.range(e,o[a],r)}(r,a);t.Range.isCollapsed(l)||t.Transforms.delete(n,{at:l})}}},r.onChange=function(){var e=r.selection;null!=e&&fc.set(r,e),r.emit("change"),o()},r.handleTab=function(){r.insertText(" ")},r.getHtml=function(){var e=r.children;return(void 0===e?[]:e).map((function(e){return Pc(e,r)})).join("")},r.getText=function(){var e=r.children;return(void 0===e?[]:e).map((function(e){return t.Node.string(e)})).join("\n")},r.getSelectionText=function(){var e=r.selection;return null==e?"":t.Editor.string(n,e)},r.getElemsByType=function(e,n){var o,i;void 0===n&&(n=!1);var a=[],s=t.Editor.nodes(r,{at:[],universal:!0});try{for(var l=na(s),u=l.next();!u.done;u=l.next()){var c=ra(u.value,1)[0];if(t.Element.isElement(c))if(n?c.type.indexOf(e)>=0:c.type===e){var f=Dc(hc.findKey(r,c).id);a.push(ta(ta({},c),{id:f}))}}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(o)throw o.error}}return a},r.getElemsByTypePrefix=function(e){return r.getElemsByType(e,!0)},r.isEmpty=function(){var e=r.children,n=void 0===e?[]:e;if(n.length>1)return!1;var o=n[0];if(null==o)return!0;if(t.Element.isElement(o)&&"paragraph"===o.type){var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];if(null==s)return!0;if(t.Text.isText(s)&&""===s.text)return!0}return!1},r.clear=function(){t.Transforms.delete(r,{at:{anchor:t.Editor.start(r,[]),focus:t.Editor.end(r,[])}}),0===r.children.length&&t.Transforms.insertNodes(r,[{type:"paragraph",children:[{text:""}]}])},r.getParentNode=function(e){return hc.getParentNode(r,e)},r.dangerouslyInsertHtml=function(n,o){if(void 0===n&&(n=""),void 0===o&&(o=!1),n){var i=document.createElement("div");i.innerHTML=n;var a=Array.from(i.childNodes);if(a=a.filter((function(t){var n=t.nodeType,r=t.nodeName;return n===e.NodeType.TEXT_NODE||n===e.NodeType.ELEMENT_NODE&&!Mf.has(r.toLowerCase())})),0!==a.length){var s=r.selection;if(null!=s){var l=null;if(hc.isSelectedEmptyParagraph(r)&&!o)l=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var u=0;a.forEach((function(t,n){var o=t.nodeType,i=t.nodeName,s=t.textContent,l=void 0===s?"":s;if(o!==e.NodeType.TEXT_NODE)if("BR"!==i){var c=t,f=!1;if(Ic.includes(i.toLowerCase()))f=!0;else for(var d in Bc)if(c.matches(d)){f=!0;break}if(f){var p=vf(y.default(c),r);return Array.isArray(p)?(p.forEach((function(e){return Lf(r,e)})),u++):(Lf(r,p),u++),void(hc.isSelectedVoidNode(r)&&r.move(1))}var h=window.getComputedStyle(c).display;if(!hc.isSelectedEmptyParagraph(r)&&h.indexOf("inline")<0){if(n>=1){var g=a[n-1];"matches"in g&&g.matches("ul:not([data-w-e-type]),ol:not([data-w-e-type])")&&r.insertBreak()}r.insertBreak()}r.dangerouslyInsertHtml(c.innerHTML,!0)}else r.insertText("\n");else{if(!l||!l.trim())return;r.insertNode({text:l})}})),u&&l&&hc.isEmptyPath(r,l)&&t.Transforms.removeNodes(r,{at:l}),i.remove()}}}},r.setHtml=function(e){void 0===e&&(e="");var n=r.isDisabled(),o=r.isFocused(),i=JSON.stringify(r.selection);r.enable(),r.focus(),r.clear();var a=Of(r,null==e?"":e);if(t.Transforms.insertFragment(r,a),o||(r.deselect(),r.blur()),n&&(r.deselect(),r.disable()),r.isFocused())try{r.select(JSON.parse(i))}catch(e){r.select(t.Editor.start(r,[]))}},r},Pf=function(e){return null!=e},Df={object:!0,function:!0,undefined:!0},jf=function(e){if(!function(e){return!!Pf(e)&&hasOwnProperty.call(Df,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}},Af=/^\s*class[\s{/}]/,If=Function.prototype.toString,_f=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!jf(e)}(e)&&!Af.test(If.call(e))},Ff=function(e){return null!=e},Bf=Object.keys,$f=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}()?Object.keys:function(e){return Bf(Ff(e)?Object(e):e)},Wf=Math.max,Hf=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,o,i=Wf(arguments.length,2);for(e=Object(function(e){if(!Ff(e))throw new TypeError("Cannot use null or undefined");return e}(e)),o=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},r=1;r<i;++r)$f(t=arguments[r]).forEach(o);if(void 0!==n)throw n;return e},Vf=Array.prototype.forEach,zf=Object.create,Uf=function(e){var t=zf(null);return Vf.call(arguments,(function(e){Ff(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)})),t},Kf="razdwatrzy",qf=String.prototype.indexOf,Gf="function"==typeof Kf.contains&&!0===Kf.contains("dwa")&&!1===Kf.contains("foo")?String.prototype.contains:function(e){return qf.call(this,e,arguments[1])>-1},Jf=C((function(e){var t=e.exports=function(e,t){var n,r,o,i,a;return arguments.length<2||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],Pf(e)?(n=Gf.call(e,"c"),r=Gf.call(e,"e"),o=Gf.call(e,"w")):(n=o=!0,r=!1),a={value:t,configurable:n,enumerable:r,writable:o},i?Hf(Uf(i),a):a};t.gs=function(e,t,n){var r,o,i,a;return"string"!=typeof e?(i=n,n=t,t=e,e=null):i=arguments[3],Pf(t)?_f(t)?Pf(n)?_f(n)||(i=n,n=void 0):n=void 0:(i=t,t=n=void 0):t=void 0,Pf(e)?(r=Gf.call(e,"c"),o=Gf.call(e,"e")):(r=!0,o=!1),a={get:t,set:n,configurable:r,enumerable:o},i?Hf(Uf(i),a):a}})),Yf=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Xf=C((function(e,t){var n,r,o,i,a,s,l,u=Function.prototype.apply,c=Function.prototype.call,f=Object.create,d=Object.defineProperty,p=Object.defineProperties,h=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return Yf(t),h.call(this,"__ee__")?n=this.__ee__:(n=g.value=f(null),d(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return Yf(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),u.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(Yf(t),!h.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(h.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)u.call(r,this,i)}else switch(arguments.length){case 1:c.call(o,this);break;case 2:c.call(o,this,arguments[1]);break;case 3:c.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];u.call(o,this,i)}},a={on:n,once:r,off:o,emit:i},s={on:Jf(n),once:Jf(r),off:Jf(o),emit:Jf(i)},l=p({},s),e.exports=t=function(e){return null==e?f(l):p(Object(e),s)},t.methods=a}));function Qf(e){var t=dc.get(e);return null==t&&(t=Xf(),dc.set(e,t)),t}var Zf=new WeakMap;function ed(e,t){var n=Zf.get(e);null==n&&(n=new Set,Zf.set(e,n)),n.add(t)}var td=function(e){var t=e;return t.on=function(e,n){var r=Qf(t);if(r.on(e,n),"destroyed"===e&&ed(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),ed(t,o)}},t.once=function(e,n){Qf(t).once(e,n)},t.off=function(e,n){Qf(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Qf(t);if(o.emit.apply(o,oa([e],ra(n),!1)),"destroyed"===e){var i=function(e){return Zf.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){Zf.set(e,new Set)}(t)}},t};function nd(e){var t=hc.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function rd(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=nd(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,l=hc.toDOMRange(e,n).getClientRects()[0];if(null==l)return t;l.width;var u=l.height,c={},f=l.top-o,d=l.left-i;if(d>a/2){var p=a-d;c.right="".concat(p+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var h=s-f;c.bottom="".concat(h+5,"px")}else{var g=f+u;g<0&&(g=0),c.top="".concat(g+5,"px")}return c}function od(e,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==e.selection)return o;var i=t.Element.isElement(n)&&e.isVoid(n),a=t.Element.isElement(n)&&e.isInline(n),s=sc.get(n);if(null==s)return o;var l=s.getBoundingClientRect(),u=l.top,c=l.left,f=l.height,d=l.width;if(i){var p=Il(s);if(null!=p){var h=p.getBoundingClientRect();u=h.top,f=h.height}}var g=nd(e);if(null==g)return o;var v=g.top,y=g.left,m=g.width,b=g.height,w={},x=u-v,E=c-y;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){var S;if(i?a?E>(m-d)/2?w.right="".concat(m-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px");return w}throw new Error("type '".concat(r,"' is invalid"))}function id(e,t){ll((function(){var n=nd(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,l=t.offset(),u=l.top,c=l.left,f=t.width(),d=t.height(),p=u-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+d-s)>0){var v=t.css("top"),y=parseInt(v.toString())-r;y<0&&(y=0),t.css("top","".concat(y,"px"))}if(g.indexOf("bottom")>=0&&u<0){var m=t.css("bottom"),b=parseInt(m.toString())-Math.abs(u);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+f-a)>0){var w=t.css("left"),x=parseInt(w.toString())-r;x<0&&(x=0),t.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=t.css("right"),S=parseInt(E.toString())-Math.abs(c);t.css("right","".concat(S,"px"))}}}))}var ad=Zr("slice"),sd=$e("species"),ld=Array,ud=Math.max;ln({target:"Array",proto:!0,forced:!ad},{slice:function(e,t){var n,r,o,i=ee(this),a=$t(i),s=_t(e,a),l=_t(void 0===t?a:t,a);if(kn(i)&&(n=i.constructor,(Dn(n)&&(n===ld||kn(n.prototype))||re(n)&&null===(n=n[sd]))&&(n=void 0),n===ld||void 0===n))return La(i,s,l);for(r=new(void 0===n?ld:n)(ud(l-s,0)),o=0;s<l;s++,o++)s in i&&wr(r,o,i[s]);return r.length=o,r}});var cd=Object.assign,fd=Object.defineProperty,dd=z([].concat),pd=!cd||R((function(){if(P&&1!==cd({b:1},cd(fd({},"a",{enumerable:!0,get:function(){fd(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==cd({},e)[n]||un(cd({},t)).join("")!==r}))?function(e,t){for(var n=Le(e),r=arguments.length,o=1,i=Jt.f,a=B.f;r>o;)for(var s,l=Y(arguments[o++]),u=i?dd(un(l),i(l)):un(l),c=u.length,f=0;c>f;)s=u[f++],P&&!A(a,l,s)||(n[s]=l[s]);return n}:cd;ln({target:"Object",stat:!0,arity:2,forced:Object.assign!==pd},{assign:pd});var hd=Ye.f,gd=En("".slice),vd=Math.min,yd=jo("startsWith"),md=!yd&&!!function(){var e=hd(String.prototype,"startsWith");return e&&!e.writable}();ln({target:"String",proto:!0,forced:!md&&!yd},{startsWith:function(e){var t=or(Z(this));Po(e);var n=Bt(vd(arguments.length>1?arguments[1]:void 0,t.length)),r=or(e);return gd(t,n,n+r.length)===r}});var bd=["props","attrs","style","dataset","on","hook"];function wd(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach((function(t){var r,o,i=n[t];if("key"!==t){if(!bd.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=w.default(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i})),o.length>0&&o.forEach((function(e){"string"!=typeof e&&wd(e)}))}var xd=[];var Ed={};function Sd(e,t,n){var r=n.isInline(e)?"span":"div";return s.jsx(r,null,t)}function Od(e,n){var r,o=hc.findKey(n,e),i=n.isInline(e),a=t.Editor.isVoid(n,e),l=Dc(o.id),u={id:l,key:o.id,"data-slate-node":"element","data-slate-inline":i},c=e.type,f=e.children,d=void 0===f?[]:f,p=function(e){return Ed[e]||Sd}(c);r=a?null:d.map((function(t,r){return Nd(t,r,e,n)}));var h=p(e,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=ra(t.Node.texts(e),1),y=ra(v[0],1)[0],m=Nd(y,0,e,n),b=s.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},m);h=s.jsx(g,{style:{position:"relative"}},h,b),nc.set(y,0),rc.set(y,e)}return null==h.data&&(h.data={}),Object.assign(h.data,u),a||i||(h=function(e,t){var n=t;return xd.forEach((function(r){n=r(e,t)})),n}(e,h)),ll((function(){var t=Pl(l);null!=t&&(ac.set(o,t),sc.set(e,t),ic.set(t,e))})),h}function kd(e,t){return void 0===t&&(t=!1),s.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function Cd(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),s.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?s.jsx("br",null):null)}function Td(e,n,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var o=hc.findKey(r,e),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a=hc.findPath(r,e),l=i([e,a]),u=t.Text.decorations(e,l),c=u.map((function(o,i){var a=function(e,n,r,o,i){void 0===n&&(n=!1);var a=e.text,s=hc.findPath(i,r),l=t.Path.parent(s);if(t.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?Cd(t.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==t.Editor.string(i,l)?""===a?Cd():n&&"\n"===a.slice(-1)?kd(a,!0):kd(a):Cd(0,!0)}(o,i===u.length-1,e,n,r);return a=function(e,t){var n=t;return xd.forEach((function(t){n=t(e,n)})),n}(o,a),s.jsx("span",{"data-slate-leaf":!0},a)})),f=function(e){return"w-e-text-".concat(e)}(o.id),d=s.jsx("span",{"data-slate-node":"text",id:f,key:o.id},c);return ll((function(){var t=Pl(f);null!=t&&(ac.set(o,t),sc.set(e,t),ic.set(t,e))})),d}function Nd(e,n,r,o){return nc.set(e,n),rc.set(e,r),t.Element.isElement(e)?Od(e,o):Td(e,r,o)}function Md(e,t){var n,r=e.$scroll,o=function(e){return"w-e-textarea-".concat(e)}(e.id),i=t.getConfig(),a=i.readOnly,l=i.autoFocus,u=function(e,t){return void 0===t&&(t=!1),s.h("div#".concat(e),{props:{contentEditable:!t}})}(o,a),c=t.children||[];u.children=c.map((function(e,n){var r=Nd(e,n,t,t);return wd(r),r}));var f=Zu.get(e);if(null==f&&(f=!0),f){var d=function(e){return y.default('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(o);r.append(d),e.$textArea=d,n=d[0],(h=s.init([s.classModule,s.propsModule,s.styleModule,s.datasetModule,s.eventListenersModule,s.attributesModule]))(n,u),Zu.set(e,!1),ec.set(e,h)}else{var p=tc.get(e),h=ec.get(e);if(null==p||null==h)return;n=p.elm,h(p,u)}if(null!=n||null!=(n=Pl(o))){if((f?l:t.isFocused())&&n.focus({preventScroll:!0}),f){var g=Sl(n);g&&uc.set(t,g)}oc.set(t,n),sc.set(t,n),ic.set(n,t),tc.set(e,u)}}function Ld(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function Rd(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function Pd(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return Rd(n.overflowY,t)||Rd(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function Dd(e,t,n,r,o,i,a,s){return i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0}var jd=function(e,t){var n=window,r=t.scrollMode,o=t.block,i=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!Ld(e))throw new TypeError("Invalid target");for(var u,c,f=document.scrollingElement||document.documentElement,d=[],p=e;Ld(p)&&l(p);){if((p=null==(c=(u=p).parentElement)?u.getRootNode().host||null:c)===f){d.push(p);break}null!=p&&p===document.body&&Pd(p)&&!Pd(document.documentElement)||null!=p&&Pd(p,s)&&d.push(p)}for(var h=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),b=m.height,w=m.width,x=m.top,E=m.right,S=m.bottom,O=m.left,k="start"===o||"nearest"===o?x:"end"===o?S:x+b/2,C="center"===i?O+w/2:"end"===i?E:O,T=[],N=0;N<d.length;N++){var M=d[N],L=M.getBoundingClientRect(),R=L.height,P=L.width,D=L.top,j=L.right,A=L.bottom,I=L.left;if("if-needed"===r&&x>=0&&O>=0&&S<=g&&E<=h&&x>=D&&S<=A&&O>=I&&E<=j)return T;var _=getComputedStyle(M),F=parseInt(_.borderLeftWidth,10),B=parseInt(_.borderTopWidth,10),$=parseInt(_.borderRightWidth,10),W=parseInt(_.borderBottomWidth,10),H=0,V=0,z="offsetWidth"in M?M.offsetWidth-M.clientWidth-F-$:0,U="offsetHeight"in M?M.offsetHeight-M.clientHeight-B-W:0,K="offsetWidth"in M?0===M.offsetWidth?0:P/M.offsetWidth:0,q="offsetHeight"in M?0===M.offsetHeight?0:R/M.offsetHeight:0;if(f===M)H="start"===o?k:"end"===o?k-g:"nearest"===o?Dd(y,y+g,g,B,W,y+k,y+k+b,b):k-g/2,V="start"===i?C:"center"===i?C-h/2:"end"===i?C-h:Dd(v,v+h,h,F,$,v+C,v+C+w,w),H=Math.max(0,H+y),V=Math.max(0,V+v);else{H="start"===o?k-D-B:"end"===o?k-A+W+U:"nearest"===o?Dd(D,A,R,B,W+U,k,k+b,b):k-(D+R/2)+U/2,V="start"===i?C-I-F:"center"===i?C-(I+P/2)+z/2:"end"===i?C-j+$+z:Dd(I,j,P,F,$+z,C,C+w,w);var G=M.scrollLeft,J=M.scrollTop;k+=J-(H=Math.max(0,Math.min(J+H/q,M.scrollHeight-R/q+U))),C+=G-(V=Math.max(0,Math.min(G+V/K,M.scrollWidth-P/K+z)))}T.push({el:M,top:H,left:V})}return T};function Ad(e){return e===Object(e)&&0!==Object.keys(e).length}function Id(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(Ad(t)&&"function"==typeof t.behavior)return t.behavior(n?jd(e,t):[]);if(n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:Ad(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,i=e.left;r.scroll&&n?r.scroll({top:o,left:i,behavior:t}):(r.scrollTop=o,r.scrollLeft=i)}))}(jd(e,r),r.behavior)}}function _d(e,t){return Cl(t)&&hc.hasDOMNode(e,t,{editable:!0})}function Fd(e,n){if(e.getConfig().readOnly)return!1;var r=Bd(e,n)&&hc.toSlateNode(e,n);return t.Editor.isVoid(e,r)}function Bd(e,t){return Cl(t)&&hc.hasDOMNode(e,t)}function $d(e,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=hc.findDocumentOrShadowRoot(n).getSelection();if(a&&(!e.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var l=oc.get(n),u=!1;if(l.contains(a.anchorNode)&&l.contains(a.focusNode)&&(u=!0),s&&u&&o){var c=hc.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&t.Range.equals(c,o)){var f=!0;if(t.Range.isCollapsed(o)){var d=a.anchorNode,p=a.anchorOffset;if(d===l){var h=l.childNodes,g=void 0;(g=h[p])&&g.matches("table")&&(f=!1),(g=h[p-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||hc.hasRange(n,o)){e.isUpdatingSelection=!0;var v=o&&hc.toDOMRange(n,o);if(v){t.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var y=v.startContainer.parentElement;if(!y.closest("[data-slate-spacer]")){y.getBoundingClientRect=v.getBoundingClientRect.bind(v);var m=document.body;Id(y,{scrollMode:"if-needed",boundary:i.scroll?l.parentElement:m,block:"end",behavior:"smooth"}),delete y.getBoundingClientRect}}else a.removeAllRanges();setTimeout((function(){v&&Hl&&l.focus(),e.isUpdatingSelection=!1}))}else n.selection=hc.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Wd=new WeakMap,Hd=new WeakMap;var Vd={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},zd={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Ud={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Kd=function(e){var t=Vd[e],n=zd[e],r=Ud[e],o=t&&u.isKeyHotkey(t),i=n&&u.isKeyHotkey(n),a=r&&u.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(Wl&&i&&i(e))||!(Wl||!a||!a(e)))}},qd={isBold:Kd("bold"),isCompose:Kd("compose"),isMoveBackward:Kd("moveBackward"),isMoveForward:Kd("moveForward"),isDeleteBackward:Kd("deleteBackward"),isDeleteForward:Kd("deleteForward"),isDeleteLineBackward:Kd("deleteLineBackward"),isDeleteLineForward:Kd("deleteLineForward"),isDeleteWordBackward:Kd("deleteWordBackward"),isDeleteWordForward:Kd("deleteWordForward"),isExtendBackward:Kd("extendBackward"),isExtendForward:Kd("extendForward"),isExtendLineBackward:Kd("extendLineBackward"),isExtendLineForward:Kd("extendLineForward"),isItalic:Kd("italic"),isMoveLineBackward:Kd("moveLineBackward"),isMoveLineForward:Kd("moveLineForward"),isMoveWordBackward:Kd("moveWordBackward"),isMoveWordForward:Kd("moveWordForward"),isRedo:Kd("redo"),isSplitBlock:Kd("splitBlock"),isTransposeCharacter:Kd("transposeCharacter"),isUndo:Kd("undo"),isTab:Kd("tab"),isSelectAll:Kd("selectAll")};function Gd(e){e.preventDefault()}var Jd={beforeinput:function(e,n,r){var o=e,i=r.getConfig().readOnly;if(ql&&!i&&_d(r,o.target)){var a=r.selection,s=o.inputType,l=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var u=ra(o.getTargetRanges(),1)[0];if(u){var c=hc.toSlateRange(r,u,{exactMatch:!1,suppressThrow:!1});a&&t.Range.equals(a,c)||t.Transforms.select(r,c)}}if(a&&t.Range.isExpanded(a)&&s.startsWith("delete")){var f=s.endsWith("Backward")?"backward":"forward";t.Editor.deleteFragment(r,{direction:f})}else switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":t.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":t.Editor.deleteForward(r);break;case"deleteContentBackward":t.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":t.Editor.deleteBackward(r,{unit:"line"}),t.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":t.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":t.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":t.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":t.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":t.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":t.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":t.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===s&&!pc.get(r))break;pl(l)?r.insertData(l):"string"==typeof l&&t.Editor.insertText(r,l)}}}},blur:function(e,n,r){var o=e,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&_d(r,o.target)){var s=hc.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var l=o.relatedTarget;if(!(l===hc.toDOMNode(r,r)||kl(l)&&l.hasAttribute("data-slate-spacer"))){if(null!=l&&Cl(l)&&hc.hasDOMNode(r,l)){var u=hc.toSlateNode(r,l);if(t.Element.isElement(u)&&!r.isVoid(u))return}if(Vl){var c=s.getSelection();null==c||c.removeAllRanges()}cc.delete(r)}}}},focus:function(e,t,n){var r=hc.toDOMNode(n,n),o=hc.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Hl&&e.target!==r?r.focus():cc.set(n,!0)},click:function(e,n,r){if(!r.getConfig().readOnly&&Bd(r,e.target)&&Cl(e.target)){var o=hc.toSlateNode(r,e.target),i=hc.findPath(r,o);if(t.Editor.hasPath(r,i))if(t.Node.get(r,i)===o){var a=t.Editor.start(r,i),s=t.Editor.end(r,i),l=t.Editor.void(r,{at:a}),u=t.Editor.void(r,{at:s});if(l&&u&&t.Path.equals(l[1],u[1])){var c=t.Editor.range(r,a);t.Transforms.select(r,c)}}}},compositionstart:function(e,n,r){if(_d(r,e.target)){var o=r.selection;if(o&&t.Range.isExpanded(o)&&(t.Editor.deleteFragment(r),Promise.resolve().then((function(){$d(n,r,!0)}))),o&&(t.Range.isExpanded(o)||t.Range.isCollapsed(o))){var i=hc.toDOMRange(r,o).startContainer,a=i.textContent||"";Wd.set(r,a),Hd.set(r,i)}n.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(n,r)}},compositionend:function(e,n,r){var o=e;if(_d(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(Kl||Hl)&&hc.cleanExposedTexNodeInSelectionBlock(r);for(var a=t.Range.isBackward(i)?i.focus:i.anchor,s=ra(t.Editor.node(r,[a.path[0]]),1)[0],l=0;l<a.path.length;l++){var u=ra(t.Editor.node(r,a.path.slice(0,l+1)),1)[0];if(t.Element.isElement(u)&&((Vl||Hl)&&"link"===u.type||"code"===u.type)){hc.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=hc.getLeftLengthOfMaxLength(r);if(f<c.length)hc.toDOMRange(r,i).startContainer.textContent=Wd.get(r)||"",f>0&&t.Editor.insertText(r,c.slice(0,f)),n.changeViewState();else t.Editor.insertText(r,c)}else{var d=hc.findDocumentOrShadowRoot(r).getSelection();d&&function(e,n){if(t.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if(2===r.path.length&&2===o.path.length&&(0===r.offset||0===o.path.offset)){var i=t.Editor.node(e,r.path),a=0===r.offset?r.path:o.path,s=[a[0],a[1]-1];if(0===a[1])return!1;var l=t.Editor.node(e,s);if(t.Text.isText(l[0])&&t.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=hc.toSlateRange(r,d,{exactMatch:!1,suppressThrow:!1})),t.Editor.insertText(r,c)}Vl||setTimeout((function(){var e=r.selection;if(null!=e){var t=Hd.get(r);if(null!=t)hc.toDOMRange(r,e).startContainer!==t&&(t.textContent=Wd.get(r)||"")}}))}}}},compositionupdate:function(e,t,n){_d(n,e.target)&&(t.isComposing=!0)},keydown:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&_d(r,o.target)){if(function(e,t){var n=Ku.get(e),r=n&&n.getMenus(),o=Gu.get(e),i=o&&o.getMenus(),a=ta(ta({},r),i);for(var s in a){var l=a[s],c=l.hotkey;if(c&&u.isHotkey(c,t)&&!l.isDisabled(e)){var f=l.getValue(e);l.exec(e,f)}}}(r,o),qd.isTab(o))return Gd(o),void r.handleTab();if(qd.isRedo(o))return Gd(o),void("function"==typeof r.redo&&r.redo());if(qd.isUndo(o))return Gd(o),void("function"==typeof r.undo&&r.undo());if(qd.isMoveLineBackward(o))return Gd(o),void t.Transforms.move(r,{unit:"line",reverse:!0});if(qd.isMoveLineForward(o))return Gd(o),void t.Transforms.move(r,{unit:"line"});if(qd.isExtendLineBackward(o))return Gd(o),void t.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(qd.isExtendLineForward(o))return Gd(o),void t.Transforms.move(r,{unit:"line",edge:"focus"});if(qd.isMoveBackward(o))return Gd(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r,{reverse:!0}):t.Transforms.collapse(r,{edge:"start"}));if(qd.isMoveForward(o))return Gd(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r):t.Transforms.collapse(r,{edge:"end"}));if(qd.isMoveWordBackward(o))return Gd(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word",reverse:!0});if(qd.isMoveWordForward(o))return Gd(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word"});if(qd.isSelectAll(o))return Gd(o),void r.selectAll();if(ql){if((Kl||Vl)&&i&&(qd.isDeleteBackward(o)||qd.isDeleteForward(o))&&t.Range.isCollapsed(i)){var a=t.Node.parent(r,i.anchor.path);if(t.Element.isElement(a)&&t.Editor.isVoid(r,a)&&t.Editor.isInline(r,a))return o.preventDefault(),void t.Transforms.delete(r,{unit:"block"})}}else{if(qd.isBold(o)||qd.isItalic(o)||qd.isTransposeCharacter(o))return void Gd(o);if(qd.isSplitBlock(o))return Gd(o),void t.Editor.insertBreak(r);if(qd.isDeleteBackward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r));if(qd.isDeleteForward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r));if(qd.isDeleteLineBackward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"line"}));if(qd.isDeleteLineForward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"line"}));if(qd.isDeleteWordBackward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"word"}));if(qd.isDeleteWordForward(o))return Gd(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(e,n,r){if(!ql&&!r.getConfig().readOnly&&_d(r,e.target)){e.preventDefault();var o=e.key;t.Editor.insertText(r,o)}},copy:function(e,t,n){var r=e;if(_d(n,r.target)){r.preventDefault();var o=r.clipboardData;null!=o&&n.setFragmentData(o)}},cut:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&_d(r,o.target)){o.preventDefault();var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(t.Range.isExpanded(i))t.Editor.deleteFragment(r);else{var s=t.Node.parent(r,i.anchor.path);t.Editor.isVoid(r,s)&&t.Transforms.delete(r)}}},paste:function(e,t,n){pc.set(n,!0);var r=e;if(!n.getConfig().readOnly&&_d(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void pc.set(n,!1);if(!ql||Ml(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,n,r){if(Bd(r,e.target)){var o=hc.toSlateNode(r,e.target);t.Editor.isVoid(r,o)&&e.preventDefault()}},dragstart:function(e,n,r){var o=e;if(Bd(r,o.target)&&!r.getConfig().readOnly){var i=hc.toSlateNode(r,o.target),a=hc.findPath(r,i);if(t.Editor.isVoid(r,i)||t.Editor.void(r,{at:a,voids:!0})){var s=t.Editor.range(r,a);t.Transforms.select(r,s)}var l=o.dataTransfer;null!=l&&(n.isDraggingInternally=!0,r.setFragmentData(l))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&Bd(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&Bd(r,o.target)&&null!=i&&!(ql&&Vl&&i.files.length>0)){o.preventDefault();var a=r.selection,s=hc.findEventRange(r,o);t.Transforms.select(r,s),n.isDraggingInternally&&(a&&t.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Yd=1,Xd=function(){function e(e){var n=this;this.id=Yd++,this.$textArea=null,this.$progressBar=y.default('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=y.default('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=b.default((function(){var e=n.editorInstance;!function(e,n){var r=e.isComposing,o=e.isUpdatingSelection,i=e.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=hc.findDocumentOrShadowRoot(n),s=a.activeElement,l=hc.toDOMNode(n,n),u=a.getSelection();if(s!==l)return cc.delete(n),void t.Transforms.deselect(n);if(e.latestElement=s,cc.set(n,!0),!u)return t.Transforms.deselect(n);var c=u.anchorNode,f=u.focusNode,d=_d(n,c)||Fd(n,c),p=_d(n,f)||Fd(n,f);if(d&&p){var h=hc.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});t.Transforms.select(n,h)}}}(n,e)}),100);var r=y.default(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var o=y.default('<div class="w-e-text-container"></div>');o.append(this.$progressBar),o.append(this.$maxLengthInfo),r.append(o);var i=y.default('<div class="w-e-scroll"></div>');o.append(i),this.$scroll=i,this.$textAreaContainer=o,ll((function(){var e=n.editorInstance,t=hc.getWindow(e);t.document.addEventListener("selectionchange",n.onDOMSelectionChange),e.on("destroyed",(function(){t.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),o.on("click",(function(){return e.hidePanelOrModal()})),e.on("change",n.changeViewState.bind(n));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on("change",(function(){return a(e)})),s||(r.css("position","relative"),o.addClass("no-scroll")),n.onFocusAndOnBlur(),e.on("change",n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=zu.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(m.default(Jd,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",b.default((function(){r.emit("scroll")}),100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on("change",(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-hc.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout((function(){t.hide(),t.css("width","0"),t.show()}),1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;Md(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=y.default('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),ll((function(){$d(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();Mi("match",(function(e,t,n){return[function(t){var n=Z(this),r=X(t)?void 0:Se(t,e);return r?A(r,t,n):new RegExp(t)[e](or(n))},function(e){var r=et(this),o=or(e),i=n(t,r,o);if(i.done)return i.value;if(!r.global)return $i(r,o);var a=r.unicode;r.lastIndex=0;for(var s,l=[],u=0;null!==(s=$i(r,o));){var c=or(s[0]);l[u]=c,""===c&&(r.lastIndex=Ri(o,Bt(r.lastIndex),a)),u++}return 0===u?null:l}]}));function Qd(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&Qd(t)}}function Zd(){return y.default('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function ep(){return y.default('<div class="w-e-bar-divider"></div>')}function tp(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=Wl?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var np=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=y.default('<div class="w-e-bar-item"></div>'),this.$button=y.default('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,l=void 0===s?"":s,u=t.iconSvg,c=void 0===u?"":u,f=this.$button;if(c){var d=y.default(c);Qd(d),f.append(d)}else f.text(a);tp(f,c,a,l,n),n&&c&&f.append(y.default('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",e),this.$elem.append(f),ll((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),pp(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=pp(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=pp(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=pp(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=pp(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=y.default(n);Qd(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=pp(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&tp(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),rp=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return ea(t,e),t.prototype.onButtonClick=function(){},t}(np),op=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Yu.get(e);null==t&&(t=new Set,Yu.set(e,t)),t.add(this),Xu.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=Xu.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=Xu.get(this);e&&e.emit("modalOrPanelHide")}},e}(),ip=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=y.default('<div class="w-e-drop-panel"></div>'),n}return ea(t,e),t.prototype.genSelfElem=function(){return null},t}(op),ap=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=Zd();o.$button.append(i)}return o}return ea(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=pp(this);if(null==this.dropPanel){var n=new ip(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,l=a.parents(".w-e-bar");s-l.offset().left>=l.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(np),sp=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=y.default('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return ea(t,e),t.prototype.genSelfElem=function(){var e=this,t=y.default('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=Xu.get(this);return t.on("click",(function(){e.hide(),null==n||n.restoreSelection()})),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(op);var lp=function(e){function n(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=y.default("body"),o.modal=null,o.menu=n,o}return ea(n,e),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var e=pp(this),n=this.menu.getModalPositionNode(e);return t.Element.isElement(n)?od(e,n,"modal"):rd(e)},n.prototype.handleModal=function(){var e=pp(this),t=this.menu;if(null==this.modal){var n=new sp(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=pp(this),r=this.menu;if(null!=r.getModalContentElem){var o=hc.getTextarea(n),i=hc.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var l=this.getPosition();e.setStyle(l)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||id(n,e.$elem),setTimeout((function(){n.blur()}))}},n}(np);var up=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=y.default('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",(function(e){e.stopPropagation()})),r}return ea(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=y.default("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=y.default('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=y.default('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(y.default('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(op);var cp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=y.default('<div class="w-e-bar-item"></div>'),this.$button=y.default('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,l=void 0===s?"":s,u=t.hotkey,c=void 0===u?"":u;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var f=this.$button;a&&f.css("width","".concat(a,"px")),f.attr("data-menu-key",e),tp(f,l,i,c,n),this.$elem.append(f),this.menu=t,ll((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),pp(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=pp(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new up(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=y.default(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=pp(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=pp(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=Zd();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=pp(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),fp=function(){function e(e){this.$elem=y.default('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=y.default('<div class="w-e-bar-item-menus-container"></div>'),this.$button=y.default('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=y.default(n);Qd(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=Zd();i.append(s),o.append(i);var l=this.$container;o.append(l);var u=this.createObserver();this.observe(u)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){y.default(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),dp=new WeakMap;function pp(e){var t=Ju.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function hp(e,t,n){void 0===n&&(n=!1);var r=dp.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new ap(e,t,n):a?new lp(e,t,n):new rp(e,t,n)}if("select"===o&&(r=new cp(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return dp.set(t,r),r}var gp=C((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),vp=C((function(e){var t=gp.default;e.exports=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),yp=C((function(e){var t=gp.default;e.exports=function(e){var n=vp(e,"string");return"symbol"==t(n)?n:n+""},e.exports.__esModule=!0,e.exports.default=e.exports})),mp=C((function(e){e.exports=function(e,t,n){return(t=yp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports})),bp=C((function(e){e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){mp(e,t,n[t])}))}return e},e.exports.__esModule=!0,e.exports.default=e.exports})),wp=C((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports})),xp=C((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yp(r.key),r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports})),Ep=C((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports})),Sp=C((function(e){var t=gp.default;e.exports=function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Ep(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),Op=C((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),kp=C((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Cp=C((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kp(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports}));function Tp(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var Np=Tp(gp),Mp=Tp(bp),Lp=Tp(wp),Rp=Tp(xp),Pp=Tp(Sp),Dp=Tp(Op),jp=Tp(Ep),Ap=Tp(Cp),Ip={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},_p=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Lp.default(this,e),this.init(t,n)}return Rp.default(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ip,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,Mp.default({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),Fp=new _p,Bp=function(){function e(){Lp.default(this,e),this.observers={}}return Rp.default(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function $p(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Wp(e){return null==e?"":""+e}function Hp(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function Vp(e,t,n){var r=Hp(e,t,Object);r.obj[r.k]=n}function zp(e,t){var n=Hp(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Up(e,t,n){var r=zp(e,n);return void 0!==r?r:zp(t,n)}function Kp(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Kp(e[r],t[r],n):e[r]=t[r]);return e}function qp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Gp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Jp(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Gp[e]})):e}var Yp="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function Xp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];void 0===l&&r.length>i+a;)a++,l=o[s=r.slice(i,i+a).join(n)];if(void 0===l)return;if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s];var u=r.slice(i+a).join(n);return u?Xp(l,u,n):void 0}o=o[r[i]]}return o}}var Qp=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Lp.default(this,t),n=Pp.default(this,Dp.default(t).call(this)),Yp&&Bp.call(jp.default(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return Ap.default(t,e),Rp.default(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=zp(this.data,a);return s||!i||"string"!=typeof n?s:Xp(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),Vp(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=zp(this.data,a)||{};r?Kp(s,n,o):s=Mp.default({},s,n),Vp(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Mp.default({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(Bp),Zp={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},eh={},th=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Lp.default(this,t),n=Pp.default(this,Dp.default(t).call(this)),Yp&&Bp.call(jp.default(n)),function(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,jp.default(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=Fp.create("translator"),n}return Ap.default(t,e),Rp.default(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==Np.default(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,l=a.namespaces,u=l[l.length-1],c=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(f){var d=n.nsSeparator||this.options.nsSeparator;return u+d+s}return s}var p=this.resolve(e,n),h=p&&p.res,g=p&&p.usedKey||s,v=p&&p.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&("string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,Mp.default({},n,{ns:l})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var w="[object Array]"===y,x=w?[]:{},E=w?v:g;for(var S in h)if(Object.prototype.hasOwnProperty.call(h,S)){var O="".concat(E).concat(i).concat(S);x[S]=this.translate(O,Mp.default({},n,{joinArrays:!1,ns:l})),x[S]===O&&(x[S]=h[S])}h=x}}else if(b&&"string"==typeof m&&"[object Array]"===y)(h=h.join(m))&&(h=this.extendTranslation(h,e,n,r));else{var k=!1,C=!1,T=void 0!==n.count&&"string"!=typeof n.count,N=t.hasDefaultValue(n),M=T?this.pluralResolver.getSuffix(c,n.count):"",L=n["defaultValue".concat(M)]||n.defaultValue;!this.isValidLookup(h)&&N&&(k=!0,h=L),this.isValidLookup(h)||(C=!0,h=s);var R=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,P=N&&L!==h&&this.options.updateMissing;if(C||k||P){if(this.logger.log(P?"updateKey":"missingKey",c,u,s,P?L:h),i){var D=this.resolve(s,Mp.default({},n,{keySeparator:!1}));D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var j=[],A=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&A&&A[0])for(var I=0;I<A.length;I++)j.push(A[I]);else"all"===this.options.saveMissingTo?j=this.languageUtils.toResolveHierarchy(n.lng||this.language):j.push(n.lng||this.language);var _=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,t,P?r:R,P,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,t,P?r:R,P,n),o.emit("missingKey",e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?j.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){_([e],s+t,n["defaultValue".concat(t)]||L)}))})):_(j,s,L))}h=this.extendTranslation(h,e,n,p,r),C&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(s)),(C||k)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Mp.default({},n,{interpolation:Mp.default({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=Mp.default({},this.options.interpolation.defaultVariables,u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=Zp.handle(d,e,t,this.options&&this.options.postProcessPassResolved?Mp.default({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(i=e,!eh["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(eh["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,l,c=u,p=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(p,u,n,e,s);else f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(c+i),d&&p.push(c+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(c+=i);for(;l=p.pop();)a.isValidLookup(t)||(r=l,t=a.getResource(n,e,l,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}]),t}(Bp);function nh(e){return e.charAt(0).toUpperCase()+e.slice(1)}var rh=function(){function e(t){Lp.default(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fp.create("languageUtils")}return Rp.default(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nh(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nh(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=nh(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),oh=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ih={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};var ah=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Lp.default(this,e),this.languageUtils=t,this.options=r,this.logger=Fp.create("pluralResolver"),this.rules=(n={},oh.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:ih[e.fc]}}))})),n)}return Rp.default(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),sh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Lp.default(this,e),this.logger=Fp.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Rp.default(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Jp,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?qp(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?qp(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?qp(t.nestingPrefix):t.nestingPrefixEscaped||qp("$t("),this.nestingSuffix=t.nestingSuffix?qp(t.nestingSuffix):t.nestingSuffixEscaped||qp(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var o=Up(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,Mp.default({},r,t,{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(Up(t,l,a),u,n,Mp.default({},r,t,{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=c(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=Wp(i));var l=t.safeValue(i);if(e=e.replace(o[0],l),d?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=Mp.default({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=Mp.default({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=c.shift(),l=c,u=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Wp(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),u&&(r=l.reduce((function(e,t){return o.format(e,t,i.lng,Mp.default({},i,{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var lh=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Lp.default(this,t),o=Pp.default(this,Dp.default(t).call(this)),Yp&&Bp.call(jp.default(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=Fp.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return Ap.default(t,e),Rp.default(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],l=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),l.indexOf(t)<0&&l.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){!function(e,t,n,r){var o=Hp(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}(n.loaded,[o],i),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,l){s&&l&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,l)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,Mp.default({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(Bp);function uh(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ch(){}var fh=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Lp.default(this,t),e=Pp.default(this,Dp.default(t).call(this)),Yp&&Bp.call(jp.default(e)),e.options=uh(n),e.services={},e.logger=Fp,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),Pp.default(e,jp.default(e));setTimeout((function(){e.init(n,r)}),0)}return e}return Ap.default(t,e),Rp.default(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Mp.default({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Np.default(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Np.default(e[2])||"object"===Np.default(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,uh(t)),this.format=this.options.interpolation.format,n||(n=ch),!this.options.isClone){this.modules.logger?Fp.init(r(this.modules.logger),this.options):Fp.init(null,this.options);var o=new rh(this.options);this.store=new Qp(this.options.resources,this.options);var i=this.services;i.logger=Fp,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new ah(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new sh(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new lh(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new th(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var s=$p(),l=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ch,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(r)i(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)}));this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=$p();return e||(e=this.languages),t||(t=this.options.ns),n||(n=ch),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Zp.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=$p();this.emit("languageChanging",e);var o=function(o){e||o||!n.services.languageDetector||(o=[]);var i="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);i&&(n.language||(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i)),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==Np.default(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=Mp.default({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns;var u=r.options.keySeparator||".",c=n?"".concat(n).concat(u).concat(t):t;return r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=$p();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=$p();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ch,o=Mp.default({},this.options,n,{isClone:!0}),i=new t(o);return["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=Mp.default({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new th(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),t}(Bp),dh=new fh,ph="translation";function hh(e){return dh.on("languageChanged",e),function(){return dh.off("languageChanged",e)}}dh.init({lng:"zh-CN",resources:{}});var gh=dh.t.bind(dh);function vh(e,n){var r=e.selection;return null!=r&&(!t.Range.isCollapsed(r)&&(!hc.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)||void 0}))&&!!t.Text.isText(n)))}var yh=function(){function e(){var e=this;this.$elem=y.default('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=x.default((function(){var n=e.isShow,r=e.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a;if((null!=i&&e.changeItemsState(),i&&t.Element.isElement(i))&&(n&&e.isSamePath(i,e.prevSelectedNode)))return;e.hideAndClean(),null!=i&&(e.registerItems(s),e.setPosition(i),e.show()),e.prevSelectedNode=i}),200),ll((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),hc.getTextarea(t).$textAreaContainer.append(n),t.on("change",e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on("scroll",r),t.on("fullScreen",r),t.on("unFullScreen",r)})),this.lngListen=hh((function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n=window.innerHeight;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;ll((function(){e.hoverbarItems.forEach((function(e){e.changeMenuState()}))}))},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach((function(e){if("|"!==e)t.registerSingleItem(e);else{var r=ep();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=yc[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=hp(e,r);this.hoverbarItems.push(a),Ju.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),t.Element.isElement(e)){var o=od(n,e,"bar");return r.css(o),void id(n,r)}if(t.Text.isText(e)){o=rd(n);return r.css(o),void id(n,r)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,l=a.menuKeys,u=void 0===l?[]:l,c=s||function(e,t){return hc.checkNodeType(t,i)},f=ra(t.Editor.nodes(e,{match:function(t){return c(e,t)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=u,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},e.prototype.getEditorInstance=function(){var e=qu.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=vh),t},e.prototype.isSamePath=function(e,n){if(null==e||null==n)return!1;var r=hc.findPath(null,e),o=hc.findPath(null,n);return t.Path.equals(r,o)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function mh(e,n,r,o){if(nc.set(e,n),rc.set(e,r),t.Element.isElement(e)){var i=e.children;if((void 0===i?[]:i).forEach((function(t,n){return mh(t,n,e,o)})),t.Editor.isVoid(o,e)){var a=ra(t.Node.texts(e),1),s=ra(a[0],1)[0];nc.set(s,0),rc.set(s,e)}}}var bh=TypeError,wh=Object.getOwnPropertyDescriptor,xh=P&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(kn(e)&&!wh(e,"length").writable)throw new bh("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Eh=TypeError,Sh=function(e,t){if(!delete e[t])throw new Eh("Cannot delete property "+we(t)+" of "+we(e))},Oh=Zr("splice"),kh=Math.max,Ch=Math.min;ln({target:"Array",proto:!0,forced:!Oh},{splice:function(e,t){var n,r,o,i,a,s,l=Le(this),u=$t(l),c=_t(e,u),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=u-c):(n=f-2,r=Ch(kh(jt(t),0),u-c)),ca(u+n-r),o=In(l,r),i=0;i<r;i++)(a=c+i)in l&&wr(o,i,l[a]);if(o.length=r,n<r){for(i=c;i<u-r;i++)s=i+n,(a=i+r)in l?l[s]=l[a]:Sh(l,s);for(i=u;i>u-r+n;i--)Sh(l,i-1)}else if(n>r)for(i=u-r;i>c;i--)s=i+n-1,(a=i+r-1)in l?l[s]=l[a]:Sh(l,s);for(i=0;i<n;i++)l[i+c]=arguments[i+2];return xh(l,u-r+n),o}});var Th=function(){function e(e,t){var n=this;this.$toolbar=y.default('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=x.default((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=y.default(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),ll((function(){n.initToolbar(),n.lngListen=hh((function(){return n.initToolbar()})),n.getEditorInstance().on("change",n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,l=r.excludeKeys,u=void 0===l?[]:l,c=E.default(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){c.splice(s.index+t,0,e)})));var f=c.filter((function(e){if("string"==typeof e){if(u.includes(e))return!1}else if(u.includes(e.key))return!1;return!0})),d=f.length;f.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===d)return;if("|"===t)return;var i=ep();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new fp(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(e){s.includes(e)||t.registerSingleItem(e,r)})),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof fp,o=this.menus,i=o[e];if(null==i){var a=yc[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var l=hp(e,i,r);(this.toolbarItems.push(l),Ju.set(l,n),r)?t.appendBarItem(l):t.$toolbar.append(l.$elem)},e.prototype.getEditorInstance=function(){var e=Uu.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();var Nh=dt.EXISTS,Mh=Function.prototype,Lh=z(Mh.toString),Rh=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ph=z(Rh.exec);P&&!Nh&&Ea(Mh,"name",{configurable:!0,get:function(){try{return Ph(Rh,Lh(this))[1]}catch(e){return""}}}),e.DOMComment=yl,e.DOMElement=ml,e.DOMNode=vl,e.DOMRange=wl,e.DOMSelection=xl,e.DOMStaticRange=El,e.DOMText=bl,e.DomEditor=hc,e.ELEM_TO_HTML_CONF=Mc,e.PARSE_ELEM_HTML_CONF=Bc,e.PARSE_STYLE_HTML_FN_LIST=Fc,e.PRE_PARSE_HTML_CONF_LIST=_c,e.RENDER_ELEM_CONF=Ed,e.RENDER_STYLE_HANDLER_LIST=xd,e.STYLE_TO_HTML_FN_LIST=Nc,e.TEXT_TAGS=Ic,e.Toolbar=Th,e.coreCreateEditor=function(n){var r=n.selector,o=void 0===r?"":r,i=n.config,a=void 0===i?{}:i,s=n.content,l=n.html,u=n.plugins,c=void 0===u?[]:u,f=nr(function(n){var r=n,o=r.insertText,i=r.insertNode,a=r.insertFragment,s=r.dangerouslyInsertHtml;return r.insertText=function(e){if(r.getConfig().maxLength){var t=hc.getLeftLengthOfMaxLength(r);t<=0||(t<e.length?o(e.slice(0,t)):o(e))}else o(e)},r.insertNode=function(e){if(r.getConfig().maxLength){var n=hc.getLeftLengthOfMaxLength(r);n<=0||n<t.Node.string(e).length||i(e)}else i(e)},r.insertFragment=function(e){if(r.getConfig().maxLength){if(e.length>0){var n=e[0];if(hc.getLeftLengthOfMaxLength(r)<t.Node.string(n).length)return;a([n]);for(var o=1;o<e.length;o++)r.insertNode(e[o])}}else a(e)},r.dangerouslyInsertHtml=function(t,n){if(void 0===t&&(t=""),void 0===n&&(n=!1),t)if(r.getConfig().maxLength){var o=hc.getLeftLengthOfMaxLength(r);if(!(o<=0)){var i=document.createElement("div");i.innerHTML=t;var a=Array.from(i.childNodes).reduce((function(t,n){var r=n.nodeType,o=n.nodeName;return n?r===e.NodeType.TEXT_NODE?t+(n.textContent||""):r===e.NodeType.ELEMENT_NODE?Mf.has(o.toLowerCase())?t:t+(n.textContent||""):t:t}),"");o<a.length||s(t,n)}}else s(t,n)},r}(td(function(e){var n=e;return n.select=function(e){t.Transforms.select(n,e)},n.deselect=function(){var r=n.selection,o=hc.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&t.Transforms.deselect(e)},n.move=function(n,r){void 0===r&&(r=!1),n&&(n<0||t.Transforms.move(e,{distance:n,unit:"character",reverse:r}))},n.moveReverse=function(e){n.move(e,!0)},n.restoreSelection=function(){var e=fc.get(n);null!=e&&(n.focus(),t.Transforms.select(n,e))},n.getSelectionPosition=function(){return rd(n)},n.getNodePosition=function(e){return od(n,e)},n.isSelectedAll=function(){var e=n.selection;if(null==e)return!1;var r=ra(t.Range.edges(e),2),o=r[0],i=r[1],a=ra(t.Editor.edges(n,[]),2),s=a[0],l=a[1];return!(!t.Point.equals(o,s)||!t.Point.equals(i,l))},n.selectAll=function(){var e=t.Editor.start(n,[]),r=t.Editor.end(n,[]);t.Transforms.select(n,{anchor:e,focus:r})},n}(Rf(function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in yc)e.push(t);return e},t.getConfig=function(){var e=Qu.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t}(function(e){var n=e;return n.id="wangEditor-".concat(gc++),n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(e){if(hc.toDOMNode(n,n).focus({preventScroll:!0}),cc.set(n,!0),e){var r=t.Editor.end(n,[]);t.Transforms.select(n,r)}else{var o=fc.get(n);o?t.Transforms.select(n,o):t.Transforms.select(n,t.Editor.start(n,[]))}},n.isFocused=function(){return!!cc.get(n)},n.blur=function(){hc.toDOMNode(n,n).blur(),t.Transforms.deselect(n),cc.set(n,!1)},n.updateView=function(){hc.getTextarea(n).changeViewState();var e=hc.getToolbar(n);e&&e.changeToolbarState();var t=hc.getHoverbar(n);t&&t.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var e=hc.getTextarea(n);e.destroy(),Vu.delete(n),zu.delete(e);var t=hc.getToolbar(n);t&&(t.destroy(),Ku.delete(n),Uu.delete(t));var r=hc.getHoverbar(n);r&&(r.destroy(),Gu.delete(n),qu.delete(r)),n.isDestroyed=!0,n.emit("destroyed")}},n.scrollToElem=function(e){if(!n.getConfig().scroll){var t="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return t+="\nYou has disabled editor scroll, please do this yourself",void console.warn(t)}var r=y.default("#".concat(e));if(0!==r.length){var o=r[0];if(!hc.hasDOMNode(n,o))return t="Element (found by id is '".concat(e,"') is not in editor DOM"),t+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(t,o);var i=hc.getTextarea(n),a=i.$textAreaContainer,s=i.$scroll,l=r.offset().top,u=a.offset().top;s[0].scrollBy({top:l-u,behavior:"smooth"})}},n.showProgressBar=function(e){e<1||hc.getTextarea(n).changeProgress(e)},n.hidePanelOrModal=function(){var e=Yu.get(n);null!=e&&e.forEach((function(e){return e.hide()}))},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(e){return hc.toDOMNode(n,e)},n.fullScreen=function(){if(!n.isFullScreen){var e=null,t=hc.getToolbar(n);t&&(e=t.$box);var r=hc.getTextarea(n).$box.parent();if(e&&e.parent()[0]!==r[0])throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致");r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit("fullScreen")}},n.unFullScreen=function(){if(n.isFullScreen){var e=hc.getTextarea(n).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return hc.getTextarea(n).$textAreaContainer[0]},n}(function(e){var n=e;return n.setFragmentData=function(e){var r=n.selection;if(r){var o=ra(t.Range.edges(r),2),i=o[0],a=o[1],s=t.Editor.void(n,{at:i.path}),l=t.Editor.void(n,{at:a.path});if(!t.Range.isCollapsed(r)||s){var u=hc.toDOMRange(n,r),c=u.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(f=e)})),l){var d=ra(l,1)[0],p=u.cloneRange(),h=hc.toDOMNode(n,d);p.setEndAfter(h),c=p.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach((function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Nl(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),y=JSON.stringify(v),m=window.btoa(encodeURIComponent(y));f.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),e.setData("text/html",b.innerHTML),e.setData("text/plain",Al(b)),c.ownerDocument.body.removeChild(b),e}}},n.insertData=function(e){var r,o,i=e.getData("application/x-slate-fragment");if(i){var a=decodeURIComponent(window.atob(i)),s=JSON.parse(a);n.insertFragment(s)}else{var l=e.getData("text/plain"),u=e.getData("text/html");if(u)n.dangerouslyInsertHtml(u);else{var c=hc.getLeftLengthOfMaxLength(n);if(l){var f=l.split(/\r\n|\r|\n/),d=!1;try{for(var p=na(f),h=p.next();!h.done;h=p.next()){var g=h.value;d&&c>0&&t.Transforms.splitNodes(n,{always:!0}),n.insertText(g),d=!0}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}}}},n}(t.createEditor()))))))));if(o&&function(e,t){return Sf(e,"data-w-e-textarea",t)}(f,o))throw new Error("Repeated create editor by selector '".concat(o,"'"));var d=function(e){void 0===e&&(e={});var t=E.default(vc),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return m.default(t,(function(e,t){n[t]=ta(ta({},e),o[t]||{})})),delete e.MENU_CONF,ta({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(a);Qu.set(f,d);var p=d.hoverbarKeys,h=void 0===p?{}:p;if(c.forEach((function(e){f=e(f)})),null!=l&&(f.children=Of(f,l)),s&&s.length&&(f.children=s),0===f.children.length&&(f.children=[{type:"paragraph",children:[{text:""}]}]),hc.normalizeContent(f),o){var g=new Xd(o);Vu.set(f,g),zu.set(g,f),g.changeViewState(),ll((function(){var e=g.$scroll;if(null!=e&&e.height()<300){console.warn("编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常\nTextarea height < 300px . This may be cause modal and hoverbar position error",e)}}));var v=void 0;Object.keys(h).length>0&&(v=new yh,qu.set(v,f),Gu.set(f,v)),f.on("change",(function(){f.hidePanelOrModal()})),f.on("scroll",(function(){f.hidePanelOrModal()}))}else f.children.forEach((function(e,t){return mh(e,t,f,f)}));var b=d.onCreated,w=d.onDestroyed;return b&&f.on("created",(function(){return b(f)})),w&&f.on("destroyed",(function(){return w(f)})),ll((function(){return f.emit("created")})),f},e.coreCreateToolbar=function(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return Sf(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=ta({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Th(n,i);return Uu.set(a,e),Ku.set(e,a),a},e.createUploader=function(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,l=void 0===s?100:s,u=e.meta,c=void 0===u?{}:u,f=e.metaWithUrl,d=void 0!==f&&f,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,y=e.timeout,b=void 0===y?1e4:y,w=e.onBeforeUpload,x=void 0===w?function(e){return e}:w,E=e.onSuccess,k=void 0===E?function(e,t){}:E,C=e.onError,T=void 0===C?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:C,N=e.onProgress,M=void 0===N?function(e){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var L=n;d&&(L=function(e,t){var n=ra(e.split("#"),2),r=n[0],o=n[1],i=[];m.default(t,(function(e,t){i.push("".concat(t,"=").concat(e))}));var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(L,c));var R=new S.default({onBeforeUpload:x,restrictions:{maxFileSize:a,maxNumberOfFiles:l},meta:c}).use(O.default,{endpoint:L,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:b});return R.on("upload-success",(function(e,t){var n=t.body,r=void 0===n?{}:n;try{k(e,r)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}R.removeFile(e.id)})),R.on("progress",(function(e){e<1||M(e)})),R.on("upload-error",(function(e,t,n){try{T(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}R.removeFile(e.id)})),R.on("restriction-failed",(function(e,t){try{T(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}R.removeFile(e.id)})),R},e.genModalButtonElems=function(e,t){var n=y.default('<div class="button-container"></div>'),r=y.default('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]},e.genModalInputElems=function(e,t,n){var r=y.default('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=y.default('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]},e.genModalTextareaElems=function(e,t,n){var r=y.default('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=y.default('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]},e.getDefaultView=Sl,e.getEditableChild=jl,e.getEditableChildAndIndex=Dl,e.getElementById=Pl,e.getFirstVoidChild=Il,e.getPlainText=Al,e.getTagName=Fl,e.hasShadowRoot=Rl,e.i18nAddResources=function(e,t){dh.addResourceBundle(e,ph,t,!0,!0)},e.i18nChangeLanguage=function(e){dh.changeLanguage(e)},e.i18nGetResources=function(e){return dh.getResourceBundle(e,ph)},e.i18nListenLanguage=hh,e.isDOMComment=Ol,e.isDOMElement=kl,e.isDOMNode=Cl,e.isDOMSelection=Tl,e.isDOMText=Nl,e.isDataTransfer=pl,e.isDocument=fl,e.isHTMLElememt=gl,e.isPlainTextOnlyPaste=Ml,e.isShadowRoot=dl,e.normalizeDOMPoint=Ll,e.registerElemToHtmlConf=function(e){var t=e.type,n=e.elemToHtml;Mc[t||""]=n},e.registerMenu=function(e,t){var n=e.key,r=e.factory,o=e.config,i=ta(ta({},o),t||{});if(null!=yc[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));yc[n]=r,function(e,t){null!=t&&(vc[e]=t)}(n,i)},e.registerParseElemHtmlConf=function(e){var t=e.selector,n=e.parseElemHtml;Bc[t]=n},e.registerParseStyleHtmlHandler=function(e){Fc.push(e)},e.registerPreParseHtmlConf=function(e){_c.push(e)},e.registerRenderElemConf=function(e){var t=e.type,n=e.renderElem;Ed[t||""]=n},e.registerStyleHandler=function(e){xd.push(e)},e.registerStyleToHtmlHandler=function(e){Nc.push(e)},e.t=gh,e.walkTextNodes=_l,Object.defineProperty(e,"__esModule",{value:!0})}));
3
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
+ *
5
+ * Copyright (c) 2014-2017, Jon Schlinkert.
6
+ * Released under the MIT License.
7
+ */
8
+ function t(t){return"[object Object]"===Object.prototype.toString.call(t)}return Ur=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.isPlainObject=function(e){var n,r;return!1!==t(e)&&(void 0===(n=e.constructor)||!1!==t(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},qr}function Gr(){if(zr)return Kr;zr=1;var t=Jr(),n=e,r={isHistory:function(e){return t.isPlainObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||n.Operation.isOperationList(e.redos[0].operations))&&(0===e.undos.length||n.Operation.isOperationList(e.undos[0].operations))}},o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(t){return r.isHistory(t.history)&&n.Editor.isEditor(t)},isMerging:function(t){return a.get(t)},isSaving:function(t){return i.get(t)},redo:function(t){t.redo()},undo:function(t){t.undo()},withMerging:function(t,e){var n=s.isMerging(t);a.set(t,!0),e(),a.set(t,n)},withoutMerging:function(t,e){var n=s.isMerging(t);a.set(t,!1),e(),a.set(t,n)},withoutSaving:function(t,e){var n=s.isSaving(t);i.set(t,!1),e(),i.set(t,n)}};function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t,e){return!(!e||"insert_text"!==t.type||"insert_text"!==e.type||t.offset!==e.offset+e.text.length||!n.Path.equals(t.path,e.path))||!(!e||"remove_text"!==t.type||"remove_text"!==e.type||t.offset+t.text.length!==e.offset||!n.Path.equals(t.path,e.path))},f=function(t,e){return"set_selection"!==t.type};return Kr.HISTORY=o,Kr.History=r,Kr.HistoryEditor=s,Kr.MERGING=a,Kr.SAVING=i,Kr.withHistory=function(t){var e=t,r=e.apply;return e.history={undos:[],redos:[]},e.redo=function(){var t=e.history,r=t.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&n.Transforms.setSelection(e,o.selectionBefore),s.withoutSaving(e,(function(){n.Editor.withoutNormalizing(e,(function(){var t,n=u(o.operations);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.apply(r)}}catch(t){n.e(t)}finally{n.f()}}))})),t.redos.pop(),e.writeHistory("undos",o)}},e.undo=function(){var t=e.history,r=t.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(e,(function(){n.Editor.withoutNormalizing(e,(function(){var t,r=u(o.operations.map(n.Operation.inverse).reverse());try{for(r.s();!(t=r.n()).done;){var i=t.value;e.apply(i)}}catch(t){r.e(t)}finally{r.f()}o.selectionBefore&&n.Transforms.setSelection(e,o.selectionBefore)}))})),e.writeHistory("redos",o),t.undos.pop()}},e.apply=function(t){var n=e.operations,o=e.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(e),d=s.isMerging(e);if(null==l&&(l=f(t)),l){if(null==d&&(d=null!=a&&(0!==n.length||c(t,u))),a&&d)a.operations.push(t);else{var h={operations:[t],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(t)},e.writeHistory=function(t,n){e.history[t].push(n)},e},Kr}var Yr,Xr,Qr,Zr,to,eo,no,ro=Gr(),oo={};function io(){if(Xr)return Yr;Xr=1;var t=lr(),e=String;return Yr=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function ao(){if(Zr)return Qr;Zr=1;var t=je();return Qr=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function so(){if(eo)return to;eo=1;var t=P(),e=ye(),n=Pt(),r=ao(),o=RegExp.prototype;return to=function(i){var a=i.flags;return void 0!==a||"flags"in o||e(i,"flags")||!n(o,i)?a:t(r,i)}}!function(){if(no)return oo;no=1;var t=tn().PROPER,e=un(),n=je(),r=io(),o=R(),i=so(),a="toString",s=RegExp.prototype,u=s[a],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),c=t&&u.name!==a;(l||c)&&e(s,a,(function(){var t=n(this);return"/"+r(t.source)+"/"+r(i(t))}),{unsafe:!0})}();var uo,lo,co,fo,ho,po,go,vo,mo,yo,bo,wo,xo,Eo,So,Oo,ko,Co,To,No={};function Ro(){if(lo)return uo;lo=1;var t=P(),e=je(),n=Bt();return uo=function(r,o,i){var a,s;e(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=t(a,r)}catch(t){s=!0,a=t}if("throw"===o)throw i;if(s)throw a;return e(a),i}}function Lo(){if(fo)return co;fo=1;var t=je(),e=Ro();return co=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}function Mo(){return po?ho:(po=1,ho={})}function Po(){if(vo)return go;vo=1;var t=we(),e=Mo(),n=t("iterator"),r=Array.prototype;return go=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function Do(){if(yo)return mo;yo=1;var t=L(),e=Ie(),n=Et();return mo=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function Ao(){if(wo)return bo;wo=1;var t=lr(),e=Bt(),n=Ct(),r=Mo(),o=we()("iterator");return bo=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function jo(){if(Eo)return xo;Eo=1;var t=P(),e=_t(),n=je(),r=Ft(),o=Ao(),i=TypeError;return xo=function(a,s){var u=arguments.length<2?o(a):s;if(e(u))return n(t(u,a));throw new i(r(a)+" is not iterable")},xo}function Io(){if(Co)return ko;Co=1;var t=we()("iterator"),e=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){e=!0}};r[t]=function(){return this},Array.from(r,(function(){throw 2}))}catch(t){}return ko=function(n,r){try{if(!r&&!e)return!1}catch(t){return!1}var o=!1;try{var i={};i[t]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(t){}return o}}!function(){if(To)return No;To=1;var t=Qn(),e=function(){if(Oo)return So;Oo=1;var t=$r(),e=P(),n=me(),r=Lo(),o=Po(),i=_r(),a=Ln(),s=Do(),u=jo(),l=Ao(),c=Array;return So=function(f){var d=n(f),h=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g;v&&(g=t(g,p>2?arguments[2]:void 0));var m,y,b,w,x,E,S=l(d),O=0;if(!S||this===c&&o(S))for(m=a(d),y=h?new this(m):c(m);m>O;O++)E=v?g(d[O],O):d[O],s(y,O,E);else for(y=h?new this:[],x=(w=u(d,S)).next;!(b=e(x,w)).done;O++)E=v?r(w,g,[b.value,O],!0):b.value,s(y,O,E);return y.length=O,y},So}();t({target:"Array",stat:!0,forced:!Io()((function(t){Array.from(t)}))},{from:e})}();var $o,Fo,_o,Bo,Wo,Ho,Vo,Uo,zo={},Ko={};function qo(){if(_o)return Fo;_o=1;var t=Mt();return Fo=t("document","documentElement")}function Jo(){if(Wo)return Bo;Wo=1;var t,e=je(),n=function(){if($o)return Ko;$o=1;var t=L(),e=Ae(),n=Ie(),r=je(),o=Nt(),i=Zn();return Ko.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var a,s=o(e),u=i(e),l=u.length,c=0;l>c;)n.f(t,a=u[c++],s[a]);return t},Ko}(),r=Dn(),o=on(),i=qo(),a=Se(),s=rn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,o;p="undefined"!=typeof document?document.domain&&t?h(t):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(e=n.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(t);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,Bo=Object.create||function(t,r){var o;return null!==t?(f[u]=e(t),o=new f,f[u]=null,o[c]=t):o=p(),void 0===r?o:n.f(o,r)}}function Go(){if(Vo)return Ho;Vo=1;var t=we(),e=Jo(),n=Ie().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Ho=function(t){o[r][t]=!0}}!function(){if(Uo)return zo;Uo=1;var t=Qn(),e=Mn().includes,n=R(),r=Go();t({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var Yo,Xo={};!function(){if(Yo)return Xo;Yo=1;var t=Qn(),e=St(),n=kt(),r=Nt(),o=Vr(),i=e([].join);t({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(t){return i(r(this),void 0===t?",":t)}})}();var Qo,Zo,ti,ei={};function ni(){if(Zo)return Qo;Zo=1;var t=R(),e=we(),n=At(),r=e("species");return Qo=function(e){return n>=51||!t((function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}}!function(){if(ti)return ei;ti=1;var t=Qn(),e=Hr().map;t({target:"Array",proto:!0,forced:!ni()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var ri,oi,ii,ai,si,ui,li,ci={};function fi(){if(oi)return ri;oi=1;var t=ye();return ri=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}function di(){if(ui)return si;ui=1;var t=ye(),e=Rt(),n=me(),r=rn(),o=function(){if(ai)return ii;ai=1;var t=R();return ii=!t((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return si=o?a.getPrototypeOf:function(r){var o=n(r);if(t(o,i))return o[i];var u=o.constructor;return e(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}!function(){if(li)return ci;li=1;var t=Qn(),e=P(),n=Lt(),r=je(),o=fi(),i=ke(),a=di();t({target:"Reflect",stat:!0},{get:function t(s,u){var l,c,f=arguments.length<3?s:arguments[2];return r(s)===f?s[u]:(l=i.f(s,u))?o(l)?l.value:void 0===l.get?void 0:e(l.get,f):n(c=a(s))?t(c,u,f):void 0}})}();var hi,pi,gi,vi,mi,yi,bi,wi,xi,Ei={};function Si(){if(pi)return hi;pi=1;var t=R(),e=b().RegExp,n=t((function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),r=n||t((function(){return!e("a","y").sticky})),o=n||t((function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));return hi={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function Oi(){if(vi)return gi;vi=1;var t=R(),e=b().RegExp;return gi=t((function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))}function ki(){if(yi)return mi;yi=1;var t=R(),e=b().RegExp;return mi=t((function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))}function Ci(){if(wi)return bi;wi=1;var t,e,n=P(),r=St(),o=io(),i=ao(),a=Si(),s=ve(),u=Jo(),l=an().get,c=Oi(),f=ki(),d=s("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(e=/b*/g,n(h,t=/a/,"a"),n(h,e,"a"),0!==t.lastIndex||0!==e.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(t){var e,r,a,s,c,f,E,S=this,O=l(S),k=o(t),C=O.raw;if(C)return C.lastIndex=S.lastIndex,e=n(p,C,k),S.lastIndex=C.lastIndex,e;var T=O.groups,N=w&&S.sticky,R=n(i,S),L=S.source,M=0,P=k;if(N&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),P=y(k,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(k,S.lastIndex-1))&&(L="(?: "+L+")",P=" "+P,M++),r=new RegExp("^(?:"+L+")",R)),x&&(r=new RegExp("^"+L+"$(?!\\s)",R)),b&&(a=S.lastIndex),s=n(h,N?r:S,P),N?s?(s.input=y(s.input,M),s[0]=y(s[0],M),s.index=S.lastIndex,S.lastIndex+=s[0].length):S.lastIndex=0:b&&s&&(S.lastIndex=S.global?s.index+s[0].length:a),x&&s&&s.length>1&&n(d,s[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&T)for(s.groups=f=u(null),c=0;c<T.length;c++)f[(E=T[c])[0]]=s[E[1]];return s}),bi=p}function Ti(){if(xi)return Ei;xi=1;var t=Qn(),e=Ci();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),Ei}Ti();var Ni,Ri,Li,Mi,Pi,Di,Ai,ji={};function Ii(){if(Ri)return Ni;Ri=1;var t=Lt(),e=Ot(),n=we()("match");return Ni=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function $i(){if(Mi)return Li;Mi=1;var t=Ii(),e=TypeError;return Li=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function Fi(){if(Di)return Pi;Di=1;var t=we()("match");return Pi=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Ai)return ji;Ai=1;var t,e=Qn(),n=Ir(),r=ke().f,o=Rn(),i=io(),a=$i(),s=Tt(),u=Fi(),l=he(),c=n("".slice),f=Math.min,d=u("endsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"endsWith"),!t||t.writable))&&!d},{endsWith:function(t){var e=i(s(this));a(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,u=void 0===n?r:f(o(n),r),l=i(t);return c(e,u-l.length,u)===l}})}();var _i,Bi={};!function(){if(_i)return Bi;_i=1;var t=Qn(),e=St(),n=$i(),r=Tt(),o=io(),i=Fi(),a=e("".indexOf);t({target:"String",proto:!0,forced:!i("includes")},{includes:function(t){return!!~a(o(r(this)),o(n(t)),arguments.length>1?arguments[1]:void 0)}})}();var Wi,Hi,Vi,Ui,zi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua={};function la(){if(Hi)return Wi;Hi=1;var t=St(),e=Tn(),n=io(),r=Tt(),o=t("".charAt),i=t("".charCodeAt),a=t("".slice),s=function(t){return function(s,u){var l,c,f=n(r(s)),d=e(u),h=f.length;return d<0||d>=h?t?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?t?o(f,d):l:t?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return Wi={codeAt:s(!1),charAt:s(!0)}}function ca(){if(Ui)return Vi;Ui=1;var t,e,n,r=R(),o=Rt(),i=Lt(),a=Jo(),s=di(),u=un(),l=we(),c=he(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(e=s(s(n)))!==Object.prototype&&(t=e):d=!0),!i(t)||r((function(){var e={};return t[f].call(e)!==e}))?t={}:c&&(t=a(t)),o(t[f])||u(t,f,(function(){return this})),Vi={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function fa(){if(Ki)return zi;Ki=1;var t=Ie().f,e=ye(),n=we()("toStringTag");return zi=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function da(){if(Qi)return Xi;Qi=1;var t=Lt();return Xi=function(e){return t(e)||null===e}}function ha(){if(ta)return Zi;ta=1;var t=da(),e=String,n=TypeError;return Zi=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function pa(){if(na)return ea;na=1;var t=function(){if(Yi)return Gi;Yi=1;var t=St(),e=_t();return Gi=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=Lt(),n=Tt(),r=ha();return ea=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=t(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(t){}return function(t,a){return n(t),r(a),e(t)?(i?o(t,a):t.__proto__=a,t):t}}():void 0)}function ga(){if(oa)return ra;oa=1;var t=Qn(),e=P(),n=he(),r=tn(),o=Rt(),i=function(){if(Ji)return qi;Ji=1;var t=ca().IteratorPrototype,e=Jo(),n=Et(),r=fa(),o=Mo(),i=function(){return this};return qi=function(a,s,u,l){var c=s+" Iterator";return a.prototype=e(t,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=di(),s=pa(),u=fa(),l=$e(),c=un(),f=we(),d=Mo(),h=ca(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",E=function(){return this};return ra=function(r,f,h,S,O,k,C){i(h,f,S);var T,N,R,L=function(t){if(t===O&&j)return j;if(!m&&t&&t in D)return D[t];switch(t){case b:case w:case x:return function(){return new h(this,t)}}return function(){return new h(this)}},M=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||L(O),I="Array"===f&&D.entries||A;if(I&&(T=a(I.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,E)),u(T,M,!0,!0),n&&(d[M]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return e(A,this)})),O)if(N={values:L(w),keys:k?j:L(b),entries:L(x)},C)for(R in N)(m||P||!(R in D))&&c(D,R,N[R]);else t({target:f,proto:!0,forced:m||P},N);return n&&!C||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function va(){return aa?ia:(aa=1,ia=function(t,e){return{value:t,done:e}})}!function(){if(sa)return ua;sa=1;var t=la().charAt,e=io(),n=an(),r=ga(),o=va(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",(function(t){a(this,{type:i,string:e(t),index:0})}),(function(){var e,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(e=t(r,i),n.index+=e.length,o(e,!1))}))}();var ma,ya,ba,wa,xa,Ea,Sa,Oa,ka,Ca,Ta,Na={};function Ra(){if(ya)return ma;ya=1;var t=M(),e=Function.prototype,n=e.apply,r=e.call;return ma="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),ma}function La(){if(wa)return ba;wa=1,Ti();var t=P(),e=un(),n=Ci(),r=R(),o=we(),i=$e(),a=o("species"),s=RegExp.prototype;return ba=function(u,l,c,f){var d=o(u),h=!r((function(){var t={};return t[d]=function(){return 7},7!==""[u](t)})),p=h&&!r((function(){var t=!1,e=/a/;return"split"===u&&((e={}).constructor={},e.constructor[a]=function(){return e},e.flags="",e[d]=/./[d]),e.exec=function(){return t=!0,null},e[d](""),!t}));if(!h||!p||c){var g=/./[d],v=l(d,""[u],(function(e,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:t(g,r,o,i)}:{done:!0,value:t(e,o,r,i)}:{done:!1}}));e(String.prototype,u,v[0]),e(s,d,v[1])}f&&i(s[d],"sham",!0)},ba}function Ma(){if(Ea)return xa;Ea=1;var t=la().charAt;return xa=function(e,n,r){return n+(r?t(e,n).length:1)}}function Pa(){if(Oa)return Sa;Oa=1;var t=St(),e=me(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Sa=function(t,u,l,c,f,d){var h=l+t.length,p=c.length,g=s;return void 0!==f&&(f=e(f),g=a),o(d,g,(function(e,o){var a;switch(r(o,0)){case"$":return"$";case"&":return t;case"`":return i(u,0,l);case"'":return i(u,h);case"<":a=f[i(o,1,-1)];break;default:var s=+o;if(0===s)return e;if(s>p){var d=n(s/10);return 0===d?e:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):e}a=c[s-1]}return void 0===a?"":a}))},Sa}function Da(){if(Ca)return ka;Ca=1;var t=P(),e=je(),n=Rt(),r=Ot(),o=Ci(),i=TypeError;return ka=function(a,s){var u=a.exec;if(n(u)){var l=t(u,a,s);return null!==l&&e(l),l}if("RegExp"===r(a))return t(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Ta)return Na;Ta=1;var t=Ra(),e=P(),n=St(),r=La(),o=R(),i=je(),a=Rt(),s=Ct(),u=Tn(),l=Rn(),c=io(),f=Tt(),d=Ma(),h=Bt(),p=Pa(),g=Da(),v=we()("replace"),m=Math.max,y=Math.min,b=n([].concat),w=n([].push),x=n("".indexOf),E=n("".slice),S="$0"==="a".replace(/./,"$0"),O=!!/./[v]&&""===/./[v]("a","$0");r("replace",(function(n,r,o){var S=O?"$":"$0";return[function(t,n){var o=f(this),i=s(t)?void 0:h(t,v);return i?e(i,t,o,n):e(r,c(o),t,n)},function(e,n){var s=i(this),f=c(e);if("string"==typeof n&&-1===x(n,S)&&-1===x(n,"$<")){var h=o(r,s,f,n);if(h.done)return h.value}var v=a(n);v||(n=c(n));var O,k=s.global;k&&(O=s.unicode,s.lastIndex=0);for(var C,T=[];null!==(C=g(s,f))&&(w(T,C),k);){""===c(C[0])&&(s.lastIndex=d(f,l(s.lastIndex),O))}for(var N,R="",L=0,M=0;M<T.length;M++){for(var P,D=c((C=T[M])[0]),A=m(y(u(C.index),f.length),0),j=[],I=1;I<C.length;I++)w(j,void 0===(N=C[I])?N:String(N));var $=C.groups;if(v){var F=b([D],j,A,f);void 0!==$&&w(F,$),P=c(t(n,void 0,F))}else P=p(D,f,A,j,$,n);A>=L&&(R+=E(f,L,A)+P,L=A+D.length)}return R+E(f,L)}]}),!!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||O)}();var Aa,ja,Ia,$a,Fa,_a={};!function(){if(Fa)return _a;Fa=1;var t=Qn(),e=function(){if(ja)return Aa;ja=1;var t=St(),e=Tt(),n=io(),r=/"/g,o=t("".replace);return Aa=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,"&quot;")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if($a)return Ia;$a=1;var t=R();return Ia=function(e){return t((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}}();t({target:"String",proto:!0,forced:n("anchor")},{anchor:function(t){return e(this,"a","name",t)}})}();var Ba=function(t,e){return Ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ba(t,e)};function Wa(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ba(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Ha=function(){return Ha=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ha.apply(this,arguments)};function Va(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ua(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function za(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Ka,qa={};!function(){if(Ka)return qa;Ka=1;var t=Qn(),e=Hr().find,n=Go(),r="find",o=!0;r in[]&&Array(1)[r]((function(){o=!1})),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Ja,Ga,Ya={};Ga||(Ga=1,function(){if(Ja)return Ya;Ja=1;var t=Qn(),e=b();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const Xa=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Qa,Za,ts,es={};function ns(){if(Za)return Qa;Za=1;var t=TypeError;return Qa=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}}!function(){if(ts)return es;ts=1;var t=Qn(),e=R(),n=Fr(),r=Lt(),o=me(),i=Ln(),a=ns(),s=Do(),u=Wr(),l=ni(),c=we(),f=At(),d=c("isConcatSpreadable"),h=f>=51||!e((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),p=function(t){if(!r(t))return!1;var e=t[d];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(t){var e,n,r,l,c,f=o(this),d=u(f,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(p(c=-1===e?f:arguments[e]))for(l=i(c),a(h+l),n=0;n<l;n++,h++)n in c&&s(d,h,c[n]);else a(h+1),s(d,h++,c);return d.length=h,d}})}();var rs,os,is,as,ss,us,ls,cs,fs,ds,hs,ps,gs,vs,ms,ys,bs,ws,xs,Es,Ss,Os,ks,Cs,Ts,Ns,Rs,Ls,Ms,Ps,Ds,As,js,Is,$s,Fs,_s,Bs,Ws,Hs,Vs={};function Us(){if(os)return rs;os=1;var t=b(),e=Dt(),n=Ot(),r=function(t){return e.slice(0,t.length)===t};return rs=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function zs(){if(as)return is;as=1;var t=Us();return is="NODE"===t}function Ks(){if(us)return ss;us=1;var t=sn(),e=Ie();return ss=function(n,r,o){return o.get&&t(o.get,r,{getter:!0}),o.set&&t(o.set,r,{setter:!0}),e.f(n,r,o)}}function qs(){if(cs)return ls;cs=1;var t=Mt(),e=Ks(),n=we(),r=L(),o=n("species");return ls=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}function Js(){if(ds)return fs;ds=1;var t=Pt(),e=TypeError;return fs=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function Gs(){if(ps)return hs;ps=1;var t=_r(),e=Ft(),n=TypeError;return hs=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Ys(){if(vs)return gs;vs=1;var t=je(),e=Gs(),n=Ct(),r=we()("species");return gs=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Xs(){if(ys)return ms;ys=1;var t=St();return ms=t([].slice)}function Qs(){if(ws)return bs;ws=1;var t=TypeError;return bs=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function Zs(){if(Es)return xs;Es=1;var t=Dt();return xs=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}function tu(){if(Os)return Ss;Os=1;var t,e,n,r,o=b(),i=Ra(),a=$r(),s=Rt(),u=ye(),l=R(),c=qo(),f=Xs(),d=Se(),h=Qs(),p=Zs(),g=zs(),v=o.setImmediate,m=o.clearImmediate,y=o.process,w=o.Dispatch,x=o.Function,E=o.MessageChannel,S=o.String,O=0,k={},C="onreadystatechange";l((function(){t=o.location}));var T=function(t){if(u(k,t)){var e=k[t];delete k[t],e()}},N=function(t){return function(){T(t)}},L=function(t){T(t.data)},M=function(e){o.postMessage(S(e),t.protocol+"//"+t.host)};return v&&m||(v=function(t){h(arguments.length,1);var n=s(t)?t:x(t),r=f(arguments,1);return k[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete k[t]},g?e=function(t){y.nextTick(N(t))}:w&&w.now?e=function(t){w.now(N(t))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=L,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(M)?(e=M,o.addEventListener("message",L,!1)):e=C in d("script")?function(t){c.appendChild(d("script"))[C]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(N(t),0)}),Ss={set:v,clear:m}}function eu(){if(Cs)return ks;Cs=1;var t=b(),e=L(),n=Object.getOwnPropertyDescriptor;return ks=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function nu(){if(Ns)return Ts;Ns=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},Ts=t}function ru(){if(As)return Ds;As=1;var t,e,n,r,o,i=b(),a=eu(),s=$r(),u=tu().set,l=nu(),c=Zs(),f=function(){if(Ls)return Rs;Ls=1;var t=Dt();return Rs=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(Ps)return Ms;Ps=1;var t=Dt();return Ms=/web0s(?!.*chrome)/i.test(t)}(),h=zs(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var w=new l,x=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=w.get();)try{n()}catch(e){throw w.head&&t(),e}e&&e.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),t=function(){o(x)}):h?t=function(){v.nextTick(x)}:(u=s(u,i),t=function(){u(x)}):(e=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){w.head||t(),w.add(e)}}return Ds=y}function ou(){return Is||(Is=1,js=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),js}function iu(){return Fs?$s:(Fs=1,$s=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function au(){if(Bs)return _s;Bs=1;var t=b();return _s=t.Promise}function su(){if(Hs)return Ws;Hs=1;var t=b(),e=au(),n=Rt(),r=Xn(),o=en(),i=we(),a=Us(),s=he(),u=At(),l=e&&e.prototype,c=i("species"),f=!1,d=n(t.PromiseRejectionEvent),h=r("Promise",(function(){var t=o(e),n=t!==String(e);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(t)){var r=new e((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((r.constructor={})[c]=i,!(f=r.then((function(){}))instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)}));return Ws={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var uu,lu,cu={};function fu(){if(uu)return cu;uu=1;var t=_t(),e=TypeError,n=function(n){var r,o;this.promise=new n((function(t,n){if(void 0!==r||void 0!==o)throw new e("Bad Promise constructor");r=t,o=n})),this.resolve=t(r),this.reject=t(o)};return cu.f=function(t){return new n(t)},cu}var du,hu,pu,gu,vu,mu={};function yu(){if(hu)return du;hu=1;var t=$r(),e=P(),n=je(),r=Ft(),o=Po(),i=Ln(),a=Pt(),s=jo(),u=Ao(),l=Ro(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return du=function(h,p,g){var v,m,y,b,w,x,E,S=g&&g.that,O=!(!g||!g.AS_ENTRIES),k=!(!g||!g.IS_RECORD),C=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),N=t(p,S),R=function(t){return v&&l(v,"normal",t),new f(!0,t)},L=function(t){return O?(n(t),T?N(t[0],t[1],R):N(t[0],t[1])):T?N(t,R):N(t)};if(k)v=h.iterator;else if(C)v=h;else{if(!(m=u(h)))throw new c(r(h)+" is not iterable");if(o(m)){for(y=0,b=i(h);b>y;y++)if((w=L(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=k?h.next:v.next;!(E=e(x,v)).done;){try{w=L(E.value)}catch(t){l(v,"throw",t)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function bu(){if(gu)return pu;gu=1;var t=au(),e=Io(),n=su().CONSTRUCTOR;return pu=n||!e((function(e){t.all(e).then(void 0,(function(){}))}))}var wu,xu={};var Eu,Su={};var Ou,ku={};var Cu,Tu,Nu,Ru,Lu={};function Mu(){if(Tu)return Cu;Tu=1;var t=je(),e=Lt(),n=fu();return Cu=function(r,o){if(t(r),e(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}function Pu(t){Promise.resolve().then(t)}Ru||(Ru=1,function(){if(lu)return Vs;lu=1;var t,e,n,r=Qn(),o=he(),i=zs(),a=b(),s=P(),u=un(),l=pa(),c=fa(),f=qs(),d=_t(),h=Rt(),p=Lt(),g=Js(),v=Ys(),m=tu().set,y=ru(),w=ou(),x=iu(),E=nu(),S=an(),O=au(),k=su(),C=fu(),T="Promise",N=k.CONSTRUCTOR,R=k.REJECTION_EVENT,L=k.SUBCLASSING,M=S.getterFor(T),D=S.set,A=O&&O.prototype,j=O,I=A,$=a.TypeError,F=a.document,_=a.process,B=C.f,W=B,H=!!(F&&F.createEvent&&a.dispatchEvent),V="unhandledrejection",U=function(t){var e;return!(!p(t)||!h(e=t.then))&&e},z=function(t,e){var n,r,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,l=t.resolve,c=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&Y(e),e.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===t.promise?c(new $("Promise-chain cycle")):(r=U(n))?s(r,n,l,c):l(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},K=function(t,e){t.notified||(t.notified=!0,y((function(){for(var n,r=t.reactions;n=r.get();)z(n,t);t.notified=!1,e&&!t.rejection&&J(t)})))},q=function(t,e,n){var r,o;H?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:e,reason:n},!R&&(o=a["on"+t])?o(r):t===V&&w("Unhandled promise rejection",n)},J=function(t){s(m,a,(function(){var e,n=t.facade,r=t.value;if(G(t)&&(e=x((function(){i?_.emit("unhandledRejection",r,n):q(V,n,r)})),t.rejection=i||G(t)?2:1,e.error))throw e.value}))},G=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){s(m,a,(function(){var e=t.facade;i?_.emit("rejectionHandled",e):q("rejectionhandled",e,t.value)}))},X=function(t,e,n){return function(r){t(e,r,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,K(t,!0))},Z=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new $("Promise can't be resolved itself");var r=U(e);r?y((function(){var n={done:!1};try{s(r,e,X(Z,n,t),X(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,K(t,!1))}catch(e){Q({done:!1},e,t)}}};if(N&&(I=(j=function(e){g(this,I),d(e),s(t,this);var n=M(this);try{e(X(Z,n),X(Q,n))}catch(t){Q(n,t)}}).prototype,(t=function(t){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:null})}).prototype=u(I,"then",(function(t,e){var n=M(this),r=B(v(this,j));return n.parent=!0,r.ok=!h(t)||t,r.fail=h(e)&&e,r.domain=i?_.domain:void 0,0===n.state?n.reactions.add(r):y((function(){z(r,n)})),r.promise})),e=function(){var e=new t,n=M(e);this.promise=e,this.resolve=X(Z,n),this.reject=X(Q,n)},C.f=B=function(t){return t===j||void 0===t?new e(t):W(t)},!o&&h(O)&&A!==Object.prototype)){n=A.then,L||u(A,"then",(function(t,e){var r=this;return new j((function(t,e){s(n,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete A.constructor}catch(t){}l&&l(A,I)}r({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:j}),c(j,T,!1,!0),f(T)}(),function(){if(vu)return mu;vu=1;var t=Qn(),e=P(),n=_t(),r=fu(),o=iu(),i=yu();t({target:"Promise",stat:!0,forced:bu()},{all:function(t){var a=this,s=r.f(a),u=s.resolve,l=s.reject,c=o((function(){var r=n(a.resolve),o=[],s=0,c=1;i(t,(function(t){var n=s++,i=!1;c++,e(r,a,t).then((function(t){i||(i=!0,o[n]=t,--c||u(o))}),l)})),--c||u(o)}));return c.error&&l(c.value),s.promise}})}(),function(){if(wu)return xu;wu=1;var t=Qn(),e=he(),n=su().CONSTRUCTOR,r=au(),o=Mt(),i=Rt(),a=un(),s=r&&r.prototype;if(t({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(t){return this.then(void 0,t)}}),!e&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(Eu)return Su;Eu=1;var t=Qn(),e=P(),n=_t(),r=fu(),o=iu(),i=yu();t({target:"Promise",stat:!0,forced:bu()},{race:function(t){var a=this,s=r.f(a),u=s.reject,l=o((function(){var r=n(a.resolve);i(t,(function(t){e(r,a,t).then(s.resolve,u)}))}));return l.error&&u(l.value),s.promise}})}(),function(){if(Ou)return ku;Ou=1;var t=Qn(),e=fu();t({target:"Promise",stat:!0,forced:su().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(Nu)return Lu;Nu=1;var t=Qn(),e=Mt(),n=he(),r=au(),o=su().CONSTRUCTOR,i=Mu(),a=e("Promise"),s=n&&!o;t({target:"Promise",stat:!0,forced:n||o},{resolve:function(t){return i(s&&this===a?r:this,t)}})}());var Du=function(t){return Object.prototype.toString.call(t)};r.css&&(r.fn.css=r.css),r.append&&(r.fn.append=r.append),r.addClass&&(r.fn.addClass=r.addClass),r.removeClass&&(r.fn.removeClass=r.removeClass),r.hasClass&&(r.fn.hasClass=r.hasClass),r.on&&(r.fn.on=r.on),r.focus&&(r.fn.focus=r.focus),r.attr&&(r.fn.attr=r.attr),r.removeAttr&&(r.fn.removeAttr=r.removeAttr),r.hide&&(r.fn.hide=r.hide),r.show&&(r.fn.show=r.show),r.offset&&(r.fn.offset=r.offset),r.width&&(r.fn.width=r.width),r.height&&(r.fn.height=r.height),r.parent&&(r.fn.parent=r.parent),r.parents&&(r.fn.parents=r.parents),r.is&&(r.fn.is=r.is),r.dataset&&(r.fn.dataset=r.dataset),r.val&&(r.fn.val=r.val),r.text&&(r.fn.text=r.text),r.html&&(r.fn.html=r.html),r.children&&(r.fn.children=r.children),r.remove&&(r.fn.remove=r.remove),r.find&&(r.fn.find=r.find),r.each&&(r.fn.each=r.each),r.empty&&(r.fn.empty=r.empty);var Au,ju=function(t){return"[object HTMLDocument]"===Du(t)},Iu=function(t){return"[object ShadowRoot]"===Du(t)},$u=function(t){return"[object DataTransfer]"===Du(t)},Fu=/\[object HTML([A-Z][a-z]*)*Element\]/,_u=function(t){return Fu.test(Du(t))},Bu=globalThis.Node,Wu=globalThis.Comment,Hu=globalThis.Element,Vu=globalThis.Text,Uu=globalThis.Range,zu=globalThis.Selection,Ku=globalThis.StaticRange,qu=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Ju=function(t){return Yu(t)&&8===t.nodeType},Gu=function(t){return Yu(t)&&1===t.nodeType},Yu=function(t){return null!=t&&"number"==typeof t.nodeType},Xu=function(t){return"[object Selection]"===Du(t)},Qu=function(t){return Yu(t)&&3===t.nodeType},Zu=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},tl=function(t){var e,n=Ua(t,2),r=n[0],o=n[1];if(Gu(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=Ua(rl(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;Gu(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=ol(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},el=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},nl=function(t){var e,n,r;return null!==(e=window.document.getElementById(t))&&void 0!==e?e:(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(t))||null},rl=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(Ju(o)||Gu(o)&&0===o.childNodes.length||Gu(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=e-1,n="backward"):i<0?(s=!0,i=e+1,n="forward"):(o=r[i],e=i,i+="forward"===n?1:-1);return[o,e]},ol=function(t,e,n){return Ua(rl(t,e,n),1)[0]},il=function(t){var e,n,r="";if(Qu(t)&&t.nodeValue)return t.nodeValue;if(Gu(t)){try{for(var o=Va(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=il(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(r+="\n")}return r};function al(t){var e=[];e.push(t);for(var n=0;e.length>0;){var r=e.pop();if(null==r)break;if(++n>1e4)break;var o=r.nodeName;if(1===r.nodeType){var i=o.toLowerCase();if(Xa.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u--)e.push(a[u])}}return null}function sl(t,e){if(!_u(t)||"true"!==t.dataset.slateVoid)for(var n=t.childNodes,r=n.length;r--;){var o=n[r],i=o.nodeType;3==i?e(o,t):1!=i&&9!=i&&11!=i||sl(o,e)}}function ul(e){if(0===e.length)return"";var n=e[0];return n.nodeType!==t.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}t.NodeType=void 0,(Au=t.NodeType||(t.NodeType={}))[Au.ELEMENT_NODE=1]="ELEMENT_NODE",Au[Au.TEXT_NODE=3]="TEXT_NODE",Au[Au.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",Au[Au.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",Au[Au.COMMENT_NODE=8]="COMMENT_NODE",Au[Au.DOCUMENT_NODE=9]="DOCUMENT_NODE",Au[Au.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",Au[Au.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var ll,cl,fl=0,dl=function(){this.id="".concat(fl++)},hl="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),pl="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),gl="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),vl="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ml="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),yl="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),bl=!ml&&!vl&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges;function wl(){if(cl)return ll;cl=1;var t=Nt(),e=Go(),n=Mo(),r=an(),o=Ie().f,i=ga(),a=va(),s=he(),u=L(),l="Array Iterator",c=r.set,f=r.getterFor(l);ll=i(Array,"Array",(function(e,n){c(this,{type:l,target:t(e),index:0,kind:n})}),(function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,a(void 0,!0);switch(t.kind){case"keys":return a(n,!1);case"values":return a(e[n],!1)}return a([n,e[n]],!1)}),"values");var d=n.Arguments=n.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(t){}return ll}wl();var xl,El,Sl,Ol,kl={};function Cl(){if(El)return xl;El=1;var t=R();return xl=!t((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Tl(){if(Ol)return Sl;Ol=1;var t=un();return Sl=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}var Nl,Rl,Ll,Ml,Pl,Dl,Al,jl,Il,$l,Fl,_l,Bl,Wl,Hl={exports:{}},Vl={};function Ul(){if(Nl)return Vl;Nl=1;var t=Ot(),e=Nt(),n=An().f,r=Xs(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Vl.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},Vl}function zl(){if(Pl)return Ml;Pl=1;var t=R(),e=Lt(),n=Ot(),r=function(){if(Ll)return Rl;Ll=1;var t=R();return Rl=t((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}(),o=Object.isExtensible,i=t((function(){}));return Ml=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function Kl(){if(Dl)return Hl.exports;Dl=1;var t=Qn(),e=St(),n=on(),r=Lt(),o=ye(),i=Ie().f,a=An(),s=Ul(),u=zl(),l=be(),c=Cl(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=Hl.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=e([].splice),o={};o[d]=1,n(o).length&&(a.f=function(t){for(var e=n(t),o=0,i=e.length;o<i;o++)if(e[o]===d){r(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!u(t))return"F";if(!e)return"E";p(t)}return t[d].objectID},getWeakData:function(t,e){if(!o(t,d)){if(!u(t))return!0;if(!e)return!1;p(t)}return t[d].weakData},onFreeze:function(t){return c&&f&&u(t)&&!o(t,d)&&p(t),t}};return n[d]=!0,Hl.exports}function ql(){if(jl)return Al;jl=1;var t=Rt(),e=Lt(),n=pa();return Al=function(r,o,i){var a,s;return n&&t(a=o.constructor)&&a!==i&&e(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function Jl(){if($l)return Il;$l=1;var t=Qn(),e=b(),n=St(),r=Xn(),o=un(),i=Kl(),a=yu(),s=Js(),u=Rt(),l=Ct(),c=Lt(),f=R(),d=Io(),h=fa(),p=ql();return Il=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],E=x&&x.prototype,S=x,O={},k=function(t){var e=n(E[t]);o(E,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!c(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(r(g,!u(x)||!(b||E.forEach&&!f((function(){(new x).entries().next()})))))S=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var C=new S,T=C[w](b?{}:-0,1)!==C,N=f((function(){C.has(1)})),R=d((function(t){new x(t)})),L=!b&&f((function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)}));R||((S=v((function(t,e){s(t,E);var n=p(new x,t,S);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n}))).prototype=E,E.constructor=S),(N||L)&&(k("delete"),k("has"),y&&k("get")),(L||T)&&k(w),b&&E.clear&&delete E.clear}return O[g]=S,t({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},Il}function Gl(){if(_l)return Fl;_l=1;var t=St(),e=Tl(),n=Kl().getWeakData,r=Js(),o=je(),i=Ct(),a=Lt(),s=yu(),u=Hr(),l=ye(),c=an(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=t([].splice),v=0,m=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return h(t.entries,(function(t){return t[0]===e}))};return y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,(function(e){return e[0]===t}));return~e&&g(this.entries,e,1),!!~e}},Fl={getConstructor:function(t,u,c,h){var p=t((function(t,e){r(t,g),f(t,{type:u,id:v++,frozen:null}),i(e)||s(e,t[h],{that:t,AS_ENTRIES:c})})),g=p.prototype,y=d(u),b=function(t,e,r){var i=y(t),a=n(o(e),!0);return!0===a?m(i).set(e,r):a[i.id]=r,t};return e(g,{delete:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).delete(t):r&&l(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).has(t):r&&l(r,e.id)}}),e(g,c?{get:function(t){var e=y(this);if(a(t)){var r=n(t);if(!0===r)return m(e).get(t);if(r)return r[e.id]}},set:function(t,e){return b(this,t,e)}}:{add:function(t){return b(this,t,!0)}}),p}}}Wl||(Wl=1,function(){if(Bl)return kl;Bl=1;var t,e=Cl(),n=b(),r=St(),o=Tl(),i=Kl(),a=Jl(),s=Gl(),u=Lt(),l=an().enforce,c=R(),f=nn(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,w=!n.ActiveXObject&&"ActiveXObject"in n,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){t=s.getConstructor(x,"WeakMap",!0),i.enable();var k=r(S.delete),C=r(S.has),T=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)||n.frozen.delete(e)}return k(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.has(e)}return C(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)?T(this,e):n.frozen.get(e)}return T(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),C(this,e)?O(this,e,n):r.frozen.set(e,n)}else O(this,e,n);return this}})}else e&&c((function(){var t=m([]);return O(new E,t,1),!g(t)}))&&o(S,{set:function(t,e){var n;return h(t)&&(g(t)?n=m:v(t)&&(n=y)),O(this,t,e),n&&n(t),this}})}());var Yl,Xl={};!function(){if(Yl)return Xl;Yl=1;var t=b(),e=Ar(),n=jr(),r=wl(),o=$e(),i=fa(),a=we()("iterator"),s=r.values,u=function(t,n){if(t){if(t[a]!==s)try{o(t,a,s)}catch(e){t[a]=s}if(i(t,n,!0),e[n])for(var u in r)if(t[u]!==r[u])try{o(t,u,r[u])}catch(e){t[u]=r[u]}}};for(var l in e)u(t[l]&&t[l].prototype,l);u(n,"DOMTokenList")}();var Ql=new WeakMap,Zl=new WeakMap,tc=new WeakMap,ec=new WeakMap,nc=new WeakMap,rc=new WeakMap,oc=new WeakMap,ic=new WeakMap,ac=new WeakMap,sc=new WeakMap,uc=new WeakMap,lc=new WeakMap,cc=new WeakMap,fc=new WeakMap,dc=new WeakMap,hc=new WeakMap,pc=new WeakMap,gc=new WeakMap,vc=new WeakMap,mc=new WeakMap,yc=new WeakMap,bc=new WeakMap,wc=new WeakMap,xc=new WeakMap,Ec=new WeakMap,Sc={getWindow:function(t){var e=yc.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=mc.get(e);return n||(n=new dl,mc.set(e,n)),n},setNewKey:function(t){var e=new dl;mc.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=dc.get(o);if(null==i){if(e.Editor.isEditor(o))return r;break}var a=fc.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=Sc.toDOMNode(t,t),n=e.getRootNode();return(ju(n)||Iu(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return dc.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=Sc.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,n){var r=[Sc.findPath(t,n)[0]];return e.Node.get(t,r)},toDOMNode:function(t,n){var r;if(e.Editor.isEditor(n))r=hc.get(t);else{var o=Sc.findKey(t,n);r=gc.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,e,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Sc.toDOMNode(t,t);try{r=Gu(e)?e:e.parentElement}catch(t){if(t instanceof Error&&!t.message.includes('Permission denied to access property "nodeType"'))throw t}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=e.Range.isBackward(n),a=Sc.toDOMPoint(t,r),s=e.Range.isCollapsed(n)?a:Sc.toDOMPoint(t,o),u=Sc.getWindow(t).document.createRange(),l=Ua(i?s:a,2),c=l[0],f=l[1],d=Ua(i?a:s,2),h=d[0],p=d[1],g=!!(Gu(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Gu(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return u.setStart(c,g?1:f),u.setEnd(h,v?1:p),u},toDOMPoint:function(t,n){var r,o,i,a=Ua(e.Editor.node(t,n.path),1)[0],s=Sc.toDOMNode(t,a);e.Editor.void(t,{at:n})&&(n={path:n.path,offset:0});var u=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var c=Va(u),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.childNodes[0];if(null!=h&&null!=h.textContent){var p=h.textContent.length,g=d.getAttribute("data-slate-length"),v=l+(null==g?p:parseInt(g,10));if(n.offset<=v){i=[h,Math.min(p,Math.max(0,n.offset-l))];break}l=v}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,e){var n=Gu(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?pc.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=Sc.toSlateNode(t,n.target),u=Sc.findPath(t,s);if(e.Editor.isVoid(t,s)){var l=i.getBoundingClientRect(),c=t.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=e.Editor.point(t,u,{edge:c?"start":"end"}),d=c?e.Editor.before(t,f):e.Editor.after(t,f);if(d)return e.Editor.range(t,d)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return Sc.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if((Xu(n)?n.anchorNode:n.startContainer)&&(Xu(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=yl&&el()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,u=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=Sc.toSlatePoint(t,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:Sc.toSlatePoint(t,[a,s],{exactMatch:l,suppressThrow:c});if(!d)return null;var h={anchor:f,focus:d};return e.Range.isExpanded(h)&&e.Range.isForward(h)&&Gu(a)&&e.Editor.void(t,{at:h.focus,mode:"highest"})&&(h=e.Editor.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,e,r){var o,i=r.exactMatch,a=r.suppressThrow,s=Ua(i?e:tl(e),2),u=s[0],l=s[1],c=u.parentNode,f=null,d=0;if(c){var h=c.closest('[data-slate-void="true"]'),p=c.closest("[data-slate-leaf]"),g=null;if(p){f=p.closest('[data-slate-node="text"]');var v=Sc.getWindow(t).document.createRange();v.setStart(f,0),v.setEnd(u,l);var m=v.cloneContents();za(za([],Ua(n(m.querySelectorAll("[data-slate-zero-width]"))),!1),Ua(n(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(t){t.parentNode.removeChild(t)})),d=m.textContent.length,g=f}else h&&((p=h.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),d=(g=p).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach((function(t){d-=t.textContent.length}))):d=1);g&&d===g.textContent.length&&(c.hasAttribute("data-slate-zero-width")||pl&&(null===(o=g.textContent)||void 0===o?void 0:o.endsWith("\n")))&&(d-=1)}if(!f){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var y=Sc.toSlateNode(t,f);return{path:Sc.findPath(t,y),offset:d}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.Editor.hasPath(t,r.path)&&e.Editor.hasPath(t,o.path)},getNodeType:function(t){return e.Element.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map((function(t){return e.Node.string(t)})).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.Editor.nodes(t,{universal:!0});try{for(var a=Va(i),s=a.next();!s.done;s=a.next()){var u=Ua(s.value,1)[0];e.Element.isElement(u)&&o.push(u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=Ua(e.Editor.nodes(t,{match:function(t){return r.checkNodeType(t,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(t){var n=Ua(e.Editor.nodes(t,{match:function(t){return e.Text.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=Ua(e.Editor.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&Ua(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.Editor.isEnd(t,r.anchor,n)||e.Editor.isEnd(t,r.focus,n))},getTextarea:function(t){var e=Ql.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return ec.get(t)||null},getHoverbar:function(t){return rc.get(t)||null},normalizeContent:function(t){t.children.forEach((function(e,n){t.normalizeNode([e,[n]])}))},getLeftLengthOfMaxLength:function(t){var e=t.getConfig(),n=e.maxLength,r=e.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-t.getText().replace(/\r|\n|(\r\n)/g,"").length;return o<=0&&r&&r(t),o},cleanExposedTexNodeInSelectionBlock:function(t){var n,o,i,a,s=Sc.getTextarea(t).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=Va(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(3!==f.nodeType)break;f.remove()}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}var d=e.Editor.nodes(t,{match:function(n){return!(!e.Element.isElement(n)||t.isInline(n))},universal:!0});try{for(var h=Va(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];sl(Sc.toDOMNode(t,v),(function(t,e){var n=r(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)}))}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},isLastNode:function(t,e){var n=t.children||[];return n[n.length-1]===e},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=e.Editor.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=Va(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(null==n)return!1;if(e.Range.isExpanded(n))return!1;var r=Sc.getSelectedNodeByType(t,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(t,n){var r=e.Editor.node(t,n);if(null==r)return!1;var o=Ua(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}},Oc=1,kc={};var Cc={};var Tc,Nc={};!function(){if(Tc)return Nc;Tc=1;var t=Qn(),e=Hr().filter;t({target:"Array",proto:!0,forced:!ni()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var Rc,Lc,Mc,Pc,Dc,Ac,jc,Ic={};function $c(){return Lc?Rc:(Lc=1,Rc="\t\n\v\f\r                 \u2028\u2029\ufeff")}!function(){if(jc)return Ic;jc=1;var t=Qn(),e=function(){if(Pc)return Mc;Pc=1;var t=St(),e=Tt(),n=io(),r=$c(),o=t("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(t){return function(r){var s=n(e(r));return 1&t&&(s=o(s,i,"")),2&t&&(s=o(s,a,"$1")),s}};return Mc={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ac)return Dc;Ac=1;var t=tn().PROPER,e=R(),n=$c();return Dc=function(r){return e((function(){return!!n[r]()||"​…᠎"!=="​…᠎"[r]()||t&&n[r].name!==r}))}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var Fc=[];var _c={};function Bc(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function Wc(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.Editor.isVoid(n,t),u="";s||(u=a.map((function(t){return Hc(t,n)})).join(""));var l=function(t){return _c[t]||Bc}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||Fc.forEach((function(e){return f=e(t,f)})),"string"==typeof c)return f;var d=c.prefix,h=void 0===d?"":d,p=c.suffix,g=void 0===p?"":p;return h&&(f=h+f),g&&(f+=g),f}function Hc(t,n){return e.Element.isElement(t)?Wc(t,n):function(t,e){var n=t.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var r=n;r=function(t){return t.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(r);var o=Sc.getParentsNodes(e,t).some((function(t){return"pre"===Sc.getNodeType(t)}));if(o||(r=r.replace(/\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/&nbsp;/g," ")),""===r){var i=Sc.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return Fc.forEach((function(e){return r=e(t,r)})),r}(t,n)}function Vc(t){return"w-e-element-".concat(t)}var Uc=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},zc=function(t,e,n){var r=Sc.toDOMRange(t,e).getBoundingClientRect(),o=Sc.toDOMRange(t,n).getBoundingClientRect();return Uc(r,o)&&Uc(o,r)},Kc=["span","b","strong","i","em","s","strike","u","font","sub","sup"],qc=[];var Jc=[];var Gc={};var Yc,Xc,Qc,Zc={};function tf(){if(Xc)return Yc;Xc=1;var t=Ie().f;return Yc=function(e,n,r){r in e||t(e,r,{configurable:!0,get:function(){return n[r]},set:function(t){n[r]=t}})}}!function(){if(Qc)return Zc;Qc=1;var t=L(),e=b(),n=St(),r=Xn(),o=ql(),i=$e(),a=Jo(),s=An().f,u=Pt(),l=Ii(),c=io(),f=so(),d=Si(),h=tf(),p=un(),g=R(),v=ye(),m=an().enforce,y=qs(),w=we(),x=Oi(),E=ki(),S=w("match"),O=e.RegExp,k=O.prototype,C=e.SyntaxError,T=n(k.exec),N=n("".charAt),M=n("".replace),P=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,_=d.UNSUPPORTED_Y,B=t&&(!$||F||x||E||g((function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))})));if(r("RegExp",B)){for(var W=function(t,e){var n,r,s,d,h,p,g=u(k,this),y=l(t),b=void 0===e,w=[],S=t;if(!g&&y&&b&&t.constructor===W)return t;if((y||u(k,t))&&(t=t.source,b&&(e=f(S))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),S=t,x&&"dotAll"in j&&(r=!!e&&P(e,"s")>-1)&&(e=M(e,/s/g,"")),n=e,F&&"sticky"in j&&(s=!!e&&P(e,"y")>-1)&&_&&(e=M(e,/y/g,"")),E&&(d=function(t){for(var e,n=t.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(e=N(t,r)))e+=N(t,++r);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===D(t,r+1,r+3))continue;T(A,D(t,r+1))&&(r+=2,l=!0),c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new C("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=e:o+=e}return[o,i]}(t),t=d[0],w=d[1]),h=o(O(t,e),g?this:k,W),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=W(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(e=N(t,r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+N(t,++r);return o}(t),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),t!==S)try{i(h,"source",""===S?"(?:)":S)}catch(t){}return h},H=s(O),V=0;H.length>V;)h(W,O,H[V++]);k.constructor=W,W.prototype=k,p(e,"RegExp",W,{constructor:!0})}y("RegExp")}();var ef=new RegExp(String.fromCharCode(160),"g");function nf(t){return t.replace(ef," ")}function rf(t,n){var r=t.length;if(r){var o=t[r-1];if(e.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text=o.text+n,!0}}return!1}function of(t,e,n){return{type:"paragraph",children:[{text:r(t).text().replace(/\s+/gm," ")}]}}function af(n,o){var i=function(e,n){var o=[];if(null!=e.attr("data-w-e-is-void"))return o;var i=e[0].childNodes;return 1===i.length&&"BR"===i[0].nodeName?(o.push({text:""}),o):(i.forEach((function(e){if(e.nodeType!==t.NodeType.ELEMENT_NODE)if(e.nodeType!==t.NodeType.TEXT_NODE);else{var i=e.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=nf(i),rf(o,i)||o.push({text:i}))}else{if("BR"===e.nodeName)return void(rf(o,"\n")||o.push({text:"\n"}));var a=uf(r(e),n);Array.isArray(a)?a.forEach((function(t){return o.push(t)})):o.push(a)}})),o)}(n,o),a=function(t){for(var e in Gc)if(t[0].matches(e))return Gc[e];return of}(n),s=a(n[0],i,o);return Array.isArray(s)||(s=[s]),s.forEach((function(t){e.Editor.isVoid(o,t)||(0===i.length&&(t.children=[{text:n.text().replace(/\s+/gm," ")}]),Jc.forEach((function(e){t=e(n[0],t,o)})))})),s}function sf(t,e){0===t.parents("pre").length&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=t[0].textContent||"";n=function(t){return t.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(n);var r={text:n=nf(n)};return Jc.forEach((function(n){r=n(t[0],r,e)})),r}function uf(t,e){qc.forEach((function(e){var n=e.selector,o=e.preParseHtml;t[0].matches(n)&&(t=r(o(t[0])))}));var n=ul(t);if("span"===n){if(t.attr("data-w-e-type"))return af(t,e);if(t[0].childNodes.length>1){var o=t[0].childNodes;return Array.from(o).map((function(t){return sf(r(t),e)}))}return sf(t,e)}if("code"===n)return"pre"===ul(t.parent())?af(t,e):sf(t,e);if(Kc.includes(n)){if(t[0].childNodes.length>0&&3!==t[0].childNodes[0].nodeType){o=t[0].childNodes;return Ha(Ha({},uf(r(o[0]),e)),sf(t,e))}return sf(t,e)}return af(t,e)}var lf,cf={};function ff(t,e,n){var o=r(n);return!!o.attr(e)||(o.attr(e,"true"),t.on("destroyed",(function(){o.removeAttr(e)})),!1)}function df(t,e){void 0===e&&(e="");var n=[];""===e&&(e="<p><br></p>"),0!==e.indexOf("<")&&(e=e.split(/\n/).map((function(t){return"<p>".concat(t,"</p>")})).join(""));var o=r("<div>".concat(e,"</div>"));return Array.from(o.children()).forEach((function(e){var o=uf(r(e),t);Array.isArray(o)?o.forEach((function(t){return n.push(t)})):n.push(o)})),n}!function(){if(lf)return cf;lf=1;var t=P(),e=St(),n=La(),r=je(),o=Ct(),i=Tt(),a=Ys(),s=Ma(),u=Rn(),l=io(),c=Bt(),f=Da(),d=Si(),h=R(),p=d.UNSUPPORTED_Y,g=Math.min,v=e([].push),m=e("".slice),y=!h((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),b="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;n("split",(function(e,n,d){var h="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:t(n,this,e,r)}:n;return[function(n,r){var a=i(this),s=o(n)?void 0:c(n,e);return s?t(s,n,a,r):t(h,l(a),n,r)},function(t,e){var o=r(this),i=l(t);if(!b){var c=d(h,o,i,e,h!==n);if(c.done)return c.value}var y=a(o,RegExp),w=o.unicode,x=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),E=new y(p?"^(?:"+o.source+")":o,x),S=void 0===e?4294967295:e>>>0;if(0===S)return[];if(0===i.length)return null===f(E,i)?[i]:[];for(var O=0,k=0,C=[];k<i.length;){E.lastIndex=p?0:k;var T,N=f(E,p?m(i,k):i);if(null===N||(T=g(u(E.lastIndex+(p?k:0)),i.length))===O)k=s(i,k,w);else{if(v(C,m(i,O,k)),C.length===S)return C;for(var R=1;R<=N.length-1;R++)if(v(C,N[R]),C.length===S)return C;k=O=T}}return v(C,m(i,O)),C}]}),b||!y,p)}();var hf,pf,gf,vf;vf||(vf=1,gf||(gf=1,Jl()("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),function(){if(pf)return hf;pf=1;var t=Jo(),e=Ks(),n=Tl(),r=$r(),o=Js(),i=Ct(),a=yu(),s=ga(),u=va(),l=qs(),c=L(),f=Kl().fastKey,d=an(),h=d.set,p=d.getterFor;return hf={getConstructor:function(s,u,l,d){var g=s((function(e,n){o(e,v),h(e,{type:u,index:t(null),first:null,last:null,size:0}),c||(e.size=0),i(n)||a(n,e[d],{that:e,AS_ENTRIES:l})})),v=g.prototype,m=p(u),y=function(t,e,n){var r,o,i=m(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=m(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return n(v,{clear:function(){for(var e=m(this),n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;e.first=e.last=null,e.index=t(null),c?e.size=0:this.size=0},delete:function(t){var e=this,n=m(e),r=b(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),c?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=m(this),o=r(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),n(v,l?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),c&&e(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(t,e,n){var r=e+" Iterator",o=p(e),i=p(r);s(t,e,(function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?u("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,u(void 0,!0))}),n?"entries":"values",!n,!0),l(e)}},hf}())));var mf=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function yf(t,n){t.isInline(n)?(t.insertNode(n),"link"===n.type&&t.insertFragment([{text:""}])):e.Transforms.insertNodes(t,n,{mode:"highest"})}var bf,wf,xf,Ef,Sf,Of,kf,Cf,Tf,Nf,Rf,Lf,Mf,Pf,Df,Af,jf,If,$f,Ff,_f,Bf,Wf,Hf,Vf,Uf,zf,Kf,qf,Jf,Gf,Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id=function(n){var o=n,i=o.onChange,a=o.insertText,s=o.apply,u=o.deleteBackward;return o.insertText=function(t){o.getConfig().readOnly||a(t)},o.apply=function(t){var n,r,i,a,u,l,c,f,d=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":try{for(var h=Va(e.Editor.levels(o,{at:t.path})),p=h.next();!p.done;p=h.next()){var g=Ua(p.value,2),v=g[0],m=g[1],y=Sc.findKey(o,v);d.push([m,y])}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var b=Va(e.Editor.levels(o,{at:e.Path.parent(t.path)})),w=b.next();!w.done;w=b.next()){var x=Ua(w.value,2);v=x[0],m=x[1],y=Sc.findKey(o,v);d.push([m,y])}}catch(t){i={error:t}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}break;case"move_node":try{for(var E=Va(e.Editor.levels(o,{at:e.Path.common(e.Path.parent(t.path),e.Path.parent(t.newPath))})),S=E.next();!S.done;S=E.next()){var O=Ua(S.value,2);v=O[0],m=O[1],y=Sc.findKey(o,v);d.push([m,y])}}catch(t){u={error:t}}finally{try{S&&!S.done&&(l=E.return)&&l.call(E)}finally{if(u)throw u.error}}}s(t);try{for(var k=Va(d),C=k.next();!C.done;C=k.next()){var T=Ua(C.value,2);m=T[0],y=T[1],v=Ua(e.Editor.node(o,m),1)[0];mc.set(v,y)}}catch(t){c={error:t}}finally{try{C&&!C.done&&(f=k.return)&&f.call(k)}finally{if(c)throw c.error}}},o.deleteBackward=function(t){if("line"!==t)return u(t);if(n.selection&&e.Range.isCollapsed(n.selection)){var r=e.Editor.above(n,{match:function(t){return e.Editor.isBlock(n,t)},at:n.selection});if(r){var i=Ua(r,2)[1],a=e.Editor.range(n,i,n.selection.anchor),s=function(t,n){var r=e.Editor.range(t,e.Range.end(n)),o=Array.from(e.Editor.positions(t,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(zc(t,e.Editor.range(t,o[i]),r))return e.Editor.range(t,o[i],r);if(o.length<2)return e.Editor.range(t,o[o.length-1],r);for(;s!==o.length&&s!==i;)zc(t,e.Editor.range(t,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return e.Editor.range(t,o[a],r)}(o,a);e.Range.isCollapsed(s)||e.Transforms.delete(n,{at:s})}}},o.onChange=function(){var t=o.selection;null!=t&&wc.set(o,t),o.emit("change"),i()},o.handleTab=function(){o.insertText(" ")},o.getHtml=function(){var t=o.children;return(void 0===t?[]:t).map((function(t){return Hc(t,o)})).join("")},o.getText=function(){var t=o.children;return(void 0===t?[]:t).map((function(t){return e.Node.string(t)})).join("\n")},o.getSelectionText=function(){var t=o.selection;return null==t?"":e.Editor.string(n,t)},o.getElemsByType=function(t,n){var r,i;void 0===n&&(n=!1);var a=[],s=e.Editor.nodes(o,{at:[],universal:!0});try{for(var u=Va(s),l=u.next();!l.done;l=u.next()){var c=Ua(l.value,1)[0];if(e.Element.isElement(c))if(n?c.type.indexOf(t)>=0:c.type===t){var f=Vc(Sc.findKey(o,c).id);a.push(Ha(Ha({},c),{id:f}))}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return a},o.getElemsByTypePrefix=function(t){return o.getElemsByType(t,!0)},o.isEmpty=function(){var t=o.children,n=void 0===t?[]:t;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(e.Element.isElement(r)&&"paragraph"===r.type){var i=r.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];if(null==s)return!0;if(e.Text.isText(s)&&""===s.text)return!0}return!1},o.clear=function(){e.Transforms.delete(o,{at:{anchor:e.Editor.start(o,[]),focus:e.Editor.end(o,[])}}),0===o.children.length&&e.Transforms.insertNodes(o,[{type:"paragraph",children:[{text:""}]}])},o.getParentNode=function(t){return Sc.getParentNode(o,t)},o.dangerouslyInsertHtml=function(n,i){if(void 0===n&&(n=""),void 0===i&&(i=!1),n){var a=document.createElement("div");a.innerHTML=n;var s=Array.from(a.childNodes);if(s=s.filter((function(e){var n=e.nodeType,r=e.nodeName;return n===t.NodeType.TEXT_NODE||n===t.NodeType.ELEMENT_NODE&&!mf.has(r.toLowerCase())})),0!==s.length){var u=o.selection;if(null!=u){var l=null;if(Sc.isSelectedEmptyParagraph(o)&&!i)l=[u.focus.path[0]];a.setAttribute("hidden","true"),document.body.appendChild(a);var c=0;s.forEach((function(e,n){var i=e.nodeType,a=e.nodeName,u=e.textContent,l=void 0===u?"":u;if(i!==t.NodeType.TEXT_NODE)if("BR"!==a){var f=e,d=!1;if(Kc.includes(a.toLowerCase()))d=!0;else for(var h in Gc)if(f.matches(h)){d=!0;break}if(d){var p=uf(r(f),o);return Array.isArray(p)?(p.forEach((function(t){return yf(o,t)})),c++):(yf(o,p),c++),void(Sc.isSelectedVoidNode(o)&&o.move(1))}var g=window.getComputedStyle(f).display;if(!Sc.isSelectedEmptyParagraph(o)&&g.indexOf("inline")<0){if(n>=1){var v=s[n-1];"matches"in v&&v.matches("ul:not([data-w-e-type]),ol:not([data-w-e-type])")&&o.insertBreak()}o.insertBreak()}o.dangerouslyInsertHtml(f.innerHTML,!0)}else o.insertText("\n");else{if(!l||!l.trim())return;o.insertNode({text:l})}})),c&&l&&Sc.isEmptyPath(o,l)&&e.Transforms.removeNodes(o,{at:l}),a.remove()}}}},o.setHtml=function(t){void 0===t&&(t="");var n=o.isDisabled(),r=o.isFocused(),i=JSON.stringify(o.selection);o.enable(),o.focus(),o.clear();var a=df(o,null==t?"":t);if(e.Transforms.insertFragment(o,a),r||(o.deselect(),o.blur()),n&&(o.deselect(),o.disable()),o.isFocused())try{o.select(JSON.parse(i))}catch(t){o.select(e.Editor.start(o,[]))}},o},ad={exports:{}},sd={exports:{}};function ud(){if(wf)return bf;wf=1;return bf=function(t){return null!=t}}function ld(){if(Of)return Sf;Of=1;var t=function(){if(Ef)return xf;Ef=1;var t=ud(),e={object:!0,function:!0,undefined:!0};return xf=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return Sf=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function cd(){if(Nf)return Tf;Nf=1;var t=function(){if(Cf)return kf;Cf=1;var t=ld();return kf=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!t(e)}}(),e=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Tf=function(r){return!!t(r)&&!e.test(n.call(r))}}function fd(){if(If)return jf;If=1;var t=(Af?Df:(Af=1,Df=function(){}))();return jf=function(e){return e!==t&&null!==e}}function dd(){return Bf||(Bf=1,_f=(Pf?Mf:(Pf=1,Mf=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(Ff)return $f;Ff=1;var t=fd(),e=Object.keys;return $f=function(n){return e(t(n)?Object(n):n)}}()),_f}function hd(){if(Uf)return Vf;Uf=1;var t=dd(),e=function(){if(Hf)return Wf;Hf=1;var t=fd();return Wf=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return Vf=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(e(r)),s=function(t){try{r[t]=o[t]}catch(t){i||(i=t)}},a=1;a<u;++a)t(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},Vf}function pd(){return Kf?zf:(Kf=1,zf=(Lf||(Lf=1,Rf=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}),Rf)()?Object.assign:hd())}function gd(){return td||(td=1,Zf=function(){if(Yf)return Gf;Yf=1;var t="razdwatrzy";return Gf=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(Qf)return Xf;Qf=1;var t=String.prototype.indexOf;return Xf=function(e){return t.call(this,e,arguments[1])>-1},Xf}()),Zf}function vd(){if(ed)return sd.exports;ed=1;var t=ud(),e=cd(),n=pd(),r=function(){if(Jf)return qf;Jf=1;var t=fd(),e=Array.prototype.forEach,n=Object.create;return qf=function(r){var o=n(null);return e.call(arguments,(function(e){t(e)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(e),o)})),o},qf}(),o=gd(),i=sd.exports=function(e,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof e?(l=i,i=e,e=null):l=arguments[2],t(e)?(a=o.call(e,"c"),s=o.call(e,"e"),u=o.call(e,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,f;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],t(a)?e(a)?t(s)?e(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,t(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),f={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),f):f},sd.exports}var md=(od||(od=1,function(t,e){var n,r,o,i,a,s,u,l=vd(),c=rd?nd:(rd=1,nd=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var r,i;return c(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},i=function(t){var e,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];for(o=o.slice(),e=0;r=o[e];++e)f.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];f.call(o,this,i)}},a={on:n=function(t,e){var n;return c(e),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:r,off:o=function(t,e){var n,r,o,i;if(c(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(i=0;o=r[i];++i)o!==e&&o.__eeOnceListener__!==e||(2===r.length?n[t]=r[i?0:1]:r.splice(i,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),t.exports=e=function(t){return null==t?h(u):g(Object(t),s)},e.methods=a}(ad,ad.exports)),ad.exports),yd=g(md);function bd(t){var e=xc.get(t);return null==e&&(e=yd(),xc.set(t,e)),e}var wd=new WeakMap;function xd(t,e){var n=wd.get(t);null==n&&(n=new Set,wd.set(t,n)),n.add(e)}var Ed=function(t){var e=t;return e.on=function(t,n){var r=bd(e);if(r.on(t,n),"destroyed"===t&&xd(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),xd(e,o)}},e.once=function(t,n){bd(e).once(t,n)},e.off=function(t,n){bd(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=bd(e);if(o.emit.apply(o,za([t],Ua(n),!1)),"destroyed"===t){var i=function(t){return wd.get(t)||new Set}(e);i.forEach((function(t){return o.off("destroyed",t)})),function(t){wd.set(t,new Set)}(e)}},e};function Sd(t){var e=Sc.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function Od(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=Sd(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=Sc.toDOMRange(t,n).getClientRects()[0];if(null==u)return e;u.width;var l=u.height,c={},f=u.top-o,d=u.left-i;if(d>a/2){var h=a-d;c.right="".concat(h+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var p=s-f;c.bottom="".concat(p+5,"px")}else{var g=f+l;g<0&&(g=0),c.top="".concat(g+5,"px")}return c}function kd(t,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==t.selection)return o;var i=e.Element.isElement(n)&&t.isVoid(n),a=e.Element.isElement(n)&&t.isInline(n),s=vc.get(n);if(null==s)return o;var u=s.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(i){var h=al(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=Sd(t);if(null==g)return o;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,E=c-m;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){var S;if(i?a?E>(y-d)/2?w.right="".concat(y-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px");return w}throw new Error("type '".concat(r,"' is invalid"))}function Cd(t,e){Pu((function(){var n=Sd(t);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=e.offset(),l=u.top,c=u.left,f=e.width(),d=e.height(),h=l-o,p=c-i,g=e.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=e.css("top"),m=parseInt(v.toString())-r;m<0&&(m=0),e.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=e.css("bottom"),b=parseInt(y.toString())-Math.abs(l);e.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=e.css("left"),x=parseInt(w.toString())-r;x<0&&(x=0),e.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=e.css("right"),S=parseInt(E.toString())-Math.abs(c);e.css("right","".concat(S,"px"))}}}))}var Td,Nd={};!function(){if(Td)return Nd;Td=1;var t=Qn(),e=Fr(),n=_r(),r=Lt(),o=Nn(),i=Ln(),a=Nt(),s=Do(),u=we(),l=ni(),c=Xs(),f=l("slice"),d=u("species"),h=Array,p=Math.max;t({target:"Array",proto:!0,forced:!f},{slice:function(t,u){var l,f,g,v=a(this),m=i(v),y=o(t,m),b=o(void 0===u?m:u,m);if(e(v)&&(l=v.constructor,(n(l)&&(l===h||e(l.prototype))||r(l)&&null===(l=l[d]))&&(l=void 0),l===h||void 0===l))return c(v,y,b);for(f=new(void 0===l?h:l)(p(b-y,0)),g=0;y<b;y++,g++)y in v&&s(f,g,v[y]);return f.length=g,f}})}();var Rd,Ld,Md,Pd={};!function(){if(Md)return Pd;Md=1;var t=Qn(),e=function(){if(Ld)return Rd;Ld=1;var t=L(),e=St(),n=P(),r=R(),o=Zn(),i=Jn(),a=xt(),s=me(),u=kt(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return Rd=!l||r((function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(t){n[t]=t})),7!==l({},e)[r]||o(l({},n)).join("")!==i}))?function(e,r){for(var l=s(e),c=arguments.length,d=1,h=i.f,p=a.f;c>d;)for(var g,v=u(arguments[d++]),m=h?f(o(v),h(v)):o(v),y=m.length,b=0;y>b;)g=m[b++],t&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Rd}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Dd,Ad={};!function(){if(Dd)return Ad;Dd=1;var t,e=Qn(),n=Ir(),r=ke().f,o=Rn(),i=io(),a=$i(),s=Tt(),u=Fi(),l=he(),c=n("".slice),f=Math.min,d=u("startsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"startsWith"),!t||t.writable))&&!d},{startsWith:function(t){var e=i(s(this));a(t);var n=o(f(arguments.length>1?arguments[1]:void 0,e.length)),r=i(t);return c(e,n,n+r.length)===r}})}();var jd=["props","attrs","style","dataset","on","hook"];function Id(t){var e=t.data,n=void 0===e?{}:e,r=t.children,o=void 0===r?[]:r;Object.keys(n).forEach((function(e){var r,o,i=n[e];if("key"!==e){if(!jd.includes(e)){if(e.startsWith("data-")){var a=e.slice(5);return a=u(a),function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,e)}(t,((r={})[a]=i,r)),void delete n[e]}!function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.props&&(n.props={});Object.assign(n.props,e)}(t,(o={},o[e]=i,o)),delete n[e]}}else t.key=i})),o.length>0&&o.forEach((function(t){"string"!=typeof t&&Id(t)}))}var $d=[];var Fd={};function _d(t,e,n){var r=n.isInline(t)?"span":"div";return s.jsx(r,null,e)}function Bd(t,n){var r,o=Sc.findKey(n,t),i=n.isInline(t),a=e.Editor.isVoid(n,t),u=Vc(o.id),l={id:u,key:o.id,"data-slate-node":"element","data-slate-inline":i},c=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return Fd[t]||_d}(c);r=a?null:d.map((function(e,r){return Ud(e,r,t,n)}));var p=h(t,r,n);if(a){l["data-slate-void"]=!0;var g=i?"span":"div",v=Ua(e.Node.texts(t),1),m=Ua(v[0],1)[0],y=Ud(m,0,t,n),b=s.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=s.jsx(g,{style:{position:"relative"}},p,b),fc.set(m,0),dc.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,l),a||i||(p=function(t,e){var n=e;return $d.forEach((function(r){n=r(t,e)})),n}(t,p)),Pu((function(){var e=nl(u);null!=e&&(gc.set(o,e),vc.set(t,e),pc.set(e,t))})),p}function Wd(t,e){return void 0===e&&(e=!1),s.jsx("span",{"data-slate-string":!0},e?t+"\n":t)}function Hd(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),s.jsx("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?s.jsx("br",null):null)}function Vd(t,n,r){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var o=Sc.findKey(r,t),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,u=Sc.findPath(r,t),l=i([t,u]),c=e.Text.decorations(t,l),f=c.map((function(o,i){var a=function(t,n,r,o,i){void 0===n&&(n=!1);var a=t.text,s=Sc.findPath(i,r),u=e.Path.parent(s);if(e.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?Hd(e.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==e.Editor.string(i,u)?""===a?Hd():n&&"\n"===a.slice(-1)?Wd(a,!0):Wd(a):Hd(0,!0)}(o,i===c.length-1,t,n,r);return a=function(t,e){var n=e;return $d.forEach((function(e){n=e(t,n)})),n}(o,a),s.jsx("span",{"data-slate-leaf":!0},a)})),d=(a=o.id,"w-e-text-".concat(a)),h=s.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return Pu((function(){var e=nl(d);null!=e&&(gc.set(o,e),vc.set(t,e),pc.set(e,t))})),h}function Ud(t,n,r,o){return fc.set(t,n),dc.set(t,r),e.Element.isElement(t)?Bd(t,o):Vd(t,r,o)}function zd(t,e){var n,o,i=t.$scroll,a=(n=t.id,"w-e-textarea-".concat(n)),u=e.getConfig(),l=u.readOnly,c=u.autoFocus,f=function(t,e){return void 0===e&&(e=!1),s.h("div#".concat(t),{props:{contentEditable:!e}})}(a,l),d=e.children||[];f.children=d.map((function(t,n){var r=Ud(t,n,e,e);return Id(r),r}));var h=uc.get(t);if(null==h&&(h=!0),h){var p=function(t){return r('<div\n id="'.concat(t,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(a);i.append(p),t.$textArea=p,o=p[0],(v=s.init([s.classModule,s.propsModule,s.styleModule,s.datasetModule,s.eventListenersModule,s.attributesModule]))(o,f),uc.set(t,!1),lc.set(t,v)}else{var g=cc.get(t),v=lc.get(t);if(null==g||null==v)return;o=g.elm,v(g,f)}if(null!=o||null!=(o=nl(a))){if((h?c:e.isFocused())&&o.focus({preventScroll:!0}),h){var m=qu(o);m&&yc.set(e,m)}hc.set(e,o),vc.set(e,o),pc.set(o,e),cc.set(t,f)}}const Kd=t=>"object"==typeof t&&null!=t&&1===t.nodeType,qd=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,Jd=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return qd(n.overflowY,e)||qd(n.overflowX,e)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},Gd=(t,e,n,r,o,i,a,s)=>i<t&&a>e||i>t&&a<e?0:i<=t&&s<=n||a>=e&&s>=n?i-t-r:a>e&&s<n||i<t&&s>n?a-e+o:0,Yd=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},Xd=(t,e)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f="function"==typeof l?l:t=>t!==l;if(!Kd(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Kd(p)&&f(p);){if(p=Yd(p),p===d){h.push(p);break}null!=p&&p===document.body&&Jd(p)&&!Jd(document.documentElement)||null!=p&&Jd(p,c)&&h.push(p)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:x,right:E,bottom:S,left:O}=t.getBoundingClientRect(),{top:k,right:C,bottom:T,left:N}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);let R="start"===s||"nearest"===s?x-k:"end"===s?S+T:x+b/2-k+T,L="center"===u?O+w/2-N+C:"end"===u?E+C:O-N;const M=[];for(let t=0;t<h.length;t++){const e=h[t],{height:n,width:r,top:o,right:i,bottom:l,left:c}=e.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&x>=o&&S<=l&&O>=c&&E<=i)return M;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),k=parseInt(f.borderTopWidth,10),C=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,P=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-C:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-k-T:0,j="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,I="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(d===e)N="start"===s?R:"end"===s?R-v:"nearest"===s?Gd(y,y+v,v,k,T,y+R,y+R+b,b):R-v/2,P="start"===u?L:"center"===u?L-g/2:"end"===u?L-g:Gd(m,m+g,g,p,C,m+L,m+L+w,w),N=Math.max(0,N+y),P=Math.max(0,P+m);else{N="start"===s?R-o-k:"end"===s?R-l+T+A:"nearest"===s?Gd(o,l,n,k,T+A,R,R+b,b):R-(o+n/2)+A/2,P="start"===u?L-c-p:"center"===u?L-(c+r/2)+D/2:"end"===u?L-i+C+D:Gd(c,i,r,p,C+D,L,L+w,w);const{scrollLeft:t,scrollTop:a}=e;N=0===I?0:Math.max(0,Math.min(a+N/I,e.scrollHeight-n/I+A)),P=0===j?0:Math.max(0,Math.min(t+P/j,e.scrollWidth-r/j+D)),R+=a-N,L+=t-P}M.push({el:e,top:N,left:P})}return M},Qd=t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"};function Zd(t,e){return Yu(e)&&Sc.hasDOMNode(t,e,{editable:!0})}function th(t,n){if(t.getConfig().readOnly)return!1;var r=eh(t,n)&&Sc.toSlateNode(t,n);return e.Editor.isVoid(t,r)}function eh(t,e){return Yu(e)&&Sc.hasDOMNode(t,e)}function nh(t,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=Sc.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=hc.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=Sc.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&e.Range.equals(c,o)){var f=!0;if(e.Range.isCollapsed(o)){var d=a.anchorNode,h=a.anchorOffset;if(d===u){var p=u.childNodes,g=void 0;(g=p[h])&&g.matches("table")&&(f=!1),(g=p[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||Sc.hasRange(n,o)){t.isUpdatingSelection=!0;var v=o&&Sc.toDOMRange(n,o);if(v){e.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;!function(t,e){if(!t.isConnected||!(t=>{let e=t;for(;e&&e.parentNode;){if(e.parentNode===document)return!0;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1})(t))return;const n=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(e))return e.behavior(Xd(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of Xd(t,Qd(e))){const t=i-n.top+n.bottom,e=a-n.left+n.right;o.scroll({top:t,left:e,behavior:r})}}(m,{scrollMode:"if-needed",boundary:i.scroll?u.parentElement:y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else a.removeAllRanges();setTimeout((function(){v&&pl&&u.focus(),t.isUpdatingSelection=!1}))}else n.selection=Sc.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var rh=new WeakMap,oh=new WeakMap;var ih={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},ah={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},sh={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},uh=function(t){var e=ih[t],n=ah[t],r=sh[t],o=e&&l.isKeyHotkey(e),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(t){return!(!o||!o(t))||(!!(hl&&i&&i(t))||!(hl||!a||!a(t)))}},lh={isBold:uh("bold"),isCompose:uh("compose"),isMoveBackward:uh("moveBackward"),isMoveForward:uh("moveForward"),isDeleteBackward:uh("deleteBackward"),isDeleteForward:uh("deleteForward"),isDeleteLineBackward:uh("deleteLineBackward"),isDeleteLineForward:uh("deleteLineForward"),isDeleteWordBackward:uh("deleteWordBackward"),isDeleteWordForward:uh("deleteWordForward"),isExtendBackward:uh("extendBackward"),isExtendForward:uh("extendForward"),isExtendLineBackward:uh("extendLineBackward"),isExtendLineForward:uh("extendLineForward"),isItalic:uh("italic"),isMoveLineBackward:uh("moveLineBackward"),isMoveLineForward:uh("moveLineForward"),isMoveWordBackward:uh("moveWordBackward"),isMoveWordForward:uh("moveWordForward"),isRedo:uh("redo"),isSplitBlock:uh("splitBlock"),isTransposeCharacter:uh("transposeCharacter"),isUndo:uh("undo"),isTab:uh("tab"),isSelectAll:uh("selectAll")};function ch(t){t.preventDefault()}var fh,dh={beforeinput:function(t,n,r){var o=t,i=r.getConfig().readOnly;if(bl&&!i&&Zd(r,o.target)){var a=r.selection,s=o.inputType,u=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var l=Ua(o.getTargetRanges(),1)[0];if(l){var c=Sc.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&e.Range.equals(a,c)||e.Transforms.select(r,c)}}if(a&&e.Range.isExpanded(a)&&s.startsWith("delete")){var f=s.endsWith("Backward")?"backward":"forward";e.Editor.deleteFragment(r,{direction:f})}else switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":e.Editor.deleteForward(r);break;case"deleteContentBackward":e.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":e.Editor.deleteBackward(r,{unit:"line"}),e.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":e.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":e.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":e.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":e.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":e.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":e.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===s&&!Ec.get(r))break;$u(u)?r.insertData(u):"string"==typeof u&&e.Editor.insertText(r,u)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&Zd(r,o.target)){var s=Sc.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===Sc.toDOMNode(r,r)||Gu(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Yu(u)&&Sc.hasDOMNode(r,u)){var l=Sc.toSlateNode(r,u);if(e.Element.isElement(l)&&!r.isVoid(l))return}if(gl){var c=s.getSelection();null==c||c.removeAllRanges()}bc.delete(r)}}}},focus:function(t,e,n){var r=Sc.toDOMNode(n,n),o=Sc.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,pl&&t.target!==r?r.focus():bc.set(n,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&eh(r,t.target)&&Yu(t.target)){var o=Sc.toSlateNode(r,t.target),i=Sc.findPath(r,o);if(e.Editor.hasPath(r,i))if(e.Node.get(r,i)===o){var a=e.Editor.start(r,i),s=e.Editor.end(r,i),u=e.Editor.void(r,{at:a}),l=e.Editor.void(r,{at:s});if(u&&l&&e.Path.equals(u[1],l[1])){var c=e.Editor.range(r,a);e.Transforms.select(r,c)}}}},compositionstart:function(t,n,r){if(Zd(r,t.target)){var o=r.selection;if(o&&e.Range.isExpanded(o)&&(e.Editor.deleteFragment(r),Promise.resolve().then((function(){nh(n,r,!0)}))),o&&(e.Range.isExpanded(o)||e.Range.isCollapsed(o))){var i=Sc.toDOMRange(r,o).startContainer,a=i.textContent||"";rh.set(r,a),oh.set(r,i)}n.isComposing=!0,function(t,e){var n;e.getConfig().placeholder&&e.isEmpty()&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}(n,r)}},compositionend:function(t,n,r){var o=t;if(Zd(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(yl||pl)&&Sc.cleanExposedTexNodeInSelectionBlock(r);for(var a=e.Range.isBackward(i)?i.focus:i.anchor,s=Ua(e.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u++){var l=Ua(e.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(e.Element.isElement(l)&&((gl||pl)&&"link"===l.type||"code"===l.type)){Sc.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=Sc.getLeftLengthOfMaxLength(r);if(f<c.length)Sc.toDOMRange(r,i).startContainer.textContent=rh.get(r)||"",f>0&&e.Editor.insertText(r,c.slice(0,f)),n.changeViewState();else e.Editor.insertText(r,c)}else{var d=Sc.findDocumentOrShadowRoot(r).getSelection();d&&function(t,n){if(e.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if(2===r.path.length&&2===o.path.length&&(0===r.offset||0===o.path.offset)){var i=e.Editor.node(t,r.path),a=0===r.offset?r.path:o.path,s=[a[0],a[1]-1];if(0===a[1])return!1;var u=e.Editor.node(t,s);if(e.Text.isText(u[0])&&e.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=Sc.toSlateRange(r,d,{exactMatch:!1,suppressThrow:!1})),e.Editor.insertText(r,c)}gl||setTimeout((function(){var t=r.selection;if(null!=t){var e=oh.get(r);if(null!=e)Sc.toDOMRange(r,t).startContainer!==e&&(e.textContent=rh.get(r)||"")}}))}}}},compositionupdate:function(t,e,n){Zd(n,t.target)&&(e.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&Zd(r,o.target)){if(function(t,e){var n=ec.get(t),r=n&&n.getMenus(),o=rc.get(t),i=o&&o.getMenus(),a=Ha(Ha({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,e)&&!u.isDisabled(t)){var f=u.getValue(t);u.exec(t,f)}}}(r,o),lh.isTab(o))return ch(o),void r.handleTab();if(lh.isRedo(o))return ch(o),void("function"==typeof r.redo&&r.redo());if(lh.isUndo(o))return ch(o),void("function"==typeof r.undo&&r.undo());if(lh.isMoveLineBackward(o))return ch(o),void e.Transforms.move(r,{unit:"line",reverse:!0});if(lh.isMoveLineForward(o))return ch(o),void e.Transforms.move(r,{unit:"line"});if(lh.isExtendLineBackward(o))return ch(o),void e.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(lh.isExtendLineForward(o))return ch(o),void e.Transforms.move(r,{unit:"line",edge:"focus"});if(lh.isMoveBackward(o))return ch(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r,{reverse:!0}):e.Transforms.collapse(r,{edge:"start"}));if(lh.isMoveForward(o))return ch(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r):e.Transforms.collapse(r,{edge:"end"}));if(lh.isMoveWordBackward(o))return ch(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word",reverse:!0});if(lh.isMoveWordForward(o))return ch(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word"});if(lh.isSelectAll(o))return ch(o),void r.selectAll();if(bl){if((yl||gl)&&i&&(lh.isDeleteBackward(o)||lh.isDeleteForward(o))&&e.Range.isCollapsed(i)){var a=e.Node.parent(r,i.anchor.path);if(e.Element.isElement(a)&&e.Editor.isVoid(r,a)&&e.Editor.isInline(r,a))return o.preventDefault(),void e.Transforms.delete(r,{unit:"block"})}}else{if(lh.isBold(o)||lh.isItalic(o)||lh.isTransposeCharacter(o))return void ch(o);if(lh.isSplitBlock(o))return ch(o),void e.Editor.insertBreak(r);if(lh.isDeleteBackward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r));if(lh.isDeleteForward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r));if(lh.isDeleteLineBackward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"line"}));if(lh.isDeleteLineForward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"line"}));if(lh.isDeleteWordBackward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"word"}));if(lh.isDeleteWordForward(o))return ch(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!bl&&!r.getConfig().readOnly&&Zd(r,t.target)){t.preventDefault();var o=t.key;e.Editor.insertText(r,o)}},copy:function(t,e,n){var r=t;if(Zd(n,r.target)){r.preventDefault();var o=r.clipboardData;null!=o&&n.setFragmentData(o)}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&Zd(r,o.target)){o.preventDefault();var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(e.Range.isExpanded(i))e.Editor.deleteFragment(r);else{var s=e.Node.parent(r,i.anchor.path);e.Editor.isVoid(r,s)&&e.Transforms.delete(r)}}},paste:function(t,e,n){Ec.set(n,!0);var r=t;if(!n.getConfig().readOnly&&Zd(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Ec.set(n,!1);if(!bl||Zu(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(eh(r,t.target)){var o=Sc.toSlateNode(r,t.target);e.Editor.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(eh(r,o.target)&&!r.getConfig().readOnly){var i=Sc.toSlateNode(r,o.target),a=Sc.findPath(r,i);if(e.Editor.isVoid(r,i)||e.Editor.void(r,{at:a,voids:!0})){var s=e.Editor.range(r,a);e.Transforms.select(r,s)}var u=o.dataTransfer;null!=u&&(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&eh(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&eh(r,o.target)&&null!=i&&!(bl&&gl&&i.files.length>0)){o.preventDefault();var a=r.selection,s=Sc.findEventRange(r,o);e.Transforms.select(r,s),n.isDraggingInternally&&(a&&e.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},hh=1,ph=function(){function t(t){var n=this;this.id=hh++,this.$textArea=null,this.$progressBar=r('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=r('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=a((function(){var t=n.editorInstance;!function(t,n){var r=t.isComposing,o=t.isUpdatingSelection,i=t.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=Sc.findDocumentOrShadowRoot(n),s=a.activeElement,u=Sc.toDOMNode(n,n),l=a.getSelection();if(s!==u)return bc.delete(n),void e.Transforms.deselect(n);if(t.latestElement=s,bc.set(n,!0),!l)return e.Transforms.deselect(n);var c=l.anchorNode,f=l.focusNode,d=Zd(n,c)||th(n,c),h=Zd(n,f)||th(n,f);if(d&&h){var p=Sc.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});e.Transforms.select(n,p)}}}(n,t)}),100);var o=r(t);if(0===o.length)throw new Error("Cannot find textarea DOM by selector '".concat(t,"'"));this.$box=o;var i=r('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),o.append(i);var s=r('<div class="w-e-scroll"></div>');i.append(s),this.$scroll=s,this.$textAreaContainer=i,Pu((function(){var t=n.editorInstance,e=Sc.getWindow(t);e.document.addEventListener("selectionchange",n.onDOMSelectionChange),t.on("destroyed",(function(){e.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),i.on("click",(function(){return t.hidePanelOrModal()})),t.on("change",n.changeViewState.bind(n));var r=t.getConfig(),a=r.onChange,s=r.scroll;a&&t.on("change",(function(){return a(t)})),s||(o.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on("change",n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var t=Zl.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),t.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=e&&(o(dh,(function(n,o){e.on(o,(function(e){n(e,t,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",a((function(){r.emit("scroll")}),100))))},t.prototype.onFocusAndOnBlur=function(){var t=this,e=this.editorInstance,n=e.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=e.selection,e.on("change",(function(){null==t.latestEditorSelection&&null!=e.selection?setTimeout((function(){return o&&o(e)})):null!=t.latestEditorSelection&&null==e.selection&&setTimeout((function(){return r&&r(e)})),t.latestEditorSelection=e.selection}))},t.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,e=t.getConfig().maxLength;if(e){var n=e-Sc.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}},t.prototype.changeProgress=function(t){var e=this.$progressBar;e.css("width","".concat(t,"%")),t>=100&&setTimeout((function(){e.hide(),e.css("width","0"),e.show()}),1e3)},t.prototype.changeViewState=function(){var t=this,e=this.editorInstance;zd(this,e),function(t,e){var n,o=e.getConfig().placeholder;if(o){var i=e.isEmpty();if(i&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var a=r('<div class="w-e-text-placeholder">'.concat(o,"</div>"));t.$textAreaContainer.append(a),t.$placeholder=a}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!i&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),Pu((function(){nh(t,e)}))},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t}(),gh={};!function(){if(fh)return gh;fh=1;var t=P(),e=La(),n=je(),r=Ct(),o=Rn(),i=io(),a=Tt(),s=Bt(),u=Ma(),l=Da();e("match",(function(e,c,f){return[function(n){var o=a(this),u=r(n)?void 0:s(n,e);return u?t(u,n,o):new RegExp(n)[e](i(o))},function(t){var e=n(this),r=i(t),a=f(c,e,r);if(a.done)return a.value;if(!e.global)return l(e,r);var s=e.unicode;e.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(e,r));){var g=i(d[0]);h[p]=g,""===g&&(e.lastIndex=u(r,o(e.lastIndex),s)),p++}return 0===p?null:h}]}))}();function vh(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var e=t.children();e.length&&vh(e)}}function mh(){return r('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function yh(){return r('<div class="w-e-bar-divider"></div>')}function bh(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=hl?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(t.attr("data-tooltip",r),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}var wh=function(){function t(t,e,n){void 0===n&&(n=!1);var o=this;this.$elem=r('<div class="w-e-bar-item"></div>'),this.$button=r('<button type="button"></button>'),this.disabled=!1,this.menu=e;var i=e.tag,a=e.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=e.title,u=e.hotkey,l=void 0===u?"":u,c=e.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=r(f);vh(h),d.append(h)}else d.text(s);bh(d,f,s,l,n),n&&f&&d.append(r('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",t),this.$elem.append(d),Pu((function(){return o.init()}))}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(e){e.preventDefault(),Mh(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())}))},t.prototype.exec=function(){var t=Mh(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=Mh(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=Mh(this),e=this.$button,n=this.menu.isDisabled(t);(null==t.selection||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?e.addClass(r):e.removeClass(r),this.disabled=n},t.prototype.setIcon=function(){var t=Mh(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var o=r(n);vh(o),e.append(o)}}},t.prototype.setTooltip=function(){var t=Mh(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&bh(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),xh=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return Wa(e,t),e.prototype.onButtonClick=function(){},e}(wh),Eh=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=ic.get(t);null==e&&(e=new Set,ic.set(t,e)),e.add(this),ac.set(this,t)},t.prototype.renderContent=function(t){var e=this.$elem;e.empty(),e.append(t);var n=this.genSelfElem();n&&e.append(n)},t.prototype.appendTo=function(t){var e=this.$elem;t.append(e)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=ac.get(this);t&&t.emit("modalOrPanelShow",this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=ac.get(this);t&&t.emit("modalOrPanelHide")}},t}(),Sh=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=r('<div class="w-e-drop-panel"></div>'),n}return Wa(e,t),e.prototype.genSelfElem=function(){return null},e}(Eh),Oh=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=mh();o.$button.append(i)}return o}return Wa(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var t=this.menu;if(null!=t.getPanelContentElem){var e=Mh(this);if(null==this.dropPanel){var n=new Sh(e),r=t.getPanelContentElem(e);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=t.getPanelContentElem(e);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},e}(wh),kh=function(t){function e(e,n){void 0===n&&(n=0);var o=t.call(this,e)||this;o.type="modal",o.$elem=r('<div class="w-e-modal"></div>'),o.width=0,n&&(o.width=n);var i=o.$elem;return i.on("click",(function(t){return t.stopPropagation()})),i.on("keyup",(function(t){"Escape"===t.code&&(o.hide(),e.restoreSelection())})),o}return Wa(e,t),e.prototype.genSelfElem=function(){var t=this,e=r('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=ac.get(this);return e.on("click",(function(){t.hide(),null==n||n.restoreSelection()})),e},e.prototype.setStyle=function(t){var e=this.width,n=this.$elem;n.attr("style",""),e&&n.css("width","".concat(e,"px")),n.css(t)},e}(Eh);var Ch=function(t){function n(e,n,o){void 0===o&&(o=!1);var i=t.call(this,e,n,o)||this;return i.$body=r("body"),i.modal=null,i.menu=n,i}return Wa(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var t=Mh(this),n=this.menu.getModalPositionNode(t);return e.Element.isElement(n)?kd(t,n,"modal"):Od(t)},n.prototype.handleModal=function(){var t=Mh(this),e=this.menu;if(null==this.modal){var n=new kh(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=Mh(this),r=this.menu;if(null!=r.getModalContentElem){var o=Sc.getTextarea(n),i=Sc.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(t.renderContent(s),a)t.setStyle({left:"0",right:"0"});else{var u=this.getPosition();t.setStyle(u)}e&&(a?t.appendTo(this.$body):t.appendTo(o.$textAreaContainer)),t.show(),a||Cd(n,t.$elem),setTimeout((function(){n.blur()}))}},n}(wh);var Th=function(t){function e(e,n){var o=t.call(this,e)||this;return o.type="selectList",o.$elem=r('<div class="w-e-select-list"></div>'),n&&o.$elem.css("width","".concat(n,"px")),o.$elem.on("click",(function(t){t.stopPropagation()})),o}return Wa(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=r("<ul></ul>");t.forEach((function(t){var e=t.value,o=t.text,i=t.selected,a=t.styleForRenderMenuList,s=r('<li data-value="'.concat(e,'"></li>'));if(a&&s.css(a),i){var u=r('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');s.append(u),s.addClass("selected")}s.append(r('<span data-value="'.concat(e,'">').concat(o,"</span>"))),s.attr("title",o),n.append(s)})),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(Eh);var Nh=function(){function t(t,e,n){void 0===n&&(n=!1);var o=this;this.$elem=r('<div class="w-e-bar-item"></div>'),this.$button=r('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=e.tag,a=e.title,s=e.width,u=e.iconSvg,l=void 0===u?"":u,c=e.hotkey,f=void 0===c?"":c;if("select"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'select'"));var d=this.$button;s&&d.css("width","".concat(s,"px")),d.attr("data-menu-key",t),bh(d,l,a,f,n),this.$elem.append(d),this.menu=e,Pu((function(){return o.init()}))}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",(function(e){e.preventDefault(),Mh(t).hidePanelOrModal(),t.trigger()}))},t.prototype.trigger=function(){var t=this,e=Mh(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new Th(e,n.selectPanelWidth);var o=this.selectList,i=n.getOptions(e);o.renderList(i),o.appendTo(this.$elem),o.show(),o.$elem.on("click","li",(function(e){var n=e.target;if(null!=n){e.preventDefault();var o=r(n).attr("data-value");t.onChange(o)}}))}else{if((o=this.selectList).isShow)o.hide();else{i=n.getOptions(e);o.renderList(i),o.show()}}}},t.prototype.onChange=function(t){var e=Mh(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=Mh(this),e=this.menu,n=e.getValue(t),r=function(t,e){for(var n=t.length,r="",o=0;o<n;o++){var i=t[o];if(i.value===e){r=i.text;break}}return r}(e.getOptions(t),n.toString()),o=this.$button,i=mh();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=Mh(this),e=this.menu.isDisabled(t),n=this.$button;(null==t.selection||t.isDisabled())&&(e=!0);var r="disabled";e?n.addClass(r):n.removeClass(r),this.disabled=e},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t}(),Rh=function(){function t(t){this.$elem=r('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=r('<div class="w-e-bar-item-menus-container"></div>'),this.$button=r('<button type="button"></button>');var e=t.key,n=t.iconSvg,o=t.title,i=this.$elem,a=this.$button;if(n){var s=r(n);vh(s),a.append(s)}else a.text(o);a.attr("data-menu-key",e);var u=mh();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return t.prototype.appendBarItem=function(t){var e=t.$elem;this.$container.append(e)},t.prototype.observe=function(t){var e=this.$container;t.observe(e[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var t=this,e=this.$container,n=this.$button,o=new MutationObserver((function(){var i=e.find("button"),a=i.length;if(0!==a){var s=0;i.each((function(t){r(t).hasClass("disabled")&&s++})),o.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),t.observe(o)}}));return o},t}(),Lh=new WeakMap;function Mh(t){var e=oc.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function Ph(t,e,n){void 0===n&&(n=!1);var r=Lh.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new Oh(t,e,n):a?new Ch(t,e,n):new xh(t,e,n)}if("select"===o&&(r=new Nh(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return Lh.set(e,r),r}const Dh={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Ah{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||Dh,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new Ah(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new Ah(this.logger,t)}}var jh=new Ah;class Ih{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){Array.from(this.observers[t].entries()).forEach((t=>{let[e,r]=t;for(let t=0;t<r;t++)e(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((e=>{let[r,o]=e;for(let e=0;e<o;e++)r.apply(r,[t,...n])}))}}}const $h=()=>{let t,e;const n=new Promise(((n,r)=>{t=n,e=r}));return n.resolve=t,n.reject=e,n},Fh=t=>null==t?"":""+t,_h=/###/g,Bh=t=>t&&t.indexOf("###")>-1?t.replace(_h,"."):t,Wh=t=>!t||"string"==typeof t,Hh=(t,e,n)=>{const r="string"!=typeof e?e:e.split(".");let o=0;for(;o<r.length-1;){if(Wh(t))return{};const e=Bh(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return Wh(t)?{}:{obj:t,k:Bh(r[o])}},Vh=(t,e,n)=>{const{obj:r,k:o}=Hh(t,e,Object);if(void 0!==r||1===e.length)return void(r[o]=n);let i=e[e.length-1],a=e.slice(0,e.length-1),s=Hh(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Hh(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},Uh=(t,e)=>{const{obj:n,k:r}=Hh(t,e);if(n)return n[r]},zh=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"==typeof t[r]||t[r]instanceof String||"string"==typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):zh(t[r],e[r],n):t[r]=e[r]);return t},Kh=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var qh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Jh=t=>"string"==typeof t?t.replace(/[&<>"'\/]/g,(t=>qh[t])):t;const Gh=[" ",",","?","!",";"],Yh=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}(20),Xh=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let t=0;t<r.length;){if(!o||"object"!=typeof o)return;let e,i="";for(let a=t;a<r.length;++a)if(a!==t&&(i+=n),i+=r[a],e=o[i],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;t+=a-t+1;break}o=e}return o},Qh=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Zh extends Ih{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,e],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=Uh(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Xh(this.data&&this.data[t]&&this.data[t][e],n,o)}addResource(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(a=t.split("."),r=e,e=a[1]),this.addNamespaces(e),Vh(this.data,a,r),o.silent||this.emit("added",t,e,n,r)}addResources(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(t,e,r,n[r],{silent:!0});r.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[t,e];t.indexOf(".")>-1&&(a=t.split("."),r=n,n=e,e=a[1]),this.addNamespaces(e);let s=Uh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?zh(s,n,o):s={...s,...n},Vh(this.data,a,s),i.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var tp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach((t=>{this.processors[t]&&(e=this.processors[t].process(e,n,r,o))})),e}};const ep={};class np extends Ih{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((t,e,n)=>{t.forEach((t=>{e[t]&&(n[t]=e[t])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=jh.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;const n=this.resolve(t,e);return n&&void 0!==n.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let o=e.ns||this.options.defaultNS||[];const i=n&&t.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||((t,e,n)=>{e=e||"",n=n||"";const r=Gh.filter((t=>e.indexOf(t)<0&&n.indexOf(t)<0));if(0===r.length)return!0;const o=Yh.getRegExp(`(${r.map((t=>"?"===t?"\\?":t)).join("|")})`);let i=!o.test(t);if(!i){const e=t.indexOf(n);e>0&&!o.test(t.substring(0,e))&&(i=!0)}return i})(t,n,r));if(i&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:o};const i=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(r)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const r=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],e),s=a[a.length-1],u=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const t=e.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${t}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:`${s}${t}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:i}const c=this.resolve(t,e);let f=c&&c.res;const d=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(f),g=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&f&&("string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0&&("string"!=typeof g||!Array.isArray(f))){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...e,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=t,c.usedParams=this.getUsedParamsDetails(e),c):t}if(o){const t=Array.isArray(f),n=t?[]:{},r=t?h:d;for(const t in f)if(Object.prototype.hasOwnProperty.call(f,t)){const i=`${r}${o}${t}`;n[t]=this.translate(i,{...e,joinArrays:!1,ns:a}),n[t]===i&&(n[t]=f[t])}f=n}}else if(v&&"string"==typeof g&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,e,n));else{let r=!1,a=!1;const l=void 0!==e.count&&"string"!=typeof e.count,d=np.hasDefaultValue(e),h=l?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&l?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",g=l&&!e.ordinal&&0===e.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${h}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=d&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:f),o){const t=this.resolve(i,{...e,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const r=(t,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,s,n,o,y,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,s,n,o,y,e),this.emit("missingKey",t,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?t.forEach((t=>{const n=this.pluralResolver.getSuffixes(t,e);g&&e[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([t],i+n,e[`defaultValue${n}`]||v)}))})):r(t,i,v))}f=this.extendTranslation(f,t,e,c,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(e),c):f}extendTranslation(t,e,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const e=t.match(this.interpolator.nestingRegexp);s=e&&e.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language||r.usedLng,n),a){const e=t.match(this.interpolator.nestingRegexp);s<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${e[0]}`),null):i.translate(...r,e)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=tp.handle(s,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let e,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach((t=>{if(this.isValidLookup(e))return;const s=this.extractFromKey(t,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(i=t,!ep[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(ep[`${h[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${h.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((n=>{if(this.isValidLookup(e))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,t,a);else{let t;c&&(t=this.pluralResolver.getSuffix(n,a.count,a));const e=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+t),a.ordinal&&0===t.indexOf(r)&&i.push(u+t.replace(r,this.options.pluralSeparator)),f&&i.push(u+e)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+t),a.ordinal&&0===t.indexOf(r)&&i.push(n+t.replace(r,this.options.pluralSeparator)),f&&i.push(n+e))}}let s;for(;s=i.pop();)this.isValidLookup(e)||(r=s,e=this.getResource(n,t,s,a))})))}))})),{res:e,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}getUsedParamsDetails(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&"string"!=typeof t.replace;let r=n?t.replace:t;if(n&&void 0!==t.count&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const t of e)delete r[t]}return r}static hasDefaultValue(t){const e="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,12)&&void 0!==t[n])return!0;return!1}}const rp=t=>t.charAt(0).toUpperCase()+t.slice(1);class op{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jh.create("languageUtils")}getScriptPartFromCode(t){if(!(t=Qh(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=Qh(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if("string"==typeof t&&t.indexOf("-")>-1){const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map((t=>t.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=rp(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=rp(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=rp(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find((t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:t.indexOf("-")>0&&n.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===n||0===t.indexOf(n)&&n.length>1?t:void 0))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],o=t=>{t&&(this.isSupportedCode(t)?r.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return"string"==typeof t&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),n.forEach((t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))})),r}}let ip=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ap={1:t=>Number(t>1),2:t=>Number(1!=t),3:t=>0,4:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),5:t=>Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5),6:t=>Number(1==t?0:t>=2&&t<=4?1:2),7:t=>Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),8:t=>Number(1==t?0:2==t?1:8!=t&&11!=t?2:3),9:t=>Number(t>=2),10:t=>Number(1==t?0:2==t?1:t<7?2:t<11?3:4),11:t=>Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3),12:t=>Number(t%10!=1||t%100==11),13:t=>Number(0!==t),14:t=>Number(1==t?0:2==t?1:3==t?2:3),15:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2),16:t=>Number(t%10==1&&t%100!=11?0:0!==t?1:2),17:t=>Number(1==t||t%10==1&&t%100!=11?0:1),18:t=>Number(0==t?0:1==t?1:2),19:t=>Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3),20:t=>Number(1==t?0:0==t||t%100>0&&t%100<20?1:2),21:t=>Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0),22:t=>Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)};const sp=["v1","v2","v3"],up=["v4"],lp={zero:0,one:1,two:2,few:3,many:4,other:5};class cp{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=jh.create("pluralResolver"),this.options.compatibilityJSON&&!up.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const t={};return ip.forEach((e=>{e.lngs.forEach((n=>{t[n]={numbers:e.nr,plurals:ap[e.fc]}}))})),t})(),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Qh("dev"===t?"en":t),r=e.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map((t=>`${e}${t}`))}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((t,e)=>lp[t]-lp[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):n.numbers.map((n=>this.getSuffix(t,n,e))):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(e)}`:this.getSuffixRetroCompatible(r,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let r=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!sp.includes(this.options.compatibilityJSON)}}const fp=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((t,e,n)=>{const r=Uh(t,n);return void 0!==r?r:Uh(e,n)})(t,e,n);return!i&&o&&"string"==typeof n&&(i=Xh(t,n,r),void 0===i&&(i=Xh(e,n,r))),i},dp=t=>t.replace(/\$/g,"$$$$");class hp{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=jh.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=t.interpolation;this.escape=void 0!==e?e:Jh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Kh(o):i||"{{",this.suffix=a?Kh(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Kh(f):d||Kh("$t("),this.nestingSuffix=h?Kh(h):p||Kh(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t&&t.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=t=>{if(t.indexOf(this.formatSeparator)<0){const o=fp(e,s,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...e,interpolationkey:t}):o}const o=t.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(fp(e,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...e,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>dp(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?dp(this.escape(t)):dp(t)}].forEach((e=>{for(a=0;o=e.regex.exec(t);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const e=l(t,o,r);i="string"==typeof e?e:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=Fh(i));const s=e.safeValue(i);if(t=t.replace(o[0],s),c?(e.regex.lastIndex+=i.length,e.regex.lastIndex-=o[0].length):e.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),t}nest(t,e){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const r=t.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;t=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),e&&(o={...e,...o})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,t};for(;n=this.nestingRegexp.exec(t);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map((t=>t.trim()));n[1]=t.shift(),s=t,u=!0}if(r=e(a.call(this,n[1].trim(),o),o),r&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Fh(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),r=""),u&&(r=s.reduce(((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}const pp=t=>{const e={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=e[a];return s||(s=t(Qh(r),o),e[a]=s),s(n)}};class gp{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=jh.create("formatter"),this.options=t,this.formats={number:pp(((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)})),currency:pp(((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)})),datetime:pp(((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)})),relativetime:pp(((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")})),list:pp(((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)}))},this.init(t)}init(t){const e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=pp(e)}format(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=e.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}const i=o.reduce(((t,e)=>{const{formatName:o,formatOptions:i}=(t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===e&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===e&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((t=>{if(t){const[e,...r]=t.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=e.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:e,formatOptions:n}})(e);if(this.formats[o]){let e=t;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;e=this.formats[o](t,s,{...i,...r,...a})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${o}`),t}),t);return i}}class vp extends Ih{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=jh.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(t,e,n,r){const o={},i={},a={},s={};return t.forEach((t=>{let r=!0;e.forEach((e=>{const a=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[e]&&(s[e]=!0)))})),r||(a[t]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(t,e,n){const r=t.split("|"),o=r[0],i=r[1];e&&this.emit("failedLoading",o,i,e),!e&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&n&&(this.state[t]=0);const a={};this.queue.forEach((n=>{((t,e,n)=>{const{obj:r,k:o}=Hh(t,e,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((t=>{a[t]||(a[t]={});const e=n.loaded[t];e.length&&e.forEach((e=>{void 0===a[t][e]&&(a[t][e]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((t=>!t.done))}read(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,t,e,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(t,e,a);try{const n=s(t,e);n&&"function"==typeof n.then?n.then((t=>a(null,t))).catch(a):a(null,n)}catch(t){a(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);const o=this.queueLoad(t,e,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${e}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${e}loaded namespace ${o} for language ${r}`,i),this.loaded(t,n,i)}))}saveMissing(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(t,e,n,r,s):u(t,e,n,r),o&&"function"==typeof o.then?o.then((t=>a(null,t))).catch(a):a(null,o)}catch(t){a(t)}else u(t,e,n,r,a,s)}t&&t[0]&&this.store.addResource(t[0],e,n,r)}}}const mp=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if("object"==typeof t[1]&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach((t=>{e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),yp=t=>("string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),bp=()=>{};class wp extends Ih{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=yp(t),this.services={},this.logger=jh,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=mp();this.options={...r,...this.options,...yp(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let e;this.modules.logger?jh.init(o(this.modules.logger),this.options):jh.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=gp);const n=new op(this.options);this.store=new Zh(this.options.resources,this.options);const i=this.services;i.logger=jh,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new cp(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new hp(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new vp(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new np(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=bp),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((e=>{this[e]=function(){return t.store[e](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((e=>{this[e]=function(){return t.store[e](...arguments),t}}));const i=$h(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bp;const n="string"==typeof t?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],r=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>r(t)))}this.options.preload&&this.options.preload.forEach((t=>r(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,e,n){const r=$h();return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),n||(n=bp),this.services.backendConnector.reload(t,e,(t=>{r.resolve(),n(t)})),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&tp.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const r=$h();this.emit("languageChanging",t);const o=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},i=(t,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),e&&e(t,(function(){return n.t(...arguments)}))},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n="string"==typeof e?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(t=>{i(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),r}getFixedT(t,e,n){var r=this;const o=function(t,e){let i;if("object"!=typeof e){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,e].concat(s))}else i={...e};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(t)?t.map((t=>`${i.keyPrefix}${l}${t}`)):i.keyPrefix?`${i.keyPrefix}${l}${t}`:t,r.t(c,i)};return"string"==typeof t?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||0===n||2===n};if(e.precheck){const t=e.precheck(this,i);if(void 0!==t)return t}return!!this.hasResourceBundle(n,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,t)||r&&!i(o,t)))}loadNamespaces(t,e){const n=$h();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=$h();"string"==typeof t&&(t=[t]);const r=this.options.preload||[],o=t.filter((t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=r.concat(o),this.loadResources((t=>{n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new op(mp());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new wp(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bp;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new wp(r);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Zh(this.store.data,r),o.services.resourceStore=o.store),o.translator=new np(o.services,r),o.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit(t,...n)})),o.init(r,e),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const xp=wp.createInstance();xp.createInstance=wp.createInstance,xp.createInstance,xp.dir,xp.init,xp.loadResources,xp.reloadResources,xp.use,xp.changeLanguage,xp.getFixedT,xp.t,xp.exists,xp.setDefaultNamespace,xp.hasLoadedNamespace,xp.loadNamespaces,xp.loadLanguages;var Ep="translation";function Sp(t){return xp.on("languageChanged",t),function(){return xp.off("languageChanged",t)}}xp.init({lng:"zh-CN",resources:{}});var Op=xp.t.bind(xp);function kp(t,n){var r=t.selection;return null!=r&&(!e.Range.isCollapsed(r)&&(!Sc.getSelectedElems(t).some((function(e){if(t.isVoid(e))return!0;var n=e.type;return!!["pre","code","table"].includes(n)||void 0}))&&!!e.Text.isText(n)))}var Cp=function(){function t(){var t=this;this.$elem=r('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=c((function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a;if((null!=i&&t.changeItemsState(),i&&e.Element.isElement(i))&&(n&&t.isSamePath(i,t.prevSelectedNode)))return;t.hideAndClean(),null!=i&&(t.registerItems(s),t.setPosition(i),t.show()),t.prevSelectedNode=i}),200),Pu((function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",(function(t){return t.preventDefault()}),{passive:!1}),Sc.getTextarea(e).$textAreaContainer.append(n),e.on("change",t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on("scroll",r),e.on("fullScreen",r),e.on("unFullScreen",r)})),this.lngListen=Sp((function(){t.menus={},t.hideAndClean(),t.getEditorInstance().deselect()}))}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var t=this.$elem,e=!1,n=window.innerHeight;n&&n>=360&&(n-t[0].getBoundingClientRect().bottom<360&&(e=!0));e?t.addClass("w-e-bar-bottom"):t.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var t=this;Pu((function(){t.hoverbarItems.forEach((function(t){t.changeMenuState()}))}))},t.prototype.registerItems=function(t){var e=this,n=this.$elem;t.forEach((function(t){if("|"!==t)e.registerSingleItem(t);else{var r=yh();n.append(r)}}))},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=Cc[t];if(null==o)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));r=o(),n[t]=r}var i=e.getMenuConfig(t);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=Ph(t,r);this.hoverbarItems.push(a),oc.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),e.Element.isElement(t)){var o=kd(n,t,"bar");return r.css(o),void Cd(n,r)}if(e.Text.isText(t)){o=Od(n);return r.css(o),void Cd(n,r)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(null==t.selection)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(t,e){return Sc.checkNodeType(e,i)},f=Ua(e.Editor.nodes(t,{match:function(e){return c(t,e)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=l,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},t.prototype.getEditorInstance=function(){var t=nc.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,e=void 0===t?{}:t,n=e.text;return n&&null==n.match&&(n.match=kp),e},t.prototype.isSamePath=function(t,n){if(null==t||null==n)return!1;var r=Sc.findPath(null,t),o=Sc.findPath(null,n);return e.Path.equals(r,o)},t.prototype.destroy=function(){var t;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t}();function Tp(t,n,r,o){if(fc.set(t,n),dc.set(t,r),e.Element.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach((function(e,n){return Tp(e,n,t,o)})),e.Editor.isVoid(o,t)){var a=Ua(e.Node.texts(t),1),s=Ua(a[0],1)[0];fc.set(s,0),dc.set(s,t)}}}var Np,Rp,Lp,Mp,Pp,Dp={};function Ap(){if(Mp)return Lp;Mp=1;var t=Ft(),e=TypeError;return Lp=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(Pp)return Dp;Pp=1;var t=Qn(),e=me(),n=Nn(),r=Tn(),o=Ln(),i=function(){if(Rp)return Np;Rp=1;var t=L(),e=Fr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Np=o?function(t,o){if(e(t)&&!r(t,"length").writable)throw new n("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}(),a=ns(),s=Wr(),u=Do(),l=Ap(),c=ni()("splice"),f=Math.max,d=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var h,p,g,v,m,y,b=e(this),w=o(b),x=n(t,w),E=arguments.length;for(0===E?h=p=0:1===E?(h=0,p=w-x):(h=E-2,p=d(f(r(c),0),w-x)),a(w+h-p),g=s(b,p),v=0;v<p;v++)(m=x+v)in b&&u(g,v,b[m]);if(g.length=p,h<p){for(v=x;v<w-p;v++)y=v+h,(m=v+p)in b?b[y]=b[m]:l(b,y);for(v=w;v>w-p+h;v--)l(b,v-1)}else if(h>p)for(v=w-p;v>x;v--)y=v+h-1,(m=v+p-1)in b?b[y]=b[m]:l(b,y);for(v=0;v<h;v++)b[v+x]=arguments[v+2];return i(b,w-p+h),g}})}();var jp=function(){function t(t,e){var n=this;this.$toolbar=r('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=c((function(){n.toolbarItems.forEach((function(t){t.changeMenuState()}))}),200),this.config=e;var o=r(t);if(0===o.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=o;var i=this.$toolbar;i.on("mousedown",(function(t){return t.preventDefault()}),{passive:!1}),o.append(i),Pu((function(){n.initToolbar(),n.lngListen=Sp((function(){return n.initToolbar()})),n.getEditorInstance().on("change",n.changeToolbarState)}))}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.initToolbar=function(){this.menus={};var t=this.$toolbar;null==t||t.empty(),this.registerItems(),this.changeToolbarState()},t.prototype.registerItems=function(){var t=this,e="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=f(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(t,e){c.splice(s.index+e,0,t)})));var d=c.filter((function(t){if("string"==typeof t){if(l.includes(t))return!1}else if(l.includes(t.key))return!1;return!0})),h=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===e)return;var i=yh();return n.append(i),void(e=r)}if("string"==typeof r)return t.registerSingleItem(r,t),void(e=r);t.registerGroup(r),e="group"}))},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new Rh(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(t){s.includes(t)||e.registerSingleItem(t,r)})),n.append(r.$elem)},t.prototype.registerSingleItem=function(t,e){var n=this.getEditorInstance(),r=e instanceof Rh,o=this.menus,i=o[t];if(null==i){var a=Cc[t];if(null==a)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));i=a(),o[t]=i}else console.warn("Duplicated toolbar menu key '".concat(t,"'\n重复注册了菜单栏 menu '").concat(t,"'"));var s=n.getMenuConfig(t);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=Ph(t,i,r);(this.toolbarItems.push(u),oc.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=tc.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.destroy=function(){var t;this.$toolbar.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.toolbarItems=[]},t}();var Ip,$p={};!function(){if(Ip)return $p;Ip=1;var t=L(),e=tn().EXISTS,n=St(),r=Ks(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);t&&!e&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(t){return""}}})}(),t.DOMComment=Wu,t.DOMElement=Hu,t.DOMNode=Bu,t.DOMRange=Uu,t.DOMSelection=zu,t.DOMStaticRange=Ku,t.DOMText=Vu,t.DomEditor=Sc,t.ELEM_TO_HTML_CONF=_c,t.PARSE_ELEM_HTML_CONF=Gc,t.PARSE_STYLE_HTML_FN_LIST=Jc,t.PRE_PARSE_HTML_CONF_LIST=qc,t.RENDER_ELEM_CONF=Fd,t.RENDER_STYLE_HANDLER_LIST=$d,t.STYLE_TO_HTML_FN_LIST=Fc,t.TEXT_TAGS=Kc,t.Toolbar=jp,t.coreCreateEditor=function(n){var i=n.selector,a=void 0===i?"":i,s=n.config,u=void 0===s?{}:s,l=n.content,c=n.html,d=n.plugins,h=void 0===d?[]:d,p=ro.withHistory(function(n){var r=n,o=r.insertText,i=r.insertNode,a=r.insertFragment,s=r.dangerouslyInsertHtml;return r.insertText=function(t){if(r.getConfig().maxLength){var e=Sc.getLeftLengthOfMaxLength(r);e<=0||(e<t.length?o(t.slice(0,e)):o(t))}else o(t)},r.insertNode=function(t){if(r.getConfig().maxLength){var n=Sc.getLeftLengthOfMaxLength(r);n<=0||n<e.Node.string(t).length||i(t)}else i(t)},r.insertFragment=function(t){if(r.getConfig().maxLength){if(t.length>0){var n=t[0];if(Sc.getLeftLengthOfMaxLength(r)<e.Node.string(n).length)return;a([n]);for(var o=1;o<t.length;o++)r.insertNode(t[o])}}else a(t)},r.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(r.getConfig().maxLength){var o=Sc.getLeftLengthOfMaxLength(r);if(!(o<=0)){var i=document.createElement("div");i.innerHTML=e,o<Array.from(i.childNodes).reduce((function(e,n){var r=n.nodeType,o=n.nodeName;return n?r===t.NodeType.TEXT_NODE?e+(n.textContent||""):r===t.NodeType.ELEMENT_NODE?mf.has(o.toLowerCase())?e:e+(n.textContent||""):e:e}),"").length||s(e,n)}}else s(e,n)},r}(Ed(function(t){var n=t;return n.select=function(t){e.Transforms.select(n,t)},n.deselect=function(){var r=n.selection,o=Sc.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&e.Transforms.deselect(t)},n.move=function(n,r){void 0===r&&(r=!1),n&&(n<0||e.Transforms.move(t,{distance:n,unit:"character",reverse:r}))},n.moveReverse=function(t){n.move(t,!0)},n.restoreSelection=function(){var t=wc.get(n);null!=t&&(n.focus(),e.Transforms.select(n,t))},n.getSelectionPosition=function(){return Od(n)},n.getNodePosition=function(t){return kd(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=Ua(e.Range.edges(t),2),o=r[0],i=r[1],a=Ua(e.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!e.Point.equals(o,s)||!e.Point.equals(i,u))},n.selectAll=function(){var t=e.Editor.start(n,[]),r=e.Editor.end(n,[]);e.Transforms.select(n,{anchor:t,focus:r})},n}(id(function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in Cc)t.push(e);return t},e.getConfig=function(){var t=sc.get(e);if(null==t)throw new Error("Can not get editor config");return t},e.getMenuConfig=function(t){var n=e.getConfig().MENU_CONF;return(void 0===n?{}:n)[t]||{}},e.alert=function(t,n){void 0===n&&(n="info");var r=e.getConfig().customAlert;r&&r(t,n)},e}(function(t){var n=t;return n.id="wangEditor-".concat(Oc++),n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(t){if(Sc.toDOMNode(n,n).focus({preventScroll:!0}),bc.set(n,!0),t){var r=e.Editor.end(n,[]);e.Transforms.select(n,r)}else{var o=wc.get(n);o?e.Transforms.select(n,o):e.Transforms.select(n,e.Editor.start(n,[]))}},n.isFocused=function(){return!!bc.get(n)},n.blur=function(){Sc.toDOMNode(n,n).blur(),e.Transforms.deselect(n),bc.set(n,!1)},n.updateView=function(){Sc.getTextarea(n).changeViewState();var t=Sc.getToolbar(n);t&&t.changeToolbarState();var e=Sc.getHoverbar(n);e&&e.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var t=Sc.getTextarea(n);t.destroy(),Ql.delete(n),Zl.delete(t);var e=Sc.getToolbar(n);e&&(e.destroy(),ec.delete(n),tc.delete(e));var r=Sc.getHoverbar(n);r&&(r.destroy(),rc.delete(n),nc.delete(r)),n.isDestroyed=!0,n.emit("destroyed")}},n.scrollToElem=function(t){if(!n.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var o=r("#".concat(t));if(0!==o.length){var i=o[0];if(!Sc.hasDOMNode(n,i))return e="Element (found by id is '".concat(t,"') is not in editor DOM"),e+="\n 通过 id '".concat(t,"' 找到的 element 不在 editor DOM 之内"),void console.error(e,i);var a=Sc.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=o.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(t){t<1||Sc.getTextarea(n).changeProgress(t)},n.hidePanelOrModal=function(){var t=ic.get(n);null!=t&&t.forEach((function(t){return t.hide()}))},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(t){return Sc.toDOMNode(n,t)},n.fullScreen=function(){if(!n.isFullScreen){var t=null,e=Sc.getToolbar(n);e&&(t=e.$box);var r=Sc.getTextarea(n).$box.parent();if(t&&t.parent()[0]!==r[0])throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致");r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit("fullScreen")}},n.unFullScreen=function(){if(n.isFullScreen){var t=Sc.getTextarea(n).$box.parent();setTimeout((function(){t.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return Sc.getTextarea(n).$textAreaContainer[0]},n}(function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=Ua(e.Range.edges(r),2),i=o[0],a=o[1],s=e.Editor.void(n,{at:i.path}),u=e.Editor.void(n,{at:a.path});if(!e.Range.isCollapsed(r)||s){var l=Sc.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach((function(t){t.textContent&&""!==t.textContent.trim()&&(f=t)})),u){var d=Ua(u,1)[0],h=l.cloneRange(),p=Sc.toDOMNode(n,d);h.setEndAfter(p),c=h.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach((function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""})),Qu(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),m=JSON.stringify(v),y=window.btoa(encodeURIComponent(m));f.setAttribute("data-slate-fragment",y),t.setData("application/x-slate-fragment",y);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),t.setData("text/html",b.innerHTML),t.setData("text/plain",il(b)),c.ownerDocument.body.removeChild(b),t}}},n.insertData=function(t){var r,o,i=t.getData("application/x-slate-fragment");if(i){var a=decodeURIComponent(window.atob(i)),s=JSON.parse(a);n.insertFragment(s)}else{var u=t.getData("text/plain"),l=t.getData("text/html");if(l)n.dangerouslyInsertHtml(l);else{var c=Sc.getLeftLengthOfMaxLength(n);if(u){var f=u.split(/\r\n|\r|\n/),d=!1;try{for(var h=Va(f),p=h.next();!p.done;p=h.next()){var g=p.value;d&&c>0&&e.Transforms.splitNodes(n,{always:!0}),n.insertText(g),d=!0}}catch(t){r={error:t}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}}}},n}(e.createEditor()))))))));if(a&&function(t,e){return ff(t,"data-w-e-textarea",e)}(p,a))throw new Error("Repeated create editor by selector '".concat(a,"'"));var g=function(t){void 0===t&&(t={});var e=f(kc),n={},r=t.MENU_CONF,i=void 0===r?{}:r;return o(e,(function(t,e){n[e]=Ha(Ha({},t),i[e]||{})})),delete t.MENU_CONF,Ha({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(u);sc.set(p,g);var v=g.hoverbarKeys,m=void 0===v?{}:v;if(h.forEach((function(t){p=t(p)})),null!=c&&(p.children=df(p,c)),l&&l.length&&(p.children=l),0===p.children.length&&(p.children=[{type:"paragraph",children:[{text:""}]}]),Sc.normalizeContent(p),a){var y=new ph(a);Ql.set(p,y),Zl.set(y,p),y.changeViewState(),Pu((function(){var t=y.$scroll;if(null!=t&&t.height()<300){console.warn("编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常\nTextarea height < 300px . This may be cause modal and hoverbar position error",t)}}));var b=void 0;Object.keys(m).length>0&&(b=new Cp,nc.set(b,p),rc.set(p,b)),p.on("change",(function(){p.hidePanelOrModal()})),p.on("scroll",(function(){p.hidePanelOrModal()}))}else p.children.forEach((function(t,e){return Tp(t,e,p,p)}));var w=g.onCreated,x=g.onDestroyed;return w&&p.on("created",(function(){return w(p)})),x&&p.on("destroyed",(function(){return x(p)})),Pu((function(){return p.emit("created")})),p},t.coreCreateToolbar=function(t,e){if(null==t)throw new Error("Cannot create toolbar, because editor is null");var n=e.selector,r=e.config,o=void 0===r?{}:r;if(function(t,e){return ff(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Ha({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new jp(n,i);return tc.set(a,t),ec.set(t,a),a},t.createUploader=function(t){var e=t.server,n=void 0===e?"":e,r=t.fieldName,i=void 0===r?"":r,a=t.maxFileSize,s=void 0===a?10485760:a,u=t.maxNumberOfFiles,l=void 0===u?100:u,c=t.meta,f=void 0===c?{}:c,p=t.metaWithUrl,g=void 0!==p&&p,v=t.headers,m=void 0===v?{}:v,y=t.withCredentials,b=void 0!==y&&y,w=t.timeout,x=void 0===w?1e4:w,E=t.onBeforeUpload,S=void 0===E?function(t){return t}:E,O=t.onSuccess,k=void 0===O?function(t,e){}:O,C=t.onError,T=void 0===C?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:C,N=t.onProgress,R=void 0===N?function(t){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var L=n;g&&(L=function(t,e){var n=Ua(t.split("#"),2),r=n[0],i=n[1],a=[];o(e,(function(t,e){a.push("".concat(e,"=").concat(t))}));var s=a.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(s):"".concat(r,"?").concat(s),i?"".concat(r,"#").concat(i):r}(L,f));var M=new d({onBeforeUpload:S,restrictions:{maxFileSize:s,maxNumberOfFiles:l},meta:f}).use(h,{endpoint:L,headers:m,formData:!0,fieldName:i,bundle:!0,withCredentials:b,timeout:x});return M.on("upload-success",(function(t,e){var n=e.body,r=void 0===n?{}:n;try{k(t,r)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}M.removeFile(t.id)})),M.on("progress",(function(t){t<1||R(t)})),M.on("upload-error",(function(t,e,n){try{T(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}M.removeFile(t.id)})),M.on("restriction-failed",(function(t,e){try{T(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}M.removeFile(t.id)})),M},t.genModalButtonElems=function(t,e){var n=r('<div class="button-container"></div>'),o=r('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(o),[n[0],o[0]]},t.genModalInputElems=function(t,e,n){var o=r('<label class="babel-container"></label>');o.append("<span>".concat(t,"</span>"));var i=r('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return o.append(i),[o[0],i[0]]},t.genModalTextareaElems=function(t,e,n){var o=r('<label class="babel-container"></label>');o.append("<span>".concat(t,"</span>"));var i=r('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return o.append(i),[o[0],i[0]]},t.getDefaultView=qu,t.getEditableChild=ol,t.getEditableChildAndIndex=rl,t.getElementById=nl,t.getFirstVoidChild=al,t.getPlainText=il,t.getTagName=ul,t.hasShadowRoot=el,t.i18nAddResources=function(t,e){xp.addResourceBundle(t,Ep,e,!0,!0)},t.i18nChangeLanguage=function(t){xp.changeLanguage(t)},t.i18nGetResources=function(t){return xp.getResourceBundle(t,Ep)},t.i18nListenLanguage=Sp,t.isDOMComment=Ju,t.isDOMElement=Gu,t.isDOMNode=Yu,t.isDOMSelection=Xu,t.isDOMText=Qu,t.isDataTransfer=$u,t.isDocument=ju,t.isHTMLElememt=_u,t.isPlainTextOnlyPaste=Zu,t.isShadowRoot=Iu,t.normalizeDOMPoint=tl,t.registerElemToHtmlConf=function(t){var e=t.type,n=t.elemToHtml;_c[e||""]=n},t.registerMenu=function(t,e){var n=t.key,r=t.factory,o=t.config,i=Ha(Ha({},o),e||{});if(null!=Cc[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Cc[n]=r,function(t,e){null!=e&&(kc[t]=e)}(n,i)},t.registerParseElemHtmlConf=function(t){var e=t.selector,n=t.parseElemHtml;Gc[e]=n},t.registerParseStyleHtmlHandler=function(t){Jc.push(t)},t.registerPreParseHtmlConf=function(t){qc.push(t)},t.registerRenderElemConf=function(t){var e=t.type,n=t.renderElem;Fd[e||""]=n},t.registerStyleHandler=function(t){$d.push(t)},t.registerStyleToHtmlHandler=function(t){Fc.push(t)},t.t=Op,t.walkTextNodes=sl}));
9
9
  //# sourceMappingURL=index.js.map