import{d as x$,E as Ki,bw as E9,F as KP,H as YP,a9 as XP,bx as JP,o as A$,c as C9,_ as ZP,bt as QP,x as ni,N as eN,K as Zt,y as pt,b as y5,u as Id,aE as tN,W as nN,G as rN}from"./index.1417328f.js";var Lv;if(typeof global=="undefined"){if("ActiveXObject"in window){var b5="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";b5+=` Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(b5)}$5(),w5()}else global&&((Lv=global.navigator)===null||Lv===void 0?void 0:Lv.userAgent.match("QQBrowser"))&&($5(),w5());function $5(){typeof globalThis=="undefined"&&(window.globalThis=window)}function w5(){typeof AggregateError=="undefined"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var iN=Object.getOwnPropertyDescriptor(global,"window");(!global.window||iN.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 * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function E5(e){return Object.prototype.toString.call(e)==="[object Object]"}function en(e){var t,n;return E5(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(E5(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ut(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:O$(e)?2:B$(e)?3:0}function w2(e,t){return Ns(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oN(e,t){return Ns(e)===2?e.get(t):e[t]}function D9(e,t,n){var r=Ns(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function aN(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function O$(e){return cN&&e instanceof Map}function B$(e){return fN&&e instanceof Set}function ea(e){return e.o||e.t}function F$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=hN(e);delete t[On];for(var n=P$(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=uN),Object.freeze(e),t&&Xc(e,function(n,r){return T$(r,!0)},!0)),e}function uN(){Ut(2)}function k$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function fi(e){var t=gN[e];return t||Ut(18,e),t}function C5(){return ls||Ut(0),ls}function Mv(e,t){t&&(fi("Patches"),e.u=[],e.s=[],e.v=t)}function uh(e){E2(e),e.p.forEach(sN),e.p=null}function E2(e){e===ls&&(ls=e.l)}function D5(e){return ls={p:[],l:ls,h:e,m:!0,_:0}}function sN(e){var t=e[On];t.i===0||t.i===1?t.j():t.O=!0}function zv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||fi("ES5").S(t,e,r),r?(n[On].P&&(uh(t),Ut(4)),_a(e)&&(e=sh(t,e),t.l||lh(t,e)),t.u&&fi("Patches").M(n[On],e,t.u,t.s)):e=sh(t,n,[]),uh(t),t.u&&t.v(t.u,t.s),e!==S9?e:void 0}function sh(e,t,n){if(k$(t))return t;var r=t[On];if(!r)return Xc(t,function(o,a){return S5(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return lh(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=F$(r.k):r.o;Xc(r.i===3?new Set(i):i,function(o,a){return S5(e,r,i,o,a,n)}),lh(e,i,!1),n&&e.u&&fi("Patches").R(r,n,e.u,e.s)}return r.o}function S5(e,t,n,r,i,o){if(i===n&&Ut(5),ka(i)){var a=sh(e,i,o&&t&&t.i!==3&&!w2(t.D,r)?o.concat(r):void 0);if(D9(n,r,a),!ka(a))return;e.m=!1}if(_a(i)&&!k$(i)){if(!e.h.F&&e._<1)return;sh(e,i),t&&t.A.l||lh(e,i)}}function lh(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&T$(t,n)}function Hv(e,t){var n=e[On];return(n?ea(n):e)[t]}function x5(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 C2(e){e.P||(e.P=!0,e.l&&C2(e.l))}function Uv(e){e.o||(e.o=F$(e.t))}function D2(e,t,n){var r=O$(t)?fi("MapSet").N(t,n):B$(t)?fi("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:C5(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Pp;a&&(s=[u],l=Np);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):fi("ES5").J(t,n);return(n?n.A:C5()).p.push(r),r}function lN(e){return ka(e)||Ut(22,e),function t(n){if(!_a(n))return n;var r,i=n[On],o=Ns(n);if(i){if(!i.P&&(i.i<4||!fi("ES5").K(i)))return i.t;i.I=!0,r=A5(n,o),i.I=!1}else r=A5(n,o);return Xc(r,function(a,u){i&&oN(i.t,a)===u||D9(r,a,t(u))}),o===3?new Set(r):r}(e)}function A5(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return F$(e)}var O5,ls,_$=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",cN=typeof Map!="undefined",fN=typeof Set!="undefined",B5=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",S9=_$?Symbol.for("immer-nothing"):((O5={})["immer-nothing"]=!0,O5),F5=_$?Symbol.for("immer-draftable"):"__$immer_draftable",On=_$?Symbol.for("immer-state"):"__$immer_state",dN={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"},pN=""+Object.prototype.constructor,P$=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,hN=Object.getOwnPropertyDescriptors||function(e){var t={};return P$(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},gN={},Pp={get:function(e,t){if(t===On)return e;var n=ea(e);if(!w2(n,t))return function(i,o,a){var u,s=x5(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||!_a(r)?r:r===Hv(e.t,t)?(Uv(e),e.o[t]=D2(e.A.h,r,e)):r},has:function(e,t){return t in ea(e)},ownKeys:function(e){return Reflect.ownKeys(ea(e))},set:function(e,t,n){var r=x5(ea(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Hv(ea(e),t),o=i==null?void 0:i[On];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(aN(n,i)&&(n!==void 0||w2(e.t,t)))return!0;Uv(e),C2(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 Hv(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,Uv(e),C2(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ea(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ut(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ut(12)}},Np={};Xc(Pp,function(e,t){Np[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Np.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Ut(13),Pp.deleteProperty.call(this,e[0],t)},Np.set=function(e,t,n){return t!=="length"&&isNaN(parseInt(t))&&Ut(14),Pp.set.call(this,e[0],t,n,e[0])};var vN=function(){function e(n){var r=this;this.g=B5,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 v=this;p===void 0&&(p=u);for(var m=arguments.length,g=Array(m>1?m-1:0),y=1;y1?l-1:0),f=1;f=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=fi("Patches").$;return ka(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},e}(),Bn=new vN,Xg=Bn.produce;Bn.produceWithPatches.bind(Bn);Bn.setAutoFreeze.bind(Bn);Bn.setUseProxies.bind(Bn);Bn.applyPatches.bind(Bn);var T5=Bn.createDraft.bind(Bn),k5=Bn.finishDraft.bind(Bn);function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ch=new WeakMap,ll=new WeakMap,_5=new WeakMap,P5=new WeakMap,N5=new WeakMap,I5=new WeakMap;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 Rd(e){for(var t=1;t{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of E.pathRefs(e))KN.transform(n,t);for(var r of E.pointRefs(e))YN.transform(r,t);for(var i of E.rangeRefs(e))ZN.transform(i,t);var o=new Set,a=[],u=p=>{if(p){var v=p.join(",");o.has(v)||(o.add(v),a.push(p))}},s=ch.get(e)||[],l=yN(t);for(var c of s){var f=_.transform(c,t);u(f)}for(var d of l)u(d);ch.set(e,a),P.transform(e,t),e.operations.push(t),E.normalize(e),t.type==="set_selection"&&(e.marks=null),ll.get(e)||(ll.set(e,!0),Promise.resolve().then(()=>{ll.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=Rd(Rd({},E.marks(e)||{}),{},{[t]:n});e.marks=i,ll.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?q.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=Rd({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{var{selection:n}=e;if(n)if(R.isExpanded(n))P.unsetNodes(e,t,{match:X.isText,split:!0});else{var r=Rd({},E.marks(e)||{});delete r[t],e.marks=r,ll.get(e)||e.onChange()}}};return e},yN=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(q.nodes(n),M=>{var[,U]=M;return r.concat(U)});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 v=_.transform(p,e);f.push(v)}for(var m of _.ancestors(c)){var g=_.transform(m,e);d.push(g)}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),N=_.next(D);return[...A,N]}default:return[]}};function bN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function hi(e,t){if(e==null)return{};var n=bN(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var N$=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?SN(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=RN(c,f);if([o,a]=r?[a,d]:[d,o],Wu(o,he.ZWJ)&&Wu(a,he.ExtPict)&&(r?s=j5(t.substring(0,u)):s=j5(t.substring(0,t.length-u)),!s)||Wu(o,he.RI)&&Wu(a,he.RI)&&(l!==null?l=!l:r?l=!0:l=HN(t.substring(0,t.length-u)),!l)||o!==he.None&&a!==he.None&&LN(o,a))break;u+=c.length}return u||1},$N=/\s/,wN=/[\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]/,EN=/['\u2018\u2019]/,CN=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;t.length>0;){var o=N$(t,n),[a,u]=I$(t,o,n);if(DN(a,u,n))i=!0,r+=o;else if(!i)r+=o;else break;t=u}return r},I$=(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)]},DN=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if($N.test(t))return!1;if(EN.test(t)){var i=N$(n,r),[o,a]=I$(n,i,r);if(e(o,a,r))return!0}return!wN.test(t)},SN=function*(t){for(var n=t.length-1,r=0;re>=55296&&e<=56319,AN=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 ON=/^(?:[\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])$/,BN=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,FN=/^(?:[\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])$/,TN=/^[\u1100-\u115F\uA960-\uA97C]$/,kN=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,_N=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,PN=/^[\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]$/,NN=/^[\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]$/,IN=/^(?:[\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])$/,RN=(e,t)=>{var n=he.Any;return e.search(ON)!==-1&&(n|=he.Extend),t===8205&&(n|=he.ZWJ),t>=127462&&t<=127487&&(n|=he.RI),e.search(BN)!==-1&&(n|=he.Prepend),e.search(FN)!==-1&&(n|=he.SpacingMark),e.search(TN)!==-1&&(n|=he.L),e.search(kN)!==-1&&(n|=he.V),e.search(_N)!==-1&&(n|=he.T),e.search(PN)!==-1&&(n|=he.LV),e.search(NN)!==-1&&(n|=he.LVT),e.search(IN)!==-1&&(n|=he.ExtPict),n};function Wu(e,t){return(e&t)!==0}var jN=[[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 LN(e,t){return jN.findIndex(n=>Wu(e,n[0])&&Wu(t,n[1]))===-1}var MN=/(?:[\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$/,j5=e=>e.search(MN)!==-1,zN=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,HN=e=>{var t=e.match(zN);if(t===null)return!1;var n=t[0].length/2;return n%2===1},L5=e=>en(e)&&q.isNodeList(e.children)&&!E.isEditor(e),te={isAncestor(e){return en(e)&&q.isNodeList(e.children)},isElement:L5,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 L5(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},UN=["text"],VN=["text"];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 lu(e){for(var t=1;t1&&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,lu(lu({},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,lu(lu({},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=q.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(!en(e))return!1;var t=z5.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||en(e.marks))&&(e.selection===null||R.isRange(e.selection))&&q.isNodeList(e.children)&&Ji.isOperationList(e.operations);return z5.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=_5.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=q.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 q.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=hi(i,UN);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:m=>E.isBlock(e,m)});if(l&&c){var[f,d]=l,[,p]=c;_.isAncestor(p,d)&&(s=f)}}var v=hi(s,VN);return v},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=q.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(WN.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=q.nodes(e,{reverse:o,from:s,to:l,pass:$=>{var[w]=$;return a?!1:E.isVoid(e,w)}}),p=[],v;for(var[m,g]of d){var y=v&&_.compare(g,v[1])===0;if(!(r==="highest"&&y)){if(!u(m,g)){if(i&&!y&&X.isText(m))return;continue}if(r==="lowest"&&y){v=[m,g];continue}var h=r==="lowest"?v:[m,g];h&&(i?p.push(h):yield h),v=[m,g]}}r==="lowest"&&v&&(i?p.push(v):yield v),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=o=>ch.get(o)||[];if(!!E.isNormalizing(e)){if(n){var i=Array.from(q.nodes(e),o=>{var[,a]=o;return a});ch.set(e,i)}r(e).length!==0&&E.withoutNormalizing(e,()=>{for(var o of r(e))if(q.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(q.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]=q.first(e,t);t=o}else if(i==="end"){var[,a]=q.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 q.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=P5.get(e);return t||(t=new Set,P5.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]=q.last(e,t);i=o}else{var[,a]=q.first(e,t);i=a}var u=q.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=N5.get(e);return t||(t=new Set,N5.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,v=0;for(var[m,g]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(m)){if(!o&&e.isVoid(m)){yield E.start(e,g);continue}if(e.isInline(m))continue;if(E.hasInlines(e,m)){var y=_.isAncestor(g,s.path)?s:E.end(e,g),h=_.isAncestor(g,u.path)?u:E.start(e,g);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(X.isText(m)){var $=_.equals(g,l.path);for($?(p=i?l.offset:m.text.length-l.offset,v=l.offset):(p=m.text.length,v=i?p:0),($||c||r==="offset")&&(yield{path:g,offset:v},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=I$(f,d,i)[1]}if(v=i?v-d:v+d,p=p-d,p<0){d=-p;break}d=0,yield{path:g,offset:v}}}}function w(C,D,A){return D==="character"?N$(C,A):D==="word"?CN(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=I5.get(e);return t||(t=new Set,I5.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){_5.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,lu(lu({},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)}},WN={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(_.isPath)}},qN=["children"],GN=["text"],H5=new WeakMap,q={ancestor(e,t){var n=q.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=q.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=q.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of q.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 q.nodes(e,t))te.isElement(n)&&(yield[n,r])},extractProps(e){if(te.isAncestor(e)){var t=hi(e,qN);return t}else{var t=hi(e,GN);return t}},first(e,t){for(var n=t.slice(),r=q.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=Xg({children:e.children},r=>{var[i,o]=R.edges(t),a=q.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=q.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(_.equals(u,o.path)){var c=q.leaf(r,u);c.text=c.text.slice(0,o.offset)}if(_.equals(u,i.path)){var f=q.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;rq.isNode(r));return H5.set(e,n),n},last(e,t){for(var n=t.slice(),r=q.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=q.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=q.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=q.get(e,u);continue}if(u.length===0)break;if(!r){var c=_.next(u);if(q.has(e,c)){u=c,s=q.get(e,u);continue}}if(r&&u[u.length-1]!==0){var f=_.previous(u);u=f,s=q.get(e,u);continue}u=_.parent(u),s=q.get(e,u),a.add(s)}},parent(e,t){var n=_.parent(t),r=q.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(q.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of q.nodes(e,t))X.isText(n)&&(yield[n,r])}};function U5(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;tJi.isOperation(t))},isSelectionOperation(e){return Ji.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Ji.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;rt[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)&&on===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return _.compare(e,t)===1},isAncestor(e,t){return e.lengtht.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 Xg(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.lengtht.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 en(e)&&typeof e.offset=="number"&&_.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Xg(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.position1&&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=hi(e,XN),[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:JN({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 en(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 Xg(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()}}},x9=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(en(r)&&en(i)){if(!x9(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(o){var a=hi(o,QN);return a}return x9(r?i(e):e,r?i(t):t)},isText(e){return en(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=[ri({},e)];for(var r of t){var i=hi(r,eI),[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.offsetf){var g=o.offset-f;p=ri(ri({},d),{},{text:d.text.slice(0,g)}),d=ri(ri({},d),{},{text:d.text.slice(g)})}Object.assign(d,i),p&&u.push(p),u.push(d),v&&u.push(v)}n=u}return n}};function K5(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 cl(e){for(var t=1;t{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=q.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=q.leaf(e,l),p=d.text.slice(0,c),v=d.text.slice(c);if(d.text=p+f+v,t)for(var[m,g]of R.points(t))t[g]=$e.transform(m,n);break}case"merge_node":{var{path:y}=n,h=q.get(e,y),$=_.previous(y),w=q.get(e,$),C=q.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,N]of R.points(t))t[N]=$e.transform(A,n);break}case"move_node":{var{path:M,newPath:U}=n;if(_.isAncestor(M,U))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(U,"] because the destination is inside itself."));var V=q.get(e,M),J=q.parent(e,M),Z=M[M.length-1];J.children.splice(Z,1);var se=_.transform(M,n),ee=q.get(e,_.parent(se)),ae=se[se.length-1];if(ee.children.splice(ae,0,V),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=q.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 I=void 0,H=void 0;for(var[j,Q]of q.texts(e))if(_.compare(Q,ve)===-1)I=[j,Q];else{H=[j,Q];break}var ce=!1;I&&H&&(_.equals(H[1],ve)?ce=!_.hasPrevious(H[1]):ce=_.common(I[1],ve).length<_.common(H[1],ve).length),I&&!ce?(T.path=I[1],T.offset=I[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=q.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,yn]of R.points(t))t[yn]=$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 ln=q.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 In=ft[dt];In==null?delete ln[dt]:ln[dt]=In}for(var bn in lt)ft.hasOwnProperty(bn)||delete ln[bn];break}case"set_selection":{var{newProperties:cn}=n;if(cn==null)t=cn;else{if(t==null){if(!R.isRange(cn))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(cn)," when there is no current selection."));t=cl({},cn)}for(var yr in cn){var br=cn[yr];if(br==null){if(yr==="anchor"||yr==="focus")throw new Error('Cannot remove the "'.concat(yr,'" selection property'));delete t[yr]}else t[yr]=br}}break}case"split_node":{var{path:$n,position:$r,properties:on}=n;if($n.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat($n,"] because the root node cannot be split."));var Rn=q.get(e,$n),nu=q.parent(e,$n),Xs=$n[$n.length-1],Xr;if(X.isText(Rn)){var $i=Rn.text.slice(0,$r),ru=Rn.text.slice($r);Rn.text=$i,Xr=cl(cl({},on),{},{text:ru})}else{var wi=Rn.children.slice(0,$r),Jr=Rn.children.slice($r);Rn.children=wi,Xr=cl(cl({},on),{},{children:Jr})}if(nu.children.splice(Xs+1,0,Xr),t)for(var[wn,Ei]of R.points(t))t[Ei]=$e.transform(wn,n);break}}return t},nI={transform(e,t){e.children=T5(e.children);var n=e.selection&&T5(e.selection);try{n=tI(e,n,t)}finally{e.children=k5(e.children),n?e.selection=ka(n)?k5(n):n:e.selection=null}}},rI=["text"],iI=["children"];function Y5(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 X5(e){for(var t=1;t2&&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(q.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,v=E.pathRef(e,p),m=E.isEnd(e,a,p);P.splitNodes(e,{at:a,match:u,mode:o,voids:i});var g=v.unref();a=m?_.next(g):g}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)?cu(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:v}=f.children;if(v===1){var m=_.next(d);P.moveNodes(e,{at:l,to:m,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===v-1){var g=_.next(d);P.moveNodes(e,{at:l,to:g,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,[v,m]=f;if(!(p.length===0||m.length===0)){var g=_.next(m),y=_.common(p,m),h=_.isSibling(p,m),$=Array.from(E.levels(e,{at:p}),M=>{var[U]=M;return U}).slice(y.length).slice(0,-1),w=E.above(e,{at:p,mode:"highest",match:M=>$.includes(M)&&A9(e,M)}),C=w&&E.pathRef(e,w[1]),D,A;if(X.isText(d)&&X.isText(v)){var N=hi(d,rI);A=v.text.length,D=N}else if(te.isElement(d)&&te.isElement(v)){var N=hi(d,iI);A=v.children.length,D=N}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(v)));h||P.moveNodes(e,{at:p,to:g,voids:o}),C&&P.removeNodes(e,{at:C.current,voids:o}),te.isElement(v)&&E.isEmpty(e,v)||X.isText(v)&&v.text===""&&m[m.length-1]!==0?P.removeNodes(e,{at:m,voids:o}):e.apply({type:"merge_node",path:g,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)?cu(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[,v]=p;return E.pathRef(e,v)});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)?cu(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)?cu(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 v=E.isStart(e,c,c.path);P.splitNodes(e,{at:c,match:r,mode:d,voids:s,always:!v}),i=l.unref(),n.at==null&&P.select(e,i)}for(var[m,g]of E.nodes(e,{at:i,match:r,mode:a,voids:s})){var y={},h={};if(g.length!==0){var $=!1;for(var w in t)w==="children"||w==="text"||t[w]!==m[w]&&($=!0,m.hasOwnProperty(w)&&(y[w]=m[w]),t[w]!=null&&(h[w]=t[w]));$&&e.apply({type:"set_node",path:g,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=aI(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"}),v=0;if(!r&&p){var[m,g]=p;if(te.isElement(m)&&e.isInline(m)){var y=E.after(e,g);if(!y){var h={text:""},$=_.next(g);P.insertNodes(e,h,{at:$,voids:r}),y=E.point(e,$)}o=y,u=!0}var w=o.path.length-g.length;a=w+1,u=!0}var C=E.pointRef(e,o),D=o.path.length-a,[,A]=d,N=o.path.slice(0,D),M=a===0?o.offset:o.path[D]+v;for(var[U,V]of E.levels(e,{at:N,reverse:!0,voids:r})){var J=!1;if(V.length2&&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)?cu(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 v=p.unref(),[m]=E.node(e,v),g=E.range(e,v);r&&u&&(g=R.intersection(u.current,g)),P.liftNodes(e,{at:g,match:y=>te.isAncestor(m)&&m.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=cu(e,u):e.isInline(t)?a=g=>E.isInline(e,g)||X.isText(g):a=g=>E.isBlock(e,g)),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)?g=>E.isBlock(e,g):g=>E.isEditor(g),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 v=Array.from(E.nodes(e,{at:p,match:a,mode:r,voids:o}));if(v.length>0){var m=function(){var[g]=v,y=v[v.length-1],[,h]=g,[,$]=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,N=w.length+1,M=_.next($.slice(0,N)),U=X5(X5({},t),{},{children:[]});P.insertNodes(e,U,{at:M,voids:o}),P.moveNodes(e,{at:C,match:V=>te.isAncestor(A)&&A.children.includes(V),to:M.concat(0),voids:o})}();if(m==="continue")continue}}}}})}},A9=(e,t)=>{if(te.isElement(t)){var n=t;return E.isVoid(e,t)?!0:n.children.length===1?A9(e,n.children[0]):!1}else return!E.isEditor(t)},aI=(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()},cu=(e,t)=>{var[n]=E.node(e,t);return r=>r===n};function J5(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 Z5(e){for(var t=1;t1&&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"]:Z5(Z5({},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})}}},sI={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[v,m]=R.edges(a),g=E.above(e,{match:ce=>E.isBlock(e,ce),at:v,voids:o}),y=E.above(e,{match:ce=>E.isBlock(e,ce),at:m,voids:o}),h=g&&y&&!_.equals(g[1],y[1]),$=_.equals(v.path,m.path),w=o?null:E.void(e,{at:v,mode:"highest"}),C=o?null:E.void(e,{at:m,mode:"highest"});if(w){var D=E.before(e,v);D&&g&&_.isAncestor(g[1],D.path)&&(v=D)}if(C){var A=E.after(e,m);A&&y&&_.isAncestor(y[1],A.path)&&(m=A)}var N=[],M;for(var U of E.nodes(e,{at:a,voids:o})){var[V,J]=U;M&&_.compare(J,M)===0||(!o&&E.isVoid(e,V)||!_.isCommon(J,v.path)&&!_.isCommon(J,m.path))&&(N.push(U),M=J)}var Z=Array.from(N,ce=>{var[,we]=ce;return E.pathRef(e,we)}),se=E.pointRef(e,v),ee=E.pointRef(e,m);if(!$&&!w){var ae=se.current,[fe]=E.leaf(e,ae),{path:_e}=ae,{offset:ve}=v,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:I}=F,H=$?v.offset:0,j=k.text.slice(H,m.offset);j.length>0&&e.apply({type:"remove_text",path:I,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,v=E.isStart(e,o,p),m=E.isEnd(e,o,p),g=v&&m,y=!v||v&&m,h=!m,[,$]=q.first({children:t},[]),[,w]=q.last({children:t},[]),C=[],D=k=>{var[I,H]=k,j=H.length===0;return j?!1:g?!0:!(y&&_.isAncestor(H,$)&&te.isElement(I)&&!e.isVoid(I)&&!e.isInline(I)||h&&_.isAncestor(H,w)&&te.isElement(I)&&!e.isVoid(I)&&!e.isInline(I))};for(var A of q.nodes({children:t},{pass:D}))D(A)&&C.push(A);var N=[],M=[],U=[],V=!0,J=!1;for(var[Z]of C)te.isElement(Z)&&!e.isInline(Z)?(V=!1,J=!0,M.push(Z)):V?N.push(Z):U.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,m?_.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,N,{at:Ie.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),g&&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,U,{at:ve.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),!n.at){var T;U.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 jd(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=O9}function z9(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function H9(e){return!!e&&typeof e=="object"}function oR(e){return typeof e=="string"||!L9(e)&&H9(e)&&Hf.call(e)==pI}function aR(e){if(!e)return[];if(L$(e))return oR(e)?RI(e):ZI(e);if(Wv&&e[Wv])return _I(e[Wv]());var t=ta(e),n=t==S2?PI:t==x2?II:sR;return n(e)}function uR(e){return L$(e)?KI(e):JI(e)}function sR(e){return e?BI(e,uR(e)):[]}var o6=aR;function a6(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function M$(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){typeof e[n]=="undefined"?e[n]=t[n]:a6(t[n])&&a6(e[n])&&Object.keys(t[n]).length>0&&M$(e[n],t[n])})}var U9={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 Vf(){var e=typeof document!="undefined"?document:{};return M$(e,U9),e}var lR={document:U9,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=="undefined"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout!="undefined"&&clearTimeout(e)}};function Ka(){var e=typeof window!="undefined"?window:{};return M$(e,lR),e}function cR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function P2(e){return P2=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},P2(e)}function fh(e,t){return fh=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},fh(e,t)}function fR(){if(typeof Reflect=="undefined"||!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 Ip(e,t,n){return fR()?Ip=Reflect.construct:Ip=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&fh(l,a.prototype),l},Ip.apply(null,arguments)}function dR(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function N2(e){var t=typeof Map=="function"?new Map:void 0;return N2=function(r){if(r===null||!dR(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Ip(r,arguments,P2(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),fh(i,r)},N2(e)}function pR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hR(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(r){t.__proto__=r}})}var Zi=function(e){cR(t,e);function t(n){var r;return r=e.call.apply(e,[this].concat(n))||this,hR(pR(r)),r}return t}(N2(Array));function Qg(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,Qg(n)):t.push(n)}),t}function V9(e,t){return Array.prototype.filter.call(e,t)}function gR(e){for(var t=[],n=0;n=0&&o.indexOf(">")>=0){var a="div";o.indexOf("0}).length>0}function Mr(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n=0&&(t[vR(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 zr(e){if(typeof e=="undefined"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r=0;else o.value=e}return this}function Hr(){for(var e=arguments.length,t=new Array(e),n=0;n=0;p-=1){var v=d[p];o&&v.listener===o||o&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===o?(f.removeEventListener(l,v.proxyListener,a),d.splice(p,1)):o||(f.removeEventListener(l,v.proxyListener,a),d.splice(p,1))}}return this}function ph(){var e=Ka();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function hh(){var e=Ka();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function s6(){if(this.length>0){var e=Ka(),t=Vf(),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 hs(){for(var e=0;e=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(e instanceof Zi)for(r=0;r-1&&e%1==0&&e-1&&e%1==0&&e<=q9}function HR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function UR(e){return!!e&&typeof e=="object"}function VR(e){return H$(e)?OR(e):kR(e)}function WR(e){return e}var U$=RR;{if(typeof navigator!="undefined"&&navigator.product==="ReactNative"&&typeof crypto=="undefined")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!="undefined"&&typeof crypto=="undefined")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=="undefined")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 Y9=(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 X9="Expected a function",p6=0/0,qR="[object Symbol]",GR=/^\s+|\s+$/g,KR=/^[-+]0x[0-9a-f]+$/i,YR=/^0b[01]+$/i,XR=/^0o[0-7]+$/i,JR=parseInt,ZR=typeof ot=="object"&&ot&&ot.Object===Object&&ot,QR=typeof self=="object"&&self&&self.Object===Object&&self,ej=ZR||QR||Function("return this")(),tj=Object.prototype,nj=tj.toString,rj=Math.max,ij=Math.min,qv=function(){return ej.Date.now()};function oj(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(X9);t=h6(t)||0,wh(n)&&(c=!!n.leading,f="maxWait"in n,o=f?rj(h6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,N=i;return r=i=void 0,l=D,a=e.apply(N,A),a}function v(D){return l=D,u=setTimeout(y,t),c?p(D):a}function m(D){var A=D-s,N=D-l,M=t-A;return f?ij(M,o-N):M}function g(D){var A=D-s,N=D-l;return s===void 0||A>=t||A<0||f&&N>=o}function y(){var D=qv();if(g(D))return h(D);u=setTimeout(y,m(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=g(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return v(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 aj(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(X9);return wh(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),oj(e,t,{leading:r,maxWait:t,trailing:i})}function wh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function uj(e){return!!e&&typeof e=="object"}function sj(e){return typeof e=="symbol"||uj(e)&&nj.call(e)==qR}function h6(e){if(typeof e=="number")return e;if(sj(e))return p6;if(wh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(GR,"");var n=YR.test(e);return n||XR.test(e)?JR(e.slice(2),n?2:8):KR.test(e)?p6:+e}var Pa=aj;function lj(e,t){return document.createElement(e,t)}function cj(e,t,n){return document.createElementNS(e,t,n)}function fj(e){return document.createTextNode(e)}function dj(e){return document.createComment(e)}function pj(e,t,n){e.insertBefore(t,n)}function hj(e,t){e.removeChild(t)}function gj(e,t){e.appendChild(t)}function vj(e){return e.parentNode}function mj(e){return e.nextSibling}function yj(e){return e.tagName}function bj(e,t){e.textContent=t}function $j(e){return e.textContent}function wj(e){return e.nodeType===1}function Ej(e){return e.nodeType===3}function Cj(e){return e.nodeType===8}const Dj={createElement:lj,createElementNS:cj,createTextNode:fj,createComment:dj,insertBefore:pj,removeChild:hj,appendChild:gj,parentNode:vj,nextSibling:mj,tagName:yj,setTextContent:bj,getTextContent:$j,isElement:wj,isText:Ej,isComment:Cj};function Jc(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 I2=Array.isArray;function Rp(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function Gv(e){return e===void 0}function En(e){return e!==void 0}const g6=Jc("",{},[],void 0,void 0);function fl(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 Sj(e){return e.sel!==void 0}function xj(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 Aj=["create","update","remove","destroy","pre","post"];function Oj(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t!==void 0?t:Dj;for(const d of Aj)for(const p of e){const v=p[d];v!==void 0&&n[d].push(v)}function i(d){const p=d.id?"#"+d.id:"",v=d.getAttribute("class"),m=v?"."+v.split(" ").join("."):"";return Jc(r.tagName(d).toLowerCase()+p+m,{},[],void 0,d)}function o(d,p){return function(){if(--p===0){const m=r.parentNode(d);r.removeChild(m,d)}}}function a(d,p){var v,m;let g,y=d.data;if(y!==void 0){const w=(v=y.hook)===null||v===void 0?void 0:v.init;En(w)&&(w(d),y=d.data)}const h=d.children,$=d.sel;if($==="!")Gv(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,N=w!==-1||C!==-1?$.slice(0,Math.min(D,A)):$,M=d.elm=En(y)&&En(g=y.ns)?r.createElementNS(g,N,y):r.createElement(N,y);for(D0&&M.setAttribute("class",$.slice(A+1).replace(/\./g," ")),g=0;gh?(V=v[C+1]==null?null:v[C+1].elm,u(d,V,v,y,C,m)):l(d,p,g,h))}function f(d,p,v){var m,g,y,h,$;const w=(m=p.data)===null||m===void 0?void 0:m.hook;(g=w==null?void 0:w.prepatch)===null||g===void 0||g.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 N=0;Ni?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=r?e:CL(e,t,n)}function xL(e){return function(t){t=n0(t);var n=gO(t)?yL(t):void 0,r=n?n[0]:t.charAt(0),i=n?SL(n,1).join(""):t.slice(1);return r[e]()+i}}function AL(e){return function(t){return dL(PL(kL(t).replace(nL,"")),e,"")}}function OL(e){return!!e&&typeof e=="object"}function BL(e){return typeof e=="symbol"||OL(e)&&EL.call(e)==Hj}function n0(e){return e==null?"":DL(e)}var FL=AL(function(e,t,n){return t=t.toLowerCase(),e+(n?TL(t):t)});function TL(e){return _L(n0(e).toLowerCase())}function kL(e){return e=n0(e),e&&e.replace(Vj,vL).replace(rL,"")}var _L=xL("toUpperCase");function PL(e,t,n){return e=n0(e),t=n?void 0:t,t===void 0?mL(e)?$L(e):hL(e):e.match(t)||[]}var NL=FL,IL=typeof window!="undefined"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Yv={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},vO={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:IL?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},G$={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 Ld=1;Ld<20;Ld++)G$["f"+Ld]=111+Ld;function mO(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(a){return jL(a,t)}),i=function(u){return r.some(function(s){return LL(s,u)})},o=n==null?i:i(n);return o}function RL(e,t){return mO(e,{byKey:!0},t)}function jL(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in Yv)r[Yv[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 v=yO(d),m=Yv[v];if(d.length>1&&!m&&!vO[d]&&!G$[v])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!m)&&(n?r.key=v:r.which=ML(d)),m&&(r[m]=p?null:!0)}}catch(g){s=!0,l=g}finally{try{!u&&c.return&&c.return()}finally{if(s)throw l}}return r}function LL(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 ML(e){e=yO(e);var t=G$[e]||e.toUpperCase().charCodeAt(0);return t}function yO(e){return e=e.toLowerCase(),e=vO[e]||e,e}var zL=mO,Xv=RL,HL="Expected a function",B6=0/0,UL="[object Symbol]",VL=/^\s+|\s+$/g,WL=/^[-+]0x[0-9a-f]+$/i,qL=/^0b[01]+$/i,GL=/^0o[0-7]+$/i,KL=parseInt,YL=typeof ot=="object"&&ot&&ot.Object===Object&&ot,XL=typeof self=="object"&&self&&self.Object===Object&&self,JL=YL||XL||Function("return this")(),ZL=Object.prototype,QL=ZL.toString,eM=Math.max,tM=Math.min,Jv=function(){return JL.Date.now()};function nM(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(HL);t=F6(t)||0,L2(n)&&(c=!!n.leading,f="maxWait"in n,o=f?eM(F6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,N=i;return r=i=void 0,l=D,a=e.apply(N,A),a}function v(D){return l=D,u=setTimeout(y,t),c?p(D):a}function m(D){var A=D-s,N=D-l,M=t-A;return f?tM(M,o-N):M}function g(D){var A=D-s,N=D-l;return s===void 0||A>=t||A<0||f&&N>=o}function y(){var D=Jv();if(g(D))return h(D);u=setTimeout(y,m(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(Jv())}function C(){var D=Jv(),A=g(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return v(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 L2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function rM(e){return!!e&&typeof e=="object"}function iM(e){return typeof e=="symbol"||rM(e)&&QL.call(e)==UL}function F6(e){if(typeof e=="number")return e;if(iM(e))return B6;if(L2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=L2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(VL,"");var n=qL.test(e);return n||GL.test(e)?KL(e.slice(2),n?2:8):WL.test(e)?B6:+e}var bO=nM,$O=R$(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]",v="[object Object]",m="[object Promise]",g="[object RegExp]",y="[object Set]",h="[object String]",$="[object Symbol]",w="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",A="[object Float32Array]",N="[object Float64Array]",M="[object Int8Array]",U="[object Int16Array]",V="[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[N]=ie[M]=ie[U]=ie[V]=ie[d]=ie[p]=ie[v]=ie[g]=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,I=k&&!0&&e&&!e.nodeType&&e,H=I&&I.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-1}function lv(b,S){var B=this.__data__,L=ou(B,b);return L<0?B.push([b,S]):B[L][1]=S,this}Mt.prototype.clear=ov,Mt.prototype.delete=av,Mt.prototype.get=uv,Mt.prototype.has=sv,Mt.prototype.set=lv;function Yt(b){var S=-1,B=b?b.length:0;for(this.clear();++S-1&&b%1==0&&b-1&&b%1==0&&b<=i}function Cr(b){var S=typeof b;return!!b&&(S=="object"||S=="function")}function _d(b){return!!b&&typeof b=="object"}function sl(b){return su(b)?iu(b):Dv(b)}function Rv(){return[]}function jv(){return!1}e.exports=Bd}),oM=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},fu;function T6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var aM=0;function uM(e){return"__private_"+aM+++"_"+e}function sM(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),acrypto.getRandomValues(new Uint8Array(e)),DO=(e,t,n)=>{let r=(2<{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},pM=(e,t)=>DO(e,t,CO),hM=(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 gM={nanoid:hM,customAlphabet:pM,customRandom:DO,urlAlphabet:dM,random:CO},Zv=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 SO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}SO.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=2}return t?n(t.split(";")[0]):n};function bM(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var $M=0;function wM(e){return"__private_"+$M+++"_"+e}var Qv=wM("publish");class xO{constructor(){Object.defineProperty(this,Qv,{value:EM}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,bM(this,Qv)[Qv](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function EM(){for(var e=arguments.length,t=new Array(e),n=0;n{r(...t)})}xO.VERSION="2.0.3";var CM=function(){return new xO},AO=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)}},_6={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"},DM=function(t){var n;if(t.type)return t.type;const r=t.name?(n=AO(t.name).extension)==null?void 0:n.toLowerCase():null;return r&&r in _6?_6[r]:"application/octet-stream"};function SM(e){return e.charCodeAt(0).toString(32)}function P6(e){let t="";return e.replace(/[^A-Z0-9]/ig,n=>(t+=`-${SM(n)}`,"/"))+t}var xM=function(t){let n="uppy";return typeof t.name=="string"&&(n+=`-${P6(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${P6(t.meta.relativePath.toLowerCase())}`),t.data.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n},AM=function(t){if(t==null&&(t=typeof navigator!="undefined"?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},OM=function(t,n){return n.name?n.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function e1(e){return e<10?`0${e}`:e.toString()}var jp=function(){const t=new Date,n=e1(t.getHours()),r=e1(t.getMinutes()),i=e1(t.getSeconds());return`${n}:${r}:${i}`};const BM={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;nr,onBeforeUpload:r=>r,store:CM(),logger:PM,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=NM),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=Pa(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:AM(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ne(this,dl)[dl]=this.store.subscribe((r,i,o)=>{this.emit("state-update",r,i,o),this.updateAll(i)}),this.opts.debug&&typeof window!="undefined"&&(window[this.opts.id]=this),ne(this,r1)[r1]()}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{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 wO([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,oa)[oa].add(t)}removePreProcessor(t){return ne(this,oa)[oa].delete(t)}addPostProcessor(t){ne(this,si)[si].add(t)}removePostProcessor(t){return ne(this,si)[si].delete(t)}addUploader(t){ne(this,aa)[aa].add(t)}removeUploader(t){return ne(this,aa)[aa].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(v=>{let{progress:m}=v;return!m.uploadComplete&&m.uploadStarted}),a=i.filter(v=>!v.progress.uploadStarted),u=i.filter(v=>v.progress.uploadStarted||v.progress.preprocess||v.progress.postprocess),s=i.filter(v=>v.progress.uploadStarted),l=i.filter(v=>v.isPaused),c=i.filter(v=>v.progress.uploadComplete),f=i.filter(v=>v.error),d=o.filter(v=>!v.isPaused),p=i.filter(v=>v.progress.preprocess||v.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(v=>v.isGhost)}}validateRestrictions(t,n){try{return ne(this,Ac)[Ac](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,pl)[pl](t);const{files:n}=this.getState();let r=ne(this,hl)[hl](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,gl)[gl](),r.id}addFiles(t){ne(this,pl)[pl]();const n={...this.getState().files},r=[],i=[];for(let o=0;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,gl)[gl](),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,oi)[oi](n,{forceAllowNewUpload:!0});return ne(this,ai)[ai](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,oi)[oi]([t],{forceAllowNewUpload:!0});return ne(this,ai)[ai](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!="undefined"?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,Ht)[Ht]?ne(this,Ht)[Ht][r.type].push(r):ne(this,Ht)[Ht][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(ne(this,Ht)[Ht])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[FO](t){return ne(this,Ht)[Ht][t]}iteratePlugins(t){Object.values(ne(this,Ht)[Ht]).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,Ht)[Ht][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,dl)[dl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window!="undefined"&&window.removeEventListener&&(window.removeEventListener("online",ne(this,or)[or]),window.removeEventListener("offline",ne(this,or)[or]))}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,ai)[ai](t):(ne(this,ca)[ca](t),Promise.reject(new Error("Nonexistent upload")))}[TO](){return ne(this,oi)[oi](...arguments)}addResultData(t,n){if(!ne(this,i1)[i1](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,Ht)[Ht].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,t1)[t1](n),ne(this,n1)[n1](n)}).catch(i=>{ne(this,kt)[kt](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,oi)[oi](a);return ne(this,ai)[ai](u)}).catch(i=>{ne(this,kt)[kt](i,{showInformer:!1})}))}}function RM(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 _r(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?yM(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new _r(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 _r(this.i18n("exceedsSize",{size:Zv(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new _r(this.i18n("exceedsSize",{size:Zv(n),file:e.name}));if(r&&e.size!=null&&e.size{const r=this.getFile(n);return ne(this,Zc)[Zc](r)});if(t.length)throw new IM(t,`${this.i18n("missingRequiredMetaField")}`)}function zM(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 HM(e){const{allowNewUpload:t}=this.getState();t===!1&&ne(this,kt)[kt](new _r(this.i18n("noMoreFilesAllowed")),{file:e})}function UM(e,t){const n=DM(t),r=OM(n,t),i=AO(r).extension,o=Boolean(t.isRemote),a=xM({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const f=new _r(this.i18n("noDuplicates",{fileName:r}));ne(this,kt)[kt](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,kt)[kt](new _r("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,Ac)[Ac](l,f)}catch(f){ne(this,kt)[kt](f,{file:l})}return l}function VM(){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 WM(){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,kt)[kt](i,{throwErr:!1})}else ne(this,kt)[kt](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,si)[si].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,Zc)[Zc](t)}),typeof window!="undefined"&&window.addEventListener&&(window.addEventListener("online",ne(this,or)[or]),window.addEventListener("offline",ne(this,or)[or]),setTimeout(ne(this,or)[or],3e3))}function qM(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=_M();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 GM(e){const{currentUploads:t}=this.getState();return t[e]}function KM(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function YM(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...ne(this,oa)[oa],...ne(this,aa)[aa],...ne(this,si)[si]];try{for(let a=r;a{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,ca)[ca](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}kO.VERSION="2.1.3";var _O=kO,XM=R$(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 v(T){var F=T.parentNode;F&&F.removeChild(T)}function m(T,F,k){var I,H,j,Q={};for(j in F)j=="key"?I=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 g(T,Q,I,H,null)}function g(T,F,k,I,H){var j={type:T,props:F,key:k,ref:I,__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;F0?g(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;ze2&&(Q.children=arguments.length>3?n.call(arguments,2):k),g(T.type,Q,I||T.key,H||T.ref,null)},t.createContext=function(T,F){var k={__c:F="__cC"+l++,__:T,Consumer:function(I,H){return I.children(H)},Provider:function(I){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)}}),I.children}};return k.Provider.__=k.Consumer.contextType=k},t.createElement=m,t.createRef=function(){return{current:null}},t.h=m,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(I){T(I,k)}):k.push(F)),k}}),JM=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):JM(t)?t:null},K$=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 wO([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 N6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var QM=0;function ez(e){return"__private_"+QM+++"_"+e}const{render:I6}=XM;function tz(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o(t=null,e(...n)))),t}}var vl=ez("updateUI");class Y$ extends K${constructor(){super(...arguments),Object.defineProperty(this,vl,{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 N6(this,vl)[vl]=tz(s=>{!this.uppy.getPlugin(this.id)||(I6(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),I6(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 Y$)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