@wangeditor-next/core 1.7.19 → 1.7.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
8
|
-
function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return to=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},oo}function ao(){if(no)return ro;no=1;var e=io(),n=t,r={isHistory:function(t){return e.isPlainObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||n.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||n.Operation.isOperationList(t.undos[0].operations))}},o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(e){return r.isHistory(e.history)&&n.Editor.isEditor(e)},isMerging:function(e){return a.get(e)},isSaving:function(e){return i.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=s.isMerging(e);a.set(e,!0),t(),a.set(e,n)},withoutMerging:function(e,t){var n=s.isMerging(e);a.set(e,!1),t(),a.set(e,n)},withoutSaving:function(e,t){var n=s.isSaving(e);i.set(e,!1),t(),i.set(e,n)}};function u(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 l(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 l(e,t)}(e))||t){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 l(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 c=function(e,t){return!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!n.Path.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!n.Path.equals(e.path,t.path))},f=function(e,t){return"set_selection"!==e.type};return ro.HISTORY=o,ro.History=r,ro.HistoryEditor=s,ro.MERGING=a,ro.SAVING=i,ro.withHistory=function(e){var t=e,r=t.apply;return t.history={undos:[],redos:[]},t.redo=function(){var e=t.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore),s.withoutSaving(t,(function(){n.Editor.withoutNormalizing(t,(function(){var e,n=u(o.operations);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.apply(r)}}catch(e){n.e(e)}finally{n.f()}}))})),e.redos.pop(),t.writeHistory("undos",o)}},t.undo=function(){var e=t.history,r=e.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(t,(function(){n.Editor.withoutNormalizing(t,(function(){var e,r=u(o.operations.map(n.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;t.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore)}))})),t.writeHistory("redos",o),e.undos.pop()}},t.apply=function(e){var n=t.operations,o=t.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(t),d=s.isMerging(t);if(null==l&&(l=f(e)),l){if(null==d&&(d=null!=a&&(0!==n.length||c(e,u))),a&&d)a.operations.push(e);else{var h={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},t.writeHistory=function(e,n){t.history[e].push(n)},t},ro}var so=ao(),uo=function(e,t){return uo=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])},uo(e,t)};function lo(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}uo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var co=function(){return co=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},co.apply(this,arguments)};function fo(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function ho(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function po(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 go(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 vo(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 mo={};var yo={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},bo={};var wo,xo,Eo,So,Oo,ko,Co,To,No,Ro,Lo,Po,Mo,Do,Ao,jo,Io,$o,Fo,Bo,_o,Uo,Ho,zo,Wo,Vo,qo,Ko,Go,Jo,Yo,Xo,Qo,Zo={};function ei(){if(Eo)return xo;Eo=1;var e=Pe();return xo=e("document","documentElement")}function ti(){if(Oo)return So;Oo=1;var e,t=jt(),n=function(){if(wo)return Zo;wo=1;var e=L(),t=At(),n=It(),r=jt(),o=Ne(),i=Nr();return Zo.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Zo}(),r=Dn(),o=on(),i=ei(),a=St(),s=rn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?h(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(e);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,So=Object.create||function(e,r){var o;return null!==e?(f[u]=t(e),o=new f,f[u]=null,o[c]=e):o=p(),void 0===r?o:n.f(o,r)}}function ni(){if(Co)return ko;Co=1;var e=wt(),t=ti(),n=It().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),ko=function(e){o[r][e]=!0}}function ri(){return No?To:(No=1,To={})}function oi(){if(Mo)return Po;Mo=1;var e=yt(),t=Re(),n=mt(),r=rn(),o=function(){if(Lo)return Ro;Lo=1;var e=R();return Ro=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Po=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function ii(){if(Ao)return Do;Ao=1;var e,t,n,r=R(),o=Re(),i=Le(),a=ti(),s=oi(),u=un(),l=wt(),c=ht(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):d=!0),!i(e)||r((function(){var t={};return e[f].call(t)!==t}))?e={}:c&&(e=a(e)),o(e[f])||u(e,f,(function(){return this})),Do={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function ai(){if(Io)return jo;Io=1;var e=It().f,t=yt(),n=wt()("toStringTag");return jo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function si(){if(Fo)return $o;Fo=1;var e=ii().IteratorPrototype,t=ti(),n=Ee(),r=ai(),o=ri(),i=function(){return this};return $o=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}function ui(){if(Ho)return Uo;Ho=1;var e=Le();return Uo=function(t){return e(t)||null===t}}function li(){if(Wo)return zo;Wo=1;var e=ui(),t=String,n=TypeError;return zo=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function ci(){if(qo)return Vo;qo=1;var e=function(){if(_o)return Bo;_o=1;var e=Se(),t=Be();return Bo=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=Le(),n=Te(),r=li();return Vo=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0)}function fi(){if(Go)return Ko;Go=1;var e=pr(),t=M(),n=ht(),r=en(),o=Re(),i=si(),a=oi(),s=ci(),u=ai(),l=$t(),c=un(),f=wt(),d=ri(),h=ii(),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 Ko=function(r,f,h,S,O,k,C){i(h,f,S);var T,N,R,L=function(e){if(e===O&&j)return j;if(!m&&e&&e in D)return D[e];switch(e){case b:case w:case x:return function(){return new h(this,e)}}return function(){return new h(this)}},P=f+" Iterator",M=!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,P,!0,!0),n&&(d[P]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(M=!0,j=function(){return t(A,this)})),O)if(N={values:L(w),keys:k?j:L(b),entries:L(x)},C)for(R in N)(m||M||!(R in D))&&c(D,R,N[R]);else e({target:f,proto:!0,forced:m||M},N);return n&&!C||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function di(){return Yo?Jo:(Yo=1,Jo=function(e,t){return{value:e,done:t}})}function hi(){if(Qo)return Xo;Qo=1;var e=Ne(),t=ni(),n=ri(),r=an(),o=It().f,i=fi(),a=di(),s=ht(),u=L(),l="Array Iterator",c=r.set,f=r.getterFor(l);Xo=i(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=f(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var d=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return Xo}hi();var pi,gi,vi,mi,yi,bi={};function wi(){if(gi)return pi;gi=1;var e=br(),t=String;return pi=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function xi(){if(mi)return vi;mi=1;var e=Se(),t=Tn(),n=wi(),r=Te(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,f=n(r(s)),d=t(u),h=f.length;return d<0||d>=h?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?e?o(f,d):l:e?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return vi={codeAt:s(!1),charAt:s(!0)}}function Ei(){if(yi)return bi;yi=1;var e=xi().charAt,t=wi(),n=an(),r=fi(),o=di(),i="String Iterator",a=n.set,s=n.getterFor(i);return r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})),bi}Ei();var Si,Oi,ki,Ci,Ti={};function Ni(){if(Oi)return Si;Oi=1;var e=R();return Si=!e((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Ri(){if(Ci)return ki;Ci=1;var e=un();return ki=function(t,n,r){for(var o in n)e(t,o,n[o],r);return t}}var Li,Pi,Mi,Di,Ai,ji,Ii,$i,Fi,Bi,_i,Ui,Hi,zi,Wi,Vi,qi,Ki,Gi,Ji,Yi,Xi,Qi,Zi,ea,ta,na,ra,oa,ia,aa={exports:{}},sa={};function ua(){if(Pi)return Li;Pi=1;var e=Se();return Li=e([].slice)}function la(){if(Mi)return sa;Mi=1;var e=Oe(),t=Ne(),n=An().f,r=ua(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return sa.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},sa}function ca(){if(Ii)return ji;Ii=1;var e=R(),t=Le(),n=Oe(),r=function(){if(Ai)return Di;Ai=1;var e=R();return Di=e((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))}(),o=Object.isExtensible,i=e((function(){}));return ji=i||r?function(e){return!!t(e)&&((!r||"ArrayBuffer"!==n(e))&&(!o||o(e)))}:o}function fa(){if($i)return aa.exports;$i=1;var e=pr(),t=Se(),n=on(),r=Le(),o=yt(),i=It().f,a=An(),s=la(),u=ca(),l=bt(),c=Ni(),f=!1,d=l("meta"),h=0,p=function(e){i(e,d,{value:{objectID:"O"+h++,weakData:{}}})},g=aa.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=t([].splice),o={};o[d]=1,n(o).length&&(a.f=function(e){for(var t=n(e),o=0,i=t.length;o<i;o++)if(t[o]===d){r(t,o,1);break}return t},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,d)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[d].objectID},getWeakData:function(e,t){if(!o(e,d)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[d].weakData},onFreeze:function(e){return c&&f&&u(e)&&!o(e,d)&&p(e),e}};return n[d]=!0,aa.exports}function da(){if(Bi)return Fi;Bi=1;var e=wt(),t=ri(),n=e("iterator"),r=Array.prototype;return Fi=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function ha(){if(Ui)return _i;Ui=1;var e=br(),t=_e(),n=Ce(),r=ri(),o=wt()("iterator");return _i=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function pa(){if(zi)return Hi;zi=1;var e=M(),t=Be(),n=jt(),r=Fe(),o=ha(),i=TypeError;return Hi=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},Hi}function ga(){if(Vi)return Wi;Vi=1;var e=M(),t=jt(),n=_e();return Wi=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i}}function va(){if(Ki)return qi;Ki=1;var e=Qr(),t=M(),n=jt(),r=Fe(),o=da(),i=Ln(),a=Me(),s=pa(),u=ha(),l=ga(),c=TypeError,f=function(e,t){this.stopped=e,this.result=t},d=f.prototype;return qi=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=e(p,S),R=function(e){return v&&l(v,"normal",e),new f(!0,e)},L=function(e){return O?(n(e),T?N(e[0],e[1],R):N(e[0],e[1])):T?N(e,R):N(e)};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=t(x,v)).done;){try{w=L(E.value)}catch(e){l(v,"throw",e)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function ma(){if(Ji)return Gi;Ji=1;var e=Me(),t=TypeError;return Gi=function(n,r){if(e(r,n))return n;throw new t("Incorrect invocation")}}function ya(){if(Xi)return Yi;Xi=1;var e=wt()("iterator"),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}return Yi=function(n,r){try{if(!r&&!t)return!1}catch(e){return!1}var o=!1;try{var i={};i[e]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(e){}return o}}function ba(){if(Zi)return Qi;Zi=1;var e=Re(),t=Le(),n=ci();return Qi=function(r,o,i){var a,s;return n&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function wa(){if(ta)return ea;ta=1;var e=pr(),t=b(),n=Se(),r=hr(),o=un(),i=fa(),a=va(),s=ma(),u=Re(),l=Ce(),c=Le(),f=R(),d=ya(),h=ai(),p=ba();return ea=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=t[g],E=x&&x.prototype,S=x,O={},k=function(e){var t=n(E[e]);o(E,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return b&&!c(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,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(e){new x(e)})),L=!b&&f((function(){for(var e=new x,t=5;t--;)e[w](t,t);return!e.has(-0)}));R||((S=v((function(e,t){s(e,E);var n=p(new x,e,S);return l(t)||a(t,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,e({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},ea}function xa(){if(ra)return na;ra=1;var e=Se(),t=Ri(),n=fa().getWeakData,r=ma(),o=jt(),i=Ce(),a=Le(),s=va(),u=Zr(),l=yt(),c=an(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=e([].splice),v=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};return y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=p(this.entries,(function(t){return t[0]===e}));return~t&&g(this.entries,t,1),!!~t}},na={getConstructor:function(e,u,c,h){var p=e((function(e,t){r(e,g),f(e,{type:u,id:v++,frozen:null}),i(t)||s(t,e[h],{that:e,AS_ENTRIES:c})})),g=p.prototype,y=d(u),b=function(e,t,r){var i=y(e),a=n(o(t),!0);return!0===a?m(i).set(t,r):a[i.id]=r,e};return t(g,{delete:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).has(e):r&&l(r,t.id)}}),t(g,c?{get:function(e){var t=y(this);if(a(e)){var r=n(e);if(!0===r)return m(t).get(e);if(r)return r[t.id]}},set:function(e,t){return b(this,e,t)}}:{add:function(e){return b(this,e,!0)}}),p}}}ia||(ia=1,function(){if(oa)return Ti;oa=1;var e,t=Ni(),n=b(),r=Se(),o=Ri(),i=fa(),a=wa(),s=xa(),u=Le(),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(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){e=s.getConstructor(x,"WeakMap",!0),i.enable();var k=r(S.delete),C=r(S.has),T=r(S.get);o(S,{delete:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)||n.frozen.delete(t)}return k(this,t)},has:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),C(this,t)||n.frozen.has(t)}return C(this,t)},get:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),C(this,t)?T(this,t):n.frozen.get(t)}return T(this,t)},set:function(t,n){if(u(t)&&!p(t)){var r=l(this);r.frozen||(r.frozen=new e),C(this,t)?O(this,t,n):r.frozen.set(t,n)}else O(this,t,n);return this}})}else t&&c((function(){var e=m([]);return O(new E,e,1),!g(e)}))&&o(S,{set:function(e,t){var n;return h(e)&&(g(e)?n=m:v(e)&&(n=y)),O(this,e,t),n&&n(e),this}})}());var Ea,Sa={};!function(){if(Ea)return Sa;Ea=1;var e=b(),t=Jr(),n=Yr(),r=hi(),o=$t(),i=ai(),a=wt()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}();var Oa,ka=new WeakMap,Ca=new WeakMap,Ta=new WeakMap,Na=new WeakMap,Ra=new WeakMap,La=new WeakMap,Pa=new WeakMap,Ma=new WeakMap,Da=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ia=new WeakMap,$a=new WeakMap,Fa=new WeakMap,Ba=new WeakMap,_a=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,za=new WeakMap,Wa=new WeakMap,Va=new WeakMap,qa=new WeakMap,Ka=new WeakMap,Ga=new WeakMap,Ja=new WeakMap,Ya=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in bo)e.push(t);return e},t.getConfig=function(){var e=Aa.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},Xa={};!function(){if(Oa)return Xa;Oa=1;var e=pr(),t=Zr().filter;e({target:"Array",proto:!0,forced:!Sr()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var Qa,Za,es,ts,ns,rs={};function os(){if(Za)return Qa;Za=1;var e=jt(),t=ga();return Qa=function(n,r,o,i){try{return i?r(e(o)[0],o[1]):r(o)}catch(e){t(n,"throw",e)}}}function is(){if(ts)return es;ts=1;var e=Qr(),t=M(),n=mt(),r=os(),o=da(),i=wr(),a=Ln(),s=mr(),u=pa(),l=ha(),c=Array;return es=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=e(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=t(x,w)).done;O++)E=v?r(w,g,[b.value,O],!0):b.value,s(y,O,E);return y.length=O,y},es}!function(){if(ns)return rs;ns=1;var e=pr(),t=is();e({target:"Array",stat:!0,forced:!ya()((function(e){Array.from(e)}))},{from:t})}();var as,ss={};!function(){if(as)return ss;as=1;var e=pr(),t=Pn().includes,n=R(),r=ni();e({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var us,ls={};!function(){if(us)return ls;us=1;var e=pr(),t=Se(),n=ke(),r=Ne(),o=eo(),i=t([].join);e({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(e){return i(r(this),void 0===e?",":e)}})}();var cs,fs={};!function(){if(cs)return fs;cs=1;var e=pr(),t=Zr().map;e({target:"Array",proto:!0,forced:!Sr()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var ds,hs,ps,gs,vs,ms,ys,bs={};function ws(){if(hs)return ds;hs=1;var e=Le(),t=Oe(),n=wt()("match");return ds=function(r){var o;return e(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===t(r))}}function xs(){if(gs)return ps;gs=1;var e=ws(),t=TypeError;return ps=function(n){if(e(n))throw new t("The method doesn't accept regular expressions");return n}}function Es(){if(ms)return vs;ms=1;var e=wt()("match");return vs=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,"/./"[t](n)}catch(e){}}return!1}}!function(){if(ys)return bs;ys=1;var e=pr(),t=Se(),n=xs(),r=Te(),o=wi(),i=Es(),a=t("".indexOf);e({target:"String",proto:!0,forced:!i("includes")},{includes:function(e){return!!~a(o(r(this)),o(n(e)),arguments.length>1?arguments[1]:void 0)}})}();var Ss,Os,ks,Cs,Ts,Ns,Rs,Ls={};function Ps(){return Os?Ss:(Os=1,Ss="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Rs)return Ls;Rs=1;var e=pr(),t=function(){if(Cs)return ks;Cs=1;var e=Se(),t=Te(),n=wi(),r=Ps(),o=e("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(e){return function(r){var s=n(t(r));return 1&e&&(s=o(s,i,"")),2&e&&(s=o(s,a,"$1")),s}};return ks={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ns)return Ts;Ns=1;var e=en().PROPER,t=R(),n=Ps();return Ts=function(r){return t((function(){return!!n[r]()||"
"!=="
"[r]()||e&&n[r].name!==r}))}}();e({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}})}();var Ms,Ds,As,js,Is,$s={};!function(){if(Is)return $s;Is=1;var e=pr(),t=function(){if(Ds)return Ms;Ds=1;var e=Se(),t=Te(),n=wi(),r=/"/g,o=e("".replace);return Ms=function(e,i,a,s){var u=n(t(e)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(js)return As;js=1;var e=R();return As=function(t){return e((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}}();e({target:"String",proto:!0,forced:n("anchor")},{anchor:function(e){return t(this,"a","name",e)}})}();var Fs,Bs,_s,Us,Hs,zs,Ws,Vs;function qs(){if(Bs)return Fs;Bs=1;var e=sn(),t=It();return Fs=function(n,r,o){return o.get&&e(o.get,r,{getter:!0}),o.set&&e(o.set,r,{setter:!0}),t.f(n,r,o)}}function Ks(){if(Us)return _s;Us=1;var e=Pe(),t=qs(),n=wt(),r=L(),o=n("species");return _s=function(n){var i=e(n);r&&i&&!i[o]&&t(i,o,{configurable:!0,get:function(){return this}})}}Vs||(Vs=1,Ws||(Ws=1,wa()("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),function(){if(zs)return Hs;zs=1;var e=ti(),t=qs(),n=Ri(),r=Qr(),o=ma(),i=Ce(),a=va(),s=fi(),u=di(),l=Ks(),c=L(),f=fa().fastKey,d=an(),h=d.set,p=d.getterFor;return Hs={getConstructor:function(s,u,l,d){var g=s((function(t,n){o(t,v),h(t,{type:u,index:e(null),first:null,last:null,size:0}),c||(t.size=0),i(n)||a(n,t[d],{that:t,AS_ENTRIES:l})})),v=g.prototype,m=p(u),y=function(e,t,n){var r,o,i=m(e),a=b(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},b=function(e,t){var n,r=m(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return n(v,{clear:function(){for(var t=m(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=e(null),c?t.size=0:this.size=0},delete:function(e){var t=this,n=m(t),r=b(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),c?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=m(this),o=r(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),n(v,l?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),c&&t(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(e,t,n){var r=t+" Iterator",o=p(t),i=p(r);s(e,t,(function(e,t){h(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)?u("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,u(void 0,!0))}),n?"entries":"values",!n,!0),l(t)}},Hs}())));var Gs,Js,Ys,Xs,Qs,Zs,eu,tu,nu,ru,ou,iu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),au={};function su(){if(Js)return Gs;Js=1;var e=jt();return Gs=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function uu(){if(Xs)return Ys;Xs=1;var e=R(),t=b().RegExp,n=e((function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),r=n||e((function(){return!t("a","y").sticky})),o=n||e((function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));return Ys={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function lu(){if(Zs)return Qs;Zs=1;var e=R(),t=b().RegExp;return Qs=e((function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))}function cu(){if(tu)return eu;tu=1;var e=R(),t=b().RegExp;return eu=e((function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))}function fu(){if(ru)return nu;ru=1;var e,t,n=M(),r=Se(),o=wi(),i=su(),a=uu(),s=vt(),u=ti(),l=an().get,c=lu(),f=cu(),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=(t=/b*/g,n(h,e=/a/,"a"),n(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(e){var t,r,a,s,c,f,E,S=this,O=l(S),k=o(e),C=O.raw;if(C)return C.lastIndex=S.lastIndex,t=n(p,C,k),S.lastIndex=C.lastIndex,t;var T=O.groups,N=w&&S.sticky,R=n(i,S),L=S.source,P=0,M=k;if(N&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),M=y(k,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(k,S.lastIndex-1))&&(L="(?: "+L+")",M=" "+M,P++),r=new RegExp("^(?:"+L+")",R)),x&&(r=new RegExp("^"+L+"$(?!\\s)",R)),b&&(a=S.lastIndex),s=n(h,N?r:S,M),N?s?(s.input=y(s.input,P),s[0]=y(s[0],P),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}),nu=p}function du(){if(ou)return au;ou=1;var e=pr(),t=fu();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),au}du();var hu,pu,gu,vu,mu,yu,bu,wu,xu,Eu,Su,Ou={};function ku(){if(pu)return hu;pu=1,du();var e=M(),t=un(),n=fu(),r=R(),o=wt(),i=$t(),a=o("species"),s=RegExp.prototype;return hu=function(u,l,c,f){var d=o(u),h=!r((function(){var e={};return e[d]=function(){return 7},7!==""[u](e)})),p=h&&!r((function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[d]=/./[d]),t.exec=function(){return e=!0,null},t[d](""),!e}));if(!h||!p||c){var g=/./[d],v=l(d,""[u],(function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}}));t(String.prototype,u,v[0]),t(s,d,v[1])}f&&i(s[d],"sham",!0)},hu}function Cu(){if(vu)return gu;vu=1;var e=wr(),t=Fe(),n=TypeError;return gu=function(r){if(e(r))return r;throw new n(t(r)+" is not a constructor")}}function Tu(){if(yu)return mu;yu=1;var e=jt(),t=Cu(),n=Ce(),r=wt()("species");return mu=function(o,i){var a,s=e(o).constructor;return void 0===s||n(a=e(s)[r])?i:t(a)}}function Nu(){if(wu)return bu;wu=1;var e=xi().charAt;return bu=function(t,n,r){return n+(r?e(t,n).length:1)}}function Ru(){if(Eu)return xu;Eu=1;var e=M(),t=jt(),n=Re(),r=Oe(),o=fu(),i=TypeError;return xu=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Su)return Ou;Su=1;var e=M(),t=Se(),n=ku(),r=jt(),o=Ce(),i=Te(),a=Tu(),s=Nu(),u=Rn(),l=wi(),c=_e(),f=Ru(),d=uu(),h=R(),p=d.UNSUPPORTED_Y,g=Math.min,v=t([].push),m=t("".slice),y=!h((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]})),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(t,n,d){var h="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e(n,this,t,r)}:n;return[function(n,r){var a=i(this),s=o(n)?void 0:c(n,t);return s?e(s,n,a,r):e(h,l(a),n,r)},function(e,t){var o=r(this),i=l(e);if(!b){var c=d(h,o,i,t,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===t?4294967295:t>>>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 Lu,Pu={};!function(){if(Lu)return Pu;Lu=1;var e=pr(),t=Zr().find,n=ni(),r="find",o=!0;r in[]&&Array(1)[r]((function(){o=!1})),e({target:"Array",proto:!0,forced:o},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Mu,Du,Au={};Du||(Du=1,function(){if(Mu)return Au;Mu=1;var e=pr(),t=b();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());const ju=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Iu,$u,Fu,Bu,_u,Uu,Hu,zu,Wu,Vu,qu,Ku,Gu,Ju,Yu,Xu,Qu,Zu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,fl,dl={};function hl(){if($u)return Iu;$u=1;var e=b(),t=De(),n=Oe(),r=function(e){return t.slice(0,e.length)===e};return Iu=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":e.Bun&&"string"==typeof Bun.version?"BUN":e.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(e.process)?"NODE":e.window&&e.document?"BROWSER":"REST"}function pl(){if(Bu)return Fu;Bu=1;var e=hl();return Fu="NODE"===e}function gl(){if(Uu)return _u;Uu=1;var e=P(),t=Function.prototype,n=t.apply,r=t.call;return _u="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),_u}function vl(){if(zu)return Hu;zu=1;var e=TypeError;return Hu=function(t,n){if(t<n)throw new e("Not enough arguments");return t}}function ml(){if(Vu)return Wu;Vu=1;var e=De();return Wu=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)}function yl(){if(Ku)return qu;Ku=1;var e,t,n,r,o=b(),i=gl(),a=Qr(),s=Re(),u=yt(),l=R(),c=ei(),f=ua(),d=St(),h=vl(),p=ml(),g=pl(),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(){e=o.location}));var T=function(e){if(u(k,e)){var t=k[e];delete k[e],t()}},N=function(e){return function(){T(e)}},L=function(e){T(e.data)},P=function(t){o.postMessage(S(t),e.protocol+"//"+e.host)};return v&&m||(v=function(e){h(arguments.length,1);var n=s(e)?e:x(e),r=f(arguments,1);return k[++O]=function(){i(n,void 0,r)},t(O),O},m=function(e){delete k[e]},g?t=function(e){y.nextTick(N(e))}:w&&w.now?t=function(e){w.now(N(e))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=L,t=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&e&&"file:"!==e.protocol&&!l(P)?(t=P,o.addEventListener("message",L,!1)):t=C in d("script")?function(e){c.appendChild(d("script"))[C]=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(N(e),0)}),qu={set:v,clear:m}}function bl(){if(Ju)return Gu;Ju=1;var e=b(),t=L(),n=Object.getOwnPropertyDescriptor;return Gu=function(r){if(!t)return e[r];var o=n(e,r);return o&&o.value}}function wl(){if(Xu)return Yu;Xu=1;var e=function(){this.head=null,this.tail=null};return e.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}},Yu=e}function xl(){if(rl)return nl;rl=1;var e,t,n,r,o,i=b(),a=bl(),s=Qr(),u=yl().set,l=wl(),c=ml(),f=function(){if(Zu)return Qu;Zu=1;var e=De();return Qu=/ipad|iphone|ipod/i.test(e)&&"undefined"!=typeof Pebble}(),d=function(){if(tl)return el;tl=1;var e=De();return el=/web0s(?!.*chrome)/i.test(e)}(),h=pl(),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 t,n;for(h&&(t=v.domain)&&t.exit();n=w.get();)try{n()}catch(t){throw w.head&&e(),t}t&&t.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),e=function(){o(x)}):h?e=function(){v.nextTick(x)}:(u=s(u,i),e=function(){u(x)}):(t=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),e=function(){n.data=t=!t}),y=function(t){w.head||e(),w.add(t)}}return nl=y}function El(){return il||(il=1,ol=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}),ol}function Sl(){return sl?al:(sl=1,al=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}})}function Ol(){if(ll)return ul;ll=1;var e=b();return ul=e.Promise}function kl(){if(fl)return cl;fl=1;var e=b(),t=Ol(),n=Re(),r=hr(),o=tn(),i=wt(),a=hl(),s=ht(),u=Ae(),l=t&&t.prototype,c=i("species"),f=!1,d=n(e.PromiseRejectionEvent),h=r("Promise",(function(){var e=o(t),n=e!==String(t);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new t((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((r.constructor={})[c]=i,!(f=r.then((function(){}))instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)}));return cl={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Cl,Tl,Nl={};function Rl(){if(Cl)return Nl;Cl=1;var e=Be(),t=TypeError,n=function(n){var r,o;this.promise=new n((function(e,n){if(void 0!==r||void 0!==o)throw new t("Bad Promise constructor");r=e,o=n})),this.resolve=e(r),this.reject=e(o)};return Nl.f=function(e){return new n(e)},Nl}var Ll,Pl,Ml,Dl={};function Al(){if(Pl)return Ll;Pl=1;var e=Ol(),t=ya(),n=kl().CONSTRUCTOR;return Ll=n||!t((function(t){e.all(t).then(void 0,(function(){}))}))}var jl,Il={};var $l,Fl={};var Bl,_l={};var Ul,Hl,zl,Wl,Vl={};function ql(){if(Hl)return Ul;Hl=1;var e=jt(),t=Le(),n=Rl();return Ul=function(r,o){if(e(r),t(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}Wl||(Wl=1,function(){if(Tl)return dl;Tl=1;var e,t,n,r=pr(),o=ht(),i=pl(),a=b(),s=M(),u=un(),l=ci(),c=ai(),f=Ks(),d=Be(),h=Re(),p=Le(),g=ma(),v=Tu(),m=yl().set,y=xl(),w=El(),x=Sl(),E=wl(),S=an(),O=Ol(),k=kl(),C=Rl(),T="Promise",N=k.CONSTRUCTOR,R=k.REJECTION_EVENT,L=k.SUBCLASSING,P=S.getterFor(T),D=S.set,A=O&&O.prototype,j=O,I=A,$=a.TypeError,F=a.document,B=a.process,_=C.f,U=_,H=!!(F&&F.createEvent&&a.dispatchEvent),z="unhandledrejection",W=function(e){var t;return!(!p(e)||!h(t=e.then))&&t},V=function(e,t){var n,r,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,l=e.resolve,c=e.reject,f=e.domain;try{u?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===e.promise?c(new $("Promise-chain cycle")):(r=W(n))?s(r,n,l,c):l(n)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},q=function(e,t){e.notified||(e.notified=!0,y((function(){for(var n,r=e.reactions;n=r.get();)V(n,e);e.notified=!1,t&&!e.rejection&&G(e)})))},K=function(e,t,n){var r,o;H?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:n},!R&&(o=a["on"+e])?o(r):e===z&&w("Unhandled promise rejection",n)},G=function(e){s(m,a,(function(){var t,n=e.facade,r=e.value;if(J(e)&&(t=x((function(){i?B.emit("unhandledRejection",r,n):K(z,n,r)})),e.rejection=i||J(e)?2:1,t.error))throw t.value}))},J=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){s(m,a,(function(){var t=e.facade;i?B.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},X=function(e,t,n){return function(r){e(t,r,n)}},Q=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,q(e,!0))},Z=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new $("Promise can't be resolved itself");var r=W(t);r?y((function(){var n={done:!1};try{s(r,t,X(Z,n,e),X(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,q(e,!1))}catch(t){Q({done:!1},t,e)}}};if(N&&(I=(j=function(t){g(this,I),d(t),s(e,this);var n=P(this);try{t(X(Z,n),X(Q,n))}catch(e){Q(n,e)}}).prototype,(e=function(e){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:null})}).prototype=u(I,"then",(function(e,t){var n=P(this),r=_(v(this,j));return n.parent=!0,r.ok=!h(e)||e,r.fail=h(t)&&t,r.domain=i?B.domain:void 0,0===n.state?n.reactions.add(r):y((function(){V(r,n)})),r.promise})),t=function(){var t=new e,n=P(t);this.promise=t,this.resolve=X(Z,n),this.reject=X(Q,n)},C.f=_=function(e){return e===j||void 0===e?new t(e):U(e)},!o&&h(O)&&A!==Object.prototype)){n=A.then,L||u(A,"then",(function(e,t){var r=this;return new j((function(e,t){s(n,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete A.constructor}catch(e){}l&&l(A,I)}r({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:j}),c(j,T,!1,!0),f(T)}(),function(){if(Ml)return Dl;Ml=1;var e=pr(),t=M(),n=Be(),r=Rl(),o=Sl(),i=va();e({target:"Promise",stat:!0,forced:Al()},{all:function(e){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(e,(function(e){var n=s++,i=!1;c++,t(r,a,e).then((function(e){i||(i=!0,o[n]=e,--c||u(o))}),l)})),--c||u(o)}));return c.error&&l(c.value),s.promise}})}(),function(){if(jl)return Il;jl=1;var e=pr(),t=ht(),n=kl().CONSTRUCTOR,r=Ol(),o=Pe(),i=Re(),a=un(),s=r&&r.prototype;if(e({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if($l)return Fl;$l=1;var e=pr(),t=M(),n=Be(),r=Rl(),o=Sl(),i=va();e({target:"Promise",stat:!0,forced:Al()},{race:function(e){var a=this,s=r.f(a),u=s.reject,l=o((function(){var r=n(a.resolve);i(e,(function(e){t(r,a,e).then(s.resolve,u)}))}));return l.error&&u(l.value),s.promise}})}(),function(){if(Bl)return _l;Bl=1;var e=pr(),t=Rl();e({target:"Promise",stat:!0,forced:kl().CONSTRUCTOR},{reject:function(e){var n=t.f(this);return(0,n.reject)(e),n.promise}})}(),function(){if(zl)return Vl;zl=1;var e=pr(),t=Pe(),n=ht(),r=Ol(),o=kl().CONSTRUCTOR,i=ql(),a=t("Promise"),s=n&&!o;e({target:"Promise",stat:!0,forced:n||o},{resolve:function(e){return i(s&&this===a?r:this,e)}})}());var Kl,Gl,Jl,Yl={};function Xl(){if(Gl)return Kl;Gl=1;var e=M(),t=yt(),n=Me(),r=su(),o=RegExp.prototype;return Kl=function(i){var a=i.flags;return void 0!==a||"flags"in o||t(i,"flags")||!n(o,i)?a:e(r,i)}}!function(){if(Jl)return Yl;Jl=1;var e=en().PROPER,t=un(),n=jt(),r=wi(),o=R(),i=Xl(),a="toString",s=RegExp.prototype,u=s[a],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),c=e&&u.name!==a;(l||c)&&t(s,a,(function(){var e=n(this);return"/"+r(e.source)+"/"+r(i(e))}),{unsafe:!0})}();var Ql,Zl,ec,tc={};function nc(){if(Zl)return Ql;Zl=1;var e=Se(),t=mt(),n=Math.floor,r=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ql=function(e,u,l,c,f,d){var h=l+e.length,p=c.length,g=s;return void 0!==f&&(f=t(f),g=a),o(d,g,(function(t,o){var a;switch(r(o,0)){case"$":return"$";case"&":return e;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 t;if(s>p){var d=n(s/10);return 0===d?t:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):t}a=c[s-1]}return void 0===a?"":a}))},Ql}function rc(e){Promise.resolve().then(e)}!function(){if(ec)return tc;ec=1;var e=gl(),t=M(),n=Se(),r=ku(),o=R(),i=jt(),a=Re(),s=Ce(),u=Tn(),l=Rn(),c=wi(),f=Te(),d=Nu(),h=_e(),p=nc(),g=Ru(),v=wt()("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(e,n){var o=f(this),i=s(e)?void 0:h(e,v);return i?t(i,e,o,n):t(r,c(o),e,n)},function(t,n){var s=i(this),f=c(t);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,P=0;P<T.length;P++){for(var M,D=c((C=T[P])[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,$),M=c(e(n,void 0,F))}else M=p(D,f,A,j,$,n);A>=L&&(R+=E(f,L,A)+M,L=A+D.length)}return R+E(f,L)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||O)}();var oc,ic=function(e){return Object.prototype.toString.call(e)},ac=globalThis.Node,sc=globalThis.Comment,uc=globalThis.Element,lc=globalThis.Text,cc=globalThis.Range,fc=globalThis.Selection,dc=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),e.NodeType=void 0,(oc=e.NodeType||(e.NodeType={}))[oc.ELEMENT_NODE=1]="ELEMENT_NODE",oc[oc.TEXT_NODE=3]="TEXT_NODE",oc[oc.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",oc[oc.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",oc[oc.COMMENT_NODE=8]="COMMENT_NODE",oc[oc.DOCUMENT_NODE=9]="DOCUMENT_NODE",oc[oc.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",oc[oc.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var hc=function(e){return"[object HTMLDocument]"===ic(e)},pc=function(e){return"[object ShadowRoot]"===ic(e)},gc=function(e){return"[object DataTransfer]"===ic(e)},vc=/\[object HTML([A-Z][a-z]*)*Element\]/,mc=function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")},yc=function(e){return vc.test(ic(e))},bc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},wc=function(e){return null!=e&&"number"==typeof e.nodeType},xc=function(t){return wc(t)&&t.nodeType===e.NodeType.COMMENT_NODE},Ec=function(t){return wc(t)&&t.nodeType===e.NodeType.ELEMENT_NODE},Sc=function(e){return"[object Selection]"===ic(e)},Oc=function(t){return wc(t)&&t.nodeType===e.NodeType.TEXT_NODE},kc=function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length},Cc=function(e){var t,n=go(e,2),r=n[0],o=n[1];if(Ec(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=go(Rc(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Ec(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Lc(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Tc=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Nc=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Rc=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(xc(o)||Ec(o)&&0===o.childNodes.length||Ec(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]},Lc=function(e,t,n){return go(Rc(e,t,n),1)[0]},Pc=function(e){var t,n,r="";if(Oc(e)&&e.nodeValue)return e.nodeValue;if(Ec(e)){try{for(var o=po(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Pc(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 Mc(t){var n=[];n.push(t);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===e.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(ju.includes(a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function Dc(t,n){if(!yc(t)||"true"!==t.dataset.slateVoid)for(var r=t.childNodes,o=r.length;o-=1;){var i=r[o],a=i.nodeType;Oc(i)?n(i,t):[e.NodeType.ELEMENT_NODE,e.NodeType.DOCUMENT_NODE,e.NodeType.DOCUMENT_FRAGMENT_NODE].includes(a)&&Dc(i,n)}}function Ac(t){if(0===t.length)return"";var n=t[0];return n.nodeType!==e.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var jc,Ic,$c,Fc={};function Bc(){if(Ic)return jc;Ic=1;var e=It().f;return jc=function(t,n,r){r in t||e(t,r,{configurable:!0,get:function(){return n[r]},set:function(e){n[r]=e}})}}!function(){if($c)return Fc;$c=1;var e=L(),t=b(),n=Se(),r=hr(),o=ba(),i=$t(),a=ti(),s=An().f,u=Me(),l=ws(),c=wi(),f=Xl(),d=uu(),h=Bc(),p=un(),g=R(),v=yt(),m=an().enforce,y=Ks(),w=wt(),x=lu(),E=cu(),S=w("match"),O=t.RegExp,k=O.prototype,C=t.SyntaxError,T=n(k.exec),N=n("".charAt),P=n("".replace),M=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,B=d.UNSUPPORTED_Y,_=e&&(!$||F||x||E||g((function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))})));if(r("RegExp",_)){for(var U=function(e,t){var n,r,s,d,h,p,g=u(k,this),y=l(e),b=void 0===t,w=[],S=e;if(!g&&y&&b&&e.constructor===U)return e;if((y||u(k,e))&&(e=e.source,b&&(t=f(S))),e=void 0===e?"":c(e),t=void 0===t?"":c(t),S=e,x&&"dotAll"in j&&(r=!!t&&M(t,"s")>-1)&&(t=P(t,/s/g,"")),n=t,F&&"sticky"in j&&(s=!!t&&M(t,"y")>-1)&&B&&(t=P(t,/y/g,"")),E&&(d=function(e){for(var t,n=e.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(t=N(e,r)))t+=N(e,++r);else if("]"===t)u=!1;else if(!u)switch(!0){case"["===t:u=!0;break;case"("===t:if(o+=t,"?:"===D(e,r+1,r+3))continue;T(A,D(e,r+1))&&(r+=2,l=!0),c++;continue;case">"===t&&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+=t:o+=t}return[o,i]}(e),e=d[0],w=d[1]),h=o(O(e,t),g?this:k,U),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=U(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=N(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+N(e,++r);return o}(e),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),e!==S)try{i(h,"source",""===S?"(?:)":S)}catch(e){}return h},H=s(O),z=0;H.length>z;)h(U,O,H[z++]);k.constructor=U,U.prototype=k,p(t,"RegExp",U,{constructor:!0})}y("RegExp")}();var _c=new RegExp(String.fromCharCode(160),"g");function Uc(e){return e.replace(_c," ")}var Hc=["span","b","strong","i","em","s","strike","u","font","sub","sup"],zc=[];var Wc=[];var Vc={};function qc(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+=n,!0}}return!1}function Kc(e,t,n){return{type:"paragraph",children:[{text:o(e).text().replace(/\s+/gm," ")}]}}function Gc(e,n){var r=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(Ec(e)){if("BR"===e.nodeName)return void(qc(n,"\n")||n.push({text:"\n"}));var r=Yc(o(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(Oc(e)){var i=e.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=Uc(i),qc(n,i)||n.push({text:i}))}})),n)}(e,n),i=function(e){for(var t in Vc)if(e[0].matches(t))return Vc[t];return Kc}(e),a=i(e[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach((function(o){t.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:e.text().replace(/\s+/gm," ")}]),Wc.forEach((function(t){o=t(e[0],o,n)})))})),a}function Jc(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(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=Uc(n)};return Wc.forEach((function(n){r=n(e[0],r,t)})),r}function Yc(e,t){zc.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=o(r(e[0])))}));var n=Ac(e);if("span"===n){if(e.attr("data-w-e-type"))return Gc(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes;return Array.from(r).map((function(e){var n=o(e);return Oc(n[0])?{text:n[0].textContent||""}:Jc(n,t)}))}return Jc(e,t)}if("code"===n)return"pre"===Ac(e.parent())?Gc(e,t):Jc(e,t);if(Hc.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return co(co({},Yc(o(r[0]),t)),Jc(e,t))}return Jc(e,t)}return Gc(e,t)}function Xc(e,t,n){var r=o(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(yo.DESTROYED,(function(){r.removeAttr(t)})),!1)}function Qc(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=o("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=Yc(o(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Zc(e,t){return"w-e-element-".concat(e,"-").concat(t)}var ef=[];var tf={};function nf(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function rf(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),u="";s||(u=a.map((function(e){return Ef(e,n)})).join(""));var l=function(e){return tf[e]||nf}(o),c=l(e,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||ef.forEach((function(t){return f=t(e,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}var of,af,sf,uf={};function lf(){if(af)return of;af=1;var e=yt();return of=function(t){return void 0!==t&&(e(t,"value")||e(t,"writable"))}}!function(){if(sf)return uf;sf=1;var e=pr(),t=M(),n=Le(),r=jt(),o=lf(),i=kt(),a=oi();e({target:"Reflect",stat:!0},{get:function e(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:t(l.get,f):n(c=a(s))?e(c,u,f):void 0}})}();var cf,ff={};!function(){if(cf)return ff;cf=1;var e,t=pr(),n=Xr(),r=kt().f,o=Rn(),i=wi(),a=xs(),s=Te(),u=Es(),l=ht(),c=n("".slice),f=Math.min,d=u("endsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"endsWith"),!e||e.writable))&&!d},{endsWith:function(e){var t=i(s(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,u=void 0===n?r:f(o(n),r),l=i(e);return c(t,u-l.length,u)===l}})}();var df=0,hf=function(){this.id="".concat(df++)},pf="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),gf="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),vf="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),mf="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),yf="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),bf="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),wf=!yf&&!mf&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,xf={getWindow:function(e){var t=Va.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=Wa.get(t);return n||(n=new hf,Wa.set(t,n)),n},setNewKey:function(e){var t=new hf;Wa.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=Ba.get(o);if(null==i){if(t.Editor.isEditor(o))return r;break}var a=Fa.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=xf.toDOMNode(e,e),n=t.getRootNode();return(hc(n)||pc(n))&&null!=Reflect.get(n,"getSelection")?n:t.ownerDocument},getParentNode:function(e,t){return Ba.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=xf.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,n){var r=[xf.findPath(e,n)[0]];return t.Node.get(e,r)},toDOMNode:function(e,n){var r;if(t.Editor.isEditor(n))r=_a.get(e);else{var o=xf.findKey(e,n);r=Ha.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=xf.toDOMNode(e,e);try{r=Ec(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=xf.toDOMPoint(e,r),s=t.Range.isCollapsed(n)?a:xf.toDOMPoint(e,o),u=xf.getWindow(e).document.createRange(),l=go(i?s:a,2),c=l[0],f=l[1],d=go(i?a:s,2),h=d[0],p=d[1],g=!!(Ec(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Ec(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(e,n){var r,o,i,a=go(t.Editor.node(e,n.path),1)[0],s=xf.toDOMNode(e,a);t.Editor.void(e,{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=po(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(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=Ec(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ua.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=xf.toSlateNode(e,n.target),u=xf.findPath(e,s);if(t.Editor.isVoid(e,s)){var l=i.getBoundingClientRect(),c=e.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=t.Editor.point(e,u,{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 h=this.getWindow(e).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 xf.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if((Sc(n)?n.anchorNode:n.startContainer)&&(Sc(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=bf&&Tc()?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=xf.toSlatePoint(e,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:xf.toSlatePoint(e,[a,s],{exactMatch:l,suppressThrow:c});if(!d)return null;var h={anchor:f,focus:d};return t.Range.isExpanded(h)&&t.Range.isForward(h)&&Ec(a)&&t.Editor.void(e,{at:h.focus,mode:"highest"})&&(h=t.Editor.unhangRange(e,h,{voids:!0})),h},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,s=go(o?t:Cc(t),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,v=xf.getWindow(e);if(p&&v.document.createRange){f=p.closest('[data-slate-node="text"]');var m=v.document.createRange();m.setStart(f,0),m.setEnd(u,l);var y=m.cloneContents();vo(vo([],go(a(y.querySelectorAll("[data-slate-zero-width]"))),!1),go(a(y.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),d=y.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(e){d-=e.textContent.length}))):d=1);g&&d===g.textContent.length&&(c.hasAttribute("data-slate-zero-width")||gf&&(null===(r=g.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!f){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var b=xf.toSlateNode(e,f);return{path:xf.findPath(e,b),offset:d}},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=po(i),s=a.next();!s.done;s=a.next()){var u=go(s.value,1)[0];t.Element.isElement(u)&&o.push(u)}}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=go(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=go(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=go(t.Editor.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&go(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=ka.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Na.get(e)||null},getHoverbar:function(e){return La.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)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,i,a,s=xf.getTextarea(e).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=po(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Oc(f))break;f.remove()}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=t.Editor.nodes(e,{match:function(n){return!(!t.Element.isElement(n)||e.isInline(n))},universal:!0});try{for(var h=po(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];Dc(xf.toDOMNode(e,v),(function(e,t){var n=o(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.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=po(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=xf.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=go(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function Ef(e,n){return t.Element.isElement(e)?rf(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," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=xf.getParentsNodes(t,e).some((function(e){return"pre"===xf.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=xf.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return ef.forEach((function(t){return r=t(e,r)})),r}(e,n)}var Sf=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Of=function(e,t,n){var r=xf.toDOMRange(e,t).getBoundingClientRect(),o=xf.toDOMRange(e,n).getBoundingClientRect();return Sf(r,o)&&Sf(o,r)};function kf(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.Transforms.insertNodes(e,n,{mode:"highest"})}var Cf,Tf,Nf,Rf,Lf,Pf,Mf,Df,Af,jf,If,$f,Ff,Bf,_f,Uf,Hf,zf,Wf,Vf,qf,Kf,Gf,Jf,Yf,Xf,Qf,Zf,ed,td,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd=function(e){var n=e,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward;return n.insertText=function(e){n.getConfig().readOnly||i(e)},n.apply=function(e){var r,o,i,s,u,l,c,f,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var h=po(t.Editor.levels(n,{at:e.path})),p=h.next();!p.done;p=h.next()){var g=go(p.value,2),v=g[0],m=g[1],y=xf.findKey(n,v);d.push([m,y])}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var b=po(t.Editor.levels(n,{at:t.Path.parent(e.path)})),w=b.next();!w.done;w=b.next()){var x=go(w.value,2);v=x[0],m=x[1],y=xf.findKey(n,v);d.push([m,y])}}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=po(t.Editor.levels(n,{at:t.Path.common(t.Path.parent(e.path),t.Path.parent(e.newPath))})),S=E.next();!S.done;S=E.next()){var O=go(S.value,2);v=O[0],m=O[1],y=xf.findKey(n,v);d.push([m,y])}}catch(e){u={error:e}}finally{try{S&&!S.done&&(l=E.return)&&l.call(E)}finally{if(u)throw u.error}}}a(e);try{for(var k=po(d),C=k.next();!C.done;C=k.next()){var T=go(C.value,2);m=T[0],y=T[1],v=go(t.Editor.node(n,m),1)[0];Wa.set(v,y)}}catch(e){c={error:e}}finally{try{C&&!C.done&&(f=k.return)&&f.call(k)}finally{if(c)throw c.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(e.selection&&t.Range.isCollapsed(e.selection)){var o=t.Editor.above(e,{match:function(n){return t.Editor.isBlock(e,n)},at:e.selection});if(o){var i=go(o,2)[1],a=t.Editor.range(e,i,e.selection.anchor),u=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(Of(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;)Of(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)}(n,a);t.Range.isCollapsed(u)||t.Transforms.delete(e,{at:u})}}},n.onChange=function(){var e=n.selection;null!=e&&Ka.set(n,e),n.emit("change"),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var e=n.children;return(void 0===e?[]:e).map((function(e){return Ef(e,n)})).join("")},n.getText=function(){var e=n.children;return(void 0===e?[]:e).map((function(e){return t.Node.string(e)})).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":t.Editor.string(e,r)},n.getElemsByType=function(e,r){var o,i;void 0===r&&(r=!1);var a=[],s=t.Editor.nodes(n,{at:[],universal:!0});try{for(var u=po(s),l=u.next();!l.done;l=u.next()){var c=go(l.value,1)[0];if(t.Element.isElement(c))if(r?c.type.indexOf(e)>=0:c.type===e){var f=xf.findKey(n,c),d=Zc(c.type,f.id);a.push(co(co({},c),{id:d}))}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(e){return n.getElemsByType(e,!0)},n.isEmpty=function(){var e=n.children,r=void 0===e?[]:e;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!t.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||t.Text.isText(s)&&""===s.text},n.clear=function(){t.Transforms.delete(n,{at:{anchor:t.Editor.start(n,[]),focus:t.Editor.end(n,[])}}),0===n.children.length&&t.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(e){return xf.getParentNode(n,e)},n.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e){var i=document.createElement("div");i.innerHTML=e;var a=Array.from(i.childNodes);if(a=a.filter((function(e){var t=e.nodeName;return!!Oc(e)||!!Ec(e)&&!iu.has(t.toLowerCase())})),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(xf.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach((function(e,t){var r=e.nodeName,i=e.textContent,s=void 0===i?"":i;if(Oc(e)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=e,c=!1;if(Hc.includes(r.toLowerCase()))c=!0;else for(var f in Vc)if(u.matches(f)){c=!0;break}if(c){var d=Yc(o(u),n);return Array.isArray(d)?(d.forEach((function(e){return kf(n,e)})),l+=1):(kf(n,d),l+=1),void(xf.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!xf.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(t>=1){var p=a[t-1];mc(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")})),l&&u&&xf.isEmptyPath(n,u)&&t.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(e){void 0===e&&(e="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var a=Qc(n,null==e?"":e);if(t.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(i))}catch(e){n.select(t.Editor.start(n,[]))}},n},hd=1,pd=function(e){var n=e;return n.id="wangEditor-".concat(hd++),n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(e){if(xf.toDOMNode(n,n).focus({preventScroll:!0}),qa.set(n,!0),e){var r=t.Editor.end(n,[]);t.Transforms.select(n,r)}else{var o=Ka.get(n);o?t.Transforms.select(n,o):t.Transforms.select(n,t.Editor.start(n,[]))}},n.isFocused=function(){return!!qa.get(n)},n.blur=function(){xf.toDOMNode(n,n).blur(),t.Transforms.deselect(n),qa.set(n,!1)},n.updateView=function(){xf.getTextarea(n).changeViewState();var e=xf.getToolbar(n);e&&e.changeToolbarState();var t=xf.getHoverbar(n);t&&t.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var e=xf.getTextarea(n);e.destroy(),ka.delete(n),Ca.delete(e);var t=xf.getToolbar(n);t&&(t.destroy(),Na.delete(n),Ta.delete(t));var r=xf.getHoverbar(n);r&&(r.destroy(),La.delete(n),Ra.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=o("#".concat(e));if(0!==r.length){var i=r[0];if(!xf.hasDOMNode(n,i)){t="Element (found by id is '".concat(e,"') is not in editor DOM");return t+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(t,i)}var a=xf.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(e){e<1||xf.getTextarea(n).changeProgress(e)},n.hidePanelOrModal=function(){var e=Ma.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 xf.toDOMNode(n,e)},n.fullScreen=function(){if(!n.isFullScreen){var e=null,t=xf.getToolbar(n);t&&(e=t.$box);var r=xf.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=xf.getTextarea(n).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return xf.getTextarea(n).$textAreaContainer[0]},n},gd={exports:{}},vd={exports:{}};function md(){if(Tf)return Cf;Tf=1;return Cf=function(e){return null!=e}}function yd(){if(Pf)return Lf;Pf=1;var e=function(){if(Rf)return Nf;Rf=1;var e=md(),t={object:!0,function:!0,undefined:!0};return Nf=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Lf=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function bd(){if(jf)return Af;jf=1;var e=function(){if(Df)return Mf;Df=1;var e=yd();return Mf=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Af=function(r){return!!e(r)&&!t.test(n.call(r))}}function wd(){if(zf)return Hf;zf=1;var e=(Uf?_f:(Uf=1,_f=function(){}))();return Hf=function(t){return t!==e&&null!==t}}function xd(){return Kf||(Kf=1,qf=(Bf?Ff:(Bf=1,Ff=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Vf)return Wf;Vf=1;var e=wd(),t=Object.keys;return Wf=function(n){return t(e(n)?Object(n):n)}}()),qf}function Ed(){if(Xf)return Yf;Xf=1;var e=xd(),t=function(){if(Jf)return Gf;Jf=1;var e=wd();return Gf=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Yf=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},Yf}function Sd(){return Zf?Qf:(Zf=1,Qf=($f||($f=1,If=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")}),If)()?Object.assign:Ed())}function Od(){return sd||(sd=1,ad=function(){if(rd)return nd;rd=1;var e="razdwatrzy";return nd=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(id)return od;id=1;var e=String.prototype.indexOf;return od=function(t){return e.call(this,t,arguments[1])>-1},od}()),ad}function kd(){if(ud)return vd.exports;ud=1;var e=md(),t=bd(),n=Sd(),r=function(){if(td)return ed;td=1;var e=wd(),t=Array.prototype.forEach,n=Object.create;return ed=function(r){var o=n(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)})),o},ed}(),o=Od(),i=vd.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"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],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(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},vd.exports}var Cd=(fd||(fd=1,function(e,t){var n,r,o,i,a,s,u,l=kd(),c=cd?ld:(cd=1,ld=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),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(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e){var t,n,r,o,i;if(v.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)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),t=1;t<n;++t)i[t-1]=arguments[t];f.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,r,o,i;if(c(t),!v.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},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(gd,gd.exports)),gd.exports),Td=g(Cd);function Nd(e){var t=Ga.get(e);return null==t&&(t=Td(),Ga.set(e,t)),t}var Rd=new WeakMap;function Ld(e,t){var n=Rd.get(e);null==n&&(n=new Set,Rd.set(e,n)),n.add(t)}var Pd,Md,Dd,Ad,jd,Id,$d=function(e){var t=e;return t.on=function(e,n){var r=Nd(t);if(r.on(e,n),"destroyed"===e&&Ld(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ld(t,o)}},t.once=function(e,n){Nd(t).once(e,n)},t.off=function(e,n){Nd(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Nd(t);if(o.emit.apply(o,vo([e],go(n),!1)),"destroyed"===e){var i=function(e){return Rd.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){Rd.set(e,new Set)}(t)}},t},Fd={};function Bd(){if(Md)return Pd;Md=1;var e=R(),t=wt(),n=L(),r=ht(),o=t("iterator");return Pd=!e((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),a="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),a+=n+e})),i.delete("a",2),i.delete("b",void 0),r&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(r||!n)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==a||"x"!==new URL("https://x",void 0).host}))}function _d(){if(Ad)return Dd;Ad=1;var e=L(),t=Se(),n=M(),r=R(),o=Nr(),i=cr(),a=xe(),s=mt(),u=ke(),l=Object.assign,c=Object.defineProperty,f=t([].concat);return Dd=!l||r((function(){if(e&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(e){n[e]=e})),7!==l({},t)[r]||o(l({},n)).join("")!==i}))?function(t,r){for(var l=s(t),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++],e&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Dd}function Ud(){if(Id)return jd;Id=1;var e=Se(),t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=RangeError,a=e(r.exec),s=Math.floor,u=String.fromCharCode,l=e("".charCodeAt),c=e([].join),f=e([].push),d=e("".replace),h=e("".split),p=e("".toLowerCase),g=function(e){return e+22+75*(e<26)},v=function(e,t,n){var r=0;for(e=n?s(e/700):e>>1,e+=s(e/t);e>455;)e=s(e/35),r+=36;return s(r+36*e/(e+38))},m=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=l(e,n++);if(o>=55296&&o<=56319&&n<r){var i=l(e,n++);56320==(64512&i)?f(t,((1023&o)<<10)+(1023&i)+65536):(f(t,o),n--)}else f(t,o)}return t}(e);var r,a,d=e.length,h=128,p=0,m=72;for(r=0;r<e.length;r++)(a=e[r])<128&&f(n,u(a));var y=n.length,b=y;for(y&&f(n,"-");b<d;){var w=t;for(r=0;r<e.length;r++)(a=e[r])>=h&&a<w&&(w=a);var x=b+1;if(w-h>s((t-p)/x))throw new i(o);for(p+=(w-h)*x,h=w,r=0;r<e.length;r++){if((a=e[r])<h&&++p>t)throw new i(o);if(a===h){for(var E=p,S=36;;){var O=S<=m?1:S>=m+26?26:S-m;if(E<O)break;var k=E-O,C=36-O;f(n,u(g(O+k%C))),E=s(k/C),S+=36}f(n,u(g(E))),m=v(p,x,b===y),p=0,b++}}p++,h++}return c(n,"")};return jd=function(e){var t,o,i=[],s=h(d(p(e),r,"."),".");for(t=0;t<s.length;t++)o=s[t],f(i,a(n,o)?"xn--"+m(o):o);return c(i,".")}}var Hd,zd,Wd,Vd,qd,Kd,Gd,Jd={};function Yd(){if(Wd)return zd;Wd=1;var e=ua(),t=Math.floor,n=function(r,o){var i=r.length;if(i<8)for(var a,s,u=1;u<i;){for(s=u,a=r[u];s&&o(r[s-1],a)>0;)r[s]=r[--s];s!==u++&&(r[s]=a)}else for(var l=t(i/2),c=n(e(r,0,l),o),f=n(e(r,l),o),d=c.length,h=f.length,p=0,g=0;p<d||g<h;)r[p+g]=p<d&&g<h?o(c[p],f[g])<=0?c[p++]:f[g++]:p<d?c[p++]:f[g++];return r};return zd=n}function Xd(){if(qd)return Vd;qd=1,hi(),function(){if(Hd)return Jd;Hd=1;var e=pr(),t=Se(),n=Nn(),r=RangeError,o=String.fromCharCode,i=String.fromCodePoint,a=t([].join);e({target:"String",stat:!0,arity:1,forced:!!i&&1!==i.length},{fromCodePoint:function(e){for(var t,i=[],s=arguments.length,u=0;s>u;){if(t=+arguments[u++],n(t,1114111)!==t)throw new r(t+" is not a valid code point");i[u]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return a(i,"")}})}();var e=pr(),t=b(),n=bl(),r=Pe(),o=M(),i=Se(),a=L(),s=Bd(),u=un(),l=qs(),c=Ri(),f=ai(),d=si(),h=an(),p=ma(),g=Re(),v=yt(),m=Qr(),y=br(),w=jt(),x=Le(),E=wi(),S=ti(),O=Ee(),k=pa(),C=ha(),T=di(),N=vl(),R=wt(),P=Yd(),D=R("iterator"),A="URLSearchParams",j=A+"Iterator",I=h.set,$=h.getterFor(A),F=h.getterFor(j),B=n("fetch"),_=n("Request"),U=n("Headers"),H=_&&_.prototype,z=U&&U.prototype,W=t.TypeError,V=t.encodeURIComponent,q=String.fromCharCode,K=r("String","fromCodePoint"),G=parseInt,J=i("".charAt),Y=i([].join),X=i([].push),Q=i("".replace),Z=i([].shift),ee=i([].splice),te=i("".split),ne=i("".slice),re=i(/./.exec),oe=/\+/g,ie=/^[0-9a-f]+$/i,ae=function(e,t){var n=ne(e,t,t+2);return re(ie,n)?G(n,16):NaN},se=function(e){for(var t=0,n=128;n>0&&e&n;n>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},le=function(e){for(var t=(e=Q(e,oe," ")).length,n="",r=0;r<t;){var o=J(e,r);if("%"===o){if("%"===J(e,r+1)||r+3>t){n+="%",r++;continue}var i=ae(e,r+1);if(i!=i){n+=o,r++;continue}r+=2;var a=se(i);if(0===a)o=q(i);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[i],u=1;u<a&&!(++r+3>t||"%"!==J(e,r));){var l=ae(e,r+1);if(l!=l){r+=3;break}if(l>191||l<128)break;X(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=ue(s);null===c?n+="�":o=K(c)}}n+=o,r++}return n},ce=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},de=function(e){return fe[e]},he=function(e){return Q(V(e),ce,de)},pe=d((function(e,t){I(this,{type:j,target:$(e).entries,index:0,kind:t})}),A,(function(){var e=F(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,T(void 0,!0);var r=t[n];switch(e.kind){case"keys":return T(r.key,!1);case"values":return T(r.value,!1)}return T([r.key,r.value],!1)}),!0),ge=function(e){this.entries=[],this.url=null,void 0!==e&&(x(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===J(e,0)?ne(e,1):e:E(e)))};ge.prototype={type:A,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,u,l=this.entries,c=C(e);if(c)for(n=(t=k(e,c)).next;!(r=o(n,t)).done;){if(a=(i=k(w(r.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new W("Expected sequence with length 2");X(l,{key:E(s.value),value:E(u.value)})}else for(var f in e)v(e,f)&&X(l,{key:f,value:E(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,o=te(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(n=te(t,"="),X(r,{key:le(Z(n)),value:le(Y(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],X(n,he(e.key)+"="+he(e.value));return Y(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ve=function(){p(this,me);var e=I(this,new ge(arguments.length>0?arguments[0]:void 0));a||(this.size=e.entries.length)},me=ve.prototype;if(c(me,{append:function(e,t){var n=$(this);N(arguments.length,2),X(n.entries,{key:E(e),value:E(t)}),a||this.length++,n.updateURL()},delete:function(e){for(var t=$(this),n=N(arguments.length,1),r=t.entries,o=E(e),i=n<2?void 0:arguments[1],s=void 0===i?i:E(i),u=0;u<r.length;){var l=r[u];if(l.key!==o||void 0!==s&&l.value!==s)u++;else if(ee(r,u,1),void 0!==s)break}a||(this.size=r.length),t.updateURL()},get:function(e){var t=$(this).entries;N(arguments.length,1);for(var n=E(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=$(this).entries;N(arguments.length,1);for(var n=E(e),r=[],o=0;o<t.length;o++)t[o].key===n&&X(r,t[o].value);return r},has:function(e){for(var t=$(this).entries,n=N(arguments.length,1),r=E(e),o=n<2?void 0:arguments[1],i=void 0===o?o:E(o),a=0;a<t.length;){var s=t[a++];if(s.key===r&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var n=$(this);N(arguments.length,1);for(var r,o=n.entries,i=!1,s=E(e),u=E(t),l=0;l<o.length;l++)(r=o[l]).key===s&&(i?ee(o,l--,1):(i=!0,r.value=u));i||X(o,{key:s,value:u}),a||(this.size=o.length),n.updateURL()},sort:function(){var e=$(this);P(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=$(this).entries,r=m(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new pe(this,"keys")},values:function(){return new pe(this,"values")},entries:function(){return new pe(this,"entries")}},{enumerable:!0}),u(me,D,me.entries,{name:"entries"}),u(me,"toString",(function(){return $(this).serialize()}),{enumerable:!0}),a&&l(me,"size",{get:function(){return $(this).entries.length},configurable:!0,enumerable:!0}),f(ve,A),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:ve}),!s&&g(U)){var ye=i(z.has),be=i(z.set),we=function(e){if(x(e)){var t,n=e.body;if(y(n)===A)return t=e.headers?new U(e.headers):new U,ye(t,"content-type")||be(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(e,{body:O(0,E(n)),headers:O(0,t)})}return e};if(g(B)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return B(e,arguments.length>1?we(arguments[1]):{})}}),g(_)){var xe=function(e){return p(this,H),new _(e,arguments.length>1?we(arguments[1]):{})};H.constructor=xe,xe.prototype=H,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:xe})}}return Vd={URLSearchParams:ve,getState:$}}function Qd(){if(Kd)return Fd;Kd=1,Ei();var e,t=pr(),n=L(),r=Bd(),o=b(),i=Qr(),a=Se(),s=un(),u=qs(),l=ma(),c=yt(),f=_d(),d=is(),h=ua(),p=xi().codeAt,g=Ud(),v=wi(),m=ai(),y=vl(),w=Xd(),x=an(),E=x.set,S=x.getterFor("URL"),O=w.URLSearchParams,k=w.getState,C=o.URL,T=o.TypeError,N=o.parseInt,R=Math.floor,P=Math.pow,M=a("".charAt),D=a(/./.exec),A=a([].join),j=a(1..toString),I=a([].pop),$=a([].push),F=a("".replace),B=a([].shift),_=a("".split),U=a("".slice),H=a("".toLowerCase),z=a([].unshift),W="Invalid scheme",V="Invalid host",q="Invalid port",K=/[a-z]/i,G=/[\d+-.a-z]/i,J=/\d/,Y=/^0x/i,X=/^[0-7]+$/,Q=/^\d+$/,Z=/^[\da-f]+$/i,ee=/[\0\t\n\r #%/:<>?@[\\\]^|]/,te=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+/,re=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oe=/[\t\n\r]/g,ie=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)z(t,e%256),e=R(e/256);return A(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n?r:t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=j(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ae={},se=f({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ue=f({},se,{"#":1,"?":1,"{":1,"}":1}),le=f({},ue,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ce=function(e,t){var n=p(e,0);return n>32&&n<127&&!c(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},de=function(e,t){var n;return 2===e.length&&D(K,M(e,0))&&(":"===(n=M(e,1))||!t&&"|"===n)},he=function(e){var t;return e.length>1&&de(U(e,0,2))&&(2===e.length||"/"===(t=M(e,2))||"\\"===t||"?"===t||"#"===t)},pe=function(e){return"."===e||"%2e"===H(e)},ge={},ve={},me={},ye={},be={},we={},xe={},Ee={},Oe={},ke={},Ce={},Te={},Ne={},Re={},Le={},Pe={},Me={},De={},Ae={},je={},Ie={},$e=function(e,t,n){var r,o,i,a=v(e);if(t){if(o=this.parse(a))throw new T(o);this.searchParams=null}else{if(void 0!==n&&(r=new $e(n,!0)),o=this.parse(a,null,r))throw new T(o);(i=k(new O)).bindURL(this),this.searchParams=i}};$e.prototype={type:"URL",parse:function(t,n,r){var o,i,a,s,u,l=this,f=n||ge,p=0,g="",m=!1,y=!1,b=!1;for(t=v(t),n||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=F(t,ne,""),t=F(t,re,"$1")),t=F(t,oe,""),o=d(t);p<=o.length;){switch(i=o[p],f){case ge:if(!i||!D(K,i)){if(n)return W;f=me;continue}g+=H(i),f=ve;break;case ve:if(i&&(D(G,i)||"+"===i||"-"===i||"."===i))g+=H(i);else{if(":"!==i){if(n)return W;g="",f=me,p=0;continue}if(n&&(l.isSpecial()!==c(fe,g)||"file"===g&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=g,n)return void(l.isSpecial()&&fe[l.scheme]===l.port&&(l.port=null));g="","file"===l.scheme?f=Re:l.isSpecial()&&r&&r.scheme===l.scheme?f=ye:l.isSpecial()?f=Ee:"/"===o[p+1]?(f=be,p++):(l.cannotBeABaseURL=!0,$(l.path,""),f=Ae)}break;case me:if(!r||r.cannotBeABaseURL&&"#"!==i)return W;if(r.cannotBeABaseURL&&"#"===i){l.scheme=r.scheme,l.path=h(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,f=Ie;break}f="file"===r.scheme?Re:we;continue;case ye:if("/"!==i||"/"!==o[p+1]){f=we;continue}f=Oe,p++;break;case be:if("/"===i){f=ke;break}f=De;continue;case we:if(l.scheme=r.scheme,i===e)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query;else if("/"===i||"\\"===i&&l.isSpecial())f=xe;else if("?"===i)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query="",f=je;else{if("#"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.path.length--,f=De;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query,l.fragment="",f=Ie}break;case xe:if(!l.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,f=De;continue}f=ke}else f=Oe;break;case Ee:if(f=Oe,"/"!==i||"/"!==M(g,p+1))continue;p++;break;case Oe:if("/"!==i&&"\\"!==i){f=ke;continue}break;case ke:if("@"===i){m&&(g="%40"+g),m=!0,a=d(g);for(var w=0;w<a.length;w++){var x=a[w];if(":"!==x||b){var E=ce(x,le);b?l.password+=E:l.username+=E}else b=!0}g=""}else if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(m&&""===g)return"Invalid authority";p-=d(g).length+1,g="",f=Ce}else g+=i;break;case Ce:case Te:if(n&&"file"===l.scheme){f=Pe;continue}if(":"!==i||y){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(l.isSpecial()&&""===g)return V;if(n&&""===g&&(l.includesCredentials()||null!==l.port))return;if(s=l.parseHost(g))return s;if(g="",f=Me,n)return;continue}"["===i?y=!0:"]"===i&&(y=!1),g+=i}else{if(""===g)return V;if(s=l.parseHost(g))return s;if(g="",f=Ne,n===Te)return}break;case Ne:if(!D(J,i)){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()||n){if(""!==g){var S=N(g,10);if(S>65535)return q;l.port=l.isSpecial()&&S===fe[l.scheme]?null:S,g=""}if(n)return;f=Me;continue}return q}g+=i;break;case Re:if(l.scheme="file","/"===i||"\\"===i)f=Le;else{if(!r||"file"!==r.scheme){f=De;continue}switch(i){case e:l.host=r.host,l.path=h(r.path),l.query=r.query;break;case"?":l.host=r.host,l.path=h(r.path),l.query="",f=je;break;case"#":l.host=r.host,l.path=h(r.path),l.query=r.query,l.fragment="",f=Ie;break;default:he(A(h(o,p),""))||(l.host=r.host,l.path=h(r.path),l.shortenPath()),f=De;continue}}break;case Le:if("/"===i||"\\"===i){f=Pe;break}r&&"file"===r.scheme&&!he(A(h(o,p),""))&&(de(r.path[0],!0)?$(l.path,r.path[0]):l.host=r.host),f=De;continue;case Pe:if(i===e||"/"===i||"\\"===i||"?"===i||"#"===i){if(!n&&de(g))f=De;else if(""===g){if(l.host="",n)return;f=Me}else{if(s=l.parseHost(g))return s;if("localhost"===l.host&&(l.host=""),n)return;g="",f=Me}continue}g+=i;break;case Me:if(l.isSpecial()){if(f=De,"/"!==i&&"\\"!==i)continue}else if(n||"?"!==i)if(n||"#"!==i){if(i!==e&&(f=De,"/"!==i))continue}else l.fragment="",f=Ie;else l.query="",f=je;break;case De:if(i===e||"/"===i||"\\"===i&&l.isSpecial()||!n&&("?"===i||"#"===i)){if(".."===(u=H(u=g))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(l.shortenPath(),"/"===i||"\\"===i&&l.isSpecial()||$(l.path,"")):pe(g)?"/"===i||"\\"===i&&l.isSpecial()||$(l.path,""):("file"===l.scheme&&!l.path.length&&de(g)&&(l.host&&(l.host=""),g=M(g,0)+":"),$(l.path,g)),g="","file"===l.scheme&&(i===e||"?"===i||"#"===i))for(;l.path.length>1&&""===l.path[0];)B(l.path);"?"===i?(l.query="",f=je):"#"===i&&(l.fragment="",f=Ie)}else g+=ce(i,ue);break;case Ae:"?"===i?(l.query="",f=je):"#"===i?(l.fragment="",f=Ie):i!==e&&(l.path[0]+=ce(i,ae));break;case je:n||"#"!==i?i!==e&&("'"===i&&l.isSpecial()?l.query+="%27":l.query+="#"===i?"%23":ce(i,ae)):(l.fragment="",f=Ie);break;case Ie:i!==e&&(l.fragment+=ce(i,se))}p++}},parseHost:function(e){var t,n,r;if("["===M(e,0)){if("]"!==M(e,e.length-1))return V;if(t=function(e){var t,n,r,o,i,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return M(e,f)};if(":"===d()){if(":"!==M(e,1))return;f+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=n=0;n<4&&D(Z,d());)t=16*t+N(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,l>6)return;for(r=0;d();){if(o=null,r>0){if(!("."===d()&&r<4))return;f++}if(!D(J,d()))return;for(;D(J,d());){if(i=N(d(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;f++}u[l]=256*u[l]+o,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(U(e,1,-1)),!t)return V;this.host=t}else if(this.isSpecial()){if(e=g(e),D(ee,e))return V;if(t=function(e){var t,n,r,o,i,a,s,u=_(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(o=u[r]))return e;if(i=10,o.length>1&&"0"===M(o,0)&&(i=D(Y,o)?16:8,o=U(o,8===i?1:2)),""===o)a=0;else{if(!D(10===i?Q:8===i?X:Z,o))return e;a=N(o,i)}$(n,a)}for(r=0;r<t;r++)if(a=n[r],r===t-1){if(a>=P(256,5-t))return null}else if(a>255)return null;for(s=I(n),r=0;r<n.length;r++)s+=n[r]*P(256,3-r);return s}(e),null===t)return V;this.host=t}else{if(D(te,e))return V;for(t="",n=d(e),r=0;r<n.length;r++)t+=ce(n[r],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return c(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&de(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ie(o),null!==i&&(l+=":"+i)):"file"===t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+A(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw new T(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Fe(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(v(e)+":",ge)},getUsername:function(){return this.username},setUsername:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ce(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ce(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Te)},getPort:function(){var e=this.port;return null===e?"":v(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=v(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+A(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Me))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=v(e))?this.query=null:("?"===M(e,0)&&(e=U(e,1)),this.query="",this.parse(e,je)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=v(e))?("#"===M(e,0)&&(e=U(e,1)),this.fragment="",this.parse(e,Ie)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fe=function(e){var t=l(this,Be),r=y(arguments.length,1)>1?arguments[1]:void 0,o=E(t,new $e(e,!1,r));n||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Be=Fe.prototype,_e=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(n&&(u(Be,"href",_e("serialize","setHref")),u(Be,"origin",_e("getOrigin")),u(Be,"protocol",_e("getProtocol","setProtocol")),u(Be,"username",_e("getUsername","setUsername")),u(Be,"password",_e("getPassword","setPassword")),u(Be,"host",_e("getHost","setHost")),u(Be,"hostname",_e("getHostname","setHostname")),u(Be,"port",_e("getPort","setPort")),u(Be,"pathname",_e("getPathname","setPathname")),u(Be,"search",_e("getSearch","setSearch")),u(Be,"searchParams",_e("getSearchParams")),u(Be,"hash",_e("getHash","setHash"))),s(Be,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),s(Be,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),C){var Ue=C.createObjectURL,He=C.revokeObjectURL;Ue&&s(Fe,"createObjectURL",i(Ue,C)),He&&s(Fe,"revokeObjectURL",i(He,C))}return m(Fe,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!n},{URL:Fe}),Fd}Gd||(Gd=1,Qd());var Zd,eh={};!function(){if(Zd)return eh;Zd=1;var e=pr(),t=M();e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}();var th;th||(th=1,Xd());var nh,rh={};function oh(e){return fo(this,void 0,void 0,(function(){var t,n,r;return ho(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(e)];case 1:if(!(t=o.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,t.blob()];case 2:return n=o.sent(),[2,new Promise((function(e,t){var r=new FileReader;r.onloadend=function(){e(r.result)},r.onerror=function(){t(new Error("Failed to read blob as data URL"))},r.readAsDataURL(n)}))];case 3:return r=o.sent(),console.error(r),[2,null];case 4:return[2]}}))}))}!function(){if(nh)return rh;nh=1;var e=M(),t=ku(),n=jt(),r=Ce(),o=Rn(),i=wi(),a=Te(),s=_e(),u=Nu(),l=Ru();t("match",(function(t,c,f){return[function(n){var o=a(this),u=r(n)?void 0:s(n,t);return u?e(u,n,o):new RegExp(n)[t](i(o))},function(e){var t=n(this),r=i(e),a=f(c,t,r);if(a.done)return a.value;if(!t.global)return l(t,r);var s=t.unicode;t.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(t,r));){var g=i(d[0]);h[p]=g,""===g&&(t.lastIndex=u(r,o(t.lastIndex),s)),p++}return 0===p?null:h}]}))}();var ih,ah=function(e){var n=e;return n.setFragmentData=function(e){var r=n.selection;if(r){var o=go(t.Range.edges(r),2),i=o[0],a=o[1],s=t.Editor.void(n,{at:i.path}),u=t.Editor.void(n,{at:a.path});if(!t.Range.isCollapsed(r)||s){var l=xf.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(f=e)})),u){var d=go(u,1)[0],h=l.cloneRange(),p=xf.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(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Oc(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),e.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),e.setData("text/html",b.innerHTML),e.setData("text/plain",Pc(b)),c.ownerDocument.body.removeChild(b),e}}},n.insertData=function(e){return fo(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,l,c,f,d,h,p,g,v,m;return ho(this,(function(y){switch(y.label){case 0:return(r=e.getData("application/x-slate-fragment"))?(o=decodeURIComponent(window.atob(r)),i=JSON.parse(o),n.insertFragment(i),[2]):(a=e.getData("text/plain"),s=e.getData("text/html"),vf?(u=function(e){var t=e.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return t?t[1]:null}(s),u?[4,oh(u)]:[3,2]):[3,2]);case 1:(l=y.sent())&&(s='<img src="'.concat(l,'" alt="image.png">'),URL.revokeObjectURL(u)),y.label=2;case 2:if(s)return n.dangerouslyInsertHtml(s),[2];if(c=xf.getLeftLengthOfMaxLength(n),a){f=a.split(/\n\r|\r\n|\r|\n/),d=!1;try{for(h=po(f),p=h.next();!p.done;p=h.next())g=p.value,d&&c>0&&t.Transforms.splitNodes(n,{always:!0}),n.insertText(g),d=!0}catch(e){v={error:e}}finally{try{p&&!p.done&&(m=h.return)&&m.call(h)}finally{if(v)throw v.error}}}return[2]}}))}))},n},sh={};!function(){if(ih)return sh;ih=1;var e=pr(),t=gr(),n=wr(),r=Le(),o=Nn(),i=Ln(),a=Ne(),s=mr(),u=wt(),l=Sr(),c=ua(),f=l("slice"),d=u("species"),h=Array,p=Math.max;e({target:"Array",proto:!0,forced:!f},{slice:function(e,u){var l,f,g,v=a(this),m=i(v),y=o(e,m),b=o(void 0===u?m:u,m);if(t(v)&&(l=v.constructor,(n(l)&&(l===h||t(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 uh=function(e){var n=e,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(e){if(n.getConfig().maxLength){var t=xf.getLeftLengthOfMaxLength(n);t<=0||(t<e.length?r(e.slice(0,t)):r(e))}else r(e)},n.insertNode=function(e){if(n.getConfig().maxLength){var r=xf.getLeftLengthOfMaxLength(n);if(!(r<=0))r<t.Node.string(e).length||o(e)}else o(e)},n.insertFragment=function(e){if(n.getConfig().maxLength){if(e.length>0){var r=e[0];if(xf.getLeftLengthOfMaxLength(n)<t.Node.string(r).length)return;i([r]);for(var o=1;o<e.length;o+=1)n.insertNode(e[o])}}else i(e)},n.dangerouslyInsertHtml=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=!1),e)if(n.getConfig().maxLength){var r=xf.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?Oc(t)?e+(t.textContent||""):Ec(t)?iu.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||a(e,t)}}else a(e,t)},n};function lh(e){var t=xf.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function ch(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=lh(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=xf.toDOMRange(e,n),l=u.getClientRects?u.getClientRects()[0]:null;if(null==l)return t;var c=l.height,f={},d=l.top-o,h=l.left-i;if(h>a/2){var p=a-h;f.right="".concat(p+5,"px")}else f.left="".concat(h+5,"px");if(d>s/2){var g=s-d;f.bottom="".concat(g+5,"px")}else{var v=d+c;v<0&&(v=0),f.top="".concat(v+5,"px")}return f}function fh(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=za.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=Mc(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=lh(e);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){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{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function dh(e,t){rc((function(){var n=lh(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,f=t.width(),d=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=t.css("left"),x=parseInt(w.toString(),10)-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(),10)-Math.abs(c);t.css("right","".concat(S,"px"))}}}))}var hh=function(e){var n=e;return n.select=function(e){t.Transforms.select(n,e)},n.deselect=function(){var r=n.selection,o=xf.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=Ka.get(n);null!=e&&(n.focus(),t.Transforms.select(n,e))},n.getSelectionPosition=function(){return ch(n)},n.getNodePosition=function(e){return fh(n,e)},n.isSelectedAll=function(){var e=n.selection;if(null==e)return!1;var r=go(t.Range.edges(e),2),o=r[0],i=r[1],a=go(t.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!t.Point.equals(o,s)||!t.Point.equals(i,u))},n.selectAll=function(){var e=t.Editor.start(n,[]),r=t.Editor.end(n,[]);t.Transforms.select(n,{anchor:e,focus:r})},n};const ph={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class gh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ph,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){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)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new gh(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new gh(this.logger,e)}}var vh=new gh;class mh{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const yh=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},bh=e=>null==e?"":""+e,wh=/###/g,xh=e=>e&&e.indexOf("###")>-1?e.replace(wh,"."):e,Eh=e=>!e||"string"==typeof e,Sh=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(Eh(e))return{};const t=xh(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Eh(e)?{}:{obj:e,k:xh(r[o])}},Oh=(e,t,n)=>{const{obj:r,k:o}=Sh(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Sh(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Sh(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},kh=(e,t)=>{const{obj:n,k:r}=Sh(e,t);if(n)return n[r]},Ch=(e,t,n)=>{for(const 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]):Ch(e[r],t[r],n):e[r]=t[r]);return e},Th=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Nh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Rh=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Nh[e])):e;const Lh=[" ",",","?","!",";"],Ph=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Mh=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},Dh=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Ah extends mh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,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;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=kh(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Mh(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,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=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Oh(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,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(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=kh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ch(s,n,o):s={...s,...n},Oh(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var jh={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const Ih={};class $h extends mh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=vh.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Lh.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Ph.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);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!==t.joinArrays?t.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(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(f),n=e?[]:{},r=e?h:d;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(v&&"string"==typeof g&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,d=$h.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(t.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 e=this.resolve(i,{...t,keySeparator:!1});e&&e.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 e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}f=this.extendTranslation(f,e,t,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(t),c):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...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 e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!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: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=jh.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,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((e=>{this.isValidLookup(t)||(i=e,!Ih[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Ih[`${h[0]}-${e}`]=!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(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),f&&i.push(u+t)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),f&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let 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)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Fh=e=>e.charAt(0).toUpperCase()+e.slice(1);class Bh{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vh.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Dh(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Dh(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Fh(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]=Fh(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Fh(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let 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||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let _h=[{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}],Uh={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const Hh=["v1","v2","v3"],zh=["v4"],Wh={zero:0,one:1,two:2,few:3,many:4,other:5};class Vh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=vh.create("pluralResolver"),this.options.compatibilityJSON&&!zh.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 e={};return _h.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Uh[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Dh("dev"===e?"en":e),r=t.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(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>Wh[e]-Wh[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.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===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Hh.includes(this.options.compatibilityJSON)}}const qh=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=kh(e,n);return void 0!==r?r:kh(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Mh(e,n,r),void 0===i&&(i=Mh(t,n,r))),i},Kh=e=>e.replace(/\$/g,"$$$$");class Gh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vh.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,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}=e.interpolation;this.escape=void 0!==t?t:Rh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Th(o):i||"{{",this.suffix=a?Th(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Th(f):d||Th("$t("),this.nestingSuffix=h?Th(h):p||Th(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=qh(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(qh(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,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:e=>Kh(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Kh(this.escape(e)):Kh(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}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 ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=bh(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=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),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){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 e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=bh(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Jh=e=>{const t={};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=t[a];return s||(s=e(Dh(r),o),t[a]=s),s(n)}};class Yh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vh.create("formatter"),this.options=e,this.formats={number:Jh(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Jh(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Jh(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Jh(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Jh(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jh(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.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:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e);return i}}class Xh extends mh{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=vh.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(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?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[t]&&(s[t]=!0)))})),r||(a[e]=!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(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=Sh(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,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(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){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 e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,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(t))this.logger.warn(`did not save key "${n}" as the namespace "${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!!!");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(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Qh=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Zh=e=>("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.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ep=()=>{};class tp extends mh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Zh(e),this.services={},this.logger=vh,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Qh();this.options={...r,...this.options,...Zh(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?vh.init(o(this.modules.logger),this.options):vh.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Yh);const n=new Bh(this.options);this.store=new Ah(this.options.resources,this.options);const i=this.services;i.logger=vh,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Vh(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Gh(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Xh(o(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(t,...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 $h(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(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=ep),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=yh(),a=()=>{const e=(e,t)=>{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(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ep;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=yh();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ep),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(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&&jh.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=yh();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,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)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);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,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&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(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){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([e,t].concat(s))}else i={...t};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(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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=t.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=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=yh();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=yh();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Bh(Qh());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(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new tp(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ep;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new tp(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Ah(this.store.data,r),o.services.resourceStore=o.store),o.translator=new $h(o.services,r),o.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];o.emit(e,...n)})),o.init(r,t),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 np=tp.createInstance();np.createInstance=tp.createInstance,np.createInstance,np.dir,np.init,np.loadResources,np.reloadResources,np.use,np.changeLanguage,np.getFixedT,np.t,np.exists,np.setDefaultNamespace,np.hasLoadedNamespace,np.loadNamespaces,np.loadLanguages;var rp="translation";function op(e){return np.on("languageChanged",e),function(){return np.off("languageChanged",e)}}np.init({lng:"zh-CN",resources:{}});var ip=np.t.bind(np);function ap(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&&ap(t)}}function sp(){return o('<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 up(){return o('<div class="w-e-bar-divider"></div>')}function lp(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=pf?"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 cp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,a=t.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=t.title,u=t.hotkey,l=void 0===u?"":u,c=t.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);ap(h),d.append(h)}else d.text(s);lp(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),this.$elem.append(d),rc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),xp(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=xp(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=xp(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=xp(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=xp(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=o(n);ap(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=xp(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&lp(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),fp=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return lo(t,e),t.prototype.onButtonClick=function(){},t}(cp),dp=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Ma.get(e);null==t&&(t=new Set,Ma.set(e,t)),t.add(this),Da.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=Da.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=Da.get(this);e&&e.emit("modalOrPanelHide")}},e}(),hp=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return lo(t,e),t.prototype.genSelfElem=function(){return null},t}(dp),pp=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=sp();o.$button.append(i)}return o}return lo(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=xp(this);if(null==this.dropPanel){var n=new hp(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,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"})}}},t}(cp),gp=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",(function(e){return e.stopPropagation()})),i.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return lo(t,e),t.prototype.genSelfElem=function(){var e=this,t=o('<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=Da.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}(dp);var vp=function(e){function n(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return lo(n,e),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var e=xp(this),n=this.menu.getModalPositionNode(e);return t.Element.isElement(n)?fh(e,n,"modal"):ch(e)},n.prototype.handleModal=function(){var e=xp(this),t=this.menu;if(null==this.modal){var n=new gp(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=xp(this),r=this.menu;if(null!=r.getModalContentElem){var o=xf.getTextarea(n),i=xf.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 u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||dh(n,e.$elem),setTimeout((function(){n.blur()}))}},n}(cp);var mp=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=o('<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 lo(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=o("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,i=e.selected,a=e.styleForRenderMenuList,s=o('<li data-value="'.concat(t,'"></li>'));if(a&&s.css(a),i){var u=o('<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(o('<span data-value="'.concat(t,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(dp);var yp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=t.tag,a=t.title,s=t.width,u=t.iconSvg,l=void 0===u?"":u,c=t.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",e),lp(d,l,a,f,n),this.$elem.append(d),this.menu=t,rc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),xp(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=xp(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new mp(t,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(t);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=o(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(t);r.renderList(i),r.show()}}}},e.prototype.onChange=function(e){var t=xp(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=xp(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=sp();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=xp(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}(),bp=function(){function e(e){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,i=this.$elem,a=this.$button;if(n){var s=o(n);ap(s),a.append(s)}else a.text(r);a.attr("data-menu-key",t);var u=sp();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}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 i=t.find("button"),a=i.length;if(0!==a){var s=0;i.each((function(e){o(e).hasClass("disabled")&&s++})),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),wp=new WeakMap;function xp(e){var t=Pa.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function Ep(e,t,n){void 0===n&&(n=!1);var r=wp.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new pp(e,t,n):a?new vp(e,t,n):new fp(e,t,n)}if("select"===o&&(r=new yp(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return wp.set(t,r),r}function Sp(e,n){var r=e.selection;return null!=r&&(!t.Range.isCollapsed(r)&&(!xf.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!t.Text.isText(n)))}var Op,kp=function(){function e(){var e=this;this.$elem=o('<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=s((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),rc((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),xf.getTextarea(t).$textAreaContainer.append(n),t.on(yo.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(yo.SCROLL,r),t.on(yo.FULLSCREEN,r),t.on(yo.UNFULLSCREEN,r)})),this.lngListen=op((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="undefined"!=typeof window?window.innerHeight:null;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;rc((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=up();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=bo[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=Ep(e,r);this.hoverbarItems.push(a),Pa.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=fh(n,e,"bar");return r.css(o),void dh(n,r)}if(t.Text.isText(e)){o=ch(n);return r.css(o),void dh(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,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(e,t){return xf.checkNodeType(t,i)},f=go(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=l,"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=Ra.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=Sp),t},e.prototype.isSamePath=function(e,n){if(null==e||null==n)return!1;var r=xf.findPath(null,e),o=xf.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}(),Cp={};function Tp(e,t){return wc(t)&&xf.hasDOMNode(e,t,{editable:!0})}function Np(e,n){if(e.getConfig().readOnly)return!1;var r=Rp(e,n)&&xf.toSlateNode(e,n);return t.Editor.isVoid(e,r)}function Rp(e,t){return wc(t)&&xf.hasDOMNode(e,t)}!function(){if(Op)return Cp;Op=1;var e,t=pr(),n=Xr(),r=kt().f,o=Rn(),i=wi(),a=xs(),s=Te(),u=Es(),l=ht(),c=n("".slice),f=Math.min,d=u("startsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"startsWith"),!e||e.writable))&&!d},{startsWith:function(e){var t=i(s(this));a(e);var n=o(f(arguments.length>1?arguments[1]:void 0,t.length)),r=i(e);return c(t,n,n+r.length)===r}})}();const Lp=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Pp=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Mp=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Pp(n.overflowY,t)||Pp(n.overflowX,t)||(e=>{const t=(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},Dp=(e,t,n,r,o,i,a,s)=>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,Ap=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},jp=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,f="function"==typeof l?l:e=>e!==l;if(!Lp(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;Lp(p)&&f(p);){if(p=Ap(p),p===d){h.push(p);break}null!=p&&p===document.body&&Mp(p)&&!Mp(document.documentElement)||null!=p&&Mp(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}=e.getBoundingClientRect(),{top:k,right:C,bottom:T,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);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 P=[];for(let e=0;e<h.length;e++){const t=h[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&x>=o&&S<=l&&O>=c&&E<=i)return P;const f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),k=parseInt(f.borderTopWidth,10),C=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,M=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-C:0,A="offsetHeight"in t?t.offsetHeight-t.clientHeight-k-T:0,j="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,I="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)N="start"===s?R:"end"===s?R-v:"nearest"===s?Dp(y,y+v,v,k,T,y+R,y+R+b,b):R-v/2,M="start"===u?L:"center"===u?L-g/2:"end"===u?L-g:Dp(m,m+g,g,p,C,m+L,m+L+w,w),N=Math.max(0,N+y),M=Math.max(0,M+m);else{N="start"===s?R-o-k:"end"===s?R-l+T+A:"nearest"===s?Dp(o,l,n,k,T+A,R,R+b,b):R-(o+n/2)+A/2,M="start"===u?L-c-p:"center"===u?L-(c+r/2)+D/2:"end"===u?L-i+C+D:Dp(c,i,r,p,C+D,L,L+w,w);const{scrollLeft:e,scrollTop:a}=t;N=0===I?0:Math.max(0,Math.min(a+N/I,t.scrollHeight-n/I+A)),M=0===j?0:Math.max(0,Math.min(e+M/j,t.scrollWidth-r/j+D)),R+=a-N,L+=e-M}P.push({el:t,top:N,left:M})}return P},Ip=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function $p(e,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=xf.findDocumentOrShadowRoot(n).getSelection();if(a&&(!e.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=_a.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=xf.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,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||xf.hasRange(n,o)){e.isUpdatingSelection=!0;var v=o&&xf.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 m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(jp(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of jp(e,Ip(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,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&&gf&&u.focus(),e.isUpdatingSelection=!1}))}else n.selection=xf.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Fp=new WeakMap,Bp=new WeakMap;var _p={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"},Up={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"},Hp={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},zp=function(e){var t=_p[e],n=Up[e],r=Hp[e],o=t&&l.isKeyHotkey(t),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(pf&&i&&i(e))||!(pf||!a||!a(e)))}},Wp={isBold:zp("bold"),isCompose:zp("compose"),isMoveBackward:zp("moveBackward"),isMoveForward:zp("moveForward"),isDeleteBackward:zp("deleteBackward"),isDeleteForward:zp("deleteForward"),isDeleteLineBackward:zp("deleteLineBackward"),isDeleteLineForward:zp("deleteLineForward"),isDeleteWordBackward:zp("deleteWordBackward"),isDeleteWordForward:zp("deleteWordForward"),isExtendBackward:zp("extendBackward"),isExtendForward:zp("extendForward"),isExtendLineBackward:zp("extendLineBackward"),isExtendLineForward:zp("extendLineForward"),isItalic:zp("italic"),isMoveLineBackward:zp("moveLineBackward"),isMoveLineForward:zp("moveLineForward"),isMoveWordBackward:zp("moveWordBackward"),isMoveWordForward:zp("moveWordForward"),isRedo:zp("redo"),isSplitBlock:zp("splitBlock"),isTransposeCharacter:zp("transposeCharacter"),isUndo:zp("undo"),isTab:zp("tab"),isSelectAll:zp("selectAll")};function Vp(e){e.preventDefault()}var qp,Kp={beforeinput:function(e,n,r){var o=e,i=r.getConfig().readOnly;if(wf&&!i&&Tp(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=go(o.getTargetRanges(),1)[0];if(l){var c=xf.toSlateRange(r,l,{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=xf.getSelectedElems(r);if(!(f.length>0&&"table"===f[0].type)){var d=s.endsWith("Backward")?"backward":"forward";return void t.Editor.deleteFragment(r,{direction:d})}}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&&!Ja.get(r))break;gc(u)?r.insertData(u):"string"==typeof u&&t.Editor.insertText(r,u)}}}},blur:function(e,n,r){var o=e,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&Tp(r,o.target)){var s=xf.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===xf.toDOMNode(r,r)||Ec(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&wc(u)&&xf.hasDOMNode(r,u)){var l=xf.toSlateNode(r,u);if(t.Element.isElement(l)&&!r.isVoid(l))return}if(vf){var c=s.getSelection();null==c||c.removeAllRanges()}qa.delete(r)}}}},focus:function(e,t,n){var r=xf.toDOMNode(n,n),o=xf.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,gf&&e.target!==r?r.focus():qa.set(n,!0)},click:function(e,n,r){if(!r.getConfig().readOnly&&Rp(r,e.target)&&wc(e.target)){var o=xf.toSlateNode(r,e.target),i=xf.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),u=t.Editor.void(r,{at:a}),l=t.Editor.void(r,{at:s});if(u&&l&&t.Path.equals(u[1],l[1])){var c=t.Editor.range(r,a);t.Transforms.select(r,c)}}}},compositionstart:function(e,n,r){if(Tp(r,e.target)){var o=r.selection;if(o&&t.Range.isExpanded(o)&&(t.Editor.deleteFragment(r),Promise.resolve().then((function(){$p(n,r,!0)}))),r.selection){var i=xf.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Fp.set(r,a),Bp.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(Tp(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(bf||gf)&&xf.cleanExposedTexNodeInSelectionBlock(r);for(var a=t.Range.isBackward(i)?i.focus:i.anchor,s=go(t.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=go(t.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(t.Element.isElement(l)&&((vf||gf)&&"link"===l.type||"code"===l.type)){xf.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=xf.getLeftLengthOfMaxLength(r);if(f<c.length){var d=xf.toDOMRange(r,i);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=Fp.get(r)||""),f>0&&t.Editor.insertText(r,c.slice(0,f)),n.changeViewState()}else t.Editor.insertText(r,c)}else{var h=xf.findDocumentOrShadowRoot(r).getSelection();h&&function(e,n){if(t.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(o.path.length)&&(0===r.offset||0===o.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 u=t.Editor.node(e,s);if(t.Text.isText(u[0])&&t.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=xf.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),t.Editor.insertText(r,c)}vf||setTimeout((function(){var e=r.selection;if(null!=e){var t=Bp.get(r);if(null!=t)xf.toDOMRange(r,e).startContainer!==t&&(t.textContent=Fp.get(r)||"")}}))}}}},compositionupdate:function(e,t,n){Tp(n,e.target)&&(t.isComposing=!0)},keydown:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&Tp(r,o.target)){if(function(e,t){var n=Na.get(e),r=n&&n.getMenus(),o=La.get(e),i=o&&o.getMenus(),a=co(co({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,t)&&!u.isDisabled(e)){var f=u.getValue(e);u.exec(e,f)}}}(r,o),Wp.isTab(o))return Vp(o),void r.handleTab();if(Wp.isRedo(o))return Vp(o),void("function"==typeof r.redo&&r.redo());if(Wp.isUndo(o))return Vp(o),void("function"==typeof r.undo&&r.undo());if(Wp.isMoveLineBackward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",reverse:!0});if(Wp.isMoveLineForward(o))return Vp(o),void t.Transforms.move(r,{unit:"line"});if(Wp.isExtendLineBackward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(Wp.isExtendLineForward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",edge:"focus"});if(Wp.isMoveBackward(o))return Vp(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r,{reverse:!0}):t.Transforms.collapse(r,{edge:"start"}));if(Wp.isMoveForward(o))return Vp(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r):t.Transforms.collapse(r,{edge:"end"}));if(Wp.isMoveWordBackward(o))return Vp(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word",reverse:!0});if(Wp.isMoveWordForward(o))return Vp(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word"});if(Wp.isSelectAll(o))return Vp(o),void r.selectAll();if(wf){if((bf||vf)&&i&&(Wp.isDeleteBackward(o)||Wp.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(Wp.isBold(o)||Wp.isItalic(o)||Wp.isTransposeCharacter(o))return void Vp(o);if(Wp.isSplitBlock(o))return Vp(o),void t.Editor.insertBreak(r);if(Wp.isDeleteBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r));if(Wp.isDeleteForward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r));if(Wp.isDeleteLineBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"line"}));if(Wp.isDeleteLineForward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"line"}));if(Wp.isDeleteWordBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"word"}));if(Wp.isDeleteWordForward(o))return Vp(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(!wf&&!r.getConfig().readOnly&&Tp(r,e.target)){e.preventDefault();var o=e.key;t.Editor.insertText(r,o)}},copy:function(e,t,n){var r=e;if(Tp(n,r.target)){n.getConfig().readOnly||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&&(o.preventDefault(),Tp(r,o.target))){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){Ja.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Tp(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Ja.set(n,!1);if(!wf||kc(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,n,r){if(Rp(r,e.target)){var o=xf.toSlateNode(r,e.target);t.Editor.isVoid(r,o)&&e.preventDefault()}},dragstart:function(e,n,r){var o=e;if(Rp(r,o.target)&&!r.getConfig().readOnly){var i=xf.toSlateNode(r,o.target),a=xf.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 u=o.dataTransfer;null!=u&&(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&Rp(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&Rp(r,o.target)&&null!=i&&!(wf&&vf&&i.files.length>0)){o.preventDefault();var a=r.selection,s=xf.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()}}},Gp={};!function(){if(qp)return Gp;qp=1;var e=pr(),t=_d();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}();var Jp=["props","attrs","style","dataset","on","hook"];function Yp(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(!Jp.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=f(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&&Yp(e)}))}var Xp=[];var Qp={};function Zp(e,t,n){var r=n.isInline(e)?"span":"div";return c.jsx(r,null,t)}function eg(e,n){var r,o=xf.findKey(n,e),i=n.isInline(e),a=t.Editor.isVoid(n,e),s=Zc(e.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=e.type,f=e.children,d=void 0===f?[]:f,h=function(e){return Qp[e]||Zp}(l);r=a?null:d.map((function(t,r){return og(t,r,e,n)}));var p=h(e,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=go(t.Node.texts(e),1),m=go(v[0],1)[0],y=og(m,0,e,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Fa.set(m,0),Ba.set(m,e)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(e,t){var n=t;return Xp.forEach((function(r){n=r(e,t)})),n}(e,p)),rc((function(){var t=Nc(s);null!=t&&(Ha.set(o,t),za.set(e,t),Ua.set(t,e))})),p}function tg(e,t){return void 0===t&&(t=!1),c.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function ng(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),c.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?c.jsx("br",null):null)}function rg(e,n,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var o=xf.findKey(r,e),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=xf.findPath(r,e),u=i([e,s]),l=t.Text.decorations(e,u),f=l.map((function(o,i){var a=function(e,n,r,o,i){void 0===n&&(n=!1);var a=e.text,s=xf.findPath(i,r),u=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)?ng(t.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==t.Editor.string(i,u)?""===a?ng():n&&"\n"===a.slice(-1)?tg(a,!0):tg(a):ng(0,!0)}(o,i===l.length-1,e,n,r);return a=function(e,t){var n=t;return Xp.forEach((function(t){n=t(e,n)})),n}(o,a),c.jsx("span",{"data-slate-leaf":!0},a)})),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return rc((function(){var t=Nc(d);null!=t&&(Ha.set(o,t),za.set(e,t),Ua.set(t,e))})),h}function og(e,n,r,o){return Fa.set(e,n),Ba.set(e,r),t.Element.isElement(e)?eg(e,o):rg(e,r,o)}function ig(e,t){var n,r,i=e.$scroll,a=(n=e.id,"w-e-textarea-".concat(n)),s=t.getConfig(),u=s.readOnly,l=s.autoFocus,f=function(e,t){return void 0===t&&(t=!1),c.h("div#".concat(e),{props:{contentEditable:!t}})}(a,u),d=t.children||[];f.children=d.map((function(e,n){var r=og(e,n,t,t);return Yp(r),r}));var h=ja.get(e);if(null==h&&(h=!0),h){var p=function(e){return o('<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>'))}(a);i.append(p),e.$textArea=p,r=p[0],(v=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(r,f),ja.set(e,!1),Ia.set(e,v)}else{var g=$a.get(e),v=Ia.get(e);if(null==g||null==v)return;r=g.elm,v(g,f)}if(null!=r||null!=(r=Nc(a))){if((h?l:t.isFocused())&&r.focus({preventScroll:!0}),h){var m=bc(r);m&&Va.set(t,m)}_a.set(t,r),za.set(t,r),Ua.set(r,t),$a.set(e,f)}}var ag=1,sg=function(){function e(e){var n=this;this.id=ag++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<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=u((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=xf.findDocumentOrShadowRoot(n),s=a.activeElement,u=xf.toDOMNode(n,n),l=a.getSelection();if(s!==u)return qa.delete(n),void t.Transforms.deselect(n);if(e.latestElement=s,qa.set(n,!0),!l)return t.Transforms.deselect(n);var c=l.anchorNode,f=l.focusNode,d=Tp(n,c)||Np(n,c),h=Tp(n,f)||Np(n,f);if(d&&h){var p=xf.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});t.Transforms.select(n,p)}}}(n,e)}),100);var r=o(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,rc((function(){var e=n.editorInstance,t=xf.getWindow(e);t.document.addEventListener("selectionchange",n.onDOMSelectionChange),e.on(yo.DESTROYED,(function(){t.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),i.on("click",(function(){return e.hidePanelOrModal()})),e.on(yo.CHANGE,n.changeViewState.bind(n));var o=e.getConfig(),a=o.onChange,s=o.scroll;a&&e.on(yo.CHANGE,(function(){return a(e)})),s||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),e.on(yo.CHANGE,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ca.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,o=this.editorInstance;null!=t&&(r(Kp,(function(n,r){t.on(r,(function(t){n(t,e,o)}))})),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u((function(){o.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(yo.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-xf.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;ig(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var i=t.isEmpty();if(i&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(a),e.$placeholder=a}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!i&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),rc((function(){$p(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function ug(e,n,r,o){if(Fa.set(e,n),Ba.set(e,r),t.Element.isElement(e)){var i=e.children;if((void 0===i?[]:i).forEach((function(t,n){return ug(t,n,e,o)})),t.Editor.isVoid(o,e)){var a=go(t.Node.texts(e),1),s=go(a[0],1)[0];Fa.set(s,0),Ba.set(s,e)}}}var lg={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};var cg,fg,dg,hg,pg,gg={};function vg(){if(hg)return dg;hg=1;var e=Fe(),t=TypeError;return dg=function(n,r){if(!delete n[r])throw new t("Cannot delete property "+e(r)+" of "+e(n))}}!function(){if(pg)return gg;pg=1;var e=pr(),t=mt(),n=Nn(),r=Tn(),o=Ln(),i=function(){if(fg)return cg;fg=1;var e=L(),t=gr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return cg=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t}}(),a=vr(),s=Er(),u=mr(),l=vg(),c=Sr()("splice"),f=Math.max,d=Math.min;e({target:"Array",proto:!0,forced:!c},{splice:function(e,c){var h,p,g,v,m,y,b=t(this),w=o(b),x=n(e,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 mg=function(){function e(e,t){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=o(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(i),rc((function(){n.initToolbar(),n.lngListen=op((function(){return n.initToolbar()})),n.getEditorInstance().on(yo.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="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a);u.keys.length>0&&("string"==typeof u.keys&&(u.keys=[u.keys]),u.keys.forEach((function(e,t){f.splice(u.index+t,0,e)})));var d=f.filter((function(e){var t="string"==typeof e?e:e.key;return!c.includes(t)})),h=d.length;d.forEach((function(n,o){if("|"===n){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=up();return r.append(i),void(t=n)}if("string"==typeof n)return e.registerSingleItem(n,e),void(t=n);e.registerGroup(n),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new bp(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 bp,o=this.menus,i=o[e];if(null==i){var a=bo[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 u=Ep(e,i,r);(this.toolbarItems.push(u),Pa.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Ta.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 yg,bg={};!function(){if(yg)return bg;yg=1;var e=L(),t=en().EXISTS,n=Se(),r=qs(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);e&&!t&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(e){return""}}})}(),e.DOMComment=sc,e.DOMElement=uc,e.DOMNode=ac,e.DOMRange=cc,e.DOMSelection=fc,e.DOMStaticRange=dc,e.DOMText=lc,e.DomEditor=xf,e.ELEM_TO_HTML_CONF=tf,e.PARSE_ELEM_HTML_CONF=Vc,e.PARSE_STYLE_HTML_FN_LIST=Wc,e.PRE_PARSE_HTML_CONF_LIST=zc,e.RENDER_ELEM_CONF=Qp,e.RENDER_STYLE_HANDLER_LIST=Xp,e.STYLE_TO_HTML_FN_LIST=ef,e.TEXT_TAGS=Hc,e.Toolbar=mg,e.coreCreateEditor=function(e){var o=e.selector,i=void 0===o?"":o,a=e.config,s=void 0===a?{}:a,u=e.content,l=e.html,c=e.plugins,f=void 0===c?[]:c,d=function(e){return[ah,pd,Ya,dd,hh,$d,uh,so.withHistory].reduce((function(e,t){return t(e)}),e)}(t.createEditor());if(i&&function(e,t){return Xc(e,"data-w-e-textarea",t)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(e){void 0===e&&(e={});var t=n(mo),o={},i=e.MENU_CONF,a=void 0===i?{}:i;return r(t,(function(e,t){o[t]=co(co({},e),a[t]||{})})),delete e.MENU_CONF,co({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(s);Aa.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach((function(e){d=e(d)})),d.children=function(e,t){var n;return null!=t.html?Qc(e,t.html):(null===(n=t.content)||void 0===n?void 0:n.length)?t.content:[{type:"paragraph",children:[{text:""}]}]}(d,{html:l,content:u}),i){var v=new sg(i);ka.set(d,v),Ca.set(v,d),v.changeViewState(),rc((function(){var e=v.$scroll;null!=e&&e.height()<300&&console.warn("".concat(lg.zh,"\n").concat(lg.en),{element:e,height:e.height()})}));var m=void 0;Object.keys(g).length>0&&(m=new kp,Ra.set(m,d),La.set(d,m)),d.on(yo.CHANGE,(function(){d.hidePanelOrModal()})),d.on(yo.SCROLL,(function(){d.hidePanelOrModal()}))}else d.children.forEach((function(e,t){return ug(e,t,d,d)}));var y=h.onCreated,b=h.onDestroyed;return y&&d.on(yo.CREATED,(function(){return y(d)})),b&&d.on(yo.DESTROYED,(function(){return b(d)})),rc((function(){return d.emit("created")})),d},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 Xc(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=co({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new mg(n,i);return Ta.set(a,e),Na.set(e,a),a},e.createUploader=function(e){var t=e.server,n=void 0===t?"":t,o=e.fieldName,i=void 0===o?"":o,a=e.maxFileSize,s=void 0===a?10485760:a,u=e.maxNumberOfFiles,l=void 0===u?100:u,c=e.meta,f=void 0===c?{}:c,p=e.metaWithUrl,g=void 0!==p&&p,v=e.headers,m=void 0===v?{}:v,y=e.withCredentials,b=void 0!==y&&y,w=e.timeout,x=void 0===w?1e4:w,E=e.onBeforeUpload,S=void 0===E?function(e){return e}:E,O=e.onSuccess,k=void 0===O?function(e,t){}:O,C=e.onError,T=void 0===C?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:C,N=e.onProgress,R=void 0===N?function(e){}: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(e,t){var n=go(e.split("#"),2),o=n[0],i=n[1],a=[];r(t,(function(e,t){a.push("".concat(t,"=").concat(e))}));var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(L,f));var P=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 P.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)}P.removeFile(e.id)})),P.on("progress",(function(e){e<1||R(e)})),P.on("upload-error",(function(e,t,n){try{T(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}P.removeFile(e.id)})),P.on("restriction-failed",(function(e,t){try{T(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}P.removeFile(e.id)})),P},e.genModalButtonElems=function(e,t){var n=o('<div class="button-container"></div>'),r=o('<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=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},e.genModalTextareaElems=function(e,t,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},e.getDefaultView=bc,e.getEditableChild=Lc,e.getEditableChildAndIndex=Rc,e.getElementById=Nc,e.getFirstVoidChild=Mc,e.getPlainText=Pc,e.getTagName=Ac,e.hasShadowRoot=Tc,e.i18nAddResources=function(e,t){np.addResourceBundle(e,rp,t,!0,!0)},e.i18nChangeLanguage=function(e){np.changeLanguage(e)},e.i18nGetResources=function(e){return np.getResourceBundle(e,rp)},e.i18nListenLanguage=op,e.isDOMComment=xc,e.isDOMElement=Ec,e.isDOMNode=wc,e.isDOMSelection=Sc,e.isDOMText=Oc,e.isDataTransfer=gc,e.isDocument=hc,e.isHTMLElememt=yc,e.isPlainTextOnlyPaste=kc,e.isShadowRoot=pc,e.isUnprocessedListElement=mc,e.normalizeDOMPoint=Cc,e.registerElemToHtmlConf=function(e){var t=e.type,n=e.elemToHtml;tf[t||""]=n},e.registerMenu=function(e,t){var n=e.key,r=e.factory,o=e.config,i=co(co({},o),t||{});if(null!=bo[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));bo[n]=r,function(e,t){null!=t&&(mo[e]=t)}(n,i)},e.registerParseElemHtmlConf=function(e){var t=e.selector,n=e.parseElemHtml;Vc[t]=n},e.registerParseStyleHtmlHandler=function(e){Wc.push(e)},e.registerPreParseHtmlConf=function(e){zc.push(e)},e.registerRenderElemConf=function(e){var t=e.type,n=e.renderElem;Qp[t||""]=n},e.registerStyleHandler=function(e){Xp.push(e)},e.registerStyleToHtmlHandler=function(e){ef.push(e)},e.t=ip,e.walkTextNodes=Dc}));
|
|
8
|
+
function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return to=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},oo}function ao(){if(no)return ro;no=1;var e=io(),n=t,r={isHistory:function(t){return e.isPlainObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||n.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||n.Operation.isOperationList(t.undos[0].operations))}},o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(e){return r.isHistory(e.history)&&n.Editor.isEditor(e)},isMerging:function(e){return a.get(e)},isSaving:function(e){return i.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=s.isMerging(e);a.set(e,!0),t(),a.set(e,n)},withoutMerging:function(e,t){var n=s.isMerging(e);a.set(e,!1),t(),a.set(e,n)},withoutSaving:function(e,t){var n=s.isSaving(e);i.set(e,!1),t(),i.set(e,n)}};function u(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 l(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 l(e,t)}(e))||t){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 l(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 c=function(e,t){return!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!n.Path.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!n.Path.equals(e.path,t.path))},f=function(e,t){return"set_selection"!==e.type};return ro.HISTORY=o,ro.History=r,ro.HistoryEditor=s,ro.MERGING=a,ro.SAVING=i,ro.withHistory=function(e){var t=e,r=t.apply;return t.history={undos:[],redos:[]},t.redo=function(){var e=t.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore),s.withoutSaving(t,(function(){n.Editor.withoutNormalizing(t,(function(){var e,n=u(o.operations);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.apply(r)}}catch(e){n.e(e)}finally{n.f()}}))})),e.redos.pop(),t.writeHistory("undos",o)}},t.undo=function(){var e=t.history,r=e.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(t,(function(){n.Editor.withoutNormalizing(t,(function(){var e,r=u(o.operations.map(n.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;t.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore)}))})),t.writeHistory("redos",o),e.undos.pop()}},t.apply=function(e){var n=t.operations,o=t.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(t),d=s.isMerging(t);if(null==l&&(l=f(e)),l){if(null==d&&(d=null!=a&&(0!==n.length||c(e,u))),a&&d)a.operations.push(e);else{var h={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},t.writeHistory=function(e,n){t.history[e].push(n)},t},ro}var so=ao(),uo=function(e,t){return uo=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])},uo(e,t)};function lo(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}uo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var co=function(){return co=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},co.apply(this,arguments)};function fo(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function ho(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function po(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 go(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 vo(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 mo={};var yo={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},bo={};var wo,xo,Eo,So,Oo,ko,Co,To,No,Ro,Lo,Po,Mo,Do,Ao,jo,Io,$o,Fo,Bo,_o,Uo,Ho,zo,Wo,Vo,qo,Ko,Go,Jo,Yo,Xo,Qo,Zo={};function ei(){if(Eo)return xo;Eo=1;var e=Pe();return xo=e("document","documentElement")}function ti(){if(Oo)return So;Oo=1;var e,t=jt(),n=function(){if(wo)return Zo;wo=1;var e=L(),t=At(),n=It(),r=jt(),o=Ne(),i=Nr();return Zo.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Zo}(),r=Dn(),o=on(),i=ei(),a=St(),s=rn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?h(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(e);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,So=Object.create||function(e,r){var o;return null!==e?(f[u]=t(e),o=new f,f[u]=null,o[c]=e):o=p(),void 0===r?o:n.f(o,r)}}function ni(){if(Co)return ko;Co=1;var e=wt(),t=ti(),n=It().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),ko=function(e){o[r][e]=!0}}function ri(){return No?To:(No=1,To={})}function oi(){if(Mo)return Po;Mo=1;var e=yt(),t=Re(),n=mt(),r=rn(),o=function(){if(Lo)return Ro;Lo=1;var e=R();return Ro=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Po=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function ii(){if(Ao)return Do;Ao=1;var e,t,n,r=R(),o=Re(),i=Le(),a=ti(),s=oi(),u=un(),l=wt(),c=ht(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):d=!0),!i(e)||r((function(){var t={};return e[f].call(t)!==t}))?e={}:c&&(e=a(e)),o(e[f])||u(e,f,(function(){return this})),Do={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function ai(){if(Io)return jo;Io=1;var e=It().f,t=yt(),n=wt()("toStringTag");return jo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function si(){if(Fo)return $o;Fo=1;var e=ii().IteratorPrototype,t=ti(),n=Ee(),r=ai(),o=ri(),i=function(){return this};return $o=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}function ui(){if(Ho)return Uo;Ho=1;var e=Le();return Uo=function(t){return e(t)||null===t}}function li(){if(Wo)return zo;Wo=1;var e=ui(),t=String,n=TypeError;return zo=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function ci(){if(qo)return Vo;qo=1;var e=function(){if(_o)return Bo;_o=1;var e=Se(),t=Be();return Bo=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=Le(),n=Te(),r=li();return Vo=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0)}function fi(){if(Go)return Ko;Go=1;var e=pr(),t=M(),n=ht(),r=en(),o=Re(),i=si(),a=oi(),s=ci(),u=ai(),l=$t(),c=un(),f=wt(),d=ri(),h=ii(),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 Ko=function(r,f,h,S,O,k,C){i(h,f,S);var T,N,R,L=function(e){if(e===O&&j)return j;if(!m&&e&&e in D)return D[e];switch(e){case b:case w:case x:return function(){return new h(this,e)}}return function(){return new h(this)}},P=f+" Iterator",M=!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,P,!0,!0),n&&(d[P]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(M=!0,j=function(){return t(A,this)})),O)if(N={values:L(w),keys:k?j:L(b),entries:L(x)},C)for(R in N)(m||M||!(R in D))&&c(D,R,N[R]);else e({target:f,proto:!0,forced:m||M},N);return n&&!C||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function di(){return Yo?Jo:(Yo=1,Jo=function(e,t){return{value:e,done:t}})}function hi(){if(Qo)return Xo;Qo=1;var e=Ne(),t=ni(),n=ri(),r=an(),o=It().f,i=fi(),a=di(),s=ht(),u=L(),l="Array Iterator",c=r.set,f=r.getterFor(l);Xo=i(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=f(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var d=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return Xo}hi();var pi,gi,vi,mi,yi,bi={};function wi(){if(gi)return pi;gi=1;var e=br(),t=String;return pi=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function xi(){if(mi)return vi;mi=1;var e=Se(),t=Tn(),n=wi(),r=Te(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,f=n(r(s)),d=t(u),h=f.length;return d<0||d>=h?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?e?o(f,d):l:e?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return vi={codeAt:s(!1),charAt:s(!0)}}function Ei(){if(yi)return bi;yi=1;var e=xi().charAt,t=wi(),n=an(),r=fi(),o=di(),i="String Iterator",a=n.set,s=n.getterFor(i);return r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})),bi}Ei();var Si,Oi,ki,Ci,Ti={};function Ni(){if(Oi)return Si;Oi=1;var e=R();return Si=!e((function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Ri(){if(Ci)return ki;Ci=1;var e=un();return ki=function(t,n,r){for(var o in n)e(t,o,n[o],r);return t}}var Li,Pi,Mi,Di,Ai,ji,Ii,$i,Fi,Bi,_i,Ui,Hi,zi,Wi,Vi,qi,Ki,Gi,Ji,Yi,Xi,Qi,Zi,ea,ta,na,ra,oa,ia,aa={exports:{}},sa={};function ua(){if(Pi)return Li;Pi=1;var e=Se();return Li=e([].slice)}function la(){if(Mi)return sa;Mi=1;var e=Oe(),t=Ne(),n=An().f,r=ua(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return sa.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},sa}function ca(){if(Ii)return ji;Ii=1;var e=R(),t=Le(),n=Oe(),r=function(){if(Ai)return Di;Ai=1;var e=R();return Di=e((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))}(),o=Object.isExtensible,i=e((function(){}));return ji=i||r?function(e){return!!t(e)&&((!r||"ArrayBuffer"!==n(e))&&(!o||o(e)))}:o}function fa(){if($i)return aa.exports;$i=1;var e=pr(),t=Se(),n=on(),r=Le(),o=yt(),i=It().f,a=An(),s=la(),u=ca(),l=bt(),c=Ni(),f=!1,d=l("meta"),h=0,p=function(e){i(e,d,{value:{objectID:"O"+h++,weakData:{}}})},g=aa.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=t([].splice),o={};o[d]=1,n(o).length&&(a.f=function(e){for(var t=n(e),o=0,i=t.length;o<i;o++)if(t[o]===d){r(t,o,1);break}return t},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,d)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[d].objectID},getWeakData:function(e,t){if(!o(e,d)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[d].weakData},onFreeze:function(e){return c&&f&&u(e)&&!o(e,d)&&p(e),e}};return n[d]=!0,aa.exports}function da(){if(Bi)return Fi;Bi=1;var e=wt(),t=ri(),n=e("iterator"),r=Array.prototype;return Fi=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function ha(){if(Ui)return _i;Ui=1;var e=br(),t=_e(),n=Ce(),r=ri(),o=wt()("iterator");return _i=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function pa(){if(zi)return Hi;zi=1;var e=M(),t=Be(),n=jt(),r=Fe(),o=ha(),i=TypeError;return Hi=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},Hi}function ga(){if(Vi)return Wi;Vi=1;var e=M(),t=jt(),n=_e();return Wi=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i}}function va(){if(Ki)return qi;Ki=1;var e=Qr(),t=M(),n=jt(),r=Fe(),o=da(),i=Ln(),a=Me(),s=pa(),u=ha(),l=ga(),c=TypeError,f=function(e,t){this.stopped=e,this.result=t},d=f.prototype;return qi=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=e(p,S),R=function(e){return v&&l(v,"normal",e),new f(!0,e)},L=function(e){return O?(n(e),T?N(e[0],e[1],R):N(e[0],e[1])):T?N(e,R):N(e)};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=t(x,v)).done;){try{w=L(E.value)}catch(e){l(v,"throw",e)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function ma(){if(Ji)return Gi;Ji=1;var e=Me(),t=TypeError;return Gi=function(n,r){if(e(r,n))return n;throw new t("Incorrect invocation")}}function ya(){if(Xi)return Yi;Xi=1;var e=wt()("iterator"),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}return Yi=function(n,r){try{if(!r&&!t)return!1}catch(e){return!1}var o=!1;try{var i={};i[e]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(e){}return o}}function ba(){if(Zi)return Qi;Zi=1;var e=Re(),t=Le(),n=ci();return Qi=function(r,o,i){var a,s;return n&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function wa(){if(ta)return ea;ta=1;var e=pr(),t=b(),n=Se(),r=hr(),o=un(),i=fa(),a=va(),s=ma(),u=Re(),l=Ce(),c=Le(),f=R(),d=ya(),h=ai(),p=ba();return ea=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=t[g],E=x&&x.prototype,S=x,O={},k=function(e){var t=n(E[e]);o(E,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return b&&!c(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,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(e){new x(e)})),L=!b&&f((function(){for(var e=new x,t=5;t--;)e[w](t,t);return!e.has(-0)}));R||((S=v((function(e,t){s(e,E);var n=p(new x,e,S);return l(t)||a(t,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,e({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},ea}function xa(){if(ra)return na;ra=1;var e=Se(),t=Ri(),n=fa().getWeakData,r=ma(),o=jt(),i=Ce(),a=Le(),s=va(),u=Zr(),l=yt(),c=an(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=e([].splice),v=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};return y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=p(this.entries,(function(t){return t[0]===e}));return~t&&g(this.entries,t,1),!!~t}},na={getConstructor:function(e,u,c,h){var p=e((function(e,t){r(e,g),f(e,{type:u,id:v++,frozen:null}),i(t)||s(t,e[h],{that:e,AS_ENTRIES:c})})),g=p.prototype,y=d(u),b=function(e,t,r){var i=y(e),a=n(o(t),!0);return!0===a?m(i).set(t,r):a[i.id]=r,e};return t(g,{delete:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).has(e):r&&l(r,t.id)}}),t(g,c?{get:function(e){var t=y(this);if(a(e)){var r=n(e);if(!0===r)return m(t).get(e);if(r)return r[t.id]}},set:function(e,t){return b(this,e,t)}}:{add:function(e){return b(this,e,!0)}}),p}}}ia||(ia=1,function(){if(oa)return Ti;oa=1;var e,t=Ni(),n=b(),r=Se(),o=Ri(),i=fa(),a=wa(),s=xa(),u=Le(),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(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){e=s.getConstructor(x,"WeakMap",!0),i.enable();var k=r(S.delete),C=r(S.has),T=r(S.get);o(S,{delete:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)||n.frozen.delete(t)}return k(this,t)},has:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),C(this,t)||n.frozen.has(t)}return C(this,t)},get:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),C(this,t)?T(this,t):n.frozen.get(t)}return T(this,t)},set:function(t,n){if(u(t)&&!p(t)){var r=l(this);r.frozen||(r.frozen=new e),C(this,t)?O(this,t,n):r.frozen.set(t,n)}else O(this,t,n);return this}})}else t&&c((function(){var e=m([]);return O(new E,e,1),!g(e)}))&&o(S,{set:function(e,t){var n;return h(e)&&(g(e)?n=m:v(e)&&(n=y)),O(this,e,t),n&&n(e),this}})}());var Ea,Sa={};!function(){if(Ea)return Sa;Ea=1;var e=b(),t=Jr(),n=Yr(),r=hi(),o=$t(),i=ai(),a=wt()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}();var Oa,ka=new WeakMap,Ca=new WeakMap,Ta=new WeakMap,Na=new WeakMap,Ra=new WeakMap,La=new WeakMap,Pa=new WeakMap,Ma=new WeakMap,Da=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ia=new WeakMap,$a=new WeakMap,Fa=new WeakMap,Ba=new WeakMap,_a=new WeakMap,Ua=new WeakMap,Ha=new WeakMap,za=new WeakMap,Wa=new WeakMap,Va=new WeakMap,qa=new WeakMap,Ka=new WeakMap,Ga=new WeakMap,Ja=new WeakMap,Ya=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in bo)e.push(t);return e},t.getConfig=function(){var e=Aa.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},Xa={};!function(){if(Oa)return Xa;Oa=1;var e=pr(),t=Zr().filter;e({target:"Array",proto:!0,forced:!Sr()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var Qa,Za,es,ts,ns,rs={};function os(){if(Za)return Qa;Za=1;var e=jt(),t=ga();return Qa=function(n,r,o,i){try{return i?r(e(o)[0],o[1]):r(o)}catch(e){t(n,"throw",e)}}}function is(){if(ts)return es;ts=1;var e=Qr(),t=M(),n=mt(),r=os(),o=da(),i=wr(),a=Ln(),s=mr(),u=pa(),l=ha(),c=Array;return es=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=e(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=t(x,w)).done;O++)E=v?r(w,g,[b.value,O],!0):b.value,s(y,O,E);return y.length=O,y},es}!function(){if(ns)return rs;ns=1;var e=pr(),t=is();e({target:"Array",stat:!0,forced:!ya()((function(e){Array.from(e)}))},{from:t})}();var as,ss={};!function(){if(as)return ss;as=1;var e=pr(),t=Pn().includes,n=R(),r=ni();e({target:"Array",proto:!0,forced:n((function(){return!Array(1).includes()}))},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var us,ls={};!function(){if(us)return ls;us=1;var e=pr(),t=Se(),n=ke(),r=Ne(),o=eo(),i=t([].join);e({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(e){return i(r(this),void 0===e?",":e)}})}();var cs,fs={};!function(){if(cs)return fs;cs=1;var e=pr(),t=Zr().map;e({target:"Array",proto:!0,forced:!Sr()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var ds,hs,ps,gs,vs,ms,ys,bs={};function ws(){if(hs)return ds;hs=1;var e=Le(),t=Oe(),n=wt()("match");return ds=function(r){var o;return e(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===t(r))}}function xs(){if(gs)return ps;gs=1;var e=ws(),t=TypeError;return ps=function(n){if(e(n))throw new t("The method doesn't accept regular expressions");return n}}function Es(){if(ms)return vs;ms=1;var e=wt()("match");return vs=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,"/./"[t](n)}catch(e){}}return!1}}!function(){if(ys)return bs;ys=1;var e=pr(),t=Se(),n=xs(),r=Te(),o=wi(),i=Es(),a=t("".indexOf);e({target:"String",proto:!0,forced:!i("includes")},{includes:function(e){return!!~a(o(r(this)),o(n(e)),arguments.length>1?arguments[1]:void 0)}})}();var Ss,Os,ks,Cs,Ts,Ns,Rs,Ls={};function Ps(){return Os?Ss:(Os=1,Ss="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Rs)return Ls;Rs=1;var e=pr(),t=function(){if(Cs)return ks;Cs=1;var e=Se(),t=Te(),n=wi(),r=Ps(),o=e("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(e){return function(r){var s=n(t(r));return 1&e&&(s=o(s,i,"")),2&e&&(s=o(s,a,"$1")),s}};return ks={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ns)return Ts;Ns=1;var e=en().PROPER,t=R(),n=Ps();return Ts=function(r){return t((function(){return!!n[r]()||"
"!=="
"[r]()||e&&n[r].name!==r}))}}();e({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}})}();var Ms,Ds,As,js,Is,$s={};!function(){if(Is)return $s;Is=1;var e=pr(),t=function(){if(Ds)return Ms;Ds=1;var e=Se(),t=Te(),n=wi(),r=/"/g,o=e("".replace);return Ms=function(e,i,a,s){var u=n(t(e)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(js)return As;js=1;var e=R();return As=function(t){return e((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}}();e({target:"String",proto:!0,forced:n("anchor")},{anchor:function(e){return t(this,"a","name",e)}})}();var Fs,Bs,_s,Us,Hs,zs,Ws,Vs;function qs(){if(Bs)return Fs;Bs=1;var e=sn(),t=It();return Fs=function(n,r,o){return o.get&&e(o.get,r,{getter:!0}),o.set&&e(o.set,r,{setter:!0}),t.f(n,r,o)}}function Ks(){if(Us)return _s;Us=1;var e=Pe(),t=qs(),n=wt(),r=L(),o=n("species");return _s=function(n){var i=e(n);r&&i&&!i[o]&&t(i,o,{configurable:!0,get:function(){return this}})}}Vs||(Vs=1,Ws||(Ws=1,wa()("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),function(){if(zs)return Hs;zs=1;var e=ti(),t=qs(),n=Ri(),r=Qr(),o=ma(),i=Ce(),a=va(),s=fi(),u=di(),l=Ks(),c=L(),f=fa().fastKey,d=an(),h=d.set,p=d.getterFor;return Hs={getConstructor:function(s,u,l,d){var g=s((function(t,n){o(t,v),h(t,{type:u,index:e(null),first:null,last:null,size:0}),c||(t.size=0),i(n)||a(n,t[d],{that:t,AS_ENTRIES:l})})),v=g.prototype,m=p(u),y=function(e,t,n){var r,o,i=m(e),a=b(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},b=function(e,t){var n,r=m(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return n(v,{clear:function(){for(var t=m(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=e(null),c?t.size=0:this.size=0},delete:function(e){var t=this,n=m(t),r=b(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),c?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=m(this),o=r(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),n(v,l?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),c&&t(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(e,t,n){var r=t+" Iterator",o=p(t),i=p(r);s(e,t,(function(e,t){h(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)?u("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,u(void 0,!0))}),n?"entries":"values",!n,!0),l(t)}},Hs}())));var Gs,Js,Ys,Xs,Qs,Zs,eu,tu,nu,ru,ou,iu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),au={};function su(){if(Js)return Gs;Js=1;var e=jt();return Gs=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function uu(){if(Xs)return Ys;Xs=1;var e=R(),t=b().RegExp,n=e((function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),r=n||e((function(){return!t("a","y").sticky})),o=n||e((function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));return Ys={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function lu(){if(Zs)return Qs;Zs=1;var e=R(),t=b().RegExp;return Qs=e((function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))}function cu(){if(tu)return eu;tu=1;var e=R(),t=b().RegExp;return eu=e((function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))}function fu(){if(ru)return nu;ru=1;var e,t,n=M(),r=Se(),o=wi(),i=su(),a=uu(),s=vt(),u=ti(),l=an().get,c=lu(),f=cu(),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=(t=/b*/g,n(h,e=/a/,"a"),n(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(e){var t,r,a,s,c,f,E,S=this,O=l(S),k=o(e),C=O.raw;if(C)return C.lastIndex=S.lastIndex,t=n(p,C,k),S.lastIndex=C.lastIndex,t;var T=O.groups,N=w&&S.sticky,R=n(i,S),L=S.source,P=0,M=k;if(N&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),M=y(k,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(k,S.lastIndex-1))&&(L="(?: "+L+")",M=" "+M,P++),r=new RegExp("^(?:"+L+")",R)),x&&(r=new RegExp("^"+L+"$(?!\\s)",R)),b&&(a=S.lastIndex),s=n(h,N?r:S,M),N?s?(s.input=y(s.input,P),s[0]=y(s[0],P),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}),nu=p}function du(){if(ou)return au;ou=1;var e=pr(),t=fu();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),au}du();var hu,pu,gu,vu,mu,yu,bu,wu,xu,Eu,Su,Ou={};function ku(){if(pu)return hu;pu=1,du();var e=M(),t=un(),n=fu(),r=R(),o=wt(),i=$t(),a=o("species"),s=RegExp.prototype;return hu=function(u,l,c,f){var d=o(u),h=!r((function(){var e={};return e[d]=function(){return 7},7!==""[u](e)})),p=h&&!r((function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[d]=/./[d]),t.exec=function(){return e=!0,null},t[d](""),!e}));if(!h||!p||c){var g=/./[d],v=l(d,""[u],(function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}}));t(String.prototype,u,v[0]),t(s,d,v[1])}f&&i(s[d],"sham",!0)},hu}function Cu(){if(vu)return gu;vu=1;var e=wr(),t=Fe(),n=TypeError;return gu=function(r){if(e(r))return r;throw new n(t(r)+" is not a constructor")}}function Tu(){if(yu)return mu;yu=1;var e=jt(),t=Cu(),n=Ce(),r=wt()("species");return mu=function(o,i){var a,s=e(o).constructor;return void 0===s||n(a=e(s)[r])?i:t(a)}}function Nu(){if(wu)return bu;wu=1;var e=xi().charAt;return bu=function(t,n,r){return n+(r?e(t,n).length:1)}}function Ru(){if(Eu)return xu;Eu=1;var e=M(),t=jt(),n=Re(),r=Oe(),o=fu(),i=TypeError;return xu=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Su)return Ou;Su=1;var e=M(),t=Se(),n=ku(),r=jt(),o=Ce(),i=Te(),a=Tu(),s=Nu(),u=Rn(),l=wi(),c=_e(),f=Ru(),d=uu(),h=R(),p=d.UNSUPPORTED_Y,g=Math.min,v=t([].push),m=t("".slice),y=!h((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]})),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(t,n,d){var h="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e(n,this,t,r)}:n;return[function(n,r){var a=i(this),s=o(n)?void 0:c(n,t);return s?e(s,n,a,r):e(h,l(a),n,r)},function(e,t){var o=r(this),i=l(e);if(!b){var c=d(h,o,i,t,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===t?4294967295:t>>>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 Lu,Pu={};!function(){if(Lu)return Pu;Lu=1;var e=pr(),t=Zr().find,n=ni(),r="find",o=!0;r in[]&&Array(1)[r]((function(){o=!1})),e({target:"Array",proto:!0,forced:o},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Mu,Du,Au={};Du||(Du=1,function(){if(Mu)return Au;Mu=1;var e=pr(),t=b();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());const ju=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Iu,$u,Fu,Bu,_u,Uu,Hu,zu,Wu,Vu,qu,Ku,Gu,Ju,Yu,Xu,Qu,Zu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,fl,dl={};function hl(){if($u)return Iu;$u=1;var e=b(),t=De(),n=Oe(),r=function(e){return t.slice(0,e.length)===e};return Iu=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":e.Bun&&"string"==typeof Bun.version?"BUN":e.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(e.process)?"NODE":e.window&&e.document?"BROWSER":"REST"}function pl(){if(Bu)return Fu;Bu=1;var e=hl();return Fu="NODE"===e}function gl(){if(Uu)return _u;Uu=1;var e=P(),t=Function.prototype,n=t.apply,r=t.call;return _u="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),_u}function vl(){if(zu)return Hu;zu=1;var e=TypeError;return Hu=function(t,n){if(t<n)throw new e("Not enough arguments");return t}}function ml(){if(Vu)return Wu;Vu=1;var e=De();return Wu=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)}function yl(){if(Ku)return qu;Ku=1;var e,t,n,r,o=b(),i=gl(),a=Qr(),s=Re(),u=yt(),l=R(),c=ei(),f=ua(),d=St(),h=vl(),p=ml(),g=pl(),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(){e=o.location}));var T=function(e){if(u(k,e)){var t=k[e];delete k[e],t()}},N=function(e){return function(){T(e)}},L=function(e){T(e.data)},P=function(t){o.postMessage(S(t),e.protocol+"//"+e.host)};return v&&m||(v=function(e){h(arguments.length,1);var n=s(e)?e:x(e),r=f(arguments,1);return k[++O]=function(){i(n,void 0,r)},t(O),O},m=function(e){delete k[e]},g?t=function(e){y.nextTick(N(e))}:w&&w.now?t=function(e){w.now(N(e))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=L,t=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&e&&"file:"!==e.protocol&&!l(P)?(t=P,o.addEventListener("message",L,!1)):t=C in d("script")?function(e){c.appendChild(d("script"))[C]=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(N(e),0)}),qu={set:v,clear:m}}function bl(){if(Ju)return Gu;Ju=1;var e=b(),t=L(),n=Object.getOwnPropertyDescriptor;return Gu=function(r){if(!t)return e[r];var o=n(e,r);return o&&o.value}}function wl(){if(Xu)return Yu;Xu=1;var e=function(){this.head=null,this.tail=null};return e.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}},Yu=e}function xl(){if(rl)return nl;rl=1;var e,t,n,r,o,i=b(),a=bl(),s=Qr(),u=yl().set,l=wl(),c=ml(),f=function(){if(Zu)return Qu;Zu=1;var e=De();return Qu=/ipad|iphone|ipod/i.test(e)&&"undefined"!=typeof Pebble}(),d=function(){if(tl)return el;tl=1;var e=De();return el=/web0s(?!.*chrome)/i.test(e)}(),h=pl(),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 t,n;for(h&&(t=v.domain)&&t.exit();n=w.get();)try{n()}catch(t){throw w.head&&e(),t}t&&t.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),e=function(){o(x)}):h?e=function(){v.nextTick(x)}:(u=s(u,i),e=function(){u(x)}):(t=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),e=function(){n.data=t=!t}),y=function(t){w.head||e(),w.add(t)}}return nl=y}function El(){return il||(il=1,ol=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}),ol}function Sl(){return sl?al:(sl=1,al=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}})}function Ol(){if(ll)return ul;ll=1;var e=b();return ul=e.Promise}function kl(){if(fl)return cl;fl=1;var e=b(),t=Ol(),n=Re(),r=hr(),o=tn(),i=wt(),a=hl(),s=ht(),u=Ae(),l=t&&t.prototype,c=i("species"),f=!1,d=n(e.PromiseRejectionEvent),h=r("Promise",(function(){var e=o(t),n=e!==String(t);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new t((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((r.constructor={})[c]=i,!(f=r.then((function(){}))instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)}));return cl={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Cl,Tl,Nl={};function Rl(){if(Cl)return Nl;Cl=1;var e=Be(),t=TypeError,n=function(n){var r,o;this.promise=new n((function(e,n){if(void 0!==r||void 0!==o)throw new t("Bad Promise constructor");r=e,o=n})),this.resolve=e(r),this.reject=e(o)};return Nl.f=function(e){return new n(e)},Nl}var Ll,Pl,Ml,Dl={};function Al(){if(Pl)return Ll;Pl=1;var e=Ol(),t=ya(),n=kl().CONSTRUCTOR;return Ll=n||!t((function(t){e.all(t).then(void 0,(function(){}))}))}var jl,Il={};var $l,Fl={};var Bl,_l={};var Ul,Hl,zl,Wl,Vl={};function ql(){if(Hl)return Ul;Hl=1;var e=jt(),t=Le(),n=Rl();return Ul=function(r,o){if(e(r),t(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}Wl||(Wl=1,function(){if(Tl)return dl;Tl=1;var e,t,n,r=pr(),o=ht(),i=pl(),a=b(),s=M(),u=un(),l=ci(),c=ai(),f=Ks(),d=Be(),h=Re(),p=Le(),g=ma(),v=Tu(),m=yl().set,y=xl(),w=El(),x=Sl(),E=wl(),S=an(),O=Ol(),k=kl(),C=Rl(),T="Promise",N=k.CONSTRUCTOR,R=k.REJECTION_EVENT,L=k.SUBCLASSING,P=S.getterFor(T),D=S.set,A=O&&O.prototype,j=O,I=A,$=a.TypeError,F=a.document,B=a.process,_=C.f,U=_,H=!!(F&&F.createEvent&&a.dispatchEvent),z="unhandledrejection",W=function(e){var t;return!(!p(e)||!h(t=e.then))&&t},V=function(e,t){var n,r,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,l=e.resolve,c=e.reject,f=e.domain;try{u?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===u?n=i:(f&&f.enter(),n=u(i),f&&(f.exit(),o=!0)),n===e.promise?c(new $("Promise-chain cycle")):(r=W(n))?s(r,n,l,c):l(n)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},q=function(e,t){e.notified||(e.notified=!0,y((function(){for(var n,r=e.reactions;n=r.get();)V(n,e);e.notified=!1,t&&!e.rejection&&G(e)})))},K=function(e,t,n){var r,o;H?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),a.dispatchEvent(r)):r={promise:t,reason:n},!R&&(o=a["on"+e])?o(r):e===z&&w("Unhandled promise rejection",n)},G=function(e){s(m,a,(function(){var t,n=e.facade,r=e.value;if(J(e)&&(t=x((function(){i?B.emit("unhandledRejection",r,n):K(z,n,r)})),e.rejection=i||J(e)?2:1,t.error))throw t.value}))},J=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){s(m,a,(function(){var t=e.facade;i?B.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},X=function(e,t,n){return function(r){e(t,r,n)}},Q=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,q(e,!0))},Z=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new $("Promise can't be resolved itself");var r=W(t);r?y((function(){var n={done:!1};try{s(r,t,X(Z,n,e),X(Q,n,e))}catch(t){Q(n,t,e)}})):(e.value=t,e.state=1,q(e,!1))}catch(t){Q({done:!1},t,e)}}};if(N&&(I=(j=function(t){g(this,I),d(t),s(e,this);var n=P(this);try{t(X(Z,n),X(Q,n))}catch(e){Q(n,e)}}).prototype,(e=function(e){D(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:null})}).prototype=u(I,"then",(function(e,t){var n=P(this),r=_(v(this,j));return n.parent=!0,r.ok=!h(e)||e,r.fail=h(t)&&t,r.domain=i?B.domain:void 0,0===n.state?n.reactions.add(r):y((function(){V(r,n)})),r.promise})),t=function(){var t=new e,n=P(t);this.promise=t,this.resolve=X(Z,n),this.reject=X(Q,n)},C.f=_=function(e){return e===j||void 0===e?new t(e):U(e)},!o&&h(O)&&A!==Object.prototype)){n=A.then,L||u(A,"then",(function(e,t){var r=this;return new j((function(e,t){s(n,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete A.constructor}catch(e){}l&&l(A,I)}r({global:!0,constructor:!0,wrap:!0,forced:N},{Promise:j}),c(j,T,!1,!0),f(T)}(),function(){if(Ml)return Dl;Ml=1;var e=pr(),t=M(),n=Be(),r=Rl(),o=Sl(),i=va();e({target:"Promise",stat:!0,forced:Al()},{all:function(e){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(e,(function(e){var n=s++,i=!1;c++,t(r,a,e).then((function(e){i||(i=!0,o[n]=e,--c||u(o))}),l)})),--c||u(o)}));return c.error&&l(c.value),s.promise}})}(),function(){if(jl)return Il;jl=1;var e=pr(),t=ht(),n=kl().CONSTRUCTOR,r=Ol(),o=Pe(),i=Re(),a=un(),s=r&&r.prototype;if(e({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if($l)return Fl;$l=1;var e=pr(),t=M(),n=Be(),r=Rl(),o=Sl(),i=va();e({target:"Promise",stat:!0,forced:Al()},{race:function(e){var a=this,s=r.f(a),u=s.reject,l=o((function(){var r=n(a.resolve);i(e,(function(e){t(r,a,e).then(s.resolve,u)}))}));return l.error&&u(l.value),s.promise}})}(),function(){if(Bl)return _l;Bl=1;var e=pr(),t=Rl();e({target:"Promise",stat:!0,forced:kl().CONSTRUCTOR},{reject:function(e){var n=t.f(this);return(0,n.reject)(e),n.promise}})}(),function(){if(zl)return Vl;zl=1;var e=pr(),t=Pe(),n=ht(),r=Ol(),o=kl().CONSTRUCTOR,i=ql(),a=t("Promise"),s=n&&!o;e({target:"Promise",stat:!0,forced:n||o},{resolve:function(e){return i(s&&this===a?r:this,e)}})}());var Kl,Gl,Jl,Yl={};function Xl(){if(Gl)return Kl;Gl=1;var e=M(),t=yt(),n=Me(),r=su(),o=RegExp.prototype;return Kl=function(i){var a=i.flags;return void 0!==a||"flags"in o||t(i,"flags")||!n(o,i)?a:e(r,i)}}!function(){if(Jl)return Yl;Jl=1;var e=en().PROPER,t=un(),n=jt(),r=wi(),o=R(),i=Xl(),a="toString",s=RegExp.prototype,u=s[a],l=o((function(){return"/a/b"!==u.call({source:"a",flags:"b"})})),c=e&&u.name!==a;(l||c)&&t(s,a,(function(){var e=n(this);return"/"+r(e.source)+"/"+r(i(e))}),{unsafe:!0})}();var Ql,Zl,ec,tc={};function nc(){if(Zl)return Ql;Zl=1;var e=Se(),t=mt(),n=Math.floor,r=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return Ql=function(e,u,l,c,f,d){var h=l+e.length,p=c.length,g=s;return void 0!==f&&(f=t(f),g=a),o(d,g,(function(t,o){var a;switch(r(o,0)){case"$":return"$";case"&":return e;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 t;if(s>p){var d=n(s/10);return 0===d?t:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):t}a=c[s-1]}return void 0===a?"":a}))},Ql}function rc(e){Promise.resolve().then(e)}!function(){if(ec)return tc;ec=1;var e=gl(),t=M(),n=Se(),r=ku(),o=R(),i=jt(),a=Re(),s=Ce(),u=Tn(),l=Rn(),c=wi(),f=Te(),d=Nu(),h=_e(),p=nc(),g=Ru(),v=wt()("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(e,n){var o=f(this),i=s(e)?void 0:h(e,v);return i?t(i,e,o,n):t(r,c(o),e,n)},function(t,n){var s=i(this),f=c(t);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,P=0;P<T.length;P++){for(var M,D=c((C=T[P])[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,$),M=c(e(n,void 0,F))}else M=p(D,f,A,j,$,n);A>=L&&(R+=E(f,L,A)+M,L=A+D.length)}return R+E(f,L)}]}),!!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||O)}();var oc,ic=function(e){return Object.prototype.toString.call(e)},ac=globalThis.Node,sc=globalThis.Comment,uc=globalThis.Element,lc=globalThis.Text,cc=globalThis.Range,fc=globalThis.Selection,dc=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),e.NodeType=void 0,(oc=e.NodeType||(e.NodeType={}))[oc.ELEMENT_NODE=1]="ELEMENT_NODE",oc[oc.TEXT_NODE=3]="TEXT_NODE",oc[oc.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",oc[oc.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",oc[oc.COMMENT_NODE=8]="COMMENT_NODE",oc[oc.DOCUMENT_NODE=9]="DOCUMENT_NODE",oc[oc.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",oc[oc.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var hc=function(e){return"[object HTMLDocument]"===ic(e)},pc=function(e){return"[object ShadowRoot]"===ic(e)},gc=function(e){return"[object DataTransfer]"===ic(e)},vc=/\[object HTML([A-Z][a-z]*)*Element\]/,mc=function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")},yc=function(e){return vc.test(ic(e))},bc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},wc=function(e){return null!=e&&"number"==typeof e.nodeType},xc=function(t){return wc(t)&&t.nodeType===e.NodeType.COMMENT_NODE},Ec=function(t){return wc(t)&&t.nodeType===e.NodeType.ELEMENT_NODE},Sc=function(e){return"[object Selection]"===ic(e)},Oc=function(t){return wc(t)&&t.nodeType===e.NodeType.TEXT_NODE},kc=function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length},Cc=function(e){var t,n=go(e,2),r=n[0],o=n[1];if(Ec(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=go(Rc(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Ec(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Lc(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Tc=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Nc=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Rc=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(xc(o)||Ec(o)&&0===o.childNodes.length||Ec(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]},Lc=function(e,t,n){return go(Rc(e,t,n),1)[0]},Pc=function(e){var t,n,r="";if(Oc(e)&&e.nodeValue)return e.nodeValue;if(Ec(e)){try{for(var o=po(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Pc(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 Mc(t){var n=[];n.push(t);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===e.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(ju.includes(a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function Dc(t,n){if(!yc(t)||"true"!==t.dataset.slateVoid)for(var r=t.childNodes,o=r.length;o-=1;){var i=r[o],a=i.nodeType;Oc(i)?n(i,t):[e.NodeType.ELEMENT_NODE,e.NodeType.DOCUMENT_NODE,e.NodeType.DOCUMENT_FRAGMENT_NODE].includes(a)&&Dc(i,n)}}function Ac(t){if(0===t.length)return"";var n=t[0];return n.nodeType!==e.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var jc,Ic,$c,Fc={};function Bc(){if(Ic)return jc;Ic=1;var e=It().f;return jc=function(t,n,r){r in t||e(t,r,{configurable:!0,get:function(){return n[r]},set:function(e){n[r]=e}})}}!function(){if($c)return Fc;$c=1;var e=L(),t=b(),n=Se(),r=hr(),o=ba(),i=$t(),a=ti(),s=An().f,u=Me(),l=ws(),c=wi(),f=Xl(),d=uu(),h=Bc(),p=un(),g=R(),v=yt(),m=an().enforce,y=Ks(),w=wt(),x=lu(),E=cu(),S=w("match"),O=t.RegExp,k=O.prototype,C=t.SyntaxError,T=n(k.exec),N=n("".charAt),P=n("".replace),M=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,B=d.UNSUPPORTED_Y,_=e&&(!$||F||x||E||g((function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))})));if(r("RegExp",_)){for(var U=function(e,t){var n,r,s,d,h,p,g=u(k,this),y=l(e),b=void 0===t,w=[],S=e;if(!g&&y&&b&&e.constructor===U)return e;if((y||u(k,e))&&(e=e.source,b&&(t=f(S))),e=void 0===e?"":c(e),t=void 0===t?"":c(t),S=e,x&&"dotAll"in j&&(r=!!t&&M(t,"s")>-1)&&(t=P(t,/s/g,"")),n=t,F&&"sticky"in j&&(s=!!t&&M(t,"y")>-1)&&B&&(t=P(t,/y/g,"")),E&&(d=function(e){for(var t,n=e.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(t=N(e,r)))t+=N(e,++r);else if("]"===t)u=!1;else if(!u)switch(!0){case"["===t:u=!0;break;case"("===t:if(o+=t,"?:"===D(e,r+1,r+3))continue;T(A,D(e,r+1))&&(r+=2,l=!0),c++;continue;case">"===t&&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+=t:o+=t}return[o,i]}(e),e=d[0],w=d[1]),h=o(O(e,t),g?this:k,U),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=U(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=N(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+N(e,++r);return o}(e),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),e!==S)try{i(h,"source",""===S?"(?:)":S)}catch(e){}return h},H=s(O),z=0;H.length>z;)h(U,O,H[z++]);k.constructor=U,U.prototype=k,p(t,"RegExp",U,{constructor:!0})}y("RegExp")}();var _c=new RegExp(String.fromCharCode(160),"g");function Uc(e){return e.replace(_c," ")}var Hc=["span","b","strong","i","em","s","strike","u","font","sub","sup"],zc=[];var Wc=[];var Vc={};function qc(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+=n,!0}}return!1}function Kc(e,t,n){return{type:"paragraph",children:[{text:o(e).text().replace(/\s+/gm," ")}]}}function Gc(e,n){var r=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(Ec(e)){if("BR"===e.nodeName)return void(qc(n,"\n")||n.push({text:"\n"}));var r=Yc(o(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(Oc(e)){var i=e.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=Uc(i),qc(n,i)||n.push({text:i}))}})),n)}(e,n),i=function(e){for(var t in Vc)if(e[0].matches(t))return Vc[t];return Kc}(e),a=i(e[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach((function(o){t.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:e.text().replace(/\s+/gm," ")}]),Wc.forEach((function(t){o=t(e[0],o,n)})))})),a}function Jc(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(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=Uc(n)};return Wc.forEach((function(n){r=n(e[0],r,t)})),r}function Yc(e,t){zc.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=o(r(e[0])))}));var n=Ac(e);if("span"===n){if(e.attr("data-w-e-type"))return Gc(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes;return Array.from(r).reduce((function(e,n){var r=o(n),i=r[0];if(xc(i))return e;if(Ec(i)){var a=Yc(r,t);Array.isArray(a)?e.push.apply(e,vo([],go(a),!1)):e.push(a)}else{var s=Oc(i)?{text:i.textContent||""}:Jc(r,t);e.push(s)}return e}),[])}return Jc(e,t)}if("code"===n)return"pre"===Ac(e.parent())?Gc(e,t):Jc(e,t);if(Hc.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return co(co({},Yc(o(r[0]),t)),Jc(e,t))}return Jc(e,t)}return Gc(e,t)}function Xc(e,t,n){var r=o(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(yo.DESTROYED,(function(){r.removeAttr(t)})),!1)}function Qc(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=o("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=Yc(o(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Zc(e,t){return"w-e-element-".concat(e,"-").concat(t)}var ef=[];var tf={};function nf(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function rf(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),u="";s||(u=a.map((function(e){return Ef(e,n)})).join(""));var l=function(e){return tf[e]||nf}(o),c=l(e,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||ef.forEach((function(t){return f=t(e,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}var of,af,sf,uf={};function lf(){if(af)return of;af=1;var e=yt();return of=function(t){return void 0!==t&&(e(t,"value")||e(t,"writable"))}}!function(){if(sf)return uf;sf=1;var e=pr(),t=M(),n=Le(),r=jt(),o=lf(),i=kt(),a=oi();e({target:"Reflect",stat:!0},{get:function e(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:t(l.get,f):n(c=a(s))?e(c,u,f):void 0}})}();var cf,ff={};!function(){if(cf)return ff;cf=1;var e,t=pr(),n=Xr(),r=kt().f,o=Rn(),i=wi(),a=xs(),s=Te(),u=Es(),l=ht(),c=n("".slice),f=Math.min,d=u("endsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"endsWith"),!e||e.writable))&&!d},{endsWith:function(e){var t=i(s(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,u=void 0===n?r:f(o(n),r),l=i(e);return c(t,u-l.length,u)===l}})}();var df=0,hf=function(){this.id="".concat(df++)},pf="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),gf="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),vf="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),mf="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),yf="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),bf="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),wf=!yf&&!mf&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,xf={getWindow:function(e){var t=Va.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=Wa.get(t);return n||(n=new hf,Wa.set(t,n)),n},setNewKey:function(e){var t=new hf;Wa.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=Ba.get(o);if(null==i){if(t.Editor.isEditor(o))return r;break}var a=Fa.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=xf.toDOMNode(e,e),n=t.getRootNode();return(hc(n)||pc(n))&&null!=Reflect.get(n,"getSelection")?n:t.ownerDocument},getParentNode:function(e,t){return Ba.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=xf.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,n){var r=[xf.findPath(e,n)[0]];return t.Node.get(e,r)},toDOMNode:function(e,n){var r;if(t.Editor.isEditor(n))r=_a.get(e);else{var o=xf.findKey(e,n);r=Ha.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=xf.toDOMNode(e,e);try{r=Ec(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=xf.toDOMPoint(e,r),s=t.Range.isCollapsed(n)?a:xf.toDOMPoint(e,o),u=xf.getWindow(e).document.createRange(),l=go(i?s:a,2),c=l[0],f=l[1],d=go(i?a:s,2),h=d[0],p=d[1],g=!!(Ec(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Ec(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(e,n){var r,o,i,a=go(t.Editor.node(e,n.path),1)[0],s=xf.toDOMNode(e,a);t.Editor.void(e,{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=po(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(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=Ec(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ua.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=xf.toSlateNode(e,n.target),u=xf.findPath(e,s);if(t.Editor.isVoid(e,s)){var l=i.getBoundingClientRect(),c=e.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=t.Editor.point(e,u,{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 h=this.getWindow(e).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 xf.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if((Sc(n)?n.anchorNode:n.startContainer)&&(Sc(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=bf&&Tc()?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=xf.toSlatePoint(e,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:xf.toSlatePoint(e,[a,s],{exactMatch:l,suppressThrow:c});if(!d)return null;var h={anchor:f,focus:d};return t.Range.isExpanded(h)&&t.Range.isForward(h)&&Ec(a)&&t.Editor.void(e,{at:h.focus,mode:"highest"})&&(h=t.Editor.unhangRange(e,h,{voids:!0})),h},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,s=go(o?t:Cc(t),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,v=xf.getWindow(e);if(p&&v.document.createRange){f=p.closest('[data-slate-node="text"]');var m=v.document.createRange();m.setStart(f,0),m.setEnd(u,l);var y=m.cloneContents();vo(vo([],go(a(y.querySelectorAll("[data-slate-zero-width]"))),!1),go(a(y.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),d=y.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(e){d-=e.textContent.length}))):d=1);g&&d===g.textContent.length&&(c.hasAttribute("data-slate-zero-width")||gf&&(null===(r=g.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!f){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var b=xf.toSlateNode(e,f);return{path:xf.findPath(e,b),offset:d}},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=po(i),s=a.next();!s.done;s=a.next()){var u=go(s.value,1)[0];t.Element.isElement(u)&&o.push(u)}}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=go(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=go(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=go(t.Editor.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&go(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=ka.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Na.get(e)||null},getHoverbar:function(e){return La.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)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,i,a,s=xf.getTextarea(e).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=po(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Oc(f))break;f.remove()}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=t.Editor.nodes(e,{match:function(n){return!(!t.Element.isElement(n)||e.isInline(n))},universal:!0});try{for(var h=po(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];Dc(xf.toDOMNode(e,v),(function(e,t){var n=o(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.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=po(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=xf.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=go(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function Ef(e,n){return t.Element.isElement(e)?rf(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," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=xf.getParentsNodes(t,e).some((function(e){return"pre"===xf.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=xf.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return ef.forEach((function(t){return r=t(e,r)})),r}(e,n)}var Sf=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Of=function(e,t,n){var r=xf.toDOMRange(e,t).getBoundingClientRect(),o=xf.toDOMRange(e,n).getBoundingClientRect();return Sf(r,o)&&Sf(o,r)};function kf(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.Transforms.insertNodes(e,n,{mode:"highest"})}var Cf,Tf,Nf,Rf,Lf,Pf,Mf,Df,Af,jf,If,$f,Ff,Bf,_f,Uf,Hf,zf,Wf,Vf,qf,Kf,Gf,Jf,Yf,Xf,Qf,Zf,ed,td,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd=function(e){var n=e,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward;return n.insertText=function(e){n.getConfig().readOnly||i(e)},n.apply=function(e){var r,o,i,s,u,l,c,f,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var h=po(t.Editor.levels(n,{at:e.path})),p=h.next();!p.done;p=h.next()){var g=go(p.value,2),v=g[0],m=g[1],y=xf.findKey(n,v);d.push([m,y])}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var b=po(t.Editor.levels(n,{at:t.Path.parent(e.path)})),w=b.next();!w.done;w=b.next()){var x=go(w.value,2);v=x[0],m=x[1],y=xf.findKey(n,v);d.push([m,y])}}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=po(t.Editor.levels(n,{at:t.Path.common(t.Path.parent(e.path),t.Path.parent(e.newPath))})),S=E.next();!S.done;S=E.next()){var O=go(S.value,2);v=O[0],m=O[1],y=xf.findKey(n,v);d.push([m,y])}}catch(e){u={error:e}}finally{try{S&&!S.done&&(l=E.return)&&l.call(E)}finally{if(u)throw u.error}}}a(e);try{for(var k=po(d),C=k.next();!C.done;C=k.next()){var T=go(C.value,2);m=T[0],y=T[1],v=go(t.Editor.node(n,m),1)[0];Wa.set(v,y)}}catch(e){c={error:e}}finally{try{C&&!C.done&&(f=k.return)&&f.call(k)}finally{if(c)throw c.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(e.selection&&t.Range.isCollapsed(e.selection)){var o=t.Editor.above(e,{match:function(n){return t.Editor.isBlock(e,n)},at:e.selection});if(o){var i=go(o,2)[1],a=t.Editor.range(e,i,e.selection.anchor),u=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(Of(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;)Of(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)}(n,a);t.Range.isCollapsed(u)||t.Transforms.delete(e,{at:u})}}},n.onChange=function(){var e=n.selection;null!=e&&Ka.set(n,e),n.emit("change"),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var e=n.children;return(void 0===e?[]:e).map((function(e){return Ef(e,n)})).join("")},n.getText=function(){var e=n.children;return(void 0===e?[]:e).map((function(e){return t.Node.string(e)})).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":t.Editor.string(e,r)},n.getElemsByType=function(e,r){var o,i;void 0===r&&(r=!1);var a=[],s=t.Editor.nodes(n,{at:[],universal:!0});try{for(var u=po(s),l=u.next();!l.done;l=u.next()){var c=go(l.value,1)[0];if(t.Element.isElement(c))if(r?c.type.indexOf(e)>=0:c.type===e){var f=xf.findKey(n,c),d=Zc(c.type,f.id);a.push(co(co({},c),{id:d}))}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(e){return n.getElemsByType(e,!0)},n.isEmpty=function(){var e=n.children,r=void 0===e?[]:e;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!t.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||t.Text.isText(s)&&""===s.text},n.clear=function(){t.Transforms.delete(n,{at:{anchor:t.Editor.start(n,[]),focus:t.Editor.end(n,[])}}),0===n.children.length&&t.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(e){return xf.getParentNode(n,e)},n.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e){var i=document.createElement("div");i.innerHTML=e;var a=Array.from(i.childNodes);if(a=a.filter((function(e){var t=e.nodeName;return!!Oc(e)||!!Ec(e)&&!iu.has(t.toLowerCase())})),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(xf.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach((function(e,t){var r=e.nodeName,i=e.textContent,s=void 0===i?"":i;if(Oc(e)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=e,c=!1;if(Hc.includes(r.toLowerCase()))c=!0;else for(var f in Vc)if(u.matches(f)){c=!0;break}if(c){var d=Yc(o(u),n);return Array.isArray(d)?(d.forEach((function(e){return kf(n,e)})),l+=1):(kf(n,d),l+=1),void(xf.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!xf.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(t>=1){var p=a[t-1];mc(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")})),l&&u&&xf.isEmptyPath(n,u)&&t.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(e){void 0===e&&(e="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var a=Qc(n,null==e?"":e);if(t.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(i))}catch(e){n.select(t.Editor.start(n,[]))}},n},hd=1,pd=function(e){var n=e;return n.id="wangEditor-".concat(hd++),n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(e){if(xf.toDOMNode(n,n).focus({preventScroll:!0}),qa.set(n,!0),e){var r=t.Editor.end(n,[]);t.Transforms.select(n,r)}else{var o=Ka.get(n);o?t.Transforms.select(n,o):t.Transforms.select(n,t.Editor.start(n,[]))}},n.isFocused=function(){return!!qa.get(n)},n.blur=function(){xf.toDOMNode(n,n).blur(),t.Transforms.deselect(n),qa.set(n,!1)},n.updateView=function(){xf.getTextarea(n).changeViewState();var e=xf.getToolbar(n);e&&e.changeToolbarState();var t=xf.getHoverbar(n);t&&t.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var e=xf.getTextarea(n);e.destroy(),ka.delete(n),Ca.delete(e);var t=xf.getToolbar(n);t&&(t.destroy(),Na.delete(n),Ta.delete(t));var r=xf.getHoverbar(n);r&&(r.destroy(),La.delete(n),Ra.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=o("#".concat(e));if(0!==r.length){var i=r[0];if(!xf.hasDOMNode(n,i)){t="Element (found by id is '".concat(e,"') is not in editor DOM");return t+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(t,i)}var a=xf.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(e){e<1||xf.getTextarea(n).changeProgress(e)},n.hidePanelOrModal=function(){var e=Ma.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 xf.toDOMNode(n,e)},n.fullScreen=function(){if(!n.isFullScreen){var e=null,t=xf.getToolbar(n);t&&(e=t.$box);var r=xf.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=xf.getTextarea(n).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit("unFullScreen")}),200)}},n.getEditableContainer=function(){return xf.getTextarea(n).$textAreaContainer[0]},n},gd={exports:{}},vd={exports:{}};function md(){if(Tf)return Cf;Tf=1;return Cf=function(e){return null!=e}}function yd(){if(Pf)return Lf;Pf=1;var e=function(){if(Rf)return Nf;Rf=1;var e=md(),t={object:!0,function:!0,undefined:!0};return Nf=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Lf=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function bd(){if(jf)return Af;jf=1;var e=function(){if(Df)return Mf;Df=1;var e=yd();return Mf=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Af=function(r){return!!e(r)&&!t.test(n.call(r))}}function wd(){if(zf)return Hf;zf=1;var e=(Uf?_f:(Uf=1,_f=function(){}))();return Hf=function(t){return t!==e&&null!==t}}function xd(){return Kf||(Kf=1,qf=(Bf?Ff:(Bf=1,Ff=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Vf)return Wf;Vf=1;var e=wd(),t=Object.keys;return Wf=function(n){return t(e(n)?Object(n):n)}}()),qf}function Ed(){if(Xf)return Yf;Xf=1;var e=xd(),t=function(){if(Jf)return Gf;Jf=1;var e=wd();return Gf=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Yf=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},Yf}function Sd(){return Zf?Qf:(Zf=1,Qf=($f||($f=1,If=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")}),If)()?Object.assign:Ed())}function Od(){return sd||(sd=1,ad=function(){if(rd)return nd;rd=1;var e="razdwatrzy";return nd=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(id)return od;id=1;var e=String.prototype.indexOf;return od=function(t){return e.call(this,t,arguments[1])>-1},od}()),ad}function kd(){if(ud)return vd.exports;ud=1;var e=md(),t=bd(),n=Sd(),r=function(){if(td)return ed;td=1;var e=wd(),t=Array.prototype.forEach,n=Object.create;return ed=function(r){var o=n(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)})),o},ed}(),o=Od(),i=vd.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"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],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(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},vd.exports}var Cd=(fd||(fd=1,function(e,t){var n,r,o,i,a,s,u,l=kd(),c=cd?ld:(cd=1,ld=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),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(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e){var t,n,r,o,i;if(v.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)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),t=1;t<n;++t)i[t-1]=arguments[t];f.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,r,o,i;if(c(t),!v.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},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(gd,gd.exports)),gd.exports),Td=g(Cd);function Nd(e){var t=Ga.get(e);return null==t&&(t=Td(),Ga.set(e,t)),t}var Rd=new WeakMap;function Ld(e,t){var n=Rd.get(e);null==n&&(n=new Set,Rd.set(e,n)),n.add(t)}var Pd,Md,Dd,Ad,jd,Id,$d=function(e){var t=e;return t.on=function(e,n){var r=Nd(t);if(r.on(e,n),"destroyed"===e&&Ld(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ld(t,o)}},t.once=function(e,n){Nd(t).once(e,n)},t.off=function(e,n){Nd(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Nd(t);if(o.emit.apply(o,vo([e],go(n),!1)),"destroyed"===e){var i=function(e){return Rd.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){Rd.set(e,new Set)}(t)}},t},Fd={};function Bd(){if(Md)return Pd;Md=1;var e=R(),t=wt(),n=L(),r=ht(),o=t("iterator");return Pd=!e((function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),a="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),a+=n+e})),i.delete("a",2),i.delete("b",void 0),r&&(!e.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!t.size&&(r||!n)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==a||"x"!==new URL("https://x",void 0).host}))}function _d(){if(Ad)return Dd;Ad=1;var e=L(),t=Se(),n=M(),r=R(),o=Nr(),i=cr(),a=xe(),s=mt(),u=ke(),l=Object.assign,c=Object.defineProperty,f=t([].concat);return Dd=!l||r((function(){if(e&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(e){n[e]=e})),7!==l({},t)[r]||o(l({},n)).join("")!==i}))?function(t,r){for(var l=s(t),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++],e&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Dd}function Ud(){if(Id)return jd;Id=1;var e=Se(),t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,o="Overflow: input needs wider integers to process",i=RangeError,a=e(r.exec),s=Math.floor,u=String.fromCharCode,l=e("".charCodeAt),c=e([].join),f=e([].push),d=e("".replace),h=e("".split),p=e("".toLowerCase),g=function(e){return e+22+75*(e<26)},v=function(e,t,n){var r=0;for(e=n?s(e/700):e>>1,e+=s(e/t);e>455;)e=s(e/35),r+=36;return s(r+36*e/(e+38))},m=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=l(e,n++);if(o>=55296&&o<=56319&&n<r){var i=l(e,n++);56320==(64512&i)?f(t,((1023&o)<<10)+(1023&i)+65536):(f(t,o),n--)}else f(t,o)}return t}(e);var r,a,d=e.length,h=128,p=0,m=72;for(r=0;r<e.length;r++)(a=e[r])<128&&f(n,u(a));var y=n.length,b=y;for(y&&f(n,"-");b<d;){var w=t;for(r=0;r<e.length;r++)(a=e[r])>=h&&a<w&&(w=a);var x=b+1;if(w-h>s((t-p)/x))throw new i(o);for(p+=(w-h)*x,h=w,r=0;r<e.length;r++){if((a=e[r])<h&&++p>t)throw new i(o);if(a===h){for(var E=p,S=36;;){var O=S<=m?1:S>=m+26?26:S-m;if(E<O)break;var k=E-O,C=36-O;f(n,u(g(O+k%C))),E=s(k/C),S+=36}f(n,u(g(E))),m=v(p,x,b===y),p=0,b++}}p++,h++}return c(n,"")};return jd=function(e){var t,o,i=[],s=h(d(p(e),r,"."),".");for(t=0;t<s.length;t++)o=s[t],f(i,a(n,o)?"xn--"+m(o):o);return c(i,".")}}var Hd,zd,Wd,Vd,qd,Kd,Gd,Jd={};function Yd(){if(Wd)return zd;Wd=1;var e=ua(),t=Math.floor,n=function(r,o){var i=r.length;if(i<8)for(var a,s,u=1;u<i;){for(s=u,a=r[u];s&&o(r[s-1],a)>0;)r[s]=r[--s];s!==u++&&(r[s]=a)}else for(var l=t(i/2),c=n(e(r,0,l),o),f=n(e(r,l),o),d=c.length,h=f.length,p=0,g=0;p<d||g<h;)r[p+g]=p<d&&g<h?o(c[p],f[g])<=0?c[p++]:f[g++]:p<d?c[p++]:f[g++];return r};return zd=n}function Xd(){if(qd)return Vd;qd=1,hi(),function(){if(Hd)return Jd;Hd=1;var e=pr(),t=Se(),n=Nn(),r=RangeError,o=String.fromCharCode,i=String.fromCodePoint,a=t([].join);e({target:"String",stat:!0,arity:1,forced:!!i&&1!==i.length},{fromCodePoint:function(e){for(var t,i=[],s=arguments.length,u=0;s>u;){if(t=+arguments[u++],n(t,1114111)!==t)throw new r(t+" is not a valid code point");i[u]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return a(i,"")}})}();var e=pr(),t=b(),n=bl(),r=Pe(),o=M(),i=Se(),a=L(),s=Bd(),u=un(),l=qs(),c=Ri(),f=ai(),d=si(),h=an(),p=ma(),g=Re(),v=yt(),m=Qr(),y=br(),w=jt(),x=Le(),E=wi(),S=ti(),O=Ee(),k=pa(),C=ha(),T=di(),N=vl(),R=wt(),P=Yd(),D=R("iterator"),A="URLSearchParams",j=A+"Iterator",I=h.set,$=h.getterFor(A),F=h.getterFor(j),B=n("fetch"),_=n("Request"),U=n("Headers"),H=_&&_.prototype,z=U&&U.prototype,W=t.TypeError,V=t.encodeURIComponent,q=String.fromCharCode,K=r("String","fromCodePoint"),G=parseInt,J=i("".charAt),Y=i([].join),X=i([].push),Q=i("".replace),Z=i([].shift),ee=i([].splice),te=i("".split),ne=i("".slice),re=i(/./.exec),oe=/\+/g,ie=/^[0-9a-f]+$/i,ae=function(e,t){var n=ne(e,t,t+2);return re(ie,n)?G(n,16):NaN},se=function(e){for(var t=0,n=128;n>0&&e&n;n>>=1)t++;return t},ue=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},le=function(e){for(var t=(e=Q(e,oe," ")).length,n="",r=0;r<t;){var o=J(e,r);if("%"===o){if("%"===J(e,r+1)||r+3>t){n+="%",r++;continue}var i=ae(e,r+1);if(i!=i){n+=o,r++;continue}r+=2;var a=se(i);if(0===a)o=q(i);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[i],u=1;u<a&&!(++r+3>t||"%"!==J(e,r));){var l=ae(e,r+1);if(l!=l){r+=3;break}if(l>191||l<128)break;X(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=ue(s);null===c?n+="�":o=K(c)}}n+=o,r++}return n},ce=/[!'()~]|%20/g,fe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},de=function(e){return fe[e]},he=function(e){return Q(V(e),ce,de)},pe=d((function(e,t){I(this,{type:j,target:$(e).entries,index:0,kind:t})}),A,(function(){var e=F(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,T(void 0,!0);var r=t[n];switch(e.kind){case"keys":return T(r.key,!1);case"values":return T(r.value,!1)}return T([r.key,r.value],!1)}),!0),ge=function(e){this.entries=[],this.url=null,void 0!==e&&(x(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===J(e,0)?ne(e,1):e:E(e)))};ge.prototype={type:A,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,u,l=this.entries,c=C(e);if(c)for(n=(t=k(e,c)).next;!(r=o(n,t)).done;){if(a=(i=k(w(r.value))).next,(s=o(a,i)).done||(u=o(a,i)).done||!o(a,i).done)throw new W("Expected sequence with length 2");X(l,{key:E(s.value),value:E(u.value)})}else for(var f in e)v(e,f)&&X(l,{key:f,value:E(e[f])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,o=te(e,"&"),i=0;i<o.length;)(t=o[i++]).length&&(n=te(t,"="),X(r,{key:le(Z(n)),value:le(Y(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],X(n,he(e.key)+"="+he(e.value));return Y(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ve=function(){p(this,me);var e=I(this,new ge(arguments.length>0?arguments[0]:void 0));a||(this.size=e.entries.length)},me=ve.prototype;if(c(me,{append:function(e,t){var n=$(this);N(arguments.length,2),X(n.entries,{key:E(e),value:E(t)}),a||this.length++,n.updateURL()},delete:function(e){for(var t=$(this),n=N(arguments.length,1),r=t.entries,o=E(e),i=n<2?void 0:arguments[1],s=void 0===i?i:E(i),u=0;u<r.length;){var l=r[u];if(l.key!==o||void 0!==s&&l.value!==s)u++;else if(ee(r,u,1),void 0!==s)break}a||(this.size=r.length),t.updateURL()},get:function(e){var t=$(this).entries;N(arguments.length,1);for(var n=E(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=$(this).entries;N(arguments.length,1);for(var n=E(e),r=[],o=0;o<t.length;o++)t[o].key===n&&X(r,t[o].value);return r},has:function(e){for(var t=$(this).entries,n=N(arguments.length,1),r=E(e),o=n<2?void 0:arguments[1],i=void 0===o?o:E(o),a=0;a<t.length;){var s=t[a++];if(s.key===r&&(void 0===i||s.value===i))return!0}return!1},set:function(e,t){var n=$(this);N(arguments.length,1);for(var r,o=n.entries,i=!1,s=E(e),u=E(t),l=0;l<o.length;l++)(r=o[l]).key===s&&(i?ee(o,l--,1):(i=!0,r.value=u));i||X(o,{key:s,value:u}),a||(this.size=o.length),n.updateURL()},sort:function(){var e=$(this);P(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=$(this).entries,r=m(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new pe(this,"keys")},values:function(){return new pe(this,"values")},entries:function(){return new pe(this,"entries")}},{enumerable:!0}),u(me,D,me.entries,{name:"entries"}),u(me,"toString",(function(){return $(this).serialize()}),{enumerable:!0}),a&&l(me,"size",{get:function(){return $(this).entries.length},configurable:!0,enumerable:!0}),f(ve,A),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:ve}),!s&&g(U)){var ye=i(z.has),be=i(z.set),we=function(e){if(x(e)){var t,n=e.body;if(y(n)===A)return t=e.headers?new U(e.headers):new U,ye(t,"content-type")||be(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S(e,{body:O(0,E(n)),headers:O(0,t)})}return e};if(g(B)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return B(e,arguments.length>1?we(arguments[1]):{})}}),g(_)){var xe=function(e){return p(this,H),new _(e,arguments.length>1?we(arguments[1]):{})};H.constructor=xe,xe.prototype=H,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:xe})}}return Vd={URLSearchParams:ve,getState:$}}function Qd(){if(Kd)return Fd;Kd=1,Ei();var e,t=pr(),n=L(),r=Bd(),o=b(),i=Qr(),a=Se(),s=un(),u=qs(),l=ma(),c=yt(),f=_d(),d=is(),h=ua(),p=xi().codeAt,g=Ud(),v=wi(),m=ai(),y=vl(),w=Xd(),x=an(),E=x.set,S=x.getterFor("URL"),O=w.URLSearchParams,k=w.getState,C=o.URL,T=o.TypeError,N=o.parseInt,R=Math.floor,P=Math.pow,M=a("".charAt),D=a(/./.exec),A=a([].join),j=a(1..toString),I=a([].pop),$=a([].push),F=a("".replace),B=a([].shift),_=a("".split),U=a("".slice),H=a("".toLowerCase),z=a([].unshift),W="Invalid scheme",V="Invalid host",q="Invalid port",K=/[a-z]/i,G=/[\d+-.a-z]/i,J=/\d/,Y=/^0x/i,X=/^[0-7]+$/,Q=/^\d+$/,Z=/^[\da-f]+$/i,ee=/[\0\t\n\r #%/:<>?@[\\\]^|]/,te=/[\0\t\n\r #/:<>?@[\\\]^|]/,ne=/^[\u0000-\u0020]+/,re=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oe=/[\t\n\r]/g,ie=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)z(t,e%256),e=R(e/256);return A(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n?r:t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=j(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ae={},se=f({},ae,{" ":1,'"':1,"<":1,">":1,"`":1}),ue=f({},se,{"#":1,"?":1,"{":1,"}":1}),le=f({},ue,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ce=function(e,t){var n=p(e,0);return n>32&&n<127&&!c(t,e)?e:encodeURIComponent(e)},fe={ftp:21,file:null,http:80,https:443,ws:80,wss:443},de=function(e,t){var n;return 2===e.length&&D(K,M(e,0))&&(":"===(n=M(e,1))||!t&&"|"===n)},he=function(e){var t;return e.length>1&&de(U(e,0,2))&&(2===e.length||"/"===(t=M(e,2))||"\\"===t||"?"===t||"#"===t)},pe=function(e){return"."===e||"%2e"===H(e)},ge={},ve={},me={},ye={},be={},we={},xe={},Ee={},Oe={},ke={},Ce={},Te={},Ne={},Re={},Le={},Pe={},Me={},De={},Ae={},je={},Ie={},$e=function(e,t,n){var r,o,i,a=v(e);if(t){if(o=this.parse(a))throw new T(o);this.searchParams=null}else{if(void 0!==n&&(r=new $e(n,!0)),o=this.parse(a,null,r))throw new T(o);(i=k(new O)).bindURL(this),this.searchParams=i}};$e.prototype={type:"URL",parse:function(t,n,r){var o,i,a,s,u,l=this,f=n||ge,p=0,g="",m=!1,y=!1,b=!1;for(t=v(t),n||(l.scheme="",l.username="",l.password="",l.host=null,l.port=null,l.path=[],l.query=null,l.fragment=null,l.cannotBeABaseURL=!1,t=F(t,ne,""),t=F(t,re,"$1")),t=F(t,oe,""),o=d(t);p<=o.length;){switch(i=o[p],f){case ge:if(!i||!D(K,i)){if(n)return W;f=me;continue}g+=H(i),f=ve;break;case ve:if(i&&(D(G,i)||"+"===i||"-"===i||"."===i))g+=H(i);else{if(":"!==i){if(n)return W;g="",f=me,p=0;continue}if(n&&(l.isSpecial()!==c(fe,g)||"file"===g&&(l.includesCredentials()||null!==l.port)||"file"===l.scheme&&!l.host))return;if(l.scheme=g,n)return void(l.isSpecial()&&fe[l.scheme]===l.port&&(l.port=null));g="","file"===l.scheme?f=Re:l.isSpecial()&&r&&r.scheme===l.scheme?f=ye:l.isSpecial()?f=Ee:"/"===o[p+1]?(f=be,p++):(l.cannotBeABaseURL=!0,$(l.path,""),f=Ae)}break;case me:if(!r||r.cannotBeABaseURL&&"#"!==i)return W;if(r.cannotBeABaseURL&&"#"===i){l.scheme=r.scheme,l.path=h(r.path),l.query=r.query,l.fragment="",l.cannotBeABaseURL=!0,f=Ie;break}f="file"===r.scheme?Re:we;continue;case ye:if("/"!==i||"/"!==o[p+1]){f=we;continue}f=Oe,p++;break;case be:if("/"===i){f=ke;break}f=De;continue;case we:if(l.scheme=r.scheme,i===e)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query;else if("/"===i||"\\"===i&&l.isSpecial())f=xe;else if("?"===i)l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query="",f=je;else{if("#"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.path.length--,f=De;continue}l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,l.path=h(r.path),l.query=r.query,l.fragment="",f=Ie}break;case xe:if(!l.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){l.username=r.username,l.password=r.password,l.host=r.host,l.port=r.port,f=De;continue}f=ke}else f=Oe;break;case Ee:if(f=Oe,"/"!==i||"/"!==M(g,p+1))continue;p++;break;case Oe:if("/"!==i&&"\\"!==i){f=ke;continue}break;case ke:if("@"===i){m&&(g="%40"+g),m=!0,a=d(g);for(var w=0;w<a.length;w++){var x=a[w];if(":"!==x||b){var E=ce(x,le);b?l.password+=E:l.username+=E}else b=!0}g=""}else if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(m&&""===g)return"Invalid authority";p-=d(g).length+1,g="",f=Ce}else g+=i;break;case Ce:case Te:if(n&&"file"===l.scheme){f=Pe;continue}if(":"!==i||y){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()){if(l.isSpecial()&&""===g)return V;if(n&&""===g&&(l.includesCredentials()||null!==l.port))return;if(s=l.parseHost(g))return s;if(g="",f=Me,n)return;continue}"["===i?y=!0:"]"===i&&(y=!1),g+=i}else{if(""===g)return V;if(s=l.parseHost(g))return s;if(g="",f=Ne,n===Te)return}break;case Ne:if(!D(J,i)){if(i===e||"/"===i||"?"===i||"#"===i||"\\"===i&&l.isSpecial()||n){if(""!==g){var S=N(g,10);if(S>65535)return q;l.port=l.isSpecial()&&S===fe[l.scheme]?null:S,g=""}if(n)return;f=Me;continue}return q}g+=i;break;case Re:if(l.scheme="file","/"===i||"\\"===i)f=Le;else{if(!r||"file"!==r.scheme){f=De;continue}switch(i){case e:l.host=r.host,l.path=h(r.path),l.query=r.query;break;case"?":l.host=r.host,l.path=h(r.path),l.query="",f=je;break;case"#":l.host=r.host,l.path=h(r.path),l.query=r.query,l.fragment="",f=Ie;break;default:he(A(h(o,p),""))||(l.host=r.host,l.path=h(r.path),l.shortenPath()),f=De;continue}}break;case Le:if("/"===i||"\\"===i){f=Pe;break}r&&"file"===r.scheme&&!he(A(h(o,p),""))&&(de(r.path[0],!0)?$(l.path,r.path[0]):l.host=r.host),f=De;continue;case Pe:if(i===e||"/"===i||"\\"===i||"?"===i||"#"===i){if(!n&&de(g))f=De;else if(""===g){if(l.host="",n)return;f=Me}else{if(s=l.parseHost(g))return s;if("localhost"===l.host&&(l.host=""),n)return;g="",f=Me}continue}g+=i;break;case Me:if(l.isSpecial()){if(f=De,"/"!==i&&"\\"!==i)continue}else if(n||"?"!==i)if(n||"#"!==i){if(i!==e&&(f=De,"/"!==i))continue}else l.fragment="",f=Ie;else l.query="",f=je;break;case De:if(i===e||"/"===i||"\\"===i&&l.isSpecial()||!n&&("?"===i||"#"===i)){if(".."===(u=H(u=g))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(l.shortenPath(),"/"===i||"\\"===i&&l.isSpecial()||$(l.path,"")):pe(g)?"/"===i||"\\"===i&&l.isSpecial()||$(l.path,""):("file"===l.scheme&&!l.path.length&&de(g)&&(l.host&&(l.host=""),g=M(g,0)+":"),$(l.path,g)),g="","file"===l.scheme&&(i===e||"?"===i||"#"===i))for(;l.path.length>1&&""===l.path[0];)B(l.path);"?"===i?(l.query="",f=je):"#"===i&&(l.fragment="",f=Ie)}else g+=ce(i,ue);break;case Ae:"?"===i?(l.query="",f=je):"#"===i?(l.fragment="",f=Ie):i!==e&&(l.path[0]+=ce(i,ae));break;case je:n||"#"!==i?i!==e&&("'"===i&&l.isSpecial()?l.query+="%27":l.query+="#"===i?"%23":ce(i,ae)):(l.fragment="",f=Ie);break;case Ie:i!==e&&(l.fragment+=ce(i,se))}p++}},parseHost:function(e){var t,n,r;if("["===M(e,0)){if("]"!==M(e,e.length-1))return V;if(t=function(e){var t,n,r,o,i,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return M(e,f)};if(":"===d()){if(":"!==M(e,1))return;f+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=n=0;n<4&&D(Z,d());)t=16*t+N(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,l>6)return;for(r=0;d();){if(o=null,r>0){if(!("."===d()&&r<4))return;f++}if(!D(J,d()))return;for(;D(J,d());){if(i=N(d(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;f++}u[l]=256*u[l]+o,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(U(e,1,-1)),!t)return V;this.host=t}else if(this.isSpecial()){if(e=g(e),D(ee,e))return V;if(t=function(e){var t,n,r,o,i,a,s,u=_(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(o=u[r]))return e;if(i=10,o.length>1&&"0"===M(o,0)&&(i=D(Y,o)?16:8,o=U(o,8===i?1:2)),""===o)a=0;else{if(!D(10===i?Q:8===i?X:Z,o))return e;a=N(o,i)}$(n,a)}for(r=0;r<t;r++)if(a=n[r],r===t-1){if(a>=P(256,5-t))return null}else if(a>255)return null;for(s=I(n),r=0;r<n.length;r++)s+=n[r]*P(256,3-r);return s}(e),null===t)return V;this.host=t}else{if(D(te,e))return V;for(t="",n=d(e),r=0;r<n.length;r++)t+=ce(n[r],ae);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return c(fe,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&de(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ie(o),null!==i&&(l+=":"+i)):"file"===t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+A(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw new T(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Fe(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+ie(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(v(e)+":",ge)},getUsername:function(){return this.username},setUsername:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ce(t[n],le)}},getPassword:function(){return this.password},setPassword:function(e){var t=d(v(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ce(t[n],le)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ie(e):ie(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ce)},getHostname:function(){var e=this.host;return null===e?"":ie(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Te)},getPort:function(){var e=this.port;return null===e?"":v(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=v(e))?this.port=null:this.parse(e,Ne))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+A(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Me))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=v(e))?this.query=null:("?"===M(e,0)&&(e=U(e,1)),this.query="",this.parse(e,je)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=v(e))?("#"===M(e,0)&&(e=U(e,1)),this.fragment="",this.parse(e,Ie)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Fe=function(e){var t=l(this,Be),r=y(arguments.length,1)>1?arguments[1]:void 0,o=E(t,new $e(e,!1,r));n||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},Be=Fe.prototype,_e=function(e,t){return{get:function(){return S(this)[e]()},set:t&&function(e){return S(this)[t](e)},configurable:!0,enumerable:!0}};if(n&&(u(Be,"href",_e("serialize","setHref")),u(Be,"origin",_e("getOrigin")),u(Be,"protocol",_e("getProtocol","setProtocol")),u(Be,"username",_e("getUsername","setUsername")),u(Be,"password",_e("getPassword","setPassword")),u(Be,"host",_e("getHost","setHost")),u(Be,"hostname",_e("getHostname","setHostname")),u(Be,"port",_e("getPort","setPort")),u(Be,"pathname",_e("getPathname","setPathname")),u(Be,"search",_e("getSearch","setSearch")),u(Be,"searchParams",_e("getSearchParams")),u(Be,"hash",_e("getHash","setHash"))),s(Be,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),s(Be,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),C){var Ue=C.createObjectURL,He=C.revokeObjectURL;Ue&&s(Fe,"createObjectURL",i(Ue,C)),He&&s(Fe,"revokeObjectURL",i(He,C))}return m(Fe,"URL"),t({global:!0,constructor:!0,forced:!r,sham:!n},{URL:Fe}),Fd}Gd||(Gd=1,Qd());var Zd,eh={};!function(){if(Zd)return eh;Zd=1;var e=pr(),t=M();e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}})}();var th;th||(th=1,Xd());var nh,rh={};function oh(e){return fo(this,void 0,void 0,(function(){var t,n,r;return ho(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(e)];case 1:if(!(t=o.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,t.blob()];case 2:return n=o.sent(),[2,new Promise((function(e,t){var r=new FileReader;r.onloadend=function(){e(r.result)},r.onerror=function(){t(new Error("Failed to read blob as data URL"))},r.readAsDataURL(n)}))];case 3:return r=o.sent(),console.error(r),[2,null];case 4:return[2]}}))}))}!function(){if(nh)return rh;nh=1;var e=M(),t=ku(),n=jt(),r=Ce(),o=Rn(),i=wi(),a=Te(),s=_e(),u=Nu(),l=Ru();t("match",(function(t,c,f){return[function(n){var o=a(this),u=r(n)?void 0:s(n,t);return u?e(u,n,o):new RegExp(n)[t](i(o))},function(e){var t=n(this),r=i(e),a=f(c,t,r);if(a.done)return a.value;if(!t.global)return l(t,r);var s=t.unicode;t.lastIndex=0;for(var d,h=[],p=0;null!==(d=l(t,r));){var g=i(d[0]);h[p]=g,""===g&&(t.lastIndex=u(r,o(t.lastIndex),s)),p++}return 0===p?null:h}]}))}();var ih,ah=function(e){var n=e;return n.setFragmentData=function(e){var r=n.selection;if(r){var o=go(t.Range.edges(r),2),i=o[0],a=o[1],s=t.Editor.void(n,{at:i.path}),u=t.Editor.void(n,{at:a.path});if(!t.Range.isCollapsed(r)||s){var l=xf.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(f=e)})),u){var d=go(u,1)[0],h=l.cloneRange(),p=xf.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(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Oc(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),e.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),e.setData("text/html",b.innerHTML),e.setData("text/plain",Pc(b)),c.ownerDocument.body.removeChild(b),e}}},n.insertData=function(e){return fo(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,l,c,f,d,h,p,g,v,m;return ho(this,(function(y){switch(y.label){case 0:return(r=e.getData("application/x-slate-fragment"))?(o=decodeURIComponent(window.atob(r)),i=JSON.parse(o),n.insertFragment(i),[2]):(a=e.getData("text/plain"),s=e.getData("text/html"),vf?(u=function(e){var t=e.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return t?t[1]:null}(s),u?[4,oh(u)]:[3,2]):[3,2]);case 1:(l=y.sent())&&(s='<img src="'.concat(l,'" alt="image.png">'),URL.revokeObjectURL(u)),y.label=2;case 2:if(s)return n.dangerouslyInsertHtml(s),[2];if(c=xf.getLeftLengthOfMaxLength(n),a){f=a.split(/\n\r|\r\n|\r|\n/),d=!1;try{for(h=po(f),p=h.next();!p.done;p=h.next())g=p.value,d&&c>0&&t.Transforms.splitNodes(n,{always:!0}),n.insertText(g),d=!0}catch(e){v={error:e}}finally{try{p&&!p.done&&(m=h.return)&&m.call(h)}finally{if(v)throw v.error}}}return[2]}}))}))},n},sh={};!function(){if(ih)return sh;ih=1;var e=pr(),t=gr(),n=wr(),r=Le(),o=Nn(),i=Ln(),a=Ne(),s=mr(),u=wt(),l=Sr(),c=ua(),f=l("slice"),d=u("species"),h=Array,p=Math.max;e({target:"Array",proto:!0,forced:!f},{slice:function(e,u){var l,f,g,v=a(this),m=i(v),y=o(e,m),b=o(void 0===u?m:u,m);if(t(v)&&(l=v.constructor,(n(l)&&(l===h||t(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 uh=function(e){var n=e,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(e){if(n.getConfig().maxLength){var t=xf.getLeftLengthOfMaxLength(n);t<=0||(t<e.length?r(e.slice(0,t)):r(e))}else r(e)},n.insertNode=function(e){if(n.getConfig().maxLength){var r=xf.getLeftLengthOfMaxLength(n);if(!(r<=0))r<t.Node.string(e).length||o(e)}else o(e)},n.insertFragment=function(e){if(n.getConfig().maxLength){if(e.length>0){var r=e[0];if(xf.getLeftLengthOfMaxLength(n)<t.Node.string(r).length)return;i([r]);for(var o=1;o<e.length;o+=1)n.insertNode(e[o])}}else i(e)},n.dangerouslyInsertHtml=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=!1),e)if(n.getConfig().maxLength){var r=xf.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?Oc(t)?e+(t.textContent||""):Ec(t)?iu.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||a(e,t)}}else a(e,t)},n};function lh(e){var t=xf.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function ch(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=lh(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=xf.toDOMRange(e,n),l=u.getClientRects?u.getClientRects()[0]:null;if(null==l)return t;var c=l.height,f={},d=l.top-o,h=l.left-i;if(h>a/2){var p=a-h;f.right="".concat(p+5,"px")}else f.left="".concat(h+5,"px");if(d>s/2){var g=s-d;f.bottom="".concat(g+5,"px")}else{var v=d+c;v<0&&(v=0),f.top="".concat(v+5,"px")}return f}function fh(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=za.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=Mc(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=lh(e);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){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{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function dh(e,t){rc((function(){var n=lh(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,f=t.width(),d=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=t.css("left"),x=parseInt(w.toString(),10)-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(),10)-Math.abs(c);t.css("right","".concat(S,"px"))}}}))}var hh=function(e){var n=e;return n.select=function(e){t.Transforms.select(n,e)},n.deselect=function(){var r=n.selection,o=xf.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=Ka.get(n);null!=e&&(n.focus(),t.Transforms.select(n,e))},n.getSelectionPosition=function(){return ch(n)},n.getNodePosition=function(e){return fh(n,e)},n.isSelectedAll=function(){var e=n.selection;if(null==e)return!1;var r=go(t.Range.edges(e),2),o=r[0],i=r[1],a=go(t.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!t.Point.equals(o,s)||!t.Point.equals(i,u))},n.selectAll=function(){var e=t.Editor.start(n,[]),r=t.Editor.end(n,[]);t.Transforms.select(n,{anchor:e,focus:r})},n};const ph={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class gh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ph,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){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)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new gh(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new gh(this.logger,e)}}var vh=new gh;class mh{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const yh=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},bh=e=>null==e?"":""+e,wh=/###/g,xh=e=>e&&e.indexOf("###")>-1?e.replace(wh,"."):e,Eh=e=>!e||"string"==typeof e,Sh=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(Eh(e))return{};const t=xh(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Eh(e)?{}:{obj:e,k:xh(r[o])}},Oh=(e,t,n)=>{const{obj:r,k:o}=Sh(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Sh(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Sh(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},kh=(e,t)=>{const{obj:n,k:r}=Sh(e,t);if(n)return n[r]},Ch=(e,t,n)=>{for(const 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]):Ch(e[r],t[r],n):e[r]=t[r]);return e},Th=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Nh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Rh=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Nh[e])):e;const Lh=[" ",",","?","!",";"],Ph=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Mh=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},Dh=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Ah extends mh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,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;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=kh(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Mh(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,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=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Oh(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,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(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=kh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ch(s,n,o):s={...s,...n},Oh(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var jh={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const Ih={};class $h extends mh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=vh.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Lh.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Ph.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);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!==t.joinArrays?t.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(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(f),n=e?[]:{},r=e?h:d;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(v&&"string"==typeof g&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,d=$h.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(t.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 e=this.resolve(i,{...t,keySeparator:!1});e&&e.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 e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}f=this.extendTranslation(f,e,t,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(t),c):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...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 e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!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: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=jh.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,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((e=>{this.isValidLookup(t)||(i=e,!Ih[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Ih[`${h[0]}-${e}`]=!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(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),f&&i.push(u+t)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),f&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let 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)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Fh=e=>e.charAt(0).toUpperCase()+e.slice(1);class Bh{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vh.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Dh(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Dh(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Fh(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]=Fh(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Fh(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let 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||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let _h=[{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}],Uh={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const Hh=["v1","v2","v3"],zh=["v4"],Wh={zero:0,one:1,two:2,few:3,many:4,other:5};class Vh{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=vh.create("pluralResolver"),this.options.compatibilityJSON&&!zh.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 e={};return _h.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:Uh[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Dh("dev"===e?"en":e),r=t.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(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>Wh[e]-Wh[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.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===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Hh.includes(this.options.compatibilityJSON)}}const qh=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=kh(e,n);return void 0!==r?r:kh(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Mh(e,n,r),void 0===i&&(i=Mh(t,n,r))),i},Kh=e=>e.replace(/\$/g,"$$$$");class Gh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vh.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,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}=e.interpolation;this.escape=void 0!==t?t:Rh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Th(o):i||"{{",this.suffix=a?Th(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?Th(f):d||Th("$t("),this.nestingSuffix=h?Th(h):p||Th(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=qh(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(qh(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,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:e=>Kh(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Kh(this.escape(e)):Kh(e)}].forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}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 ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=bh(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=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),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){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 e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=bh(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Jh=e=>{const t={};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=t[a];return s||(s=e(Dh(r),o),t[a]=s),s(n)}};class Yh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=vh.create("formatter"),this.options=e,this.formats={number:Jh(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Jh(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Jh(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Jh(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Jh(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jh(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.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:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e);return i}}class Xh extends mh{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=vh.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(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?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[t]&&(s[t]=!0)))})),r||(a[e]=!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(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=Sh(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,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(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){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 e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,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(t))this.logger.warn(`did not save key "${n}" as the namespace "${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!!!");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(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Qh=()=>({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:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Zh=e=>("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.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ep=()=>{};class tp extends mh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Zh(e),this.services={},this.logger=vh,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Qh();this.options={...r,...this.options,...Zh(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?vh.init(o(this.modules.logger),this.options):vh.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Yh);const n=new Bh(this.options);this.store=new Ah(this.options.resources,this.options);const i=this.services;i.logger=vh,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Vh(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Gh(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Xh(o(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(t,...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 $h(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(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=ep),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[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((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=yh(),a=()=>{const e=(e,t)=>{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(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ep;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=yh();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ep),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(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&&jh.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=yh();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,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)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);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,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&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(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){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([e,t].concat(s))}else i={...t};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(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=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=t.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=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=yh();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=yh();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Bh(Qh());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(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new tp(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ep;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new tp(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Ah(this.store.data,r),o.services.resourceStore=o.store),o.translator=new $h(o.services,r),o.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];o.emit(e,...n)})),o.init(r,t),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 np=tp.createInstance();np.createInstance=tp.createInstance,np.createInstance,np.dir,np.init,np.loadResources,np.reloadResources,np.use,np.changeLanguage,np.getFixedT,np.t,np.exists,np.setDefaultNamespace,np.hasLoadedNamespace,np.loadNamespaces,np.loadLanguages;var rp="translation";function op(e){return np.on("languageChanged",e),function(){return np.off("languageChanged",e)}}np.init({lng:"zh-CN",resources:{}});var ip=np.t.bind(np);function ap(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&&ap(t)}}function sp(){return o('<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 up(){return o('<div class="w-e-bar-divider"></div>')}function lp(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=pf?"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 cp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,a=t.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=t.title,u=t.hotkey,l=void 0===u?"":u,c=t.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);ap(h),d.append(h)}else d.text(s);lp(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),this.$elem.append(d),rc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),xp(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=xp(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=xp(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=xp(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=xp(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=o(n);ap(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=xp(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&lp(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),fp=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return lo(t,e),t.prototype.onButtonClick=function(){},t}(cp),dp=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Ma.get(e);null==t&&(t=new Set,Ma.set(e,t)),t.add(this),Da.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=Da.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=Da.get(this);e&&e.emit("modalOrPanelHide")}},e}(),hp=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return lo(t,e),t.prototype.genSelfElem=function(){return null},t}(dp),pp=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=sp();o.$button.append(i)}return o}return lo(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=xp(this);if(null==this.dropPanel){var n=new hp(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,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"})}}},t}(cp),gp=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",(function(e){return e.stopPropagation()})),i.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return lo(t,e),t.prototype.genSelfElem=function(){var e=this,t=o('<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=Da.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}(dp);var vp=function(e){function n(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return lo(n,e),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var e=xp(this),n=this.menu.getModalPositionNode(e);return t.Element.isElement(n)?fh(e,n,"modal"):ch(e)},n.prototype.handleModal=function(){var e=xp(this),t=this.menu;if(null==this.modal){var n=new gp(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=xp(this),r=this.menu;if(null!=r.getModalContentElem){var o=xf.getTextarea(n),i=xf.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 u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||dh(n,e.$elem),setTimeout((function(){n.blur()}))}},n}(cp);var mp=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=o('<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 lo(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=o("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,i=e.selected,a=e.styleForRenderMenuList,s=o('<li data-value="'.concat(t,'"></li>'));if(a&&s.css(a),i){var u=o('<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(o('<span data-value="'.concat(t,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(dp);var yp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=t.tag,a=t.title,s=t.width,u=t.iconSvg,l=void 0===u?"":u,c=t.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",e),lp(d,l,a,f,n),this.$elem.append(d),this.menu=t,rc((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),xp(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=xp(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new mp(t,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(t);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=o(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(t);r.renderList(i),r.show()}}}},e.prototype.onChange=function(e){var t=xp(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=xp(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=sp();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=xp(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}(),bp=function(){function e(e){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,i=this.$elem,a=this.$button;if(n){var s=o(n);ap(s),a.append(s)}else a.text(r);a.attr("data-menu-key",t);var u=sp();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}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 i=t.find("button"),a=i.length;if(0!==a){var s=0;i.each((function(e){o(e).hasClass("disabled")&&s++})),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),wp=new WeakMap;function xp(e){var t=Pa.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function Ep(e,t,n){void 0===n&&(n=!1);var r=wp.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new pp(e,t,n):a?new vp(e,t,n):new fp(e,t,n)}if("select"===o&&(r=new yp(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return wp.set(t,r),r}function Sp(e,n){var r=e.selection;return null!=r&&(!t.Range.isCollapsed(r)&&(!xf.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!t.Text.isText(n)))}var Op,kp=function(){function e(){var e=this;this.$elem=o('<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=s((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),rc((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),xf.getTextarea(t).$textAreaContainer.append(n),t.on(yo.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(yo.SCROLL,r),t.on(yo.FULLSCREEN,r),t.on(yo.UNFULLSCREEN,r)})),this.lngListen=op((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="undefined"!=typeof window?window.innerHeight:null;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;rc((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=up();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=bo[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=Ep(e,r);this.hoverbarItems.push(a),Pa.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=fh(n,e,"bar");return r.css(o),void dh(n,r)}if(t.Text.isText(e)){o=ch(n);return r.css(o),void dh(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,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(e,t){return xf.checkNodeType(t,i)},f=go(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=l,"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=Ra.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=Sp),t},e.prototype.isSamePath=function(e,n){if(null==e||null==n)return!1;var r=xf.findPath(null,e),o=xf.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}(),Cp={};function Tp(e,t){return wc(t)&&xf.hasDOMNode(e,t,{editable:!0})}function Np(e,n){if(e.getConfig().readOnly)return!1;var r=Rp(e,n)&&xf.toSlateNode(e,n);return t.Editor.isVoid(e,r)}function Rp(e,t){return wc(t)&&xf.hasDOMNode(e,t)}!function(){if(Op)return Cp;Op=1;var e,t=pr(),n=Xr(),r=kt().f,o=Rn(),i=wi(),a=xs(),s=Te(),u=Es(),l=ht(),c=n("".slice),f=Math.min,d=u("startsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"startsWith"),!e||e.writable))&&!d},{startsWith:function(e){var t=i(s(this));a(e);var n=o(f(arguments.length>1?arguments[1]:void 0,t.length)),r=i(e);return c(t,n,n+r.length)===r}})}();const Lp=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Pp=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Mp=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Pp(n.overflowY,t)||Pp(n.overflowX,t)||(e=>{const t=(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},Dp=(e,t,n,r,o,i,a,s)=>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,Ap=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},jp=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,f="function"==typeof l?l:e=>e!==l;if(!Lp(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;Lp(p)&&f(p);){if(p=Ap(p),p===d){h.push(p);break}null!=p&&p===document.body&&Mp(p)&&!Mp(document.documentElement)||null!=p&&Mp(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}=e.getBoundingClientRect(),{top:k,right:C,bottom:T,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);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 P=[];for(let e=0;e<h.length;e++){const t=h[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&x>=o&&S<=l&&O>=c&&E<=i)return P;const f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),k=parseInt(f.borderTopWidth,10),C=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,M=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-C:0,A="offsetHeight"in t?t.offsetHeight-t.clientHeight-k-T:0,j="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,I="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)N="start"===s?R:"end"===s?R-v:"nearest"===s?Dp(y,y+v,v,k,T,y+R,y+R+b,b):R-v/2,M="start"===u?L:"center"===u?L-g/2:"end"===u?L-g:Dp(m,m+g,g,p,C,m+L,m+L+w,w),N=Math.max(0,N+y),M=Math.max(0,M+m);else{N="start"===s?R-o-k:"end"===s?R-l+T+A:"nearest"===s?Dp(o,l,n,k,T+A,R,R+b,b):R-(o+n/2)+A/2,M="start"===u?L-c-p:"center"===u?L-(c+r/2)+D/2:"end"===u?L-i+C+D:Dp(c,i,r,p,C+D,L,L+w,w);const{scrollLeft:e,scrollTop:a}=t;N=0===I?0:Math.max(0,Math.min(a+N/I,t.scrollHeight-n/I+A)),M=0===j?0:Math.max(0,Math.min(e+M/j,t.scrollWidth-r/j+D)),R+=a-N,L+=e-M}P.push({el:t,top:N,left:M})}return P},Ip=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function $p(e,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=xf.findDocumentOrShadowRoot(n).getSelection();if(a&&(!e.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=_a.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=xf.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,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||xf.hasRange(n,o)){e.isUpdatingSelection=!0;var v=o&&xf.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 m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(jp(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of jp(e,Ip(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,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&&gf&&u.focus(),e.isUpdatingSelection=!1}))}else n.selection=xf.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Fp=new WeakMap,Bp=new WeakMap;var _p={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"},Up={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"},Hp={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},zp=function(e){var t=_p[e],n=Up[e],r=Hp[e],o=t&&l.isKeyHotkey(t),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(pf&&i&&i(e))||!(pf||!a||!a(e)))}},Wp={isBold:zp("bold"),isCompose:zp("compose"),isMoveBackward:zp("moveBackward"),isMoveForward:zp("moveForward"),isDeleteBackward:zp("deleteBackward"),isDeleteForward:zp("deleteForward"),isDeleteLineBackward:zp("deleteLineBackward"),isDeleteLineForward:zp("deleteLineForward"),isDeleteWordBackward:zp("deleteWordBackward"),isDeleteWordForward:zp("deleteWordForward"),isExtendBackward:zp("extendBackward"),isExtendForward:zp("extendForward"),isExtendLineBackward:zp("extendLineBackward"),isExtendLineForward:zp("extendLineForward"),isItalic:zp("italic"),isMoveLineBackward:zp("moveLineBackward"),isMoveLineForward:zp("moveLineForward"),isMoveWordBackward:zp("moveWordBackward"),isMoveWordForward:zp("moveWordForward"),isRedo:zp("redo"),isSplitBlock:zp("splitBlock"),isTransposeCharacter:zp("transposeCharacter"),isUndo:zp("undo"),isTab:zp("tab"),isSelectAll:zp("selectAll")};function Vp(e){e.preventDefault()}var qp,Kp={beforeinput:function(e,n,r){var o=e,i=r.getConfig().readOnly;if(wf&&!i&&Tp(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=go(o.getTargetRanges(),1)[0];if(l){var c=xf.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&t.Range.equals(a,c)||t.Transforms.select(r,c)}}if(a&&t.Range.isExpanded(a)){var f=xf.getSelectedElems(r),d="table"===f[0].type,h="table-cell"!==f[f.length-1].type;if(d&&h)return;if(s.startsWith("delete")){var p=s.endsWith("Backward")?"backward":"forward";return void t.Editor.deleteFragment(r,{direction:p})}}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&&!Ja.get(r))break;gc(u)?r.insertData(u):"string"==typeof u&&t.Editor.insertText(r,u)}}}},blur:function(e,n,r){var o=e,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&Tp(r,o.target)){var s=xf.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===xf.toDOMNode(r,r)||Ec(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&wc(u)&&xf.hasDOMNode(r,u)){var l=xf.toSlateNode(r,u);if(t.Element.isElement(l)&&!r.isVoid(l))return}if(vf){var c=s.getSelection();null==c||c.removeAllRanges()}qa.delete(r)}}}},focus:function(e,t,n){var r=xf.toDOMNode(n,n),o=xf.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,gf&&e.target!==r?r.focus():qa.set(n,!0)},click:function(e,n,r){if(!r.getConfig().readOnly&&Rp(r,e.target)&&wc(e.target)){var o=xf.toSlateNode(r,e.target),i=xf.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),u=t.Editor.void(r,{at:a}),l=t.Editor.void(r,{at:s});if(u&&l&&t.Path.equals(u[1],l[1])){var c=t.Editor.range(r,a);t.Transforms.select(r,c)}}}},compositionstart:function(e,n,r){if(Tp(r,e.target)){var o=r.selection;if(o&&t.Range.isExpanded(o)&&(t.Editor.deleteFragment(r),Promise.resolve().then((function(){$p(n,r,!0)}))),r.selection){var i=xf.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Fp.set(r,a),Bp.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(Tp(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(bf||gf)&&xf.cleanExposedTexNodeInSelectionBlock(r);for(var a=t.Range.isBackward(i)?i.focus:i.anchor,s=go(t.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=go(t.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(t.Element.isElement(l)&&((vf||gf)&&"link"===l.type||"code"===l.type)){xf.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=xf.getLeftLengthOfMaxLength(r);if(f<c.length){var d=xf.toDOMRange(r,i);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=Fp.get(r)||""),f>0&&t.Editor.insertText(r,c.slice(0,f)),n.changeViewState()}else t.Editor.insertText(r,c)}else{var h=xf.findDocumentOrShadowRoot(r).getSelection();h&&function(e,n){if(t.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(o.path.length)&&(0===r.offset||0===o.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 u=t.Editor.node(e,s);if(t.Text.isText(u[0])&&t.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=xf.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),t.Editor.insertText(r,c)}vf||setTimeout((function(){var e=r.selection;if(null!=e){var t=Bp.get(r);if(null!=t)xf.toDOMRange(r,e).startContainer!==t&&(t.textContent=Fp.get(r)||"")}}))}}}},compositionupdate:function(e,t,n){Tp(n,e.target)&&(t.isComposing=!0)},keydown:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&Tp(r,o.target)){if(function(e,t){var n=Na.get(e),r=n&&n.getMenus(),o=La.get(e),i=o&&o.getMenus(),a=co(co({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,t)&&!u.isDisabled(e)){var f=u.getValue(e);u.exec(e,f)}}}(r,o),Wp.isTab(o))return Vp(o),void r.handleTab();if(Wp.isRedo(o))return Vp(o),void("function"==typeof r.redo&&r.redo());if(Wp.isUndo(o))return Vp(o),void("function"==typeof r.undo&&r.undo());if(Wp.isMoveLineBackward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",reverse:!0});if(Wp.isMoveLineForward(o))return Vp(o),void t.Transforms.move(r,{unit:"line"});if(Wp.isExtendLineBackward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(Wp.isExtendLineForward(o))return Vp(o),void t.Transforms.move(r,{unit:"line",edge:"focus"});if(Wp.isMoveBackward(o))return Vp(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r,{reverse:!0}):t.Transforms.collapse(r,{edge:"start"}));if(Wp.isMoveForward(o))return Vp(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r):t.Transforms.collapse(r,{edge:"end"}));if(Wp.isMoveWordBackward(o))return Vp(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word",reverse:!0});if(Wp.isMoveWordForward(o))return Vp(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word"});if(Wp.isSelectAll(o))return Vp(o),void r.selectAll();if(wf){if((bf||vf)&&i&&(Wp.isDeleteBackward(o)||Wp.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(Wp.isBold(o)||Wp.isItalic(o)||Wp.isTransposeCharacter(o))return void Vp(o);if(Wp.isSplitBlock(o))return Vp(o),void t.Editor.insertBreak(r);if(Wp.isDeleteBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r));if(Wp.isDeleteForward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r));if(Wp.isDeleteLineBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"line"}));if(Wp.isDeleteLineForward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"line"}));if(Wp.isDeleteWordBackward(o))return Vp(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"word"}));if(Wp.isDeleteWordForward(o))return Vp(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(!wf&&!r.getConfig().readOnly&&Tp(r,e.target)){e.preventDefault();var o=e.key;t.Editor.insertText(r,o)}},copy:function(e,t,n){var r=e;if(Tp(n,r.target)){n.getConfig().readOnly||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&&(o.preventDefault(),Tp(r,o.target))){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){Ja.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Tp(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Ja.set(n,!1);if(!wf||kc(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,n,r){if(Rp(r,e.target)){var o=xf.toSlateNode(r,e.target);t.Editor.isVoid(r,o)&&e.preventDefault()}},dragstart:function(e,n,r){var o=e;if(Rp(r,o.target)&&!r.getConfig().readOnly){var i=xf.toSlateNode(r,o.target),a=xf.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 u=o.dataTransfer;null!=u&&(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&Rp(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&Rp(r,o.target)&&null!=i&&!(wf&&vf&&i.files.length>0)){o.preventDefault();var a=r.selection,s=xf.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()}}},Gp={};!function(){if(qp)return Gp;qp=1;var e=pr(),t=_d();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}();var Jp=["props","attrs","style","dataset","on","hook"];function Yp(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(!Jp.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=f(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&&Yp(e)}))}var Xp=[];var Qp={};function Zp(e,t,n){var r=n.isInline(e)?"span":"div";return c.jsx(r,null,t)}function eg(e,n){var r,o=xf.findKey(n,e),i=n.isInline(e),a=t.Editor.isVoid(n,e),s=Zc(e.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=e.type,f=e.children,d=void 0===f?[]:f,h=function(e){return Qp[e]||Zp}(l);r=a?null:d.map((function(t,r){return og(t,r,e,n)}));var p=h(e,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=go(t.Node.texts(e),1),m=go(v[0],1)[0],y=og(m,0,e,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Fa.set(m,0),Ba.set(m,e)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(e,t){var n=t;return Xp.forEach((function(r){n=r(e,t)})),n}(e,p)),rc((function(){var t=Nc(s);null!=t&&(Ha.set(o,t),za.set(e,t),Ua.set(t,e))})),p}function tg(e,t){return void 0===t&&(t=!1),c.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function ng(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),c.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?c.jsx("br",null):null)}function rg(e,n,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var o=xf.findKey(r,e),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=xf.findPath(r,e),u=i([e,s]),l=t.Text.decorations(e,u),f=l.map((function(o,i){var a=function(e,n,r,o,i){void 0===n&&(n=!1);var a=e.text,s=xf.findPath(i,r),u=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)?ng(t.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==t.Editor.string(i,u)?""===a?ng():n&&"\n"===a.slice(-1)?tg(a,!0):tg(a):ng(0,!0)}(o,i===l.length-1,e,n,r);return a=function(e,t){var n=t;return Xp.forEach((function(t){n=t(e,n)})),n}(o,a),c.jsx("span",{"data-slate-leaf":!0},a)})),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return rc((function(){var t=Nc(d);null!=t&&(Ha.set(o,t),za.set(e,t),Ua.set(t,e))})),h}function og(e,n,r,o){return Fa.set(e,n),Ba.set(e,r),t.Element.isElement(e)?eg(e,o):rg(e,r,o)}function ig(e,t){var n,r,i=e.$scroll,a=(n=e.id,"w-e-textarea-".concat(n)),s=t.getConfig(),u=s.readOnly,l=s.autoFocus,f=function(e,t){return void 0===t&&(t=!1),c.h("div#".concat(e),{props:{contentEditable:!t}})}(a,u),d=t.children||[];f.children=d.map((function(e,n){var r=og(e,n,t,t);return Yp(r),r}));var h=ja.get(e);if(null==h&&(h=!0),h){var p=function(e){return o('<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>'))}(a);i.append(p),e.$textArea=p,r=p[0],(v=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(r,f),ja.set(e,!1),Ia.set(e,v)}else{var g=$a.get(e),v=Ia.get(e);if(null==g||null==v)return;r=g.elm,v(g,f)}if(null!=r||null!=(r=Nc(a))){if((h?l:t.isFocused())&&r.focus({preventScroll:!0}),h){var m=bc(r);m&&Va.set(t,m)}_a.set(t,r),za.set(t,r),Ua.set(r,t),$a.set(e,f)}}var ag=1,sg=function(){function e(e){var n=this;this.id=ag++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<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=u((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=xf.findDocumentOrShadowRoot(n),s=a.activeElement,u=xf.toDOMNode(n,n),l=a.getSelection();if(s!==u)return qa.delete(n),void t.Transforms.deselect(n);if(e.latestElement=s,qa.set(n,!0),!l)return t.Transforms.deselect(n);var c=l.anchorNode,f=l.focusNode,d=Tp(n,c)||Np(n,c),h=Tp(n,f)||Np(n,f);if(d&&h){var p=xf.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});t.Transforms.select(n,p)}}}(n,e)}),100);var r=o(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,rc((function(){var e=n.editorInstance,t=xf.getWindow(e);t.document.addEventListener("selectionchange",n.onDOMSelectionChange),e.on(yo.DESTROYED,(function(){t.document.removeEventListener("selectionchange",n.onDOMSelectionChange)})),i.on("click",(function(){return e.hidePanelOrModal()})),e.on(yo.CHANGE,n.changeViewState.bind(n));var o=e.getConfig(),a=o.onChange,s=o.scroll;a&&e.on(yo.CHANGE,(function(){return a(e)})),s||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),e.on(yo.CHANGE,n.changeMaxLengthInfo.bind(n)),n.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ca.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,o=this.editorInstance;null!=t&&(r(Kp,(function(n,r){t.on(r,(function(t){n(t,e,o)}))})),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u((function(){o.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(yo.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-xf.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;ig(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var i=t.isEmpty();if(i&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(a),e.$placeholder=a}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!i&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),rc((function(){$p(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function ug(e,n,r,o){if(Fa.set(e,n),Ba.set(e,r),t.Element.isElement(e)){var i=e.children;if((void 0===i?[]:i).forEach((function(t,n){return ug(t,n,e,o)})),t.Editor.isVoid(o,e)){var a=go(t.Node.texts(e),1),s=go(a[0],1)[0];Fa.set(s,0),Ba.set(s,e)}}}var lg={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};var cg,fg,dg,hg,pg,gg={};function vg(){if(hg)return dg;hg=1;var e=Fe(),t=TypeError;return dg=function(n,r){if(!delete n[r])throw new t("Cannot delete property "+e(r)+" of "+e(n))}}!function(){if(pg)return gg;pg=1;var e=pr(),t=mt(),n=Nn(),r=Tn(),o=Ln(),i=function(){if(fg)return cg;fg=1;var e=L(),t=gr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return cg=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t}}(),a=vr(),s=Er(),u=mr(),l=vg(),c=Sr()("splice"),f=Math.max,d=Math.min;e({target:"Array",proto:!0,forced:!c},{splice:function(e,c){var h,p,g,v,m,y,b=t(this),w=o(b),x=n(e,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 mg=function(){function e(e,t){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=o(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(i),rc((function(){n.initToolbar(),n.lngListen=op((function(){return n.initToolbar()})),n.getEditorInstance().on(yo.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="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a);u.keys.length>0&&("string"==typeof u.keys&&(u.keys=[u.keys]),u.keys.forEach((function(e,t){f.splice(u.index+t,0,e)})));var d=f.filter((function(e){var t="string"==typeof e?e:e.key;return!c.includes(t)})),h=d.length;d.forEach((function(n,o){if("|"===n){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=up();return r.append(i),void(t=n)}if("string"==typeof n)return e.registerSingleItem(n,e),void(t=n);e.registerGroup(n),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new bp(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 bp,o=this.menus,i=o[e];if(null==i){var a=bo[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 u=Ep(e,i,r);(this.toolbarItems.push(u),Pa.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Ta.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 yg,bg={};!function(){if(yg)return bg;yg=1;var e=L(),t=en().EXISTS,n=Se(),r=qs(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);e&&!t&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(e){return""}}})}(),e.DOMComment=sc,e.DOMElement=uc,e.DOMNode=ac,e.DOMRange=cc,e.DOMSelection=fc,e.DOMStaticRange=dc,e.DOMText=lc,e.DomEditor=xf,e.ELEM_TO_HTML_CONF=tf,e.PARSE_ELEM_HTML_CONF=Vc,e.PARSE_STYLE_HTML_FN_LIST=Wc,e.PRE_PARSE_HTML_CONF_LIST=zc,e.RENDER_ELEM_CONF=Qp,e.RENDER_STYLE_HANDLER_LIST=Xp,e.STYLE_TO_HTML_FN_LIST=ef,e.TEXT_TAGS=Hc,e.Toolbar=mg,e.coreCreateEditor=function(e){var o=e.selector,i=void 0===o?"":o,a=e.config,s=void 0===a?{}:a,u=e.content,l=e.html,c=e.plugins,f=void 0===c?[]:c,d=function(e){return[ah,pd,Ya,dd,hh,$d,uh,so.withHistory].reduce((function(e,t){return t(e)}),e)}(t.createEditor());if(i&&function(e,t){return Xc(e,"data-w-e-textarea",t)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(e){void 0===e&&(e={});var t=n(mo),o={},i=e.MENU_CONF,a=void 0===i?{}:i;return r(t,(function(e,t){o[t]=co(co({},e),a[t]||{})})),delete e.MENU_CONF,co({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(s);Aa.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach((function(e){d=e(d)})),d.children=function(e,t){var n;return null!=t.html?Qc(e,t.html):(null===(n=t.content)||void 0===n?void 0:n.length)?t.content:[{type:"paragraph",children:[{text:""}]}]}(d,{html:l,content:u}),i){var v=new sg(i);ka.set(d,v),Ca.set(v,d),v.changeViewState(),rc((function(){var e=v.$scroll;null!=e&&e.height()<300&&console.warn("".concat(lg.zh,"\n").concat(lg.en),{element:e,height:e.height()})}));var m=void 0;Object.keys(g).length>0&&(m=new kp,Ra.set(m,d),La.set(d,m)),d.on(yo.CHANGE,(function(){d.hidePanelOrModal()})),d.on(yo.SCROLL,(function(){d.hidePanelOrModal()}))}else d.children.forEach((function(e,t){return ug(e,t,d,d)}));var y=h.onCreated,b=h.onDestroyed;return y&&d.on(yo.CREATED,(function(){return y(d)})),b&&d.on(yo.DESTROYED,(function(){return b(d)})),rc((function(){return d.emit("created")})),d},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 Xc(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=co({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new mg(n,i);return Ta.set(a,e),Na.set(e,a),a},e.createUploader=function(e){var t=e.server,n=void 0===t?"":t,o=e.fieldName,i=void 0===o?"":o,a=e.maxFileSize,s=void 0===a?10485760:a,u=e.maxNumberOfFiles,l=void 0===u?100:u,c=e.meta,f=void 0===c?{}:c,p=e.metaWithUrl,g=void 0!==p&&p,v=e.headers,m=void 0===v?{}:v,y=e.withCredentials,b=void 0!==y&&y,w=e.timeout,x=void 0===w?1e4:w,E=e.onBeforeUpload,S=void 0===E?function(e){return e}:E,O=e.onSuccess,k=void 0===O?function(e,t){}:O,C=e.onError,T=void 0===C?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:C,N=e.onProgress,R=void 0===N?function(e){}: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(e,t){var n=go(e.split("#"),2),o=n[0],i=n[1],a=[];r(t,(function(e,t){a.push("".concat(t,"=").concat(e))}));var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(L,f));var P=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 P.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)}P.removeFile(e.id)})),P.on("progress",(function(e){e<1||R(e)})),P.on("upload-error",(function(e,t,n){try{T(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}P.removeFile(e.id)})),P.on("restriction-failed",(function(e,t){try{T(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}P.removeFile(e.id)})),P},e.genModalButtonElems=function(e,t){var n=o('<div class="button-container"></div>'),r=o('<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=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},e.genModalTextareaElems=function(e,t,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},e.getDefaultView=bc,e.getEditableChild=Lc,e.getEditableChildAndIndex=Rc,e.getElementById=Nc,e.getFirstVoidChild=Mc,e.getPlainText=Pc,e.getTagName=Ac,e.hasShadowRoot=Tc,e.i18nAddResources=function(e,t){np.addResourceBundle(e,rp,t,!0,!0)},e.i18nChangeLanguage=function(e){np.changeLanguage(e)},e.i18nGetResources=function(e){return np.getResourceBundle(e,rp)},e.i18nListenLanguage=op,e.isDOMComment=xc,e.isDOMElement=Ec,e.isDOMNode=wc,e.isDOMSelection=Sc,e.isDOMText=Oc,e.isDataTransfer=gc,e.isDocument=hc,e.isHTMLElememt=yc,e.isPlainTextOnlyPaste=kc,e.isShadowRoot=pc,e.isUnprocessedListElement=mc,e.normalizeDOMPoint=Cc,e.registerElemToHtmlConf=function(e){var t=e.type,n=e.elemToHtml;tf[t||""]=n},e.registerMenu=function(e,t){var n=e.key,r=e.factory,o=e.config,i=co(co({},o),t||{});if(null!=bo[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));bo[n]=r,function(e,t){null!=t&&(mo[e]=t)}(n,i)},e.registerParseElemHtmlConf=function(e){var t=e.selector,n=e.parseElemHtml;Vc[t]=n},e.registerParseStyleHtmlHandler=function(e){Wc.push(e)},e.registerPreParseHtmlConf=function(e){zc.push(e)},e.registerRenderElemConf=function(e){var t=e.type,n=e.renderElem;Qp[t||""]=n},e.registerStyleHandler=function(e){Xp.push(e)},e.registerStyleToHtmlHandler=function(e){ef.push(e)},e.t=ip,e.walkTextNodes=Dc}));
|
|
9
9
|
//# sourceMappingURL=index.js.map
|