import{d as g9,r as v2,s as HP,i as UP,w as VP,k as WP,t as qP,o as v9,c as m9}from"./@vue.f8dfc830.js";var Pv;if(typeof global>"u"){if("ActiveXObject"in window){var d5="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";d5+=` Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(d5)}p5(),h5()}else global&&((Pv=global.navigator)===null||Pv===void 0?void 0:Pv.userAgent.match("QQBrowser"))&&(p5(),h5());function p5(){typeof globalThis>"u"&&(window.globalThis=window)}function h5(){typeof AggregateError>"u"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var GP=Object.getOwnPropertyDescriptor(global,"window");(!global.window||GP.set)&&(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function g5(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){var t,n;return g5(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(g5(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ht(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:E$(e)?2:C$(e)?3:0}function m2(e,t){return Ts(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function KP(e,t){return Ts(e)===2?e.get(t):e[t]}function y9(e,t,n){var r=Ts(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function YP(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function E$(e){return QP&&e instanceof Map}function C$(e){return eN&&e instanceof Set}function Xo(e){return e.o||e.t}function D$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=rN(e);delete t[xn];for(var n=O$(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=XP),Object.freeze(e),t&&qc(e,function(n,r){return S$(r,!0)},!0)),e}function XP(){Ht(2)}function x$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function si(e){var t=iN[e];return t||Ht(18,e),t}function v5(){return os||Ht(0),os}function Nv(e,t){t&&(si("Patches"),e.u=[],e.s=[],e.v=t)}function nh(e){y2(e),e.p.forEach(JP),e.p=null}function y2(e){e===os&&(os=e.l)}function m5(e){return os={p:[],l:os,h:e,m:!0,_:0}}function JP(e){var t=e[xn];t.i===0||t.i===1?t.j():t.O=!0}function Iv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||si("ES5").S(t,e,r),r?(n[xn].P&&(nh(t),Ht(4)),Ba(e)&&(e=rh(t,e),t.l||ih(t,e)),t.u&&si("Patches").M(n[xn],e,t.u,t.s)):e=rh(t,n,[]),nh(t),t.u&&t.v(t.u,t.s),e!==b9?e:void 0}function rh(e,t,n){if(x$(t))return t;var r=t[xn];if(!r)return qc(t,function(o,a){return y5(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ih(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=D$(r.k):r.o;qc(r.i===3?new Set(i):i,function(o,a){return y5(e,r,i,o,a,n)}),ih(e,i,!1),n&&e.u&&si("Patches").R(r,n,e.u,e.s)}return r.o}function y5(e,t,n,r,i,o){if(i===n&&Ht(5),Oa(i)){var a=rh(e,i,o&&t&&t.i!==3&&!m2(t.D,r)?o.concat(r):void 0);if(y9(n,r,a),!Oa(a))return;e.m=!1}if(Ba(i)&&!x$(i)){if(!e.h.F&&e._<1)return;rh(e,i),t&&t.A.l||ih(e,i)}}function ih(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&S$(t,n)}function Rv(e,t){var n=e[xn];return(n?Xo(n):e)[t]}function b5(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function b2(e){e.P||(e.P=!0,e.l&&b2(e.l))}function jv(e){e.o||(e.o=D$(e.t))}function $2(e,t,n){var r=E$(t)?si("MapSet").N(t,n):C$(t)?si("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:v5(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Bp;a&&(s=[u],l=Fp);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):si("ES5").J(t,n);return(n?n.A:v5()).p.push(r),r}function ZP(e){return Oa(e)||Ht(22,e),function t(n){if(!Ba(n))return n;var r,i=n[xn],o=Ts(n);if(i){if(!i.P&&(i.i<4||!si("ES5").K(i)))return i.t;i.I=!0,r=$5(n,o),i.I=!1}else r=$5(n,o);return qc(r,function(a,u){i&&KP(i.t,a)===u||y9(r,a,t(u))}),o===3?new Set(r):r}(e)}function $5(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return D$(e)}var w5,os,A$=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QP=typeof Map<"u",eN=typeof Set<"u",E5=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",b9=A$?Symbol.for("immer-nothing"):((w5={})["immer-nothing"]=!0,w5),C5=A$?Symbol.for("immer-draftable"):"__$immer_draftable",xn=A$?Symbol.for("immer-state"):"__$immer_state",tN={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},nN=""+Object.prototype.constructor,O$=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,rN=Object.getOwnPropertyDescriptors||function(e){var t={};return O$(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},iN={},Bp={get:function(e,t){if(t===xn)return e;var n=Xo(e);if(!m2(n,t))return function(i,o,a){var u,s=b5(o,a);return s?"value"in s?s.value:(u=s.get)===null||u===void 0?void 0:u.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Ba(r)?r:r===Rv(e.t,t)?(jv(e),e.o[t]=$2(e.A.h,r,e)):r},has:function(e,t){return t in Xo(e)},ownKeys:function(e){return Reflect.ownKeys(Xo(e))},set:function(e,t,n){var r=b5(Xo(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Rv(Xo(e),t),o=i==null?void 0:i[xn];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(YP(n,i)&&(n!==void 0||m2(e.t,t)))return!0;jv(e),b2(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return Rv(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,jv(e),b2(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Xo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ht(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ht(12)}},Fp={};qc(Bp,function(e,t){Fp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Fp.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Ht(13),Bp.deleteProperty.call(this,e[0],t)},Fp.set=function(e,t,n){return t!=="length"&&isNaN(parseInt(t))&&Ht(14),Bp.set.call(this,e[0],t,n,e[0])};var oN=function(){function e(n){var r=this;this.g=E5,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var u=o;o=i;var s=r;return function(p){var g=this;p===void 0&&(p=u);for(var v=arguments.length,m=Array(v>1?v-1:0),y=1;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=si("Patches").$;return Oa(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},e}(),An=new oN,Wg=An.produce;An.produceWithPatches.bind(An);An.setAutoFreeze.bind(An);An.setUseProxies.bind(An);An.applyPatches.bind(An);var D5=An.createDraft.bind(An),S5=An.finishDraft.bind(An);function Wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oh=new WeakMap,ol=new WeakMap,x5=new WeakMap,A5=new WeakMap,O5=new WeakMap,B5=new WeakMap;function F5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kd(e){for(var t=1;t{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of E.pathRefs(e))RN.transform(n,t);for(var r of E.pointRefs(e))jN.transform(r,t);for(var i of E.rangeRefs(e))zN.transform(i,t);var o=new Set,a=[],u=p=>{if(p){var g=p.join(",");o.has(g)||(o.add(g),a.push(p))}},s=oh.get(e)||[],l=uN(t);for(var c of s){var f=_.transform(c,t);u(f)}for(var d of l)u(d);oh.set(e,a),P.transform(e,t),e.operations.push(t),E.normalize(e),t.type==="set_selection"&&(e.marks=null),ol.get(e)||(ol.set(e,!0),Promise.resolve().then(()=>{ol.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(R.isExpanded(r))P.setNodes(e,{[t]:n},{match:X.isText,split:!0});else{var i=kd(kd({},E.marks(e)||{}),{},{[t]:n});e.marks=i,ol.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&P.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&P.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&R.isExpanded(n)&&P.delete(e,{reverse:t==="backward"})},getFragment:()=>{var{selection:t}=e;return t?W.fragment(e,t):[]},insertBreak:()=>{P.splitNodes(e,{always:!0})},insertFragment:t=>{P.insertFragment(e,t)},insertNode:t=>{P.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var i=kd({text:t},r);P.insertNodes(e,i)}else P.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!X.isText(n)){if(te.isElement(n)&&n.children.length===0){var i={text:""};P.insertNodes(e,i,{at:r.concat(0),voids:!0});return}for(var o=E.isEditor(n)?!1:te.isElement(n)&&(e.isInline(n)||n.children.length===0||X.isText(n.children[0])||e.isInline(n.children[0])),a=0,u=0;u{var{selection:n}=e;if(n)if(R.isExpanded(n))P.unsetNodes(e,t,{match:X.isText,split:!0});else{var r=kd({},E.marks(e)||{});delete r[t],e.marks=r,ol.get(e)||e.onChange()}}};return e},uN=e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:t}=e;return _.levels(t)}case"insert_node":{var{node:n,path:r}=e,i=_.levels(r),o=X.isText(n)?[]:Array.from(W.nodes(n),M=>{var[,V]=M;return r.concat(V)});return[...i,...o]}case"merge_node":{var{path:a}=e,u=_.ancestors(a),s=_.previous(a);return[...u,s]}case"move_node":{var{path:l,newPath:c}=e;if(_.equals(l,c))return[];var f=[],d=[];for(var p of _.ancestors(l)){var g=_.transform(p,e);f.push(g)}for(var v of _.ancestors(c)){var m=_.transform(v,e);d.push(m)}var y=d[d.length-1],h=c[c.length-1],$=y.concat(h);return[...f,...d,$]}case"remove_node":{var{path:w}=e,C=_.ancestors(w);return[...C]}case"split_node":{var{path:D}=e,A=_.levels(D),I=_.next(D);return[...A,I]}default:return[]}};function sN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function fi(e,t){if(e==null)return{};var n=sN(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var B$=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?hN(t):t,o=he.None,a=he.None,u=0,s=null,l=null;for(var c of i){var f=c.codePointAt(0);if(!f)break;var d=xN(c,f);if([o,a]=r?[a,d]:[d,o],zu(o,he.ZWJ)&&zu(a,he.ExtPict)&&(r?s=T5(t.substring(0,u)):s=T5(t.substring(0,t.length-u)),!s)||zu(o,he.RI)&&zu(a,he.RI)&&(l!==null?l=!l:r?l=!0:l=TN(t.substring(0,t.length-u)),!l)||o!==he.None&&a!==he.None&&ON(o,a))break;u+=c.length}return u||1},lN=/\s/,cN=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,fN=/['\u2018\u2019]/,dN=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;t.length>0;){var o=B$(t,n),[a,u]=F$(t,o,n);if(pN(a,u,n))i=!0,r+=o;else if(!i)r+=o;else break;t=u}return r},F$=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},pN=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(lN.test(t))return!1;if(fN.test(t)){var i=B$(n,r),[o,a]=F$(n,i,r);if(e(o,a,r))return!0}return!cN.test(t)},hN=function*(t){for(var n=t.length-1,r=0;re>=55296&&e<=56319,vN=e=>e>=56320&&e<=57343,he;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(he||(he={}));var mN=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,yN=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,bN=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,$N=/^[\u1100-\u115F\uA960-\uA97C]$/,wN=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,EN=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,CN=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,DN=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,SN=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,xN=(e,t)=>{var n=he.Any;return e.search(mN)!==-1&&(n|=he.Extend),t===8205&&(n|=he.ZWJ),t>=127462&&t<=127487&&(n|=he.RI),e.search(yN)!==-1&&(n|=he.Prepend),e.search(bN)!==-1&&(n|=he.SpacingMark),e.search($N)!==-1&&(n|=he.L),e.search(wN)!==-1&&(n|=he.V),e.search(EN)!==-1&&(n|=he.T),e.search(CN)!==-1&&(n|=he.LV),e.search(DN)!==-1&&(n|=he.LVT),e.search(SN)!==-1&&(n|=he.ExtPict),n};function zu(e,t){return(e&t)!==0}var AN=[[he.L,he.L|he.V|he.LV|he.LVT],[he.LV|he.V,he.V|he.T],[he.LVT|he.T,he.T],[he.Any,he.Extend|he.ZWJ],[he.Any,he.SpacingMark],[he.Prepend,he.Any],[he.ZWJ,he.ExtPict],[he.RI,he.RI]];function ON(e,t){return AN.findIndex(n=>zu(e,n[0])&&zu(t,n[1]))===-1}var BN=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,T5=e=>e.search(BN)!==-1,FN=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,TN=e=>{var t=e.match(FN);if(t===null)return!1;var n=t[0].length/2;return n%2===1},k5=e=>Zt(e)&&W.isNodeList(e.children)&&!E.isEditor(e),te={isAncestor(e){return Zt(e)&&W.isNodeList(e.children)},isElement:k5,isElementList(e){return Array.isArray(e)&&e.every(t=>te.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return k5(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},kN=["text"],_N=["text"];function _5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t=1;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,ou(ou({},n),{},{at:o}))){if(u>a)break;u!==0&&(s=l),u++}return s},before(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.start(e,[]),i=E.point(e,t,{edge:"start"}),o={anchor:r,focus:i},{distance:a=1}=n,u=0,s;for(var l of E.positions(e,ou(ou({},n),{},{at:o,reverse:!0}))){if(u>a)break;u!==0&&(s=l),u++}return s},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges(e,t){return[E.start(e,t),E.end(e,t)]},end(e,t){return E.point(e,t,{edge:"end"})},first(e,t){var n=E.path(e,t,{edge:"start"});return E.node(e,n)},fragment(e,t){var n=E.range(e,t),r=W.fragment(e,n);return r},hasBlocks(e,t){return t.children.some(n=>E.isBlock(e,n))},hasInlines(e,t){return t.children.some(n=>X.isText(n)||E.isInline(e,n))},hasTexts(e,t){return t.children.every(n=>X.isText(n))},insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock(e,t){return te.isElement(t)&&!e.isInline(t)},isEditor(e){if(!Zt(e))return!1;var t=P5.get(e);if(t!==void 0)return t;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isInline=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&(e.marks===null||Zt(e.marks))&&(e.selection===null||R.isRange(e.selection))&&W.isNodeList(e.children)&&Gi.isOperationList(e.operations);return P5.set(e,n),n},isEnd(e,t,n){var r=E.end(e,n);return $e.equals(t,r)},isEdge(e,t,n){return E.isStart(e,t,n)||E.isEnd(e,t,n)},isEmpty(e,t){var{children:n}=t,[r]=n;return n.length===0||n.length===1&&X.isText(r)&&r.text===""&&!e.isVoid(t)},isInline(e,t){return te.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=x5.get(e);return t===void 0?!0:t},isStart(e,t,n){if(t.offset!==0)return!1;var r=E.start(e,n);return $e.equals(t,r)},isVoid(e,t){return te.isElement(t)&&e.isVoid(t)},last(e,t){var n=E.path(e,t,{edge:"end"});return E.node(e,n)},leaf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=W.leaf(e,r);return[i,r]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!n){var a=[],u=E.path(e,n);for(var[s,l]of W.levels(e,u))if(!!o(s,l)&&(a.push([s,l]),!i&&E.isVoid(e,s)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(R.isExpanded(n)){var[r]=E.nodes(e,{match:X.isText});if(r){var[i]=r,o=fi(i,kN);return o}else return{}}var{anchor:a}=n,{path:u}=a,[s]=E.leaf(e,u);if(a.offset===0){var l=E.previous(e,{at:u,match:X.isText}),c=E.above(e,{match:v=>E.isBlock(e,v)});if(l&&c){var[f,d]=l,[,p]=c;_.isAncestor(p,d)&&(s=f)}}var g=fi(s,_N);return g},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.after(e,o,{voids:r});if(!!a){var[,u]=E.last(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{at:s,match:i,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=W.get(e,r);return[i,r]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!n){var s,l;if(PN.isSpan(n))s=n[0],l=n[1];else{var c=E.path(e,n,{edge:"start"}),f=E.path(e,n,{edge:"end"});s=o?f:c,l=o?c:f}var d=W.nodes(e,{reverse:o,from:s,to:l,pass:$=>{var[w]=$;return a?!1:E.isVoid(e,w)}}),p=[],g;for(var[v,m]of d){var y=g&&_.compare(m,g[1])===0;if(!(r==="highest"&&y)){if(!u(v,m)){if(i&&!y&&X.isText(v))return;continue}if(r==="lowest"&&y){g=[v,m];continue}var h=r==="lowest"?g:[v,m];h&&(i?p.push(h):yield h),g=[v,m]}}r==="lowest"&&g&&(i?p.push(g):yield g),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=o=>oh.get(o)||[];if(!!E.isNormalizing(e)){if(n){var i=Array.from(W.nodes(e),o=>{var[,a]=o;return a});oh.set(e,i)}r(e).length!==0&&E.withoutNormalizing(e,()=>{for(var o of r(e))if(W.has(e,o)){var a=E.node(e,o),[u,s]=a;te.isElement(u)&&u.children.length===0&&e.normalizeNode(a)}for(var l=r(e).length*42,c=0;r(e).length!==0;){if(c>l)throw new Error(` Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. `));var f=r(e).pop();if(W.has(e,f)){var d=E.node(e,f);e.normalizeNode(d)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=_.parent(r),o=E.node(e,i);return o},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(_.isPath(t)){if(i==="start"){var[,o]=W.first(e,t);t=o}else if(i==="end"){var[,a]=W.last(e,t);t=a}}return R.isRange(t)&&(i==="start"?t=R.start(t):i==="end"?t=R.end(t):t=_.common(t.anchor.path,t.focus.path)),$e.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return W.has(e,t)},pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pathRefs(e);return u.delete(i),i.current=null,a}},o=E.pathRefs(e);return o.add(i),i},pathRefs(e){var t=A5.get(e);return t||(t=new Set,A5.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(_.isPath(t)){var i;if(r==="end"){var[,o]=W.last(e,t);i=o}else{var[,a]=W.first(e,t);i=a}var u=W.get(e,i);if(!X.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:r==="end"?u.text.length:0}}if(R.isRange(t)){var[s,l]=R.edges(t);return r==="start"?s:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pointRefs(e);return u.delete(i),i.current=null,a}},o=E.pointRefs(e);return o.add(i),i},pointRefs(e){var t=O5.get(e);return t||(t=new Set,O5.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(!n)return;var a=E.range(e,n),[u,s]=R.edges(a),l=i?s:u,c=!1,f="",d=0,p=0,g=0;for(var[v,m]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(v)){if(!o&&e.isVoid(v)){yield E.start(e,m);continue}if(e.isInline(v))continue;if(E.hasInlines(e,v)){var y=_.isAncestor(m,s.path)?s:E.end(e,m),h=_.isAncestor(m,u.path)?u:E.start(e,m);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(X.isText(v)){var $=_.equals(m,l.path);for($?(p=i?l.offset:v.text.length-l.offset,g=l.offset):(p=v.text.length,g=i?p:0),($||c||r==="offset")&&(yield{path:m,offset:g},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=F$(f,d,i)[1]}if(g=i?g-d:g+d,p=p-d,p<0){d=-p;break}d=0,yield{path:m,offset:g}}}}function w(C,D,A){return D==="character"?B$(C,A):D==="word"?dN(C,A):D==="line"||D==="block"?C.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.before(e,o,{voids:r});if(!!a){var[,u]=E.first(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return c}}},range(e,t,n){if(R.isRange(t)&&!n)return t;var r=E.start(e,t),i=E.end(e,n||t);return{anchor:r,focus:i}},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.rangeRefs(e);return u.delete(i),i.current=null,a}},o=E.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=B5.get(e);return t||(t=new Set,B5.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){x5.set(e,t)},start(e,t){return E.point(e,t,{edge:"start"})},string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=E.range(e,t),[o,a]=R.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:X.isText,voids:r})){var c=s.text;_.equals(l,a.path)&&(c=c.slice(0,a.offset)),_.equals(l,o.path)&&(c=c.slice(o.offset)),u+=c}return u},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,o]=R.edges(t);if(i.offset!==0||o.offset!==0||R.isCollapsed(t))return t;var a=E.above(e,{at:o,match:p=>E.isBlock(e,p)}),u=a?a[1]:[],s=E.start(e,[]),l={anchor:s,focus:o},c=!0;for(var[f,d]of E.nodes(e,{at:l,match:X.isText,reverse:!0,voids:r})){if(c){c=!1;continue}if(f.text!==""||_.isBefore(d,u)){o={path:d,offset:f.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(e,ou(ou({},t),{},{match:n=>E.isVoid(e,n)}))},withoutNormalizing(e,t){var n=E.isNormalizing(e);E.setNormalizing(e,!1);try{t()}finally{E.setNormalizing(e,n)}E.normalize(e)}},PN={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(_.isPath)}},NN=["children"],IN=["text"],N5=new WeakMap,W={ancestor(e,t){var n=W.get(e,t);if(X.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of _.ancestors(t,n)){var i=W.ancestor(e,r),o=[i,r];yield o}},child(e,t){if(X.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,i=W.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))r.length!==0&&(yield[n,r])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))te.isElement(n)&&(yield[n,r])},extractProps(e){if(te.isAncestor(e)){var t=fi(e,NN);return t}else{var t=fi(e,IN);return t}},first(e,t){for(var n=t.slice(),r=W.get(e,n);r&&!(X.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(X.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=Wg({children:e.children},r=>{var[i,o]=R.edges(t),a=W.nodes(r,{reverse:!0,pass:d=>{var[,p]=d;return!R.includes(t,p)}});for(var[,u]of a){if(!R.includes(t,u)){var s=W.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(_.equals(u,o.path)){var c=W.leaf(r,u);c.text=c.text.slice(0,o.offset)}if(_.equals(u,i.path)){var f=W.leaf(r,u);f.text=f.text.slice(i.offset)}}E.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;rW.isNode(r));return N5.set(e,n),n},last(e,t){for(var n=t.slice(),r=W.get(e,n);r&&!(X.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=W.get(e,t);if(!X.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of _.levels(t,n)){var i=W.get(e,r);yield[i,r]}},matches(e,t){return te.isElement(e)&&te.isElementProps(t)&&te.matches(e,t)||X.isText(e)&&X.isTextProps(t)&&X.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:o}=t,a=new Set,u=[],s=e;!(o&&(r?_.isBefore(u,o):_.isAfter(u,o)));){if(a.has(s)||(yield[s,u]),!a.has(s)&&!X.isText(s)&&s.children.length!==0&&(n==null||n([s,u])===!1)){a.add(s);var l=r?s.children.length-1:0;_.isAncestor(u,i)&&(l=i[u.length]),u=u.concat(l),s=W.get(e,u);continue}if(u.length===0)break;if(!r){var c=_.next(u);if(W.has(e,c)){u=c,s=W.get(e,u);continue}}if(r&&u[u.length-1]!==0){var f=_.previous(u);u=f,s=W.get(e,u);continue}u=_.parent(u),s=W.get(e,u),a.add(s)}},parent(e,t){var n=_.parent(t),r=W.get(e,n);if(X.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return X.isText(e)?e.text:e.children.map(W.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of W.nodes(e,t))X.isText(n)&&(yield[n,r])}};function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nt(e){for(var t=1;tGi.isOperation(t))},isSelectionOperation(e){return Gi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Gi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return nt(nt({},e),{},{type:"remove_node"});case"insert_text":return nt(nt({},e),{},{type:"remove_text"});case"merge_node":return nt(nt({},e),{},{type:"split_node",path:_.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(_.equals(t,n))return e;if(_.isSibling(n,t))return nt(nt({},e),{},{path:t,newPath:n});var r=_.transform(n,e),i=_.transform(_.next(n),e);return nt(nt({},e),{},{path:r,newPath:i})}case"remove_node":return nt(nt({},e),{},{type:"insert_node"});case"remove_text":return nt(nt({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return nt(nt({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:u,newProperties:s}=e;return u==null?nt(nt({},e),{},{properties:s,newProperties:null}):s==null?nt(nt({},e),{},{properties:null,newProperties:u}):nt(nt({},e),{},{properties:s,newProperties:u})}case"split_node":return nt(nt({},e),{},{type:"merge_node",path:_.next(e.path)})}}},_={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=_.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;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 Wg(e,r=>{var{affinity:i="forward"}=n;if(!(!e||(e==null?void 0:e.length)===0)){if(r===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(_.equals(o,r)||_.endsBefore(o,r)||_.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(_.equals(a,r)||_.isAncestor(a,r))return null;_.endsBefore(a,r)&&(r[a.length-1]-=1);break}case"merge_node":{var{path:u,position:s}=t;_.equals(u,r)||_.endsBefore(u,r)?r[u.length-1]-=1:_.isAncestor(u,r)&&(r[u.length-1]-=1,r[u.length]+=s);break}case"split_node":{var{path:l,position:c}=t;if(_.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else _.endsBefore(l,r)?r[l.length-1]+=1:_.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:f,newPath:d}=t;if(_.equals(f,d))return;if(_.isAncestor(f,r)||_.equals(f,r)){var p=d.slice();return _.endsBefore(f,d)&&f.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 Zt(e)&&typeof e.offset=="number"&&_.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Wg(e,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:a}=r;switch(t.type){case"insert_node":case"move_node":{r.path=_.transform(o,t,n);break}case"insert_text":{_.equals(t.path,o)&&t.offset<=a&&(r.offset+=t.text.length);break}case"merge_node":{_.equals(t.path,o)&&(r.offset+=t.position),r.path=_.transform(o,t,n);break}case"remove_text":{_.equals(t.path,o)&&t.offset<=a&&(r.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(_.equals(t.path,o)||_.isAncestor(t.path,o))return null;r.path=_.transform(o,t,n);break}case"split_node":{if(_.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.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=fi(e,LN),[r,i]=R.edges(e),[o,a]=R.edges(t),u=$e.isBefore(r,o)?o:r,s=$e.isBefore(i,a)?i:a;return $e.isBefore(s,u)?null:MN({anchor:u,focus:s},n)},isBackward(e){var{anchor:t,focus:n}=e;return $e.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return $e.equals(t,n)},isExpanded(e){return!R.isCollapsed(e)},isForward(e){return!R.isBackward(e)},isRange(e){return Zt(e)&&$e.isPoint(e.anchor)&&$e.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=R.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Wg(e,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,a;if(i==="inward"){var u=R.isCollapsed(r);R.isForward(r)?(o="forward",a=u?o:"backward"):(o="backward",a=u?o:"forward")}else i==="outward"?R.isForward(r)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var s=$e.transform(r.anchor,t,{affinity:o}),l=$e.transform(r.focus,t,{affinity:a});if(!s||!l)return null;r.anchor=s,r.focus=l})}},zN={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=R.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}}},$9=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(Zt(r)&&Zt(i)){if(!$9(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(o){var a=fi(o,HN);return a}return $9(r?i(e):e,r?i(t):t)},isText(e){return Zt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>X.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[ei({},e)];for(var r of t){var i=fi(r,UN),[o,a]=R.edges(r),u=[],s=0;for(var l of n){var{length:c}=l.text,f=s;if(s+=c,o.offset<=f&&a.offset>=s){Object.assign(l,i),u.push(l);continue}if(o.offset!==a.offset&&(o.offset===s||a.offset===f)||o.offset>s||a.offsetf){var m=o.offset-f;p=ei(ei({},d),{},{text:d.text.slice(0,m)}),d=ei(ei({},d),{},{text:d.text.slice(m)})}Object.assign(d,i),p&&u.push(p),u.push(d),g&&u.push(g)}n=u}return n}};function z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function al(e){for(var t=1;t{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=W.parent(e,r),a=r[r.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[u,s]of R.points(t))t[s]=$e.transform(u,n);break}case"insert_text":{var{path:l,offset:c,text:f}=n;if(f.length===0)break;var d=W.leaf(e,l),p=d.text.slice(0,c),g=d.text.slice(c);if(d.text=p+f+g,t)for(var[v,m]of R.points(t))t[m]=$e.transform(v,n);break}case"merge_node":{var{path:y}=n,h=W.get(e,y),$=_.previous(y),w=W.get(e,$),C=W.parent(e,y),D=y[y.length-1];if(X.isText(h)&&X.isText(w))w.text+=h.text;else if(!X.isText(h)&&!X.isText(w))w.children.push(...h.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(y,"] to nodes of different interfaces: ").concat(h," ").concat(w));if(C.children.splice(D,1),t)for(var[A,I]of R.points(t))t[I]=$e.transform(A,n);break}case"move_node":{var{path:M,newPath:V}=n;if(_.isAncestor(M,V))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(V,"] because the destination is inside itself."));var Y=W.get(e,M),J=W.parent(e,M),Z=M[M.length-1];J.children.splice(Z,1);var se=_.transform(M,n),ee=W.get(e,_.parent(se)),ae=se[se.length-1];if(ee.children.splice(ae,0,Y),t)for(var[fe,_e]of R.points(t))t[_e]=$e.transform(fe,n);break}case"remove_node":{var{path:ve}=n,ie=ve[ve.length-1],Ie=W.parent(e,ve);if(Ie.children.splice(ie,1),t)for(var[T,F]of R.points(t)){var k=$e.transform(T,n);if(t!=null&&k!=null)t[F]=k;else{var N=void 0,H=void 0;for(var[j,Q]of W.texts(e))if(_.compare(Q,ve)===-1)N=[j,Q];else{H=[j,Q];break}var ce=!1;N&&H&&(_.equals(H[1],ve)?ce=!_.hasPrevious(H[1]):ce=_.common(N[1],ve).length<_.common(H[1],ve).length),N&&!ce?(T.path=N[1],T.offset=N[0].text.length):H?(T.path=H[1],T.offset=0):t=null}}break}case"remove_text":{var{path:we,offset:Re,text:z}=n;if(z.length===0)break;var ze=W.leaf(e,we),ye=ze.text.slice(0,Re),ue=ze.text.slice(Re+z.length);if(ze.text=ye+ue,t)for(var[be,vn]of R.points(t))t[vn]=$e.transform(be,n);break}case"set_node":{var{path:qe,properties:lt,newProperties:ft}=n;if(qe.length===0)throw new Error("Cannot set properties on the root node!");var un=W.get(e,qe);for(var dt in ft){if(dt==="children"||dt==="text")throw new Error('Cannot set the "'.concat(dt,'" property of nodes!'));var Pn=ft[dt];Pn==null?delete un[dt]:un[dt]=Pn}for(var mn in lt)ft.hasOwnProperty(mn)||delete un[mn];break}case"set_selection":{var{newProperties:sn}=n;if(sn==null)t=sn;else{if(t==null){if(!R.isRange(sn))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(sn)," when there is no current selection."));t=al({},sn)}for(var vr in sn){var mr=sn[vr];if(mr==null){if(vr==="anchor"||vr==="focus")throw new Error('Cannot remove the "'.concat(vr,'" selection property'));delete t[vr]}else t[vr]=mr}}break}case"split_node":{var{path:yn,position:yr,properties:nn}=n;if(yn.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(yn,"] because the root node cannot be split."));var Nn=W.get(e,yn),Za=W.parent(e,yn),qs=yn[yn.length-1],Kr;if(X.isText(Nn)){var mi=Nn.text.slice(0,yr),Qa=Nn.text.slice(yr);Nn.text=mi,Kr=al(al({},nn),{},{text:Qa})}else{var yi=Nn.children.slice(0,yr),Yr=Nn.children.slice(yr);Nn.children=yi,Kr=al(al({},nn),{},{children:Yr})}if(Za.children.splice(qs+1,0,Kr),t)for(var[bn,bi]of R.points(t))t[bi]=$e.transform(bn,n);break}}return t},WN={transform(e,t){e.children=D5(e.children);var n=e.selection&&D5(e.selection);try{n=VN(e,n,t)}finally{e.children=S5(e.children),n?e.selection=Oa(n)?S5(n):n:e.selection=null}}},qN=["text"],GN=["children"];function H5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function U5(e){for(var t=1;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(W.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=E.end(e,[]):a=[0],s=!0),s==null&&(s=!1),R.isRange(a))if(r||(a=E.unhangRange(e,a)),R.isCollapsed(a))a=a.anchor;else{var[,c]=R.edges(a),f=E.pointRef(e,c);P.delete(e,{at:a}),a=f.unref()}if($e.isPoint(a)){u==null&&(X.isText(l)?u=D=>X.isText(D):e.isInline(l)?u=D=>X.isText(D)||E.isInline(e,D):u=D=>E.isBlock(e,D));var[d]=E.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(d){var[,p]=d,g=E.pathRef(e,p),v=E.isEnd(e,a,p);P.splitNodes(e,{at:a,match:u,mode:o,voids:i});var m=g.unref();a=v?_.next(m):m}else return}var y=_.parent(a),h=a[a.length-1];if(!(!i&&E.void(e,{at:y}))){for(var $ of t){var w=y.concat(h);h++,e.apply({type:"insert_node",path:w,node:$}),a=_.next(a)}if(a=_.previous(a),s){var C=E.end(e,a);C&&P.select(e,C)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=_.isPath(n)?au(e,n):$=>E.isBlock(e,$)),!!n){var a=E.nodes(e,{at:n,match:o,mode:r,voids:i}),u=Array.from(a,$=>{var[,w]=$;return E.pathRef(e,w)});for(var s of u){var l=s.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=E.node(e,_.parent(l)),[f,d]=c,p=l[l.length-1],{length:g}=f.children;if(g===1){var v=_.next(d);P.moveNodes(e,{at:l,to:v,voids:i}),P.removeNodes(e,{at:d,voids:i})}else if(p===0)P.moveNodes(e,{at:l,to:d,voids:i});else if(p===g-1){var m=_.next(d);P.moveNodes(e,{at:l,to:m,voids:i})}else{var y=_.next(l),h=_.next(d);P.splitNodes(e,{at:y,voids:i}),P.moveNodes(e,{at:l,to:h,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(!!r){if(n==null)if(_.isPath(r)){var[u]=E.parent(e,r);n=M=>u.children.includes(M)}else n=M=>E.isBlock(e,M);if(!i&&R.isRange(r)&&(r=E.unhangRange(e,r)),R.isRange(r))if(R.isCollapsed(r))r=r.anchor;else{var[,s]=R.edges(r),l=E.pointRef(e,s);P.delete(e,{at:r}),r=l.unref(),t.at==null&&P.select(e,r)}var[c]=E.nodes(e,{at:r,match:n,voids:o,mode:a}),f=E.previous(e,{at:r,match:n,voids:o,mode:a});if(!(!c||!f)){var[d,p]=c,[g,v]=f;if(!(p.length===0||v.length===0)){var m=_.next(v),y=_.common(p,v),h=_.isSibling(p,v),$=Array.from(E.levels(e,{at:p}),M=>{var[V]=M;return V}).slice(y.length).slice(0,-1),w=E.above(e,{at:p,mode:"highest",match:M=>$.includes(M)&&w9(e,M)}),C=w&&E.pathRef(e,w[1]),D,A;if(X.isText(d)&&X.isText(g)){var I=fi(d,qN);A=g.text.length,D=I}else if(te.isElement(d)&&te.isElement(g)){var I=fi(d,GN);A=g.children.length,D=I}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(g)));h||P.moveNodes(e,{at:p,to:m,voids:o}),C&&P.removeNodes(e,{at:C.current,voids:o}),te.isElement(g)&&E.isEmpty(e,g)||X.isText(g)&&g.text===""&&v[v.length-1]!==0?P.removeNodes(e,{at:v,voids:o}):e.apply({type:"merge_node",path:m,position:A,properties:D}),C&&C.unref()}}}})},moveNodes(e,t){E.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(!!r){a==null&&(a=_.isPath(r)?au(e,r):p=>E.isBlock(e,p));var u=E.pathRef(e,n),s=E.nodes(e,{at:r,match:a,mode:i,voids:o}),l=Array.from(s,p=>{var[,g]=p;return E.pathRef(e,g)});for(var c of l){var f=c.unref(),d=u.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:d}),u.current&&_.isSibling(d,f)&&_.isAfter(d,f)&&(u.current=_.next(u.current))}u.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(!!o){a==null&&(a=_.isPath(o)?au(e,o):d=>E.isBlock(e,d)),!n&&R.isRange(o)&&(o=E.unhangRange(e,o));var u=E.nodes(e,{at:o,match:a,mode:i,voids:r}),s=Array.from(u,d=>{var[,p]=d;return E.pathRef(e,p)});for(var l of s){var c=l.unref();if(c){var[f]=E.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},setNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:o=!1,mode:a="lowest",split:u=!1,voids:s=!1}=n;if(!!i){if(r==null&&(r=_.isPath(i)?au(e,i):C=>E.isBlock(e,C)),!o&&R.isRange(i)&&(i=E.unhangRange(e,i)),u&&R.isRange(i)){if(R.isCollapsed(i)&&E.leaf(e,i.anchor)[0].text.length>0)return;var l=E.rangeRef(e,i,{affinity:"inward"}),[c,f]=R.edges(i),d=a==="lowest"?"lowest":"highest",p=E.isEnd(e,f,f.path);P.splitNodes(e,{at:f,match:r,mode:d,voids:s,always:!p});var g=E.isStart(e,c,c.path);P.splitNodes(e,{at:c,match:r,mode:d,voids:s,always:!g}),i=l.unref(),n.at==null&&P.select(e,i)}for(var[v,m]of E.nodes(e,{at:i,match:r,mode:a,voids:s})){var y={},h={};if(m.length!==0){var $=!1;for(var w in t)w==="children"||w==="text"||t[w]!==v[w]&&($=!0,v.hasOwnProperty(w)&&(y[w]=v[w]),t[w]!=null&&(h[w]=t[w]));$&&e.apply({type:"set_node",path:m,properties:y,newProperties:h})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection,height:a=0,always:u=!1}=t;if(i==null&&(i=fe=>E.isBlock(e,fe)),R.isRange(o)&&(o=YN(e,o)),_.isPath(o)){var s=o,l=E.point(e,s),[c]=E.parent(e,s);i=fe=>fe===c,a=l.path.length-s.length+1,o=l,u=!0}if(!!o){var f=E.pointRef(e,o,{affinity:"backward"}),[d]=E.nodes(e,{at:o,match:i,mode:n,voids:r});if(!!d){var p=E.void(e,{at:o,mode:"highest"}),g=0;if(!r&&p){var[v,m]=p;if(te.isElement(v)&&e.isInline(v)){var y=E.after(e,m);if(!y){var h={text:""},$=_.next(m);P.insertNodes(e,h,{at:$,voids:r}),y=E.point(e,$)}o=y,u=!0}var w=o.path.length-m.length;a=w+1,u=!0}var C=E.pointRef(e,o),D=o.path.length-a,[,A]=d,I=o.path.slice(0,D),M=a===0?o.offset:o.path[D]+g;for(var[V,Y]of E.levels(e,{at:I,reverse:!0,voids:r})){var J=!1;if(Y.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)?au(e,o):d=>E.isBlock(e,d)),_.isPath(o)&&(o=E.range(e,o));var u=R.isRange(o)?E.rangeRef(e,o):null,s=E.nodes(e,{at:o,match:a,mode:n,voids:i}),l=Array.from(s,d=>{var[,p]=d;return E.pathRef(e,p)}).reverse(),c=function(p){var g=p.unref(),[v]=E.node(e,g),m=E.range(e,g);r&&u&&(m=R.intersection(u.current,m)),P.liftNodes(e,{at:m,match:y=>te.isAncestor(v)&&v.children.includes(y),voids:i})};for(var f of l)c(f);u&&u.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{match:a,at:u=e.selection}=n;if(!!u){if(a==null&&(_.isPath(u)?a=au(e,u):e.isInline(t)?a=m=>E.isInline(e,m)||X.isText(m):a=m=>E.isBlock(e,m)),i&&R.isRange(u)){var[s,l]=R.edges(u),c=E.rangeRef(e,u,{affinity:"inward"});P.splitNodes(e,{at:l,match:a,voids:o}),P.splitNodes(e,{at:s,match:a,voids:o}),u=c.unref(),n.at==null&&P.select(e,u)}var f=Array.from(E.nodes(e,{at:u,match:e.isInline(t)?m=>E.isBlock(e,m):m=>E.isEditor(m),mode:"lowest",voids:o}));for(var[,d]of f){var p=R.isRange(u)?R.intersection(u,E.range(e,d)):u;if(!!p){var g=Array.from(E.nodes(e,{at:p,match:a,mode:r,voids:o}));if(g.length>0){var v=function(){var[m]=g,y=g[g.length-1],[,h]=m,[,$]=y;if(h.length===0&&$.length===0)return"continue";var w=_.equals(h,$)?_.parent(h):_.common(h,$),C=E.range(e,h,$),D=E.node(e,w),[A]=D,I=w.length+1,M=_.next($.slice(0,I)),V=U5(U5({},t),{},{children:[]});P.insertNodes(e,V,{at:M,voids:o}),P.moveNodes(e,{at:C,match:Y=>te.isAncestor(A)&&A.children.includes(Y),to:M.concat(0),voids:o})}();if(v==="continue")continue}}}}})}},w9=(e,t)=>{if(te.isElement(t)){var n=t;return E.isVoid(e,t)?!0:n.children.length===1?w9(e,n.children[0]):!1}else return!E.isEditor(t)},YN=(e,t)=>{if(R.isCollapsed(t))return t.anchor;var[,n]=R.edges(t),r=E.pointRef(e,n);return P.delete(e,{at:t}),r.unref()},au=(e,t)=>{var[n]=E.node(e,t);return r=>r===n};function V5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W5(e){for(var t=1;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"]:W5(W5({},u),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(!!n){for(var o in t)(o==="anchor"&&t.anchor!=null&&!$e.equals(t.anchor,n.anchor)||o==="focus"&&t.focus!=null&&!$e.equals(t.focus,n.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==n[o])&&(r[o]=n[o],i[o]=t[o]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}}},JN={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:u=!1}=t;if(!!a){if(R.isRange(a)&&R.isCollapsed(a)&&(a=a.anchor),$e.isPoint(a)){var s=E.void(e,{at:a,mode:"highest"});if(!o&&s){var[,l]=s;a=l}else{var c={unit:r,distance:i},f=n?E.before(e,a,c)||E.start(e,[]):E.after(e,a,c)||E.end(e,[]);a={anchor:a,focus:f},u=!0}}if(_.isPath(a)){P.removeNodes(e,{at:a,voids:o});return}if(!R.isCollapsed(a)){if(!u){var[,d]=R.edges(a),p=E.end(e,[]);$e.equals(d,p)||(a=E.unhangRange(e,a,{voids:o}))}var[g,v]=R.edges(a),m=E.above(e,{match:ce=>E.isBlock(e,ce),at:g,voids:o}),y=E.above(e,{match:ce=>E.isBlock(e,ce),at:v,voids:o}),h=m&&y&&!_.equals(m[1],y[1]),$=_.equals(g.path,v.path),w=o?null:E.void(e,{at:g,mode:"highest"}),C=o?null:E.void(e,{at:v,mode:"highest"});if(w){var D=E.before(e,g);D&&m&&_.isAncestor(m[1],D.path)&&(g=D)}if(C){var A=E.after(e,v);A&&y&&_.isAncestor(y[1],A.path)&&(v=A)}var I=[],M;for(var V of E.nodes(e,{at:a,voids:o})){var[Y,J]=V;M&&_.compare(J,M)===0||(!o&&E.isVoid(e,Y)||!_.isCommon(J,g.path)&&!_.isCommon(J,v.path))&&(I.push(V),M=J)}var Z=Array.from(I,ce=>{var[,we]=ce;return E.pathRef(e,we)}),se=E.pointRef(e,g),ee=E.pointRef(e,v);if(!$&&!w){var ae=se.current,[fe]=E.leaf(e,ae),{path:_e}=ae,{offset:ve}=g,ie=fe.text.slice(ve);ie.length>0&&e.apply({type:"remove_text",path:_e,offset:ve,text:ie})}for(var Ie of Z){var T=Ie.unref();P.removeNodes(e,{at:T,voids:o})}if(!C){var F=ee.current,[k]=E.leaf(e,F),{path:N}=F,H=$?g.offset:0,j=k.text.slice(H,v.offset);j.length>0&&e.apply({type:"remove_text",path:N,offset:H,text:j})}!$&&h&&ee.current&&se.current&&P.mergeNodes(e,{at:ee.current,hanging:!0,voids:o});var Q=n?se.unref()||ee.unref():ee.unref()||se.unref();t.at==null&&Q&&P.select(e,Q)}}})},insertFragment(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:o=e.selection}=n;if(!!t.length){if(o)if(R.isRange(o))if(r||(o=E.unhangRange(e,o)),R.isCollapsed(o))o=o.anchor;else{var[,a]=R.edges(o);if(!i&&E.void(e,{at:a}))return;var u=E.pointRef(e,a);P.delete(e,{at:o}),o=u.unref()}else _.isPath(o)&&(o=E.start(e,o));else return;if(!(!i&&E.void(e,{at:o}))){var s=E.above(e,{at:o,match:k=>E.isInline(e,k),mode:"highest",voids:i});if(s){var[,l]=s;if(E.isEnd(e,o,l)){var c=E.after(e,l);o=c}else if(E.isStart(e,o,l)){var f=E.before(e,l);o=f}}var d=E.above(e,{match:k=>E.isBlock(e,k),at:o,voids:i}),[,p]=d,g=E.isStart(e,o,p),v=E.isEnd(e,o,p),m=g&&v,y=!g||g&&v,h=!v,[,$]=W.first({children:t},[]),[,w]=W.last({children:t},[]),C=[],D=k=>{var[N,H]=k,j=H.length===0;return j?!1:m?!0:!(y&&_.isAncestor(H,$)&&te.isElement(N)&&!e.isVoid(N)&&!e.isInline(N)||h&&_.isAncestor(H,w)&&te.isElement(N)&&!e.isVoid(N)&&!e.isInline(N))};for(var A of W.nodes({children:t},{pass:D}))D(A)&&C.push(A);var I=[],M=[],V=[],Y=!0,J=!1;for(var[Z]of C)te.isElement(Z)&&!e.isInline(Z)?(Y=!1,J=!0,M.push(Z)):Y?I.push(Z):V.push(Z);var[se]=E.nodes(e,{at:o,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),[,ee]=se,ae=E.isStart(e,o,ee),fe=E.isEnd(e,o,ee),_e=E.pathRef(e,v?_.next(p):p),ve=E.pathRef(e,fe?_.next(ee):ee),ie=E.pathRef(e,p);P.splitNodes(e,{at:o,match:k=>J?E.isBlock(e,k):X.isText(k)||E.isInline(e,k),mode:J?"lowest":"highest",voids:i});var Ie=E.pathRef(e,!ae||ae&&fe?_.next(ee):ee);if(P.insertNodes(e,I,{at:Ie.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),m&&M.length&&P.delete(e,{at:ie.unref(),voids:i}),P.insertNodes(e,M,{at:_e.current,match:k=>E.isBlock(e,k),mode:"lowest",voids:i}),P.insertNodes(e,V,{at:ve.current,match:k=>X.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),!n.at){var T;V.length>0?T=_.previous(ve.current):M.length>0?T=_.previous(_e.current):T=_.previous(Ie.current);var F=E.end(e,T);P.select(e,F)}Ie.unref(),_e.unref(),ve.unref()}}})},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=e.selection}=n;if(!!i){if(_.isPath(i)&&(i=E.range(e,i)),R.isRange(i))if(R.isCollapsed(i))i=i.anchor;else{var o=R.end(i);if(!r&&E.void(e,{at:o}))return;var a=E.pointRef(e,o);P.delete(e,{at:i,voids:r}),i=a.unref(),P.setSelection(e,{anchor:i,focus:i})}if(!(!r&&E.void(e,{at:i}))){var{path:u,offset:s}=i;t.length>0&&e.apply({type:"insert_text",path:u,offset:s,text:t})}}})}};function q5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _d(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=E9}function N9(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function I9(e){return!!e&&typeof e=="object"}function KI(e){return typeof e=="string"||!_9(e)&&I9(e)&&jf.call(e)==nI}function YI(e){if(!e)return[];if(_$(e))return KI(e)?xI(e):zI(e);if(Mv&&e[Mv])return EI(e[Mv]());var t=Jo(e),n=t==w2?CI:t==E2?SI:JI;return n(e)}function XI(e){return _$(e)?RI(e):MI(e)}function JI(e){return e?yI(e,XI(e)):[]}var Z5=YI;function Q5(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function P$(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){typeof e[n]>"u"?e[n]=t[n]:Q5(t[n])&&Q5(e[n])&&Object.keys(t[n]).length>0&&P$(e[n],t[n])})}var R9={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Mf(){var e=typeof document<"u"?document:{};return P$(e,R9),e}var ZI={document:R9,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout>"u"||clearTimeout(e)}};function Va(){var e=typeof window<"u"?window:{};return P$(e,ZI),e}function QI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function F2(e){return F2=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},F2(e)}function ah(e,t){return ah=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ah(e,t)}function eR(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Tp(e,t,n){return eR()?Tp=Reflect.construct:Tp=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&ah(l,a.prototype),l},Tp.apply(null,arguments)}function tR(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function T2(e){var t=typeof Map=="function"?new Map:void 0;return T2=function(r){if(r===null||!tR(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Tp(r,arguments,F2(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ah(i,r)},T2(e)}function nR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rR(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(r){t.__proto__=r}})}var Ki=function(e){QI(t,e);function t(n){var r;return r=e.call.apply(e,[this].concat(n))||this,rR(nR(r)),r}return t}(T2(Array));function Kg(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,Kg(n)):t.push(n)}),t}function j9(e,t){return Array.prototype.filter.call(e,t)}function iR(e){for(var t=[],n=0;n=0&&o.indexOf(">")>=0){var a="div";o.indexOf("0}).length>0}function jr(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n=0&&(t[oR(i.name.split("data-")[1])]=i.value)}for(var o in t)t[o]==="false"?t[o]=!1:t[o]==="true"?t[o]=!0:parseFloat(t[o])===t[o]*1&&(t[o]*=1);return t}}function Lr(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r=0;else o.value=e}return this}function Mr(){for(var e=arguments.length,t=new Array(e),n=0;n=0;p-=1){var g=d[p];o&&g.listener===o||o&&g.listener&&g.listener.dom7proxy&&g.listener.dom7proxy===o?(f.removeEventListener(l,g.proxyListener,a),d.splice(p,1)):o||(f.removeEventListener(l,g.proxyListener,a),d.splice(p,1))}}return this}function sh(){var e=Va();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function lh(){var e=Va();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function t6(){if(this.length>0){var e=Va(),t=Mf(),n=this[0],r=n.getBoundingClientRect(),i=t.body,o=n.clientTop||i.clientTop||0,a=n.clientLeft||i.clientLeft||0,u=n===e?e.scrollY:n.scrollTop,s=n===e?e.scrollX:n.scrollLeft;return{top:r.top+u-o,left:r.left+s-a}}return null}function cs(){for(var e=0;e"u")return this[0]?this[0].innerHTML:null;for(var t=0;t"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t"u")return!1;if(typeof e=="string"){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(i=O(e),o=0;o=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(e instanceof Ki)for(r=0;r"u"){for(var o=0;o-1&&e%1==0&&e-1&&e%1==0&&e<=M9}function TR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function kR(e){return!!e&&typeof e=="object"}function _R(e){return I$(e)?mR(e):wR(e)}function PR(e){return e}var R$=xR;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let U9=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var V9="Expected a function",a6=0/0,NR="[object Symbol]",IR=/^\s+|\s+$/g,RR=/^[-+]0x[0-9a-f]+$/i,jR=/^0b[01]+$/i,LR=/^0o[0-7]+$/i,MR=parseInt,zR=typeof ot=="object"&&ot&&ot.Object===Object&&ot,HR=typeof self=="object"&&self&&self.Object===Object&&self,UR=zR||HR||Function("return this")(),VR=Object.prototype,WR=VR.toString,qR=Math.max,GR=Math.min,zv=function(){return UR.Date.now()};function KR(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(V9);t=u6(t)||0,vh(n)&&(c=!!n.leading,f="maxWait"in n,o=f?qR(u6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,I=i;return r=i=void 0,l=D,a=e.apply(I,A),a}function g(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var A=D-s,I=D-l,M=t-A;return f?GR(M,o-I):M}function m(D){var A=D-s,I=D-l;return s===void 0||A>=t||A<0||f&&I>=o}function y(){var D=zv();if(m(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(zv())}function C(){var D=zv(),A=m(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return g(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return C.cancel=$,C.flush=w,C}function YR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(V9);return vh(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),KR(e,t,{leading:r,maxWait:t,trailing:i})}function vh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function XR(e){return!!e&&typeof e=="object"}function JR(e){return typeof e=="symbol"||XR(e)&&WR.call(e)==NR}function u6(e){if(typeof e=="number")return e;if(JR(e))return a6;if(vh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(IR,"");var n=jR.test(e);return n||LR.test(e)?MR(e.slice(2),n?2:8):RR.test(e)?a6:+e}var Fa=YR;function ZR(e,t){return document.createElement(e,t)}function QR(e,t,n){return document.createElementNS(e,t,n)}function ej(e){return document.createTextNode(e)}function tj(e){return document.createComment(e)}function nj(e,t,n){e.insertBefore(t,n)}function rj(e,t){e.removeChild(t)}function ij(e,t){e.appendChild(t)}function oj(e){return e.parentNode}function aj(e){return e.nextSibling}function uj(e){return e.tagName}function sj(e,t){e.textContent=t}function lj(e){return e.textContent}function cj(e){return e.nodeType===1}function fj(e){return e.nodeType===3}function dj(e){return e.nodeType===8}const pj={createElement:ZR,createElementNS:QR,createTextNode:ej,createComment:tj,insertBefore:nj,removeChild:rj,appendChild:ij,parentNode:oj,nextSibling:aj,tagName:uj,setTextContent:sj,getTextContent:lj,isElement:cj,isText:fj,isComment:dj};function Gc(e,t,n,r,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:n,text:r,elm:i,key:o}}const k2=Array.isArray;function kp(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function Hv(e){return e===void 0}function $n(e){return e!==void 0}const s6=Gc("",{},[],void 0,void 0);function ul(e,t){var n,r;const i=e.key===t.key,o=((n=e.data)===null||n===void 0?void 0:n.is)===((r=t.data)===null||r===void 0?void 0:r.is);return e.sel===t.sel&&i&&o}function hj(e){return e.sel!==void 0}function gj(e,t,n){var r;const i={};for(let o=t;o<=n;++o){const a=(r=e[o])===null||r===void 0?void 0:r.key;a!==void 0&&(i[a]=o)}return i}const vj=["create","update","remove","destroy","pre","post"];function mj(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t!==void 0?t:pj;for(const d of vj)for(const p of e){const g=p[d];g!==void 0&&n[d].push(g)}function i(d){const p=d.id?"#"+d.id:"",g=d.getAttribute("class"),v=g?"."+g.split(" ").join("."):"";return Gc(r.tagName(d).toLowerCase()+p+v,{},[],void 0,d)}function o(d,p){return function(){if(--p===0){const v=r.parentNode(d);r.removeChild(v,d)}}}function a(d,p){var g,v;let m,y=d.data;if(y!==void 0){const w=(g=y.hook)===null||g===void 0?void 0:g.init;$n(w)&&(w(d),y=d.data)}const h=d.children,$=d.sel;if($==="!")Hv(d.text)&&(d.text=""),d.elm=r.createComment(d.text);else if($!==void 0){const w=$.indexOf("#"),C=$.indexOf(".",w),D=w>0?w:$.length,A=C>0?C:$.length,I=w!==-1||C!==-1?$.slice(0,Math.min(D,A)):$,M=d.elm=$n(y)&&$n(m=y.ns)?r.createElementNS(m,I,y):r.createElement(I,y);for(D0&&M.setAttribute("class",$.slice(A+1).replace(/\./g," ")),m=0;mh?(Y=g[C+1]==null?null:g[C+1].elm,u(d,Y,g,y,C,v)):l(d,p,m,h))}function f(d,p,g){var v,m,y,h,$;const w=(v=p.data)===null||v===void 0?void 0:v.hook;(m=w==null?void 0:w.prepatch)===null||m===void 0||m.call(w,d,p);const C=p.elm=d.elm,D=d.children,A=p.children;if(d!==p){if(p.data!==void 0){for(let I=0;Ii?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:dL(e,t,n)}function gL(e){return function(t){t=Jg(t);var n=lO(t)?uL(t):void 0,r=n?n[0]:t.charAt(0),i=n?hL(n,1).join(""):t.slice(1);return r[e]()+i}}function vL(e){return function(t){return tL(CL(wL(t).replace(Wj,"")),e,"")}}function mL(e){return!!e&&typeof e=="object"}function yL(e){return typeof e=="symbol"||mL(e)&&fL.call(e)==Tj}function Jg(e){return e==null?"":pL(e)}var bL=vL(function(e,t,n){return t=t.toLowerCase(),e+(n?$L(t):t)});function $L(e){return EL(Jg(e).toLowerCase())}function wL(e){return e=Jg(e),e&&e.replace(_j,oL).replace(qj,"")}var EL=gL("toUpperCase");function CL(e,t,n){return e=Jg(e),t=n?void 0:t,t===void 0?aL(e)?lL(e):rL(e):e.match(t)||[]}var DL=bL,SL=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Vv={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},cO={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:SL?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},z$={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var Pd=1;Pd<20;Pd++)z$["f"+Pd]=111+Pd;function fO(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(a){return AL(a,t)}),i=function(u){return r.some(function(s){return OL(s,u)})},o=n==null?i:i(n);return o}function xL(e,t){return fO(e,{byKey:!0},t)}function AL(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in Vv)r[Vv[a]]=!1;var u=!0,s=!1,l=void 0;try{for(var c=i[Symbol.iterator](),f;!(u=(f=c.next()).done);u=!0){var d=f.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var g=dO(d),v=Vv[g];if(d.length>1&&!v&&!cO[d]&&!z$[g])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!v)&&(n?r.key=g:r.which=BL(d)),v&&(r[v]=p?null:!0)}}catch(m){s=!0,l=m}finally{try{!u&&c.return&&c.return()}finally{if(s)throw l}}return r}function OL(e,t){for(var n in e){var r=e[n],i=void 0;if(r!=null&&(n==="key"&&t.key!=null?i=t.key.toLowerCase():n==="which"?i=r===91&&t.which===93?91:t.which:i=t[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function BL(e){e=dO(e);var t=z$[e]||e.toUpperCase().charCodeAt(0);return t}function dO(e){return e=e.toLowerCase(),e=cO[e]||e,e}var FL=fO,Wv=xL,TL="Expected a function",E6=0/0,kL="[object Symbol]",_L=/^\s+|\s+$/g,PL=/^[-+]0x[0-9a-f]+$/i,NL=/^0b[01]+$/i,IL=/^0o[0-7]+$/i,RL=parseInt,jL=typeof ot=="object"&&ot&&ot.Object===Object&&ot,LL=typeof self=="object"&&self&&self.Object===Object&&self,ML=jL||LL||Function("return this")(),zL=Object.prototype,HL=zL.toString,UL=Math.max,VL=Math.min,qv=function(){return ML.Date.now()};function WL(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(TL);t=C6(t)||0,N2(n)&&(c=!!n.leading,f="maxWait"in n,o=f?UL(C6(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var A=r,I=i;return r=i=void 0,l=D,a=e.apply(I,A),a}function g(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var A=D-s,I=D-l,M=t-A;return f?VL(M,o-I):M}function m(D){var A=D-s,I=D-l;return s===void 0||A>=t||A<0||f&&I>=o}function y(){var D=qv();if(m(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(qv())}function C(){var D=qv(),A=m(D);if(r=arguments,i=this,s=D,A){if(u===void 0)return g(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return C.cancel=$,C.flush=w,C}function N2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qL(e){return!!e&&typeof e=="object"}function GL(e){return typeof e=="symbol"||qL(e)&&HL.call(e)==kL}function C6(e){if(typeof e=="number")return e;if(GL(e))return E6;if(N2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=N2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(_L,"");var n=NL.test(e);return n||IL.test(e)?RL(e.slice(2),n?2:8):PL.test(e)?E6:+e}var pO=WL,hO=T$(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",u="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",f="[object GeneratorFunction]",d="[object Map]",p="[object Number]",g="[object Object]",v="[object Promise]",m="[object RegExp]",y="[object Set]",h="[object String]",$="[object Symbol]",w="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",M="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",J="[object Uint8Array]",Z="[object Uint8ClampedArray]",se="[object Uint16Array]",ee="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,fe=/\w*$/,_e=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,ie={};ie[o]=ie[a]=ie[C]=ie[D]=ie[u]=ie[s]=ie[A]=ie[I]=ie[M]=ie[V]=ie[Y]=ie[d]=ie[p]=ie[g]=ie[m]=ie[y]=ie[h]=ie[$]=ie[J]=ie[Z]=ie[se]=ie[ee]=!0,ie[l]=ie[c]=ie[w]=!1;var Ie=typeof ot=="object"&&ot&&ot.Object===Object&&ot,T=typeof self=="object"&&self&&self.Object===Object&&self,F=Ie||T||Function("return this")(),k=t&&!t.nodeType&&t,N=k&&!0&&e&&!e.nodeType&&e,H=N&&N.exports===k;function j(b,S){return b.set(S[0],S[1]),b}function Q(b,S){return b.add(S),b}function ce(b,S){for(var B=-1,L=b?b.length:0;++B-1}function iv(b,S){var B=this.__data__,L=tu(B,b);return L<0?B.push([b,S]):B[L][1]=S,this}Lt.prototype.clear=ev,Lt.prototype.delete=tv,Lt.prototype.get=nv,Lt.prototype.has=rv,Lt.prototype.set=iv;function Kt(b){var S=-1,B=b?b.length:0;for(this.clear();++S-1&&b%1==0&&b-1&&b%1==0&&b<=i}function wr(b){var S=typeof b;return!!b&&(S=="object"||S=="function")}function Bd(b){return!!b&&typeof b=="object"}function il(b){return iu(b)?eu(b):bv(b)}function kv(){return[]}function _v(){return!1}e.exports=Sd}),KL=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},uu;function D6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var YL=0;function XL(e){return"__private_"+YL+++"_"+e}function JL(e,t,n){const r=[];return e.forEach(i=>typeof i!="string"?r.push(i):t[Symbol.split](i).forEach((o,a,u)=>{o!==""&&r.push(o),a"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let mO=e=>crypto.getRandomValues(new Uint8Array(e)),yO=(e,t,n)=>{let r=(2<{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},nM=(e,t)=>yO(e,t,mO),rM=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var iM={nanoid:rM,customAlphabet:nM,customRandom:yO,urlAlphabet:tM,random:mO},Gv=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var n=t<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(t=-t),t<1)return(n?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),r.length-1);t=Number(t/Math.pow(1024,i));var o=r[i];return t>=10||t%1===0?(n?"-":"")+t.toFixed(0)+" "+o:(n?"-":"")+t.toFixed(1)+" "+o};function bO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}bO.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),r=0;t&&r=2}return t?n(t.split(";")[0]):n};function sM(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var lM=0;function cM(e){return"__private_"+lM+++"_"+e}var Kv=cM("publish");class $O{constructor(){Object.defineProperty(this,Kv,{value:fM}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,sM(this,Kv)[Kv](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function fM(){for(var e=arguments.length,t=new Array(e),n=0;n{r(...t)})}$O.VERSION="2.0.3";var dM=function(){return new $O},wO=function(t){const n=t.lastIndexOf(".");return n===-1||n===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,n),extension:t.slice(n+1)}},x6={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"},pM=function(t){var n;if(t.type)return t.type;const r=t.name?(n=wO(t.name).extension)==null?void 0:n.toLowerCase():null;return r&&r in x6?x6[r]:"application/octet-stream"};function hM(e){return e.charCodeAt(0).toString(32)}function A6(e){let t="";return e.replace(/[^A-Z0-9]/ig,n=>(t+=`-${hM(n)}`,"/"))+t}var gM=function(t){let n="uppy";return typeof t.name=="string"&&(n+=`-${A6(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${A6(t.meta.relativePath.toLowerCase())}`),t.data.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n},vM=function(t){if(t==null&&(t=typeof navigator<"u"?navigator.userAgent:null),!t)return!0;const n=/Edge\/(\d+\.\d+)/.exec(t);if(!n)return!0;const r=n[1];let[i,o]=r.split(".");return i=parseInt(i,10),o=parseInt(o,10),i<15||i===15&&o<15063||i>18||i===18&&o>=18218},mM=function(t,n){return n.name?n.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function Yv(e){return e<10?`0${e}`:e.toString()}var _p=function(){const t=new Date,n=Yv(t.getHours()),r=Yv(t.getMinutes()),i=Yv(t.getSeconds());return`${n}:${r}:${i}`};const yM={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n"u"&&(globalThis.AggregateError=class extends Error{constructor(t,n){super(n),this.errors=t}});class SM extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var zt=Bt("plugins"),sl=Bt("storeUnsubscribe"),ti=Bt("emitter"),ta=Bt("preProcessors"),na=Bt("uploaders"),oi=Bt("postProcessors"),Cc=Bt("checkRestrictions"),Xv=Bt("checkMinNumberOfFiles"),Kc=Bt("checkRequiredMetaFieldsOnFile"),Jv=Bt("checkRequiredMetaFields"),Tt=Bt("showOrLogErrorAndThrow"),ll=Bt("assertNewUploadAllowed"),cl=Bt("checkAndCreateFileStateObject"),fl=Bt("startIfAutoProceed"),Zv=Bt("addListeners"),rr=Bt("updateOnlineStatus"),ni=Bt("createUpload"),Qv=Bt("getUpload"),aa=Bt("removeUpload"),ri=Bt("runUpload");DO=Symbol.for("uppy test: getPlugins");SO=Symbol.for("uppy test: createUpload");class xO{constructor(t){Object.defineProperty(this,ri,{value:jM}),Object.defineProperty(this,aa,{value:RM}),Object.defineProperty(this,Qv,{value:IM}),Object.defineProperty(this,ni,{value:NM}),Object.defineProperty(this,Zv,{value:PM}),Object.defineProperty(this,fl,{value:_M}),Object.defineProperty(this,cl,{value:kM}),Object.defineProperty(this,ll,{value:TM}),Object.defineProperty(this,Tt,{value:FM}),Object.defineProperty(this,Jv,{value:BM}),Object.defineProperty(this,Kc,{value:OM}),Object.defineProperty(this,Xv,{value:AM}),Object.defineProperty(this,Cc,{value:xM}),Object.defineProperty(this,zt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,sl,{writable:!0,value:void 0}),Object.defineProperty(this,ti,{writable:!0,value:vO()}),Object.defineProperty(this,ta,{writable:!0,value:new Set}),Object.defineProperty(this,na,{writable:!0,value:new Set}),Object.defineProperty(this,oi,{writable:!0,value:new Set}),Object.defineProperty(this,rr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=$M;const n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:r=>r,onBeforeUpload:r=>r,store:dM(),logger:CM,infoTimeout:5e3};if(this.opts={...n,...t,restrictions:{...n.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=DM),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=Fa(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:vM(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),ne(this,sl)[sl]=this.store.subscribe((r,i,o)=>{this.emit("state-update",r,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),ne(this,Zv)[Zv]()}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{n.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,n){if(!this.getState().files[t])throw new Error(`Can\u2019t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...n}}})}i18nInit(){const t=new gO([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(n=>{n.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r={};Object.keys(n).forEach(i=>{const o={...n[i]};o.progress={...o.progress,...t},r[i]=o}),this.setState({files:r,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){ne(this,ta)[ta].add(t)}removePreProcessor(t){return ne(this,ta)[ta].delete(t)}addPostProcessor(t){ne(this,oi)[oi].add(t)}removePostProcessor(t){return ne(this,oi)[oi].delete(t)}addUploader(t){ne(this,na)[na].add(t)}removeUploader(t){return ne(this,na)[na].delete(t)}setMeta(t){const n={...this.getState().meta,...t},r={...this.getState().files};Object.keys(r).forEach(i=>{r[i]={...r[i],meta:{...r[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:n,files:r})}setFileMeta(t,n){const r={...this.getState().files};if(!r[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...r[t].meta,...n};r[t]={...r[t],meta:i},this.setState({files:r})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:n,error:r}=this.getState(),i=Object.values(t),o=i.filter(g=>{let{progress:v}=g;return!v.uploadComplete&&v.uploadStarted}),a=i.filter(g=>!g.progress.uploadStarted),u=i.filter(g=>g.progress.uploadStarted||g.progress.preprocess||g.progress.postprocess),s=i.filter(g=>g.progress.uploadStarted),l=i.filter(g=>g.isPaused),c=i.filter(g=>g.progress.uploadComplete),f=i.filter(g=>g.error),d=o.filter(g=>!g.isPaused),p=i.filter(g=>g.progress.preprocess||g.progress.postprocess);return{newFiles:a,startedFiles:u,uploadStartedFiles:s,pausedFiles:l,completeFiles:c,erroredFiles:f,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===i.length&&p.length===0,isAllErrored:!!r&&f.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(g=>g.isGhost)}}validateRestrictions(t,n){try{return ne(this,Cc)[Cc](t,n),{result:!0}}catch(r){return{result:!1,reason:r.message}}}checkIfFileAlreadyExists(t){const{files:n}=this.getState();return!!(n[t]&&!n[t].isGhost)}addFile(t){ne(this,ll)[ll](t);const{files:n}=this.getState();let r=ne(this,cl)[cl](n,t);return n[r.id]&&n[r.id].isGhost&&(r={...n[r.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${r.name}, ${r.id}`)),this.setState({files:{...n,[r.id]:r}}),this.emit("file-added",r),this.emit("files-added",[r]),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),ne(this,fl)[fl](),r.id}addFiles(t){ne(this,ll)[ll]();const n={...this.getState().files},r=[],i=[];for(let o=0;o{this.emit("file-added",o)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.keys(r).forEach(o=>{this.log(`Added file: ${r[o].name} id: ${r[o].id} type: ${r[o].type}`)}),r.length>0&&ne(this,fl)[fl](),i.length>0){let o=`Multiple errors occurred while adding files: `;if(i.forEach(a=>{o+=` * ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,n){const{files:r,currentUploads:i}=this.getState(),o={...r},a={...i},u=Object.create(null);t.forEach(f=>{r[f]&&(u[f]=r[f],delete o[f])});function s(f){return u[f]===void 0}Object.keys(a).forEach(f=>{const d=i[f].fileIDs.filter(s);if(d.length===0){delete a[f];return}a[f]={...i[f],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const r=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",t,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(i=>t[i].error);if(n.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ne(this,ni)[ni](n,{forceAllowNewUpload:!0});return ne(this,ri)[ri](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=ne(this,ni)[ni]([t],{forceAllowNewUpload:!0});return ne(this,ri)[ri](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const r=n.filter(l=>l.progress.bytesTotal!=null),i=n.filter(l=>l.progress.bytesTotal==null);if(r.length===0){const l=n.length*100,c=i.reduce((d,p)=>d+p.progress.percentage,0),f=Math.round(c/l*100);this.setState({totalProgress:f});return}let o=r.reduce((l,c)=>l+c.progress.bytesTotal,0);const a=o/r.length;o+=a*i.length;let u=0;r.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,n){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}const r=new t(this,n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const a=`Already found a plugin named '${o.id}'. Tried to use: '${i}'. Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in ne(this,zt)[zt]?ne(this,zt)[zt][r.type].push(r):ne(this,zt)[zt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(ne(this,zt)[zt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[DO](t){return ne(this,zt)[zt][t]}iteratePlugins(t){Object.values(ne(this,zt)[zt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=ne(this,zt)[zt][t.type],r=n.findIndex(a=>a.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ne(this,sl)[sl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ne(this,rr)[rr]),window.removeEventListener("offline",ne(this,rr)[rr]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?ne(this,ri)[ri](t):(ne(this,aa)[aa](t),Promise.reject(new Error("Nonexistent upload")))}[SO](){return ne(this,ni)[ni](...arguments)}addResultData(t,n){if(!ne(this,Qv)[Qv](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}upload(){var t;(t=ne(this,zt)[zt].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{ne(this,Xv)[Xv](n),ne(this,Jv)[Jv](n)}).catch(i=>{ne(this,Tt)[Tt](i)}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=ne(this,ni)[ni](a);return ne(this,ri)[ri](u)}).catch(i=>{ne(this,Tt)[Tt](i,{showInformer:!1})}))}}function xM(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new Tr(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?uM(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new Tr(this.i18n("youCanOnlyUploadFileTypes",{types:s}))}if(i&&e.size!=null){let u=0;if(u+=e.size,t.forEach(s=>{u+=s.size}),u>i)throw new Tr(this.i18n("exceedsSize",{size:Gv(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Tr(this.i18n("exceedsSize",{size:Gv(n),file:e.name}));if(r&&e.size!=null&&e.size{const r=this.getFile(n);return ne(this,Kc)[Kc](r)});if(t.length)throw new SM(t,`${this.i18n("missingRequiredMetaField")}`)}function FM(e,t){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=t===void 0?{}:t;const o=typeof e=="object"?e.message:e,a=typeof e=="object"&&e.details?e.details:"";let u=o;if(a&&(u+=` ${a}`),e.isRestriction?(this.log(u),this.emit("restriction-failed",r,e)):this.log(u,"error"),n&&this.info({message:o,details:a},"error",this.opts.infoTimeout),i)throw typeof e=="object"?e:new Error(e)}function TM(e){const{allowNewUpload:t}=this.getState();t===!1&&ne(this,Tt)[Tt](new Tr(this.i18n("noMoreFilesAllowed")),{file:e})}function kM(e,t){const n=pM(t),r=mM(n,t),i=wO(r).extension,o=Boolean(t.isRemote),a=gM({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const f=new Tr(this.i18n("noDuplicates",{fileName:r}));ne(this,Tt)[Tt](f,{file:t})}const u=t.meta||{};u.name=r,u.type=n;const s=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:r,extension:i||"",meta:{...this.getState().meta,...u},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:o,remote:t.remote||"",preview:t.preview};const c=this.opts.onBeforeFileAdded(l,e);c===!1?ne(this,Tt)[Tt](new Tr("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):typeof c=="object"&&c!==null&&(l=c);try{const f=Object.keys(e).map(d=>e[d]);ne(this,Cc)[Cc](l,f)}catch(f){ne(this,Tt)[Tt](f,{file:l})}return l}function _M(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function PM(){const e=(t,n,r)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),n!=null&&n.id in this.getState().files&&this.setFileState(n.id,{error:i,response:r})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),typeof n=="object"&&n.message){const i=new Error(n.message);i.details=n.message,n.details&&(i.details+=` ${n.details}`),i.message=this.i18n("failedToUpload",{file:t.name}),ne(this,Tt)[Tt](i,{throwErr:!1})}else ne(this,Tt)[Tt](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}})}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...r,postprocess:ne(this,oi)[oi].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:r.bytesTotal},response:n,uploadURL:n.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:n.bytesUploaded||r.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:n}})}),this.on("preprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.preprocess,this.setState({files:n})}),this.on("postprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:n}})}),this.on("postprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.postprocess,this.setState({files:n})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&ne(this,Kc)[Kc](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",ne(this,rr)[rr]),window.addEventListener("offline",ne(this,rr)[rr]),setTimeout(ne(this,rr)[rr],3e3))}function NM(e,t){t===void 0&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=EM();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function IM(e){const{currentUploads:t}=this.getState();return t[e]}function RM(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function jM(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...ne(this,ta)[ta],...ne(this,na)[na],...ne(this,oi)[oi]];try{for(let a=r;a{const c=this.getFile(l);c&&c.progress.postprocess&&this.emit("postprocess-complete",c)});const a=n.fileIDs.map(l=>this.getFile(l)),u=a.filter(l=>!l.error),s=a.filter(l=>l.error);await this.addResultData(e,{successful:u,failed:s,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),ne(this,aa)[aa](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}xO.VERSION="2.1.3";var AO=xO,LM=T$(function(e,t){var n,r,i,o,a,u,s,l,c={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(T,F){for(var k in F)T[k]=F[k];return T}function g(T){var F=T.parentNode;F&&F.removeChild(T)}function v(T,F,k){var N,H,j,Q={};for(j in F)j=="key"?N=F[j]:j=="ref"?H=F[j]:Q[j]=F[j];if(arguments.length>2&&(Q.children=arguments.length>3?n.call(arguments,2):k),typeof T=="function"&&T.defaultProps!=null)for(j in T.defaultProps)Q[j]===void 0&&(Q[j]=T.defaultProps[j]);return m(T,Q,N,H,null)}function m(T,F,k,N,H){var j={type:T,props:F,key:k,ref:N,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:H==null?++i:H};return H==null&&r.vnode!=null&&r.vnode(j),j}function y(T){return T.children}function h(T,F){this.props=T,this.context=F}function $(T,F){if(F==null)return T.__?$(T.__,T.__.__k.indexOf(T)+1):null;for(var k;F0?m(ue.type,ue.props,ue.key,null,ue.__v):ue)!=null){if(ue.__=k,ue.__b=k.__b+1,(ye=lt[z])===null||ye&&ue.key==ye.key&&ue.type===ye.type)lt[z]=void 0;else for(ze=0;ze2&&(Q.children=arguments.length>3?n.call(arguments,2):k),m(T.type,Q,N||T.key,H||T.ref,null)},t.createContext=function(T,F){var k={__c:F="__cC"+l++,__:T,Consumer:function(N,H){return N.children(H)},Provider:function(N){var H,j;return this.getChildContext||(H=[],(j={})[F]=this,this.getChildContext=function(){return j},this.shouldComponentUpdate=function(Q){this.props.value!==Q.value&&H.some(C)},this.sub=function(Q){H.push(Q);var ce=Q.componentWillUnmount;Q.componentWillUnmount=function(){H.splice(H.indexOf(Q),1),ce&&ce.call(Q)}}),N.children}};return k.Provider.__=k.Consumer.contextType=k},t.createElement=v,t.createRef=function(){return{current:null}},t.h=v,t.hydrate=function T(F,k){Ie(F,k,T)},t.isValidElement=o,t.options=r,t.render=Ie,t.toChildArray=function T(F,k){return k=k||[],F==null||typeof F=="boolean"||(Array.isArray(F)?F.some(function(N){T(N,k)}):k.push(F)),k}}),MM=function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE},zM=function(t,n){return n===void 0&&(n=document),typeof t=="string"?n.querySelector(t):MM(t)?t:null},H$=class{constructor(t,n){n===void 0&&(n={}),this.uppy=t,this.opts=n}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new gO([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function O6(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var HM=0;function UM(e){return"__private_"+HM+++"_"+e}const{render:B6}=LM;function VM(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o(t=null,e(...n)))),t}}var dl=UM("updateUI");class U$ extends H${constructor(){super(...arguments),Object.defineProperty(this,dl,{writable:!0,value:void 0})}mount(t,n){const r=n.id,i=zM(t);if(i){this.isTargetDOMEl=!0;const u=document.createDocumentFragment();return O6(this,dl)[dl]=VM(s=>{!this.uppy.getPlugin(this.id)||(B6(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),B6(this.render(this.uppy.getState()),u),this.el=u.firstElementChild,i.appendChild(u),this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof U$)o=t;else if(typeof t=="function"){const u=t;this.uppy.iteratePlugins(s=>{if(s instanceof u)return o=s,!1})}if(o)return this.uppy.log(`Installing ${r} to ${o.id}`),this.parent=o,this.el=o.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw typeof t=="function"?a+=" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":a+="If you meant to target an HTML element, please make sure that the element exists. Check that the