117 lines
512 KiB
JavaScript
117 lines
512 KiB
JavaScript
import{d as g9,r as v2,s as HP,j as UP,w as VP,l as WP,t as qP,o as v9,c as m9}from"./@vue.ab566ce7.js";var Pv;if(typeof global>"u"){if("ActiveXObject"in window){var d5="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";d5+=`
|
|
Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(d5)}p5(),h5()}else global&&((Pv=global.navigator)===null||Pv===void 0?void 0:Pv.userAgent.match("QQBrowser"))&&(p5(),h5());function p5(){typeof globalThis>"u"&&(window.globalThis=window)}function h5(){typeof AggregateError>"u"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var GP=Object.getOwnPropertyDescriptor(global,"window");(!global.window||GP.set)&&(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}/*!
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
*
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
* Released under the MIT License.
|
|
*/function g5(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){var t,n;return g5(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(g5(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ht(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];{var i=tN[e],o=i?typeof i=="function"?i.apply(null,n):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}}function Oa(e){return!!e&&!!e[xn]}function Ba(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===nN}(e)||Array.isArray(e)||!!e[C5]||!!e.constructor[C5]||E$(e)||C$(e))}function qc(e,t,n){n===void 0&&(n=!1),Ts(e)===0?(n?Object.keys:O$)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Ts(e){var t=e[xn];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:E$(e)?2:C$(e)?3:0}function m2(e,t){return Ts(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function KP(e,t){return Ts(e)===2?e.get(t):e[t]}function y9(e,t,n){var r=Ts(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function YP(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E$(e){return QP&&e instanceof Map}function C$(e){return eN&&e instanceof Set}function Xo(e){return e.o||e.t}function D$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=rN(e);delete t[xn];for(var n=O$(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function S$(e,t){return t===void 0&&(t=!1),x$(e)||Oa(e)||!Ba(e)||(Ts(e)>1&&(e.set=e.add=e.clear=e.delete=XP),Object.freeze(e),t&&qc(e,function(n,r){return S$(r,!0)},!0)),e}function XP(){Ht(2)}function x$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function si(e){var t=iN[e];return t||Ht(18,e),t}function v5(){return os||Ht(0),os}function Nv(e,t){t&&(si("Patches"),e.u=[],e.s=[],e.v=t)}function nh(e){y2(e),e.p.forEach(JP),e.p=null}function y2(e){e===os&&(os=e.l)}function m5(e){return os={p:[],l:os,h:e,m:!0,_:0}}function JP(e){var t=e[xn];t.i===0||t.i===1?t.j():t.O=!0}function Iv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||si("ES5").S(t,e,r),r?(n[xn].P&&(nh(t),Ht(4)),Ba(e)&&(e=rh(t,e),t.l||ih(t,e)),t.u&&si("Patches").M(n[xn],e,t.u,t.s)):e=rh(t,n,[]),nh(t),t.u&&t.v(t.u,t.s),e!==b9?e:void 0}function rh(e,t,n){if(x$(t))return t;var r=t[xn];if(!r)return qc(t,function(o,a){return y5(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ih(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=D$(r.k):r.o;qc(r.i===3?new Set(i):i,function(o,a){return y5(e,r,i,o,a,n)}),ih(e,i,!1),n&&e.u&&si("Patches").R(r,n,e.u,e.s)}return r.o}function y5(e,t,n,r,i,o){if(i===n&&Ht(5),Oa(i)){var a=rh(e,i,o&&t&&t.i!==3&&!m2(t.D,r)?o.concat(r):void 0);if(y9(n,r,a),!Oa(a))return;e.m=!1}if(Ba(i)&&!x$(i)){if(!e.h.F&&e._<1)return;rh(e,i),t&&t.A.l||ih(e,i)}}function ih(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&S$(t,n)}function Rv(e,t){var n=e[xn];return(n?Xo(n):e)[t]}function b5(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function b2(e){e.P||(e.P=!0,e.l&&b2(e.l))}function jv(e){e.o||(e.o=D$(e.t))}function $2(e,t,n){var r=E$(t)?si("MapSet").N(t,n):C$(t)?si("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:v5(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Bp;a&&(s=[u],l=Fp);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):si("ES5").J(t,n);return(n?n.A:v5()).p.push(r),r}function ZP(e){return Oa(e)||Ht(22,e),function t(n){if(!Ba(n))return n;var r,i=n[xn],o=Ts(n);if(i){if(!i.P&&(i.i<4||!si("ES5").K(i)))return i.t;i.I=!0,r=$5(n,o),i.I=!1}else r=$5(n,o);return qc(r,function(a,u){i&&KP(i.t,a)===u||y9(r,a,t(u))}),o===3?new Set(r):r}(e)}function $5(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return D$(e)}var w5,os,A$=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QP=typeof Map<"u",eN=typeof Set<"u",E5=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",b9=A$?Symbol.for("immer-nothing"):((w5={})["immer-nothing"]=!0,w5),C5=A$?Symbol.for("immer-draftable"):"__$immer_draftable",xn=A$?Symbol.for("immer-state"):"__$immer_state",tN={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},nN=""+Object.prototype.constructor,O$=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,rN=Object.getOwnPropertyDescriptors||function(e){var t={};return O$(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},iN={},Bp={get:function(e,t){if(t===xn)return e;var n=Xo(e);if(!m2(n,t))return function(i,o,a){var u,s=b5(o,a);return s?"value"in s?s.value:(u=s.get)===null||u===void 0?void 0:u.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Ba(r)?r:r===Rv(e.t,t)?(jv(e),e.o[t]=$2(e.A.h,r,e)):r},has:function(e,t){return t in Xo(e)},ownKeys:function(e){return Reflect.ownKeys(Xo(e))},set:function(e,t,n){var r=b5(Xo(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Rv(Xo(e),t),o=i==null?void 0:i[xn];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(YP(n,i)&&(n!==void 0||m2(e.t,t)))return!0;jv(e),b2(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return Rv(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,jv(e),b2(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Xo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ht(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ht(12)}},Fp={};qc(Bp,function(e,t){Fp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Fp.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Ht(13),Bp.deleteProperty.call(this,e[0],t)},Fp.set=function(e,t,n){return t!=="length"&&isNaN(parseInt(t))&&Ht(14),Bp.set.call(this,e[0],t,n,e[0])};var oN=function(){function e(n){var r=this;this.g=E5,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var u=o;o=i;var s=r;return function(p){var g=this;p===void 0&&(p=u);for(var v=arguments.length,m=Array(v>1?v-1:0),y=1;y<v;y++)m[y-1]=arguments[y];return s.produce(p,function(h){var $;return($=o).call.apply($,[g,h].concat(m))})}}var l;if(typeof o!="function"&&Ht(6),a!==void 0&&typeof a!="function"&&Ht(7),Ba(i)){var c=m5(r),f=$2(r,i,void 0),d=!0;try{l=o(f),d=!1}finally{d?nh(c):y2(c)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(p){return Nv(c,a),Iv(p,c)},function(p){throw nh(c),p}):(Nv(c,a),Iv(l,c))}if(!i||typeof i!="object")return(l=o(i))===b9?void 0:(l===void 0&&(l=i),r.F&&S$(l,!0),l);Ht(21,i)},this.produceWithPatches=function(i,o){return typeof i=="function"?function(s){for(var l=arguments.length,c=Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=arguments[f];return r.produceWithPatches(s,function(d){return i.apply(void 0,[d].concat(c))})}:[r.produce(i,o,function(s,l){a=s,u=l}),a,u];var a,u},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Ba(n)||Ht(8),Oa(n)&&(n=ZP(n));var r=m5(this),i=$2(this,n,void 0);return i[xn].C=!0,y2(r),i},t.finishDraft=function(n,r){var i=n&&n[xn];i&&i.C||Ht(9),i.I&&Ht(10);var o=i.A;return Nv(o,r),Iv(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!E5&&Ht(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=si("Patches").$;return Oa(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},e}(),An=new oN,Wg=An.produce;An.produceWithPatches.bind(An);An.setAutoFreeze.bind(An);An.setUseProxies.bind(An);An.applyPatches.bind(An);var D5=An.createDraft.bind(An),S5=An.finishDraft.bind(An);function Wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oh=new WeakMap,ol=new WeakMap,x5=new WeakMap,A5=new WeakMap,O5=new WeakMap,B5=new WeakMap;function F5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var aN=()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of E.pathRefs(e))RN.transform(n,t);for(var r of E.pointRefs(e))jN.transform(r,t);for(var i of E.rangeRefs(e))zN.transform(i,t);var o=new Set,a=[],u=p=>{if(p){var g=p.join(",");o.has(g)||(o.add(g),a.push(p))}},s=oh.get(e)||[],l=uN(t);for(var c of s){var f=_.transform(c,t);u(f)}for(var d of l)u(d);oh.set(e,a),P.transform(e,t),e.operations.push(t),E.normalize(e),t.type==="set_selection"&&(e.marks=null),ol.get(e)||(ol.set(e,!0),Promise.resolve().then(()=>{ol.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(R.isExpanded(r))P.setNodes(e,{[t]:n},{match:X.isText,split:!0});else{var i=kd(kd({},E.marks(e)||{}),{},{[t]:n});e.marks=i,ol.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&P.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&P.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&R.isExpanded(n)&&P.delete(e,{reverse:t==="backward"})},getFragment:()=>{var{selection:t}=e;return t?W.fragment(e,t):[]},insertBreak:()=>{P.splitNodes(e,{always:!0})},insertFragment:t=>{P.insertFragment(e,t)},insertNode:t=>{P.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var i=kd({text:t},r);P.insertNodes(e,i)}else P.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!X.isText(n)){if(te.isElement(n)&&n.children.length===0){var i={text:""};P.insertNodes(e,i,{at:r.concat(0),voids:!0});return}for(var o=E.isEditor(n)?!1:te.isElement(n)&&(e.isInline(n)||n.children.length===0||X.isText(n.children[0])||e.isInline(n.children[0])),a=0,u=0;u<n.children.length;u++,a++){var s=W.get(e,r);if(!X.isText(s)){var l=n.children[u],c=s.children[a-1],f=u===n.children.length-1,d=X.isText(l)||te.isElement(l)&&e.isInline(l);if(d!==o)P.removeNodes(e,{at:r.concat(a),voids:!0}),a--;else if(te.isElement(l)){if(e.isInline(l)){if(c==null||!X.isText(c)){var p={text:""};P.insertNodes(e,p,{at:r.concat(a),voids:!0}),a++}else if(f){var g={text:""};P.insertNodes(e,g,{at:r.concat(a+1),voids:!0}),a++}}}else c!=null&&X.isText(c)&&(X.equals(l,c,{loose:!0})?(P.mergeNodes(e,{at:r.concat(a),voids:!0}),a--):c.text===""?(P.removeNodes(e,{at:r.concat(a-1),voids:!0}),a--):l.text===""&&(P.removeNodes(e,{at:r.concat(a),voids:!0}),a--))}}}},removeMark:t=>{var{selection:n}=e;if(n)if(R.isExpanded(n))P.unsetNodes(e,t,{match:X.isText,split:!0});else{var r=kd({},E.marks(e)||{});delete r[t],e.marks=r,ol.get(e)||e.onChange()}}};return e},uN=e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:t}=e;return _.levels(t)}case"insert_node":{var{node:n,path:r}=e,i=_.levels(r),o=X.isText(n)?[]:Array.from(W.nodes(n),M=>{var[,V]=M;return r.concat(V)});return[...i,...o]}case"merge_node":{var{path:a}=e,u=_.ancestors(a),s=_.previous(a);return[...u,s]}case"move_node":{var{path:l,newPath:c}=e;if(_.equals(l,c))return[];var f=[],d=[];for(var p of _.ancestors(l)){var g=_.transform(p,e);f.push(g)}for(var v of _.ancestors(c)){var m=_.transform(v,e);d.push(m)}var y=d[d.length-1],h=c[c.length-1],$=y.concat(h);return[...f,...d,$]}case"remove_node":{var{path:w}=e,C=_.ancestors(w);return[...C]}case"split_node":{var{path:D}=e,A=_.levels(D),I=_.next(D);return[...A,I]}default:return[]}};function sN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fi(e,t){if(e==null)return{};var n=sN(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var B$=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?hN(t):t,o=he.None,a=he.None,u=0,s=null,l=null;for(var c of i){var f=c.codePointAt(0);if(!f)break;var d=xN(c,f);if([o,a]=r?[a,d]:[d,o],zu(o,he.ZWJ)&&zu(a,he.ExtPict)&&(r?s=T5(t.substring(0,u)):s=T5(t.substring(0,t.length-u)),!s)||zu(o,he.RI)&&zu(a,he.RI)&&(l!==null?l=!l:r?l=!0:l=TN(t.substring(0,t.length-u)),!l)||o!==he.None&&a!==he.None&&ON(o,a))break;u+=c.length}return u||1},lN=/\s/,cN=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,fN=/['\u2018\u2019]/,dN=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;t.length>0;){var o=B$(t,n),[a,u]=F$(t,o,n);if(pN(a,u,n))i=!0,r+=o;else if(!i)r+=o;else break;t=u}return r},F$=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},pN=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(lN.test(t))return!1;if(fN.test(t)){var i=B$(n,r),[o,a]=F$(n,i,r);if(e(o,a,r))return!0}return!cN.test(t)},hN=function*(t){for(var n=t.length-1,r=0;r<t.length;r++){var i=t.charAt(n-r);if(vN(i.charCodeAt(0))){var o=t.charAt(n-r-1);if(gN(o.charCodeAt(0))){yield o+i,r++;continue}}yield i}},gN=e=>e>=55296&&e<=56319,vN=e=>e>=56320&&e<=57343,he;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(he||(he={}));var mN=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,yN=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,bN=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,$N=/^[\u1100-\u115F\uA960-\uA97C]$/,wN=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,EN=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,CN=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,DN=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,SN=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,xN=(e,t)=>{var n=he.Any;return e.search(mN)!==-1&&(n|=he.Extend),t===8205&&(n|=he.ZWJ),t>=127462&&t<=127487&&(n|=he.RI),e.search(yN)!==-1&&(n|=he.Prepend),e.search(bN)!==-1&&(n|=he.SpacingMark),e.search($N)!==-1&&(n|=he.L),e.search(wN)!==-1&&(n|=he.V),e.search(EN)!==-1&&(n|=he.T),e.search(CN)!==-1&&(n|=he.LV),e.search(DN)!==-1&&(n|=he.LVT),e.search(SN)!==-1&&(n|=he.ExtPict),n};function zu(e,t){return(e&t)!==0}var AN=[[he.L,he.L|he.V|he.LV|he.LVT],[he.LV|he.V,he.V|he.T],[he.LVT|he.T,he.T],[he.Any,he.Extend|he.ZWJ],[he.Any,he.SpacingMark],[he.Prepend,he.Any],[he.ZWJ,he.ExtPict],[he.RI,he.RI]];function ON(e,t){return AN.findIndex(n=>zu(e,n[0])&&zu(t,n[1]))===-1}var BN=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,T5=e=>e.search(BN)!==-1,FN=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,TN=e=>{var t=e.match(FN);if(t===null)return!1;var n=t[0].length/2;return n%2===1},k5=e=>Zt(e)&&W.isNodeList(e.children)&&!E.isEditor(e),te={isAncestor(e){return Zt(e)&&W.isNodeList(e.children)},isElement:k5,isElementList(e){return Array.isArray(e)&&e.every(t=>te.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return k5(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},kN=["text"],_N=["text"];function _5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var P5=new WeakMap,E={above(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:i=e.selection,match:o}=t;if(!!i){var a=E.path(e,i),u=r==="lowest";for(var[s,l]of E.levels(e,{at:a,voids:n,match:o,reverse:u}))if(!X.isText(s)&&!_.equals(a,l))return[s,l]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.point(e,t,{edge:"end"}),i=E.end(e,[]),o={anchor:r,focus:i},{distance:a=1}=n,u=0,s;for(var l of E.positions(e,ou(ou({},n),{},{at:o}))){if(u>a)break;u!==0&&(s=l),u++}return s},before(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.start(e,[]),i=E.point(e,t,{edge:"start"}),o={anchor:r,focus:i},{distance:a=1}=n,u=0,s;for(var l of E.positions(e,ou(ou({},n),{},{at:o,reverse:!0}))){if(u>a)break;u!==0&&(s=l),u++}return s},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges(e,t){return[E.start(e,t),E.end(e,t)]},end(e,t){return E.point(e,t,{edge:"end"})},first(e,t){var n=E.path(e,t,{edge:"start"});return E.node(e,n)},fragment(e,t){var n=E.range(e,t),r=W.fragment(e,n);return r},hasBlocks(e,t){return t.children.some(n=>E.isBlock(e,n))},hasInlines(e,t){return t.children.some(n=>X.isText(n)||E.isInline(e,n))},hasTexts(e,t){return t.children.every(n=>X.isText(n))},insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock(e,t){return te.isElement(t)&&!e.isInline(t)},isEditor(e){if(!Zt(e))return!1;var t=P5.get(e);if(t!==void 0)return t;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isInline=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&(e.marks===null||Zt(e.marks))&&(e.selection===null||R.isRange(e.selection))&&W.isNodeList(e.children)&&Gi.isOperationList(e.operations);return P5.set(e,n),n},isEnd(e,t,n){var r=E.end(e,n);return $e.equals(t,r)},isEdge(e,t,n){return E.isStart(e,t,n)||E.isEnd(e,t,n)},isEmpty(e,t){var{children:n}=t,[r]=n;return n.length===0||n.length===1&&X.isText(r)&&r.text===""&&!e.isVoid(t)},isInline(e,t){return te.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=x5.get(e);return t===void 0?!0:t},isStart(e,t,n){if(t.offset!==0)return!1;var r=E.start(e,n);return $e.equals(t,r)},isVoid(e,t){return te.isElement(t)&&e.isVoid(t)},last(e,t){var n=E.path(e,t,{edge:"end"});return E.node(e,n)},leaf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=W.leaf(e,r);return[i,r]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!n){var a=[],u=E.path(e,n);for(var[s,l]of W.levels(e,u))if(!!o(s,l)&&(a.push([s,l]),!i&&E.isVoid(e,s)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(R.isExpanded(n)){var[r]=E.nodes(e,{match:X.isText});if(r){var[i]=r,o=fi(i,kN);return o}else return{}}var{anchor:a}=n,{path:u}=a,[s]=E.leaf(e,u);if(a.offset===0){var l=E.previous(e,{at:u,match:X.isText}),c=E.above(e,{match:v=>E.isBlock(e,v)});if(l&&c){var[f,d]=l,[,p]=c;_.isAncestor(p,d)&&(s=f)}}var g=fi(s,_N);return g},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.after(e,o,{voids:r});if(!!a){var[,u]=E.last(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{at:s,match:i,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=W.get(e,r);return[i,r]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!n){var s,l;if(PN.isSpan(n))s=n[0],l=n[1];else{var c=E.path(e,n,{edge:"start"}),f=E.path(e,n,{edge:"end"});s=o?f:c,l=o?c:f}var d=W.nodes(e,{reverse:o,from:s,to:l,pass:$=>{var[w]=$;return a?!1:E.isVoid(e,w)}}),p=[],g;for(var[v,m]of d){var y=g&&_.compare(m,g[1])===0;if(!(r==="highest"&&y)){if(!u(v,m)){if(i&&!y&&X.isText(v))return;continue}if(r==="lowest"&&y){g=[v,m];continue}var h=r==="lowest"?g:[v,m];h&&(i?p.push(h):yield h),g=[v,m]}}r==="lowest"&&g&&(i?p.push(g):yield g),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=o=>oh.get(o)||[];if(!!E.isNormalizing(e)){if(n){var i=Array.from(W.nodes(e),o=>{var[,a]=o;return a});oh.set(e,i)}r(e).length!==0&&E.withoutNormalizing(e,()=>{for(var o of r(e))if(W.has(e,o)){var a=E.node(e,o),[u,s]=a;te.isElement(u)&&u.children.length===0&&e.normalizeNode(a)}for(var l=r(e).length*42,c=0;r(e).length!==0;){if(c>l)throw new Error(`
|
|
Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
|
|
`));var f=r(e).pop();if(W.has(e,f)){var d=E.node(e,f);e.normalizeNode(d)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=_.parent(r),o=E.node(e,i);return o},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(_.isPath(t)){if(i==="start"){var[,o]=W.first(e,t);t=o}else if(i==="end"){var[,a]=W.last(e,t);t=a}}return R.isRange(t)&&(i==="start"?t=R.start(t):i==="end"?t=R.end(t):t=_.common(t.anchor.path,t.focus.path)),$e.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return W.has(e,t)},pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pathRefs(e);return u.delete(i),i.current=null,a}},o=E.pathRefs(e);return o.add(i),i},pathRefs(e){var t=A5.get(e);return t||(t=new Set,A5.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(_.isPath(t)){var i;if(r==="end"){var[,o]=W.last(e,t);i=o}else{var[,a]=W.first(e,t);i=a}var u=W.get(e,i);if(!X.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:r==="end"?u.text.length:0}}if(R.isRange(t)){var[s,l]=R.edges(t);return r==="start"?s:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pointRefs(e);return u.delete(i),i.current=null,a}},o=E.pointRefs(e);return o.add(i),i},pointRefs(e){var t=O5.get(e);return t||(t=new Set,O5.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(!n)return;var a=E.range(e,n),[u,s]=R.edges(a),l=i?s:u,c=!1,f="",d=0,p=0,g=0;for(var[v,m]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(v)){if(!o&&e.isVoid(v)){yield E.start(e,m);continue}if(e.isInline(v))continue;if(E.hasInlines(e,v)){var y=_.isAncestor(m,s.path)?s:E.end(e,m),h=_.isAncestor(m,u.path)?u:E.start(e,m);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(X.isText(v)){var $=_.equals(m,l.path);for($?(p=i?l.offset:v.text.length-l.offset,g=l.offset):(p=v.text.length,g=i?p:0),($||c||r==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=F$(f,d,i)[1]}if(g=i?g-d:g+d,p=p-d,p<0){d=-p;break}d=0,yield{path:m,offset:g}}}}function w(C,D,A){return D==="character"?B$(C,A):D==="word"?dN(C,A):D==="line"||D==="block"?C.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.before(e,o,{voids:r});if(!!a){var[,u]=E.first(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return c}}},range(e,t,n){if(R.isRange(t)&&!n)return t;var r=E.start(e,t),i=E.end(e,n||t);return{anchor:r,focus:i}},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.rangeRefs(e);return u.delete(i),i.current=null,a}},o=E.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=B5.get(e);return t||(t=new Set,B5.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){x5.set(e,t)},start(e,t){return E.point(e,t,{edge:"start"})},string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=E.range(e,t),[o,a]=R.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:X.isText,voids:r})){var c=s.text;_.equals(l,a.path)&&(c=c.slice(0,a.offset)),_.equals(l,o.path)&&(c=c.slice(o.offset)),u+=c}return u},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,o]=R.edges(t);if(i.offset!==0||o.offset!==0||R.isCollapsed(t))return t;var a=E.above(e,{at:o,match:p=>E.isBlock(e,p)}),u=a?a[1]:[],s=E.start(e,[]),l={anchor:s,focus:o},c=!0;for(var[f,d]of E.nodes(e,{at:l,match:X.isText,reverse:!0,voids:r})){if(c){c=!1;continue}if(f.text!==""||_.isBefore(d,u)){o={path:d,offset:f.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(e,ou(ou({},t),{},{match:n=>E.isVoid(e,n)}))},withoutNormalizing(e,t){var n=E.isNormalizing(e);E.setNormalizing(e,!1);try{t()}finally{E.setNormalizing(e,n)}E.normalize(e)}},PN={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(_.isPath)}},NN=["children"],IN=["text"],N5=new WeakMap,W={ancestor(e,t){var n=W.get(e,t);if(X.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of _.ancestors(t,n)){var i=W.ancestor(e,r),o=[i,r];yield o}},child(e,t){if(X.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,i=W.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a<o.length;){var u=W.child(i,a),s=t.concat(a);yield[u,s],a=r?a-1:a+1}},common(e,t,n){var r=_.common(t,n),i=W.get(e,r);return[i,r]},descendant(e,t){var n=W.get(e,t);if(E.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},*descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))r.length!==0&&(yield[n,r])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))te.isElement(n)&&(yield[n,r])},extractProps(e){if(te.isAncestor(e)){var t=fi(e,NN);return t}else{var t=fi(e,IN);return t}},first(e,t){for(var n=t.slice(),r=W.get(e,n);r&&!(X.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(X.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=Wg({children:e.children},r=>{var[i,o]=R.edges(t),a=W.nodes(r,{reverse:!0,pass:d=>{var[,p]=d;return!R.includes(t,p)}});for(var[,u]of a){if(!R.includes(t,u)){var s=W.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(_.equals(u,o.path)){var c=W.leaf(r,u);c.text=c.text.slice(0,o.offset)}if(_.equals(u,i.path)){var f=W.leaf(r,u);f.text=f.text.slice(i.offset)}}E.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(X.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[i]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(X.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(e){return X.isText(e)||te.isElement(e)||E.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=N5.get(e);if(t!==void 0)return t;var n=e.every(r=>W.isNode(r));return N5.set(e,n),n},last(e,t){for(var n=t.slice(),r=W.get(e,n);r&&!(X.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=W.get(e,t);if(!X.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of _.levels(t,n)){var i=W.get(e,r);yield[i,r]}},matches(e,t){return te.isElement(e)&&te.isElementProps(t)&&te.matches(e,t)||X.isText(e)&&X.isTextProps(t)&&X.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:o}=t,a=new Set,u=[],s=e;!(o&&(r?_.isBefore(u,o):_.isAfter(u,o)));){if(a.has(s)||(yield[s,u]),!a.has(s)&&!X.isText(s)&&s.children.length!==0&&(n==null||n([s,u])===!1)){a.add(s);var l=r?s.children.length-1:0;_.isAncestor(u,i)&&(l=i[u.length]),u=u.concat(l),s=W.get(e,u);continue}if(u.length===0)break;if(!r){var c=_.next(u);if(W.has(e,c)){u=c,s=W.get(e,u);continue}}if(r&&u[u.length-1]!==0){var f=_.previous(u);u=f,s=W.get(e,u);continue}u=_.parent(u),s=W.get(e,u),a.add(s)}},parent(e,t){var n=_.parent(t),r=W.get(e,n);if(X.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return X.isText(e)?e.text:e.children.map(W.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))X.isText(n)&&(yield[n,r])}};function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Gi={isNodeOperation(e){return Gi.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Zt(e))return!1;switch(e.type){case"insert_node":return _.isPath(e.path)&&W.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&_.isPath(e.path);case"merge_node":return typeof e.position=="number"&&_.isPath(e.path)&&Zt(e.properties);case"move_node":return _.isPath(e.path)&&_.isPath(e.newPath);case"remove_node":return _.isPath(e.path)&&W.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&_.isPath(e.path);case"set_node":return _.isPath(e.path)&&Zt(e.properties)&&Zt(e.newProperties);case"set_selection":return e.properties===null&&R.isRange(e.newProperties)||e.newProperties===null&&R.isRange(e.properties)||Zt(e.properties)&&Zt(e.newProperties);case"split_node":return _.isPath(e.path)&&typeof e.position=="number"&&Zt(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Gi.isOperation(t))},isSelectionOperation(e){return Gi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Gi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return nt(nt({},e),{},{type:"remove_node"});case"insert_text":return nt(nt({},e),{},{type:"remove_text"});case"merge_node":return nt(nt({},e),{},{type:"split_node",path:_.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(_.equals(t,n))return e;if(_.isSibling(n,t))return nt(nt({},e),{},{path:t,newPath:n});var r=_.transform(n,e),i=_.transform(_.next(n),e);return nt(nt({},e),{},{path:r,newPath:i})}case"remove_node":return nt(nt({},e),{},{type:"insert_node"});case"remove_text":return nt(nt({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return nt(nt({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:u,newProperties:s}=e;return u==null?nt(nt({},e),{},{properties:s,newProperties:null}):s==null?nt(nt({},e),{},{properties:null,newProperties:u}):nt(nt({},e),{},{properties:s,newProperties:u})}case"split_node":return nt(nt({},e),{},{type:"merge_node",path:_.next(e.path)})}}},_={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=_.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var i=e[r],o=t[r];if(i!==o)break;n.push(i)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return _.equals(r,i)&&o>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return _.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return _.equals(r,i)&&o<a},equals(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return _.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&_.compare(e,t)===0},isBefore(e,t){return _.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&_.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&_.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&_.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&_.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),i=e[e.length-1],o=t[t.length-1];return i!==o&&_.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!_.isAncestor(t,e)&&!_.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Wg(e,r=>{var{affinity:i="forward"}=n;if(!(!e||(e==null?void 0:e.length)===0)){if(r===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(_.equals(o,r)||_.endsBefore(o,r)||_.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(_.equals(a,r)||_.isAncestor(a,r))return null;_.endsBefore(a,r)&&(r[a.length-1]-=1);break}case"merge_node":{var{path:u,position:s}=t;_.equals(u,r)||_.endsBefore(u,r)?r[u.length-1]-=1:_.isAncestor(u,r)&&(r[u.length-1]-=1,r[u.length]+=s);break}case"split_node":{var{path:l,position:c}=t;if(_.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else _.endsBefore(l,r)?r[l.length-1]+=1:_.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:f,newPath:d}=t;if(_.equals(f,d))return;if(_.isAncestor(f,r)||_.equals(f,r)){var p=d.slice();return _.endsBefore(f,d)&&f.length<d.length&&(p[f.length-1]-=1),p.concat(r.slice(f.length))}else _.isSibling(f,d)&&(_.isAncestor(d,r)||_.equals(d,r))?_.endsBefore(f,r)?r[f.length-1]-=1:r[f.length-1]+=1:_.endsBefore(d,r)||_.equals(d,r)||_.isAncestor(d,r)?(_.endsBefore(f,r)&&(r[f.length-1]-=1),r[d.length-1]+=1):_.endsBefore(f,r)&&(_.equals(d,r)&&(r[d.length-1]+=1),r[f.length-1]-=1);break}}}})}},RN={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=_.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}}};function R5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $e={compare(e,t){var n=_.compare(e.path,t.path);return n===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter(e,t){return $e.compare(e,t)===1},isBefore(e,t){return $e.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&_.equals(e.path,t.path)},isPoint(e){return Zt(e)&&typeof e.offset=="number"&&_.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Wg(e,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:a}=r;switch(t.type){case"insert_node":case"move_node":{r.path=_.transform(o,t,n);break}case"insert_text":{_.equals(t.path,o)&&t.offset<=a&&(r.offset+=t.text.length);break}case"merge_node":{_.equals(t.path,o)&&(r.offset+=t.position),r.path=_.transform(o,t,n);break}case"remove_text":{_.equals(t.path,o)&&t.offset<=a&&(r.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(_.equals(t.path,o)||_.isAncestor(t.path,o))return null;r.path=_.transform(o,t,n);break}case"split_node":{if(_.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.position<a||t.position===a&&i==="forward")&&(r.offset-=t.position,r.path=_.transform(o,t,j5(j5({},n),{},{affinity:"forward"})))}else r.path=_.transform(o,t,n);break}}})}},jN={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=$e.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}}},LN=["anchor","focus"];function L5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var R={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:i}=e;return R.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=R.edges(e);return t},equals(e,t){return $e.equals(e.anchor,t.anchor)&&$e.equals(e.focus,t.focus)},includes(e,t){if(R.isRange(t)){if(R.includes(e,t.anchor)||R.includes(e,t.focus))return!0;var[n,r]=R.edges(e),[i,o]=R.edges(t);return $e.isBefore(n,i)&&$e.isAfter(r,o)}var[a,u]=R.edges(e),s=!1,l=!1;return $e.isPoint(t)?(s=$e.compare(t,a)>=0,l=$e.compare(t,u)<=0):(s=_.compare(t,a.path)>=0,l=_.compare(t,u.path)<=0),s&&l},intersection(e,t){var n=fi(e,LN),[r,i]=R.edges(e),[o,a]=R.edges(t),u=$e.isBefore(r,o)?o:r,s=$e.isBefore(i,a)?i:a;return $e.isBefore(s,u)?null:MN({anchor:u,focus:s},n)},isBackward(e){var{anchor:t,focus:n}=e;return $e.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return $e.equals(t,n)},isExpanded(e){return!R.isCollapsed(e)},isForward(e){return!R.isBackward(e)},isRange(e){return Zt(e)&&$e.isPoint(e.anchor)&&$e.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=R.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Wg(e,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,a;if(i==="inward"){var u=R.isCollapsed(r);R.isForward(r)?(o="forward",a=u?o:"backward"):(o="backward",a=u?o:"forward")}else i==="outward"?R.isForward(r)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var s=$e.transform(r.anchor,t,{affinity:o}),l=$e.transform(r.focus,t,{affinity:a});if(!s||!l)return null;r.anchor=s,r.focus=l})}},zN={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=R.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}}},$9=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(Zt(r)&&Zt(i)){if(!$9(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==i[o])return!1}else if(r!==i)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},HN=["text"],UN=["anchor","focus"];function M5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ei(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var X={equals(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(o){var a=fi(o,HN);return a}return $9(r?i(e):e,r?i(t):t)},isText(e){return Zt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>X.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[ei({},e)];for(var r of t){var i=fi(r,UN),[o,a]=R.edges(r),u=[],s=0;for(var l of n){var{length:c}=l.text,f=s;if(s+=c,o.offset<=f&&a.offset>=s){Object.assign(l,i),u.push(l);continue}if(o.offset!==a.offset&&(o.offset===s||a.offset===f)||o.offset>s||a.offset<f||a.offset===f&&f!==0){u.push(l);continue}var d=l,p=void 0,g=void 0;if(a.offset<s){var v=a.offset-f;g=ei(ei({},d),{},{text:d.text.slice(v)}),d=ei(ei({},d),{},{text:d.text.slice(0,v)})}if(o.offset>f){var m=o.offset-f;p=ei(ei({},d),{},{text:d.text.slice(0,m)}),d=ei(ei({},d),{},{text:d.text.slice(m)})}Object.assign(d,i),p&&u.push(p),u.push(d),g&&u.push(g)}n=u}return n}};function z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var VN=(e,t,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=W.parent(e,r),a=r[r.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[u,s]of R.points(t))t[s]=$e.transform(u,n);break}case"insert_text":{var{path:l,offset:c,text:f}=n;if(f.length===0)break;var d=W.leaf(e,l),p=d.text.slice(0,c),g=d.text.slice(c);if(d.text=p+f+g,t)for(var[v,m]of R.points(t))t[m]=$e.transform(v,n);break}case"merge_node":{var{path:y}=n,h=W.get(e,y),$=_.previous(y),w=W.get(e,$),C=W.parent(e,y),D=y[y.length-1];if(X.isText(h)&&X.isText(w))w.text+=h.text;else if(!X.isText(h)&&!X.isText(w))w.children.push(...h.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(y,"] to nodes of different interfaces: ").concat(h," ").concat(w));if(C.children.splice(D,1),t)for(var[A,I]of R.points(t))t[I]=$e.transform(A,n);break}case"move_node":{var{path:M,newPath:V}=n;if(_.isAncestor(M,V))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(V,"] because the destination is inside itself."));var Y=W.get(e,M),J=W.parent(e,M),Z=M[M.length-1];J.children.splice(Z,1);var se=_.transform(M,n),ee=W.get(e,_.parent(se)),ae=se[se.length-1];if(ee.children.splice(ae,0,Y),t)for(var[fe,_e]of R.points(t))t[_e]=$e.transform(fe,n);break}case"remove_node":{var{path:ve}=n,ie=ve[ve.length-1],Ie=W.parent(e,ve);if(Ie.children.splice(ie,1),t)for(var[T,F]of R.points(t)){var k=$e.transform(T,n);if(t!=null&&k!=null)t[F]=k;else{var N=void 0,H=void 0;for(var[j,Q]of W.texts(e))if(_.compare(Q,ve)===-1)N=[j,Q];else{H=[j,Q];break}var ce=!1;N&&H&&(_.equals(H[1],ve)?ce=!_.hasPrevious(H[1]):ce=_.common(N[1],ve).length<_.common(H[1],ve).length),N&&!ce?(T.path=N[1],T.offset=N[0].text.length):H?(T.path=H[1],T.offset=0):t=null}}break}case"remove_text":{var{path:we,offset:Re,text:z}=n;if(z.length===0)break;var ze=W.leaf(e,we),ye=ze.text.slice(0,Re),ue=ze.text.slice(Re+z.length);if(ze.text=ye+ue,t)for(var[be,vn]of R.points(t))t[vn]=$e.transform(be,n);break}case"set_node":{var{path:qe,properties:lt,newProperties:ft}=n;if(qe.length===0)throw new Error("Cannot set properties on the root node!");var un=W.get(e,qe);for(var dt in ft){if(dt==="children"||dt==="text")throw new Error('Cannot set the "'.concat(dt,'" property of nodes!'));var Pn=ft[dt];Pn==null?delete un[dt]:un[dt]=Pn}for(var mn in lt)ft.hasOwnProperty(mn)||delete un[mn];break}case"set_selection":{var{newProperties:sn}=n;if(sn==null)t=sn;else{if(t==null){if(!R.isRange(sn))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(sn)," when there is no current selection."));t=al({},sn)}for(var vr in sn){var mr=sn[vr];if(mr==null){if(vr==="anchor"||vr==="focus")throw new Error('Cannot remove the "'.concat(vr,'" selection property'));delete t[vr]}else t[vr]=mr}}break}case"split_node":{var{path:yn,position:yr,properties:nn}=n;if(yn.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(yn,"] because the root node cannot be split."));var Nn=W.get(e,yn),Za=W.parent(e,yn),qs=yn[yn.length-1],Kr;if(X.isText(Nn)){var mi=Nn.text.slice(0,yr),Qa=Nn.text.slice(yr);Nn.text=mi,Kr=al(al({},nn),{},{text:Qa})}else{var yi=Nn.children.slice(0,yr),Yr=Nn.children.slice(yr);Nn.children=yi,Kr=al(al({},nn),{},{children:Yr})}if(Za.children.splice(qs+1,0,Kr),t)for(var[bn,bi]of R.points(t))t[bi]=$e.transform(bn,n);break}}return t},WN={transform(e,t){e.children=D5(e.children);var n=e.selection&&D5(e.selection);try{n=VN(e,n,t)}finally{e.children=S5(e.children),n?e.selection=Oa(n)?S5(n):n:e.selection=null}}},qN=["text"],GN=["children"];function H5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var KN={insertNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:a,match:u,select:s}=n;if(W.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=E.end(e,[]):a=[0],s=!0),s==null&&(s=!1),R.isRange(a))if(r||(a=E.unhangRange(e,a)),R.isCollapsed(a))a=a.anchor;else{var[,c]=R.edges(a),f=E.pointRef(e,c);P.delete(e,{at:a}),a=f.unref()}if($e.isPoint(a)){u==null&&(X.isText(l)?u=D=>X.isText(D):e.isInline(l)?u=D=>X.isText(D)||E.isInline(e,D):u=D=>E.isBlock(e,D));var[d]=E.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(d){var[,p]=d,g=E.pathRef(e,p),v=E.isEnd(e,a,p);P.splitNodes(e,{at:a,match:u,mode:o,voids:i});var m=g.unref();a=v?_.next(m):m}else return}var y=_.parent(a),h=a[a.length-1];if(!(!i&&E.void(e,{at:y}))){for(var $ of t){var w=y.concat(h);h++,e.apply({type:"insert_node",path:w,node:$}),a=_.next(a)}if(a=_.previous(a),s){var C=E.end(e,a);C&&P.select(e,C)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=_.isPath(n)?au(e,n):$=>E.isBlock(e,$)),!!n){var a=E.nodes(e,{at:n,match:o,mode:r,voids:i}),u=Array.from(a,$=>{var[,w]=$;return E.pathRef(e,w)});for(var s of u){var l=s.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=E.node(e,_.parent(l)),[f,d]=c,p=l[l.length-1],{length:g}=f.children;if(g===1){var v=_.next(d);P.moveNodes(e,{at:l,to:v,voids:i}),P.removeNodes(e,{at:d,voids:i})}else if(p===0)P.moveNodes(e,{at:l,to:d,voids:i});else if(p===g-1){var m=_.next(d);P.moveNodes(e,{at:l,to:m,voids:i})}else{var y=_.next(l),h=_.next(d);P.splitNodes(e,{at:y,voids:i}),P.moveNodes(e,{at:l,to:h,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(!!r){if(n==null)if(_.isPath(r)){var[u]=E.parent(e,r);n=M=>u.children.includes(M)}else n=M=>E.isBlock(e,M);if(!i&&R.isRange(r)&&(r=E.unhangRange(e,r)),R.isRange(r))if(R.isCollapsed(r))r=r.anchor;else{var[,s]=R.edges(r),l=E.pointRef(e,s);P.delete(e,{at:r}),r=l.unref(),t.at==null&&P.select(e,r)}var[c]=E.nodes(e,{at:r,match:n,voids:o,mode:a}),f=E.previous(e,{at:r,match:n,voids:o,mode:a});if(!(!c||!f)){var[d,p]=c,[g,v]=f;if(!(p.length===0||v.length===0)){var m=_.next(v),y=_.common(p,v),h=_.isSibling(p,v),$=Array.from(E.levels(e,{at:p}),M=>{var[V]=M;return V}).slice(y.length).slice(0,-1),w=E.above(e,{at:p,mode:"highest",match:M=>$.includes(M)&&w9(e,M)}),C=w&&E.pathRef(e,w[1]),D,A;if(X.isText(d)&&X.isText(g)){var I=fi(d,qN);A=g.text.length,D=I}else if(te.isElement(d)&&te.isElement(g)){var I=fi(d,GN);A=g.children.length,D=I}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(g)));h||P.moveNodes(e,{at:p,to:m,voids:o}),C&&P.removeNodes(e,{at:C.current,voids:o}),te.isElement(g)&&E.isEmpty(e,g)||X.isText(g)&&g.text===""&&v[v.length-1]!==0?P.removeNodes(e,{at:v,voids:o}):e.apply({type:"merge_node",path:m,position:A,properties:D}),C&&C.unref()}}}})},moveNodes(e,t){E.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(!!r){a==null&&(a=_.isPath(r)?au(e,r):p=>E.isBlock(e,p));var u=E.pathRef(e,n),s=E.nodes(e,{at:r,match:a,mode:i,voids:o}),l=Array.from(s,p=>{var[,g]=p;return E.pathRef(e,g)});for(var c of l){var f=c.unref(),d=u.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:d}),u.current&&_.isSibling(d,f)&&_.isAfter(d,f)&&(u.current=_.next(u.current))}u.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(!!o){a==null&&(a=_.isPath(o)?au(e,o):d=>E.isBlock(e,d)),!n&&R.isRange(o)&&(o=E.unhangRange(e,o));var u=E.nodes(e,{at:o,match:a,mode:i,voids:r}),s=Array.from(u,d=>{var[,p]=d;return E.pathRef(e,p)});for(var l of s){var c=l.unref();if(c){var[f]=E.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},setNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:o=!1,mode:a="lowest",split:u=!1,voids:s=!1}=n;if(!!i){if(r==null&&(r=_.isPath(i)?au(e,i):C=>E.isBlock(e,C)),!o&&R.isRange(i)&&(i=E.unhangRange(e,i)),u&&R.isRange(i)){if(R.isCollapsed(i)&&E.leaf(e,i.anchor)[0].text.length>0)return;var l=E.rangeRef(e,i,{affinity:"inward"}),[c,f]=R.edges(i),d=a==="lowest"?"lowest":"highest",p=E.isEnd(e,f,f.path);P.splitNodes(e,{at:f,match:r,mode:d,voids:s,always:!p});var g=E.isStart(e,c,c.path);P.splitNodes(e,{at:c,match:r,mode:d,voids:s,always:!g}),i=l.unref(),n.at==null&&P.select(e,i)}for(var[v,m]of E.nodes(e,{at:i,match:r,mode:a,voids:s})){var y={},h={};if(m.length!==0){var $=!1;for(var w in t)w==="children"||w==="text"||t[w]!==v[w]&&($=!0,v.hasOwnProperty(w)&&(y[w]=v[w]),t[w]!=null&&(h[w]=t[w]));$&&e.apply({type:"set_node",path:m,properties:y,newProperties:h})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection,height:a=0,always:u=!1}=t;if(i==null&&(i=fe=>E.isBlock(e,fe)),R.isRange(o)&&(o=YN(e,o)),_.isPath(o)){var s=o,l=E.point(e,s),[c]=E.parent(e,s);i=fe=>fe===c,a=l.path.length-s.length+1,o=l,u=!0}if(!!o){var f=E.pointRef(e,o,{affinity:"backward"}),[d]=E.nodes(e,{at:o,match:i,mode:n,voids:r});if(!!d){var p=E.void(e,{at:o,mode:"highest"}),g=0;if(!r&&p){var[v,m]=p;if(te.isElement(v)&&e.isInline(v)){var y=E.after(e,m);if(!y){var h={text:""},$=_.next(m);P.insertNodes(e,h,{at:$,voids:r}),y=E.point(e,$)}o=y,u=!0}var w=o.path.length-m.length;a=w+1,u=!0}var C=E.pointRef(e,o),D=o.path.length-a,[,A]=d,I=o.path.slice(0,D),M=a===0?o.offset:o.path[D]+g;for(var[V,Y]of E.levels(e,{at:I,reverse:!0,voids:r})){var J=!1;if(Y.length<A.length||Y.length===0||!r&&E.isVoid(e,V))break;var Z=f.current,se=E.isEnd(e,Z,Y);if(u||!f||!E.isEdge(e,Z,Y)){J=!0;var ee=W.extractProps(V);e.apply({type:"split_node",path:Y,position:M,properties:ee})}M=Y[Y.length-1]+(J||se?1:0)}if(t.at==null){var ae=C.current||E.end(e,[]);P.select(e,ae)}f.unref(),C.unref()}}})},unsetNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;P.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(!!o){a==null&&(a=_.isPath(o)?au(e,o):d=>E.isBlock(e,d)),_.isPath(o)&&(o=E.range(e,o));var u=R.isRange(o)?E.rangeRef(e,o):null,s=E.nodes(e,{at:o,match:a,mode:n,voids:i}),l=Array.from(s,d=>{var[,p]=d;return E.pathRef(e,p)}).reverse(),c=function(p){var g=p.unref(),[v]=E.node(e,g),m=E.range(e,g);r&&u&&(m=R.intersection(u.current,m)),P.liftNodes(e,{at:m,match:y=>te.isAncestor(v)&&v.children.includes(y),voids:i})};for(var f of l)c(f);u&&u.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{match:a,at:u=e.selection}=n;if(!!u){if(a==null&&(_.isPath(u)?a=au(e,u):e.isInline(t)?a=m=>E.isInline(e,m)||X.isText(m):a=m=>E.isBlock(e,m)),i&&R.isRange(u)){var[s,l]=R.edges(u),c=E.rangeRef(e,u,{affinity:"inward"});P.splitNodes(e,{at:l,match:a,voids:o}),P.splitNodes(e,{at:s,match:a,voids:o}),u=c.unref(),n.at==null&&P.select(e,u)}var f=Array.from(E.nodes(e,{at:u,match:e.isInline(t)?m=>E.isBlock(e,m):m=>E.isEditor(m),mode:"lowest",voids:o}));for(var[,d]of f){var p=R.isRange(u)?R.intersection(u,E.range(e,d)):u;if(!!p){var g=Array.from(E.nodes(e,{at:p,match:a,mode:r,voids:o}));if(g.length>0){var v=function(){var[m]=g,y=g[g.length-1],[,h]=m,[,$]=y;if(h.length===0&&$.length===0)return"continue";var w=_.equals(h,$)?_.parent(h):_.common(h,$),C=E.range(e,h,$),D=E.node(e,w),[A]=D,I=w.length+1,M=_.next($.slice(0,I)),V=U5(U5({},t),{},{children:[]});P.insertNodes(e,V,{at:M,voids:o}),P.moveNodes(e,{at:C,match:Y=>te.isAncestor(A)&&A.children.includes(Y),to:M.concat(0),voids:o})}();if(v==="continue")continue}}}}})}},w9=(e,t)=>{if(te.isElement(t)){var n=t;return E.isVoid(e,t)?!0:n.children.length===1?w9(e,n.children[0]):!1}else return!E.isEditor(t)},YN=(e,t)=>{if(R.isCollapsed(t))return t.anchor;var[,n]=R.edges(t),r=E.pointRef(e,n);return P.delete(e,{at:t}),r.unref()},au=(e,t)=>{var[n]=E.node(e,t);return r=>r===n};function V5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var XN={collapse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")P.select(e,r.anchor);else if(n==="focus")P.select(e,r.focus);else if(n==="start"){var[i]=R.edges(r);P.select(e,i)}else if(n==="end"){var[,o]=R.edges(r);P.select(e,o)}}else return},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(!!n){a==="start"&&(a=R.isBackward(n)?"focus":"anchor"),a==="end"&&(a=R.isBackward(n)?"anchor":"focus");var{anchor:u,focus:s}=n,l={distance:r,unit:i},c={};if(a==null||a==="anchor"){var f=o?E.before(e,u,l):E.after(e,u,l);f&&(c.anchor=f)}if(a==null||a==="focus"){var d=o?E.before(e,s,l):E.after(e,s,l);d&&(c.focus=d)}P.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=E.range(e,t),n){P.setSelection(e,t);return}if(!R.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})},setPoint(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=e,{edge:i="both"}=n;if(!!r){i==="start"&&(i=R.isBackward(r)?"focus":"anchor"),i==="end"&&(i=R.isBackward(r)?"anchor":"focus");var{anchor:o,focus:a}=r,u=i==="anchor"?o:a;P.setSelection(e,{[i==="anchor"?"anchor":"focus"]:W5(W5({},u),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(!!n){for(var o in t)(o==="anchor"&&t.anchor!=null&&!$e.equals(t.anchor,n.anchor)||o==="focus"&&t.focus!=null&&!$e.equals(t.focus,n.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==n[o])&&(r[o]=n[o],i[o]=t[o]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}}},JN={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:u=!1}=t;if(!!a){if(R.isRange(a)&&R.isCollapsed(a)&&(a=a.anchor),$e.isPoint(a)){var s=E.void(e,{at:a,mode:"highest"});if(!o&&s){var[,l]=s;a=l}else{var c={unit:r,distance:i},f=n?E.before(e,a,c)||E.start(e,[]):E.after(e,a,c)||E.end(e,[]);a={anchor:a,focus:f},u=!0}}if(_.isPath(a)){P.removeNodes(e,{at:a,voids:o});return}if(!R.isCollapsed(a)){if(!u){var[,d]=R.edges(a),p=E.end(e,[]);$e.equals(d,p)||(a=E.unhangRange(e,a,{voids:o}))}var[g,v]=R.edges(a),m=E.above(e,{match:ce=>E.isBlock(e,ce),at:g,voids:o}),y=E.above(e,{match:ce=>E.isBlock(e,ce),at:v,voids:o}),h=m&&y&&!_.equals(m[1],y[1]),$=_.equals(g.path,v.path),w=o?null:E.void(e,{at:g,mode:"highest"}),C=o?null:E.void(e,{at:v,mode:"highest"});if(w){var D=E.before(e,g);D&&m&&_.isAncestor(m[1],D.path)&&(g=D)}if(C){var A=E.after(e,v);A&&y&&_.isAncestor(y[1],A.path)&&(v=A)}var I=[],M;for(var V of E.nodes(e,{at:a,voids:o})){var[Y,J]=V;M&&_.compare(J,M)===0||(!o&&E.isVoid(e,Y)||!_.isCommon(J,g.path)&&!_.isCommon(J,v.path))&&(I.push(V),M=J)}var Z=Array.from(I,ce=>{var[,we]=ce;return E.pathRef(e,we)}),se=E.pointRef(e,g),ee=E.pointRef(e,v);if(!$&&!w){var ae=se.current,[fe]=E.leaf(e,ae),{path:_e}=ae,{offset:ve}=g,ie=fe.text.slice(ve);ie.length>0&&e.apply({type:"remove_text",path:_e,offset:ve,text:ie})}for(var Ie of Z){var T=Ie.unref();P.removeNodes(e,{at:T,voids:o})}if(!C){var F=ee.current,[k]=E.leaf(e,F),{path:N}=F,H=$?g.offset:0,j=k.text.slice(H,v.offset);j.length>0&&e.apply({type:"remove_text",path:N,offset:H,text:j})}!$&&h&&ee.current&&se.current&&P.mergeNodes(e,{at:ee.current,hanging:!0,voids:o});var Q=n?se.unref()||ee.unref():ee.unref()||se.unref();t.at==null&&Q&&P.select(e,Q)}}})},insertFragment(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:o=e.selection}=n;if(!!t.length){if(o)if(R.isRange(o))if(r||(o=E.unhangRange(e,o)),R.isCollapsed(o))o=o.anchor;else{var[,a]=R.edges(o);if(!i&&E.void(e,{at:a}))return;var u=E.pointRef(e,a);P.delete(e,{at:o}),o=u.unref()}else _.isPath(o)&&(o=E.start(e,o));else return;if(!(!i&&E.void(e,{at:o}))){var s=E.above(e,{at:o,match:k=>E.isInline(e,k),mode:"highest",voids:i});if(s){var[,l]=s;if(E.isEnd(e,o,l)){var c=E.after(e,l);o=c}else if(E.isStart(e,o,l)){var f=E.before(e,l);o=f}}var d=E.above(e,{match:k=>E.isBlock(e,k),at:o,voids:i}),[,p]=d,g=E.isStart(e,o,p),v=E.isEnd(e,o,p),m=g&&v,y=!g||g&&v,h=!v,[,$]=W.first({children:t},[]),[,w]=W.last({children:t},[]),C=[],D=k=>{var[N,H]=k,j=H.length===0;return j?!1:m?!0:!(y&&_.isAncestor(H,$)&&te.isElement(N)&&!e.isVoid(N)&&!e.isInline(N)||h&&_.isAncestor(H,w)&&te.isElement(N)&&!e.isVoid(N)&&!e.isInline(N))};for(var A of W.nodes({children:t},{pass:D}))D(A)&&C.push(A);var I=[],M=[],V=[],Y=!0,J=!1;for(var[Z]of C)te.isElement(Z)&&!e.isInline(Z)?(Y=!1,J=!0,M.push(Z)):Y?I.push(Z):V.push(Z);var[se]=E.nodes(e,{at:o,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),[,ee]=se,ae=E.isStart(e,o,ee),fe=E.isEnd(e,o,ee),_e=E.pathRef(e,v?_.next(p):p),ve=E.pathRef(e,fe?_.next(ee):ee),ie=E.pathRef(e,p);P.splitNodes(e,{at:o,match:k=>J?E.isBlock(e,k):X.isText(k)||E.isInline(e,k),mode:J?"lowest":"highest",voids:i});var Ie=E.pathRef(e,!ae||ae&&fe?_.next(ee):ee);if(P.insertNodes(e,I,{at:Ie.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),m&&M.length&&P.delete(e,{at:ie.unref(),voids:i}),P.insertNodes(e,M,{at:_e.current,match:k=>E.isBlock(e,k),mode:"lowest",voids:i}),P.insertNodes(e,V,{at:ve.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),!n.at){var T;V.length>0?T=_.previous(ve.current):M.length>0?T=_.previous(_e.current):T=_.previous(Ie.current);var F=E.end(e,T);P.select(e,F)}Ie.unref(),_e.unref(),ve.unref()}}})},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=e.selection}=n;if(!!i){if(_.isPath(i)&&(i=E.range(e,i)),R.isRange(i))if(R.isCollapsed(i))i=i.anchor;else{var o=R.end(i);if(!r&&E.void(e,{at:o}))return;var a=E.pointRef(e,o);P.delete(e,{at:i,voids:r}),i=a.unref(),P.setSelection(e,{anchor:i,focus:i})}if(!(!r&&E.void(e,{at:i}))){var{path:u,offset:s}=i;t.length>0&&e.apply({type:"insert_text",path:u,offset:s,text:t})}}})}};function q5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q5(Object(n),!0).forEach(function(r){Wr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var P=_d(_d(_d(_d({},WN),KN),XN),JN),ot=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T$(e){var t={exports:{}};return e(t,t.exports),t.exports}var E9=9007199254740991,ZN="[object Arguments]",QN="[object Function]",eI="[object GeneratorFunction]",w2="[object Map]",tI="[object Object]",G5="[object Promise]",E2="[object Set]",nI="[object String]",K5="[object WeakMap]",Y5="[object DataView]",rI=/[\\^$.*+?()[\]{}|]/g,iI=/^\[object .+?Constructor\]$/,oI=/^(?:0|[1-9]\d*)$/,k$="\\ud800-\\udfff",C9="\\u0300-\\u036f\\ufe20-\\ufe23",D9="\\u20d0-\\u20f0",S9="\\ufe0e\\ufe0f",aI="["+k$+"]",C2="["+C9+D9+"]",D2="\\ud83c[\\udffb-\\udfff]",uI="(?:"+C2+"|"+D2+")",x9="[^"+k$+"]",A9="(?:\\ud83c[\\udde6-\\uddff]){2}",O9="[\\ud800-\\udbff][\\udc00-\\udfff]",B9="\\u200d",F9=uI+"?",T9="["+S9+"]?",sI="(?:"+B9+"(?:"+[x9,A9,O9].join("|")+")"+T9+F9+")*",lI=T9+F9+sI,cI="(?:"+[x9+C2+"?",C2,A9,O9,aI].join("|")+")",fI=RegExp(D2+"(?="+D2+")|"+cI+lI,"g"),dI=RegExp("["+B9+k$+C9+D9+S9+"]"),pI=typeof ot=="object"&&ot&&ot.Object===Object&&ot,hI=typeof self=="object"&&self&&self.Object===Object&&self,Ha=pI||hI||Function("return this")();function gI(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function vI(e){return e.split("")}function mI(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function yI(e,t){return gI(t,function(n){return e[n]})}function bI(e,t){return e==null?void 0:e[t]}function $I(e){return dI.test(e)}function wI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function EI(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function CI(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function DI(e,t){return function(n){return e(t(n))}}function SI(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}function xI(e){return $I(e)?AI(e):vI(e)}function AI(e){return e.match(fI)||[]}var OI=Function.prototype,qg=Object.prototype,Lv=Ha["__core-js_shared__"],X5=function(){var e=/[^.]+$/.exec(Lv&&Lv.keys&&Lv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k9=OI.toString,Gg=qg.hasOwnProperty,jf=qg.toString,BI=RegExp("^"+k9.call(Gg).replace(rI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),J5=Ha.Symbol,Mv=J5?J5.iterator:void 0,FI=qg.propertyIsEnumerable,TI=DI(Object.keys,Object),S2=Lf(Ha,"DataView"),x2=Lf(Ha,"Map"),A2=Lf(Ha,"Promise"),O2=Lf(Ha,"Set"),B2=Lf(Ha,"WeakMap"),kI=Ua(S2),_I=Ua(x2),PI=Ua(A2),NI=Ua(O2),II=Ua(B2);function RI(e,t){var n=_9(e)||WI(e)?mI(e.length,String):[],r=n.length,i=!!r;for(var o in e)(t||Gg.call(e,o))&&!(i&&(o=="length"||HI(o,r)))&&n.push(o);return n}function jI(e){return jf.call(e)}function LI(e){if(!N9(e)||UI(e))return!1;var t=P9(e)||wI(e)?BI:iI;return t.test(Ua(e))}function MI(e){if(!VI(e))return TI(e);var t=[];for(var n in Object(e))Gg.call(e,n)&&n!="constructor"&&t.push(n);return t}function zI(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Lf(e,t){var n=bI(e,t);return LI(n)?n:void 0}var Jo=jI;(S2&&Jo(new S2(new ArrayBuffer(1)))!=Y5||x2&&Jo(new x2)!=w2||A2&&Jo(A2.resolve())!=G5||O2&&Jo(new O2)!=E2||B2&&Jo(new B2)!=K5)&&(Jo=function(e){var t=jf.call(e),n=t==tI?e.constructor:void 0,r=n?Ua(n):void 0;if(r)switch(r){case kI:return Y5;case _I:return w2;case PI:return G5;case NI:return E2;case II:return K5}return t});function HI(e,t){return t=t==null?E9:t,!!t&&(typeof e=="number"||oI.test(e))&&e>-1&&e%1==0&&e<t}function UI(e){return!!X5&&X5 in e}function VI(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||qg;return e===n}function Ua(e){if(e!=null){try{return k9.call(e)}catch{}try{return e+""}catch{}}return""}function WI(e){return qI(e)&&Gg.call(e,"callee")&&(!FI.call(e,"callee")||jf.call(e)==ZN)}var _9=Array.isArray;function _$(e){return e!=null&&GI(e.length)&&!P9(e)}function qI(e){return I9(e)&&_$(e)}function P9(e){var t=N9(e)?jf.call(e):"";return t==QN||t==eI}function GI(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=E9}function N9(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function I9(e){return!!e&&typeof e=="object"}function KI(e){return typeof e=="string"||!_9(e)&&I9(e)&&jf.call(e)==nI}function YI(e){if(!e)return[];if(_$(e))return KI(e)?xI(e):zI(e);if(Mv&&e[Mv])return EI(e[Mv]());var t=Jo(e),n=t==w2?CI:t==E2?SI:JI;return n(e)}function XI(e){return _$(e)?RI(e):MI(e)}function JI(e){return e?yI(e,XI(e)):[]}var Z5=YI;function Q5(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function P$(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){typeof e[n]>"u"?e[n]=t[n]:Q5(t[n])&&Q5(e[n])&&Object.keys(t[n]).length>0&&P$(e[n],t[n])})}var R9={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Mf(){var e=typeof document<"u"?document:{};return P$(e,R9),e}var ZI={document:R9,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout>"u"||clearTimeout(e)}};function Va(){var e=typeof window<"u"?window:{};return P$(e,ZI),e}function QI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function F2(e){return F2=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},F2(e)}function ah(e,t){return ah=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ah(e,t)}function eR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tp(e,t,n){return eR()?Tp=Reflect.construct:Tp=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&ah(l,a.prototype),l},Tp.apply(null,arguments)}function tR(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function T2(e){var t=typeof Map=="function"?new Map:void 0;return T2=function(r){if(r===null||!tR(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Tp(r,arguments,F2(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ah(i,r)},T2(e)}function nR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rR(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(r){t.__proto__=r}})}var Ki=function(e){QI(t,e);function t(n){var r;return r=e.call.apply(e,[this].concat(n))||this,rR(nR(r)),r}return t}(T2(Array));function Kg(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,Kg(n)):t.push(n)}),t}function j9(e,t){return Array.prototype.filter.call(e,t)}function iR(e){for(var t=[],n=0;n<e.length;n+=1)t.indexOf(e[n])===-1&&t.push(e[n]);return t}function oR(e){return e.toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function aR(e,t){if(typeof e!="string")return[e];for(var n=[],r=t.querySelectorAll(e),i=0;i<r.length;i+=1)n.push(r[i]);return n}function O(e,t){var n=Va(),r=Mf(),i=[];if(!t&&e instanceof Ki)return e;if(!e)return new Ki(i);if(typeof e=="string"){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var a="div";o.indexOf("<li")===0&&(a="ul"),o.indexOf("<tr")===0&&(a="tbody"),(o.indexOf("<td")===0||o.indexOf("<th")===0)&&(a="tr"),o.indexOf("<tbody")===0&&(a="table"),o.indexOf("<option")===0&&(a="select");var u=r.createElement(a);u.innerHTML=o;for(var s=0;s<u.childNodes.length;s+=1)i.push(u.childNodes[s])}else i=aR(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)i.push(e);else if(Array.isArray(e)){if(e instanceof Ki)return e;i=e}return new Ki(iR(i))}O.fn=Ki.prototype;function as(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Kg(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).add.apply(o,r)}),this}function us(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Kg(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).remove.apply(o,r)}),this}function ss(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Kg(t.map(function(i){return i.split(" ")}));return j9(this,function(i){return r.filter(function(o){return i.classList.contains(o)}).length>0}).length>0}function jr(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(arguments.length===2)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this}function uh(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function ls(){var e=this[0];if(!!e){var t={};if(e.dataset)for(var n in e.dataset)t[n]=e.dataset[n];else for(var r=0;r<e.attributes.length;r+=1){var i=e.attributes[r];i.name.indexOf("data-")>=0&&(t[oR(i.name.split("data-")[1])]=i.value)}for(var o in t)t[o]==="false"?t[o]=!1:t[o]==="true"?t[o]=!0:parseFloat(t[o])===t[o]*1&&(t[o]*=1);return t}}function Lr(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r<t.selectedOptions.length;r+=1)n.push(t.selectedOptions[r].value);return n}return t.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(e)&&o.multiple&&o.nodeName.toLowerCase()==="select")for(var a=0;a<o.options.length;a+=1)o.options[a].selected=e.indexOf(o.options[a].value)>=0;else o.value=e}return this}function Mr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];typeof t[1]=="function"&&(r=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);function u(v){var m=v.target;if(!!m){var y=v.target.dom7EventData||[];if(y.indexOf(v)<0&&y.unshift(v),O(m).is(i))o.apply(m,y);else for(var h=O(m).parents(),$=0;$<h.length;$+=1)O(h[$]).is(i)&&o.apply(h[$],y)}}function s(v){var m=v&&v.target?v.target.dom7EventData||[]:[];m.indexOf(v)<0&&m.unshift(v),o.apply(this,m)}for(var l=r.split(" "),c,f=0;f<this.length;f+=1){var d=this[f];if(i)for(c=0;c<l.length;c+=1){var g=l[c];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[g]||(d.dom7LiveListeners[g]=[]),d.dom7LiveListeners[g].push({listener:o,proxyListener:u}),d.addEventListener(g,u,a)}else for(c=0;c<l.length;c+=1){var p=l[c];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[p]||(d.dom7Listeners[p]=[]),d.dom7Listeners[p].push({listener:o,proxyListener:s}),d.addEventListener(p,s,a)}}return this}function e6(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];typeof t[1]=="function"&&(r=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);for(var u=r.split(" "),s=0;s<u.length;s+=1)for(var l=u[s],c=0;c<this.length;c+=1){var f=this[c],d=void 0;if(!i&&f.dom7Listeners?d=f.dom7Listeners[l]:i&&f.dom7LiveListeners&&(d=f.dom7LiveListeners[l]),d&&d.length)for(var p=d.length-1;p>=0;p-=1){var g=d[p];o&&g.listener===o||o&&g.listener&&g.listener.dom7proxy&&g.listener.dom7proxy===o?(f.removeEventListener(l,g.proxyListener,a),d.splice(p,1)):o||(f.removeEventListener(l,g.proxyListener,a),d.splice(p,1))}}return this}function sh(){var e=Va();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function lh(){var e=Va();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function t6(){if(this.length>0){var e=Va(),t=Mf(),n=this[0],r=n.getBoundingClientRect(),i=t.body,o=n.clientTop||i.clientTop||0,a=n.clientLeft||i.clientLeft||0,u=n===e?e.scrollY:n.scrollTop,s=n===e?e.scrollX:n.scrollLeft;return{top:r.top+u-o,left:r.left+s-a}}return null}function cs(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function ch(){for(var e=Va(),t=0;t<this.length;t+=1){var n=this[t];n.style.display==="none"&&(n.style.display=""),e.getComputedStyle(n,null).getPropertyValue("display")==="none"&&(n.style.display="block")}return this}function fh(e,t){var n=Va(),r;if(arguments.length===1)if(typeof e=="string"){if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(r=0;r<this.length;r+=1)for(var i in e)this[r].style[i]=e[i];return this}if(arguments.length===2&&typeof e=="string"){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function dh(e){return e?(this.forEach(function(t,n){e.apply(t,[t,n])}),this):this}function n6(e){var t=j9(this,e);return O(t)}function go(e){if(typeof e>"u")return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function ph(e){if(typeof e>"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function r6(e){var t=Va(),n=Mf(),r=this[0],i,o;if(!r||typeof e>"u")return!1;if(typeof e=="string"){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(i=O(e),o=0;o<i.length;o+=1)if(i[o]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof Ki){for(i=e.nodeType?[e]:e,o=0;o<i.length;o+=1)if(i[o]===r)return!0;return!1}return!1}function zr(){for(var e,t=Mf(),n=0;n<arguments.length;n+=1){e=n<0||arguments.length<=n?void 0:arguments[n];for(var r=0;r<this.length;r+=1)if(typeof e=="string"){var i=t.createElement("div");for(i.innerHTML=e;i.firstChild;)this[r].appendChild(i.firstChild)}else if(e instanceof Ki)for(var o=0;o<e.length;o+=1)this[r].appendChild(e[o]);else this[r].appendChild(e)}return this}function i6(e){var t=Mf(),n,r;for(n=0;n<this.length;n+=1)if(typeof e=="string"){var i=t.createElement("div");for(i.innerHTML=e,r=i.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(e instanceof Ki)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function hh(e){for(var t=[],n=0;n<this.length;n+=1)this[n].parentNode!==null&&(e?O(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return O(t)}function gh(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)e?O(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return O(t)}function fs(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(e),i=0;i<r.length;i+=1)t.push(r[i]);return O(t)}function ds(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)(!e||O(r[i]).is(e))&&t.push(r[i]);return O(t)}function ps(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function hs(){for(var e=0;e<this.length;e+=1){var t=this[e];if(t.nodeType===1){for(var n=0;n<t.childNodes.length;n+=1)t.childNodes[n].parentNode&&t.childNodes[n].parentNode.removeChild(t.childNodes[n]);t.textContent=""}}return this}var uR="resize scroll".split(" ");function L9(e){function t(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(typeof r[0]>"u"){for(var o=0;o<this.length;o+=1)uR.indexOf(e)<0&&(e in this[o]?this[o][e]():O(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(r))}return t}var o6=L9("click"),vo=L9("focus"),M9=9007199254740991,sR="[object Arguments]",lR="[object Function]",cR="[object GeneratorFunction]",fR=/^(?:0|[1-9]\d*)$/;function dR(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function pR(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function hR(e,t){return function(n){return e(t(n))}}var Yg=Object.prototype,N$=Yg.hasOwnProperty,z9=Yg.toString,gR=Yg.propertyIsEnumerable,vR=hR(Object.keys,Object);function mR(e,t){var n=H9(e)||AR(e)?pR(e.length,String):[],r=n.length,i=!!r;for(var o in e)(t||N$.call(e,o))&&!(i&&(o=="length"||DR(o,r)))&&n.push(o);return n}var yR=ER($R),bR=CR();function $R(e,t){return e&&bR(e,t,_R)}function wR(e){if(!SR(e))return vR(e);var t=[];for(var n in Object(e))N$.call(e,n)&&n!="constructor"&&t.push(n);return t}function ER(e,t){return function(n,r){if(n==null)return n;if(!I$(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}function CR(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++i];if(n(o[s],s,o)===!1)break}return t}}function DR(e,t){return t=t==null?M9:t,!!t&&(typeof e=="number"||fR.test(e))&&e>-1&&e%1==0&&e<t}function SR(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Yg;return e===n}function xR(e,t){var n=H9(e)?dR:yR;return n(e,typeof t=="function"?t:PR)}function AR(e){return OR(e)&&N$.call(e,"callee")&&(!gR.call(e,"callee")||z9.call(e)==sR)}var H9=Array.isArray;function I$(e){return e!=null&&FR(e.length)&&!BR(e)}function OR(e){return kR(e)&&I$(e)}function BR(e){var t=TR(e)?z9.call(e):"";return t==lR||t==cR}function FR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=M9}function TR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function kR(e){return!!e&&typeof e=="object"}function _R(e){return I$(e)?mR(e):wR(e)}function PR(e){return e}var R$=xR;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let U9=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var V9="Expected a function",a6=0/0,NR="[object Symbol]",IR=/^\s+|\s+$/g,RR=/^[-+]0x[0-9a-f]+$/i,jR=/^0b[01]+$/i,LR=/^0o[0-7]+$/i,MR=parseInt,zR=typeof ot=="object"&&ot&&ot.Object===Object&&ot,HR=typeof self=="object"&&self&&self.Object===Object&&self,UR=zR||HR||Function("return this")(),VR=Object.prototype,WR=VR.toString,qR=Math.max,GR=Math.min,zv=function(){return UR.Date.now()};function KR(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(V9);t=u6(t)||0,vh(n)&&(c=!!n.leading,f="maxWait"in n,o=f?qR(u6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,I=i;return r=i=void 0,l=D,a=e.apply(I,A),a}function g(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var A=D-s,I=D-l,M=t-A;return f?GR(M,o-I):M}function m(D){var A=D-s,I=D-l;return s===void 0||A>=t||A<0||f&&I>=o}function y(){var D=zv();if(m(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(zv())}function C(){var D=zv(),A=m(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return g(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return C.cancel=$,C.flush=w,C}function YR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(V9);return vh(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),KR(e,t,{leading:r,maxWait:t,trailing:i})}function vh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function XR(e){return!!e&&typeof e=="object"}function JR(e){return typeof e=="symbol"||XR(e)&&WR.call(e)==NR}function u6(e){if(typeof e=="number")return e;if(JR(e))return a6;if(vh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(IR,"");var n=jR.test(e);return n||LR.test(e)?MR(e.slice(2),n?2:8):RR.test(e)?a6:+e}var Fa=YR;function ZR(e,t){return document.createElement(e,t)}function QR(e,t,n){return document.createElementNS(e,t,n)}function ej(e){return document.createTextNode(e)}function tj(e){return document.createComment(e)}function nj(e,t,n){e.insertBefore(t,n)}function rj(e,t){e.removeChild(t)}function ij(e,t){e.appendChild(t)}function oj(e){return e.parentNode}function aj(e){return e.nextSibling}function uj(e){return e.tagName}function sj(e,t){e.textContent=t}function lj(e){return e.textContent}function cj(e){return e.nodeType===1}function fj(e){return e.nodeType===3}function dj(e){return e.nodeType===8}const pj={createElement:ZR,createElementNS:QR,createTextNode:ej,createComment:tj,insertBefore:nj,removeChild:rj,appendChild:ij,parentNode:oj,nextSibling:aj,tagName:uj,setTextContent:sj,getTextContent:lj,isElement:cj,isText:fj,isComment:dj};function Gc(e,t,n,r,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:n,text:r,elm:i,key:o}}const k2=Array.isArray;function kp(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function Hv(e){return e===void 0}function $n(e){return e!==void 0}const s6=Gc("",{},[],void 0,void 0);function ul(e,t){var n,r;const i=e.key===t.key,o=((n=e.data)===null||n===void 0?void 0:n.is)===((r=t.data)===null||r===void 0?void 0:r.is);return e.sel===t.sel&&i&&o}function hj(e){return e.sel!==void 0}function gj(e,t,n){var r;const i={};for(let o=t;o<=n;++o){const a=(r=e[o])===null||r===void 0?void 0:r.key;a!==void 0&&(i[a]=o)}return i}const vj=["create","update","remove","destroy","pre","post"];function mj(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t!==void 0?t:pj;for(const d of vj)for(const p of e){const g=p[d];g!==void 0&&n[d].push(g)}function i(d){const p=d.id?"#"+d.id:"",g=d.getAttribute("class"),v=g?"."+g.split(" ").join("."):"";return Gc(r.tagName(d).toLowerCase()+p+v,{},[],void 0,d)}function o(d,p){return function(){if(--p===0){const v=r.parentNode(d);r.removeChild(v,d)}}}function a(d,p){var g,v;let m,y=d.data;if(y!==void 0){const w=(g=y.hook)===null||g===void 0?void 0:g.init;$n(w)&&(w(d),y=d.data)}const h=d.children,$=d.sel;if($==="!")Hv(d.text)&&(d.text=""),d.elm=r.createComment(d.text);else if($!==void 0){const w=$.indexOf("#"),C=$.indexOf(".",w),D=w>0?w:$.length,A=C>0?C:$.length,I=w!==-1||C!==-1?$.slice(0,Math.min(D,A)):$,M=d.elm=$n(y)&&$n(m=y.ns)?r.createElementNS(m,I,y):r.createElement(I,y);for(D<A&&M.setAttribute("id",$.slice(D+1,A)),C>0&&M.setAttribute("class",$.slice(A+1).replace(/\./g," ")),m=0;m<n.create.length;++m)n.create[m](s6,d);if(k2(h))for(m=0;m<h.length;++m){const Y=h[m];Y!=null&&r.appendChild(M,a(Y,p))}else kp(d.text)&&r.appendChild(M,r.createTextNode(d.text));const V=d.data.hook;$n(V)&&((v=V.create)===null||v===void 0||v.call(V,s6,d),V.insert&&p.push(d))}else d.elm=r.createTextNode(d.text);return d.elm}function u(d,p,g,v,m,y){for(;v<=m;++v){const h=g[v];h!=null&&r.insertBefore(d,a(h,y),p)}}function s(d){var p,g;const v=d.data;if(v!==void 0){(g=(p=v==null?void 0:v.hook)===null||p===void 0?void 0:p.destroy)===null||g===void 0||g.call(p,d);for(let m=0;m<n.destroy.length;++m)n.destroy[m](d);if(d.children!==void 0)for(let m=0;m<d.children.length;++m){const y=d.children[m];y!=null&&typeof y!="string"&&s(y)}}}function l(d,p,g,v){for(var m,y;g<=v;++g){let h,$;const w=p[g];if(w!=null)if($n(w.sel)){s(w),h=n.remove.length+1,$=o(w.elm,h);for(let D=0;D<n.remove.length;++D)n.remove[D](w,$);const C=(y=(m=w==null?void 0:w.data)===null||m===void 0?void 0:m.hook)===null||y===void 0?void 0:y.remove;$n(C)?C(w,$):$()}else r.removeChild(d,w.elm)}}function c(d,p,g,v){let m=0,y=0,h=p.length-1,$=p[0],w=p[h],C=g.length-1,D=g[0],A=g[C],I,M,V,Y;for(;m<=h&&y<=C;)$==null?$=p[++m]:w==null?w=p[--h]:D==null?D=g[++y]:A==null?A=g[--C]:ul($,D)?(f($,D,v),$=p[++m],D=g[++y]):ul(w,A)?(f(w,A,v),w=p[--h],A=g[--C]):ul($,A)?(f($,A,v),r.insertBefore(d,$.elm,r.nextSibling(w.elm)),$=p[++m],A=g[--C]):ul(w,D)?(f(w,D,v),r.insertBefore(d,w.elm,$.elm),w=p[--h],D=g[++y]):(I===void 0&&(I=gj(p,m,h)),M=I[D.key],Hv(M)?r.insertBefore(d,a(D,v),$.elm):(V=p[M],V.sel!==D.sel?r.insertBefore(d,a(D,v),$.elm):(f(V,D,v),p[M]=void 0,r.insertBefore(d,V.elm,$.elm))),D=g[++y]);(m<=h||y<=C)&&(m>h?(Y=g[C+1]==null?null:g[C+1].elm,u(d,Y,g,y,C,v)):l(d,p,m,h))}function f(d,p,g){var v,m,y,h,$;const w=(v=p.data)===null||v===void 0?void 0:v.hook;(m=w==null?void 0:w.prepatch)===null||m===void 0||m.call(w,d,p);const C=p.elm=d.elm,D=d.children,A=p.children;if(d!==p){if(p.data!==void 0){for(let I=0;I<n.update.length;++I)n.update[I](d,p);(h=(y=p.data.hook)===null||y===void 0?void 0:y.update)===null||h===void 0||h.call(y,d,p)}Hv(p.text)?$n(D)&&$n(A)?D!==A&&c(C,D,A,g):$n(A)?($n(d.text)&&r.setTextContent(C,""),u(C,null,A,0,A.length-1,g)):$n(D)?l(C,D,0,D.length-1):$n(d.text)&&r.setTextContent(C,""):d.text!==p.text&&($n(D)&&l(C,D,0,D.length-1),r.setTextContent(C,p.text)),($=w==null?void 0:w.postpatch)===null||$===void 0||$.call(w,d,p)}}return function(p,g){let v,m,y;const h=[];for(v=0;v<n.pre.length;++v)n.pre[v]();for(hj(p)||(p=i(p)),ul(p,g)?f(p,g,h):(m=p.elm,y=r.parentNode(m),a(g,h),y!==null&&(r.insertBefore(y,g.elm,r.nextSibling(m)),l(y,[p],0,0))),v=0;v<h.length;++v)h[v].data.hook.insert(h[v]);for(v=0;v<n.post.length;++v)n.post[v]();return g}}function W9(e,t,n){if(e.ns="http://www.w3.org/2000/svg",n!=="foreignObject"&&t!==void 0)for(let r=0;r<t.length;++r){const i=t[r].data;i!==void 0&&W9(i,t[r].children,t[r].sel)}}function gs(e,t,n){let r={},i,o,a;if(n!==void 0?(t!==null&&(r=t),k2(n)?i=n:kp(n)?o=n.toString():n&&n.sel&&(i=[n])):t!=null&&(k2(t)?i=t:kp(t)?o=t.toString():t&&t.sel?i=[t]:r=t),i!==void 0)for(a=0;a<i.length;++a)kp(i[a])&&(i[a]=Gc(void 0,void 0,void 0,i[a],void 0));return e[0]==="s"&&e[1]==="v"&&e[2]==="g"&&(e.length===3||e[3]==="."||e[3]==="#")&&W9(r,i,e),Gc(e,r,i,o,void 0)}function l6(e,t){let n,r;const i=t.elm;let o=e.data.class,a=t.data.class;if(!(!o&&!a)&&o!==a){o=o||{},a=a||{};for(r in o)o[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&i.classList.remove(r);for(r in a)n=a[r],n!==o[r]&&i.classList[n?"add":"remove"](r)}}const yj={create:l6,update:l6},c6=/[A-Z]/g;function f6(e,t){const n=t.elm;let r=e.data.dataset,i=t.data.dataset,o;if(!r&&!i||r===i)return;r=r||{},i=i||{};const a=n.dataset;for(o in r)i[o]||(a?o in a&&delete a[o]:n.removeAttribute("data-"+o.replace(c6,"-$&").toLowerCase()));for(o in i)r[o]!==i[o]&&(a?a[o]=i[o]:n.setAttribute("data-"+o.replace(c6,"-$&").toLowerCase(),i[o]))}const bj={create:f6,update:f6};function q9(e,t,n){if(typeof e=="function")e.call(t,n,t);else if(typeof e=="object")for(let r=0;r<e.length;r++)q9(e[r],t,n)}function $j(e,t){const n=e.type,r=t.data.on;r&&r[n]&&q9(r[n],t,e)}function wj(){return function e(t){$j(t,e.vnode)}}function Uv(e,t){const n=e.data.on,r=e.listener,i=e.elm,o=t&&t.data.on,a=t&&t.elm;let u;if(n!==o){if(n&&r)if(o)for(u in n)o[u]||i.removeEventListener(u,r,!1);else for(u in n)i.removeEventListener(u,r,!1);if(o){const s=t.listener=e.listener||wj();if(s.vnode=t,n)for(u in o)n[u]||a.addEventListener(u,s,!1);else for(u in o)a.addEventListener(u,s,!1)}}}const Ej={create:Uv,update:Uv,destroy:Uv};function d6(e,t){let n,r,i;const o=t.elm;let a=e.data.props,u=t.data.props;if(!(!a&&!u)&&a!==u){a=a||{},u=u||{};for(n in u)r=u[n],i=a[n],i!==r&&(n!=="value"||o[n]!==r)&&(o[n]=r)}}const Cj={create:d6,update:d6},p6=typeof window<"u"&&window.requestAnimationFrame.bind(window)||setTimeout,Dj=function(e){p6(function(){p6(e)})};let _2=!1;function Sj(e,t,n){Dj(function(){e[t]=n})}function h6(e,t){let n,r;const i=t.elm;let o=e.data.style,a=t.data.style;if(!o&&!a||o===a)return;o=o||{},a=a||{};const u="delayed"in o;for(r in o)a[r]||(r[0]==="-"&&r[1]==="-"?i.style.removeProperty(r):i.style[r]="");for(r in a)if(n=a[r],r==="delayed"&&a.delayed)for(const s in a.delayed)n=a.delayed[s],(!u||n!==o.delayed[s])&&Sj(i.style,s,n);else r!=="remove"&&n!==o[r]&&(r[0]==="-"&&r[1]==="-"?i.style.setProperty(r,n):i.style[r]=n)}function xj(e){let t,n;const r=e.elm,i=e.data.style;if(!(!i||!(t=i.destroy)))for(n in t)r.style[n]=t[n]}function Aj(e,t){const n=e.data.style;if(!n||!n.remove){t();return}_2||(e.elm.offsetLeft,_2=!0);let r;const i=e.elm;let o=0;const a=n.remove;let u=0;const s=[];for(r in a)s.push(r),i.style[r]=a[r];const c=getComputedStyle(i)["transition-property"].split(", ");for(;o<c.length;++o)s.indexOf(c[o])!==-1&&u++;i.addEventListener("transitionend",function(f){f.target===i&&--u,u===0&&t()})}function Oj(){_2=!1}const Bj={pre:Oj,create:h6,update:h6,destroy:xj,remove:Aj};function G9(e,t){for(const n of e)n!=null&&n!==!1&&n!==""&&(Array.isArray(n)?G9(n,t):typeof n=="string"||typeof n=="number"||typeof n=="boolean"?t.push(Gc(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function de(e,t,...n){const r=G9(n,[]);return typeof e=="function"?e(t,r):r.length===1&&!r[0].sel&&r[0].text?gs(e,t,r[0].text):gs(e,t,r)}(function(e){})(de||(de={}));var Fj=1/0,Tj="[object Symbol]",kj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_j=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xg="\\ud800-\\udfff",K9="\\u0300-\\u036f\\ufe20-\\ufe23",Y9="\\u20d0-\\u20f0",X9="\\u2700-\\u27bf",J9="a-z\\xdf-\\xf6\\xf8-\\xff",Pj="\\xac\\xb1\\xd7\\xf7",Nj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ij="\\u2000-\\u206f",Rj=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Z9="A-Z\\xc0-\\xd6\\xd8-\\xde",Q9="\\ufe0e\\ufe0f",eO=Pj+Nj+Ij+Rj,j$="['\u2019]",jj="["+Xg+"]",g6="["+eO+"]",mh="["+K9+Y9+"]",tO="\\d+",Lj="["+X9+"]",nO="["+J9+"]",rO="[^"+Xg+eO+tO+X9+J9+Z9+"]",P2="\\ud83c[\\udffb-\\udfff]",Mj="(?:"+mh+"|"+P2+")",iO="[^"+Xg+"]",L$="(?:\\ud83c[\\udde6-\\uddff]){2}",M$="[\\ud800-\\udbff][\\udc00-\\udfff]",Nu="["+Z9+"]",oO="\\u200d",v6="(?:"+nO+"|"+rO+")",zj="(?:"+Nu+"|"+rO+")",m6="(?:"+j$+"(?:d|ll|m|re|s|t|ve))?",y6="(?:"+j$+"(?:D|LL|M|RE|S|T|VE))?",aO=Mj+"?",uO="["+Q9+"]?",Hj="(?:"+oO+"(?:"+[iO,L$,M$].join("|")+")"+uO+aO+")*",sO=uO+aO+Hj,Uj="(?:"+[Lj,L$,M$].join("|")+")"+sO,Vj="(?:"+[iO+mh+"?",mh,L$,M$,jj].join("|")+")",Wj=RegExp(j$,"g"),qj=RegExp(mh,"g"),Gj=RegExp(P2+"(?="+P2+")|"+Vj+sO,"g"),Kj=RegExp([Nu+"?"+nO+"+"+m6+"(?="+[g6,Nu,"$"].join("|")+")",zj+"+"+y6+"(?="+[g6,Nu+v6,"$"].join("|")+")",Nu+"?"+v6+"+"+m6,Nu+"+"+y6,tO,Uj].join("|"),"g"),Yj=RegExp("["+oO+Xg+K9+Y9+Q9+"]"),Xj=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jj={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},Zj=typeof ot=="object"&&ot&&ot.Object===Object&&ot,Qj=typeof self=="object"&&self&&self.Object===Object&&self,eL=Zj||Qj||Function("return this")();function tL(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function nL(e){return e.split("")}function rL(e){return e.match(kj)||[]}function iL(e){return function(t){return e==null?void 0:e[t]}}var oL=iL(Jj);function lO(e){return Yj.test(e)}function aL(e){return Xj.test(e)}function uL(e){return lO(e)?sL(e):nL(e)}function sL(e){return e.match(Gj)||[]}function lL(e){return e.match(Kj)||[]}var cL=Object.prototype,fL=cL.toString,b6=eL.Symbol,$6=b6?b6.prototype:void 0,w6=$6?$6.toString:void 0;function dL(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function pL(e){if(typeof e=="string")return e;if(yL(e))return w6?w6.call(e):"";var t=e+"";return t=="0"&&1/e==-Fj?"-0":t}function hL(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:dL(e,t,n)}function gL(e){return function(t){t=Jg(t);var n=lO(t)?uL(t):void 0,r=n?n[0]:t.charAt(0),i=n?hL(n,1).join(""):t.slice(1);return r[e]()+i}}function vL(e){return function(t){return tL(CL(wL(t).replace(Wj,"")),e,"")}}function mL(e){return!!e&&typeof e=="object"}function yL(e){return typeof e=="symbol"||mL(e)&&fL.call(e)==Tj}function Jg(e){return e==null?"":pL(e)}var bL=vL(function(e,t,n){return t=t.toLowerCase(),e+(n?$L(t):t)});function $L(e){return EL(Jg(e).toLowerCase())}function wL(e){return e=Jg(e),e&&e.replace(_j,oL).replace(qj,"")}var EL=gL("toUpperCase");function CL(e,t,n){return e=Jg(e),t=n?void 0:t,t===void 0?aL(e)?lL(e):rL(e):e.match(t)||[]}var DL=bL,SL=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Vv={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},cO={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:SL?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},z$={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var Pd=1;Pd<20;Pd++)z$["f"+Pd]=111+Pd;function fO(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(a){return AL(a,t)}),i=function(u){return r.some(function(s){return OL(s,u)})},o=n==null?i:i(n);return o}function xL(e,t){return fO(e,{byKey:!0},t)}function AL(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in Vv)r[Vv[a]]=!1;var u=!0,s=!1,l=void 0;try{for(var c=i[Symbol.iterator](),f;!(u=(f=c.next()).done);u=!0){var d=f.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var g=dO(d),v=Vv[g];if(d.length>1&&!v&&!cO[d]&&!z$[g])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!v)&&(n?r.key=g:r.which=BL(d)),v&&(r[v]=p?null:!0)}}catch(m){s=!0,l=m}finally{try{!u&&c.return&&c.return()}finally{if(s)throw l}}return r}function OL(e,t){for(var n in e){var r=e[n],i=void 0;if(r!=null&&(n==="key"&&t.key!=null?i=t.key.toLowerCase():n==="which"?i=r===91&&t.which===93?91:t.which:i=t[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function BL(e){e=dO(e);var t=z$[e]||e.toUpperCase().charCodeAt(0);return t}function dO(e){return e=e.toLowerCase(),e=cO[e]||e,e}var FL=fO,Wv=xL,TL="Expected a function",E6=0/0,kL="[object Symbol]",_L=/^\s+|\s+$/g,PL=/^[-+]0x[0-9a-f]+$/i,NL=/^0b[01]+$/i,IL=/^0o[0-7]+$/i,RL=parseInt,jL=typeof ot=="object"&&ot&&ot.Object===Object&&ot,LL=typeof self=="object"&&self&&self.Object===Object&&self,ML=jL||LL||Function("return this")(),zL=Object.prototype,HL=zL.toString,UL=Math.max,VL=Math.min,qv=function(){return ML.Date.now()};function WL(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(TL);t=C6(t)||0,N2(n)&&(c=!!n.leading,f="maxWait"in n,o=f?UL(C6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,I=i;return r=i=void 0,l=D,a=e.apply(I,A),a}function g(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var A=D-s,I=D-l,M=t-A;return f?VL(M,o-I):M}function m(D){var A=D-s,I=D-l;return s===void 0||A>=t||A<0||f&&I>=o}function y(){var D=qv();if(m(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(qv())}function C(){var D=qv(),A=m(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return g(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return C.cancel=$,C.flush=w,C}function N2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qL(e){return!!e&&typeof e=="object"}function GL(e){return typeof e=="symbol"||qL(e)&&HL.call(e)==kL}function C6(e){if(typeof e=="number")return e;if(GL(e))return E6;if(N2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=N2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(_L,"");var n=NL.test(e);return n||IL.test(e)?RL(e.slice(2),n?2:8):PL.test(e)?E6:+e}var pO=WL,hO=T$(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",u="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",f="[object GeneratorFunction]",d="[object Map]",p="[object Number]",g="[object Object]",v="[object Promise]",m="[object RegExp]",y="[object Set]",h="[object String]",$="[object Symbol]",w="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",M="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",J="[object Uint8Array]",Z="[object Uint8ClampedArray]",se="[object Uint16Array]",ee="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,fe=/\w*$/,_e=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,ie={};ie[o]=ie[a]=ie[C]=ie[D]=ie[u]=ie[s]=ie[A]=ie[I]=ie[M]=ie[V]=ie[Y]=ie[d]=ie[p]=ie[g]=ie[m]=ie[y]=ie[h]=ie[$]=ie[J]=ie[Z]=ie[se]=ie[ee]=!0,ie[l]=ie[c]=ie[w]=!1;var Ie=typeof ot=="object"&&ot&&ot.Object===Object&&ot,T=typeof self=="object"&&self&&self.Object===Object&&self,F=Ie||T||Function("return this")(),k=t&&!t.nodeType&&t,N=k&&!0&&e&&!e.nodeType&&e,H=N&&N.exports===k;function j(b,S){return b.set(S[0],S[1]),b}function Q(b,S){return b.add(S),b}function ce(b,S){for(var B=-1,L=b?b.length:0;++B<L&&S(b[B],B,b)!==!1;);return b}function we(b,S){for(var B=-1,L=S.length,me=b.length;++B<L;)b[me+B]=S[B];return b}function Re(b,S,B,L){var me=-1,oe=b?b.length:0;for(L&&oe&&(B=b[++me]);++me<oe;)B=S(B,b[me],me,b);return B}function z(b,S){for(var B=-1,L=Array(b);++B<b;)L[B]=S(B);return L}function ze(b,S){return b==null?void 0:b[S]}function ye(b){var S=!1;if(b!=null&&typeof b.toString!="function")try{S=!!(b+"")}catch{}return S}function ue(b){var S=-1,B=Array(b.size);return b.forEach(function(L,me){B[++S]=[me,L]}),B}function be(b,S){return function(B){return b(S(B))}}function vn(b){var S=-1,B=Array(b.size);return b.forEach(function(L){B[++S]=L}),B}var qe=Array.prototype,lt=Function.prototype,ft=Object.prototype,un=F["__core-js_shared__"],dt=function(){var b=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Pn=lt.toString,mn=ft.hasOwnProperty,sn=ft.toString,vr=RegExp("^"+Pn.call(mn).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mr=H?F.Buffer:void 0,yn=F.Symbol,yr=F.Uint8Array,nn=be(Object.getPrototypeOf,Object),Nn=Object.create,Za=ft.propertyIsEnumerable,qs=qe.splice,Kr=Object.getOwnPropertySymbols,mi=mr?mr.isBuffer:void 0,Qa=be(Object.keys,Object),yi=tr(F,"DataView"),Yr=tr(F,"Map"),bn=tr(F,"Promise"),bi=tr(F,"Set"),Gs=tr(F,"WeakMap"),Po=tr(Object,"create"),Ks=rn(yi),No=rn(Yr),Ys=rn(bn),Xs=rn(bi),Js=rn(Gs),$i=yn?yn.prototype:void 0,bd=$i?$i.valueOf:void 0;function Xr(b){var S=-1,B=b?b.length:0;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function J0(){this.__data__=Po?Po(null):{}}function Z0(b){return this.has(b)&&delete this.__data__[b]}function Q0(b){var S=this.__data__;if(Po){var B=S[b];return B===r?void 0:B}return mn.call(S,b)?S[b]:void 0}function $d(b){var S=this.__data__;return Po?S[b]!==void 0:mn.call(S,b)}function Zs(b,S){var B=this.__data__;return B[b]=Po&&S===void 0?r:S,this}Xr.prototype.clear=J0,Xr.prototype.delete=Z0,Xr.prototype.get=Q0,Xr.prototype.has=$d,Xr.prototype.set=Zs;function Lt(b){var S=-1,B=b?b.length:0;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function ev(){this.__data__=[]}function tv(b){var S=this.__data__,B=tu(S,b);if(B<0)return!1;var L=S.length-1;return B==L?S.pop():qs.call(S,B,1),!0}function nv(b){var S=this.__data__,B=tu(S,b);return B<0?void 0:S[B][1]}function rv(b){return tu(this.__data__,b)>-1}function iv(b,S){var B=this.__data__,L=tu(B,b);return L<0?B.push([b,S]):B[L][1]=S,this}Lt.prototype.clear=ev,Lt.prototype.delete=tv,Lt.prototype.get=nv,Lt.prototype.has=rv,Lt.prototype.set=iv;function Kt(b){var S=-1,B=b?b.length:0;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function ov(){this.__data__={hash:new Xr,map:new(Yr||Lt),string:new Xr}}function av(b){return Ro(this,b).delete(b)}function uv(b){return Ro(this,b).get(b)}function sv(b){return Ro(this,b).has(b)}function lv(b,S){return Ro(this,b).set(b,S),this}Kt.prototype.clear=ov,Kt.prototype.delete=av,Kt.prototype.get=uv,Kt.prototype.has=sv,Kt.prototype.set=lv;function ln(b){this.__data__=new Lt(b)}function cv(){this.__data__=new Lt}function fv(b){return this.__data__.delete(b)}function dv(b){return this.__data__.get(b)}function pv(b){return this.__data__.has(b)}function hv(b,S){var B=this.__data__;if(B instanceof Lt){var L=B.__data__;if(!Yr||L.length<n-1)return L.push([b,S]),this;B=this.__data__=new Kt(L)}return B.set(b,S),this}ln.prototype.clear=cv,ln.prototype.delete=fv,ln.prototype.get=dv,ln.prototype.has=pv,ln.prototype.set=hv;function eu(b,S){var B=nl(b)||ru(b)?z(b.length,String):[],L=B.length,me=!!L;for(var oe in b)(S||mn.call(b,oe))&&!(me&&(oe=="length"||Ov(oe,L)))&&B.push(oe);return B}function wd(b,S,B){var L=b[S];(!(mn.call(b,S)&&xd(L,B))||B===void 0&&!(S in b))&&(b[S]=B)}function tu(b,S){for(var B=b.length;B--;)if(xd(b[B][0],S))return B;return-1}function br(b,S){return b&&tl(S,il(S),b)}function Qs(b,S,B,L,me,oe,Fe){var Pe;if(L&&(Pe=oe?L(b,me,oe,Fe):L(b)),Pe!==void 0)return Pe;if(!wr(b))return b;var $t=nl(b);if($t){if(Pe=xv(b),!S)return Cv(b,Pe)}else{var He=Zr(b),Yt=He==c||He==f;if(Ad(b))return nu(b,S);if(He==g||He==o||Yt&&!oe){if(ye(b))return oe?b:{};if(Pe=$r(Yt?{}:b),!S)return Dv(b,br(Pe,b))}else{if(!ie[He])return oe?b:{};Pe=Av(b,He,Qs,S)}}Fe||(Fe=new ln);var cn=Fe.get(b);if(cn)return cn;if(Fe.set(b,Pe),!$t)var Ft=B?Sv(b):il(b);return ce(Ft||b,function(Xt,Mt){Ft&&(Mt=Xt,Xt=b[Mt]),wd(Pe,Mt,Qs(Xt,S,B,L,Mt,b,Fe))}),Pe}function gv(b){return wr(b)?Nn(b):{}}function vv(b,S,B){var L=S(b);return nl(b)?L:we(L,B(b))}function mv(b){return sn.call(b)}function yv(b){if(!wr(b)||Fv(b))return!1;var S=rl(b)||ye(b)?vr:_e;return S.test(rn(b))}function bv(b){if(!Dd(b))return Qa(b);var S=[];for(var B in Object(b))mn.call(b,B)&&B!="constructor"&&S.push(B);return S}function nu(b,S){if(S)return b.slice();var B=new b.constructor(b.length);return b.copy(B),B}function el(b){var S=new b.constructor(b.byteLength);return new yr(S).set(new yr(b)),S}function Io(b,S){var B=S?el(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.byteLength)}function Ed(b,S,B){var L=S?B(ue(b),!0):ue(b);return Re(L,j,new b.constructor)}function Cd(b){var S=new b.constructor(b.source,fe.exec(b));return S.lastIndex=b.lastIndex,S}function $v(b,S,B){var L=S?B(vn(b),!0):vn(b);return Re(L,Q,new b.constructor)}function wv(b){return bd?Object(bd.call(b)):{}}function Ev(b,S){var B=S?el(b.buffer):b.buffer;return new b.constructor(B,b.byteOffset,b.length)}function Cv(b,S){var B=-1,L=b.length;for(S||(S=Array(L));++B<L;)S[B]=b[B];return S}function tl(b,S,B,L){B||(B={});for(var me=-1,oe=S.length;++me<oe;){var Fe=S[me],Pe=L?L(B[Fe],b[Fe],Fe,B,b):void 0;wd(B,Fe,Pe===void 0?b[Fe]:Pe)}return B}function Dv(b,S){return tl(b,Jr(b),S)}function Sv(b){return vv(b,il,Jr)}function Ro(b,S){var B=b.__data__;return Bv(S)?B[typeof S=="string"?"string":"hash"]:B.map}function tr(b,S){var B=ze(b,S);return yv(B)?B:void 0}var Jr=Kr?be(Kr,Object):kv,Zr=mv;(yi&&Zr(new yi(new ArrayBuffer(1)))!=D||Yr&&Zr(new Yr)!=d||bn&&Zr(bn.resolve())!=v||bi&&Zr(new bi)!=y||Gs&&Zr(new Gs)!=w)&&(Zr=function(b){var S=sn.call(b),B=S==g?b.constructor:void 0,L=B?rn(B):void 0;if(L)switch(L){case Ks:return D;case No:return d;case Ys:return v;case Xs:return y;case Js:return w}return S});function xv(b){var S=b.length,B=b.constructor(S);return S&&typeof b[0]=="string"&&mn.call(b,"index")&&(B.index=b.index,B.input=b.input),B}function $r(b){return typeof b.constructor=="function"&&!Dd(b)?gv(nn(b)):{}}function Av(b,S,B,L){var me=b.constructor;switch(S){case C:return el(b);case u:case s:return new me(+b);case D:return Io(b,L);case A:case I:case M:case V:case Y:case J:case Z:case se:case ee:return Ev(b,L);case d:return Ed(b,L,B);case p:case h:return new me(b);case m:return Cd(b);case y:return $v(b,L,B);case $:return wv(b)}}function Ov(b,S){return S=S==null?i:S,!!S&&(typeof b=="number"||ve.test(b))&&b>-1&&b%1==0&&b<S}function Bv(b){var S=typeof b;return S=="string"||S=="number"||S=="symbol"||S=="boolean"?b!=="__proto__":b===null}function Fv(b){return!!dt&&dt in b}function Dd(b){var S=b&&b.constructor,B=typeof S=="function"&&S.prototype||ft;return b===B}function rn(b){if(b!=null){try{return Pn.call(b)}catch{}try{return b+""}catch{}}return""}function Sd(b){return Qs(b,!0,!0)}function xd(b,S){return b===S||b!==b&&S!==S}function ru(b){return Tv(b)&&mn.call(b,"callee")&&(!Za.call(b,"callee")||sn.call(b)==o)}var nl=Array.isArray;function iu(b){return b!=null&&Od(b.length)&&!rl(b)}function Tv(b){return Bd(b)&&iu(b)}var Ad=mi||_v;function rl(b){var S=wr(b)?sn.call(b):"";return S==c||S==f}function Od(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=i}function wr(b){var S=typeof b;return!!b&&(S=="object"||S=="function")}function Bd(b){return!!b&&typeof b=="object"}function il(b){return iu(b)?eu(b):bv(b)}function kv(){return[]}function _v(){return!1}e.exports=Sd}),KL=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},uu;function D6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var YL=0;function XL(e){return"__private_"+YL+++"_"+e}function JL(e,t,n){const r=[];return e.forEach(i=>typeof i!="string"?r.push(i):t[Symbol.split](i).forEach((o,a,u)=>{o!==""&&r.push(o),a<u.length-1&&r.push(n)})),r}/**
|
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
* and replaces it with values from options `{smart_count: 5}`
|
|
*
|
|
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
|
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
|
*
|
|
* @param {string} phrase that needs interpolation, with placeholders
|
|
* @param {object} options with values that will be used to replace placeholders
|
|
* @returns {any[]} interpolated
|
|
*/function S6(e,t){const n=/\$/g,r="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=n[Symbol.replace](a,r)),i=JL(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var gO=(uu=XL("apply"),class{constructor(t){Object.defineProperty(this,uu,{value:ZL}),this.locale={strings:{},pluralize(n){return n===1?0:1}},Array.isArray(t)?t.forEach(D6(this,uu)[uu],this):D6(this,uu)[uu](t)}translate(t,n){return this.translateArray(t,n).join("")}translateArray(t,n){if(!KL(this.locale.strings,t))throw new Error(`missing string: ${t}`);const r=this.locale.strings[t];if(typeof r=="object"){if(n&&typeof n.smart_count<"u"){const o=this.locale.pluralize(n.smart_count);return S6(r[o],n)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return S6(r,n)}});function ZL(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var vO=function(){var t={},n=t._fns={};t.emit=function(a,u,s,l,c,f,d){var p=r(a);p.length&&i(a,p,[u,s,l,c,f,d])},t.on=function(a,u){n[a]||(n[a]=[]),n[a].push(u)},t.once=function(a,u){function s(){u.apply(this,arguments),t.off(a,s)}this.on(a,s)},t.off=function(a,u){var s=[];if(a&&u){var l=this._fns[a],c=0,f=l?l.length:0;for(c;c<f;c++)l[c]!==u&&s.push(l[c])}s.length?this._fns[a]=s:delete this._fns[a]};function r(o){var a=n[o]?n[o]:[],u=o.indexOf(":"),s=u===-1?[o]:[o.substring(0,u),o.substring(u+1)],l=Object.keys(n),c=0,f=l.length;for(c;c<f;c++){var d=l[c];if(d==="*"&&(a=a.concat(n[d])),s.length===2&&s[0]===d){a=a.concat(n[d]);break}}return a}function i(o,a,u){var s=0,l=a.length;for(s;s<l&&a[s];s++)a[s].event=o,a[s].apply(a[s],u)}return t};let QL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var eM={urlAlphabet:QL};let{urlAlphabet:tM}=eM;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let mO=e=>crypto.getRandomValues(new Uint8Array(e)),yO=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return()=>{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},nM=(e,t)=>yO(e,t,mO),rM=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var iM={nanoid:rM,customAlphabet:nM,customRandom:yO,urlAlphabet:tM,random:mO},Gv=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var n=t<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(t=-t),t<1)return(n?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),r.length-1);t=Number(t/Math.pow(1024,i));var o=r[i];return t>=10||t%1===0?(n?"-":"")+t.toFixed(0)+" "+o:(n?"-":"")+t.toFixed(1)+" "+o};function bO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}bO.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),r=0;t&&r<i;r++)n[r]!=="*"&&(r<o.length?t=n[r]===o[r]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],r=e.length;r--;)this.match(e[r])&&(t[t.length]=e[r]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var oM=function(e,t,n){var r=new bO(e,n||/[\/\.]/);return typeof t<"u"?r.match(t):r},aM=/[\/\+\.]/,uM=function(e,t){function n(r){var i=oM(r,e,aM);return i&&i.length>=2}return t?n(t.split(";")[0]):n};function sM(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var lM=0;function cM(e){return"__private_"+lM+++"_"+e}var Kv=cM("publish");class $O{constructor(){Object.defineProperty(this,Kv,{value:fM}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,sM(this,Kv)[Kv](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function fM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(r=>{r(...t)})}$O.VERSION="2.0.3";var dM=function(){return new $O},wO=function(t){const n=t.lastIndexOf(".");return n===-1||n===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,n),extension:t.slice(n+1)}},x6={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"},pM=function(t){var n;if(t.type)return t.type;const r=t.name?(n=wO(t.name).extension)==null?void 0:n.toLowerCase():null;return r&&r in x6?x6[r]:"application/octet-stream"};function hM(e){return e.charCodeAt(0).toString(32)}function A6(e){let t="";return e.replace(/[^A-Z0-9]/ig,n=>(t+=`-${hM(n)}`,"/"))+t}var gM=function(t){let n="uppy";return typeof t.name=="string"&&(n+=`-${A6(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${A6(t.meta.relativePath.toLowerCase())}`),t.data.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n},vM=function(t){if(t==null&&(t=typeof navigator<"u"?navigator.userAgent:null),!t)return!0;const n=/Edge\/(\d+\.\d+)/.exec(t);if(!n)return!0;const r=n[1];let[i,o]=r.split(".");return i=parseInt(i,10),o=parseInt(o,10),i<15||i===15&&o<15063||i>18||i===18&&o>=18218},mM=function(t,n){return n.name?n.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function Yv(e){return e<10?`0${e}`:e.toString()}var _p=function(){const t=new Date,n=Yv(t.getHours()),r=Yv(t.getMinutes()),i=Yv(t.getSeconds());return`${n}:${r}:${i}`};const yM={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${_p()}]`,...t)}},bM={debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${_p()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${_p()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${_p()}]`,...t)}};var EO={justErrorsLogger:yM,debugLogger:bM},$M={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",backToSearch:"Back to Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},CO=iM;let DO,SO;function ne(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var wM=0;function Bt(e){return"__private_"+wM+++"_"+e}const{nanoid:EM}=CO,{justErrorsLogger:CM,debugLogger:DM}=EO;class Tr extends Error{constructor(){super(...arguments),this.isRestriction=!0}}typeof AggregateError>"u"&&(globalThis.AggregateError=class extends Error{constructor(t,n){super(n),this.errors=t}});class SM extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var zt=Bt("plugins"),sl=Bt("storeUnsubscribe"),ti=Bt("emitter"),ta=Bt("preProcessors"),na=Bt("uploaders"),oi=Bt("postProcessors"),Cc=Bt("checkRestrictions"),Xv=Bt("checkMinNumberOfFiles"),Kc=Bt("checkRequiredMetaFieldsOnFile"),Jv=Bt("checkRequiredMetaFields"),Tt=Bt("showOrLogErrorAndThrow"),ll=Bt("assertNewUploadAllowed"),cl=Bt("checkAndCreateFileStateObject"),fl=Bt("startIfAutoProceed"),Zv=Bt("addListeners"),rr=Bt("updateOnlineStatus"),ni=Bt("createUpload"),Qv=Bt("getUpload"),aa=Bt("removeUpload"),ri=Bt("runUpload");DO=Symbol.for("uppy test: getPlugins");SO=Symbol.for("uppy test: createUpload");class xO{constructor(t){Object.defineProperty(this,ri,{value:jM}),Object.defineProperty(this,aa,{value:RM}),Object.defineProperty(this,Qv,{value:IM}),Object.defineProperty(this,ni,{value:NM}),Object.defineProperty(this,Zv,{value:PM}),Object.defineProperty(this,fl,{value:_M}),Object.defineProperty(this,cl,{value:kM}),Object.defineProperty(this,ll,{value:TM}),Object.defineProperty(this,Tt,{value:FM}),Object.defineProperty(this,Jv,{value:BM}),Object.defineProperty(this,Kc,{value:OM}),Object.defineProperty(this,Xv,{value:AM}),Object.defineProperty(this,Cc,{value:xM}),Object.defineProperty(this,zt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,sl,{writable:!0,value:void 0}),Object.defineProperty(this,ti,{writable:!0,value:vO()}),Object.defineProperty(this,ta,{writable:!0,value:new Set}),Object.defineProperty(this,na,{writable:!0,value:new Set}),Object.defineProperty(this,oi,{writable:!0,value:new Set}),Object.defineProperty(this,rr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=$M;const n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:r=>r,onBeforeUpload:r=>r,store:dM(),logger:CM,infoTimeout:5e3};if(this.opts={...n,...t,restrictions:{...n.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=DM),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=Fa(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:vM(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ne(this,sl)[sl]=this.store.subscribe((r,i,o)=>{this.emit("state-update",r,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),ne(this,Zv)[Zv]()}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];ne(this,ti)[ti].emit(t,...r)}on(t,n){return ne(this,ti)[ti].on(t,n),this}once(t,n){return ne(this,ti)[ti].once(t,n),this}off(t,n){return ne(this,ti)[ti].off(t,n),this}updateAll(t){this.iteratePlugins(n=>{n.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,n){if(!this.getState().files[t])throw new Error(`Can\u2019t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...n}}})}i18nInit(){const t=new gO([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(n=>{n.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r={};Object.keys(n).forEach(i=>{const o={...n[i]};o.progress={...o.progress,...t},r[i]=o}),this.setState({files:r,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){ne(this,ta)[ta].add(t)}removePreProcessor(t){return ne(this,ta)[ta].delete(t)}addPostProcessor(t){ne(this,oi)[oi].add(t)}removePostProcessor(t){return ne(this,oi)[oi].delete(t)}addUploader(t){ne(this,na)[na].add(t)}removeUploader(t){return ne(this,na)[na].delete(t)}setMeta(t){const n={...this.getState().meta,...t},r={...this.getState().files};Object.keys(r).forEach(i=>{r[i]={...r[i],meta:{...r[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:n,files:r})}setFileMeta(t,n){const r={...this.getState().files};if(!r[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...r[t].meta,...n};r[t]={...r[t],meta:i},this.setState({files:r})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:n,error:r}=this.getState(),i=Object.values(t),o=i.filter(g=>{let{progress:v}=g;return!v.uploadComplete&&v.uploadStarted}),a=i.filter(g=>!g.progress.uploadStarted),u=i.filter(g=>g.progress.uploadStarted||g.progress.preprocess||g.progress.postprocess),s=i.filter(g=>g.progress.uploadStarted),l=i.filter(g=>g.isPaused),c=i.filter(g=>g.progress.uploadComplete),f=i.filter(g=>g.error),d=o.filter(g=>!g.isPaused),p=i.filter(g=>g.progress.preprocess||g.progress.postprocess);return{newFiles:a,startedFiles:u,uploadStartedFiles:s,pausedFiles:l,completeFiles:c,erroredFiles:f,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===i.length&&p.length===0,isAllErrored:!!r&&f.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(g=>g.isGhost)}}validateRestrictions(t,n){try{return ne(this,Cc)[Cc](t,n),{result:!0}}catch(r){return{result:!1,reason:r.message}}}checkIfFileAlreadyExists(t){const{files:n}=this.getState();return!!(n[t]&&!n[t].isGhost)}addFile(t){ne(this,ll)[ll](t);const{files:n}=this.getState();let r=ne(this,cl)[cl](n,t);return n[r.id]&&n[r.id].isGhost&&(r={...n[r.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${r.name}, ${r.id}`)),this.setState({files:{...n,[r.id]:r}}),this.emit("file-added",r),this.emit("files-added",[r]),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),ne(this,fl)[fl](),r.id}addFiles(t){ne(this,ll)[ll]();const n={...this.getState().files},r=[],i=[];for(let o=0;o<t.length;o++)try{let a=ne(this,cl)[cl](n,t[o]);n[a.id]&&n[a.id].isGhost&&(a={...n[a.id],data:t[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${a.name}, ${a.id}`)),n[a.id]=a,r.push(a)}catch(a){a.isRestriction||i.push(a)}if(this.setState({files:n}),r.forEach(o=>{this.emit("file-added",o)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.keys(r).forEach(o=>{this.log(`Added file: ${r[o].name}
|
|
id: ${r[o].id}
|
|
type: ${r[o].type}`)}),r.length>0&&ne(this,fl)[fl](),i.length>0){let o=`Multiple errors occurred while adding files:
|
|
`;if(i.forEach(a=>{o+=`
|
|
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,n){const{files:r,currentUploads:i}=this.getState(),o={...r},a={...i},u=Object.create(null);t.forEach(f=>{r[f]&&(u[f]=r[f],delete o[f])});function s(f){return u[f]===void 0}Object.keys(a).forEach(f=>{const d=i[f].fileIDs.filter(s);if(d.length===0){delete a[f];return}a[f]={...i[f],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const r=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",t,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(i=>t[i].error);if(n.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ne(this,ni)[ni](n,{forceAllowNewUpload:!0});return ne(this,ri)[ri](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=ne(this,ni)[ni]([t],{forceAllowNewUpload:!0});return ne(this,ri)[ri](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const r=n.filter(l=>l.progress.bytesTotal!=null),i=n.filter(l=>l.progress.bytesTotal==null);if(r.length===0){const l=n.length*100,c=i.reduce((d,p)=>d+p.progress.percentage,0),f=Math.round(c/l*100);this.setState({totalProgress:f});return}let o=r.reduce((l,c)=>l+c.progress.bytesTotal,0);const a=o/r.length;o+=a*i.length;let u=0;r.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,n){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}const r=new t(this,n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const a=`Already found a plugin named '${o.id}'. Tried to use: '${i}'.
|
|
Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in ne(this,zt)[zt]?ne(this,zt)[zt][r.type].push(r):ne(this,zt)[zt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(ne(this,zt)[zt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[DO](t){return ne(this,zt)[zt][t]}iteratePlugins(t){Object.values(ne(this,zt)[zt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=ne(this,zt)[zt][t.type],r=n.findIndex(a=>a.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ne(this,sl)[sl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ne(this,rr)[rr]),window.removeEventListener("offline",ne(this,rr)[rr]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?ne(this,ri)[ri](t):(ne(this,aa)[aa](t),Promise.reject(new Error("Nonexistent upload")))}[SO](){return ne(this,ni)[ni](...arguments)}addResultData(t,n){if(!ne(this,Qv)[Qv](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}upload(){var t;(t=ne(this,zt)[zt].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{ne(this,Xv)[Xv](n),ne(this,Jv)[Jv](n)}).catch(i=>{ne(this,Tt)[Tt](i)}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=ne(this,ni)[ni](a);return ne(this,ri)[ri](u)}).catch(i=>{ne(this,Tt)[Tt](i,{showInformer:!1})}))}}function xM(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new Tr(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?uM(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new Tr(this.i18n("youCanOnlyUploadFileTypes",{types:s}))}if(i&&e.size!=null){let u=0;if(u+=e.size,t.forEach(s=>{u+=s.size}),u>i)throw new Tr(this.i18n("exceedsSize",{size:Gv(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Tr(this.i18n("exceedsSize",{size:Gv(n),file:e.name}));if(r&&e.size!=null&&e.size<r)throw new Tr(this.i18n("inferiorSize",{size:Gv(r)}))}function AM(e){const{minNumberOfFiles:t}=this.opts.restrictions;if(Object.keys(e).length<t)throw new Tr(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:t})}`)}function OM(e){const{requiredMetaFields:t}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],i=[];for(let o=0;o<t.length;o++)if(!n.call(e.meta,t[o])||e.meta[t[o]]===""){const a=new Tr(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})}`);r.push(a),i.push(t[o]),ne(this,Tt)[Tt](a,{file:e,showInformer:!1,throwErr:!1})}return this.setFileState(e.id,{missingRequiredMetaFields:i}),r}function BM(e){const t=Object.keys(e).flatMap(n=>{const r=this.getFile(n);return ne(this,Kc)[Kc](r)});if(t.length)throw new SM(t,`${this.i18n("missingRequiredMetaField")}`)}function FM(e,t){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=t===void 0?{}:t;const o=typeof e=="object"?e.message:e,a=typeof e=="object"&&e.details?e.details:"";let u=o;if(a&&(u+=` ${a}`),e.isRestriction?(this.log(u),this.emit("restriction-failed",r,e)):this.log(u,"error"),n&&this.info({message:o,details:a},"error",this.opts.infoTimeout),i)throw typeof e=="object"?e:new Error(e)}function TM(e){const{allowNewUpload:t}=this.getState();t===!1&&ne(this,Tt)[Tt](new Tr(this.i18n("noMoreFilesAllowed")),{file:e})}function kM(e,t){const n=pM(t),r=mM(n,t),i=wO(r).extension,o=Boolean(t.isRemote),a=gM({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const f=new Tr(this.i18n("noDuplicates",{fileName:r}));ne(this,Tt)[Tt](f,{file:t})}const u=t.meta||{};u.name=r,u.type=n;const s=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:r,extension:i||"",meta:{...this.getState().meta,...u},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:o,remote:t.remote||"",preview:t.preview};const c=this.opts.onBeforeFileAdded(l,e);c===!1?ne(this,Tt)[Tt](new Tr("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):typeof c=="object"&&c!==null&&(l=c);try{const f=Object.keys(e).map(d=>e[d]);ne(this,Cc)[Cc](l,f)}catch(f){ne(this,Tt)[Tt](f,{file:l})}return l}function _M(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function PM(){const e=(t,n,r)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),n!=null&&n.id in this.getState().files&&this.setFileState(n.id,{error:i,response:r})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),typeof n=="object"&&n.message){const i=new Error(n.message);i.details=n.message,n.details&&(i.details+=` ${n.details}`),i.message=this.i18n("failedToUpload",{file:t.name}),ne(this,Tt)[Tt](i,{throwErr:!1})}else ne(this,Tt)[Tt](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}})}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...r,postprocess:ne(this,oi)[oi].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:r.bytesTotal},response:n,uploadURL:n.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:n.bytesUploaded||r.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:n}})}),this.on("preprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.preprocess,this.setState({files:n})}),this.on("postprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:n}})}),this.on("postprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.postprocess,this.setState({files:n})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&ne(this,Kc)[Kc](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",ne(this,rr)[rr]),window.addEventListener("offline",ne(this,rr)[rr]),setTimeout(ne(this,rr)[rr],3e3))}function NM(e,t){t===void 0&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=EM();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function IM(e){const{currentUploads:t}=this.getState();return t[e]}function RM(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function jM(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...ne(this,ta)[ta],...ne(this,na)[na],...ne(this,oi)[oi]];try{for(let a=r;a<i.length&&n;a++){const u=i[a],s={...n,step:a};this.setState({currentUploads:{...t,[e]:s}}),await u(s.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(a){throw this.emit("error",a),ne(this,aa)[aa](e),a}if(n){n.fileIDs.forEach(l=>{const c=this.getFile(l);c&&c.progress.postprocess&&this.emit("postprocess-complete",c)});const a=n.fileIDs.map(l=>this.getFile(l)),u=a.filter(l=>!l.error),s=a.filter(l=>l.error);await this.addResultData(e,{successful:u,failed:s,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),ne(this,aa)[aa](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}xO.VERSION="2.1.3";var AO=xO,LM=T$(function(e,t){var n,r,i,o,a,u,s,l,c={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(T,F){for(var k in F)T[k]=F[k];return T}function g(T){var F=T.parentNode;F&&F.removeChild(T)}function v(T,F,k){var N,H,j,Q={};for(j in F)j=="key"?N=F[j]:j=="ref"?H=F[j]:Q[j]=F[j];if(arguments.length>2&&(Q.children=arguments.length>3?n.call(arguments,2):k),typeof T=="function"&&T.defaultProps!=null)for(j in T.defaultProps)Q[j]===void 0&&(Q[j]=T.defaultProps[j]);return m(T,Q,N,H,null)}function m(T,F,k,N,H){var j={type:T,props:F,key:k,ref:N,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:H==null?++i:H};return H==null&&r.vnode!=null&&r.vnode(j),j}function y(T){return T.children}function h(T,F){this.props=T,this.context=F}function $(T,F){if(F==null)return T.__?$(T.__,T.__.__k.indexOf(T)+1):null;for(var k;F<T.__k.length;F++)if((k=T.__k[F])!=null&&k.__e!=null)return k.__e;return typeof T.type=="function"?$(T):null}function w(T){var F,k;if((T=T.__)!=null&&T.__c!=null){for(T.__e=T.__c.base=null,F=0;F<T.__k.length;F++)if((k=T.__k[F])!=null&&k.__e!=null){T.__e=T.__c.base=k.__e;break}return w(T)}}function C(T){(!T.__d&&(T.__d=!0)&&a.push(T)&&!D.__r++||s!==r.debounceRendering)&&((s=r.debounceRendering)||u)(D)}function D(){for(var T;D.__r=a.length;)T=a.sort(function(F,k){return F.__v.__b-k.__v.__b}),a=[],T.some(function(F){var k,N,H,j,Q,ce;F.__d&&(Q=(j=(k=F).__v).__e,(ce=k.__P)&&(N=[],(H=p({},j)).__v=j.__v+1,ee(ce,j,H,k.__n,ce.ownerSVGElement!==void 0,j.__h!=null?[Q]:null,N,Q==null?$(j):Q,j.__h),ae(N,j),j.__e!=Q&&w(j)))})}function A(T,F,k,N,H,j,Q,ce,we,Re){var z,ze,ye,ue,be,vn,qe,lt=N&&N.__k||f,ft=lt.length;for(k.__k=[],z=0;z<F.length;z++)if((ue=k.__k[z]=(ue=F[z])==null||typeof ue=="boolean"?null:typeof ue=="string"||typeof ue=="number"||typeof ue=="bigint"?m(null,ue,null,null,ue):Array.isArray(ue)?m(y,{children:ue},null,null,null):ue.__b>0?m(ue.type,ue.props,ue.key,null,ue.__v):ue)!=null){if(ue.__=k,ue.__b=k.__b+1,(ye=lt[z])===null||ye&&ue.key==ye.key&&ue.type===ye.type)lt[z]=void 0;else for(ze=0;ze<ft;ze++){if((ye=lt[ze])&&ue.key==ye.key&&ue.type===ye.type){lt[ze]=void 0;break}ye=null}ee(T,ue,ye=ye||c,H,j,Q,ce,we,Re),be=ue.__e,(ze=ue.ref)&&ye.ref!=ze&&(qe||(qe=[]),ye.ref&&qe.push(ye.ref,null,ue),qe.push(ze,ue.__c||be,ue)),be!=null?(vn==null&&(vn=be),typeof ue.type=="function"&&ue.__k===ye.__k?ue.__d=we=I(ue,we,T):we=M(T,ue,ye,lt,be,we),typeof k.type=="function"&&(k.__d=we)):we&&ye.__e==we&&we.parentNode!=T&&(we=$(ye))}for(k.__e=vn,z=ft;z--;)lt[z]!=null&&(typeof k.type=="function"&<[z].__e!=null&<[z].__e==k.__d&&(k.__d=$(N,z+1)),ve(lt[z],lt[z]));if(qe)for(z=0;z<qe.length;z++)_e(qe[z],qe[++z],qe[++z])}function I(T,F,k){for(var N,H=T.__k,j=0;H&&j<H.length;j++)(N=H[j])&&(N.__=T,F=typeof N.type=="function"?I(N,F,k):M(k,N,N,H,N.__e,F));return F}function M(T,F,k,N,H,j){var Q,ce,we;if(F.__d!==void 0)Q=F.__d,F.__d=void 0;else if(k==null||H!=j||H.parentNode==null)e:if(j==null||j.parentNode!==T)T.appendChild(H),Q=null;else{for(ce=j,we=0;(ce=ce.nextSibling)&&we<N.length;we+=2)if(ce==H)break e;T.insertBefore(H,j),Q=j}return Q!==void 0?Q:H.nextSibling}function V(T,F,k,N,H){var j;for(j in k)j==="children"||j==="key"||j in F||J(T,j,null,k[j],N);for(j in F)H&&typeof F[j]!="function"||j==="children"||j==="key"||j==="value"||j==="checked"||k[j]===F[j]||J(T,j,F[j],k[j],N)}function Y(T,F,k){F[0]==="-"?T.setProperty(F,k):T[F]=k==null?"":typeof k!="number"||d.test(F)?k:k+"px"}function J(T,F,k,N,H){var j;e:if(F==="style")if(typeof k=="string")T.style.cssText=k;else{if(typeof N=="string"&&(T.style.cssText=N=""),N)for(F in N)k&&F in k||Y(T.style,F,"");if(k)for(F in k)N&&k[F]===N[F]||Y(T.style,F,k[F])}else if(F[0]==="o"&&F[1]==="n")j=F!==(F=F.replace(/Capture$/,"")),F=F.toLowerCase()in T?F.toLowerCase().slice(2):F.slice(2),T.l||(T.l={}),T.l[F+j]=k,k?N||T.addEventListener(F,j?se:Z,j):T.removeEventListener(F,j?se:Z,j);else if(F!=="dangerouslySetInnerHTML"){if(H)F=F.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(F!=="href"&&F!=="list"&&F!=="form"&&F!=="tabIndex"&&F!=="download"&&F in T)try{T[F]=k==null?"":k;break e}catch{}typeof k=="function"||(k!=null&&(k!==!1||F[0]==="a"&&F[1]==="r")?T.setAttribute(F,k):T.removeAttribute(F))}}function Z(T){this.l[T.type+!1](r.event?r.event(T):T)}function se(T){this.l[T.type+!0](r.event?r.event(T):T)}function ee(T,F,k,N,H,j,Q,ce,we){var Re,z,ze,ye,ue,be,vn,qe,lt,ft,un,dt=F.type;if(F.constructor!==void 0)return null;k.__h!=null&&(we=k.__h,ce=F.__e=k.__e,F.__h=null,j=[ce]),(Re=r.__b)&&Re(F);try{e:if(typeof dt=="function"){if(qe=F.props,lt=(Re=dt.contextType)&&N[Re.__c],ft=Re?lt?lt.props.value:Re.__:N,k.__c?vn=(z=F.__c=k.__c).__=z.__E:("prototype"in dt&&dt.prototype.render?F.__c=z=new dt(qe,ft):(F.__c=z=new h(qe,ft),z.constructor=dt,z.render=ie),lt&<.sub(z),z.props=qe,z.state||(z.state={}),z.context=ft,z.__n=N,ze=z.__d=!0,z.__h=[]),z.__s==null&&(z.__s=z.state),dt.getDerivedStateFromProps!=null&&(z.__s==z.state&&(z.__s=p({},z.__s)),p(z.__s,dt.getDerivedStateFromProps(qe,z.__s))),ye=z.props,ue=z.state,ze)dt.getDerivedStateFromProps==null&&z.componentWillMount!=null&&z.componentWillMount(),z.componentDidMount!=null&&z.__h.push(z.componentDidMount);else{if(dt.getDerivedStateFromProps==null&&qe!==ye&&z.componentWillReceiveProps!=null&&z.componentWillReceiveProps(qe,ft),!z.__e&&z.shouldComponentUpdate!=null&&z.shouldComponentUpdate(qe,z.__s,ft)===!1||F.__v===k.__v){z.props=qe,z.state=z.__s,F.__v!==k.__v&&(z.__d=!1),z.__v=F,F.__e=k.__e,F.__k=k.__k,F.__k.forEach(function(Pn){Pn&&(Pn.__=F)}),z.__h.length&&Q.push(z);break e}z.componentWillUpdate!=null&&z.componentWillUpdate(qe,z.__s,ft),z.componentDidUpdate!=null&&z.__h.push(function(){z.componentDidUpdate(ye,ue,be)})}z.context=ft,z.props=qe,z.state=z.__s,(Re=r.__r)&&Re(F),z.__d=!1,z.__v=F,z.__P=T,Re=z.render(z.props,z.state,z.context),z.state=z.__s,z.getChildContext!=null&&(N=p(p({},N),z.getChildContext())),ze||z.getSnapshotBeforeUpdate==null||(be=z.getSnapshotBeforeUpdate(ye,ue)),un=Re!=null&&Re.type===y&&Re.key==null?Re.props.children:Re,A(T,Array.isArray(un)?un:[un],F,k,N,H,j,Q,ce,we),z.base=F.__e,F.__h=null,z.__h.length&&Q.push(z),vn&&(z.__E=z.__=null),z.__e=!1}else j==null&&F.__v===k.__v?(F.__k=k.__k,F.__e=k.__e):F.__e=fe(k.__e,F,k,N,H,j,Q,we);(Re=r.diffed)&&Re(F)}catch(Pn){F.__v=null,(we||j!=null)&&(F.__e=ce,F.__h=!!we,j[j.indexOf(ce)]=null),r.__e(Pn,F,k)}}function ae(T,F){r.__c&&r.__c(F,T),T.some(function(k){try{T=k.__h,k.__h=[],T.some(function(N){N.call(k)})}catch(N){r.__e(N,k.__v)}})}function fe(T,F,k,N,H,j,Q,ce){var we,Re,z,ze=k.props,ye=F.props,ue=F.type,be=0;if(ue==="svg"&&(H=!0),j!=null){for(;be<j.length;be++)if((we=j[be])&&"setAttribute"in we==!!ue&&(ue?we.localName===ue:we.nodeType===3)){T=we,j[be]=null;break}}if(T==null){if(ue===null)return document.createTextNode(ye);T=H?document.createElementNS("http://www.w3.org/2000/svg",ue):document.createElement(ue,ye.is&&ye),j=null,ce=!1}if(ue===null)ze===ye||ce&&T.data===ye||(T.data=ye);else{if(j=j&&n.call(T.childNodes),Re=(ze=k.props||c).dangerouslySetInnerHTML,z=ye.dangerouslySetInnerHTML,!ce){if(j!=null)for(ze={},be=0;be<T.attributes.length;be++)ze[T.attributes[be].name]=T.attributes[be].value;(z||Re)&&(z&&(Re&&z.__html==Re.__html||z.__html===T.innerHTML)||(T.innerHTML=z&&z.__html||""))}if(V(T,ye,ze,H,ce),z)F.__k=[];else if(be=F.props.children,A(T,Array.isArray(be)?be:[be],F,k,N,H&&ue!=="foreignObject",j,Q,j?j[0]:k.__k&&$(k,0),ce),j!=null)for(be=j.length;be--;)j[be]!=null&&g(j[be]);ce||("value"in ye&&(be=ye.value)!==void 0&&(be!==ze.value||be!==T.value||ue==="progress"&&!be)&&J(T,"value",be,ze.value,!1),"checked"in ye&&(be=ye.checked)!==void 0&&be!==T.checked&&J(T,"checked",be,ze.checked,!1))}return T}function _e(T,F,k){try{typeof T=="function"?T(F):T.current=F}catch(N){r.__e(N,k)}}function ve(T,F,k){var N,H;if(r.unmount&&r.unmount(T),(N=T.ref)&&(N.current&&N.current!==T.__e||_e(N,null,F)),(N=T.__c)!=null){if(N.componentWillUnmount)try{N.componentWillUnmount()}catch(j){r.__e(j,F)}N.base=N.__P=null}if(N=T.__k)for(H=0;H<N.length;H++)N[H]&&ve(N[H],F,typeof T.type!="function");k||T.__e==null||g(T.__e),T.__e=T.__d=void 0}function ie(T,F,k){return this.constructor(T,k)}function Ie(T,F,k){var N,H,j;r.__&&r.__(T,F),H=(N=typeof k=="function")?null:k&&k.__k||F.__k,j=[],ee(F,T=(!N&&k||F).__k=v(y,null,[T]),H||c,c,F.ownerSVGElement!==void 0,!N&&k?[k]:H?null:F.firstChild?n.call(F.childNodes):null,j,!N&&k?k:H?H.__e:F.firstChild,N),ae(j,T)}n=f.slice,r={__e:function(T,F){for(var k,N,H;F=F.__;)if((k=F.__c)&&!k.__)try{if((N=k.constructor)&&N.getDerivedStateFromError!=null&&(k.setState(N.getDerivedStateFromError(T)),H=k.__d),k.componentDidCatch!=null&&(k.componentDidCatch(T),H=k.__d),H)return k.__E=k}catch(j){T=j}throw T}},i=0,o=function(T){return T!=null&&T.constructor===void 0},h.prototype.setState=function(T,F){var k;k=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=p({},this.state),typeof T=="function"&&(T=T(p({},k),this.props)),T&&p(k,T),T!=null&&this.__v&&(F&&this.__h.push(F),C(this))},h.prototype.forceUpdate=function(T){this.__v&&(this.__e=!0,T&&this.__h.push(T),C(this))},h.prototype.render=y,a=[],u=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,D.__r=0,l=0,t.Component=h,t.Fragment=y,t.cloneElement=function(T,F,k){var N,H,j,Q=p({},T.props);for(j in F)j=="key"?N=F[j]:j=="ref"?H=F[j]:Q[j]=F[j];return arguments.length>2&&(Q.children=arguments.length>3?n.call(arguments,2):k),m(T.type,Q,N||T.key,H||T.ref,null)},t.createContext=function(T,F){var k={__c:F="__cC"+l++,__:T,Consumer:function(N,H){return N.children(H)},Provider:function(N){var H,j;return this.getChildContext||(H=[],(j={})[F]=this,this.getChildContext=function(){return j},this.shouldComponentUpdate=function(Q){this.props.value!==Q.value&&H.some(C)},this.sub=function(Q){H.push(Q);var ce=Q.componentWillUnmount;Q.componentWillUnmount=function(){H.splice(H.indexOf(Q),1),ce&&ce.call(Q)}}),N.children}};return k.Provider.__=k.Consumer.contextType=k},t.createElement=v,t.createRef=function(){return{current:null}},t.h=v,t.hydrate=function T(F,k){Ie(F,k,T)},t.isValidElement=o,t.options=r,t.render=Ie,t.toChildArray=function T(F,k){return k=k||[],F==null||typeof F=="boolean"||(Array.isArray(F)?F.some(function(N){T(N,k)}):k.push(F)),k}}),MM=function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE},zM=function(t,n){return n===void 0&&(n=document),typeof t=="string"?n.querySelector(t):MM(t)?t:null},H$=class{constructor(t,n){n===void 0&&(n={}),this.uppy=t,this.opts=n}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new gO([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function O6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var HM=0;function UM(e){return"__private_"+HM+++"_"+e}const{render:B6}=LM;function VM(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=i,t||(t=Promise.resolve().then(()=>(t=null,e(...n)))),t}}var dl=UM("updateUI");class U$ extends H${constructor(){super(...arguments),Object.defineProperty(this,dl,{writable:!0,value:void 0})}mount(t,n){const r=n.id,i=zM(t);if(i){this.isTargetDOMEl=!0;const u=document.createDocumentFragment();return O6(this,dl)[dl]=VM(s=>{!this.uppy.getPlugin(this.id)||(B6(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),B6(this.render(this.uppy.getState()),u),this.el=u.firstElementChild,i.appendChild(u),this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof U$)o=t;else if(typeof t=="function"){const u=t;this.uppy.iteratePlugins(s=>{if(s instanceof u)return o=s,!1})}if(o)return this.uppy.log(`Installing ${r} to ${o.id}`),this.parent=o,this.el=o.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw typeof t=="function"?a+=" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":a+="If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}update(t){if(this.el!=null){var n,r;(n=(r=O6(this,dl))[dl])==null||n.call(r,t)}}unmount(){if(this.isTargetDOMEl){var t;(t=this.el)==null||t.remove()}this.onUnmount()}onMount(){}onUnmount(){}}var WM=U$;const{debugLogger:qM}=EO;var zf=AO,GM=AO,KM=WM,YM=H$,XM=qM;zf.Uppy=GM;zf.UIPlugin=KM;zf.BasePlugin=YM;zf.debugLogger=XM;class JM extends Error{constructor(t,n){n===void 0&&(n=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=n}}var V$=JM,e1=function(){return fetch(...arguments).catch(t=>{throw t.name==="AbortError"?t:new V$(t)})};class ZM extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}var QM=ZM,Nd,Ei,Dr,Ci,F6;function Cr(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var ez=0;function t1(e){return"__private_"+ez+++"_"+e}function tz(e){return e.replace(/\/$/,"")}async function n1(e){if(e.status===401)throw new QM;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const r=await t;n=r.message?`${n} message: ${r.message}`:n,n=r.requestId?`${n} request-Id: ${r.requestId}`:n}finally{throw new Error(n)}}return t}var W$=(F6=(Ei=t1("getPostResponseFunc"),Dr=t1("getUrl"),Ci=t1("errorHandler"),Nd=class OO{constructor(t,n){Object.defineProperty(this,Ci,{value:rz}),Object.defineProperty(this,Dr,{value:nz}),Object.defineProperty(this,Ei,{writable:!0,value:r=>i=>r?i:this.onReceiveResponse(i)}),this.uppy=t,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}get hostname(){const{companion:t}=this.uppy.getState(),n=this.opts.companionUrl;return tz(t&&t[n]?t[n]:n)}headers(){const t=this.opts.companionHeaders||{};return Promise.resolve({...OO.defaultHeaders,...t})}onReceiveResponse(t){const r=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:o}=t;return o.has("i-am")&&o.get("i-am")!==r[i]&&this.uppy.setState({companion:{...r,[i]:o.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(Cr(this,Dr)[Dr](t),{method:"OPTIONS"}).then(n=>(n.headers.has("access-control-allow-headers")&&(this.allowedHeaders=n.headers.get("access-control-allow-headers").split(",").map(r=>r.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(n=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${n}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then(n=>{let[r,i]=n;return Object.keys(i).forEach(o=>{r.includes(o.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${o}`),delete i[o])}),i})}get(t,n){const r="get";return this.preflightAndHeaders(t).then(i=>e1(Cr(this,Dr)[Dr](t),{method:r,headers:i,credentials:this.opts.companionCookiesRule||"same-origin"})).then(Cr(this,Ei)[Ei](n)).then(n1).catch(Cr(this,Ci)[Ci](r,t))}post(t,n,r){const i="post";return this.preflightAndHeaders(t).then(o=>e1(Cr(this,Dr)[Dr](t),{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)})).then(Cr(this,Ei)[Ei](r)).then(n1).catch(Cr(this,Ci)[Ci](i,t))}delete(t,n,r){const i="delete";return this.preflightAndHeaders(t).then(o=>e1(`${this.hostname}/${t}`,{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null})).then(Cr(this,Ei)[Ei](r)).then(n1).catch(Cr(this,Ci)[Ci](i,t))}}),Nd.VERSION="2.0.4",Nd.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${Nd.VERSION}`},F6);function nz(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function rz(e,t){return n=>{var r;if(!((r=n)!=null&&r.isAuthError)){const i=new Error(`Could not ${e} ${Cr(this,Dr)[Dr](t)}`);i.cause=n,n=i}return Promise.reject(n)}}var iz=(e,t)=>new Promise(n=>{localStorage.setItem(e,t),n()}),oz=e=>Promise.resolve(localStorage.getItem(e)),az=e=>new Promise(t=>{localStorage.removeItem(e),t()}),uz={setItem:iz,getItem:oz,removeItem:az};const sz=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");var lz=class extends W${constructor(t,n){super(t,n),this.provider=n.provider,this.id=this.provider,this.name=this.opts.name||sz(this.id),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(t=>{let[n,r]=t;const i={};return r&&(i["uppy-auth-token"]=r),this.companionKeysParams&&(i["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...n,...i}})}onReceiveResponse(t){t=super.onReceiveResponse(t);const n=this.uppy.getPlugin(this.pluginId),i=n.getPluginState().authenticated?t.status!==401:t.status<400;return n.setPluginState({authenticated:i}),t}setAuthToken(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}authUrl(t){return t===void 0&&(t={}),this.preAuthToken&&(t.uppyPreAuthToken=this.preAuthToken),`${this.hostname}/${this.id}/connect?${new URLSearchParams(t)}`}fileUrl(t){return`${this.hostname}/${this.id}/get/${t}`}fetchPreAuthToken(){return this.companionKeysParams?this.post(`${this.id}/preauth/`,{params:this.companionKeysParams}).then(t=>{this.preAuthToken=t.token}).catch(t=>{this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}):Promise.resolve()}list(t){return this.get(`${this.id}/list/${t||""}`)}logout(){return this.get(`${this.id}/logout`).then(t=>Promise.all([t,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(t=>{let[n]=t;return n})}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const i=n.companionAllowedHosts;if(typeof i!="string"&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||uz}};const cz=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");var fz=class extends W${constructor(t,n){super(t,n),this.provider=n.provider,this.id=this.provider,this.name=this.opts.name||cz(this.id),this.pluginId=this.opts.pluginId}fileUrl(t){return`${this.hostname}/search/${this.id}/get/${t}`}search(t,n){return n=n?`&${n}`:"",this.get(`search/${this.id}/list?q=${encodeURIComponent(t)}${n}`)}},Er,Di,In,Jt,Id;let T6,k6;function wt(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var dz=0;function pl(e){return"__private_"+dz+++"_"+e}var pz=(Er=pl("queued"),Di=pl("emitter"),In=pl("isOpen"),Jt=pl("socket"),Id=pl("handleMessage"),T6=Symbol.for("uppy test: getSocket"),k6=Symbol.for("uppy test: getQueued"),class{constructor(t){Object.defineProperty(this,Er,{writable:!0,value:[]}),Object.defineProperty(this,Di,{writable:!0,value:vO()}),Object.defineProperty(this,In,{writable:!0,value:!1}),Object.defineProperty(this,Jt,{writable:!0,value:void 0}),Object.defineProperty(this,Id,{writable:!0,value:n=>{try{const r=JSON.parse(n.data);this.emit(r.action,r.payload)}catch(r){console.log(r)}}}),this.opts=t,(!t||t.autoOpen!==!1)&&this.open()}get isOpen(){return wt(this,In)[In]}[T6](){return wt(this,Jt)[Jt]}[k6](){return wt(this,Er)[Er]}open(){wt(this,Jt)[Jt]=new WebSocket(this.opts.target),wt(this,Jt)[Jt].onopen=()=>{for(wt(this,In)[In]=!0;wt(this,Er)[Er].length>0&&wt(this,In)[In];){const t=wt(this,Er)[Er].shift();this.send(t.action,t.payload)}},wt(this,Jt)[Jt].onclose=()=>{wt(this,In)[In]=!1},wt(this,Jt)[Jt].onmessage=wt(this,Id)[Id]}close(){var t;(t=wt(this,Jt)[Jt])==null||t.close()}send(t,n){if(!wt(this,In)[In]){wt(this,Er)[Er].push({action:t,payload:n});return}wt(this,Jt)[Jt].send(JSON.stringify({action:t,payload:n}))}on(t,n){wt(this,Di)[Di].on(t,n)}emit(t,n){wt(this,Di)[Di].emit(t,n)}once(t,n){wt(this,Di)[Di].once(t,n)}}),hz={RequestClient:W$,Provider:lz,SearchProvider:fz,Socket:pz};function gz(e,t,n){const{progress:r,bytesUploaded:i,bytesTotal:o}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:i,bytesTotal:o}))}var vz=Fa(gz,300,{leading:!0,trailing:!0}),mz=function(t){const r=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(t)[1];return`${/^http:\/\//i.test(t)?"ws":"wss"}://${r}`},yz=function(t){const n=[],r=[];function i(u){n.push(u)}function o(u){r.push(u)}return Promise.all(t.map(u=>u.then(i,o))).then(()=>({successful:n,failed:r}))},Si,su;function hl(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var bz=0;function _6(e){return"__private_"+bz+++"_"+e}var P6=(Si=_6("emitter"),su=_6("events"),class{constructor(t){Object.defineProperty(this,Si,{writable:!0,value:void 0}),Object.defineProperty(this,su,{writable:!0,value:[]}),hl(this,Si)[Si]=t}on(t,n){return hl(this,su)[su].push([t,n]),hl(this,Si)[Si].on(t,n)}remove(){for(const[t,n]of hl(this,su)[su].splice(0))hl(this,Si)[Si].off(t,n)}});function Rn(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var $z=0;function Zg(e){return"__private_"+$z+++"_"+e}var ii=Zg("aliveTimer"),Lo=Zg("isDone"),gl=Zg("onTimedOut"),Mo=Zg("timeout");class wz{constructor(t,n){Object.defineProperty(this,ii,{writable:!0,value:void 0}),Object.defineProperty(this,Lo,{writable:!0,value:!1}),Object.defineProperty(this,gl,{writable:!0,value:void 0}),Object.defineProperty(this,Mo,{writable:!0,value:void 0}),Rn(this,Mo)[Mo]=t,Rn(this,gl)[gl]=n}progress(){Rn(this,Lo)[Lo]||Rn(this,Mo)[Mo]>0&&(clearTimeout(Rn(this,ii)[ii]),Rn(this,ii)[ii]=setTimeout(Rn(this,gl)[gl],Rn(this,Mo)[Mo]))}done(){Rn(this,Lo)[Lo]||(clearTimeout(Rn(this,ii)[ii]),Rn(this,ii)[ii]=null,Rn(this,Lo)[Lo]=!0)}}var N6=wz;function Dt(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ez=0;function Wa(e){return"__private_"+Ez+++"_"+e}function Cz(){return new Error("Cancelled")}var wn=Wa("activeRequests"),on=Wa("queuedHandlers"),Dc=Wa("call"),vc=Wa("queueNext"),I2=Wa("next"),r1=Wa("queue"),R2=Wa("dequeue");class Dz{constructor(t){Object.defineProperty(this,R2,{value:Bz}),Object.defineProperty(this,r1,{value:Oz}),Object.defineProperty(this,I2,{value:Az}),Object.defineProperty(this,vc,{value:xz}),Object.defineProperty(this,Dc,{value:Sz}),Object.defineProperty(this,wn,{writable:!0,value:0}),Object.defineProperty(this,on,{writable:!0,value:[]}),typeof t!="number"||t===0?this.limit=1/0:this.limit=t}run(t,n){return Dt(this,wn)[wn]<this.limit?Dt(this,Dc)[Dc](t):Dt(this,r1)[r1](t,n)}wrapPromiseFunction(t,n){var r=this;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];let u;const s=new Promise((l,c)=>{u=r.run(()=>{let f,d;try{d=Promise.resolve(t(...o))}catch(p){d=Promise.reject(p)}return d.then(p=>{f?c(f):(u.done(),l(p))},p=>{f?c(f):(u.done(),c(p))}),()=>{f=Cz()}},n)});return s.abort=()=>{u.abort()},s}}}function Sz(e){Dt(this,wn)[wn]+=1;let t=!1,n;try{n=e()}catch(r){throw Dt(this,wn)[wn]-=1,r}return{abort:()=>{t||(t=!0,Dt(this,wn)[wn]-=1,n(),Dt(this,vc)[vc]())},done:()=>{t||(t=!0,Dt(this,wn)[wn]-=1,Dt(this,vc)[vc]())}}}function xz(){queueMicrotask(()=>Dt(this,I2)[I2]())}function Az(){if(Dt(this,wn)[wn]>=this.limit||Dt(this,on)[on].length===0)return;const e=Dt(this,on)[on].shift(),t=Dt(this,Dc)[Dc](e.fn);e.abort=t.abort,e.done=t.done}function Oz(e,t){t===void 0&&(t={});const n={fn:e,priority:t.priority||0,abort:()=>{Dt(this,R2)[R2](n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=Dt(this,on)[on].findIndex(i=>n.priority>i.priority);return r===-1?Dt(this,on)[on].push(n):Dt(this,on)[on].splice(r,0,n),n}function Bz(e){const t=Dt(this,on)[on].indexOf(e);t!==-1&&Dt(this,on)[on].splice(t,1)}var Fz={RateLimitedQueue:Dz,internalRateLimitedQueue:Symbol("__queue")};function Tz(e){return e?e.readyState!==0&&e.readyState!==4||e.status===0:!1}var BO=Tz,kz={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}},I6,R6;const{nanoid:_z}=CO,{Provider:Pz,RequestClient:Nz,Socket:Iz}=hz,{RateLimitedQueue:Rz,internalRateLimitedQueue:i1}=Fz;function j6(e,t){let n=t;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),BO(e)?(n=new V$(n,e),n):(n.request=e,n)}function L6(e){return e.data.slice(0,e.data.size,e.meta.type)}var jz=(R6=I6=class extends H${constructor(t,n){super(t,n),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=kz;const r={formData:!0,fieldName:n.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:"",getResponseData(i){let o={};try{o=JSON.parse(i)}catch(a){t.log(a)}return o},getResponseError(i,o){let a=new Error("Upload error");return BO(o)&&(a=new V$(a,o)),a},validateStatus(i){return i>=200&&i<300}};if(this.opts={...r,...n},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),i1 in this.opts?this.requests=this.opts[i1]:this.requests=new Rz(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(t){const n=this.uppy.getState().xhrUpload,{headers:r}=this.opts,i={...this.opts,...n||{},...t.xhrUpload||{},headers:{}};return typeof r=="function"?i.headers=r(t):Object.assign(i.headers,this.opts.headers),n&&Object.assign(i.headers,n.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,n,r){(Array.isArray(r.metaFields)?r.metaFields:Object.keys(n)).forEach(o=>{t.append(o,n[o])})}createFormDataUpload(t,n){const r=new FormData;this.addMetadata(r,t.meta,n);const i=L6(t);return t.name?r.append(n.fieldName,i,t.meta.name):r.append(n.fieldName,i),r}createBundledUpload(t,n){const r=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(r,i,n),t.forEach(o=>{const a=this.getOptions(o),u=L6(o);o.name?r.append(a.fieldName,u,o.name):r.append(a.fieldName,u)}),r}upload(t,n,r){const i=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise((o,a)=>{this.uppy.emit("upload-started",t);const u=i.formData?this.createFormDataUpload(t,i):t.data,s=new XMLHttpRequest;this.uploaderEvents[t.id]=new P6(this.uppy);const l=new N6(i.timeout,()=>{s.abort(),f.done();const d=new Error(this.i18n("timedOut",{seconds:Math.ceil(i.timeout/1e3)}));this.uppy.emit("upload-error",t,d),a(d)}),c=_z();s.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${c} started`)}),s.upload.addEventListener("progress",d=>{this.uppy.log(`[XHRUpload] ${c} progress: ${d.loaded} / ${d.total}`),l.progress(),d.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:d.loaded,bytesTotal:d.total})}),s.addEventListener("load",d=>{if(this.uppy.log(`[XHRUpload] ${c} finished`),l.done(),f.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i.validateStatus(d.target.status,s.responseText,s)){const m=i.getResponseData(s.responseText,s),y=m[i.responseUrlFieldName],h={status:d.target.status,body:m,uploadURL:y};return this.uppy.emit("upload-success",t,h),y&&this.uppy.log(`Download ${t.name} from ${y}`),o(t)}const p=i.getResponseData(s.responseText,s),g=j6(s,i.getResponseError(s.responseText,s)),v={status:d.target.status,body:p};return this.uppy.emit("upload-error",t,g,v),a(g)}),s.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${c} errored`),l.done(),f.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const d=j6(s,i.getResponseError(s.responseText,s));return this.uppy.emit("upload-error",t,d),a(d)}),s.open(i.method.toUpperCase(),i.endpoint,!0),s.withCredentials=i.withCredentials,i.responseType!==""&&(s.responseType=i.responseType);const f=this.requests.run(()=>{this.uppy.emit("upload-started",t);const d=this.getOptions(t);return Object.keys(d.headers).forEach(p=>{s.setRequestHeader(p,d.headers[p])}),s.send(u),()=>{l.done(),s.abort()}});this.onFileRemove(t.id,()=>{f.abort(),a(new Error("File removed"))}),this.onCancelAll(t.id,()=>{f.abort(),a(new Error("Upload cancelled"))})})}uploadRemote(t){const n=this.getOptions(t);return new Promise((r,i)=>{this.uppy.emit("upload-started",t);const o={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t.meta)).forEach(l=>{o[l]=t.meta[l]});const u=t.remote.providerOptions.provider?Pz:Nz;new u(this.uppy,t.remote.providerOptions).post(t.remote.url,{...t.remote.body,endpoint:n.endpoint,size:t.data.size,fieldname:n.fieldName,metadata:o,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then(l=>{const{token:c}=l,f=mz(t.remote.companionUrl),d=new Iz({target:`${f}/api/${c}`,autoOpen:!1});this.uploaderEvents[t.id]=new P6(this.uppy),this.onFileRemove(t.id,()=>{d.send("cancel",{}),p.abort(),r(`upload ${t.id} was removed`)}),this.onCancelAll(t.id,()=>{d.send("cancel",{}),p.abort(),r(`upload ${t.id} was canceled`)}),this.onRetry(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",g=>vz(this,g,t)),d.on("success",g=>{const v=n.getResponseData(g.response.responseText,g.response),m=v[n.responseUrlFieldName],y={status:g.response.status,body:v,uploadURL:m};return this.uppy.emit("upload-success",t,y),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),r()}),d.on("error",g=>{const v=g.response,m=v?n.getResponseError(v.responseText,v):Object.assign(new Error(g.error.message),{cause:g.error});this.uppy.emit("upload-error",t,m),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i(m)});const p=this.requests.run(()=>(d.open(),t.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(l=>{this.uppy.emit("upload-error",t,l),i(l)})})}uploadBundle(t){return new Promise((n,r)=>{const{endpoint:i}=this.opts,{method:o}=this.opts,a=this.uppy.getState().xhrUpload,u=this.createBundledUpload(t,{...this.opts,...a||{}}),s=new XMLHttpRequest,l=new N6(this.opts.timeout,()=>{s.abort();const f=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));c(f),r(f)}),c=f=>{t.forEach(d=>{this.uppy.emit("upload-error",d,f)})};s.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),l.progress()}),s.upload.addEventListener("progress",f=>{l.progress(),f.lengthComputable&&t.forEach(d=>{this.uppy.emit("upload-progress",d,{uploader:this,bytesUploaded:f.loaded/f.total*d.size,bytesTotal:d.size})})}),s.addEventListener("load",f=>{if(l.done(),this.opts.validateStatus(f.target.status,s.responseText,s)){const p=this.opts.getResponseData(s.responseText,s),g={status:f.target.status,body:p};return t.forEach(v=>{this.uppy.emit("upload-success",v,g)}),n()}const d=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return d.request=s,c(d),r(d)}),s.addEventListener("error",()=>{l.done();const f=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return c(f),r(f)}),this.uppy.on("cancel-all",()=>{l.done(),s.abort()}),s.open(o.toUpperCase(),i,!0),s.withCredentials=this.opts.withCredentials,this.opts.responseType!==""&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(f=>{s.setRequestHeader(f,this.opts.headers[f])}),s.send(u),t.forEach(f=>{this.uppy.emit("upload-started",f)})})}uploadFiles(t){const n=t.map((r,i)=>{const o=parseInt(i,10)+1,a=t.length;return r.error?Promise.reject(new Error(r.error)):r.isRemote?this.uploadRemote(r,o,a):this.upload(r,o,a)});return yz(n)}onFileRemove(t,n){this.uploaderEvents[t].on("file-removed",r=>{t===r.id&&n(r.id)})}onRetry(t,n){this.uploaderEvents[t].on("upload-retry",r=>{t===r&&n()})}onRetryAll(t,n){this.uploaderEvents[t].on("retry-all",()=>{!this.uppy.getFile(t)||n()})}onCancelAll(t,n){this.uploaderEvents[t].on("cancel-all",()=>{!this.uppy.getFile(t)||n()})}handleUpload(t){if(t.length===0)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.opts.limit===0&&!this.opts[i1]&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const n=t.map(r=>this.uppy.getFile(r));if(this.opts.bundle){if(n.some(i=>i.isRemote))throw new Error("Can\u2019t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(n)}return this.uploadFiles(n).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}},I6.VERSION="2.0.6",R6),M6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hf(e){var t={exports:{}};return e(t,t.exports),t.exports}var xi,Pp,Rd=function(e){return e&&e.Math==Math&&e},U=Rd(typeof globalThis=="object"&&globalThis)||Rd(typeof window=="object"&&window)||Rd(typeof self=="object"&&self)||Rd(typeof M6=="object"&&M6)||function(){return this}()||Function("return this")(),Lz=Object.defineProperty,q$=function(e,t){try{Lz(U,e,{value:t,configurable:!0,writable:!0})}catch{U[e]=t}return t},Ji=U["__core-js_shared__"]||q$("__core-js_shared__",{}),G$=Hf(function(e){(e.exports=function(t,n){return Ji[t]||(Ji[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),FO=Function.prototype,j2=FO.bind,L2=FO.call,Mz=j2&&j2.bind(L2),re=j2?function(e){return e&&Mz(L2,e)}:function(e){return e&&function(){return L2.apply(e,arguments)}},zz=U.TypeError,Xn=function(e){if(e==null)throw zz("Can't call method on "+e);return e},Hz=U.Object,Ao=function(e){return Hz(Xn(e))},Uz=re({}.hasOwnProperty),vt=Object.hasOwn||function(e,t){return Uz(Ao(e),t)},Vz=0,Wz=Math.random(),qz=re(1 .toString),K$=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qz(++Vz+Wz,36)},Ue=function(e){return typeof e=="function"},Gz=function(e){return Ue(e)?e:void 0},qa=function(e,t){return arguments.length<2?Gz(U[e]):U[e]&&U[e][t]},Gu=qa("navigator","userAgent")||"",z6=U.process,H6=U.Deno,U6=z6&&z6.versions||H6&&H6.version,V6=U6&&U6.v8;V6&&(Pp=(xi=V6.split("."))[0]>0&&xi[0]<4?1:+(xi[0]+xi[1])),!Pp&&Gu&&(!(xi=Gu.match(/Edge\/(\d+)/))||xi[1]>=74)&&(xi=Gu.match(/Chrome\/(\d+)/))&&(Pp=+xi[1]);var Yc=Pp,je=function(e){try{return!!e()}catch{return!0}},M2=!!Object.getOwnPropertySymbols&&!je(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Yc&&Yc<41}),Y$=M2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",vl=G$("wks"),ca=U.Symbol,W6=ca&&ca.for,Kz=Y$?ca:ca&&ca.withoutSetter||K$,st=function(e){if(!vt(vl,e)||!M2&&typeof vl[e]!="string"){var t="Symbol."+e;M2&&vt(ca,e)?vl[e]=ca[e]:vl[e]=Y$&&W6?W6(t):Kz(t)}return vl[e]},TO={};TO[st("toStringTag")]="z";var X$=String(TO)==="[object z]",Nt=!je(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Ye=function(e){return typeof e=="object"?e!==null:Ue(e)},z2=U.document,Yz=Ye(z2)&&Ye(z2.createElement),Xc=function(e){return Yz?z2.createElement(e):{}},kO=!Nt&&!je(function(){return Object.defineProperty(Xc("div"),"a",{get:function(){return 7}}).a!=7}),Xz=U.String,Jz=U.TypeError,mt=function(e){if(Ye(e))return e;throw Jz(Xz(e)+" is not an object")},ml=Function.prototype.call,Be=ml.bind?ml.bind(ml):function(){return ml.apply(ml,arguments)},Ta=re({}.isPrototypeOf),Zz=U.Object,H2=Y$?function(e){return typeof e=="symbol"}:function(e){var t=qa("Symbol");return Ue(t)&&Ta(t.prototype,Zz(e))},Qz=U.String,Qg=function(e){try{return Qz(e)}catch{return"Object"}},eH=U.TypeError,mo=function(e){if(Ue(e))return e;throw eH(Qg(e)+" is not a function")},ka=function(e,t){var n=e[t];return n==null?void 0:mo(n)},tH=U.TypeError,nH=U.TypeError,rH=st("toPrimitive"),iH=function(e,t){if(!Ye(e)||H2(e))return e;var n,r=ka(e,rH);if(r){if(t===void 0&&(t="default"),n=Be(r,e,t),!Ye(n)||H2(n))return n;throw nH("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,u;if(o==="string"&&Ue(a=i.toString)&&!Ye(u=Be(a,i))||Ue(a=i.valueOf)&&!Ye(u=Be(a,i))||o!=="string"&&Ue(a=i.toString)&&!Ye(u=Be(a,i)))return u;throw tH("Can't convert object to primitive value")}(e,t)},J$=function(e){var t=iH(e,"string");return H2(t)?t:t+""},oH=U.TypeError,q6=Object.defineProperty,gr={f:Nt?q6:function(e,t,n){if(mt(e),t=J$(t),mt(n),kO)try{return q6(e,t,n)}catch{}if("get"in n||"set"in n)throw oH("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},e0=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},sr=Nt?function(e,t,n){return gr.f(e,t,e0(1,n))}:function(e,t,n){return e[t]=n,e},aH=re(Function.toString);Ue(Ji.inspectSource)||(Ji.inspectSource=function(e){return aH(e)});var yh,Sc,bh,t0=Ji.inspectSource,G6=U.WeakMap,_O=Ue(G6)&&/native code/.test(t0(G6)),K6=G$("keys"),Z$=function(e){return K6[e]||(K6[e]=K$(e))},n0={},U2=U.TypeError,uH=U.WeakMap;if(_O||Ji.state){var zo=Ji.state||(Ji.state=new uH),sH=re(zo.get),Y6=re(zo.has),lH=re(zo.set);yh=function(e,t){if(Y6(zo,e))throw new U2("Object already initialized");return t.facade=e,lH(zo,e,t),t},Sc=function(e){return sH(zo,e)||{}},bh=function(e){return Y6(zo,e)}}else{var lu=Z$("state");n0[lu]=!0,yh=function(e,t){if(vt(e,lu))throw new U2("Object already initialized");return t.facade=e,sr(e,lu,t),t},Sc=function(e){return vt(e,lu)?e[lu]:{}},bh=function(e){return vt(e,lu)}}var tn={set:yh,get:Sc,has:bh,enforce:function(e){return bh(e)?Sc(e):yh(e,{})},getterFor:function(e){return function(t){var n;if(!Ye(t)||(n=Sc(t)).type!==e)throw U2("Incompatible receiver, "+e+" required");return n}}},PO=Function.prototype,cH=Nt&&Object.getOwnPropertyDescriptor,o1=vt(PO,"name"),ks={EXISTS:o1,PROPER:o1&&function(){}.name==="something",CONFIGURABLE:o1&&(!Nt||Nt&&cH(PO,"name").configurable)},pn=Hf(function(e){var t=ks.CONFIGURABLE,n=tn.get,r=tn.enforce,i=String(String).split("String");(e.exports=function(o,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Ue(u)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!vt(u,"name")||t&&u.name!==p)&&sr(u,"name",p),(l=r(u)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==U?(c?!d&&o[a]&&(f=!0):delete o[a],f?o[a]=u:sr(o,a,u)):f?o[a]=u:q$(a,u)})(Function.prototype,"toString",function(){return Ue(this)&&n(this).source||t0(this)})}),fH=re({}.toString),dH=re("".slice),lr=function(e){return dH(fH(e),8,-1)},pH=st("toStringTag"),hH=U.Object,gH=lr(function(){return arguments}())=="Arguments",r0=X$?lr:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(i,o){try{return i[o]}catch{}}(t=hH(e),pH))=="string"?n:gH?lr(t):(r=lr(t))=="Object"&&Ue(t.callee)?"Arguments":r},vH=X$?{}.toString:function(){return"[object "+r0(this)+"]"};X$||pn(Object.prototype,"toString",vH,{unsafe:!0});var $h={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},a1=Xc("span").classList,X6=a1&&a1.constructor&&a1.constructor.prototype,NO=X6===Object.prototype?void 0:X6,J6=re(re.bind),_a=function(e,t){return mo(e),t===void 0?e:J6?J6(e,t):function(){return e.apply(t,arguments)}},u1=U.Object,mH=re("".split),i0=je(function(){return!u1("z").propertyIsEnumerable(0)})?function(e){return lr(e)=="String"?mH(e,""):u1(e)}:u1,yH=Math.ceil,bH=Math.floor,Uf=function(e){var t=+e;return t!=t||t===0?0:(t>0?bH:yH)(t)},$H=Math.min,_s=function(e){return e>0?$H(Uf(e),9007199254740991):0},Ga=function(e){return _s(e.length)},wh=Array.isArray||function(e){return lr(e)=="Array"},IO=function(){},wH=[],RO=qa("Reflect","construct"),Q$=/^\s*(?:class|function)\b/,EH=re(Q$.exec),CH=!Q$.exec(IO),yl=function(e){if(!Ue(e))return!1;try{return RO(IO,wH,e),!0}catch{return!1}},o0=!RO||je(function(){var e;return yl(yl.call)||!yl(Object)||!yl(function(){e=!0})||e})?function(e){if(!Ue(e))return!1;switch(r0(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return CH||!!EH(Q$,t0(e))}:yl,DH=st("species"),Z6=U.Array,jO=function(e,t){return new(function(n){var r;return wh(n)&&(r=n.constructor,(o0(r)&&(r===Z6||wh(r.prototype))||Ye(r)&&(r=r[DH])===null)&&(r=void 0)),r===void 0?Z6:r}(e))(t===0?0:t)},Q6=re([].push),Ai=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=Ao(s),v=i0(g),m=_a(l,c),y=Ga(v),h=0,$=f||jO,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:Q6(w,d)}else switch(e){case 4:return!1;case 7:Q6(w,d)}return o?-1:r||i?i:w}},Ps={forEach:Ai(0),map:Ai(1),filter:Ai(2),some:Ai(3),every:Ai(4),find:Ai(5),findIndex:Ai(6),filterReject:Ai(7)},LO=function(e,t){var n=[][e];return!!n&&je(function(){n.call(null,t||function(){throw 1},1)})},SH=Ps.forEach,s1=LO("forEach")?[].forEach:function(e){return SH(this,e,arguments.length>1?arguments[1]:void 0)},MO=function(e){if(e&&e.forEach!==s1)try{sr(e,"forEach",s1)}catch{e.forEach=s1}};for(var l1 in $h)$h[l1]&&MO(U[l1]&&U[l1].prototype);MO(NO);var e8={}.propertyIsEnumerable,t8=Object.getOwnPropertyDescriptor,xH=t8&&!e8.call({1:2},1)?function(e){var t=t8(this,e);return!!t&&t.enumerable}:e8,zO={f:xH},Oo=function(e){return i0(Xn(e))},n8=Object.getOwnPropertyDescriptor,Vf={f:Nt?n8:function(e,t){if(e=Oo(e),t=J$(t),kO)try{return n8(e,t)}catch{}if(vt(e,t))return e0(!Be(zO.f,e,t),e[t])}},AH=Math.max,OH=Math.min,vs=function(e,t){var n=Uf(e);return n<0?AH(n+t,0):OH(n,t)},r8=function(e){return function(t,n,r){var i,o=Oo(t),a=Ga(o),u=vs(r,a);if(e&&n!=n){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},HO={includes:r8(!0),indexOf:r8(!1)},BH=HO.indexOf,i8=re([].push),UO=function(e,t){var n,r=Oo(e),i=0,o=[];for(n in r)!vt(n0,n)&&vt(r,n)&&i8(o,n);for(;t.length>i;)vt(r,n=t[i++])&&(~BH(o,n)||i8(o,n));return o},Eh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FH=Eh.concat("length","prototype"),Jc={f:Object.getOwnPropertyNames||function(e){return UO(e,FH)}},VO={f:Object.getOwnPropertySymbols},TH=re([].concat),kH=qa("Reflect","ownKeys")||function(e){var t=Jc.f(mt(e)),n=VO.f;return n?TH(t,n(e)):t},_H=function(e,t){for(var n=kH(t),r=gr.f,i=Vf.f,o=0;o<n.length;o++){var a=n[o];vt(e,a)||r(e,a,i(t,a))}},PH=/#|\.prototype\./,Wf=function(e,t){var n=IH[NH(e)];return n==jH||n!=RH&&(Ue(t)?je(t):!!t)},NH=Wf.normalize=function(e){return String(e).replace(PH,".").toLowerCase()},IH=Wf.data={},RH=Wf.NATIVE="N",jH=Wf.POLYFILL="P",Zc=Wf,LH=Vf.f,at=function(e,t){var n,r,i,o,a,u=e.target,s=e.global,l=e.stat;if(n=s?U:l?U[u]||q$(u,{}):(U[u]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=LH(n,r))&&a.value:n[r],!Zc(s?r:u+(l?".":"#")+r,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;_H(o,i)}(e.sham||i&&i.sham)&&sr(o,"sham",!0),pn(n,r,o,e)}},Ku=Object.keys||function(e){return UO(e,Eh)},MH=je(function(){Ku(1)});/*!
|
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
*
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
* Released under the MIT License.
|
|
*/function o8(e){return Object.prototype.toString.call(e)==="[object Object]"}at({target:"Object",stat:!0,forced:MH},{keys:function(e){return Ku(Ao(e))}});var zH={isHistory(e){return o8(t=e)!==!1&&((n=t.constructor)===void 0||o8(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Gi.isOperationList(e.redos[0]))&&(e.undos.length===0||Gi.isOperationList(e.undos[0]));var t,n,r}},c1=new WeakMap,f1=new WeakMap,Hu={isHistoryEditor:e=>zH.isHistory(e.history)&&E.isEditor(e),isMerging:e=>f1.get(e),isSaving:e=>c1.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=Hu.isMerging(e);f1.set(e,!1),t(),f1.set(e,n)},withoutSaving(e,t){var n=Hu.isSaving(e);c1.set(e,!1),t(),c1.set(e,n)}},HH=(e,t)=>e.type==="set_selection"||!(!t||e.type!=="insert_text"||t.type!=="insert_text"||e.offset!==t.offset+t.text.length||!_.equals(e.path,t.path))||!(!t||e.type!=="remove_text"||t.type!=="remove_text"||e.offset+e.text.length!==t.offset||!_.equals(e.path,t.path)),UH=(e,t)=>e.type!=="set_selection"||e.properties!=null&&e.newProperties!=null,VH=(e,t)=>!(!t||e.type!=="set_selection"||t.type!=="set_selection"),WH=e=>e.type!=="set_selection",qH=U.String,Ge=function(e){if(r0(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return qH(e)},ew=function(){var e=mt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},GH=ks.PROPER,V2=RegExp.prototype,WO=V2.toString,KH=re(ew),YH=je(function(){return WO.call({source:"a",flags:"b"})!="/a/b"}),XH=GH&&WO.name!="toString";(YH||XH)&&pn(RegExp.prototype,"toString",function(){var e=mt(this),t=Ge(e.source),n=e.flags;return"/"+t+"/"+Ge(n===void 0&&Ta(V2,e)&&!("flags"in V2)?KH(e):n)},{unsafe:!0});var jd,JH=Nt?Object.defineProperties:function(e,t){mt(e);for(var n,r=Oo(t),i=Ku(t),o=i.length,a=0;o>a;)gr.f(e,n=i[a++],r[n]);return e},W2=qa("document","documentElement"),qO=Z$("IE_PROTO"),d1=function(){},GO=function(e){return"<script>"+e+"<\/script>"},a8=function(e){e.write(GO("")),e.close();var t=e.parentWindow.Object;return e=null,t},Np=function(){try{jd=new ActiveXObject("htmlfile")}catch{}var e,t;Np=typeof document<"u"?document.domain&&jd?a8(jd):((t=Xc("iframe")).style.display="none",W2.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(GO("document.F=Object")),e.close(),e.F):a8(jd);for(var n=Eh.length;n--;)delete Np.prototype[Eh[n]];return Np()};n0[qO]=!0;var a0=Object.create||function(e,t){var n;return e!==null?(d1.prototype=mt(e),n=new d1,d1.prototype=null,n[qO]=e):n=Np(),t===void 0?n:JH(n,t)},q2=st("unscopables"),G2=Array.prototype;G2[q2]==null&&gr.f(G2,q2,{configurable:!0,value:a0(null)});var xc=function(e){G2[q2][e]=!0},ZH=HO.includes;at({target:"Array",proto:!0},{includes:function(e){return ZH(this,e,arguments.length>1?arguments[1]:void 0)}}),xc("includes");var QH=st("match"),tw=function(e){var t;return Ye(e)&&((t=e[QH])!==void 0?!!t:lr(e)=="RegExp")},eU=U.TypeError,nw=function(e){if(tw(e))throw eU("The method doesn't accept regular expressions");return e},tU=st("match"),rw=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[tU]=!1,"/./"[e](t)}catch{}}return!1},nU=re("".indexOf);at({target:"String",proto:!0,forced:!rw("includes")},{includes:function(e){return!!~nU(Ge(Xn(this)),Ge(nw(e)),arguments.length>1?arguments[1]:void 0)}});var u8,rU=/"/g,iU=re("".replace);at({target:"String",proto:!0,forced:(u8="anchor",je(function(){var e=""[u8]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Ge(Xn(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+iU(Ge(r),rU,""")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var K2=function(e,t,n){var r,i;mt(e);try{if(!(r=ka(e,"return"))){if(t==="throw")throw n;return n}r=Be(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return mt(r),n},oU=function(e,t,n,r){try{return r?t(mt(n)[0],n[1]):t(n)}catch(i){K2(e,"throw",i)}},ms={},aU=st("iterator"),uU=Array.prototype,KO=function(e){return e!==void 0&&(ms.Array===e||uU[aU]===e)},Qc=function(e,t,n){var r=J$(t);r in e?gr.f(e,r,e0(0,n)):e[r]=n},sU=st("iterator"),iw=function(e){if(e!=null)return ka(e,sU)||ka(e,"@@iterator")||ms[r0(e)]},lU=U.TypeError,YO=function(e,t){var n=arguments.length<2?iw(e):t;if(mo(n))return mt(Be(n,e));throw lU(Qg(e)+" is not iterable")},s8=U.Array,XO=st("iterator"),JO=!1;try{var cU=0,l8={next:function(){return{done:!!cU++}},return:function(){JO=!0}};l8[XO]=function(){return this},Array.from(l8,function(){throw 2})}catch{}var ow=function(e,t){if(!t&&!JO)return!1;var n=!1;try{var r={};r[XO]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},fU=!ow(function(e){Array.from(e)});at({target:"Array",stat:!0,forced:fU},{from:function(e){var t=Ao(e),n=o0(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=i!==void 0;o&&(i=_a(i,r>2?arguments[2]:void 0));var a,u,s,l,c,f,d=iw(t),p=0;if(!d||this==s8&&KO(d))for(a=Ga(t),u=n?new this(a):s8(a);a>p;p++)f=o?i(t[p],p):t[p],Qc(u,p,f);else for(c=(l=YO(t,d)).next,u=n?new this:[];!(s=Be(c,l)).done;p++)f=o?oU(l,i,[s.value,p],!0):s.value,Qc(u,p,f);return u.length=p,u}});var fa,c8,f8,dU=re("".charAt),d8=re("".charCodeAt),pU=re("".slice),p8=function(e){return function(t,n){var r,i,o=Ge(Xn(t)),a=Uf(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=d8(o,a))<55296||r>56319||a+1===u||(i=d8(o,a+1))<56320||i>57343?e?dU(o,a):r:e?pU(o,a,a+2):i-56320+(r-55296<<10)+65536}},ZO={codeAt:p8(!1),charAt:p8(!0)},hU=!je(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),h8=Z$("IE_PROTO"),Y2=U.Object,gU=Y2.prototype,Ch=hU?Y2.getPrototypeOf:function(e){var t=Ao(e);if(vt(t,h8))return t[h8];var n=t.constructor;return Ue(n)&&t instanceof n?n.prototype:t instanceof Y2?gU:null},X2=st("iterator"),QO=!1;[].keys&&("next"in(f8=[].keys())?(c8=Ch(Ch(f8)))!==Object.prototype&&(fa=c8):QO=!0);var vU=fa==null||je(function(){var e={};return fa[X2].call(e)!==e});vU&&(fa={}),Ue(fa[X2])||pn(fa,X2,function(){return this});var aw={IteratorPrototype:fa,BUGGY_SAFARI_ITERATORS:QO},mU=gr.f,g8=st("toStringTag"),Dh=function(e,t,n){e&&!vt(e=n?e:e.prototype,g8)&&mU(e,g8,{configurable:!0,value:t})},yU=aw.IteratorPrototype,bU=function(){return this},$U=U.String,wU=U.TypeError,ys=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=re(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,i){return mt(r),function(o){if(typeof o=="object"||Ue(o))return o;throw wU("Can't set "+$U(o)+" as a prototype")}(i),t?e(r,i):r.__proto__=i,r}}():void 0),EU=ks.PROPER,CU=ks.CONFIGURABLE,v8=aw.IteratorPrototype,Ld=aw.BUGGY_SAFARI_ITERATORS,bl=st("iterator"),DU=function(){return this},uw=function(e,t,n,r,i,o,a){(function(y,h,$,w){var C=h+" Iterator";y.prototype=a0(yU,{next:e0(+!w,$)}),Dh(y,C,!1),ms[C]=bU})(n,t,r);var u,s,l,c=function(y){if(y===i&&v)return v;if(!Ld&&y in p)return p[y];switch(y){case"keys":case"values":case"entries":return function(){return new n(this,y)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,p=e.prototype,g=p[bl]||p["@@iterator"]||i&&p[i],v=!Ld&&g||c(i),m=t=="Array"&&p.entries||g;if(m&&(u=Ch(m.call(new e)))!==Object.prototype&&u.next&&(Ch(u)!==v8&&(ys?ys(u,v8):Ue(u[bl])||pn(u,bl,DU)),Dh(u,f,!0)),EU&&i=="values"&&g&&g.name!=="values"&&(CU?sr(p,"name","values"):(d=!0,v=function(){return Be(g,this)})),i)if(s={values:c("values"),keys:o?v:c("keys"),entries:c("entries")},a)for(l in s)(Ld||d||!(l in p))&&pn(p,l,s[l]);else at({target:t,proto:!0,forced:Ld||d},s);return p[bl]!==v&&pn(p,bl,v,{name:i}),ms[t]=v,s},SU=ZO.charAt,xU=tn.set,AU=tn.getterFor("String Iterator");uw(String,"String",function(e){xU(this,{type:"String Iterator",string:Ge(e),index:0})},function(){var e,t=AU(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=SU(n,r),t.index+=e.length,{value:e,done:!1})});var p1,OU=Vf.f,m8=re("".endsWith),BU=re("".slice),FU=Math.min,eB=rw("endsWith"),TU=!(eB||(p1=OU(String.prototype,"endsWith"),!p1||p1.writable));at({target:"String",proto:!0,forced:!TU&&!eB},{endsWith:function(e){var t=Ge(Xn(this));nw(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=n===void 0?r:FU(_s(n),r),o=Ge(e);return m8?m8(t,o,i):BU(t,i-o.length,i)===o}});var kU=re([].join),_U=i0!=Object,PU=LO("join",",");at({target:"Array",proto:!0,forced:_U||!PU},{join:function(e){return kU(Oo(this),e===void 0?",":e)}});var NU=st("species"),u0=function(e){return Yc>=51||!je(function(){var t=[];return(t.constructor={})[NU]=function(){return{foo:1}},t[e](Boolean).foo!==1})},IU=Ps.map,RU=u0("map");at({target:"Array",proto:!0,forced:!RU},{map:function(e){return IU(this,e,arguments.length>1?arguments[1]:void 0)}});var sw=U.RegExp,J2=je(function(){var e=sw("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),jU=J2||je(function(){return!sw("a","y").sticky}),s0={BROKEN_CARET:J2||je(function(){var e=sw("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:jU,UNSUPPORTED_Y:J2},LU=U.RegExp,lw=je(function(){var e=LU(".","s");return!(e.dotAll&&e.exec(`
|
|
`)&&e.flags==="s")}),MU=U.RegExp,cw=je(function(){var e=MU("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),zU=tn.get,HU=G$("native-string-replace",String.prototype.replace),Sh=RegExp.prototype.exec,Z2=Sh,UU=re("".charAt),VU=re("".indexOf),WU=re("".replace),h1=re("".slice),g1=function(){var e=/a/,t=/b*/g;return Be(Sh,e,"a"),Be(Sh,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),y8=s0.BROKEN_CARET,v1=/()??/.exec("")[1]!==void 0;(g1||v1||y8||lw||cw)&&(Z2=function(e){var t,n,r,i,o,a,u,s=this,l=zU(s),c=Ge(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Be(Z2,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=y8&&s.sticky,g=Be(ew,s),v=s.source,m=0,y=c;if(p&&(g=WU(g,"y",""),VU(g,"g")===-1&&(g+="g"),y=h1(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&UU(c,s.lastIndex-1)!==`
|
|
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),v1&&(n=new RegExp("^"+v+"$(?!\\s)",g)),g1&&(r=s.lastIndex),i=Be(Sh,p?n:s,y),p?i?(i.input=h1(i.input,m),i[0]=h1(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:g1&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),v1&&i&&i.length>1&&Be(HU,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=a0(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var ef=Z2;at({target:"RegExp",proto:!0,forced:/./.exec!==ef},{exec:ef});var fw=Function.prototype,b8=fw.apply,qU=fw.bind,$8=fw.call,dw=typeof Reflect=="object"&&Reflect.apply||(qU?$8.bind(b8):function(){return $8.apply(b8,arguments)}),GU=st("species"),m1=RegExp.prototype,pw=function(e,t,n,r){var i=st(e),o=!je(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!je(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[GU]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=re(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=re(l),v=c.exec;return v===ef||v===m1.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});pn(String.prototype,e,s[0]),pn(m1,i,s[1])}r&&sr(m1[i],"sham",!0)},KU=ZO.charAt,hw=function(e,t,n){return t+(n?KU(e,t).length:1)},YU=Math.floor,y1=re("".charAt),XU=re("".replace),b1=re("".slice),JU=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ZU=/\$([$&'`]|\d{1,2})/g,QU=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=ZU;return i!==void 0&&(i=Ao(i),s=JU),XU(o,s,function(l,c){var f;switch(y1(c,0)){case"$":return"$";case"&":return e;case"`":return b1(t,0,n);case"'":return b1(t,a);case"<":f=i[b1(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=YU(d/10);return p===0?l:p<=u?r[p-1]===void 0?y1(c,1):r[p-1]+y1(c,1):l}f=r[d-1]}return f===void 0?"":f})},eV=U.TypeError,tf=function(e,t){var n=e.exec;if(Ue(n)){var r=Be(n,e,t);return r!==null&&mt(r),r}if(lr(e)==="RegExp")return Be(ef,e,t);throw eV("RegExp#exec called on incompatible receiver")},Q2=st("replace"),tV=Math.max,nV=Math.min,rV=re([].concat),$1=re([].push),w8=re("".indexOf),E8=re("".slice),iV="a".replace(/./,"$0")==="$0",C8=!!/./[Q2]&&/./[Q2]("a","$0")==="";pw("replace",function(e,t,n){var r=C8?"$":"$0";return[function(i,o){var a=Xn(this),u=i==null?void 0:ka(i,Q2);return u?Be(u,i,a,o):Be(t,Ge(a),i,o)},function(i,o){var a=mt(this),u=Ge(i);if(typeof o=="string"&&w8(o,r)===-1&&w8(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ue(o);l||(o=Ge(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=tf(a,u);if(p===null||($1(d,p),!c))break;Ge(p[0])===""&&(a.lastIndex=hw(u,_s(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=Ge((p=d[y])[0]),$=tV(nV(Uf(p.index),u.length),0),w=[],C=1;C<p.length;C++)$1(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=rV([h],w,$,u);D!==void 0&&$1(A,D);var I=Ge(dw(o,void 0,A))}else I=QU(h,u,$,w,D,o);$>=m&&(v+=E8(u,m,$)+I,m=$+h.length)}return v+E8(u,m)}]},!!je(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!iV||C8);/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var eb=function(e,t){return eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},eb(e,t)};function Ns(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}eb(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Wn=function(){return Wn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wn.apply(this,arguments)};function zn(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 Oe(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tb(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var oV=0,D8=function(){this.id=""+oV++},aV=tn.set,uV=tn.getterFor("Array Iterator"),mc=uw(Array,"Array",function(e,t){aV(this,{type:"Array Iterator",target:Oo(e),index:0,kind:t})},function(){var e=uV(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");ms.Arguments=ms.Array,xc("keys"),xc("values"),xc("entries");var bs=function(e,t,n){for(var r in t)pn(e,r,t[r],n);return e},sV=U.Array,lV=Math.max,nb=function(e,t,n){for(var r=Ga(e),i=vs(t,r),o=vs(n===void 0?r:n,r),a=sV(lV(o-i,0)),u=0;i<o;i++,u++)Qc(a,u,e[i]);return a.length=u,a},S8=Jc.f,x8=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],cV={f:function(e){return x8&&lr(e)=="Window"?function(t){try{return S8(t)}catch{return nb(x8)}}(e):S8(Oo(e))}},A8=je(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Md=Object.isExtensible,ua=je(function(){Md(1)})||A8?function(e){return!!Ye(e)&&(!A8||lr(e)!="ArrayBuffer")&&(!Md||Md(e))}:Md,fV=!je(function(){return Object.isExtensible(Object.preventExtensions({}))}),l0=Hf(function(e){var t=gr.f,n=!1,r=K$("meta"),i=0,o=function(u){t(u,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var u=Jc.f,s=re([].splice),l={};l[r]=1,u(l).length&&(Jc.f=function(c){for(var f=u(c),d=0,p=f.length;d<p;d++)if(f[d]===r){s(f,d,1);break}return f},at({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:cV.f}))},fastKey:function(u,s){if(!Ye(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!vt(u,r)){if(!ua(u))return"F";if(!s)return"E";o(u)}return u[r].objectID},getWeakData:function(u,s){if(!vt(u,r)){if(!ua(u))return!0;if(!s)return!1;o(u)}return u[r].weakData},onFreeze:function(u){return fV&&n&&ua(u)&&!vt(u,r)&&o(u),u}};n0[r]=!0}),dV=U.TypeError,Ip=function(e,t){this.stopped=e,this.result=t},O8=Ip.prototype,nf=function(e,t,n){var r,i,o,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=_a(t,c),v=function(y){return r&&K2(r,"normal",y),new Ip(!0,y)},m=function(y){return f?(mt(y),p?g(y[0],y[1],v):g(y[0],y[1])):p?g(y,v):g(y)};if(d)r=e;else{if(!(i=iw(e)))throw dV(Qg(e)+" is not iterable");if(KO(i)){for(o=0,a=Ga(e);a>o;o++)if((u=m(e[o]))&&Ta(O8,u))return u;return new Ip(!1)}r=YO(e,i)}for(s=r.next;!(l=Be(s,r)).done;){try{u=m(l.value)}catch(y){K2(r,"throw",y)}if(typeof u=="object"&&u&&Ta(O8,u))return u}return new Ip(!1)},pV=U.TypeError,c0=function(e,t){if(Ta(t,e))return e;throw pV("Incorrect invocation")},tB=function(e,t,n){var r,i;return ys&&Ue(r=t.constructor)&&r!==n&&Ye(i=r.prototype)&&i!==n.prototype&&ys(e,i),e},nB=function(e,t,n){var r=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=r?"set":"add",a=U[e],u=a&&a.prototype,s=a,l={},c=function(m){var y=re(u[m]);pn(u,m,m=="add"?function(h){return y(this,h===0?0:h),this}:m=="delete"?function(h){return!(i&&!Ye(h))&&y(this,h===0?0:h)}:m=="get"?function(h){return i&&!Ye(h)?void 0:y(this,h===0?0:h)}:m=="has"?function(h){return!(i&&!Ye(h))&&y(this,h===0?0:h)}:function(h,$){return y(this,h===0?0:h,$),this})};if(Zc(e,!Ue(a)||!(i||u.forEach&&!je(function(){new a().entries().next()}))))s=n.getConstructor(t,e,r,o),l0.enable();else if(Zc(e,!0)){var f=new s,d=f[o](i?{}:-0,1)!=f,p=je(function(){f.has(1)}),g=ow(function(m){new a(m)}),v=!i&&je(function(){for(var m=new a,y=5;y--;)m[o](y,y);return!m.has(-0)});g||((s=t(function(m,y){c0(m,u);var h=tB(new a,m,s);return y!=null&&nf(y,h[o],{that:h,AS_ENTRIES:r}),h})).prototype=u,u.constructor=s),(p||v)&&(c("delete"),c("has"),r&&c("get")),(v||d)&&c(o),i&&u.clear&&delete u.clear}return l[e]=s,at({global:!0,forced:s!=a},l),Dh(s,e),i||n.setStrong(s,e,r),s},zd=l0.getWeakData,hV=tn.set,gV=tn.getterFor,vV=Ps.find,mV=Ps.findIndex,yV=re([].splice),bV=0,Hd=function(e){return e.frozen||(e.frozen=new rB)},rB=function(){this.entries=[]},w1=function(e,t){return vV(e.entries,function(n){return n[0]===t})};rB.prototype={get:function(e){var t=w1(this,e);if(t)return t[1]},has:function(e){return!!w1(this,e)},set:function(e,t){var n=w1(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=mV(this.entries,function(n){return n[0]===e});return~t&&yV(this.entries,t,1),!!~t}};var $l,iB={getConstructor:function(e,t,n,r){var i=e(function(s,l){c0(s,o),hV(s,{type:t,id:bV++,frozen:void 0}),l!=null&&nf(l,s[r],{that:s,AS_ENTRIES:n})}),o=i.prototype,a=gV(t),u=function(s,l,c){var f=a(s),d=zd(mt(l),!0);return d===!0?Hd(f).set(l,c):d[f.id]=c,s};return bs(o,{delete:function(s){var l=a(this);if(!Ye(s))return!1;var c=zd(s);return c===!0?Hd(l).delete(s):c&&vt(c,l.id)&&delete c[l.id]},has:function(s){var l=a(this);if(!Ye(s))return!1;var c=zd(s);return c===!0?Hd(l).has(s):c&&vt(c,l.id)}}),bs(o,n?{get:function(s){var l=a(this);if(Ye(s)){var c=zd(s);return c===!0?Hd(l).get(s):c?c[l.id]:void 0}},set:function(s,l){return u(this,s,l)}}:{add:function(s){return u(this,s,!0)}}),i}},Ud=tn.enforce,$V=!U.ActiveXObject&&"ActiveXObject"in U,oB=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},wV=nB("WeakMap",oB,iB);if(_O&&$V){$l=iB.getConstructor(oB,"WeakMap",!0),l0.enable();var wl=wV.prototype,B8=re(wl.delete),Vd=re(wl.has),F8=re(wl.get),T8=re(wl.set);bs(wl,{delete:function(e){if(Ye(e)&&!ua(e)){var t=Ud(this);return t.frozen||(t.frozen=new $l),B8(this,e)||t.frozen.delete(e)}return B8(this,e)},has:function(e){if(Ye(e)&&!ua(e)){var t=Ud(this);return t.frozen||(t.frozen=new $l),Vd(this,e)||t.frozen.has(e)}return Vd(this,e)},get:function(e){if(Ye(e)&&!ua(e)){var t=Ud(this);return t.frozen||(t.frozen=new $l),Vd(this,e)?F8(this,e):t.frozen.get(e)}return F8(this,e)},set:function(e,t){if(Ye(e)&&!ua(e)){var n=Ud(this);n.frozen||(n.frozen=new $l),Vd(this,e)?T8(this,e,t):n.frozen.set(e,t)}else T8(this,e,t);return this}})}var E1=st("iterator"),k8=st("toStringTag"),C1=mc.values,aB=function(e,t){if(e){if(e[E1]!==C1)try{sr(e,E1,C1)}catch{e[E1]=C1}if(e[k8]||sr(e,k8,t),$h[t]){for(var n in mc)if(e[n]!==mc[n])try{sr(e,n,mc[n])}catch{e[n]=mc[n]}}}};for(var D1 in $h)aB(U[D1]&&U[D1].prototype,D1);aB(NO,"DOMTokenList");var rb=new WeakMap,ib=new WeakMap,gw=new WeakMap,f0=new WeakMap,ob=new WeakMap,xh=new WeakMap,vw=new WeakMap,ab=new WeakMap,Rp=new WeakMap,_8=new WeakMap,P8=new WeakMap,N8=new WeakMap,I8=new WeakMap,rf=new WeakMap,$s=new WeakMap,mw=new WeakMap,d0=new WeakMap,yw=new WeakMap,p0=new WeakMap,jp=new WeakMap,uB=new WeakMap,da=new WeakMap,ub=new WeakMap,R8=new WeakMap,S1=new WeakMap,EV=Ps.find,j8=!0;"find"in[]&&Array(1).find(function(){j8=!1}),at({target:"Array",proto:!0,forced:j8},{find:function(e){return EV(this,e,arguments.length>1?arguments[1]:void 0)}}),xc("find"),at({global:!0},{globalThis:U});const CV=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];fh&&(O.fn.css=fh),zr&&(O.fn.append=zr),as&&(O.fn.addClass=as),us&&(O.fn.removeClass=us),ss&&(O.fn.hasClass=ss),Mr&&(O.fn.on=Mr),vo&&(O.fn.focus=vo),jr&&(O.fn.attr=jr),uh&&(O.fn.removeAttr=uh),cs&&(O.fn.hide=cs),ch&&(O.fn.show=ch),t6&&(O.fn.offset=t6),sh&&(O.fn.width=sh),lh&&(O.fn.height=lh),hh&&(O.fn.parent=hh),gh&&(O.fn.parents=gh),r6&&(O.fn.is=r6),ls&&(O.fn.dataset=ls),Lr&&(O.fn.val=Lr),ph&&(O.fn.text=ph),go&&(O.fn.html=go),ds&&(O.fn.children=ds),ps&&(O.fn.remove=ps),fs&&(O.fn.find=fs),dh&&(O.fn.each=dh),hs&&(O.fn.empty=hs);var Zi,bw=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},nr=function(e){return Pa(e)&&e.nodeType===1},Pa=function(e){var t=bw(e);return!!t&&e instanceof t.Node},L8=function(e){var t=e&&e.anchorNode&&bw(e.anchorNode);return!!t&&e instanceof t.Selection},sB=function(e){return Pa(e)&&e.nodeType===3},$w=function(e){var t,n,r;return(t=window.document.getElementById(e))!==null&&t!==void 0?t:((r=(n=window.document.activeElement)===null||n===void 0?void 0:n.shadowRoot)===null||r===void 0?void 0:r.getElementById(e))||null},lB=function(e,t,n){for(var r,i=e.childNodes,o=i[t],a=t,u=!1,s=!1;(Pa(r=o)&&r.nodeType===8||nr(o)&&o.childNodes.length===0||nr(o)&&o.getAttribute("contenteditable")==="false")&&(!u||!s);)a>=i.length?(u=!0,a=t-1,n="backward"):a<0?(s=!0,a=t+1,n="forward"):(o=i[a],t=a,a+=n==="forward"?1:-1);return[o,t]},DV=function(e,t,n){return Oe(lB(e,t,n),1)[0]},SV=function e(t){var n,r,i="";if(sB(t)&&t.nodeValue)return t.nodeValue;if(nr(t)){try{for(var o=zn(Array.from(t.childNodes)),a=o.next();!a.done;a=o.next())i+=e(a.value)}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}var u=getComputedStyle(t).getPropertyValue("display");u!=="block"&&u!=="list"&&u!=="table-row"&&t.tagName!=="BR"||(i+=`
|
|
`)}return i};function cB(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||cB(i,t)}}function M8(e){if(e.length===0)return"";var t=e[0];return t.nodeType!==Zi.ELEMENT_NODE?"":t.tagName.toLowerCase()}(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Zi||(Zi={})),globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var sb=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Ac=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var El=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),xV=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),AV=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),lb=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/.*QQBrowser/.test(navigator.userAgent);var Cl=!AV&&!xV&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",x={getWindow:function(e){var t=uB.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=jp.get(t);return n||(n=new D8,jp.set(t,n)),n},setNewKey:function(e){var t=new D8;jp.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=$s.get(r);if(i==null){if(E.isEditor(r))return n;break}var o=rf.get(r);if(o==null)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=x.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:t.ownerDocument},getParentNode:function(e,t){return $s.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&r!=null;){var i=x.getParentNode(e,r);if(i==null)break;n.push(i),r=i}return n},getTopNode:function(e,t){var n=[x.findPath(e,t)[0]];return W.get(e,n)},toDOMNode:function(e,t){var n;if(E.isEditor(t))n=mw.get(e);else{var r=x.findKey(e,t);n=yw.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){n===void 0&&(n={});var r,i=n.editable,o=i!==void 0&&i,a=x.toDOMNode(e,e);try{r=nr(t)?t:t.parentElement}catch(u){if(!u.message.includes('Permission denied to access property "nodeType"'))throw u}return!!r&&r.closest("[data-slate-editor]")===a&&(!o||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=R.isBackward(t),o=x.toDOMPoint(e,n),a=R.isCollapsed(t)?o:x.toDOMPoint(e,r),u=x.getWindow(e).document.createRange(),s=Oe(i?a:o,2),l=s[0],c=s[1],f=Oe(i?o:a,2),d=f[0],p=f[1],g=!!(nr(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),v=!!(nr(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,g?1:c),u.setEnd(d,v?1:p),u},toDOMPoint:function(e,t){var n,r,i,o=Oe(E.node(e,t.path),1)[0],a=x.toDOMNode(e,o);E.void(e,{at:t})&&(t={path:t.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=zn(u),c=l.next();!c.done;c=l.next()){var f=c.value,d=f.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,g=f.getAttribute("data-slate-length"),v=s+(g==null?p:parseInt(g,10));if(t.offset<=v){i=[d,Math.min(p,Math.max(0,t.offset-s))];break}s=v}}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return i},toSlateNode:function(e,t){var n=nr(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?d0.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: "+n);return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,i=t.target;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var o,a=x.toSlateNode(e,t.target),u=x.findPath(e,a);if(E.isVoid(e,a)){var s=i.getBoundingClientRect(),l=e.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=E.point(e,u,{edge:l?"start":"end"}),f=l?E.before(e,c):E.after(e,c);if(f)return E.range(e,f)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)o=d.caretRangeFromPoint(n,r);else{var p=d.caretPositionFromPoint(n,r);p&&((o=d.createRange()).setStart(p.offsetNode,p.offset),o.setEnd(p.offsetNode,p.offset))}if(!o)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return x.toSlateRange(e,o,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,i,o,a,u,s=n.exactMatch,l=n.suppressThrow;if((L8(t)?t.anchorNode:t.startContainer)&&(L8(t)?(r=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,u=lb&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,u=t.collapsed)),r==null||o==null||i==null||a==null)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var c=x.toSlatePoint(e,[r,i],{exactMatch:s,suppressThrow:l});if(!c)return null;var f=u?c:x.toSlatePoint(e,[o,a],{exactMatch:s,suppressThrow:l});if(!f)return null;var d={anchor:c,focus:f};return R.isExpanded(d)&&R.isForward(d)&&nr(o)&&E.void(e,{at:d.focus,mode:"highest"})&&(d=E.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,n){var r,i=n.exactMatch,o=n.suppressThrow,a=Oe(i?t:function(h){var $,w=Oe(h,2),C=w[0],D=w[1];if(nr(C)&&C.childNodes.length){var A=D===C.childNodes.length,I=A?D-1:D;for(C=($=Oe(lB(C,I,A?"backward":"forward"),2))[0],A=(I=$[1])<D;nr(C)&&C.childNodes.length;){var M=A?C.childNodes.length-1:0;C=DV(C,M,A?"backward":"forward")}D=A&&C.textContent!=null?C.textContent.length:0}return[C,D]}(t),2),u=a[0],s=a[1],l=u.parentNode,c=null,f=0;if(l){var d=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),g=null;if(p){c=p.closest('[data-slate-node="text"]');var v=x.getWindow(e).document.createRange();v.setStart(c,0),v.setEnd(u,s);var m=v.cloneContents();tb(tb([],Oe(Z5(m.querySelectorAll("[data-slate-zero-width]")))),Oe(Z5(m.querySelectorAll("[contenteditable=false]")))).forEach(function(h){h.parentNode.removeChild(h)}),f=m.textContent.length,g=c}else d&&((p=d.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),f=(g=p).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach(function(h){f-=h.textContent.length})):f=1);g&&f===g.textContent.length&&(l.hasAttribute("data-slate-zero-width")||Ac&&((r=g.textContent)===null||r===void 0?void 0:r.endsWith(`
|
|
`)))&&f--}if(!c){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var y=x.toSlateNode(e,c);return{path:x.findPath(e,y),offset:f}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return E.hasPath(e,n.path)&&E.hasPath(e,r.path)},getNodeType:function(e){return te.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return W.string(t)}).join("")},getSelectedElems:function(e){var t,n,r=[],i=E.nodes(e,{universal:!0});try{for(var o=zn(i),a=o.next();!a.done;a=o.next()){var u=Oe(a.value,1)[0];te.isElement(u)&&r.push(u)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Oe(E.nodes(e,{match:function(o){return n.checkNodeType(o,t)},universal:!0}),1),i=r[0];return i==null?null:i[0]},getSelectedTextNode:function(e){var t=Oe(E.nodes(e,{match:function(r){return X.isText(r)},universal:!0}),1),n=t[0];return n==null?null:n[0]},isNodeSelected:function(e,t){var n=Oe(E.nodes(e,{match:function(i){return i===t},universal:!0}),1),r=n[0];return r!=null&&Oe(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(E.isEnd(e,n.anchor,t)||E.isEnd(e,n.focus,t))},getTextarea:function(e){var t=rb.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return f0.get(e)||null},getHoverbar:function(e){return xh.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(typeof n!="number"||n<=0)return 1/0;var i=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&r&&r(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,i,o=x.getTextarea(e).$textArea,a=o==null?void 0:o[0].childNodes;if(a)try{for(var u=zn(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(l.nodeType!==3)break;l.remove()}}catch(v){t={error:v}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var c=E.nodes(e,{match:function(v){return!(!te.isElement(v)||e.isInline(v))},universal:!0});try{for(var f=zn(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(p!=null){var g=p[0];cB(x.toDOMNode(e,g),function(v,m){var y=O(m);y.attr("data-slate-string")||y.attr("data-slate-zero-width")||m.removeChild(v)})}}}catch(v){r={error:v}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.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 t,n,r=E.nodes(e,{match:function(u){return e.isVoid(u)}}),i=0;try{for(var o=zn(r),a=o.next();!a.done;a=o.next())a.value,i++}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||R.isExpanded(t))return!1;var n=x.getSelectedNodeByType(e,"paragraph");if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===""||void 0)},isEmptyPath:function(e,t){var n=E.node(e,t);if(n==null)return!1;var r=Oe(n,1)[0].children;return r.length===1&&r[0].text===""}},OV=1,fB={},of={};function BV(e,t){var n=e.key,r=e.factory,i=e.config,o=Wn(Wn({},i),t||{});if(of[n]!=null)throw new Error("Duplicated key '"+n+"' in menu items");of[n]=r,function(a,u){u!=null&&(fB[a]=u)}(n,o)}var z8=st("species"),ww=function(e){var t=qa(e),n=gr.f;Nt&&t&&!t[z8]&&n(t,z8,{configurable:!0,get:function(){return this}})},FV=gr.f,H8=l0.fastKey,U8=tn.set,x1=tn.getterFor,TV={getConstructor:function(e,t,n,r){var i=e(function(l,c){c0(l,o),U8(l,{type:t,index:a0(null),first:void 0,last:void 0,size:0}),Nt||(l.size=0),c!=null&&nf(c,l[r],{that:l,AS_ENTRIES:n})}),o=i.prototype,a=x1(t),u=function(l,c,f){var d,p,g=a(l),v=s(l,c);return v?v.value=f:(g.last=v={index:p=H8(c,!0),key:c,value:f,previous:d=g.last,next:void 0,removed:!1},g.first||(g.first=v),d&&(d.next=v),Nt?g.size++:l.size++,p!=="F"&&(g.index[p]=v)),l},s=function(l,c){var f,d=a(l),p=H8(c);if(p!=="F")return d.index[p];for(f=d.first;f;f=f.next)if(f.key==c)return f};return bs(o,{clear:function(){for(var l=a(this),c=l.index,f=l.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;l.first=l.last=void 0,Nt?l.size=0:this.size=0},delete:function(l){var c=this,f=a(c),d=s(c,l);if(d){var p=d.next,g=d.previous;delete f.index[d.index],d.removed=!0,g&&(g.next=p),p&&(p.previous=g),f.first==d&&(f.first=p),f.last==d&&(f.last=g),Nt?f.size--:c.size--}return!!d},forEach:function(l){for(var c,f=a(this),d=_a(l,arguments.length>1?arguments[1]:void 0);c=c?c.next:f.first;)for(d(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(l){return!!s(this,l)}}),bs(o,n?{get:function(l){var c=s(this,l);return c&&c.value},set:function(l,c){return u(this,l===0?0:l,c)}}:{add:function(l){return u(this,l=l===0?0:l,l)}}),Nt&&FV(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=x1(t),o=x1(r);uw(e,t,function(a,u){U8(this,{type:r,target:a,state:i(a),kind:u,last:void 0})},function(){for(var a=o(this),u=a.kind,s=a.last;s&&s.removed;)s=s.previous;return a.target&&(a.last=s=s?s.next:a.state.first)?u=="keys"?{value:s.key,done:!1}:u=="values"?{value:s.value,done:!1}:{value:[s.key,s.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),ww(t)}};nB("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},TV);var kV=Ps.filter,_V=u0("filter");at({target:"Array",proto:!0,forced:!_V},{filter:function(e){return kV(this,e,arguments.length>1?arguments[1]:void 0)}});var cb=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,V8=re("".replace),Ah="["+cb+"]",PV=RegExp("^"+Ah+Ah+"*"),NV=RegExp(Ah+Ah+"*$"),A1=function(e){return function(t){var n=Ge(Xn(t));return 1&e&&(n=V8(n,PV,"")),2&e&&(n=V8(n,NV,"")),n}},IV={start:A1(1),end:A1(2),trim:A1(3)},RV=ks.PROPER,jV=IV.trim;at({target:"String",proto:!0,forced:function(e){return je(function(){return!!cb[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||RV&&cb[e].name!==e})}("trim")},{trim:function(){return jV(this)}});var Ew=[];function LV(e){Ew.push(e)}var dB={};function MV(e){var t=e.type,n=e.elemToHtml;dB[t||""]=n}function zV(e,t,n){var r=n.isInline(e)?"span":"div";return"<"+r+">"+t+"</"+r+">"}function HV(e,t){var n=e.type,r=n===void 0?"":n,i=e.children,o=i===void 0?[]:i,a=E.isVoid(t,e),u="";a||(u=o.map(function(c){return AB(c,t)}).join(""));var s=function(c){return dB[c]||zV}(r),l=s(e,u,t);return a||Ew.forEach(function(c){return l=c(e,l)}),l}var af,cu,W8,O1,Oh=U.Promise,UV=U.TypeError,VV=st("species"),pB=function(e,t){var n,r=mt(e).constructor;return r===void 0||(n=mt(r)[VV])==null?t:function(i){if(o0(i))return i;throw UV(Qg(i)+" is not a constructor")}(n)},hB=re([].slice),gB=/(?:ipad|iphone|ipod).*applewebkit/i.test(Gu),Qi=lr(U.process)=="process",fb=U.setImmediate,db=U.clearImmediate,WV=U.process,B1=U.Dispatch,qV=U.Function,q8=U.MessageChannel,GV=U.String,F1=0,Oc={};try{af=U.location}catch{}var Cw=function(e){if(vt(Oc,e)){var t=Oc[e];delete Oc[e],t()}},T1=function(e){return function(){Cw(e)}},G8=function(e){Cw(e.data)},K8=function(e){U.postMessage(GV(e),af.protocol+"//"+af.host)};fb&&db||(fb=function(e){var t=hB(arguments,1);return Oc[++F1]=function(){dw(Ue(e)?e:qV(e),void 0,t)},cu(F1),F1},db=function(e){delete Oc[e]},Qi?cu=function(e){WV.nextTick(T1(e))}:B1&&B1.now?cu=function(e){B1.now(T1(e))}:q8&&!gB?(O1=(W8=new q8).port2,W8.port1.onmessage=G8,cu=_a(O1.postMessage,O1)):U.addEventListener&&Ue(U.postMessage)&&!U.importScripts&&af&&af.protocol!=="file:"&&!je(K8)?(cu=K8,U.addEventListener("message",G8,!1)):cu="onreadystatechange"in Xc("script")?function(e){W2.appendChild(Xc("script")).onreadystatechange=function(){W2.removeChild(this),Cw(e)}}:function(e){setTimeout(T1(e),0)});var Dl,ra,Bc,Iu,k1,_1,P1,Y8,vB={set:fb,clear:db},KV=/ipad|iphone|ipod/i.test(Gu)&&U.Pebble!==void 0,YV=/web0s(?!.*chrome)/i.test(Gu),XV=Vf.f,N1=vB.set,X8=U.MutationObserver||U.WebKitMutationObserver,J8=U.document,Z8=U.process,Wd=U.Promise,Q8=XV(U,"queueMicrotask"),mB=Q8&&Q8.value;mB||(Dl=function(){var e,t;for(Qi&&(e=Z8.domain)&&e.exit();ra;){t=ra.fn,ra=ra.next;try{t()}catch(n){throw ra?Iu():Bc=void 0,n}}Bc=void 0,e&&e.enter()},gB||Qi||YV||!X8||!J8?!KV&&Wd&&Wd.resolve?((P1=Wd.resolve(void 0)).constructor=Wd,Y8=_a(P1.then,P1),Iu=function(){Y8(Dl)}):Qi?Iu=function(){Z8.nextTick(Dl)}:(N1=_a(N1,U),Iu=function(){N1(Dl)}):(k1=!0,_1=J8.createTextNode(""),new X8(Dl).observe(_1,{characterData:!0}),Iu=function(){_1.data=k1=!k1}));var I1,eC,yB,tC,bB=mB||function(e){var t={fn:e,next:void 0};Bc&&(Bc.next=t),ra||(ra=t,Iu()),Bc=t},JV=function(e){var t,n;this.promise=new e(function(r,i){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=i}),this.resolve=mo(t),this.reject=mo(n)},Dw={f:function(e){return new JV(e)}},pb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},ZV=typeof window=="object",$B=vB.set,QV=st("species"),xr="Promise",nC=tn.getterFor(xr),eW=tn.set,tW=tn.getterFor(xr),Zo=Oh&&Oh.prototype,kr=Oh,Sl=Zo,wB=U.TypeError,hb=U.document,Sw=U.process,Yu=Dw.f,nW=Yu,rW=!!(hb&&hb.createEvent&&U.dispatchEvent),EB=Ue(U.PromiseRejectionEvent),CB=!1,Fc=Zc(xr,function(){var e=t0(kr),t=e!==String(kr);if(!t&&Yc===66)return!0;if(Yc>=51&&/native code/.test(e))return!1;var n=new kr(function(i){i(1)}),r=function(i){i(function(){},function(){})};return(n.constructor={})[QV]=r,!(CB=n.then(function(){})instanceof r)||!t&&ZV&&!EB}),iW=Fc||!ow(function(e){kr.all(e).catch(function(){})}),DB=function(e){var t;return!(!Ye(e)||!Ue(t=e.then))&&t},xw=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;bB(function(){for(var r=e.value,i=e.state==1,o=0;n.length>o;){var a,u,s,l=n[o++],c=i?l.ok:l.fail,f=l.resolve,d=l.reject,p=l.domain;try{c?(i||(e.rejection===2&&aW(e),e.rejection=1),c===!0?a=r:(p&&p.enter(),a=c(r),p&&(p.exit(),s=!0)),a===l.promise?d(wB("Promise-chain cycle")):(u=DB(a))?Be(u,a,f,d):f(a)):d(r)}catch(g){p&&!s&&p.exit(),d(g)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&oW(e)})}},SB=function(e,t,n){var r,i;rW?((r=hb.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),U.dispatchEvent(r)):r={promise:t,reason:n},!EB&&(i=U["on"+e])?i(r):e==="unhandledrejection"&&function(o,a){var u=U.console;u&&u.error&&(arguments.length==1?u.error(o):u.error(o,a))}("Unhandled promise rejection",n)},oW=function(e){Be($B,U,function(){var t,n=e.facade,r=e.value;if(rC(e)&&(t=pb(function(){Qi?Sw.emit("unhandledRejection",r,n):SB("unhandledrejection",n,r)}),e.rejection=Qi||rC(e)?2:1,t.error))throw t.value})},rC=function(e){return e.rejection!==1&&!e.parent},aW=function(e){Be($B,U,function(){var t=e.facade;Qi?Sw.emit("rejectionHandled",t):SB("rejectionhandled",t,e.value)})},Uu=function(e,t,n){return function(r){e(t,r,n)}},Xu=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,xw(e,!0))},gb=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw wB("Promise can't be resolved itself");var r=DB(t);r?bB(function(){var i={done:!1};try{Be(r,t,Uu(gb,i,e),Uu(Xu,i,e))}catch(o){Xu(i,o,e)}}):(e.value=t,e.state=1,xw(e,!1))}catch(i){Xu({done:!1},i,e)}}};if(Fc&&(Sl=(kr=function(e){c0(this,Sl),mo(e),Be(I1,this);var t=nC(this);try{e(Uu(gb,t),Uu(Xu,t))}catch(n){Xu(t,n)}}).prototype,(I1=function(e){eW(this,{type:xr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=bs(Sl,{then:function(e,t){var n=tW(this),r=n.reactions,i=Yu(pB(this,kr));return i.ok=!Ue(e)||e,i.fail=Ue(t)&&t,i.domain=Qi?Sw.domain:void 0,n.parent=!0,r[r.length]=i,n.state!=0&&xw(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),eC=function(){var e=new I1,t=nC(e);this.promise=e,this.resolve=Uu(gb,t),this.reject=Uu(Xu,t)},Dw.f=Yu=function(e){return e===kr||e===yB?new eC(e):nW(e)},Ue(Oh)&&Zo!==Object.prototype)){tC=Zo.then,CB||(pn(Zo,"then",function(e,t){var n=this;return new kr(function(r,i){Be(tC,n,r,i)}).then(e,t)},{unsafe:!0}),pn(Zo,"catch",Sl.catch,{unsafe:!0}));try{delete Zo.constructor}catch{}ys&&ys(Zo,Sl)}at({global:!0,wrap:!0,forced:Fc},{Promise:kr}),Dh(kr,xr,!1),ww(xr),yB=qa(xr),at({target:xr,stat:!0,forced:Fc},{reject:function(e){var t=Yu(this);return Be(t.reject,void 0,e),t.promise}}),at({target:xr,stat:!0,forced:Fc},{resolve:function(e){return function(t,n){if(mt(t),Ye(n)&&n.constructor===t)return n;var r=Dw.f(t);return(0,r.resolve)(n),r.promise}(this,e)}}),at({target:xr,stat:!0,forced:iW},{all:function(e){var t=this,n=Yu(t),r=n.resolve,i=n.reject,o=pb(function(){var a=mo(t.resolve),u=[],s=0,l=1;nf(e,function(c){var f=s++,d=!1;l++,Be(a,t,c).then(function(p){d||(d=!0,u[f]=p,--l||r(u))},i)}),--l||r(u)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=Yu(t),r=n.reject,i=pb(function(){var o=mo(t.resolve);nf(e,function(a){Be(o,t,a).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var fu=s0.UNSUPPORTED_Y,uW=Math.min,xB=[].push,sW=re(/./.exec),du=re(xB),xl=re("".slice);function Jn(e){Promise.resolve().then(e)}function AB(e,t){return te.isElement(e)?HV(e,t):function(n,r){var i=n.text;if(i==null)throw new Error("Current node is not slate Text "+JSON.stringify(n));var o=i;o=function(s){return s.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(o);var a=x.getParentsNodes(r,n).some(function(s){return x.getNodeType(s)==="pre"});if(a||(o=o.replace(/\r\n|\r|\n/g,"<br>")),a&&(o=o.replace(/ /g," ")),o===""){var u=x.getParentNode(null,n);if(!u||u.children.length!==0)return o;o="<br>"}return Ew.forEach(function(s){return o=s(n,o)}),o}(e,t)}function OB(e){return"w-e-element-"+e}pw("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a=Ge(Xn(this)),u=o===void 0?4294967295:o>>>0;if(u===0)return[];if(i===void 0)return[a];if(!tw(i))return Be(t,a,i,u);for(var s,l,c,f=[],d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),p=0,g=new RegExp(i.source,d+"g");(s=Be(ef,g,a))&&!((l=g.lastIndex)>p&&(du(f,xl(a,p,s.index)),s.length>1&&s.index<a.length&&dw(xB,f,nb(s,1)),c=s[0].length,p=l,f.length>=u));)g.lastIndex===s.index&&g.lastIndex++;return p===a.length?!c&&sW(g,"")||du(f,""):du(f,xl(a,p)),f.length>u?nb(f,0,u):f}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Be(t,this,i,o)}:t,[function(i,o){var a=Xn(this),u=i==null?void 0:ka(i,e);return u?Be(u,i,a,o):Be(r,Ge(a),i,o)},function(i,o){var a=mt(this),u=Ge(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=pB(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(fu?"g":"y"),d=new l(fu?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return tf(d,u)===null?[u]:[];for(var g=0,v=0,m=[];v<u.length;){d.lastIndex=fu?0:v;var y,h=tf(d,fu?xl(u,v):u);if(h===null||(y=uW(_s(d.lastIndex+(fu?v:0)),u.length))===g)v=hw(u,v,c);else{if(du(m,xl(u,g,v)),m.length===p)return m;for(var $=1;$<=h.length-1;$++)if(du(m,h[$]),m.length===p)return m;v=g=y}}return du(m,xl(u,g)),m}]},!!je(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),fu);var iC=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},oC=function(e,t,n){var r=x.toDOMRange(e,t).getBoundingClientRect(),i=x.toDOMRange(e,n).getBoundingClientRect();return iC(r,i)&&iC(i,r)},BB=["span","b","strong","i","em","s","strike","u","font","sub","sup"],FB=[];function lW(e){FB.push(e)}var Aw=[];function cW(e){Aw.push(e)}var Bh={};function fW(e){var t=e.selector,n=e.parseElemHtml;Bh[t]=n}var dW=gr.f,pW=Jc.f,hW=tn.enforce,gW=st("match"),ai=U.RegExp,Ru=ai.prototype,vW=U.SyntaxError,mW=re(ew),yW=re(Ru.exec),qd=re("".charAt),aC=re("".replace),uC=re("".indexOf),bW=re("".slice),$W=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pa=/a/g,R1=/a/g,wW=new ai(pa)!==pa,TB=s0.MISSED_STICKY,EW=s0.UNSUPPORTED_Y,CW=Nt&&(!wW||TB||lw||cw||je(function(){return R1[gW]=!1,ai(pa)!=pa||ai(R1)==R1||ai(pa,"i")!="/a/i"}));if(Zc("RegExp",CW)){for(var Oi=function(e,t){var n,r,i,o,a,u,s=Ta(Ru,this),l=tw(e),c=t===void 0,f=[],d=e;if(!s&&l&&c&&e.constructor===Oi)return e;if((l||Ta(Ru,e))&&(e=e.source,c&&(t="flags"in d?d.flags:mW(d))),e=e===void 0?"":Ge(e),t=t===void 0?"":Ge(t),d=e,lw&&"dotAll"in pa&&(r=!!t&&uC(t,"s")>-1)&&(t=aC(t,/s/g,"")),n=t,TB&&"sticky"in pa&&(i=!!t&&uC(t,"y")>-1)&&EW&&(t=aC(t,/y/g,"")),cw&&(o=function(p){for(var g,v=p.length,m=0,y="",h=[],$={},w=!1,C=!1,D=0,A="";m<=v;m++){if((g=qd(p,m))==="\\")g+=qd(p,++m);else if(g==="]")w=!1;else if(!w)switch(!0){case g==="[":w=!0;break;case g==="(":yW($W,bW(p,m+1))&&(m+=2,C=!0),y+=g,D++;continue;case(g===">"&&C):if(A===""||vt($,A))throw new vW("Invalid capture group name");$[A]=!0,h[h.length]=[A,D],C=!1,A="";continue}C?A+=g:y+=g}return[y,h]}(e),e=o[0],f=o[1]),a=tB(ai(e,t),s?this:Ru,Oi),(r||i||f.length)&&(u=hW(a),r&&(u.dotAll=!0,u.raw=Oi(function(p){for(var g,v=p.length,m=0,y="",h=!1;m<=v;m++)(g=qd(p,m))!=="\\"?h||g!=="."?(g==="["?h=!0:g==="]"&&(h=!1),y+=g):y+="[\\s\\S]":y+=g+qd(p,++m);return y}(e),n)),i&&(u.sticky=!0),f.length&&(u.groups=f)),e!==d)try{sr(a,"source",d===""?"(?:)":d)}catch{}return a},DW=function(e){e in Oi||dW(Oi,e,{configurable:!0,get:function(){return ai[e]},set:function(t){ai[e]=t}})},sC=pW(ai),lC=0;sC.length>lC;)DW(sC[lC++]);Ru.constructor=Oi,Oi.prototype=Ru,pn(U,"RegExp",Oi)}ww("RegExp");var SW=new RegExp(String.fromCharCode(160),"g");function kB(e){return e.replace(SW," ")}function cC(e,t){var n=e.length;if(n){var r=e[n-1];if(X.isText(r)){var i=Object.keys(r);if(i.length===1&&i[0]==="text")return r.text=r.text+t,!0}}return!1}function xW(e,t,n){return{type:"paragraph",children:[{text:O(e).text().replace(/\s+/gm," ")}]}}function j1(e,t){var n=function(o,a){var u=[];if(o.attr("data-w-e-is-void")!=null)return u;var s=o[0].childNodes;return s.length===1&&s[0].nodeName==="BR"?(u.push({text:""}),u):(s.forEach(function(l){if(l.nodeType!==Zi.ELEMENT_NODE){if(l.nodeType===Zi.TEXT_NODE){var c=l.textContent||"";if(c.trim()===""&&c.indexOf(`
|
|
`)>=0)return;c&&(c=kB(c),cC(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(cC(u,`
|
|
`)||u.push({text:`
|
|
`}));var f=O(l);u.push(Ow(f,a))}}),u)}(e,t),r=function(o){for(var a in Bh)if(o[0].matches(a))return Bh[a];return xW}(e),i=r(e[0],n,t);return E.isVoid(t,i)||(n.length===0&&(i.children=[{text:e.text().replace(/\s+/gm," ")}]),Aw.forEach(function(o){i=o(e[0],i,t)})),i}function L1(e,t){e.parents("pre").length===0&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,`
|
|
`));var n=e[0].textContent||"";n=function(i){return i.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"\xAE").replace(/©/g,"\xA9").replace(/™/g,"\u2122")}(n);var r={text:n=kB(n)};return Aw.forEach(function(i){r=i(e[0],r,t)}),r}function Ow(e,t){FB.forEach(function(r){var i=r.selector,o=r.preParseHtml;e[0].matches(i)&&(e=O(o(e[0])))});var n=M8(e);return n==="span"?e.attr("data-w-e-type")?j1(e,t):L1(e,t):n==="code"?M8(e.parent())==="pre"?j1(e,t):L1(e,t):BB.includes(n)?L1(e,t):j1(e,t)}function _B(e,t,n){var r=O(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",function(){r.removeAttr(t)}),!1)}function PB(e,t){t===void 0&&(t=""),t===""&&(t="<p><br></p>"),t.indexOf("<")!==0&&(t=t.split(/\n/).map(function(r){return"<p>"+r+"</p>"}).join(""));var n=O("<div>"+t+"</div>");return Array.from(n.children()).map(function(r){return Ow(O(r),e)})}var AW=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),OW=function(e){var t=e,n=t.onChange,r=t.insertText,i=t.apply,o=t.deleteBackward;return t.insertText=function(a){t.getConfig().readOnly||r(a)},t.apply=function(a){var u,s,l,c,f,d,p,g,v=[];switch(a.type){case"insert_text":case"remove_text":case"set_node":try{for(var m=zn(E.levels(t,{at:a.path})),y=m.next();!y.done;y=m.next()){var h=Oe(y.value,2),$=h[0],w=h[1],C=x.findKey(t,$);v.push([w,C])}}catch(ee){u={error:ee}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(u)throw u.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var D=zn(E.levels(t,{at:_.parent(a.path)})),A=D.next();!A.done;A=D.next()){var I=Oe(A.value,2);$=I[0],w=I[1],C=x.findKey(t,$),v.push([w,C])}}catch(ee){l={error:ee}}finally{try{A&&!A.done&&(c=D.return)&&c.call(D)}finally{if(l)throw l.error}}break;case"move_node":try{for(var M=zn(E.levels(t,{at:_.common(_.parent(a.path),_.parent(a.newPath))})),V=M.next();!V.done;V=M.next()){var Y=Oe(V.value,2);$=Y[0],w=Y[1],C=x.findKey(t,$),v.push([w,C])}}catch(ee){f={error:ee}}finally{try{V&&!V.done&&(d=M.return)&&d.call(M)}finally{if(f)throw f.error}}}i(a);try{for(var J=zn(v),Z=J.next();!Z.done;Z=J.next()){var se=Oe(Z.value,2);w=se[0],C=se[1],$=Oe(E.node(t,w),1)[0],jp.set($,C)}}catch(ee){p={error:ee}}finally{try{Z&&!Z.done&&(g=J.return)&&g.call(J)}finally{if(p)throw p.error}}},t.deleteBackward=function(a){if(a!=="line")return o(a);if(e.selection&&R.isCollapsed(e.selection)){var u=E.above(e,{match:function(f){return E.isBlock(e,f)},at:e.selection});if(u){var s=Oe(u,2)[1],l=E.range(e,s,e.selection.anchor),c=function(f,d){var p=E.range(f,R.end(d)),g=Array.from(E.positions(f,{at:d})),v=0,m=g.length,y=Math.floor(m/2);if(oC(f,E.range(f,g[v]),p))return E.range(f,g[v],p);if(g.length<2)return E.range(f,g[g.length-1],p);for(;y!==g.length&&y!==v;)oC(f,E.range(f,g[y]),p)?m=y:v=y,y=Math.floor((v+m)/2);return E.range(f,g[m],p)}(t,l);R.isCollapsed(c)||P.delete(e,{at:c})}}},t.onChange=function(){var a=t.selection;a!=null&&ub.set(t,a),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return AB(u,t)}).join("")},t.getText=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return W.string(u)}).join(`
|
|
`)},t.getSelectionText=function(){var a=t.selection;return a==null?"":E.string(e,a)},t.getElemsByType=function(a,u){var s,l;u===void 0&&(u=!1);var c=[],f=E.nodes(t,{at:[],universal:!0});try{for(var d=zn(f),p=d.next();!p.done;p=d.next()){var g=Oe(p.value,1)[0];if(te.isElement(g)&&(u?g.type.indexOf(a)>=0:g.type===a)){var v=OB(x.findKey(t,g).id);c.push(Wn(Wn({},g),{id:v}))}}}catch(m){s={error:m}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(s)throw s.error}}return c},t.getElemsByTypePrefix=function(a){return t.getElemsByType(a,!0)},t.isEmpty=function(){var a=t.children,u=a===void 0?[]:a;if(u.length>1)return!1;var s=u[0];if(s==null)return!0;if(te.isElement(s)&&s.type==="paragraph"){var l=s.children,c=l===void 0?[]:l;if(c.length>1)return!1;var f=c[0];if(f==null||X.isText(f)&&f.text==="")return!0}return!1},t.clear=function(){P.removeNodes(t,{at:{anchor:E.start(t,[]),focus:E.end(t,[])},mode:"highest"}),t.children.length===0&&P.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(a){return x.getParentNode(t,a)},t.dangerouslyInsertHtml=function(a,u){if(a===void 0&&(a=""),u===void 0&&(u=!1),a){var s=document.createElement("div");s.innerHTML=a;var l=Array.from(s.childNodes);if(l=l.filter(function(p){var g=p.nodeType,v=p.nodeName;return g===Zi.TEXT_NODE||g===Zi.ELEMENT_NODE&&!AW.has(v.toLowerCase())}),l.length!==0){var c=t.selection;if(c!=null){var f=null;x.isSelectedEmptyParagraph(t)&&!u&&(f=[c.focus.path[0]]),s.setAttribute("hidden","true"),document.body.appendChild(s);var d=0;l.forEach(function(p){var g=p.nodeType,v=p.nodeName,m=p.textContent,y=m===void 0?"":m;if(g!==Zi.TEXT_NODE)if(v!=="BR"){var h=p,$=!1;if(BB.includes(v.toLowerCase()))$=!0;else for(var w in Bh)if(h.matches(w)){$=!0;break}if($){var C=Ow(O(h),t);return t.isInline(C)?(t.insertNode(C),C.type==="link"&&t.insertFragment([{text:""}])):P.insertNodes(t,C,{mode:"highest"}),d++,void(x.isSelectedVoidNode(t)&&t.move(1))}var D=window.getComputedStyle(h).display;x.isSelectedEmptyParagraph(t)||D.indexOf("inline")<0&&t.insertBreak(),t.dangerouslyInsertHtml(h.innerHTML,!0)}else t.insertText(`
|
|
`);else{if(!y||!y.trim())return;t.insertNode({text:y})}}),d&&f&&x.isEmptyPath(t,f)&&P.removeNodes(t,{at:f}),s.remove()}}}},t.setHtml=function(a){a===void 0&&(a="");var u=t.isDisabled(),s=t.isFocused(),l=JSON.stringify(t.selection);t.enable(),t.focus(),t.select([]),t.deleteFragment(),P.setNodes(t,{type:"paragraph"},{mode:"highest"});var c=PB(t,a);if(P.insertFragment(t,c),s||(t.deselect(),t.blur()),u&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(l))}catch{t.select(E.start(t,[]))}},t},BW=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(r){var i=t.selection;if(i){var o=Oe(R.edges(i),2),a=o[0],u=o[1],s=E.void(t,{at:a.path}),l=E.void(t,{at:u.path});if(!R.isCollapsed(i)||s){var c=x.toDOMRange(t,i),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach(function(C){C.textContent&&C.textContent.trim()!==""&&(d=C)}),l){var p=Oe(l,1)[0],g=c.cloneRange(),v=x.toDOMNode(t,p);g.setEndAfter(v),f=g.cloneContents()}if(s&&(d=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(C){var D=C.getAttribute("data-slate-zero-width")==="n";C.textContent=D?`
|
|
`:""}),sB(d)){var m=d.ownerDocument.createElement("span");m.style.whiteSpace="pre",m.appendChild(d),f.appendChild(m),d=m}var y=t.getFragment(),h=JSON.stringify(y),$=window.btoa(encodeURIComponent(h));d.setAttribute("data-slate-fragment",$),r.setData("application/x-slate-fragment",$);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),r.setData("text/html",w.innerHTML),r.setData("text/plain",SV(w)),f.ownerDocument.body.removeChild(w),r}}},t.insertData=function(r){var i,o,a=r.getData("application/x-slate-fragment");if(a){var u=decodeURIComponent(window.atob(a)),s=JSON.parse(u);t.insertFragment(s)}else{var l=r.getData("text/plain"),c=r.getData("text/html");if(c)t.dangerouslyInsertHtml(c);else if(l){var f=l.split(/\r\n|\r|\n/),d=!1;try{for(var p=zn(f),g=p.next();!g.done;g=p.next()){var v=g.value;d&&P.splitNodes(t,{always:!0}),n(v),d=!0}}catch(m){i={error:m}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}},t},yc=function(e){return e!=null},FW={object:!0,function:!0,undefined:!0},TW=function(e){if(!function(t){return!!yc(t)&&hasOwnProperty.call(FW,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},kW=/^\s*class[\s{/}]/,_W=Function.prototype.toString,fC=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!TW(t)}(e)&&!kW.test(_W.call(e))},Bw=function(e){return e!=null},PW=Object.keys,NW=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return PW(Bw(e)?Object(e):e)},IW=function(e){if(!Bw(e))throw new TypeError("Cannot use null or undefined");return e},RW=Math.max,dC=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,i,o=RW(arguments.length,2);for(e=Object(IW(e)),i=function(a){try{e[a]=t[a]}catch(u){n||(n=u)}},r=1;r<o;++r)NW(t=arguments[r]).forEach(i);if(n!==void 0)throw n;return e},jW=Array.prototype.forEach,LW=Object.create,MW=function(e,t){var n;for(n in e)t[n]=e[n]},pC=function(e){var t=LW(null);return jW.call(arguments,function(n){Bw(n)&&MW(Object(n),t)}),t},M1="razdwatrzy",zW=String.prototype.indexOf,Al=typeof M1.contains=="function"&&M1.contains("dwa")===!0&&M1.contains("foo")===!1?String.prototype.contains:function(e){return zW.call(this,e,arguments[1])>-1},Gd=Hf(function(e){var t=e.exports=function(n,r){var i,o,a,u,s;return arguments.length<2||typeof n!="string"?(u=r,r=n,n=null):u=arguments[2],yc(n)?(i=Al.call(n,"c"),o=Al.call(n,"e"),a=Al.call(n,"w")):(i=a=!0,o=!1),s={value:r,configurable:i,enumerable:o,writable:a},u?dC(pC(u),s):s};t.gs=function(n,r,i){var o,a,u,s;return typeof n!="string"?(u=i,i=r,r=n,n=null):u=arguments[3],yc(r)?fC(r)?yc(i)?fC(i)||(u=i,i=void 0):i=void 0:(u=r,r=i=void 0):r=void 0,yc(n)?(o=Al.call(n,"c"),a=Al.call(n,"e")):(o=!0,a=!1),s={get:r,set:i,configurable:o,enumerable:a},u?dC(pC(u),s):s}}),z1=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},HW=Hf(function(e,t){var n,r,i,o,a,u,s,l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,d=Object.defineProperty,p=Object.defineProperties,g=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};n=function(m,y){var h;return z1(y),g.call(this,"__ee__")?h=this.__ee__:(h=v.value=f(null),d(this,"__ee__",v),v.value=null),h[m]?typeof h[m]=="object"?h[m].push(y):h[m]=[h[m],y]:h[m]=y,this},r=function(m,y){var h,$;return z1(y),$=this,n.call(this,m,h=function(){i.call($,m,h),l.call(y,this,arguments)}),h.__eeOnceListener__=y,this},i=function(m,y){var h,$,w,C;if(z1(y),!g.call(this,"__ee__"))return this;if(!(h=this.__ee__)[m])return this;if(typeof($=h[m])=="object")for(C=0;w=$[C];++C)w!==y&&w.__eeOnceListener__!==y||($.length===2?h[m]=$[C?0:1]:$.splice(C,1));else $!==y&&$.__eeOnceListener__!==y||delete h[m];return this},o=function(m){var y,h,$,w,C;if(g.call(this,"__ee__")&&(w=this.__ee__[m]))if(typeof w=="object"){for(h=arguments.length,C=new Array(h-1),y=1;y<h;++y)C[y-1]=arguments[y];for(w=w.slice(),y=0;$=w[y];++y)l.call($,this,C)}else switch(arguments.length){case 1:c.call(w,this);break;case 2:c.call(w,this,arguments[1]);break;case 3:c.call(w,this,arguments[1],arguments[2]);break;default:for(h=arguments.length,C=new Array(h-1),y=1;y<h;++y)C[y-1]=arguments[y];l.call(w,this,C)}},a={on:n,once:r,off:i,emit:o},u={on:Gd(n),once:Gd(r),off:Gd(i),emit:Gd(o)},s=p({},u),e.exports=t=function(m){return m==null?f(s):p(Object(m),u)},t.methods=a});function Kd(e){var t=R8.get(e);return t==null&&(t=HW(),R8.set(e,t)),t}var Fh=new WeakMap;function hC(e,t){var n=Fh.get(e);n==null&&(n=new Set,Fh.set(e,n)),n.add(t)}function UW(e){return Fh.get(e)||new Set}function VW(e){Fh.set(e,new Set)}function Fw(e){var t=x.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),i=t.offset();return{top:i.top,left:i.left,width:n,height:r}}function Tw(e){var t={top:"0",left:"0"},n=e.selection;if(n==null)return t;var r=Fw(e);if(r==null)return t;var i=r.top,o=r.left,a=r.width,u=r.height,s=x.toDOMRange(e,n).getClientRects()[0];if(s==null)return t;s.width;var l=s.height,c={},f=s.top-i,d=s.left-o;if(d>a/2){var p=a-d;c.right=p+5+"px"}else c.left=d+5+"px";if(f>u/2){var g=u-f;c.bottom=g+5+"px"}else{var v=f+l;v<0&&(v=0),c.top=v+5+"px"}return c}function kw(e,t,n){n===void 0&&(n="modal");var r={top:"0",left:"0"};if(e.selection==null)return r;var i=te.isElement(t)&&e.isVoid(t),o=te.isElement(t)&&e.isInline(t),a=p0.get(t);if(a==null)return r;var u=a.getBoundingClientRect(),s=u.top,l=u.left,c=u.height,f=u.width;if(i){var d=function(A){var I=[];I.push(A);for(var M=0;I.length>0;){var V=I.pop();if(V==null||++M>1e4)break;var Y=V.nodeName;if(V.nodeType===1){var J=Y.toLowerCase();if(CV.includes(J)||J==="iframe"||J==="video")return V;var Z=V.children||[],se=Z.length;if(se)for(var ee=se-1;ee>=0;ee--)I.push(Z[ee])}}return null}(a);if(d!=null){var p=d.getBoundingClientRect();s=p.top,c=p.height}}var g=Fw(e);if(g==null)return r;var v=g.top,m=g.left,y=g.width,h=g.height,$={},w=s-v,C=l-m;if(n==="bar")return $.left=C+"px",w>40?$.bottom=h-w+5+"px":$.top=w+c+5+"px",$;if(n==="modal"){var D;return i?o?C>(y-f)/2?$.right=y-C+5+"px":$.left=C+f+5+"px":$.left="20px":$.left=C+"px",i?((D=w)<0&&(D=0),$.top=D+"px"):w>(h-c)/2?$.bottom=h-w+5+"px":((D=w+c)<0&&(D=0),$.top=D+5+"px"),$}throw new Error("type '"+n+"' is invalid")}function vb(e,t){Jn(function(){var n=Fw(e);if(n!=null){var r,i=n.top,o=n.left,a=n.width,u=n.height,s=t.offset(),l=s.top,c=s.left,f=t.width(),d=t.height(),p=l-i,g=c-o,v=t.attr("style");if(v.indexOf("top")>=0&&(r=p+d-u)>0){var m=t.css("top"),y=parseInt(m.toString())-r;y<0&&(y=0),t.css("top",y+"px")}if(v.indexOf("bottom")>=0&&l<0){var h=t.css("bottom"),$=parseInt(h.toString())-Math.abs(l);t.css("bottom",$+"px")}if(v.indexOf("left")>=0&&(r=g+f-a)>0){var w=t.css("left"),C=parseInt(w.toString())-r;C<0&&(C=0),t.css("left",C+"px")}if(v.indexOf("right")>=0&&c<0){var D=t.css("right"),A=parseInt(D.toString())-Math.abs(c);t.css("right",A+"px")}}})}var WW=u0("slice"),qW=st("species"),H1=U.Array,GW=Math.max;at({target:"Array",proto:!0,forced:!WW},{slice:function(e,t){var n,r,i,o=Oo(this),a=Ga(o),u=vs(e,a),s=vs(t===void 0?a:t,a);if(wh(o)&&(n=o.constructor,(o0(n)&&(n===H1||wh(n.prototype))||Ye(n)&&(n=n[qW])===null)&&(n=void 0),n===H1||n===void 0))return hB(o,u,s);for(r=new(n===void 0?H1:n)(GW(s-u,0)),i=0;u<s;u++,i++)u in o&&Qc(r,i,o[u]);return r.length=i,r}});var KW=Vf.f,gC=re("".startsWith),YW=re("".slice),XW=Math.min,NB=rw("startsWith"),JW=!NB&&!!function(){var e=KW(String.prototype,"startsWith");return e&&!e.writable}();at({target:"String",proto:!0,forced:!JW&&!NB},{startsWith:function(e){var t=Ge(Xn(this));nw(e);var n=_s(XW(arguments.length>1?arguments[1]:void 0,t.length)),r=Ge(e);return gC?gC(t,r,n):YW(t,n,n+r.length)===r}});var pu=Object.assign,vC=Object.defineProperty,ZW=re([].concat),mC=!pu||je(function(){if(Nt&&pu({b:1},pu(vC({},"a",{enumerable:!0,get:function(){vC(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(i){t[i]=i}),pu({},e)[n]!=7||Ku(pu({},t)).join("")!=r})?function(e,t){for(var n=Ao(e),r=arguments.length,i=1,o=VO.f,a=zO.f;r>i;)for(var u,s=i0(arguments[i++]),l=o?ZW(Ku(s),o(s)):Ku(s),c=l.length,f=0;c>f;)u=l[f++],Nt&&!Be(a,s,u)||(n[u]=s[u]);return n}:pu;at({target:"Object",stat:!0,forced:Object.assign!==mC},{assign:mC});var QW=["props","attrs","style","dataset","on","hook"];function IB(e){var t=e.data,n=t===void 0?{}:t,r=e.children,i=r===void 0?[]:r;Object.keys(n).forEach(function(o){var a,u,s=n[o];if(o!=="key"){if(!QW.includes(o)){if(o.startsWith("data-")){var l=o.slice(5);return l=DL(l),function(c,f){c.data==null&&(c.data={});var d=c.data;d.dataset==null&&(d.dataset={}),Object.assign(d.dataset,f)}(e,((a={})[l]=s,a)),void delete n[o]}(function(c,f){c.data==null&&(c.data={});var d=c.data;d.props==null&&(d.props={}),Object.assign(d.props,f)})(e,(u={},u[o]=s,u)),delete n[o]}}else e.key=s}),i.length>0&&i.forEach(function(o){typeof o!="string"&&IB(o)})}var _w=[];function eq(e){_w.push(e)}var RB={};function tq(e){var t=e.type,n=e.renderElem;RB[t||""]=n}function nq(e,t,n){var r=n.isInline(e)?"span":"div";return de(r,null,t)}function rq(e,t){var n,r=x.findKey(t,e),i=t.isInline(e),o=E.isVoid(t,e),a=OB(r.id),u={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":i},s=e.type,l=e.children,c=l===void 0?[]:l,f=function(h){return RB[h]||nq}(s);n=o?null:c.map(function(h,$){return mb(h,$,e,t)});var d=f(e,n,t);if(o){u["data-slate-void"]=!0;var p=i?"span":"div",g=Oe(W.texts(e),1),v=Oe(g[0],1)[0],m=mb(v,0,e,t),y=de(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},m);d=de(p,{style:{position:"relative"}},d,y),rf.set(v,0),$s.set(v,e)}return d.data==null&&(d.data={}),Object.assign(d.data,u),o||i||(d=function(h,$){var w=$;return _w.forEach(function(C){w=C(h,$)}),w}(e,d)),Jn(function(){var h=$w(a);h!=null&&(yw.set(r,h),p0.set(e,h),d0.set(h,e))}),d}function yC(e,t){return t===void 0&&(t=!1),de("span",{"data-slate-string":!0},t?e+`
|
|
`:e)}function U1(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),de("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?de("br",null):null)}function iq(e,t,n){if(e.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(e));var r=x.findKey(n,e),i=n.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var o=x.findPath(n,e),a=i([e,o]),u=X.decorations(e,a),s=u.map(function(f,d){var p=function(g,v,m,y,h){v===void 0&&(v=!1);var $=g.text,w=x.findPath(h,m),C=_.parent(w);if(E.isEditor(y))throw new Error("Text node "+JSON.stringify(m)+" parent is Editor");return h.isVoid(y)?U1(W.string(y).length):$!==""||y.children[y.children.length-1]!==m||h.isInline(y)||E.string(h,C)!==""?$===""?U1():v&&$.slice(-1)===`
|
|
`?yC($,!0):yC($):U1(0,!0)}(f,d===u.length-1,e,t,n);return p=function(g,v){var m=v;return _w.forEach(function(y){m=y(g,m)}),m}(f,p),de("span",{"data-slate-leaf":!0},p)}),l=function(f){return"w-e-text-"+f}(r.id),c=de("span",{"data-slate-node":"text",id:l,key:r.id},s);return Jn(function(){var f=$w(l);f!=null&&(yw.set(r,f),p0.set(e,f),d0.set(f,e))}),c}function mb(e,t,n,r){return rf.set(e,t),$s.set(e,n),te.isElement(e)?rq(e,r):iq(e,n,r)}function oq(e,t){var n,r=e.$scroll,i=function(v){return"w-e-textarea-"+v}(e.id),o=t.getConfig(),a=o.readOnly,u=o.autoFocus,s=function(v,m){return m===void 0&&(m=!1),gs("div#"+v,{props:{contentEditable:!m}})}(i,a),l=t.children||[];s.children=l.map(function(v,m){var y=mb(v,m,t,t);return IB(y),y});var c=P8.get(e);if(c==null&&(c=!0),c){var f=function(v,m){return O(`<div
|
|
id="`+v+`"
|
|
data-slate-editor
|
|
data-slate-node="value"
|
|
suppressContentEditableWarning
|
|
role="textarea"
|
|
spellCheck="true"
|
|
autoCorrect="true"
|
|
autoCapitalize="true"
|
|
></div>`)}(i);r.append(f),e.$textArea=f,n=f[0],(p=mj([yj,Cj,Bj,bj,Ej]))(n,s),P8.set(e,!1),N8.set(e,p)}else{var d=I8.get(e),p=N8.get(e);if(d==null||p==null)return;n=d.elm,p(d,s)}if(n!=null||(n=$w(i))!=null){if((c?u:t.isFocused())&&n.focus({preventScroll:!0}),c){var g=bw(n);g&&uB.set(t,g)}mw.set(t,n),p0.set(t,n),d0.set(n,t),I8.set(e,s)}}function bC(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function $C(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function V1(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return $C(n.overflowY,t)||$C(n.overflowX,t)||function(r){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function Yd(e,t,n,r,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=n||a>=t&&u>=n?o-e-r:a>t&&u<n||o<e&&u>n?a-t+i:0}function wC(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,u=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(we){return we!==a};if(!bC(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=e;bC(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&V1(f)&&!V1(document.documentElement)||f!=null&&V1(f,u)&&c.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),y=m.height,h=m.width,$=m.top,w=m.right,C=m.bottom,D=m.left,A=i==="start"||i==="nearest"?$:i==="end"?C:$+y/2,I=o==="center"?D+h/2:o==="end"?w:D,M=[],V=0;V<c.length;V++){var Y=c[V],J=Y.getBoundingClientRect(),Z=J.height,se=J.width,ee=J.top,ae=J.right,fe=J.bottom,_e=J.left;if(r==="if-needed"&&$>=0&&D>=0&&C<=p&&w<=d&&$>=ee&&C<=fe&&D>=_e&&w<=ae)return M;var ve=getComputedStyle(Y),ie=parseInt(ve.borderLeftWidth,10),Ie=parseInt(ve.borderTopWidth,10),T=parseInt(ve.borderRightWidth,10),F=parseInt(ve.borderBottomWidth,10),k=0,N=0,H="offsetWidth"in Y?Y.offsetWidth-Y.clientWidth-ie-T:0,j="offsetHeight"in Y?Y.offsetHeight-Y.clientHeight-Ie-F:0;if(l===Y)k=i==="start"?A:i==="end"?A-p:i==="nearest"?Yd(v,v+p,p,Ie,F,v+A,v+A+y,y):A-p/2,N=o==="start"?I:o==="center"?I-d/2:o==="end"?I-d:Yd(g,g+d,d,ie,T,g+I,g+I+h,h),k=Math.max(0,k+v),N=Math.max(0,N+g);else{k=i==="start"?A-ee-Ie:i==="end"?A-fe+F+j:i==="nearest"?Yd(ee,fe,Z,Ie,F+j,A,A+y,y):A-(ee+Z/2)+j/2,N=o==="start"?I-_e-ie:o==="center"?I-(_e+se/2)+H/2:o==="end"?I-ae+T+H:Yd(_e,ae,se,ie,T+H,I,I+h,h);var Q=Y.scrollLeft,ce=Y.scrollTop;A+=ce-(k=Math.max(0,Math.min(ce+k,Y.scrollHeight-Z+j))),I+=Q-(N=Math.max(0,Math.min(Q+N,Y.scrollWidth-se+H)))}M.push({el:Y,top:k,left:N})}return M}function EC(e){return e===Object(e)&&Object.keys(e).length!==0}function aq(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(EC(t)&&typeof t.behavior=="function")return t.behavior(n?[]:wC(e,t));if(!n){var r=function(i){return i===!1?{block:"end",inline:"nearest"}:EC(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(u){var s=u.el,l=u.top,c=u.left;s.scroll&&a?s.scroll({top:l,left:c,behavior:o}):(s.scrollTop=l,s.scrollLeft=c)})}(wC(e,r),r.behavior)}}function jn(e,t){return Pa(t)&&x.hasDOMNode(e,t,{editable:!0})}function CC(e,t){if(e.getConfig().readOnly)return!1;var n=ju(e,t)&&x.toSlateNode(e,t);return E.isVoid(e,n)}function ju(e,t){return Pa(t)&&x.hasDOMNode(e,t)}function jB(e,t,n){n===void 0&&(n=!1);var r=t.selection,i=t.getConfig(),o=x.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||n)&&t.isFocused()){var a=o.type!=="None";if(r||a){var u=mw.get(t),s=!1;if(u.contains(o.anchorNode)&&u.contains(o.focusNode)&&(s=!0),a&&s&&r){var l=x.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&R.equals(l,r)){var c=!0;if(R.isCollapsed(r)){var f=o.anchorNode,d=o.anchorOffset;if(f===u){var p=u.childNodes,g=void 0;(g=p[d])&&g.matches("table")&&(c=!1),(g=p[d-1])&&g.matches("table")&&(c=!1)}}if(c)return}}if(!r||x.hasRange(t,r)){e.isUpdatingSelection=!0;var v=r&&x.toDOMRange(t,r);if(v){R.isBackward(r)?o.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):o.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;aq(m,{scrollMode:"if-needed",boundary:i.scroll?u.parentElement:y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else o.removeAllRanges();setTimeout(function(){v&&Ac&&u.focus(),e.isUpdatingSelection=!1})}else t.selection=x.toSlateRange(t,o,{exactMatch:!1,suppressThrow:!1})}}}var W1=new WeakMap,DC=new WeakMap,uq={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"},sq={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"},lq={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},et=function(e){var t=uq[e],n=sq[e],r=lq[e],i=t&&Wv(t),o=n&&Wv(n),a=r&&Wv(r);return function(u){return!(!i||!i(u))||!!(sb&&o&&o(u))||!(sb||!a||!a(u))}},rt={isBold:et("bold"),isCompose:et("compose"),isMoveBackward:et("moveBackward"),isMoveForward:et("moveForward"),isDeleteBackward:et("deleteBackward"),isDeleteForward:et("deleteForward"),isDeleteLineBackward:et("deleteLineBackward"),isDeleteLineForward:et("deleteLineForward"),isDeleteWordBackward:et("deleteWordBackward"),isDeleteWordForward:et("deleteWordForward"),isExtendBackward:et("extendBackward"),isExtendForward:et("extendForward"),isExtendLineBackward:et("extendLineBackward"),isExtendLineForward:et("extendLineForward"),isItalic:et("italic"),isMoveLineBackward:et("moveLineBackward"),isMoveLineForward:et("moveLineForward"),isMoveWordBackward:et("moveWordBackward"),isMoveWordForward:et("moveWordForward"),isRedo:et("redo"),isSplitBlock:et("splitBlock"),isTransposeCharacter:et("transposeCharacter"),isUndo:et("undo"),isTab:et("tab"),isSelectAll:et("selectAll")};function Et(e){e.preventDefault()}var cq={beforeinput:function(e,t,n){var r=e,i=n.getConfig().readOnly;if(Cl&&!i&&jn(n,r.target)){var o=n.selection,a=r.inputType,u=r.dataTransfer||r.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var s=Oe(r.getTargetRanges(),1)[0];if(s){var l=x.toSlateRange(n,s,{exactMatch:!1,suppressThrow:!1});o&&R.equals(o,l)||P.select(n,l)}}if(o&&R.isExpanded(o)&&a.startsWith("delete")){var c=a.endsWith("Backward")?"backward":"forward";E.deleteFragment(n,{direction:c})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":E.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":E.deleteForward(n);break;case"deleteContentBackward":E.deleteBackward(n);break;case"deleteEntireSoftLine":E.deleteBackward(n,{unit:"line"}),E.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":E.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":E.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":E.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":E.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":E.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":E.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":E.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!S1.get(n))break;u instanceof DataTransfer?n.insertData(u):typeof u=="string"&&E.insertText(n,u)}}}},blur:function(e,t,n){var r=e,i=t.isUpdatingSelection,o=t.latestElement;if(!n.getConfig().readOnly&&!i&&jn(n,r.target)){var a=x.findDocumentOrShadowRoot(n);if(o!==a.activeElement){var u=r.relatedTarget;if(!(u===x.toDOMNode(n,n)||nr(u)&&u.hasAttribute("data-slate-spacer"))){if(u!=null&&Pa(u)&&x.hasDOMNode(n,u)){var s=x.toSlateNode(n,u);if(te.isElement(s)&&!n.isVoid(s))return}if(El){var l=a.getSelection();l==null||l.removeAllRanges()}da.delete(n)}}}},focus:function(e,t,n){var r=x.toDOMNode(n,n),i=x.findDocumentOrShadowRoot(n);t.latestElement=i.activeElement,Ac&&e.target!==r?r.focus():da.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&ju(n,e.target)&&Pa(e.target)){var r=x.toSlateNode(n,e.target),i=x.findPath(n,r);if(E.hasPath(n,i)&&W.get(n,i)===r){var o=E.start(n,i),a=E.end(n,i),u=E.void(n,{at:o}),s=E.void(n,{at:a});if(u&&s&&_.equals(u[1],s[1])){var l=E.range(n,o);P.select(n,l)}}}},compositionstart:function(e,t,n){if(jn(n,e.target)){var r=n.selection;if(r&&R.isExpanded(r)&&(E.deleteFragment(n),Promise.resolve().then(function(){jB(t,n,!0)})),r&&R.isCollapsed(r)){var i=x.toDOMRange(n,r).startContainer,o=i.textContent||"";W1.set(n,o),DC.set(n,i)}t.isComposing=!0,function(a,u){var s;u.getConfig().placeholder&&u.isEmpty()&&a.showPlaceholder&&((s=a.$placeholder)===null||s===void 0||s.hide(),a.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(jn(n,r.target)){t.isComposing=!1;var i=n.selection;if(i!=null){(lb||Ac)&&x.cleanExposedTexNodeInSelectionBlock(n);for(var o=R.isBackward(i)?i.focus:i.anchor,a=Oe(E.node(n,[o.path[0]]),1)[0],u=0;u<o.path.length;u++){var s=Oe(E.node(n,o.path.slice(0,u+1)),1)[0];if(te.isElement(s)&&((El||Ac)&&s.type==="link"||s.type==="code")){x.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=x.getLeftLengthOfMaxLength(n);c<l.length?(x.toDOMRange(n,i).startContainer.textContent=W1.get(n)||"",c>0&&E.insertText(n,l.slice(0,c)),t.changeViewState()):E.insertText(n,l)}else E.insertText(n,l);El||setTimeout(function(){var f=n.selection;if(f!=null){var d=DC.get(n);d!=null&&x.toDOMRange(n,f).startContainer!==d&&(d.textContent=W1.get(n)||"")}})}}}},compositionupdate:function(e,t,n){jn(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&jn(n,r.target)){if(function(a,u){var s=f0.get(a),l=s&&s.getMenus(),c=xh.get(a),f=c&&c.getMenus(),d=Wn(Wn({},l),f);for(var p in d){var g=d[p],v=g.hotkey;if(v&&FL(v,u)&&!g.isDisabled(a)){var m=g.getValue(a);g.exec(a,m)}}}(n,r),rt.isTab(r))return Et(r),void n.handleTab();if(rt.isRedo(r))return Et(r),void(typeof n.redo=="function"&&n.redo());if(rt.isUndo(r))return Et(r),void(typeof n.undo=="function"&&n.undo());if(rt.isMoveLineBackward(r))return Et(r),void P.move(n,{unit:"line",reverse:!0});if(rt.isMoveLineForward(r))return Et(r),void P.move(n,{unit:"line"});if(rt.isExtendLineBackward(r))return Et(r),void P.move(n,{unit:"line",edge:"focus",reverse:!0});if(rt.isExtendLineForward(r))return Et(r),void P.move(n,{unit:"line",edge:"focus"});if(rt.isMoveBackward(r))return Et(r),void(i&&R.isCollapsed(i)?P.move(n,{reverse:!0}):P.collapse(n,{edge:"start"}));if(rt.isMoveForward(r))return Et(r),void(i&&R.isCollapsed(i)?P.move(n):P.collapse(n,{edge:"end"}));if(rt.isMoveWordBackward(r))return Et(r),i&&R.isExpanded(i)&&P.collapse(n,{edge:"focus"}),void P.move(n,{unit:"word",reverse:!0});if(rt.isMoveWordForward(r))return Et(r),i&&R.isExpanded(i)&&P.collapse(n,{edge:"focus"}),void P.move(n,{unit:"word"});if(rt.isSelectAll(r))return Et(r),void n.selectAll();if(Cl){if((lb||El)&&i&&(rt.isDeleteBackward(r)||rt.isDeleteForward(r))&&R.isCollapsed(i)){var o=W.parent(n,i.anchor.path);if(te.isElement(o)&&E.isVoid(n,o)&&E.isInline(n,o))return r.preventDefault(),void P.delete(n,{unit:"block"})}}else{if(rt.isBold(r)||rt.isItalic(r)||rt.isTransposeCharacter(r))return void Et(r);if(rt.isSplitBlock(r))return Et(r),void E.insertBreak(n);if(rt.isDeleteBackward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n));if(rt.isDeleteForward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n));if(rt.isDeleteLineBackward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n,{unit:"line"}));if(rt.isDeleteLineForward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n,{unit:"line"}));if(rt.isDeleteWordBackward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"backward"}):E.deleteBackward(n,{unit:"word"}));if(rt.isDeleteWordForward(r))return Et(r),void(i&&R.isExpanded(i)?E.deleteFragment(n,{direction:"forward"}):E.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!Cl&&!n.getConfig().readOnly&&jn(n,e.target)){e.preventDefault();var r=e.key;E.insertText(n,r)}},copy:function(e,t,n){var r=e;if(jn(n,r.target)){r.preventDefault();var i=r.clipboardData;i!=null&&n.setFragmentData(i)}},cut:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&jn(n,r.target)){r.preventDefault();var o=r.clipboardData;if(o!=null&&(n.setFragmentData(o),i))if(R.isExpanded(i))E.deleteFragment(n);else{var a=W.parent(n,i.anchor.path);E.isVoid(n,a)&&P.delete(n)}}},paste:function(e,t,n){S1.set(n,!0);var r=e;if(!n.getConfig().readOnly&&jn(n,r.target)){var i=n.getConfig().customPaste;if(i&&i(n,r)===!1)return void S1.set(n,!1);if(!Cl||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(r)){r.preventDefault();var o=r.clipboardData;o!=null&&n.insertData(o)}}},dragover:function(e,t,n){if(ju(n,e.target)){var r=x.toSlateNode(n,e.target);E.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(ju(n,r.target)&&!n.getConfig().readOnly){var i=x.toSlateNode(n,r.target),o=x.findPath(n,i);if(E.isVoid(n,i)||E.void(n,{at:o,voids:!0})){var a=E.range(n,o);P.select(n,a)}var u=r.dataTransfer;u!=null&&(t.isDraggingInternally=!0,n.setFragmentData(u))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&ju(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,i=r.dataTransfer;if(!n.getConfig().readOnly&&ju(n,r.target)&&i!=null&&!(Cl&&El&&i.files.length>0)){r.preventDefault();var o=n.selection,a=x.findEventRange(n,r);P.select(n,a),t.isDraggingInternally&&(o&&P.delete(n,{at:o}),t.isDraggingInternally=!1),n.insertData(i),n.isFocused()||n.focus()}}},fq=1,dq=function(){function e(t){var n=this;this.id=fq++,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=Fa(function(){var a=n.editorInstance;(function(u,s){var l=u.isComposing,c=u.isUpdatingSelection,f=u.isDraggingInternally;if(!(s.getConfig().readOnly||l||c||f)){var d=x.findDocumentOrShadowRoot(s),p=d.activeElement,g=x.toDOMNode(s,s),v=d.getSelection();if(p===g?(u.latestElement=p,da.set(s,!0)):da.delete(s),!v)return P.deselect(s);var m=v.anchorNode,y=v.focusNode,h=jn(s,m)||CC(s,m),$=jn(s,y)||CC(s,y);if(h&&$){var w=x.toSlateRange(s,v,{exactMatch:!1,suppressThrow:!1});P.select(s,w)}else P.deselect(s)}})(n,a)},100);var r=O(t);if(r.length===0)throw new Error("Cannot find textarea DOM by selector '"+t+"'");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 o=O('<div class="w-e-scroll"></div>');i.append(o),this.$scroll=o,this.$textAreaContainer=i,Jn(function(){var a=n.editorInstance,u=x.getWindow(a);u.document.addEventListener("selectionchange",n.onDOMSelectionChange),a.on("destroyed",function(){u.document.removeEventListener("selectionchange",n.onDOMSelectionChange)}),i.on("click",function(){return a.hidePanelOrModal()}),a.on("change",n.changeViewState.bind(n));var s=a.getConfig().onChange;s&&a.on("change",function(){return s(a)}),n.onFocusAndOnBlur(),a.on("change",n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=ib.get(this);if(t==null)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,n=this.$textArea,r=this.$scroll,i=this.editorInstance;n!=null&&(R$(cq,function(o,a){n.on(a,function(u){o(u,t,i)})}),i.getConfig().scroll&&(r.css("overflow-y","auto"),r.on("scroll",Fa(function(){i.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,n=this.editorInstance,r=n.getConfig(),i=r.onBlur,o=r.onFocus;this.latestEditorSelection=n.selection,n.on("change",function(){t.latestEditorSelection==null&&n.selection!=null?o&&o(n):t.latestEditorSelection!=null&&n.selection==null&&i&&i(n),t.latestEditorSelection=n.selection})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,n=t.getConfig().maxLength;if(n){var r=n-x.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML=r+"/"+n}},e.prototype.changeProgress=function(t){var n=this.$progressBar;n.css("width",t+"%"),t>=100&&setTimeout(function(){n.hide(),n.css("width","0"),n.show()},1e3)},e.prototype.changeViewState=function(){var t=this,n=this.editorInstance;oq(this,n),function(r,i){var o,a=i.getConfig().placeholder;if(a){var u=i.isEmpty();if(u&&!r.showPlaceholder&&!r.isComposing){if(r.$placeholder==null){var s=O('<div class="w-e-text-placeholder">'+a+"</div>");r.$textAreaContainer.append(s),r.$placeholder=s}return r.$placeholder.show(),void(r.showPlaceholder=!0)}!u&&r.showPlaceholder&&((o=r.$placeholder)===null||o===void 0||o.hide(),r.showPlaceholder=!1)}}(this,n),Jn(function(){jB(t,n)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();pw("match",function(e,t,n){return[function(r){var i=Xn(this),o=r==null?void 0:ka(r,e);return o?Be(o,r,i):new RegExp(r)[e](Ge(i))},function(r){var i=mt(this),o=Ge(r),a=n(t,i,o);if(a.done)return a.value;if(!i.global)return tf(i,o);var u=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;(s=tf(i,o))!==null;){var f=Ge(s[0]);l[c]=f,f===""&&(i.lastIndex=hw(o,_s(i.lastIndex),u)),c++}return c===0?null:l}]});function Pw(e){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&&Pw(t)}function Nw(){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 LB(){return O('<div class="w-e-bar-divider"></div>')}function MB(e,t,n,r,i){if(i===void 0&&(i=!1),t){if(r){var o=sb?"cmd":"ctrl";r=r.replace("mod",o)}if(i)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?n+`
|
|
`+r:n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var Iw=function(){function e(t,n){var r=this;n===void 0&&(n=!1),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,o=t.width;if(i!=="button")throw new Error("Invalid tag '"+i+"', expected 'button'");var a=t.title,u=t.hotkey,s=u===void 0?"":u,l=t.iconSvg,c=l===void 0?"":l,f=this.$button;if(c){var d=O(c);Pw(d),f.append(d)}else f.text(a);MB(f,c,a,s,n),n&&c&&f.append(O('<span class="title">'+a+"</span>")),o&&f.css("width",o+"px"),this.$elem.append(f),Jn(function(){return r.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(n){n.preventDefault(),En(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=En(this),n=this.menu,r=n.getValue(t);n.exec(t,r)},e.prototype.setActive=function(){var t=En(this),n=this.$button,r="active";this.menu.isActive(t)?n.addClass(r):n.removeClass(r)},e.prototype.setDisabled=function(){var t=En(this),n=this.$button,r=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var i="disabled";r?n.addClass(i):n.removeClass(i),this.disabled=r},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),pq=function(e){function t(n,r){return r===void 0&&(r=!1),e.call(this,n,r)||this}return Ns(t,e),t.prototype.onButtonClick=function(){},t}(Iw),Rw=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var n=ab.get(t);n==null&&(n=new Set,ab.set(t,n)),n.add(this),Rp.set(this,t)},e.prototype.renderContent=function(t){var n=this.$elem;n.empty(),n.append(t);var r=this.genSelfElem();r&&n.append(r)},e.prototype.appendTo=function(t){var n=this.$elem;t.append(n)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=Rp.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=Rp.get(this);t&&t.emit("modalOrPanelHide")}},e}(),hq=function(e){function t(n){var r=e.call(this,n)||this;return r.type="dropPanel",r.$elem=O('<div class="w-e-drop-panel"></div>'),r}return Ns(t,e),t.prototype.genSelfElem=function(){return null},t}(Rw),gq=function(e){function t(n,r){r===void 0&&(r=!1);var i=e.call(this,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var o=Nw();i.$button.append(o)}return i}return Ns(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=En(this);if(this.dropPanel==null){var i=new hq(r),o=n.getPanelContentElem(r);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=n.getPanelContentElem(r),a.renderContent(o),a.show())}var u=this.dropPanel;if(u.isShow){var s=this.$elem,l=s.offset().left,c=s.parents(".w-e-bar");l-c.offset().left>=c.width()/2?u.$elem.css({left:"none",right:"0"}):u.$elem.css({left:"0",right:"none"})}}},t}(Iw),vq=function(e){function t(n,r){r===void 0&&(r=0);var i=e.call(this,n)||this;i.type="modal",i.$elem=O('<div class="w-e-modal"></div>'),i.width=0,r&&(i.width=r);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),n.restoreSelection())}),i}return Ns(t,e),t.prototype.genSelfElem=function(){var n=this,r=O('<span class="btn-close"><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>'),i=Rp.get(this);return r.on("click",function(){n.hide(),i==null||i.restoreSelection()}),r},t.prototype.setStyle=function(n){var r=this.width,i=this.$elem;i.attr("style",""),r&&i.css("width",r+"px"),i.css(n)},t}(Rw);function Cn(e,t,n){var r=O('<label class="babel-container"></label>');r.append("<span>"+e+"</span>");var i=O('<input type="text" id="'+t+'" placeholder="'+(n||"")+'">');return r.append(i),[r[0],i[0]]}function Is(e,t){var n=O('<div class="button-container"></div>'),r=O('<button type="button" id="'+e+'">'+t+"</button>");return n.append(r),[n[0],r[0]]}var mq=function(e){function t(n,r){r===void 0&&(r=!1);var i=e.call(this,n,r)||this;return i.$body=O("body"),i.modal=null,i.menu=n,i}return Ns(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var n=En(this),r=this.menu.getModalPositionNode(n);return te.isElement(r)?kw(n,r,"modal"):Tw(n)},t.prototype.handleModal=function(){var n=En(this),r=this.menu;if(this.modal==null){var i=new vq(n,r.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},t.prototype.renderAndShowModal=function(n,r){r===void 0&&(r=!1);var i=En(this),o=this.menu;if(o.getModalContentElem!=null){var a=x.getTextarea(i),u=x.getToolbar(i),s=((u==null?void 0:u.getConfig())||{}).modalAppendToBody,l=o.getModalContentElem(i);if(n.renderContent(l),s)n.setStyle({left:"0",right:"0"});else{var c=this.getPosition();n.setStyle(c)}r&&(s?n.appendTo(this.$body):n.appendTo(a.$textAreaContainer)),n.show(),s||vb(i,n.$elem),setTimeout(function(){i.blur()})}},t}(Iw),yq=function(e){function t(n,r){var i=e.call(this,n)||this;return i.type="selectList",i.$elem=O('<div class="w-e-select-list"></div>'),r&&i.$elem.css("width",r+"px"),i.$elem.on("click",function(o){o.stopPropagation()}),i}return Ns(t,e),t.prototype.renderList=function(n){var r=this.$elem;r.empty();var i=O("<ul></ul>");n.forEach(function(o){var a=o.value,u=o.text,s=o.selected,l=o.styleForRenderMenuList,c=O('<li data-value="'+a+'"></li>');if(l&&c.css(l),s){var f=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>');c.append(f),c.addClass("selected")}c.append(O('<span data-value="'+a+'">'+u+"</span>")),c.attr("title",u),i.append(c)}),r.append(i)},t.prototype.genSelfElem=function(){return null},t}(Rw),bq=function(){function e(t,n){var r=this;n===void 0&&(n=!1),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,o=t.title,a=t.width,u=t.iconSvg,s=u===void 0?"":u,l=t.hotkey,c=l===void 0?"":l;if(i!=="select")throw new Error("Invalid tag '"+i+"', expected 'select'");var f=this.$button;a&&f.css("width",a+"px"),MB(f,s,o,c,n),this.$elem.append(f),this.menu=t,Jn(function(){return r.init()})}return e.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(n){n.preventDefault(),En(t).hidePanelOrModal(),t.trigger()})},e.prototype.trigger=function(){var t=this,n=En(this);if(!n.isDisabled()&&!this.disabled){var r=this.menu;if(this.selectList==null){this.selectList=new yq(n,r.selectPanelWidth);var i=this.selectList,o=r.getOptions(n);i.renderList(o),i.appendTo(this.$elem),i.show(),i.$elem.on("click","li",function(a){var u=a.target;if(u!=null){a.preventDefault();var s=O(u).attr("data-value");t.onChange(s)}})}else(i=this.selectList).isShow?i.hide():(o=r.getOptions(n),i.renderList(o),i.show())}},e.prototype.onChange=function(t){var n=En(this),r=this.menu;r.exec&&r.exec(n,t)},e.prototype.setSelectedValue=function(){var t=En(this),n=this.menu,r=n.getValue(t),i=function(u,s){for(var l=u.length,c="",f=0;f<l;f++){var d=u[f];if(d.value===s){c=d.text;break}}return c}(n.getOptions(t),r.toString()),o=this.$button,a=Nw();o.empty(),o.text(i),o.append(a)},e.prototype.setDisabled=function(){var t=En(this),n=this.menu.isDisabled(t),r=this.$button;(t.selection==null||t.isDisabled())&&(n=!0);var i="disabled";n?r.addClass(i):r.removeClass(i),this.disabled=n},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),SC=function(){function e(t){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 n=t.iconSvg,r=t.title,i=this.$elem,o=this.$button;if(n){var a=O(n);Pw(a),o.append(a)}else o.text(r);var u=Nw();o.append(u),i.append(o);var s=this.$container;i.append(s);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(t){var n=t.$elem;this.$container.append(n)},e.prototype.observe=function(t){var n=this.$container;t.observe(n[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var t=this,n=this.$container,r=this.$button,i=new MutationObserver(function(){var o=n.find("button"),a=o.length;if(a!==0){var u=0;o.each(function(s){O(s).hasClass("disabled")&&u++}),i.disconnect(),u===a?r.addClass("disabled"):r.removeClass("disabled"),t.observe(i)}});return i},e}(),xC=new WeakMap;function En(e){var t=vw.get(e);if(t==null)throw new Error("Can not get editor instance");return t}function zB(e,t){t===void 0&&(t=!1);var n=xC.get(e);if(n)return n;var r=e.tag;if(r==="button"){var i=e.showDropPanel,o=e.showModal;n=i?new gq(e,t):o?new mq(e,t):new pq(e,t)}if(r==="select"&&(n=new bq(e,t)),n==null)throw new Error("Invalid tag in menu "+JSON.stringify(e));return xC.set(e,n),n}function $q(e,t){var n=e.selection;return n!=null&&!R.isCollapsed(n)&&!x.getSelectedElems(e).some(function(r){if(e.isVoid(r))return!0;var i=r.type;return!!["pre","code","table"].includes(i)||void 0})&&!!X.isText(t)}var wq=function(){function e(){var t=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.changeHoverbarState=pO(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},i=r.node,o=i===void 0?null:i,a=r.menuKeys,u=a===void 0?[]:a;o!=null&&t.changeItemsState(),!(o&&te.isElement(o)&&n&&t.isSamePath(o,t.prevSelectedNode))&&(t.hideAndClean(),o!=null&&(t.registerItems(u),t.setPosition(o),t.show()),t.prevSelectedNode=o)},200),Jn(function(){var n=t.getEditorInstance(),r=t.$elem;r.on("mousedown",function(o){return o.preventDefault()}),x.getTextarea(n).$textAreaContainer.append(r),n.on("change",t.changeHoverbarState);var i=t.hideAndClean.bind(t);n.on("scroll",i),n.on("fullScreen",i),n.on("unFullScreen",i)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var t=this.$elem,n=!1,r=window.innerHeight;r&&r>=360&&r-t[0].getBoundingClientRect().bottom<360&&(n=!0),n?t.addClass("w-e-bar-bottom"):t.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 t=this;Jn(function(){t.hoverbarItems.forEach(function(n){n.changeMenuState()})})},e.prototype.registerItems=function(t){var n=this,r=this.$elem;t.forEach(function(i){if(i!=="|")n.registerSingleItem(i);else{var o=LB();r.append(o)}})},e.prototype.registerSingleItem=function(t){var n=this.getEditorInstance(),r=this.menus,i=r[t];if(i==null){var o=of[t];if(o==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof o!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");i=o(),r[t]=i}var a=zB(i);this.hoverbarItems.push(a),vw.set(a,n),this.$elem.append(a.$elem)},e.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),te.isElement(t)){var i=kw(n,t,"bar");return r.css(i),void vb(n,r)}if(X.isText(t))return i=Tw(n),r.css(i),void vb(n,r);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(t.selection==null)return null;var n=this.getHoverbarKeysConf(),r=null,i=[],o=function(u){var s=n[u],l=s.match,c=s.menuKeys,f=c===void 0?[]:c,d=l||function(v,m){return x.checkNodeType(m,u)},p=Oe(E.nodes(t,{match:function(v){return d(t,v)},universal:!0}),1),g=p[0];if(g!=null)return r=g[0],i=f,"break"};for(var a in n)if(o(a)==="break")break;return r==null||i.length===0?null:{node:r,menuKeys:i}},e.prototype.getEditorInstance=function(){var t=ob.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,n=t===void 0?{}:t,r=n.text;return r&&r.match==null&&(r.match=$q),n},e.prototype.isSamePath=function(t,n){if(t==null||n==null)return!1;var r=x.findPath(null,t),i=x.findPath(null,n);return _.equals(r,i)},e.prototype.destroy=function(){this.changeHoverbarState.cancel(),this.$elem.remove(),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function HB(e,t,n,r){if(rf.set(e,t),$s.set(e,n),te.isElement(e)){var i=e.children;if((i===void 0?[]:i).forEach(function(u,s){return HB(u,s,e,r)}),E.isVoid(r,e)){var o=Oe(W.texts(e),1),a=Oe(o[0],1)[0];rf.set(a,0),$s.set(a,e)}}}function Eq(e){var t=e.selector,n=t===void 0?"":t,r=e.config,i=r===void 0?{}:r,o=e.content,a=e.html,u=e.plugins,s=u===void 0?[]:u,l=(y=>{var h=y,{apply:$}=h;return h.history={undos:[],redos:[]},h.redo=()=>{var{history:w}=h,{redos:C}=w;if(C.length>0){var D=C[C.length-1];Hu.withoutSaving(h,()=>{E.withoutNormalizing(h,()=>{for(var A of D)h.apply(A)})}),w.redos.pop(),w.undos.push(D)}},h.undo=()=>{var{history:w}=h,{undos:C}=w;if(C.length>0){var D=C[C.length-1];Hu.withoutSaving(h,()=>{E.withoutNormalizing(h,()=>{var A=D.map(Gi.inverse).reverse();for(var I of A)h.apply(I)})}),w.redos.push(D),w.undos.pop()}},h.apply=w=>{var{operations:C,history:D}=h,{undos:A}=D,I=A[A.length-1],M=I&&I[I.length-1],V=VH(w,M),Y=Hu.isSaving(h),J=Hu.isMerging(h);if(Y==null&&(Y=UH(w)),Y){if(J==null&&(J=I!=null&&(C.length!==0||HH(w,M)||V)),I&&J)V&&I.pop(),I.push(w);else{var Z=[w];A.push(Z)}for(;A.length>100;)A.shift();WH(w)&&(D.redos=[])}$(w)},h})(function(y){var h=y,$=h.insertText,w=h.insertNode,C=h.insertFragment;return h.insertText=function(D){if(h.getConfig().maxLength){var A=x.getLeftLengthOfMaxLength(h);A<=0||(A<D.length?$(D.slice(0,A)):$(D))}else $(D)},h.insertNode=function(D){if(h.getConfig().maxLength){var A=x.getLeftLengthOfMaxLength(h);A<=0||A<W.string(D).length||w(D)}else w(D)},h.insertFragment=function(D){h.getConfig().maxLength?D.forEach(function(A){h.insertNode(A)}):C(D)},h}(function(y){var h=y;return h.on=function($,w){var C=Kd(h);if(C.on($,w),$==="destroyed"&&hC(h,w),$!=="destroyed"){var D=function(){return C.off($,w)};C.on("destroyed",D),hC(h,D)}},h.once=function($,w){Kd(h).once($,w)},h.off=function($,w){Kd(h).off($,w)},h.emit=function($){for(var w=[],C=1;C<arguments.length;C++)w[C-1]=arguments[C];var D=Kd(h);D.emit.apply(D,tb([$],Oe(w))),$==="destroyed"&&(UW(h).forEach(function(A){return D.off("destroyed",A)}),VW(h))},h}(function(y){var h=y;return h.select=function($){P.select(h,$)},h.deselect=function(){var $=h.selection,w=x.findDocumentOrShadowRoot(h).getSelection();w&&w.rangeCount>0&&w.removeAllRanges(),$&&P.deselect(y)},h.move=function($,w){w===void 0&&(w=!1),$&&($<0||P.move(y,{distance:$,unit:"character",reverse:w}))},h.moveReverse=function($){h.move($,!0)},h.restoreSelection=function(){var $=ub.get(h);$!=null&&(h.focus(),P.select(h,$))},h.getSelectionPosition=function(){return Tw(h)},h.getNodePosition=function($){return kw(h,$)},h.isSelectedAll=function(){var $=h.selection;if($==null)return!1;var w=Oe(R.edges($),2),C=w[0],D=w[1],A=Oe(E.edges(h,[]),2),I=A[0],M=A[1];return!(!$e.equals(C,I)||!$e.equals(D,M))},h.selectAll=function(){var $=E.start(h,[]),w=E.end(h,[]);P.select(h,{anchor:$,focus:w})},h}(OW(function(y){var h=y;return h.getAllMenuKeys=function(){var $=[];for(var w in of)$.push(w);return $},h.getConfig=function(){var $=_8.get(h);if($==null)throw new Error("Can not get editor config");return $},h.getMenuConfig=function($){var w=h.getConfig().MENU_CONF;return(w===void 0?{}:w)[$]||{}},h.alert=function($,w){w===void 0&&(w="info");var C=h.getConfig().customAlert;C&&C($,w)},h}(function(y){var h=y;return h.id="wangEditor-"+OV++,h.isDestroyed=!1,h.isFullScreen=!1,h.focus=function($){if(x.toDOMNode(h,h).focus({preventScroll:!0}),da.set(h,!0),$){var w=E.end(h,[]);P.select(h,w)}else{var C=ub.get(h);C?P.select(h,C):P.select(h,E.start(h,[]))}},h.isFocused=function(){return!!da.get(h)},h.blur=function(){x.toDOMNode(h,h).blur(),P.deselect(h),da.set(h,!1)},h.updateView=function(){x.getTextarea(h).changeViewState();var $=x.getToolbar(h);$&&$.changeToolbarState();var w=x.getHoverbar(h);w&&w.changeHoverbarState()},h.destroy=function(){if(!h.isDestroyed){var $=x.getTextarea(h);$.destroy(),rb.delete(h),ib.delete($);var w=x.getToolbar(h);w&&(w.destroy(),f0.delete(h),gw.delete(w));var C=x.getHoverbar(h);C&&(C.destroy(),xh.delete(h),ob.delete(C)),h.isDestroyed=!0,h.emit("destroyed")}},h.scrollToElem=function($){if(!h.getConfig().scroll){var w="\u7F16\u8F91\u5668\u7981\u7528\u4E86 scroll \uFF0C\u7F16\u8F91\u5668\u5185\u5BB9\u65E0\u6CD5\u6EDA\u52A8\uFF0C\u8BF7\u81EA\u884C\u5B9E\u73B0\u8BE5\u529F\u80FD";return w+=`
|
|
You has disabled editor scroll, please do this yourself`,void console.warn(w)}var C=O("#"+$);if(C.length!==0){var D=C[0];if(!x.hasDOMNode(h,D))return w="Element (found by id is '"+$+"') is not in editor DOM",w+=`
|
|
\u901A\u8FC7 id '`+$+"' \u627E\u5230\u7684 element \u4E0D\u5728 editor DOM \u4E4B\u5185",void console.error(w,D);var A=x.getTextarea(h),I=A.$textAreaContainer,M=A.$scroll,V=C.offset().top,Y=I.offset().top;M[0].scrollBy({top:V-Y,behavior:"smooth"})}},h.showProgressBar=function($){$<1||x.getTextarea(h).changeProgress($)},h.hidePanelOrModal=function(){var $=ab.get(h);$!=null&&$.forEach(function(w){return w.hide()})},h.enable=function(){h.getConfig().readOnly=!1,h.updateView()},h.disable=function(){h.getConfig().readOnly=!0,h.updateView()},h.isDisabled=function(){return h.getConfig().readOnly},h.toDOMNode=function($){return x.toDOMNode(h,$)},h.fullScreen=function(){if(!h.isFullScreen){var $=null,w=x.getToolbar(h);w&&($=w.$box);var C=x.getTextarea(h).$box.parent();if($&&$.parent()[0]!==C[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent
|
|
\u4E0D\u80FD\u8BBE\u7F6E\u5168\u5C4F\uFF0C\u56E0\u4E3A toolbar DOM \u7236\u8282\u70B9\u548C textarea DOM \u7236\u8282\u70B9\u4E0D\u4E00\u81F4`);C.addClass("w-e-full-screen-container");var D=C.css("z-index");C.attr("data-z-index",D.toString()),h.isFullScreen=!0,h.emit("fullScreen")}},h.unFullScreen=function(){if(h.isFullScreen){var $=x.getTextarea(h).$box.parent();setTimeout(function(){$.removeClass("w-e-full-screen-container"),h.isFullScreen=!1,h.emit("unFullScreen")},200)}},h.getEditableContainer=function(){return x.getTextarea(h).$textAreaContainer[0]},h}(BW(aN()))))))));if(n&&function(y,h){return _B(y,"data-w-e-textarea",h)}(l,n))throw new Error("Repeated create editor by selector '"+n+"'");var c=function(y){y===void 0&&(y={});var h=hO(fB),$={},w=y.MENU_CONF,C=w===void 0?{}:w;return R$(h,function(D,A){$[A]=Wn(Wn({},D),C[A]||{})}),delete y.MENU_CONF,Wn({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:$,hoverbarKeys:{},customAlert:function(D,A){window.alert(A+`:
|
|
`+D)}},y)}(i);_8.set(l,c);var f=c.hoverbarKeys,d=f===void 0?{}:f;if(s.forEach(function(y){l=y(l)}),a!=null&&(l.children=PB(l,a)),o&&o.length&&(l.children=o),l.children.length===0&&(l.children=[{type:"paragraph",children:[{text:""}]}]),x.normalizeContent(l),n){var p=new dq(n);rb.set(l,p),ib.set(p,l),p.changeViewState(),Jn(function(){var y=p.$scroll;y!=null&&y.height()<300&&console.warn(`\u7F16\u8F91\u533A\u57DF\u9AD8\u5EA6 < 300px \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4 modal hoverbar \u5B9A\u4F4D\u5F02\u5E38
|
|
Textarea height < 300px . This may be cause modal and hoverbar position error`,y)});var g=void 0;Object.keys(d).length>0&&(g=new wq,ob.set(g,l),xh.set(l,g)),l.on("change",function(){l.hidePanelOrModal()}),l.on("scroll",function(){l.hidePanelOrModal()})}else l.children.forEach(function(y,h){return HB(y,h,l,l)});var v=c.onCreated,m=c.onDestroyed;return v&&l.on("created",function(){return v(l)}),m&&l.on("destroyed",function(){return m(l)}),Jn(function(){return l.emit("created")}),l}var Cq=u0("splice"),Dq=U.TypeError,Sq=Math.max,xq=Math.min;at({target:"Array",proto:!0,forced:!Cq},{splice:function(e,t){var n,r,i,o,a,u,s=Ao(this),l=Ga(s),c=vs(e,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=xq(Sq(Uf(t),0),l-c)),l+n-r>9007199254740991)throw Dq("Maximum allowed length exceeded");for(i=jO(s,r),o=0;o<r;o++)(a=c+o)in s&&Qc(i,o,s[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)u=o+n,(a=o+r)in s?s[u]=s[a]:delete s[u];for(o=l;o>l-r+n;o--)delete s[o-1]}else if(n>r)for(o=l-r;o>c;o--)u=o+n-1,(a=o+r-1)in s?s[u]=s[a]:delete s[u];for(o=0;o<n;o++)s[o+c]=arguments[o+2];return s.length=l-r+n,i}});var Aq=function(){function e(t,n){var r=this;this.$toolbar=O('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=pO(function(){r.toolbarItems.forEach(function(a){a.changeMenuState()})},200),this.config=n;var i=O(t);if(i.length===0)throw new Error("Cannot find toolbar DOM by selector '"+t+"'");this.$box=i;var o=this.$toolbar;o.on("mousedown",function(a){return a.preventDefault()}),i.append(o),Jn(function(){r.registerItems(),r.changeToolbarState(),r.getEditorInstance().on("change",r.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var t=this,n="",r=this.$toolbar,i=this.config,o=i.toolbarKeys,a=o===void 0?[]:o,u=i.insertKeys,s=u===void 0?{index:0,keys:[]}:u,l=i.excludeKeys,c=l===void 0?[]:l,f=hO(a);s.keys.length>0&&(typeof s.keys=="string"&&(s.keys=[s.keys]),s.keys.forEach(function(g,v){f.splice(s.index+v,0,g)}));var d=f.filter(function(g){if(typeof g=="string"){if(c.includes(g))return!1}else if(c.includes(g.key))return!1;return!0}),p=d.length;d.forEach(function(g,v){if(g==="|"){if(v===0||v+1===p||n==="|")return;var m=LB();return r.append(m),void(n=g)}if(typeof g=="string")return t.registerSingleItem(g,t),void(n=g);t.registerGroup(g),n="group"})},e.prototype.registerGroup=function(t){var n=this,r=this.$toolbar,i=function(l){return new SC(l)}(t),o=t.menuKeys,a=o===void 0?[]:o,u=this.config.excludeKeys,s=u===void 0?[]:u;a.forEach(function(l){s.includes(l)||n.registerSingleItem(l,i)}),r.append(i.$elem)},e.prototype.registerSingleItem=function(t,n){var r=this.getEditorInstance(),i=n instanceof SC,o=this.menus,a=o[t];if(a==null){var u=of[t];if(u==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof u!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");a=u(),o[t]=a}else console.warn("Duplicated toolbar menu key '"+t+`'
|
|
\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '`+t+"'");var s=zB(a,i);this.toolbarItems.push(s),vw.set(s,r),i?n.appendBarItem(s):n.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var t=gw.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}();function Oq(e,t){if(e==null)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,i=r===void 0?{}:r;if(function(u,s){return _B(u,"data-w-e-toolbar",s)}(e,n))throw new Error("Repeated create toolbar by selector '"+n+"'");var o=Wn({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},i||{}),a=new Aq(n,o);return gw.set(a,e),f0.set(e,a),a}var Bq=ks.EXISTS,Fq=gr.f,UB=Function.prototype,Tq=re(UB.toString),VB=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,kq=re(VB.exec);function WB(e){var t=e.server,n=t===void 0?"":t,r=e.fieldName,i=r===void 0?"":r,o=e.maxFileSize,a=o===void 0?10485760:o,u=e.maxNumberOfFiles,s=u===void 0?100:u,l=e.meta,c=l===void 0?{}:l,f=e.metaWithUrl,d=f!==void 0&&f,p=e.headers,g=p===void 0?{}:p,v=e.withCredentials,m=v!==void 0&&v,y=e.timeout,h=y===void 0?1e4:y,$=e.onBeforeUpload,w=$===void 0?function(Z){return Z}:$,C=e.onSuccess,D=C===void 0?function(Z,se){}:C,A=e.onError,I=A===void 0?function(Z,se,ee){console.error(Z.name+" upload error",se,ee)}:A,M=e.onProgress,V=M===void 0?function(Z){}:M;if(!n)throw new Error(`Cannot get upload server address
|
|
\u6CA1\u6709\u914D\u7F6E\u4E0A\u4F20\u5730\u5740`);if(!i)throw new Error(`Cannot get fieldName
|
|
\u6CA1\u6709\u914D\u7F6E fieldName`);var Y=n;d&&(Y=function(Z,se){var ee=Oe(Z.split("#"),2),ae=ee[0],fe=ee[1],_e=[];R$(se,function(ie,Ie){_e.push(Ie+"="+ie)});var ve=_e.join("&");return ae=ae.indexOf("?")>0?ae+"&"+ve:ae+"?"+ve,fe?ae+"#"+fe:ae}(Y,c));var J=new zf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(jz,{endpoint:Y,headers:g,formData:!0,fieldName:i,bundle:!0,withCredentials:m,timeout:h});return J.on("upload-success",function(Z,se){var ee=se.body,ae=ee===void 0?{}:ee;try{D(Z,ae)}catch(fe){console.error("wangEditor upload file - onSuccess error",fe)}J.removeFile(Z.id)}),J.on("progress",function(Z){Z<1||V(Z)}),J.on("error",function(Z){console.error("wangEditor file upload error",Z.stack)}),J.on("upload-error",function(Z,se,ee){try{I(Z,se,ee)}catch(ae){console.error("wangEditor upload file - onError error",ae)}J.removeFile(Z.id)}),J.on("restriction-failed",function(Z,se){try{I(Z,se)}catch(ee){console.error("wangEditor upload file - onError error",ee)}J.removeFile(Z.id)}),J}function eo(e){return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eo(e)}function _q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.forEach(function(i){_q(e,i,n[i])})}return e}function pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hi(e,t,n){return t&&AC(e.prototype,t),n&&AC(e,n),e}function Na(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uf(e,t){if(t&&(eo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ws(e)}function yb(e,t){return yb=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yb(e,t)}function h0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yb(e,t)}Nt&&!Bq&&Fq(UB,"name",{configurable:!0,get:function(){try{return kq(VB,Tq(this))[1]}catch{return""}}});var Pq={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ui=new(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pi(this,e),this.init(t,n)}return hi(e,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Pq,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(r).concat(this.prefix," ").concat(t[0])),this.logger[n](t))}},{key:"create",value:function(t){return new e(this.logger,Ct({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),yo=function(){function e(){pi(this,e),this.observers={}}return hi(e,[{key:"on",value:function(t,n){var r=this;return t.split(" ").forEach(function(i){r.observers[i]=r.observers[i]||[],r.observers[i].push(n)}),this}},{key:"off",value:function(t,n){this.observers[t]&&(n?this.observers[t]=this.observers[t].filter(function(r){return r!==n}):delete this.observers[t])}},{key:"emit",value:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach(function(u){u.apply(void 0,r)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(u){u.apply(u,[t].concat(r))})}}}]),e}();function Ol(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function OC(e){return e==null?"":""+e}function Nq(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function jw(e,t,n){function r(u){return u&&u.indexOf("###")>-1?u.replace(/###/g,"."):u}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function BC(e,t,n){var r=jw(e,t,Object);r.obj[r.k]=n}function Th(e,t){var n=jw(e,t),r=n.obj,i=n.k;if(r)return r[i]}function FC(e,t,n){var r=Th(e,n);return r!==void 0?r:Th(t,n)}function qB(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):qB(e[r],t[r],n):e[r]=t[r]);return e}function hu(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Iq={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Rq(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return Iq[t]}):e}var g0=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function GB(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,u=r.slice(o,o+a).join(n),s=i[u];s===void 0&&r.length>o+a;)a++,s=i[u=r.slice(o,o+a).join(n)];if(s===void 0)return;if(typeof s=="string")return s;if(u&&typeof s[u]=="string")return s[u];var l=r.slice(o+a).join(n);return l?GB(s,l,n):void 0}i=i[r[o]]}return i}}var jq=function(e){function t(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return pi(this,t),r=uf(this,ws(t).call(this)),g0&&yo.call(Na(r)),r.data=n||{},r.options=i,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.options.ignoreJSONStructure===void 0&&(r.options.ignoreJSONStructure=!0),r}return h0(t,yo),hi(t,[{key:"addNamespaces",value:function(n){this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}},{key:"removeNamespaces",value:function(n){var r=this.options.ns.indexOf(n);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function(n,r,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[n,r];i&&typeof i!="string"&&(s=s.concat(i)),i&&typeof i=="string"&&(s=s.concat(a?i.split(a):i)),n.indexOf(".")>-1&&(s=n.split("."));var l=Th(this.data,s);return l||!u||typeof i!="string"?l:GB(this.data&&this.data[n]&&this.data[n][r],i,a)}},{key:"addResource",value:function(n,r,i,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var s=[n,r];i&&(s=s.concat(u?i.split(u):i)),n.indexOf(".")>-1&&(o=r,r=(s=n.split("."))[1]),this.addNamespaces(r),BC(this.data,s,o),a.silent||this.emit("added",n,r,i,o)}},{key:"addResources",value:function(n,r,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in i)typeof i[a]!="string"&&Object.prototype.toString.apply(i[a])!=="[object Array]"||this.addResource(n,r,a,i[a],{silent:!0});o.silent||this.emit("added",n,r,i)}},{key:"addResourceBundle",value:function(n,r,i,o,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[n,r];n.indexOf(".")>-1&&(o=i,i=r,r=(s=n.split("."))[1]),this.addNamespaces(r);var l=Th(this.data,s)||{};o?qB(l,i,a):l=Ct({},l,i),BC(this.data,s,l),u.silent||this.emit("added",n,r,i)}},{key:"removeResourceBundle",value:function(n,r){this.hasResourceBundle(n,r)&&delete this.data[n][r],this.removeNamespaces(r),this.emit("removed",n,r)}},{key:"hasResourceBundle",value:function(n,r){return this.getResource(n,r)!==void 0}},{key:"getResourceBundle",value:function(n,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ct({},{},this.getResource(n,r)):this.getResource(n,r)}},{key:"getDataByLanguage",value:function(n){return this.data[n]}},{key:"toJSON",value:function(){return this.data}}]),t}(),KB={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,n,r,i))}),t}},TC={},kC=function(e){function t(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return pi(this,t),r=uf(this,ws(t).call(this)),g0&&yo.call(Na(r)),Nq(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,Na(r)),r.options=i,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=ui.create("translator"),r}return h0(t,yo),hi(t,[{key:"changeLanguage",value:function(n){n&&(this.language=n)}},{key:"exists",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(n==null)return!1;var i=this.resolve(n,r);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(n,r){var i=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ns||this.options.defaultNS;if(i&&n.indexOf(i)>-1){var u=n.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:n,namespaces:a};var s=n.split(i);(i!==o||i===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),n=s.join(o)}return typeof a=="string"&&(a=[a]),{key:n,namespaces:a}}},{key:"translate",value:function(n,r,i){var o=this;if(eo(r)!=="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),r||(r={}),n==null)return"";Array.isArray(n)||(n=[String(n)]);var a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,u=this.extractFromKey(n[n.length-1],r),s=u.key,l=u.namespaces,c=l[l.length-1],f=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&f.toLowerCase()==="cimode"){if(d){var p=r.nsSeparator||this.options.nsSeparator;return c+p+s}return s}var g=this.resolve(n,r),v=g&&g.res,m=g&&g.usedKey||s,y=g&&g.exactUsedKey||s,h=Object.prototype.toString.apply(v),$=["[object Number]","[object Function]","[object RegExp]"],w=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,D=typeof v!="string"&&typeof v!="boolean"&&typeof v!="number";if(C&&v&&D&&$.indexOf(h)<0&&(typeof w!="string"||h!=="[object Array]")){if(!r.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,v,Ct({},r,{ns:l})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(a){var A=h==="[object Array]",I=A?[]:{},M=A?y:m;for(var V in v)if(Object.prototype.hasOwnProperty.call(v,V)){var Y="".concat(M).concat(a).concat(V);I[V]=this.translate(Y,Ct({},r,{joinArrays:!1,ns:l})),I[V]===Y&&(I[V]=v[V])}v=I}}else if(C&&typeof w=="string"&&h==="[object Array]")(v=v.join(w))&&(v=this.extendTranslation(v,n,r,i));else{var J=!1,Z=!1,se=r.count!==void 0&&typeof r.count!="string",ee=t.hasDefaultValue(r),ae=se?this.pluralResolver.getSuffix(f,r.count):"",fe=r["defaultValue".concat(ae)]||r.defaultValue;!this.isValidLookup(v)&&ee&&(J=!0,v=fe),this.isValidLookup(v)||(Z=!0,v=s);var _e=r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ve=_e&&Z?void 0:v,ie=ee&&fe!==v&&this.options.updateMissing;if(Z||J||ie){if(this.logger.log(ie?"updateKey":"missingKey",f,c,s,ie?fe:v),a){var Ie=this.resolve(s,Ct({},r,{keySeparator:!1}));Ie&&Ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var T=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(var k=0;k<F.length;k++)T.push(F[k]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(r.lng||this.language):T.push(r.lng||this.language);var N=function(H,j,Q){o.options.missingKeyHandler?o.options.missingKeyHandler(H,c,j,ie?Q:ve,ie,r):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(H,c,j,ie?Q:ve,ie,r),o.emit("missingKey",H,c,j,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&se?T.forEach(function(H){o.pluralResolver.getSuffixes(H).forEach(function(j){N([H],s+j,r["defaultValue".concat(j)]||fe)})}):N(T,s,fe))}v=this.extendTranslation(v,n,r,g,i),Z&&v===s&&this.options.appendNamespaceToMissingKey&&(v="".concat(c,":").concat(s)),(Z||J)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(n,r,i,o,a){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)n=this.i18nFormat.parse(n,i,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(Ct({},i,{interpolation:Ct({},this.options.interpolation,i.interpolation)}));var s,l=i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var c=n.match(this.interpolator.nestingRegexp);s=c&&c.length}var f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f=Ct({},this.options.interpolation.defaultVariables,f)),n=this.interpolator.interpolate(n,f,i.lng||this.language,i),l){var d=n.match(this.interpolator.nestingRegexp);s<(d&&d.length)&&(i.nest=!1)}i.nest!==!1&&(n=this.interpolator.nest(n,function(){for(var v=arguments.length,m=new Array(v),y=0;y<v;y++)m[y]=arguments[y];return a&&a[0]===m[0]&&!i.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(m[0]," in key: ").concat(r[0])),null):u.translate.apply(u,m.concat([r]))},i)),i.interpolation&&this.interpolator.reset()}var p=i.postProcess||this.options.postProcess,g=typeof p=="string"?[p]:p;return n!=null&&g&&g.length&&i.applyPostProcessor!==!1&&(n=KB.handle(g,n,r,this.options&&this.options.postProcessPassResolved?Ct({i18nResolved:o},i):i,this)),n}},{key:"resolve",value:function(n){var r,i,o,a,u,s=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof n=="string"&&(n=[n]),n.forEach(function(c){if(!s.isValidLookup(r)){var f=s.extractFromKey(c,l),d=f.key;i=d;var p=f.namespaces;s.options.fallbackNS&&(p=p.concat(s.options.fallbackNS));var g=l.count!==void 0&&typeof l.count!="string",v=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",m=l.lngs?l.lngs:s.languageUtils.toResolveHierarchy(l.lng||s.language,l.fallbackLng);p.forEach(function(y){s.isValidLookup(r)||(u=y,!TC["".concat(m[0],"-").concat(y)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(u)&&(TC["".concat(m[0],"-").concat(y)]=!0,s.logger.warn('key "'.concat(i,'" for languages "').concat(m.join(", "),`" won't get resolved as namespace "`).concat(u,'" 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!!!")),m.forEach(function(h){if(!s.isValidLookup(r)){a=h;var $,w,C=d,D=[C];for(s.i18nFormat&&s.i18nFormat.addLookupKeys?s.i18nFormat.addLookupKeys(D,d,h,y,l):(g&&($=s.pluralResolver.getSuffix(h,l.count)),g&&v&&D.push(C+$),v&&D.push(C+="".concat(s.options.contextSeparator).concat(l.context)),g&&D.push(C+=$));w=D.pop();)s.isValidLookup(r)||(o=w,r=s.getResource(h,y,w,l))}}))})}}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function(n){return!(n===void 0||!this.options.returnNull&&n===null||!this.options.returnEmptyString&&n==="")}},{key:"getResource",value:function(n,r,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(n,r,i,o):this.resourceStore.getResource(n,r,i,o)}}],[{key:"hasDefaultValue",value:function(n){var r="defaultValue";for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&r===i.substring(0,r.length)&&n[i]!==void 0)return!0;return!1}}]),t}();function q1(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Lq=function(){function e(t){pi(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ui.create("languageUtils")}return hi(e,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return n.length===2?null:(n.pop(),n[n.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map(function(i){return i.toLowerCase()}):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=q1(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=q1(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=q1(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var n,r=this;return t?(t.forEach(function(i){if(!n){var o=r.formatLanguageCode(i);r.options.supportedLngs&&!r.isSupportedCode(o)||(n=o)}}),!n&&this.options.supportedLngs&&t.forEach(function(i){if(!n){var o=r.getLanguagePartFromCode(i);if(r.isSupportedCode(o))return n=o;n=r.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n):null}},{key:"getFallbackCodes",value:function(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=function(u){u&&(r.isSupportedCode(u)?o.push(u):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),i.forEach(function(u){o.indexOf(u)<0&&a(r.formatLanguageCode(u))}),o}}]),e}(),Mq=[{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}],zq={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}};function Hq(){var e={};return Mq.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:zq[t.fc]}})}),e}var Uq=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pi(this,e),this.languageUtils=t,this.options=n,this.logger=ui.create("pluralResolver"),this.rules=Hq()}return hi(e,[{key:"addRule",value:function(t,n){this.rules[t]=n}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,n){return this.getSuffixes(t).map(function(r){return n+r})}},{key:"getSuffixes",value:function(t){var n=this,r=this.getRule(t);return r?r.numbers.map(function(i){return n.getSuffix(t,i)}):[]}},{key:"getSuffix",value:function(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),a=i.numbers[o];this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var u=function(){return r.options.prepend&&a.toString()?r.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1?u():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),Vq=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pi(this,e),this.logger=ui.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return hi(e,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=n.escape!==void 0?n.escape:Rq,this.escapeValue=n.escapeValue===void 0||n.escapeValue,this.useRawValueToEscape=n.useRawValueToEscape!==void 0&&n.useRawValueToEscape,this.prefix=n.prefix?hu(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?hu(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?hu(n.nestingPrefix):n.nestingPrefixEscaped||hu("$t("),this.nestingSuffix=n.nestingSuffix?hu(n.nestingSuffix):n.nestingSuffixEscaped||hu(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(t,n,r,i){var o,a,u,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(v){return v.replace(/\$/g,"$$$$")}var f=function(v){if(v.indexOf(s.formatSeparator)<0){var m=FC(n,l,v);return s.alwaysFormat?s.format(m,void 0,r,Ct({},i,n,{interpolationkey:v})):m}var y=v.split(s.formatSeparator),h=y.shift().trim(),$=y.join(s.formatSeparator).trim();return s.format(FC(n,l,h),$,r,Ct({},i,n,{interpolationkey:h}))};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,g=[{regex:this.regexpUnescape,safeValue:function(v){return c(v)}},{regex:this.regexp,safeValue:function(v){return s.escapeValue?c(s.escape(v)):c(v)}}];return g.forEach(function(v){for(u=0;o=v.regex.exec(t);){if((a=f(o[1].trim()))===void 0)if(typeof d=="function"){var m=d(t,o,i);a=typeof m=="string"?m:""}else{if(p){a=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),a=""}else typeof a=="string"||s.useRawValueToEscape||(a=OC(a));var y=v.safeValue(a);if(t=t.replace(o[0],y),p?(v.regex.lastIndex+=y.length,v.regex.lastIndex-=o[0].length):v.regex.lastIndex=0,++u>=s.maxReplaces)break}}),t}},{key:"nest",value:function(t,n){var r,i,o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=Ct({},a);function s(d,p){var g=this.nestingOptionsSeparator;if(d.indexOf(g)<0)return d;var v=d.split(new RegExp("".concat(g,"[ ]*{"))),m="{".concat(v[1]);d=v[0],m=(m=this.interpolate(m,u)).replace(/'/g,'"');try{u=JSON.parse(m),p&&(u=Ct({},p,u))}catch(y){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),y),"".concat(d).concat(g).concat(m)}return delete u.defaultValue,d}for(u.applyPostProcessor=!1,delete u.defaultValue;r=this.nestingRegexp.exec(t);){var l=[],c=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){var f=r[1].split(this.formatSeparator).map(function(d){return d.trim()});r[1]=f.shift(),l=f,c=!0}if((i=n(s.call(this,r[1].trim(),u),u))&&r[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=OC(i)),i||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(t)),i=""),c&&(i=l.reduce(function(d,p){return o.format(d,p,a.lng,Ct({},a,{interpolationkey:r[1].trim()}))},i.trim())),t=t.replace(r[0],i),this.regexp.lastIndex=0}return t}}]),e}(),Wq=function(e){function t(n,r,i){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return pi(this,t),o=uf(this,ws(t).call(this)),g0&&yo.call(Na(o)),o.backend=n,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=ui.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return h0(t,yo),hi(t,[{key:"queueLoad",value:function(n,r,i,o){var a=this,u=[],s=[],l=[],c=[];return n.forEach(function(f){var d=!0;r.forEach(function(p){var g="".concat(f,"|").concat(p);!i.reload&&a.store.hasResourceBundle(f,p)?a.state[g]=2:a.state[g]<0||(a.state[g]===1?s.indexOf(g)<0&&s.push(g):(a.state[g]=1,d=!1,s.indexOf(g)<0&&s.push(g),u.indexOf(g)<0&&u.push(g),c.indexOf(p)<0&&c.push(p)))}),d||l.push(f)}),(u.length||s.length)&&this.queue.push({pending:s,loaded:{},errors:[],callback:o}),{toLoad:u,pending:s,toLoadLanguages:l,toLoadNamespaces:c}}},{key:"loaded",value:function(n,r,i){var o=n.split("|"),a=o[0],u=o[1];r&&this.emit("failedLoading",a,u,r),i&&this.store.addResourceBundle(a,u,i),this.state[n]=r?-1:2;var s={};this.queue.forEach(function(l){(function(c,f,d,p){var g=jw(c,f,Object),v=g.obj,m=g.k;v[m]=v[m]||[],p&&(v[m]=v[m].concat(d)),p||v[m].push(d)})(l.loaded,[a],u),function(c,f){for(var d=c.indexOf(f);d!==-1;)c.splice(d,1),d=c.indexOf(f)}(l.pending,n),r&&l.errors.push(r),l.pending.length!==0||l.done||(Object.keys(l.loaded).forEach(function(c){s[c]||(s[c]=[]),l.loaded[c].length&&l.loaded[c].forEach(function(f){s[c].indexOf(f)<0&&s[c].push(f)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(n,r,i){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,s=arguments.length>5?arguments[5]:void 0;return n.length?this.backend[i](n,r,function(l,c){l&&c&&a<5?setTimeout(function(){o.read.call(o,n,r,i,a+1,2*u,s)},u):s(l,c)}):s(null,{})}},{key:"prepareLoading",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof n=="string"&&(n=this.languageUtils.toResolveHierarchy(n)),typeof r=="string"&&(r=[r]);var u=this.queueLoad(n,r,o,a);if(!u.toLoad.length)return u.pending.length||a(),null;u.toLoad.forEach(function(s){i.loadOne(s)})}},{key:"load",value:function(n,r,i){this.prepareLoading(n,r,{},i)}},{key:"reload",value:function(n,r,i){this.prepareLoading(n,r,{reload:!0},i)}},{key:"loadOne",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=n.split("|"),a=o[0],u=o[1];this.read(a,u,"read",void 0,void 0,function(s,l){s&&r.logger.warn("".concat(i,"loading namespace ").concat(u," for language ").concat(a," failed"),s),!s&&l&&r.logger.log("".concat(i,"loaded namespace ").concat(u," for language ").concat(a),l),r.loaded(n,s,l)})}},{key:"saveMissing",value:function(n,r,i,o,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(r,'" 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!!!"):i!=null&&i!==""&&(this.backend&&this.backend.create&&this.backend.create(n,r,i,o,null,Ct({},u,{isUpdate:a})),n&&n[0]&&this.store.addResource(n[0],r,i,o))}}]),t}();function qq(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(eo(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),eo(e[2])==="object"||eo(e[3])==="object"){var n=e[3]||e[2];Object.keys(n).forEach(function(r){t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function _C(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Xd(){}var Gq=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(pi(this,t),n=uf(this,ws(t).call(this)),g0&&yo.call(Na(n)),n.options=_C(r),n.services={},n.logger=ui,n.modules={external:[]},i&&!n.isInitialized&&!r.isClone){if(!n.options.initImmediate)return n.init(r,i),uf(n,Na(n));setTimeout(function(){n.init(r,i)},0)}return n}return h0(t,yo),hi(t,[{key:"init",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function o(p){return p?typeof p=="function"?new p:p:null}if(typeof r=="function"&&(i=r,r={}),r.whitelist&&!r.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),r.nonExplicitWhitelist&&!r.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Ct({},qq(),this.options,_C(r)),this.format=this.options.interpolation.format,i||(i=Xd),!this.options.isClone){this.modules.logger?ui.init(o(this.modules.logger),this.options):ui.init(null,this.options);var a=new Lq(this.options);this.store=new jq(this.options.resources,this.options);var u=this.services;u.logger=ui,u.resourceStore=this.store,u.languageUtils=a,u.pluralResolver=new Uq(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new Vq(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Wq(o(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),m=1;m<g;m++)v[m-1]=arguments[m];n.emit.apply(n,[p].concat(v))}),this.modules.languageDetector&&(u.languageDetector=o(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=o(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new kC(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),m=1;m<g;m++)v[m-1]=arguments[m];n.emit.apply(n,[p].concat(v))}),this.modules.external.forEach(function(p){p.init&&p.init(n)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&s[0]!=="dev"&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){n[p]=function(){var g;return(g=n.store)[p].apply(g,arguments)}});var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach(function(p){n[p]=function(){var g;return(g=n.store)[p].apply(g,arguments),n}});var f=Ol(),d=function(){var p=function(g,v){n.isInitialized&&!n.initializedStoreOnce&&n.logger.warn("init: i18next is already initialized. You should call init just once!"),n.isInitialized=!0,n.options.isClone||n.logger.log("initialized",n.options),n.emit("initialized",n.options),f.resolve(v),i(g,v)};if(n.languages&&n.options.compatibilityAPI!=="v1"&&!n.isInitialized)return p(null,n.t.bind(n));n.changeLanguage(n.options.lng,p)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),f}},{key:"loadResources",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xd,o=i,a=typeof n=="string"?n:this.language;if(typeof n=="function"&&(o=n),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return o();var u=[],s=function(c){c&&r.services.languageUtils.toResolveHierarchy(c).forEach(function(f){u.indexOf(f)<0&&u.push(f)})};if(a)s(a);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(c){return s(c)})}this.options.preload&&this.options.preload.forEach(function(c){return s(c)}),this.services.backendConnector.load(u,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(n,r,i){var o=Ol();return n||(n=this.languages),r||(r=this.options.ns),i||(i=Xd),this.services.backendConnector.reload(n,r,function(a){o.resolve(),i(a)}),o}},{key:"use",value:function(n){if(!n)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!n.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return n.type==="backend"&&(this.modules.backend=n),(n.type==="logger"||n.log&&n.warn&&n.error)&&(this.modules.logger=n),n.type==="languageDetector"&&(this.modules.languageDetector=n),n.type==="i18nFormat"&&(this.modules.i18nFormat=n),n.type==="postProcessor"&&KB.addPostProcessor(n),n.type==="3rdParty"&&this.modules.external.push(n),this}},{key:"changeLanguage",value:function(n,r){var i=this;this.isLanguageChangingTo=n;var o=Ol();this.emit("languageChanging",n);var a=function(u){n||u||!i.services.languageDetector||(u=[]);var s=typeof u=="string"?u:i.services.languageUtils.getBestMatchFromCodes(u);s&&(i.language||(i.language=s,i.languages=i.services.languageUtils.toResolveHierarchy(s)),i.translator.language||i.translator.changeLanguage(s),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(s)),i.loadResources(s,function(l){(function(c,f){f?(i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.translator.changeLanguage(f),i.isLanguageChangingTo=void 0,i.emit("languageChanged",f),i.logger.log("languageChanged",f)):i.isLanguageChangingTo=void 0,o.resolve(function(){return i.t.apply(i,arguments)}),r&&r(c,function(){return i.t.apply(i,arguments)})})(l,s)})};return n||!this.services.languageDetector||this.services.languageDetector.async?!n&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(n):a(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(n,r,i){var o=this,a=function u(s,l){var c;if(eo(l)!=="object"){for(var f=arguments.length,d=new Array(f>2?f-2:0),p=2;p<f;p++)d[p-2]=arguments[p];c=o.options.overloadTranslationOptionHandler([s,l].concat(d))}else c=Ct({},l);c.lng=c.lng||u.lng,c.lngs=c.lngs||u.lngs,c.ns=c.ns||u.ns;var g=o.options.keySeparator||".",v=i?"".concat(i).concat(g).concat(s):s;return o.t(v,c)};return typeof n=="string"?a.lng=n:a.lngs=n,a.ns=r,a.keyPrefix=i,a}},{key:"t",value:function(){var n;return this.translator&&(n=this.translator).translate.apply(n,arguments)}},{key:"exists",value:function(){var n;return this.translator&&(n=this.translator).exists.apply(n,arguments)}},{key:"setDefaultNamespace",value:function(n){this.options.defaultNS=n}},{key:"hasLoadedNamespace",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],a=!!this.options&&this.options.fallbackLng,u=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var s=function(c,f){var d=r.services.backendConnector.state["".concat(c,"|").concat(f)];return d===-1||d===2};if(i.precheck){var l=i.precheck(this,s);if(l!==void 0)return l}return!!this.hasResourceBundle(o,n)||!this.services.backendConnector.backend||!(!s(o,n)||a&&!s(u,n))}},{key:"loadNamespaces",value:function(n,r){var i=this,o=Ol();return this.options.ns?(typeof n=="string"&&(n=[n]),n.forEach(function(a){i.options.ns.indexOf(a)<0&&i.options.ns.push(a)}),this.loadResources(function(a){o.resolve(),r&&r(a)}),o):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function(n,r){var i=Ol();typeof n=="string"&&(n=[n]);var o=this.options.preload||[],a=n.filter(function(u){return o.indexOf(u)<0});return a.length?(this.options.preload=o.concat(a),this.loadResources(function(u){i.resolve(),r&&r(u)}),i):(r&&r(),Promise.resolve())}},{key:"dir",value:function(n){return n||(n=this.languages&&this.languages.length>0?this.languages[0]:this.language),n?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(n))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xd,o=Ct({},this.options,r,{isClone:!0}),a=new t(o),u=["store","services","language"];return u.forEach(function(s){a[s]=n[s]}),a.services=Ct({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new kC(a.services,a.options),a.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),f=1;f<l;f++)c[f-1]=arguments[f];a.emit.apply(a,[s].concat(c))}),a.init(o,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),t}(),kh=new Gq,Kq="translation";function gn(e,t){kh.addResourceBundle(e,Kq,t,!0,!0)}kh.init({lng:"zh-CN",resources:{}});var q=kh.t.bind(kh),Yq={editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}},Xq={editor:{more:"\u66F4\u591A",justify:"\u5BF9\u9F50",indent:"\u7F29\u8FDB",image:"\u56FE\u7247",video:"\u89C6\u9891"}};gn("en",Yq);gn("zh-CN",Xq);gn("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"}}),gn("zh-CN",{common:{ok:"\u786E\u5B9A",delete:"\u5220\u9664",enter:"\u56DE\u8F66"},blockQuote:{title:"\u5F15\u7528"},codeBlock:{title:"\u4EE3\u7801\u5757"},color:{color:"\u6587\u5B57\u989C\u8272",bgColor:"\u80CC\u666F\u8272",default:"\u9ED8\u8BA4\u989C\u8272",clear:"\u6E05\u9664\u80CC\u666F\u8272"},divider:{title:"\u5206\u5272\u7EBF"},emotion:{title:"\u8868\u60C5"},fontSize:{title:"\u5B57\u53F7",default:"\u9ED8\u8BA4\u5B57\u53F7"},fontFamily:{title:"\u5B57\u4F53",default:"\u9ED8\u8BA4\u5B57\u4F53"},fullScreen:{title:"\u5168\u5C4F"},header:{title:"\u6807\u9898",text:"\u6B63\u6587"},image:{netImage:"\u7F51\u7EDC\u56FE\u7247",delete:"\u5220\u9664\u56FE\u7247",edit:"\u7F16\u8F91\u56FE\u7247",viewLink:"\u67E5\u770B\u94FE\u63A5",src:"\u56FE\u7247\u5730\u5740",desc:"\u56FE\u7247\u63CF\u8FF0",link:"\u56FE\u7247\u94FE\u63A5"},indent:{decrease:"\u51CF\u5C11\u7F29\u8FDB",increase:"\u589E\u52A0\u7F29\u8FDB"},justify:{left:"\u5DE6\u5BF9\u9F50",right:"\u53F3\u5BF9\u9F50",center:"\u5C45\u4E2D\u5BF9\u9F50",justify:"\u4E24\u7AEF\u5BF9\u9F50"},lineHeight:{title:"\u884C\u9AD8",default:"\u9ED8\u8BA4\u884C\u9AD8"},link:{insert:"\u63D2\u5165\u94FE\u63A5",text:"\u94FE\u63A5\u6587\u672C",url:"\u94FE\u63A5\u5730\u5740",unLink:"\u53D6\u6D88\u94FE\u63A5",edit:"\u4FEE\u6539\u94FE\u63A5",view:"\u67E5\u770B\u94FE\u63A5"},textStyle:{bold:"\u7C97\u4F53",clear:"\u6E05\u9664\u683C\u5F0F",code:"\u884C\u5185\u4EE3\u7801",italic:"\u659C\u4F53",sub:"\u4E0B\u6807",sup:"\u4E0A\u6807",through:"\u5220\u9664\u7EBF",underline:"\u4E0B\u5212\u7EBF"},undo:{undo:"\u64A4\u9500",redo:"\u91CD\u505A"},todo:{todo:"\u5F85\u529E"}});var Jq={type:"paragraph",renderElem:function(e,t,n){return de("p",null,t)}},Zq={type:"paragraph",elemToHtml:function(e,t){return t===""?"<p><br></p>":"<p>"+t+"</p>"}},_h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v0(e){var t={exports:{}};return e(t,t.exports),t.exports}var Bi,Lp,Jd=function(e){return e&&e.Math==Math&&e},ge=Jd(typeof globalThis=="object"&&globalThis)||Jd(typeof window=="object"&&window)||Jd(typeof self=="object"&&self)||Jd(typeof _h=="object"&&_h)||function(){return this}()||Function("return this")(),ut=function(e){try{return!!e()}catch{return!0}},dr=!ut(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Bl=Function.prototype.call,pt=Bl.bind?Bl.bind(Bl):function(){return Bl.apply(Bl,arguments)},PC={}.propertyIsEnumerable,NC=Object.getOwnPropertyDescriptor,eG=NC&&!PC.call({1:2},1)?function(e){var t=NC(this,e);return!!t&&t.enumerable}:PC,YB={f:eG},Lw=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},XB=Function.prototype,bb=XB.bind,$b=XB.call,tG=bb&&bb.bind($b),le=bb?function(e){return e&&tG($b,e)}:function(e){return e&&function(){return $b.apply(e,arguments)}},nG=le({}.toString),rG=le("".slice),to=function(e){return rG(nG(e),8,-1)},G1=ge.Object,iG=le("".split),m0=ut(function(){return!G1("z").propertyIsEnumerable(0)})?function(e){return to(e)=="String"?iG(e,""):G1(e)}:G1,oG=ge.TypeError,Zn=function(e){if(e==null)throw oG("Can't call method on "+e);return e},Rs=function(e){return m0(Zn(e))},Ut=function(e){return typeof e=="function"},Hn=function(e){return typeof e=="object"?e!==null:Ut(e)},aG=function(e){return Ut(e)?e:void 0},qf=function(e,t){return arguments.length<2?aG(ge[e]):ge[e]&&ge[e][t]},JB=le({}.isPrototypeOf),K1=qf("navigator","userAgent")||"",IC=ge.process,RC=ge.Deno,jC=IC&&IC.versions||RC&&RC.version,LC=jC&&jC.v8;LC&&(Lp=(Bi=LC.split("."))[0]>0&&Bi[0]<4?1:+(Bi[0]+Bi[1])),!Lp&&K1&&(!(Bi=K1.match(/Edge\/(\d+)/))||Bi[1]>=74)&&(Bi=K1.match(/Chrome\/(\d+)/))&&(Lp=+Bi[1]);var wb=Lp,Eb=!!Object.getOwnPropertySymbols&&!ut(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&wb&&wb<41}),Mw=Eb&&!Symbol.sham&&typeof Symbol.iterator=="symbol",uG=ge.Object,Cb=Mw?function(e){return typeof e=="symbol"}:function(e){var t=qf("Symbol");return Ut(t)&&JB(t.prototype,uG(e))},sG=ge.String,ZB=function(e){try{return sG(e)}catch{return"Object"}},lG=ge.TypeError,QB=function(e){if(Ut(e))return e;throw lG(ZB(e)+" is not a function")},y0=function(e,t){var n=e[t];return n==null?void 0:QB(n)},cG=ge.TypeError,fG=Object.defineProperty,zw=function(e,t){try{fG(ge,e,{value:t,configurable:!0,writable:!0})}catch{ge[e]=t}return t},no=ge["__core-js_shared__"]||zw("__core-js_shared__",{}),Hw=v0(function(e){(e.exports=function(t,n){return no[t]||(no[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),dG=ge.Object,Gf=function(e){return dG(Zn(e))},pG=le({}.hasOwnProperty),qn=Object.hasOwn||function(e,t){return pG(Gf(e),t)},hG=0,gG=Math.random(),vG=le(1 .toString),eF=function(e){return"Symbol("+(e===void 0?"":e)+")_"+vG(++hG+gG,36)},Fl=Hw("wks"),ha=ge.Symbol,MC=ha&&ha.for,mG=Mw?ha:ha&&ha.withoutSetter||eF,kn=function(e){if(!qn(Fl,e)||!Eb&&typeof Fl[e]!="string"){var t="Symbol."+e;Eb&&qn(ha,e)?Fl[e]=ha[e]:Fl[e]=Mw&&MC?MC(t):mG(t)}return Fl[e]},yG=ge.TypeError,bG=kn("toPrimitive"),$G=function(e,t){if(!Hn(e)||Cb(e))return e;var n,r=y0(e,bG);if(r){if(t===void 0&&(t="default"),n=pt(r,e,t),!Hn(n)||Cb(n))return n;throw yG("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,u;if(o==="string"&&Ut(a=i.toString)&&!Hn(u=pt(a,i))||Ut(a=i.valueOf)&&!Hn(u=pt(a,i))||o!=="string"&&Ut(a=i.toString)&&!Hn(u=pt(a,i)))return u;throw cG("Can't convert object to primitive value")}(e,t)},Uw=function(e){var t=$G(e,"string");return Cb(t)?t:t+""},Db=ge.document,wG=Hn(Db)&&Hn(Db.createElement),Vw=function(e){return wG?Db.createElement(e):{}},tF=!dr&&!ut(function(){return Object.defineProperty(Vw("div"),"a",{get:function(){return 7}}).a!=7}),zC=Object.getOwnPropertyDescriptor,Ww={f:dr?zC:function(e,t){if(e=Rs(e),t=Uw(t),tF)try{return zC(e,t)}catch{}if(qn(e,t))return Lw(!pt(YB.f,e,t),e[t])}},EG=ge.String,CG=ge.TypeError,On=function(e){if(Hn(e))return e;throw CG(EG(e)+" is not an object")},DG=ge.TypeError,HC=Object.defineProperty,js={f:dr?HC:function(e,t,n){if(On(e),t=Uw(t),On(n),tF)try{return HC(e,t,n)}catch{}if("get"in n||"set"in n)throw DG("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Es=dr?function(e,t,n){return js.f(e,t,Lw(1,n))}:function(e,t,n){return e[t]=n,e},SG=le(Function.toString);Ut(no.inspectSource)||(no.inspectSource=function(e){return SG(e)});var Ph,Tc,Nh,qw=no.inspectSource,UC=ge.WeakMap,xG=Ut(UC)&&/native code/.test(qw(UC)),VC=Hw("keys"),nF=function(e){return VC[e]||(VC[e]=eF(e))},Gw={},Sb=ge.TypeError,AG=ge.WeakMap;if(xG||no.state){var Ho=no.state||(no.state=new AG),OG=le(Ho.get),WC=le(Ho.has),BG=le(Ho.set);Ph=function(e,t){if(WC(Ho,e))throw new Sb("Object already initialized");return t.facade=e,BG(Ho,e,t),t},Tc=function(e){return OG(Ho,e)||{}},Nh=function(e){return WC(Ho,e)}}else{var gu=nF("state");Gw[gu]=!0,Ph=function(e,t){if(qn(e,gu))throw new Sb("Object already initialized");return t.facade=e,Es(e,gu,t),t},Tc=function(e){return qn(e,gu)?e[gu]:{}},Nh=function(e){return qn(e,gu)}}var xb={set:Ph,get:Tc,has:Nh,enforce:function(e){return Nh(e)?Tc(e):Ph(e,{})},getterFor:function(e){return function(t){var n;if(!Hn(t)||(n=Tc(t)).type!==e)throw Sb("Incompatible receiver, "+e+" required");return n}}},rF=Function.prototype,FG=dr&&Object.getOwnPropertyDescriptor,Y1=qn(rF,"name"),b0={EXISTS:Y1,PROPER:Y1&&function(){}.name==="something",CONFIGURABLE:Y1&&(!dr||dr&&FG(rF,"name").configurable)},sf=v0(function(e){var t=b0.CONFIGURABLE,n=xb.get,r=xb.enforce,i=String(String).split("String");(e.exports=function(o,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;Ut(u)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!qn(u,"name")||t&&u.name!==p)&&Es(u,"name",p),(l=r(u)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==ge?(c?!d&&o[a]&&(f=!0):delete o[a],f?o[a]=u:Es(o,a,u)):f?o[a]=u:zw(a,u)})(Function.prototype,"toString",function(){return Ut(this)&&n(this).source||qw(this)})}),TG=Math.ceil,kG=Math.floor,Ls=function(e){var t=+e;return t!=t||t===0?0:(t>0?kG:TG)(t)},_G=Math.max,PG=Math.min,lf=function(e,t){var n=Ls(e);return n<0?_G(n+t,0):PG(n,t)},NG=Math.min,Kf=function(e){return e>0?NG(Ls(e),9007199254740991):0},$0=function(e){return Kf(e.length)},qC=function(e){return function(t,n,r){var i,o=Rs(t),a=$0(o),u=lf(r,a);if(e&&n!=n){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},iF={includes:qC(!0),indexOf:qC(!1)},IG=iF.indexOf,GC=le([].push),oF=function(e,t){var n,r=Rs(e),i=0,o=[];for(n in r)!qn(Gw,n)&&qn(r,n)&&GC(o,n);for(;t.length>i;)qn(r,n=t[i++])&&(~IG(o,n)||GC(o,n));return o},Ih=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],RG=Ih.concat("length","prototype"),jG={f:Object.getOwnPropertyNames||function(e){return oF(e,RG)}},aF={f:Object.getOwnPropertySymbols},LG=le([].concat),MG=qf("Reflect","ownKeys")||function(e){var t=jG.f(On(e)),n=aF.f;return n?LG(t,n(e)):t},zG=function(e,t){for(var n=MG(t),r=js.f,i=Ww.f,o=0;o<n.length;o++){var a=n[o];qn(e,a)||r(e,a,i(t,a))}},HG=/#|\.prototype\./,Yf=function(e,t){var n=VG[UG(e)];return n==qG||n!=WG&&(Ut(t)?ut(t):!!t)},UG=Yf.normalize=function(e){return String(e).replace(HG,".").toLowerCase()},VG=Yf.data={},WG=Yf.NATIVE="N",qG=Yf.POLYFILL="P",GG=Yf,KG=Ww.f,_t=function(e,t){var n,r,i,o,a,u=e.target,s=e.global,l=e.stat;if(n=s?ge:l?ge[u]||zw(u,{}):(ge[u]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=KG(n,r))&&a.value:n[r],!GG(s?r:u+(l?".":"#")+r,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;zG(o,i)}(e.sham||i&&i.sham)&&Es(o,"sham",!0),sf(n,r,o,e)}},KC=le(le.bind),Rh=Array.isArray||function(e){return to(e)=="Array"},uF={};uF[kn("toStringTag")]="z";var Kw=String(uF)==="[object z]",YG=kn("toStringTag"),XG=ge.Object,JG=to(function(){return arguments}())=="Arguments",Yw=Kw?to:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(i,o){try{return i[o]}catch{}}(t=XG(e),YG))=="string"?n:JG?to(t):(r=to(t))=="Object"&&Ut(t.callee)?"Arguments":r},sF=function(){},ZG=[],lF=qf("Reflect","construct"),Xw=/^\s*(?:class|function)\b/,QG=le(Xw.exec),eK=!Xw.exec(sF),Tl=function(e){if(!Ut(e))return!1;try{return lF(sF,ZG,e),!0}catch{return!1}},Jw=!lF||ut(function(){var e;return Tl(Tl.call)||!Tl(Object)||!Tl(function(){e=!0})||e})?function(e){if(!Ut(e))return!1;switch(Yw(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return eK||!!QG(Xw,qw(e))}:Tl,tK=kn("species"),YC=ge.Array,nK=function(e,t){return new(function(n){var r;return Rh(n)&&(r=n.constructor,(Jw(r)&&(r===YC||Rh(r.prototype))||Hn(r)&&(r=r[tK])===null)&&(r=void 0)),r===void 0?YC:r}(e))(t===0?0:t)},XC=le([].push),Fi=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=Gf(s),v=m0(g),m=function(C,D){return QB(C),D===void 0?C:KC?KC(C,D):function(){return C.apply(D,arguments)}}(l,c),y=$0(v),h=0,$=f||nK,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:XC(w,d)}else switch(e){case 4:return!1;case 7:XC(w,d)}return o?-1:r||i?i:w}},w0={forEach:Fi(0),map:Fi(1),filter:Fi(2),some:Fi(3),every:Fi(4),find:Fi(5),findIndex:Fi(6),filterReject:Fi(7)},rK=kn("species"),Zw=function(e){return wb>=51||!ut(function(){var t=[];return(t.constructor={})[rK]=function(){return{foo:1}},t[e](Boolean).foo!==1})},iK=w0.filter;_t({target:"Array",proto:!0,forced:!Zw("filter")},{filter:function(e){return iK(this,e,arguments.length>1?arguments[1]:void 0)}});var oK=Kw?{}.toString:function(){return"[object "+Yw(this)+"]"};Kw||sf(Object.prototype,"toString",oK,{unsafe:!0});var Zd,aK=ge.String,it=function(e){if(Yw(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return aK(e)},cF=function(){var e=On(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Qw=ge.RegExp,Ab=ut(function(){var e=Qw("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),uK=Ab||ut(function(){return!Qw("a","y").sticky}),fF={BROKEN_CARET:Ab||ut(function(){var e=Qw("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:uK,UNSUPPORTED_Y:Ab},Ju=Object.keys||function(e){return oF(e,Ih)},sK=dr?Object.defineProperties:function(e,t){On(e);for(var n,r=Rs(t),i=Ju(t),o=i.length,a=0;o>a;)js.f(e,n=i[a++],r[n]);return e},lK=qf("document","documentElement"),dF=nF("IE_PROTO"),X1=function(){},pF=function(e){return"<script>"+e+"<\/script>"},JC=function(e){e.write(pF("")),e.close();var t=e.parentWindow.Object;return e=null,t},Mp=function(){try{Zd=new ActiveXObject("htmlfile")}catch{}var e,t;Mp=typeof document<"u"?document.domain&&Zd?JC(Zd):((t=Vw("iframe")).style.display="none",lK.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(pF("document.F=Object")),e.close(),e.F):JC(Zd);for(var n=Ih.length;n--;)delete Mp.prototype[Ih[n]];return Mp()};Gw[dF]=!0;var ZC,J1,hF=Object.create||function(e,t){var n;return e!==null?(X1.prototype=On(e),n=new X1,X1.prototype=null,n[dF]=e):n=Mp(),t===void 0?n:sK(n,t)},cK=ge.RegExp,fK=ut(function(){var e=cK(".","s");return!(e.dotAll&&e.exec(`
|
|
`)&&e.flags==="s")}),dK=ge.RegExp,pK=ut(function(){var e=dK("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),hK=xb.get,gK=Hw("native-string-replace",String.prototype.replace),jh=RegExp.prototype.exec,Ob=jh,vK=le("".charAt),mK=le("".indexOf),yK=le("".replace),Z1=le("".slice),Q1=(J1=/b*/g,pt(jh,ZC=/a/,"a"),pt(jh,J1,"a"),ZC.lastIndex!==0||J1.lastIndex!==0),QC=fF.BROKEN_CARET,em=/()??/.exec("")[1]!==void 0;(Q1||em||QC||fK||pK)&&(Ob=function(e){var t,n,r,i,o,a,u,s=this,l=hK(s),c=it(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=pt(Ob,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=QC&&s.sticky,g=pt(cF,s),v=s.source,m=0,y=c;if(p&&(g=yK(g,"y",""),mK(g,"g")===-1&&(g+="g"),y=Z1(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&vK(c,s.lastIndex-1)!==`
|
|
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),em&&(n=new RegExp("^"+v+"$(?!\\s)",g)),Q1&&(r=s.lastIndex),i=pt(jh,p?n:s,y),p?i?(i.input=Z1(i.input,m),i[0]=Z1(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Q1&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),em&&i&&i.length>1&&pt(gK,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=hF(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var cf=Ob;_t({target:"RegExp",proto:!0,forced:/./.exec!==cf},{exec:cf});var e3=Function.prototype,eD=e3.apply,bK=e3.bind,tD=e3.call,gF=typeof Reflect=="object"&&Reflect.apply||(bK?tD.bind(eD):function(){return tD.apply(eD,arguments)}),$K=kn("species"),tm=RegExp.prototype,t3=function(e,t,n,r){var i=kn(e),o=!ut(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ut(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[$K]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=le(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=le(l),v=c.exec;return v===cf||v===tm.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});sf(String.prototype,e,s[0]),sf(tm,i,s[1])}r&&Es(tm[i],"sham",!0)},wK=le("".charAt),nD=le("".charCodeAt),EK=le("".slice),rD=function(e){return function(t,n){var r,i,o=it(Zn(t)),a=Ls(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=nD(o,a))<55296||r>56319||a+1===u||(i=nD(o,a+1))<56320||i>57343?e?wK(o,a):r:e?EK(o,a,a+2):i-56320+(r-55296<<10)+65536}},CK={codeAt:rD(!1),charAt:rD(!0)}.charAt,n3=function(e,t,n){return t+(n?CK(e,t).length:1)},DK=Math.floor,nm=le("".charAt),SK=le("".replace),rm=le("".slice),xK=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,AK=/\$([$&'`]|\d{1,2})/g,OK=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=AK;return i!==void 0&&(i=Gf(i),s=xK),SK(o,s,function(l,c){var f;switch(nm(c,0)){case"$":return"$";case"&":return e;case"`":return rm(t,0,n);case"'":return rm(t,a);case"<":f=i[rm(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=DK(d/10);return p===0?l:p<=u?r[p-1]===void 0?nm(c,1):r[p-1]+nm(c,1):l}f=r[d-1]}return f===void 0?"":f})},BK=ge.TypeError,ff=function(e,t){var n=e.exec;if(Ut(n)){var r=pt(n,e,t);return r!==null&&On(r),r}if(to(e)==="RegExp")return pt(cf,e,t);throw BK("RegExp#exec called on incompatible receiver")},Bb=kn("replace"),FK=Math.max,TK=Math.min,kK=le([].concat),im=le([].push),iD=le("".indexOf),oD=le("".slice),_K="a".replace(/./,"$0")==="$0",aD=!!/./[Bb]&&/./[Bb]("a","$0")==="";t3("replace",function(e,t,n){var r=aD?"$":"$0";return[function(i,o){var a=Zn(this),u=i==null?void 0:y0(i,Bb);return u?pt(u,i,a,o):pt(t,it(a),i,o)},function(i,o){var a=On(this),u=it(i);if(typeof o=="string"&&iD(o,r)===-1&&iD(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ut(o);l||(o=it(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=ff(a,u);if(p===null||(im(d,p),!c))break;it(p[0])===""&&(a.lastIndex=n3(u,Kf(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=it((p=d[y])[0]),$=FK(TK(Ls(p.index),u.length),0),w=[],C=1;C<p.length;C++)im(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=kK([h],w,$,u);D!==void 0&&im(A,D);var I=it(gF(o,void 0,A))}else I=OK(h,u,$,w,D,o);$>=m&&(v+=oD(u,m,$)+I,m=$+h.length)}return v+oD(u,m)}]},!!ut(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!_K||aD);var Fb=kn("unscopables"),Tb=Array.prototype;Tb[Fb]==null&&js.f(Tb,Fb,{configurable:!0,value:hF(null)});var vF=function(e){Tb[Fb][e]=!0},PK=w0.find,uD=!0;"find"in[]&&Array(1).find(function(){uD=!1}),_t({target:"Array",proto:!0,forced:uD},{find:function(e){return PK(this,e,arguments.length>1?arguments[1]:void 0)}}),vF("find");var NK=kn("match"),mF=function(e){var t;return Hn(e)&&((t=e[NK])!==void 0?!!t:to(e)=="RegExp")},IK=ge.TypeError,RK=kn("species"),jK=function(e,t){var n,r=On(e).constructor;return r===void 0||(n=On(r)[RK])==null?t:function(i){if(Jw(i))return i;throw IK(ZB(i)+" is not a constructor")}(n)},yF=function(e,t,n){var r=Uw(t);r in e?js.f(e,r,Lw(0,n)):e[r]=n},LK=ge.Array,MK=Math.max,sD=function(e,t,n){for(var r=$0(e),i=lf(t,r),o=lf(n===void 0?r:n,r),a=LK(MK(o-i,0)),u=0;i<o;i++,u++)yF(a,u,e[i]);return a.length=u,a},vu=fF.UNSUPPORTED_Y,zK=Math.min,bF=[].push,HK=le(/./.exec),mu=le(bF),kl=le("".slice);t3("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a=it(Zn(this)),u=o===void 0?4294967295:o>>>0;if(u===0)return[];if(i===void 0)return[a];if(!mF(i))return pt(t,a,i,u);for(var s,l,c,f=[],d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),p=0,g=new RegExp(i.source,d+"g");(s=pt(cf,g,a))&&!((l=g.lastIndex)>p&&(mu(f,kl(a,p,s.index)),s.length>1&&s.index<a.length&&gF(bF,f,sD(s,1)),c=s[0].length,p=l,f.length>=u));)g.lastIndex===s.index&&g.lastIndex++;return p===a.length?!c&&HK(g,"")||mu(f,""):mu(f,kl(a,p)),f.length>u?sD(f,0,u):f}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:pt(t,this,i,o)}:t,[function(i,o){var a=Zn(this),u=i==null?void 0:y0(i,e);return u?pt(u,i,a,o):pt(r,it(a),i,o)},function(i,o){var a=On(this),u=it(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=jK(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(vu?"g":"y"),d=new l(vu?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return ff(d,u)===null?[u]:[];for(var g=0,v=0,m=[];v<u.length;){d.lastIndex=vu?0:v;var y,h=ff(d,vu?kl(u,v):u);if(h===null||(y=zK(Kf(d.lastIndex+(vu?v:0)),u.length))===g)v=n3(u,v,c);else{if(mu(m,kl(u,g,v)),m.length===p)return m;for(var $=1;$<=h.length-1;$++)if(mu(m,h[$]),m.length===p)return m;v=g=y}}return mu(m,kl(u,g)),m}]},!!ut(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),vu);var _l,kb=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,lD=le("".replace),Lh="["+kb+"]",UK=RegExp("^"+Lh+Lh+"*"),VK=RegExp(Lh+Lh+"*$"),om=function(e){return function(t){var n=it(Zn(t));return 1&e&&(n=lD(n,UK,"")),2&e&&(n=lD(n,VK,"")),n}},WK={start:om(1),end:om(2),trim:om(3)},qK=b0.PROPER,GK=WK.trim;function r3(e){return O("<div>"+e+"</div>").children().filter(function(t){return t.tagName!=="BR"}).length===0}function Ms(e){return e.length===0?"":e[0].outerHTML}function zs(e){return e.length?e[0].tagName.toLowerCase():""}function cr(e,t){for(var n="",r=(e.attr("style")||"").split(";"),i=r.length,o=0;o<i;o++){var a=r[o];if(a){var u=a.split(":");u[0].trim()===t&&(n=u[1].trim())}}return n}_t({target:"String",proto:!0,forced:(_l="trim",ut(function(){return!!kb[_l]()||"\u200B\x85\u180E"[_l]()!=="\u200B\x85\u180E"||qK&&kb[_l].name!==_l}))},{trim:function(){return GK(this)}}),_t({global:!0},{globalThis:ge}),fh&&(O.fn.css=fh),zr&&(O.fn.append=zr),i6&&(O.fn.prepend=i6),as&&(O.fn.addClass=as),us&&(O.fn.removeClass=us),ss&&(O.fn.hasClass=ss),Mr&&(O.fn.on=Mr),e6&&(O.fn.off=e6),vo&&(O.fn.focus=vo),jr&&(O.fn.attr=jr),uh&&(O.fn.removeAttr=uh),cs&&(O.fn.hide=cs),ch&&(O.fn.show=ch),gh&&(O.fn.parents=gh),ls&&(O.fn.dataset=ls),Lr&&(O.fn.val=Lr),ph&&(O.fn.text=ph),go&&(O.fn.html=go),ds&&(O.fn.children=ds),ps&&(O.fn.remove=ps),fs&&(O.fn.find=fs),sh&&(O.fn.width=sh),lh&&(O.fn.height=lh),n6&&(O.fn.filter=n6),hs&&(O.fn.empty=hs);var KK={selector:"p",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}},_b=function(e,t){return _b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},_b(e,t)};/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_b(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bo=function(){return bo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},bo.apply(this,arguments)};function Bo(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function Fo(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function $F(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 ke(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function cD(e){var t=ke(E.nodes(e,{match:function(a){return e.children[0]===a},mode:"highest"}),1),n=t[0];if(n==null)return!1;var r=n[0];if(!te.isElement(r)||r.type==="paragraph"||W.string(r)!=="")return!1;var i=r.children,o=i===void 0?[]:i;return!!X.isText(o[0])&&(P.setNodes(e,{type:"paragraph"}),!0)}var YK={renderElems:[Jq],elemsToHtml:[Zq],parseElemsHtml:[KK],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(i){cD(r)||t(i)},r.deleteForward=function(i){cD(r)||n(i)},r}},XK=/"/g,JK=le("".replace),bc=function(e,t,n,r){var i=it(Zn(e)),o="<"+t;return n!==""&&(o+=" "+n+'="'+JK(it(r),XK,""")+'"'),o+">"+i+"</"+t+">"},$c=function(e){return ut(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})};function am(e,t){var n=t,r=e,i=r.bold,o=r.italic,a=r.underline;return i&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),o&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function Uo(e,t){return e.length!==0&&(!!e[0].matches(t)||e.find(t).length>0)}_t({target:"String",proto:!0,forced:$c("bold")},{bold:function(){return bc(this,"b","","")}}),_t({target:"String",proto:!0,forced:$c("italics")},{italics:function(){return bc(this,"i","","")}}),_t({target:"String",proto:!0,forced:$c("sub")},{sub:function(){return bc(this,"sub","","")}}),_t({target:"String",proto:!0,forced:$c("sup")},{sup:function(){return bc(this,"sup","","")}});var fD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},um=Vw("span").classList,dD=um&&um.constructor&&um.constructor.prototype,ZK=dD===Object.prototype?void 0:dD,wF=function(e,t){var n=[][e];return!!n&&ut(function(){n.call(null,t||function(){throw 1},1)})},QK=w0.forEach,sm=wF("forEach")?[].forEach:function(e){return QK(this,e,arguments.length>1?arguments[1]:void 0)},EF=function(e){if(e&&e.forEach!==sm)try{Es(e,"forEach",sm)}catch{e.forEach=sm}};for(var lm in fD)fD[lm]&&EF(ge[lm]&&ge[lm].prototype);function CF(e,t){return e.selection==null||!!ke(E.nodes(e,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(e,n)},universal:!0}),1)[0]}function eY(e,t){Object.keys(t).forEach(function(n){n!=="text"&&E.removeMark(e,n)})}EF(ZK),_t({target:"Object",stat:!0,forced:ut(function(){Ju(1)})},{keys:function(e){return Ju(Gf(e))}});var Ka=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(t){var n=this.mark,r=E.marks(t);return r?r[n]:!!ke(E.nodes(t,{match:function(i){return i[n]===!0}}),1)[0]},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){return CF(t,this.mark)},e.prototype.exec=function(t,n){var r=this.mark,i=this.marksNeedToRemove;n?t.removeMark(r):(t.addMark(r,!0),i&&i.forEach(function(o){return t.removeMark(o)}))},e}(),tY='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',nY='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',rY='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',iY='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',oY='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',DF='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',SF='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',aY='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',uY='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',sY='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',lY='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',cY='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',fY='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',dY='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',pY='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',hY='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',gY='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',vY='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',mY='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',yY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="bold",n.title=q("textStyle.bold"),n.iconSvg=tY,n.hotkey="mod+b",n}return tt(t,e),t}(Ka),bY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="code",n.title=q("textStyle.code"),n.iconSvg=oY,n.hotkey="mod+e",n}return tt(t,e),t}(Ka),$Y=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="italic",n.title=q("textStyle.italic"),n.iconSvg=rY,n.hotkey="mod+i",n}return tt(t,e),t}(Ka),wY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="through",n.title=q("textStyle.through"),n.iconSvg=iY,n.hotkey="mod+shift+x",n}return tt(t,e),t}(Ka),EY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="underline",n.title=q("textStyle.underline"),n.iconSvg=nY,n.hotkey="mod+u",n}return tt(t,e),t}(Ka),CY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="sub",n.marksNeedToRemove=["sup"],n.title=q("textStyle.sub"),n.iconSvg=mY,n.hotkey="",n}return tt(t,e),t}(Ka),DY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mark="sup",n.marksNeedToRemove=["sub"],n.title=q("textStyle.sup"),n.iconSvg=vY,n.hotkey="",n}return tt(t,e),t}(Ka),SY=function(){function e(){this.title=q("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return CF(t)},e.prototype.exec=function(t,n){var r,i,o=E.nodes(t,{match:function(s){return X.isText(s)},universal:!0});try{for(var a=$F(o),u=a.next();!u.done;u=a.next())eY(t,u.value[0])}catch(s){r={error:s}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e}(),xY={renderStyle:function(e,t){var n=e,r=n.bold,i=n.italic,o=n.underline,a=n.code,u=n.through,s=n.sub,l=n.sup,c=t;return r&&(c=de("strong",null,c)),a&&(c=de("code",null,c)),i&&(c=de("em",null,c)),o&&(c=de("u",null,c)),u&&(c=de("s",null,c)),s&&(c=de("sub",null,c)),l&&(c=de("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new yY}},{key:"underline",factory:function(){return new EY}},{key:"italic",factory:function(){return new $Y}},{key:"through",factory:function(){return new wY}},{key:"code",factory:function(){return new bY}},{key:"sub",factory:function(){return new CY}},{key:"sup",factory:function(){return new DY}},{key:"clearStyle",factory:function(){return new SY}}],styleToHtml:function(e,t){if(!X.isText(e))return t;if(r3(t))return am(e,t);var n=O(t);if(zs(n)==="br")return am(e,"<br>");var r=n.html();return r=am(e,r),n.html(r),Ms(n)},parseStyleHtml:function(e,t,n){var r=O(e);if(!X.isText(t))return t;var i=t;return Uo(r,"b,strong")&&(i.bold=!0),Uo(r,"i,em")&&(i.italic=!0),Uo(r,"u")&&(i.underline=!0),Uo(r,"s,strike")&&(i.through=!0),Uo(r,"sub")&&(i.sub=!0),Uo(r,"sup")&&(i.sup=!0),Uo(r,"code")&&(i.code=!0),i}};function Xf(e){return function(t,n,r){return de("h"+e,null,n)}}var AY={type:"header1",renderElem:Xf(1)},OY={type:"header2",renderElem:Xf(2)},BY={type:"header3",renderElem:Xf(3)},FY={type:"header4",renderElem:Xf(4)},TY={type:"header5",renderElem:Xf(5)},kY=b0.PROPER,Pb=RegExp.prototype,xF=Pb.toString,_Y=le(cF),PY=ut(function(){return xF.call({source:"a",flags:"b"})!="/a/b"}),NY=kY&&xF.name!="toString";(PY||NY)&&sf(RegExp.prototype,"toString",function(){var e=On(this),t=it(e.source),n=e.flags;return"/"+t+"/"+it(n===void 0&&JB(Pb,e)&&!("flags"in Pb)?_Y(e):n)},{unsafe:!0});var cm,IY=ge.TypeError,AF=function(e){if(mF(e))throw IY("The method doesn't accept regular expressions");return e},RY=kn("match"),OF=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[RY]=!1,"/./"[e](t)}catch{}}return!1},jY=Ww.f,pD=le("".startsWith),LY=le("".slice),MY=Math.min,hD=OF("startsWith");function BF(e){var t=ke(E.nodes(e,{match:function(i){return x.getNodeType(i).startsWith("header")},universal:!0}),1),n=t[0];if(n==null)return"paragraph";var r=ke(n,1)[0];return x.getNodeType(r)}function FF(e){return e.selection==null||!ke(E.nodes(e,{match:function(t){var n=x.getNodeType(t);return n==="paragraph"||!!n.startsWith("header")},universal:!0,mode:"highest"}),1)[0]}function TF(e,t){t&&P.setNodes(e,{type:t})}_t({target:"String",proto:!0,forced:!!(hD||(cm=jY(String.prototype,"startsWith"),!cm||cm.writable))&&!hD},{startsWith:function(e){var t=it(Zn(this));AF(e);var n=Kf(MY(arguments.length>1?arguments[1]:void 0,t.length)),r=it(e);return pD?pD(t,r,n):LY(t,n,n+r.length)===r}});var zY=function(){function e(){this.title=q("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(t){var n=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"paragraph",text:q("header.text")}],r=this.getValue(t).toString();return n.forEach(function(i){i.value===r?i.selected=!0:delete i.selected}),n},e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){return BF(t)},e.prototype.isDisabled=function(t){return FF(t)},e.prototype.exec=function(t,n){TF(t,n.toString())},e}(),Jf=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return BF(t)},e.prototype.isActive=function(t){return this.getValue(t)===this.type},e.prototype.isDisabled=function(t){return FF(t)},e.prototype.exec=function(t,n){var r=this.type;TF(t,n===r?"paragraph":r)},e}(),HY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H1",n.type="header1",n}return tt(t,e),t}(Jf),UY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H2",n.type="header2",n}return tt(t,e),t}(Jf),VY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H3",n.type="header3",n}return tt(t,e),t}(Jf),WY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H4",n.type="header4",n}return tt(t,e),t}(Jf),qY=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="H5",n.type="header5",n}return tt(t,e),t}(Jf),GY={key:"headerSelect",factory:function(){return new zY}},KY={key:"header1",factory:function(){return new HY}},YY={key:"header2",factory:function(){return new UY}},XY={key:"header3",factory:function(){return new VY}},JY={key:"header4",factory:function(){return new WY}},ZY={key:"header5",factory:function(){return new qY}};function Pl(e){return function(t,n){return"<h"+e+">"+n+"</h"+e+">"}}function Nl(e){return function(t,n,r){var i=O(t);return(n=n.filter(function(o){return!!X.isText(o)||!!r.isInline(o)})).length===0&&(n=[{text:i.text().replace(/\s+/gm," ")}]),{type:"header"+e,children:n}}}var QY={renderElems:[AY,OY,BY,FY,TY],elemsToHtml:[{type:"header1",elemToHtml:Pl(1)},{type:"header2",elemToHtml:Pl(2)},{type:"header3",elemToHtml:Pl(3)},{type:"header4",elemToHtml:Pl(4)},{type:"header5",elemToHtml:Pl(5)}],parseElemsHtml:[{selector:"h1",parseElemHtml:Nl(1)},{selector:"h2",parseElemHtml:Nl(2)},{selector:"h3",parseElemHtml:Nl(3)},{selector:"h4",parseElemHtml:Nl(4)},{selector:"h5",parseElemHtml:Nl(5)}],menus:[GY,KY,YY,XY,JY,ZY],editorPlugin:function(e){var t=e.insertBreak;e.insertNode;var n=e;return n.insertBreak=function(){var r=ke(E.nodes(n,{match:function(i){return x.getNodeType(i).startsWith("header")},universal:!0}),1)[0];r&&x.isSelectionAtLineEnd(e,r[1])?P.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):t()},n}},yu=Object.assign,gD=Object.defineProperty,eX=le([].concat),vD=!yu||ut(function(){if(dr&&yu({b:1},yu(gD({},"a",{enumerable:!0,get:function(){gD(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(i){t[i]=i}),yu({},e)[n]!=7||Ju(yu({},t)).join("")!=r})?function(e,t){for(var n=Gf(e),r=arguments.length,i=1,o=aF.f,a=YB.f;r>i;)for(var u,s=m0(arguments[i++]),l=o?eX(Ju(s),o(s)):Ju(s),c=l.length,f=0;c>f;)u=l[f++],dr&&!pt(a,s,u)||(n[u]=s[u]);return n}:yu;function Ia(e,t){e.data==null&&(e.data={});var n=e.data;n.style==null&&(n.style={}),Object.assign(n.style,t)}_t({target:"Object",stat:!0,forced:Object.assign!==vD},{assign:vD});var tX={selector:"font",preParseHtml:function(e){var t=O(e);if(zs(t)!=="font")return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}},kF=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(t,n){},e.prototype.getValue=function(t){var n=this.mark,r=E.marks(t);return r&&r[n]?r[n]:""},e.prototype.isActive=function(t){return!!this.getValue(t)},e.prototype.isDisabled=function(t){return t.selection==null||!!ke(E.nodes(t,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){var n=this.mark;if(this.$content==null){var r=O('<ul class="w-e-panel-content-color"></ul>');r.on("click","li",function(l){var c=l.target;if(c!=null&&(l.preventDefault(),t.selection!=null)){var f=O(c).attr("data-value");f==="0"?E.removeMark(t,n):E.addMark(t,n,f)}}),this.$content=r}var i=this.$content;if(i==null)return document.createElement("ul");i.empty();var o=this.getValue(t),a=t.getMenuConfig(n).colors;(a===void 0?[]:a).forEach(function(l){var c=O('<div class="color-block" data-value="'+l+'"></div>');c.css("background-color",l);var f=O('<li data-value="'+l+'"></li>');o===l&&f.addClass("active"),f.append(c),i.append(f)});var u="";n==="color"&&(u=q("color.default")),n==="bgColor"&&(u=q("color.clear"));var s=O(`
|
|
<li data-value="0" class="clear">
|
|
<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>
|
|
`+u+`
|
|
</li>
|
|
`);return i.prepend(s),i[0]},e}(),nX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.color"),n.iconSvg=aY,n.mark="color",n}return tt(t,e),t}(kF),rX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.bgColor"),n.iconSvg=uY,n.mark="bgColor",n}return tt(t,e),t}(kF),mD=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],iX={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,o=t;return r&&Ia(o,{color:r}),i&&Ia(o,{backgroundColor:i}),o},styleToHtml:function(e,t){if(!X.isText(e))return t;var n,r=e,i=r.color,o=r.bgColor;return i||o?((r3(t)||zs(n=O(t))!=="span")&&(n=O("<span>"+t+"</span>")),i&&n.css("color",i),o&&n.css("background-color",o),Ms(n)):t},preParseHtml:[tX],parseStyleHtml:function(e,t,n){var r=O(e);if(!X.isText(t))return t;var i=t,o=cr(r,"color");o&&(i.color=o);var a=cr(r,"background-color");return a||(a=cr(r,"background")),a&&(i.bgColor=a),i},menus:[{key:"color",factory:function(){return new nX},config:{colors:mD}},{key:"bgColor",factory:function(){return new rX},config:{colors:mD}}]},oX=function(e){if(typeof e!="string")return!1;var t=e.match(aX);if(!t)return!1;var n=t[1];return n?!!(uX.test(n)||sX.test(n)):!1},aX=/^(?:\w+:)?\/\/(\S+)$/,uX=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,sX=/^[^\s\.]+\.\S{2,}$/,lX=iF.includes;function E0(e){return e===void 0&&(e="r"),e+"-"+U9()}function i3(e){return e.replace(/</g,"<").replace(/>/g,">")}function _F(e,t,n,r){return Bo(this,void 0,void 0,function(){var i,o;return Fo(this,function(a){switch(a.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if(typeof(o=a.sent())=="string")return t.alert(o,"error"),[2,!1];if(o==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function PF(e,t,n){return Bo(this,void 0,void 0,function(){var r;return Fo(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function o3(e){return e.selection==null||!!x.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)||void 0})}function fm(e,t){return{type:"link",url:i3(e),children:t?[{text:t}]:[]}}function NF(e,t,n){return Bo(this,void 0,void 0,function(){var r,i,o;return Fo(this,function(a){switch(a.label){case 0:return n?(t||(t=n),e.restoreSelection(),o3(e)?[2]:[4,_F("insertLink",e,t,n)]):[2];case 1:return a.sent()?[4,PF("insertLink",e,n)]:[2];case 2:return r=a.sent(),(i=e.selection)==null?[2]:(R.isCollapsed(i)?(e.insertText(" "),o=fm(r,t),P.insertNodes(e,o),e.insertFragment([{text:" "}])):E.string(e,i)!==t?(e.deleteFragment(),o=fm(r,t),P.insertNodes(e,o)):(o=fm(r),P.wrapNodes(e,o,{split:!0}),P.collapse(e,{edge:"end"})),[2])}})})}_t({target:"Array",proto:!0},{includes:function(e){return lX(this,e,arguments.length>1?arguments[1]:void 0)}}),vF("includes");var cX={type:"link",renderElem:function(e,t,n){var r=e,i=r.url,o=r.target;return de("a",{href:i,target:o===void 0?"_blank":o},t)}},fX={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,i=n.target;return'<a href="'+r+'" target="'+(i===void 0?"_blank":i)+'">'+t+"</a>"}},dX={selector:"a",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};function dm(){return E0("w-e-insert-link")}var pX=function(){function e(){this.title=q("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=dm(),this.urlInputId=dm(),this.buttonId=dm()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return o3(t)},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(t){var n=t.selection,r=this,i=r.textInputId,o=r.urlInputId,a=r.buttonId,u=ke(Cn(q("link.text"),i),2),s=u[0],l=u[1],c=O(l),f=ke(Cn(q("link.url"),o),2),d=f[0],p=f[1],g=O(p),v=ke(Is(a,q("common.ok")),1)[0];if(this.$content==null){var m=O("<div></div>");m.on("click","#"+a,function($){$.preventDefault();var w=m.find("#"+i).val(),C=m.find("#"+o).val();NF(t,w,C),t.hidePanelOrModal()}),this.$content=m}var y=this.$content;if(y.empty(),y.append(s),y.append(d),y.append(v),n==null||R.isCollapsed(n))c.val("");else{var h=E.string(t,n);c.val(h)}return g.val(""),setTimeout(function(){c.focus()}),y[0]},e}();function yD(){return E0("w-e-update-link")}var hX=function(){function e(){this.title=q("link.edit"),this.iconSvg=DF,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=yD(),this.buttonId=yD()}return e.prototype.getSelectedLinkElem=function(t){var n=x.getSelectedNodeByType(t,"link");return n==null?null:n},e.prototype.getValue=function(t){var n=this.getSelectedLinkElem(t);return n&&n.url||""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedLinkElem(t)==null},e.prototype.getModalPositionNode=function(t){return x.getSelectedNodeByType(t,"link")},e.prototype.getModalContentElem=function(t){var n=this.urlInputId,r=this.buttonId,i=ke(Cn(q("link.url"),n),2),o=i[0],a=i[1],u=O(a),s=ke(Is(r,q("common.ok")),1)[0];if(this.$content==null){var l=O("<div></div>");l.on("click","button",function(d){d.preventDefault(),t.restoreSelection();var p=x.getSelectedNodeByType(t,"link"),g=p?W.string(p):"",v=l.find("#"+n).val();(function(m,y,h){Bo(this,void 0,void 0,function(){var $,w;return Fo(this,function(C){switch(C.label){case 0:return h?[4,_F("editLink",m,y,h)]:[2];case 1:return C.sent()?[4,PF("editLink",m,h)]:[2];case 2:return $=C.sent(),w={url:i3($)},P.setNodes(m,w,{match:function(D){return x.checkNodeType(D,"link")}}),[2]}})})})(t,g,v),t.hidePanelOrModal()}),this.$content=l}var c=this.$content;c.empty(),c.append(o),c.append(s);var f=this.getValue(t);return u.val(f),setTimeout(function(){u.focus()}),c[0]},e}(),gX=function(){function e(){this.title=q("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||x.getSelectedNodeByType(t,"link")==null},e.prototype.exec=function(t,n){this.isDisabled(t)||P.unwrapNodes(t,{match:function(r){return x.checkNodeType(r,"link")}})},e}(),vX=function(){function e(){this.title=q("link.view"),this.iconSvg=SF,this.tag="button"}return e.prototype.getSelectedLinkElem=function(t){var n=x.getSelectedNodeByType(t,"link");return n==null?null:n},e.prototype.getValue=function(t){var n=this.getSelectedLinkElem(t);return n&&n.url||""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedLinkElem(t)==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){if(!n||typeof n!="string")throw new Error("View link failed, link url is '"+n+"'");window.open(n,"_blank")}},e}(),bD={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},mX={renderElems:[cX],elemsToHtml:[fX],parseElemsHtml:[dX],menus:[{key:"insertLink",factory:function(){return new pX},config:bD},{key:"editLink",factory:function(){return new hX},config:bD},{key:"unLink",factory:function(){return new gX}},{key:"viewLink",factory:function(){return new vX}}],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode;e.insertNode,e.insertText;var i=e;return i.isInline=function(o){return o.type==="link"||t(o)},i.insertData=function(o){var a=o.getData("text/plain");if(oX(a)){if(!o3(i)){var u=i.selection;if(u!=null){var s=E.string(i,u);NF(i,s,a)}}}else n(o)},i.normalizeNode=function(o){var a=ke(o,2),u=a[0],s=a[1];return x.getNodeType(u)!=="link"?r([u,s]):W.string(u)===""?P.removeNodes(i,{at:s}):r([u,s])},i}},yX=le(1 .valueOf),bX=ge.RangeError,$X=ge.RangeError,IF=ge.String,RF=Math.floor,Nb=le(function(e){var t=it(Zn(this)),n="",r=Ls(e);if(r<0||r==1/0)throw bX("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),$D=le("".slice),Il=le(1 .toFixed),Vu=function(e,t,n){return t===0?n:t%2==1?Vu(e,t-1,n*e):Vu(e*e,t/2,n)},bu=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=RF(i/1e7)},pm=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=RF(r/t),r=r%t*1e7},wD=function(e){for(var t=6,n="";--t>=0;)if(n!==""||t===0||e[t]!==0){var r=IF(e[t]);n=n===""?r:n+Nb("0",7-r.length)+r}return n};function jF(e,t){return"w-e-image-container-"+x.findKey(e,t).id}function wX(e,t,n,r){var i=O("body"),o=jF(e,t),a=r.width,u=r.height,s=0,l=0,c=0,f=!1,d=null;function p(y){d=function(){var w=O("#"+o);if(w.length===0)throw new Error("Cannot find image container elem");return w}(),s=y;var h=d.find("img");if(h.length===0)throw new Error("Cannot find image elem");l=h.width(),c=h.height(),i.on("mousemove",g),i.on("mouseup",v);var $=x.getHoverbar(e);$&&$.hideAndClean()}var g=Fa(function(y){y.preventDefault();var h=y.clientX,$=l+(f?s-h:h-s),w=c*($/l);d!=null&&($<=15||w<=15||(d.css("width",$+"px"),d.css("height",w+"px")))},100);function v(y){if(i.off("mousemove",g),d!=null){var h=d.width().toFixed(2),$=d.height().toFixed(2),w={style:bo(bo({},t.style),{width:h+"px",height:$+"px"})};P.setNodes(e,w,{at:x.findPath(e,t)}),i.off("mouseup",v)}}var m={};return a&&(m.width=a),u&&(m.height=u),de("div",{id:o,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(y){var h=O(y.target);h.hasClass("w-e-image-dragger")&&(y.preventDefault(),(h.hasClass("left-top")||h.hasClass("left-bottom"))&&(f=!0),p(y.clientX))}}},n,de("div",{className:"w-e-image-dragger left-top"}),de("div",{className:"w-e-image-dragger right-top"}),de("div",{className:"w-e-image-dragger left-bottom"}),de("div",{className:"w-e-image-dragger right-bottom"}))}_t({target:"Number",proto:!0,forced:ut(function(){return Il(8e-5,3)!=="0.000"||Il(.9,0)!=="1"||Il(1.255,2)!=="1.25"||Il(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!ut(function(){Il({})})},{toFixed:function(e){var t,n,r,i,o=yX(this),a=Ls(e),u=[0,0,0,0,0,0],s="",l="0";if(a<0||a>20)throw $X("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return IF(o);if(o<0&&(s="-",o=-o),o>1e-21)if(n=(t=function(c){for(var f=0,d=c;d>=4096;)f+=12,d/=4096;for(;d>=2;)f+=1,d/=2;return f}(o*Vu(2,69,1))-69)<0?o*Vu(2,-t,1):o/Vu(2,t,1),n*=4503599627370496,(t=52-t)>0){for(bu(u,0,n),r=a;r>=7;)bu(u,1e7,0),r-=7;for(bu(u,Vu(10,r,1),0),r=t-1;r>=23;)pm(u,1<<23),r-=23;pm(u,1<<r),bu(u,1,1),pm(u,2),l=wD(u)}else bu(u,0,n),bu(u,1<<-t,0),l=wD(u)+Nb("0",a);return l=a>0?s+((i=l.length)<=a?"0."+Nb("0",a-i)+l:$D(l,0,i-a)+"."+$D(l,i-a)):s+l}});var EX={type:"image",renderElem:function(e,t,n){var r=e,i=r.src,o=r.alt,a=o===void 0?"":o,u=r.href,s=u===void 0?"":u,l=r.style,c=l===void 0?{}:l,f=c.width,d=f===void 0?"":f,p=c.height,g=p===void 0?"":p,v=x.isNodeSelected(n,e),m={};d&&(m.width="100%"),g&&(m.height="100%");var y=de("img",{style:m,src:i,alt:a,"data-href":s}),h=n.isDisabled();return v&&!h?wX(n,e,y,{width:d,height:g}):function($,w,C,D){var A=D.width,I=D.height,M={};A&&(M.width=A),I&&(M.height=I);var V=jF($,w);return de("div",{id:V,style:M,className:"w-e-image-container"},C)}(n,e,y,{width:d,height:g})}},CX={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,i=n.alt,o=i===void 0?"":i,a=n.href,u=a===void 0?"":a,s=n.style,l=s===void 0?{}:s,c=l.width,f=c===void 0?"":c,d=l.height,p=d===void 0?"":d,g="";return f&&(g+="width: "+f+";"),p&&(g+="height: "+p+";"),'<img src="'+r+'" alt="'+o+'" data-href="'+u+'" style="'+g+'"/>'}},DX={selector:"img",parseElemHtml:function(e,t,n){var r=O(e),i=r.attr("data-href")||"";return i=decodeURIComponent(i),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:i,style:{width:cr(r,"width"),height:cr(r,"height")},children:[{text:""}]}}};function LF(e,t,n,r,i){return r===void 0&&(r=""),i===void 0&&(i=""),Bo(this,void 0,void 0,function(){var o,a;return Fo(this,function(u){switch(u.label){case 0:return(o=t.getMenuConfig(e).checkImage)?[4,o(n,r,i)]:[3,2];case 1:if(typeof(a=u.sent())=="string")return t.alert(a,"error"),[2,!1];if(a==null)return[2,!1];u.label=2;case 2:return[2,!0]}})})}function MF(e,t,n){return Bo(this,void 0,void 0,function(){var r;return Fo(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function ga(e,t,n,r){return n===void 0&&(n=""),r===void 0&&(r=""),Bo(this,void 0,void 0,function(){var i,o,a;return Fo(this,function(u){switch(u.label){case 0:return[4,LF("insertImage",e,t,n,r)];case 1:return u.sent()?[4,MF("insertImage",e,t)]:[2];case 2:return i=u.sent(),o={type:"image",src:i3(i),href:r,alt:n,style:{},children:[{text:""}]},e.selection===null&&e.restoreSelection(),x.getSelectedNodeByType(e,"image")&&e.move(1),C0(e)?[2]:(P.insertNodes(e,o),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(o),[2])}})})}function SX(e,t,n,r,i){return n===void 0&&(n=""),r===void 0&&(r=""),i===void 0&&(i={}),Bo(this,void 0,void 0,function(){var o,a,u,s,l,c;return Fo(this,function(f){switch(f.label){case 0:return[4,LF("editImage",e,t,n,r)];case 1:return f.sent()?[4,MF("editImage",e,t)]:[2];case 2:return o=f.sent(),(a=x.getSelectedNodeByType(e,"image"))==null?[2]:(u=a.style,s={src:o,alt:n,href:r,style:bo(bo({},u===void 0?{}:u),i)},P.setNodes(e,s,{match:function(d){return x.checkNodeType(d,"image")}}),l=x.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l),[2])}})})}function C0(e){var t=e.selection;return t==null||!R.isCollapsed(t)||!!ke(E.nodes(e,{match:function(n){var r=x.getNodeType(n);return r==="code"||r==="pre"||r==="link"||r==="list-item"||!!r.startsWith("header")||r==="blockquote"||!!E.isVoid(e,n)},universal:!0}),1)[0]}function Qd(){return E0("w-e-insert-image")}var xX=function(){function e(){this.title=q("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Qd(),this.altInputId=Qd(),this.hrefInputId=Qd(),this.buttonId=Qd()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){return C0(t)},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(t){var n=this,r=this,i=r.srcInputId,o=r.altInputId,a=r.hrefInputId,u=r.buttonId,s=ke(Cn(q("image.src"),i),2),l=s[0],c=s[1],f=O(c),d=ke(Cn(q("image.desc"),o),2),p=d[0],g=d[1],v=O(g),m=ke(Cn(q("image.link"),a),2),y=m[0],h=m[1],$=O(h),w=ke(Is(u,q("common.ok")),1)[0];if(this.$content==null){var C=O("<div></div>");C.on("click","#"+u,function(A){A.preventDefault();var I=C.find("#"+i).val().trim(),M=C.find("#"+o).val().trim(),V=C.find("#"+a).val().trim();n.insertImage(t,I,M,V),t.hidePanelOrModal()}),this.$content=C}var D=this.$content;return D.empty(),D.append(l),D.append(p),D.append(y),D.append(w),f.val(""),v.val(""),$.val(""),setTimeout(function(){f.focus()}),D[0]},e.prototype.insertImage=function(t,n,r,i){r===void 0&&(r=""),i===void 0&&(i=""),n&&(t.restoreSelection(),this.isDisabled(t)||ga(t,n,r,i))},e}(),AX=function(){function e(){this.title=q("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||x.getSelectedNodeByType(t,"image")==null},e.prototype.exec=function(t,n){this.isDisabled(t)||P.removeNodes(t,{match:function(r){return x.checkNodeType(r,"image")}})},e}();function ep(){return E0("w-e-edit-image")}var OX=function(){function e(){this.title=q("image.edit"),this.iconSvg=DF,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=ep(),this.altInputId=ep(),this.hrefInputId=ep(),this.buttonId=ep()}return e.prototype.getValue=function(t){return""},e.prototype.getImageNode=function(t){return x.getSelectedNodeByType(t,"image")},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,n){},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!R.isCollapsed(n)||x.getSelectedNodeByType(t,"image")==null},e.prototype.getModalPositionNode=function(t){return this.getImageNode(t)},e.prototype.getModalContentElem=function(t){var n=this,r=this,i=r.srcInputId,o=r.altInputId,a=r.hrefInputId,u=r.buttonId,s=this.getImageNode(t);if(s==null)throw new Error("Not found selected image node");var l=ke(Cn(q("image.src"),i),2),c=l[0],f=l[1],d=O(f),p=ke(Cn(q("image.desc"),o),2),g=p[0],v=p[1],m=O(v),y=ke(Cn(q("image.link"),a),2),h=y[0],$=y[1],w=O($),C=ke(Is(u,q("common.ok")),1)[0];if(this.$content==null){var D=O("<div></div>");D.on("click","#"+u,function(se){se.preventDefault();var ee=D.find("#"+i).val(),ae=D.find("#"+o).val(),fe=D.find("#"+a).val();n.updateImage(t,ee,ae,fe),t.hidePanelOrModal()}),this.$content=D}var A=this.$content;A.empty(),A.append(c),A.append(g),A.append(h),A.append(C);var I=s,M=I.src,V=I.alt,Y=V===void 0?"":V,J=I.href,Z=J===void 0?"":J;return d.val(M),m.val(Y),w.val(Z),setTimeout(function(){d.focus()}),A[0]},e.prototype.updateImage=function(t,n,r,i,o){r===void 0&&(r=""),i===void 0&&(i=""),o===void 0&&(o={}),n&&(t.restoreSelection(),this.isDisabled(t)||SX(t,n,r,i,o))},e}(),BX=function(){function e(){this.title=q("image.viewLink"),this.iconSvg=SF,this.tag="button"}return e.prototype.getValue=function(t){var n=x.getSelectedNodeByType(t,"image");return n&&n.href||""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!this.getValue(t)},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){if(!n||typeof n!="string")throw new Error("View image link failed, image.href is '"+n+"'");window.open(n,"_blank")}},e}(),a3=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.getSelectedNode=function(t){return x.getSelectedNodeByType(t,"image")},e.prototype.isDisabled=function(t){return t.selection==null||this.getSelectedNode(t)==null},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=this.getSelectedNode(t);if(r!=null){var i=x.getHoverbar(t);i&&i.hideAndClean();var o=r.style,a={style:bo(bo({},o===void 0?{}:o),{width:this.value,height:""})};P.setNodes(t,a,{match:function(u){return x.checkNodeType(u,"image")}})}}},e}(),FX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="30%",n.value="30%",n}return tt(t,e),t}(a3),TX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="50%",n.value="50%",n}return tt(t,e),t}(a3),kX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title="100%",n.value="100%",n}return tt(t,e),t}(a3),ED={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}},_X={renderElems:[EX],elemsToHtml:[CX],parseElemsHtml:[DX],menus:[{key:"insertImage",factory:function(){return new xX},config:ED},{key:"deleteImage",factory:function(){return new AX}},{key:"editImage",factory:function(){return new OX},config:ED},{key:"viewImageLink",factory:function(){return new BX}},{key:"imageWidth30",factory:function(){return new FX}},{key:"imageWidth50",factory:function(){return new TX}},{key:"imageWidth100",factory:function(){return new kX}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid;e.insertNode;var r=e;return r.isInline=function(i){return i.type==="image"||t(i)},r.isVoid=function(i){return i.type==="image"||n(i)},r}},PX={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var i=e.checked,o=de("div",{style:{margin:"5px 0"}},de("span",{contentEditable:!1,style:{marginRight:"0.5em"}},de("input",{type:"checkbox",checked:i,disabled:r,on:{change:function(a){var u=x.findPath(n,e),s={checked:a.target.checked};P.setNodes(n,s,{at:u})}}})),de("span",null,t));return o}},NX=function(){function e(){this.title=q("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!x.getSelectedNodeByType(t,"todo")},e.prototype.isDisabled=function(t){return t.selection==null||!!x.getSelectedElems(t).some(function(n){if(E.isVoid(t,n)&&E.isBlock(t,n))return!0;var r=n.type;return!!["pre","table","bulleted-list","numbered-list"].includes(r)||void 0})},e.prototype.exec=function(t,n){var r=this.isActive(t);P.setNodes(t,{type:r?"paragraph":"todo"})},e}(),IX={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=O(e);(t=t.filter(function(o){return!!X.isText(o)||!!n.isInline(o)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var i=!1;return r.find('input[type="checkbox"]').attr("checked")!=null&&(i=!0),{type:"todo",checked:i,children:t}}},RX={renderElems:[PX],elemsToHtml:[{type:"todo",elemToHtml:function(e,t){return'<div data-w-e-type="todo"><input type="checkbox" disabled '+(e.checked?"checked":"")+">"+t+"</div>"}}],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=O(e).find("li"),n=O('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML=n[0].innerHTML+t[0].innerHTML,n[0]}}],parseElemsHtml:[IX],menus:[{key:"todo",factory:function(){return new NX}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(r){var i=e.selection;if(i&&R.isCollapsed(i)){var o=x.getSelectedNodeByType(e,"todo");if(o&&W.string(o).length===0)return void P.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(r)},n}},jX={type:"blockquote",renderElem:function(e,t,n){return de("blockquote",null,t)}},LX={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>"+t+"</blockquote>"}},MX={selector:"blockquote",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}},zX=function(){function e(){this.title=q("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!x.getSelectedNodeByType(t,"blockquote")},e.prototype.isDisabled=function(t){return t.selection==null||!ke(E.nodes(t,{match:function(n){var r=x.getNodeType(n);return r==="paragraph"||r==="blockquote"},universal:!0,mode:"highest"}),1)[0]},e.prototype.exec=function(t,n){if(!this.isDisabled(t)){var r=this.isActive(t)?"paragraph":"blockquote";P.setNodes(t,{type:r},{mode:"highest"})}},e}(),HX={key:"blockquote",factory:function(){return new zX}},UX=le([].slice),VX=Zw("slice"),WX=kn("species"),hm=ge.Array,qX=Math.max;_t({target:"Array",proto:!0,forced:!VX},{slice:function(e,t){var n,r,i,o=Rs(this),a=$0(o),u=lf(e,a),s=lf(t===void 0?a:t,a);if(Rh(o)&&(n=o.constructor,(Jw(n)&&(n===hm||Rh(n.prototype))||Hn(n)&&(n=n[WX])===null)&&(n=void 0),n===hm||n===void 0))return UX(o,u,s);for(r=new(n===void 0?hm:n)(qX(s-u,0)),i=0;u<s;u++,i++)u in o&&yF(r,i,o[u]);return r.length=i,r}});var GX={renderElems:[jX],elemsToHtml:[LX],parseElemsHtml:[MX],menus:[HX],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var i=r.selection;if(i==null)return t();var o=ke(E.nodes(e,{match:function(c){return x.checkNodeType(c,"blockquote")},universal:!0}),1)[0];if(!o)return t();var a=o[0],u=x.findPath(e,a),s=E.end(e,u);if($e.equals(s,i.focus)){var l=W.string(a);if(l&&l.slice(-1)===`
|
|
`)return e.deleteBackward("character"),void P.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(`
|
|
`)},r}},KX=function(){function e(){this.title=q("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(t,n){},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!ke(E.nodes(t,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){if(this.$content==null){var n=O('<ul class="w-e-panel-content-emotion"></ul>');n.on("click","li",function(o){var a=o.target;if(a!=null){o.preventDefault();var u=O(a).text();t.insertText(u)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement("ul");r.empty();var i=t.getMenuConfig("emotion").emotions;return(i===void 0?[]:i).forEach(function(o){var a=O("<li>"+o+"</li>");r.append(a)}),r[0]},e}(),YX={menus:[{key:"emotion",factory:function(){return new KX},config:{emotions:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463} \u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(" ")}}]},XX={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},JX={selector:"font",preParseHtml:function(e){var t=O(e);if(zs(t)!=="font")return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",XX[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}},ZX=le("".indexOf);_t({target:"String",proto:!0,forced:!OF("includes")},{includes:function(e){return!!~ZX(it(Zn(this)),it(AF(e)),arguments.length>1?arguments[1]:void 0)}});var Ti,zp,zF=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.mark,r=E.marks(t);return r&&r[n]?r[n]:""},e.prototype.isDisabled=function(t){return t.selection==null||(this.mark,!!ke(E.nodes(t,{match:function(n){return x.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0])},e.prototype.exec=function(t,n){var r=this.mark;n?t.addMark(r,n):t.removeMark(r)},e}(),QX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("fontSize.title"),n.iconSvg=sY,n.mark="fontSize",n}return tt(t,e),t.prototype.getOptions=function(n){var r=[],i=n.getMenuConfig(this.mark).fontSizeList,o=i===void 0?[]:i;r.push({text:q("fontSize.default"),value:""}),o.forEach(function(u){r.push({text:u,value:u})});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},t}(zF),tp=function(e){return e&&e.Math==Math&&e},Ee=tp(typeof globalThis=="object"&&globalThis)||tp(typeof window=="object"&&window)||tp(typeof self=="object"&&self)||tp(typeof _h=="object"&&_h)||function(){return this}()||Function("return this")(),u3=Function.prototype,CD=u3.apply,eJ=u3.bind,DD=u3.call,HF=typeof Reflect=="object"&&Reflect.apply||(eJ?DD.bind(CD):function(){return DD.apply(CD,arguments)}),UF=Function.prototype,Ib=UF.bind,Rb=UF.call,tJ=Ib&&Ib.bind(Rb),ht=Ib?function(e){return e&&tJ(Rb,e)}:function(e){return e&&function(){return Rb.apply(e,arguments)}},Vt=function(e){return typeof e=="function"},Bn=function(e){try{return!!e()}catch{return!0}},hn=!Bn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Rl=Function.prototype.call,ar=Rl.bind?Rl.bind(Rl):function(){return Rl.apply(Rl,arguments)},SD={}.propertyIsEnumerable,xD=Object.getOwnPropertyDescriptor,nJ=xD&&!SD.call({1:2},1)?function(e){var t=xD(this,e);return!!t&&t.enumerable}:SD,s3={f:nJ},Ra=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},rJ=ht({}.toString),iJ=ht("".slice),va=function(e){return iJ(rJ(e),8,-1)},gm=Ee.Object,oJ=ht("".split),VF=Bn(function(){return!gm("z").propertyIsEnumerable(0)})?function(e){return va(e)=="String"?oJ(e,""):gm(e)}:gm,aJ=Ee.TypeError,l3=function(e){if(e==null)throw aJ("Can't call method on "+e);return e},qr=function(e){return VF(l3(e))},Un=function(e){return typeof e=="object"?e!==null:Vt(e)},Ln={},AD=function(e){return Vt(e)?e:void 0},Zf=function(e,t){return arguments.length<2?AD(Ln[e])||AD(Ee[e]):Ln[e]&&Ln[e][t]||Ee[e]&&Ee[e][t]},WF=ht({}.isPrototypeOf),vm=Zf("navigator","userAgent")||"",OD=Ee.process,BD=Ee.Deno,FD=OD&&OD.versions||BD&&BD.version,TD=FD&&FD.v8;TD&&(zp=(Ti=TD.split("."))[0]>0&&Ti[0]<4?1:+(Ti[0]+Ti[1])),!zp&&vm&&(!(Ti=vm.match(/Edge\/(\d+)/))||Ti[1]>=74)&&(Ti=vm.match(/Chrome\/(\d+)/))&&(zp=+Ti[1]);var Mh=zp,Sr=!!Object.getOwnPropertySymbols&&!Bn(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Mh&&Mh<41}),c3=Sr&&!Symbol.sham&&typeof Symbol.iterator=="symbol",uJ=Ee.Object,Zu=c3?function(e){return typeof e=="symbol"}:function(e){var t=Zf("Symbol");return Vt(t)&&WF(t.prototype,uJ(e))},sJ=Ee.String,lJ=Ee.TypeError,qF=function(e){if(Vt(e))return e;throw lJ(function(t){try{return sJ(t)}catch{return"Object"}}(e)+" is not a function")},cJ=Ee.TypeError,fJ=Object.defineProperty,ro=Ee["__core-js_shared__"]||function(e,t){try{fJ(Ee,e,{value:t,configurable:!0,writable:!0})}catch{Ee[e]=t}return t}("__core-js_shared__",{}),Ya=v0(function(e){(e.exports=function(t,n){return ro[t]||(ro[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),dJ=Ee.Object,Qf=function(e){return dJ(l3(e))},pJ=ht({}.hasOwnProperty),Te=Object.hasOwn||function(e,t){return pJ(Qf(e),t)},hJ=0,gJ=Math.random(),vJ=ht(1 .toString),zh=function(e){return"Symbol("+(e===void 0?"":e)+")_"+vJ(++hJ+gJ,36)},jl=Ya("wks"),ma=Ee.Symbol,kD=ma&&ma.for,mJ=c3?ma:ma&&ma.withoutSetter||zh,_n=function(e){if(!Te(jl,e)||!Sr&&typeof jl[e]!="string"){var t="Symbol."+e;Sr&&Te(ma,e)?jl[e]=ma[e]:jl[e]=c3&&kD?kD(t):mJ(t)}return jl[e]},yJ=Ee.TypeError,bJ=_n("toPrimitive"),$J=function(e,t){if(!Un(e)||Zu(e))return e;var n,r,i=(n=e[bJ])==null?void 0:qF(n);if(i){if(t===void 0&&(t="default"),r=ar(i,e,t),!Un(r)||Zu(r))return r;throw yJ("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(o,a){var u,s;if(a==="string"&&Vt(u=o.toString)&&!Un(s=ar(u,o))||Vt(u=o.valueOf)&&!Un(s=ar(u,o))||a!=="string"&&Vt(u=o.toString)&&!Un(s=ar(u,o)))return s;throw cJ("Can't convert object to primitive value")}(e,t)},Hs=function(e){var t=$J(e,"string");return Zu(t)?t:t+""},jb=Ee.document,wJ=Un(jb)&&Un(jb.createElement),GF=function(e){return wJ?jb.createElement(e):{}},KF=!hn&&!Bn(function(){return Object.defineProperty(GF("div"),"a",{get:function(){return 7}}).a!=7}),_D=Object.getOwnPropertyDescriptor,f3={f:hn?_D:function(e,t){if(e=qr(e),t=Hs(t),KF)try{return _D(e,t)}catch{}if(Te(e,t))return Ra(!ar(s3.f,e,t),e[t])}},EJ=/#|\.prototype\./,ed=function(e,t){var n=DJ[CJ(e)];return n==xJ||n!=SJ&&(Vt(t)?Bn(t):!!t)},CJ=ed.normalize=function(e){return String(e).replace(EJ,".").toLowerCase()},DJ=ed.data={},SJ=ed.NATIVE="N",xJ=ed.POLYFILL="P",AJ=ed,PD=ht(ht.bind),YF=function(e,t){return qF(e),t===void 0?e:PD?PD(e,t):function(){return e.apply(t,arguments)}},OJ=Ee.String,BJ=Ee.TypeError,ja=function(e){if(Un(e))return e;throw BJ(OJ(e)+" is not an object")},FJ=Ee.TypeError,ND=Object.defineProperty,Xa={f:hn?ND:function(e,t,n){if(ja(e),t=Hs(t),ja(n),KF)try{return ND(e,t,n)}catch{}if("get"in n||"set"in n)throw FJ("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Ar=hn?function(e,t,n){return Xa.f(e,t,Ra(1,n))}:function(e,t,n){return e[t]=n,e},TJ=f3.f,kJ=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return HF(e,this,arguments)};return t.prototype=e.prototype,t},Vi=function(e,t){var n,r,i,o,a,u,s,l,c=e.target,f=e.global,d=e.stat,p=e.proto,g=f?Ee:d?Ee[c]:(Ee[c]||{}).prototype,v=f?Ln:Ln[c]||Ar(Ln,c,{})[c],m=v.prototype;for(i in t)n=!AJ(f?i:c+(d?".":"#")+i,e.forced)&&g&&Te(g,i),a=v[i],n&&(u=e.noTargetGet?(l=TJ(g,i))&&l.value:g[i]),o=n&&u?u:t[i],n&&typeof a==typeof o||(s=e.bind&&n?YF(o,Ee):e.wrap&&n?kJ(o):p&&Vt(o)?ht(o):o,(e.sham||o&&o.sham||a&&a.sham)&&Ar(s,"sham",!0),Ar(v,i,s),p&&(Te(Ln,r=c+"Prototype")||Ar(Ln,r,{}),Ar(Ln[r],i,o),e.real&&m&&!m[i]&&Ar(m,i,o)))},Hh=Array.isArray||function(e){return va(e)=="Array"},_J=Math.ceil,PJ=Math.floor,d3=function(e){var t=+e;return t!=t||t===0?0:(t>0?PJ:_J)(t)},NJ=Math.min,D0=function(e){return(t=e.length)>0?NJ(d3(t),9007199254740991):0;var t},Lb=function(e,t,n){var r=Hs(t);r in e?Xa.f(e,r,Ra(0,n)):e[r]=n},XF={};XF[_n("toStringTag")]="z";var p3=String(XF)==="[object z]",IJ=_n("toStringTag"),RJ=Ee.Object,jJ=va(function(){return arguments}())=="Arguments",S0=p3?va:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(i,o){try{return i[o]}catch{}}(t=RJ(e),IJ))=="string"?n:jJ?va(t):(r=va(t))=="Object"&&Vt(t.callee)?"Arguments":r},LJ=ht(Function.toString);Vt(ro.inspectSource)||(ro.inspectSource=function(e){return LJ(e)});var JF=ro.inspectSource,ZF=function(){},MJ=[],QF=Zf("Reflect","construct"),h3=/^\s*(?:class|function)\b/,zJ=ht(h3.exec),HJ=!h3.exec(ZF),Ll=function(e){if(!Vt(e))return!1;try{return QF(ZF,MJ,e),!0}catch{return!1}},UJ=!QF||Bn(function(){var e;return Ll(Ll.call)||!Ll(Object)||!Ll(function(){e=!0})||e})?function(e){if(!Vt(e))return!1;switch(S0(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return HJ||!!zJ(h3,JF(e))}:Ll,VJ=_n("species"),ID=Ee.Array,eT=function(e,t){return new(function(n){var r;return Hh(n)&&(r=n.constructor,(UJ(r)&&(r===ID||Hh(r.prototype))||Un(r)&&(r=r[VJ])===null)&&(r=void 0)),r===void 0?ID:r}(e))(t===0?0:t)},WJ=_n("species"),tT=_n("isConcatSpreadable"),RD=Ee.TypeError,qJ=Mh>=51||!Bn(function(){var e=[];return e[tT]=!1,e.concat()[0]!==e}),GJ=function(e){return Mh>=51||!Bn(function(){var t=[];return(t.constructor={})[WJ]=function(){return{foo:1}},t[e](Boolean).foo!==1})}("concat"),KJ=function(e){if(!Un(e))return!1;var t=e[tT];return t!==void 0?!!t:Hh(e)};Vi({target:"Array",proto:!0,forced:!qJ||!GJ},{concat:function(e){var t,n,r,i,o,a=Qf(this),u=eT(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(KJ(o=t===-1?a:arguments[t])){if(s+(i=D0(o))>9007199254740991)throw RD("Maximum allowed index exceeded");for(n=0;n<i;n++,s++)n in o&&Lb(u,s,o[n])}else{if(s>=9007199254740991)throw RD("Maximum allowed index exceeded");Lb(u,s++,o)}return u.length=s,u}});var np,YJ=Ee.String,Uh=function(e){if(S0(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return YJ(e)},XJ=Math.max,JJ=Math.min,Mb=function(e,t){var n=d3(e);return n<0?XJ(n+t,0):JJ(n,t)},jD=function(e){return function(t,n,r){var i,o=qr(t),a=D0(o),u=Mb(r,a);if(e&&n!=n){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},ZJ={includes:jD(!0),indexOf:jD(!1)},td={},QJ=ZJ.indexOf,LD=ht([].push),nT=function(e,t){var n,r=qr(e),i=0,o=[];for(n in r)!Te(td,n)&&Te(r,n)&&LD(o,n);for(;t.length>i;)Te(r,n=t[i++])&&(~QJ(o,n)||LD(o,n));return o},Vh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],g3=Object.keys||function(e){return nT(e,Vh)},eZ=hn?Object.defineProperties:function(e,t){ja(e);for(var n,r=qr(t),i=g3(t),o=i.length,a=0;o>a;)Xa.f(e,n=i[a++],r[n]);return e},tZ=Zf("document","documentElement"),MD=Ya("keys"),x0=function(e){return MD[e]||(MD[e]=zh(e))},rT=x0("IE_PROTO"),mm=function(){},iT=function(e){return"<script>"+e+"<\/script>"},zD=function(e){e.write(iT("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hp=function(){try{np=new ActiveXObject("htmlfile")}catch{}var e,t;Hp=typeof document<"u"?document.domain&&np?zD(np):((t=GF("iframe")).style.display="none",tZ.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(iT("document.F=Object")),e.close(),e.F):zD(np);for(var n=Vh.length;n--;)delete Hp.prototype[Vh[n]];return Hp()};td[rT]=!0;var Wh,kc,qh,La=Object.create||function(e,t){var n;return e!==null?(mm.prototype=ja(e),n=new mm,mm.prototype=null,n[rT]=e):n=Hp(),t===void 0?n:eZ(n,t)},nZ=Vh.concat("length","prototype"),oT={f:Object.getOwnPropertyNames||function(e){return nT(e,nZ)}},rZ=Ee.Array,iZ=Math.max,aT=oT.f,uT=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],oZ=function(e){try{return aT(e)}catch{return function(n,r,i){for(var o=D0(n),a=Mb(r,o),u=Mb(i===void 0?o:i,o),s=rZ(iZ(u-a,0)),l=0;a<u;a++,l++)Lb(s,l,n[a]);return s.length=l,s}(uT)}},sT={f:function(e){return uT&&va(e)=="Window"?oZ(e):aT(qr(e))}},ym={f:Object.getOwnPropertySymbols},aZ=ht([].slice),Cs=function(e,t,n,r){r&&r.enumerable?e[t]=n:Ar(e,t,n)},v3={f:_n},uZ=Xa.f,gt=function(e){var t=Ln.Symbol||(Ln.Symbol={});Te(t,e)||uZ(t,e,{value:v3.f(e)})},sZ=p3?{}.toString:function(){return"[object "+S0(this)+"]"},lZ=Xa.f,HD=_n("toStringTag"),Gh=function(e,t,n,r){if(e){var i=n?e:e.prototype;Te(i,HD)||lZ(i,HD,{configurable:!0,value:t}),r&&!p3&&Ar(i,"toString",sZ)}},UD=Ee.WeakMap,cZ=Vt(UD)&&/native code/.test(JF(UD)),zb=Ee.TypeError,fZ=Ee.WeakMap;if(cZ||ro.state){var Vo=ro.state||(ro.state=new fZ),dZ=ht(Vo.get),VD=ht(Vo.has),pZ=ht(Vo.set);Wh=function(e,t){if(VD(Vo,e))throw new zb("Object already initialized");return t.facade=e,pZ(Vo,e,t),t},kc=function(e){return dZ(Vo,e)||{}},qh=function(e){return VD(Vo,e)}}else{var $u=x0("state");td[$u]=!0,Wh=function(e,t){if(Te(e,$u))throw new zb("Object already initialized");return t.facade=e,Ar(e,$u,t),t},kc=function(e){return Te(e,$u)?e[$u]:{}},qh=function(e){return Te(e,$u)}}var Us={set:Wh,get:kc,has:qh,enforce:function(e){return qh(e)?kc(e):Wh(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=kc(t)).type!==e)throw zb("Incompatible receiver, "+e+" required");return n}}},WD=ht([].push),ki=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=Qf(s),v=VF(g),m=YF(l,c),y=D0(v),h=0,$=f||eT,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:WD(w,d)}else switch(e){case 4:return!1;case 7:WD(w,d)}return o?-1:r||i?i:w}},A0={forEach:ki(0),map:ki(1),filter:ki(2),some:ki(3),every:ki(4),find:ki(5),findIndex:ki(6),filterReject:ki(7)}.forEach,fn=x0("hidden"),qD=_n("toPrimitive"),hZ=Us.set,GD=Us.getterFor("Symbol"),ur=Object.prototype,Wi=Ee.Symbol,Yi=Wi&&Wi.prototype,KD=Ee.TypeError,bm=Ee.QObject,Ml=Zf("JSON","stringify"),lT=f3.f,qi=Xa.f,cT=sT.f,gZ=s3.f,fT=ht([].push),di=Ya("symbols"),nd=Ya("op-symbols"),$m=Ya("string-to-symbol-registry"),wm=Ya("symbol-to-string-registry"),vZ=Ya("wks"),Em=!bm||!bm.prototype||!bm.prototype.findChild,Hb=hn&&Bn(function(){return La(qi({},"a",{get:function(){return qi(this,"a",{value:7}).a}})).a!=7})?function(e,t,n){var r=lT(ur,t);r&&delete ur[t],qi(e,t,n),r&&e!==ur&&qi(ur,t,r)}:qi,Cm=function(e,t){var n=di[e]=La(Yi);return hZ(n,{type:"Symbol",tag:e,description:t}),hn||(n.description=t),n},Kh=function(e,t,n){e===ur&&Kh(nd,t,n),ja(e);var r=Hs(t);return ja(n),Te(di,r)?(n.enumerable?(Te(e,fn)&&e[fn][r]&&(e[fn][r]=!1),n=La(n,{enumerable:Ra(0,!1)})):(Te(e,fn)||qi(e,fn,Ra(1,{})),e[fn][r]=!0),Hb(e,r,n)):qi(e,r,n)},YD=function(e,t){ja(e);var n=qr(t),r=g3(n).concat(Ub(n));return A0(r,function(i){hn&&!ar(dT,n,i)||Kh(e,i,n[i])}),e},dT=function(e){var t=Hs(e),n=ar(gZ,this,t);return!(this===ur&&Te(di,t)&&!Te(nd,t))&&(!(n||!Te(this,t)||!Te(di,t)||Te(this,fn)&&this[fn][t])||n)},XD=function(e,t){var n=qr(e),r=Hs(t);if(n!==ur||!Te(di,r)||Te(nd,r)){var i=lT(n,r);return!i||!Te(di,r)||Te(n,fn)&&n[fn][r]||(i.enumerable=!0),i}},JD=function(e){var t=cT(qr(e)),n=[];return A0(t,function(r){Te(di,r)||Te(td,r)||fT(n,r)}),n},Ub=function(e){var t=e===ur,n=cT(t?nd:qr(e)),r=[];return A0(n,function(i){!Te(di,i)||t&&!Te(ur,i)||fT(r,di[i])}),r};if(Sr||(Yi=(Wi=function(){if(WF(Yi,this))throw KD("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==void 0?Uh(arguments[0]):void 0,t=zh(e),n=function(r){this===ur&&ar(n,nd,r),Te(this,fn)&&Te(this[fn],t)&&(this[fn][t]=!1),Hb(this,t,Ra(1,r))};return hn&&Em&&Hb(ur,t,{configurable:!0,set:n}),Cm(t,e)}).prototype,Cs(Yi,"toString",function(){return GD(this).tag}),Cs(Wi,"withoutSetter",function(e){return Cm(zh(e),e)}),s3.f=dT,Xa.f=Kh,f3.f=XD,oT.f=sT.f=JD,ym.f=Ub,v3.f=function(e){return Cm(_n(e),e)},hn&&qi(Yi,"description",{configurable:!0,get:function(){return GD(this).description}})),Vi({global:!0,wrap:!0,forced:!Sr,sham:!Sr},{Symbol:Wi}),A0(g3(vZ),function(e){gt(e)}),Vi({target:"Symbol",stat:!0,forced:!Sr},{for:function(e){var t=Uh(e);if(Te($m,t))return $m[t];var n=Wi(t);return $m[t]=n,wm[n]=t,n},keyFor:function(e){if(!Zu(e))throw KD(e+" is not a symbol");if(Te(wm,e))return wm[e]},useSetter:function(){Em=!0},useSimple:function(){Em=!1}}),Vi({target:"Object",stat:!0,forced:!Sr,sham:!hn},{create:function(e,t){return t===void 0?La(e):YD(La(e),t)},defineProperty:Kh,defineProperties:YD,getOwnPropertyDescriptor:XD}),Vi({target:"Object",stat:!0,forced:!Sr},{getOwnPropertyNames:JD,getOwnPropertySymbols:Ub}),Vi({target:"Object",stat:!0,forced:Bn(function(){ym.f(1)})},{getOwnPropertySymbols:function(e){return ym.f(Qf(e))}}),Ml){var mZ=!Sr||Bn(function(){var e=Wi();return Ml([e])!="[null]"||Ml({a:e})!="{}"||Ml(Object(e))!="{}"});Vi({target:"JSON",stat:!0,forced:mZ},{stringify:function(e,t,n){var r=aZ(arguments),i=t;if((Un(t)||e!==void 0)&&!Zu(e))return Hh(t)||(t=function(o,a){if(Vt(i)&&(a=ar(i,this,o,a)),!Zu(a))return a}),r[1]=t,HF(Ml,null,r)}})}if(!Yi[qD]){var yZ=Yi.valueOf;Cs(Yi,qD,function(e){return ar(yZ,this)})}Gh(Wi,"Symbol"),td[fn]=!0,gt("asyncIterator"),gt("hasInstance"),gt("isConcatSpreadable"),gt("iterator"),gt("match"),gt("matchAll"),gt("replace"),gt("search"),gt("species"),gt("split"),gt("toPrimitive"),gt("toStringTag"),gt("unscopables"),Gh(Ee.JSON,"JSON",!0);var Xi,ZD,QD,bZ=Ln.Symbol,ya={},pT=Function.prototype,$Z=hn&&Object.getOwnPropertyDescriptor,Dm=Te(pT,"name"),wZ={EXISTS:Dm,PROPER:Dm&&function(){}.name==="something",CONFIGURABLE:Dm&&(!hn||hn&&$Z(pT,"name").configurable)},EZ=!Bn(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),eS=x0("IE_PROTO"),Vb=Ee.Object,CZ=Vb.prototype,Wb=EZ?Vb.getPrototypeOf:function(e){var t=Qf(e);if(Te(t,eS))return t[eS];var n=t.constructor;return Vt(n)&&t instanceof n?n.prototype:t instanceof Vb?CZ:null},qb=_n("iterator"),hT=!1;[].keys&&("next"in(QD=[].keys())?(ZD=Wb(Wb(QD)))!==Object.prototype&&(Xi=ZD):hT=!0);var DZ=Xi==null||Bn(function(){var e={};return Xi[qb].call(e)!==e});Xi=DZ?{}:La(Xi),Vt(Xi[qb])||Cs(Xi,qb,function(){return this});var gT={IteratorPrototype:Xi,BUGGY_SAFARI_ITERATORS:hT},SZ=gT.IteratorPrototype,xZ=function(){return this};Ee.String,Ee.TypeError;Object.setPrototypeOf||"__proto__"in{}&&function(){var e,t=!1,n={};try{(e=ht(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}}();var AZ=wZ.PROPER,rp=gT.BUGGY_SAFARI_ITERATORS,Sm=_n("iterator"),OZ=function(){return this},vT=function(e,t,n,r,i,o,a){(function(y,h,$,w){var C=h+" Iterator";y.prototype=La(SZ,{next:Ra(+!w,$)}),Gh(y,C,!1,!0),ya[C]=xZ})(n,t,r);var u,s,l,c=function(y){if(y===i&&v)return v;if(!rp&&y in p)return p[y];switch(y){case"keys":case"values":case"entries":return function(){return new n(this,y)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,p=e.prototype,g=p[Sm]||p["@@iterator"]||i&&p[i],v=!rp&&g||c(i),m=t=="Array"&&p.entries||g;if(m&&(u=Wb(m.call(new e)))!==Object.prototype&&u.next&&(Gh(u,f,!0,!0),ya[f]=OZ),AZ&&i=="values"&&g&&g.name!=="values"&&(d=!0,v=function(){return ar(g,this)}),i)if(s={values:c("values"),keys:o?v:c("keys"),entries:c("entries")},a)for(l in s)(rp||d||!(l in p))&&Cs(p,l,s[l]);else Vi({target:t,proto:!0,forced:rp||d},s);return a&&p[Sm]!==v&&Cs(p,Sm,v,{name:i}),ya[t]=v,s},BZ=Us.set,FZ=Us.getterFor("Array Iterator");vT(Array,"Array",function(e,t){BZ(this,{type:"Array Iterator",target:qr(e),index:0,kind:t})},function(){var e=FZ(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),ya.Arguments=ya.Array;var tS=_n("toStringTag");for(var xm in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var nS=Ee[xm],Am=nS&&nS.prototype;Am&&S0(Am)!==tS&&Ar(Am,tS,xm),ya[xm]=ya.Array}var TZ=bZ;gt("asyncDispose"),gt("dispose"),gt("matcher"),gt("metadata"),gt("observable"),gt("patternMatch"),gt("replaceAll");var ip=TZ,kZ=ht("".charAt),rS=ht("".charCodeAt),_Z=ht("".slice),iS=function(e){return function(t,n){var r,i,o=Uh(l3(t)),a=d3(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=rS(o,a))<55296||r>56319||a+1===u||(i=rS(o,a+1))<56320||i>57343?e?kZ(o,a):r:e?_Z(o,a,a+2):i-56320+(r-55296<<10)+65536}},PZ={codeAt:iS(!1),charAt:iS(!0)}.charAt,NZ=Us.set,IZ=Us.getterFor("String Iterator");vT(String,"String",function(e){NZ(this,{type:"String Iterator",string:Uh(e),index:0})},function(){var e,t=IZ(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=PZ(n,r),t.index+=e.length,{value:e,done:!1})});var RZ=v3.f("iterator"),jZ=v0(function(e){function t(n){return typeof ip=="function"&&typeof RZ=="symbol"?(e.exports=t=function(r){return typeof r},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(r){return r&&typeof ip=="function"&&r.constructor===ip&&r!==ip.prototype?"symbol":typeof r},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),LZ=Qq(jZ),MZ=b0.EXISTS,zZ=js.f,mT=Function.prototype,HZ=le(mT.toString),yT=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,UZ=le(yT.exec);dr&&!MZ&&zZ(mT,"name",{configurable:!0,get:function(){try{return UZ(yT,HZ(this))[1]}catch{return""}}});var VZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("fontFamily.title"),n.iconSvg=lY,n.mark="fontFamily",n.selectPanelWidth=150,n}return tt(t,e),t.prototype.getOptions=function(n){var r=[],i=n.getMenuConfig(this.mark).fontFamilyList,o=i===void 0?[]:i;r.push({text:q("fontFamily.default"),value:""}),o.forEach(function(u){if(typeof u=="string")r.push({text:u,value:u,styleForRenderMenuList:{"font-family":u}});else if(LZ(u)==="object"){var s=u.name,l=u.value;r.push({text:s,value:l,styleForRenderMenuList:{"font-family":l}})}});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},t}(zF),WZ={renderStyle:function(e,t){var n=e,r=n.fontSize,i=n.fontFamily,o=t;return r&&Ia(o,{fontSize:r}),i&&Ia(o,{fontFamily:i}),o},styleToHtml:function(e,t){if(!X.isText(e))return t;var n,r=e,i=r.fontSize,o=r.fontFamily;return i||o?((r3(t)||zs(n=O(t))!=="span")&&(n=O("<span>"+t+"</span>")),i&&n.css("font-size",i),o&&n.css("font-family",o),Ms(n)):t},preParseHtml:[JX],parseStyleHtml:function(e,t,n){var r=O(e);if(!X.isText(t))return t;var i=t,o=n.getMenuConfig("fontSize").fontSizeList,a=o===void 0?[]:o,u=cr(r,"font-size");u&&a.includes(u)&&(i.fontSize=u);var s=n.getMenuConfig("fontFamily").fontFamilyList,l=s===void 0?[]:s,c=cr(r,"font-family"),f=l.find(function(d){return d.value&&d.value===c})||l.includes(c);return c&&f&&(i.fontFamily=c),i},menus:[{key:"fontSize",factory:function(){return new QX},config:{fontSizeList:["12px","13px","14px","15px","16px","19px","22px","24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new VZ},config:{fontFamilyList:["\u9ED1\u4F53",{name:"\u4EFF\u5B8B",value:"\u4EFF\u5B8B"},"\u6977\u4F53","\u6807\u6977\u4F53","\u534E\u6587\u4EFF\u5B8B","\u534E\u6587\u6977\u4F53",{name:"\u5B8B\u4F53",value:"\u5B8B\u4F53"},"\u5FAE\u8F6F\u96C5\u9ED1","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},qZ={selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=O(e),n=cr(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}},bT=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){var n=ke(E.nodes(t,{match:function(i){return!!i.indent},universal:!0}),1),r=n[0];return r==null?"":ke(r,1)[0].indent||""},e.prototype.isActive=function(t){return!1},e.prototype.getMatchNode=function(t){var n=ke(E.nodes(t,{match:function(r){var i=x.getNodeType(r);return i==="paragraph"||!!i.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e}(),GZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("indent.decrease"),n.iconSvg=cY,n}return tt(t,e),t.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!r.indent},t.prototype.exec=function(n,r){P.setNodes(n,{indent:null},{match:function(i){return te.isElement(i)}})},t}(bT),KZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("indent.increase"),n.iconSvg=fY,n}return tt(t,e),t.prototype.isDisabled=function(n){var r=this.getMatchNode(n);return r==null||!!r.indent},t.prototype.exec=function(n,r){P.setNodes(n,{indent:"2em"},{match:function(i){return te.isElement(i)},mode:"highest"})},t}(bT),YZ={renderStyle:function(e,t){if(!te.isElement(e))return t;var n=e.indent,r=t;return n&&Ia(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!te.isElement(e))return t;var n=e.indent;if(!n)return t;var r=O(t);return r.css("text-indent",n),Ms(r)},preParseHtml:[qZ],parseStyleHtml:function(e,t,n){var r=O(e);if(!te.isElement(t))return t;var i=t,o=cr(r,"text-indent"),a=parseInt(o,10);return o&&a>0&&(i.indent=o),i},menus:[{key:"indent",factory:function(){return new KZ}},{key:"delIndent",factory:function(){return new GZ}}]},O0=function(){function e(){this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.getMatchNode=function(t){var n=ke(E.nodes(t,{match:function(r){var i=x.getNodeType(r);return i==="paragraph"||i==="blockquote"||!!i.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e.prototype.isDisabled=function(t){return t.selection==null||!!x.getSelectedElems(t).some(function(n){if(E.isVoid(t,n)&&E.isBlock(t,n))return!0;var r=n.type;return!!["pre","code"].includes(r)||void 0})},e}(),XZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("justify.left"),n.iconSvg=dY,n}return tt(t,e),t.prototype.exec=function(n,r){P.setNodes(n,{textAlign:"left"},{match:function(i){return te.isElement(i)&&!n.isInline(i)}})},t}(O0),JZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("justify.right"),n.iconSvg=pY,n}return tt(t,e),t.prototype.exec=function(n,r){P.setNodes(n,{textAlign:"right"},{match:function(i){return te.isElement(i)&&!n.isInline(i)}})},t}(O0),ZZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("justify.center"),n.iconSvg=hY,n}return tt(t,e),t.prototype.exec=function(n,r){P.setNodes(n,{textAlign:"center"},{match:function(i){return te.isElement(i)&&!n.isInline(i)}})},t}(O0),QZ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("justify.justify"),n.iconSvg=gY,n}return tt(t,e),t.prototype.exec=function(n,r){P.setNodes(n,{textAlign:"justify"},{match:function(i){return te.isElement(i)&&!n.isInline(i)}})},t}(O0),eQ={renderStyle:function(e,t){if(!te.isElement(e))return t;var n=e.textAlign,r=t;return n&&Ia(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!te.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=O(t);return r.css("text-align",n),Ms(r)},parseStyleHtml:function(e,t,n){var r=O(e);if(!te.isElement(t))return t;var i=t,o=cr(r,"text-align");return o&&(i.textAlign=o),i},menus:[{key:"justifyLeft",factory:function(){return new XZ}},{key:"justifyRight",factory:function(){return new JZ}},{key:"justifyCenter",factory:function(){return new ZZ}},{key:"justifyJustify",factory:function(){return new QZ}}]},tQ=function(){function e(){this.title=q("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(t){var n=[],r=t.getMenuConfig("lineHeight").lineHeightList,i=r===void 0?[]:r;n.push({text:q("lineHeight.default"),value:""}),i.forEach(function(a){n.push({text:a,value:a})});var o=this.getValue(t);return n.forEach(function(a){a.value===o?a.selected=!0:delete a.selected}),n},e.prototype.getMatchNode=function(t){var n=ke(E.nodes(t,{match:function(r){var i=x.getNodeType(r);return!!i.startsWith("header")||!!["paragraph","blockquote","bulleted-list","numbered-list"].includes(i)},universal:!0,mode:"highest"}),1)[0];return n==null?null:n[0]},e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.getMatchNode(t);return n==null?"":te.isElement(n)&&n.lineHeight||""},e.prototype.isDisabled=function(t){return t.selection==null||this.getMatchNode(t)==null},e.prototype.exec=function(t,n){P.setNodes(t,{lineHeight:n.toString()},{mode:"highest"})},e}(),nQ={renderStyle:function(e,t){if(!te.isElement(e))return t;var n=e.lineHeight,r=t;return n&&Ia(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!te.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=O(t);return r.css("line-height",n),Ms(r)},parseStyleHtml:function(e,t,n){var r=O(e);if(!te.isElement(t))return t;var i=t,o=n.getMenuConfig("lineHeight").lineHeightList,a=o===void 0?[]:o,u=cr(r,"line-height");return u&&a.includes(u)&&(i.lineHeight=u),i},menus:[{key:"lineHeight",factory:function(){return new tQ},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},rQ=function(){function e(){this.title=q("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null},e.prototype.exec=function(t,n){typeof t.redo=="function"&&t.redo()},e}(),iQ=function(){function e(){this.title=q("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null},e.prototype.exec=function(t,n){typeof t.undo=="function"&&t.undo()},e}(),oQ={menus:[{key:"redo",factory:function(){return new rQ}},{key:"undo",factory:function(){return new iQ}}]},aQ={type:"divider",renderElem:function(e,t,n){var r=x.isNodeSelected(n,e);return gs("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:r?"true":""},style:{},on:{mousedown:function(i){return i.preventDefault()}}},[gs("hr")])}},uQ={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},sQ={selector:"hr",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}},lQ=function(){function e(){this.title=q("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!x.getSelectedElems(t).some(function(n){if(t.isVoid(n))return!0;var r=x.getNodeType(n);return r==="table"||r==="pre"||void 0})},e.prototype.exec=function(t,n){P.insertNodes(t,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}(),cQ={renderElems:[aQ],elemsToHtml:[uQ],parseElemsHtml:[sQ],menus:[{key:"divider",factory:function(){return new lQ}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(i){return i.type==="divider"||t(i)},r.normalizeNode=function(i){var o=ke(i,2),a=o[0],u=o[1];if(x.getNodeType(a)!=="divider")return n([a,u]);x.isLastNode(r,a)&&P.insertNodes(r,x.genEmptyParagraph(),{at:[u[0]+1]})},r}},fQ=w0.map;_t({target:"Array",proto:!0,forced:!Zw("map")},{map:function(e){return fQ(this,e,arguments.length>1?arguments[1]:void 0)}});var dQ=le([].join),pQ=m0!=Object,hQ=wF("join",",");_t({target:"Array",proto:!0,forced:pQ||!hQ},{join:function(e){return dQ(Rs(this),e===void 0?",":e)}});var gQ=function(){function e(){this.title=q("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(t){var n=x.getSelectedNodeByType(t,"code");if(n==null)return null;var r=x.getParentNode(t,n);return r==null||x.getNodeType(r)!=="pre"?null:n},e.prototype.getValue=function(t){var n=this.getSelectCodeElem(t);return n==null?"":n.language||""},e.prototype.isActive=function(t){return!!this.getSelectCodeElem(t)},e.prototype.isDisabled=function(t){if(t.selection==null)return!0;var n=x.getSelectedElems(t);return!!n.some(function(r){return t.isVoid(r)})||!n.some(function(r){var i=x.getNodeType(r);if(i==="pre"||i==="paragraph")return!0})},e.prototype.exec=function(t,n){this.isActive(t)?this.changeToPlainText(t):this.changeToCodeBlock(t,n.toString())},e.prototype.changeToPlainText=function(t){var n=this.getSelectCodeElem(t);if(n!=null){var r=W.string(n);P.removeNodes(t,{mode:"highest"});var i=r.split(`
|
|
`).map(function(o){return{type:"paragraph",children:[{text:o}]}});P.insertNodes(t,i,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(t,n){var r,i,o=[],a=E.nodes(t,{match:function(f){return t.children.includes(f)},universal:!0});try{for(var u=$F(a),s=u.next();!s.done;s=u.next()){var l=ke(s.value,1)[0];l&&o.push(W.string(l))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}P.removeNodes(t,{mode:"highest"});var c={type:"pre",children:[{type:"code",language:n,children:[{text:o.join(`
|
|
`)}]}]};P.insertNodes(t,c,{mode:"highest"})},e}(),vQ={key:"codeBlock",factory:function(){return new gQ}};_t({target:"String",proto:!0,forced:$c("anchor")},{anchor:function(e){return bc(this,"a","name",e)}}),t3("match",function(e,t,n){return[function(r){var i=Zn(this),o=r==null?void 0:y0(r,e);return o?pt(o,r,i):new RegExp(r)[e](it(i))},function(r){var i=On(this),o=it(r),a=n(t,i,o);if(a.done)return a.value;if(!i.global)return ff(i,o);var u=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;(s=ff(i,o))!==null;){var f=it(s[0]);l[c]=f,f===""&&(i.lastIndex=n3(o,Kf(i.lastIndex),u)),c++}return c===0?null:l}]});var mQ={type:"pre",renderElem:function(e,t,n){return de("pre",null,t)}},yQ={type:"code",renderElem:function(e,t,n){return de("code",null,t)}},bQ={selector:"pre",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return x.getNodeType(i)==="code"})).length===0&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(i){return x.getNodeType(i)==="code"})}}},$Q={menus:[vQ],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var o=x.getSelectedNodeByType(i,"code");if(o!=null){var a=function(l,c){var f=c.selection;if(f==null)return"";var d=W.string(l),p=f.anchor.offset,g=d.slice(0,p).split(`
|
|
`),v=g.length;return v===0?"":g[v-1]}(o,i);if(a){var u=a.match(/^\s+/);if(u!=null&&u[0]!=null){var s=u[0];return void i.insertText(`
|
|
`+s)}}i.insertText(`
|
|
`)}else t()},i.normalizeNode=function(o){var a=ke(o,2),u=a[0],s=a[1],l=x.getNodeType(u);return l==="code"&&s.length<=1&&P.setNodes(i,{type:"paragraph"},{at:s}),l==="pre"&&(x.isLastNode(i,u)&&P.insertNodes(i,x.genEmptyParagraph(),{at:[s[0]+1]}),x.getNodeType(u.children[0])!=="code"&&(P.unwrapNodes(i),P.setNodes(i,{type:"paragraph"},{mode:"highest"}))),n([u,s])},i.insertData=function(o){if(x.getSelectedNodeByType(i,"code")!=null){var a=o.getData("text/plain");E.insertText(i,a)}else r(o)},i},renderElems:[mQ,yQ],elemsToHtml:[{type:"code",elemToHtml:function(e,t){return"<code>"+t+"</code>"}},{type:"pre",elemToHtml:function(e,t){return"<pre>"+t+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=O(e);if(zs(t)!=="code")return e;var n=t.find("xmp");if(n.length===0)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:O(e)[0].textContent||""}]}}},bQ]},wQ=function(){function e(){this.title=q("fullScreen.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return t.isFullScreen},e.prototype.isDisabled=function(t){return!1},e.prototype.exec=function(t,n){t.isFullScreen?t.unFullScreen():t.fullScreen()},e}(),EQ={menus:[{key:"fullScreen",factory:function(){return new wQ}}]},CQ=function(){function e(){this.title=q("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!!R.isExpanded(n)},e.prototype.exec=function(t,n){var r=t.selection;if(r!=null){var i=[r.anchor.path[0]];P.insertNodes(t,{type:"paragraph",children:[{text:""}]},{at:i}),t.select(E.start(t,i))}},e}(),DQ=[xY,iX,WZ,YZ,eQ,nQ,_X,cQ,YX,mX,$Q,GX,QY,YK,RX,oQ,EQ,{menus:[{key:"enter",factory:function(){return new CQ}}]}];gn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),gn("zh-CN",{listModule:{unOrderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868"}});var oS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $T(e){var t={exports:{}};return e(t,t.exports),t.exports}var _i,Up,op=function(e){return e&&e.Math==Math&&e},Ae=op(typeof globalThis=="object"&&globalThis)||op(typeof window=="object"&&window)||op(typeof self=="object"&&self)||op(typeof oS=="object"&&oS)||function(){return this}()||Function("return this")(),Wt=function(e){try{return!!e()}catch{return!0}},$o=!Wt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),zl=Function.prototype.call,an=zl.bind?zl.bind(zl):function(){return zl.apply(zl,arguments)},aS={}.propertyIsEnumerable,uS=Object.getOwnPropertyDescriptor,SQ={f:uS&&!aS.call({1:2},1)?function(e){var t=uS(this,e);return!!t&&t.enumerable}:aS},m3=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},wT=Function.prototype,Gb=wT.bind,Kb=wT.call,xQ=Gb&&Gb.bind(Kb),Ne=Gb?function(e){return e&&xQ(Kb,e)}:function(e){return e&&function(){return Kb.apply(e,arguments)}},AQ=Ne({}.toString),OQ=Ne("".slice),ba=function(e){return OQ(AQ(e),8,-1)},Om=Ae.Object,BQ=Ne("".split),ET=Wt(function(){return!Om("z").propertyIsEnumerable(0)})?function(e){return ba(e)=="String"?BQ(e,""):Om(e)}:Om,FQ=Ae.TypeError,rd=function(e){if(e==null)throw FQ("Can't call method on "+e);return e},B0=function(e){return ET(rd(e))},qt=function(e){return typeof e=="function"},ir=function(e){return typeof e=="object"?e!==null:qt(e)},TQ=function(e){return qt(e)?e:void 0},id=function(e,t){return arguments.length<2?TQ(Ae[e]):Ae[e]&&Ae[e][t]},kQ=Ne({}.isPrototypeOf),Bm=id("navigator","userAgent")||"",sS=Ae.process,lS=Ae.Deno,cS=sS&&sS.versions||lS&&lS.version,fS=cS&&cS.v8;fS&&(Up=(_i=fS.split("."))[0]>0&&_i[0]<4?1:+(_i[0]+_i[1])),!Up&&Bm&&(!(_i=Bm.match(/Edge\/(\d+)/))||_i[1]>=74)&&(_i=Bm.match(/Chrome\/(\d+)/))&&(Up=+_i[1]);var Yh=Up,Yb=!!Object.getOwnPropertySymbols&&!Wt(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Yh&&Yh<41}),y3=Yb&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_Q=Ae.Object,Xb=y3?function(e){return typeof e=="symbol"}:function(e){var t=id("Symbol");return qt(t)&&kQ(t.prototype,_Q(e))},PQ=Ae.String,NQ=Ae.TypeError,CT=function(e){if(qt(e))return e;throw NQ(function(t){try{return PQ(t)}catch{return"Object"}}(e)+" is not a function")},DT=function(e,t){var n=e[t];return n==null?void 0:CT(n)},IQ=Ae.TypeError,RQ=Object.defineProperty,b3=function(e,t){try{RQ(Ae,e,{value:t,configurable:!0,writable:!0})}catch{Ae[e]=t}return t},io=Ae["__core-js_shared__"]||b3("__core-js_shared__",{}),$3=$T(function(e){(e.exports=function(t,n){return io[t]||(io[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})}),jQ=Ae.Object,F0=function(e){return jQ(rd(e))},LQ=Ne({}.hasOwnProperty),Gn=Object.hasOwn||function(e,t){return LQ(F0(e),t)},MQ=0,zQ=Math.random(),HQ=Ne(1 .toString),ST=function(e){return"Symbol("+(e===void 0?"":e)+")_"+HQ(++MQ+zQ,36)},Hl=$3("wks"),$a=Ae.Symbol,dS=$a&&$a.for,UQ=y3?$a:$a&&$a.withoutSetter||ST,Gr=function(e){if(!Gn(Hl,e)||!Yb&&typeof Hl[e]!="string"){var t="Symbol."+e;Yb&&Gn($a,e)?Hl[e]=$a[e]:Hl[e]=y3&&dS?dS(t):UQ(t)}return Hl[e]},VQ=Ae.TypeError,WQ=Gr("toPrimitive"),qQ=function(e,t){if(!ir(e)||Xb(e))return e;var n,r=DT(e,WQ);if(r){if(t===void 0&&(t="default"),n=an(r,e,t),!ir(n)||Xb(n))return n;throw VQ("Can't convert object to primitive value")}return t===void 0&&(t="number"),function(i,o){var a,u;if(o==="string"&&qt(a=i.toString)&&!ir(u=an(a,i))||qt(a=i.valueOf)&&!ir(u=an(a,i))||o!=="string"&&qt(a=i.toString)&&!ir(u=an(a,i)))return u;throw IQ("Can't convert object to primitive value")}(e,t)},w3=function(e){var t=qQ(e,"string");return Xb(t)?t:t+""},Jb=Ae.document,GQ=ir(Jb)&&ir(Jb.createElement),xT=function(e){return GQ?Jb.createElement(e):{}},AT=!$o&&!Wt(function(){return Object.defineProperty(xT("div"),"a",{get:function(){return 7}}).a!=7}),pS=Object.getOwnPropertyDescriptor,OT={f:$o?pS:function(e,t){if(e=B0(e),t=w3(t),AT)try{return pS(e,t)}catch{}if(Gn(e,t))return m3(!an(SQ.f,e,t),e[t])}},KQ=Ae.String,YQ=Ae.TypeError,wo=function(e){if(ir(e))return e;throw YQ(KQ(e)+" is not an object")},XQ=Ae.TypeError,hS=Object.defineProperty,od={f:$o?hS:function(e,t,n){if(wo(e),t=w3(t),wo(n),AT)try{return hS(e,t,n)}catch{}if("get"in n||"set"in n)throw XQ("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},df=$o?function(e,t,n){return od.f(e,t,m3(1,n))}:function(e,t,n){return e[t]=n,e},JQ=Ne(Function.toString);qt(io.inspectSource)||(io.inspectSource=function(e){return JQ(e)});var Xh,_c,Jh,E3=io.inspectSource,gS=Ae.WeakMap,ZQ=qt(gS)&&/native code/.test(E3(gS)),vS=$3("keys"),BT=function(e){return vS[e]||(vS[e]=ST(e))},C3={},Zb=Ae.TypeError,QQ=Ae.WeakMap;if(ZQ||io.state){var Wo=io.state||(io.state=new QQ),eee=Ne(Wo.get),mS=Ne(Wo.has),tee=Ne(Wo.set);Xh=function(e,t){if(mS(Wo,e))throw new Zb("Object already initialized");return t.facade=e,tee(Wo,e,t),t},_c=function(e){return eee(Wo,e)||{}},Jh=function(e){return mS(Wo,e)}}else{var wu=BT("state");C3[wu]=!0,Xh=function(e,t){if(Gn(e,wu))throw new Zb("Object already initialized");return t.facade=e,df(e,wu,t),t},_c=function(e){return Gn(e,wu)?e[wu]:{}},Jh=function(e){return Gn(e,wu)}}var ap,Qb={set:Xh,get:_c,has:Jh,enforce:function(e){return Jh(e)?_c(e):Xh(e,{})},getterFor:function(e){return function(t){var n;if(!ir(t)||(n=_c(t)).type!==e)throw Zb("Incompatible receiver, "+e+" required");return n}}},FT=Function.prototype,nee=$o&&Object.getOwnPropertyDescriptor,Fm=Gn(FT,"name"),ree={EXISTS:Fm,PROPER:Fm&&function(){}.name==="something",CONFIGURABLE:Fm&&(!$o||$o&&nee(FT,"name").configurable)},Zh=$T(function(e){var t=ree.CONFIGURABLE,n=Qb.get,r=Qb.enforce,i=String(String).split("String");(e.exports=function(o,a,u,s){var l,c=!!s&&!!s.unsafe,f=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,p=s&&s.name!==void 0?s.name:a;qt(u)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Gn(u,"name")||t&&u.name!==p)&&df(u,"name",p),(l=r(u)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==Ae?(c?!d&&o[a]&&(f=!0):delete o[a],f?o[a]=u:df(o,a,u)):f?o[a]=u:b3(a,u)})(Function.prototype,"toString",function(){return qt(this)&&n(this).source||E3(this)})}),iee=Math.ceil,oee=Math.floor,T0=function(e){var t=+e;return t!=t||t===0?0:(t>0?oee:iee)(t)},aee=Math.max,uee=Math.min,see=Math.min,TT=function(e){return e>0?see(T0(e),9007199254740991):0},D3=function(e){return TT(e.length)},yS=function(e){return function(t,n,r){var i,o=B0(t),a=D3(o),u=function(s,l){var c=T0(s);return c<0?aee(c+l,0):uee(c,l)}(r,a);if(e&&n!=n){for(;a>u;)if((i=o[u++])!=i)return!0}else for(;a>u;u++)if((e||u in o)&&o[u]===n)return e||u||0;return!e&&-1}},kT={includes:yS(!0),indexOf:yS(!1)},lee=kT.indexOf,bS=Ne([].push),_T=function(e,t){var n,r=B0(e),i=0,o=[];for(n in r)!Gn(C3,n)&&Gn(r,n)&&bS(o,n);for(;t.length>i;)Gn(r,n=t[i++])&&(~lee(o,n)||bS(o,n));return o},Qh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],cee=Qh.concat("length","prototype"),fee={f:Object.getOwnPropertyNames||function(e){return _T(e,cee)}},dee={f:Object.getOwnPropertySymbols},pee=Ne([].concat),hee=id("Reflect","ownKeys")||function(e){var t=fee.f(wo(e)),n=dee.f;return n?pee(t,n(e)):t},gee=function(e,t){for(var n=hee(t),r=od.f,i=OT.f,o=0;o<n.length;o++){var a=n[o];Gn(e,a)||r(e,a,i(t,a))}},vee=/#|\.prototype\./,ad=function(e,t){var n=yee[mee(e)];return n==$ee||n!=bee&&(qt(t)?Wt(t):!!t)},mee=ad.normalize=function(e){return String(e).replace(vee,".").toLowerCase()},yee=ad.data={},bee=ad.NATIVE="N",$ee=ad.POLYFILL="P",wee=ad,Eee=OT.f,Vs=function(e,t){var n,r,i,o,a,u=e.target,s=e.global,l=e.stat;if(n=s?Ae:l?Ae[u]||b3(u,{}):(Ae[u]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=Eee(n,r))&&a.value:n[r],!wee(s?r:u+(l?".":"#")+r,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;gee(o,i)}(e.sham||i&&i.sham)&&df(o,"sham",!0),Zh(n,r,o,e)}},Cee=Object.keys||function(e){return _T(e,Qh)},Dee=$o?Object.defineProperties:function(e,t){wo(e);for(var n,r=B0(t),i=Cee(t),o=i.length,a=0;o>a;)od.f(e,n=i[a++],r[n]);return e},See=id("document","documentElement"),PT=BT("IE_PROTO"),Tm=function(){},NT=function(e){return"<script>"+e+"<\/script>"},$S=function(e){e.write(NT("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vp=function(){try{ap=new ActiveXObject("htmlfile")}catch{}var e,t;Vp=typeof document<"u"?document.domain&&ap?$S(ap):((t=xT("iframe")).style.display="none",See.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(NT("document.F=Object")),e.close(),e.F):$S(ap);for(var n=Qh.length;n--;)delete Vp.prototype[Qh[n]];return Vp()};C3[PT]=!0;var IT=Object.create||function(e,t){var n;return e!==null?(Tm.prototype=wo(e),n=new Tm,Tm.prototype=null,n[PT]=e):n=Vp(),t===void 0?n:Dee(n,t)},e4=Gr("unscopables"),t4=Array.prototype;t4[e4]==null&&od.f(t4,e4,{configurable:!0,value:IT(null)});var wS,xee=kT.includes;function RT(e){if(e==="bulleted-list")return"ul";if(e==="numbered-list")return"ol";if(e==="list-item")return"li";throw new Error("list type '"+e+"' is invalid")}function eg(e){var t=x.getNodeType(e);return["bulleted-list","numbered-list"].includes(t)}function S3(e){return function(t,n,r){var i=RT(e);return de(i,null,n)}}Vs({target:"Array",proto:!0},{includes:function(e){return xee(this,e,arguments.length>1?arguments[1]:void 0)}}),wS="includes",t4[e4][wS]=!0;var Aee={type:"bulleted-list",renderElem:S3("bulleted-list")},Oee={type:"numbered-list",renderElem:S3("numbered-list")},Bee={type:"list-item",renderElem:S3("list-item")};function x3(e){var t=RT(e);return function(n,r){return"<"+t+">"+r+"</"+t+">"}}var Fee={type:"bulleted-list",elemToHtml:x3("bulleted-list")},Tee={type:"numbered-list",elemToHtml:x3("numbered-list")},kee={type:"list-item",elemToHtml:x3("list-item")},ES=Ne(Ne.bind),n4=Array.isArray||function(e){return ba(e)=="Array"},jT={};jT[Gr("toStringTag")]="z";var A3=String(jT)==="[object z]",_ee=Gr("toStringTag"),Pee=Ae.Object,Nee=ba(function(){return arguments}())=="Arguments",O3=A3?ba:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(i,o){try{return i[o]}catch{}}(t=Pee(e),_ee))=="string"?n:Nee?ba(t):(r=ba(t))=="Object"&&qt(t.callee)?"Arguments":r},LT=function(){},Iee=[],MT=id("Reflect","construct"),B3=/^\s*(?:class|function)\b/,Ree=Ne(B3.exec),jee=!B3.exec(LT),Ul=function(e){if(!qt(e))return!1;try{return MT(LT,Iee,e),!0}catch{return!1}},Lee=!MT||Wt(function(){var e;return Ul(Ul.call)||!Ul(Object)||!Ul(function(){e=!0})||e})?function(e){if(!qt(e))return!1;switch(O3(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return jee||!!Ree(B3,E3(e))}:Ul,Mee=Gr("species"),CS=Ae.Array,zT=function(e,t){return new(function(n){var r;return n4(n)&&(r=n.constructor,(Lee(r)&&(r===CS||n4(r.prototype))||ir(r)&&(r=r[Mee])===null)&&(r=void 0)),r===void 0?CS:r}(e))(t===0?0:t)},DS=Ne([].push),Pi=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,g=F0(s),v=ET(g),m=function(C,D){return CT(C),D===void 0?C:ES?ES(C,D):function(){return C.apply(D,arguments)}}(l,c),y=D3(v),h=0,$=f||zT,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in v)&&(p=m(d=v[h],h,g),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:DS(w,d)}else switch(e){case 4:return!1;case 7:DS(w,d)}return o?-1:r||i?i:w}},zee={forEach:Pi(0),map:Pi(1),filter:Pi(2),some:Pi(3),every:Pi(4),find:Pi(5),findIndex:Pi(6),filterReject:Pi(7)},Hee=Gr("species"),HT=function(e){return Yh>=51||!Wt(function(){var t=[];return(t.constructor={})[Hee]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Uee=zee.filter;Vs({target:"Array",proto:!0,forced:!HT("filter")},{filter:function(e){return Uee(this,e,arguments.length>1?arguments[1]:void 0)}});var Vee=A3?{}.toString:function(){return"[object "+O3(this)+"]"};A3||Zh(Object.prototype,"toString",Vee,{unsafe:!0});var SS,km,Wee=Ae.String,Or=function(e){if(O3(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Wee(e)},qee=function(){var e=wo(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},F3=Ae.RegExp,r4=Wt(function(){var e=F3("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Gee=r4||Wt(function(){return!F3("a","y").sticky}),Kee={BROKEN_CARET:r4||Wt(function(){var e=F3("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:Gee,UNSUPPORTED_Y:r4},Yee=Ae.RegExp,Xee=Wt(function(){var e=Yee(".","s");return!(e.dotAll&&e.exec(`
|
|
`)&&e.flags==="s")}),Jee=Ae.RegExp,Zee=Wt(function(){var e=Jee("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Qee=Qb.get,ete=$3("native-string-replace",String.prototype.replace),tg=RegExp.prototype.exec,i4=tg,tte=Ne("".charAt),nte=Ne("".indexOf),rte=Ne("".replace),_m=Ne("".slice),Pm=(km=/b*/g,an(tg,SS=/a/,"a"),an(tg,km,"a"),SS.lastIndex!==0||km.lastIndex!==0),xS=Kee.BROKEN_CARET,Nm=/()??/.exec("")[1]!==void 0;(Pm||Nm||xS||Xee||Zee)&&(i4=function(e){var t,n,r,i,o,a,u,s=this,l=Qee(s),c=Or(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=an(i4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=xS&&s.sticky,g=an(qee,s),v=s.source,m=0,y=c;if(p&&(g=rte(g,"y",""),nte(g,"g")===-1&&(g+="g"),y=_m(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&tte(c,s.lastIndex-1)!==`
|
|
`)&&(v="(?: "+v+")",y=" "+y,m++),n=new RegExp("^(?:"+v+")",g)),Nm&&(n=new RegExp("^"+v+"$(?!\\s)",g)),Pm&&(r=s.lastIndex),i=an(tg,p?n:s,y),p?i?(i.input=_m(i.input,m),i[0]=_m(i[0],m),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Pm&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Nm&&i&&i.length>1&&an(ete,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=IT(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var ng=i4;Vs({target:"RegExp",proto:!0,forced:/./.exec!==ng},{exec:ng});var T3=Function.prototype,AS=T3.apply,ite=T3.bind,OS=T3.call,ote=typeof Reflect=="object"&&Reflect.apply||(ite?OS.bind(AS):function(){return OS.apply(AS,arguments)}),ate=Gr("species"),Im=RegExp.prototype,ute=Ne("".charAt),BS=Ne("".charCodeAt),ste=Ne("".slice),FS=function(e){return function(t,n){var r,i,o=Or(rd(t)),a=T0(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=BS(o,a))<55296||r>56319||a+1===u||(i=BS(o,a+1))<56320||i>57343?e?ute(o,a):r:e?ste(o,a,a+2):i-56320+(r-55296<<10)+65536}},lte={codeAt:FS(!1),charAt:FS(!0)}.charAt,cte=function(e,t,n){return t+(n?lte(e,t).length:1)},fte=Math.floor,Rm=Ne("".charAt),dte=Ne("".replace),jm=Ne("".slice),pte=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hte=/\$([$&'`]|\d{1,2})/g,gte=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=hte;return i!==void 0&&(i=F0(i),s=pte),dte(o,s,function(l,c){var f;switch(Rm(c,0)){case"$":return"$";case"&":return e;case"`":return jm(t,0,n);case"'":return jm(t,a);case"<":f=i[jm(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=fte(d/10);return p===0?l:p<=u?r[p-1]===void 0?Rm(c,1):r[p-1]+Rm(c,1):l}f=r[d-1]}return f===void 0?"":f})},vte=Ae.TypeError,mte=function(e,t){var n=e.exec;if(qt(n)){var r=an(n,e,t);return r!==null&&wo(r),r}if(ba(e)==="RegExp")return an(ng,e,t);throw vte("RegExp#exec called on incompatible receiver")},o4=Gr("replace"),yte=Math.max,bte=Math.min,$te=Ne([].concat),Lm=Ne([].push),TS=Ne("".indexOf),kS=Ne("".slice),wte="a".replace(/./,"$0")==="$0",_S=!!/./[o4]&&/./[o4]("a","$0")==="";(function(e,t,n,r){var i=Gr(e),o=!Wt(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Wt(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[ate]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Ne(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var g=Ne(l),v=c.exec;return v===ng||v===Im.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:g(f,c,d)}:{done:!1}});Zh(String.prototype,e,s[0]),Zh(Im,i,s[1])}r&&df(Im[i],"sham",!0)})("replace",function(e,t,n){var r=_S?"$":"$0";return[function(i,o){var a=rd(this),u=i==null?void 0:DT(i,o4);return u?an(u,i,a,o):an(t,Or(a),i,o)},function(i,o){var a=wo(this),u=Or(i);if(typeof o=="string"&&TS(o,r)===-1&&TS(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=qt(o);l||(o=Or(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=mte(a,u);if(p===null||(Lm(d,p),!c))break;Or(p[0])===""&&(a.lastIndex=cte(u,TT(a.lastIndex),f))}for(var g,v="",m=0,y=0;y<d.length;y++){for(var h=Or((p=d[y])[0]),$=yte(bte(T0(p.index),u.length),0),w=[],C=1;C<p.length;C++)Lm(w,(g=p[C])===void 0?g:String(g));var D=p.groups;if(l){var A=$te([h],w,$,u);D!==void 0&&Lm(A,D);var I=Or(ote(o,void 0,A))}else I=gte(h,u,$,w,D,o);$>=m&&(v+=kS(u,m,$)+I,m=$+h.length)}return v+kS(u,m)}]},!!Wt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!wte||_S),Vs({global:!0},{globalThis:Ae});var Ete={selector:"li",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"list-item",children:t}}},Cte={selector:"ul",parseElemHtml:function(e,t,n){return{type:"bulleted-list",children:t.filter(function(r){return x.getNodeType(r)==="list-item"})}}},Dte={selector:"ol",parseElemHtml:function(e,t,n){return{type:"numbered-list",children:t.filter(function(r){return x.getNodeType(r)==="list-item"})}}},a4=function(e,t){return a4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},a4(e,t)};/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */function UT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}a4(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function u4(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var PS,VT=function(){function e(){this.tag="button"}return e.prototype.getListNode=function(t){var n=this.type;return x.getSelectedNodeByType(t,n)},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!this.getListNode(t)},e.prototype.isDisabled=function(t){return t.selection==null||!!x.getSelectedElems(t).some(function(n){if(E.isVoid(t,n)&&E.isBlock(t,n))return!0;var r=n.type;return!!["pre","code","table"].includes(r)||void 0})},e.prototype.getMatchListType=function(t){var n=u4(E.nodes(t,{match:function(o){return eg(o)},universal:!0}),1),r=n[0];if(r==null)return"";var i=u4(r,1)[0];return x.getNodeType(i)},e.prototype.exec=function(t,n){var r=this.type,i=this.isActive(t);P.unwrapNodes(t,{match:function(u){return eg(u)},split:!0}),P.setNodes(t,{type:i?"paragraph":"list-item"});var o={type:r,children:[]};i||P.wrapNodes(t,o);var a=this.getMatchListType(t);a!=""&&a!==r&&P.wrapNodes(t,o)},e}(),Ste='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',xte='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',Ate=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="bulleted-list",n.title=q("listModule.unOrderedList"),n.iconSvg=Ste,n}return UT(t,e),t}(VT),Ote=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="numbered-list",n.title=q("listModule.orderedList"),n.iconSvg=xte,n}return UT(t,e),t}(VT),Bte={key:"bulletedList",factory:function(){return new Ate}},Fte={key:"numberedList",factory:function(){return new Ote}},Tte=/"/g,kte=Ne("".replace);Vs({target:"String",proto:!0,forced:(PS="anchor",Wt(function(){var e=""[PS]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Or(rd(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+kte(Or(r),Tte,""")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var NS=function(e,t,n){var r=w3(t);r in e?od.f(e,r,m3(0,n)):e[r]=n},WT=Gr("isConcatSpreadable"),IS=Ae.TypeError,_te=Yh>=51||!Wt(function(){var e=[];return e[WT]=!1,e.concat()[0]!==e}),Pte=HT("concat"),Nte=function(e){if(!ir(e))return!1;var t=e[WT];return t!==void 0?!!t:n4(e)};Vs({target:"Array",proto:!0,forced:!_te||!Pte},{concat:function(e){var t,n,r,i,o,a=F0(this),u=zT(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Nte(o=t===-1?a:arguments[t])){if(s+(i=D3(o))>9007199254740991)throw IS("Maximum allowed index exceeded");for(n=0;n<i;n++,s++)n in o&&NS(u,s,o[n])}else{if(s>=9007199254740991)throw IS("Maximum allowed index exceeded");NS(u,s++,o)}return u.length=s,u}});var Ite={renderElems:[Aee,Oee,Bee],elemsToHtml:[Fee,Tee,kee],parseElemsHtml:[Ete,Dte,Cte],menus:[Bte,Fte],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward;e.insertNode;var r=e;return r.insertBreak=function(){var i=r.selection;if(i!=null){var o=x.getSelectedNodeByType(r,"list-item");if(o!=null){var a=x.getParentNode(r,o),u=(a==null?void 0:a.children)||[];if(o===u[u.length-1]&&W.string(o)===""){P.removeNodes(r,{match:function(l){return x.checkNodeType(l,"list-item")}});var s=[i.anchor.path[0]+1];return P.insertNodes(r,x.genEmptyParagraph(),{at:s}),void r.select({path:s.concat(0),offset:0})}t()}else t()}else t()},r.deleteBackward=function(i){var o=function(a){var u=u4(E.nodes(a,{match:function(c){return a.children[0]===c},mode:"highest"}),1),s=u[0];if(s==null)return!1;var l=s[0];return!(!te.isElement(l)||W.string(l)||!eg(l)||(P.unwrapNodes(a,{match:function(c){return eg(c)},split:!0}),P.setNodes(a,{type:"paragraph"}),0))}(r);o||n(i)},r}},qT=T$(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,a=9007199254740991,u="[object Arguments]",s="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",g="[object GeneratorFunction]",v="[object Map]",m="[object Number]",y="[object Null]",h="[object Object]",$="[object Promise]",w="[object Proxy]",C="[object RegExp]",D="[object Set]",A="[object String]",I="[object Symbol]",M="[object Undefined]",V="[object WeakMap]",Y="[object ArrayBuffer]",J="[object DataView]",Z="[object Float32Array]",se="[object Float64Array]",ee="[object Int8Array]",ae="[object Int16Array]",fe="[object Int32Array]",_e="[object Uint8Array]",ve="[object Uint8ClampedArray]",ie="[object Uint16Array]",Ie="[object Uint32Array]",T=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,N={};N[Z]=N[se]=N[ee]=N[ae]=N[fe]=N[_e]=N[ve]=N[ie]=N[Ie]=!0,N[u]=N[s]=N[Y]=N[c]=N[J]=N[f]=N[d]=N[p]=N[v]=N[m]=N[h]=N[C]=N[D]=N[A]=N[V]=!1;var H=typeof ot=="object"&&ot&&ot.Object===Object&&ot,j=typeof self=="object"&&self&&self.Object===Object&&self,Q=H||j||Function("return this")(),ce=t&&!t.nodeType&&t,we=ce&&!0&&e&&!e.nodeType&&e,Re=we&&we.exports===ce,z=Re&&H.process,ze=function(){try{return z&&z.binding&&z.binding("util")}catch{}}(),ye=ze&&ze.isTypedArray;function ue(b,S){for(var B=-1,L=b==null?0:b.length,me=0,oe=[];++B<L;){var Fe=b[B];S(Fe,B,b)&&(oe[me++]=Fe)}return oe}function be(b,S){for(var B=-1,L=S.length,me=b.length;++B<L;)b[me+B]=S[B];return b}function vn(b,S){for(var B=-1,L=b==null?0:b.length;++B<L;)if(S(b[B],B,b))return!0;return!1}function qe(b,S){for(var B=-1,L=Array(b);++B<b;)L[B]=S(B);return L}function lt(b){return function(S){return b(S)}}function ft(b,S){return b.has(S)}function un(b,S){return b==null?void 0:b[S]}function dt(b){var S=-1,B=Array(b.size);return b.forEach(function(L,me){B[++S]=[me,L]}),B}function Pn(b,S){return function(B){return b(S(B))}}function mn(b){var S=-1,B=Array(b.size);return b.forEach(function(L){B[++S]=L}),B}var sn=Array.prototype,vr=Function.prototype,mr=Object.prototype,yn=Q["__core-js_shared__"],yr=vr.toString,nn=mr.hasOwnProperty,Nn=function(){var b=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),Za=mr.toString,qs=RegExp("^"+yr.call(nn).replace(T,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kr=Re?Q.Buffer:void 0,mi=Q.Symbol,Qa=Q.Uint8Array,yi=mr.propertyIsEnumerable,Yr=sn.splice,bn=mi?mi.toStringTag:void 0,bi=Object.getOwnPropertySymbols,Gs=Kr?Kr.isBuffer:void 0,Po=Pn(Object.keys,Object),Ks=Jr(Q,"DataView"),No=Jr(Q,"Map"),Ys=Jr(Q,"Promise"),Xs=Jr(Q,"Set"),Js=Jr(Q,"WeakMap"),$i=Jr(Object,"create"),bd=rn(Ks),Xr=rn(No),J0=rn(Ys),Z0=rn(Xs),Q0=rn(Js),$d=mi?mi.prototype:void 0,Zs=$d?$d.valueOf:void 0;function Lt(b){var S=-1,B=b==null?0:b.length;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function ev(){this.__data__=$i?$i(null):{},this.size=0}function tv(b){var S=this.has(b)&&delete this.__data__[b];return this.size-=S?1:0,S}function nv(b){var S=this.__data__;if($i){var B=S[b];return B===r?void 0:B}return nn.call(S,b)?S[b]:void 0}function rv(b){var S=this.__data__;return $i?S[b]!==void 0:nn.call(S,b)}function iv(b,S){var B=this.__data__;return this.size+=this.has(b)?0:1,B[b]=$i&&S===void 0?r:S,this}Lt.prototype.clear=ev,Lt.prototype.delete=tv,Lt.prototype.get=nv,Lt.prototype.has=rv,Lt.prototype.set=iv;function Kt(b){var S=-1,B=b==null?0:b.length;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function ov(){this.__data__=[],this.size=0}function av(b){var S=this.__data__,B=nu(S,b);if(B<0)return!1;var L=S.length-1;return B==L?S.pop():Yr.call(S,B,1),--this.size,!0}function uv(b){var S=this.__data__,B=nu(S,b);return B<0?void 0:S[B][1]}function sv(b){return nu(this.__data__,b)>-1}function lv(b,S){var B=this.__data__,L=nu(B,b);return L<0?(++this.size,B.push([b,S])):B[L][1]=S,this}Kt.prototype.clear=ov,Kt.prototype.delete=av,Kt.prototype.get=uv,Kt.prototype.has=sv,Kt.prototype.set=lv;function ln(b){var S=-1,B=b==null?0:b.length;for(this.clear();++S<B;){var L=b[S];this.set(L[0],L[1])}}function cv(){this.size=0,this.__data__={hash:new Lt,map:new(No||Kt),string:new Lt}}function fv(b){var S=tr(this,b).delete(b);return this.size-=S?1:0,S}function dv(b){return tr(this,b).get(b)}function pv(b){return tr(this,b).has(b)}function hv(b,S){var B=tr(this,b),L=B.size;return B.set(b,S),this.size+=B.size==L?0:1,this}ln.prototype.clear=cv,ln.prototype.delete=fv,ln.prototype.get=dv,ln.prototype.has=pv,ln.prototype.set=hv;function eu(b){var S=-1,B=b==null?0:b.length;for(this.__data__=new ln;++S<B;)this.add(b[S])}function wd(b){return this.__data__.set(b,r),this}function tu(b){return this.__data__.has(b)}eu.prototype.add=eu.prototype.push=wd,eu.prototype.has=tu;function br(b){var S=this.__data__=new Kt(b);this.size=S.size}function Qs(){this.__data__=new Kt,this.size=0}function gv(b){var S=this.__data__,B=S.delete(b);return this.size=S.size,B}function vv(b){return this.__data__.get(b)}function mv(b){return this.__data__.has(b)}function yv(b,S){var B=this.__data__;if(B instanceof Kt){var L=B.__data__;if(!No||L.length<n-1)return L.push([b,S]),this.size=++B.size,this;B=this.__data__=new ln(L)}return B.set(b,S),this.size=B.size,this}br.prototype.clear=Qs,br.prototype.delete=gv,br.prototype.get=vv,br.prototype.has=mv,br.prototype.set=yv;function bv(b,S){var B=ru(b),L=!B&&xd(b),me=!B&&!L&&iu(b),oe=!B&&!L&&!me&&Bd(b),Fe=B||L||me||oe,Pe=Fe?qe(b.length,String):[],$t=Pe.length;for(var He in b)(S||nn.call(b,He))&&!(Fe&&(He=="length"||me&&(He=="offset"||He=="parent")||oe&&(He=="buffer"||He=="byteLength"||He=="byteOffset")||Av(He,$t)))&&Pe.push(He);return Pe}function nu(b,S){for(var B=b.length;B--;)if(Sd(b[B][0],S))return B;return-1}function el(b,S,B){var L=S(b);return ru(b)?L:be(L,B(b))}function Io(b){return b==null?b===void 0?M:y:bn&&bn in Object(b)?Zr(b):Dd(b)}function Ed(b){return wr(b)&&Io(b)==u}function Cd(b,S,B,L,me){return b===S?!0:b==null||S==null||!wr(b)&&!wr(S)?b!==b&&S!==S:$v(b,S,B,L,Cd,me)}function $v(b,S,B,L,me,oe){var Fe=ru(b),Pe=ru(S),$t=Fe?s:$r(b),He=Pe?s:$r(S);$t=$t==u?h:$t,He=He==u?h:He;var Yt=$t==h,cn=He==h,Ft= |